Health-Based Bar

Having an option to make the health bar color health based would be cool

Agree

Having an option to make the health bar color health based would be cool

what does that even mean?

look at the ESP . The heatlh bar color only have manual color and rainbow only

Having an option to make the health bar color health based would be cool

what does that even mean?

What he means is something along the lines of when they are between 90-100% health make the box green, when it is between 40-89 amber and 0-39 red or something kind of like that.

Having an option to make the health bar color health based would be cool

what does that even mean?

What he means is something along the lines of when they are between 90-100% health make the box green, when it is between 40-89 amber and 0-39 red or something kind of like that.

ok i get it._.

            const auto currHealth{ ((entity->health()) / static_cast<float>(maxHealth)) * 100 };

            float green_color[3]{ 0.0f, 0.5f, 0.0f };
            float amber_color[3]{ 1.0f, 0.74609375f, 0.0f };
            float red_color[3]{ 1.0f, 0.0f, 0.0f };

            if (config.healthBar.rainbow) {
                interfaces.surface->setDrawColor(rainbowColor(memory.globalVars->realtime, config.healthBar.rainbowSpeed));
            }
            else {
                if (90 <= currHealth && currHealth <= 100) {
                    interfaces.surface->setDrawColor(green_color);
                }
                else if (40 <= currHealth && currHealth <= 89) {
                    interfaces.surface->setDrawColor(amber_color);
                }
                else if (0 <= currHealth && currHealth <= 39) {
                    interfaces.surface->setDrawColor(red_color);
                }
                else {
                    interfaces.surface->setDrawColor(red_color);
                }
            }

This is my basic implementation of this concept, the dll is here, I used SazInjector to inject the dll.
Hope this helps,
Jim

            const auto currHealth{ ((entity->health()) / static_cast<float>(maxHealth)) * 100 };

            float green_color[3]{ 0.0f, 0.5f, 0.0f };
            float amber_color[3]{ 1.0f, 0.74609375f, 0.0f };
            float red_color[3]{ 1.0f, 0.0f, 0.0f };

            if (config.healthBar.rainbow) {
                interfaces.surface->setDrawColor(rainbowColor(memory.globalVars->realtime, config.healthBar.rainbowSpeed));
            }
            else {
                if (90 <= currHealth && currHealth <= 100) {
                    interfaces.surface->setDrawColor(green_color);
                }
                else if (40 <= currHealth && currHealth <= 89) {
                    interfaces.surface->setDrawColor(amber_color);
                }
                else if (0 <= currHealth && currHealth <= 39) {
                    interfaces.surface->setDrawColor(red_color);
                }
                else {
                    interfaces.surface->setDrawColor(red_color);
                }
            }

This is my basic implementation of this concept, the dll is here, I used SazInjector to inject the dll.
Hope this helps,
Jim

Thanks

New release
This has now been released on my github, with the current release being here
Changes
It has added a check button to enable the feature written here, which is found when pressing on the colour option for a menubar!
Also it includes the human bhop feature from this pull request
Feel free to drop me a feature request ;))
Hope this helps y'all :)
Jim

New release
This has now been released on my github, with the current release being here
Changes
It has added a check button to enable the feature written here, which is found when pressing on the colour option for a menubar!
Also it includes the human bhop feature from this pull request
Feel free to drop me a feature request ;))
Hope this helps y'all :)
Jim

can you add hands & sleeves into Glow list too

            const auto currHealth{ ((entity->health()) / static_cast<float>(maxHealth)) * 100 };

            float green_color[3]{ 0.0f, 0.5f, 0.0f };
            float amber_color[3]{ 1.0f, 0.74609375f, 0.0f };
            float red_color[3]{ 1.0f, 0.0f, 0.0f };

            if (config.healthBar.rainbow) {
                interfaces.surface->setDrawColor(rainbowColor(memory.globalVars->realtime, config.healthBar.rainbowSpeed));
            }
            else {
                if (90 <= currHealth && currHealth <= 100) {
                    interfaces.surface->setDrawColor(green_color);
                }
                else if (40 <= currHealth && currHealth <= 89) {
                    interfaces.surface->setDrawColor(amber_color);
                }
                else if (0 <= currHealth && currHealth <= 39) {
                    interfaces.surface->setDrawColor(red_color);
                }
                else {
                    interfaces.surface->setDrawColor(red_color);
                }
            }

This is my basic implementation of this concept, the dll is here, I used SazInjector to inject the dll.
 There is Health based function in chams already, just c+p into healthbar.
    if (chams.healthBased && health)
        material->colorModulate(1.0f - health / 100.0f, health / 100.0f, 0.0f);

best regards.

            const auto currHealth{ ((entity->health()) / static_cast<float>(maxHealth)) * 100 };

            float green_color[3]{ 0.0f, 0.5f, 0.0f };
            float amber_color[3]{ 1.0f, 0.74609375f, 0.0f };
            float red_color[3]{ 1.0f, 0.0f, 0.0f };

            if (config.healthBar.rainbow) {
                interfaces.surface->setDrawColor(rainbowColor(memory.globalVars->realtime, config.healthBar.rainbowSpeed));
            }
            else {
                if (90 <= currHealth && currHealth <= 100) {
                    interfaces.surface->setDrawColor(green_color);
                }
                else if (40 <= currHealth && currHealth <= 89) {
                    interfaces.surface->setDrawColor(amber_color);
                }
                else if (0 <= currHealth && currHealth <= 39) {
                    interfaces.surface->setDrawColor(red_color);
                }
                else {
                    interfaces.surface->setDrawColor(red_color);
                }
            }

This is my basic implementation of this concept, the dll is here, I used SazInjector to inject the dll.
 There is Health based function in chams already, just c+p into healthbar.
    if (chams.healthBased && health)
        material->colorModulate(1.0f - health / 100.0f, health / 100.0f, 0.0f);

best regards.

Before calling my code "ugly af", make sure to verify the fact your code is actually functional ;)
The issues with your code:

You have tried to use the variable, health, that doesn't appear in the scope of renderPlayerBox, one should instead have used entity->health(), this as a  first means you cannot simply C+P
You have tried to use the function material, this doesn't appear in this scope either.
Even if material->colorModulate() did appear in the scope of renderPlayerBox, your code still would not work because the drawing function for healthBar and armorBar uses interfaces.surface->drawFilledRect() instead.

What was useful from your code:

The formula  1.0f - health / 100.0f, health / 100.0f, 0.0f I have rewritten and applied to my current build of the code: { 1.0f - currHealth, currHealth, 0.0f } so thank you for bringing my attention to that formula :)

I have now updated the code as of commit c3113e2 to include  the afforementioned formula instead of the prior system.
Kind regards,
Jim

Dude, WTF.  I just wanted to show you that there is something like Health based color in this code, and chams as its example, never said its straight c+p, u have to change few things to make it works.  Current one is nice <3.

There is Health based function in chams already, just c+p into healthbar.

I do apologise I just thought just c+p meant to just copy and paste, sorry there, didn't mean to offend.
Regards,
Jim

No problem, I could be more accurate. In addition you can replace this ugly color between green and red with nice full yellow doing something like that:
std::min((2.0f * (100 - Health) / 100.0f), 1.0f) , std::min((2.0f * Health) / 100.0f, 1.0f) , 0.f
But thats my personal preference.

Yeah you do make a good point the orange is quite dark with the charms setup, thanks for the pointer,
I'll implement this now :)
Thanks very much,
Jim

The Health-based bar has now been updated, the source code is here, and the builds are available here. Kron1Q's fixes are added in v1.3.1.
Hope this helps everyone,
Jim
P.S. Thanks to Kron1Q for showing the implementation for fixed colours! 👍


how to visualize skeleton animation from mixamo fbx?

how to visualize skeleton animation from mixamo fbx?

@jinfagang FYI you can import a mixamo fbx into Blender, then output a glTF file which should be compatible with our gltfio loader library.

@bejado Hi, thanks for the info.
I saw that filament using assimp as model file reader, why not add fbx directly support?


Shouldn't colons cause a sentence split?

They currently don't:
>>> s = 'Tomorrow I will do the greatest thing ever: Become a god.'
>>> seg.segment(s)
['Tomorrow I will do the greatest thing ever: Become a god.']
>>> s = 'The best player of the city: Zob Ahan F.C. and Sepahan F.C..'
>>> seg.segment(s)
['The best player of the city: Zob Ahan F.C. and Sepahan F.C..']

@RuABraun: not by default design choice of pysbd & pragmatic_segmenter . Still, if you wish to add : then update it at the of SENTENCE_BOUNDARY_REGEX - \S.*?[。．.:！!?？ȸȹ☉☈☇☄].
https://github.com/nipunsadvilkar/pySBD/blob/f3d0ae4290a51288475472fa7e367854065337b9/pysbd/lang/common/numbers.py#L10

Thanks


Prism file in sendgrid-php.zip

I just download the Packaged Library for the V3 API from https://sendgrid-open-source.s3.amazonaws.com/sendgrid-php/sendgrid-php.zip and found an odd 15.9MB file called Prism in the zip. Can you confirm what this is for as it appears to be a Unix executable which could be dangerous.

@adrianjones1,
Thanks for the heads up! That file should be excluded in the upload. I'll leave this ticket open to fix that.
It's safe for you to delete it. We use it for our unit tests. You can find out about prism here: https://stoplight.io/prism

Thanks for confirming that and glad its nothing to worry about anyway. The API is working great for our needs :-)

is it some kinda NSA thing?

https://stoplight.io/platform/prism/

FYI, This file is still in the zip.

Thanks for the heads up @Veve2.
I think I need to exclude the prism directory here: https://github.com/sendgrid/sendgrid-php/blob/master/scripts/s3upload.sh#L12
I will add your vote to this item in our backlog. It's not that high of priority, but the priority can be raised if others vote on the issue or if someone submits a PR.
With Best Regards,
Elmer


biome: 1.6.1 -> 1.6.3

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/biome/versions.
meta.description for biome is: Toolchain of the web
meta.homepage for biome is: https://biomejs.dev/
meta.changelog for biome is: https://github.com/biomejs/biome/blob/cli/v1.6.2/CHANGELOG.md
Updates performed

Rust version update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.6.2 with grep in /nix/store/vvaj0q9r36nxbb3a6xin694bf0hipn3r-biome-1.6.2
found 1.6.2 in filename of file in /nix/store/vvaj0q9r36nxbb3a6xin694bf0hipn3r-biome-1.6.2

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
biome

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/vvaj0q9r36nxbb3a6xin694bf0hipn3r-biome-1.6.2 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A biome https://github.com/r-ryantm/nixpkgs/archive/7cbdd26569a1b4ac37f56f1530f95a8f5aa3cbc9.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/7cbdd26569a1b4ac37f56f1530f95a8f5aa3cbc9#biome

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/vvaj0q9r36nxbb3a6xin694bf0hipn3r-biome-1.6.2
ls -la /nix/store/vvaj0q9r36nxbb3a6xin694bf0hipn3r-biome-1.6.2/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

