LIVERY REQUEST: Turkish Airlines A350-900

Nice livery brother  was wondering whether you could make an Air India A 350 -900 too!!


loading files

Hey @Foggalong ,
I'm encountering an issue while trying to load the .txt files. Despite having imported the necessary module :).

Thanks for your help! 🙂
Jaime

@sakurita17 Huh, that's weird! If you open the file browser in the same location as test.py what do you see?

@Foggalong Here’s a screenshot of what I see in the file browser. Does this answer the question? right?

Ah yes, I see the issue! When you use VS Code to run test.py from your working directory
`~/Documents/GitHub/robust-genetics Copy2/

python runs that script in your working directory, not in test.py's location
`~/Documents/GitHub/robust-genetics Copy2/examples/50/

which is two levels deeper. Whether working with Python or similar languages like R or MATLAB, when you run code which involves path to files it always looks for them from your working directory, not from the location of the code.
These three test.py scripts you're trying to use are all designed to be ran from their location, i.e. the same folder as the data files. You can see this in the GitHub workflow which checks the build - the runner changes the working directory to the location of test.py each time.
In your case, test.py is looking for EBV50.txt in your working directory (where it's not found), rather than in the same location as test.py (where it actually is). See also example.py - it's designed to be run from the root of the GitHub repository, so includes explicit paths to the locations of the datafiles. If that's still a bit unclear you might find this StackOverflow question helpful, where other people have given alternative explanations to a similar question :slightly_smiling_face:

Ah yes, I see the issue! When you use VS Code to run test.py from your working directory
~/Documents/GitHub/robust-genetics Copy2/

python runs that script in your working directory, not in test.py's location
~/Documents/GitHub/robust-genetics Copy2/examples/50/

which is two levels deeper. Whether working with Python or similar languages like R or MATLAB, when you run code which involves path to files it always looks for them from your working directory, not from the location of the code.
These three test.py scripts you're trying to use are all designed to be ran from their location, i.e. the same folder as the data files. You can see this in the GitHub workflow which checks the build - the runner changes the working directory to the location of test.py each time.
In your case, test.py is looking for EBV50.txt in your working directory (where it's not found), rather than in the same location as test.py (where it actually is). See also example.py - it's designed to be run from the root of the GitHub repository, so includes explicit paths to the locations of the datafiles. If that's still a bit unclear you might find this StackOverflow question helpful, where other people have given alternative explanations to a similar question 🙂

Thanks for the explanation @Foggalong . It seems to be already running.


Navigation with a drawer does not have closing animation

Hey,
I'm currently developing a flutter app. Because of its flexibility I use a navigation drawer. I came across multiple tutorials about navigation with a drawer in flutter, but no one was really satisfying. The first approach is to use one Scaffold with multiple layouts inside, like described here. But like one of the comments says it isn't a clean solution especially in a big app. Another approach is described here. It uses multiple Scaffolds and pushes them with Navigator.of(context).push(...). Because of this method you have an animation between pages and are able to use the back button on android. So my question is, if there is a proper solution to use a navigation drawer. Maybe I'm just missing something and there's an example.
Thanks in advance!

When using navigation drawer I came accros another problem. You cannot change the AppBar from a drawer page in an elegant way. On android you have getActionBar and in my opinion such a feature is missing in flutter. It would be nice if there's a possibility to call AppBar.of(context) to change the title and the actions of the AppBar.

@The-Redhat

On android you have getActionBar and

I'd suggest to ask on StackOverflow how to do this in Flutter.

That's not my problem. I think that flutter should provide either a guide or a component.

I have the same problem with the drawer navigation.
I am not satisfy with the new page I call from the drawer stack over the original screen and the new screen have a new drawer.
What I expected: After clicking on the new page button from the drawer, the drawer close with animation while the new page replace the original page in the background. The drawer should be on top of everything and shared by every page in the same route level.
I am a bit disappointed with this while React Native can do this a lot better. Flutter should have something like Drawer Navigation, Stack Navigation and Tab Navigation.
For example : https://reactnavigation.org/docs/en/drawer-based-navigation.html
Expected animation of drawer navigation: https://youtu.be/KGoE6IPhdwQ?t=683

I am currently using this workaround.
https://medium.com/@kashifmin/flutter-setting-up-a-navigation-drawer-with-multiple-fragments-widgets-1914fda3c8a8
However, it is so complicated to change the app bar inside the "fragment".

I think this should be mark as critical.
Designers or QA in workplace would not approve this drawer navigation.
This issue is preventing companies switching from React Native to Flutter.
As a developer in workplace, I cannot change the design of drawer navigation by designer.
The solution for me now is go back to React Native.

@kelvin1hui Did you figured out the way to change the scaffold content?

@kelvin1hui @campanagerald you don't have to reuse the same Scaffold over your screens.
Just create one Scaffold per screen and give them all the same key
Scaffold(key: ValueKey("drawerScaffold"),body: Text("screen1"))
That way the drawer animation is consistent

Today I faced this problem too. Selecting an item in the drawer and updating the content while keeping the drawer in place. I found no good solution. Using Navigator.push seemed wrong too, the animations of a new AppBar sliding up (when using MaterialRouter) or from right-left (when using CupertinoRouter) weren't pleasant as I could see the previous page while the enter animation was playing.
So I did this when an item in the Drawer is tapped.
             onTap: () async {
                    // closes drawer.
                    Navigator.of(context).pop();
                    if (item.id != selectedItemId) {
                      await Future.delayed(Duration(milliseconds: 250), () {
                        onItemSelected(item.id);
                      });
                    }
                  },

Instead of pushing a new page I close the Drawer and then wait for the animation to finish (250 is a magic number that seemed about right) then I change what my build method returns using setState. And all pages that are open from the drawer sets a new scaffold and new drawer, and all of that pages lifts the onItemSelected callback to the root page. This allows me to change what is shown in the AppBar for each page without having to push a new page in the stack.
It would be great if Navigator.of(context).pop(); returned a future, that would complete when the current page pop animation finishes.

Did you try the solution above your message?

Did you try the solution above your message?

I just did. I could use that approach, but I would have to disable the animations using PageRouteBuilder and the delay I proposed above.

For me the suggested solution above didn't worked. Instead of a ValueKey I now use the same GlobalKey for every Scaffold. To avoid duplicate GlobalKeys in the widget tree I set the transitionDuration of the PageRouteBuilder to zero.
 There should be more documentation, something like navigating with drawer and routes.

This redraw animation seems strange to me too. I believe Flutter can incorporate something based on Android Fragments.

flutter doctor -v
[✓] Flutter (Channel dev, 1.19.0-1.0.pre, on Mac OS X 10.15.5 19F96, locale
    en-GB)
    • Flutter version 1.19.0-1.0.pre at /Users/tahatesser/Code/flutter_dev
    • Framework revision 456d80b9dd (3 weeks ago), 2020-05-11 11:45:03 -0400
    • Engine revision d96f962ca2
    • Dart version 2.9.0 (build 2.9.0-7.0.dev 092ed38a87)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.45.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.2

[✓] Connected device (5 available)
    • SM M305F   • 32003c30dc19668f                     • android-arm64  •
      Android 10 (API 29)
    • iPhone 11  • 0EC80516-8F99-4A0C-89ED-2273579862F9 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)
    • macOS      • macOS                                • darwin-x64     • Mac
      OS X 10.15.5 19F96
    • Web Server • web-server                           • web-javascript •
      Flutter Tools
    • Chrome     • chrome                               • web-javascript •
      Google Chrome 83.0.4103.61

• No issues found!

Based on comments and my testing, this can be improved.

code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      theme: ThemeData.dark(),
      home: StartPage(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Material App Bar'),
      ),
      body: Center(
        child: Container(
          child: Text('Hello World'),
        ),
      ),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.add),
        onPressed: () {},
      ),
    );
  }
}

class StartPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('AppBar'),
      ),
      drawer: TestDrawer(),
      body: Center(
        child: Text('drawer page'),
      ),
    );
  }
}

class FirstPage extends StatelessWidget {
  final String text;

  const FirstPage({Key key, this.text}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Text(text),
      appBar: AppBar(
        title: Text(text),
      ),
      drawer: TestDrawer(),
    );
  }
}

class TestDrawer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Drawer(
      child: ListView(
        children: <Widget>[
          ListTile(
            title: Text('Item 1'),
            onTap: () {
              Navigator.of(context).pop();
              Navigator.of(context).push(
                PageRouteBuilder(pageBuilder: (context, _, __) {
                  return FirstPage(
                    text: 'Item 1',
                  );
                }, transitionsBuilder: (_, __, ___, Widget child) {
                  return child;
                }),
              );
            },
          ),
          ListTile(
            title: Text('Item 2'),
            onTap: () {
              Navigator.of(context).pop();
              Navigator.of(context).push(
                PageRouteBuilder(
                  pageBuilder: (context, _, __) {
                    return FirstPage(text: 'Item 2');
                  },
                ),
              );
            },
          )
        ],
      ),
    );
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /Users/tahatesser/Code/flutter_stable
    • Framework revision<PHONE_NUMBER> (6 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Connected device (1 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

! Doctor found issues in 1 category.

[✓] Flutter (Channel master, 1.26.0-2.0.pre.402, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.26.0-2.0.pre.402 at /Users/tahatesser/Code/flutter_master
    • Framework revision 2a188eeca3 (10 hours ago), 2021-01-17 19:27:00 -0800
    • Engine revision 609036f2bf
    • Dart version 2.12.0 (build 2.12.0-236.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • macOS (desktop)                    • macos         • darwin-x64     • macOS 11.1 20C69 darwin-x64
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 87.0.4280.141

• No issues found!

Based on comments and my testing, this can be improved.

code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      theme: ThemeData.dark(),
      home: StartPage(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Material App Bar'),
      ),
      body: Center(
        child: Container(
          child: Text('Hello World'),
        ),
      ),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.add),
        onPressed: () {},
      ),
    );
  }
}

class StartPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('AppBar'),
      ),
      drawer: TestDrawer(),
      body: Center(
        child: Text('drawer page'),
      ),
    );
  }
}

class FirstPage extends StatelessWidget {
  final String text;

  const FirstPage({Key key, this.text}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Text(text),
      appBar: AppBar(
        title: Text(text),
      ),
      drawer: TestDrawer(),
    );
  }
}

class TestDrawer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Drawer(
      child: ListView(
        children: <Widget>[
          ListTile(
            title: Text('Item 1'),
            onTap: () {
              Navigator.of(context).pop();
              Navigator.of(context).push(
                PageRouteBuilder(pageBuilder: (context, _, __) {
                  return FirstPage(
                    text: 'Item 1',
                  );
                }, transitionsBuilder: (_, __, ___, Widget child) {
                  return child;
                }),
              );
            },
          ),
          ListTile(
            title: Text('Item 2'),
            onTap: () {
              Navigator.of(context).pop();
              Navigator.of(context).push(
                PageRouteBuilder(
                  pageBuilder: (context, _, __) {
                    return FirstPage(text: 'Item 2');
                  },
                ),
              );
            },
          )
        ],
      ),
    );
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /Users/tahatesser/Code/flutter_stable
    • Framework revision<PHONE_NUMBER> (6 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Connected device (1 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

! Doctor found issues in 1 category.

[✓] Flutter (Channel master, 1.26.0-2.0.pre.402, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.26.0-2.0.pre.402 at /Users/tahatesser/Code/flutter_master
    • Framework revision 2a188eeca3 (10 hours ago), 2021-01-17 19:27:00 -0800
    • Engine revision 609036f2bf
    • Dart version 2.12.0 (build 2.12.0-236.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Volumes/Extreme/SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Volumes/Extreme/SDK
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • macOS (desktop)                    • macos         • darwin-x64     • macOS 11.1 20C69 darwin-x64
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 87.0.4280.141

• No issues found!

I Verified the issue on the latest master channel, Navigation Drawer abruptly closes (Without slide transition) when navigating without any transition (Notice item 2).

Android
IOS

But with the default MaterialPageRoute the drawer does close smoothly with slide transition.  I will leave this for the team to decide.

code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      theme: ThemeData.dark(),
      home: StartPage(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Material App Bar'),
      ),
      body: Center(
        child: Container(
          child: Text('Hello World'),
        ),
      ),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.add),
        onPressed: () {},
      ),
    );
  }
}

class StartPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('AppBar'),
      ),
      drawer: TestDrawer(),
      body: Center(
        child: Text('drawer page'),
      ),
    );
  }
}

class FirstPage extends StatelessWidget {
  final String text;

  const FirstPage({Key? key,required this.text}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly ,
          children: [
            Text(text),
            ElevatedButton(onPressed: () {
              Navigator.of(context).pop();
            }, child: Text('pop'))
          ],
        ),
      ),
      appBar: AppBar(
        title: Text(text),
      ),
      drawer: TestDrawer(),
    );
  }
}

class TestDrawer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Drawer(
      child: ListView(
        children: <Widget>[
          ListTile(
            title: Text('Item 1'),
            onTap: () {
              Navigator.of(context).pop();
              Navigator.of(context).push(
                MaterialPageRoute(builder: (context)=> FirstPage(text: "Item 1",)  )
              );
            },
          ),
          ListTile(
            title: Text('Item 2'),
            onTap: () {
              Navigator.of(context).pop();
              Navigator.of(context).push(
                PageRouteBuilder(
                  pageBuilder: (context, _, __) {
                    return FirstPage(text: 'Item 2');
                  },
                ),
              );
            },
          ),
          ListTile(
            title: const Text('Fade Transition'),
            onTap: () {
              Navigator.of(context).pop();
              Navigator.of(context).push(
              PageRouteBuilder(
                transitionsBuilder: (context, animation, secondaryAnimation, child) {
                  return FadeTransition(
                    opacity: animation,
                    child: child,
                  );
                },
                  pageBuilder: (context, _, __) {
                    return FirstPage(text: 'Item 3');
                  })
              );
            },
          ),
          ListTile(
            title: Text('Slide Transition'),
            onTap: () {
              Navigator.of(context).pop();
              Navigator.of(context).push(
              PageRouteBuilder(
                transitionsBuilder: (context, animation, secondaryAnimation, child) {
                  return SlideTransition(
                    position: Tween<Offset>(
                      begin: const Offset(1.0, 0),
                      end: Offset.zero,
                    ).animate(animation),
                    // secondaryAnimation: secondaryAnimation,
                    child: child,
                  );
                },
                  pageBuilder: (context, _, __) {
                    return const FirstPage(text: 'Item 4');
                  })
              );
            },
          ),
        ],
      ),
    );
  }
}

flutter doctor -v (mac)
[✓] Flutter (Channel master, 3.7.0-3.0.pre.33, on macOS 12.6 21G115 darwin-arm64, locale en-IN)
    • Flutter version 3.7.0-3.0.pre.33 on channel master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision<PHONE_NUMBER> (38 minutes ago), 2022-12-05 18:27:21 -0800
    • Engine revision a309d239c4
    • Dart version 2.19.0 (build 2.19.0-463.0.dev)
    • DevTools version 2.20.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
      to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.55.20221129

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 108.0.5359.94

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[✓] Flutter (Channel stable, 3.3.9, on macOS 12.6 21G115 darwin-arm, locale en-IN)
    • Flutter version 3.3.9 on channel stable at /Users/mahesh/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (24 hours ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.53.20221101

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@The-Redhat
I found a workaround that works for now. Looks like so:
https://github.com/flutter/flutter/assets/85837981/f606c04e-a015-42dd-b8b7-badc80c95922
I made It very similar to gmail (maybe even better for somebody) with just doing a delay in the button in the drawer. I'm using Navigator 2.0 (setHomeWidget function just calls setState on a parent widget updating the scaffold in navigator) and then calling Navigator.pop(context) inside the drawer which closes the drawer and after 200ms replaces the scaffold with a different one. Gmail has the delay longer but you can tinker with it and see what works for you. Here is a code sample:
//call this from a button in a drawer
onTap: () async {
  if (page == NavigationDrawerItem.automatickeObjednavky) {//if the user clicks the selected page
    Navigator.pop(context);
  } else {
    Navigator.pop(context);//close the drawer
    await Future.delayed(const Duration(milliseconds: 200));//wait for the drawer to close (or at least trigger the animation)
    setHomeWidget(AutoPage(//switch to the different page
      setHomeWidget: setHomeWidget,
    ));
  }
},

Navigator 2.0 Implementation
class _MyAppState extends State<MyApp> {
  void setHomeWidget(Widget widget) {
    setState(() {
      homeWidget = widget;
    });
  }

  late Widget homeWidget;
  @override
  void initState() {
    homeWidget = LoggingInWidget(setHomeWidget: setHomeWidget);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        home: Navigator(
          pages: [
            MaterialPage(child: homeWidget),
          ],
          onPopPage: (route, result) {
            return route.didPop(result);
          },
        ));
  }
}

In case you would need any details You can take a look at the whole app which I'm writing. It's opensource: https://github.com/tpkowastaken/autojidelna/tree/35987cdcbe1fd699664643a283456abd52d7b9bc
You also said that the appbar is not easily set - You can just put the appbar widget into a stateful widget make it a variable and call setState on that variable. Other option is to use ValueListenableBuilder Which would only reload the specific thing and not the whole widget. Both are used in my app so you can also take a look there. Hope It helps!

Making it possible to specify the NavigationDrawer's open and close animation durations and curves sounds like a resonable proposal.


Publish Filters

Please publish all filters for multi guard authentication

Hello @LaltuDas, thank u for suggestion, can you make pr for this?


[Feature Request] Real Power Sensor Device Association

Checklist

[X] I have filled out the template to the best of my ability.
[X] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
[X] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.
I have a bunch of energy sensors in my apartment. Some of which are Power Strips (TP Link's Kasa smart power strips)
I have devices plugged into them, which are supported by multiple integrations. Let's say a Roku TV for example. It's frustrating that I can look at the Roku and see each integration that uses that device, except the power meter.
Describe the solution you'd like
I'd like to be able to add an energy sensor to the Roku TV, which is just cloning and hiding the real power sensor from the power strip. I think this integration could pull it off, I'd just need a secondary option to the "Real Power Sensor" which would be me providing a device to associate it to. (Basically, a virtual power for that device, from a "Real Power Sensor"
Describe alternatives you've considered
I've considered maybe reaching out to HA, on a way to associate entities between integrations. But, I think I need to come up with a more generic proposal before I go that route.
Additional context
None Applicable.

@DellanX I have added some feature #2056, however this only applies to the energy sensor generated by powercalc.
So with this feature you are able to attach the energy sensor to another device (in your case Roku TV)
On hindsight I'm reading your question again, but I think you were talking specifically about the power sensor (W), not the energy sensor (kWh).
The "Real power" option for powercalc is exactly the same as the "Riemann integral sum" helper which HA core provides, but with a few additional options.
The purpose is to create an energy sensor for an existing power sensor.
Your feature requests seems about replacing the existing power sensor with some proxy entity provided by powercalc.
But this is not something I'm going to add in powercalc, as it is out of scope for the integration. Don't want to "pollute" it with this kind of exotic feature, which almost nobody would use, and also difficult to understand for most users.
Your question essentially boils down to be able to attach a given entity to multiple devices, but I think this will never be possible in HA, as this requires massive architectural changes.
When you want some kind of proxy sensor you could just do with a template sensor in HA, and make a feature request for the ability to add a template sensor to a specific device. I think this feature was requested multiple times before on community forum, so you could also cast your vote there.


Program to deleting N nodes after M nodes in a linked list.

This is an algorithm or a general program to delete N nodes after  M nodes in a singly linked list.
the user shall enter the linked list elements, decide its size and the values of m and n.
I will be implementing it in both languages python and C++, and uploading separate codes.

Please assign this to me.


misplaced rearview on swipe

Hi!
I've added SWRevealViewController into the app and almost everything's fine!
There is only one issue.
If revealViewController is shown on "Swipe left" then rearview is misplaced.
If revealViewController is shown on "TouchUpInside" event then everything's perfect!

video:

The declarations for events handlers:
`if self.revealViewController() != nil {
    menuButton.addTarget(self.revealViewController(), action: #selector(SWRevealViewController.rightRevealToggle(_:)), forControlEvents: UIControlEvents.TouchUpInside)
    self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}`

It seems like rearview on swipe has an offset -21px by Y and +8px by X.
Could you help me with it?
Best Regards,
Dmitry

Could you reproduce this with a little sample ans post it?

Hi!
Do you mean still image or gif-video?

No, a sample project

Hi,
I’m sorry it’s my first time ))
Do I need to publish a sample project on GitHub or just share it to you?
Best Regards,
Dmitry

