handheld-daemon: 1.1.0 -> 2.6.2

Description of changes
Lots of changes since this is a pretty big update, but some of the bigger ones are support for more devices, support for tdp settings and gamescope overlay (using packages not in nixpkgs yet)  as well as switching to the gpl v3 from the mit license.
https://github.com/hhd-dev/hhd/compare/v1.1.0...v2.6.2

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Something that I have noticed that doesn't work is the controller hiding udev rules.
They run chmod 000 on the original controller so that apps only see the controller managed by hhd, however that fails for some reason. If you manually run chmod on the devices, they get hidden.
Here's an example of a udev rule generated by hhd:
# Hides device gamepad devices stemming from input33
# Managed by HHD, this file will be autoremoved during configuration changes.
SUBSYSTEMS=="input", KERNELS=="input33", ATTRS{id/vendor}=="045e", ATTRS{id/product}=="028e", GOTO="hhd_valid"
GOTO="hhd_end"
LABEL="hhd_valid"
KERNEL=="js[0-9]*|event[0-9]*", SUBSYSTEM=="input", MODE="000", GROUP="root", TAG-="uaccess", RUN+="/bin/chmod 000 /dev/input/%k"
LABEL="hhd_end"

Didn't remember that /bin is empty in NixOS :sweat_smile:

Thanks for doing this!
I've fallen behind on the update train in large part because I know newer versions of handheld-daemon have iio rules that I haven't gotten around to testing.  (Also, I've just been busy with life stuff and not doing much gaming/tinkering.)  Here was the first blush at making them work.
What device(s) have you tested your upgrade on?
Please also include release notes, as linked in the PR template.

I've added the service with
  services.handheld-daemon = {
    enable = true;
    user = username;
    package = (pkgs.callPackage ../../apps/handheld-daemon/package.nix { }).override {
    };
  };

And the daemon runs...
But what should happen now, or how could I test it (on my ROG Ally)? 😊

https://hhd.dev/ can connect to the daemon.

I've fallen behind on the update train in large part because I know newer versions of handheld-daemon have iio rules that I haven't gotten around to testing. (Also, I've just been busy with life stuff and not doing much gaming/tinkering.) Here was the first blush at making them work.

Haven't really tested iio anything since my device doesn't use it as far as I know.

What device(s) have you tested your upgrade on?

A 2023 gpd win max 2 with the 7840u

Please also include release notes, as linked in the PR template.
Handheld daemon is already in the release notes?

Isn't handheld daemon is already in the release notes?

I guess it's only for major/breaking changes… 🤷♂
Sorry, I'm new to this too…

@pbek On a Legion Go, the most obvious signs that it's working are that the LED lights turn blue (the default PlayStation color) and both the top face buttons (Legion) and bottom face buttons (start+select) work.
I don't know enough about the ROG Ally to give similar advice, but if you open your Steam controller settings and see a DualShock, that's a good sign it's working.
Are you on unstable or testing this PR specifically?

@pbek On a Legion Go, the most obvious signs that it's working are that the LED lights turn blue (the default PlayStation color) and both the top face buttons (Legion) and bottom face buttons (start+select) work.

Hm, did LEDs didn't do anything and the start and select buttons already did work without hhd in steam and games run by steam. 🤔

I don't know enough about the ROG Ally to give similar advice, but if you open your Steam controller settings and see a DualShock, that's a good sign it's working.

I can still see the XBOX 360 controller, like without hhd.

Are you on unstable or testing this PR specifically?

Unstable, I just added the package.nix of this PR to my config, and I am using it in the service.
https://github.com/pbek/nixcfg/blob/516955f501644e14c7d0486b5bd1e090b9915c33/flake.nix#L157-L169
I was interested in making use of the additional two front facing buttons of the ROG Ally and something like brightness control...

I don't know enough about the ROG Ally to give similar advice, but if you open your Steam controller settings and see a DualShock, that's a good sign it's working.

I can still see the XBOX 360 controller, like without hhd.

Have you set controller emulation to dualsense in hhd.dev?

Toast's device activates the hrtrigger and creates the proper dir so that has been tested in fact

ROG Ally also uses the hrtrigger, and there will be appropriate logs showing if it works

@toast003 I don't have scope to test this right now.  If you tell me the current PR works as expected, I'm happy to merge this for you.
Also feel free to make yourself a maintainer of this lib if you so choose.

@appsforartists the color of the leds no longer changes due to the playstation driver, the top buttons of the ally are start select
@pbek hhd fixes the bottom buttons of the ally to be guide and xbox + a in legacy mode (which opens the side menu in steam). However in the new version if you launch gamescope, it will detect that and connect to the X11 socket and send the command to open the side menu directly.
As for controlling the leds, if steam launches in the Deck UI, it will take control of them and change their colors, also allow setting them in the settings. In the legion go, the leds persist across reboots, in other devices they reset every boot. So if steam is not running you lose LED control for now.
A UI for the LEDs is planned.

Have you set controller emulation to dualsense in hhd.dev?

I have

ROG Ally also uses the hrtrigger, and there will be appropriate logs showing if it works

I can't see any of those logs with  sudo journalctl -b -e.
I can only see lots of those:
Apr 15 20:17:16 ally2 hhd[12787]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 15: warning: setlocale: LC_COLLATE: cannot change locale (de_AT.UTF-8): No such file or directory
Apr 15 20:17:16 ally2 hhd[12787]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 16: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
Apr 15 20:17:16 ally2 hhd[12787]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 21: warning: setlocale: LC_NUMERIC: cannot change locale (de_AT.UTF-8): No such file or directory
Apr 15 20:17:16 ally2 hhd[12787]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 24: warning: setlocale: LC_TIME: cannot change locale (de_AT.UTF-8): No such file or directory
Apr 15 20:17:18 ally2 hhd[12794]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 15: warning: setlocale: LC_COLLATE: cannot change locale (de_AT.UTF-8): No such file or directory
Apr 15 20:17:18 ally2 hhd[12794]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 16: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory

Before merging, please bump the version that fixes this bug that was introduced by localization

hhd fixes the bottom buttons of the ally to be guide

Ah, I see. Thank you!

Have you set controller emulation to dualsense in hhd.dev?

I have

ROG Ally also uses the hrtrigger, and there will be appropriate logs showing if it works

I can't see any of those logs with  sudo journalctl -b -e.
I can only see lots of those:
Apr 15 20:17:16 ally2 hhd[12787]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 15: warning: setlocale: LC_COLLATE: cannot change locale (de_AT.UTF-8): No such file or directory
Apr 15 20:17:16 ally2 hhd[12787]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 16: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
Apr 15 20:17:16 ally2 hhd[12787]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 21: warning: setlocale: LC_NUMERIC: cannot change locale (de_AT.UTF-8): No such file or directory
Apr 15 20:17:16 ally2 hhd[12787]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 24: warning: setlocale: LC_TIME: cannot change locale (de_AT.UTF-8): No such file or directory
Apr 15 20:17:18 ally2 hhd[12794]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 15: warning: setlocale: LC_COLLATE: cannot change locale (de_AT.UTF-8): No such file or directory
Apr 15 20:17:18 ally2 hhd[12794]: /nix/store/5gldb5b71w2qk073xcvkpbzliwdwv29p-set-environment: line 16: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory

I have this too, however I see it too on other programs too (ssh when running a command iirc) so I assumed it wasn't an hhd issue

The logs are generated by this function:
https://github.com/hhd-dev/hhd/blob/79d8414f7c1a6a1f2e1deaec70d6dff5449298fe/src/hhd/http/i18n.py#L12-L33
I thought it wouldnt cause issues so I called it every time the api would update (every 2 seconds). It turns out both the login shell, and as it seems the locale command generate logs in some machines, crowding journalctl. So I only made it to apply on startup.
So it will still show the error, but only once.

Yeah @antheas 2.6.4 fixes the log spam

@toast003 I don't have scope to test this right now. If you tell me the current PR works as expected, I'm happy to merge this for you after you update that comment edit.

I can't test gyro since it gets upset after suspending, but everything else seems to work well

Also feel free to make yourself a maintainer of this lib if you so choose.

Do I do it on a separate pr or is it ok to do it here?

I can't test gyro since it gets upset after suspending, but everything else seems to work well

Somebody needs to look into that. GPD 4 has the same issue. Other devices (such as the Ally) do not. Maybe its bmi260 related I do not know. A combination of hrtrigger and that. We know that doing rmmod before suspend and modprobe after fixes it.

If that's the case we could add that into nixos-hardware, but that's a topic for another time

Do I do it on a separate pr or is it ok to do it here?

If you're already a nix maintainer, I'm happy to accept the change in this PR.  If you're not, you might need a separate one to get added to the maintainers list.

I am not in the maintainers list so I'll go and do it on a separate pr

This pr should be ready tho

Thanks.
Can you please push the commit with the inlined comments:
Ahh no, I meant the other way. 🙃

Leave your comment where it is and move my comment inside the block:

postPatch = ''
  # handheld-daemon contains a fork of the python module `hid`, so this hook
  # is borrowed from the `hid` derivation.
  hidapi=${ hidapi }/lib/
  test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; }
  sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py

  # The generated udev rules point to /bin/chroot, which does not exist in NixOS
  chmod=${ toybox }/bin/chmod
  sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py
'';

and then I'll approve?

@NickCao - any chance you wanna merge this one too?

Wdym @appsforartists ?
It builds just fine

As the comment states, this was originally cargo-culted from @AndersonTorres's postPatch in hid; however:
    # handheld-daemon contains a fork of the python module `hid`, so this hook
    # is borrowed from the `hid` derivation.
    substituteInPlace src/hhd/controller/lib/hid.py \
      --replace-fail libhidapi ${hidapi}/lib/libhidapi
    hidapi=${hidapi}/lib/
    test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; }