1 package built:

biome

Maintainer pings
cc @figsoda for testing.

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/project/biome/versions.
meta.description for biome is: Toolchain of the web
meta.homepage for biome is: https://biomejs.dev/
meta.changelog for biome is: https://github.com/biomejs/biome/blob/cli/v1.6.3/CHANGELOG.md
Updates performed

Rust version update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.6.3 with grep in /nix/store/i493phlqcfxsm5vnwq2hawhqjk5hc72w-biome-1.6.3
found 1.6.3 in filename of file in /nix/store/i493phlqcfxsm5vnwq2hawhqjk5hc72w-biome-1.6.3

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
biome

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/i493phlqcfxsm5vnwq2hawhqjk5hc72w-biome-1.6.3 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A biome https://github.com/r-ryantm/nixpkgs/archive/1f51dae3cbfe198fe2f0000099184f53fff3bf9f.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/1f51dae3cbfe198fe2f0000099184f53fff3bf9f#biome

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/i493phlqcfxsm5vnwq2hawhqjk5hc72w-biome-1.6.3
ls -la /nix/store/i493phlqcfxsm5vnwq2hawhqjk5hc72w-biome-1.6.3/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

1 package built:

biome

Maintainer pings
cc @figsoda for testing.


Examine all copyright designations to ensure correctness

Want to ensure we're assigning copyright where we ought to.

Also, make sure that we don't claim copyright for recipes that we originally pulled in from other layers.

Verbatim from a lawyer who works for a Major Multinational Corporation: "[All Rights Reserved] is surplus usage and obsolete;  a holdover from a centuries-old treaty long-since superseded:  http://en.wikipedia.org/wiki/All_rights_reserved
I think it now should be interpreted as essentially “no other rights are granted other than the rights granted in the appended license” (which most licenses say anyway).
The only remaining value (other than historical) of this statement is that it was rather deftly parodied by the FSF as “All Rights Reversed” "
I plan to remove the term where I find it, unless of course there are objections.

Ugh, search for 'copyright' in the meta-bistro repo; "We've found 104 code results" :-)

All the copyright designations for Pelagicore that I found were in .bb files or .bbappend files. This is metadata and as such I doubt is it copyrightable. I won't hurt anything, but its important to know that it won't do what one might think it will do; namely provide some sort of legal protection or provenance. In any case, the copyright designations are not incorrectly assigned and therefor nothing needs removing. Closing this issue.

Mhh i would treat bb files and bbappends as build system code and not like metadata. I don't think we have that case, but a very complex bb file should be copyright worthy

Good to know, and you may in fact be correct that a complex bb file might be copyright worthy although I don't know if there has been much case law in the US or Germany for us to make a reasonable decision. Because of that, let's leave the copyright designations in place in case they are copyrightable.

A complex bb-file probably include code (bash and/or python) so it should really be copyrightable. But I don't have any opinion on whether we should have copyright designations or not.

I should have recognized that it might include code, in which case you're right it ought to be copyrightable, and then under copyright assignment.


DEF being calculated wrong for Demon Rain.

I've fixed 3 Patriotic Recalls for demon rain and asked for a build for "Physical Damage" and the builder returned DEF of 587 when the correct amount should be close to 400.
maybe something with the doublehand logic might be affecting stats other than ATK?

@seilaoque : you're right, DH bonus to the desired stats was also applied to the others stats. This should now be corrected. Can you confirm ?
Thanks a lot for reporting.

yes, it seems correct now.


[pan] Split into Gurmukhi and Shahmukhī (Arabic).

This lexicon really has to come in two parts.

This can now be closed, I guess.


about extrinsic parameter for stereo cameras

