gzip from Ubuntu Eoan doesn't execute

Your Windows build number: 1903 (18362.295)

What you're doing and what's happening:
wsl@MSI-GS73:~ $ gzip
-bash: /bin/gzip: cannot execute binary file: Exec format error
126|wsl@MSI-GS73:~ $ apt list gzip
Listing... Done
gzip/eoan,now 1.10-0ubuntu3 amd64 [installed]
wsl@MSI-GS73:~ $

What's wrong / what should be happening instead:
gzip from Ubuntu Eoan gives the above unexpected error. The same binary behaves perfectly well on a native Linux box (tested on Ubuntu Bionic / Disco and Debian Stretch / Buster).

Strace of the failing command, if applicable:  No strace because the binary doesn't run at all :(

For WSL launch issues, please collect detailed logs.

See our contributing instructions for assistance.

I can reproduce your issue in latest Windows 10 Pro insider build 18970. Here are some points that I found:

Ubuntu Disco and lower: file $(which gzip) command shows ELF 64-bit LSB shared object.
Ubuntu Eoan: file $(which gzip) command shows ELF 64-bit LSB pie executable.
KD output: LX: (FFFF800368A7C2C0, FFFF800367A04080) (-bash) LxpElfInfoParse: ElfSizeAdd
Conclusion: The bug is in the ELF parsing function in LxCore driver.
Workaround: Use WSL2.

The interesting thing is they are all PIE (f.e. /bin/ls), and yet the whole Ubuntu edifice doesn't fall down. I took a quick look with readelf(1) and there isn't anything glaring, but isn't saying much.
Reasonable enough WSL1 work around would be to install your own /usr/local/bin/gzip I guess, although we can't know what other executables other than gzip might be problematic.

* Ubuntu Disco and lower: `file $(which gzip)` command shows `ELF 64-bit LSB shared object`.
* Ubuntu Eoan: `file $(which gzip)` command shows `ELF 64-bit LSB pie executable`.

The difference here isn’t related to a change in gzip, but to a change in file. Ubuntu binaries have been built with PIE for a while; but it’s only recently (coreutils 5.33) that file has identified them as PIE executables rather than shared objects.

For what it's worth, file in eoan produces this output for the two versions of gzip. It seems that some comments in the file are moved around:
$ dpkg -x ./gzip_1.9-3_amd64.deb 1.9-good
$ dpkg -x ./gzip_1.10-0ubuntu3_amd64.deb 1.10-bad
$ file */bin/gzip
1.10-bad/bin/gzip: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bc0f5994544c2a469d04c914bf4bf44b4ded6040, for GNU/Linux 3.2.0, stripped
1.9-good/bin/gzip: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=efa859c26eaf8e035efe9a139361e2a60cd17b3e, stripped

Does this need to be reported upstream to Ubuntu?

Nope. Because WSL2 works.

Nope. Because WSL2 works.

Some of us luddites still use WSL1 on our production machines. 😉
I was able to reproduce on Ubuntu Eoan with gzip 1.10.
I cannot reproduce on Debian testing (Pengwin) or unstable which are shipping gzip 1.9-3.
I built gzip 1.10 from source tar from FSF on Debian unstable and Ubuntu Eoan and there was no issue.
Maybe a change in how Ubuntu is building?

The issue is in LxCore driver (see my first comment, KD output). Hence the issue is from WSL side. PIE is a good security feature. See these two wiki:

https://wiki.ubuntu.com/Security/Features#pie
https://wiki.ubuntu.com/SecurityTeam/PIE

The issue is in LxCore driver which is part of WSL1 not WSL2, see my first comment, KD output. Hence the issue is from WSL side. PIE is a good security feature. See these two wiki:

https://wiki.ubuntu.com/Security/Features#pie
https://wiki.ubuntu.com/SecurityTeam/PIE

The problem doesn't appear to be PIC per se, as skitt points out (thanks skitt). Something is weird about the build. It would take a dive to find out what.

WSL1 on our production machines

Production machine with a unreleased Ubuntu build. Okay.
That said, finding problems like this early is a Good Thing, naturally. Just yanking your chain. #3023 is still on the books for what it is worth. Which was also caught "early".
It might be worth for someone motivated to report the problem upstream and see if the Canonical peeps have any idea what changed. Also trying bleeding edge Debian binaries (Bookworm?) might be worthwhile to see if Canonical just inherited the change.
This is a completely legit WSL1 bug, obviously; but in parallel, making gzip play nice like all of (or most of) the other Eoan binaries would also be a Good Thing.

PIE is a good security feature.

It is. On the other hand...

It would take a dive to find out what.

If ntoskrnl allows to patch kernel mode driver then it would be possible to take a dive.

I meant dive the Ubuntu gzip package. It was working in Disco. Then it wasn't on Eoan. Finding out what changed in the package or the package's dependencies and/or the build.

They updated it from gzip 1.9 to 1.10.
I .diff'd Ubuntu source packages for both and nothing jumped out at me.
I .diff'd the binary packages in a Hex editor and noted some changes in the headers in the gzip binary.
binary_folders_for_diff.zip
source_folders_for_diff.zip

Reported to Ubuntu here.

From upstream:

I tried comparing the binaries with diffoscope, and one difference which jumped out at me is the .plt.sec section which is present in the Eoan binary. This presumably comes from CET (gcc -fcf-protection). There are other differences, less significant IMO; .plt.sec is a likely candidate for something WSL1 might not support.

That section is "new" alright. I blindly stripped the .plt.sec, similar to #3023, but no joy. Not that blindly stripping a section out of ELF binary would have any expectation of working. Now, thing is, all of the new binaries (f.e. /bin/ls) have that .plt.sec section also, and they work just fine. Also compiling a hello.c with -fcf-protection works. Because of course it does.
The only other new section in there (Disco gzip has 27 sections, Eoan has 29) is .note.gnu.property. No joy after stripping that either. Meh. It's not .note.ABI-tag; I stripped that as a WAG right after this issue was posted.
Which is all a long description of things that don't work. Next thing to try would be to grab the apt-source, try to build a broken binary, and then try to guess what makes gzip so special (contrast say /bin/ls). Still an outside chance gzip can be patched, somehow. But we're deep into work-around territory more complicated than just recompiling from source.

Thanks for filing this issue, I identified where this is blowing up in our elf loader and will submit a fix.

I have updated the bug report filed on gzip in Launchpad accordingly.

@benhillis could you please backport the fix to non-insider versions?

@benhillis we already publish 19.10 tarballs for WSL and with this bug users can't really use them with WSL1 :-(

@rbalint - Yes, I will see about getting this backported.

@benhillis - Is there a workaround for WSL1 until the fix is released?

Despite the WSL1 elf loader being the actual problem, is "Build gzip from source" the correct workaround for WSL1/eoan until the fix is released?
If so, could the "most correct" procedure for doing this be posted to this thread?  (I landed here via a Google search.)

I locally rebuilt the gzip package in eoan, and the problem persists.
@benhillis Are you able to share any details about the nature of the ELF loader bug, which might suggest tweaks to compiler or linker options that might avoid it?
@BobCu The simplest short term workaround might be to just downgrade to the gzip package from Ubuntu disco.

@maxb  - Sure. The issue is that our loader was not correctly handling program headers that would exceed the size of the file itself.  The offending program header file size of zero but an offset that was greater than the size of the binary.
Hope that helps.

@maxb - I got a working build via the sources at https://ftp.gnu.org/gnu/gzip/gzip-1.10.zip (note the suffix).

The bizarre/frustrating thing about this one is there is nothing obvious in the gzip 1.10 build (when I looked last month) that would cause a "header file size of zero but an offset that was greater than the size of the binary". You can come up with all kinds of imaginable scenarios where that might happen; up to and including some newly introduced and obscure toolchain bug. But nothing I could find to make gzip special, contrast a (say) a toolchain bug that took down the whole Eoan edifice on WSL. Actually the gzip build is about as bog standard as it gets. And of course my local build worked fine, which sheds no light either. Ugh.

FWIW, I attempted to build the gzip deb via dpkg-buildpackage but couldn't get it to succeed, no doubt due to my unfamiliarity with debs (I build mainly RPMs and tarballs).  However, I doubt rebuilding and reinstalling the deb is the best short-term workaround for this issue.
My gzip is generic (without Ubuntu/Debian patches), and is installed in /usr/local/bin (the default), which precedes /bin in my PATH, permitting the default gzip to remain installed (and updated/tested).
Are there any patches that should be applied to gzip as part of the temporary workaround?

Given the Ubuntu/Debian patches to gzip, it may be safest to follow @maxb's recommendation to downgrade to Disco's gzip:

Grab the package from here: https://packages.ubuntu.com/disco/amd64/gzip/download
Install it: sudo dpkg -i ./gzip_1.9-3_amd64.deb
Protect it from automatic upgrade: sudo apt-mark hold gzip

When this issue has been resolved:

Enable upgrade: sudo apt-mark unhold gzip

Thank you. It seems like it is a temporary solution for:

https://github.com/tj/n/issues/594
https://github.com/microsoft/vscode-remote-release/issues/1744

@benhillis I have dissected the gzip binary with tshark: http://paste.ubuntu.com/p/SJkZ4yDxdW/
Could you please tell what parts cause the error, so I can go through the full Eoan archive and possibly fix the binaries if there are only a few?
It is also possible to dissect them on Windows with Wireshark, which can be more pleasant to use.

1. = Write Flag: True
.... .... .... .... .... .... .... ...0 = Execute Flag: False
File Offset: 98304 (0x0000000000018000)
Virtual Address: 0x000000000001a000
Physical Address: 0x000000000001a000
File Image Size: 0 (0x0000000000000000)
Memory Image Size: 827464 (0x00000000000ca048)
Align: 4096 (0x0000000000001000)

Note binaries are built with debug symbols, which are then stripped. Maybe stripping is bad.
Also maybe dwz debug symbols are not compatible with our stripping.
Possibly binutils regression in eoan.
Things to try:

use disco binutils
build with nostrip in eoan
build without dwz & with stripping in eoan

Confirmed better in 19025 WSL 1.

We have also released a fixed gzip in Ubuntu. Just run apt update && apt install gzip on Eoan to get the fix and make gzip work with earlier Windows 10 releases as well.

@rbalint - What dd you tweak in the fixed binary?

The updated gzip works for me under WSL1.
Be sure to run sudo apt-mark unhold gzip first, if running the prior version.

this temporary solution worked for me
Given the Ubuntu/Debian patches to gzip, it may be safest to follow @maxb's recommendation to downgrade to Disco's gzip:

    Grab the package from here: https://packages.ubuntu.com/disco/amd64/gzip/download
    Install it: sudo dpkg -i ./gzip_1.9-3_amd64.deb
    Protect it from automatic upgrade: sudo apt-mark hold gzip

When this issue has been resolved:

    Enable upgrade: sudo apt-mark unhold gzip

this temporary solution worked for me
Given the Ubuntu/Debian patches to gzip, it may be safest to follow @maxb's recommendation to downgrade to Disco's gzip:

    Grab the package from here: https://packages.ubuntu.com/disco/amd64/gzip/download
    Install it: sudo dpkg -i ./gzip_1.9-3_amd64.deb
    Protect it from automatic upgrade: sudo apt-mark hold gzip