uses hidapi, then defines it, then tests for it (after it's already been used).
The hidapi declaration should come first (and fixed-up as necessary so you don't end up with any weirdness like /lib/lib).

Also, this whole refactoring thing feels like it's needlessly blocking the merge.
@NickCao, would you be amenable to merging this as it originally was with sed, and then @toast003 can break the substituteInPlace refactor into a new PR that includes both these sites, as well as the original in hid?

substituteInPlace doesn't use the hidapi bash variable that gets declared later, but I can put it on top

I don't mind, if that was the only issue I could do it here but whatever is best

Wut??

I misunderstood - I was reading that as a nix variable, not a bash one.
I do think we should change hid and this in sync, so the hooks continue to match, but I really don't like scope creep.

@NickCao, would you be amenable to merging this as it originally was with sed

Fine.

Ok @NickCao undid the refactor, you can merge now

With the "not refactored" sed solution, substituting doesn't actually seem to work (paths still seem to map to /bin/chmod, etc.), switching to the substituteInPlace fully resolved it - and it can even be seen on the native controller hiding properly.
So from my side the reverted refactor looks fine. Could we get an update on it? Currently the package is half-broken due to it.

I wanted to get https://github.com/NixOS/nixpkgs/pull/305027 ready before doing the refactor but I have been very busy lately (and will be until exams are done) so I haven't really had the energy to work on nix things :sweat_smile: .
I checked the package's results and paths are being changed, so I'm confused on why it isn't for you.


TEVENTS not being saved on the item

build house (multi)
on the brass sign, it will add (ei_house_sign), which is dialog for housing. (added to the sign via itemdef)
save sphere
reboot sphere
check brass sign
TEVENT is no longer there

Changing TEVENT to EVENT, it will save it fine.

It's working fine for me, are you sure you are using correct command to check? You need to use .xshow TEVENTS to check TEVENTS?

It still looking fine for me, I created house, turned it to customizable house,
Before Restart:

After Restart:

Could you try it with this build;
https://github.com/Sphereserver/Source-X/actions/runs/8680991381
maybe it was fixed, while I am fixing another things.

Hmm didnt help. I wonder what can cause this on script side. Doesnt make sense to me.

Ok, got it. For some reason I had defname=i_sign_brass for 3 different signs. Even tho they are custom itemdefs with ID of original.
Thanks for help!

Ok, got it. For some reason I had defname=i_sign_brass for 3 different signs. Even tho they are custom itemdefs with ID of original.
Thanks for help!

Didn't you get a console error for that?

Nope, I think its because the items are scripted fine, only has same defnames, which for custom items work like alternative name or something, not sure 100%.

Normaly on boot you should have a warning like "redefining i_sign_brass"

I think you get that error message only when setting a defname as an argument to the itemdef section header, i feel we should add a warning also when overwriting with a duplicate defname inside the section itself


Riccati solver suggest

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

TensorFlow version (you are using): 1.7.0
Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.
The Discrete/Continuous Algebraic Riccati Equation is very important to linear quadratic regulator system. A solution of solving this need to be implemented in Tensorflow if one wants to combine machine learning with control theory.
The solver has been implemented in Matlab/Scipy etc. But there are also possibilities to implement in Tensorflow CPU/GPU.
Will this change the current api? How?
No
Who will benefit with this feature?
Those who wants to combine control theory with machine learning and deep leanring
Any Other info.

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.

I believe that a Ricatti solver can be written using the existing linear algebra primitives in tf.linalg. I'm not sure such a solver belongs in TensorFlow itself. If there are lower-level algorithms missing from tf.linalg that make this difficult, please let us know.


Question signup with signup code

I wanted to know if there any examples to have a signup use signup code or has anyone else done this?

There's something about it here but simply to pick up a signup code from a URL.
There's also something here about using fields' asynchronous validation to verify codes... this comment seems the more close to your needs.
Please consider it's an old post...
But there's nothing about DB management, since it won't fit everyone's use case! ;-)


copyparty.service configuration issue?

Not sure if this is an issue or I'm just too n00b, but I added copyparty to my home server raspberry pi and following the instructions in the contrib/copyparty.service I got something working, but thumbnails would not generate/display correctly.
In the end I managed to make it work by changing RestrictSUIDSGID=true to false, as I noticed in the logs the service was failing to create the directories for the thumbnail database, but otherwise it add access to the files just fine, including uploading new ones and deleting ones from the web interface.
The directory I was using for copyparty was /mnt/SSD which maps to an usb SSD drive I have attached to the pi, ext4. It is not created/owned by the copyparty user/group, but it gives every user all permissions (777) so I imagine that was not the issue.
Lastly, minor, the instructions in copyparty.service do not mention to create the /var/lib/copyparty directory but I figured that was needed too.

Hey, and thanks for using copyparty 😁 👍
This is a bit of a headscratcher, so I'd like to try reproducing it -- what linux distribution are you running on the pi, and what version? Mainly asking because some distros have stuff like selinux and apparmor which tends to cause issues like this.
Glad to hear you got it working tho :>

Just vanilla raspbian, latest version, nothing fancy.
pi@raspberrypi:/mnt $ hostnamectl
Static hostname: raspberrypi
Icon name: computer
Machine ID:<PHONE_NUMBER>9d45a0b35a2289c16c5958
Boot ID: b11417b2862b411c8ac00de69c7c6e5c
Operating System: Raspbian GNU/Linux 11 (bullseye)
Kernel: Linux 6.1.54-v7+
Architecture: arm
It's so unfancy I never even added an user other than the default "pi". These are the permissions of my /mnt/SSD
drwxrwxrwx  5 pi   pi   4096 Jun 23 21:10 SSD
And this is how I set that up in fstab:
external ext4 (exfat has problems with samba, slow due to not supporting fallocate) SSD hard drive
for exfat set up for rw access for everyone umask=111, for ext4 just chown -R  pi:pi the mount point
PARTUUID=1375cf2e-a9d8-475f-b282-6712bcfb5640 /mnt/SSD ext4 defaults,noatime,nofail,nodiratime 0 1
copyparty.conf and .service are basically the ones in /contrib, untouched, just changed /mnt to /mnt/SSD in .config, added an user/password, and then I followed all the instructions in the .service, but as mentioned I needed to create by hand /var/lib/copyparty and then I needed to change that RestrictSUIDSGID otherwise I could see in the log that the creation of the .hist/... directory structure for the thumbnails was failing.
Anyhow. Maybe it's just easy to add a note in the .service instructions that if people are encountering issues with thumbnails, they can try changing that RestrictSUIDSGID=true to false and see if it helps...

alright, so let's start with the easy part -- /var/lib/copyparty should have gotten created automatically, and I assumed useradd would do that, but turns out it doesn't unless you also specify -m... D'oh!
but the really confusing part is why RestrictSUIDSGID=true would affect thumbnails; I've been racking my brain and can't think of a reason it would be related at all. But it's a good idea to add a hint that the hardening could cause some unanticipated behavior, so I followed your suggestion on that :>

copyparty is a breath of fresh air, I wish I found it earlier!

haha thanks 😁 awesome to hear you're finding it useful!
do let me know if you hit any more issues 👍 👍


Provide a link to nullable context explanation

The docs for the Nullable compiler option use the term "nullable context" six times without defining it. One or more of them should link to where nullable context is defined.
Without that definition the following paragraph from the Nullable option docs makes no sense:

The argument must be one of enable, disable, warnings, or annotations. The enable argument enables the nullable context. Specifying disable will disable the nullable context. When providing the warnings argument the nullable warning context is enabled. When specifying the annotations argument, the nullable annotation context is enabled.

Even with the definition the above paragraph could be improved to distinguish the separate contexts better (i.e., nullable context vs. nullable warning context vs. nullable annotation context).

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: e548e000-8190-b1bb-51fd-7e7b2d5bcb45
Version Independent ID: 19f59267-c4c1-eb0e-7e48-45ffd6e2d9d1
Content: C# Compiler Options - language feature rules
Content Source: docs/csharp/language-reference/compiler-options/language.md
Product: dotnet-csharp
Technology: csharp-language-reference
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

Thanks @menees
This should be fixed in #32951 (Currently in review).


Destroy on SSH does not cleanup .chef/provisioning/ssh

Not sure if this is our issue or something we need to fix in the ssh driver but yeah we should have a clean env after a destroy.

I agree.. We could address it on the Rakefile for now but at the end I think it belongs to the SSH Driver.

Yes lets do that and i'll file a ticket on ssh too and link here.

@double-z what about this issue?


[Idea]: Similar to OpenCV, Index based Camera Device Capture

Issue guidelines

[X] I've read the Issue Guidelines and wholeheartedly agree.

Issue Checklist

[X] I have searched open or closed issues and found nothing related to my idea.
[X] I have read the Documentation and it doesn't mention anything about my idea.
[X] To my best knowledge, my idea wouldn't break something for other users.

Describe your Idea
Currently, DeFFcode users have to manually assign device name or its path using source parameter and the demuxer using source_demuxer parameter of the respective API for the given input device. And thereby makes this feature less user-friendly, and complicated for everyday user who might find it extremely difficult to replicate.
This issue will track the Index based Camera Device Capture feature, which implements Device Indexing (similar to OpenCV),  where the user just have to assign device index as integer (-n to n-1th) in source parameter of DeFFcode APIs to directly access the  given input device, thus making things much simpler.
Use Cases
The Index based Camera Device Capture feature implements Device Indexing (similar to OpenCV),  where the user just have to assign device index as integer (-n to n-1th) in source parameter of DeFFcode APIs to directly access the  given input device in few seconds.
This feature is much better than manually Identifying and Specifying Video Capture Device Name/Path and suitable Demuxer on different OS platforms, thus minimizing perceived complexity of decoding Live Feed Devices.
Any other Relevant Information?
No response

Successfully resolved and merged in commit https://github.com/abhiTronix/deffcode/commit/589ece3b0731c287579b37e4c8a8d20937e20dc7


Add settings.json editing via the code CLI

I would like to be able to edit the settings.json file via the code cli. The way I envision this working would be the following API:
# Add a single setting to the settings.json. If setting exists, prompt to overwrite unless `--force` is present or value is the same.
code --modify-setting [SETTING ID]=[VALUE]
# Remove a single setting to the settings.json. Removing the setting from the settings.json is the same as setting it back to default.
code --reset-setting [SETTING ID]
# add one or more settings to the settings.json from a JSON file. This would merge settings with any that exist, and prompt for each that would overwrite a setting that already exists unless `--force` is present or value is the same.
code --merge-settings-from-file [PATH TO JSON FILE]
# Remove all existing settings and replace them with the specified file. Prompt if settings.json isn't empty unless `--force` is present.
code --replace-settings-from-file [PATH TO JSON FILE]

e.g.
code --modify-setting editor.tabSize=2
code --reset-setting editor.tabSize
code --merge-settings-from-file ~/companyVSCodeSettings.json
code --replace-settings-from-file ~/companyVSCodeSettings.json

Adding the ability to change the settings.json file via the CLI would greatly help with scripts designed for first time machine set up, or for periodic settings sync between multiple employees to a company standard (e.g. if the company policy changes Tab Size from 4 to 2, the company could provide a quick CLI command to edit everyones machines to match)

@rzhao271 I'll let you decide whether to mark this as Backlog / On Deck

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding, and happy coding!

I'd also love this ability.
I created a quick-and-dirty bash alias to do this myself though using the jq JSON processor: https://gist.github.com/Nezteb/9eb91294e0ad8dc12fc03f6863023e09

I'd also love this ability.
I created a quick-and-dirty bash alias to do this myself though using the jq JSON processor: https://gist.github.com/Nezteb/9eb91294e0ad8dc12fc03f6863023e09

Awesome, I will have to give this a go as the feature request is closed as unplanned. Thank you 😊

This would be great. AFAICS jq cannot be used without risk, since it does not support json5 style json (with comments, etc) - which is what vs code supports.
So using jq means risk, since it cant support the format properly, it only supports the old vanilla json standard (sans comments, and so on). I dont think anyone wants to loose their edits to their settings.json. :-)
Still searching for an ok workaround to this. Nice script @Nezteb  - if I find another approach that does not use jq, I may propose an edit to it.


Under what path should these data sets be placed?

In what path should these data sets be placed to function properly?

我也有相同的疑问，而且我用了那个预处理命令，感觉不太对。

你好！您可以尝试在此处打印sequence_path变量以查看它们是否正确。 https://github.com/astra-vision/MonoScene/blob/master/monoscene/data/semantic_kitti/preprocess.py#L58

好的 我成功解决了 感谢

这个问题我已解决，但是可视化ｋｉｔｔｉ是第三视角的，不是论文展示的这样的第一视角，这个应该如何调整

Sorry, I don't speak Chinese. I don't understand your question? I think we showed third view in the paper.


[feat]: hiding specific code

I have some code that I don't want users to make changes to.
Can it be prohibited from being modified or directly hidden?

for example

I hope the<template>cannot be changed, only the<script> can be changed.

Or his entire page cannot be changed, but it can be displayed on the page (<template> and <script> ),The file he introduced can be changed on the code page. And it takes effect immediately.

Can add a feature that disable everything

But if you just want to disable the editing of some code snippets, codemirror shouldn't be able to do it. I haven't heard of any code editor that can do it.

But if you just want to disable the editing of some code snippets, codemirror shouldn't be able to do it. I haven't heard of any code editor that can do it.

Can the second method be implemented?

But if you just want to disable the editing of some code snippets, codemirror shouldn't be able to do it. I haven't heard of any code editor that can do it.

Can the second method be implemented?

hide something ?

i want to have to file:

Load unchanged content, but do not display it in the code editor.
loading on code editor, user can change it.

I haven't thought of a good way to implement the function you mentioned. PR is welcome.

I haven't thought of a good way to implement the function you mentioned. PR is welcome.

ok, I am not sure if this can be achieved, but the requirements and ideas are as follows. I can try PR after learning.

First understand this : https://github.com/vuejs/repl


asn1 encoding routines:ASN1_mbstring_ncopy:invalid utf8string:.\crypto\asn1\a_mbstr.c:132:

command:
openssl req -x509 -newkey rsa:1024 -subj "/CN=中文/OU=中文/O=中文/L=中文/ST=中文/C=CN" -passout pass:123456 -keyout private/S1234567_key.pem -out certs/S1234567.cer -outform PEM -days 365 -utf8
error message:
Loading 'screen' into random state - done
Generating a 1024 bit RSA private key
.......++++++
.....++++++

problems making Certificate Request
6004:error:0D07A086:asn1 encoding routines:ASN1_mbstring_ncopy:invalid utf8string:.\crypto\asn1\a_mbstr.c:132:
use openssl-1.0.1j

I just checked with the newly released 1.0.1r.  Works like a charm.  So my suggestion is to upgrade.

it's happened again in v1.0.2j :(


Allow older fee policies for some time to account for gossip propagation

Background
Currently, if a fee update is made to be higher than original, nodes that didn't see the gossip will have routing failures.
Your environment

version of lnd: LND 0.14.2-beta commit=v0.14.2-beta
which operating system (uname -a on *Nix): N/A
version of btcd, bitcoind, or other backend: N/A

Steps to reproduce

Update fee policy on channel X and Y
From a node that didn't see the gossip, pay an invoice channel X and Y being a hop
HTLC fails

Expected behaviour
For a period of time, older fee policies would be permitted.
Actual behaviour
Only current fee policy is permitted.

I think this would have to be optional given situations like opening a channel to a new peer, you can't currently set the initial fee rate so potentially you would allow a lot of liquidity to drain out to the new peer at the initial too-low fee rate
Potentially the policy setting could simply have more api instrumentation so you could have an application drive this functionality interactively, like maybe you want to allow small traffic through at the old fee rate but large traffic you want to put the brakes on, or any arbitrary logic you'd want

I think this would have to be optional given situations like opening a channel to a new peer, you can't currently set the initial fee rate so potentially you would allow a lot of liquidity to drain out to the new peer at the initial too-low fee rate

For now, an API/command line option for this could work out well.


pigpio PWM problem when duty cycle = 0.0

This causes a test failure in test_real_pins.py for duty cycle 0.0.  It seems that setting a pigpio PWM pin to state 0.0 leaves it floating / turns off its "output"-ness.  I'm not sure if the problem is with the input pin initialization, the test itself not setting pre-conditions appropriately, or the PWM on the test_pin starting at 0 and maybe getting turned off or failing a "state changed" condition that kicks it into gear.
This demonstrates the issue:
import gpiozero
from gpiozero.pins.pigpiod import PiGPIOPin

# Place a jumper across these two pins.
# Physical pins # 13 and 15 on a B+
test_pin = PiGPIOPin(22)
input_pin = PiGPIOPin(27)

test_pin.function = 'output'
test_pin.frequency = 100

# I think something is wrong with this line
# see: http://abyz.co.uk/rpi/pigpio/python.html#set_PWM_dutycycle
# "Starts (non-zero dutycycle) or stops (0) PWM pulses on the GPIO."
test_pin.state = 0.0

raw_input("do your measurements, replace the jumper, then press enter")

# test pin appears to be floating, not 0 as expected.
# input pin is at 3.3 volts

# Fails
assert input_pin.state == False

I found this while trying to resolve issue #521 and running test_real_pins.py.
Weirdly, inserting any non-zero duty cycle before the "0.0" value causes the test to pass.
for duty_cycle in (0.0, 0.1, 0.5, 1.0):
    # test fails for PiGPIOPins

for duty_cycle in(0.3, 0.0, 0.1, 0.5, 1.0):
    # now the test passes

/cc @joan2937

Okay.  That is a fault within pigpio.
A change of PWM from dutycycle 0 to dutycycle 0 is in effect a NOP and the GPIO level is not initialised.  If it was last set high it will stay high.
2017-04-24 09:35:42 myGpioSetPwm: myGpioSetPwm 22 from 0 to 0

I will think about an appropriate fix.
For information.
$ pigs csi 5
$ cat /dev/pigerr
2017-04-24 09:35:42 gpioNotifyOpenInBand: fd=5
2017-04-24 09:35:42 gpioRead_Bits_0_31:
2017-04-24 09:35:42 gpioHardwareRevision:
2017-04-24 09:35:42 gpioSetMode: gpio=22 mode=0
2017-04-24 09:35:42 gpioSetPullUpDown: gpio=22 pud=0
2017-04-24 09:35:42 gpioGlitchFilter: gpio=22 steady=0
2017-04-24 09:35:42 gpioSetMode: gpio=27 mode=0
2017-04-24 09:35:42 gpioSetPullUpDown: gpio=27 pud=0
2017-04-24 09:35:42 gpioGlitchFilter: gpio=27 steady=0
2017-04-24 09:35:42 gpioSetMode: gpio=22 mode=1
2017-04-24 09:35:42 gpioSetPWMfrequency: gpio=22 frequency=100
2017-04-24 09:35:42 gpioSetPWMrange: gpio=22 range=10000
2017-04-24 09:35:42 gpioPWM: gpio=22 dutycycle=0
2017-04-24 09:35:42 myGpioSetPwm: myGpioSetPwm 22 from 0 to 0
2017-04-24 09:35:42 gpioGetPWMrange: gpio=22
2017-04-24 09:35:42 gpioGetPWMdutycycle: gpio=22
2017-04-24 09:35:44 gpioRead: gpio=27
2017-04-24 09:35:44 gpioNotifyClose: handle=0

Should now be fixed in pigpio V62.


ESLint Added - Client

What:
Eslint Added to client (Still have some warning)

Why:
Linting tools like ESLint allow developers to discover problems with their JavaScript code without executing it.

How:

Rules added and maybe need some rules in future
Checklist:

[x] Tests
[x] Ready to be merged

Don't need to add manual global(like window), use env.browser is ok
You can add jest to env to allow spec file

Codecov Report

Merging #75 into master will decrease coverage by 0.21%.
The diff coverage is 86.66%.

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
- Coverage   94.84%   94.63%   -0.22%
==========================================
  Files          20       20
  Lines         291      298       +7
  Branches       55       50       -5
==========================================
+ Hits          276      282       +6
- Misses         15       16       +1

No maintenance anymore?


Inventory API query return Type

I see this kind of code very often:
GridInventory gridInv= inventory.query(INVENTORY_TYPE.of(GridInventory.class));

Which is fine if you are sure you will get the specific type of inventory back.
But can also result in ClassCastException because the result can also be:

an empty inventory
a ResultInventoryAdapter with multiple inventories of that type

One idea to reduce confusion about this would be to return Inventory everywhere instead of <T extends Inventory> T
Opinions? other Ideas?

How about making ResultInventoryAdapter a final class with generic typing? Then the compiler won't even let you do a cast (without casting to Object first, which most people don't know about).
public interface Inventory {
    <E extends Inventory> ResultInventoryAdapter<E> query(Class<E> type);
    // other methods here
}