Thank you for your wonderful work.
As I'm testing your code with stereo camera setup,
I found that scale errors are quite big even if I'm using stereo images.
For example when I test with EuRoC dataset, scale error values are around 1.1 for all sequences.
According to an issue(https://github.com/princeton-vl/DROID-SLAM/issues/102),
It seems like your code does not consider stereo camera extrinsic value.
When I change the parameter https://github.com/princeton-vl/DROID-SLAM/blob/main/droid_slam/geom/projective_ops.py#L105
to stereo camera extrinsic value, provided by EuRoC calibration file,
it seems like scale errors are reduced quite much.
So these are my questions.

Changing the parameter above, is it a right way to consider stereo camera setup?
If so, why your code have fixed the parameter to be [-0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0] ?

could you help me how to run this code in google colab?


Why will previously published entries be published repeatedly in the next RSS update？

Why will previously published entries be published repeatedly in the next RSS update？

@vansun1992 Can you explain the issue better, like provide some evidence in the form of screenshots?

Maybe it's because I set the update too frequently. On average, the entries of each feed will appear repeatedly more than a dozen times. （Add one for each feed update）
If I restore the update frequency to once a day, will this phenomenon disappear?

@vansun1992 Yup. You are right. Currently, the app supports only once-a-day updates.

I'm going to close the issue as it is out of the context of the current app. In case you have any more questions, do let me know.


More of a feature request than an issue

Sorry, didn't know how to else get in contact and suggest a feature.
If one has a button up and button down switch for controlling light like this
The natural thing would be to turn up brightness to 100% when pressing 1, and to 0% brightness when pushing 0
The fantastic thing would be to start emmit a "signal" out of the button node, starting at fx 500ms, 250ms later a new "signal" - this would allow to step up (or down) lights by fx 10% for every up/down emitted while keeping the button pressed.
This button sends a Pressed signal until button is released, then a release signal. if the button is pressed and released fast it must mean a press - that is covered in your node. I would prefer that Long press is replaced by continuously emitted  steps, in stead of a single Long.
Short press on 1 - Turn on light
Continous press on 0 - step down, step down, step down
Or another scenario
Lights are off
A continous press on button 1 - step up, step up step up, until button released
I know, your node doesn't care about button 1 vs button 0, so I would have to program the node to either emmit up or down, or simply have the node emit - step if button is continously pressed (ie button release event is not given within time fx 500ms)
Hope you will extend your node, I simply cannot make this using regular nodes/flows

Sorry, didn't know how to else get in contact and suggest a feature.
If one has a button up and button down switch for controlling light like this
The natural thing would be to turn up brightness to 100% when pressing 1, and to 0% brightness when pushing 0
The fantastic thing would be to start emmit a "signal" out of the button node, starting at fx 500ms, 250ms later a new "signal" - this would allow to step up (or down) lights by fx 10% for every up/down emitted while keeping the button pressed.
This button sends a Pressed signal until button is released, then a release signal. if the button is pressed and released fast it must mean a press - that is covered in your node. I would prefer that Long press is replaced by continuously emitted steps, in stead of a single Long.
Short press on 1 - Turn on light Continous press on 0 - step down, step down, step down
Or another scenario
Lights are off A continous press on button 1 - step up, step up step up, until button released
I know, your node doesn't care about button 1 vs button 0, so I would have to program the node to either emmit up or down, or simply have the node emit - step if button is continously pressed (ie button release event is not given within time fx 500ms)
Hope you will extend your node, I simply cannot make this using regular nodes/flows

Why don't you use the node https://flows.nodered.org/node/node-red-contrib-time-based-dimmer to fulfill this requirement?
I've just the same setup as you described and using both nodes to achieve this behaviour.

@mbechc,
Sorry for the delay!  Kind of busy lately...
I like the proposal from @geoffreydemaagd.  Thanks Geoffrey for sharing your ideas!!!!!!!!!!!!!
Bart

@mbechc,
Yes I completely understand your proposal.  I have a physical dimmer from Niko at my home which behaves exactly like in your description.
However I won't merge the time based dimmer code in my node for a couple of reasons:

Severe lack of free time
I prefer to keep responsibilities separated.  This node detects types of button events.
My node is build on top of another library, so I have no control about most of the code.  If I had to start all over again, I would most probably have done it completely otherwise.

@geoffreydemaagd: do you know a way how to solve this?  A simplified example flow would be very welcome...

For all my pushbuttons I use following setup
[{"id":"2eba858d508e82e0","type":"button-events","z":"d73909db3492c62d","name":"WC Spot","outputs":3,"inputField":"payload","inputFieldType":"msg","outputField":"payload","outputFieldType":"msg","downValue":"1","downValueType":"num","upValue":"0","upValueType":"num","buttonEventsConfig":"d1c95541c1d66a92","clickedInterval":null,"pressedInterval":null,"debounceInterval":null,"events":[{"type":"clicked"},{"type":"pressed"},{"type":"released"}],"x":360,"y":200,"wires":[["d2b1c198357ffa11"],["d59ffe978cb765d8","9e32ee938a358f5f"],["d59ffe978cb765d8"]]},{"id":"d2b1c198357ffa11","type":"function","z":"d73909db3492c62d","name":"ON/OFF","func":"var spot_wc_0 = global.get('spot_wc_0_status');\nif (spot_wc_0 == undefined) {\n  spot_wc_0 = false;\n}\n\nif (msg.payload == 'clicked') {\n\n  msg.payload = !spot_wc_0;\n}\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":180,"wires":[["99bde571b61a774c"]]},{"id":"99bde571b61a774c","type":"link out","z":"d73909db3492c62d","name":"Pushbutton_Toggle_ws_spot_0_OUT","links":["a6b0d897.4d0528"],"x":655,"y":180,"wires":[]},{"id":"d59ffe978cb765d8","type":"function","z":"d73909db3492c62d","name":"Dimming","func":"var spot_wc_0_updown = global.get('spot_wc_0_updown') || 'DOWN';\n\nif (spot_wc_0_updown === 'UP' && msg.payload === 'pressed') {\n    msg.payload = 'brightness';\n}\n\nelse if (spot_wc_0_updown === 'UP' && msg.payload === 'released') {\n    msg.payload = 'brightness_stop';\n    spot_wc_0_updown = 'DOWN';\n    global.set('spot_wc_0_updown', spot_wc_0_updown);\n}\n\nelse if (spot_wc_0_updown === 'DOWN' && msg.payload === 'pressed') {\n    msg.payload = 'brightness';\n\n}\n\nelse if (spot_wc_0_updown === 'DOWN' && msg.payload === 'released') {\n    msg.payload = 'brightness_stop';\n    spot_wc_0_updown = 'UP';\n    global.set('spot_wc_0_updown', spot_wc_0_updown);\n}\n\nnode.status(msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":220,"wires":[["d3e01cfc0ea7180d"]]},{"id":"9e32ee938a358f5f","type":"function","z":"d73909db3492c62d","name":"Inject actual","func":"msg.payload = global.get('spot_wc_0');\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":570,"y":260,"wires":[["d3e01cfc0ea7180d"]]},{"id":"d3e01cfc0ea7180d","type":"one-button-dimmer","z":"d73909db3492c62d","name":"","interval":"20","step":"1","minValue":"5","maxValue":"255","startCommand":"brightness","stopCommand":"brightness_stop","x":740,"y":220,"wires":[["84e84ab664a2f2f8"]]},{"id":"84e84ab664a2f2f8","type":"function","z":"d73909db3492c62d","name":"Global","func":"global.set('spot_wc_0', parseInt(msg.payload));\nmsg.payload= parseInt(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":930,"y":220,"wires":[["e4dbb34b1e966a2e"]]},{"id":"e4dbb34b1e966a2e","type":"link out","z":"d73909db3492c62d","name":"Pushbutton_Dimming_spot_wc_0_OUT","links":["5c4c0482.a3175c"],"x":1135,"y":220,"wires":[]},{"id":"d1c95541c1d66a92","type":"button-events-config","name":"config for 2d9ff7fc.daca08","clickedInterval":"1","pressedInterval":"1500","debounceInterval":"0"}]

I gave it a try and did it using standard nodes - except the Timed Node - that counts the number of messages within a timeframe, its not exactly elegant yet
Button up and Button down, simply dims to either 0 or 100, but any of the two buttons can be double clicked (im counting the number of clicks, using Timed node) if double clicked, the buttons alter mode to Dimmable up and down, after 10 seconds, dimmable mode is exited, and buttons reverts back to simple 0 or 100 brightness.

[
{
"id": "7bcf78a84f27cb72",
"type": "tab",
"label": "SW01",
"disabled": false,
"info": "",
"env": []
},
{
"id": "8e67781937d9e961",
"type": "trigger",
"z": "7bcf78a84f27cb72",
"name": "",
"op1": "25",
"op2": "10",
"op1type": "num",
"op2type": "str",
"duration": "-500",
"extend": false,
"overrideDelay": false,
"units": "ms",
"reset": "stop",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1020,
"y": 60,
"wires": [
[
"2097d594082c9566"
]
]
},
{
"id": "2fb5329c471daf57",
"type": "timed-counter",
"z": "7bcf78a84f27cb72",
"name": "detectDouble",
"timelimit": "400",
"timeunit": 1,
"withhold": true,
"fixedtimeout": true,
"pertopic": true,
"countlimit": "",
"x": 560,
"y": 240,
"wires": [
[
"457d6fef26fcf7fb"
]
]
},
{
"id": "457d6fef26fcf7fb",
"type": "function",
"z": "7bcf78a84f27cb72",
"name": "Single or Doubleclick",
"func": "if (msg.count==4) {\n    flow.set("dimmerMode", 1)\n    msg = null;\n    }\n// Double press detected, entering dimmerMode\n\nelse if (msg.payload.action=="release_1") {msg.payload = 255}\n// On button pressed once\nelse if (msg.payload.action == "release_2") { msg.payload = 0 }\n// Off button pressed once\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 780,
"y": 240,
"wires": [
[
"9d09b86f2050d21b",
"6ce773ae92d191c0"
]
]
},
{
"id": "596121eb7d0e536d",
"type": "switch",
"z": "7bcf78a84f27cb72",
"name": "dimmerMode",
"property": "dimmerMode",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 340,
"y": 160,
"wires": [
[
"1c7df14b7dcc4ddd"
],
[
"2fb5329c471daf57"
]
]
},
{
"id": "9d09b86f2050d21b",
"type": "trigger",
"z": "7bcf78a84f27cb72",
"name": "exit dimmerMode",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "date",
"duration": "20",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1010,
"y": 200,
"wires": [
[
"25038cc00759fcae"
]
]
},
{
"id": "265ec2fc93d12ee3",
"type": "link in",
"z": "7bcf78a84f27cb72",
"name": "link in 4",
"links": [
"18a33da7f0ded734"
],
"x": 165,
"y": 160,
"wires": [
[
"596121eb7d0e536d"
]
]
},
{
"id": "25038cc00759fcae",
"type": "function",
"z": "7bcf78a84f27cb72",
"name": "dimmerMode=0",
"func": "flow.set("dimmerMode", 0)\nmsg.reset=true\nreturn msg",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1220,
"y": 200,
"wires": [
[]
]
},
{
"id": "1c7df14b7dcc4ddd",
"type": "function",
"z": "7bcf78a84f27cb72",
"name": "normalizeDim",
"func": "if (msg.payload.action.includes("release")) { msg.payload = "stop" }\n\nelse if (msg.payload.action == "press_1") {msg.payload = "up"}\n\nelse if (msg.payload.action == "press_2") {msg.payload = "down"}\n\nelse if (msg.payload.action == "press_3") {msg.payload = "up"}\n\nelse if (msg.payload.action == "press_4") {msg.payload = "down"}\n\nreturn msg;\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 560,
"y": 80,
"wires": [
[
"d00d7c162ab41adc"
]
]
},
{
"id": "2097d594082c9566",
"type": "zigbee2mqtt-out",
"z": "7bcf78a84f27cb72",
"name": "",
"server": "e9c6b6542203d706",
"friendly_name": "BB96E9<PHONE_NUMBER>691)",
"device_id": "0x0017880104cb5e5b",
"command": "brightness_step_onoff",
"commandType": "z2m_cmd",
"payload": "payload",
"payloadType": "msg",
"optionsValue": "",
"optionsType": "nothing",
"x": 1290,
"y": 80,
"wires": []
},
{
"id": "83529339124975f8",
"type": "trigger",
"z": "7bcf78a84f27cb72",
"name": "",
"op1": "-25",
"op2": "10",
"op1type": "num",
"op2type": "str",
"duration": "-500",
"extend": false,
"overrideDelay": false,
"units": "ms",
"reset": "stop",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1020,
"y": 100,
"wires": [
[
"2097d594082c9566"
]
]
},
{
"id": "d00d7c162ab41adc",
"type": "switch",
"z": "7bcf78a84f27cb72",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "up",
"vt": "str"
},
{
"t": "eq",
"v": "stop",
"vt": "str"
},
{
"t": "eq",
"v": "down",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 730,
"y": 80,
"wires": [
[
"8e67781937d9e961",
"9d09b86f2050d21b"
],
[
"8e67781937d9e961",
"83529339124975f8",
"9d09b86f2050d21b"
],
[
"83529339124975f8",
"9d09b86f2050d21b"
]
]
},
{
"id": "6ce773ae92d191c0",
"type": "zigbee2mqtt-out",
"z": "7bcf78a84f27cb72",
"name": "",
"server": "e9c6b6542203d706",
"friendly_name": "BB96E9<PHONE_NUMBER>691)",
"device_id": "0x0017880104cb5e5b",
"command": "brightness",
"commandType": "z2m_cmd",
"payload": "payload",
"payloadType": "msg",
"optionsValue": "",
"optionsType": "nothing",
"x": 1030,
"y": 280,
"wires": []
},
{
"id": "e9c6b6542203d706",
"type": "zigbee2mqtt-server",
"name": "docker-mqtt-conbee",
"host": "<IP_ADDRESS>",
"mqtt_port": "1883",
"mqtt_username": "",
"mqtt_password": "",
"mqtt_qos": "0",
"tls": "",
"usetls": false,
"base_topic": "z2m-conbee"
}
]

Thanks for help and inspiration


Social Login with Google

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Normally, users prefer logging in with Google or Facebook to avoid filling up forms.
Describe the solution you'd like
A clear and concise description of what you want to happen.
I would like to integrate Google OAuth2 to login with Google. This way, we can fetch data like name, email and profile picture from the user's google account as well.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Describe how this feature will be useful to our readers.
A clear and concise description of how this feature will be useful for our  other readers.
This feature will be useful for users as these days users prefer logging in with social sites over filling up a long form.
Additional context
Add any other context or screenshots about the feature request here.

assigning to you.


IP-address lookup

Description
It'd be nice if the kit could support IP-address lookup, and I do realize this may open up another can of worms considering all the different "ripe" outputs.

Feel free to work on it and make a PR :wink:

Possibly a silly question: But would this not be a lot about checking if it's an IP address, and if so, allowing it to be looked up?
(instead of preventing the lookup)
The rest of the parser logic, etc would stay pretty much the same, no?

I need to find out who an IP address belongs to but it does not have a host name.
Regular whois says this belongs to Microsoft: <IP_ADDRESS>
So how to I ask this package who it belongs to?

ArrayAccess/RDAP-Client can get whois info for IP addresses too


Bug with prettier-emacs cloning

What did you expect to happen?
When I run doom sync, it should return a successful result.
What actually happened?
When I run doom sync, an error appears when it is cloning the repo prettier-emacs:

I can't use Doom because the sync doesn't complete.
Describe your attempts to resolve the issue
I tried to locate the section of code that clones the repo so I could modify the cloning format, but I couldn't find it.
Steps to reproduce
run doom sync
System Information
https://pastebin.com/wKeLWxjG

It seems that you are trying to fetch from a release branch where none exists. did you just add the package to doom? what did you write in your packages.el?

I checked and I did write in my packages.el to add the prettier package. I changed the branch to clone there. Problem solved.


Determine Compensatory damages of my case

Description
As a user, I would like the system to predict how much compensatory damages I may be awarded for my case.
Scope of Work

[ ] Determine cases wherein compensation may be granted by the court
[ ] Determine facts that affect awards of compensatory damages
[ ] Analyze previous case data with similar fact sets to determine compensatory damage amounts awarded in previous claims
[ ] Train model to determine average damage compensation given user's specified facts

Story Points

[1, 2, 3, 5, 8, 13, 20, 40]

Priority

[Low, Medium, High]

Risk

[Low, Medium, High]

Demo requirement

The user triggers a claim that may result in a judgement including compensatory damages
The system asks the user questions to build their claim
The user provides answers
The system, once enough data is gathered, is able to determine the average amount of compensatory damages awarded for claims similar to the user's

Acceptance Criteria

The system is able to ask questions relevant to determining whether compensatory damages may be awarded
The system is able to ask questions to determine the severity of compensatory damages
The system is able to determine an average amount of compensatory damages the user may be awarded

Documentation, files, diagrams, etc. relating to this feature:
Url, books, etc.
Changes:

[Optional]

Need more information on input points that need to be collected to determine compensatory damages and what affects their total.
Ie: how much rent does the person pay, were they gravely injured, were they forced to take time off from work to deal with it resulting in financial losses..etc


Wallet doesn't show correct balance with 0 pending HTML after receiving staking reward

This issue tracker is only for technical issues related to HTMLCOIN.
Describe the issue
After receiving a staking reward in early May my wallet no longer show a correct balance. My wallet controls only 2 addresses, nearly all of the 10m+ coins are in the first:
HrqRcpXSNRkSTF9oVz873NWHermh6sBHcb
HduooybmwDoSecpAnwr9h8H3U8Sq3Dtk4P
My wallet only shows 8.8m coins with 0 pending. I have tried to launch the wallet with the rescan flag and have also deleted all blockchain data and synced from scratch. As you'll see in one of my screenshots there appears to be an issue with the way the wallet interpreted one of my staking rewards and can no longer see those coins. This error also affects my ability to spend the coins as I've tested and failed to send a transaction with 10m coins.
I edited this screenshot to show that the wallet is showing an older staking reward as having less confirmations than a newer one. That 4/19 reward should actually have an early May timestamp (according to the block explorer it's May 8th 5ab1efb1bb88b423beaefcf759fd39f5be5ea1cb18f6def500830e924abe407e

Here is a screenshot of the balance:

I don't have a screenshot of it but when that reward arrived and the tooltip appeared in the system tray it didn't show +1250 HTML it showed a greater number with decimal places this is not exact but it appeared like +1250.51684168 HTML.
Expected behaviour
The wallet should correctly display the balance of all addresses.
Actual behaviour
Over 1m HTML are missing and are not spendable.
What version of HTMLCOIN are you using?
v<IP_ADDRESS>
Machine specs:

OS: Windows 7
CPU: i3 4370
RAM: 16gb
Disk size: 250gb

Any extra information that might be useful in the debugging process.
Here's a pastebin link for a snippet from the debug file. I only included the lines between the first and last mention of the block hash relating to the the staking reward: https://pastebin.com/phxPbT9b
Transaction export:
transactions.xlsx

You could try:

exporting the private key (dumpprivkey) in console
save private key
make a backup of wallet.dat
delete your blockchain data
start with a blank wallet.dat
import your private key into the blank wallet

I'm not sure, but it sounded like the wallet.dat was corrupt but you still had a salvageable private key. There's probably a better way to achieve the same result, but I'm glad it worked.


[RO-3244] Link a role requirement file for rpc-differ

The rpc-differ application expects to find the
"ansible-role-requiremnts.yml" file in the root path of the repo. This
change make diff generation tooling link a product requirements file to
expected path when executed. Because this change has the potential to
create a modified git tree, the "ansible-role-requirements.yml" has been
added to .gitignore.
Signed-off-by: Kevin Carter<EMAIL_ADDRESS>Issue: RO-3244

recheck_CIT_release

recheck_cit_release

recheck_cit_release

The artifact test is known to be broken: https://rpc-openstack.atlassian.net/browse/RO-3239
The inability for the release test to use a fork is fixed in: https://github.com/rcbops/rpc-gating/pull/572

The release job was re-tested using the fix in rcbops/rpc-gating#572 to allow external forks (https://rpc.jenkins.cit.rackspace.net/job/RE-Release-PR_rpc-openstack-master/211/console). It's still failing with problems to do with rpc-differ:
+ docker run -e PREVIOUS_TAG=master -e NEW_TAG=bug/RO-3244 -e REPO_URL=https://github.com/cloudnull/rpc-openstack.git -v /var/lib/jenkins/workspace/RE-Release-PR_rpc-openstack-master/cloudnull/rpc-openstack:/var/lib/jenkins/workspace/RE-Release-PR_rpc-openstack-master/cloudnull/rpc-openstack -w /var/lib/jenkins/workspace/RE-Release-PR_rpc-openstack-master/cloudnull/rpc-openstack jenkins-re-release-pr_rpc-openstack-master-211
+ /generate_commit_diff_notes.sh
+++ dirname /generate_commit_diff_notes.sh
++ readlink -f /
$ ssh-agent -k
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 8429 killed;
[ssh-agent] Stopped.
+ export GATING_PATH=/
+ GATING_PATH=/
+ RPC_PATH=//../../
+ source //../..//scripts/functions.sh
/generate_commit_diff_notes.sh: line 4: //../..//scripts/functions.sh: No such file or directory
DEBUG:release:Script Execution Complete: /var/lib/jenkins/workspace/RE-Release-PR_rpc-openstack-master/cloudnull/rpc-openstack/gating/generate_release_notes/run
ERROR:release:Script /var/lib/jenkins/workspace/RE-Release-PR_rpc-openstack-master/cloudnull/rpc-openstack/gating/generate_release_notes/run failed. (Return Code: 1)

recheck_cit_release

2 problems here. The export BASE_DIR in generate_commit_diff_notes.sh (which gets set in this patchset) is now overriding the BASE_DIR passed into functions.sh, so you have:
++ export BASE_DIR=/
++ BASE_DIR=/
++ export HOST_RCBOPS_REPO=http://rpc-repo.rackspace.com
++ HOST_RCBOPS_REPO=http://rpc-repo.rackspace.com
+++ //scripts/get-rpc_release.py
scripts/functions.sh: line 50: //scripts/get-rpc_release.py: No such file or directory
++ export RPC_RELEASE=
++ RPC_RELEASE=

Also, the a-r-r file is still not getting linked into the correct location:
IOError: [Errno 2] No such file or directory: '/root/.osa-differ/rpc-openstack/ansible-role-requirements.yml'

The second problem is a PITA because if you create the link before rpc-differ runs, it simply wipes it out when it cleans the dir out before cloning.
I've added a PR to osa-differ to allow specifying a different arr file here so that we don't have to faff about like this

The following diff on top of the current PR/commit will now properly allow speficying the arr file location:
commit feb879ac8762a0a9538ce591d80997314f28ba8d
Author: Darren Birkett<EMAIL_ADDRESS>Date:   Thu Dec 14 13:30:08 2017 +0000

    use new rpc-differ to specify arr file

diff --git a/gating/generate_release_notes/generate_commit_diff_notes.sh b/gating/generate_release
index 3ca5882..9ae7355 100755
--- a/gating/generate_release_notes/generate_commit_diff_notes.sh
+++ b/gating/generate_release_notes/generate_commit_diff_notes.sh
@@ -1,7 +1,5 @@
 #!/bin/bash -xe
-export BASE_DIR="$(readlink -f $(dirname ${0}))"
 source "scripts/functions.sh"
-ln -sf "ansible-role-${RPC_PRODUCT_RELEASE}-requirements.yml" "ansible-role-requirements.yml"

-rpc-differ --debug -r "$REPO_URL" --update "$PREVIOUS_TAG" "$NEW_TAG" --file diff_notes.rst
+rpc-differ --debug -rr "ansible-role-${RPC_PRODUCT_RELEASE}-requirements.yml" -r "$REPO_URL" --up
 pandoc --from rst --to markdown_github < diff_notes.rst > diff_notes.md
diff --git a/gating/generate_release_notes/release_notes_dockerfile b/gating/generate_release_note
index f45da3c..78fefa8 100644
--- a/gating/generate_release_notes/release_notes_dockerfile
+++ b/gating/generate_release_notes/release_notes_dockerfile
@@ -8,8 +8,7 @@ RUN echo "jenkins ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

 RUN apt-get install -y pandoc

-RUN pip install rpc_differ==0.3.1 reno==2.5.1
-RUN pip install<EMAIL_ADDRESS>+RUN pip install osa_differ==0.3.4 rpc_differ==0.3.2 reno==2.5.1

 COPY gating/generate_release_notes/generate_release_notes.sh /generate_release_notes.sh
 COPY gating/generate_release_notes/generate_reno_report.sh /generate_reno_report.sh

New issue with rpc-differ, possibly due to the way it tries to find the OSA sha, and the recent removal of the osa submodule?
Traceback (most recent call last):
  File "/usr/local/bin/rpc-differ", line 11, in <module>
    sys.exit(run_rpc_differ())
  File "/usr/local/lib/python2.7/dist-packages/rpc_differ/rpc_differ.py", line 311, in run_rpc_differ
    osa_old_commit = get_osa_commit(repo, rpc_old_commit)
  File "/usr/local/lib/python2.7/dist-packages/rpc_differ/rpc_differ.py", line 158, in get_osa_commit
    functions_path))