When this issue has been resolved:

    Enable upgrade: sudo apt-mark unhold gzip

I guess I'll stick to this solution until WSL2 es release as stable.

@benhillis fixed binutil's strip and recompiled gzip. The fixed binutils tries to not point the offset past EOF, so we don't trigger the problem in WSL1 with new binaries. It is funny that only gzip was affected in the archive. Ubuntu 20.04 and later also have the fix already.

I just encountered the same issue again with ubuntu 22.04 in wsl1.
Temporary solution proposed above did work for me as well.

I am also affected by this bug again in Ubuntu 22.04. Weirdly enough, the rest of the binaries work fine. Only gzip seems to fail.

I am also affected by this bug again in Ubuntu 22.04. Weirdly enough, the rest of the binaries work fine. Only gzip seems to fail.

use this to fix this may help
echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

Huh what does this do? I mean, I get it inserts a 0x10 byte at offset 0x189, but I'm curious what structure are you patching for it to get fixed.
-------- Mensaje original --------De: Rayan @.> Fecha: 20/5/22  3:42  (GMT+01:00) Para: microsoft/WSL @.> Cc: Marcos Del Sol Vives @.>, Comment @.> Asunto: Re: [microsoft/WSL] gzip from Ubuntu Eoan doesn't execute (#4461)
I am also affected by this bug again in Ubuntu 22.04. Weirdly enough, the rest of the binaries work fine. Only gzip seems to fail.
use this to fix this may help
echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

I got the same error with Ubuntu 22.04 & WSL1.
Solved by updating gzip to a newer version, in my case 1.12.

Download it from here: http://ftp.debian.org/debian/pool/main/g/gzip/
Install it: sudo dpkg -i ./gzip_1.12-1_amd64.deb

Thanks to @BobCu.

@nsynecs, thank you, fixed right now.
I used this version for WSL Ubuntu 22.04.

@nsynecs it works well,thanks!!
wget http://ftp.debian.org/debian/pool/main/g/gzip/gzip_1.12-1_amd64.deb sudo dpkg -i ./gzip_1.12-1_arm64.deb

@nsynecs Thank you very much. It worked very well！

@as17501 's solution works for WSL 1, Ubuntu 22.04.  eg:
wget http://ftp.debian.org/debian/pool/main/g/gzip/gzip_1.12-1_amd64.deb
sudo dpkg -i ./gzip_1.12-1_arm64.deb

That being said - I'm surprised this bug to a core piece of Ubuntu software (gzip) used in a distribution somehow made it into production.  Am I missing something and there's very little testing of WSL, or is this a separation of concerns issue where "WSL works" from a Microsoft standpoint, but the Ubuntu distribution doesn't; eg it's Canonical's issue.  Should we be raising it with Canonical as the issue has been around since 2019. Cheers

in your example you wget amd but then dpkg arm

The current issue with GZip on Ubuntu is better described in #8219 and it's cause is different from this thread. It's caused by the WSL 1 ELF loader. While there might be ways to fix that distro side, it's quite unpredictable when and which binary will be the next affected by such problem.
Anyone willing to confirm what's been reported in the referred issue can try the following command to patch the gzip binary and clarify whether that's accurate or a new issue arose:
echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

The current issue with GZip on Ubuntu is better described in #8219 and it's cause is different from this thread. It's caused by the WSL 1 ELF loader. While there might be ways to fix that distro side, it's quite unpredictable when and which binary will be the next affected by such problem.
Anyone willing to confirm what's been reported in the referred issue can try the following command to patch the gzip binary and clarify whether that's accurate or a new issue arose:
echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

I can confirm that this works! I had the same problem as the people above. With WSL 1 Ubuntu 22.04 installing Visual Studio Code would throw the following error:
$ code .
Updating VS Code Server to version b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a
Removing previous installation...
Installing VS Code Server for x64 (b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a)
Downloading: 100%
@@@@: Permission denied
/usr/bin/gzip: 3: : not found
/usr/bin/gzip: 4: Syntax error: "(" unexpected
tar: Child returned status 2
tar: Error is not recoverable: exiting now

tar is unable to read /home/alange/.vscode-server/bin/b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a-1658171981.tar.gz. Either the file is corrupt or tar has an issue.
There's a known WSL issue with tar on Ubuntu 19.10.
See workaround in https://github.com/microsoft/vscode-remote-release/issues/1856.
Reload the window to initiate a new server download.

After running your magic line it immediately worked:
$ code .
Updating VS Code Server to version b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a
Removing previous installation...
Installing VS Code Server for x64 (b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a)
Downloading: 100%
Unpacking: 100%
Unpacked 2799 files and folders to /home/alange/.vscode-server/bin/b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a.

echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

Fixed it for me as well.

Thanks for the workarounds, though I don't see a core fix to the actual
underlying issue I'm afraid.   It also seems somewhat bizarre that a change
was made to WSL that fundamentally broke a core part of the system, yet
somehow that made it through the testing processes and was released to
production.
On Sun, 24 Jul 2022 at 10:34, John Milazzo @.***> wrote:

echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))
Fixed it for me as well.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/WSL/issues/4461#issuecomment-1193216980,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAETFP7F5XL2ETKFDPCGGALVVSFQPANCNFSM4ISVVKHQ
.
You are receiving this because you commented.Message ID:
@.***>

--
Best regards
David Ford
048 1172288

Hello, I have problems executing the remote wsl, I will leave the attached error.
note: i also have the problem when using code . from the ubuntu 22.04 lts terminal, this does nothing.

Hello, I have problems executing the remote wsl, I will leave the attached error. note: i also have the problem when using code . from the ubuntu 22.04 lts terminal, this does nothing.

I have the same error with you.
I fix it by use echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189)) in WSL2, than use code .

I thought the gzip patch fixed my issue on WSL 2, but as it turned out, I was using WSL 1 and didn't realize it! run wsl -l -v to be sure.

Given the Ubuntu/Debian patches to gzip, it may be safest to follow @maxb's recommendation to downgrade to Disco's gzip:

Grab the package from here: https://packages.ubuntu.com/disco/amd64/gzip/download
Install it: sudo dpkg -i ./gzip_1.9-3_amd64.deb
Protect it from automatic upgrade: sudo apt-mark hold gzip

When this issue has been resolved:

Enable upgrade: sudo apt-mark unhold gzip

[gzip_1.12-1_amd64.deb](http://ftp.debian.org/debian/pool/main/g/gzip/) can also resolve this problem

My question is twofold:

How was WSL 2 released with such a significant bug present in one of
the supported platforms ?
Is there an automated testing strategy as per normal DevSecOps
processes ? If so, where is this documented

Cheers
On Wed, 21 Sept 2022 at 02:53, Chang @.***> wrote:

Given the Ubuntu/Debian patches to gzip, it may be safest to follow @maxb
https://github.com/maxb's recommendation to downgrade to Disco's gzip:

Grab the package from here:
https://packages.ubuntu.com/disco/amd64/gzip/download
Install it: sudo dpkg -i ./gzip_1.9-3_amd64.deb
Protect it from automatic upgrade: sudo apt-mark hold gzip

When this issue has been resolved:

Enable upgrade: sudo apt-mark unhold gzip

gzip_1.12-1_amd64.deb
http://ftp.debian.org/debian/pool/main/g/gzip/gzip_1.12-1_amd64.deb can also resolve this
problem
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/WSL/issues/4461#issuecomment-1252634959,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAETFPZQT474IOGOTGAVXPLV7HTZNANCNFSM4ISVVKHQ
.
You are receiving this because you commented.Message ID:
@.***>

--
Best regards
David Ford
048 1172288

The current issue with GZip on Ubuntu is better described in #8219 and it's cause is different from this thread. It's caused by the WSL 1 ELF loader. While there might be ways to fix that distro side, it's quite unpredictable when and which binary will be the next affected by such problem.
Anyone willing to confirm what's been reported in the referred issue can try the following command to patch the gzip binary and clarify whether that's accurate or a new issue arose:
echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

It works!

This command fixed the issue for me: sudo apt-get install gzip

Your Windows build number: 1903 (18362.295)
What you're doing and what's happening:wsl@MSI-GS73:~ $ gzip
-bash: /bin/gzip: cannot execute binary file: Exec format error
126|wsl@MSI-GS73:~ $ apt list gzip
Listing... Done
gzip/eoan,now 1.10-0ubuntu3 amd64 [installed]
wsl@MSI-GS73:~ $

What's wrong / what should be happening instead:
gzip from Ubuntu Eoan gives the above unexpected error. The same binary behaves perfectly well on a native Linux box (tested on Ubuntu Bionic / Disco and Debian Stretch / Buster).
Strace of the failing command, if applicable:  No strace because the binary doesn't run at all :(
For WSL launch issues, please collect detailed logs.

See our contributing instructions for assistance.

This command fixed the issue for me: sudo apt-get install gzip.

This command fixed the issue for me: sudo apt-get install gzip.

I got the same error under Ubuntu 22.04, gzip 1.10, WSL1. Solved by upgrading gzip to a newer version, in my case 1.12.

Download it from here (with wget / curl): http://ftp.debian.org/debian/pool/main/g/gzip/
Install it: sudo dpkg -i ./gzip_1.12-1_amd64.deb

It's work! yeah! Thanks!!!

gzip package version 1.10-4ubuntu4.1 was published with a patch that addresses this particular issue. sudo apt update && sudo apt install gzip is enough to install it.

@ScarletFlash
i am still facing this issue is there a solution yet?
also https://packages.ubuntu.com/disco/amd64/gzip/download  does not work


Provisioning Fails with Solr 6.1.0

I'm trying to add the latest version of Solr (6.1.0) to my machine. I've changed the config.yml file to:
solr_version: "6.1.0"
...but it fails each time with the error:

TASK [geerlingguy.solr : Check current list of Solr cores.] ********************
fatal: [drupalvm]: FAILED! => {"changed": false, "content": "", "failed": true, "msg": "Status code was not [200]: Request failed: <urlopen error [Errno 111] Connection refused>", "redirected": false, "status": -1, "url": "http://localhost:8983/solr/admin/cores"}

I noticed that the geerlinguy.solr role README.md file mentions the ability to explicitly name your solr_cores. I'm trying to do that now to see if it might be a required option for 6.1.0.

@attheshow - does vagrant up (on a fresh VM) work with the normal/default 5.x version of Solr? I know I have the role working with 6.x outside of Drupal VM, but I haven't explicitly tested 6.1 with Drupal VM yet.

@geerlingguy I'm going to try building it one more time with 6.1.0 then I'll switch to 5.5.2 and report back.

I'm getting a different error after adding values for solr_cores and solr_mirror. This is still on 6.1.0. I'll try 5.5.2 now.

TASK [geerlingguy.solr : Expand Solr.] *****************************************
fatal: [drupalvm]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "Traceback (most recent call last):\r\n  File "/tmp/ansible_7x2Nua/ansible_module_unarchive.py", line 751, in \r\n    main()\r\n  File "/tmp/ansible_7x2Nua/ansible_module_unarchive.py", line 706, in main\r\n    handler = pick_handler(src, dest, file_args, module)\r\n  File "/tmp/ansible_7x2Nua/ansible_module_unarchive.py", line 637, in pick_handler\r\n    if obj.can_handle_archive():\r\n  File "/tmp/ansible_7x2Nua/ansible_module_unarchive.py", line 584, in can_handle_archive\r\n    if self.files_in_archive:\r\n  File "/tmp/ansible_7x2Nua/ansible_module_unarchive.py", line 515, in files_in_archive\r\n    for filename in tf.getnames():\r\n  File "/usr/lib/python2.7/tarfile.py", line 1817, in getnames\r\n    return [tarinfo.name for tarinfo in self.getmembers()]\r\n  File "/usr/lib/python2.7/tarfile.py", line 1809, in getmembers\r\n    self._load()        # all members, we first have to\r\n  File "/usr/lib/python2.7/tarfile.py", line 2384, in _load\r\n    tarinfo = self.next()\r\n  File "/usr/lib/python2.7/tarfile.py", line 2319, in next\r\n    self.fileobj.seek(self.offset)\r\n  File "/usr/lib/python2.7/gzip.py", line 434, in seek\r\n    self.read(1024)\r\n  File "/usr/lib/python2.7/gzip.py", line 261, in read\r\n    self._read(readsize)\r\n  File "/usr/lib/python2.7/gzip.py", line 308, in _read\r\n    self._read_eof()\r\n  File "/usr/lib/python2.7/gzip.py", line 347, in _read_eof\r\n    hex(self.crc)))\r\nIOError: CRC check failed 0x2b070218 != 0xe8183b60L\r\n", "msg": "MODULE FAILURE", "parsed": false, "stat": {"exists": false}}