public interface GridInventory extends Inventory {}

// Because this is final, the compiler already knows the full hierarchy (excluding any mixin antics).
// So it can generate errors like the one below.
public final class ResultInventoryAdapter<E extends Inventory> implements Inventory {
    public <E2 extends Inventory> ResultInventoryAdapter<E2> query(Class<E2> type) {
        return new ResultInventoryAdapter<>();
    }
    // other methods here
}

public void test(Inventory anyInventoryObject) {
    // Compiler errors here: "Inconvertible types; cannot cast ResultInventoryAdapter to GridInventory"
    GridInventory inv = (GridInventory) anyInventoryObject.query(GridInventory.class);
}


update flatpicker deps to fix hidden time picker bug

Addresses issue https://github.com/Matsuuu/lit-flatpickr/issues/2

Hi Joel,
I had completely forgotten about this package and the issue. Glad to see you fixed it so swiftly!
Glad to see the package in use :)
Might actually update this and optimize it some day in the future.
The commits look good to me so I'll merge them and publish a new release tonight

Hi Joel,
I had completely forgotten about this package and the issue. Glad to see you fixed it so swiftly!
Glad to see the package in use :)
Might actually update this and optimize it some day in the future.
The commits look good to me so I'll merge them and publish a new release tonight

@JoelGraham93 https://www.npmjs.com/package/lit-flatpickr 0.2.5 released