rpc_differ.rpc_differ.SHANotFound: Cannot find OSA SHA in submodule or script: /root/.osa-differ/rpc-openstack/scripts/functions.sh
DEBUG:release:Script Execution Complete: /Users/darren.birkett/working/gits/mancdaz/rpc-openstack/gating/generate_release_notes/run
ERROR:release:Script /Users/darren.birkett/working/gits/mancdaz/rpc-openstack/gating/generate_release_notes/run failed. (Return Code: 1)

@mancdaz The OSA sha is heald here: https://github.com/rcbops/rpc-openstack/blob/master/playbooks/vars/rpc-release.yml#L16 is it possible to feed the OSA sha into the differ tool instead of trying to extract it from a file? If so we can parse the rpc-release file and just feed the values into the tool.

@mancdaz looking at the code, if https://github.com/major/rpc_differ/blob/master/rpc_differ/rpc_differ.py#L137-L159 could accept the a value (sha, branch, tag) instead of trying to pull the value from a submodule or file it should work.

@cloudnull true, but we should try and let rpc-differ derive the correct value automatically if possible, like it used to with the submodule, otherwise the behaviour is regressive. I'm working on a way to do that just now. We can always have it fallback to a manually provided value if necessary.

@mancdaz I guess something like this should work in the rpc-differ tool
import yaml
release_file = "<<PATH_TO_VARS_DIR>>/rpc-release.yml"
with open(release_file) as f:
  x = yaml.safe_load(f.read())

release_data = x['rpc_product_releases'][<<PRODUCT_RELEASE>>]
print(release_data['osa_release'])

@mancdaz Totally untested, but this should work:
def get_osa_commit(repo, ref, rpc_product=None):
    """Get the OSA sha referenced by an RPCO Repo."""
    repo.head.reference = repo.commit(ref)
    repo.head.reset(index=True, working_tree=True)

    functions_path = os.path.join(
        repo.working_tree_dir,
        '/scripts/functions.sh'
    )
    release_path = os.path.join(
        repo.working_tree_dir,
        '/playbooks/vars/rpc-release.yml'
    )

    if os.path.exists(release_path):
        import yaml
        release_file = "<<PATH_TO_VARS_DIR>>/rpc-release.yml"
        with open(release_file) as f:
          rpc_release_data = yaml.safe_load(f.read())

        release_data = rpc_release_data['rpc_product_releases'][rpc_product]
        osa_commit = release_data['osa_release']
    elif os.path.exists(functions_path):
        with open(functions_path, "r") as funcs:
            for line in funcs.readlines():
                match = quoted_re.search(line)
                if match:
                    osa_commit = match.groups()[0]
                    break
    else:
        osa_commit = repo.submodules['openstack-ansible'].hexsha

    return osa_commit

@mancdaz @major I opened a PR to add the product update capability -- https://github.com/major/rpc_differ/pull/15

recheck_cit_release

@mancdaz looks like the most recent failures were related to me having branches in my personal repo that were master${VAR} which the differ was pulling instead of master which resulted in the differ trying to read a branch of mine from January. I've cleaned up my various branches and the tool seems to be working using the following command:
# rpc-differ --debug -rp pike -rr ansible-role-pike-requirements.yml -r https://github.com/cloudnull/rpc-openstack.git --update master bug/RO-3244 --file diff_notes.rst

I've updated the commit message so we can get the tests run again.
As for the actual code, it all seems to work nicely now :) I tested locally too, with success.
Pending jobs, I'm 👍


Add ignore-unused-imports setting for unused-import rule (F401)