On May 12, 2016, at 20:37, iDevelopper<EMAIL_ADDRESS>wrote:
No, a sample project
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/John-Lluch/SWRevealViewController/issues/579#issuecomment-218830292

You can share it if you want

Sure, Thanks! I’ll do the sample!

On May 12, 2016, at 22:13, iDevelopper<EMAIL_ADDRESS>wrote:
You can share it if you want
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/John-Lluch/SWRevealViewController/issues/579#issuecomment-218856851

I did it! )))
https://github.com/Datagard/sampleSwipe
Could you have a look?

Yes but there is no SW in this project! It is just a table view controller with two view.

Why not?
Did I miss something?
SWRevealViewController is Entry point.

It is not the project you post on Github

You are correct!
Sorry, it’s my first public project on Github!
I’ve fixed it!
Please, have a look the same link to project Datagard/sampleSwipe.

On May 17, 2016, at 16:11, iDevelopper<EMAIL_ADDRESS>wrote:
It is not the project you post on Github
https://cloud.githubusercontent.com/assets/1782450/15323283/947c0626-1c41-11e6-8284-de57123881df.png
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/John-Lluch/SWRevealViewController/issues/579#issuecomment-219712744

Your right view controller is an subclass of UIImageView. When I tap the right button to display it or when I swipe right to left to display it, it is the same result...

Yes! It’s correct! If you tap the button first then everything is okay!
The problem is appear when “swipe to left” first.
“Tap the button” normalize UI controls position (constraints).

On May 17, 2016, at 16:36, iDevelopper<EMAIL_ADDRESS>wrote:
Your right view controller is an subclass of UIImageView. When I tap the right button to display it or when I swipe right to left to display it, it is the same result...
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/John-Lluch/SWRevealViewController/issues/579#issuecomment-219719319

I have missed something, I can not reproduce the problem

SampleSwiftVideo01.mp4.zip

The problem will appear only if you'll make these steps:

Start the app
Swipe to the left.
It looks like (and it's a wrong position of rearview):

If you will "swipe to the right" and after that "swipe to the left" again the problem will disappeared.

Yes! Your video is showing the problem!
When you "swipe to the left" first time then all UI controls is misplaced!
It seems like rearview on swipe has an offset -21px by Y and +8px by X.

Yes I see now !

Thanks!! )) You spent a lot of time for me!
I hope it will be useful for everybody who uses SWRevealViewController!

Yes but I did nothing always. No wrong code and I think the issue comes from image size or constraints. I need to explore more...

Originally in the app there isn't image.
There are buttons and other controls.
I have inserted image just for sample.
But constraints issue is the same.

I think in your storyboard you have to set constraints on your right view with standard value or your own but uncheck constrain to margins. See this sample project I wrote:

Your project modified:
sampleSwipe-master.zip

Thank you very much!
I'll clean up constraints!

@Datagard , It's work?

I have fixed "Horizontal space" constraints (the problem was in "relative to margin").
"Vertical space" constraints isn't works. But i'm not finished yet.

It isn't working with "vertical" constraints.
On "swipe to the left" UI controls are placed 20px higher

Try this, it works at home:

Set the frame with 0, 0, 600, 600 in the story for this view (Menu in the sample)
Clear constraints for this view.

And after this you have a warning, then select Update frame.
sampleSwipe-master 2.zip


Interstitials will not be called.

There is no trouble installing the package.
Then install the firebase_admob package
Running interstitial ads works well.
However, when you install the admob_flutter package and invoke interstitial ads
Interstitials will not be called.
(interstitialAd.load (); When I execute,The ad will not load.)
Can you use it in duplicate?
So I had to change to the firebase_admob package.

I think the answer to this is, pick one library or the other. Closing this issue for now.


Support debugging

This will be done through a Vim plugin.

Maybe you can build something on top of neovim_gdb.vim

Interesting! I'll look into that.

link provided by @tarruda has changed: https://github.com/neovim/neovim/blob/master/contrib/gdb/neovim_gdb.vim


#[39] Feature: Venue

Codecov Report
Attention: Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (2327722) to head (dfe56b4).
Report is 14 commits behind head on main.

Additional details and impacted files

Files
Coverage Δ

crates/framework/src/features/venue.rs
0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes


Quantized Mobilenet using ARMNN gives wrong results

Hi,
I have created a mobilenetv2 FP32 armnn model using ARMNN APIs. ARMNN FP32 model inference  is as expected and classified output correctly for bell pepper image.
When I quantized the same network using ArmnnQuantizer for bell pepper image and run inference using INT8 model we are seeing completely different results.
Could you look into this issue.
I have attached the below files for you reference MobileNetV2.zip

Mobilenet.cpp - for FP32 inference and armnn model creation
img.txt for FP32 inference
img.raw , csv file used for quantization
Quantized and FP32 models
MobilenetINT8.cpp used for INT8 inference.

Let me know if you need any further info.
Note: The same exercise with ResNet model were giving convincing results for FP32 vs armnn.
Thank you,
Praveen.

Hi,
I'm looking into this now.
Thanks,
Francis.

Hi uu-praveeng,
When I run Mobilenet.cpp with img.txt as input my output is 0.001 for all classes.
Could you attach your output.txt please?
Thanks,
Francis.

Hi @FrancisMurtagh-arm
It is expected because I have not supplied the weights,biases .It will be taking some garbage values for weights/biases  and result could be what you are seeing.
MobileNet.cpp was supplied to give idea what are the layers present in the network.
Could you try to use the MobileNet.armnn which is derived from MobileNet.cpp, and run the inference you should be seeing 0.9722 for 946 index.
Thank you,
Praveen.

Hi uu-praveeng,
Thanks for the info, I used our ExecuteNetwork for inference and got 0.878826 for index 946.
I'll try quantizing and see if how it goes.
Francis.

Hi uu-praveeng,
Did you use img.raw as it is for input to ArmnnQuantizer?
Using it as follows gives an error for me.
./ArmnnQuantizer -c ./img.raw -s QAsymm8 -f ./MobileNet.armnn -d . -o quantMobileNet.armnn
terminate called after throwing an instance of 'armnn::Exception'
what():  CSV file img.raw] does not have correct number of entries on line 0. Expected 3 entries but was 1
Aborted (core dumped)
Thanks,
Francis.

Hi @FrancisMurtagh-arm ,
You need to use the below command to quantize.
./ArmnnQuantizer -c ./MobileNet.csv -s QAsymm8 -f ./MobileNet.armnn -d . -o quantMobileNet.armnn
Thank you,
Praveen.

Hi  uu-praveeng,
Quantizing as above and running inferences now gives all zeroes for classes. Is your img.raw just an example or are you just quantizing with one image tensor?
Thanks,
Francis.

Hi @FrancisMurtagh-arm
img.raw is a derived from img.txt. We are trying to quantize the armnn FP32 model with single image and then run the inference with the same img.txt .
This essentially makes sure that Quantized model is fool proof and as a next step we could quantized it for a bigger dataset .
Since quantizing using same image and int8 inference with that image is not as expected I am unclear if there are any issues with quantization module itself or Does it have to do with Quantization will only work for certain models and not for other.
Note: I have followed the same process for ResNet and int8 inference was as expected for img.txt
Thank you,
Praveen.

Hi Praveen,
./ArmnnQuantizer -c ./MobileNet.csv -s QAsymm8 -f ./MobileNet.armnn -d . -o quantMobileNet.armnn
Could you try to quantize with the above command and run inference on the resulting model to see if you get the same result?
I'm not able to reproduce your results for the quantized model; it is still giving zeroes for inference:
issue344_output.txt
quantMobileNet.armnn.zip
Kind Regards,
Francis.

Hi Francis,
Please use this command "./ArmnnQuantizer -f MobileNet.armnn -c MobileNet.csv -p -d . -o QuantMobileNet.armnn" for given armnn model
Once you have the quantized model .Use the command                                                                        " ./MobileNetINT8Exe QuantMobileNet.armnn img.txt INT8Out.txt"  to get QuantOut.txt. I have attached the INT8Out.txt for you reference and FP32Out.txt for your reference.
(MobileNetINT8Exe is derived by compiling the MobileNetINT8Txt.cpp file that I have shared)
FP32Out.txt
INT8Out.txt
Let me know if you need any more info.
Thank you,
Praveen.

Hi Praveen,
I'm able to reproduce now when I add the preserve-data-type (-p) argument.
Much appreciated,
Francis.

Hi Praveen,
Would you be able to provide the ResNet version of the model, which you had success with?
Thanks,
Francis.

Hi Francis,
I have attached the FP32 model- ResNet.armnn UINT8 model - QuantResNet.armnn and  the corresponding out.txt files.
https://drive.google.com/open?id=1r0sIstp2MvbOxwZ-AFLhW17v2jT6fg5U
Thank you,
Praveen.

Hi Praveen,
Much appreciated,
Francis.