NO MORE HOSTS LEFT *************************************************************

Same issue on 5.5.2.

Just a quick update:
5.5.2 is operating correctly after I ran chmod -r 777 ~/.ansible on my Mac (and also specified the solr_cores and solr_mirror in the config.yml file). So I think the last error I posted was coming from the fact that I had recently updated Ansible and the permissions on that directory somehow changed. I wasn't able to get 6.1.0 working.

Is there a recommended upgrade path for Solr - I'm curious and interested to get off version 4.x.

@fubarhouse - The easiest way is to just uninstall it (e.g. nuke the VM) and then set the newer version you want.
Last time I tried (which was before @attheshow's attempt above), I was able to use both 6.x and 5.x, but 6.x works standalone right now regardless (the tests are passing in the upstream role).

It looks like it could just be a Java version issue; by default any of the supported guest OSes (besides Ubuntu 16.04) install Java 7 or earlier. You need Java 8 for Solr 6, and this could be the issue... I'm testing the fix and will document this requirement/required changes if this turns out to be the culprit.

So it is definitely because of Java 7... see notes here for switching version to Java 8 (requires a reprovision): https://github.com/geerlingguy/ansible-role-java#example-playbook-install-openjdk-8

@fubarhouse - Yeah, Ubuntu 12.04 is quickly becoming the 'RHEL 5' of the Ubuntu world... so few people on the bleeding edge are using it anymore, so I'd expect more and more packages to stop supporting it (at least easily) as they release newer major versions.

I'm interested in getting off it, but unfortunately my agency's Acquia servers still run on 12.04 - I won't be able to change until that changes...
I'm actually using 16.04 as my laptop OS now, and in terms of performance it's significantly better than 12.04. I like it!


Fire danger rating / fire behaviour index

Hi, would it be possible to add the fire rating index as an attribute to the fire danger sensors?
http://www.bom.gov.au/vic/forecasts/fire-danger-ratings.shtml

No. The BoM does not make this available in the mobile app so the data is not available.


Source and target are now 1.8.0, so required java version in maven en…

…forcer should reflect this

@mariofusco just a little update


Add support for documents in bullet points format

Add support for bullet point document.
Requirements
Documents

[x] libreoffice -> mac

[x] office -> mac

[x] office -> mac

[x] libreoffice -> mac (s the required(?))

[ ] Complete relevant documentation

[x] Remove support for raw docx files as this is confusing

All steps have been completed apart from updating the documentation. ughhhh should really do this but will mark the feature beta for the time being as don't really have any robust usecases for testing just yet

Completed


Suggest switching order of sections 3.2 (Response to 2017 SRG) and 3.3 (Description of Base model)

It seems more logical to talk about the details of the model before responding to some of the technical requests. Fairly easy switch to make.

I'm fine with that.  Our (NWFSC) typical stock assessment document flow is to talk about responses to last review before the new model, but I see your point.  The way it is now kind of makes it such that responses to the SRG can't be too descriptive if new things are used in this years model as you would just be describing things twice, unless all that is said in the response is see model description.  So long winded to say... seems reasonable.

I agree. I'm happy to help rewrite any of this if you want--just delegate as you wish.


TypeScript constructor find References

From @wallverb on July 18, 2016 17:24

VSCode Version: 1.4.0-insiders
OS Version: OSX

Feature request:
Ability to Find All References [Shift+F12] when executing on constructor - right now it shows No results:

I guess it should show all new MyClass(..) references
Copied from original issue: Microsoft/vscode#9445

Agree. Moving to TS team.

Should be working as intended in latest.


Is anywhere to make a git log like way?

I'm using git2-rs to build a Git-base tools. And now, I want to get all changes from a commits,  such as those code in  Git Objects:
$ git log --stat 1a410e
commit 1a410efbd13591db07496601ebc7a059dd55cfe9
Author: Scott Chacon<EMAIL_ADDRESS>Date:   Fri May 22 18:15:24 2009 -0700

	Third commit

 bak/test.txt | 1 +
 1 file changed, 1 insertion(+)

And I find the C++ version of git log in https://libgit2.org/libgit2/ex/HEAD/log.html
It seems we need to expose  git_commit_parent(&parent, commit, (size_t)i) method to compare parent, then we can get the different?
But I had search code, it seems no way to do in git2-rs?

The Rust version of that example is translated here -- https://github.com/rust-lang/git2-rs/blob/master/examples/log.rs

The Rust version of that example is translated here -- https://github.com/rust-lang/git2-rs/blob/master/examples/log.rs

thanks

thanks


--drop-existing doesn't work with dbt seed

when attempting to recreate tables that had previously been built with dbt seed, an error message shows saying that the table already exists.

This can happen if there's a view with the same name as the csv file. Do you think that's what's happening here @jthandy?

totally possible, i'm not sure.

--drop-existing is now deprecated, use --full-refresh instead.
We overhauled dbt's implementation of seed -- This particular error is handled by alerting the user that they're running a seed file with the same name as a view in the database.
https://github.com/fishtown-analytics/dbt/blob/development/dbt/adapters/default.py#L637


Does not synchronize when in auto-started

OK. I found out that you need the razer sdk.
But now a very important question for me: The synchronization takes only place in two ways for me: When starting the program or when I click on "Synchronize manually", but NOT when Unilight is in autostart.
My scenario: Razer Synapse (SDK) starts and a short time later Unilight also starts (to make sure that the necessary DLLs are actually loaded beforehand from synapse).
The RGB control is now not synchronized, but when I click on "Synchronize manually" it is. Is there a workaround here, i.e. start Unilight with a parameter? The strange thing is that Unilight synchronizes when the program is started manually, but not when Unilight is in autostart. I don't want to click "synchronize manually" everytime when i boot my computer.
Originally posted by @Staubgeborener in https://github.com/HunterZ/UniLight/issues/6#issuecomment-581125532

@Staubgeborener what method are you using to auto-start Unilight?
The easiest way that works is to put a shortcut to it in the Startup folder of the Start Menu.
I'm currently doing it via Task Scheduler, with a task that is set to run when I log on. This is set to run only when I am logged on, and to run as my user account. This is necessary to ensure that it has access to the system tray and to user-level RGB APIs.

Different approaches:

Task scheduler, same as your settings, unilight is in system tray but i have to click on "synchronize manually"
Put the unilight shortcut into autostart folder but i have to click on "synchronize manually"
Put a small .vbs-Script into autostart folder, whichs runs unilight but i have to click on "synchronize manually", like this one:

Set WSHShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 20000
WSHShell.Run "F:\Benchmarking\unilight_github\UniLight.exe"

All in all, i can autostart unilight, it's in system tray, but i always have to "synchronize manually". Is there a way to call the programm with a synchronize-parameter?

Different approaches:

Task scheduler, same as your settings, unilight is in system tray but i have to click on "synchronize manually"
Put the unilight shortcut into autostart folder but i have to click on "synchronize manually"
Put a small .vbs-Script into autostart folder, whichs runs unilight but i have to click on "synchronize manually", like this one:

Set WSHShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 20000
WSHShell.Run "F:\unilight\UniLight.exe"

All in all, i can autostart unilight, it's in system tray, but i always have to "synchronize manually". Is there a way to call the programm with a synchronize-parameter?

So you're changing the Windows accent color but Unilight is not
automatically updating your RGB devices to match?
And this is with version 1.5?
Is this just with Razer devices?
There currently isn't a way to force synchronization other than clicking. I
believe it also tries to synchronize on start, so if that's not working
either then maybe my Razer integration needs a delay somewhere..
On Mon, Feb 3, 2020 at 8:35 AM Staubgeborener<EMAIL_ADDRESS>wrote:

Different approaches:

Task scheduler, same as your settings, unilight is in system tray
but i have to click on "synchronize manually"
Put the unilight shortcut into autostart folder but i have to click
on "synchronize manually"
Put a small .vbs-Script into autostart folder, whichs runs unilight
but i have to click on "synchronize manually", like this one:

Set WSHShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 20000
WSHShell.Run "F:\unilight\UniLight.exe"
All in all, i can autostart unilight, it's in system tray, but i always
have to "synchronize manually". Is there a way to call the programm with a
synchronize-parameter?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/HunterZ/UniLight/issues/9?email_source=notifications&email_token=AAA2TCZ3SKJZCOYV6QSFRRLRBBBV7A5CNFSM4KO2L47KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKUQJDY#issuecomment-581502095,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAA2TC4I4WPVUMVK7SKVUZLRBBBV7ANCNFSM4KO2L47A
.

So you're changing the Windows accent color but Unilight is not
automatically updating your RGB devices to match?

yes

And this is with version 1.5?

yes

Is this just with Razer devices?

only got razer to test this out

There currently isn't a way to force synchronization other than clicking. I
believe it also tries to synchronize on start, so if that's not working
either then maybe my Razer integration needs a delay somewhere..

Yeah, when i start the program by my own (so no autostart) its working.

There's some diagnostic stuff you can check to maybe narrow down the issue:

hovering over UniLight's system tray icon should cause a tooltip appear
with a quick status of each API
right-clicking UniLight's system tray icon should allow you to open a
popup with slightly more detailed status information

It might be useful to compare these results when it's in a non-working
state versus a working state.
On Mon, Feb 3, 2020 at 8:48 AM Staubgeborener<EMAIL_ADDRESS>wrote:

So you're changing the Windows accent color but Unilight is not
automatically updating your RGB devices to match?
yes
And this is with version 1.5?
yes
Is this just with Razer devices?
only got razer to test this out
There currently isn't a way to force synchronization other than clicking. I
believe it also tries to synchronize on start, so if that's not working
either then maybe my Razer integration needs a delay somewhere..
Yeah, when i start the program by my own (so no autostart) its working.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/HunterZ/UniLight/issues/9?email_source=notifications&email_token=AAA2TC375KCRIT74E3YGSATRBBDF3A5CNFSM4KO2L47KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKURWWY#issuecomment-581507931,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAA2TCZ6ZNAHNCDFS5FFEDLRBBDF3ANCNFSM4KO2L47A
.

Well, i already checked this. RzrChrm is always marked with a tick. Always. But however, i have to click on synchronize manually to get it working. There is none "non-working-state", the tick is always there. So~ basically, the synchronization takes only place, when i do it by my own. Kinda weird.

This points to the Razer SDK - or UniLight's use of it - as the problem, as
the check mark indicates that Razer reported successful application of the
RGB value.
I'll leave this bug open as a reminder to take another look at the Razer
SDK docs and see if maybe I need to implement a delay somewhere or
something.
On Wed, Feb 5, 2020 at 8:33 AM Staubgeborener<EMAIL_ADDRESS>wrote:

Well, i already checked this. RzrChrm is always marked with a tick.
Always. But however, i have to click on synchronize manually to get it
working. There is none "non-working-state", the tick is always there. So~
basically, the synchronization takes only place, when i do it by my
own. Kinda weird.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/HunterZ/UniLight/issues/9?email_source=notifications&email_token=AAA2TCZ4LSEPODEHR6FEPQDRBLS6RA5CNFSM4KO2L47KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK4CP7A#issuecomment-582494204,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAA2TC5T5OG5WVFKX24ZKPTRBLS6RANCNFSM4KO2L47A
.

I have some issues with the Corsair CUE DLL while trying to compile your project. I thought about calling GetAndUpdateColor(); inside Main.cpp as one of the first things, when the program starts. Perhaps in L235 - maybe you could give it a try?

You can always comment out Corsair CUE support. I really need to refactor the codebase to make vendor API support more pluggable, so that you don't have to build/load the ones you don't care about.
I haven't been working on this project much because I got a bit overwhelmed while trying to implement Steelseries support. They went with a wacky JSON REST API instead of just providing a DLL like everyone else, which comes with a lot of baggage.

Re-reading your original comment, I'm wondering if what's going on is that the Razer Chroma SDK lies and says everything is working fine, but it's actually got a broken back-end state because the Razer software hasn't loaded yet.
Manual synchronization does NOT re-init the DLL - it just sends another color change request to the Razer SDK.
If you auto-launch it (into the bad state) and check the details status without first doing a manual synchronization, does it show anything other than SetRZCColor() success?
If not, then I'll have to either try to find a way to detect the bad state (maybe query every possible device model to ensure that at least one is reportedly connected?), or do something silly like forcing a second initial sync following some fixed delay after the initial one.


Join helm charts

Description
Changes proposed in this pull request:

join helm charts into one

Related issue(s)

#10

/retest


exec /root/.local/bin/poetry: exec format error

lima nerdctl run --name npi --pull always \
-p 9140:9140
-p 9141:9141
-e ... npiai/npi-mac
报错：exec /root/.local/bin/poetry: exec format error
limactl version 0.21.0

Hi @yangwenmai , could you give me what OS you are using?

Hi, it seems that image platform is wrong, what type of mac you are using?

Hi, it seems that image platform is wrong, what type of mac you are using?

macOS Sonoma 14.4, 13-inch, 2020

Hello @yangwenmai , NPi v0.0.3 has been released, you can use following script to start NPi server
docker run -d --name npi --pull always \
    -p 9140:9140 \
    -e OPENAI_API_KEY=YOUR_OAI_KEY npiai/npi

For step by step guide, please visti: https://www.npi.ai/docs

resolved


Slack bot scripts

flesh out slack bot scripts for the rest of awesome-board REST APIs.

Completed in 8/4. Open to contributions to make more robust, but all MVP functionality now exists.


Remove redundant e2e tests that are already covered by the testsuite

There are some e2e tests that are already covered by the testsuite - review and remove the redundant ones in the former, to speed up CI builds and testing.

Hey team! Please add your planning poker estimate with Zenhub @ClifHouck @dejanzele @kannon92 @richscott @Sharpz7 @suprjinx


How to change the 1px width of bars in a candlestick chart?

Hey, I don't know the terminology, so I don't know how to name it properly. How do I change this (pointing with the arrow in an img) width? I think I've tried all CandlestickSeries props, but no luck. Maybe I missed something. https://github.com/rrag/react-stockcharts/blob/master/src/lib/series/CandlestickSeries.js.
I want it to be more bold, to have a basic width of 2-5px.
Thanks!

that is called wick, and there is no option to change the strokeWidth of it
it is drawn like this
in canvas
https://github.com/rrag/react-stockcharts/blob/master/src/lib/series/CandlestickSeries.js#L169-L170
it is basically 2 rectangles (top wick and bottom wick) of width 1, profiling showed that this is faster than a canvas line
in svg
https://github.com/rrag/react-stockcharts/blob/master/src/lib/series/CandlestickSeries.js#L105
try adding strokeWidth (in svg)
but in canvas you have to set a ctx.lineWidth = ... and then change it back to 1 after the wick is drawn so the candle can have a strokewidth of 1
Changing the state of canvas per wick takes a few millisecs, so doing it once before wick draw and then resetting it back to 1 after wick should be ok.
Try it out.


Your Session has crashed due to unknown reason

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Custom Code
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): pip
TensorFlow version (use command below): 2.1.0-rc1
Python version: 3.6
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version:
GPU model and memory: Colab Notebook default GPU/CPU