Summary
Resolves https://github.com/astral-sh/ruff/issues/9962 by allowing a configuration setting allowed-unused-imports
TODO:

[ ] Figure out the correct name and place for the setting; currently, I have added it top level.
[ ] The comparison is pretty naive. I tried using glob::Pattern but couldn't get it to work in the configuration.
[x] Add tests
[x] Update documentations

Test Plan

cargo test

Maybe a more descriptive name could be allowed-unused-imports.

I can take this one.

I moved it onto the [pyflakes] section. Thanks!


Simple regression tests for public.glyphOrder and production names

Which ufo2ft currently doesn’t have.

I signed it.

Hey Antonio, thanks for contributing here!
The tests look good to me, however I'd prefer that the tests folder keeps the same layout as the Lib/ufo2ft folder, so I'd organise the test modules to match the modules of the ufo2ft package, one test module each.
Do you mind doing that?

Thanks.
Also, can you please wrap unittest.main calls with sys.exit()?
Even though we don't call the test modules directly as we use pytest to discover them, it's good practice to have it there, in case someone does run the test modules as scripts. The failing exit code is then returned properly to the shell.

I see the other test modules are missing the sys.exit in main.
Well, it's no big deal. We can add them later, or even better completely remove the if __name__ is "___main__", since one should use pytest to run the test modules anyway.

It would be nice to also have another small test for when the public.glyphOrder is specified in the lib.plist.

Oops, sorry, of course I meant the public.postscriptNames! :)

See googlei18n/ufo2ft#103


RuntimeError: The shape of the 2D attn_mask is torch.Size([399, 399]), but should be (355, 355).

Hello guys,
Thank you for a nice project. I would like to retrain MaskDINO on a custom dataset (I can have max batch size of 2 if I want to keep the settings as similar as possible to the original). My dataset contains bitmasks - I have already rewritten the dataset loader and fixed the following issues:

my fix: gt_masks = targets_per_image.gt_masks.tensor
 File "/mnt/storage-plzen1/home/vyskocj/ADETR/detrex/projects/maskdino/maskdino.py", line 239, in prepare_targets
padded_masks = torch.zeros((gt_masks.shape[0], h_pad, w_pad), dtype=gt_masks.dtype, device=gt_masks.device)
AttributeError: 'BitMasks' object has no attribute 'shape'

my fix: topk = min(self.num_queries, enc_outputs_class_unselected.shape[1])
  File "/auto/plzen1/home/vyskocj/ADETR/detrex/projects/maskdino/modeling/transformer_decoder/maskdino_decoder.py", line 364, in forward
topk_proposals = torch.topk(enc_outputs_class_unselected.max(-1)[0], topk, dim=1)[1]
RuntimeError: selected index k out of range

But I do not know how to handle the following one:
    File "/auto/plzen1/home/vyskocj/ADETR/detrex/projects/maskdino/modeling/transformer_decoder/dino_decoder.py", line 247, in forward