Hi Praveen,
Do you have a similar Tensorflow or TfLlite format model that you could share?
Regards,
Francis.

Hi @FrancisMurtagh-arm
Sorry, I do not have any reference tensorflow/tflite model. I have created both from scratch using armnn APIs.
Thank you,
Praveen.

Hi Praveen,
I did some research into Post-Training Quantization, our current implementation performs quantization of weights at a per-layer granularity which is fine for ResNet as your exercise showed.
However MobileNetV1 and V2 are much smaller with fewer parameters resulting in vastly poorer accuracy results once quantized.
Google have done a Whitepaper on Quantizer design which covers your exact situation:
https://arxiv.org/pdf/1806.08342.pdf
In the table 3 of the paper you can see the results from their experiments after per-layer quantization the accuracies of  MobileNetV1 and MobileNetv2 drop to 0.001 and 0.004 respectively.

They also observe:

Networks with more parameters like Resnets and Inception-v3 are more robust
to quantization compared to Mobilenets which have fewer parameters.
There is a large drop when weights are quantized at the granularity of a layer,
particularly for Mobilenet architectures.

For our Quantizer to be effective for MobileNet we would first require implementation of per-channel weight quantization in our Quantizer and Serializer.
TfLite have already implemented these features if using their tooling is an option.
Kind Regards,
Francis.

Hi @uu-praveeng ,
Did you look into using TfLite for per-channel weight quantization tooling?
Cheers,
James

Hi @james-conroy-arm
No, I didn't look into it. Do you have any such tflite model quantized per channel.
I can try it out and see if it gives better results.
Thank you,
Praveen.

Hi @uu-praveeng
How do you generate the raw file ?
I download the mobilenet v1 1.0 224 fp32 tflite model from Google official release, and use ArmnnConverter convert to "mobilenet.armnn"
./ImageTensorGenerator -i xxx.jpg -f tflite -o xxx.raw --new-width 224 --new-height 224 -l "NCHW"
./ImageCSVFileGenerator -i . -o img.csv
./ArmnnQuantizer -f mobilenet.armnn -c ./img.csv -p -d . -o quantize.armnn
I got an error at ArmnnQuantizer
terminating with uncaught exception of type armnn::Exception: Could not retrieve tensor info for binding ID 0
Do you have any suggestions?

Hi @waynexhsieh
I have used the attahced .cpp file to generate the raw file ,csv file . Let me know if this helps.
You need to pass the image in .txt format with UINT8 datatype.
Thanks,
Praveen.
CSVTensorGeneratorArg.zip

Hi @uu-praveeng ,
The attachced.cpp file can't solve it.
I found that the "layerBindingId" of my generated model is not 0, but is 44288. (I don't know why is 44288)
And I change the number in csv file, and quantize the model success.
Thanks,
Wayne

Hi @waynexhsieh,
The ImageCSVFileGenerator was given the optional "Input layer binding Id" argument to workaround this issue: https://review.mlplatform.org/c/ml/armnn/+/1764/
Regards,
Francis.

Closing as original issue was due to short-comings of per-layer quantization in small models like MobileNet, as described by https://github.com/ARM-software/armnn/issues/344#issuecomment-598670629
If you need any more help @waynexhsieh please open a new issue.
Thanks,
Francis.


Reorder regression tests

What does this PR do?

This PR reorder regression tests so that the multi-card summarization test with T5 is placed at the end. This may help when running CI on AWS instances because this test sometimes silently fails (only on AWS instances) and the reason is still unclear.
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Fix updateSource check for geojson

SDK-758

In the WFS-T example we were using updateSource with just a data key, so the geojson check failed. Instead we need to check for type on the mixin source of old and new.

Coverage remained the same at 98.523% when pulling e7d4a278c9a2a48541db4424d95c7fceb6a9560b on bartvde:wfst-reload-fix into cff754c4503ab944217cba3ab439b6cba8fb7b92 on boundlessgeo:master.

Coverage remained the same at 98.44% when pulling bcaaf5b7c6434946a5406dcc23ea43f58834aa94 on bartvde:wfst-reload-fix into 52f679c449b8e76685b6ecad1b7ceebe1c8a0f5a on boundlessgeo:master.

it's slow because of the number of Mb going over the wire @theduckylittle has already filed SDK-723 to address this


Error: example_envSampling when data is from buoy46022.fetchFromWeb()

I used the buoy46022.fetchFromWeb()  option when running example_envSampling.py.
When doing so I saw more than 10 RuntimeWarning: underflow encounter.

To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  mean_cond = np.linalg.lstsq(phi_mean,para_dist_cond[:,0])[0]
c:\users\sterl_000\codes\wdrt\WDRT\ESSC.py:821: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  std_cond = np.linalg.lstsq(phi_std,para_dist_cond[:,1])[0]
C:\Users\sterl_000\anaconda3\lib\site-packages\statsmodels\nonparametric\kdetools.py:35: RuntimeWarning: underflow encountered in exp
  FAC = np.exp(-JFAC)/BC
C:\Users\sterl_000\anaconda3\lib\site-packages\statsmodels\nonparametric\kdetools.py:35: RuntimeWarning: underflow encountered in true_divide
  FAC = np.exp(-JFAC)/BC
C:\Users\sterl_000\anaconda3\lib\site-packages\statsmodels\nonparametric\kde.py:494: RuntimeWarning: underflow encountered in multiply
  zstar = silverman_transform(bw, gridsize, RANGE)*y # 3.49 in Silverman
C:\Users\sterl_000\anaconda3\lib\site-packages\statsmodels\sandbox\nonparametric\kernels.py:520: RuntimeWarning: underflow encountered in exp
  np.exp(-x**2/2.0), h = h, domain = None, norm = 1.0)
C:\Users\sterl_000\anaconda3\lib\site-packages\statsmodels\sandbox\nonparametric\kernels.py:520: RuntimeWarning: underflow encountered in multiply
  np.exp(-x**2/2.0), h = h, domain = None, norm = 1.0)
C:\Users\sterl_000\anaconda3\lib\site-packages\statsmodels\sandbox\nonparametric\kernels.py:204: RuntimeWarning: underflow encountered in multiply
  w = 1. / (h * n) * np.sum(self((xs-x)/h), axis=0)
c:\users\sterl_000\codes\wdrt\WDRT\ESSC.py:858: RuntimeWarning: underflow encountered in true_divide
  F_hs = tempPDF/sum(tempPDF)
c:\users\sterl_000\codes\wdrt\WDRT\ESSC.py:862: RuntimeWarning: underflow encountered in true_divide
  F_t = f_t/sum(f_t)
c:\users\sterl_000\codes\wdrt\WDRT\ESSC.py:2516: RuntimeWarning: underflow encountered in multiply
  p_x2_x1 = Y*self.nonpara_pdf_2[:,1]
C:\Users\sterl_000\anaconda3\lib\site-packages\scipy\stats\_continuous_distns.py:180: RuntimeWarning: underflow encountered in exp
  return np.exp(-x**2/2.0) / _norm_pdf_C
C:\Users\sterl_000\anaconda3\lib\site-packages\scipy\stats\_continuous_distns.py:180: RuntimeWarning: underflow encountered in true_divide
  return np.exp(-x**2/2.0) / _norm_pdf_C
c:\users\sterl_000\codes\wdrt\WDRT\ESSC.py:2682: RuntimeWarning: underflow encountered in multiply
  ftemp = np.multiply(ftemp,fnew)
c:\users\sterl_000\codes\wdrt\WDRT\ESSC.py:2678: RuntimeWarning: underflow encountered in multiply
  fnew = fk*(1/np.transpose(xi[j][i]))
TypeError: only size-1 arrays can be converted to Python scalars

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ".\example_envSampling.py", line 71, in <module>
    plt.plot(logKDE_T_Return, logKDE_Hs_Return, 'b--', label = 'Bivariate KDE (log)')
  File "C:\Users\sterl_000\anaconda3\lib\site-packages\matplotlib\pyplot.py", line 2796, in plot
    is not None else {}), **kwargs)
  File "C:\Users\sterl_000\anaconda3\lib\site-packages\matplotlib\axes\_axes.py", line 1667, in plot
    self.add_line(line)
  File "C:\Users\sterl_000\anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 1902, in add_line
    self._update_line_limits(line)
  File "C:\Users\sterl_000\anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 1924, in _update_line_limits
    path = line.get_path()
  File "C:\Users\sterl_000\anaconda3\lib\site-packages\matplotlib\lines.py", line 1027, in get_path
    self.recache()
  File "C:\Users\sterl_000\anaconda3\lib\site-packages\matplotlib\lines.py", line 670, in recache
    x = _to_unmasked_float_array(xconv).ravel()
  File "C:\Users\sterl_000\anaconda3\lib\site-packages\matplotlib\cbook\__init__.py", line 1390, in _to_unmasked_float_array
    return np.asarray(x, float)
  File "C:\Users\sterl_000\anaconda3\lib\site-packages\numpy\core\_asarray.py", line 85, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.
PS C:\Users\sterl_000\Codes\WDRT\tests>

@ssolson
I just reran my local copy to see if I could reproduce the issue.  I didn't have the issue on my local machine, which at the very least means a working copy exists.  I will pull this down into its own directory and see if I can reproduce the issue.
As far as the underflow errors, when I had been working on porting this over to Python 3, Bibiana told me that the underflow warnings were to be expected and were not an issue, so I would not worry about them

@ssolson @zmorrell-sand - Let me know how this goes, I can help if needed but I think the two of you will be better at this than me.

@ssolson @ryancoe
This issue should be fixed with my most recent pull request.  I still need to work through the h5 issue


pydantic_schema seems not passed to LLM in the first iteration

in jsonmode.py,
pydantic_schema = Character.schema_json()
...
def generate_json_completion(self, query, chat_template, max_depth=5):
        try:
            depth = 0
            sys_prompt = "You are a helpful assistant that answers in JSON. Here's the json schema you must adhere to:\n<schema>\n{schema}\n<schema>"