You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the current behavior
I am trying to train a model using two separate sub-models, each using audio and image data respectively. I have created an input pipeline having (audio data,image data and binary labels). According to this guide, I normally passed the tf.data.Dataset to the model.fit() method and soon the colab notebook crashed, giving an "unknown error".
Describe the expected behavior
Starting of the training process
Code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
filenames = [data_path]
raw_dataset = tf.data.TFRecordDataset(filenames)
raw_dataset

feature = {'train/image': tf.io.FixedLenFeature([], tf.string),
            'train/label': tf.io.FixedLenFeature([], tf.int64),
           'train/audio': tf.io.FixedLenFeature([], tf.string),}

def _parse_function(example_proto):
  features = tf.io.parse_single_example(example_proto, feature)
  audio_raw = tf.expand_dims(tf.io.decode_raw(features['train/audio'],tf.float32),axis=-1)
  image_raw = tf.io.decode_raw(features['train/image'],tf.float32)
  image = tf.reshape(image_raw,[5,500,500,3])
  labels =features['train/label']
  labels = tf.one_hot(labels,depth=2)
  return audio_raw,image,labels

dataset = raw_dataset.map(_parse_function)
dataset

BATCH_SIZE = 4
BUFFER_SIZE = 10000

dataset = dataset.cache().shuffle(BUFFER_SIZE).batch(BATCH_SIZE).repeat()
dataset

am = action_model((5,500,500,3))
afm = audio_and_final_model((105000,1))

combined = tf.keras.layers.Concatenate(axis=-1)([am.output,afm.output])
z = tf.keras.layers.Dense(32,activation='relu')(combined)
dropOut = tf.keras.layers.Dropout(0.3)(z)
out = tf.keras.layers.Dense(2,activation='tanh')(dropOut)
model = tf.keras.models.Model(inputs=[am.input,afm.input],outputs=out)
model.compile(loss='hinge', optimizer='adam', metrics=['accuracy'])

# print(model.summary())
EPOCHS=30
callbacks = [tf.keras.callbacks.ReduceLROnPlateau(verbose=1,monitor='loss',patience=2),tf.keras.callbacks.ModelCheckpoint('/content/drive/My Drive/Model.h5',monitor='loss',save_best_only=True,save_freq='epoch',save_weights_only=True),tf.keras.callbacks.TensorBoard()]
print("Starting training")
model.fit(dataset,epochs=EPOCHS,callbacks=callbacks)
print("Saving Model")
model.save("Model.h5")

Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
Logs- https://pastebin.com/BdXCRdvV

So I guess the Colab GPU couldn't handle the model and thats the reason it crashed. Changed my model architecture now and everything works well. Thanks! Closing this issue


Line always on top

Hello,
I have the next question: i have joined to elements with a line and its correct, but when i move one element and there is other elements in my page, the line goes behind and i need it always on top. Is that possible? I attach two images: one with the arrow right and the other with the arrow behind the element. I hope you understand what im saying. If it's possible to be always on top, could you give me an example code, please? Thank you so much

Hi @RamonRodriguez05, thank you for the comment.
You can specify the z-index CSS property.
For example:
.leader-line {
  z-index: 99;
}

Note that it is not supported by the library.

No reply came, then this abandoned issue is closed.


Equivalent for .quadratic in BQM for CQM

I have the following segment :
`# Add quadratic terms
# x_i-x_j terms
for i in range(1, len(V) + 1):
    for j in range(i + 1, len(V) + 1):
        key = ('x_' + str(i), 'x_' + str(j))
        cqm.objective.quadratic[key] = 2 * A * np.dot(np.array(I[i - 1]), np.array(I[j - 1]))

# y_am - y_an terms
for m in range(1, len(V) + 1):
    for n in range(m + 1, len(V) + 1):
        for a in range(1, len(U) + 1):
            key = ('y_(' + str(a) + ', ' + str(m) + ')', 'y_(' + str(a) + ', ' + str(n) + ')')
            cqm.objective.quadratic[key] = 2 * A * (1 + m * n)

# x_i-y_am terms
for i in range(1, len(V) + 1):
    for m in range(1, len(V) + 1):
        for a in range(1, len(U) + 1):
            key = ('x_' + str(i), 'y_(' + str(a) + ', ' + str(m) + ')')
            cqm.objective.quadratic[key] = -2 * A * m * I[i - 1][a - 1]`

And I get this runtime error :
Traceback (most recent call last):
File "C:\Users\elmm\Desktop\MIT OCW Codes\CQM_2.py", line 105, in
cqm, x = build_setcover_cqm(U, V)
File "C:\Users\elmm\Desktop\MIT OCW Codes\CQM_2.py", line 64, in build_setcover_cqm
cqm.objective.quadratic[key] = 2 * A * np.dot(np.array(I[i - 1]), np.array(I[j - 1]))
File "C:\Users\elmm\AppData\Local\Programs\Python\Python39\lib\site-packages\dimod\views\quadratic.py", line 217, in setitem
self._model.set_quadratic(*uv, bias)
File "C:\Users\elmm\AppData\Local\Programs\Python\Python39\lib\site-packages\dimod\decorators.py", line 475, in wrapper
return method(*args, **kwargs)
File "dimod\quadratic\cyqm\cyqm_template.pyx.pxi", line 681, in dimod.quadratic.cyqm.cyqm_float64.cyQM_template.set_quadratic
File "dimod\cyvariables.pyx", line 306, in dimod.cyvariables.cyVariables.index
ValueError: unknown variable 'x_1'
How can I resolve this error?