@JoelGraham93 https://www.npmjs.com/package/lit-flatpickr 0.2.5 released

@JoelGraham93 https://www.npmjs.com/package/lit-flatpickr 0.2.5 released

Awesome! Thanks for the quick turn around :)

@JoelGraham93 https://www.npmjs.com/package/lit-flatpickr 0.2.5 released

Awesome! Thanks for the quick turn around :)


Error "request signature does not match" in docker build

While troubleshooting another issue, I'm getting intermittent failures when trying to download a file from PyPI. I've gone to the netifaces project and found the source file URL for the latest version (netifaces-0.11.0.tar.gz). I downloaded the file in one environment, but needed it in a Linux environment, so created this docker file:
FROM jaraco/multipy-tox

RUN pipx install httpie
RUN http https://files.pythonhosted.org/packages/a6/91/86a6eac449ddfae239e93ffc1918cf33fd9bab35c04d1e963b311e347a73/netifaces-0.11.0.tar.gz

When I build that file, I get the following:

 draft $ docker build --no-cache --progress plain .
pypi/warehouse#1 [internal] load build definition from Dockerfile
pypi/warehouse#1 sha256:45cdf4a0d3c13eec3e3eee801bcdeabc79a6bd6c31b932948ceba681c19a379f
pypi/warehouse#1 transferring dockerfile: 236B done
pypi/warehouse#1 DONE 0.0s

pypi/warehouse#2 [internal] load .dockerignore
pypi/warehouse#2 sha256:2f53bf71ca425d8b0cab4302f38b5bbfe98f422372dd31e6b9a9b1525ef7149c
pypi/warehouse#2 transferring context: 2B done
pypi/warehouse#2 DONE 0.0s

pypi/warehouse#3 [internal] load metadata for docker.io/jaraco/multipy-tox:latest
pypi/warehouse#3 sha256:f99bb5b255811eb5e0f34320a22686fd80d95c00183c070bbbbd89d1ab9edebe
pypi/warehouse#3 DONE 0.0s

pypi/warehouse#4 [1/3] FROM docker.io/jaraco/multipy-tox
pypi/warehouse#4 sha256:6d547c8e790803b81751627135b715e872a53824cb7b59ca5cda8bdbb227b897
pypi/warehouse#4 CACHED

pypi/warehouse#5 [2/3] RUN pipx install httpie
pypi/warehouse#5 sha256:e4331792e715ba4e6453fb3d4aa344c15e4155afccf34804ced7561d93e5fd44
pypi/warehouse#5 0.234 creating virtual environment...
pypi/warehouse#5 0.275 installing httpie...
pypi/warehouse#5 4.622   installed package httpie 3.2.1, installed using Python 3.11.0rc1
pypi/warehouse#5 4.622   These apps are now globally available
pypi/warehouse#5 4.622     - http
pypi/warehouse#5 4.622     - httpie
pypi/warehouse#5 4.622     - https
pypi/warehouse#5 4.622 done! ✨ 🌟 ✨
pypi/warehouse#5 DONE 4.7s

pypi/warehouse#6 [3/3] RUN http https://files.pythonhosted.org/packages/a6/91/86a6eac449ddfae239e93ffc1918cf33fd9bab35c04d1e963b311e347a73/netifaces-0.11.0.tar.gz
pypi/warehouse#6 sha256:7a080ea1ed046076fe2ac044f5af8de21be7c0aac41c98ef01512678583ffb89
pypi/warehouse#6 0.559 <?xml version='1.0' encoding='UTF-8'?><Error>SignatureDoesNotMatch<Message>The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.</Message><StringToSign>POST
pypi/warehouse#6 0.559
pypi/warehouse#6 0.559 application/json
pypi/warehouse#6 0.559 Mon, 05 Sep 2022 14:19:08 GMT
pypi/warehouse#6 0.559 /pypi-files/packages/a6/91/86a6eac449ddfae239e93ffc1918cf33fd9bab35c04d1e963b311e347a73/netifaces-0.11.0.tar.gz</StringToSign></Error>#6 DONE 0.6s

pypi/warehouse#7 exporting to image
pypi/warehouse#7 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00
pypi/warehouse#7 exporting layers
pypi/warehouse#7 exporting layers 0.1s done
pypi/warehouse#7 writing image sha256:e897f3a1550025b72c3ee0b0fef8a515004eaeeeeb5f201afc06f59bc6805a69 done
pypi/warehouse#7 DONE 0.2s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

In particular, the request fails with:
pypi/warehouse#6 [3/3] RUN http https://files.pythonhosted.org/packages/a6/91/86a6eac449ddfae239e93ffc1918cf33fd9bab35c04d1e963b311e347a73/netifaces-0.11.0.tar.gz
pypi/warehouse#6 sha256:7a080ea1ed046076fe2ac044f5af8de21be7c0aac41c98ef01512678583ffb89
pypi/warehouse#6 0.559 <?xml version='1.0' encoding='UTF-8'?><Error>SignatureDoesNotMatch<Message>The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.</Message><StringToSign>POST
pypi/warehouse#6 0.559
pypi/warehouse#6 0.559 application/json
pypi/warehouse#6 0.559 Mon, 05 Sep 2022 14:19:08 GMT
pypi/warehouse#6 0.559 /pypi-files/packages/a6/91/86a6eac449ddfae239e93ffc1918cf33fd9bab35c04d1e963b311e347a73/netifaces-0.11.0.tar.gz</StringToSign></Error>#6 DONE 0.6s

Curiously, if I run the same http command interactively or as part of the CMD, it works.
The error message seems a little suspicious, as I'm not contacting Google and I'm not supplying a secret key nor signing anything, so it seems to me it's something between warehouse and its backend that's failing.

Thanks for the issue. We should just be bouncing POST requests at the CDN. I've transferred this to https://github.com/pypi/infra/issues/102 accordingly.


Starting point for 256 colors

Closes #6
Starts Closing #5

Isn't vendoring in libraries bad form?