if my understanding is correct, seem the pydantic_schema is not passed to {schema} here, is this supposed behavior?

hi Tuanshu, thanks for pointing it out. It was a typo and now it's been fixed.
we fine-tuned the model with pydantic schema as part of the system prompt so it'd be better to pas it in the system prompt.


Be stricter with the package.json version matching (uses ~ to matchonly recent minor versions)

@tcoulter Merge at will Tim

:boom:


chunked_summarize() just returns original input data

llm.summarize() works totally as expected. llm.chunked_summarize() just returns the original input data without any processing behind the scenes (it returns output instantly, so I don't think it's sending to OpenAI)
My code:
import requests
from thinkgpt.llm import ThinkGPT

llm = ThinkGPT(model_name='gpt-3.5-turbo', temperature=0)

URL = 'https://raw.githubusercontent.com/jina-ai/thinkgpt/main/README.md'

input_data = requests.get(URL).text

summary = llm.chunked_summarize(
    input_data,
    instruction_hint='Rewrite the following into an informal, SEO-friendly blog post in markdown format',
    max_tokens=4096,
)

It returns:
# ThinkGPT 🧠🤖

ThinkGPT is a Python library aimed at implementing Chain of Thoughts for Large Language Models (LLMs), prompting the model to think, reason, and to create generative agents.
The library aims to help with the following:
* solve limited context with long memory and compressed knowledge
* enhance LLMs' one-shot reasoning with higher order reasoning primitives
* add intelligent decisions to your code base

And then the rest of the readme
However, if I change that to llm.summarize(), I get:
Introducing ThinkGPT: A Python Library for Large Language Models

ThinkGPT is a Python library that implements Chain of Thoughts for Large Language Models (LLMs), prompting the model to think, reason, and create generative agents. The library aims to solve limited context with long memory and compressed knowledge, enhance LLMs' one-shot reasoning with higher order reasoning primitives, and add intelligent decisions to your code base.

Key Features:
- Thinking building blocks: Memory, Self-refinement, Compress knowledge, Inference, and Natural Language Conditions
- Efficient and Measurable GPT context length
- Extremely easy setup and pythonic API thanks to DocArray

And then the rest of a short blog post

I'm using latest version of thinkgpt installed via pip install git+...


Split all-packages.nix

This patch is moves the header & footer of all-packages.nix into a separated file named all-packages-wrapper.nix.  To do so, I added a new list of arguments to the all-packages.nix which is the explicit list of dependencies, and that we can reduce over time by making it part of the list of paclkages. (system, bootStdenv, noSysDir, …)
Later we should change the way we handle self-references (self & pkgs) such that we can follow the same scheme as done in haskellPackages (self & super).
These modifications are made to simplify the way we can add additional logic to our list of packages.
Note: This patch does not change the sha1 of derivations.
Note: This patch fix the indentation issue of all-packages.nix.
cc @peti @domenkozar @edolstra

cc @edolstra

The error https://travis-ci.org/NixOS/nixpkgs/builds/84793391#L116 from travis looks genuine. It would be great to get that fixed. Otherwise, I'm in favor of merging this patch: :+1:. Does anyone consider this re-factoring controversial?

I rebased this work on top of another pull request that is cleaning the logic of override packages and stdenv.  I am currently working on a security update branch for the NixCon, which is based on a similar modification.
I will get back to this, hopefully before NixCon ;)

This work is now addressed as part of #10851.


Unexpected Identifier Syntax Error

on windows, running the db.json file from the readme.md. Trying to run json-server and just get unexpected identifier errors.
I made sure that the file was utf-8 as that seemed to be feedback from someone else in a previous issue but that didnt sort it.
Any ideas what's going on here?
> json-server --watch db.json SyntaxError: Unexpected identifier     at Object.exports.createScript (vm.js:24:10)     at REPLServer.defaultEval (repl.js:235:25)     at bound (domain.js:287:14)     at REPLServer.runBound [as eval] (domain.js:300:12)     at REPLServer.<anonymous> (repl.js:431:12)     at emitOne (events.js:82:20)     at REPLServer.emit (events.js:169:7)     at REPLServer.Interface._onLine (readline.js:211:10)     at REPLServer.Interface._line (readline.js:550:8)     at REPLServer.Interface._ttyWrite (readline.js:827:14)
db.json file:
{   "posts": [     { "id": 1, "title": "json-server", "author": "typicode" }   ],   "comments": [     { "id": 1, "body": "some comment", "postId": 1 }   ],   "profile": { "name": "typicode" } }

Hi @WattsC-90,
It's a bit hard to see where it failed since there's no mention of any particular node module or json-server in the output.
Can you try json-server http://jsonplaceholder.typicode.com/db? Do you get an error?

sorry to say, exactly the same error:
> json-server http://jsonplaceholder.typicode.com/db SyntaxError: Unexpected identifier     at Object.exports.createScript (vm.js:24:10)     at REPLServer.defaultEval (repl.js:235:25)     at bound (domain.js:287:14)     at REPLServer.runBound [as eval] (domain.js:300:12)     at REPLServer.<anonymous> (repl.js:431:12)     at emitOne (events.js:82:20)     at REPLServer.emit (events.js:169:7)     at REPLServer.Interface._onLine (readline.js:211:10)     at REPLServer.Interface._line (readline.js:550:8)     at REPLServer.Interface._ttyWrite (readline.js:827:14)

Oh, I think I see what's the issue.
I think you're running json-server this way:
C:\Users\...\> node
> json-server http://jsonplaceholder.typicode.com/db

Try running json-server directly without calling node REPL
C:\Users\...\> json-server --watch db.json

I was indeed.. but now get:
'json-server' is not recognized as an internal or external command, operable program or batch file.
i did run (with no errors):
npm install -g json-server

ok, now that one seems to be a "me" problem, so let me track it down and get back to you..

Ok, this was down to my system path being set correctly (embarassing)
make sure: C:\Users\<|ProfileName|>\AppData\Roaming\npm is in the System Variables path, not user variables path.

Congrats :)


avoid skipping validation stage when data read iterator exists #18289

Description
#18289 for v1.x
Checklist
Essentials

[ ] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
[ ] Changes are complete (i.e. I finished coding on this PR)
[ ] All changes have test coverage
[ ] Code is well-documented

Changes

[ ] Feature1, tests, (and when applicable, API doc)
[ ] Feature2, tests, (and when applicable, API doc)

Comments

If this change is a backward incompatible change, why must this change be made.
Interesting edge cases to note here

I reviewed this PR in #18289. Thanks to @heaseny for the original contribution.


Don't put MSW in production builds

MSW isn't supposed to go in production builds... but #807 put it there anyway. (Luckily, this hasn't been deployed yet.)
https://github.com/shapeshift/web/blob/a3a2151959e93d9e06e766abdf6daa21c2f867d5/public/mockServiceWorker.js#L8

Fixed by #1078.


Add Florienzh bot

See github: https://github.com/WhichBrowser/Parser-PHP/issues/497
Common bot used to scan Laravel websites to hack them - adding this bot to this repo so we can block them.

Coverage remained the same at 100.0% when pulling c0332d884b98a2f6b772b1ea30ddfe2e450fc567 on ayumi-cloud:Florienzh into 4899110cd2f87b01e04ced62dbb9dec541031dee on WhichBrowser:master.


Warning on master, but not with npm. Version is different.

Steps to see warning

Clone purescript-language-server (7936a13cf6ff72fba0f2e70dd70b5103f9b2f687)
npm i && npm link
Open https://github.com/jonasbuntinx/purescript-react-realworld/blob/master/src/Main.purs
Trigger save

In comparison

Installing purescript-langauge-server via npm globally
Installs<EMAIL_ADDRESS>Doesn't give you that warning

I'm confused that the npm installation installs 0.14.4, but the source code (as of today) says the version is 0.14.3.
https://github.com/nwolverson/purescript-language-server/blob/7936a13cf6ff72fba0f2e70dd70b5103f9b2f687/package-lock.json#L3
Why is that the case? Am I missing something or is the remote codebase not up-to-date? ;)

Now re-reading this comment I'm actually thinking the code base might differ from the published version. If this is the case it makes it hard to debug issues like https://github.com/nwolverson/purescript-language-server/issues/119 😉

Now re-reading this comment I'm actually thinking the code base might differ from the published version. If this is the case it makes it hard to debug issues like https://github.com/nwolverson/purescript-language-server/issues/119 😉

Thank you


account setup

https://simpleisbetterthancomplex.com/2015/11/26/package-of-the-week-python-decouple.html


etcdserver: time out when readStateC is blocking

Otherwise, it will block forever when the server is overloaded.
Been running this over 200 cases with no failure.
Should fix https://github.com/coreos/etcd/issues/6891.
2016-12-05 23:14:15.145445 I | rafthttp: receiving database snapshot [index:1877557, from 538860f4b8dc9bd3] ...
2016-12-05 23:14:15.484807 W | etcdserver: timed out waiting for read index response
2016-12-05 23:14:16.486533 W | etcdserver: timed out waiting for read index response
2016-12-05 23:14:17.487381 W | etcdserver: timed out waiting for read index response

# timed out here, instead of blocking
2016-12-05 23:14:18.802037 W | etcdserver: timed out sending read states

