Using cmake with with boost .so libs is currently impossible because Boost_USE_STATIC_LIBS is hardcoded to ON

Seems that Boost_USE_STATIC_LIBS is hardcoded to ON inside https://github.com/BitShares/fc/blob/master/CMakeModules/FindBoost.cmake, which means it overrides the command line switch to disable that. This causes cmake to fail when you only have .so files for boost.

FTR: I've always built my linux packages with Boost_USE_STATIC_LIBS OFF . I didn't need to link with atomic, though.
The only issue I've had is that when compile the boost-based unit tests the flag BOOST_TEST_DYN_LINK must be defined. Any idea how to detect static/dynamic linking at compile time, or maybe in CMakeLists.txt?

My problem with this is that it is still hardcoded to on inside
https://github.com/BitShares/fc/blob/master/CMakeModules/FindBoost.cmake
On 10 April 2015 at 13:24, Peter Conrad<EMAIL_ADDRESS>wrote:

FTR: I've always built my linux packages with Boost_USE_STATIC_LIBS OFF .
I didn't need to link with atomic, though.
The only issue I've had is that when compile the boost-based unit tests
the flag BOOST_TEST_DYN_LINK must be defined. Any idea how to detect
static/dynamic linking at compile time, or maybe in CMakeLists.txt?
—
Reply to this email directly or view it on GitHub
https://github.com/BitShares/bitshares/issues/1056#issuecomment-91536140
.

--
Paul Firth
http://www.wildbunny.co.uk/blog
http://twitter.com/paul_m_firth

On 04/10/2015 09:24 AM, Peter Conrad wrote:

FTR: I've always built my linux packages with Boost_USE_STATIC_LIBS OFF . I didn't need to link with atomic, though.
The only issue I've had is that when compile the boost-based unit tests the flag BOOST_TEST_DYN_LINK must be defined. Any idea how to detect static/dynamic linking at compile time, or maybe in CMakeLists.txt?

Reply to this email directly or view it on GitHub:
https://github.com/BitShares/bitshares/issues/1056#issuecomment-91536140

Have you tried getting rid of all of the hard coded settings altogether?
Maybe the build system would do the right thing(tm) and just use
static iff it cannot do things dynamically.
Shawn Pringle

Found a workaround, assuming that static libraries end with ".a" on all supported platforms. Tested on linux (openSUSE for dynamic, ubuntu for static). Can someone check this on windows and if possible mac?
https://github.com/BitShares/fc/compare/master...pmconrad:dynamic_boost
https://github.com/BitShares/bitshares/compare/develop...pmconrad:dynamic_boost

Static libs don't end with .a on windows, they end in .lib (also note that import libraries also end in .lib, so just because a file ends in .lib doesn't mean it's a static lib).

Static libs don't end with .a on windows, they end in .lib

After some googling it seems that there is no "best" solution for this. Most projects seem to just ignore the problem and assume dynamic linking. Another option is to use a "headers-only" version of the unit test framework, at the expense of higher compile times for the test programs.
I have found one project that sets BOOST_TEST_DYN_LINK depending on the setting of Boost_USE_STATIC_LIBS, but AFAICT on windows dynamic libraries will be used when no static libs can be found, so this isn't reliable.
The good thing is that FindBoost.cmake only checks for .lib and .a (and for $CMAKE_FIND_LIBRARY_SUFFIXES on windows) when static linking is selected, so if I integrate .lib into my check it should reliably detect the actual library type being used.
Opinions?

On 04/15/2015 01:47 PM, Peter Conrad wrote:

Static libs don't end with .a on windows, they end in .lib

After some googling it seems that there is no "best" solution for this. Most projects seem to just ignore the problem and assume dynamic linking. Another option is to use a "headers-only" version of the unit test framework, at the expense of higher compile times for the test programs.
I have found one project that sets BOOST_TEST_DYN_LINK depending on the setting of Boost_USE_STATIC_LIBS, but AFAICT on windows dynamic libraries will be used when no static libs can be found, so this isn't reliable.
The good thing is that FindBoost.cmake only checks for .lib and .a (and for $CMAKE_FIND_LIBRARY_SUFFIXES on windows) when static linking is selected, so if I integrate .lib into my check it should reliably detect the actual library type being used.
Opinions?

For each library of boost that is required //x//, check to see if
lib//x//.so exists.  If they all exist, you can link it dynamically and,
failing that, use static.  When upgrades fix things you need to
recompile every static package, and that's bad.
Shawn

For each library of boost that is required //x//, check to see if
lib//x//.so exists.  If they all exist, you can link it dynamically and,
failing that, use static.  When upgrades fix things you need to
recompile every static package, and that's bad.

I think this is what FindBoost.cmake is supposed to do, and what it does a good job of AFAICT.
The only problem caused by this is related to the unit test framework, which behaves differently at compile time depending on whether it's linked against the static or the dynamic version of libboost_unit_test_framework (and only this). This problem can be worked around by checking if that specific library ends in .a or .lib, IMO.
Or did I miss something?

Assuming this is fixed by @pmconrad's patches:

https://github.com/BitShares/fc/pull/5
https://github.com/BitShares/bitshares/pull/1521


Fix link to location.md in  documentation

The ./ there is important to give the correct link when rendered.
Note that this is not related to #5259
Also note that this breaks not the link when browsing github repo, but for the website - the hyperlink points to /react-router/location.md instead of /react-router/web/api/location.md

Thanks! This needs to be done for any other links too.


feat: simplify equality of nat literals

If M has characteristic zero, then we simplify, e.g., (2 : M) = 10 to (2 : ℕ) = 10.

Thanks :tada:
bors merge


no need to add conda-bld dir of environment to .condarc

Problem
For a local build setup with testing capabilities, one had to add the conda-bld dir to the .condarc.
This is one not needed manual step
Solution
Infer conda-bld dir in script and add channel directly to mamba

Looks good!


Add new type timestamp for RFC 3161 timestamp responses

TODO:

[ ] validation of content when uploading
[ ] implement verify (?)
perhaps also allow urls (?)

example usage on local build:
rekor-cli upload --rekor_server http://localhost:3000 --type timestamp --artifact test.tsr

[ ]  perhaps also allow urls (?)

I think we can skip URLs for small content like these.

Updated to remove hash schema
Added validation to the canonicalize function
Not yet done: Updating the name to something more specific as @bobcallaway suggested

maybe rfc3161 or timestamp-rfc3161 ?

added in extracting and storing publicKey

It's all good I'll update with storing the full tsr.

As a precaution, rekor will fail if size is too big? My sample tsr are 2K. Should we set an upper limit? like 20K? Would this unduly burden the log/users? Maybe something smaller/bigger?

Should we set an upper limit? like 20K? Would this unduly burden the log/users? Maybe something smaller/bigger?

This sounds fine to me to start -- the message to timestamp is signed as a hash, so potentially the only fields I see growing are the cert sizes/chain sizes. ~O(10)kb sounds okay to me

What a roller coaster 🎢


support imgur yt comments

#8 is not finished yet.

The biggest problem now is defer img loading instead of lazy loading.


Can you use Nachos-ui with Redux-Forms