tgt2 = self.self_attn(q, k, tgt, attn_mask=self_attn_mask)[0]
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/activation.py", line 1029, in forward
attn_output, attn_output_weights = F.multi_head_attention_forward(
File "/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py", line 5112, in multi_head_attention_forward
raise RuntimeError(f"The shape of the 2D attn_mask is {attn_mask.shape}, but should be {correct_2d_size}.")
RuntimeError: The shape of the 2D attn_mask is torch.Size([399, 399]), but should be (355, 355).

Do you know, what could cause this issue & how to fix it?
EDIT:
this is happening only when I have batch size per gpu = 2. After I decreased the image size and increased batch size per gpu = 8, this error disappears. But this is not a solution...

This error happens in DN part. The number of queries does not match the shape of the attention mask. Can you give more details such as the hyperparameters related to DN and the number of decoder queries?

Thank you for your fast response. Yes, here is my config file:

config file (based on maskdino_r50_coco_instance_seg_50ep.py)
import torch.nn as nn
from detrex.layers import PositionEmbeddingSine
from detrex.modeling.backbone import ResNet, BasicStem

from detectron2.config import LazyCall as L

from projects.maskdino.modeling.meta_arch.maskdino_head import MaskDINOHead
from projects.maskdino.modeling.pixel_decoder.maskdino_encoder import MaskDINOEncoder
from projects.maskdino.modeling.transformer_decoder.maskdino_decoder import MaskDINODecoder
from projects.maskdino.modeling.criterion import SetCriterion
from projects.maskdino.modeling.matcher import HungarianMatcher
from projects.maskdino.maskdino_my import MaskDINO
from detectron2.data import MetadataCatalog
from detectron2.layers import Conv2d, ShapeSpec, get_norm

dim=256
n_class=530
dn="seg"
dec_layers = 9
input_shape={'res2': ShapeSpec(channels=256, height=None, width=None, stride=4), 'res3': ShapeSpec(channels=512, height=None, width=None, stride=8), 'res4': ShapeSpec(channels=1024, height=None, width=None, stride=16), 'res5': ShapeSpec(channels=2048, height=None, width=None, stride=32)}
model = L(MaskDINO)(
    backbone=L(ResNet)(
        stem=L(BasicStem)(in_channels=3, out_channels=64, norm="FrozenBN"),
        stages=L(ResNet.make_default_stages)(
            depth=50,
            stride_in_1x1=False,
            norm="FrozenBN",
        ),
        out_features=["res2", "res3", "res4", "res5"],
        freeze_at=1,
    ),
    sem_seg_head=L(MaskDINOHead)(
        input_shape=input_shape,
        num_classes=n_class,
        pixel_decoder=L(MaskDINOEncoder)(
            input_shape=input_shape,
            transformer_dropout=0.0,
            transformer_nheads=8,
            transformer_dim_feedforward=2048,
            transformer_enc_layers=6,
            conv_dim=dim,
            mask_dim=dim,
            norm = 'GN',
            transformer_in_features=['res3', 'res4', 'res5'],
            common_stride=4,
            num_feature_levels=3,
            total_num_feature_levels=4,
            feature_order='low2high',
        ),
        loss_weight= 1.0,
        ignore_value= -1,
        transformer_predictor=L(MaskDINODecoder)(
            in_channels=dim,
            mask_classification=True,
            num_classes="${..num_classes}",
            hidden_dim=dim,
            num_queries=300,
            nheads=8,
            dim_feedforward=2048,
            dec_layers=dec_layers,
            mask_dim=dim,
            enforce_input_project=False,
            two_stage=True,
            dn=dn,
            noise_scale=0.4,
            dn_num=100,
            initialize_box_type='bitmask',
            initial_pred=True,
            learn_tgt=False,
            total_num_feature_levels= "${..pixel_decoder.total_num_feature_levels}",
            dropout = 0.0,
            activation= 'relu',
            nhead= 8,
            dec_n_points= 4,
            return_intermediate_dec = True,
            query_dim= 4,
            dec_layer_share = False,
            semantic_ce_loss = False,
        ),
    ),
    criterion=L(SetCriterion)(
        num_classes="${..sem_seg_head.num_classes}",
        matcher=L(HungarianMatcher)(
            cost_class = 4.0,
            cost_mask = 5.0,
            cost_dice = 5.0,
            num_points = 12544,
            cost_box=5.0,
            cost_giou=2.0,
            panoptic_on="${..panoptic_on}",
        ),
        weight_dict=dict(),
        eos_coef=0.1,
        losses=['labels', 'masks', 'boxes'],
        num_points=12544,
        oversample_ratio=3.0,
        importance_sample_ratio=0.75,
        dn=dn,
        dn_losses=['labels', 'masks', 'boxes'],
        panoptic_on="${..panoptic_on}",
        semantic_ce_loss=False
    ),
    num_queries=300,
    object_mask_threshold=0.25,
    overlap_threshold=0.8,
    metadata=MetadataCatalog.get('custom_train'),
    size_divisibility=32,
    sem_seg_postprocess_before_inference=True,
    pixel_mean=[123.675, 116.28, 103.53],
    pixel_std=[58.395, 57.12, 57.375],
    # inference
    semantic_on=False,
    panoptic_on=False,
    instance_on=True,
    test_topk_per_image=100,
    pano_temp=0.06,
    focus_on_box = False,
    transform_eval = True,
)

# set aux loss weight dict
class_weight=4.0
mask_weight=5.0
dice_weight=5.0
box_weight=5.0
giou_weight=2.0
weight_dict = {"loss_ce": class_weight}
weight_dict.update({"loss_mask": mask_weight, "loss_dice": dice_weight})
weight_dict.update({"loss_bbox": box_weight, "loss_giou": giou_weight})
# two stage is the query selection scheme

interm_weight_dict = {}
interm_weight_dict.update({k + f'_interm': v for k, v in weight_dict.items()})
weight_dict.update(interm_weight_dict)
# denoising training

if dn == "standard":
    weight_dict.update({k + f"_dn": v for k, v in weight_dict.items() if k != "loss_mask" and k != "loss_dice"})
    dn_losses = ["labels", "boxes"]
elif dn == "seg":
    weight_dict.update({k + f"_dn": v for k, v in weight_dict.items()})
    dn_losses = ["labels", "masks", "boxes"]
else:
    dn_losses = []
# if deep_supervision:

aux_weight_dict = {}
for i in range(dec_layers):
    aux_weight_dict.update({k + f"_{i}": v for k, v in weight_dict.items()})
weight_dict.update(aux_weight_dict)
model.criterion.weight_dict=weight_dict


BUTTON_TYPE_INVALID when inline keyboard is used as reply_markup in InlineQueryResults

Which version are you using?
3.5.0
Output:
Bad Request: BUTTON_TYPE_INVALID

Description of problem
When I set up a Markup object to use it in reply_markup property of Article class I get an error from Telegram:
Bad Request: BUTTON_TYPE_INVALID

Digging in the code I've find out that the problem is the button in the Markup.
I've set the Button like this:
$inlineKeyboard = new Markup();
$inlineKeyboardButton = new Button();
$inlineKeyboardButton->text = "Button text";
$inlineKeyboardButton->switch_inline_query = "inline_query";
$inlineKeyboard->inline_keyboard[][] = $inlineKeyboardButton;

and passed it to reply_markup property:
$inlineQueryResultArticle = new Article();
$inlineQueryResultArticle->title = "Answer Title";
$inlineQueryResultArticle->description = "Answer description";
[...]
$inlineQueryResultArticle->reply_markup = $inlineKeyboard;

But apparently Telegram dislike the "pay" and the "callback_game" properties of the Button in the json body if the button is used in AnswerInlineQuery even if they are null (in "callback_game" case) or false (in "pay" case).
I fixed temporary the problem by creating a new class (I called it "ButtonInlineAnswer") coping Button class, removing "pay" and "callback_game" properties and use this class instead of Button in the code before:
$inlineKeyboard = new Markup();
$inlineKeyboardButton = new ButtonInlineAnswer();
$inlineKeyboardButton->text = "Button text";
$inlineKeyboardButton->switch_inline_query = "inline_query";
$inlineKeyboard->inline_keyboard[][] = $inlineKeyboardButton;

If this can be accepted as solution I can open a pull request with this new class but if a better one can be found I'm glad to wait the official fix using mine meanwhile.

Oh, that should not happen. Any empty set of properties should not be populated, even if it is a subobject. I'll have a look at it and come back to you about it!

The problem lies in the fact that the reply_markup button does not get cleaned in unreal4u\TelegramAPI\Telegram\Types\Inline\Query\Result::export():
Array
(
    [0] => Array
        (
            [type] => article
            [title] => Answer Title
            [description] => Answer description
            [id] => 123123
            [reply_markup] => unreal4u\TelegramAPI\Telegram\Types\Inline\Keyboard\Markup Object
                (
                    [inline_keyboard] => Array
                        (
                            [0] => Array
                                (
                                    [0] => unreal4u\TelegramAPI\Telegram\Types\Inline\Keyboard\Button Object
                                        (
                                            [text] => Button text
                                            [url] =>
                                            [login_url] =>
                                            [callback_data] =>
                                            [switch_inline_query] => inline_query
                                            [switch_inline_query_current_chat] =>
                                            [callback_game] =>
                                            [pay] =>
                                            [logger:protected] => unreal4u\Dummy\Logger Object
                                                (
                                                )

                                        )

                                )

                        )

                    [logger:protected] => unreal4u\Dummy\Logger Object
                        (
                        )

                )

        )

)

Since the Button is actually a Type and not a Method, I'll have to come up with some way of cleaning it. Creating a new object isn't the way to do this, maybe a recursive call to each sub-element is the solution, but I'm not really a fan of this either. I'll play around with some ideas.

can this do the trick? https://www.php.net/manual/en/function.array-filter.php

guys, do you know Telegram is going to add this opportunity? I mean setting pyment button to inline keyboard? Thanks

guys, do you know Telegram is going to add this opportunity? I mean setting pyment button to inline keyboard? Thanks

You can do that already. Quoting Telegram docs: “This type of button (pay button) must always be the first button in the first row”

@MrDarkest i tried it, i set only one pay button, got after that  BUTTON_TYPE_INVALID. Maybe you know how to get it through?

This error is coming when sending a webApp button as reply markup of inline query result. This button is only button in markup

This error is coming when sending a webApp button as reply markup of inline query result. This button is only button in markup

Found this lines in the docs. Web app button is only available in private chats
Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.

Well, the exact same issue i encounter in python aiogram library! Exactly as here. I don't know php, but if the issue is same for another library than it's telegram's fault.


util/threadpool: add thread pool scheduler

Signed-off-by: Neil Shen<EMAIL_ADDRESS>What have you changed? (mandatory)
Add scheduler for thread pools, so we can spawn a task to thread pools from any threads we want.
What are the type of the changes? (mandatory)

New feature (non-breaking change which adds functionality)

How has this PR been tested? (mandatory)
Unit tests.
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
No.
Does this PR affect tidb-ansible update? (mandatory)
No.

We have too many kind of schedulers. Let's rename it. Usually we call it sender, for example, in rust-threadpool and tokio-threadpool.

We have too many kind of schedulers.

Indeed, because we usually call it scheduler in TiKV, eg, worker::Scheduler and worker::futures::Scheduler.
I think it's fine as long as there is only one Scheduler for a module, like Sender in futures, futures::sync::mpsc::Sender futures::sync::oneshot::Sender futures::unsync::mpsc::Sender futures::unsync::oneshot::Sender.
What do you think? @breeswish

@overvenus Ok.

/run-unit-test


[BUTTON IDEA]: Reaction Buttons

Thank you for your work @harsh863 but currently we are not taking icon buttons before approval. Next time please submit a "new button idea" issue before working on it. I'll add the "hacktoberfest-accepted" label because I appreciate your work.


Use blocking API for Json unmarshalling

As evoked in the tokio's blog and inside the tokio-threadpool crate, using the blocking API for CPU heavy operation would not lock the reactor.
This wraps the serde_json work inside a blocking call.

I did not perform benchmarks, I just remembered from other languages experiences that JSON unmarshalling could potentially be expensive.
I will try to perform some benchmark with huge JSON file.
As a really newbie with tokio, I did not think about the current thread executor. May be it would be more efficient to switch directly to a dedicated ThreadPool for operations like that?

I think this could be interesting for cases where deserializing very big chunks of JSON, but I think it is a bit niche to do by default. And since it would make this stop working if not using the threadpool runtime, I'm going to close.


NStepLSTM return final output ?

If I want to only use last time step  to calculate loss, because NStepLSTM return 3 variable(final hidden states, final cell states, and the output sequences ) , should I use the the last one or the first one?
I also ask this question to stackoverflow page in a comment : https://stackoverflow.com/questions/45835493/how-to-use-nsteplstm-or-binsteplstm-in-chainer
But has no response?

Does input of NStepLSTM that list of variable: between each variable inside this list need to have temporal correlation???

I ask above question a long time, but there have no response.

Hi @sharpstill
If you want to use hidden vector at last time step hy in following example code.
import numpy as np
from chainer import Variable
import chainer.functions as F
import chainer.links as L

# Input data
x_list = [[0, 1, 2, 3], [4, 5, 6], [7, 8]] # varibale length (word ids)
x_list = [np.array(x, dtype=np.int32) for x in x_list] # convert to numpy data

# word embedding
n_vocab = 500
emb_dim = 100
word_embed=L.EmbedID(n_vocab, emb_dim, ignore_label=-1)

# input data
xs_f = []
for i, x in enumerate(x_list):
    x = word_embed(Variable(x)) # Word IndexからWord Embeddingに変換
    x = F.dropout(x, ratio=use_dropout)
    xs_f.append(x)

use_dropout = 0.25
in_size = 100
hidden_size = 200
n_layers = 1
lstm=L.NStepLSTM(n_layers=n_layers, in_size=in_size, out_size=hidden_size, dropout=use_dropout)
hy, cy, ys =lstm(hx=None, cx=None, xs=xs)

print(hy.shape)
# (1, 3, 200)

What do you mean temporal correlation?

@aonotas I mean input of NStepLSTM that list of variable: between each variable in this list.
For example, the first variable in this list is a sentence comes from first article.
the second variable in this list is another sentence comes from second article?
Or we must use the second sentence that is closely after first sentence as a member of second variable in list.?

If I am doing video classification , because each frame have individual label, do we need use output from all time step of LSTM output, can the label is coming from all video frame's ground-truth label.
Or can we just use the last time-step label but the LSTM output is come from all time-step to calculate loss?

@aonotas I mean , because NStepLSTM return 3 variable, if I only want last time-step to calculate loss, which variable of returned tuple should I use to calculate loss?

@sharpstill
Each variable in input list xs_f does not have to be temporal correlation because each input data in mini-batch is independent.

I mean , because NStepLSTM return 3 variable, if I only want last time-step to calculate loss, which variable of returned tuple should I use to calculate loss?
Please use hy (first returned varialbe) in

hy, cy, ys = lstm(hx=None, cx=None, xs=xs)

If I am doing video classification , because each frame have individual label, do we need use output from all time step of LSTM output, can the label is coming from all video frame's ground-truth label.
Or can we just use the last time-step label but the LSTM output is come from all time-step to calculate loss?

If you want to use all timestep vectors, please use ys .
If you want to use last timestep vectors, please use hy .

So we can shuffle between different batch as different input feed to NStepLSTM?
Yes. you can shuffle input data in minibatch or each iteration.

NStepLSTM does not maintain inner state across mini-batch?
Well, of course, NStepLSTM keep inner LSTM states in minibatch,
but IntputData_1 have no effect on InputData_2 (other data in minibatch).

If you have three input seqeuce and you want three output,

InputData_1    => NStepLSTM   => OutputData_1
InputData_2    => NStepLSTM   => OutputData_2
InputData_3    => NStepLSTM   => OutputData_3
You can shuffle input data.
[InputData_1, InputData_2, InputData_3]  => NStepLSTM =>  [OutputData_1, OutputData_2, OutputData_3]
[InputData_2, InputData_1, InputData_3]  => NStepLSTM =>  [OutputData_2, OutputData_1, OutputData_3]

my another question is about here https://github.com/chainer/chainer/issues/4431

OK. I'm not familiar with Convolution2D , please wait for the response from other developers.

@aonotas Very thanks for your generous help, do you have mail? so that I can ask some LSTM question about chainer easier?

OK.
nanigashi 03 [at] gmail . com
(please remove white space, and replace [at] to @)


fix(UI): centered flash message

Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #52123
I have made the flash message to be centered for better alignment.

Hey 👋🏽!
Welcome to contributing to freeCodeCamp.
Thanks for taking the time to create the PR and working on this. We’ve reviewed your pull request and decided not to merge it; However, We would welcome future pull requests from you.
You are welcome to read these guidelines to learn more about contributing to this project.
We recommend starting with issues that are labeled "help wanted"
Happy contributing.


Review module macro

This issue is related with #185. When the code snippets from the freestyle docs is run without using objects:
import freestyle._
import freestyle.implicits._

  @free trait Validation[F[_]] {
    def minSize(s: String, n: Int): FreeS.Par[F, Boolean]
    def hasNumber(s: String): FreeS.Par[F, Boolean]
  }

  @free trait Interaction[F[_]] {
    def tell(msg: String): FreeS[F, Unit]
    def ask(prompt: String): FreeS[F, String]
  }

  @module trait Application[F[_]] {
    val validation: Validation[F]
    val interaction: Interaction[F]
  }

the following error is returned:
exception during macro expansion:
scala.ScalaReflectionException: <none> is not a class
	at scala.reflect.api.Symbols$SymbolApi.asClass(Symbols.scala:272)
	at scala.reflect.api.Symbols$SymbolApi.asClass$(Symbols.scala:272)
	at scala.reflect.internal.Symbols$SymbolContextApiImpl.asClass(Symbols.scala:88)
	at freestyle.openUnion$.materializeImpl(module.scala:92)

The line 92 in module.scala is:
    val algebras   = findAlgebras(weakTypeOf[A].typeSymbol.companion.asClass)

And its failing when it calls to the companion method:
weakTypeOf[A]: Application.type
weakTypeOf[A].typeSymbol: object Application
weakTypeOf[A].typeSymbol.companion: <none>

On the other hand, when using objects, like:
import freestyle._
import freestyle.implicits._

object algebras {
  @free trait Validation[F[_]] {
    def minSize(s: String, n: Int): FreeS.Par[F, Boolean]
    def hasNumber(s: String): FreeS.Par[F, Boolean]
  }

  @free trait Interaction[F[_]] {
    def tell(msg: String): FreeS[F, Unit]
    def ask(prompt: String): FreeS[F, String]
  }
}

object modules {
  import algebras._

  @module trait Application[F[_]] {
    val validation: Validation[F]
    val interaction: Interaction[F]
  }
}

the results are:

weakTypeOf[A]: Evaluator__3b8302c6c45f12ee4172cc7128601deeeff5e5d0_1123939886.modules.Application.type
weakTypeOf[A].typeSymbol: object Application
weakTypeOf[A].typeSymbol.companion: trait Application

This code snippet is failing too:
import freestyle._
import freestyle.implicits._

    @free trait Validation[F[_]] {
      def hasNumber(s: String): FreeS.Par[F, Boolean]
    }

    @module trait Application[F[_]] {
      val validation: Validation[F]
    }

I have been trying these code snippets, and it seems that the same code work fine when used inside the console (from sbt freestyleJVM/console), or when written like that in the projects. This makes me think that the error comes from Kazari.
Regarding the failing code: the @module macro annotation performs a search in depth (recursively) of all the @free algebras used, directly or transitively, by the @module-annotated trait. The line 92 calls this process and it passes, as its starting point, a ClassSymbol of the Application trait. A ClassSymbol is the internal representation in the Scala compiler of a trait. The error suggest that, when running the macro, it is not locating the trait Application itself.
To narrow down the Trying to narrow down, I have found that the following code fails with the macro companion error.  also fails:
import freestyle._
import freestyle.implicits._

@free trait Foo[F[_]] {
  def ann: FreeS[F, Unit]
}
@module trait BarF[_]] {
  val foo: Foo[F]
}