For now (since we aren't doing releases) we kind of want it so go get works


Rename targets to make native only the default option

Currently eBPF for Windows has the "default" targets of Release and Debug targeting the JIT mode version and the non-default version for what ship.
Proposal is to rename as follows:
NativeOnlyDebug -> Debug
NativeOnlyRelease -> Release
Debug -> DebugExperimental
Release -> ReleaseExperimental
This will make it much clearer for folks to understand what version is intended for use vs what version is for experimental features.

This is a work-around for a limitation in an external tool that only build Debug and Release targets.

Closed as not needed.

Still needed.


[Question] Reverse proxy with subdir/subdomain

Apart from onion domain, which is easier to setup with multiple directions, how can I arrange this setup on clearnet? When I tried a standard approach with Nginx and subdir, app seemed to lack static content on the browser. Is there some config variable to serve as a base url?

Currently there is no option to change the base url, but this will be definitely added in the next releases. Using a subdomain should be most convenient way to do it at this time.


MongoFormat for BaseMoney

@sphereio/backend please review

reflects the json tests: https://github.com/sphereio/sphere-scala-libs/blob/master/json/src/test/scala/io/sphere/json/MoneyMarshallingSpec.scala


Azure Kubernetes Service (AKS) doesn't support multiple node types in a single cluster

With a Jenkins instance and its workers entirely located in one Azure Kubernetes Service (AKS) cluster, the limitation of only having one node pool causes problems in a research software testing case. It forces a compromise in terms of the node specification, which makes the instance both cost- and function-impaired. Specifying the virtual machine (VM) size to cater for the largest tests would then require at least one instance of that VM to be running full-time, which would be expensive - on the order of US$1k per month for a 32-core node, for example.
The fix for this would be for AKS to support multiple nodepools and provide a learning pathway to configure Jenkins in a way that makes use of this based on node labelling in the Jenkinsfile.

I think this is a good example of a solution that's far too complex and costly for a scientific programmer who doesn't have a systems background. Yes, it's technically elegant, but there are much simpler solutions that will do the job just fine. This is probably a good example of something for a non-systems-technical researcher to avoid.


Add other keys

(I mean like this block)
Add all the function keys (f1, f2, f3, f4, etc)
Add Alt key
Add Tab key

you could also add it to the vm right?

you could also add it to the vm right?

Yeah, Garbo could add it to ioDevices. I think some of the keys may be specific enough not to need it though (just using events)

i mean having the alt key would be nice 🫠

 (I mean like this block) Add all the function keys (f1, f2, f3, f4, etc) Add Alt key Add Tab key

I don't entirely know if this is allowed, but there's this rejected extension that will report any key
`// Name: Key Press Extension
// ID: keypressed
// Description: It has a reporter block reporting what key has been pressed, allowing for more supported keys and easier detection
// By: snowboyz0825 https://scratch.mit.edu/users/Dat_Snow_Kid/
// Mostly by chatGPT, I just added a few edits after training the chatbot to code extensions. I take no creative credit.
class KeyPressExtension {
constructor(runtime) {
this.runtime = runtime;
this.currentKey = null;
// Attach event listener for keydown and keyup events
document.addEventListener('keydown', this.handleKeyDown.bind(this));
document.addEventListener('keyup', this.handleKeyUp.bind(this));
}
getInfo() {
return {
id: 'keyPress',
name: 'Key Press Extension',
blocks: [
{
opcode: 'getCurrentKey',
blockType: Scratch.BlockType.REPORTER,
text: 'current key',
arguments: {},
},
],
};
}
getCurrentKey() {
return this.currentKey || 'No key pressed';
}
handleKeyDown(event) {
// Get the name of the pressed key
this.currentKey = event.key;
this.runtime.requestRedraw(); // Notify Scratch to update the block value
}
handleKeyUp() {
// Reset the currentKey when the key is released
this.currentKey = null;
this.runtime.requestRedraw(); // Notify Scratch to update the block value
}
}
Scratch.extensions.register(new KeyPressExtension());
`

 (I mean like this block) Add all the function keys (f1, f2, f3, f4, etc) Add Alt key Add Tab key

https://github.com/snowboyz0825/snowscodestuff/blob/main/keypressed.js
This extension should work on virtually any key


Adjust package json to allow for publishing on npm / yarn

need to update package name and creator name


Any way to have sticky header without shadow (elevation)

I am using 5.0.0-rc3.
The header seems always to have the shadow (elevation). Is there a way to make the header flat?
mRecyclerView.addItemDecoration(new FlexibleItemDecoration(getActivity())
.withDefaultDivider(R.layout.recycler_simple_item));
mAdapter.setLongPressDragEnabled(false)
.setHandleDragEnabled(false)
.setSwipeEnabled(false)
.setStickyHeaderElevation(0)
.setUnlinkAllItemsOnRemoveHeaders(true)
.setDisplayHeadersAtStartUp(true)
.setStickyHeaders(true);

I created the adapter with item decorator for divider only and I also tied different value on HeaderElevation, for example, setStickyHeaderElevation(0) or commented out // setStickyHeaderElevation(0) but all looks the same.
Any idea?
Thanks

From my wiki page Headers-and-Sections #Transparency-elevation-and-offset.

In the wiki page it says that you can either set the value from the layout file or call setStickyHeaderElevation().
I did both but nothing changed, the header shadow is still there

@IstrateAndrei, try to set both to 0. As per now, the logic of removing elevation requires both 0.


Respect poetry lock files?

How would this feature be useful?
When installing poetry via poetry itself, it respects poetry.lock file that contains some locked dependencies that are not locked in poetry's pyproject.toml.
I was having troubles while pipx install ./my-local-poetry-fork. poetry's pyproject.toml contains unlocked dependency poetry-core = { git = "https://github.com/python-poetry/poetry-core", branch = "master"} while lock file contains locked version of it
[[package]]
name = "poetry-core"
version = "1.1.0a0"
description = "Poetry PEP 517 Build Backend"
category = "main"
optional = false
python-versions = "^3.6"
develop = false

So poetry install gives poetry-core==1.1.0a0whilepipx installgives latestpoetry-coremaster which is now==1.1.0a3` that breaks poetry installation.
Describe the solution you'd like
Reuse locked dependencies from poetry.lock somehow?
Describe alternatives you've considered
For now I had to copy locked dependency version from poetry.lock to pyproject.toml
Maybe this issue is with poetry package as they are doing bad things leaving poetry-core@master tag in pyproject.toml?

IMP installing from a lock file is a good idea, but installing from poetry.lock is not. Lock files are considered an implementation detail of the tool (Poetry in this case), almost entirely undocumented, and subject to change across versions. This will be a rabbit hole too deep to go down IMO.
When Python ever gets a standard lock file format (hint hint), pipx should support installing from it (exactly how it should do it is another discussion).

@uranusjr yeah now I see this. I guess pip would support standartized lock files and pipx will just pass it as a PACKAGE_SPEC to pip.

For now, the best solution would be to poetry export to a temporary directory and do pipx install main-package-to-expose --pip-args="-c $PATH_TO_EXPORT".
For directly installing into pip, you can do pip install main-package-to-expose -c <(poetry export) in bash, but pipx currently doesn’t seem to pipe stdin to subprocess, unfortunately 🙂


Prevent entering duplicate actor names

Currently, the user can add multiple actors with the same name. We should discourage this by only allowing unique names. In order to do that, we need to add a middle name attribute.
WDLL

validate Actor to have unique surnames scoped to first and middle name
add middle name to Actor record
add middle name to Azure response
add middle name to display name

This will be fixed in #530 because we will have a unique ID (PSU access account or ORCiD) to identify the actor. There is still the problem of duplicate display names, which can be resolved in another ticket.


Move parsing optimization from ChannelDataArrayBlock to Channel

The optimizations that create Numpy types appear to be done for every ChannelDataArrayBlock. These aren't really specific to a particular data block, and should probably be done once and cached in the parent Channel or its parser object.

To clarify how this is being implemented:
the changes in #49 added EventArray._npType, which defines a numpy compatible type for the EventArray's data.  This is also compatible with the minMeanMax data, so the implementation in #66 uses that datatype to generate minMeanMax values instead of the parser.


add withDefault feature to Focus

withDefault(...) allows to fall back to a value in case the Option is a None.
case class User(name: String, address: Option[Address])
case class Address(streetNumber: Int, postcode: String)

val elise = User("Elise", Some(Address(12, "high street")))
val bob   = User("bob"  , None)

elise.focus(_.address.some.streetNumber).replace(24)
// res: User = User("Elise", Some(Address(24, "high street")))

// no-op address is None
bob.focus(_.address.some.streetNumber).replace(24)
// res: User = User("bob", None)

// same as some
elise.focus(_.address.witdDefault(Address(1, "")).streetNumber).replace(24)
// res: User = User("Elise", Some(Address(24, "high street")))

// same as some
bob.focus(_.address.witdDefault(Address(1, "")).streetNumber).replace(24)
// res: User = User("bob", Some(Address(24, "")))

withDefault generates an Iso which is not completely correct see example here https://github.com/optics-dev/Monocle/blob/a6506a3623455936947220ef15bb071c478727e3/core/shared/src/main/scala/monocle/std/Option.scala#L25-L41

Other synonyms for this behaviour out there in programming land:

getOrElse in the Scala library
?? in C#, Javascript, Swift, Dart
?: in Kotlin

I quite like getOrElse, it will make the effect clear to most Scala devs.
You're right, we'll not be able to add operators to Focus forever. They need to be popular enough to warrant inclusion. I think that's the case of withDefault/getOrElse it is one of the most requested feature in Monocle today.
Maybe we one way to keep us in check is to require that each focus operator corresponds to one method on all optics/apply optics:
Focus(_.foo.op) == Focus(_.foo).op

This way the API is consistent and it is so painful to maintain that we will not want to do it often. What do you think?

Ah yes, I completely missed the name collision issue. Maybe we deprioritize this feature withDefault / getOrElse to let us more time to think about it. What do you think?


Enhance installation & documentation

I'm not sure if I am misunderstanding how this library is supposed to be used, or if the documentation could be improved?
Why does this install as a Role?  How does one use it as a Module/Plugin?
Expected Behavior

Install via ansible-galaxy install -r requirements.yml --roles-path roles
pip install -r requirements.txt
Use the kafka_libs module in playbook tasks from project top level. (Writing playbook tasks that use kafka_libs as the module. Not adding it as a Role in the playbook.)

Actual Behavior
Above would result in

ERROR! couldn't resolve module/action 'kafka_lib'. This often indicates a misspelling, missing collection, or incorrect module path.

If I manually moved/copied the module files, it seemed to work?

mv ./roles/kafka_lib/library/* ./library/
mv ./roles/kafka_lib/module_utils ./plugins/

But that seems like it may not be the best way?
Specifications

Library version: 0.10.0
Result of pip list command:
Kafka version:
Python version: Python 2.7.16
OS:

hmm... and the above doesn't quite work.  the location of module_utils must be wrong.
fatal: [redacted]: FAILED! => {"msg": "Could not find imported module support code for kafka_lib.  Looked for either ACLOperation.py or acl_operation.py"}

Hello,
Yes the installation and usage are not that great.
Can you please precise:

your Ansible version
a reproductible playbook

FWIW, here my current playbook:
- name: install Zookeeper, Kafka
  hosts: kafka, zookeeper
  roles:
    - name: kafka_lib
      tags: kafka
    - name: zookeeper
      tags: zookeeper
    - name: kafka
      tags: kafka
    - name: beats
      tags: beats
  post_tasks:
    - block:
      - delegate_to: <IP_ADDRESS>
        run_once: true
        name: create topics
        kafka_lib:
          resource: "topic"
          api_version: "2.1.0"
          name: "{{ item.name }}"
          partitions: "{{ item.partitions }}"
          replica_factor: "{{ item.replica_factor }}"
          options: "{{ item.options | default(omit) }}"
          state: "{{ item.state }}"
          zookeeper: "{% for host in groups['zookeeper'] %}{{ hostvars[host]['ansible_host'] }}:2181{% if not loop.last %},{% endif %}{% endfor %}"
          bootstrap_servers: "{% for host in groups['kafka'] %}{{ hostvars[host]['ansible_host'] }}:{{ kafka_port }}{% if not loop.last %},{% endif %}{% endfor %}"
        with_items: "{{ kafka_topics }}"
      tags: topic

before doing tasks with kafka_lib. maybe that should have been obvious?

I will dig a little more into it, maybe we can make things better.

Getting ImportError: No module named kafka.errors at the moment... but i might be able to track that down.

Just make sure you are using the requirements.txt file from the 0.10.0 tag (if you are using the 0.10.0 version of this lib), since I upgraded those on the current (unreleased) master branch.

I think what I'm currently seeing with the ImportError is that the remote host does not yet have the pip requirements installed.  The local host does, and when I change the tasks to be a local_action they do not give that error. (At the moment still only running with --check, so have not yet confirmed correct execution.)
Also now seeing "missing required arguments: api_version" on the ACL tasks. I don't think the examples in the Readme for ACL include that.  Easy to fix my tasks, but would probably be useful to add to the docs examples.

I think what I'm currently seeing with the ImportError is that the remote host does not yet have the pip requirements installed. The local host does, and when I change the tasks to be a local_action they do not give that error. (At the moment still only running with --check, so have not yet confirmed correct execution.)

Yes, you're right.

Also now seeing "missing required arguments: api_version" on the ACL tasks. I don't think the examples in the Readme for ACL include that. Easy to fix my tasks, but would probably be useful to add to the docs examples.

This is listed in https://github.com/StephenSorriaux/ansible-kafka-admin/issues/48. Thank you for your feedback, it really helps to understand where newcomers might get stuck and what is lacking in the current documentation.

Closed. Now this library can be installed with ansible-collections and @StephenSorriaux added some real-life examples.


Cannot deploy a Cron Job workload

On 2.6-head commit id: c2d8e32

Deploy a cronjob workload - cron - * * * * *
Save changes made
Error on UI: Cannot read properties of undefined (reading '0')
Error in console

impl.js:182 CreateEditView mixin failed to save:  TypeError: Cannot read properties of undefined (reading '0')
    at f.saveWorkload (index.vue:581:1)
    at child-hook.js:37:34
    at d (runtime.js:45:40)
    at Generator._invoke (runtime.js:274:22)
    at Generator.O.forEach.t.<computed> [as next] (runtime.js:97:21)
    at r (asyncToGenerator.js:3:20)
    at l (asyncToGenerator.js:25:9)

On 2.6-head commit id: c2d8e32
I am able to deploy Cron Job type workload with no error


v4.3.2 upgrade camera snapshot unavailable

Hi since i upgraded to v4.3.2 from v4.3.1 the camera snapshot unavailable now?
Is there something I need to go to get it running again?
I'm sure it's a simple fix for me but I'm unsure what to do about it.
I know the changes:
Change enable_snapshots config option to snapshot_mode (fix for addon upgrade issue)
I also have this error in the entity:
Preview of the Front Door Camera Snapshot camera.
This entity is currently unavailable and is an orphan to a removed, changed or dysfunctional integration or device.
If the entity is no longer in use, you can clean it up by removing it.
So I'm guessing I need to enable something.
Thanks for you time

The "snapshot_mode" option should be set to one of the available snapshot modes (it's no longer just true/false but various modes to set the desired snapshot refresh behavior):
https://github.com/tsightler/ring-mqtt-ha-addon/blob/master/DOCS.md#snapshot-options

The "snapshot_mode" option should be set to one of the available snapshot modes (it's no longer just true/false but various modes to set the desired snapshot refresh behavior):
https://github.com/tsightler/ring-mqtt-ha-addon/blob/master/DOCS.md#snapshot-options

wow thanks for the quick replay and the solution!!
amazing work, thanks :)


feat: Add an AI-Assistant Wasm plugin for POC

Ⅰ. Describe what this PR did
Implement a basic AI assistant Wasm plugin.

Use Moonshot AI as the AI service provider.
Upload a document to the provider and set the return fileId in the plugin.
Configure a route pointing to https://api.moonshot.cn/.
Send a request to the /query endpoint of the route with a prompt message:
a. GET /query?content=xxxxx
b. POST /query
{ "content": "xxx" }

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 38.12%. Comparing base (08e5678) to head (3c2c202).

Additional details and impacted files

@@           Coverage Diff           @@
##             main     #894   +/-   ##
=======================================
  Coverage   38.12%   38.12%
=======================================
  Files          61       61
  Lines       10438    10438
=======================================
  Hits         3980     3980
  Misses       6158     6158
  Partials      300      300


Explain effective redshift distribution in docs

Add your issue here
Add an explanation about the effective redshift distribution of sources when sampling from the discretised matter density shells.
This should help clear up the confusion of redshifts_from_nz() vs. redshift().

This link could potentially appear in the warning text in the future.

-- https://github.com/glass-dev/glass/pull/333#issuecomment-2397221853


ThaliCore: BrowseRelay doesn't release virtual sockets

The virtual sockets created by BrowseRelay.didAcceptConnectionHandler() are never released and the associated streams are not closed properly because BrowseRelay.didSocketDisconnectHandler() doesn't get called.
The reason why it's not called is because the TCPListener sets  newSocket.autoDisconnectOnClosedReadStream = false that prevents the socketDidDisconnect() handler to be called.
If newSocket.autoDisconnectOnClosedReadStream is set to true, BrowseRelay.didAcceptConnectionHandler() is called and a deadlock occurs because of this bug.

Another case of VirtualSocket not released properly occurs when didSocketDisconnectHandler() is called before both the input and the output streams have been setup.


Microphone Access in Embedded CCP Not Working (Chrome/Firefox)

Hi,
I have embedded my CCP panel in a static webpage hosted by CloudFront/S3 (via Lambda@Edge). I have configured an SAML instance and set up the appropriate connections with my IDP.
When I navigate to the static page I call my connect.core.initCCP with the following params:
ccpUrl: https://(region).console.aws.amazon.com/connect/federate/(instance id)?destination=%2Fconnect%2Fccp-v2
loginUrl: (my saml SSO url)
loginPopup: true
region:
softphone: { alllowFramedSoftphone: true }
When the softphone initializes a new page is popped open and it redirects through my IDP to the softphone. The softphone successfully initializes and I am logged in - the browser then asks if it can access my systems speakers/microphone (I click accept). This tab stays open.
In the main tab my softphone initializes as expected. The problem I face is as follows: If I close the second tab my softphone indicates that the Microphone is no longer accessible.

Even if I manually update the browser settings to allow the microphone it still shows the error above. If I add loginPopupAutoClose it also gives the above error.
I believe this is likely because the iframe that is launching the CCP needs access to the microphone and for some reason it is not taking the instructions from the browser. Has anyone seen an issue like this before? It seems similar to #271 but the behavior I am seeing is more limiting.

Hi Robert,
I was successfully able to reproduce what you are experiencing. The issue is with your CCP URL. It should be in the form of "https://${instanceAlias}.awsapps.com/connect/ccp-v2". Please update that value and let me know if that solves your problem.

@efh365 thank you. This seems to solve a problem. Once i have updated the CCP URL the iframe is failing to frame the softphone. Per the screenshot below it appears that the content-security-policy does not include the whitelisted domains that I have configured for my instance which is why the iframe is not loading. This appears to be more of a CloudFront related problem but its unclear.

Closing this issue. The original issue was correctly solved by @efh365 . The iframe denial was due to the fact that my edge lambda for my CloudFront had a Referrer-Policy set to same-origin which (by the looks of things) was preventing information from being sent to the iframe. After removing this header I am able to get the desired results.


Node-hid dependecy update because of prebuilds for node 14

There is a new version of node-hid (1.3.0 instead of the currently used 1.2.0). It has a bugfix, but more important it has prebuilds for node 14, which 1.2.0 does not have. Therefor it would be really nice to have this dependency update.

Sorry, I just saw that node-hid has a 1.3.0 release on github, but on npm it is still 1.2.0. I opened an issue (https://github.com/node-hid/node-hid/issues/377) and will reply here, when the version is finally on npm.

There isn't anything this library needs to do to support this. npm will install and use node-hid 1.3.0 once it is published.
You will just need to do a npm upgrade or something to update the child-dependencies you have in your package-lock.json

Sorry, my mistake. Best Regards


Make it possible to only have one month open at a time instead of two

this is done using the useRange, I would suggest some more information about this on the documentation because it's unclear, it also messes up the styling


Circular dependency in p2p.kademlia

What is wrong?
When importing p2p.kademlia module there appears circular dependency between two modules: p2p.kademlia and trinity.config. That happens because of the following import statement:
from trinity._utils.validation import validate_enode_uri

Here is an example of output of the error that appears:
Traceback (most recent call last):
  File "transaction.py", line 18, in <module>
    from p2p.kademlia import Node
  File "/home/gosha/workspace/anaconda3/envs/ethereum/lib/python3.7/site-packages/p2p/kademlia.py", line 33, in <module>
    from trinity._utils.validation import validate_enode_uri
  File "/home/gosha/workspace/anaconda3/envs/ethereum/lib/python3.7/site-packages/trinity/__init__.py", line 29, in <module>
    from .main import (  # noqa: F401
  File "/home/gosha/workspace/anaconda3/envs/ethereum/lib/python3.7/site-packages/trinity/main.py", line 22, in <module>
    from trinity.bootstrap import (
  File "/home/gosha/workspace/anaconda3/envs/ethereum/lib/python3.7/site-packages/trinity/bootstrap.py", line 21, in <module>
    from trinity.initialization import (
  File "/home/gosha/workspace/anaconda3/envs/ethereum/lib/python3.7/site-packages/trinity/initialization.py", line 8, in <module>
    from trinity.config import (
  File "/home/gosha/workspace/anaconda3/envs/ethereum/lib/python3.7/site-packages/trinity/config.py", line 35, in <module>
    from p2p.kademlia import Node as KademliaNode
ImportError: cannot import name 'Node' from 'p2p.kademlia' (/home/gosha/workspace/anaconda3/envs/ethereum/lib/python3.7/site-packages/p2p/kademlia.py)

How can it be fixed
Either validate_enode_uri method should be moved to the p2p package (to the existent _utils module), or __name__ guard should be added to the __init__.py file of the trinity package.

If trinity needs this then potentially locate this in p2p.validation to keep it within the public API namespace.

That happens because of the following import statement:
from trinity._utils.validation import validate_enode_uri

Yeah, with an eye on eventually splitting p2p and trinity, I agree that it is a bug to import trinity from p2p.
It's a type of bug we have tolerated for a while, because there are a long list of p2p API improvements we'd like to make before that split. So cleaning up the "little things" hasn't been top of list.

I'm not sure how it would be better to resolve this issue...
The simplest solution will be just delete the validation of the uri in from_uri method, but doing so I seems to me wrong. Alternatively, the dependency can be removed by moving it to a separate package (like common, idk) or by duplication of the method in some module within p2p package (i.e. p2p.verification), but again none of them seems to me appropriate.
Also the import can be hacked by adding path to the trinity._utils.verification module to the system path and importing it as a normal module instead of as a sub-module. Or just adding __name__ guard to the __init__.py file of the trinity package. But doing so is awkward. And it only partially solves the problem.
Any suggestions?

The utility function should be moved to p2p.tools.enode (or some other appropriately named module) and then trinity should import from p2p.tools.<whatever>.


Decoder plugin using encodings from riscv-opcodes repository

Summary
The riscv-opcodes repository enumerates the instruction encodings of RISCV and contains scripts to convert them to several formats. These can be used to automatically decode the instruction encodings with minimal effort. A python plugin (which implements the pluggy decoder plugin specification as defined here) can leverage the same to ease overheads for new extensions. A sample decode plugin can be found here.

Added with PR#35


Redirection vs. -*Variable common parameters, and the limited usefulness of the data that is captured

I'm working on #6702 right now, normalizing the stream-related common parameters so that you can capture a stream in a variable or provide an ActionPreference for any stream, when I came across what appears to be a design bug.
It's easier to understand when looking at an example, so run this script first to get started:
# Capture a warning using redirection
$o1 = Write-Warning 'Message' 3>&1

# Capture a warning using -WarningVariable
$o2 = $null
Write-Warning 'Message' -WarningVariable o2

# Capture a warning using a -WarningVariable while silencing output via -WarningAction
$o3 = $null
Write-Warning 'Message' -WarningVariable o3 -WarningAction Ignore

# Capture a warning using a -WarningVariable while silencing output via redirection
$o4 = $null
Write-Warning 'Message' -WarningVariable o4 *>$null

# Look at the default output, and notice the rendering differences
$o1,$o2,$o3,$o4

# Look at the list output, and notice how the rendering differences persist
$o1,$o2,$o3,$o4 | Format-List * -Force

# Look at the string output, and notice that you can't tell at all that the messages
# came from warnings
$o1,$o2,$o3,$o4 | Out-String

While each of these commands are designed to capture warning records, there are several problems that this output illustrates, as follows:

All WarningRecord instances captured while redirection is used are decorated with additional information that is not captured when redirection is not used.
WarningRecord instances are indistinguishable from other output when converted to string, such as when the results of a command are captured and written to a log file.
PowerShell hosts not only apply specific colors to records from various streams, they also render additional text before the object data, even when that object data is displayed in its non-default format such as a list or a table.

The exact same behavior holds true for verbose and debug message streams, as can be seen through the PR that I am working on.
The first issue is not a huge issue, but it would probably be better if records captured via -*Variable common parameters were also properly decorated for proper output in a console.
The second and third issue are the more serious problem, because they limit the usefulness of capturing various types of stream data. Scripters who run a command and want to capture and review results from a log will find that much easier if output from different streams is properly identified in a black and white format with a prefix. This isn't just nice to have information: it's critical for scanning and searching purposes.
Digging into the technical details, part of the problems stem from these methods in the default host implementation:
   TypeName: System.Management.Automation.Internal.Host.InternalHostUserInterface
Name             MemberType Definition
----             ---------- ----------
Write            Method     void Write(string value), void Write(System.ConsoleColor foregroundColor, System.ConsoleColor backgroundColor, string value)
WriteDebugLine   Method     void WriteDebugLine(string message)
WriteErrorLine   Method     void WriteErrorLine(string value)
WriteInformation Method     void WriteInformation(System.Management.Automation.InformationRecord record)
WriteLine        Method     void WriteLine(), void WriteLine(string value), void WriteLine(System.ConsoleColor foregroundColor, System.ConsoleColor backgroundColor, string value)
WriteProgress    Method     void WriteProgress(long sourceId, System.Management.Automation.ProgressRecord record)
WriteVerboseLine Method     void WriteVerboseLine(string message)
WriteWarningLine Method     void WriteWarningLine(string message)

Notice how progress and information streams have methods that accept actual records, but error, warning, verbose and debug streams only have methods that accept strings. Also note that some of these methods decorate output with stream-identifying text (WriteDebugLine, WriteVerboseLine, WriteWarningLine), while others do not (WriteInformation, WriteErrorLine).
What I think should happen to address this issue and provide a much better foundation for script logging going forward:

New methods should be added to an abstract PSHostUserInterface2 class that is derived from PSHostUserInterface to avoid breaking changes. There should be one Write*Line method and one Write* method for each stream.
Once the abstract methods are added, internal classes that derive from PSHostUserInterface should derive from the new PSHostUserInterface2 class and implement the new methods. Other hosts can catch up when they're ready to do so.
The F&O layer should decorate the default output of Warning, Verbose, Debug, and Information records with an all caps prefix so that they can be properly identified and searched for when all you have is text data to work with (e.g. log files).
Any internal classes that output stream data to the host should apply a prefix in the Write*Line methods, but not apply in the Write* methods (for those we rely on the default output from the F&O layer for those records). That allows for prefixing in text written directly to the host while leveraging prefixing that is inherent in the default format applied to stream record instances.

Thoughts/comments are welcome and appreciated.
Environment data
Name                           Value
----                           -----
PSVersion                      6.2.1
PSEdition                      Core
GitCommitId                    6.2.1
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

First, let me say that I find it really confusing that the formatting is different depending on this WriteWarningStream NoteProperty. If we normalize that:
$o1,$o2,$o3,$o4 | % { $_ } | Add-Member NoteProperty WriteWarningStream $False -force

They will suddenly all format the same way.
I'm not sure what the intent of that feature is, but I've never liked it (it's very confusing when $Error occasionally shows default/white text, too).
However ...
The reason we have separate methods on the host for different streams is to allow the host to decide whether it needs to add text to the front, or can rely on colors or some other formatting like prefixing with emoji or whatever. Maybe my next host will enhance the UI to display errors as pinned messages you have to dismiss and make progress output fade away gradually or ... it might put different streams in 3D parallax layers, or tabs, or columns ... or have a checkbox that lets you hide or show all messages from specific streams.
Normalizing on adding text to the front (as though the world is black and white) might be a step in the wrong direction. I mean, I would love to have templates for these strings, so I could put a timestamp and user or host name in them, maybe even a duration (i.e. the time since script start), or the path of the script that wrote the message...
But I'm not sure hard-coding extra text -- in particular text that the current hosts are also already adding -- is the right solution. Clearly someone's making a deliberate choice to output these differently based on a property of the object...

Would applying prefixes to the existing Write*Line methods mean that existing hosts hosting a new PowerShell would end up with double "WARNING: WARNING: " text on the front of their messages (as long as they have the WriteWarningStream property)?

Would all output need to go through an extra if/else switch to decide which interface the host supports in order to be able to fall back to the available Write*Line method if the newer one wasn't available?

I'm going to think about this more while I take care of some real-life needs, but one thought comes to mind up front:
I think having PowerShell deal with how to display stream messages in a clear and unambiguous manner by default (i.e. in a black and white world, how should stream messages appear to a user), and having hosts deal with all of the extras that a runtime doesn't deal with (i.e. color, pinning, showing output in separate windows, etc.) would be a good model to follow. Whether that text is prefixed or not, I don't care that much, as long as it is clear from the default output where a stream message came from, irrespective of the host that is displaying that stream message. Hosts should then be able to show that default output, or show some other output, depending on their needs. If hosts had more methods that accepted *Record objects, they could decide what to do with them, and they wouldn't be subject to default views unless they wanted to, no?

Circling back to this, the best model still seems to be to have methods on hosts that accept *Record objects. Hosts can then convert those to string (i.e. take the default textual presentation from PowerShell, which may include a prefix to uniquely identify the type of record when shown among other records), or work with the actual object to render the record in a way that is better for that specific host. This is the only way that I can think of that allows hosts to present message information in the best possible way (i.e. they need all of the details available on the record) while also allowing PowerShell to also present the information in the best way possible when working with text-only, without colors.

Also FYI @Jaykul, the Write*Stream Note Property "magic" is no longer in PowerShell's code base. I'm not sure what PR they were removed with, but its gone in v7.

@KirkMunro Maybe you ready split the meta issue to small issues for fixing (like add prefix in WarningRecord .ToString)?

For what it's worth, after fighting with this a little, I think the plan you laid out makes sense:

normalizing the methods in a new interface
handling the labeling in a format file

If it's not done in the formatting engine, commands like Out-String and Out-File don't handle it properly even when I manually collect all the output for them with redirection, and PAGERs can't handle those extra streams (even when redirected)...


refactor aiohttp and test for mock data with asyncio

Refactored to use async HTTP gets with aiohttp package.
Extra abstraction layer added to hide aync nature from package user. ie test_batterie unchanged
Added async_update function for use by async caller. ie test_sonnen_asyncio
Created test_sonnen_asyncio to test with mock data - reveals issues with testing all api endpoints with mock data.
API endpoint functions need to return data not boolean so they can be mocked - a single example is demonstrated.
Removing this abstraction (the bool) will simplify things a bit and make tests with mock data possible like it was before aiohttp was used
to be arranged

Not completely finished but I wanted you to see it before doing any of the same work yourself, so we don't double up.
An alpha of the package to be used by the home assistant custom_component is here https://github.com/MarkusBiggus/python_sonnenbatterie_api_v2. Tests pass using sonnen_api_v2 package.

the version of this package in PyPi, 0.5.10, installs latest urllib3 as a dependency which is the wrong version for Home Assistant to work with.
This update also fixes that issue by specifying urllib3-1.26.20, so would be  handy if PyPi could be updated with this version.


Ability to zoom in on a section of track

Support classic drag-box selection of zoom area using mouse ...

Added in v2

Added in v2


vagrant: 1.9.5 -> 2.0.0

Upgrade to latest version of Vagrant.
After installation, the following messages appear whenever vagrant runs.
These were already present in previous versions, I'm not sure if/what
to do about them:
Ignoring ffi-1.9.18 because its extensions are not built.  Try: gem pristine ffi --version 1.9.18
Ignoring unf_ext-<IP_ADDRESS> because its extensions are not built.  Try: gem pristine unf_ext --version <IP_ADDRESS>
Ignoring wdm-0.1.1 because its extensions are not built.  Try: gem pristine wdm --version 0.1.1

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[x] macOS
[ ] Linux

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

I don't see those message with vagrant 1.9.5 on NixOS, but I do with 2.0.0.

Is it possible that those extensions have shared libraries, which are needed to be patched with patchelf?

It looks like ruby 2.3 is now required as the gems are built against libruby.so.2.3.

Now the warning messages are gone.

Thanks for merging - unfortunately I still see the warnings. I am testing this on Darwin (macOS 10.12.6).
There seems to be some problem with linking some of the libraries. For example, the symlink created for libffi is broken:
file /nix/store/ciazr0b6ms2blnsli9p92g7axkjqdxyx-vagrant-2.0.0/embedded/lib/libffi.so.6
/nix/store/ciazr0b6ms2blnsli9p92g7axkjqdxyx-vagrant-2.0.0/embedded/lib/libffi.so.6: broken symbolic link to /nix/store/yx68gbvss8sy0wl2bqi1xc4qqk3prip3-libffi-3.2.1/lib/libffi.so.6

Library files in Darwin have extension .dylib:
ls /nix/store/yx68gbvss8sy0wl2bqi1xc4qqk3prip3-libffi-3.2.1/lib
libffi.6.dylib	libffi.dylib  libffi.la

However, simply changing the ln -s command at line 120 doesn't fix it.
Any ideas? I'm afraid I'm still too inexperienced at writing Nix packages to be able to debug this.

For reference, I saw some similar messages being reported in https://github.com/NixOS/nixpkgs/pull/27293.

Yeah this symlink is non-sense on darwin because darwin does use a different library extension.

@Mic92 I realized that if we just use the libraries and binaries included with Vagrant instead of replacing them with Nix's (i.e. comment out https://github.com/zzamboni/nixpkgs/blob/master/pkgs/development/tools/vagrant/default.nix#L69-L120), then all the errors go away. Is there a good reason not to do this? Since Vagrant is distributed with all the tools it needs, as long as they are contained within its own installation and used only by itself, why not leave them like this?

@zzamboni you could probably make this assumption on os x to get it working. On NixOS we have to patch libraries anyway, so replacing seems the better choice since we get a control regarding security updates and a smaller package.


Change origin undefined when user deletes delimiters using the closebrackets addon

The .originany delete operation should presumably be "+delete" or something similar.
However when the user deletes a delimiter using the closebrackets addon, the .origin of the change can be undefined.
It will appear correctly as "+delete" if the cursor is behind the close delimiter before the delete operation, e.g.
abc[]<cursor>
result => abc[

However .origin will be undefined when the cursor is inside the delimiters, e.g.
abc[<cursor>]
result => abc

This only occurs with empty brackets parenthesis and quotes.

Good point. Attached patch adds the fitting origin. But note that you can't rely on origins to match what you'd expect -- user code can put anything in there. They are an expression of intent, not a hard guarantee, and if you depend on a specific feature of a change (for example, whether it deletes something), you should inspect the actual change data.

@marijnh Thanks for the patch!
I've come around to understanding your point about origin. My use case is meta in that I need more granular event information. Imagine you are recording all the actions incl. their attributes a user and editor perform that lead to a change in the text. Using that, one should be able to replay all the changes by sending events to some dispatching function. Whether these events are triggered by the user or programmatically should not matter to their effect.


"SyntaxError: Unexpected token =" of imported file  babel/typescript

🐛 Bug Report
The flowing code is failing with "SyntaxError: Unexpected token =".
I use babel with flowing config:
// babel.config.js
module.exports = {
    presets: [
        ['@babel/preset-env', { targets: { node: 'current' } }],
        '@babel/preset-typescript',
    ],
};

and jest.config.js

module.exports = {
  testEnvironment: 'jsdom',
};

To Reproduce

export class fooClass {
  public static foo = {
    bar = () => {return 5},
  }
}

   test("funky test", () => {
        expect(fooClass.foo.bar()).toBe(5);
    });

yarn.lock
"<EMAIL_ADDRESS>"<EMAIL_ADDRESS>"<EMAIL_ADDRESS>
bash
  /xxx/helper.ts:77
      static foo = {
                 ^

    SyntaxError: Unexpected token =

    > 1 | import { xxx, xxx, fooClass } from "./helper";
        | ^
      2 | import { xx as xx, xx as xx } from "../xxx/xxx";

      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:471:17)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:513:25)
      at Object.<anonymous> (xxx/xxx/xxxx/xxxx/helper.test.ts:1:1)](url)

Edit1: add bash

This is related to your Babel setup, not Jest. Looks like you want @babel/plugin-proposal-class-properties.


Blog post: Announcing Obsidian Flowershow plugin

@olayway we must have written something about this (e.g. did we post on obsidian forum?). In any case, we have the material on the front page of the site now ... so could we write a short post about this and post it up (and do you have any video or gifs you made)?
NB: this is kind of minor, but nice to do if quick and you are blocking on something else.


[Question] How to access the embeddings? of my dataset that model have been trained on it ?

Environment

OS [Ubuntu-18.04-bionic]:
Python Version: 3.6

Question
How to access the embedding of my dataset that the model has been trained on it?

I didn't understand the question, maybe you can provide more information.

OK, i will try to explain it. when I train the model (ex.Bi-LSTM), i give the dataset to the model in characters or words. The model change them to numbers (embeddings), so how can I access these embeddings to do some work with it (ex.visualization)

You can access the embedding via model. embedding, then you can embed your sentence by model.embedding.embed([sentence]).  Here is the embed API

Ok thanks, that solved my issue.


the way import lodash

hi, @rychkog . I forked the 'chore-move-tree-to-new-angular-and-cli' branch. and found you import lodash like

but when I import this branch into another repo, which import lodash also. and run start will report some error like

so I wonder why you not import lodash as the simple way like 'import * as _ from 'lodash'?

@dyh333 Hi! Here is why -
http://2ality.com/2015/12/webpack-tree-shaking.html
https://palantir.github.io/tslint/rules/import-blacklist/
These are the steps toward reducing ng2-tree module size

ng2-tree has custom bundle procedure, so getting module via branch might not work


@azure/container-registry - RestError when running in a github action

Package Name: @azure/container-registry
Package Version: 1.0.0-beta.2
Operating system: Ubuntu
[ ] nodejs

version:

[ ] browser

name/version:

[ ] typescript

version:

Is the bug related to documentation in

[ ] README.md
[ ] source code documentation
[ ] SDK API docs on https://docs.microsoft.com

Describe the bug
It is working locally on my Mac however when I try to run it in a github action I get a RestError when listing the artifacts;
RestError:
    at handleErrorResponse (~/(snip)/node_modules/@azure/core-client/src/deserializationPolicy.ts:251:17)
    at ~/(snip)/node_modules/@azure/core-client/src/deserializationPolicy.ts:159:43
    at Generator.next (<anonymous>)
    at fulfilled (~/(snip)/node_modules/@azure/core-client/node_modules/tslib/tslib.js:114:62)

To Reproduce
Steps to reproduce the behavior:

Should be able to use your sample code with a github action
Login to Azure in the action with;

      - uses: azure/login@v1
        with:
            creds: ${{ secrets.AZURE_CREDENTIALS }}

Expected behavior
I expect not the get the RestError and instead for it to get the artifacts
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I'm trying to check if a tag on a docker repo exists (in typescript cuz there is a bunch of other stuff I'm doing around it that is pre-existing). If there is an easier way to do this I am all ears. Thanks.

@sethgupton-mastery I took a look at the code of azure/login/v1 and I don't think our SDK libraries, in particular the DefaultClientCredential works out of box with it in a GitHub Action. However, it does look possible to write some custom code to retrieve the needed information then create a ClientSecretCredential for the ContainerRegistryClient to use.
The code to retrieve client secerts: https://github.com/Azure/login/blob/c590679de31a2a74445df121e12bd08e3fe2550c/src/main.ts#L42-L46
ClientSecretCredential constructor: https://github.com/Azure/azure-sdk-for-js/blob/8c00ea1e3ce080d9f4925349bc60a19e3f993373/sdk/identity/identity/src/credentials/clientSecretCredential.ts#L34
Adding our JS identity expert @sadasant

I just tested this and was able to list repositories from an ACR registry
    - run: node lib/listAcrRepos.js
      env:
        CREDS: ${{ secrets.AZURE_CREDENTIALS }}
      working-directory: ./gitaction-identity

Code:
import { FormatType, SecretParser } from "actions-secret-parser";
import { ContainerRegistryClient } from "@azure/container-registry";
import { ClientSecretCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();

async function main() {
  const endpoint =
    process.env.CONTAINER_REGISTRY_ENDPOINT || "<acr endpoint>";
  const creds = process.env.CREDS || "<azure credentials>";
  const secrets = new SecretParser(creds, FormatType.JSON);
  const clientId = secrets.getSecret("$.clientId", false);
  const clientSecret = secrets.getSecret("$.clientSecret", true);
  const tenantId = secrets.getSecret("$.tenantId", false);
  const client = new ContainerRegistryClient(
    endpoint,
    new ClientSecretCredential(tenantId, clientId, clientSecret)
  );
  await listRepositoryNames(client);
}

async function listRepositoryNames(client: ContainerRegistryClient) {
  console.log("Listing repositories");
  const iterator = client.listRepositoryNames();
  for await (const repository of iterator) {
    console.log(`  repository: ${repository}`);
  }
}

main().catch((err) => {
  console.error("The sample encountered an error:", err);
});

@sethgupton-mastery I think the other option is use the az cli, which should work nicely with the azure/login action
https://docs.microsoft.com/en-us/cli/azure/acr/repository?view=azure-cli-latest#az_acr_repository_show_tags
az acr repository show-tags -n MyRegistry --repository MyRepository

Please let us know if you have further questions.

Sorry for belated reply.  Aaaaand I'm throwing in the towel and going with a different solution.
Thanks for helping @jeremymeng . I'm pretty sure I'm just screwing something up at this point. I am not very familiar with js/ts.


Tasks are executed in temporary folder

Describe the problem
When I update a project which has tasks specified, these tasks also get executed in the temporary folder.
Template
some_question:
type: str
_exclude:

"*"
"!.github"
"!renovate.json"

_tasks:

'echo $PWD'
'gh repo edit --enable-squash-merge=false --enable-rebase-merge=false --enable-auto-merge --delete-branch-on-merge'

_answers_file: .copier-answers-renovate-template.yaml
To Reproduce

Create template without tasks
Run copier update to copy the template
Update the template and add the tasks
Run copier update

Logs
copier update -r docs/add-update-command-and-examples -a .github/.copier-answers-renovate-template.yaml --trust
Updating to template version 0.0.0.post31.dev0+78bb64a
/tmp/copier.main.old_copy.8n9a3mi6
🎤 some_question
   test
/home/henning/repos/SchulzSystemtechnik/iiot-misc/iiot-misc-renovate-testing
✓ Edited repository SchulzSystemtechnik/iiot-misc-renovate-testing
/tmp/copier.main.new_copy.z9l2g5k4
failed to run git: fatal: not a git repository (or any of the parent directories): .git

Traceback (most recent call last):
  File "/home/henning/.local/bin/copier", line 8, in <module>
    sys.exit(CopierApp.run())
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/plumbum/cli/application.py", line 638, in run
    inst, retcode = subapp.run(argv, exit=False)
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/plumbum/cli/application.py", line 633, in run
    retcode = inst.main(*tailargs)
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/cli.py", line 72, in handle_exceptions
    return method(*args, **kwargs)
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/cli.py", line 404, in main
    with self._worker(
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/main.py", line 205, in __exit__
    raise value
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/cli.py", line 412, in main
    worker.run_update()
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/main.py", line 818, in run_update
    self._apply_update()
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/main.py", line 885, in _apply_update
    with replace(
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/main.py", line 205, in __exit__
    raise value
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/main.py", line 893, in _apply_update
    new_worker.run_copy()
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/main.py", line 751, in run_copy
    self._execute_tasks(self.template.tasks)
  File "/home/henning/.local/pipx/venvs/copier-dist/lib/python3.10/site-packages/copier/main.py", line 284, in _execute_tasks
    subprocess.run(task_cmd, shell=use_shell, check=True, env=local.env)
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'gh repo edit --enable-squash-merge=false --enable-rebase-merge=false --enable-auto-merge --delete-branch-on-merge' returned non-zero exit status 1.

Expected behavior
Only execute tasks inside the project folder.
Screenshots/screencasts/logs
No response
Operating system
Linux
Operating system distribution and version
22.04
Copier version
9.0.1
Python version
3.10.12
Installation method
pipx+git
Additional context
Using custom package which only adds the packages jinja2-workarounds & copier-templates-extensions and packs everything together for convenience.

Would probably be solved by #240.

#240 might be considered for assistance, but currently, this request seems to be invalid.
The reason tasks are executed in temporary directories after an update is because that's where the replay takes place.
Tasks serve as an additional tool for you to customize your project structure in ways that can't be achieved through pure Jinja. For instance, if you're using pre-commit and a formatter like prettier or black, which may format a file differently based on input, you could choose to run pre-commit run -a after an update. In this way, all changes are considered in determining the result of a replay.
Once the replay is complete, it undergoes a comparison with the updated project, and this is where the intelligent diffing process occurs.
Despite being named 'tasks,' it's not intended to function as a task manager. If you find yourself using it for actions that are non-deterministic, impact the environment or rely on the execution folder, it might be a misuse of this feature. For such purposes, there are dedicated task managers available.

I actually make use of that the tasks are run in a temporary directory to determine the task stage.
https://github.com/bswck/skeleton/blob/57c26b0e8390186bbfc8366f06c2c2895f509ab1/handle-task-event.sh#L21-L31
CC @henningWoehr