[cloud_firestore] Stream connectionState stay waiting until app crashes in iOS Simulator

Same on iOS 13.3 iPhone Promax 11 Simulator
flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 1.26.0-17.3.pre, on Mac OS X 10.14.6 18G103 darwin-x64, locale pt-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Xcode - develop for iOS and macOS
    ! Xcode 11.3.1 out of date (12.0.1 is recommended).
      Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.53.0)
[✓] Connected device (2 available)
   ....
! Doctor found issues in 2 categories.

Snippet:
return new StreamBuilder<QuerySnapshot>(
    stream: FirebaseFirestore.instance
        .collection('users/${user.uid}/pedidos')
        .orderBy('entrega')
        .snapshots(),
    builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot) {
      if (snapshot.hasError) {
        return PlatformText('Something went wrong');
      }

      // Stay entering this if statement several times until crash
      if (snapshot.connectionState == ConnectionState.waiting) {
        return Center(child: PlatformCircularProgressIndicator());
      }

pubspec.yml:
...
environment:
  sdk: '>=2.12.0-259.8.beta <3.0.0'

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter

  firebase_core: ^0.8.0-1.0.nullsafety.0
  firebase_core_platform_interface: ^4.0.0-1.0.nullsafety.0
  firebase_auth: ^0.21.0-1.1.nullsafety.1
  cloud_firestore: ^0.17.0-1.0.nullsafety.0

...

Could you please also provide your flutter doctor -v and flutter pub deps -- --style=compact?
Thank you

About XCode, my last available upgrade is macOs is Mojave 10.14.6 due to my old macbook pro. It forces me to stick to 11.3.1.
BTW , stable channel using the same iOS SDK version (AKA 7.3.0) is doing fine.
So follow the information you need:
flutter doctor -v
Framework • revision 1fe38dcb5f (2 days ago) • 2021-02-10 16:25:47 -0800
Engine • revision d4453f6018
Tools • Dart 2.12.0 (build 2.12.0-259.9.beta)

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 1.26.0-17.5.pre, on Mac OS X 10.14.6 18G103 darwin-x64, locale pt-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Xcode - develop for iOS and macOS
    ! Xcode 11.3.1 out of date (12.0.1 is recommended).
      Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.53.2)
[✓] Connected device (2 available)
    ! Error: iPad de Ricardo is not connected. Xcode will continue when iPad de Ricardo is connected. (code -13)
    ! Error: iPhone de Ricardo is not connected. Xcode will continue when iPhone de Ricardo is connected. (code -13)

! Doctor found issues in 2 categories.
MacBook-Pro-de-Ricardo:gerenciarte_app ricardo$ flutter doctor -v
[✓] Flutter (Channel beta, 1.26.0-17.5.pre, on Mac OS X 10.14.6 18G103 darwin-x64, locale pt-BR)
    • Flutter version 1.26.0-17.5.pre at /Volumes/HDD/dev/flutter
    • Framework revision 1fe38dcb5f (2 days ago), 2021-02-10 16:25:47 -0800
    • Engine revision d4453f6018
    • Dart version 2.12.0 (build 2.12.0-259.9.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Volumes/HDD/dev/android/sdk
    • Platform android-30, build-tools 29.0.2
    • ANDROID_HOME = /Volumes/HDD/dev/android/sdk
    • ANDROID_SDK_ROOT = /Volumes/HDD/dev/android/sdk
    • Java binary at: /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/bin/java
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    • Xcode at /Volumes/HDD/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C505
    ! Xcode 11.3.1 out of date (12.0.1 is recommended).
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.10.1

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

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

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

[✓] Connected device (2 available)
    • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 88.0.4324.150
    • iPhone 11 Pro Max (mobile) • 2655A99B-F289-434F-B3D5-B9FFF032F0E4 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-3
      (simulator)

! Doctor found issues in 2 categories.

flutter pub deps -- --style=compact
Dart SDK 2.12.0-259.9.beta
Flutter SDK 1.26.0-17.5.pre
(...)
dependencies:
- cloud_firestore 0.17.0-1.0.nullsafety.0 [cloud_firestore_platform_interface cloud_firestore_web firebase_core firebase_core_platform_interface flutter meta]
- cupertino_list_tile 0.2.0-nullsafety.0 [cupertino_icons flutter]
- cupertino_radio_choice 1.0.1+1 [flutter]
- enum_to_string 1.0.14
- firebase_auth 0.21.0-1.1.nullsafety.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 0.8.0-1.0.nullsafety.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_ui 1.0.8 [flutter flutter_twitter_login firebase_auth google_sign_in flutter_facebook_login apple_sign_in]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math]
- flutter_masked_text 0.8.1 [flutter]
- flutter_platform_widgets 1.0.0-nullsafety.0 [flutter]
- intl 0.17.0 [clock path]
- material_search 0.2.8 [mockito meta flutter]
- open_file 4.0.0-nullsafety.0 [flutter ffi]
- path_provider 2.0.0-nullsafety [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows]
- pdf 3.0.0-nullsafety.1 [archive barcode crypto image meta path_parsing vector_math xml]
- printing 5.0.0-nullsafety.1 [flutter flutter_web_plugins image js meta pdf plugin_platform_interface]

dev dependencies:
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]