Great UI Kit.
My one question is do you know if the components developed here are compatible with Redux-Form? (http://redux-form.com/)
Thanks,
Niels

I haven't tried it yet. But if it's working with React Native's TextField it should work with Nachos's Input as well.

Yep, I Do. You can check on: https://travis-ci.org/eduardomoroni/trading-card-manager

Closing as resolved


[BUG] first impression error

[x] I have searched for existing issues that already reported this problem and found none
[x] The bug is present in REPL

Describe the bug
Dynamically create svg and then bind markmap, displayed for the first time, as shown in the figure:

To Reproduce

Expected behavior
This is my core code：
import { Transformer } from "markmap-lib";
import { Markmap, loadCSS, loadJS } from 'markmap-view';

// With default plugins
const transformer = new Transformer();
export function createMindHover(markdown: string) {
    const { root, features } = transformer.transform(markdown);

    const assets = transformer.getUsedAssets(features);
    let { styles, scripts } = assets;

    if (styles) loadCSS(styles);
    if (scripts) loadJS(scripts, { getMarkmap: () => Markmap });

    const svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
    let mm = Markmap.create(svgElement);
    mm.setData(root);
    return { mm, svgElement };
}

let wordHover = hoverTooltip((view, pos, side) => {
        let { from, to, text } = view.state.doc.lineAt(pos);
        let start = pos,
            end = pos;
        while (start > from && /\w/.test(text[start - from - 1])) start--;
        while (end < to && /\w/.test(text[end - from])) end++;
        if ((start == pos && side < 0) || (end == pos && side > 0)) return null;
        return {
            pos: start,
            end,
            above: true,
            create(view) {
                let dom = document.createElement("div");
                let m: Markmap;
                return {
                    dom,
                    mount(view) {
                        let { svgElement, mm } = createMindHover(value);
                        m = mm;
                        dom.appendChild(svgElement);
                        _resizeMarkmap(m, 1.1);
                    },
                    positioned(space) {
                        // _resizeMarkmap(m, 1.1);
                    },
                    resize: false,
                };
            },
        };
    });

Actual behavior

Environment:

OS: [e.g. macOS]
Browser: [e.g. chrome, safari]
Browser Version: [e.g. 22]

Additional context

I don't really understand what the desired behavior is from your description. It's better to provide a reproduction project.
Anyway markmap can only calculate sizes and positions after styles are applied, i.e. CSS are loaded properly and the container is attached to the DOM. So I guess you need to set data or call mm.fit() after it is attached to the DOM.
Here is an example: https://stackblitz.com/edit/markmap-dynamic?file=src%2Fmarkmap-hooks.tsx


DF Module Name: lib-df-hotkeys

Module
version 2.3.5
Describe the issue
Only active module is lib-df-hotkeys
Configuration option does show up, but S hotkey doesn't work, nor is there a way to add hotkeys.
Fails to load in latest Foundry (version 9, build 242):
foundry.js:51468 Uncaught TypeError: Cannot read properties of undefined (reading 'toggle')
at SceneControls._onClickTool (foundry.js:51468)
at Object.onKeyDown (lib-df-hotkeys.js:9)
at Function._handleKeyDown (lib-df-hotkeys.js:5)
To Reproduce
Steps to reproduce the behavior:

Install the module and enable it.
Open developer tools and you can see the exception.

Expected behavior
It should load and run properly.
Screenshots (Optional)
n/a

Because FoundryVTT V9 has an official keybindings system, this module is now obsolete. It is being kept alive only for those still on 0.8.9, but will no longer receive any updates.


[BUG] Crash on Android

Describe the bug
I am trying to launch the example code on Android but it crashes on startup. The iOS runs well

This is the error output I got:
Build fingerprint: 'google/sdk_gphone_x86_64/generic_x86_64_arm64:11/RSR1.201211.001/7027799:user/release-keys'
Revision: '0'
ABI: 'x86_64'
Timestamp: 2021-06-10 16:22:06+0700
pid: 19231, tid: 19231, name: nhanced_example  >>> com.tanayneotia.html_editor_enhanced_example <<<
uid: 10154
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
rax<PHONE_NUMBER>000000  rbx<PHONE_NUMBER>004b1f  rcx 00007a89b67ef2a8  rdx<PHONE_NUMBER>000006
r8<PHONE_NUMBER>000010  r9<PHONE_NUMBER>000010  r10 00007ffc0f955480  r11<PHONE_NUMBER>000246
r12<PHONE_NUMBER>000000  r13 00007a87517cece8  r14 00007ffc0f955478  r15<PHONE_NUMBER>004b1f
rdi<PHONE_NUMBER>004b1f  rsi<PHONE_NUMBER>004b1f
rbp 00007ffc0f955668  rsp 00007ffc0f955468  rip 00007a89b67ef2a8

This is flutter doctor:
[✓] Flutter (Channel master, 2.3.0-2.0.pre.191, on macOS 11.2.2 20D80 darwin-x64, locale en-VN)
• Flutter version 2.3.0-2.0.pre.191 at /Users/hungcao/Documents/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 855ada1d95 (4 weeks ago), 2021-05-13 17:13:03 -0700
• Engine revision c118a134fb
• Dart version 2.14.0 (build 2.14.0-112.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/hungcao/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.56.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.23.0
[✓] Connected device (4 available)
• HTC Butterfly 2 (mobile)   • HT58EWZ00242                         • android-arm    • Android 6.0.1 (API 23)
• sdk gphone x86 64 (mobile) • emulator-5554                        • android-x64    • Android 11 (API 30) (emulator)
• iPhone 11 Pro (mobile)     • BB53CC4C-9AFE-4ABF-8A50-F5FB1D3632C1 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-1 (simulator)
• Chrome (web)               • chrome                               • web-javascript • Google Chrome 91.0.4472.77
! Error: Hung’s iPhone is not connected. Xcode will continue when Hung’s iPhone is connected. (code -13)

Hmm looks like you are using the Android emulator. I use a physical device and I don't have any issues, could you try it on a physical Android if possible? Sometimes the emulator is weird with webviews and such.

Hmm looks like you are using the Android emulator. I use a physical device and I don't have any issues, could you try it on a physical Android if possible? Sometimes the emulator is weird with webviews and such.

Hi, thank you for your reply. I checked on Bluestack and an Android phone as well (my phone is HTC) and I got crashes all the cases. Which physical device did you use?

I have 2 Samsung phones - S8 and S10, the plugin works fine on both. I haven't had any reports of crashes on Android, the logs you posted are not very helpful... are there different logs on your physical device?

I have 2 Samsung phones - S8 and S10, the plugin works fine on both. I haven't had any reports of crashes on Android, the logs you posted are not very helpful... are there different logs on your physical device?

Hmm, the logs are the same for all of mine. Let me check that again with another physical device and let you know then. Thanks so much, it is really a great plugin

Now that I think about it, the crash might be because of using Flutter master. I use beta and everything works fine, if you can downgrade and try it that works be good.

Now that I think about it, the crash might be because of using Flutter master. I use beta and everything works fine, if you can downgrade and try it that works be good.

Yes, you are correct. It works well when I switched to beta. Could you check what's wrong with mater channel? Also, after switching to beta and back to master, then upgrade to latest Flutter version, I got another issue now. Maybe we need to update flutter_colorpicker also?
../../.pub-cache/hosted/pub.dartlang.org/flutter_colorpicker-0.4.0/lib/src/hsv_picker.dart:731:29: Error: The argument type
'PointerEvent' can't be assigned to the parameter type 'PointerDownEvent'.
- 'PointerEvent' is from 'package:flutter/src/gestures/events.dart'
('../Development/flutter/packages/flutter/lib/src/gestures/events.dart').
- 'PointerDownEvent' is from 'package:flutter/src/gestures/events.dart'
('../Development/flutter/packages/flutter/lib/src/gestures/events.dart').
super.addAllowedPointer(event);

@hungcaohnc there isn't any update for color picker yet so once the breaking change moves to dev/beta they will probably fix it.
As for fixing the crash on master, I don't think it's a great idea to look into it because it could be a bug in Flutter - master channel is often like that, then they polish it up every week and create a dev release. If the crash is on dev I will try to fix it but it's rather not check the bugs on master since it isn't the most reliable branch.

@hungcaohnc I have published v2.2.0+1-dev.1 with the new flutter_colorpicker changes.


Replace Button "Back to main" by  "Retour à l'aperçu" in french

In some places the "back to main" button should be replaced by "retrour à l'aperçu" in the French navigation.

Edit "Paramètres graphiques"
Edit "Titre et description"
Edit "Filtres interactifs"

Visualize environment and version: [INT v3.12.0]
Browser and version : edge

Additional context
Add any other context about the problem here.

Ah oups, it seems to be a translation that was forgotten, thanks for the feedback. As this button does not return to the "aperçu" = preview, it returns to the main parameter of the chart, I will put the French text "Retour aux paramètres généraux".

Thank you patrick. And it's the same in german and italien.
Also the button "Back to preview" is sometimes not translated.

Thanks, I also noticed, and I fixed it.


Add unit tests for commit metadata

The codecov results pointed out to me last week that I had never written specific tests for this. Adding now. It is being tested through noms_commit too, but this is better and more thorough.

Because of the dependencies.  It can't be in go/dataset/ because it needs to use go/spec/ for resolving absolute paths and it creates a circular Go path dependency.  If you can think of a better place for it I don't have strong feelings about it.

Current coverage is 88.05% (diff: 100%)

No coverage report found for master at e3bea0f.

Powered by Codecov. Last update e3bea0f...4de7f72

I see. This tests behavior that is defined in spec. For some reason I thought it was testing something from datas (where Commit lives).

LGTM


Latest state is present in a useEffect but not when calling getRecoil from an async function

I have a component that calls an async function inside a useEffect which has a dependency on a string value inside a Recoil atom state. Inside the useEffect the value locationName is the latest value, while in the async function call that immediately calls getRecoil returns the old value (that defaults to the empty string ""). Calling getRecoil again inside a setTimeout returns the new value however.
// In a component
const { locationName } = useRecoilValue(searchAreaState);
const { topPicks, isLoadingTopPicks } = useRecoilValue(searchState);

React.useEffect(() => {
    if (locationName !== '') {
      console.log('locationName: ', locationName);
      getTopPicks().catch(handleErrorCatch);
    }
}, [locationName, getTopPicks]);

// Async function outside component
export const getTopPicks = async (): Promise<void> => {
  setTimeout(() => {
    console.log('Inside setTimeout: ', getRecoil(searchAreaState).locationName);
  }, 10);

  console.log('Inside async function: ', getRecoil(searchAreaState).locationName)
  // ...
};

The logs:
[Wed Feb 09 2022 15:10:40.534]  LOG      locationName: Orlando, Florida
[Wed Feb 09 2022 15:10:40.539]  LOG      Inside async function:
[Wed Feb 09 2022 15:10:40.701]  LOG      Inside setTimeout:  Orlando, Florida

For now I'll be passing through the locationName as an argument to the getTopPicks function but does anyone have any insight on why this bug happens?

Hi, I had some time and I tried to reproduce this, without much luck.
To answer your concern I would appreciate if you could help me replicate the unexpected behavior, this is what I tried:
CodeSandbox

I'm often encountering issues where the recoil state is not updated synchronously after a setRecoil as well.
Wish I could provide a reproducible example but have yet to have the time to look into creating one. The app is a pretty large closed source React Native application. I wonder if either the fact that the component tree is gigantic or the library is running on React Native has any effect on this issue.

@burgalon @luisanton-io I found a fix and pushed it to #22, sorry that I'm still unable to provide a reproducible but this fix was what worked for our app.

Thanks @jennmueng !
Published in 0.3.16.
Closing for now.


Elixir - WebSocket transport

This would be like the TCP and UDP transports but would live in ockam_node_web app.


[AUTOMATED] Update Version Pinning for Terraform to support 0.13

What

Update Version Pinning for Terraform to support 0.13

Why

This is a relatively minor update that the CloudPosse module already likely supports.
This allows module consumers to not individually update our Terraform module to support Terraform 0.13.

/test all

We're getting following error. Will investigate after releasing all the things.
Error: If `anonymous` is false, `token` is required.

 on /__w/actions/actions/test/src/.terraform/modules/ecs_codepipeline.github_webhooks/main.tf line 7, in provider "github":
  7: provider "github" {

Returning due to fatal error: FatalError{Underlying: exit status 1}

/test all

/test all


Add Universidad De Manila

Adding Universidad de Manila for udm student's access.

@seanphilipcruz First stage of verification passed, official domain is udm.edu.ph as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.

I'll wait. Thank you!

@seanphilipcruz Thank you for your patience while waiting for a review and processing your request. Pull request merged.


[ListItemAvatar] Getting a warning about childrenClassName

[x] This is not a v0.x issue.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

Current Behavior 😯

Steps to Reproduce 🕹

Passed an  to the ListItemAvatar component
The browser will give us a warning like
Warning: React does not recognize the childrenClassName prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase childrenclassname instead. If you accidentally passed it from a parent component, remove it from the DOM element.
Context 🔦

Your Environment 🌎

Tech
Version

Material-UI
^3.6.2

React
^16.4.1

Browser
Chrome

TypeScript
^3.2.2

etc.

@georgeneil Did you find a solution to this problem?  I'm getting this error with a Badge Component wrapping a ListItemAvatar component.  If you inline style the Badge it will apply the styles to the ListItemAvatar component.


missing vendor, product strings on windows 10.

There's something strange going on with vendor/product strings on Windows.
Example 1: with a picoprobe, running the list example on Linux gives:
DeviceInfo {
    bus_number: 1,
    device_address: 7,
    vendor_id: 0x2E8A,
    product_id: 0x000C,
    device_version: 0x0103,
    class: 0,
    subclass: 0,
    protocol: 0,
    speed: Some(
        Full,
    ),
    manufacturer_string: Some(
        "Raspberry Pi",
    ),
    product_string: Some(
        "Picoprobe (CMSIS-DAP)",
    ),
    serial_number: Some(
        "E66038B71354762F",
    ),
    path: SysfsPath(
        "/sys/bus/usb/devices/1-4.4.4",
    ),
}

on Windows:
DeviceInfo {
    bus_number: 0,
    device_address: 3,
    vendor_id: 0x2E8A,
    product_id: 0x000C,
    device_version: 0x0103,
    class: 0,
    subclass: 0,
    protocol: 0,
    speed: Some(
        Full,
    ),
    manufacturer_string: Some(
        "(Standard USB Host Controller)",
    ),
    product_string: None,
    serial_number: Some(
        "E66038B71354762F",
    ),
    instance_id: "USB\\VID_2E8A&PID_000C\\E66038B71354762F",
    parent_instance_id: "USB\\ROOT_HUB30\\4&24054718&0&0",
    port_number: 3,
    driver: Some(
        "usbccgp",
    ),
}

No product string, manufacturer string is wrong, driver is wrong.
it's a composite device, and it applies the winusb descriptor to one function only, because it has another function which is standard CDC-ACM and it wants windows to use the standard cdc-acm driver for it so it shows up as a COM port.
Example 2: I'm writing a debug probe firmware from scratch. I have both a bootloader and an application firmware.
The bootloader puts the winusb descriptors on the entire device . It shows up as this:
DeviceInfo {
    bus_number: 0,
    device_address: 2,
    vendor_id: 0xC0DE,
    product_id: 0xCAFE,
    device_version: 0x0010,
    class: 0,
    subclass: 0,
    protocol: 0,
    speed: Some(
        Full,
    ),
    manufacturer_string: Some(
        "WinUsb Device",
    ),
    product_string: Some(
        "Embassy Probe bootloader",
    ),
    serial_number: Some(
        "796F070110134753384C4E00",
    ),
    instance_id: "USB\\VID_C0DE&PID_CAFE\\796F070110134753384C4E00",
    parent_instance_id: "USB\\ROOT_HUB30\\4&24054718&0&0",
    port_number: 2,
    driver: Some(
        "WINUSB",
    ),
}

Product and driver are fine, manufacturer is still wrong.
The application is composite, and puts the winusb descriptors on the function (because I'll likely add CDC-ACM in the future too), and shows up the same as picoprobe: wrong manufacturer, product string, driver.
DeviceInfo {
    bus_number: 0,
    device_address: 2,
    vendor_id: 0xC0DE,
    product_id: 0xCAFE,
    device_version: 0x0010,
    class: 239,
    subclass: 2,
    protocol: 1,
    speed: Some(
        Full,
    ),
    manufacturer_string: Some(
        "(Standard USB Host Controller)",
    ),
    product_string: None,
    serial_number: Some(
        "796F070110134753384C4E00",
    ),
    instance_id: "USB\\VID_C0DE&PID_CAFE\\796F070110134753384C4E00",
    parent_instance_id: "USB\\ROOT_HUB30\\4&24054718&0&0",
    port_number: 2,
    driver: Some(
        "usbccgp",
    ),
}

So it seems something about composite devices is strange that confuses nusb? seems Windows treats them almost like separate devices. For the non-composite case, however, the manufacturer_string is still wrong.
also interesting: For the eprobe bootloader, Device Manager does show the product string as the device name. However, for picoprobe and eprobe application, it shows the interface string instead!

Related: https://github.com/kevinmehall/nusb/issues/22#issuecomment-1879146906
Yeah, I recently discovered that the device properties DEVPKEY_Device_FriendlyName and DEVPKEY_Device_Manufacturer that nusb is returning come from the .inf file or the driver, not directly from the string descriptors. Zadig sets these properties using the string descriptors, but other installation methods and drivers set them to various other things.
As far as I can tell, Windows isn't reading these string descriptors at enumeration time, so if we want to retain the property that DeviceInfo doesn't perform IO, I think these will have to return None on Windows if we can't be sure the values we're getting from this API are correct. I'd document that the DeviceInfo methods return cached values if and only if available, and cross-platform apps should instead open() the device and use get_string_descriptor to request it from the device, similar to what libusb requires. I'd also add Device methods to get the device descriptor iManufacturer / iProduct fields needed for this.
Note that open() on Windows doesn't actually do much, since its openable device nodes actually correspond to interfaces. Windows may also require claiming an interface to wake the device from suspend to be able to read descriptors, but it seems like the kinds of devices you'd typically want to use with nusb don't autosuspend anyway.
You can try out the string_descriptors example app to see how the device properties and the string descriptor read compare for your devices.
I am hopeful that there is a non-blocking way to get the serial string (with correct casing) on Windows, so if that works out, that one can stay. A lot of use cases locate a device by VID + PID + Serial, so that is nice to have when listing devices.

#27 fixes the product string, seems Windows does cache it.

I'd document that the DeviceInfo methods return cached values if and only if available, and cross-platform apps should instead open() the device and use get_string_descriptor to request it from the device

It'd be helpful if there was a built-in way to do "just give me the manufacturer string, do IO if needed".
If you tell the user "to be cross-platform, open() and get_string_descriptor()", they'll do that unconditionally which will do IO unnecessarily on Linux. To do it right, the user would have to do "check for none, then do open, get_string_descriptor" manually, but even then that's tricky because None on linux means "no manufacturer string", on Windows it means "device might or might not have a manufacturer string, it's just not cached", so you don't want to do open, get_string_descriptor on Linux but you do on Windows.

Do you have a concrete use case for manufacturer string?
I'm inclined to change (and document) manufacturer_string() to always return None on Windows, since it's usually wrong right now.
I want to fix this for the sake of completeness, but now that you've fixed the product string, manufacturer seems like the least useful of the three device strings, so may not be a priority right now.  I'd assume that lsusb-like apps are probably fine opening the device, and are going to want to read the whole config descriptor and request arbitrary strings anyway. It seems like many apps look up the idVendor in the usb.ids list instead of using the string descriptor as well.
I get your point that if you want the value, you want it the most efficient way if possible, but otherwise you want to do what it takes to get it. I'd accept a PR adding get_manufacturer_string that returns Result and does IO on Windows, or falls back to manufacturer_string on supported OSs if someone comes across a need for this.

Do you have a concrete use case for manufacturer string?

not really, no. probe-rs doesn't use it. Perhaps it's useful to communicate to the user in some cases, but the product name is usually enough.
so no objection to always returning None from me :+1:


Fix/add debounce to base input

Reasons for making this change
The user would lose characters when entering text into an input
[Please describe them here]
If this is related to existing tickets, include links to them as well.
Checklist

[ ] I'm updating documentation

[ ] I've checked the rendering of the Markdown text I've added
[ ] If I'm adding a new section, I've updated the Table of Content

[x] I'm adding or updating code

[ ] I've added and/or updated tests
[ ] I've updated docs if needed

[ ] I'm adding a new feature

[ ] I've updated the playground with an example use of the feature

Please send a PR properly describing what you're trying to achieve, and implementing a generic solution which would work without landing your specific needs and package name changes.
Thanks for your understanding.


feature: multiple selection

Description

Add multiple select as described in #56. Adding this directly in the app-frontend repo as BRG has urgent need for this. Will crete a followup-issue for moving this to design-system + adding shortcuts taken here.
Related Issue(s)

#56

Verification

[ ] Your code builds clean without any errors or warnings
[ ] Manual testing done (required)
[ ] Relevant automated test added (if you find this hard, leave it and we'll help out)
[ ] All tests run green

Documentation

[ ] User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

This works in a pinch! 🤏 Great work! I'd recommend implementing support for the list data model binding for this and checkboxes in the future, so we can move away from comma-separated strings at some point. Maybe add that to the issue you're writing?

Oh yes, baby!


How to localise text with links?

Hi, thanks for the great lib.
One of my texts in the app is:
{
  en: {
    termsOfUseText: "By click Submit you agree to Terms of Use and Privacy Policy"
  }
}

I need to have Terms of Service and Privacy Policy Links that open WebView.
I don't want to separate it into separate keys because it harder to translate and in some language the order of words can change so I need to allow the translators to translate it as a whole line.
Any suggestions on how to implement that?
Thanks,
Ran.

Hi,
I imagine that you can use a sprintf equivalent for JavaScript (https://www.npmjs.com/package/sprintf-js).
I imagine something like this:
sprintf(
  'By` click Submit you agree to %s and %s',
  '' + I18n.t('Terms of Service') + '',
  '' + I18n.t('Privacy Policy') + ''
)

An npm package that could be helpful:
https://www.npmjs.com/package/sprintf-js


borgbackup configuration creates borg-repo before filesystems are mounted

https://github.com/NixOS/nixpkgs/blob/0576b0236940a69118c3cb1ab6406792185c7c1a/nixos/modules/services/backup/borgbackup.nix#L102
If the repo dir is local, it adds an activation script that creates the repo. This is (a) useless, because the backup script will call borg init if necessary before creating a backup, and borg init will create the repo directory, and (b) dangerous, because the activation scripts run before systemd starts, which means if the borg repo is located on a filesystem that doesn't become available until later in the boot process, it will create an empty directory under that mountpoint and prevent the filesystem from being mounted in the first place.

This is, in fact, still important to me, but not quite important for me to actually implement it.


Bridging the Gap: Migrating Xamarin.Android and Xamarin.iOS Native Apps to MAUI

Type of issue
Code doesn't work
Description
Please help the people who are suffering from converting their Xamarin Android and iOS native apps to MAUI.
[Enter feedback here]
Page URL
https://learn.microsoft.com/en-us/dotnet/maui/android/app-links?view=net-maui-8.0
Content source URL
https://github.com/dotnet/docs-maui/blob/main/docs/android/app-links.md
Document Version Independent Id
8a77b383-4209-5406-59a1-5df947a75e47
Article author
@davidbritch
Metadata

ID: 8a77b383-4209-5406-59a1-5df947a75e47
Service: dotnet-mobile
Sub-service: dotnet-maui

Hi @Lalitchauha
Please email<EMAIL_ADDRESS>for support. Thanks.


1140 GS causing issues with dropdown menu

I just had an issue on a new site where I am (as always) using Roots as the theme. I thought I'd try out the 1140gs as the client is keen that the whole thing looks good on any screen.
The issue is that the primary nav dropdown was getting lost behind the container div tags and no amount of z-index adjustment would solve it. Finally found that if I set overflow to 'visible' in the row tag within the 1140gs.css that it all went back to how it should be.
Any questions, let me know.

I have the same issue. Any suggestions? Also any ideas why overflow for .row is set to hidden in 1140?

all the extra css (and even markup/classes on certain elements,
 in 404.php,
 and
 in the loops, probably more places) in roots is meant to be used with blueprint css and it wasn't tested with other frameworks (1140 was added in pretty late, too) :/
not sure why 1140's framework has the overflow on row

closing this issue because we can't change 1140's style (i'm assuming they're using overflow for clearing?) and it's not possible to add style to roots that overrides the overflow to prevent it


[Feature] sc-23364 Pop up modal when crane have new released version

Click Download button will jump to GitHub release page
Click Skip button will ignore this version
Click Cancel button will close the modal and show it again next time

Signed-off-by: Kent Huang<EMAIL_ADDRESS>

Show the New Version Release modal if the crane has a new release.
Click the skip button to ignore the pop-up modal.

@kentwelcome style updated.


Notification

Hi, Would you know how to send a notification at say 9am what the best 2 hour slot would be for the remainder of the day?

It should be possible to do this with Home Assistant Automations.
e.g. set up a trigger for 9am (I have one for backups at 2:30) -

Then, assuming you have an mobile phone set up with the home assistant app, set the automation to send it a notification. Set up an Action, with action type = Call Service, Service = notify.your_mobile_phone and service data :=
data:
  subtitle: Best 2 hour block
message: >-
  The best 2 hour block is at:
  {{now().fromisoformat((states("sensor.octopus_2hour_time"))[:-7]).time()}}
title: Agile Octopus

The weird bit takes the value of sensor.octopus_2hour_time:
2020-10-06T00:30:00 BST
removes the last 7 characters:
2020-10-06T00:30
And converts from iso format into an object that I think the notification system gives out sensibly - I haven't looked at this for a while, but I think this is right - I used to use it for setting dishwasher time, but my trigger, which isn't time based, is broken at the moment, so haven't used it for a while.

Cheers, Will give it a go

Thanks, That worked like a charm


Ramp up Leonard Bogdonoff on cloud.gov team

In order to get @rememberlenny productively contributing to the cloud.gov team, @rogeruiz should help @rememberlenny complete a prescribed set of tasks that will bring them up to speed.
Directions:
@rememberlenny and @rogeruiz: Try to go through your checklists in order.
@rogeruiz: If you can’t complete any of the items on your checklist personally, you are responsible for ensuring that an appropriate person does it.
New Person checklist
Getting to know cloud.gov

[ ] Take judicious notes on what about this onboarding process or cloud.gov is confusing or frustrating. If you notice a problem (especially with things like documentation), you are more than welcome to fix it! At the very least, please share this information with your buddy (or someone) at some point so we can make the team/platform better. (You can also file issues and pull requests on the template for Onboarding issues.)
[ ] Figure out who your onboarding buddy is (they should reach out to you) and make sure this issue is assigned to them.
[ ] Read the team onboarding document for more context about cloud.gov.
[ ] Check out the cloud.gov team roster sheet to get a sense of who's working on cloud.gov and in what capacity. (Note that we work closely with the 18F Infrastructure team, but they're not considered part of the cloud.gov team.)
[ ] Bookmark the pertinent links listed here.
[ ] Read the "What is it?" presentation for a rundown of what cloud.gov is and does
[ ] Read through the Overview section of cloud.gov for a broader understanding of cloud.gov, especially as we present it to potential customers/users.
[ ] Read the January 2016 cloud.gov "Executive Business Case" document for greater context about cloud.gov's potential impact in government.
[ ] Deploy a sample application to cloud.gov to get familiar with the basics of the PaaS from a user's perspective.
[ ] Check out the roadmap to get a high-level view of recently-completed, in-progress, and upcoming features.
[ ] Install the ZenHub browser extension to enable you to see kanban boards, hierarchical issues, and burndown charts in GitHub.
[ ] Read the Delivery Process document to learn about how we work.
[ ] Join the cloud.gov team Google Group, so you can participate in team-wide internal communication.
[ ] Consider joining [Cloud Foundry's Slack channels] (https://slack.cloudfoundry.org/) (we sometimes talk to folks in #gov and #gov-private – you'll need a team member to invite you to the latter).
[ ] Figure out what themes you're likely to work in, and complete the checklist below that relates to it.
[ ] Once you've finished the remaining checklists below, make suggestions for steps that would have improved your onboarding experience as pull requests on the onboarding checklist template used to make this issue.

Required items for all team members
These items help us fulfill security and compliance requirements (including for FedRAMP). If you get stuck, or if these requirements are confusing, ask for help from your buddy or in a cloud.gov channel.

[ ] Read the 18F Security Policies and Procedures. These documents (which are mostly quite short) explain the high-level policies and procedures we must comply with while running cloud.gov.
[ ] Read the Incident Response Guide.
[ ] Coordinate with your onboarding buddy to go through Incident Response Training within 60 days of joining the team (and annually after that).
[ ] Read the Contingency Plan.
[ ] Read the Continuous Monitoring Strategy, particularly the cloud.gov team responsibilities.
[ ] Coordinate with your onboarding buddy to go through Contingency Planning training within 10 days if you'll be taking on a significant role in our Contingency Planning processes (or annually if not).
[ ] Read the Configuration Management Plan.
[ ] Read our sharing secret keys policy.
[ ] Review the 18F requirements for password management.
[ ] Review the 18F open source policy guidance about protecting sensitive information.
[ ] Coordinate with your onboarding buddy to go through nonpublic information training within 60 days of joining the team (and annually after that).
[ ] Subscribe to the cloud.gov team calendar (click the + in the bottom right) so you know when assorted team meetings are happening in the various squads.
[ ] Subscribe (through the GitHub watch function) to the cg-site GitHub repository notifications.

Theme-specific items
For explanations of our theme names, see this glossary.
Atlas-specific items

[ ] Bookmark the Atlas kanban board view.
[ ] Join the #cloud-gov-atlas channel on Slack.
[ ] Watch Build Your Own Private Cloud Foundry to learn about running Cloud Foundry.
[ ] Set up Cloud Foundry locally and push an app to it.
[ ] Learn about BOSH: watch this video and see our manifests (and read this for levity).
[ ] Get to know how UAA is deployed/integrated.
[ ] Get familiar with Terraform by going through the getting started guide.
[ ] Learn about Concourse and try a tutorial.
[ ] Check out our staging and production Concourse instances, and take a look at some of our pipelines.
[ ] Join the cloud.gov operations notifications Google Group, so you can see alert information if PagerDuty is unavailable
[ ] Join the Cloud Foundry Slack.
[ ] Get familiar with our AWS setup.

Agent Q-specific items

[ ] Bookmark the Agent Q kanban board view.
[ ] Join the #cloud-gov-agent-q channel on Slack.
[ ] Read about Cloud Foundry services from a user perspective.
[ ] Read about implementing services.
[ ] Take a look at our existing brokers.
[ ] Learn about Concourse: check out our staging and production instances, and take a look at some of our pipelines.
[ ] Join the Cloud Foundry Slack.

@rogeruiz checklist

[ ] Introduce yourself to the new team member and give them some of your background so they know who you are.
[ ] Identify a straightforward, well-groomed story in progress that involves their skills domain, schedule a meeting with the owner for an introduction (if it's not you), and setup pairing sessions several times in the first week on the project.
[ ] Identify a straightforward, well-groomed first story, ideally something they could conceivably complete in their first two/three weeks using their existing skills. Discuss the context with them, then make them the assignee for the card.
[ ] Make suggestions for how the onboarding experience could have been improved as PRs on the onboarding template.
[ ] Ask the Program Manager or Director to add the person to Zendesk, so they can see how we handle non-18F support and read technical discussions happening with outside groups.

Required items for all team members
These items help us fulfill security and compliance requirements (including for FedRAMP).

[ ] Make sure they're in the list of people working on the project.
[ ] Add their name, whether they're Cloud Ops (Atlas/AgentQ), and the date they joined the team to the training tracker.
[ ] Add them to the @cloud-gov-team in Slack’s Team Directory, which also adds them to the right channels (or ask #admins-slack if you don't have permission to do this).
[ ] Add them to the recurring cloud.gov meetings that are relevant for them in the team calendar.
[ ] Ask #admins-github to add them to the @18F/cloud.gov team on GitHub.

Atlas-specific required items

[ ] Help them review and understand the responsibilities of becoming a Cloud Operations team member, as listed in our SSP.
[ ] Ask #admins-github to have them added to the @18F/cloud-gov-ops team on GitHub. (For contractors: Confirm they have cleared GSA security review before doing this one!)
[ ] If the new person is a contractor, ask #admins-github to have them added to the @18F/cloud-gov-contractors team on GitHub.
[ ] Grant them access to the following: AWS GovCloud, Nessus Manager GUI, New Relic, PagerDuty, StatusPage.
[ ] Make them an admin of the platform.
[ ] Take them through AWS onboarding.
[ ] Give them a walkthrough of cloud.gov from an architecture and repository perspective.

@rememberlenny let's take judicious notes on what... right here in the issue until we decide if it should live outside of this artifact.

Alright!

@rogeruiz Do you want to give the three team trainings (nonpublic information, incident response, contingency plan)? The materials are here, so they should be something other people can run. :) Happy to run them though if you prefer me to!

Sounds good @brittag. I can run @rememberlenny through these. Do they need to be recorded or noted anywhere other than the training tracker

@rogeruiz Yay, thanks! You should also take notes together and put them in the folder for each training (there's a template in each folder to copy), to record that it happened and to write down questions, comments, or suggestions you discussed. You don't have to follow the template exactly, just make sure to include names and notes. :)

54/65 complete.

Is there anything blocking completion of this one now?

We finished!
--
Leonard Bogdonoff
rememberlenny.com | @rememberlenny

On Mar 28, 2017, at 6:36 PM, Bret Mogilefsky<EMAIL_ADDRESS>wrote:
Is there anything blocking completion of this one now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


Potential Community Contribution to the knowledge base: Bio-image Analysis Notebooks

Hi all,
I am considering making a community contribution to your project if you are interested. I maintain the Bio-image Analysis Notebooks, a collection of Jupyter notebooks demonstrating how to analyse microscopy images using Python. These notebooks serve as knowledge base for the BioImage Analysis GPT. If you are interested, I could serve this knowledge base to you (in whatever format you require) and you could make it part of the BioImage-IO ChatBot knowledge base. The only thing I would kindly ask you to is to respect the CC-BY license under which the notebooks are licensed:

"Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use."

Let me know if this sounds interesting to you!
Best,
Robert

Thank you for the offer—we'd be happy to include your Bio-image Analysis Notebooks in the BioImage-IO ChatBot knowledge base. Of course, we'll provide proper attribution as required by the CC-BY license. As you can see in our recent PR, we're actively improving reference and author attribution in the chat interface based on your previous comments.
The easiest is to send a PR to add a new entry to the manifest file pointing to a Github folder with the notebooks rendered in markdown (if that's possible), the content will be injected once we rebuild the knowledge base. Maybe wait a bit on #149 so you know how to add author license information.

Awesome!

notebooks rendered in markdown (if that's possible)

I think I have seen others converting ipynb files into myst markdown files... But before I start researching how to do this: Have you done this before? If there's a conversion script I could reuse, that would be great. Otherwise, I'll write it.
Thanks again!

I think I have seen others converting ipynb files into myst markdown files... But before I start researching how to do this: Have you done this before? If there's a conversion script I could reuse, that would be great. Otherwise, I'll write it.

Thanks!
No, we don't have it yet, but i believe you can do it with something like nbconvert.
I guess the best is to add a CI script so we can publish markdown content automatically to a github branch, then we just need to point to it.


Add 1.32 pre-release stream

What type of PR is this?
/kind feature
What this PR does / why we need it:
Adding the new stream together with the CRI-O release branch for the upcoming v1.32 release.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?

None

/approve
/lgtm


Red underline visibility issue

I find the red underline to be very hard to see. I would put a :warning: icon next to the "affected" packages.

Are you using the light or dark mode? Dark admittedly makes it much easier to see.

Light mode (I'm not sure why I'm doing this either)
After switching it's a bit better, but it's still kinda bad.

Dark mode is good enough for me, sorry. Better than any icon.
I might fiddle with light mode's colors yet.

plz add <blink>
Affected
</blink> above the tree, I would donate $9 to his competitor if you do. 😂


why the shape of input_full is {1,1424,2128,4} but output is {1,2848,4256,3}??

the fcn network is end to end and their have four maxpool and four deconv, i think it should output same shape, but why the output shape is {1,2848,4256,3}?

I already know,because the last layer tf.space_to_depth can adjust the output size.
you can close or del this issue,thx.


poetry install error.

As shown in the picture above, 'SNAPSHOT' is not properly installed.
I installed 'PYTHON', downloaded the full version of df-gettext-toolkit, and executed the command below in that folder.
pip install poetry
poetry install
Then the above error message is output.
Please tell me if I have installed PYTHON incorrectly.

I had a similar problem with the latest version of poetry. Installation of an older version has helped. I don't remember which version I used exactly, probably 1.2.1, so try pip install -U poetry==1.2.1

Well, I found that python-base dependency causes this problem. I'll try to fix this to not depend on old versions of poetry.

Well, I found that python-base dependency causes this problem. I'll try to fix this to not depend on old versions of poetry.

Thanks :)

@magicianaos should be fixed now. Please, try to download again and install

@magicianaos the problem should be fixed now. Please, try to download again and install

Thanks

@magicianaos I assume that the problem is gone, so I'm closing the issue.


Improve docs for tf.nn.depthwise_conv2d_native

Hi,
In depthwise_conv2d_native docs, the formula to calculate the output tensor is not written inside "code" tag for markdown.
Screenshot of the docs -

Can one of the admins verify this patch?

Looks like it is not supposed to be code snippet, but this does make it look better. Thanks!


EOC Portuguese Student Data

There's something wrong with the import for the student data. When you import, and use the student-numeric.csv it doesn't have the absence column just the x y values. This is the end of chapter 7 and 8. Please share correct code . According to your book it is suppose to keep numerical values and column G3. Your code only keeps two columns and I can't figure it out.
Thanks

For some reason, github didn't update me with these issues ... I'll look into this and get back to you.  Thank you for reporting the issue.

Digging into this, I updated all my packages and the net result is the following csv.  It appears to work as advertised.
% head portugese_student_numeric.csv
age,Medu,Fedu,traveltime,studytime,failures,famrel,freetime,goout,Dalc,Walc,health,absences,G3
18,4,4,2,2,0,4,3,4,1,1,3,6,6
17,1,1,1,2,0,5,3,3,1,1,3,4,6
15,1,1,1,2,3,4,3,2,2,3,3,10,10
15,4,2,1,3,0,3,2,2,1,1,5,2,15
16,3,3,1,2,0,4,3,2,1,2,5,4,10
16,4,3,1,2,0,5,4,2,1,2,5,10,15
16,2,2,1,2,0,4,4,4,1,1,3,0,11
17,4,4,2,2,0,4,1,4,1,1,1,6,6
15,3,2,1,2,0,4,2,2,1,1,1,0,19


Add 'delete-incident' and 'edit-incident' command

Feature request

[x] I confirm that this is a feature request rather than a question.

What problem does this feature solve?

You don't have to delete the incident file for each language manually. Currently you have to delete every file for each language by hand. This is pretty annoying and confusing if you use more than one language.

You don't have to edit the incident file for each language manually. Small example: You create a new incident and you are using 4 languages (which means you have 4 files). Now you want to change the value of 'resolved' because the incident was solved. Currently you have to open and edit every file for each language and change the value by hand.

(The new commands are especially useful if you use more than one language!)
What does the proposed API look like?
How should this be implemented in your opinion?
Add 2 new commands:
npm run delete-incident # OR yarn delete-incident

and
npm run edit-incident # OR yarn edit-incident

--
After running one of those commands you will be asked a few questions.
Examples:
delete-incident:

Please select the incident. (enter id?) Or select an incident from this list: (list of available incidents)
Do you really want to delete this incident? (yes/no)

edit-incident:

Please select the incident. (enter id?) Or select an incident from this list: (list of available incidents)
Which value do you want to change?
...

Are you willing to work on this yourself?**
No.

Commenting to keep this open.

comment to keep this open

May I suggest adding pinned label on this to prevent the bot from marking it as stale?

Hello, guys. These new commands will be available in the next stable version. In the meantime, you can test them using the version 0.3.0-alpha.5.


feat: add forwardRef support for react components

It would also be a "nice to have" to set the display name. This would require svgr templates though. Can make PR if needed.

Hey! Thank you for your PR!
Much appreciated! 🙏
I rebased it and fixed it in #614 and kept you as a contributor 👍


Reactive Database

Motivation:
integration with database query and updates with Akka & akka-stream

slick and quill?
jooq

@djx314 would you help to take care of this?

@jilen Would you help this out too?

@hepin1989  I would be interested  in this topic, but actually useful things are

How to query in a stream way, specially for very large dataset
How to turn subscription into Stream (Database like postgres support Notify).

Both topics seems a duplicate of #7

@hepin1989 For the database selection, I suggest that use quill.
I think slick's deadlock bug is still exsists sine somebody has submited some deadlock issue point to 3.2.0. It not the best time to use the slick in demo.
And quill can use the async database driver, I think it can bring better performance.

@djx314 @jilen Does quill current have reactive stream integration?
We plan first to translate the RDP book, and then come to this one.
https://github.com/ReactivePlatform/CodeSamples

@jilen Yes, they are related, so the final structure will need you fellows' review:)


Fix checkout methods utilizing notifyBlock/GTCheckoutStrategySafe

Currently, the performCheckout methods move HEAD to the new ref/commit before calling git_checkout_head. This is incorrect behavior.
When git_checkout_head is called, it reports changes between the workdir and HEAD per-file to the notifyBlock, allowing the block to abort the checkout based on a reason (dirty/conflict/etc).
However, since HEAD has already been moved to a different ref/commit, the notifyBlock is notified about changes between the current workdir and the requested ref/commit. This results in a dirty state for any file that differs between the old ref and the new ref, regardless of whether or not any change was made in the workdir.
The correct behavior (e.g. with GTCheckoutStrategySafe) is to notify of changes that will cause data loss in the workdir.
This change leaves HEAD in position until after the checkout, correcting the checkout behavior. When GTCheckoutStrategySafe is used, notifyBlock is only invoked as expected (e.g. dirty files that would be overwritten on checkout). Also, HEAD is only moved if the checkout succeeds, preventing other confusing behavior.

Actually this is not as straightforward as I thought. performCheckoutWithStrategy calls git_checkout_head(), which is why it expects HEAD to be moved first.
I think the correct behavior is to determine the target tree and use git_checkout_tree()


Support explicit and inferred self types

Example:
class A
  this: { x: int }
  method Foo = this.x  // ok

class B: A  // fine, transfers the `this`-type requirement

B{} // error: does not satisfy `this`-type

class C: A { x: 0 | 1 }

C{x = 0}   // ok

class A2
  // self inferred
  method Foo = this.x  // ok

class B2: A2

A2{}  // illegal

class C2: A2 { x: 0 | 1 }

C2{}  // ok

I no longer think it's a good idea to infer self types (or receiver refinements, for that matter), but we could still use partially-specified self types with class-level type variables to achieve simple extensible programming as in @andongfan's project:
class Base {
  self: { eval: 'a -> int }  // used when typing methods below
  // Note that 'a is quantified at the level of the class instance
  ...
  fun eval: (Lit | Add('a, 'a)) -> int
    = ...
}

I think this actually helps to clarify the approach, and could be presented as the desugaring of the syntax we show in the SRC extended abstract.
To avoid confusion, we may want to capitalize class-level type variables, as in fun eval: (Lit | Add('A, 'A)) -> int, otherwise one could think the function is polymorphic in it.


Add OpenVINO LLMs

Description
Add OpenVINO LLMs
Fixes # (issue)
New Package?
Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

[x] Yes
[ ] No

Version Bump?
Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

[x] Yes
[ ] No

Type of Change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[x] Added new unit/integration tests
[x] Added new notebook (that tests end-to-end)
[x] I stared at the code and made sure it makes sense

Suggested Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have added Google Colab support for the newly added notebooks.
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] I ran make format; make lint to appease the lint gods

Thanks for the contribution @OpenVINO-dev-contest -- haven't taken a closer look yet, but just wondering would LogProbs be available for this LLM integration?

General comment: Since OpenVINOLLM is very similar to HuggingFaceLLM (only DEFAULT_HUGGINGFACE_MODEL, the constructor, and class_name change) I would much prefer subclassing to avoid code-duplication, and changing the Pydantic fields default values and constructor as needed.

Pydantic

This is great idea, and thanks for your review, have updated it accordingly.

LogProbs

Hi since this implementation is a subclass of huggingface LLM, its functions will be aligned with HF.

Thanks for the change!
There seems to be a dependency conflict with the huggingface_hub version. This pyproject.toml requires huggingface_hub<0.23.0 and >=0.22.2, but the one from llama-index-llms-huggingface requires it to be <0.21.0 and >=0.20.3

dependency

removed the conflict dependency to align with HF.


[torii] --events-chunk-size infinite loop

Describe the bug
On my world, calling torii with --events-chunk-size & any value under 7 cause torii to infinite loop call starknet_getEvents
Probly introduced with #1688

i cant reproduce this issue. i dont think its associated with #1688 as the PR hasn't been merged yet

i cant reproduce this issue. i dont think its associated with #1688 as the PR hasn't been merged yet

yes glihm noticed me it's not merged yet, i had issue with alpha-10

i cant reproduce this issue. i dont think its associated with #1688 as the PR hasn't been merged yet

yes glihm noticed me it's not merged yet, i had issue with alpha-10

i think it's an issue with the get_events api

for me it happens when i set the --events-chunk-size value to 1. it breaks the get_events api. for now maybe just try to not use that value. does it happen with other values than 1 for you?

for me it happens when i set the --events-chunk-size value to 1. it breaks the get_events api. for now maybe just try to not use that value. does it happen with other values than 1 for you?

Will check on lower layers for that to ensure it's something that can be addressed. Thanks for investigating, we don't usually use 1 yes so lower priority than other fixes. :+1:

iirc it has been changed on Torii. Can be re-open if necessary.


[lcms] Update to v2.16

[X] Changes comply with the maintainer guide.
[X] SHA512s are updated for each updated download.
[X] The "supports" clause reflects platforms that may be fixed by this new version.
[X] Any fixed CI baseline entries are removed from that file.
[X] Any patches that are no longer applied are deleted from the port's directory.
[X] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[X] Only one version is added to each modified port's versions file.

@dg0yt @MonicaLiu0311 is there any way to see what the failure is on linux? My windows build with the same port completed.

Please get failure logs here. Steps to view CI errors: https://github.com/microsoft/vcpkg/pull/38994#issuecomment-2138566193:
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: /mnt/vcpkg-ci/downloads/tools/cmake-3.30.1-linux/cmake-3.30.1-linux-x86_64/bin/cmake --build . --config Debug --target install -- -v -j33
    Working Directory: /mnt/vcpkg-ci/b/openimageio/x64-linux-dbg
    See logs for more information:
      /mnt/vcpkg-ci/b/openimageio/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
  /mnt/vcpkg-ci/installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  /mnt/vcpkg-ci/installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/openimageio/portfile.cmake:75 (vcpkg_cmake_install)
  scripts/ports.cmake:196 (include)

install-x64-linux-dbg-out.log

TLDNR: There is a stray  -D-pthread which is probably meant to be a -pthread.

With the amount of packages required and the number of failures I've had over the course of the day because my Ubuntu WSL2 setup was missing some apt-get packages I don't think I'll get further with this today.
Just curious if the CI can be restarted if https://github.com/microsoft/vcpkg/pull/42175 lands?

Just curious if the CI can be restarted if https://github.com/microsoft/vcpkg/pull/42175 lands?

It is currently in the reviewed status, please wait a moment.

TLDNR: There is a stray  -D-pthread which is probably meant to be a -pthread.

Ok so I got the x64-linux failure locally. I searched the CMakeCache.txt to see where the -pthread was coming from.
 Its own pkconfig file did not have -pthread in it, but it did reference lcms. Then I looked at the pkgconfig from lcms.
prefix=${pcfiledir}/../..
includedir=${prefix}/include
libdir=${prefix}/lib

Name: lcms2
Description: LCMS Color Management Library
Version: 2.16

Libs: "-L${libdir}" -llcms2 -lm -pthread
Cflags: "-I${includedir}" -pthread

So it is the problem here. So in these cases do we remove the -pthread from Cflags? I can open up a patch on the lcms repo with a suggested fix for this.

-pthread in the pc files is not the problem. But maybe it is used wrongly (for definitions, prepending -D).

Okay @dg0yt I think this is ready for review. The x64-linux triplet build passed in CI and for me locally.

There appears to have been an issue with Python when the checks ran. Can we rerun @dg0yt @MonicaLiu0311 ? The last run was fine.

You can add an empty commit (git commit --allow-empty -m CI and push) to run CI again.

Ok all the checks are 🟢 ! This ready to go @dg0yt ?

LGTM. (Omitting nitpicks.)
But somebody else must approve.

Feature fastfloat is tested successfully in the following triplet:
x64-windows
x64-windows-static

Features threaded,tools are tested successfully in the following triplet:
x86-windows
x64-windows
x64-windows-static

Ok I split the change to openimageio off into https://github.com/microsoft/vcpkg/pull/42532 . This contains the patch to make it so lcms will build properly with these changes. It was landed in openimageio's repository.

The change has been accepted upstream, but no new version has been released, so it can be temporarily accepted as a patch until the next version appears.

v<IP_ADDRESS> was released 3 days ago, and OpenImageIO/pull/4556 was merged yesterday. Has it been included in the latest version?

Alrighty this is rebased now that the changes to openimageio landed in https://github.com/microsoft/vcpkg/commit/53a53a36bd85ce45ab5a6811b0a404067f679577 and ready to land

Thank you!

Thank you for all the assistance with it!


Some clarity on error thrown

Hi there,
I am currently reading through the code - could you please elaborate on what the following error means?
https://github.com/nervosnetwork/lumos/blob/develop/packages/common-scripts/src/common.ts
if (deductAmount > 0n) {
    throw new Error("Not enough capacity in from infos!");
  }

It means capacity in from infos not enough for injectCapacity / transfer or payFee.

Sure but what are these in the context of Nervos Network.
Where are the definitions/documentation for:
"capacity"
"infos"
"from" (I'm supposing it is referring only to the account from which the transaction is coming)
"injectCapacity "

Close the issue due to inactivity


Feature request - Make a parameter required for callback function

This video shows the problem:
https://www.useloom.com/share/1a0f1e84083049ff8f745a3a1f17ac03
basically I have this
v.run =  t => { return t.foo()};

run(() => {
    //  this compiles
});

run(t => {
    //  but I want to make the t parameter required!
});

the "plain" function satisfies the typings, but I want to make the parameter required, not optional. I can't really explain but it should be clear from the (rambling) video. Thanks.

have no parameters is semantically equivalent to having a parameter and ignoring its value at runtime. the later is not an indication of invalid code, and so is the earlier. a canonical example here is map.. most users never specify the second or third arguments. the caller has to always provide them just the same.

Totally disagree on this one.
Array.prototype.map = (x: Function, y?: thisArg)
it does not look like this:
Array.prototype.map = (x?: Function, y?: thisArg)
if you don't pass the first argument, you are f*cked, because a TypeError is coming your way.
it is VERY important to tell the user that the first argument is required. Omitting an argument is a failure at runtime!!

run(function(t){
   // forget to use t
});

and
run(function(){

});

are identification.. so you can tell them to make sure to use the argument in the docs  i guess..

It would be more helpful if you post a snippet displaying the issue. The way I see it, the only code that needs such behaviour are functions that inspect function.length or do toString() hacks. Honestly, both of these are questionable practices.

@gcnew if you use
[].map()
you are going to get a TypeError because you failed to pass it a function
same with my code (I just improved it)
if you fail to pass t, then you will get a TypeError because t.foo() will get called, and t will be undefined.
This is the simplest stuff. How can we guarantee runtime safety if this is what we have?

Ultimately this is the difference between arguments and parameters.
// here are arguments
foo(a,b,c);      // a,b,c are arguments

// here are parameters
t.foo = function(a,b,c){   // a, b, c are parameters

};

at least that's the nomenclature that I currently adhere to lol
so I want to make parameters to be forced to be in place

It's in the FAQ and this has been covered many many times before. See #17868 for a recent recitation of this debate.

@RyanCavanaugh  re: https://github.com/Microsoft/TypeScript/wiki/FAQ#why-are-functions-with-fewer-parameters-assignable-to-functions-that-take-more-parameters
I'd like see some option we can use to make functions with fewer parameters not assignable to functions that take more parameters
is that possible? A flag in tsconfig.json? dunno

So it's working here:

so I wonder why in my example it wasn't working? dunno


Critical stuck source bugs

Search Pages
Grabber fails to load search results from a source, if page is changed before the said source delivers a response (observable in merge results mode and slow connections). Once this source gets into this "stuck" state, it remains so for the remainder of the session for all search pages, regardless of merge results setting.

This does not effect the image previews.
Randomly affects the right click downloads which don't show any activity, if so.
All batch downloads from the source will complete in progress files but next files will get stuck at 0%.

Image Previews
This bug also manifests in image preview windows rarely. In which case all image preview windows refuse to load any image from that particular source. While right click downloads and search pages work flawlessly.
Steps to reproduce

Search anything with some of the slower sources in your region with merge results. Mine are gelbooru and sankaku,
As the next page shows blank page, go to next page.
The source previously being loaded will not return results.

Expected behavior
Everything should work as it should previously. All previews windows should load images, batch downloads should continue and search pages should get results.
Screenshots
I'll make some gifs, if needed.
System information

OS: Windows 10 1803
Grabber version: Nightly

Additional context
It seems as if the connection remains open or is not discarded on cancelled action and is counted somehow towards some kind of enforced limit which forces other requests to go into a waiting deadlock for access to the source. It also seems that this limit has some different weights than what is defined in per source limits. As only a single connection grounds the program to a halt for the said source.

@Bionus So I sometimes get the following error (only for Gelbooru) in log but it does not happen always:
Loading error for 'index.php?page=post&s=list': Protocol "" is unknown

@Bionus So the above error occurs with specific images every time. The image loads fine on website.
For example: dae3b6faf71dfe4d368c166fab2f8778


AzureOpenAI and SQLTools with agent -> ValueError(f"Prompt missing required variables: {missing_vars}")

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.

Example Code
Similar code works with open ai (see https://python.langchain.com/docs/use_cases/sql/agents) and but not with Azure Open AI
Below is my full code
import os

os.environ['OPENAI_API_KEY'] = 'your key'
os.environ['OPENAI_API_TYPE'] = 'azure'
os.environ['OPENAI_API_VERSION'] = '2023-05-15'

from langchain.sql_database import SQLDatabase

db = SQLDatabase.from_uri("sqlite:///Chinook.db")

from langchain_community.agent_toolkits import create_sql_agent
from langchain_openai import AzureOpenAI  # Updated import

from langchain_community.vectorstores import FAISS
from langchain_core.example_selectors import SemanticSimilarityExampleSelector
from langchain_openai import AzureOpenAIEmbeddings

llm = AzureOpenAI(deployment_name="GPT35Turbo",model_name="gpt-35-turbo"
                  ,azure_endpoint="https://copilots-aoai-df.openai.azure.com/"
                  , temperature=0, verbose=True)

embeddings = AzureOpenAIEmbeddings(
    azure_endpoint="https://copilots-aoai-df.openai.azure.com/",
    azure_deployment="Ada002EmbeddingModel",
    openai_api_version="2023-05-15",
)

examples = [
    {"input": "List all artists.", "query": "SELECT * FROM Artist;"},
    {
        "input": "Find all albums for the artist 'AC/DC'.",
        "query": "SELECT * FROM Album WHERE ArtistId = (SELECT ArtistId FROM Artist WHERE Name = 'AC/DC');",
    },
    {
        "input": "List all tracks in the 'Rock' genre.",
        "query": "SELECT * FROM Track WHERE GenreId = (SELECT GenreId FROM Genre WHERE Name = 'Rock');",
    },
    {
        "input": "Find the total duration of all tracks.",
        "query": "SELECT SUM(Milliseconds) FROM Track;",
    },
    {
        "input": "List all customers from Canada.",
        "query": "SELECT * FROM Customer WHERE Country = 'Canada';",
    },
    {
        "input": "How many tracks are there in the album with ID 5?",
        "query": "SELECT COUNT(*) FROM Track WHERE AlbumId = 5;",
    },
    {
        "input": "Find the total number of invoices.",
        "query": "SELECT COUNT(*) FROM Invoice;",
    },
    {
        "input": "List all tracks that are longer than 5 minutes.",
        "query": "SELECT * FROM Track WHERE Milliseconds > 300000;",
    },
    {
        "input": "Who are the top 5 customers by total purchase?",
        "query": "SELECT CustomerId, SUM(Total) AS TotalPurchase FROM Invoice GROUP BY CustomerId ORDER BY TotalPurchase DESC LIMIT 5;",
    },
    {
        "input": "Which albums are from the year 2000?",
        "query": "SELECT * FROM Album WHERE strftime('%Y', ReleaseDate) = '2000';",
    },
    {
        "input": "How many employees are there",
        "query": 'SELECT COUNT(*) FROM "Employee"',
    },
]

example_selector = SemanticSimilarityExampleSelector.from_examples(
    examples,
    embeddings,
    FAISS,
    k=5,
    input_keys=["input"],
)

from langchain_core.prompts import (
    ChatPromptTemplate,
    FewShotPromptTemplate,
    MessagesPlaceholder,
    PromptTemplate,
    SystemMessagePromptTemplate,
)

system_prefix = """You are an agent designed to interact with a SQL database.
Given an input question, create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.
Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results.
You can order the results by a relevant column to return the most interesting examples in the database.
Never query for all the columns from a specific table, only ask for the relevant columns given the question.
You have access to tools for interacting with the database.
Only use the given tools. Only use the information returned by the tools to construct your final answer.
You MUST double check your query before executing it. If you get an error while executing a query, rewrite the query and try again.

DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.

If the question does not seem related to the database, just return "I don't know" as the answer.

Here are some examples of user inputs and their corresponding SQL queries:"""

few_shot_prompt = FewShotPromptTemplate(
    example_selector=example_selector,
    example_prompt=PromptTemplate.from_template(
        "User input: {input}\nSQL query: {query}"
    ),
    input_variables=["input", "dialect", "top_k"],
    prefix=system_prefix,
    suffix=""
)

full_prompt = ChatPromptTemplate.from_messages(
    [
        SystemMessagePromptTemplate(prompt=few_shot_prompt),
        ("human", "{input}"),
        MessagesPlaceholder("agent_scratchpad"),
    ]
)

# Example formatted prompt
prompt_val = full_prompt.invoke(
    {
        "input": "How many arists are there",
        "top_k": 5,
        "dialect": "SQLite",
        "agent_scratchpad": [],
    }
)
print(prompt_val.to_string())

from langchain.agents.agent_types import AgentType

from langchain_community.agent_toolkits import SQLDatabaseToolkit
toolkit = SQLDatabaseToolkit(db=db, llm=llm)

# Get list of tools
tools = toolkit.get_tools()

agent = create_sql_agent(
    llm=llm,
    db = db,
    tools = tools,
    prompt=full_prompt,
    verbose=True,
    agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
)

agent.invoke({"input": "list top 10 customers by total purchase?"})

Error Message and Stack Trace (if applicable)
No response
Description
raceback (most recent call last):
File "C:\Projects\Personal\Langchain-DB-Example\main-sqlite-azure.py", line 142, in
agent = create_sql_agent(
File "C:\Projects\Personal\Langchain-DB-Example.venv\lib\site-packages\langchain_community\agent_toolkits\sql\base.py", line 182, in create_sql_agent
runnable=create_react_agent(llm, tools, prompt),
File "C:\Projects\Personal\Langchain-DB-Example.venv\lib\site-packages\langchain\agents\react\agent.py", line 97, in create_react_agent
raise ValueError(f"Prompt missing required variables: {missing_vars}")
ValueError: Prompt missing required variables: {'tools', 'tool_names'}
System Info
System Information

OS:  Windows
OS Version:  10.0.22621
Python Version:  3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]

Package Information

langchain_core: 0.1.25
langchain: 0.1.8
langchain_community: 0.0.21
langsmith: 0.1.5
langchain_experimental: 0.0.52
langchain_openai: 0.0.6

Packages not installed (Not Necessarily a Problem)
The following packages were not found:

langgraph
langserve

PIP freeze
aiohttp==3.9.3
aiosignal==1.3.1
annotated-types==0.6.0
anyio==4.3.0
async-timeout==4.0.3
attrs==23.2.0
certifi==2024.2.2
charset-normalizer==3.3.2
colorama==0.4.6
dataclasses-json==0.6.4
distro==1.9.0
exceptiongroup==1.2.0
faiss-cpu==1.7.4
frozenlist==1.4.1
greenlet==3.0.3
h11==0.14.0
httpcore==1.0.3
httpx==0.26.0
idna==3.6
jsonpatch==1.33
jsonpointer==2.4
langchain==0.1.8
langchain-community==0.0.21
langchain-core==0.1.25
langchain-experimental==0.0.52
langchain-openai==0.0.6
langsmith==0.1.5
marshmallow==3.20.2
multidict==6.0.5
mypy-extensions==1.0.0
numpy==1.26.4
openai==1.12.0
packaging==23.2
pydantic==2.6.1
pydantic_core==2.16.2
PyYAML==6.0.1
regex==2023.12.25
requests==2.31.0
sniffio==1.3.0
SQLAlchemy==2.0.27
tenacity==8.2.3
tiktoken==0.6.0
tqdm==4.66.2
typing-inspect==0.9.0
typing_extensions==4.9.0
urllib3==2.2.1
yarl==1.9.4

use agent_type="openai-tools"

@liugddx , That is giving another error and i have already tried previously.
TypeError: create() got an unexpected keyword argument 'tools'

Hi @Prince269090,
When you pass agent type as ZERO_SHOT_REACT_DESCRIPTION, create_sql_agent calls create_react_agent internally which requires the prompt template to be in ReAct prompt(react_promt_template)format, so you need to modify the prompt accordingly.
You can follow this link to know more about ReAct prompt formatting - https://python.langchain.com/docs/modules/agents/agent_types/react
Below is the code that you can use -
import os
from langchain.sql_database import SQLDatabase

db = SQLDatabase.from_uri("sqlite:///Chinook.db")
from langchain_community.agent_toolkits import create_sql_agent
from langchain_core.prompts import (
    FewShotPromptTemplate,
    PromptTemplate,
)
from langchain.agents.agent_types import AgentType
from langchain_openai import AzureChatOpenAI

os.environ["AZURE_OPENAI_API_KEY"] = "..."
os.environ["AZURE_OPENAI_ENDPOINT"] = "..."

Given an input question, create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.
Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results.
You can order the results by a relevant column to return the most interesting examples in the database.
Never query for all the columns from a specific table, only ask for the relevant columns given the question.
You have access to tools for interacting with the database.
You have access to the following tools:{tools}. Only use the information returned by the tools to construct your final answer.
You MUST double check your query before executing it. If you get an error while executing a query, rewrite the query and try again.

DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.

If the question does not seem related to the database, just return "I don't know" as the answer.

Here are some examples of user inputs and their corresponding SQL queries:"""

FORMAT_INSTRUCTIONS = """Use the following format:

Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [{tool_names}]
Action Input: the input to the action
Observation: the result of the action
... (this Thought/Action/Action Input/Observation can repeat N times)
Thought: I now know the final answer
Final Answer: the final answer to the original input question"""
SUFFIX = """Begin!

Question: {input}
Thought:{agent_scratchpad}"""

few_shot_prompt = FewShotPromptTemplate(
    examples=examples,
    example_prompt=PromptTemplate.from_template(
        "User input: {input}\nSQL query: {query}"
    ),
    input_variables=["input", "dialect", "top_k", "tools", "tool_names"],
    prefix=PREFIX,
    suffix=FORMAT_INSTRUCTIONS + SUFFIX
)

agent = create_sql_agent(
    llm=llm,
    db=db,
    prompt=few_shot_prompt,
    verbose=True,
    agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
)

agent.invoke({"input": "List the total sales per country. Which country's customers spent the most?"})

Let me know if this works for you!!

For me the same versions cause a critical error on trying to set up AzureOpenAIEmbedding...
Have you experienced
1 validation error for AzureOpenAIEmbeddings
__root__
  As of openai>=1.0.0, Azure endpoints should be specified via the `azure_endpoint` param not `openai_api_base` (or alias `base_url`).  (type=value_error)
  File "<REDACTED>", line 12, in <module>
    azure_embeddings = AzureOpenAIEmbeddings(
pydantic.v1.error_wrappers.ValidationError: 1 validation error for AzureOpenAIEmbeddings
__root__
  As of openai>=1.0.0, Azure endpoints should be specified via the `azure_endpoint` param not `openai_api_base` (or alias `base_url`).  (type=value_error)

https://github.com/langchain-ai/langchain/issues/18099

Hi @Prince269090,
When you pass agent type as ZERO_SHOT_REACT_DESCRIPTION, create_sql_agent calls create_react_agent internally which requires the prompt template to be in ReAct prompt(react_promt_template)format, so you need to modify the prompt accordingly.
You can follow this link to know more about ReAct prompt formatting - https://python.langchain.com/docs/modules/agents/agent_types/react
Below is the code that you can use -
import os
from langchain.sql_database import SQLDatabase

db = SQLDatabase.from_uri("sqlite:///Chinook.db")
from langchain_community.agent_toolkits import create_sql_agent
from langchain_core.prompts import (
    FewShotPromptTemplate,
    PromptTemplate,
)
from langchain.agents.agent_types import AgentType
from langchain_openai import AzureChatOpenAI

os.environ["AZURE_OPENAI_API_KEY"] = "..."
os.environ["AZURE_OPENAI_ENDPOINT"] = "..."

Given an input question, create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.
Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results.
You can order the results by a relevant column to return the most interesting examples in the database.
Never query for all the columns from a specific table, only ask for the relevant columns given the question.
You have access to tools for interacting with the database.
You have access to the following tools:{tools}. Only use the information returned by the tools to construct your final answer.
You MUST double check your query before executing it. If you get an error while executing a query, rewrite the query and try again.

DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.

If the question does not seem related to the database, just return "I don't know" as the answer.

Here are some examples of user inputs and their corresponding SQL queries:"""

FORMAT_INSTRUCTIONS = """Use the following format:

Question: the input question you must answer
Thought: you should always think about what to do
Action: the action to take, should be one of [{tool_names}]
Action Input: the input to the action
Observation: the result of the action
... (this Thought/Action/Action Input/Observation can repeat N times)
Thought: I now know the final answer
Final Answer: the final answer to the original input question"""
SUFFIX = """Begin!

Question: {input}
Thought:{agent_scratchpad}"""

few_shot_prompt = FewShotPromptTemplate(
    examples=examples,
    example_prompt=PromptTemplate.from_template(
        "User input: {input}\nSQL query: {query}"
    ),
    input_variables=["input", "dialect", "top_k", "tools", "tool_names"],
    prefix=PREFIX,
    suffix=FORMAT_INSTRUCTIONS + SUFFIX
)

agent = create_sql_agent(
    llm=llm,
    db=db,
    prompt=few_shot_prompt,
    verbose=True,
    agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
)

agent.invoke({"input": "List the total sales per country. Which country's customers spent the most?"})

Let me know if this works for you!!

The problem has been solved.


Dev

[x] #261
[x] Use routes with Lazy loading
[x] Run workflows not selected show ui_schema
[x] Dark Mode
[x] #238

[x] Update min / max from container resources forms to CPU and Memory
[x] Remove advanced options form when running with docker.

[ ] #225

[x] Workspaces cards are not intuitive, the Permission: owner Status: Collaborating design is a bit confusing. We can add a divider or something to make it more clear.

@nathan-vm
Dark mode style is weird for missing repositories and generate report button

@nathan-vm login and signup page are using only automatic mode style, should we allow users to select which mode to use in these pages too?

@nathan-vm we should store the selected dark/light mode if the user closes the tab. We don't want to have to change the mode every time we re open the app


with docsify framework,\sqrt display incorrect when in Markdown list syntax

Import katex using plugin function of the docsify framework, if I use \sqrt in the in Markdown list syntax, like :
- $$\sqrt{27} \times \sqrt[3]{3}$$

the generated page will display wrong ：

I do not know which one is causing the problem...
use：
katex version : 0.8.3
docsify-cli version : 4.0.10

I don't know how docsify-cli works or how its integrated with KaTeX, but it's probably an issue with the plugin feature of the docsify framework.

@tw-edu-csu-90618137 have you opened an issue with docsify?


at startup :  Uncaught Error: [ng:btstrpd] App Already Bootstrapped with this Element 'document'

while i'm perfectly (i think) following the tutorial, at Step 2, after i included
Meteor.startup(function () {
angular.bootstrap(document, ['socially']);
});
hints ?

FYI, I got this error when the path to my templateURL for a route in one of my $stateProvider.state() calls was wrong.

I got the same error, finally i realized templateURL route was wrong. that's why.

Yeah, I think what happens is if the templateUrl is wrong then the request for the template returns the entire meteor page again (aka the 404 response). This means your index file gets injected into your inject file. Hence the double bootstrap problem.

This is not actually what caused the issue for the OP and me, but yes, an invalid templateUrl can cause the app to bootstrap more than once.

Hey,
If  you were looking for something  really fantastic  and cool, than you found  it! Just  take a look   http://follow.nmwconsultant.com/e4pvd
Warmest regards<EMAIL_ADDRESS>

Hello,
I've recently came accross that amazing  stuff, it looks nice I think, ytake a look http://expert.mumineenfoundation.org/e4rbtsd
Hugs<EMAIL_ADDRESS>


Bluetooth doesn't work

Hi, first of all, thank you so much for creating this. I really wanted Graphene with adb root.
I know you have stated that Android 13 has not been tested, but I have ran the script for Android 13 Pixel and everything works great except the Bluetooth.
Here is the adb logcat when I try to turn on bluetooth:
10-22 22:41:00.110  9918  9918 E SELinux : seapp_context_lookup:  No match for app with uid 1002, seinfo default, name com.android.bluetooth
10-22 22:41:00.110  9918  9918 E SELinux : selinux_android_setcontext:  Error setting context for app with uid 1002, seinfo default:privapp:targetSdkVersion=33:complete: Success
10-22 22:41:00.110  9918  9918 F zygote64: jni_internal.cc:825] JNI FatalError called: (com.android.bluetooth) frameworks/base/core/jni/com_android_internal_os_Zygote.cpp:1766: selinux_android_setcontext(1002, 0, "default:privapp:targetSdkVersion=33:complete", "com.android.bluetooth") failed

From some researching and this article I am assuming the bluetooth signing process didn't work correctly since the signatures don't match. I didn't have any errors during running the script.

Fixed


Messages wrapped in b'...'

Not a functionality bug, but still I'm curious. When I run :TernDef on for example keyword I get b'TernError: No type found at the given position.' message printed out. Is it wrapped in b'...' intentionally?
Screenshot:

Fixes the issue. Thanks!


Update tests for newer Kong versions

Expands coverage for recent kong versions and updated kong-signalfx-plugin with additional support.

@jchengsfx, I fixed the lint issues, but am unable to get the newest test runner container to reliably create a py26 tox env.  Will address that in a subsequent pr, likely by creating our own tox image.

LGTM


[WIP] Fix FromSql impl for OffsetDateTime

See 'Missing datetime format support' #968

[ ] wait until version 0.3 of time is released
[ ] support more input formats ?

Please see #971, I think it's more succinct and complete (?).


SCPI support needed?

Hello guys. I would like to ask your opinion about SCPI support for opendps.
SCPI (Standard Commands for Programmable Instruments) is industrial standard for controlling of measuring equipment and also programmable power supply over Serial/USB/GPIB/Ethernet. As for opendps I can implement serial version of SCPI and it will be compatible with true serial (RS-232), USB (over USB-UART adapter) and even ethernet (wifi over esp8266 or RTL8710AF).
This give us ability to use standard software (anybody using it already?). As for me, I using whis protocol with my oscilloscope, but my software have no support for anything apart this oscilloscope.
You can see example command set for power supply here http://www.manson.com.hk/getimage3/index/action/images/name/SDP_SCPI_command_list_1_2.pdf
and https://github.com/eez-open/psu-firmware/blob/master/doc/SCPI reference guide/EEZ PSU SCPI reference guide.pdf

I think SCPI would be very useful. The eez-open project is really cool and puts this side project of mine to shame ;)

Hi cleverfox,
Are you working on this new feature? I think it would a great addition to opendps.

No, I have no time right now. I will have a time at the end of this year. If you like you can take this task :)

For anyone wanting to add SCPI support, I can recommend this library by @j123b567.

I am going to add SCPI support next.  I will let you know when it is ready

@Spudmn I know that this is just early version so take this only as a hint.
Beauty of SCPI is that it is standard and you can relay on some conventions. For example, if I work with power supply, I expect, that it implements "Power Supplies" instrument class. I also expect that SCPI instrument implements all mandatory commands from IEEE 488.2 and SCPI-99 even if they are just stubs.
If you don't like this, you probably don't need SCPI and this SCPI library is overkill for you. By the way, OpenDPS already has simple custom nonstandard remote commands so why to create another complicated nonstandard remote commands set?
If you like SCPI (I hope so), please implement "Power Supplies" instrument class from the specification (SCPI-99 - Volume 4: Chapter 7 - page 792) and keep all mandatory commands even if you currently don't understand, why they exists. Using default implementations of mandatory commands is enought for the start.

@j123b567  Thanks for the hint.
Yes I like SCPI and I intended to implement the mandatory commands.  Thanks for the PDF.  I am sure that will be very useful.

Cool, looking forward to see the complete command set. Please try to follow the coding style so far. That is would be
static scpi_result_t dps_output_enable(scpi_t * context)
{
...
  if (opendps_enable_output(param1)) {

rather than
static scpi_result_t DPS_Output_Enable(scpi_t * context) {
...
  if (opendps_enable_output(param1))
  {

Sounds interesting... what computer software uses SCPI? I'd be interested to know if it's worth the effort

When working with test equipment SCPI is quite common. All instruments from the big guys such as National Instruments speak it.


Improve performance

I believe the current implementation spawns a new Node.js process for each file which is checked.  This can be very slow and inefficient (tslint often takes a long time to run against all my files).  Would it be possible to speed this up by processing files in batch instead?

fixed with a Bridge implementation a while back


Improvement of "To Asset" on swap page

At the moment selection of "to Assets" in VultisigApp/VultisigApp/Views/Swap/SwapCryptoDetailsView.swift sources coins from $swapViewModel.coins, resulting in only able to swap to assets that already were selected in "chain selection"-page.
Resulting in user maybe not knowing a asset exists or when deselceting a asset in chain view, also gets removed in swap page.
Needed:
Change that all available assets in vault are possible to select in the "to asset" dropdown.

This should be solved one #478 is implemented

This one is fixed , we can add tokens from 1inch api , and also all tokens added is available

@johnnyluo shouldn't this feature already be on the newest testflight version ?
As it is still only possible to select chains which are already enabled on ChainSelectionView


Added group_exists() from Sentry class.

Added group_exists() from Sentry class to avoid exceptions as DB class is not loaded and static::table is protected.
Also when you try and add a group that already exists you get 'The group name "name" already exists.'. I think you should check this as "name" should be the group name and is static, so probably the same for other messages.
Hope this helps.

 Always get dev branch


[Question]  how to draw a dash border for specific dataset?

as described in http://stackoverflow.com/questions/37054620/change-chart-js-bar-chart-border-to-dotted-line:
Chart.helpers.each(myChart.getDatasetMeta(0).data, function (rectangle, index) {
    rectangle.draw = function () {
        myChart.chart.ctx.setLineDash([10, 10]);
        Chart.elements.Rectangle.prototype.draw.apply(this, arguments);
    }
}, null);

i would like to know how can i make the dashed line only for specific dataset. thanks!

Thanks!

You'll probably need to change the bar controller to set the linedash into the element._model
See https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js#L90-L106
Then, draw from the line dash property in element._view property

Closing as answered

I know this issue is closed. But why is borderDash never implemented in for a bar chart?
Just because no one cared about it, or does it have a particular reason?


Only require login for things that need it

Most features work without credentials, but currently even invoking --help fails because it attempts to login first.

Submitted a proposal here: https://github.com/stanfordio/truthbrush/pull/5

Thanks! Closing for now, I'll enumerate which functions need login after the API settles down a bit.


Use a alternate standard port

We should change the alternate standard port 28785 from sauerbraten.
Anyone has a suggestion?

pick a number you like and check whether its available ( http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?&page=125 )
keep in mind that we need multiple ports for serverinfo, masterserver, stdport .. but maybe we dont need them all in the same region (like they are used to be, but that makes them immemorizeable)?
the numbers should be:

easy to remember
easy to remember
good looking
easy to remember

what about the area 31000-31019? which is yet "unassigned" (officially).
e.g. 31000 for the stdserver port and 31013 for the master?
other exmaple: since the area from 41798 to 42507 is also unassigned we could also go for 42000.

42575, 42576, 42577 ?

not really easy to remember, are they? :D
suggestion: 31013 as stdport (-1 for the serverinfo port) and  for the master requests 24042 (42 the answer to everything, 13 being a rememberable number + its inverse)

You don't necessary need to remember the default ports because you don't need to specify the port in the connect statement if it's the default.
Also I guess it's better to have three sequential numbers, but the first port (for the game servers) could be ofc something fancy.

I would go for either
42575, 42576, 42577
or
31000, 31001, 31002.
Other opinions?

I suggest: 31415

π
easy to remember

nice one Hanack

I think we can agree on31415 for game and 31416 for query/master port

You mean 31415 for game and query and 31416 for master :)