Use the default network interface instead of the hardcoded 'eth0' (bsc#1058079)

 Bug 1058079 — kubernetes-salt uses hardcoded eth0

Needs a rebase over the other fixes within the salt repo to pass CI...

Now that the supportconfig dump has the right logs again, this seems to be failing due to:

? cmd_|-load_flannel_cfg_|-/usr/bin/etcdctl --ca-file /etc/pki/trust/anchors/SUSE_CaaSP_CA.crt
--key-file /etc/pki/minion.key --cert-file /etc/pki/minion.crt --endpoints https://478f26722ce74a099907be27d103b29e.infra.caasp.local:2379
--no-sync set /flannel/network/config < /root/flannel-config.json_|-run
: comment: Command "/usr/bin/etcdctl --ca-file /etc/pki/trust/anchors/SUSE_CaaSP_CA.crt
--key-file /etc/pki/minion.key --cert-file /etc/pki/minion.crt --endpoints
https://478f26722ce74a099907be27d103b29e.infra.caasp.local:2379 --no-sync
set /flannel/network/config < /root/flannel-config.json" run
name: "/usr/bin/etcdctl --ca-file /etc/pki/trust/anchors/SUSE_CaaSP_CA.crt --key-file
/etc/pki/minion.key --cert-file /etc/pki/minion.crt --endpoints https://478f26722ce74a099907be27d103b29e.infra.caasp.local:2379
--no-sync set /flannel/network/config < /root/flannel-config.json"
start_time: '12:28:21.560184'
result: false
duration: 2665.791
run_num: 19
changes:
pid: 3605
retcode: 4
stderr: |-
Error:  client: etcd cluster is unavailable or misconfigured; error #0: client: endpoint https://478f26722ce74a099907be27d103b29e.infra.caasp.local:2379 exceeded header timeout
  error #0: client: endpoint https://478f26722ce74a099907be27d103b29e.infra.caasp.local:2379 exceeded header timeout
stdout: ''

id: load_flannel_cfg

I'm not sure if using gateway_interface is good idea. For many deployments, there will be many different networks used and for core services like flanneld or etcd, users will prepare private networks without external networks. This is true for OpenStack and Kubernetes as well. We should allow users to configure this networks by themselves

What if:

We make the network card configurable via a pillar value (I guess this is what @inercia proposed with his comment))
Set the default value of the pillar to be eth0
With a different PR we extend velum to change the value of this pillar value

I'm not sure if using gateway_interface is good idea. For many deployments, there will be many different networks used and for core services like flanneld or etcd, users will prepare private networks without external networks. This is true for OpenStack and Kubernetes as well. We should allow users to configure this networks by themselves

Please refer to the discussion in bugzilla. We decided there that using the default interface would be a good enough solution.


pageserver: add unit test for deleted_at in IndexPart

Existing IndexPart unit tests only exercised the version 1 format (i.e. without deleted_at set).  Add a test that sets version to 2, and sets a value for deleted_at.
Fixes https://github.com/neondatabase/neon/issues/4162
Problem
Summary of changes
Checklist before requesting a review

[x] I have performed a self-review of my code.
[x] If it is a core feature, I have added thorough tests.
[x] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
[x] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

[ ] Do not forget to reformat commit message to not include the above checklist

Superseded by https://github.com/neondatabase/neon/pull/4844


Update README.md

Made content headings more consistent.
What's changed, or what was fixed?

Made headings more consistent

CC: @petele

@googlebot I signed it!


Is Typheous gem thread safe?

If used in the following simple manner:
class CancelSubscriptionWorker
  include Sidekiq::Worker

  sidekiq_options retry: 3

  def perform(body)
    resp = Typhoeus::Request.new("http://example.com", {
      method: :post,
      timeout: 27,
      body: body.to_json,
      userpwd: 'aaa:bbb',
      headers: {
        'Content-Type': 'application/json'
      }
    }).run
  end
end

and i'm doing this inside a Sidekiq worker? I am not using Hydra and I don't care about pooling or any of that. The requests are only several per second, I just want to ensure its 100% stable if used in this exact way.

I also don't need keep-alive if that helps?

Yes, it's thread-safe. Each underlying cURL is checked in/out via a mutex in Typhoeus::Pool, so while each thread can be using different cURLs, none can be using the same cURL.


Validate PermissionQueries upon Creation

 Issue by do4gr
Thursday Sep 07, 2017 at 16:29 GMT
Originally opened as https://github.com/graphcool/api-bugs/issues/261

Permission queries can contain invalid GraphQL and also reference non-existing fields and types.
They should be validated against the schema.

This is actually still open.

See https://github.com/graphcool/graphcool/issues/602


What is Use{Middleware} in the context of this article?

Description
In this paragraph Use {Middleware} is mentioned as something to issue a direct call to.
"To configure middleware at the beginning or end of an app's middleware pipeline without an explicit call to Use{Middleware}. Use IStartupFilter to add defaults to the beginning of the pipeline without explicitly registering the default middleware. IStartupFilter allows a different component to call Use{Middleware} on behalf of the app author."
I think it means, for example, if one is directly calling middleware code with a Using{} block, that by using IStartup, an explicit call to it isn't needed.  and Use {Middleware} as its own block can be called by another component at some point.
I am not aware of specific syntax such as Use{some sort of software} block. Or Use{Middleware} -- but this is stated as if there is such a syntax.
This is likely over-thinking a 'slanguage' use of curly braces :)
For me the docs would be clearer without this, though.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/startup?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/startup.md
Document ID
0546ce3a-3258-9817-0f3f-13281c2f55da
Article author
@Rick-Anderson