You cannot set the biases for variables that have not been added to the model. Something like
objective.add_variable('BINARY', 'x_1')
objective.add_variable('BINARY', 'x_2')
objective.quadratic['x_1', 'x_2'] = 1

will work

Hi I tried but got this error :
Traceback (most recent call last):
File "C:\Users\elmm\Desktop\MIT OCW Codes\CQM_2.py", line 108, in
cqm, x = build_setcover_cqm(U, V)
File "C:\Users\elmm\Desktop\MIT OCW Codes\CQM_2.py", line 66, in build_setcover_cqm
cqm.objective.quadratic[key] = 2 * A * np.dot(np.array(I[i - 1]), np.array(I[j - 1]))
File "C:\Users\elmm\AppData\Local\Programs\Python\Python39\lib\site-packages\dimod\views\quadratic.py", line 217, in setitem
self._model.set_quadratic(*uv, bias)
File "C:\Users\elmm\AppData\Local\Programs\Python\Python39\lib\site-packages\dimod\decorators.py", line 475, in wrapper
return method(*args, **kwargs)
File "dimod\quadratic\cyqm\cyqm_template.pyx.pxi", line 681, in dimod.quadratic.cyqm.cyqm_float64.cyQM_template.set_quadratic
File "dimod\cyvariables.pyx", line 306, in dimod.cyvariables.cyVariables.index
ValueError: unknown variable 'x_1'
`import os
os.chdir('..')
from dimod import ConstrainedQuadraticModel, Integer, BinaryQuadraticModel
from dwave.system import LeapHybridCQMSampler
from dimod import ExactSolver
from neal import SimulatedAnnealingSampler
from itertools import combinations
from dwave.system import LeapHybridSampler
import numpy as np
import pandas as pd
from utils.data import read_inventory_optimization_data
from services.classical_optimizers import binary_supplier_optimizer
def build_setcover_cqm(U, V, verbose=False):
"""Construct CQM for the set cover problem
Args:
U (array-like):
A set of elements defining the universe
V (array of sets):
Array of subsets
Returns:
Constrained quadratic model instance
x: variable
"""
# Create indicator variables
I = []
for i in range(len(V)):
    I.append([1 if U[a] in V[i] else 0 for a in range(len(U))])

if verbose:
    print('Indicator variables: I_i,a', I)

# Lagrange multipliers A>B>0
A = 2
B = 1

##@  Constrained Quadratic Model @##
cqm = ConstrainedQuadraticModel()

# Add linear terms
# x linear terms
[cqm.add_variable('x_' + str(i + 1), 'INTEGER') for i in range(0, len(V))]
x = [cqm.fix_variable('x_' + str(i + 1), A * sum(I[i]) + B) for i in range(0, len(V))]
if verbose:
    print('x variables:', x)

# y_am linear terms
y = []
for a in range(1, len(U) + 1):
    [cqm.add_variable('y_(' + str(a) + ', ' + str(m) + ')', 'INTEGER') for m in range(1, len(V) + 1)]
    y.append(
        [cqm.fix_variable('y_(' + str(a) + ', ' + str(m) + ')', A * (m ** 2 - 1)) for m in range(1, len(V) + 1)])
if verbose:
    print('y variables:', y)

# Add quadratic terms

# x_i-x_j terms
for i in range(1, len(V) + 1):
    for j in range(i + 1, len(V) + 1):
        key = ('x_' + str(i), 'x_' + str(j))
        cqm.objective.quadratic[key] = 2 * A * np.dot(np.array(I[i - 1]), np.array(I[j - 1]))

# y_am - y_an terms
for m in range(1, len(V) + 1):
    for n in range(m + 1, len(V) + 1):
        for a in range(1, len(U) + 1):
            key = ('y_(' + str(a) + ', ' + str(m) + ')', 'y_(' + str(a) + ', ' + str(n) + ')')
            cqm.objective.quadratic[key] = 2 * A * (1 + m * n)

# x_i-y_am terms
for i in range(1, len(V) + 1):
    for m in range(1, len(V) + 1):
        for a in range(1, len(U) + 1):
            key = ('x_' + str(i), 'y_(' + str(a) + ', ' + str(m) + ')')
            cqm.objective.quadratic[key] = -2 * A * m * I[i - 1][a - 1]
return cqm, x

def solve_cqm(cqm, x, **kwargs):
sampler = LeapHybridCQMSampler()
response = sampler.sample_cqm(cqm, **kwargs)
energies = response.record.energy
best_energy = energies[0]
best_solution = response.first.sample
best_solution = [best_solution[i] for i in x]
print(best_solution)
print(f'Energy: {best_energy}')
return best_solution, best_energy

Define a simple set cover problem
U = list(set(np.random.randint(10, size=10)))
V = [set(U[i] for i in np.random.randint(len(U), size=(8))) for j in range(5)]
print('The universe is', U)
print('Number of elements in the universe: {:d}'.format(len(U)))
print('There are {:d} collections:'.format(len(V)), V)
print('Number of sets: N={:d}'.format(len(V)))
cqm, x = build_setcover_cqm(U, V)
best_solution = solve_cqm(cqm, x)
cqm, x = build_setcover_cqm(U, V)
best_solution = solve_cqm(cqm, x)
`
I have created the variables before this. Can please see what I should correct to fix this?

File "C:\Users\elmm\Desktop\MIT OCW Codes\CQM_2.py", line 66, in build_setcover_cqm
cqm.objective.quadratic[key] = 2 * A * np.dot(np.array(I[i - 1]), np.array(I[j - 1]))

You are again setting a quadratic bias for variables that do not yet exist. Also, can you please review code formatting and how to create a minimal, reproducible example? I am having trouble parsing your questions and code snippets

here is picture of the model, I was able to fix that

I resolved the run-time errors and now just get the error for not having token for using HybridCQMSolver. Would it be possible if I send you the code I have right now and you kindly review to see if it's correct? It's for an incredibly important assignment and I really need to make sure it's correct. can I please email the code to you?


[FEA] Support window operations on Decimal

Is your feature request related to a problem? Please describe.
This is still blocked on CUDF adding in support for decimal window operations.  The window operations currently supported include:

[ ] lead / lag
[ ] count
[ ] sum
[ ] row number
[ ] max / min
[ ] collect list

CUDF Decimal support in window functions:
min, max, count, lead, lag: https://github.com/rapidsai/cudf/pull/7037
row_number: https://github.com/rapidsai/cudf/pull/7061

CUDF Decimal support in window functions:
min, max, count, lead, lag: https://github.com/rapidsai/cudf/pull/7037
row_number: https://github.com/rapidsai/cudf/pull/7061

What does "collect list" point to?

What does "collect list" point to?

I did some tests with cuDF java tests. I found that all window operations required by current issue can run on decimal columns except sum.
sum on decimal is still unsupported by cuDF because rollingWindow with sum operation is yet supported on decimal:  https://github.com/rapidsai/cudf/blob/branch-0.18/cpp/src/rolling/rolling_detail.hpp#L54

I did some tests with cuDF java tests. I found that all window operations required by current issue can run on decimal columns except sum.
sum on decimal is still unsupported by cuDF because rollingWindow with sum operation is yet supported on decimal:  https://github.com/rapidsai/cudf/blob/branch-0.18/cpp/src/rolling/rolling_detail.hpp#L54

Thanks, then we should split this up into at least 2 issues.  The first is for what we can support today. The second should be a follow on to implement sum, and then we can make sure that there is an issue in CUDF to track it.  I asked @razajafri to take lead on making sure that all of the issues we need are in cudf so please coordinate on that.
The final issue is for collect_list which @mythrocks is working on a general cudf implementation for (we do not currently support it for any window operations).

Thanks, then we should split this up into at least 2 issues.  The first is for what we can support today. The second should be a follow on to implement sum, and then we can make sure that there is an issue in CUDF to track it.  I asked @razajafri to take lead on making sure that all of the issues we need are in cudf so please coordinate on that.
The final issue is for collect_list which @mythrocks is working on a general cudf implementation for (we do not currently support it for any window operations).

rapidsai/cudf#7061 and rapidsai/cudf#7037 are both merged in and can be supported by the plugin. I will create an issue for sum in cudf. As for collect_list @mythrocks is working on it.  I spoke with him and he will create an issue in cudf to track that work

rapidsai/cudf#7061 and rapidsai/cudf#7037 are both merged in and can be supported by the plugin. I will create an issue for sum in cudf. As for collect_list @mythrocks is working on it.  I spoke with him and he will create an issue in cudf to track that work

I have opened a cudf issue to track sum in a window operation rapidsai/cudf#7117

I have opened a cudf issue to track sum in a window operation rapidsai/cudf#7117

Lead, Lag, Max, and Min were merged in as a part of #1512
Count was merged in as a part of #1476 but it was a mistake because it was intended to only go in for regular aggregate operations so tests for it were added as a part of #1512
Both sum and row_number are are merged into cudf so we should be able to get those merged in shortly.

Lead, Lag, Max, and Min were merged in as a part of #1512
Count was merged in as a part of #1476 but it was a mistake because it was intended to only go in for regular aggregate operations so tests for it were added as a part of #1512
Both sum and row_number are are merged into cudf so we should be able to get those merged in shortly.

Hi @revans2, I met some problem on wrapping the sum support for decimal type.  The problem is spark catalyst will conduct a hard-code precision promotion on the output decimal type of sum expression (code link), which leads to precision overflow any input decimal whose precision greater than 8.
Considering the output decimal type may be passed to parent expressions recursively, I think perhaps we need create a catalyst rule to revert the precision promotion?

Hi @revans2, I met some problem on wrapping the sum support for decimal type.  The problem is spark catalyst will conduct a hard-code precision promotion on the output decimal type of sum expression (code link), which leads to precision overflow any input decimal whose precision greater than 8.
Considering the output decimal type may be passed to parent expressions recursively, I think perhaps we need create a catalyst rule to revert the precision promotion?

@sperlingxx We want to match what Spark does. We are just not going to be able to support sums greater than a precision of 8.  This is the same limitation that we have for doing a sum with a group-by or a reduction in spark.

@sperlingxx We want to match what Spark does. We are just not going to be able to support sums greater than a precision of 8.  This is the same limitation that we have for doing a sum with a group-by or a reduction in spark.

Thanks @revans2. I created the pull request #1560 for sum. And I think the row_number is already supported for now?

Thanks @revans2. I created the pull request #1560 for sum. And I think the row_number is already supported for now?

@sperlingxx you are right row_number is done. I missed it because it really was a test only change.

@sperlingxx you are right row_number is done. I missed it because it really was a test only change.

I am hoping we will see a collect_list PR in cudf soon, so let's keep this open.  If it does not get raised in the next few days we can close this and open a new issue for collect_list.

I am hoping we will see a collect_list PR in cudf soon, so let's keep this open.  If it does not get raised in the next few days we can close this and open a new issue for collect_list.

collect_list was merged in https://github.com/rapidsai/cudf/pull/7189

collect_list was merged in https://github.com/rapidsai/cudf/pull/7189

Follow up issue for supporting rank is in issue #1584 .