transitive dependencies:
- _fe_analyzer_shared 14.0.0 [meta]
- analyzer 0.41.2 [_fe_analyzer_shared args cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- apple_sign_in 0.1.0 [flutter]
- archive 3.0.0-nullsafety.0 [crypto path]
- args 2.0.0
- async 2.5.0 [collection]
- barcode 2.0.0-nullsafety [meta qr]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.1.0
- charcode 1.2.0
- cli_util 0.2.0 [path]
- clock 1.1.0
- cloud_firestore_platform_interface 4.0.0-1.0.nullsafety.0 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 0.4.0-1.0.nullsafety.0 [cloud_firestore_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- collection 1.15.0
- convert 2.1.1 [charcode typed_data]
- coverage 0.15.2 [args logging package_config path source_maps stack_trace vm_service]
- crypto 3.0.0-nullsafety.0 [collection typed_data]
- cupertino_icons 1.0.2
- fake_async 1.2.0 [clock collection]
- ffi 0.3.0-nullsafety.1
- file 6.0.0-nullsafety.4 [meta path]
- firebase_auth_platform_interface 4.0.0-1.1.nullsafety.1 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 0.4.0-1.1.nullsafety.1 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.0.0-1.0.nullsafety.1 [flutter meta plugin_platform_interface]
- firebase_core_web 0.3.0-1.0.nullsafety.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- flutter_facebook_login 3.0.0 [flutter collection]
- flutter_twitter_login 1.1.0 [flutter]
- flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
- glob 1.2.0 [async collection node_io path pedantic string_scanner]
- google_sign_in 5.0.0-nullsafety [google_sign_in_platform_interface flutter meta]
- google_sign_in_platform_interface 2.0.0-nullsafety [flutter meta quiver]
- http_multi_server 2.2.0 [async]
- http_parser 4.0.0-nullsafety [charcode collection source_span string_scanner typed_data]
- image 3.0.0-nullsafety.0 [archive xml meta]
- io 0.3.4 [charcode meta path string_scanner]
- js 0.6.3
- logging 1.0.0
- matcher 0.12.10 [stack_trace]
- meta 1.3.0
- mime 1.0.0
- mockito 3.0.2 [collection matcher meta test]
- node_interop 1.2.1 [js]
- node_io 1.1.1 [node_interop path]
- node_preamble 1.4.13
- package_config 1.9.3 [path charcode]
- path 1.8.0
- path_parsing 0.2.0-nullsafety.0 [vector_math meta]
- path_provider_linux 0.2.0-nullsafety [path xdg_directories path_provider_platform_interface flutter]
- path_provider_macos 0.0.5-nullsafety [flutter]
- path_provider_platform_interface 2.0.0-nullsafety [flutter meta platform plugin_platform_interface]
- path_provider_windows 0.1.0-nullsafety.2 [path_provider_platform_interface meta path flutter ffi win32]
- pedantic 1.10.0
- petitparser 4.0.0-nullsafety.1 [meta]
- platform 3.0.0
- plugin_platform_interface 1.1.0-nullsafety.2 [meta]
- pool 1.5.0 [async stack_trace]
- process 4.0.0-nullsafety.4 [file path platform]
- pub_semver 1.4.4 [collection]
- qr 2.0.0-nullsafety.1 [meta]
- quiver 3.0.0-nullsafety.3 [matcher]
- shelf 1.0.0-nullsafety.0 [async collection http_parser path stack_trace stream_channel]
- shelf_packages_handler 2.0.1 [path shelf shelf_static]
- shelf_static 0.2.9+2 [convert http_parser mime path shelf]
- shelf_web_socket 0.2.4 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.99
- source_map_stack_trace 2.1.0 [path stack_trace source_maps]
- source_maps 0.10.10 [source_span]
- source_span 1.8.0 [charcode collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- term_glyph 1.2.0
- test 1.16.0 [analyzer async boolean_selector coverage http_multi_server io js node_preamble package_config path pedantic pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core]
- test_api 0.2.19 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- test_core 0.3.12 [analyzer async args boolean_selector collection coverage glob io meta package_config path pedantic pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api]
- typed_data 1.3.0 [collection]
- vector_math 2.1.0
- vm_service 6.0.1
- watcher 0.9.7+15 [async path pedantic]
- web_socket_channel 1.2.0 [async crypto stream_channel]
- webkit_inspection_protocol 0.7.5 [logging]
- win32 2.0.0-nullsafety.10 [ffi]
- xdg_directories 0.2.0-nullsafety.1 [meta path process]
- xml 5.0.0-nullsafety.1 [collection meta petitparser]
- yaml 2.2.1 [charcode collection string_scanner source_span]

I run the project using flutter run --no-sound-null-safety -d "iPhone 11 Pro Max"
Regards!

Oh since the stable version works this can just be included in https://github.com/FirebaseExtended/flutterfire/issues/4948
The old Xcode and iOS versions shouldn't be that important if they worked before.
Closing this as a duplicate of https://github.com/FirebaseExtended/flutterfire/issues/4948 so it would be easier to track. Could you please comment the crash info there as well?


Monospace font for code

Code blocks and inline code should be in a monospaced font.

Close with update 1.0.7


possibility to look for multiple images in one screen shot

Hi!
currently only function locateAllOnScreen exists, which looks for all instances of single "needle".
If one needs to check for multiple "needles" on the same screen, it means repeating screen capture for as many different needles and required (locateOnScreen) . Would it be possible to fix the screenshot somehow and then look for the "needles"? Or one shuold turn to Pillow for such job?

Question solved by using ImageGrab form PIL and cv2.matchTemplate from cv2

Would you mind posting your solution here?
I would be also interested in it

solution is quite simple, using the same pyscreeze as pyautogui is using:
cap_pic = ImageGrab.grab(bbox = None) for key in pics.keys():   if key in tmp_team:     _found = pysceeze.locate(pics[key][1], cap_pic, confidence=0.95, grayscale=True)     if _found != None:       do_smth()
for this specific case I use dict of lists, each list containing other data besides filename of the sub-picture to be looked for.
In other case I pass a list of image filenames to the function responsible for lookup of images. Grayscale in the example was useful for particular case.
In general, I got the idea by reading text of pyautogui

I ended up with another solution. You need to install Pillow, pyautogui and opencv2 via pip.

I use typing in my code. Read more
match_single() will always return a value for confidence and the x,y coordinates. It's up to you to decide when you assume it's no match anymore. I usually go with everything above 0.95 is a match.
*location unpacks all elements in location to single values. Read more
It is conventional in Python to use _ for throwaway variables which I do when assigning the values from cv2.minMaxLoc()

import numpy
import PIL.ImageGrab
import cv2

from typing import Tuple

def grab_screenshot() -> numpy.ndarray:
    image_pil = PIL.ImageGrab.grab()
    image = cv2.cvtColor(numpy.array(image_pil), cv2.COLOR_RGB2BGR)
    return image

def match_single(screenshot: numpy.ndarray, filepath: string) -> Tuple[float, int, int]:
    """Returns the confidence and x,y coordinates for the first match.

    Returns:
      Triple consisting of
        - confidence between 0.0 and 1.0
        - X coordinate of the top left corner of the first occurrence of the template in screenshot
        - Y coordinate of the top left corner of the first occurrence of the template in screenshot
    """
    template = cv2.imread(filepath)  # typing: numpy.ndarray
    result = cv2.matchTemplate(screenshot, template.image, cv2.TM_CCOEFF_NORMED)
    _, confidence, _, location = cv2.minMaxLoc(result)
    return confidence, *location

Yes, I head similar, but then run into problem of how to choose the right algorithm and evaluate results. Then I read pyautogui and pyscreeze sources and decided no to invent the wheel (they anyway rely on cv2)

my full code was the follwing:
a

The locate functions use the Knuth-Morris-Pratt algorithm to search the pixels for an image, and I don't think there's a way to have them search for multiple things at the same time that would be any faster than searching for multiple things one after the other. I'm going to close this issue, but thanks for giving me some ideas to think about.

@asweigart PyAutoGUI is great! It is in some Python scrips I normally use throughout my workdays. Thank you for creating it and continuing to support it! Please don't take the following as a negative criticism because, well, because it is not. The following is intended to improve PyAutoGUI.
I've been having trouble with locateCenterOnScreen. Even when using the optional region and confidence arguments, sometimes locateCenterOnScreen finds a particular image on a particular screen yet other times it fails to find the same particular image on the same particular screen. Of course like most intermittent failures, it is annoying.
Does the approach indicated in the answer to the StackOverflow issue entitled, Why can't pyautogui locate my image although the code seems to be just fine? seem like it is likely to be a viable approach for obviating the problem? If the following were to seem viable to you, would it be be difficult for you to put a wrapper around it so that a user would be able to easily enter a value for an optional duration keyword argument which might have a default value of 1 and which the user could set to, for example, from 1 to 100?
Personally, I guess I would probably normally set the value for this hypothetical optional duration keyword argument to 5 to 10. If I were to enter 5—for example—PyAutoGUI would loop locateCenterOnScreen up to 5 times before reporting an error (and ceasing to run).
In case I was unclear, in Why can't pyautogui locate my image although the code seems to be just fine? I would like you to read the following:

The image isn't being detected, and consequently it is impossible for python to unpack the variable. Your code only runs the image detection once, and, when trying to automate a GUI process where loading times can vary depending on animations, computer speed, and more, it is generally not a good idea to just detect it once. Also, it isn't 100% reliable, it can take more than a try. I always, when automating a process, use a loop untill [sic] the image is detected. You could make a function like the following:

def detect_image(path, duration=0):
    while True:
        image_location = pyautogui.locateCenterOnScreen(path)
        if image_location:
            pyautogui.click(image_location[0], image_location[1], duration=duration)
            break

Just for clarification: My goal was not to find multiple things at the same time but to find multiple things without reloading the picture every time.
I am totally fine with just looping over a set of pictures I want to find in the big one.

NO, I do not think its possible to do it simultaneously


How to access datasource object property from didSelectItemAt ?

from my method
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)
I can print the object like so
let object =  self.datasource?.objects?[indexPath.item]
print(object)

but if I want to access a property from my object, I can't. For instance,
print(object.imageUrl)
does not work.
How to go about this?
I've used the demo project to play with the library and the class I am trying to access is very similar to the Intermediate Example
struct MenuItem {
    let name: String
    let imageUrl: String
    let destination: String
```

```
    init(name: String, imageUrl: String, destination: String = "none"){
        self.name = name
        self.imageUrl = imageUrl
        self.destination = destination.uppercased()
    }
}`
```

Well, this was pretty obvious but I had forgotten this since working with Genome.
I just had to cast it to my class
let object =  self.datasource?.objects?[indexPath.item] as? MenuItem


feat: Replace https with got

Please see the following issue for more info.
Contributes to: camelotls/actions-nowsecure#65
Signed-off-by: Stelios Gkiokas<EMAIL_ADDRESS>

@gromanas please re-review the PR since I pushed a new commit based on your comments.


Telnet to mapscii.me doesn't work (not enough xterm features)

From @timfel on May 30, 2017 9:44

Your Windows build number:  (Type ver at a Windows Command Prompt)
10.0.15063

What you're doing and what's happening:  (Copy&paste specific commands and their output, or include screen shots)
Type telnet mapscii.me. This will connect to the server of this project: https://github.com/rastapasta/mapscii. The expectation is to see an ASCII map of the world.

What's wrong / what should be happening instead:
Expected:

Got:

Copied from original issue: Microsoft/WSL#2173

From @zadjii-msft on July 13, 2017 22:29
@timfel what font & size are you using? I believe that on Insider's builds, it works fine

Albeit, I couldn't find a font with the right characters

From @sunjoong on May 30, 2017 13:38
@timfel - It looks like to be able to draw shape of land but not to print names in my case on unbuntu and gentoo on WSL;

From @shanselman on January 19, 2018 22:49
@tara-raj good test case for font fallback.

This is exactly #94


Recomputing a computed values causes observers to re-fire, even if the value hasn't changed

Description of the bug:
Recomputing a computed values causes observers to re-fire, even if the value hasn't changed
Versions affected:
Edge
Reproduction:
http://jsfiddle.net/ub7540xq/
Code:
var ractive = new Ractive({
  computed: {
  	int () {
    	return Math.round( this.get( 'number' ) );
    }
  },
  data: {
    number: 1,
    observerCalledTimes: 0
  }
});

ractive.observe( 'int', function ( int ) {
  console.log( int );
  this.add( 'observerCalledTimes', 1 );
});

ractive.set( 'number', 1.1 );
ractive.set( 'number', 1.2 );
ractive.set( 'number', 1.3 );
ractive.set( 'number', 1.4 );

console.log( ractive.get( 'observerCalledTimes' ) );
// expected 1, got 5

I thought the fix for this would be pretty simple: just check !isEqual( newValue, oldValue ) before scheduling the observer, but it turns out that that runs afoul of the #771 test that seems to hate me so. Out of curiosity does anyone actually use observers for validation i.e. mutating a value from an observer that is watching it as the user types? I would think per-element laziness would preclude the need for that particular facility, but I've been wrong so very many times.

mutating a value from an observer that is watching it as the user types?
@evs-chris: like observing a and modifying it while user types on a <input ... value="{{a}}">?

If that's so, I'd say per-element laziness is an ok approach.

Out of curiosity does anyone actually use observers for validation i.e. mutating a value from an observer that is watching it as the user types?

Yes, I use observers for this. (And it causes many issues, because of those bugs, I've reported.)


Ability to specify a custom entry point

Hey! Thanks for making the library public to use!
Would it be possible to add a functionality to specify a custom entrypoint? It should be fairly straight forward. 🤔

The change has been merged. I'll be closing this issue.
Thanks @shyim 🙌


[Bug] URLs with third level domains are considered invalid

Attempting to add links with third level domains such as https://test.example.com will throw an invalid URL error.
This however does not happen with URLs using www such as https://www.example.com

Version: 0.7.0

Knowledge is actually handling N-level domains without issue as long as the domain is reachable. This error message could be changed to something more precise, e.g. "Website unreachable". Even better, perhaps display the HTTP response code in a debug level notification.

I'll add on to this.
Some links (specifically youtube CHANNELS) cannot be added as source for some reason.
Attempting to add https://www.youtube.com/@ccmusicc (or any other channel link) will results in nothing happening.
Youtube VIDEOS on the other hand can be added without an issue. Knowledge doesn't allow us to manually edit the link target, it's impossible to add links to channels

I'll add on to this. Some links (specifically youtube CHANNELS) cannot be added as source for some reason. I don't even get an error toast, just straight up nothing happens haha
Attempting to add https://www.youtube.com/@ccmusicc (or any other channel link) will results in nothing happening. Youtube VIDEOS on the other hand can be added without an issue. Knowledge doesn't allow us to manually edit the link target, it's impossible to add links to channels

Interesting, this actually worked for me:

I'll add on to this. Some links (specifically youtube CHANNELS) cannot be added as source for some reason. I don't even get an error toast, just straight up nothing happens haha
Attempting to add https://www.youtube.com/@ccmusicc (or any other channel link) will results in nothing happening. Youtube VIDEOS on the other hand can be added without an issue. Knowledge doesn't allow us to manually edit the link target, it's impossible to add links to channels

Interesting, this actually worked for me:

Thank you all for the analysis. I am aware of this issue but haven't had time to deep dive.
One quick solution is to alert the user when an import fails and allow you to "Import Anyways". This will likely result in a Source without icons/thumbnails/metadata, etc., but at least the link will be imported.
Another solution is to load the page in a separate window/view (which will behave differently than just using a GET and then have a Confirm Import button).
I might implement the quick solution for next release and think on a more longterm solution for later.


[docs]: Fix documentation building

Issue
The current workflow for building the docs using Doctum on release is not working.
Expected Behavior
On push of a new tag for release, the workflow should build the documentation for the library on the gh-pages branch so that we can deploy the GitHub pages documentation on that branch.
Actual Behavior
The docs fail to build.

Fixed in v2.0.1


Extend find command to include filtering by household income

Closes #90. As with other parameters, the prefix "income/" should be used for every new filter value. Currently, when an income filter is specified, all contacts with income >= filter are returned, and if multiple filter values are specified, the result is equivalent to filtering by the highest value specified.
However, I am thinking if the logic should be reversed, meaning all contacts with income <= filter are returned instead. This is because for certain financial assistance schemes or other support packages, there could be an upper limit on the household income of a family for eligibility. Therefore, I will create this PR as a draft first and am most likely changing the logic to reflect this. Will open it to be merged once this change is made.

Have changed the logic to <=, meaning any family with income <= [max filter] is returned. The max of all income filters is the one that is important to the filtering because the use case for multiple income filters is likely to be filtering according to the income thresholds of multiple support schemes, and returning all families that have an income less than the highest of these thresholds would make more sense since they would be eligible for at least one support scheme.


Typescript Mocha tests is not discovered when using typescript root dir or tsconfig.json

Expected Behavior
Tests is discovered and runnable with JavaScript output directory and root directory.
Actual Behavior
Tests is not discovered and runnable.
Versions

NTVS Version: 1.2.40627.01
Visual Studio Version: 14.0.25421.00 Update 3
Node.js Version: 6.2.2
Typescript Version:  <IP_ADDRESS>

Steps to Reproduce

Remove all .js/.ts files
"TypeScript Build" properties for project in Visual Studio 2015 has to have "Redirect JavaScript output to directory" to eg. "build" and "Specify root directory of TypeScript files" to "src"
Add a unit test UnitTest1.ts in "src\test"
Build solution after you have added the needed typings declarations.
Output has generated "build\UnitTest1.js" <-- ignoring folder structure.
Tests is not discoverable
Add a empty file named "empty.ts" in "src" and it will produce the wanted folder structure; "build\test\UnitTest1.js" and "build\empty.js"
Now the funny part. Add a shouldignore.ts at root of project folder.
Build solution
The structure of "build" is now changed, and it contains "build\shouldignore.js" and "build\src\empty.js", "build\src\test\UnitTest1.js". <-- not wanted as we have set root dir to "src"
Tests is now discoverable.

Looks like it's ignoring rootDir property in project settings in VS2015

And you have to have the "Typescript Build" settings correct (ourDir etc) as NTVS is not using the properties in tsconfig.json for Test Discovery.

It looks like the the test discover only looks at the project directory TestDiscoverer.cs#L135 to find tests?

Please fix.

This bug still relates to the inbuilt typescript in Visual Studio 2017, is there a github project for VS2017 as well?

@lostfields I just got VS2017 to honor the settings in tsconfig.json
Make sure that your tsconfig.json has its Build Action set to Content
How to Set  'Build Action'
In the Solution Explorer, Right Click the file and select Properties.
In the properties window find the setting for Build Action.
Select Content in the drop down list.
Now Visual Studio will compile ts/js using the tsconfig.json
How this helps.

@MarkOGDev that's good, I dont' have to duplicate the settings in the project file (.njsproj) anymore, but ourDir and rootDir isn't honor when using Test Explorer yet :-/
Tested in VS 2017 15.5.0 Preview 5.0

This looks like it's much more work than I expected. Closing in favor for #1949 which captures more use cases.


Add favicons and page title

@omarchehab98 Please review
Partially resolves #17

@GunshipPenguin, branch is good to go, you can merge it


Training data format for EfficientNet

I would like to train a EfficientNetB7 model from scratch to classify 2D arrays into two 2 classes, but it seems like I did not prepare my data in the correct format. Currently my x_train is a list of float64 arrays with a 600x600 size, my y_train is a list of integers that are either 0 or 1. Of course x_train and y_train have the same length. This is what I have so far:
from tensorflow.keras.layers import Dense, Flatten
from tensorflow.keras.applications import EfficientNetB7
from tensorflow.keras.models import Sequential

base_model = EfficientNetB7(include_top=False, weights=None, input_shape=(600,600,1), classes=2)
base_model.trainable = True
model = Sequential()
model.add(base_model)
model.add(Flatten())
model.add(Dense(1, activation='sigmoid'))
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
history = model.fit(x_train, y_train, batch_size=8, epochs=100)

The last line currently gives me an error:
ValueError: Failed to find data adapter that can handle input: (<class 'list'> containing values of types {"<class 'numpy.ndarray'>"}), (<class 'list'> containing values of types {"<class 'int'>"})

What would be the right format for training data? Any help is appreciated!

@WenTheProgrammer
I tried to replicate the issue on Colab using TF v2.12 but facing a different error. Could you please provide all dependencies   and detailed steps to replicate  the issue reported here ?
Please find the gist here for reference.
Thank you !

Hi @WenTheProgrammer,
To fix the error, you can convert x_train to a NumPy array using np.stack and y_train to a NumPy array using np.array before fitting it to the model.
import numpy as np

x_train = np.stack(x_train, axis=0)
y_train = np.array(y_train)

history = model.fit(x_train, y_train, batch_size=8, epochs=100)

This will ensure that the input data is in the correct format for the model. Let me know if this works for you.
Thank you!

Thank you @tiruk007 and @nitya-khuntia for your suggestions!
To your question @tiruk007, the following code simulates my program. By the way my tensorflow version is 2.10.1.
import numpy as np
from tensorflow.keras.layers import Dense, Flatten
from tensorflow.keras.applications import EfficientNetB7
from tensorflow.keras.callbacks import ModelCheckpoint, EarlyStopping
from tensorflow.keras.models import Sequential

x_train = np.random.rand(4317, 600, 600)
y_train = np.random.randint(low=0, high=2, size=(4317,), dtype=np.int32)
x_val = np.random.rand(1233, 600, 600)
y_val = np.random.randint(low=0, high=2, size=(1233,), dtype=np.int32)
x_test = np.random.rand(618, 600, 600)
y_test = np.random.randint(low=0, high=2, size=(618,), dtype=np.int32)

base_model = EfficientNetB7(include_top=False, weights=None, input_shape=(600,600,1), classes=2)
base_model.trainable = True
model = Sequential()
model.add(base_model)
model.add(Flatten())
model.add(Dense(1, activation='sigmoid'))
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
history = model.fit(x_train, y_train, batch_size=2, epochs=100)

The np.stack method worked for me, @nitya-khuntia. However, a new memory-related error occurred.
When I used EfficientNetB7 model, I received the following error message:
MemoryError: Unable to allocate 1.66 GiB for an array with shape (618, 600, 600) and data type float64
The system cannot find the path specified.
2023-04-23 21:01:00.199194: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2023-04-23 21:01:00.199432: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

The error is related to my test dataset, while my computer seemed to have just enough memory to prepare my training and validation datasets. When I switched to EfficientNetB1 model, which has an input size of 240, the error disappeared.
Interestingly, when I removed my x_test and y_test to save memory and ran the code again, I received a different error:
{{function_node __wrapped__AddV2_device_/job:localhost/replica:0/task:0/device:CPU:0}} OOM when allocating tensor with shape[1,1,384,2304] and type float on /job:localhost/replica:0/task:0/device:CPU:0 by allocator cpu [Op:AddV2]

The system cannot find the path specified.
2023-04-23 21:13:19.354984: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2023-04-23 21:13:19.355127: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2023-04-23 21:14:42.095665: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2023-04-23 21:14:42.097306: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublas64_11.dll'; dlerror: cublas64_11.dll not found
2023-04-23 21:14:42.098308: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublasLt64_11.dll'; dlerror: cublasLt64_11.dll not found
2023-04-23 21:14:42.098580: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found
2023-04-23 21:14:42.867423: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cusparse64_11.dll'; dlerror: cusparse64_11.dll not found
2023-04-23 21:14:42.869108: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found
2023-04-23 21:14:42.869164: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1934] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2023-04-23 21:14:42.883158: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-04-23 21:14:46.496880: W tensorflow/core/framework/op_kernel.cc:1780] OP_REQUIRES failed at cwise_ops_common.h:138 : RESOURCE_EXHAUSTED: OOM when allocating tensor with shape[1,1,384,2304] and type float on /job:localhost/replica:0/task:0/device:CPU:0 by allocator cpu

Now I am wondering if I want to train my model with a large training dataset, is there anything I can do to prevent the error? I already specified my batch size as 2.

@WenTheProgrammer
The errors you are encountering are related to memory issues when running your TensorFlow code with the EfficientNetB7 model.

One possible solution could be to reduce the batch size during training. Currently, you are using a batch size of 2 (batch_size=2) in your model.fit call. You can try reducing the batch size to a smaller value, such as 1, or experiment with different batch sizes to find a value that works within the available memory of your system.

it's important to note that using very small batch sizes, such as 1, may also have an impact on training performance and convergence.

Additionally, you can consider reducing the dimensions of images before feeding them into the EfficientNetB7 model, as the larger input size of 600x600 may require more memory. For example, you can reduce the input image size to 300x300.

x_train = np.random.rand(4317, 300, 300)
x_val = np.random.rand(1233, 300, 300)
x_test = np.random.rand(618, 300, 300)
base_model = EfficientNetB7(include_top=False, weights=None, input_shape=(300,300,1), classes=2)

The error messages "Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found" and similar messages indicate that some GPU libraries are missing or not properly installed. You can refer to the TensorFlow installation guide for GPU support (https://www.tensorflow.org/install/gpu).

By addressing these issues and verifying your TensorFlow installation, you should be able to resolve the errors and successfully run your code with the EfficientNetB7 model.

Hi @nitya-khuntia,
Regarding tensorflow installation, I am pretty sure that I installed everything correctly, since I previously had issues detecting GPU and I reinstalled everything following the exact same instructions that you suggested.
If my understanding is correct, EfficientNetB7 would resize images into 600x600 using bilinear interpolation, if the input image size is not 600x600. However, my images are not regular photos taken by a camera, they are synthesized artificially and each pixel value has a specific meaning, so I would not like to introduce interpolated values that previously do not exist. Is there a way to change EfficientNetB7’s interpolation method to nearest-neighbor? Also, I do not wish to have my images normalized for the same reason of not introducing new values to images. Is there a way to prevent normalization within EfficientNetB7?
Thank you!

Hi @WenTheProgrammer ,
OOM error occurs due to the large input data size which can't be accommodated by the system's memory. I tried the code with smaller size of input data and its executed fine as per attached gist. I have reduced the size of input to (200, 600, 600) from (4317, 600, 600) and it executed fine with OOM error which proves that OOM error happened in your case is purely due to Higher input size.
EfficientNetB7 is a pre-built model and the only parameters to play are the arguments that mentioned in the API. We can't customize the implementation of the EfficientNet AFAIK and for that you need to create your own custom model.

Hi @SuryanarayanaY,
I have a few follow up questions then:

If my input image size is 600x600, then EfficientNetB7 will not resize the input images anymore?
In addition to resizing, does EfficientNetB7 function perform any other pre-processing that would alter input image pixel values, such as normalization, before training on the images?
Is there a way to generate training data "on the go" during training, such as instead of preparing all training data at once, only preparing the needed batch for the current training iteration, so that computer memory won't be a problem?

@WenTheProgrammer , PFA replies below.

If my input image size is 600x600, then EfficientNetB7 will not resize the input images anymore?

input_shape
Optional shape tuple, only to be specified if include_top is False. It should have exactly 3 inputs channels.

In addition to resizing, does EfficientNetB7 function perform any other pre-processing that would alter input image pixel values, such as normalization, before training on the images?

Each Keras Application expects a specific kind of input preprocessing. For EfficientNet, input preprocessing is included as part of the model (as a Rescaling layer), and thus tf.keras.applications.efficientnet.preprocess_input is actually a pass-through function. EfficientNet models expect their inputs to be float tensors of pixels with values in the [0-255] range.

Is there a way to generate training data "on the go" during training, such as instead of preparing all training data at once, only preparing the needed batch for the current training iteration, so that computer memory won't be a problem?

To avoid loading all the data into memory you can use tf.data.Dataset for constructing data pipeline. Please refer to attached source for more details.

Thanks!


Added cache to FunctionalContextImpl

This is GEODE-393. I discussed this with Shreedhar, these changes need some tests and then they should be good to merge. I'll pick this up.


Add the package README.md file as index.html content

Currently opening the package on the doxygen lands on an empty index page.  That should instead be information for the the package.
Doxygen supports adding addition content to the index.  We should leverage this feature and insert the README.md for each package into this content.
https://www.doxygen.nl/manual/config.html#cfg_use_mdfile_as_mainpage

USE_MDFILE_AS_MAINPAGE
If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that is part of the input, its contents will be placed on the main page (index.html). This can be useful if you have a project on for instance GitHub and want to reuse the introduction page also for the doxygen output.

https://azuresdkdocs.blob.core.windows.net/$web/cpp/azure-security-keyvault-certificates/4.0.0-beta.1/index.html It seems to have been already added , i can see the flag set in the cmake file


about FP16

❓ Questions and Help
I want to train model as FP16 and save the  model with fp16 not fp32, but when I add --fp16 flag in training commd, the training speed is fast but the model saved is FP32, how can I do to meet my request???? @ynd @noe @stephenroller @gazay
Before asking:

search the issues.
search the docs.

What is your question?
Code

What have you tried?
What's your environment?

fairseq Version (e.g., 1.0 or main):
PyTorch Version (e.g., 1.0)
OS (e.g., Linux):
How you installed fairseq (pip, source):
Build command you used (if compiling from source):
Python version:
CUDA/cuDNN version:
GPU models and configuration:
Any other relevant information:

Just convert the tensors offline, or use --memory-efficient-fp16

Just convert the tensors offline, or use --memory-efficient-fp16
@stephenroller

it seems not work the model saved are still fp31，
if I want to get fp16 model from fp32 offline,  what I need to do is to save model.half() ?


Error while running inference file

Traceback (most recent call last):
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 298, in
main()
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 265, in main
model = load_model(args.checkpoint_path)
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 180, in load_model
s = checkpoint["state_dict"]
KeyError: 'state_dict'
I have trained till 1500 epochs while testing it is throwing this even though I have given the checkpoints path of main model itself.
Could you please tell me how to resolve this.
Thanks and regards

I guess your checkpoint is already the state_dict, so you might just try to use:
s = checkpoint instead of s = checkpoint["state_dict"]
Btw did you change the "saving checkpoint" code in the train.py?

If I run it only with checkpoint after removing state_dict then:
Traceback (most recent call last):
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 299, in
main()
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 266, in main
model = load_model(args.checkpoint_path)
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 185, in load_model
model.load_state_dict(new_s)
File "/home/anaconda3/envs/mead/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1667, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Wav2Lip:
Missing key(s) in state_dict: "face_encoder_blocks.0.0.conv_block.0.weight", "face_encoder_blocks.0.0.conv_block.0.bias", "face_encoder_blocks.0.0.conv_block.1.weight", "face_encoder_blocks.0.0.conv_block.1.bias", "face_encoder_blocks.0.0.conv_block.1.running_mean", "face_encoder_blocks.0.0.conv_block.1.running_var", "face_encoder_blocks.1.0.conv_block.0.weight", "face_encoder_blocks.1.0.conv_block.0.bias", "face_encoder_blocks.1.0.conv_block.1.weight", "face_encoder_blocks.1.0.conv_block.1.bias", "face_encoder_blocks.1.0.conv_block.1.running_mean", "face_encoder_blocks.1.0.conv_block.1.running_var", "face_encoder_blocks.1.1.conv_block.0.weight", "face_encoder_blocks.1.1.conv_block.0.bias", "face_e.............................................. and so on
I didn't change anything in code while training i just gave different paths for training of all three through arguments.
Thanks and regards.

This is the complete error which i got:
(mead) root@e2dabc4830c9:/workspace/Wav2Expression/tafreen/EmoGen-master# python inference.py --checkpoint_path final_checkpoints/disc_emo_9000.pth --face temp/test.mp4 --audio temp/audio.wav --emotion HAP
Using cuda for inference.
Reading video frames...
Number of frames available for inference: 67
/workspace/Wav2Expression/tafreen/EmoGen-master/audio.py:100: FutureWarning: Pass sr=16000, n_fft=800 as keyword args. From version 0.10 passing these as positional arguments will result in an error
return librosa.filters.mel(hp.sample_rate, hp.n_fft, n_mels=hp.num_mels,
(80, 192)
Length of mel chunks: 68
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:06<00:00,  1.38s/it]
Load checkpoint from: final_checkpoints/disc_emo_9000.pth██████████████████████████████████████████████████████████████████| 5/5 [00:06<00:00,  1.06s/it]
0%|                                                                                | 0/1 [00:09<?, ?it/s]
Traceback (most recent call last):
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 299, in
main()
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 266, in main
model = load_model(args.checkpoint_path)
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 180, in load_model
s = checkpoint["state_dict"]
KeyError: 'state_dict'

Actually, you have to give the path to the checkpoint of the main model, but you are providing it for the emotion discriminator.

yeah my bad.
Thank you

Getting this Error while training main model:
Traceback (most recent call last):
File "/workspace/Wav2Expression/tafreen/EmoGen-master/train.py", line 560, in
train(device, model, train_data_loader, test_data_loader, optimizer,
File "/workspace/Wav2Expression/tafreen/EmoGen-master/train.py", line 338, in train
de_c = disc_emo.forward(g)
File "/workspace/Wav2Expression/tafreen/EmoGen-master/models/emo_disc.py", line 44, in forward
n, c, t, w, h = x.size(0), x.size(1), x.size(2), x.size(3), x.size(4)
AttributeError: 'tuple' object has no attribute 'size'
could you please help to solve this.
Thanks and regards

I have updated the code here: https://github.com/sahilg06/EmoGen/blob/eb5eba1eac862f0064e6ec08b953c859a9f02b08/models/wav2lip.py#L150
It should work now.
Thanks!

While testing:
(mead) root@e2dabc4830c9:/workspace/Wav2Expression/tafreen/EmoGen-master# python inference.py --checkpoint_path new_main_model_checkpoints/checkpoint_step000000001.pth --face temp/test.mp4 --audio temp/audio.wav --emotion HAP
Using cuda for inference.
Reading video frames...
Number of frames available for inference: 67
/workspace/Wav2Expression/tafreen/EmoGen-master/audio.py:100: FutureWarning: Pass sr=16000, n_fft=800 as keyword args. From version 0.10 passing these as positional arguments will result in an error
return librosa.filters.mel(hp.sample_rate, hp.n_fft, n_mels=hp.num_mels,
(80, 192)
Length of mel chunks: 68
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:06<00:00,  1.34s/it]
Load checkpoint from: new_main_model_checkpoints/checkpoint_step000000001.pth██████████████████████████████████████████████| 5/5 [00:06<00:00,  1.02s/it]
Model loaded
0%|                                                                                | 0/1 [00:10<?, ?it/s]
Traceback (most recent call last):
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 299, in
main()
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 278, in main
pred,_ = model(mel_batch, img_batch, emotion)
File "/home/anaconda3/envs/mead/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/workspace/Wav2Expression/tafreen/EmoGen-master/models/wav2lip.py", line 129, in forward
x = torch.cat((x, emotion_embedding), dim=1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 68 but got size 340 for tensor number 1 in the list.

I have encountered another error while testing:
(mead) root@e2dabc4830c9:/workspace/Wav2Expression/tafreen/EmoGen-master# python inference.py --checkpoint_path new_main_model_checkpoints/checkpoint_step000000001.pth --face temp/test.mp4 --audio temp/audio.wav --emotion HAP
Using cuda for inference.
Reading video frames...
Number of frames available for inference: 67
/workspace/Wav2Expression/tafreen/EmoGen-master/audio.py:100: FutureWarning: Pass sr=16000, n_fft=800 as keyword args. From version 0.10 passing these as positional arguments will result in an error
return librosa.filters.mel(hp.sample_rate, hp.n_fft, n_mels=hp.num_mels,
(80, 192)
Length of mel chunks: 68
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:05<00:00,  1.05s/it]
Load checkpoint from: new_main_model_checkpoints/checkpoint_step000000001.pth██████████████████████████████████████████████| 5/5 [00:05<00:00,  1.21it/s]
Model loaded
0%|                                                                                | 0/1 [00:06<?, ?it/s]
Traceback (most recent call last):
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 299, in
main()
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 278, in main
pred,_ = model(mel_batch, img_batch, emotion)
File "/home/anaconda3/envs/mead/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/workspace/Wav2Expression/tafreen/EmoGen-master/models/wav2lip.py", line 129, in forward
x = torch.cat((x, emotion_embedding), dim=1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 68 but got size 340 for tensor number 1 in the list.
can you please help me in solving this.
Thanks and regards

As mentioned here, you need to comment 2 lines before running the inference.

After commenting those lines:
Traceback (most recent call last):
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 305, in
main()
File "/workspace/Wav2Expression/tafreen/EmoGen-master/inference.py", line 283, in main
pred,_ = model(mel_batch, img_batch, emotion)
ValueError: too many values to unpack (expected 2)

Sorry, there was a small error in the code.
It should be pred= instead of pred,_=
I have updated the code.

https://user-images.githubusercontent.com/84034204/232284650-fc23a9e5-3039-48c1-b492-7ceb62cbc526.mp4
The generated video as a box around face.

For me, it is working perfectly. You might not have trained the models properly.

I have added some of the model weights here. You can try to use them directly.


TableModel::addGetter doesn't work with variable members

I would like to use
addGetter(1, Qt::DisplayRole, &ContentItemData::page);
instead of
addGetter(1, Qt::DisplayRole, [](const ContentItemData &data){return data.page;});

QtMVT  should be able to refer to, url https://github.com/romariorios/QtMVT


[Compute] Upgrade api-version for VM and VMSS from '2020-12-01' to '2021-03-01'

Description

Upgrade api-version for VM and VMSS from 2020-12-01 to 2021-03-01
Bump SDK azure-mgmt-compute from 20.0.0 to 21.0.0
Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.

This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR title and description has followed the guideline in Submitting Pull Requests.

[x] I adhere to the Command Guidelines.

[x] I adhere to the Error Handling Guidelines.

Compute

@FumingZhang


(Relay) Client is kicked when a block is broken with a tool

When attempting to destroy any block with a tool that reduces the tool's durability an error is thrown, related to the player_auth_input packet.

Fixed as of latest


Uploads are broken after upgrading to 0.1.30

Describe the bug
When I try to upload a file after upgrading to Pynecone 0.1.30 I get an error.
value is not a valid dict (type=type_error.dict)

To Reproduce
Steps to reproduce the behavior:
Use the sample upload code here and try to upload something: https://github.com/pynecone-io/pynecone/pull/811
Expected behavior
The file should be uploaded without error.
Screenshots
If applicable, add screenshots to help explain your problem.
** Specifics (please complete the following information):**

Python Version: 3.11
Pynecone Version: 0.1.30
OS: Ubuntu 23.04

@jq6l43d1
What's the sample code you use?
In my current testing,
if I use the example code here
https://github.com/pynecone-io/pynecone-examples
with the different versions.
node version 16.8.0, 16.10.0, 20.0.0.
bun 0.5.9, 0.6.1
The upload code cannot work too.

@milochen0418
import pynecone as pc
from typing import List

class State(pc.State):
    """The base state."""
    # The images to show.
    img: list[str] = []

    async def handle_upload(self, files: List[pc.UploadFile]):
        """Handle the upload of files.

        Args:
            files: The uploaded file.
        """
        for file in files:
            upload_data = await file.read()
            outfile = f".web/public/{file.filename}"

            # Save the file.
            with open(outfile, "wb") as file_object:
                file_object.write(upload_data)

            # Update the img var.
            self.img.append(file.filename)

def index():
    """The main view."""
    return pc.vstack(

        pc.upload(
            pc.button("Select File"),
            pc.text("Drag and drop files here or click to select files"),
            border="1px dotted black",
            padding="20em",
            multiple=False
        ),
        pc.button(
            "Upload",
            on_click=lambda: State.handle_upload(pc.upload_files())
        ),
        pc.foreach(State.img, lambda img: pc.image(src=img)),
    )

# Add state and page to the app.
app = pc.App(state=State)
app.add_page(index, title="Upload")
app.compile()

I made a fix for that here: https://github.com/pynecone-io/pynecone/pull/1042

We just cut v0.1.31 - this should be fixed now


Facebook bot.identity is undefined

Hello,
Facebook messenger doesn't support direct mention, so when i want to test some facebook conversations with this awesome botkit-mock, i got this error :
// BotmockWorker.js:66 -> var direct_mention = new RegExp('^\<\@' + bot.identity.id + '\>', 'i');
TypeError: Cannot read property 'id' of undefined

In BotmockWorker.js you try to prune off the bot's name and trim whitespaces, in my case bot.identity is undefined so bot.identity.id throw an error.
// Example of code
beforeEach(() => {
        let controller = Botmock({});
        bot = controller.spawn({type: 'facebook'});

        controller.hears(['hi'], 'direct_message', function(bot, message){
            bot.startConversation(message, function(response, convo){
                convo.ask('hello there', function(response, convo){
                    convo.say('..user typed any text after `hi`');
                    convo.ask('here a question', function(response, convo){
                        convo.say('here an answer');
                        convo.next();
                    });
                    convo.next();
                });
            })
        });
    });

it('should return `help message` if user types `help`', (done) => {

        let sequence = [
            {
                type: null, // direct_message, message_received, interactive_message_callback, defaults to direct_message
                user: 'someUserId', // this.userInfo.slackId
                channel: 'someChannel', //his.userInfo.channel
                messages:[
                    {
                        text: 'hi',
                    },
                    {
                        text: 'its true',
                        deep: 1,
                        isAssertion:true,
                    }
                ]
            }
        ];

        bot.usersInput(sequence).then((message) => {
            console.log(message);
            expect(message.text).toBe('help message');
            done();
        });
    });

Oups ! this fixed in the latest version 👍

:)
On Sat, Jun 17, 2017 at 1:35 PM Ouadie Lahdioui<EMAIL_ADDRESS>wrote:

Oups ! this fixed in the latest version 👍
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/gratifyguy/botkit-mock/issues/28#issuecomment-309229164,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACKLHv1NrmOlTmp0HqcC-G2_e_MzBRgGks5sFA58gaJpZM4N9SKm
.


Having shell report colorized in Gitlab-ci

What are you trying to achieve?
Read my test result in gitlabci job result.
What do you get instead?
Colored texts on condeceptjs on my local machine i not shown on gitlabci

CodeceptJS version:2.5
Operating System: Linux
GitlabCi: 12.9

Hey @medtoure18 trying adding this --colors

you can use
variables:
  FORCE_COLOR: '1'

awesome :-)
thank you @Vorobeyko


don't allow blocked content on spee.ch

Spee.ch should abide by the blacklist located at https://api.lbry.io/file/list_blocked. Well want to show a message, similar to what Jeremy suggested on the app side: https://github.com/lbryio/lbry-app/issues/565#issuecomment-379287507

@billbitt , this is the language we used on the app side:
In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications. For more details, see https://lbry.io/faq/dmca


How to distinguish ZuulFallback and circuit fallback?

Hi
I was able to configure fallbacks for Microservices at Zuul level so that they are invoked whenever a service is down or circuitBreaker trips.
Here is my fallback provider code.
@Component
public class FallBackProvider implements ZuulFallbackProvider {
    private ObjectMapper objectMapper = new ObjectMapper();
    @Override
    public String getRoute() {
        return "*";
    }
    @Override
    public ClientHttpResponse fallbackResponse() {
        return new ClientHttpResponse() {
            @Override
            public HttpStatus getStatusCode() throws IOException {
                return HttpStatus.SERVICE_UNAVAILABLE;
            }
            @Override
            public int getRawStatusCode() throws IOException {
                return HttpStatus.SERVICE_UNAVAIABLE.value();
            }
            @Override
            public String getStatusText() throws IOException {
                return "OVERLOAD";
            }
            @Override
            public void close() {
            }
            @Override
            public InputStream getBody() throws IOException {
                OmsResponse res = new OmsResponse();
                res.setRetCode(ErrorCode.MICRO_SERVICE_OVERLOAD);
                res.setTimestamp(System.currentTimeMillis());
               //TODO return different result when sub service error and circuitBreaker trips
                res.setErrMsg("fallback");
                String jsonStr = objectMapper.writeValueAsString(res);
                return new ByteArrayInputStream(jsonStr.getBytes(StandardCharsets.UTF_8));
            }
            @Override
            public HttpHeaders getHeaders() {
                HttpHeaders headers = new HttpHeaders();
                headers.setContentType(MediaType.APPLICATION_JSON);
                return headers;
            }
        };
    }
}

When request route to sub service socket timeout error, the fallbackProvider was called,I'd like to return timeout error message to caller client.
After many request to the same service,the circuitBreaker may trips,the fallbackProvider was called again,I'd like to return fallback error message to caller client instead,but i can't distinguish two type of errors.
Is there other way to solve this problem? Thanks!

I think if you implement zuulFallbackProvider interface, then it will not take Hystrix fallback, if you do not achieve zuulFallbackProvider, then will be directly called Hystrix fallback method.
Corresponding source content
@Override
protected ClientHttpResponse getFallback() {
	if(zuulFallbackProvider != null) {
		return zuulFallbackProvider.fallbackResponse();
	}
	return super.getFallback();
}

This is my idea, hoping to help you. Thank you! ：）

If you are using Edgware.RC1 you should implement the FallbackProvider interface instead which will give you the ability to provide a response based on the failure. https://github.com/spring-cloud/spring-cloud-netflix/pull/2255/files

Thanks for your reply! @ryanjbaxter
https://github.com/spring-cloud/spring-cloud-netflix/pull/2255/files It seems to work for my demand.
I'm using Dalston.SR4 version now and I'll consider about Edgware.RC1 later.
I prefer to use more stable version in production env.

Understand, we are working towards a stable Edgware release.


Dont reuse tempfiles when a target is built with an ActionList.

This is a better fix than dropping saving the tempfile cmdlist which was proposed in PR #3553 which replaced PR #3140
Crediting Simon Tegelid with the fix as he's pointed out the issue and a way to fix it.
Contributor Checklist:

[x] I have created a new test or updated the unit tests to cover the new/changed functionality.
[x] I have updated CHANGES.txt (and read the README.rst)
[x] I have updated the appropriate documentation

Hold off on review.. a few issues to sort.

Ok.. that should do it, please review assuming appveyor and travis complet successfully.

This seems like a more clever solution. Thanks for helping out with this!

Looks okay to my tired eyes. +1


make logs directory if it doesn't exist

Minor edit from running locally. Excited to start working on this, thanks for sharing!

Looks good, thanks!


Add translator to LinkedIn for Community

I've combined this PR with https://github.com/mattermost/docs/pull/1855, thanks again!


Statemine stop producing block

Hi, statemine seems stop producing block now

@AlexZhenWang thanks for opening this issue. Blocks are now being produced again, closing.

Thanks for the quick react @ddorgan !


Update meshoptimizer to 0.22

This change updates meshoptimizer to 0.22 (from version 0.20 that Godot was using). This mostly affects simplification as other components Godot is using are unchanged.
Simplifier has been significantly improved over the last two releases; attribute weighting is now more consistent and works better with discontinuities, a class of topological restrictions has been lifted which for meshes with complex topology results in higher quality, smaller triangle count, or sometimes both; a set of new options allow to use some extra features in the future.
Godot is currently using a patch on top of meshoptimizer 0.20 that reports distance-only error from meshopt_simplifyWithAttributes instead of combined distance+attribute error. This PR reproduces this patch (which is now just a single line due to changes in the internal code structure); my goal over the meshoptimizer 0.23 timeframe is to either rework Godot LOD generation to not need this patch (see below), or if that doesn't work add an official option to no longer require a patch. To make individual commits in this PR cleaner, the patch is reintroduced in a separate commit.
In general, simplifier behavior should be expected to be different. It's usually producing fewer triangles at better quality now, but because of this sometimes it's hard to compare 1-1 (e.g. previously the simplifier could be stuck at a higher triangle count, so comparing the lowest LOD is not always 1-1 - the new LODs could look "worse" if you just force the lowest to display). Simplifier changes have been tested extensively during development but I've looked at a couple assets to compare, screenshots below (left = godot master, right = this PR - all screenshots include triangle count as well, and all screenshots use aggressive LOD bias to make the LODs show up at a much closer distance).
I've also looked at the "800 models" scene from an earlier Godot issue; this PR doesn't significantly change the quality there at the same triangle count but manages to generate fewer triangles at lowest LOD level. In general, sometimes this PR will generate an extra level of detail as the simplifier can proceed further, and as such the import time might be a tiny bit longer -- as we discussed previously, the current flow for LOD generation in the importer is bad for import performance. I intend to rework this; the newly added SIMPLIFY_SPARSE option will also be helpful here.
Note that this PR tries to limit the number of code changes to absolute minimum. In particular, the new PRUNE option is likely to be helpful for some assets and should improve the LOD quality for complex assets as it will reject small details that the simplifier might not be able to remove currently - but this can be investigated and enabled separately.
Some of the attribute metric changes in this release result in a slightly different behavior depending on the triangle sizes and normal deviation. In general, this may require increasing the normal weight when it was previously small (below 1). Since Godot is already using normal weight 2.0, and the attribute changes are mostly tested on normals with weight range of 0.5-2, for now I've kept the weight as is. If we get any reports about regressions in normal quality, we can bump the weight up to mitigate this.
The Godot patch to the metric is generally problematic: on assets with significant normal variance after simplification, the simplifier is currently not really restricted from making the normal quality much worse (error limit is FLT_MAX and resulting attribute error is ignored for the purposes of LOD selection). Many of the updates to attribute metric in this release are motivated to fix this and make the combined distance+attribute metric useful for LOD selection. However for this to work, the simplification should be done with a finite error limit (to avoid getting LODs that have an abnormally high limit and will never be selected; in current Godot master, and after this PR, these LODs may still be selected even though the simplifier knows the normal error is too high). It's because of this that I'd like to rework the simplifier integration to remove the need for the patch, but this is not done in this PR to make this one more compatible and easier to review. This also may require changing the default normal merge limit - Godot currently uses 60 degree cutoff to merge normal vertices, which is really not great for normal quality on meshes with creases. So I'd want to update that default to be much smaller, but again - not part of this PR. Just mentioning all of this here so that future work is more obviously outlined.
Some comparison screenshots (only including ones where there's some difference between quality and triangle counts, I've omitted a bunch of screenshots where behavior is basically similar).

For posterity, summary of future work that I think would be valuable; I want to try to get to some of this this year but no promises...

Remove now-unused raycast mode as we discussed before to simplify (ha!) the code
Restructure LOD generation flow to have finite LOD-dependent error limits and remove the patch to switch to combined distance+attribute error (this will produce different LOD switch distances but in general should result in much fewer LOD switches that visibly degrade quality)
Adjust LOD generation to use previous LOD for next LOD as a source (significantly improving import performance in the process)
Change the default normal merge limit as 60 degrees is too high to generate good normals in some cases, as the simplifier is being fed a model with bad normals to begin with
Enable PRUNE mode, probably unconditionally (it was designed to just work), to improve quality/size balance further on complex models

Curious question, does this pr resolve the outstanding issues with animation bone weights?

This also may require changing the default normal merge limit - Godot currently uses 60 degree cutoff to merge normal vertices, which is really not great for normal quality on meshes with creases.

See also https://github.com/godotengine/godot/pull/94108 where the merge angle is currently hardcoded. It could be exposed as an option still.

What would be a more reasonable default? Intuitively, I would say either 45 degrees or even 44 degrees (to keep 45-degree angles intact).

Yeah I was thinking something like 30-40 degrees but this would need to be experimented with.

Thank you!


count sharing

is possible count how many sharing on my sharing?
if a user share my url, i would know how many sharing he do, a count for people and for groups (or only for people)
is possible?

For sure its possible.
You can track every time the Button got clicked and send a request to a database, where you're able to evaluate the statistics.
However the pure Javascript plugin doesn't have a possibility to do this

There is any intention to proceed with that? I don't think so as this is not the goal of this plugin, right?


Editor Setup

Assign this to me

hello, @g-savitha assign this to me, and review the existing pull requests #80 and #82 as soon as possible.


Added Counting Sort in Python

Description
Documented Example in file
Fixes #549
Type of change
Please delete options that are not relevant

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] This change requires a documentation update

Checklist:

[x] I have read the contribution guidelines before making this PR.
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented in my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation (Language folder or any other readme instructed to)
[x] My changes generates no new warnings
[x] I have added tests that prove my fix is effective or that my feature works

Okay

Please review the change @kaustubhgupta


[bug] Incorrect ordering for code excerpts in HTML report

🐞 Bug report
Description
When I use the alt and click feature to select multiple ranges of code, I expected that the report would display them in order of line number, not the order that they are selected. It seems like they are displaying in the order selected.
Reproduction

Create a code file with multiple lines in it.
Select code on a higher line number
Select code on a lower line number
Generate an HTML report

Example output:

Error message

None

I agree, the selections should be ordered in the Output. by the first selected line in each range.
I think it's possible to mark e.g. line 20-21 and line 18-25 (This contains the firstselection). In such cases I would expect to show:

Line 18-25
Line 20-21 (as the first line is greater compared to 18)

You may want to double check and see, I thought I remember it actually combining two selections into one if they overlap. I generally agree about your ordering rules. I figure if the ordering rules in a code excerpt are the same as the rules which order the code excerpts in the report, it promotes sensible consistency.


fix(sync): unexpected loading switch issues

Before
https://user-images.githubusercontent.com/12002941/197941568-613dd57e-7f18-4c4e-95b2-0924a0422e06.mov
After
https://user-images.githubusercontent.com/12002941/197941586-d6afc3c1-c0ea-4855-a22c-707176f5b690.mov

The platform section still has the re-flow if you have some platforms bound.

LGTM


Add 'final card' to Slot Machine

I haven't found the docs on this one yet. Search for final card in docs doesn't seem to find it.

I'll add to the docs now. This lets you add a single card to a deck '2' that will show up after seeing all of the composited cards of deck 1

Link?

https://docs.storysynth.org/guide/formats.html#slot-machine


Remove the errors on Swift Speech-gRPC-Streaming project

I fixed the missing @escaping and I set self as weak where this closure is defined.
I also extended the RUNME script to fix the bad imports generated.

I signed it!


Only change template status if user edits and saves changes

Currently, if I open a Template by selecting Edit from the Actions menu, the template status changes to Unpublished. Desired behavior is to only change the template status if I make any changes to the template. If I open the template but do not edit and save changes, the status should remain as Published.

was updated by #902. @xsrust pointed out that the code was no longer using the 'Unpublished changes' status. This may make things clearer to the user. Lets reassess once its merged and deployed

Now when I click to Edit a template and then return to the main Templates table without making any changes, the status is still "Published" - which is what I would expect. It also helps to distinguish status for "Unpublished" and "Unpublished changes." So now I would say this is working as we want it to.
The only issue is the appearance of the "Publish" and "Publish changes" actions in the dropdown menu (screenshots below). Can you please fix it @briri to not be a hyperlink and look like the other menu items?

action menus are pretty now and all working as expected. closing issue.


I've tried go to Gem file in your proyect and put following code:

I've tried go to Gem file in your proyect and put following code:
gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
now in your terminal:
bundle install
I'm using rails 5.2.1 and ruby version 2.5.1
It should work for you if you using ruby v. 2.4.3!.
Originally posted by @WilfredoAlarcon in https://github.com/sparklemotion/sqlite3-ruby/issues/224#issuecomment-416800097
Hey, I tried to do this and this error popped:
The git source https://github.com/larskanis/sqlite3-ruby is not yet checked out. Please run bundle install before trying to start your application
And when I run bundle install, another error appears. What do I do?

What‘s the other error? And the OS?

unable to access 'https://github.com/larskanis/sqlite3-ruby/': error:1407742E:SSL


Feature/support python35

Description
I did some update to work with python3. It's not finish and I won't have the time to do more before a while, so I would like to share it with you
GitHub Issues

https://github.com/Miserlou/Zappa/issues/6

Coverage decreased (-0.2%) to 80.158% when pulling 246f2bd00888d34dd049ac535bac557f452498df on SBillion:feature/support-python35 into 1321ef62d0a394492538688cc719c20e7357cfc2 on Miserlou:master.

Damn, this is huge, and I have a feeling that it'll be very relevant in the coming 48h - want to take the final step and make that test pass? Also poking @xuru since I think it's your test :)

Hey, sorry, just saw this.  Yeah, I think the problem is in python 3.5, str doesn't have a decode method.  Looking through the documentation for both 3.5 and 2.7, it looks like we can just add a b to the open function.  For example:
    with open(egg_link, 'rb') as df:

The "binary" mode will have no effect in python 2.7, but will return the string from the .read method as a byte array which does have a decode method.
The other option, is to do some kind of if statement around every file read which would be really ugly.

Yes, problems are around bytes and str, mostly.
I didn't have the time to find a good way to use base64 with python35
An other point of fail is patch_open:
with (patch_open(), mock.patch('glob.glob'), mock.patch( 'zappa.util.copytree')
        ) as ((mock_open, mock_file), mock_glob, mock_copytree):

Closing because we support P36 now! :D


Redirect to latest version on POST

This removes the repost dialogue after switching to the latest version. Fixes #1314

Sure if this solves the issue. Consider adding daveoconner to complex code reviews, maybe not this one which is one-line.  :-)