I see what this is now -- looking at this page the 'slanguage' is cleared up:
...
By convention, a middleware component is added to the pipeline by invoking a Use{Feature} extension method. Middleware added to the app is highlighted in the following code:
...
app.UseExceptionHandler("/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAuthorization();
...
This 'slanguage' sort of makes sense.  These statements, under the hood, might be using blocks?  But they're called by top-level statements that are methods starting with 'Use'?
I'm just wondering why any of the methods, starting with Use, are 'features' as opposed to simply method signatures that just happen to start with Use?
Following this thinking would any app.Map be a Map{} feature? And so on?

Rick, would like to know why a .Use method is called a Use Feature?  Where there is new terminology there's a reason.  What's the difference between a Use Feature and a Use Method in this case, if that's an important distinction.  Thanks!


New Device: Have you already or do you plan to add Alperen-Ozturk's "Switch" device?

I have a TreatLife wall switch that I am using in HomeBridge with Alperen-Ozturk's "Switch" implementation of Tuya-LAN [https://github.com/Alperen-Ozturk/homebridge-tuya-switch]  Do you plan to incorporate this into your next release or is there another Device Type that works just as well?  I use the Switch to also control non-Tuya devices.

I've looked into the code and it's already merged, the configuration is identical to "Alperen-Ozturk's".
However, there's unexpected behavior. I have a 3 gang switch that controls multiple rooms. When using "homebridge-tuya-web", these 3 switches display separately as 3 devices, which allows me to assign them to different rooms. But which this "homebridge-tuya" plug-in, appears as 1 device with 3 switches, as the result, I can assign them to only 1 room, even if I chose to "Show as Separate Tiles", they always follow each other to the same room. Is there any workaround on this?

Still an issue? Please re-open this issue if relevant.


Update text of default citation link placeholde

I'd like to see the placeholder text be something clearer here to indicate this will be entered automatically for them.
Please replace :link: with :link will be inserted here automatically when available:

Make sure we still send :link: to SDR api, because it is also a placeholder there: https://github.com/sul-dlss/dor-services-app/pull/1566/files#diff-30396654f0ad00ad1daa7292fd8327759d7ff7f3b92f98f40a2e25b6839807e2R13


Add support for obsolete classifications

Related to https://github.com/dotnet/roslyn/pull/72156

superseded by https://github.com/dotnet/vscode-csharp/pull/7011


Reconciling the textract MIT license with code components under *GPL

We're undergoing an internal software audit and identified at least one textract component released under the Affero GPL:  the EbookLib.
Lawyers are getting a bit antsy over this.  In general, compatibility with GPL means that code released under a different license (e.g. MIT) and combined with GPL'd code must be released under GPL.  This might create a bad situation for textract.
We're getting around this by disabling all functionality related to EbookLib in our software, and uninstalling the EbookLib from the virtual environment so that it's never used or bundled with our software.  If we required Epub capabilities in the future, and assuming nothing else changes in textract, we'd instruct users to install by themselves.  We may also have a click-to-install dialog for the same purpose, but warning the users that THEY are downloading and installing.
Our situation:
Apache license, code still private, soon to be released for open distribution.  It relies on textract and other tools to do its job.  We found the *GPL code during a self-audit, need to figure out what to do in general; so far none of our basic functionality is affected if we remove offending code/libraries/tools, so we can afford to skip.  May not be the case in the future.
We like textract a lot, want to assist everyone in its users community from inadvertently getting in trouble due to EbookLib or other stuff with a nasty license.  What do you guys think?

Thanks for opening up this as an issue, @pr3d4t0r! I'm glad to hear you are nearing distribution; that is very exciting indeed :)
As I mentioned in our twitter conversation, perhaps we can separately install the GPL packages as extra_requires so that we can do things like pip install textract[GPL], which not only installs all of the non-GPL code (which will continue to happen by default), but will also install the GPL'ed code. This looks like a good StackOverflow for this. What would you think of this solution?

Also, how will your code distribution handle the unix commands that it requires? Are those GPL too?

@pr3d4t0r have you given this any additional thought? textract intrinsically relies not only on GPL python packages but also on various unix commands. I certainly want to be respectful of these licenses as we distribute textract, but if we don't need to complicate textract's distribution, that would obviously be great.

I just set up pyup for monitoring dependencies on this project and they have a nifty tool for seeing the licenses of dependent projects. I thought I'd mention it here in case its helpful for framing the conversation.


Fix change language

If you try to change language in settings, it doesn't work. Because it's being used Arr:has() which check for key in array, while Canvas::availableLanguageCodes() return an non-associative array, with index as key and not language code. So we can just use in_array() function.

Thanks for submitting this @thewebartisan7, really appreciate it!


Stop sending notification about # typed: false file

Motivation

We're going to go with #5716 only to show the user what's happening when they
attempt to jump-to-def in a typed: false file.
It turns out that VS Code will send textDocument/definition requests all over
the place as long as the user is holding down Cmd (not only once the click has
come through).
It sends the textDocument/definition request to see whether it can change a
piece of the source document to look like a blue link.
If it had been the case that VS Code just sent a request once the user had
committed to the request, it would have been easier to tell them why they were
getting no results.
Hopefully the hover message from #5716 will be enough to tell people what's
happening.
Test plan

See included automated tests.

Could you please also revert the position_assertions.cc changes that check for notifications in definitions and usages now that we no longer send these?

I was thinking that I would just let the test run to show the failures and then fix the failures, rather than also revert the changes to the test.
The test is fixed now.


Failing simple Nix workflow for scheduled jobs

As first reported by @chdoc, the simple Nix CI workflow currently implemented by the nix-action.yml.mustache template currently fails for scheduled (cron) jobs. The failures appeared after the changes in #100, and are very likely related. Basically, all Nix CI jobs fail with the same message:
invalid refspec '+refs/pull//head:refs/remotes/pull//head'

One example of a failing job can be found here: https://github.com/coq-community/reglang/actions/runs/1208112337
As a workaround, I disabled the Nix CI cronjob for reglang. Probably we should prohibit cronjobs directly in the template until this problem is solved. Or what do you recommend in the short term @Zimmi48?

Indeed, I'm not surprised, because I forgot to test and account for this trigger. I'll look into it today to see if there's an easy fix or if we should temporarily remove the schedule trigger from the template.


Metric namespace

This is Sébastien's #568 without conflict.

These commits have been pushed to #568, so I'm closing this one.


[BUG] Nginx is not showing up for Observability 2.9

Integrations adaptor was accidentally removed in a merge conflict

Fixed by #680


ZIP 32 Support

The Ledger app does not seem to support ZIP 32 paths. This is problematic because the Namada wallet uses these for MASP keys and addresses. For instance attempting to execute app.retrieveKeys(hdpath, NamadaKeys.ProofGenerationKey, false) with hdpath set to m/32'/877'/0' yields the return code 0x6700 (APDU_CODE_WRONG_LENGTH). Would it be possible to add ZIP 32 support (i.e paths and key derivations) to the Ledger Namada app? Or maybe point to documentation of its usage if ZIP 32 support is already there and I'm using the API incorrectly?

Hey @murisi we were not supporting Zip32, but we will add the support.

Thanks @chcmedeiros . Also, would it be possible for the Ledger app to generate and display extended full viewing keys at the account level of the ZIP 32 hierarchy, and provide it amongst the app's key responses? Doing this would ease integration with namadaw which currently only supports importing extended full viewing keys and payment addresses.

Thanks @chcmedeiros . Also, would it be possible for the Ledger app to generate and display extended full viewing keys at the account level of the ZIP 32 hierarchy, and provide it amongst the app's key responses? Doing this would ease integration with namadaw which currently only supports importing extended full viewing keys and payment addresses.

Hi again @chcmedeiros ! Would it be possible to provide support for extended full viewing keys at a minimum? Our CLI and web clients only support extended full viewing keys as inputs (and the MASP library only supports extended spending keys for building transactions). I'm thinking that an approach similar to https://github.com/Zondax/ledger-namada/pull/61 or a subset of it could be used to achieve this goal...


Strong memory cycle fixes

Fixes #109
Fixes strong reference cycles by using weak, following these "rules":

Socket owns Channels (with Channel having a weak reference back to Socket)
Channel owns Pushes  (with Push having a weak reference back to Channel)
Socket / Channel own PhxTimers, used weak in callback blocks to break the strong reference cycle

In addition, Socket / Channel now also reset() their timers in deinit

Oops, reopening on actual repo 🤦♂


[BUG] 🐛 prompt to set the title of the PR does not accept spaces

Usage Information
Package version : 0.4.3
Relevant Code / Invocations
When calling feature target to finish a feature, if the pipeline implements IGitFlowWithPullRequest / IGitHubFlowWithPullRequest then a prompt will be displayed to ask the title of the pull request to create.
By default, the title will be the name of the branch BUT this can be overriden by the user in its terminal.
Expected Behavior
The prompt accepts spaces
Stacktrace / Exception
N/A

Resolved with 0.4..4


icons are not Visible: Xcode 9/ swift 3

Hii , i have install framework through pod install(pod "IQMediaPickerController") . app is build successfully and run but the  IQMediaPickerController  not showing assest icons of flash/front/rear camera icons etc, though these button are clickable.
screenshot
//presenting PhotoCamera
let mediaPickerGallery = IQMediaPickerController()
         mediaPickerGallery.delegate = self
        mediaPickerGallery.captureDevice = IQMediaPickerControllerCameraDevice.rear
        var qualityArr = [NSNumber]()
        qualityArr.append(NSNumber(value: IQMediaPickerControllerQualityType.typeHigh.rawValue))
        qualityArr.append(NSNumber(value: IQMediaPickerControllerQualityType.type1920x1080.rawValue))
        mediaPickerGallery.allowedVideoQualities = qualityArr
        mediaPickerGallery.allowsPickingMultipleItems = true
        mediaPickerGallery.maximumItemCount = 10
  mediaPickerGallery.sourceType = IQMediaPickerControllerSourceType.cameraMicrophone
        var mediaTypesArr = [NSNumber]()
        mediaTypesArr.append(NSNumber(value: IQMediaPickerControllerMediaType.photo.rawValue))
        mediaPickerGallery.mediaTypes = mediaTypesArr
        self.present(mediaPickerGallery, animated: true, completion: nil)

And "info" is also returing null even i select any media.
func mediaPickerController(_ controller: IQMediaPickerController, didFinishMediaWithInfo info: [AnyHashable : Any]) {
        NIDebug.printLogArg(value: "Info: %@",info)

    }

is there anything i missed ? please help in this

same issue :(

i am not able to find actual problem but i resolved it by adding all icons from IQMediaPickerController/IQMediaCaptureController/IQMediaCaptureController.xcassets to my project default assets.


Example Issue: Add Lesson on Dictionaries

Add a lesson about dictionaries to Module 1. Include specifics about key-value pairs, indexing, and use-cases.

Fixed 8/14/24, 5:00:00PM EDT by s-gerow in 364f37f0708581ff693b5b9aa9a611d36ef006c0

Fixed 8/14/24, 5:00:00PM EDT by s-gerow in 364f37f0708581ff693b5b9aa9a611d36ef006c0


[Event Request] Table 27 Item - OnBeforeItemVendFormat

Hi, would it be possible to create a new event OnBeforeItemVendFormat in table 27 Item, like this :

Thanks

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


Partials are being compiled. Is there a way to stop this?

The title pretty much says  it all.
Partials are big deal in sass. Without them, there is no point to sass, specially in big projects.

Partials are saved with a leading underscore. That's how any application can detect them. Therefore I already added an option you asked for.
Is that what you needed? Then you can close this issue.

i know that, but partials are being compiled anyway. I tried everything,  but still. The only thing, that works for me, is     when i turned off "autocompile" and do it manually, which beats the reason of this package.
Perhaps am i missing something?

Can you give me an example of your partial file? Do you have a first line comment?

i have:
css/
scss/
_var.sccs
main.scss
index.html
when i save main.sccs, css/main.css is created
but when  i save _var.scss, css/_var.css is also created (eventhough "compile partials" is not set)

What first-line-comment do you use in _var.scss?

This issue happen because I have double slash (//) at first-line.
This is a bug. Whatever you place at first-line after // in partial file, it will compiled.
Try to move it to second line if you want to give a comment.


Linux | Support AppImage packaging

See https://github.com/mu-editor/mu/issues/579.

SELF-NOTE:

Keeping track of the PyQt AppImage packaging example shared in the latest Mu-Moot: https://appimage-builder.readthedocs.io/en/latest/examples/pyqt.html

SELF-NOTE:

I hackishly hand packaged puppy into an AppImage, recently, using PBS with promising results.
Moving to NEXT.

Thanks for your input! :)

Please be sure to test the resulting AppImage on a variety of Linux Live ISOs, especially on the oldest still-supported Ubuntu (currently bionic).

Not an easy thing to do, I gather... Especially on a voluteer driven context. Any suggestions on automating such testing? :)

Doing this "by hand" rather than using one of the AppImage generation tools means that you have to take manual care of all dependencies that are not part of the (oldest) target system in a recent enough version.
So using something like https://github.com/niess/python-appimage#for-applications-developers may ultimately be easier.

Agreed, of course. That's the key ingredient for successful distribution: pup is currently relying on Python Build Standalone for most of it. Looks promising. The future will tell...

Closing for next alpha release, looking to experiment with the next Mu release. Work continues on #184.


Enable predictive back animations

On Android 15, predictive back animations are enabled for all apps that opted-in.
Kitsune is not relying on any custom back behaviour, thus only setting android:enableOnBackInvokedCallback="true" will be required.
After testing the app, I found that the app crashes under certain circumstances when navigating between fragments. This is properly related to this bug: https://issuetracker.google.com/issues/342419080
Therefore, predivtive back animations will remain disabled until the bug is fixed.
Related:

Commit 2dc5c9b
https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture

Enabled in release v2.0.2


LogLevel

Please correct me but isn't LogLevel an internal enum of the System namespace. There seems to be mismatch between what's in master branch and what's been displayed on Logging/samples/SampleApp/Program.cs

No. This LogLevel is defined in https://github.com/aspnet/Logging/blob/dev/src/Microsoft.Framework.Logging.Interfaces/LogLevel.cs.

Great. But you had me pull from the master branch which is using TraceType.cs

Yeah looks like TraceType got renamed to LogLevel.


The minimize hamburger should look like a minimize icon (-)

One of these will do:

This is a UTF-8 minimize icon, open for alternatives -- ideally an SVG icon

I think the 3rd, 4th, and 7th should work...

Those fonts will be different on different systems so how about

I like these better!


Make scrapers bring whatever data is available

Goal - Fix parsing logic to get all failing scrapers. This will be a first step to finding patterns towards smart scraping.

Closing this for inactivity, feel free to reopen.


Added return value for RecursivePageTable operations that must be used.

Operations on the RecursivePageTable (map_to, unmap, etc) now return a MapperFlush that must either be flushed to remove the now-outdated tlb entry for the modified page or unsafely ignoreed.

Thanks a lot!


2 issues... only one error

First I apologize, I'm NOT a software guy, so i'm a bit lost with the software. I am using PlatformIO and the compiling mostly went ok.
I have a problem with the VS1023 when compiled, I will include the dump.
The second problem is the NEXTION display, it only shows the 'demo mode' of the Nextion and I'm not sure how to get around it. I have 5 v and Ground or the display wouldnt work at at and I have the TX going to Pin 16 of the ESP32 and the TX going to Pin 17 of the ESP32. The Pins are assigned properly (or appear to be looking at the code.
Here is the VS1023 errors (almost at the bottom .
Any assistance would be appreciated for this great looking project.
Cheers
[Starting] Opening the serial port - COM8
ets Jun  8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:12784
load:0x40080400,len:3032
entry 0x400805e4
D: Starting ESP32-radio running on CPU 1 at 240 MHz.
D: Version Sun, 15 May 2022 10:30:00 GMT.  Free memory 110580
D: Display type is NEXTION
D: SPIFFS is okay, space 1378241, used 33634
D: Found partition 'nvs     ' at offset 0x009000 with size    20480
D: Found partition 'otadata ' at offset 0x00E000 with size     8192
D: Found partition 'spiffs  ' at offset 0x290000 with size  1507328
D: Read 48 keys from NVS
D: pin_ir set to 35
D: pin_enc_clk set to 25
D: pin_enc_dt set to 26
D: pin_enc_sw set to 27
D: pin_tft_cs set to 15
D: pin_tft_dc set to 2
D: pin_vs_cs set to 5
D: pin_vs_dcs set to 32
D: pin_vs_dreq set to 4
D: Pin 5 is already reserved!
D: pin_i2s_bck set to 5
D: Pin 32 is already reserved!
D: pin_i2s_lck set to 32
D: Pin 4 is already reserved!
D: pin_i2s_din set to 4
D: pin_spi_sck set to 18
D: pin_spi_miso set to 19
D: pin_spi_mosi set to 23
D: GPIO0 is HIGH
D: GPIO2 is LOW, probably no PULL-UP
D: GPIO4 is HIGH
D: GPIO5 is HIGH
D: GPIO12 is HIGH
D: GPIO13 is HIGH
D: GPIO14 is HIGH
D: GPIO15 is HIGH
D: GPIO16 is HIGH
D: GPIO17 is HIGH
D: GPIO18 is HIGH
D: GPIO19 is HIGH
D: GPIO21 is HIGH
D: GPIO22 is HIGH
D: GPIO23 is HIGH
D: GPIO25 is HIGH
D: GPIO26 is HIGH
D: GPIO27 is HIGH
D: GPIO32 is HIGH
D: GPIO33 is HIGH
D: GPIO34 is HIGH
D: GPIO35 is HIGH
D: GPIO39 is HIGH
D: gpio_00 will execute uppreset = 1
D: gpio_12 will execute upvolume = 2
D: gpio_13 will execute downvolume = 2
D: gpio_14 will execute stop
D: gpio_34 will execute station = icecast.omroep.nl:80/radio1-bb-mp3
D: Enable pin 35 for IR
D: Start NEXTION display
D: Init Nextion, pins 16, 17
D: Nextion command cls BLACK
D: Nextion command page 0
D: NEXTION output 'Starting......' to 1
D: NEXTION output 'Sun, 15 May 2022' to 2
D: NEXTION output 'By Ed Smallenburg' to 3
D: Create list with acceptable WiFi networks
D: Added MYWIFI to list of networks
D: Added SSID1 to list of networks
D: Added SSID2 to list of networks
D: Scan Networks
: Scan completed
D: Number of available networks: 7
D:  1 - Spare Hub                 Signal: -67 dBm, Encryption WPA_WPA2_PSK,
D:  2 - New_Setup                 Signal: -75 dBm, Encryption WPA2_PSK,
D:  3 - NewSetup2_guest           Signal: -77 dBm, Encryption WPA_WPA2_PSK,
D:  4 - NTGR_VMB_1473370562       Signal: -78 dBm, Encryption WPA2_PSK,
D:  5 - MK                        Signal: -91 dBm, Encryption WPA2_PSK,
D:  6 - Worldline4062B7           Signal: -91 dBm, Encryption WPA_WPA2_PSK,
D:  7 - BELL826                   Signal: -95 dBm, Encryption WPA2_PSK,
D: End of list
D: updateNr 0 <= 0 to 6, relative is 0
D: updateNr result is 0
D: nextPreset is 0
D: Slow SPI, Testing VS1053 read/write registers...
D: VS1053 not properly installed!
D: Connect to network
D: NEXTION output 'Connect to network' to 4

First note that pins 5, 32 and 4 are double defined.  You have to correct that in the config page of the webinterface.  Then you have to use the Nextion editor to program the Nextion outside of the ESP32.

Thank you Edzelf for the fast response!!!
Within the web interface, do I need to redefine those pins or can I just '#' infront of them?
Also with the display, me being the software dummy I am, saw the TFT and the HMI file in the nextion directory and thought they would get compiled within the build... oops. Thanks for explaining :)
Cheers!!!

Awesome... will give it all a go this evening !!
Cheers,
Russ


Add medium link

Motivation

Our latest medium post might be useful for our community.
Description of the changes

Add link to our medium post.

Thanks! Ah, interesting. Either is fine for me. I'm not sure about the policy of this repo so let me ask other members: @toshihikoyanase @HideakiImamura @hvy @himkt

https://github.com/nzw0301/optuna-wandb/blob/main/part-1/wandb_optuna.py looks nice to show additional usage of WandB + Optuna (without the callback integration). I personally agree with @xadrianzetx to add an example.

the policy of this repo

As far as I know, we have no strict policy. In the early phase of the development, we created the examples based on the following rules:

Create {library_name}_simple.py that demonstrates the Optuna usage without the integration module (e.g., keras_simple.py).
Create {library_name}_integration.py that demonstrates the Optuna usage with the integration module (e.g., keras_integration.py).
Keep examples simple. It should be less than 100 lines if possible.

But, the current examples do not follow the rules strictly. For example, wandb_simple.py that use WeightsAndBiasesCallback should be wandb_integration.py according to the second rule. So, we may need to re-organize the example after the discussion of the repository policy. Before that, we can add examples case-by-case, I think.
The existing example wandb_simple.py shows the usage of the integration module and we don't have the example without the integration module. So, the blog example will attract users who don't want to use the callback.
On the other hand, the medium example is relatively long and a bit complicated compared with the existing example. According to the naming convention, the current wandb_simple.py will be renamed to wandb_integration.py and the blog example will be new wandb_simple.py. But, then wandb_simple.py is much longer than wandb_integration.py, so I'm afraid that users who check wandb_simple.py might leave the example directory before checking wandb_integration.py.
This is not a strong opinion, but I think the step-by-step explanation in the medium article is an effective way to show the medium example. So, I prefer adding only links.
@himkt  @xadrianzetx What do you think of it?

* Create {library_name}_simple.py that demonstrates the Optuna usage without the integration module (e.g., keras_simple.py).
* Create {library_name}_integration.py that demonstrates the Optuna usage with the integration module (e.g., keras_integration.py).
* Keep examples simple. It should be less than 100 lines if possible.

Ah, didn't know that. Makes sense.

so I'm afraid that users who check wandb_simple.py might leave the example directory before checking wandb_integration.py

I see your point there. Let's just stick to the medium link then and rename wandb_simple.py -> wandb_integration.py later on.

Let's just stick to the medium link then and rename wandb_simple.py -> wandb_integration.py later on.

Sounds good! Thank you!

Hi @himkt, could you merge this PR because @xadrianzetx approved this change?

Sorry for that. 💦 I merged. 👍


[CI/CD Improvements] Standardize workflows

Short description
As a maintainer, I want to standardize and modernize development tooling, so that I can reduce maintenance issues and focus more on content than form.
Objectives

Standardize workflows across all adapters; use dbt-postgres as the pilot
Minimize dependencies between workflows

Move shared dependencies into actions

Reduce GHA footprint in dbt-snowflake

Move repo-agnostic actions into actions repo
Move adapter-agnostic actions into dbt-adapters repo

Ensure dispatch workflows are idempotent
Simplify interactions between trigger events and inputs
Migrate to hatch

## Acceptance Criteria
- [ ] `precommit` runs the same formatter and linter as runs as `dbt-postgres`
- [ ] All workflows adhere to the style standards below
- [ ] This package has the same CI/CD workflows, run options, and concurrency settings as `dbt-postgres`
- [ ] Branch protection rules are updated, and are limited to a single job, regardless of OS, python version, etc.
- [ ] Integration tests are only configured in one place (e.g. environment variables, etc.)
- [ ] This package is automatically published to dbt's private PyPI daily from `main`; the current workflow is cancelled in favor of the new workflow when this job is resubmitted
- [ ] This package can be published on demand to the public PyPI, GitHub, and Docker for the specified branch; the current workflow is cancelled in favor of the new workflow when this job is resubmitted for the same branch
- [ ] This package is tested against appropriate published packages prior to releasing
- [ ] I can publish to both test and production versions of publishing targets
- [ ] Publishing to PyPI is authorized via Trusted Publishers
- [ ] Legacy workflows are removed
- [ ] Both `dbt-adapters` and `dbt-tests-adapter` can be released (current behavior to be maintained)

Suggestions

Use dbt-postgres as a template
It's fine to copy paste; it's worth violating DRY for the sake of isolation in a migration of this size

Style standards:

Job ids, step ids, and variables are in kebab case
Job names, step names, and description fields follow dbt docs standards (capitalize first word only)
Extra descriptors should be avoided unless required for disambiguation, e.g.

version-number -> version
archive-name -> archive

Workflow files use a four space tab
Scripts (inline or separate files) use environment variables in env instead of inline substitution like ${{ inputs.value }}

Testing

New workflows are tested against their dev branch prior to merging

Security
This should not increase security risk, and potentially could reduce it. Any security risks should be addressed as part of https://github.com/dbt-labs/actions/issues/173.

This is duplicative of internal tracking, and mostly already happened anyway.


Using "Segoe UI Light" as font displays the cursor wrongly

[x] I am on the latest Hyper.app version
[x] I have searched the issues of this repo and believe that this is not a duplicate

OS version and name:  Windows 10 1607 14393.693 (not running in fast or slow ring)
Hyper.app version:
Link of a Gist with the contents of your .hyper.js: link
Relevant information from devtools (CMD+ALT+I on Mac OS, CTRL+SHIFT+I elsewhere): N/A
The issue is reproducible in vanilla Hyper.app: Is vanila

Issue

When using Segoe UI Light as the main Font for Hyper, the cursor is displayed in the wrong location, so for example when I open Hyper and type 'a' for example, i see this (being _ the cursor):
$ a                    _
For now i'll just use monospace Font, if anyone has a suggestion for the best Font for Hyper in Windows, i'd appreciate it.

Hey there, please try again with the new Hyper v2 release and open a new issue if the problem stills exists. Thank you!


KAFKA-3397: use -1(latest) as time default value for tools.GetOffsetShell

minor fix for prompt the user, or we will get a error message:

Missing required argument "[time]"

cc @guozhangwang

LGTM!

I agree with @SinghAsDev that we can provide a default value, for example latest; this would make more sense after KIP-33 is in so that the searching can be more accurate.

Thanks @SinghAsDev @guozhangwang for your reply. I agree with you that we can use -1(latest) as the default value. i.e. add line:
.defaultsTo(-1)

cc @SinghAsDev

Unit test passed locally. LGTM and merged to trunk.


Trying to refactor routes

So I'm trying to refactor the routes a bit but am having a bit or trouble:
I refactored the Controllers in app.js like this
/**
 * Controllers (router handlers)
 * Refactored
 */
const homeController = require('./controllers/home/index');
const userController = require('./controllers/users/index');
const apiController = require('./controllers/api/index');
const contactController = require('./controllers/contact/index');

With the index.js file just being the routes

const express = require('express');
const homeController = require('./homeController');

const app = express();
app.get('/', homeController.index);

module.exports = app;

And in app.js - where all the routes are I simply have:
app.use('/', homeController);
app.use('/user', userController);
app.use('/contact', contactController);
app.use('/api', apiController);

The home route works fine - but that's it. When I go to access /login or /contact - nothing works. I get the error Cannot GET /contact

homeController.index is a legitimate middleware (e.g. a function (req, res) => { /* does something, like res.send('hi'); */ }) so GET of / works.
In your other examples, you're just referring to the controllers themselves and not to middlewares inside them. How about instead of your app.use('/contact', contactController), try app.use('/contact', contactController.getContact).
(I hope I understood the situation + your question properly; if not, apologies in advance)

@yanivm
Basically all I'm trying to do is to create a separate routes file for all the different types of routes(e.g. /routes/users) and then include the controller files in those router files and then use the router files correctly in app.js
I've looked at various articles and I seem to be doing it correctly but I'm probably missing something.
In app.js I now have
const userRouter = require('./routes/users');
And in /routes/users.js I have
const express = require('express');
const userController = require('../controllers/user');

/**
 * API keys and Passport configuration.
 */
const passportConfig = require('../config/passport');

// USER ROUTES
const router = express.Router();

router.get('/login', userController.getLogin);
router.post('/login', userController.postLogin);
router.get('/logout', userController.logout);
router.get('/forgot', userController.getForgot);
router.post('/forgot', userController.postForgot);
router.get('/reset/:token', userController.getReset);
router.post('/reset/:token', userController.postReset);
router.get('/signup', userController.getSignup);
router.post('/signup', userController.postSignup);
router.get('/account', passportConfig.isAuthenticated, userController.getAccount);
router.post('/account/profile', passportConfig.isAuthenticated, userController.postUpdateProfile);
router.post('/account/password', passportConfig.isAuthenticated, userController.postUpdatePassword);
router.post('/account/delete', passportConfig.isAuthenticated, userController.postDeleteAccount);
router.get('/account/unlink/:provider', passportConfig.isAuthenticated, userController.getOauthUnlink);

module.exports = router;

And then finally in app.js again I have:
/**
 * Primary app routes.
 */
app.use('/', homeController);
// app.get('/', homeController.index);
app.use('/users', userRouter);
...

However, when I click on LOGIN in the header, I still get the dreaded can not GET /login

(I terribly misread your original question, sorry)
Anyway... this worked for me:
In app.js:
// const app = express(); // etc.
app.use('/stuffWithRouter', require('./controllers/routerAttempt'));

In controllers/routerAttempt.js:
const routerAttempt = require('express').Router();
routerAttempt.get('/sayhi', (req, res) => { res.send('hi'); });
module.exports = routerAttempt;

And now GET of /stuffWithRouter/sayhi works for me.
So all in all:

Maybe /users/login will work for you.
And if you want /login to do that login stuff, then simply replace your app.use('/users', userRouter); with app.use('/', userRouter);.

@yanivm
Np. Your example above works! Quick question - does it matter how where I put the app.use('/stuffWithRouter', require('./controllers/routerAttempt'));???
I know that it needs to go under the const app = express(); line
Right now I have it after the last app.use();
Thanks for your help.

I believe it matters, at least in the following sense: (quoting from http://expressjs.com/en/api.html#app.use)

Middleware functions are executed sequentially, therefore the order of middleware inclusion is important.

// this middleware will not allow the request to go beyond it
app.use(function(req, res, next) {
  res.send('Hello World');
});

// requests will never reach this route
app.get('/', function (req, res) {
  res.send('Welcome');
});

@yanivm - thank you so much for your help and efforts - I got it all working as desired!


[Question] Confused about the fresnel formula

The origin fresnel schlick is:

This is what Filament do (From brdf.fs)
vec3 F_Schlick(const vec3 f0, float f90, float VoH) {
    // Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering"
    return f0 + (f90 - f0) * pow5(1.0 - VoH);
}

vec3 F_Schlick(const vec3 f0, float VoH) {
    float f = pow(1.0 - VoH, 5.0);
    return f + f0 * (1.0 - f);
}

float F_Schlick(float f0, float f90, float VoH) {
    return f0 + (f90 - f0) * pow5(1.0 - VoH);
}

This is what Babylon.js do (From pbrBRDFFunctions.fx)
vec3 fresnelSchlickGGX(float VdotH, vec3 reflectance0, vec3 reflectance90)
{
    return reflectance0 + (reflectance90 - reflectance0) * pow5(1.0 - VdotH);
}

float fresnelSchlickGGX(float VdotH, float reflectance0, float reflectance90)
{
    return reflectance0 + (reflectance90 - reflectance0) * pow5(1.0 - VdotH);
}

This is what Three.js do (From bsdfs.glsl.js)
vec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {
	// Original approximation by Christophe Schlick '94
	// float fresnel = pow( 1.0 - dotLH, 5.0 );
	// Optimized variant (presented by Epic at SIGGRAPH '13)
	// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf
	float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );
	return ( 1.0 - specularColor ) * fresnel + specularColor;
} // validated

This is what PlayCanvas do (From fresnelSchlick.frag)
void getFresnel() {
    float fresnel = 1.0 - max(dot(dNormalW, dViewDirW), 0.0);
    float fresnel2 = fresnel * fresnel;
    fresnel *= fresnel2 * fresnel2;
    fresnel *= dGlossiness * dGlossiness;
    dSpecularity = dSpecularity + (1.0 - dSpecularity) * fresnel;

    #ifdef CLEARCOAT
    // ...
    #endif
}

All of them use the half vector when calculating fresnel except playcanvas.
The three.js implementation is a little different, and it is migrated from 2013SiggraphPresentationsNotes.
I have the following confusion:

Why playcanvas use V dot N instead of V dot H ?
What does dGlossiness * dGlossiness do here ? Is it used to replace f90 - f0 ?

@scarletsky - great timing, @raytranuk is just investigating the lighting problems with this specifically ;)