However, the following code changes leave to the following results:

If we add at the top of the code snippet a package ops annotation, then it fails but the error is  in this case the failure says Compilation Error - ERROR -> List(CompilationInfo(illegal start of statement,Some(RangePosition(139,139,139)))).
If we wrap both Foo and Bar inside a same object, then the error becomes
Compilation Error - ERROR -> List(CompilationInfo(not found: value Evaluator__[...],Some(RangePosition(16,16,16))))

¿Are any of the previous errors known to occur when using Kazari?

The Evaluator__ piece is a in the fly class in the evaluator that gets compiled and executes what you send to the endpoint in it's apply block so definetly looks like an issue with the evaluator.

We have found a bug in the Scala Compiler that may be related to our problem with macros.

This should no longer apply since we moved the macros to scalameta


Altcoin support for bundled app

The following are some preliminary designs for handling alt coins in the bundled app, notably how to configure your server or servers to work with a particular coin.
So the first time you run the client you will need to select what crypto you want your wallet in:

Then if you want to support any other coins, you would do so by creating a new server configuration. The first question will be the server type (built in or stand-alone).

If you select built-in, then there will be a “wallet coin type” field as part of the data you need to enter for the server configuration.

If you selected stand-alone, the same form as is currently in the app is presented where you basically need to fill out various things (e.g. ip, port, etc..). In this case, you will not get a wallet coin type. You will need to configure that via the stand alone server’s config file:

This is what multiple built-in servers (for different coins) would look like:

FYI: @cpacia @jjeffryes @morebrownies

Picking built-in vs stand alone seems like it could be a confusing step, most users won't know what that choice means.
Could it be simplified by giving bundled clients a "create new crypto server" button of some kind, that's obviously for creating a server that runs a new coin?
Then the other button could be more explicitly for connecting to existing external servers. Some users get confused by it and assume it makes new servers as it is now.

Could it be simplified by giving bundled clients a "create new crypto server" button of some kind, that's obviously for creating a server that runs a new coin?

Yes, we could do it that way too. It's a matter of discussion which way is less confusing since I imagine having two "create server" buttons next to each other can be confusing as well.

Another point of discussion is that if the user selects zcash, they'll also need to provide a binaryPath, username, and password. Also, they will have had to download the zcash binary. So.. obviosuly zcash is for super advanced users. I'm struggling to see the benefits of exposing all that in the UI. Why wouldn't they just download a stand-alone server and configure it via the server config file?

@morebrownies @rmisio did we settle on how this will work?
I feel like we need to nail down the design, for instance whether there will be dedicated "create a server with BCH, create a server with ZCash" etc. buttons, or a drop down, or some other thing.

We also discussed limiting it to being chosen on first startup. I believe we decided not to do that, and to have the crypto coin choice be made at first startup and to allow the user to create other bundled servers running other crypto coins later. I want to make sure we're all on the same page.

@jjeffryes i'm ready to pick up a new task today. Is this a good one to start with? Or is there something else more pressing?

We can regroup on a call for a few if needed too before I start on it.

I think this is the most immediate thing. Let's coordinate a recap discussion.

A great coin is monero. they now have multisig!


Unnecessary inventory errors when retrieving USER_MANAGED serviceAccountKeys from GCP-managed service accounts

Issue report

[x] Which version of Forseti Security you're using (look in /home/ubuntu/forseti-security/google/cloud/forseti/init.py  on the client).

Version 2.14.1

[x] Which module(s) (inventory, scanner, enforcer, explain) you're having trouble with.

Inventory

[x] Include errors, log output, and host operating system, including installed packages.

Error message from Inventory, repeated for every project in my inventory
\"message\": \"Service account<EMAIL_ADDRESS>does not exist.\"

[x] Note how you deployed (via Deployment Manager, Terraform, local system, etc.).

Deployed with Terraform
Description
I observed that my SQL database ballooned with error messages similar to the above. Additionally, I get the following information in the error:
GCP API Error: unable to get serviceAccountKeys, name =<EMAIL_ADDRESS>from GCP:\n<HttpError 404 when requesting https://iam.googleapis.com/v1/projects/my-project/serviceAccounts/898998989898@cloudbuild.gserviceaccount.com/keys?alt=json&keyTypes=USER_MANAGED returned \"Service account<EMAIL_ADDRESS>does not exist.

The cloudbuild.gserviceaccount.com (and similarly, the cloudservices.gserviceaccount.com) service accounts are managed internally by GCP, and so it isn't possible to retrieve the service account keys for them. It seems like this is unnecessary. This also only began 2 days ago (May 7), so perhaps there was a change in how GCP interacts with these service accounts?
Any insight or guidance would be greatly appreciated. My inventory is full of error messages I can't do anything with 🤷♂

I'm seeing similar events.  clarification would be appreciated.

I'm still having this issue; seeing my SQL database grow into the TBs full of errors 😿

@osandoval011 to investigate.

Thanks for reporting the issue, we will look into handling the unnecessary warning messages, opened issue #2835 to track the problem

Hi @TaylorMutch and @nbards ,
We have patched both 2.14 and 2.15 to handle this problem, do you mind upgrading your instance to the latest version (2.14.2 or 2.15.1) and see if you still have the problem?
If you used default forseti installer to install Forseti, you can simply reset both the client and server VM and it will pick up the latest patch. If you used terraform to install forseti, you will need to update the version to 2.14.2 or 2.15.1 and do another terraform apply.
Thanks,
Joe

Thanks Joe, I will test this out now. Will report back after the next inventory runs.

Tested with v2.14.2, seems to be working now. I like that the errors are now retrievable on a "get" request rather than a list - getting all those errors really wasn't useful in the list view.


attoX

attoX is the extension system for atto, which allows features to be added to the language through JavaScript .attox.js files.
Extensions can be loaded with extload url, and unloaded with extunload url. An extension's commands can be then accessed with name.command, where name is the extension name, and command is the command for that extension. The extension's name can be assigned to the user by entering extload url, name, which can also be used to load multiple instances of the same extension.
Example usage of attoX:
10 extload "http"
20 extload "json"
30 input "Enter your name: ", name$
40 http.get "https://api.agify.io?name="; name$, data$
50 json.parse data$, "age", age%
60 print "Your age is probably "; age%; "..."
70 print "Don't quote me on that, though!"

Here's a few extensions that either already exist for attoX (in this PR), we are working on, or we'd like to add:

[x] HTTP GET/POST (eg. http.get "https://atto.devicefuture.org", data$, status)
[x] JSON parsing (eg. json.parse `{"data": {"number": 123, "string": "hello"}}`, "data.string", data$)
[ ] WebRTC/broadcasting communications
[ ] Weather API (we could use something like OpenWeatherMap)
[ ] Raspberry Pi/Arduino GPIO interfacing
[ ] micro:bit interfacing
[ ] LEGO Mindstorms NXT/EV3 robotics interfacing

Ready for liftoff!


[proposal] Right align of numeric columns

For normal tables, columns with all numeric cells would be formatted with right align.
EXAMPLE:
before formatting:
| column1 | column2 |
|---------|---------|
| text1   | 12.00   |
| text2   |         |
| text3   | 9       |

after formatting:
| column1 | column2 |
|---------|---------|
| text1   |   12.00 |
| text2   |         |
| text3   |       9 |

I think this change refers to method getCellInfoList in helper.ts

OK.
It looks nice.
I will think about it.

It would be nice to right align by numbers by .:
| column1 | column2 |
|---------|---------|
| text1   |   12.02 |
| text2   |    1.1  |
| text3   |     .01 |
| text4   |         |
| text5   |       9 |

This would make comparing floats with different precision easier. I think intgers should only be right aligned, but aligning by . would be possible too:
| column1 | column2 |
|---------|---------|
| text1   |   12.02 |
| text2   |    1.1  |
| text3   |     .01 |
| text4   |         |
| text5   |    9    |


User.voiceChannel sometimes undefined

I've noticed that occasionally, discord.js won't have the VoiceChannel of a user cached, even if they're in one. A few people I know have confirmed that this issue occurs for them as well.

Might be that the lib doesn't parse the voice_state sent during guild create/ready

That's probably it, having the user rejoining works.

Yeah. Whenever people tell me that it isn't detecting users being in voice channels, I tell them to rejoin, and that fixes it.

That's actually my bot's thing when it can't tell what voice channel people are it. it seems to only happen recently after the bot is restarted.

Just checked the code; the lib does seem to parse voice_states on READY/GUILD_CREATE. Perhaps there's some issue with how it's being parsed?

Still unable to reproduce on latest indev, reproduction instructions would be nice

have user join a voice channel
turn on bot
check the user's voice channel, this will sometimes fail.

(Probably) fixed with https://github.com/hydrabolt/discord.js/commit/f49f1ab3c8d0354e5021d7ff8eb721196e96020f


Added OmatAdd operator support

This PR builds upon the OmatCopy & OmatCopy2 PR by adding support to OmatAdd as a separate operator with a separate implementation of its transpose kernel(s).
OneMKL Specification used as reference for the interface & implementation : Link
Co-Author : @s-Nick

Squashed all commit history into 3 base commits & re-based to merge on Master.


[2.074] update changelog

Uh, how LINK2 decides whether URL is the first argument or the second?

URL should be the first argument

Yep, will fix links


Consider adding LBP simulation chart for LBPs

Background / Problem

LBPs follow a drastic 'start high, end low' dutch-auction-like mechanism for markets demand to be reflected in initial price discovery of tokens
LBPs are effective when there is demand 'at a certain price', not 'at a certain time'
Lack of understanding of the LBP mechanism can lead users to 'ape-in' early
Mechanism between pool weight <> token price can be too difficult to understand

Solution