2016-12-05 23:14:18.973400 W | etcdserver: ignored out-of-date read index response (want [160 68 88 209 49 52 94 25], got [160 68 88 209 49 52 94 49])
2016-12-05 23:14:18.973431 W | etcdserver: ignored out-of-date read index response (want [160 68 88 209 49 52 94 48], got [160 68 88 209 49 52 94 49])
2016-12-05 23:14:19.973558 W | etcdserver: timed out waiting for read index response
2016-12-05 23:14:20.192051 W | etcdserver: ignored out-of-date read index response (want [160 68 88 209 49 52 94 49], got [160 68 88 209 49 52 94 124])
2016-12-05 23:14:21.192240 W | etcdserver: timed out waiting for read index response
2016-12-05 23:14:21.389150 W | etcdserver: ignored out-of-date read index response (want [160 68 88 209 49 52 94 124], got [160 68 88 209 49 52 94 126])
2016-12-05 23:14:23.060116 I | snap: saved database snapshot to disk [total bytes: 208023552]
2016-12-05 23:14:23.060147 I | rafthttp: received and saved database snapshot [index: 1877557, from: 538860f4b8dc9bd3] successfully
2016-12-05 23:14:23.060259 I | raft: 49c299722c86a044 [commit: 1871239, lastindex: 1871239, lastterm: 30] starts to restore snapshot [index: 1877557, term: 30]
2016-12-05 23:14:23.060278 I | raft: log [committed=1871239, applied=1871239, unstable.offset=1871240, len(unstable.Entries)=0] starts to restore snapshot [index: 1877557, term: 30]
2016-12-05 23:14:23.060293 I | raft: 49c299722c86a044 restored progress of 2d33a39906c2e8fc [next = 1877558, match = 0, state = ProgressStateProbe, waiting = false, pendingSnapshot = 0]
2016-12-05 23:14:23.060299 I | raft: 49c299722c86a044 restored progress of 49c299722c86a044 [next = 1877558, match = 1877557, state = ProgressStateProbe, waiting = false, pendingSnapshot = 0]
2016-12-05 23:14:23.060305 I | raft: 49c299722c86a044 restored progress of 538860f4b8dc9bd3 [next = 1877558, match = 0, state = ProgressStateProbe, waiting = false, pendingSnapshot = 0]
2016-12-05 23:14:23.060310 I | raft: 49c299722c86a044 restored progress of b2a15fc29e1c2094 [next = 1877558, match = 0, state = ProgressStateProbe, waiting = false, pendingSnapshot = 0]
2016-12-05 23:14:23.060315 I | raft: 49c299722c86a044 restored progress of f82b1d3fd95afc1a [next = 1877558, match = 0, state = ProgressStateProbe, waiting = false, pendingSnapshot = 0]
2016-12-05 23:14:23.060320 I | raft: 49c299722c86a044 [commit: 1877557] restored snapshot [index: 1877557, term: 30]
2016-12-05 23:14:23.060455 I | etcdserver: applying snapshot at index 1869419...
2016-12-05 23:14:23.063044 I | etcdserver: raft applied incoming snapshot at index 1877557
2016-12-05 23:14:23.072271 I | etcdserver: recovering lessor...
2016-12-05 23:14:23.074595 I | etcdserver: finished recovering lessor
2016-12-05 23:14:23.074610 I | etcdserver: restoring mvcc store...
2016-12-05 23:14:23.075406 I | mvcc: restore compact to 1305048
2016-12-05 23:14:24.798783 I | etcdserver: finished restoring mvcc store
2016-12-05 23:14:24.798811 I | etcdserver: recovering alarms...
2016-12-05 23:14:24.798895 I | etcdserver: closing old backend...
2016-12-05 23:14:24.801148 I | etcdserver: finished recovering alarms
2016-12-05 23:14:24.801165 I | etcdserver: recovering auth store...
2016-12-05 23:14:24.801176 I | etcdserver: finished recovering auth store
2016-12-05 23:14:24.801180 I | etcdserver: recovering store v2...
2016-12-05 23:14:24.801636 I | etcdserver: finished recovering store v2
2016-12-05 23:14:24.801648 I | etcdserver: recovering cluster configuration...
2016-12-05 23:14:24.801734 I | etcdserver/membership: added member 49c299722c86a044 [http://<IP_ADDRESS>:2380] to cluster 932e9025fd6b1462 from store
2016-12-05 23:14:24.801744 I | etcdserver/membership: added member 538860f4b8dc9bd3 [http://<IP_ADDRESS>:2380] to cluster 932e9025fd6b1462 from store
2016-12-05 23:14:24.801750 I | etcdserver/membership: added member b2a15fc29e1c2094 [http://<IP_ADDRESS>:2380] to cluster 932e9025fd6b1462 from store
2016-12-05 23:14:24.801755 I | etcdserver/membership: added member f82b1d3fd95afc1a [http://<IP_ADDRESS>:2380] to cluster 932e9025fd6b1462 from store
2016-12-05 23:14:24.801760 I | etcdserver/membership: added member 2d33a39906c2e8fc [http://<IP_ADDRESS>:2380] to cluster 932e9025fd6b1462 from store
2016-12-05 23:14:24.801766 I | etcdserver/membership: set the cluster version to 3.1 from store
2016-12-05 23:14:24.801770 I | etcdserver: finished recovering cluster configuration

@xiang90 @heyitsanthony @fanminshi

LGTM. defer to @heyitsanthony and @fanminshi

solid debugging. lgtm


Fix bug with count(*) issue

This bug is affecting us on prod and I don't want to edit vendor manually. So we are going to use my branch until you will approve my PR.
This is my first open source contribution.

@araGasparyan Thanks for contributing
@thewunder I used your code. It has merged.


CPTPLND conversion bug for depolarized CPHASE gate

Describe the bug
Attempting to convert a model with depolarizing error on Gcphase from dense parameterization to CPTPLND fails.
To Reproduce
The following is a minimal working example:
from pygsti.modelpacks import smq2Q_XYCPHASE

noisy_model = smq2Q_XYCPHASE.target_model()
noisy_model['Gcphase',0,1].depolarize(0.001)
noisy_model.set_all_parameterizations('CPTPLND')

This yields the following warning and error:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/var/folders/4m/84t3c8fx3x39j2bj2srdb4d8002m7b/T/ipykernel_32267/2949875122.py in <module>
      1 noisy_model = smq2Q_XYCPHASE.target_model()
      2 noisy_model['Gcphase',0,1].depolarize(0.001)
----> 3 noisy_model.set_all_parameterizations('CPTPLND')

~/pyGSTi-0.9.10-develop/pygsti/models/explicitmodel.py in set_all_parameterizations(self, gate_type, prep_type, povm_type, instrument_type, extra)
    430         ityp = _instrument.instrument_type_from_op_type(gate_type) if instrument_type == "auto" else instrument_type
    431
--> 432         self.convert_members_inplace(typ, 'operations', 'all', flatten_structure=True)
    433         self.convert_members_inplace(ityp, 'instruments', 'all', flatten_structure=True)
    434         self.convert_members_inplace(rtyp, 'preps', 'all', flatten_structure=True)

~/pyGSTi-0.9.10-develop/pygsti/models/explicitmodel.py in convert_members_inplace(self, to_type, categories_to_convert, labels_to_convert, ideal_model, flatten_structure, set_default_gauge_group)
    349                 if labels_to_convert == 'all' or lbl in labels_to_convert:
    350                     ideal = ideal_model.operations.get(lbl, None) if (ideal_model is not None) else None
--> 351                     self.operations[lbl] = _op.convert(gate, to_type, self.basis, ideal, flatten_structure)
    352         if any([c in categories_to_convert for c in ('all', 'instruments')]):
    353             for lbl, inst in self.instruments.items():

~/pyGSTi-0.9.10-develop/pygsti/modelmembers/operations/__init__.py in convert(operation, to_type, basis, ideal_operation, flatten_structure)
    372             error_msgs[to_type] = str(e)  # try next to_type
    373
--> 374     raise ValueError("Could not convert operation to to type(s): %s\n%s" % (str(to_types), str(error_msgs)))
    375
    376

ValueError: Could not convert operation to to type(s): ('CPTPLND',)
{'CPTPLND': 'Could not create an operator of type(s) CPTPLND from the given superop:\n{\'CPTPLND\': "Failure to create CPTP operation (maybe due the complex log\'s branch cut?)"}'}

Note that this does not fail when the depolarized gate is a local gate (e.g., Gxpi2:0).
Expected behavior
The parameterization of the model should change to CPTPLND.
Environment

pyGSTi <IP_ADDRESS>.post175 (develop branch)
python 3.8.13
macOS 12.6.3

As the error message states, this was likely due to branch cut issues with the CPHASE gate (since it has two -1 eigenvalues). This can be fixed by passing in the target model to set_all_parameterizations (which is a new feature as of this bugfix).
A minimal working example now would be as follows:
from pygsti.modelpacks import smq2Q_XYCPHASE

target_model = smq2Q_XYCPHASE.target_model()
noisy_model = target_model.copy()
noisy_model['Gcphase',0,1].depolarize(0.001)
noisy_model.set_all_parameterizations('CPTPLND', ideal_model=target_model)

This change also include an updated error message. Including just the last few lines of the error message:
ValueError: Could not convert operation to to type(s): ('CPTPLND',)
{'CPTPLND': 'Could not create an operator of type(s) CPTPLND from the given superop:\n{\'CPTPLND\': "Failure to create CPTP operation (maybe due the complex log\'s branch cut?)"}'}

The above exception was the direct cause of the following exception:

ValueError                                Traceback (most recent call last)
Cell In[2], line 6
      4 noisy_model = target_model.copy()
      5 noisy_model['Gcphase',0,1].depolarize(0.001)
----> 6 noisy_model.set_all_parameterizations('CPTPLND')

File ~/Documents/repos/pyGSTi/pygsti/models/explicitmodel.py:441, in ExplicitOpModel.set_all_parameterizations(self, gate_type, prep_type, povm_type, instrument_type, ideal_model)
    439     self.convert_members_inplace(povmtyp, 'povms', 'all', flatten_structure=True, ideal_model=static_model)
    440 except ValueError as e:
--> 441     raise ValueError("Failed to convert members. If converting to CPTP-based models, " +
    442         "try providing a target model to avoid possible branch cuts.") from e
    444 self.set_default_gauge_group_for_member_type(typ)

ValueError: Failed to convert members. If converting to CPTP-based models, try providing an ideal_model to avoid possible branch cuts.

Closed as this is now in 0.9.11 release


As a user i want to see the best route of travel between two locations

Subtasks: #57 #56 #55 #31 #26  #25


tf-nightly ResNet50V2 building error

System information
Colab
Describe the current behavior
Tf-nightly notebook:
https://colab.research.google.com/drive/1-A_C9bQL0cRdJ5F2ETlJl9GaZmukYVaq?usp=sharing
Describe the expected behavior
Tf 2.4.1 notebook:
https://colab.research.google.com/drive/1lRlGfQljmqAwOsP_npItl_aElCI9KPMD?usp=sharing

@ravikyram could you take a look, please?

@ravikyram could you take a look, please?

The break is introduced in https://github.com/tensorflow/tensorflow/commit/9700d00258607d5a81980a6fe602280dd0f4d2e1. What you do is to override attributes related to output shape inference (somehow risky). So it breaks the static shape inference when you try to build again. Any reason that you have to do that? Note that overriding some of those attributes are meaningless (like initializers). When you call ResNet50V2, the model has already been built, so initializers overriding does not have any effect.

The break is introduced in https://github.com/tensorflow/tensorflow/commit/9700d00258607d5a81980a6fe602280dd0f4d2e1. What you do is to override attributes related to output shape inference (somehow risky). So it breaks the static shape inference when you try to build again. Any reason that you have to do that? Note that overriding some of those attributes are meaningless (like initializers). When you call ResNet50V2, the model has already been built, so initializers overriding does not have any effect.

Thank you very much, I was using a pre-trained model, therefore I wanted to leave it as is


CI: fix build.yml so that it reports test coverage

@rultor merge it.

@rultor merge it.

@rafamizes OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge it.

@rafamizes Done! FYI, the full log is here (took me 2min)


scripts: tests: Blackbox test expansion - coverage

Adds tests related to coverage flags:
--coverage-tool
--coverage-basedir
--coverage-formats
Move to coverage.py:
--coverage
--enable-coverage

@KamilxPaszkiet this needs a rebase


Some changes in Settings window

Use a simpler way of removing the icon and title from the Settings window (documented UXTheme API)
Capitalize the "H" in GitHub 😏
Add minimize button in window (feel free to remove though)
Modify rule service to ignore windows made by the program itself.

Cool That's awesome!
I read https://docs.microsoft.com/en-us/windows/win32/dwm/customframe and all I did was documented too, but I didn't know there's a simpler API for that.

I would add a rule in config file instead, like this:
Process: "MicaForEveryone" {
...
}

You can't be sure that the user will keep the file name MicaForEveryone.exe though.

You can't be sure that the user will keep the file name MicaForEveryone.exe though.
why would they change it?👀😂

You can't be sure that the user will keep the file name MicaForEveryone.exe though.

why would they change it?👀😂

Well why not?

Well why not?

btw I'm not sure if app applies rules to itself or not, seems like it doesn't. But I think there was a better way without need to modify TargetWindow.

btw I'm not sure if app applies rules to itself or not, seems like it doesn't. But I think there was a better way without need to modify TargetWindow.

The Global rule does apply to itself. I tried.

I don't see it applying to MFE in debug logs. Idk why it doesn't do it on my machine.


podvm: Setup NAT rules for AWS/Azure for IMDS connectivity

Fixes: #1000

cc @katexochen

I updated the script based on @yoheiueda suggestion. I tested the script by manually updating an existing image. I haven't created an image from scratch. If anyone gets time to try this, it'll be great. I'll give it a shot next week.

Thanks @bpradipt
Fixes #1037, not 1000.

Ah sorry.. I'll change it

This still fixes the wrong issue, I guess you must update the PR description manually.
LGTM otherwise. :)


sent a message to Ollama without response

I am sure that the ollama settings have been configured.
I have already verified the same configuration.
However, after sending the message in VOID, no response was received,and the ollama server printed the following message:
[GIN] 2024/10/12 - 15:22:04 | 204 |      36.364µs |  <IP_ADDRESS> | OPTIONS  "/api/chat"
204: HTTP status code
OPTIONS：HTTP request type

Thanks for the report. Can you try again with the latest code? We recently made a lot of routing changes.

After updating the code, I found that I still can't connect to the Olama server and openAICompatible server properly.
I pulled the code using the following command:
'git pull origin main'
and then :
'cd void/extensions/void',
'npm run build',
and  ran with 'F5'.
1. I set up my openAICompatible config and sent the content, but I haven't received a reply.
The server printed info:
[GIN] 2024/10/16 - 10:14:38 | 204 |       18.29µs |  <IP_ADDRESS> | OPTIONS  "/v1/chat/completions"
[GIN] 2024/10/16 - 10:14:39 | 204 |      19.269µs |  <IP_ADDRESS> | OPTIONS  "/v1/chat/completions"
[GIN] 2024/10/16 - 10:14:40 | 204 |      14.646µs |  <IP_ADDRESS> | OPTIONS  "/v1/chat/completions"
2. I set up Ollama config and sent the content, but I haven't received a reply either.
The server printed info:
[GIN] 2024/10/16 - 10:12:17 | 204 |      23.159µs |  <IP_ADDRESS> | OPTIONS  "/api/chat"
I have modified the code related to Olama's model configuration in package.json,added my models:
"void.ollama.model": {
"type": "string",
"default": "llama3.1",
"description": "Ollama model to use.",
"enum": [
"qwen25coder:latest",
"deepseek-v2.5:latest",
"codegemma",
"codegemma:2b",
"codegemma:7b"
.........
]
},

Thanks, this is useful. Do any errors show up in the Console? (you can view VSCode's console by pressing Ctrl+Shift+P and then enter 'Developer: Toggle Developer Tools').

Thanks, this is useful. Do any errors show up in the Console? (you can view VSCode's console by pressing Ctrl+Shift+P and then enter 'Developer: Toggle Developer Tools').

Is it a cross domain issue?

It looks like https://aicoder.y5kfpt.com/ doesn't have vscode-webview:// listed as an allowed origin. Just curious, how are you hosting https://aicoder.y5kfpt.com/? Is this something you can control, or are you using some kind of service to deploy it?
One solution is Access-Control-Allow-Origin: vscode-webview://* to the response on your aicoder server to get it to work. Another solution is for Void to add a proxy so people don't have to do this (this is probably the better option...)

It looks like https://aicoder.y5kfpt.com/ doesn't have vscode-webview:// listed as an allowed origin. Just curious, how are you hosting https://aicoder.y5kfpt.com/? Is this something you can control, or are you using some kind of service to deploy it?
One solution is to add Access-Control-Allow-Origin: vscode-webview://* to the response on your aicoder server to get it to work. Another solution is for Void to add a proxy so people don't have to do this (this is probably the better option...)

😊😊😊😊I downloaded this service from GitHub：https://github.com/ollama/ollama/releases.
when I set the public server  of deepseek:https://api.deepseek.com/chat/completions,still err:

I think the error you're seeing with deepseek is just that you haven't paid them.
I could be wrong, but it looks like the server you're running has a CORS error because it's routing packets to Ollama. Ollama has the right CORS settings applied, but the server itself doesn't.
If you could add Access-Control-Allow-Origin: vscode-webview://* to the server itself, that might fix the problem.

It looks like https://aicoder.y5kfpt.com/ doesn't have vscode-webview:// listed as an allowed origin even though you added it to OLLAMA_ORIGINS. I wonder if this is because the server is routing calls to Ollama? Just curious, how are you hosting https://aicoder.y5kfpt.com/?

Thanks for your reply!
https://aicoder.y5kfpt.com/  is a nginx server.
I have set the conf of nginx,added webview://1rfc0or1ee4t2bqkqc5hsk9emo8cf9s090aklamj9du17b258qu8",but it still err:

Deepseek can now be used normally after I deposit money.

Without more information it's hard to help, but it seems your still server isn't sending the correct CORS headers.


bug: Attempted to merge branches with different bases to align get_tx_info()

Hey,
This code was tried at fd5e6fe681f42c7e6b9cd53cd0d957bdce69e719.
It works at the height on which of alpha.7 was released 81c4eb942dace6849a8067dc43263da99579bef8
Running into
Attempted to merge branches with different bases to align

I tried to take out as much of the non faulty code as possible:
 #[external]
fn __validate__(calls: Array::<Call>) -> felt252 {
    if calls.len() == 1 {
        let tx_info = get_tx_info().unbox();
        let selector = *calls[0].selector;
        assert(selector != EXECUTE_AFTER_UPGRADE_SELECTOR, 'argent/forbidden-call');
    } else {
        assert_no_self_call(calls.span(), get_contract_address());
    }
    VALIDATED
}

fn assert_no_self_call(mut calls: Span::<Call>, self: ContractAddress) {

    match calls.pop_front() {
        Option::Some(call) => {
            assert((*call.to) != self, 'argent/no-multicall-to-self');
            assert_no_self_call(calls, self);
        },
        Option::None(_) => (),
    }
}

If I move let tx_info = get_tx_info().unbox outside of the “if” it works.
If I comment asssert_no_self_call it also works...
It should  be possible to run such code.

created a shorter non-contract based version:
use starknet::get_tx_info;
use box::BoxTrait;

#[test]
fn test() {
    foo(7);
}

fn foo(v: felt252) {
    if v == 1 {
        let tx_info = get_tx_info().unbox();
        assert(v != 'EXECUTE_AFTER_UPGRADE', 'argent/forbidden-call');
    } else {
        internal::revoke_ap_tracking();
    }
}

attempting to understand why we add fail to correctly merge branches here.

Hi !
I'm facing a similar issue with nested conditions.
fn _lockTokens(tokenAddress: starknet::ContractAddress, tokenId: u256, amount: u256, isNative: bool) {
    let caller = starknet::get_caller_address();
    let contractAddress = starknet::get_contract_address();

    if (tokenAddress.isERC721()) {
        let ERC721 = IERC721Dispatcher { contract_address: tokenAddress };

        if (isNative) {
            ERC721.transferFrom(from: caller, to: contractAddress, :tokenId);
        } else {
            // check if caller is owner before burning
            assert(ERC721.ownerOf(:tokenId) == caller, 'You do not own this token');

            ERC721.burn(:tokenId);
        }
    } else if (tokenAddress.isERC1155()) {
        assert(amount > u256 {low: 0, high: 0 }, 'Cannot deposit null amount');

        let ERC1155 = IERC1155Dispatcher { contract_address: tokenAddress };

        if (isNative) {
            ERC1155.safeTransferFrom(
                from: caller,
                to: contractAddress,
                :tokenId,
                :amount,
                data: ArrayTrait::<felt252>::new()
            );
        } else {
            ERC1155.burn(from: caller, :tokenId, :amount);
        }
    } else {
        panic_with_felt252('Kass: Unkown token standard');
    }
}

It works if I remove one of the nested if (isNative) {...} else {...}
Hope it helps 🤷♀


Admin User Gets Created again and triggers mail every time

Affected module
Does it impact the UI, backend or Ingestion Framework?
Backend
Describe the bug
When an admin owns a particular entity, then during the server, since user are initialised before any other resource, then the line
user.setOwns(fields.contains("owns") ? getOwns(user) : null);
will cause issues
To Reproduce
Steps to reproduce the issue ->
Create an admin
Login with the password sent over mail, and create a Data Insight pipeline
Restart the server, now when we try to fetch User will all the fields since UserRepository is initialised before the IngestionPipeline resource it will fail with EntityNotFoundException and again try to create a user and send mail to the user.
Screenshots or steps to reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Version:

OS: [e.g. iOS]
Python version:
OpenMetadata version: [e.g. 0.8]
OpenMetadata Ingestion package version: [e.g. openmetadata-ingestion[docker]==XYZ]

Additional context
Add any other context about the problem here.

fixed


Add link to code pattern

I put the link section above the embedded web app section since I thought the transition made more sense then putting it at the end. I also choose to add the link section rather than update the embedded app link since I want that link to still go to the repo where the code is

@djalova and @ptitzler does this readme addition look ok to you?


How to get badge to display

Hey, I used your coveralls wrapper on my java project and it worked seamlessly. Thank you so much! My question (and it's likely an extremely naive one...) is how to get the coverage badge? It seems like it didn't execute on coveralls.
Here is my repo. Here's what my .travis.yml file looks like:
language: java
jdk:
  - oraclejdk7

branches:
  only:
    - master

before_script:
 - "echo $JAVA_OPTS"
 - "export JAVA_OPTS=-Xmx512m"

after_failure:
  - cat target/surefire-reports/*.txt

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
  directories:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/

after_success:
- ./gradlew cobertura coveralls

And I have the following line at the head of my build.gradle:
plugins {
    // ... other plugins
    // coverage tools
    id 'net.saliman.cobertura' version '2.3.1'
    id 'com.github.kt3k.coveralls' version '2.6.3'
}
cobertura.coverageFormats = ['html', 'xml'] // coveralls plugin depends on xml format report

And yet, I'm still getting the coverage | unknown badge in my README. Any thoughts?

.travis.yml and the above part of build.gradle seem ok to me.
I looked at this build ( https://travis-ci.org/tgsmith61591/clust4j/builds/122092556 ) and ./gradlew cobertura coveralls seems failing at :test phase because of NoClassDefFoundErrors. (Try click $ ./gradlew cobertura coveralls part of travis console log).
Maybe classpaths are different when you test with coverage and without coverage.

Ah, you're absolutely right. I didn't even catch that portion of the log. After doing some digging around, it looks like there is a well-known issue with Cobertura causing these, though they profess it should have stopped in 2.3... There are also a lot of unanswered questions about this on StackOverflow. I'll keep digging around; if you have any ideas, I'd really appreciate your guidance.

I recommend you should try JaCoCo plugin instead of cobertura if it's difficult to debug.

Thanks, I went with JaCoCo and per this usecase, just sent the results to codecov with curl.


some additional params...

1.) enable the creation of a dedicated stats-page as follows:
haproxy_listen:

  - name: stats
    bind:
      - ':8888'
    description: stats for site
    stats:
      enabled: true
      uri: /
      realm: Haproxy\ Stats
      auth: admin:secret
      refresh: 5s

2.) add three missing ssl settings in global context:
# no-sslv3 to prevent SSLv3 Poodle vulnerability
  ssl_default_bind_options: no-sslv3 no-tls-tickets
  ssl_default_bind_ciphers: EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:EDH+aRSA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4
  tune:
    ssl:
      default_dh_param: 2048

Sorry for the delay and lack of actions. We are finding that we are not using this role anymore and cannot commit to its maintenance. We are looking for an individual or organization to take over. Please see #53 if you are interested.

Hi @fw8,
We noticed you are keeping your PR branch updated with new features. That's fantastic, but by now this branch has diverged quite a bit from master and it's difficult to reconcile the two.
As far as I can tell, you've fixed a number of issues:

added tune ssl parameters (implemented another way in #59)
enabled TCP stats socket support
added some missing configurables to proxy sessions (rspadd, errorfile)

Each one of these would make a great individual PR. Would you like any help splitting this PR into several more focused ones?
Thanks!


[Event Request] page 6510 "Item Tracking Lines" OnBeforeSetQtyToHandleAndInvoice

Hello,
Is it possible to get the following event:
local procedure SetQtyToHandleAndInvoice(TrackingSpecification: Record "Tracking Specification")
var
    ReservEntry1: Record "Reservation Entry";
    TotalQtyToHandle: Decimal;
    TotalQtyToInvoice: Decimal;
    QtyToHandleThisLine: Decimal;
    QtyToInvoiceThisLine: Decimal;
    DINHUExists: Boolean;
begin
    if IsCorrection then
        exit;
    // DINNL <<
    DINOnBeforeSetQtyToHandleAndInvoice(TrackingSpecification, IsCorrection, CurrentSignFactor);
    // DINNL >>

    TotalQtyToHandle := TrackingSpecification."Qty. to Handle (Base)" * CurrentSignFactor;
    TotalQtyToInvoice := TrackingSpecification."Qty. to Invoice (Base)" * CurrentSignFactor;

    ReservEntry1.TransferFields(TrackingSpecification);
    ReservEntry1.SetPointerFilter();
    ReservEntry1.SetTrackingFilterFromReservEntry(ReservEntry1);

[IntegrationEvent(false, false)]
local procedure DINOnBeforeSetQtyToHandleAndInvoice(var TrackingSpecification: record "Tracking Specification"; IsCorrection: Boolean; CurrentSignFactor: Integer);
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


Update RH via libssh2

We need to update our system. Need call sudo subutai-update via ssh. Will use libssh2.

Libssh2 based updater application written.


BIG THANK YOU

I just want to thank you for this great mod! And for the translation in other languages, too!
Really a great work <3

You are welcome, man. Some translations may be out of dated though, hopefully that won't be a big problem.


Backport "Bump webrick from 1.7.0 to 1.8.1 in /docs/_spec" to LTS

Backports #21232 to the 3.3.5.
PR submitted by the release tooling.
[skip ci]

No regressions detected in the community build up to backport-lts-3.3-21343.
Reference


Task-61-Styling-Bug

https://github.com/react-icons/react-icons/issues/404?fbclid=IwAR0zY_06te48MrwjNYnROHJ-35RdGsQB-rP8RKGZl4B3q6zM8VyKIjPIAD8
Reference for GR Stroke Design

Still needs correction.

Looks good now. Thanks.


Generic type 'DateRangePickerDayProps ' requires 1 type argument(s).

[ x] The issue is present in the latest release.
[ x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
npm build with tsc fails while using     "@mui/lab": "^5.0.0-alpha.45",

Expected Behavior 🤔
"tsc" should pass

Steps to Reproduce 🕹

Steps:

Run "tsc" on an app which uses "@mui/lab": "^5.0.0-alpha.45",

Context 🔦

Running the app using vite, "tsc" throws this error

Your Environment 🌎

{
"compilerOptions": {
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"types": ["vite/client","vite-plugin-svgr/client"],
"allowJs": false,
"skipLibCheck": false,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"]
}
System:
OS: Windows 10 10.0.19043
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 6.49 GB / 31.71 GB
Binaries:
Node: 16.4.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 7.18.1 - C:\Program Files\nodejs\npm.CMD
Managers:
pip2: 18.1 - C:\Python27\Scripts\pip2.EXE
pip3: 20.1.1 - ~\AppData\Local\Programs\Python\Python37\Scripts\pip3.EXE
Utilities:
Git: 2.31.0. - /cmd/git
Virtualization:
Docker: 20.10.8 - C:\Program Files\Docker\Docker\resources\bin\docker.EXE
IDEs:
Visual Studio: 16.7.30621.155 (Visual Studio Community 2019)
Languages:
Java: 16.0.1 - /c/Program Files/Common Files/Oracle/Java/javapath/javac
Perl: 5.32.1 - C:\Program Files\Git\usr\bin\perl.EXE
Python: 3.7.9 - /c/Users/amanoharan/AppData/Local/Programs/Python/Python37/python
Browsers:
Chrome: 93.0.4577.63
Edge: Spartan (44.19041.1023.0), Chromium (93.0.961.47)
Internet Explorer: 11.0.19041.906
Using Chrome

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

This is expected behavior. You need to specify the date type.

not sure why this was closed. this error occurs in mui's internal code, not the user's code. you can see in the error he posted that it is coming from<EMAIL_ADDRESS>i'm seeing the same error in a codebase that isn't even using DateRangePickerDay.
it looks like we just need to change DateRangePickerDayProps<TDate> to DateRangePickerDayProps<TDate = unknown> in https://github.com/mui-org/material-ui/blob/master/packages/mui-lab/src/DateRangePickerDay/DateRangePickerDay.tsx#L44