@scarletsky - you observations were correct - the fresnel implementation in PlayCanvas was not using the half-angle and this did result in non-standard specular lighting results that differed significantly from other implementations. A related PR has now been submitted: https://github.com/playcanvas/engine/pull/3172 - which switches the fresnel calculations to use the half-angle and should bring PlayCanvas more in line with other implementations. The use dGlossiness in the fresnel calculation is also non-standard in Cook-Torrance PBR models - but is used a bit like a Geometry term in the Blinn-Phong model that is the default for punctual lights in PlayCanvas.

related to https://github.com/playcanvas/engine/issues/3013

Hey @mvaligursky and @GSterbrant - I'm scanning some older issues to see if any can be closed. What's the current status of this one?


Use consistent color scheme

Assign colors to the different processes in the order in which they
are defined in the Procfile. This means that the same process will
have the same color on every goreman run, and help associate logs to
colors in the file.
Fixes mattn/goreman#60.
This work was sponsored by Sourcegraph.

Thank you


Clarify how to use labels on PRs

PR titles create an auto-generated changelog at release time. This changelog groups all issues into one of ui, test, enhancement, or bug. If none of these labels are provided, it is classified as "uncategorized". If the label "exclude from release notes" is set, it will not be part of the changelog.
These categories are not distinct (there are both bugs, enhancements and tests in the ui). They're not exhaustive (for instance, refactorings or thing-that-build-an-API-endpoint-for-a-feature-to-use). They're not necessarily useful - there's several things that makes me go "huh?" when I look at https://github.com/weaveworks/weave-gitops/releases/tag/v0.8.1 And the exclude from release notes label is used all the time for anything that doesn't quite fit, which makes release notes incomplete.
When you don't provide one of these labels, the PR turns red but not un-mergeable. This red means "uncategorized", not that anything is wrong. This isn't how failed status checks should work.
Acceptance criteria