Provide a more digestible graph/chart on the LBP pool details page breaking down the simulated price graph over time
Show that 'buying the token' moves price up vs 'not buying the token' moves price down

Potential issues/ things to consider

LBP pool on Osmosis, while not insignificant, is relatively smaller in comparison to existing pools. Don't overcomplicate, overengineer, overdesign. Need to be resource efficient with bigger priorities if needed.
Working with the Imperator historical data may be necessary to provide non-onchain information that may need to be included in chart

Helpful resources

Copper LBP is a good example
Stargaze team created a LBP simulator for Cosmos

Quick sanity check: Are the 3d/4d/5d sample charts supposed to be increasing in token price?

@victortokaito this is due to the default fake volume set in the UI ($1M) set it to 0 and you will see it price naturally drops, will default it to 0 to avoid any confusion but the idea is that you can play with an estimation of expected volume and see how this behaves.


BrightStartDB assembly references Newtonsoft.Json 7.0.1 but the NuGet packages still references NewtonSoft.Json 6.0.8

Which results in a runtime error:

and a build warning:
warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.

When updating the project(s) to NewtonSoft.Json 7.0.1 everything works fine.

It turns out that up until now we have been grandfathering the Newtonsoft.JSON dependency in via our dependency on dotNetRDF. But it seems we have diverged in terms of minimum version number required so I've updated our nuspec templates (commit f4edd41)  to explicitly specify our dependency on 7.0.1.
Unfortunately on the machine I have available right now I cannot test a full package build, but hopefully once our build server has churned through I'll have a package I can test to ensure that this doesn't break the NuGet dependency manager :)

Thank you for your efforts. While this was just a heads up issue(at least for me),  your quick and accurate responses are very comforting when exploring new software.

Fixed for 1.12 release


Propose local tasks

This proposal aims to adress the following issues:

Sidecars are barely usable (https://github.com/opendevstack/ods-pipeline/issues/135)
Resource Consumption is not configurable from pipeline (https://github.com/opendevstack/ods-pipeline/issues/372)

Let's try out a different format this time. Instead of discussing in an issue, this approach allows to discuss one specific proposal PR-style (allowing to comment inline etc.)
Looking forward to feedback of any kind!

I am not exited tbh.
But as long as there is no support from the tekton side we don't have that much options of which this seems to be the best / most flexible one.
So I am OK with the approach in hope for a better solution out of tekton itself.

I suppose if one adjusted the "user installation" so that one would have a subtree (or perhaps submodule) of the entire ods-pipeline repo at  <project-cd>/ods-pipeline one could then install the two helm charts of what is currently in deploy/cd-namespace and deploy/cd-tasks which would be derived from deploy/central.
Now you have all that is needed to also test pipeline changes locally. I suppose it might also be possible to contribute changes back.
Feels a bit weird so, or?

Based on an off-screen discussion with @henrjk following his comment, I am inclined to update my proposal with @henrjk's suggestion. In effect, he proposes to go one step further and abolish a central installation altogether. This has the following advantages:

simpler to understand as there is no admin/user distinction
simpler to install as no collaboration with a cluster admin is required at all
images are then controlled by users, making them easier to modify

Disadvantage is obviously that every project needs to build images themselves. However the images build quickly and reliably at the moment. We could also further explore to get rid of building images in the cluster at all, and simply provide images from a central registry like Docker Hub. Technically, there are only two blockers right now: one is the baked in sonar edition (easily solved, see #410) and the other is the aqua scanner. This one could be handled either as a special case or we could start downloading the scanner in the pipeline run (potentially caching it in the PVC to avoid re-download).
@kuebler @gerardcl @oalyman since you already approved, I would like to hear your thoughts on expanding the scope of the PR even further

I also see the point and agree, I like it.  Things to take into consideration:

is this still ensuring a compliance/controlled installation from an enterprise point of view? I mean, is the option of making the installation central still valid/possible, so a team in a company can provide support in a scalable way?
I believe then the other services we rely on are still in a central installation or we consider then them as just service dependencies one can decice where to offer them from? (aka nexus, sonarqube,..)

is this still ensuring a compliance/controlled installation from an enterprise point of view?

validation of tooling can (and should) happen at the project level (qualifying a specific use case vs. a generic one)

I mean, is the option of making the installation central still valid/possible, so a team in a company can provide support in a scalable way?

The proposal right now removes this option. We could think about introducing making it optional though.

I believe then the other services we rely on are still in a central installation or we consider then them as just service dependencies one can decice where to offer them from?

Correct, they are part of ODS core. The proposal does not affect how we see them.

Really like the extended scope, in particular w.r.t. Docker Hub, we need to consider their rate limiting, though.

in particular w.r.t. Docker Hub, we need to consider their rate limiting, though.

Two ideas come to mind:

GitHub also provides a registry we could use as an alternative.
OpenShift image streams can pull through from Docker Hub. I am not sure how that affects rate limiting but it could help.

@michaelsauter  I like it. Especially that it puts some pressure on the topic to pre build images as I already proposed.

So I've put some more thought into this and want to suggest the following now.
I'm going to expand the scope to remove the admin installation completely. For the images, I entertained a few options but have now settled on an approach that we have already tried and tested with ODS core, and I believe is the best we can do for now.
I'll call the approach the "wrapper technique". The idea is simply: built an image in GitHub, but wrap this image in a BuildConfig/ImageStream in OpenShift. For example, say we build & push the ods-sonar image in GitHub, then we have an ods-sonar ImageStream in each project. That image stream is filled from a BuildConfig, which defines an inline Dockerfile. For ods-sonar, that is simply FROM index.docker.io/opendevstackorg/ods-sonar.
While the wrapper images comes with some conceptual overhead, the advantages easily outweigh this in my opinion:

it allows to inject cluster env variables. In my comment above (https://github.com/opendevstack/ods-pipeline/pull/404#issuecomment-1014397084) I missed that we also need to inject proxy env variables (HTTP_PROXY and friends). We could also do this differently, but it is quite convenient to have that baked into the image.
it makes it very trivial to adjust the dockerfile for users, allowing them to install more packages for example if they need to.
it allows to download the (password protected) aqua scanner in the ods-buildah image
it ensures we do not run into pull limits imposed by Docker Hub or GitHub registry
it removes external dependencies: once the installation is complete, all images are present locally and do not depend on an external registry to be present
pulling images in pipeline runs should be quicker compared to a situation where pulling involves remote registries
most importantly, it allows a completely project-local installation without requiring people to build the same image over and over again.

@kuebler @gerardcl @oalyman @henrjk Would love to get one more round of feedback :)

hi! makes sense to me! but! how and where is the deployment of, for example, ods-sonar?
I still see the need of:
1- having a central installation of ods services or clear options defined (I see three indeed: central, project relative, cluster external)
2- having project ownership of tasks but I would avoid having to maintain ods services (aka nexus, sonar) at project level

where is the deployment of, for example, ods-sonar?

I assume you talk about a SonarQube server? This, along with other services, is provided by a central ODS core installation. Projects do not need to provide/maintain their own services (SQ, Nexus, Bitbucket, Aqua), although they could if they wanted to.
The interfaces of ODS Pipeline are described here: https://github.com/opendevstack/ods-pipeline/blob/master/docs/design/software-architecture.adoc#interfaces.
We could further clarify the exact needs of this central installation but I am OK with the current state.

so then this will still exist https://github.com/opendevstack/ods-pipeline/tree/master/deploy/central, right? but only with the https://github.com/opendevstack/ods-pipeline/tree/master/deploy/central/images-chart bc related to central installation?

@gerardcl No. The images in the images-chart are images used by the Tekton tasks. Those resources will be moved to the project namespace. However, the images in the project namespace will only build on top of an image provided by Docker Hub, which means the images in each project namespace are only "wrapping" pre-built images.
There will not be a central ODS Pipeline installation any longer. There will only be a central ODS Core installation (which provides the services such as SonarQube, Nexus, Aqua, Bitbucket).

fully understood now 👍 all about sonar, etc, here is about the clients

@michaelsauter fine by me ...

I found another disadvantage of the proposed "wrapping technique":
Images are built at the time of the release of a specific version, and then they aren't updated anymore. As a consequence, they contain vulnerabilities over time. Users simply wrapping the images cannot get rid of those vulnerabilities easily.
As a counter measure, we could add run GitHub Actions on a schedule somehow, publishing updated images which use the same version tag. Additionally, each push should apply a tag which is unique, e.g. using the current date as a suffix (0.3.0-20220321)

Scope:

change default from clustertask to task
adjust architecture diagrams, removing global installation
adjust readme: remove user audiences, remove admin installation, rename "user installation" to "installation", move contributor section to bottom of readme
remove subfolders in deploy/.
One chart folder directly beneath deploy/
Move task yaml in deploy/chart/templates
Remove sidecar variants (incl make target) and render in yaml like with deployment resources
Add resources for tasks like with deployment resources
Images chart should be a sub chart, which can optionally be installed
Adjust local image building to allow corporate network
Inline buildconfig or reference wrapper dockerfile in github
Move aqua scanner install to wrapper image
Remove “one version per task release” concept -> adjust ADR
(For future: Allow parmeterisation of release name in install script to allow multiple, parallel installations)
Remove install-ods-tasks-kind.sh
Remove comments in “authoring tasks” doc


Portal doesnt work.

After building the portal structure and using a flint and steel the portal activates, but entering it doesn't do anything. Also, exiting the world after building a eden portalcauses minecraft to hard crash, requiring a force quit in task manager.
latest.log

This Issue Will Be Resolved In 20.1.19

This is not an issue with ERR

Give some Video Proof


1.9.8 crashes with the following stack trace running Jasmine specs

The following crash generated this stack trace:
https://gist.github.com/robmadole/2abdb543c46dc691cbe9
I am using Grunt with grunt-contrib-jasmine to run our specs. The binary that I used was phantomjs-1.9.8-linux-x86_64.
The Jasmine specs are from a private repository. If it's necessary for me to get the offending test case to reproduce the problem let me know and I can ask if we can open this up.

Please upgrade to PhantomJS 2.0. 1.9.x is no longer supported, and known to have many crasher bugs that are fixed in 2.0.


Fix IllegalArgumentException on Android sometimes when a pin is deselected

Hi guys, if this PR can be merged in at your earliest convenience that would be greatly appreciated :-) Thank you.

Thank you very much :-)


Failed loading state for unknown transaction

https://explorer.helium.com/txns/-garbage-
Expected:
Catch 404 and show error page / failed to load state

@danielcolinjames I'd like to work on it.

hey @MohdImran001, sorry for the late reply! I've assigned you to it, let me know if I can help at all or if you have any questions :)


how to trigger function in start and end?

This function fires only twice, start and end.
erd.listenTo(document.getElementById("test"), function(element) {
  var width = element.offsetWidth;
  var height = element.offsetHeight;
  console.log("Size: " + width + "x" + height);
});

@jingyuLin1999 Can you provide more information? A code-pen example or similar would be nice. I don't understand the context/problem.