Gavin, you can go ahead and merge this


Feat: Added Courses and Student model and views

Give description on your pull requests so we know what you did and we can see the code to understand if anything is wrong eh

If not, we have no idea what you were aiming to do with this pull request and we have no way of verifying if this is complete and whether we should or shouldnt merge it


Laboratory work #1, Sharova Margarita - 19FPL1

Unfortunately, the deadline is not that far. Please, push changes so that we can review them.

Open another PR with the second lab


Enable Run-to-Run Tests for PCA

See example here: https://github.com/IntelPython/daal4py/pull/479/files#diff-d35be6f472965c0f9d3831184428136c5bc9494a433d6678eb79a4bce45b9849R321
It will fixed only to 2021.2 release. So you need to remove from skip in this version


Costs of gas-infrastructure should be manageable through a web-form

Background
For the electricity network, topology, load-calculation and asset-management (investment costs etc.) are all intimately linked (by the topology YAML).
Because we are going to implement the gas-load calculation as several levels without explicit topology, the asset-management side of the story has to happen separately.
Functionality
My suggestion (thanks to ideas from @dennisschoenmakers @antw @AlexanderWirtz @jorisberkhout) is to group all information about capacity, efficiency, cost and lifetime of gas-infrastructure in one interactive page.
I think we should distinguish between the different pressure levels and let the user choose:

length and type (diameter) for pipes
number of units for all other units

The following attributes should be adjustable:

investment cost
lifetime
O&M cost
capacity (from low to high pressure)
capacity (from high to low pressure)
efficiency (from low to high pressure)
efficiency (from high to low pressure)

Moreover, the user should be able to indicate whether the infrastructure in the LES has had any of the following things happening to it in the period between 2013 and 20xx (the future year of this LES):

green-field construction
refurbishing

Design
This is a first draft (notice that I have not yet incorporated options to choose construction/refurbishing):

@dennisschoenmakers @AlexanderWirtz @antw @jorisberkhout @JeroenvdLogt please share ideas and feedback!

After discussion with @RobTerwel, an idea to incorporate construction/refurbishing and removal has emerged. The refurbished design looks like this:

The idea behind the above "gas asset dashboard" is that every line represents an asset.
Every asset has a type (which we hard-code the options for), a measure (how many/much of this do we have) an owner (one of the stakeholders), a lifetime (not shown in this design) and a construction date (not shown). If the lifetime ends within the period 2013 -- 20xx, the status is 'red'. The user than needs to make a decision whether to remove or refurbish the asset (both have impact on the costs).
Questions
I still have some questions though...

If an asset is 'expired', do we still use its capacity, volume etc. in our calculations?
If an asset in one of the higher levels is 'expired', does this have impact on the lower levels? Should we also 'expire' a proportional part of the lower level assets?