Figure out what we want our changelog to say. Perhaps issue titles would make a more useful changelog?
Decide how we want to categorise the changelog - do we want to add or remove some labels?
Document how to use the labels.
Make sure PRs aren't red-but-you-can-still-merge-them.


Corrscope struggles too much with Oscilloscope music

https://files.catbox.moe/hwglyk.mp4
In this example provided here, Corrscope has stability issues where it is unable to properly center itself on the fundamental note despite this being obvious in either the left or right channel.
Additionally, Corrscope could also benefit from a X/Y mode for music as this.
And please port Corrscope to C++.

no settings provided. either save a yaml file, or at least say edge triggering (rising/falling), etc.
try left-only triggering?
i will not rewrite it in c++ because you want it to happen. i will only do so when i feel the need (yes), have the motivation (no) and a mechanism in C++ to synchronize the UI widgets with a view-model data structure savable to file (unsure), and feel that compiled threaded code outweighs the ease of development and libraries im python (type-safe multidimensional ndarray, dimension-checked vectorized arithmetic, and pre-existing fft and window functions).


fix info block on uk lang

information block is displayed incorrectly
en v https://www.yiiframework.com/doc/guide/2.0/en/start-hello#creating-action
uk v https://www.yiiframework.com/doc/guide/2.0/uk/start-hello#creating-action

Info tag should not be translated.

block is displayed incorrectly

Yes, keep Info as Info and not Інформація and it will be fine.

Yes, keep Info as Info and not Інформація and it will be fine.

Ok


iSight Disabler on Mojave

Hi,
Would anybody update this script for macOS X Mojave.
Its return with error in the current build