Get the type of open pages (images, video, html, json)

Expected behavior
When you open a link, I do not know that there will be a website or just a picture or video, and so on ... How can I Polic type of open links? (Picture, video, html)?
Actual behavior
[Describe observed behavior here]
Steps to reproduce the behavior

[First Step]
[Second Step]
[Other Steps...]

Environment

OS:
Node version (node -v):
package version:

What?

how to get the type of open links?

That's probably a better question for phantomjs. Going to close since it's not related to this.

Issues are for bugs, where expected behavior is different than actual. For questions or best practices please use other sources like stackoverflow.com.
Please review the guidelines for creating issues before opening new issues in the future.
This message is a saved reply and was posted automatically.


Graphics motion not appearing

SWF:<PHONE_NUMBER>827d6fd919380a030b97df1b69bf7fd8baf55081acba06249e768e (Direct Link)

Indeed: performance becomes quite abysmal over time, but otherwise this works quite well.


Users/tasoni/bug fix

Hi @tanvi-soni, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

accept or close


adding Undo and Redo in Source editor #308

fixes #308

the undo / redo buttons currently have an issue. they only react every 3 clicks in a visible way. It seems that the set code is not the right one on the first click.
this needs further investigation before we merge

@lhein I was also trying to figure out the cause of the issue - already reported in patternfly-react: https://github.com/patternfly/patternfly-react/issues/9838
I suspect that the issue is the same, which is affecting the "Ctrl+Z" behaviour I reported in the patternfly-react issue.

While this issue is being investigated in PatternFly side and this issue also occoring in the live online examples at the patternfly homepage / docs I am suggesting to go forward an merge the PR as this isn't a problem in our code base.
Once all PR checks pass of course ;)


backend payment optimism

This still isn't ready to be merged, but it's ready to review and to play with. @ekzyis I'd be curious to get some feedback on it. It does most of what we've discussed. The one big thing (other than all the todos) that I'm still ironing out is the UX of pending states and retries. I have some ideas and I'll try to get that done today.
The most important parts of this PR:

api/paidAction - has all the paid actions in their own files
components/use-paid-mutation.js - wraps useMutation to handle responses of paid actions and pay any invoices returned and give usePaidMutation callers callbacks about payment progress
worker/paidAction.js - handles state transitions of paid actions and their invoices

The biggest concerns with the PR:

Is it easy to understand how paid actions work and how to implement them? ie DX
Is the UX of paid actions good, regardless of whether the action is optimistic, pessimistic, anon, paid with a qr, etc.
Is concurrency handled appropriately

To achieve an ideal non-custodial UX, we are doing what we're calling 2-stage optimism:

frontend optimism: instantly reports success on the frontend while sending the requested action to the backend
backend optimism: stores the requested action in a PENDING state, returning success, an invoice, and appearing as-if the payment is confirmed to the actor

We then transition the action state to PAID or FAILED depending on the payment state. When the payment succeeds, we run the action side effects and the action is visible to everyone. When the payment fails, we report the failure in the stacker's notifications where they can retry the payment.

Doing this requires an overhaul to all paid actions. The requirements on paid actions are summarized in the following table:

anonable & pessimistic
optimistic
qr payable
p2p wrapped
side effects
fee credits payable

posts
x
x
x

x
x

comments
x
x
x

x
x

zaps
x
x
x
x
x
x

downzaps

x
x

x
x

poll votes

x
x

x

territory actions

x

x

donations
x

x

x

update posts

x

x
x

update comments

x

x
x

This pr intends to implement backend optimism for all actions. We aim to take a relatively declarative approach to creating paid actions, where paid actions implement a standard interface so that paid actions aren't directly concerned with managing the payments. So far, what this looks like is paid actions are implemented in a separate file in the paidAction folder with an interface that defines the following functionality:

getCost - returns the cost of the action given the action's arguments so that an invoice can be created
perform - inserts the action's records leaving them in a PENDING state with reference to the corresponding invoiceId
onPaid - transitions the records from perform to a PAID state and does any side effects (e.g. denormalization)

A lot of care will need to be taken wrt atomicity of state transitions and the performance of making PENDING actions appear PAID selectively.
To avoid having to serialize state transitions, we are using optimistic concurrency control.

This PR is being completed in stages:

[x] make all actions work with custodial funds
[x] make all pessimistic actions work
[x] make all optimistic actions work
[x] modify all queries to filter out PENDING actions expect if the actor is viewing them
[x] notifications for failed payments
[ ] fix all the missing things

[ ] todos scattered throughout
[ ] zap undos
[ ] delete/remindme bot toasts
[x] territory unarchive and transfer?

[x] ux of failed post/comment payments (perhaps where edit XX:XX usually is we can have payment status)
[ ] wot and materialized view consequences
[ ] retries?
[ ] freebies with attached wallets?
[ ] find solution to pending payment edits?
[ ] insane amounts of testing

@SocketSecurity ignore npm/<EMAIL_ADDRESS>@SocketSecurity ignore npm/<EMAIL_ADDRESS>@SocketSecurity ignore npm/<EMAIL_ADDRESS>@SocketSecurity ignore npm/<EMAIL_ADDRESS>@SocketSecurity ignore<EMAIL_ADDRESS>

Awesome review! I'm working on retries now and hoping to have those done by the end of the weekend. I'll incorporate your advice/thoughts as continue to do more passes over the code.

However, would be nice if we could test the behavior though instead of relying solely on documentation.

I realized we can test this using two psql sessions:
https://github.com/stackernews/stacker.news/assets/27162016/879da578-d491-4f2b-a9c7-5ab7bb13822b
As you can see, the second transaction tries to update the same item but blocks. I included WHERE msats = X to simulate the where condition no longer matching after the first transaction committed its update. So when the first transaction commits, the second transaction no longer finds the row and returns UPDATE 0.
So I am more confident that indeed only one worker will be able to proceed after UPDATE "Invoice" SET "actionState" = 'PAID' WHERE id = $1 AND "actionState" = 'PENDING', assuming Prisma really does throw here as mentioned in their docs.