Anybody any good ideas?

After discussion with @dennisschoenmakers, the above has made another step towards usefulness:

The main ideas behind the re-design:

Clearer separation of input (left-central block) and output (right-most two columns).
Refurbished pipes are just another type of 'type' of pipe witch have extended lifetime and higher cost per meter.
The inputs here are reflected in cost-output (last columns, charts described below and the business case calculation as a depreciation cost similar to electricity topology). They also affect the storage volume and capacities as to be used in the gas load-calculation (https://github.com/quintel/etmoses/issues/833) and the table described in https://github.com/quintel/etmoses/issues/852#issuecomment-196760358.

The table is complemented with two output graphs which show relevant financial data:

A chart with the net value as a function of time (from the earliest construction date to the last date that an asset will be operational (construction data + lifetime)
A chart with cumulative investments needed (assuming that current assets will be replaced when their lifetime is over)

A chart with the net value as a function of time (from the earliest construction date to the last date that an asset will be operational (construction data + lifetime)

A chart with cumulative investments needed (assuming that current assets will be replaced when their lifetime is over)

(this could also be a line-chart perhaps)


Investigate running on self-hosted runners

Some folks have asked about using self-hosted runners for the github action and mentioned running into issues. Naively there shouldn't be any difference, but we should give this a try internally and see if there's any changes we need to make to support it.
If you're trying this yourself and hit issues, feel free to leave details here.

That sounds reasonable @mdivkovic-speech. I definitely would want to keep macos-12 as the default, but having the host as an optional parameter makes sense. Do you want to make a PR against KMMBridgeGithubWorkflow?

Did some testing here and I thought I had it working until I realized that github apparently limits self-hosted runners to only call reusable workflows from the same org. So I think there might actually not be anything that can be done here beyond just copying our workflow to your own repo and changing runs-on there.
I'm still going to add the parameter though because it might be useful for people who need to switch what macos version they run on.

@russhwolf sorry for the very late reply and thank you for the update!
To summarize:

Your workflow will support the runs-on parameter, but within Touchlab's repo it will effectively only allow switching to a different GitHub hosted runner, e.g. to control the Mac OS version
Integrators looking to use your workflow with a self hosted runner should copy it to their repo and call that copy instead

That about right?

Yeah, that's the best solution I see at the moment. I don't love it though. Definitely open to other ideas if people have them.

I'm going to close this for now. Future version will be a much simpler default workflow.


404 Not Found

Tried the 1-click Vercel installer and got a 404 Not Found after it deployed successfully. Unclear if that is intentional but presume not as I also can't find where to add my Google API key.

Actually it is indeed intended behavior, as root of deployed server is not API endpoint.
And there is no place to enter your API key because it should be passed as a part of request to endpoint. So you need to enter it somewhere in your client app.
For example, when using with curl:
curl https://my-openai-gemini-demo.vercel.app/v1/chat/completions \
  -H "Authorization: Bearer $YOUR_GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "model": "gpt-3.5-turbo",
      "messages": [{"role": "user", "content": "Hello"}],
      "temperature": 0.7
      }'

Right on, these might be good notes to make on the sites read me.

Actually this info is exactly on my demo site, perhaps you have missed the link.
It is easy to put same info on each deployed site. While that is a tempting idea, that may lead to undesired consequences - the endpoint is meant for your personal use, so there is no reason to tell everyone how to utilize it.

Yeah, I didn't visit your demo site. I'm not sure it's a safe bet to assume others will. It seems handy to provide all the info folks need in the GitHub read me but this is your project and your call. Just offering a suggestion for you to consider.


event: Twitter bans Katie Hopkins

Heavy (actually a pretty good piece)
Sky News
Reclaim The Net
twitter user

Sargon commentary

https://github.com/steverusso/bigtech.fail/pull/105


Updated to 75.0.3770.100

Patches still ok, i'm building it now but i don't expect surprises.

Ok, build successful.


Future.catchError's doc example doesn't emphasize that a valid T must be returned

The current docs for Future.catchError include this example:
Future.delayed(
  const Duration(seconds: 1),
  () => throw 401,
).then((value) {
  throw 'Unreachable';
}).catchError((err) {
  print('Error: $err'); // Prints 401.
}, test: (error) {
  return error is int && error >= 400;
});

I believe this involves a Future<dynamic>. The catchError onError callback is then allowed to omit a return, as null is a valid dynamic. But it would benefit the user to change this example to use a non-nullable type T, to show that a T must be returned in catchError's onError.
We now catch this statically with a Hint, body_might_complete_normally_catch_error.

The code is actually just wrong. The type of Future.delayed(..., () => throw 401) is Future<Never>, so the catchError's onError callback must return Never. It doesn't, so there is a runtime error. (It's not compile-time because the onError parameter type is Function).
So, yes, needs fixing.


Fix prefixed type parameters

It was working before:
type A<'T> = | B of 'T
and C<'T> = A<'T>

But not for prefixed type parameters, like
type A<'T> = | B of 'T
and 'T C = A<'T>

or this:
type 'T X = | Y of 'T

(notice the prefix style type paramter)
PR fixes it (Fixes #4)

I gotta be honest, i never new prefix type parameters were possible in this position XD
type 'T SomeType =
    | A
    | B of 'T

type 'T SomeType =
    | A
    | B of 'T

Yeah, it's mostly used in something like
type Option<'T> = ...
and 'T option = Option<'T>

So, it's possible to use it as
let foo : int option = Some 1
// and
let bar : Option<int> = Some 2

Really nice @vzarytovskii! Unfortunately merging one PR creates merge conflicts in the parser.
Can I get you to rebase this PR?
On this note, it would be nice if we could find a way to not check in the parser in a way that still lets people use the grammar inside something like Neovim to test it out

Really nice @vzarytovskii! Unfortunately merging one PR creates merge conflicts in the parser.
Can I get you to rebase this PR?
On this note, it would be nice if we could find a way to not check in the parser in a way that still lets people use the grammar inside something like Neovim to test it out

Will do. I think nvim can have a custom command running, but will require npm in addition to gcc.

@vzarytovskii Yeah, I feel fine having node as a hard dependency currently.
There was some problems getting npm to build the project without the pre-generated project but I think I managed to get it working again.

@vzarytovskii Yeah, I feel fine having node as a hard dependency currently.
There was some problems getting npm to build the project without the pre-generated project but I think I managed to get it working again.

I think it will be also possible to generate them on every merge and publish to releases, so they can be targeted by treesitter nvim plugin? Or create a tag with only them in the tree.

@vzarytovskii Yeah, I feel fine having node as a hard dependency currently.
There was some problems getting npm to build the project without the pre-generated project but I think I managed to get it working again.

I think it will be also possible to generate them on every merge and publish to releases, so they can be targeted by treesitter nvim plugin? Or create a tag with only them in the tree.

Good idea!
It would also be nice to still be able to track the size of the parser on the develop branch, since small changes can have a huge effect on the parser size

It would also be nice to still be able to track the size of the parser on the develop branch, since small changes can have a huge effect on the parser size

This too can be an action in pr which will warn if the size deviates too much, I suppose.

Rebased it, can be merged.


Add Dark Mode using nextThemes

The site uses shadcn for styling, which has incredibly easy support for adding dark mode. You can follow the this documentation - https://ui.shadcn.com/docs/dark-mode/next
After adding darkmode, do check -

All text or heading is clearly visible
Add a toggle for switching between light and dark mode (in the horizontal navbar)
The toggle is present in mobile navigation as well

Do attach screenshots of the changes. Good luck and do ask any doubts if any!

Could you please assign me? I have experience on this. Thanks.

@Sathyan-B you are assigned! do let me know if you have any doubts

@ChiragAgg5k could you please assign me this issue?

@ChiragAgg5k could you please assign me this issue?

@Sathyan-B you are assigned! do let me know if you have any doubts

Hi @ChiragAgg5k, Facing few errors while running the code. Can you share the env file?

@Sathyan-B You need to add the environment variables mentioned here - https://github.com/ChiragAgg5k/cal-buddy/blob/master/.env.example
Hope that helps!

@Sathyan-B You need to add the environment variables mentioned here - https://github.com/ChiragAgg5k/cal-buddy/blob/master/.env.example
Hope that helps!

Hi @ChiragAgg5k, I have created a PR. Please check. Add comments for any modifications. Thanks https://github.com/ChiragAgg5k/cal-buddy/pull/23

you need to create something similar to this

@ChiragAgg5k Please check now. Let me know your comments.


There is no NavLink

Should be easy, will add in next few days

Added in #8 , released as version 0.11.0 on npm


Add some runtime pkgs

retest gpu-pycpp please

retest Ubuntu-GPU-multi please

retest Ubuntu-GPU-single please

retest gpu-non-pip-multi please

retest cpu-pycpp please

retest Ubuntu-CPU please


Run on login problem with solid state drive

I have a new MBP with the 512G solid state disk.  If I set QS to run on login, the "QS" logo does not disappear from the desk top when I cold boot the machine.  There are other problems too, which are erratic.  I think the problem may have to do with the speed of booting using the SS drive.
If I disable run on login in the prefs, then run QS when the Mac has booted, it works as expected.  Sounds like a timing problem somewhere?
DN

Sorry for duplicated entry.

Closing this due to it being a duplicate of #580


Fix #64975 by registering server singletons earlier.

Previously, GDExtension libraries would fail to return Server singletons
'global_get_singleton' at any initialization level #64975 (they were registered at the very end of setup2).
This enables Server singletons to be retrieved at
GDNATIVE_INITIALIZATION_SERVERS which is the expected initialization
level for servers to be referenceable.

Looks like the singletons are returning as nil, so perhaps this isn't quite the fix that is needed. Happy to have some guidance here.

@bruvzg
got it would a better fix be to introduce a new initialization level for GDExtension (and trigger this at the end of setup2)? or are singletons not meant to be retrievable at extension initialization time.

I guess the proper way to fix it, is to register each singleton as soon as server is created (from a server constructor), instead of dedicated register_server_singletons. This way, availability of servers for GDExtension will be the same as for the engine.

Adding the new initialization level and using it fixes the issue and enables all server singletons to be retrieved. Perhaps GDNATIVE_INITIALIZATION_READY should be called something else?

GDNATIVE_INITIALIZATION_COMPLETE
GDNATIVE_INITIALIZATION_FINAL
GDNATIVE_INITIALIZATION_DONE

Let me know and I can change this.

My 2c here: I'd rather introduce a GDNATIVE_INITIALIZATION_SINGLETONS step in order to make it obvious where the singleton should be registered (and hence that the singleton cannot be fetched before that !)
I've myself spend quite some time to understand how to fetch a singleton (I thought I was using the API wrong when I was just querying it to soon)
As a more general wish, I think it would be great to add a small comment in gdnative_interface.h for each initialisation level to give examples of what kind of extension should be initialized when

Would it be possible to rerun the workflows for this PR? Also please let me know if I should squash my commits (requires me to make a force push to the branch).

Yes the commits should be squashed. I would also recommend rebasing at the same time so that you get the latest master commits.

Have rebased against master, will this PR and/or fixing #64975 still make it in before 4.0 release?

We reviewed this PR in the GDextension meeting, and we don't think this is the right solution to the problem. The singletons should be available a lot earlier than what they are right now so adding another initialization level is not the right solution to the issue. Singletons should instead be loaded earlier on.
Since the solution we would prefer is very different from that proposed here, we'll close this PR.  We've also added the corresponding issue to the 4.0 release milestone. Thank you nonetheless.


runtime: recognize .http files

Based on the specification found
here

thanks!

Hm, looking at it, it seems http might be a bit too generic? Since this is is apparently related to asp, should this be asphttp instead?

Personally, I think it should still be just http; I provided a poor link, looks like this one is better. It is provided by JetBrains, but still looks like it aims to be a general spec for all editors. So I think the file format is agnostic in this way. Also, on GitHub, a search for HTTP files recognizes them as just the http language which again seems to be standardized (not just for ASP stuff or VS)

okay, fair enough


Add deploy requirements checking

It's common practice to stick a requirements.txt/Pipfile/pyproject.toml file alongside deployments/inventories/etc. Currently pyinfra can check it's own version (REQUIRE_PYINFRA_VERSION) but would be useful to also check a requirements file, perhaps REQUIRE_PACKAGES = 'requirements.txt' or similar.
Arguably not the job of pyinfra to check this, but provides a much nicer user experience than an unexpected or unexplained error (same as missing / out of date Ansible roles/requirements.yml).

https://github.com/Fizzadar/pyinfra/commit/890d12f31af9359c079a71b21e70f160b227fb79


Added option addResizeListener for responsive iframe.

Added option addResizeListener for responsive iframe.
Reason,  when draw 10 or more charts on one page, iframe is serious performance killer (on 100 charts each 1000 points more than 5 times slower, without iframe was 5 sec. with 25 sec.). No functionality changed, but there is option for advanced users, to disable iframe {addResizeListener:false} default is true.

Duplicates #3333 and #3351

Implemented in #3364, closing. Thanks @gunins!


imgui_md code block render doesn't play with imgui_node_editor

My app uses imgui_node_editor to build a diagram on a canvas. One of the types of diagram node is a text display (it's used for displaying comments and inline documentation about the diagram)
I have recently gotten imgui_mdto work as a markdown display, :tada:
It has some quirks which I am working around, but here is one that I think is an issue with the imgui_md_wrapper code that is part of the bindings: A code block (whether started with ``` or with a 4-space indent) displays the formatted code jammed against the left edge of the window, not the left edge of the block containing the markdown display.
As the attached screencast shows, other markdown content and the shaded background for the code block are rendered more or less where expected (there is some kind of icon displayed off the right side of the window, but I will worry about that later).
https://github.com/user-attachments/assets/ba061e85-c508-423a-ab5b-6587f5071404
The app in the screencast is hosted at https://github.com/bgribble/mfp and the master branch is what the screencast was made from.

The node editor has some limitations: it cannot support child window (i.e. any widget that includes a scrollbar).
For this reason, it is impossible to display the nice code look with ImGuiColorTextEdit.
I did a correction that will display the code block as pure text (with a monospace font), when inside the node editor.
See this demo for inspiration:
https://github.com/pthom/imgui_bundle/blob/main/bindings/imgui_bundle/demos_python/sandbox/sandbox_node_md_code.py

For anyone who comes across this ticket while looking at imgui_md and imgui_node_editor interactions:

imgui_md wants to (unconfigurably) use the entire width of the window. You can modify this by putting the markdown render inside a table with a fixed column width.
An HTML <div> in your markdown is not a block element! It acts more like a <span>. So you can use custom <div> class handling to implement inline markup
For some reason, the div callback does not get called for open or close <div> tags that are at the start of a line. You can put an   before the <div> and the callback will be called.   renders to the empty string  so it doesn't mess with layout.

I did a correction that will display the code block as pure text (with a monospace font), when inside the node editor.

I did the same thing locally :) I just used a regex transformation on the markdown to implement it.
Sort of a bummer that the nice code editor won't work, but it's understandable. I am pretty happy with the results I am able to get now.

imgui_md wants to (unconfigurably) use the entire width of the window. You can modify this by putting the markdown render inside a table with a fixed column width.

You  may also set  this at startup
    # important: force the window content width to be the same as the node width
    add_ons_params.with_node_editor = True
    add_ons_params.with_node_editor_config = ed.Config()
    add_ons_params.with_node_editor_config.force_window_content_width_to_node_width

In which case,  imgui_md will use the width of the  node (you may  need  to  add  other  elements  or a dummy to the node to set its width)