Hi Vitaly,
I think the problem is SIP (https://support.apple.com/en-us/HT204899).
There are some tools to deactivate SIP but this is not what I recommend to do...

See https://github.com/rthomson/isight-disabler/blob/master/camera-disabler.mobileconfig as a modern alternative to the original iSight Disabler AppleScript.


undefined method `git_recurse'

I got
$ bundle exec mdl --style .mdlstyle.rb
.mdlstyle.rb:1:in `load': undefined method `git_recurse' for #<MarkdownLint::Style:0x00000002d3e648> (NoMethodError)

with
git_recurse true

using the Gem mdl (0.2.1).

The problem you are coming across is due to style files and configuration files doing two different things. Style files are intended to configure the rules used and options related to markdown styles (e.g. line length, list item style and so on). On the other hand, the user configuration file, .mdlrc, is intended to configure user facing options such as git_recurse, or disabling specific rules.
It seems that there is a fair amount of confusion around the difference between style files and configuration files, and I'll be looking at the possibility of merging the two somehow so you can use a single file both for user preferences and markdown style choices.
For more information on what goes in each file currently, see https://github.com/mivok/markdownlint/blob/master/docs/configuration.md and https://github.com/mivok/markdownlint/blob/master/docs/creating_styles.md for the .mdlrc and style file respectively.
In your case, you can add the git_recurse option to a .mdlrc file, and keep your rule options in the style file.

I've opened #120 to address the .mdlrc/style file difference mentioned above.


Fix build with OpenCV 4

This should fix build issues with OpenCV 4 (#1634 #2452 #2974).
Build with latest 3.4 OpenCV branch should be also ok.

hello i am having an issue with the opencv 4 version too.. my code and the samples work fine with opencv 3.4.. I tried to port it to opencv 4, i can compile everything fine but when i try to show the images with imshow the program crashes, i dont know if i am doing something wrong with the conversion, i took it from the samples and looks like this:
auto data = pipe.wait_for_frames();
data = align_to.process(data);
auto color_frame = data.get_color_frame();
auto depth_frame_raw = data.get_depth_frame();
Mat bgr(Size(w, h), CV_8UC3, (void*)color_frame.get_data(), Mat::AUTO_STEP);
Mat depth_raw(Size(w, h), CV_16UC1, (void*)depth_frame_raw.get_data(), Mat::AUTO_STEP);
The problem arises when i try to show the depth_raw mat, the bgr mat shows without problems.. Anyone experienced something like this? or knows what could be happening here?
thanks and regards


Functionality for prompts based on decision tree / flow charts.

I am not sure if this is most appropriately an issue, a discussion, or something that belongs on the discord channel, but on the Contributing guidelines it says to open an issue for feature requests so I will start here.
I want to request functionality for decision tree prompts. I know I am not the first one to request this, but so far I havent been able to find any functionality in LangChain that supports this sort of thing. So I made a mini example to show that it wouldnt be tremendously difficult.
I created a simple example about how this could be done using 2 additional classes: PromptTree and PromptBranch. Basically it works by giving the LLM a tool which allows it to switch branches in the conversation. The user must then only supply which branches the AI has access to and a short description of that branch. I also give it an option to record specific "insights", which could in principle function as the keys for future prompts down the prompttree.
Here is my example:

# Import libraries
import ast
from pydantic.v1 import BaseModel, Field
from langchain.tools import Tool
from langchain.schema import HumanMessage, AIMessage, SystemMessage, FunctionMessage
from langchain.tools import format_tool_to_openai_function
from langchain.chat_models import ChatOpenAI

### Define PromptBranch ###

# Declare function name variable
SELECT_BRANCH = 'select_branch'
UPDATE_INSIGHT = 'update_insight'

# Create PromptTreeBranch class
class PromptBranch:
    """A branch in the PromptTree."""

    # Declare PromptBranch variables
    description = None  # Default description of the branch
    header = None       # Header prompt
    footer = None       # Footer prompt
    children = {}       # Dictionary of children branches with descriptions. Format={name: description (None for default)}
    initial_state = {}  # Initial state of the branch
    pass_info = {}      # Additional info to be passed to children
    insights = {}       # Dictionary of insights that the AI can update. Format={name: description}

    # Get branch ID
    @property
    def branch_id(self):
        """Get the branch ID."""
        return type(self).__name__

    def __init__(self, parent, **kwargs):
        """Initialize the PromptBranch."""
        self.parent = parent
        self.initialize_state(**kwargs)
        return

    def initialize_state(self, **kwargs):
        """Initialize the branch state."""
        # We allow kwargs to be passed in case the branch needs to be initialized with additional info
        self.state = {
            **self.initial_state,
            'insights': {x: None for x in self.insights.keys()}  # Initialize insights to None
        }
        return

    def __call__(self, messages):
        """Call the PromptBranch."""
        return (
            self.get_prompt(messages),
            self.get_tools(),
        )

    def get_pass_info(self):
        """Pass info to children."""
        return self.pass_info

    def get_prompt(self, messages):
        """Get the prompt."""

        # Initialze prompt
        prompt = []

        # Add preamble
        preamble = self.parent.preamble
        if preamble is not None:
            prompt.append(SystemMessage(content=preamble))

        # Add header
        header = self.get_header()
        if header is not None:
            prompt.append(SystemMessage(content=header))

        # Add messages
        prompt += messages

        # Add footer
        footer = self.get_footer()
        if footer is not None:
            prompt.append(SystemMessage(content=footer))

        # Add insights
        insights = self.get_insights()
        if insights is not None:
            prompt.append(SystemMessage(content=insights))

        # Return
        return prompt

    def get_header(self):
        """Get header."""
        return self.header

    def get_footer(self):
        """Get footer."""
        return self.footer

    def get_insights(self):
        """Get insights."""
        if len(self.insights) == 0:
            return None
        else:
            insights = f"Your insights so far are:"
            for name, state in self.state['insights'].items():
                insights += f"\n{name}: {state}"
            return insights

    def get_tools(self):
        """Get tools."""

        # Initialize tools
        tools = []

        # Add switch branch tool
        if len(self.children) > 0:
            tools.append(self._tool_switch_branch())

        # Add update insights tool
        if len(self.insights) > 0:
            tools.append(self._tool_update_insight())

        # Return
        return tools

    def _tool_switch_branch(self):
        """Create tool to select next branch."""

        # Get variables
        tool_name = SELECT_BRANCH
        children = self.children

        # Create tool function
        tool_func = self.switch_branch

        # Create tool description
        tool_description = "Select the next branch to continue the conversation. Your options are:"
        for branch_id, branch_description in children.items():
            if branch_description is None:
                branch_description = self.parent.all_branches[branch_id].description
            tool_description += f"\n{branch_id}: {branch_description}"

        # Create tool schema
        class ToolSchema(BaseModel):
            branch: str = Field(
                description="Select next branch.",
                enum=list(children.keys()),
            )

        # Create tool
        tool_obj = Tool(
            name=tool_name,
            func=tool_func,
            description=tool_description,
            args_schema=ToolSchema,
        )

        # Return
        return tool_obj

    def _tool_update_insight(self):
        """Create tool to update an insight."""

        # Get variables
        tool_name = UPDATE_INSIGHT
        insights = self.insights

        # Create tool function
        tool_func = self.update_insight

        # Create tool description
        tool_description = "Update an insight. You can choose to update any of the following insights:"
        for name, state in insights.items():
            tool_description += f"\n{name}: {state}"

        # Create tool schema
        class ToolSchema(BaseModel):
            insight: str = Field(
                description="Select insight to update.",
                enum=list(insights.keys()),
            )
            value: str = Field(
                description="New value of the insight.",
            )

        # Create tool
        tool_obj = Tool(
            name=tool_name,
            func=tool_func,
            description=tool_description,
            args_schema=ToolSchema,
        )

        # Return
        return tool_obj

    def switch_branch(self, branch):
        """Switch to a new branch."""

        # Switch parent tree branch
        self.parent.branch = self.parent.all_branches[branch](parent=self.parent, **self.get_pass_info())

        # Return function message
        message = FunctionMessage(
            name=SELECT_BRANCH,
            content=f"You have switched to the {branch} branch.",
            additional_kwargs={'internal_function': True},
        )
        return message

    def update_insight(self, insight, value):
        """Update an insight."""

        # Update insight
        self.state['insights'][insight] = value

        # Return function message
        message = FunctionMessage(
            name=UPDATE_INSIGHT,
            content=f"You have updated the {insight} insight to {value}.",
            additional_kwargs={'internal_function': True},
        )
        return message

### Define PromptTree ###

# Create PromptTree class
class PromptTree:
    """A decision tree for prompting the AI."""

    # Declare PromptTree variables
    preamble = None      # System prompt to put before each branch prompt
    first_branch = None  # Name of first branch to start the prompt tree
    all_branches = {}    # Dictionary of all branches in the tree. Format={branch_id: branch_class}

    def __init__(self):
        """Initialize the PromptTree branch state."""
        self.branch = self.all_branches[self.first_branch](parent=self)
        return

    def __call__(self, messages, **kwargs):
        """Call the PromptTree."""
        return self.branch(messages, **kwargs)

    def get_state(self):
        """Get the current branch state."""
        return {
            'branch_id': self.branch.branch_id,
            'branch_state': self.branch.state,
        }

    def load_state(self, state):
        """Load a branch from the state."""
        branch_id = state['branch_id']
        branch_state = state['branch_state']
        if branch_id not in self.all_branches:
            raise ValueError(f"Unknown branch_id: {branch_id}")
        self.branch = self.all_branches[branch_id](parent=self)
        self.branch.state = branch_state
        return

### Define TreeAgent ###

# Create TreeAgent class
class TreeAgent:
    """An AI agent based on the PromptTree class."""

    def __init__(self, tree, model):
        """Initialize the TreeAgent."""
        self.tree = tree
        self.model = model
        return

    def __call__(self, messages, **kwargs):
        """Call the TreeAgent."""
        return self.respond(messages, **kwargs)

    def get_state(self):
        """Get the current state of the TreeAgent."""
        return self.tree.get_state()

    def load_state(self, state):
        """Load the state of the TreeAgent."""
        self.tree.load_state(state)
        return

    def respond(self, messages):
        """Respond to the messages."""

        # Initialize new messages
        new_messages = []

        # Loop until no function calls
        while True:

            # Get the prompt
            prompt, tools = self.tree(messages+new_messages)

            # Get the response
            funcs = [format_tool_to_openai_function(t) for t in tools]
            response = self.model.predict_messages(prompt, functions=funcs)
            new_messages.append(response)

            # Check for function calls
            if 'function_call' in new_messages[-1].additional_kwargs:
                # Get function call
                func_call = new_messages[-1].additional_kwargs['function_call']
                func_name = func_call['name']
                func_args = ast.literal_eval(func_call['arguments'])
                func = [x.func for x in tools if x.name == func_name][0]

                # Call the function
                func_response = func(**func_args)
                new_messages.append(func_response)
                continue
            else:
                # If no function call, break
                break

        # Return
        return new_messages

####################################################################################################
####################################################################################################

### EXAMPLE ###

# Create PromptBranches
class BranchA(PromptBranch):
    header = "You love icecream, but you only like vanilla icecream."
    footer = "If you choose to respond make sure you mention icecream."
    description = "A Branch to talk about icecream."
    children = {
        'BranchB': 'If someone mentions anything fancy, be sure to switch to this branch.',
        'BranchC': None,
    }
class BranchB(PromptBranch):
    header = "You love fine wines, but only if they are over 10 years old."
    footer = "If you choose to respond make sure you mention wine."
    description = "A Branch to talk about wine."
    children = {
        'BranchA': None,
        'BranchC': None,
    }
class BranchC(PromptBranch):
    header = "You love going to the beach all the time no matter what."
    footer = "If you choose to respond make sure you mention that you love the beach."
    description = "A Branch to talk about the beach."
    children = {
        'BranchA': None,
        'BranchB': None,
    }

# Create PromptTree
class MyPromptTree(PromptTree):
    preamble = "You are an AI who is obsessed with a few things."
    first_branch = 'BranchA'
    all_branches = {
        'BranchA': BranchA,
        'BranchB': BranchB,
        'BranchC': BranchC,
    }

### CONVERSATION ###

# Initialize the AI
llm = ChatOpenAI(model="gpt-3.5-turbo-0613")
tree = MyPromptTree()
agent = TreeAgent(tree, llm)

# Create sample conversation
messages = []
while True:

    # Human input
    user_message = input("You: ")
    messages += [HumanMessage(content=user_message)]

    # AI response
    new_messages = agent(messages)
    for m in new_messages:
        print("AI:", m)
    messages += new_messages

I know its a lot of code to unpack, so maybe the best way to see how it works would just be to try it. The AI starts talking about icecream, but if you change the topic to the beach or "something fancy" you will see how the AI is able to switch to a new conversation branch where they could, in principle, have access to different information in their prompts. I know this is a silly example, but I hope you take it more as a proof-of-principle.
I would love to see something like this implemented in the core of LangChain. I have no experience contributing to open source projects so Im not sure where to start with this.
Please let me know what you think!

@dosu-bot
How can I talk to a human admin or contributor to discus where in the library this would be most appropriate?

@khanguslee I would really like to contribute to incorporate this as a feature. Do you who I should talk to about this?


[joss-review] Install magma with conda?

I noticed there is a conda package for magma:
https://anaconda.org/anaconda/magma
would this work with BayesEoR? If so it could simplify installation a lot.

Thanks for the recommendation.  I came across this package a little while ago but I can't recall if I've tried it.  I'll try and take a look at this soon.  It would definitely simplify the installation.

Turns out MAGMA can be installed with conda directly (I'm sourcing from conda-forge in the latest main).  This has become the new suggested default as of #27.  This should make installation much simpler, thanks again for the suggestion @zonca.


fixed search bar mobile [ issue 973 ]

Related Issue
Issue No. - #973

Description
The search bar width on mobile was not good.

Screenshots

close this PR & make sure to update your branch then create PR

But please this time mege it immediately

close this PR & make sure to update your branch then create PR

But please this time merge it immediately

how can I merge this PR? there are some errors.

close this PR & make sure to update your branch then create PR

But please this time merge it immediately

how can I merge this PR? there are some errors.
I was saying that when I make another pull request then

so we added new features & removed the suggestion & search bar also got fixed. I think we don't need to change it right now.


doxygen style comments in a code block don't render

Given the following markdown:
* Multi-line comments, such as for a [documentation block](#documentation-blocks), should use the following format:

  ```cpp
  /**
   * @brief A brief description of the member.
   * More detailed description of the member.
   */
  \`\`\`  <!-- can't get this to render in GitHub, but you get the idea -->

Results in the following:

Currently our docs use sphinx + doxygen, but I am trying to migrate to use doxygen exclusively, via https://github.com/LizardByte/Sunshine/pull/2932
✅ Sphinx version: https://docs.lizardbyte.dev/projects/sunshine/en/master/source_code/source_code.html
❌ Doxygen version: https://lizardbyte--2932.org.readthedocs.build/projects/sunshine/en/2932/md_docs_2source_2source__code_2source__code.html
✅ GitHub markdown version: https://github.com/LizardByte/Sunshine/blob/docs-drop-sphinx-and-use-doxygen-exclusively/docs/source/source_code/source_code.md

I found that I can use @verbatim instead of a code block, although then it doesn't do syntax highlighting.
https://github.com/doxygen/doxygen/blob/14fc65f92184f8d788d5fb2723fb28e773dc4a5a/doc/markdown.dox#L734-L747
Is there anyway to get both?

Code blocks should definitely work as you described!
It seems like the link in your post doesn't work anymore. Can you provide an updated link to the Doxygen version with broken code block rendering?
What Doxygen version are you using?

Here is an example of how it renders using @verbatim: https://docs.lizardbyte.dev/projects/doxyconfig/latest/md_docs_2source__code.html
Here's the markdown source for that: https://github.com/LizardByte/doxyconfig/blob/master/docs/source_code.md
Without verbatim it renders as shown in the screenshot above.
Using commit: https://github.com/jothepro/doxygen-awesome-css/tree/40e9b25b6174dd3b472d8868f63323a870dfeeb8 (latest release)

I cannot reproduce the issue, when using the Doxygen setup in this repository, the code blocks render just fine. You can also see them working here (code).
I am assuming that there must be something wrong with your setup. Did you apply some custom CSS that may interfere with the code rendering? Is the code present in the DOM and just invisible, or is it not rendered into the HTML by Doxygen at all?

Can you try a code block like the following?
@code{cpp}
/**
 * @brief A brief description of the member.
 * More detailed description of the member.
 */
@endcode

It's probably a doxygen issue where it can't render properly because it has nested doxygen style comments. Other code blocks are fine, as long as they don't have the doxygen syntax in them.

ohh, now I see the problem! I can indeed reproduce the problem when the code contains a Doxygen comment!
I agree that this must be a Doxygen issue, as the text of the comment is not contained in the HTML...


add: Night Of The Dead

Description
closes #36
Checklist for all submissions

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[x] Have you tested and reviewed your changes with confidence that everything works?
[x] Did you branch your changes and PR from that branch and not from your master branch?

If not, why?:

New egg Submissions

[ ] Does your submission pass tests (server is connectable)?
[ ] Does your egg use a custom docker image?

[ ] Have you tried to use a generic image?
[ ] Did you PR the necessary changes to make it work?

[ ] Have you added the egg to the main README.md and any other README files in subdirectories of the egg (e.g /game_eggs) according to the alphabetical order?
[ ] Have you added a unique README.md for the egg you are adding according to the alphabetical order?
[x] You verify that the start command applied does not use a shell script

[ ] If some script is needed then it is part of a current yolk or a PR to add one

[x] The egg was exported from the panel

I tested the new egg, did it twice to make sure.  I get a 404 error where it tries to curl the gamesettings.ini and this is the resulting file below. I've deleted the obvious settings but other than that I left it as it was.

I tested the new egg, did it twice to make sure. I get a 404 error where it tries to curl the serversettings.ini and this is the resulting file below. I've deleted the obvious settings but other than that I left it as it was.

yes, because its not in the repo yet

I tested the new egg, did it twice to make sure. I get a 404 error where it tries to curl the serversettings.ini and this is the resulting file below. I've deleted the obvious settings but other than that I left it as it was.

Yes that is because the file will only exits after the egg has been merged, thats normal

There is also this that happens with repeated paths i'm not sure how to fix this.

@scootz I made the request changes and I also made the console output work, please re-test with a new server (not updating an existing one) the savegame path should be fixt

Works good.  There is still the issue with the saved game path.

Works good. There is still the issue with the saved game path. The panel still thinks its crashing when stopping the server.

that thinking that is crashed is something I also have (on pelican no idea if you are on that or ptero).
the savegames I did not have one as I do not own the game so I could not join ofc.

The game works, its just confusing when anyone would want to restore a saved game.  Might I suggest changing in the configuration files section the ServerSettings.SaveName to omit the /home/container/LF/Saved/SaveGames/  and just have the variable {{server.environment.SERVER_SAVEGAME}}
This is running on pelican.

The game works, its just confusing when anyone would want to restore a saved game. Might I suggest changing in the configuration files section the ServerSettings.SaveName to omit the /home/container/LF/Saved/SaveGames/ and just have the variable {{server.environment.SERVER_SAVEGAME}}
This is running on pelican.

you can try that if you want, It sees like you know where to find it.

Ok yea just having the variable works.  So the only thing left I think is pelican thinking its crashed when stopping the server.

Ok yea just having the variable works. So the only thing left I think is pelican thinking its crashed when stopping the server.

that's an issue at panel level not egg as I read that more than 1 egg have this.

Ok yea just having the variable works. So the only thing left I think is pelican thinking its crashed when stopping the server.

Change made, should be good to go now!

a long discussion for a really simple egg :D I have an egg since release. Its really easy to create

the savegame fix was not needed. Users are able to rename it before uploading it. An egg is only for 1 server and not for a lot of savegames ;)

able to rename it before u

it had a double path in it because savegame name was set to a path not a filename and auto prefixt by the parser.
It is fine this way now.

Hello All, I have tried this egg. Need it something special ?? I have this error :
[2024.06.16-15.56.10:655][604]LogStreaming: Error: Found 1 dependent packages...
[2024.06.16-15.56.10:666][604]LogStreaming: Error:   /Game/maps/LFMap/LFMap_Land_140
And noway to start it.
Everything is up to date and it's not my first install ^^

Hello All, I have tried this egg. Need it something special ?? I have this error : [2024.06.16-15.56.10:655][604]LogStreaming: Error: Found 1 dependent packages... [2024.06.16-15.56.10:666][604]LogStreaming: Error: /Game/maps/LFMap/LFMap_Land_140 And noway to start it. Everything is up to date... Let me know if I can do something for help

this error is normally on a "notice"

It's the last line in logs before crash.
LF.log

problem with your home network
LogStreaming: Warning: Failed to read file 'Z:/home/container/Cloud/IoStoreOnDemand.ini' error.

Ook, that don't help me --'
I will try to know why it don't work with me.
I have another server on same node and it work well...

Ook, that don't help me --' I will try to know why it don't work with me. I have another server on same node and it work well...

could be a failed installation

Ook i have try on another node and it work well
Thank's for help =))


GS for file upload

Garbage collection after file upload

pls use the develop branch as base for new features so the PR gets merged there first

@tarassh given that we're removing the segments from the segments directory in bsp-agent, I think we should keep the ipfs maintained segments for a little longer, rather than just removing it after upload is done. The way to do this would be:
in ipfs-pinner:

add GC related config to .ipfs/config file (https://blog.logrocket.com/guide-ipfs-garbage-collection/)
check if the GC is indeed happening and the space is getting maintained via GC.

in bsp-agent:

since ipfs-pinner is maintaining the segments for some time/storage space, we can cleanup the segments directory (or remove it entirely).

@tarassh document the config parameters needed in the README.

@sudeepdino008

what happens when gc config parameters are not there? GC doesn't happen? If it doesn't, then it might be useful to have a warning message, something like: "gc is enabled; but parameters not available in config; GC won't run"

Default values will be used even if config file does not exists.


Comment removal for individual classifier tests

Removes commented out methods from all my tests and removes replace_X_y.
Reintroduces contracting tests but with no comparison to previous results/accuracy.
Moves all code relating to result generation for individual classifier result reproduction tests to contrib/_classification_test_reproduction.py.
Part of #1765.

Since this touches the tests module and I´m asked to review, would you kindly mind being a bit more explicit about the changes? E.g., what does "Centralises results generation" mean, practically?

It doesn't touch the tests module, just individual classifier tests and contrib. You set yourself as code owner for the whole repo, so you probably will get requested to review everything along with Martin and Tony.
I have moved all the previously commented code to re-generate the results used for comparison in these tests into a single file in contrib for now.

You set yourself as code owner for the whole repo, so you probably will get requested to review everything along with Martin and Tony.

Yes, all CC members are owners for the entire repo.
This touches 34 files, so some details would be appreciated.

@fkiraly you requested this change, it simply moves commented out code into contrib

ah, I see - makes sense.


⚠ SolarQuery has degraded performance

In f024b06, SolarQuery ($SOLARQUERY_URL) experienced degraded performance:

HTTP code: 200
Response time: 5957 ms

Resolved: SolarQuery performance has improved in 1b9bb86.


Match stereo information in the reactants for reaction.RunReactants

Discussed in https://github.com/rdkit/rdkit/discussions/4096

Originally posted by shuan4638 April 30, 2021
I tried to run the reaction to transform only cis double also to preserve the stereo chemistry.
from rdkit import Chem
from rdkit.Chem import rdChemReactions
reactant1 = Chem.MolFromSmiles('CCOC(=O)/C=C\I')
reactant2 = Chem.MolFromSmiles('O=Cc1ccc2nc(-c3cccs3)oc2c1')
template = 'I\[C;H1;+0:1]=[C;H1:4]/[*:5].[C;H1;+0:2]=[O;H0;+0:3]>>[*:5]/[C:4]=[C;H1;+0:1]\[C;H1;+0:2]-[O;H1;+0:3]'
reaction = rdChemReactions.ReactionFromSmarts(template)
reactants = reaction.RunReactants([reactant1, reactant2])
print (Chem.MolToSmiles(reactants[0][0]))

This is want I want
For example
if the reactant is
reactant1 = Chem.MolFromSmiles('CCOC(=O)/C=C/I')
the reaction does not pass
if the reactant is
reactant1 = Chem.MolFromSmiles('CCOC(=O)/C=C\I')
the output is
CCOC(=O)\C=C/C(O)c1ccc2nc(oc2c1)-c1cccs1
if the reactant is
reactant1 = Chem.MolFromSmiles('I\C=C\C(=O)OCCCCOC(=O)\C=C/I') (two double bonds but only one cis)
the output is
OC(\C=C/C(=O)OCCCCOC(=O)\C=C\I)c1ccc2nc(oc2c1)-c1cccs1 (not two products here)
However, what I get is that both cis/trans bonds in the reactant will be converted to cis bond.

@cottonkiet
But what problem is here. You want the reaction to occour only on cis double bond and it is exactly what you get.

@cottonkiet
AFAIK (if I am wrong please anybody correct me) it is the design. It is the way it works. Stereo reaction definitions (regardles if it is chirality of ZE isomerism) defines what to do in the reaction, not necesary if there should be a match in the reaction.  In general, as much as I am aware, there is no chiral match in the reaction, therefore in reality any configuration will match. In this case rdkit logic is:

there is double bond match, ZE configuration does not match query, so invert it in the products
there is double bond match, ZE configuration matches query, leave configuration unchanged.
As fair as I am aware the same logic applies to chirality. To check whether the reaction should  or shoudn't work is unfortunatelly your responsibility. In general you need to check which atoms were used for the reaction, get  reactant template and check with useChirality=True, whether it matches the same atoms. If it does, it means the reaction is what you want, if not, then it means you need to reject the reaction. One of the possible solution of your problem might be rdchiral (https://github.com/connorcoley/rdchiral) but I've never used it.

Thanks a lot! the rdchiral is a good resource!


Remove config map validation from run scan

Proposed changes
Because the scan will ignore an invalid config map I'm removing
the validation from run scan so the UI can run the scan without issue.
Types of changes

Bugfix (non-breaking change which fixes an issue)

Linked Issues
rancher/rancher#24496

It's still being used by the skip/unskip functionality.
https://github.com/rancher/ui/blob/b2c179b3a9b375f11aa949a4f9a1e518973bcfc8/app/authenticated/cluster/cis/scan/detail/controller.js#L134

It's still being used by the skip/unskip functionality.
https://github.com/rancher/ui/blob/b2c179b3a9b375f11aa949a4f9a1e518973bcfc8/app/authenticated/cluster/cis/scan/detail/controller.js#L134

Sounds good. Searched for it locally and thought I saw only two occurrences, I must have missed the third.


Cannot Deploy to Linode Server

What I'm trying to achieve
…
I tried everything in this blog - https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04 and imported saleor into the project and did all the configuration required for saleor to work well
Steps to reproduce the problem

python manage.py runserver ip:port     -->works fine
running on nginx I get this error from the logs when i run
sudo tail -F /var/log/nginx/error.log

2019/08/06 00:12:07 [error] 20666#20666: *3086 no live upstreams while connecting to upstream, client: <IP_ADDRESS>, server: www.buildawn.com, request: "GET / HTTP/1.0", upstream: "http://backend/", host: "buildawn.com"
My etc/nginx/sites-available/saleor
upstream backend {
server www.buildawn.com       weight=5;
}
server {
listen 80;
server_name www.buildawn.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
    root /home/nilesh/saleor/saleor;
}

location / {
    include proxy_params;
    proxy_pass http://backend;
}

}
What I expected to happen
… Nginx should be running on my IP but gives a 502 bad gateway with upstream error
Any help will be greatly appreciated as I've been struggling for days and in search of someone who can help me and guide me where I went wrong.
Thank you in advance.

What is the backend? ./manage.py runserver?
You need to use uWSGI or gunicorn (I think we support it).
Also, is nginx on the same instance as the server? If so, it would be better to create a unix-socket file.
Your link describes how to do all that, did you follow everything?

Yes I followed everything to the teeth and I created all the files that were required, I'm using wsgi and gunicorn as described in the tutorial and yes it is on same instance.
The backend is an upstream that people advised me to replace with proxy_pass
Earlier it was this -
proxy_pass http://unix:/run/gunicorn.sock;


is the default can be used for prediction

When i ran rnn_predict.py script always predicted sequence, when convert back to protein. the predicted protein does not corresponds to original protein sequence.
or should i just train it again to get a new model

Yes, the default model should work for predicting hamster DNA sequence -- you shouldn't need to retrain the model. When tested, the output DNA sequence always back-translated to the correct protein sequence.

Can you share the protein sequence you're trying to optimize, or some properties such as length and whether it has any non-natural amino acids?
How wrong is the output? Are a few amino acids wrong, or is the sequence mostly wrong?

Sorry, i ran the rnn_train.py with less number of sequences that is the reason the amino acids outputted were wrong now that i ran without any training the output is correct.
Thank You for the clarification


Please use "sort -k1,1 -k2,2n" with LC_COLLATE=C,  or bedSort and try again.

Hello
I met a problem when i run the pipelines as follows:
bds /home/ye/atac_dnase_pipelines/atac.bds -species hg19 -nth 10 -fastq1_1 ENCLB112FTD_R1.fastq.gz -fastq1_2 ENCLB112FTD_R2.fastq.gz -auto_detect_adapter
The error was like this:
/ngs/data/ATACseq/human/out/peak/macs2/rep1/ENCLB112FTD_R1.trim.PE2SE.nodup.tn5.pf.fc.signal.srt.bedgraph is not case-sensitive sorted at line 2.  Please use "sort -k1,1 -k2,2n" with LC_COLLATE=C,  or bedSort and try again.
Task failed:
Program & line     : '/home/ye/atac_dnase_pipelines/modules/callpeak_macs2_atac.bds', line 74
Task Name          : 'macs2 n/s rep1'
Task ID            : 'atac.bds.20180302_125823_487/task.callpeak_macs2_atac.macs2_n_s_rep1.line_74.id_32'
Task PID           : '14181'
Task hint          : 'if [[ -f $(which conda) && $(conda env list | grep bds_atac | wc -l) != "0" ]]; then source activate bds_atac; sleep 5; fi;  export PATH=/home/ye/atac'
Task resources     : 'cpus: -1  mem: -1.0 B     wall-timeout: 8640000'
State              : 'ERROR'
Dependency state   : 'ERROR'
Retries available  : '1'
Input files        : '[/ngs/data/ATACseq/human/out/align/rep1/ENCLB112FTD_R1.trim.PE2SE.nodup.tn5.tagAlign.gz]'
Output files       : '[/ngs/data/ATACseq/human/out/peak/macs2/rep1/ENCLB112FTD_R1.trim.PE2SE.nodup.tn5.pf.pval0.01.300K.narrowPeak.gz, /ngs/data/ATACseq/human/out/signal/macs2/rep1/ENCLB112FTD_R1.trim.PE2SE.nodup.tn5.pf.fc.signal.bigwig, /ngs/data/ATACseq/human/out/signal/macs2/rep1/ENCLB112FTD_R1.trim.PE2SE.nodup.tn5.pf.pval.signal.bigwig]'
Script file        : '/ngs/data/ATACseq/human/atac.bds.20180302_125823_487/task.callpeak_macs2_atac.macs2_n_s_rep1.line_74.id_32.sh'
Exit status        : '1'
StdErr (10 lines)  :
INFO  @ Fri, 02 Mar 2018 15:04:18: #4 Write peak in narrowPeak format file... /ngs/data/ATACseq/human/out/peak/macs2/rep1/ENCLB112FTD_R1.trim.PE2SE.nodup.tn5.pf_peaks.narrowPeak
INFO  @ Fri, 02 Mar 2018 15:04:21: #4 Write summits bed file... /ngs/data/ATACseq/human/out/peak/macs2/rep1/ENCLB112FTD_R1.trim.PE2SE.nodup.tn5.pf_summits.bed
INFO  @ Fri, 02 Mar 2018 15:04:23: Done!
INFO  @ Fri, 02 Mar 2018 15:04:31: Read and build treatment bedGraph...
INFO  @ Fri, 02 Mar 2018 15:05:06: Read and build control bedGraph...
INFO  @ Fri, 02 Mar 2018 15:05:23: Build scoreTrackII...
INFO  @ Fri, 02 Mar 2018 15:05:38: Calculate scores comparing treatment and control by 'FE'...
INFO  @ Fri, 02 Mar 2018 15:08:24: Write bedGraph of scores...
INFO  @ Fri, 02 Mar 2018 15:10:03: Finished 'FE'! Please check '/ngs/data/ATACseq/human/out/peak/macs2/rep1/ENCLB112FTD_R1.trim.PE2SE.nodup.tn5.pf_FE.bdg'!
/ngs/data/ATACseq/human/out/peak/macs2/rep1/ENCLB112FTD_R1.trim.PE2SE.nodup.tn5.pf.fc.signal.srt.bedgraph is not case-sensitive sorted at line 2.  Please use "sort -k1,1 -k2,2n" with LC_COLLATE=C,  or bedSort and try again.
Fatal error: /home/ye/atac_dnase_pipelines/atac.bds, line 1200, pos 2. Task/s failed.
atac.bds, line 82 :     main()
atac.bds, line 85 :     void main() { // atac pipeline starts here
atac.bds, line 97 :             call_peaks()
atac.bds, line 1018 :   void call_peaks() { // for pooling two replicates and calling peaks on them
atac.bds, line 1200 :           wait
What should i do to solve this error? Can you give me some suggestions?
Thanks a lot!

Hello @leepc12, have you had a chance to look at this yet?

It's weird. Pipeline already uses sort -k1,1 -k2,2n with export LC_COLLATE=C.
I changed the sorting command line a bit to directly specify LC_COLLATE.
Please update the pipeline and try again.

Sorry for the delay. We will reinstall and let you know!

closing this due to long inactivity


Compare using FLT_EPSILON

Floating point math loses precision and so comparing two floats that are likely to only differ in the mantissa, and even then by extremely small amounts, is tricky. Exact equality often fails in these cases and asserting on exact equality is probably not necessary.

wait, nope, this isn't 100% correct because it is only checking case of numbers extremely close to each other.

🎉

what is travis' problem?

Danger, it seems?

@rnystrom @jessesquires any ideas on the danger issue?

I think its just because there is no Changelog entry :)

okay.


Whisper without translation

Hello,
I have been trying to use the whisper triton server to transcribe english and japanese, but by settings multiple languages in the text prefix <|en|><|ja|> it will always translate into the second language
I am seeing some other people reporting the same issue on different repo related to large v3, with some different tips and tricks to make it "work"
Is this a limitation of large-v3 ?   Did anyone get a good result using this triton server on multi languages speech ?

@Plemeur  Hi, you need to detect language first. Then set text prefix to your detected language. You can't do it by setting prompt only.

I was hoping to piggyback off this thread in case @Plemeur you were able to find a workaround for your stated use-case.
I am also having issues using Whisper Triton Server in multilingual contexts. Specifically my use case is transcribing English speech to English text, but occasionally Arabic speech is anticipated and we would want this to be translated to English and then transcribed to English text.
Having played around with the text prompt, I was able to get it to work for either one of the two use cases, but not both. As I do not know in advance which scenario is expected, the text prompt cannot be preset.
Strangely using HuggingFace Whisper, I found that setting it to transcribe to English was sufficient for it to translate + transcribe speech of any language to English. In contrast with Whisper Triton it returns output such as '[Arabic]' or '[Speaking foreign language]'.
@yuekaizhang could you please expand on your comment on 'detect language first'. Is there a way to have this detected on the fly?

@hjaved202
The Whisper Trt-llm solution only provides support for the forward pass of the Whisper model's encoder and decoder, as well as beam search. During decoding, users need to set the prompt themselves; it is not an end-to-end solution. Therefore, when I encounter different results between it and Hugging Face's Whisper, I generally expect that the prompts input into the models are different. Since Hugging Face has implemented multiple layers of wrapping in their code, it is necessary to print from the source code to identify the prompt they are using.
In general, for a sentence that mixes English and Arabic, if you want the output to be entirely in English, you can try using <|startoftranscript|><|en|><|transcribe|><|notimestamps|> or <|startoftranscript|><|en|><|translate|><|notimestamps|>. If you want the output to include both languages, you can try <|startoftranscript|><|en|><|ar|><|transcribe|><|notimestamps|>.
The detect_language feature refers to first using the Whisper model to compute and obtain the language code and then incorporating it into the prompt for a second computation. For more details, you can check the official Whisper repository.


unable to run rake

rake -A
rake aborted!
LoadError: cannot load such file -- rubocop/rake_task
/Users/jonhd/dev/os/yasb/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

@ssbarnea ,
Please accept my apologies for this late response.
I cloned this to a virtual Centos 7 host and ran rake -A. I didn't get the same error.
What os are you on?

No activity.


Clean up docker prior to steps that might expect a clean docker works…

We may sometimes run into dirty docker workspaces, clean up completely first just in case.
This PR has:

[x] been self-reviewed.
[x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.

Tried a version of this in another PR.  So, I think the approach to doing the prune is a bit too aggressive.

Tried a version of this in another PR.  So, I think the approach to doing the prune is a bit too aggressive.

It is, however it's also quick and effective.  Most of what it's cleaning up are pre-cached containers on the runners that we don't even use.  So to take the time to engineer a solution to only prune stuff we care about belongs in the it.sh script, i agree.  I'd say we use this heavy handed approach for now, as it's quick and effective for as long as the standard ITs need em.


Deserialization from_value + (Try)From works weird

I write a deserialization using the from or try_from attribute because it saves a lot of code lines compared to manual implementation. Often deserialization comes from strings. Therefore, I implement the (Try)From<&str> trait for my type, since it is more general and doesn't require any allocation. Here is an simplified example:
#[derive(Debug, Deserialize)]
#[serde(try_from = "&str")]
struct Type;

impl<'a> TryFrom<&'a str> for Type {
    type Error = &'a str;

    fn try_from(value: &'a str) -> Result<Self, Self::Error> {
        match value {
            "a" => Ok(Self),
            _ => Err(value),
        }
    }
}

But when I want to test deserialization, for example in unit tests using json! macro, it doesn't work. The serde_json::from_value function gives an error, although other methods work fine:
let _: Type = serde_json::from_str("\"a\"").unwrap(); // Works fine
let _ = Type::deserialize(&serde_json::json!("a")).unwrap(); // Works fine
let _: Type = serde_json::from_value(serde_json::json!("a")).unwrap(); // Error

Playground
This behavior is highly unobvious and confusing. It's not clear why in one case everything is fine, and in the other it's not. Although, if you write the implementation manually, it also works fine:
#[derive(Debug)]
struct Type;

impl<'a> TryFrom<&'a str> for Type { /***/ }

impl<'d> Deserialize<'d> for Type {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'d>,
    {
        struct Helper;
        impl de::Visitor<'_> for Helper {
            type Value = Type;

            fn expecting(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
                write!(f, "error")
            }

            fn visit_str<E>(self, s: &str) -> Result<Self::Value, E>
            where
                E: de::Error,
            {
                Type::try_from(s).map_err(E::custom)
            }
        }

        deserializer.deserialize_str(Helper)
    }
}

Playground
Is it possible to fix this behavior?

Deserializing into a &str requires that the str can be borrowed from somewhere. This is only possible in some cases. Usually, that works if you deserialize from a slice or a &str, but not from readers or value types. You see that this line fails to compile:
let s: &str = serde_json::from_value(serde_json::json!("foo")).unwrap();

from_value requires that the type is DeserializeOwned which &str is not. DeserializeOwned basically means that it does not borrow from the input, which &str has to.
Your Type does not borrow itself, but requires that an intermediate value to borrow. The same limitations will apply to it too. In general the derive macro cannot inspect the TryFrom implementation and can thus also not warn you about this problem.

You can use other derives which prevent you from doing this specific mistake. With DeserializeFromStr you implement  FromStr instead of TryFrom<&str>. Since you do not keep the reference this should not make a difference. You use DeserializeFromStr instead of Deserialize in the derive. DeserializeFromStr uses visit_str internally.

Deserializing from a borrowed string is also a bit of a footgun with json in general. When a string in a json file has escaped characters the deserializer implementation will use a temporary buffer to unescape the characters.  This buffer is cleared between string parsing instances and does not share the lifetime of the input string.
see : src/de.rs:1526
Try implementing TryFrom<Cow<'a, str>. This will allow you to abstract over this case.


Improve docstrings in printer.py

The docstring for GaLatexPrinter was really a description of the module in general.
This docstring has been moved to the module docstrnig, and new docstrings written for GaLatexPrinter and GaStrPrinter.
https://galgebra--420.org.readthedocs.build/en/420/generated/galgebra.printer.html#module-galgebra.printer

Cross-references and code formatting hopefully all fixed.


How to traverse?

I see you're using babylon for parsing, but it's not clear how to traverse the tree. I tried to use babel-traverse but it does not seem to call Scope with anything. For example:
import { Parser } from 'cst';
import { parse } from 'babylon';
import traverse from 'babel-traverse';

function printScopes(tree) {
  traverse(tree, {
    Scope(path) {
      console.log(path.node.type);
    }
  });
}

console.log('Scopes using babylon + babel-traverse');
printScopes(parse('function a() {}'));

console.log('');
console.log('Scopes using cst + babel-traverse');
printScopes(new Parser().parse('function a(){}'));

Prints this:
Scopes using babylon + babel-traverse
Program
FunctionDeclaration

Scopes using cst + babel-traverse

node_modules/babel-traverse/lib/scope/index.js:1079
    throw new Error("We couldn't find a Function or Program...");
          ^
Error: We couldn't find a Function or Program...

I just looked at jscs which uses estraverse to do its traversing. I like the auto-exploding that babel-traverse does for things like Scope. Is there anything similar for cst?

I like the auto-exploding that babel-traverse does for things like Scope

Not sure what you mean by that, could you elaborate?

Also, i douth it its what you want, but just in case - https://github.com/cst/cst/wiki/Traversal

@markelog thanks, that link did help. I'm investigating using cst in esnext instead of the current babylon + magic-string approach. So far I managed a very basic proof of concept for making concise object methods:
let cst = require('cst');
let Parser = cst.Parser;
let Token = cst.Token;
let types = cst.types;

let tree = new Parser().parse('({ a: function(b=0, c) {} });');
tree.selectNodesByType('ObjectProperty').forEach(property => {
  let key = property.key;
  let value = property.value;
  if (key.type === 'Identifier' && value.type === 'FunctionExpression' && !value.id) {
    let hasSpace = false;
    for (let child of property.getChildrenBetween(key, value)) {
      if (child.type === 'Whitespace') {
        hasSpace = true;
      }
    }
    let children = [];

    children.push(key.cloneElement());
    children.push(...getTokensForParams(value).map(e => e.cloneElement()));
    if (hasSpace) {
      children.push(new Token('Whitespace', ' '));
    }
    children.push(value.body.cloneElement());

    console.log(children);
    let method = new types.ObjectMethod(children);
    property.parentElement.replaceChild(method, property);
  }
});

function getTokensForParams(fn) {
  let paramStart = skipNonCode(fn.firstChild.nextSibling);

  if (paramStart.type !== 'Punctuator' || paramStart.value !== '(') {
    throw new Error(`expected '(' after 'function' but got '${paramStart.value}'`);
  }

  let paramEnd;
  if (fn.params.length > 0) {
    paramEnd = skipNonCode(fn.params[fn.params.length - 1].nextSibling);
  } else {
    paramEnd = skipNonCode(paramStart.nextSibling);
  }

  if (paramEnd.type !== 'Punctuator' || paramEnd.value !== ')') {
    throw new Error(`expected '(' after last parameter but got '${paramEnd.value}'`);
  }

  return fn.getChildrenBetween(paramStart, paramEnd);
}

function skipNonCode(token) {
  if (token.type === 'CommentLine' || token.type === 'CommentBlock' || token.type === 'Whitespace') {
    return skipNonCode(token.nextSibling);
  }
  return token;
}

console.log(tree.getSourceCode());

Finding tokens within a node is a little annoying. Are there any tools built into cst to help with this (i.e. skipNonCode and getTokensForParams)?

@eventualbuddha fyi after looking at https://github.com/mohebifar/lebab/issues/138 I started on https://github.com/babel/babel/pull/3561 (need to update it) so that babel can take in a different parser/generator

Finding tokens within a node is a little annoying. Are there any tools built into cst to help with this (i.e. skipNonCode and getTokensForParams)?

I don't think so, sorry, although this -
function skipNonCode(token) {
  if (token.type === 'CommentLine' || token.type === 'CommentBlock' || token.type === 'Whitespace') {
    return skipNonCode(token.nextSibling);
  }
  return token;
}

could be simplified like this
function skipNonCode(token) {
  if (!token.isCode) {
    return skipNonCode(token.nextSibling);
  }

  return token;
}

Also, see https://github.com/cst/cst/blob/8ae61c90d43e638021f37d661c3e24c143f23298/src/elements/Element.js#L53-L62


required does not need an empty function

js lint start to complain, the documentation allows to requires without a callback function.
Anyway; I am interested to know why this line is necessary?

This is just a left-over from some earlier iteration of the AppStoreWidgetBoilerplate. It is indeed not necessary. I am going to refactor the boilerplate next week, will merge your PR as well.


Add assertion modes

Implements assertion modes as discussed in #34

Ack, fixing and rebasing

@adamchainz I think everything has been addressed, ready for a new review.

Merged in cde3be16a33ccd46090acfb82c34a30ac9c7803a with some copy changes, thanks!