Excellent! I was planning to run that test myself to extra confirm (I've also been running several workers locally and seeing them contend for the transition and only having one succeed).

So I am more confident that indeed only one worker will be able to proceed after UPDATE "Invoice" SET "actionState" = 'PAID' WHERE id = $1 AND "actionState" = 'PENDING', assuming Prisma really does throw here as mentioned in their docs.

You're right. I think we'll want to avoid assuming this and explicitly check ourselves - just in case prisma decides to change that.

@ekzyis this is ready for final review now. I'm going to review it again myself tonight, then I'll merge it tomorrow.

Excellent review! You caught a lot of good stuff


V3.1.25 will not progress beyond user input screen

When attempting to test V3.1.25, the test will not continue when "OK" is clicked at the bottom of the user input screen.  Clicking repeatedly, waiting, hitting the "enter" key all attempted with no success.

I can second this.  I needed to close the window via the "X" in the title bar to continue.

We are able to reproduce this and will have a fixed version released very soon.


Minor CSS consistency changes.

use lowercase color values
use color names when possible
remove duplicate property
remove units from zeros

Thanks for the suggestion. Unfortunately, this element is no longer maintained since GitHub shipped this as a built-in feature


Exception during startup not supported

If you receive a
[
{
"name": "message.error",
"silentAbort": false,
"title": "Error",
"message": "Something went wrong!"
}
]
during startup, you only see an endless loading progress circle.

how do I trigger such an error during startup?

Simply change the DemoApplication:
public DemoApplication(UILauncher pLauncher) throws Throwable
{
	super(pLauncher);

if (true) throw new Exception("Something went wrong!");

works for me. possibly also fixed while fixing FS#8706?

This ticket opened 15 Nov. the ticket that probably fixed this issue was closed 23 Nov.


UNSAFE_componentWillReceiveProps lifecycle method now throws a warning in newer versions of React

The visibility component is using UNSAFE_componentWillReceiveProps . This now gives a warning.
https://github.com/Semantic-Org/Semantic-UI-React/blob/master/src/behaviors/Visibility/Visibility.js#L191

this is a bug

Similar issue using a Tab component. In a clean environment with an empty (or not) <Tab /> we get:
Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state

Please update the following components: Menu, Tab

@levithomason @layershifter now the React has changed these UNSAFE_* lifecycle methods to show as warnings in newer versions of React, I think it would probably be good for us to go in and update these. componentDidUpdate I believe is the recommended method to reach for now. I did not see anything in progress or noted stating that we want to work on this... but I may have missed it. Thoughts?

Other areas we are using this lifecycle method:

https://github.com/Semantic-Org/Semantic-UI-React/blob/dd66e920a845c199ad2cc05ddec38293a235ec20/src/addons/TransitionablePortal/TransitionablePortal.js
https://github.com/Semantic-Org/Semantic-UI-React/blob/128e95d3241eb024d4409e7d64d15ea254cf3ed6/src/modules/Transition/TransitionGroup.js
https://github.com/Semantic-Org/Semantic-UI-React/blob/dd66e920a845c199ad2cc05ddec38293a235ec20/src/modules/Transition/Transition.js
https://github.com/Semantic-Org/Semantic-UI-React/blob/071f918f73e3c23dd051dbb8f0f90a1e03bed51f/src/modules/Search/Search.js
https://github.com/Semantic-Org/Semantic-UI-React/blob/62d2feda4c89bb604ab39e3ae5d44f4b78769e7b/src/modules/Sticky/Sticky.js
https://github.com/Semantic-Org/Semantic-UI-React/blob/72c45080e4f20b531fda2e3e430e384083d6766b/src/lib/AutoControlledComponent.js
https://github.com/Semantic-Org/Semantic-UI-React/blob/62d2feda4c89bb604ab39e3ae5d44f4b78769e7b/src/behaviors/Visibility/Visibility.js
https://github.com/Semantic-Org/Semantic-UI-React/blob/62d2feda4c89bb604ab39e3ae5d44f4b78769e7b/src/modules/Dropdown/Dropdown.js

For anyone else landing here... this is a dev mode only warning and lifecycle methods will continue to function in React 17+ with the UNSAFE_ prefix.

FYI: https://github.com/Semantic-Org/Semantic-UI-React/pull/3956

Was fixed in<EMAIL_ADDRESS>🎉


Fix forced features typo

Fixes a typo made in https://github.com/iFixit/growthbook-php/pull/2/commits/72700bbec1155c979f3deab9ff072c0e38489a62

We can wait on https://github.com/growthbook/growthbook-php/pull/26 and merge that in too.

QA 🟢

deploy_block 🌯 in case you wanted to wait for https://github.com/growthbook/growthbook-php/pull/26

Lets wait for https://github.com/growthbook/growthbook-php/pull/26. This would require changes in our PHP app too, and I don't think its worth an entire fork for this change.


[TableRow] [TableRowColumn] Propagate events

Fixes #1783, as mentioned in the comments

@ccomb Hey!
Thanks for seeing to this. Looks good to me :+1:
@callemall/material-ui double check and merge this bad boy!

O.O I can't believe this behavior was missing :scream: :scream:

Thanks a lot @ccomb :+1: :heart_eyes:

:+1:

Awesome, thanks! :+1: Will there be a new version released soon with this fix?

:+1:

This costs me hours to debug and I finally found this issue. The documented onRow/onCell props don't seem to work. Any updates on when this will be released?

:+1:
This fix works perfectly, can we get an npm release with this?

This will come out in the next release guys, check the milestone for progress.

@ccomb - this PR breaks the highlight styling for checkboxes in tables. Try the docs site with #3492 applied: https://github.com/callemall/material-ui/issues/3714
We also reverted #3505 - I prepared a fix for the regression it introduced, but it was dependant on this PR, so we had to revert them both.

@mbrookes  I found that by just replacing styles.root with styles.cell in this line, the checkbox cell highlighting works again.

:+1: Please submit a new PR with a working implementation and we'll have another look.

I didn't understand the link with #3505 . Should I include it again in the new PR?

The fix for the regression that #3505 introduced depends on this PR, so we couldn't include #3505 in the release either.
Once this PR is fixed, we can reapply #3505, with the regression it's regression fixed.

Ok thx so I'll just reapply #3492

You'll need to rebase, fix the regression, update the docs to show the props that this change introduces (remove @ignore), check that the prop signatures are correct, double check for additional regressions, check again :smile:, then submit a new PR.


Add a CacheKeyApolloResolver based on ApolloResolver (incubating)

Related to #5964.
Also tweaked the doc/kdoc a little bit.

Oh my I forgot we had both ApolloResolver and CacheResolver... This is becoming quite hairy

Yeah 😅 It will probably make sense to break compatibility at some near point and when that comes, we can keep only one of them.

Yea, it's -incubating + @ApolloExperimental. At some point it's too much detail.


Fix bad config property in privacy.md

Thank you for your interest in contributing! For general guidelines, please refer to
the contributing guide.
Before filing a pull request, make sure to do the following:

[x] Create a new issue at https://github.com/GoogleContainerTools/jib/issues/new/choose.
[x] Ensure that your implementation plan is approved by the team.
[x] Verify that integration tests and unit tests are passing after the change.
[x] Address all checkstyle issues. Refer to
the style guide.

This helps to reduce the chance of having a pull request rejected.
Fixes #4029 🛠

Thank you for fixing our documentation!


Updating IPFS CID

If I pressed enter after the nfts are generated where generator asks about ipfs CID. Is there any way to update the CID afterwards in all files?

No, you would need to generate them again.
I can send you a py file that can do it sometime soon, but the current program doesn't support it.


Multi-gpu?

My pytorch isn't the greatest.  I see that you can pass in the gpu ids via a command line flag, but I don't see that info used anywhere in the code base.  How is that setting used and where?

It's a pytorch lightning parameter. It is added to the parser by pytorch-lightning's Trainer.add_argparse_args() method (in main.py) and is passed to the training module itself as part of the trainer_opt variable.
You can see https://pytorch-lightning.readthedocs.io/en/stable/common/trainer.html for some details, though it's a bit convoluted.

I'm closing this as resolved. Feel free to reopen if you need more help.


Blinking LED in Raspberry Pi

Get start hello world in raspberry pi
What the program do ?
Get start blinking LED from Raspberry Pi
In what programming language it is written?
Python

This pull request do not contains files in specific folders. Please fix it and reopen


Add setting for number of files to show in list

Right now default is 30. It would be nice if users could change this to any value.

Hey Alex, I can work on the code changes for this. Had a couple of questions:

Do you think there should be a limit? (100, 1000 etc.).
Should this be a text field that is validated or a Select/Dropdown with numbers?

@sandeshan great questions!

Do you think there should be a limit? (100, 1000 etc.).

Hmm. Not that I think having over 1000 pdfs would cause issues, i just think that no one would get over 1000. So i think 1000 is a fine limit.

Should this be a text field that is validated or a Select/Dropdown with numbers?

Mine as well make it a validated input. Since there isnt a reason why we want to restrict the number users enter.
I also think that adding a reset settings to default button might be useful to add. I might create a new issue for that.

Created a PR with the change. Will try to address any feedback promptly. And I agree, a "Rest Settings" button would be useful but should be tackled separately.


chore: Reorder validation steps in pipeline template

Details
The current validation steps are
Motivation
Make it easier to determine the successful and failing cases. The cases are called out as succeeding or failing and are separately numbered to make it easier to add new cases to each in the future.
The success-3 case is currently failing due to #1713, so we will need to update the template once that is fixed. The final result can be found at https://dev.azure.com/accessibility-insights-private/Accessibility Insights (private)/_build/results?buildId=47465&view=results
Context

The commits here are intentionally small, which might help simplify the review process

Pull request checklist

[n/a] Addresses an existing issue:
[n/a] Added relevant unit test for your changes. (yarn test)
[n/a] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
[x] Ran precheckin (yarn precheckin)

Codecov Report

Merging #1824 (4d0db8b) into main (2199493) will not change coverage.
 Consider uploading reports for the commit f1e9ed5 to get more accurate results

@@           Coverage Diff           @@
##             main    #1824   +/-   ##
=======================================
  Coverage   94.52%   94.52%
=======================================
  Files          38       38
  Lines        1059     1059
  Branches      145      145
=======================================
  Hits         1001     1001
  Misses         58       58


Avoid duplicate naming

If a user regularly uses the column name as the metric name, the yaml spec becomes quite repetitive, can we make this any easier?
e.g.
        - name: NewCustPromoCost_USD
          description: "Total customers Promo Type Cost in USD."
          meta:
           measures:
             NewCustPromoCost_USD:
               type: sum
           dimension:
            enabled: false

full support on this one


Not really an issue....

I have added the $host field which may be is useful for these running several virtual Hosts on one Nginx instance to this excellent Graylog2 Content Pack. Find it here:
https://git.spainip.es/open-source/graylog_nginx_content_pack
I am not familiar with pull requests and stuff like this, so please someone feel free to take care of this, if you like my humble contribution.

I do the same in my version but base on $http_host. This is really useful.

@aiv maybe you can create a PR with that

Sure. I will do it in 2 days.

Thanks!


Is there a simple algorithmic way to navigate to a desired web page snapshot located in your archive?

I've played around with archivebox a few times in the past and I always run into a limitation related to the archive URL.
As per the documentation, and in reality, the archived URL will look something like this:
https://archive.example.com/archive/1493350273/en.wikipedia.org/wiki/Dining_philosophers_problem.html
That's great, and you can scroll through your archived web pages and find this, but it not very convenient for actually just browsing through to archived pages.  A method of doing this would be to use the Firefox Add-in Redirector to take all attempts to go to https://en.wikipedia.org/wiki/Dining_philosophers_problem.html and redirect them to https://archive.example.com/archive/1493350273/en.wikipedia.org/wiki/Dining_philosophers_problem.html except....the issue is that you must know the archive number, in above example,<PHONE_NUMBER>.
So, to my question as I've done a lot of searching on this topic with no luck.  Is there a 'permalink' to the most recent copy of an archived page such that you can automate the browsing of your archive without needing to know the archive number?
If might look something like these examples below:
https://archive.example.com/archive/mostrecent/en.wikipedia.org/wiki/Dining_philosophers_problem.html
https://archive.example.com/archive/single/mostrecent/en.wikipedia.org/wiki/Dining_philosophers_problem.html
https://archive.example.com/pdf/mostrecent/en.wikipedia.org/wiki/Dining_philosophers_problem.html
https://archive.example.com/readability/mostrecent/en.wikipedia.org/wiki/Dining_philosophers_problem.html

or any other simple algorithmic way to navigate to a desired web page snapshot located in your archive?  Any help much appreciated.

ArchiveBox doesn't offer proxy-replaying (aka seamless browsing with automatic redirecting to archived versions for every URL).
pywb's proxy-archiving feature would be a better fit for you than ArchiveBox: https://pywb.readthedocs.io/en/develop/manual/configuring.html#http-s-proxy-mode


DistributedReadingService Requirements

🚀 The feature
The followings are the requirements for DistributedReadingService

Automatic sharding

Shard based on Rank, WorldSize, num_workers

Determinism

Generate the same seed deterministically for all Shuffler per epoch.
Generate different seeds for process-local RNGs to perform different random transformation.

FullSyncDataPipe

For uneven dataset, we need to attach FullSyncDataPipe to stop iteration for all DataLoader2s when a DataLoader2 in any distributed process is depleted.
We can take advantage of https://pytorch.org/tutorials/advanced/generic_join.html#what-is-join as the counter and carry out an all-reduce per iteration to sync between distributed procesess.

Motivation, pitch
Make DataLoader2 working in distributed training with all syntax sugar.
Alternatives
No response
Additional context
No response

I believe this is implemented


Added jsx-no-lambda converter

PR Checklist

[x] Addresses an existing issue: fixes #523
[x] That issue was marked as status: accepting prs

Overview

Based on eslint-plugin-react, provides the correct converter for this rule.

jsx-no-lambda rule is not present in eslint-plugin-react, ref this thread https://github.com/yannickcr/eslint-plugin-react/issues/2176


Support read-only access to remote cache

Describe the feature you'd like to request
I think there is a valid use case to allow read only access to a remote cache.  For example your CI could be configured for read/write but devs on local machines should ONLY be able to READ if security is a concern (as is in our organization).
Describe the solution you'd like
Distinugish between TURBO_TOKEN and TURBO_READ_ONLY_TOKEN.   If a read only token is configured then PUTs to the cache are not attempted.
Describe alternatives you've considered
We are using one of the open source implementations of the turbo cache.   We deploy 2 instances of them and each are backed by the underlying same store (s3 via Min.io) such that they share the same artifacts.  The first instance is configured with a read/write token to the store and intended to be used by CI, then second instance is configured with a read only token via a policy on the store to prevent writes (intended for local devs).
The issue is that when using the first instance (w/ read & write) I get 100% cache hits for a given operation.   The second instance however returns a high number of intermittent cache misses (when there in fact should be hits) with dozens of the following error when running in verbose mode.
2022-05-05T08:57:03.651-0400 [DEBUG] run.analytics: failed to record cache usage analytics: error="skipping HTTP Request, too many failures have occurred"

The remote cache logs as expected return 403s whenever a PUT is attempted (as expected). I don't quite understand what is happening underneath the hood, but it appears that there is a correlation when configuring the store to reject writes for a given token and that turbo is backing off GET requests and falling over to a cache miss.  (At least that is my theory).
The alternative we're going to try is to have an nginx rule on the read only instance to intercept PUTs and simply return a 200 to see if turbo handles this better and enables a full read-only mode.
All this is a bit hand wavey so it would be awesome if there could be a supported path for this such that turbo itself doesn't assume READ and WRITE but can be configured as a READ only.

Don’t you mean —remote-only?

Currently, turbo will stop trying to use the remote cache after a couple of errors, which is probably what you are experiencing.
Treating the remote (or any) cache as readonly seems like a pretty reasonable feature request to me though. Our cache flags right now could use some cleanup, this might be a good opportunity to do so.

Thats good to hear, appreciate the consideration.  BTW turbo is amazing! The integration into our monorepo was drop dead simple, and we are reaping the benefits already!  Thank you for all your hard work.

@gsoltis Do you know where it stores information about giving up? And how to recover from it? I can't find any info about that.

Stumbled over this problem rn. Any news?

This was done in https://github.com/vercel/turbo/pull/6624


Google blocks Stackedit

Google blocks Stackedit because it tries to find out sensitive account information. Please correct this error.

I encountered the same error 'This app is blocked This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access.'

1

Yup, same problem.  Stackedit now effectively unusable.  This requires urgent attention or I'll be looking for a new editor

Yup, same problem. Stackedit now effectively unusable. This requires urgent attention or I'll be looking for a new editor

In my case, I am now using Obsidian. I have Google Drive in a PC folder, and from there, I created an Obsidian Vault to visualize all Markdown files.

:(
Yes
"This app is blocked. This app tried to access sensitive info in your Google Account."
Unfortunately, it is a severe issue.

Anybody knows any good alternative to this app?


_

Hi guoyo,
We are facing the same issue while using the WDC in tableau.
The cookie is not transferring from Interaction Phase to Gather Data Phase.
Can we have any solution for this?
Can you please explain how you resolved the issue in your scenerio?
Thanks,
hmrasi


fix: match non-english characters in variables + glossary terms

🧰 What's being changed?
Apparently RegEx's \w selector is seriously anglo-centric, and only matches against alphabetic language characters. (You can see the breakage here.) This renders both our variable and glossary components entirely useless in non-english language docs! That is 💩 y. And, as it turns out, quite easy to fix…

[x] Update our variable pattern to use Unicode \p{L} selector.

🧬 Testing
We can't directly test this till the change hits ReadMe proper, but you can see the pattern in action here. Browser support for the RegEx /u Unicode flag is pretty good too!

Yes, thanks for the reminder @erunion! (One day I'll ingrain TDD in to my soul, but that day has yet to come apparently…) Also, gonna make this pattern case-insensitive per @gkoberger's suggestion!


feat(biome_grit_formatter): initial infrastructure

Summary

Set up the basic infrastructure required for further work on #2476

Implementation

Run just new-crate biome_grit_formatter
Update Cargo.toml with relevant settings
Run just gen-formatter

Test Plan

Cross comparison with other Biome formatters.

The code generator created src/js, do we need to keep this or can it be removed?

This isn't correct. You have to update the codegen here:
https://github.com/biomejs/biome/blob/7095ed0c143212c9f649d3b6b326650ae0416d1d/xtask/codegen/src/formatter.rs#L785-L786

It's possible you'll have to update this too:
https://github.com/biomejs/biome/blob/7095ed0c143212c9f649d3b6b326650ae0416d1d/xtask/codegen/src/formatter.rs#L553-L559

@ematipico Thank you for the feedback, as always!
I think I understand it a bit better now, although I am still a bit unclear on how the GritQL nodes are best categorized. I'll re-iterate again soon.

I'm not sure if covering all of these should be in the scope of this PR.

Configuration
We need to add GritQL as a language in the configuration format, and let it support the common options around indentation, line length and type of newlines.

Add test suite
Introduce a can_format_grit_yet flag into biome_service
Comment placement
Handle biome ignore: format suppression comments in appropriate places

Additionally, I noticed that https://github.com/biomejs/biome/pull/1207 also added some additions like:

Readme
Git related
More...

I'm not sure if covering all of these should be in the scope of this PR

No, I think I'll just merge as is, and you can add options like this in follow-up PRs. That will allow us to iterate a bit faster, and you'll have to worry less about merge issues.

There just seems to be an issue with an unused dependency still.


Repeatedly request an API endpoint across different pages

Fixes #12 and #10

The above is from just the https://api.github.com/repos/username/reponame endpoint, can we not have it only print out open issues and not necessarily good first issue every time you just need a quick summary of the repo.

Alright I'm hoping to fix all code formatting requests as part of a GitHub Action soon, so I'll approve this PR and merge !!
Superb work @Manjunathravindra


Quick question about PointNeXt

Hi guocheng,
Thanks for your great work! The codebase is also clean and easy to use.
May I ask have you tried to use PointNeXt as an encoder backbone for 3d object detection task? According to my understanding, it should also observe the improvement.

no. i never worked on detection.
there is another issue asks for the same application. maybe you guys can have a talk.
https://github.com/guochengqian/PointNeXt/issues/78


Error | Numeric Pattern 107

Error in 'main' branch
Compiler: GCC
/usr/bin/ld: /tmp/ccmTsm0V.o: in function `main': 00:03
numericpattern107.c:(.text+0x6e): undefined reference to `pow' 00:03
/usr/bin/ld: numericpattern107.c:(.text+0xad): undefined reference to `pow' 00:03
collect2: error: ld returned 1 exit status

@aryashah2k Please look into this issue. The original committer @Srishti-Ahuja cannot be assigned on this issue as they are not a member in this organization.

@Srishti-Ahuja, I request you to please join the organization. Thanks for bringing this to my notice @ChlorinePentoxide . I will relay the same on the SWOC channel as well

Error in 'main' branch Compiler: GCC
/usr/bin/ld: /tmp/ccmTsm0V.o: in function `main': 00:03
numericpattern107.c:(.text+0x6e): undefined reference to `pow' 00:03
/usr/bin/ld: numericpattern107.c:(.text+0xad): undefined reference to `pow' 00:03
collect2: error: ld returned 1 exit status

@aryashah2k Please look into this issue. The original committer @Srishti-Ahuja cannot be assigned on this issue as they are not a member in this organization.

I think she hasnt included the #include<math.h> which is required for the pow function, and also the linker is unable to find the math library having the pow function.
it is usually resolved if we add -lm at the end of the gcc compile command

@aryashah2k The -lm flag is already included in the gcc compiler flags. Maybe it is something else.
Compilation command:
$ gcc -w -lm $file > /dev/null

Alright, if this single file is causing this error, I will try rectifying the code and let you know when you could try compiling it again

Error Rectified.


Gitea Pages

Feature Description
Recently i created Gitea action to automatically build repo for static pages. I needed same functionality as Github Pages and could not find it in Gitea. Thought after so many years of development Gitea would have it, but was surprised when i found out it still does not have such a simple functionality.
Please provide Github Pages alternative functionality in Gitea.
Screenshots
No response

Ignoring the valuation that it is "simple", we do currently note two viable alternatives that can be used with Gitea.
https://codeberg.org/Codeberg/pages-server
https://github.com/42wim/caddy-gitea
Also a duplicate of https://github.com/go-gitea/gitea/issues/302 and https://github.com/go-gitea/gitea/issues/23521 which have some additional commentary.


Remove Banner in Layout File

Changes:
Remove the reference to the banner in layouts/app.blade.php
Notes:
I purposefully left the original content as the issue comment was unclear to me if this would be added back in at a later stage

Thanks! I realized when I saw this pull request that I hadn’t given enough context in the original issue, so I added some more information there that hopefully would clarify.
https://github.com/tightenco/onramp/issues/192#issuecomment-615870891

@mattstauffer Updated, thanks for the clarification

Great work. Thanks @devingray!


Session metadata - calibration information is included

The water and laser calibration files are included in both the rig.json and session.json. They should be removed from the session.json

Resolved by https://github.com/AllenNeuralDynamics/dynamic-foraging-task/pull/405


Supporting Documents

Added

Added API call support for adding an uploaded document from a retailer  (158623202)
Added API call support for retrieving a dictionary of document types (158623202)

[Delivers #158623202]

@KrekoG CS changes made


Indices of polynomial regression components are wrong in interactive examples

All the p and p bar symbols in the interactive visualization of the polynomial regression model have index 1, but the index should range from 1 to 6.
For example, the first interactive plots says:
-2.00p_1 + -2.00p_1 + -2.00p_1 + -2.00p_1 + -2.00p_1 + -2.00p_1 = model
but I think it should be:
-2.00p_1 + -2.00p_2 + -2.00p_3 + -2.00p_4 + -2.00p_5 + -2.00p_6 = model
The other two interactive examples are the same (indices are wrong).

This also mentioned in #91


Error 404 when clicking link between two objects in graphical representation

Actual behaviour
Produces a serialized error.
{
"code": 404,
"message": "The provided role name could not be found in the database. You have requested this URI [/api/roles/name/attacker] but did you mean /api/roles/name/string:name or /api/roles/name/string:name/properties or /api/goals/name/string:name ?",
"status": "Object not found"
}
Steps to reproduce the behaviour
When you view the risk model and click the line between two elements (in this case the role and the attacker) it produces an error.
Operating Systems / Hardware
Ubuntu VPS (2gb RAM)

The problem here seems to be that, when generating the model, as redundant URL is being added to pydot.Edges.  Removing the URL seems to have fixed this problem, so I'm closing this issue.  Please re-open / comment if you spot similar issues elsewhere though.


question related to test_spdm_requester_encap_request

the below is what is running when launching 'run_initial_seed.sh'
./test_spdm_requester_encap_request ./seeds/test_spdm_requester_encap_request/encap_request.raw ./seeds/test_spdm_requester_encap_request/encap_request12.raw
and the output is as below:
libspdm_send_spdm_request[ffffffff] (0x4):
0000: 11 ea 00 00
libspdm_receive_spdm_response[ffffffff] (0x8):
0000: 11 6a 01 00 11 81 00 00
libspdm_send_spdm_request[ffffffff] (0x8):
0000: 11 eb 01 00 11 7f 07 81
libspdm_receive_spdm_response[ffffffff] (0x4):
0000: 11 6b 02 01
libspdm_send_spdm_request[ffffffff] (0x8):
0000: 11 eb 02 00 11 7f 07 eb
libspdm_receive_spdm_response[ffffffff] (0x4):
0000: 01 00 00 00
libspdm_send_spdm_request[ffffffff] (0x4):
0000: 12 ea 00 00
libspdm_receive_spdm_response[ffffffff] (0x8):
0000: 11 6a 01 00 11 81 00 00
is the above bold response is a valid response? if not and it is an error (as i think it should be) it should also be mark as error in 'libspdm_receive_response' flow, right?
BTW, if the command is ran with swapped files, there is no issue and the output is:
./test_spdm_requester_encap_request ./seeds/test_spdm_requester_encap_request/encap_request12.raw ./seeds/test_spdm_requester_encap_request/encap_request.raw
libspdm_send_spdm_request[ffffffff] (0x4):
0000: 11 ea 00 00
libspdm_receive_spdm_response[ffffffff] (0x8):
0000: 12 6a 00 00 12 81 00 ff
libspdm_send_spdm_request[ffffffff] (0x4):
0000: 12 ea 00 00
libspdm_receive_spdm_response[ffffffff] (0x8):
0000: 12 6a 00 00 12 81 00 ff
libspdm_send_spdm_request[ffffffff] (0x8):
0000: 12 eb 00 00 12 7f 07 81
libspdm_receive_spdm_response[ffffffff] (0x8):
0000: 12 6b 00 00 00 00 39 66

Please tell me your build steps. I hope I can recurrent it

The bold does not have matching version, it should be treated as invalid response.

I am checking this lissues


CheckedContinuation: Add resume(with: Result) for parity with UnsafeContinuation

@swift-ci Please test