Testers confused by "New Submission" label

Package version (if known): v11
This is more of a feedback / possible alternative from our group of testers
Testers were confused by the label "New Submission". Since this label is kept even when the record submission is accepted/rejected or even after a couple of days, testers didn't understand what it meant.
I think it means "this request is for a record to become part of the community" as opposed to being a request for quota increase / a user to become part of the community. With that in mind, testers found "Record submission" / "Record inclusion" / "Upload inclusion" more clear. The crux of the problem was the term "new": what was new? when was something not new? "new" implied recent or different than pre-existing other requests which isn't the case.

Thanks a lot for the feedback, totally agree :) The situation will get even more complicated with InvenioRDM v12: we are introducing a new type of request, technically called community-inclusion, that allows including an already published record to multiple communities.
The challenge is to find good names for our users, that are more understandable than the technical names.
The label needs to be changed in any case, and the New part does not make much sense.
After some internal brainstorming, below some proposals:

Use community inclusion for the new feature and rename the current community submission to one of:

Publish review
Peer review
Upload review
First review
First publish
Initial review
Draft review

Name both requests community inclusion, but add Draft or similar to the community-submission and change the UI label by splitting it in 2 labels:

Name both requests community inclusion, but have very long names. This is just an example:

We will continue our discussion internally, it would be nice to have your feedback too.

Got it, it's indeed a community inclusion :+1: . I think screenshot 2 and 3 are flipped. After flip, 2 is probably closer to what makes sense to me, but I will share this with colleagues for their feedback. Thanks!

Got it, it's indeed a community inclusion :+1: . I think screenshot 2 and 3 are flipped. After flip, 2 is probably closer to what makes sense to me, but I will share this with colleagues for their feedback. Thanks!

Yes you are right, sorry about that. We have discussed this today, we will prepare some new mock ups, taking into account other future request types.

After prodding about this, the feedback from our stakeholders revolved around a couple of things:

It would be clearer if the labels paralleled each other:

label: Member invitation
-- TO -->
label: Member inclusion or Member community inclusion
title (for invitation): Your invitation to join "Open public community"
title (for join request): Your request to join "Open public community"
label: Community inclusion
-- TO -->
label: Record inclusion or Record community inclusion
These labels always put what is included in the label.

There is still confusion about why in the community dashboard, member invitations (a kind of request) are not in the requests tab. It breaks our stakeholders' expectations of this being the same as for records and the same as in a user's dashboard.

With respect to the concept of a new record (draft) versus a published record being displayed on the label or next to it, it didn't matter so much as long as both concepts were labelled. That is, if it's a published record being included, something to the effect that it is a published record should be present (and if it's a draft, something to the effect of it being a draft should be present). Draft or Published should not be omitted in one of the cases.

I'll relay other feedback as they get to use the system more.


Is it possible to filter commits in GenerateReleaseNotes Xplat?

Azure DevOps Extension you are using
GenerateReleaseNotes Node based Cross Platform Task
Where are you running it?
Azure DevOps Server 2019 /  on-premise
Version of Extension/Task
Latest public/V2
I am simply curious if it's possible to filter commits in the same manner you can filter workitems.  We use a pull request-based workflow and I'm wondering if you could do that to filter the redundant merge commits.
Thanks-

No sorry there is currently no filtering on commits. How did you envisage the filter to work for commits?

I guess I was thinking something along the lines of a regex pattern that could be used to filter the commits based on the commit message?  For example our PR merges all have a message that starts with "Merged PR #:" so it would be nice to be able to exclude them maybe with a regex like:
^Merged PR \d+:

Interesting idea. I have swapped this to an enhancement. Now sure when I will get round to it

Thanks for considering this!

This has been released in 2.24.3
The new template format is detailed in the WIKI, but to summarise
@@CSLOOP[^Merged PR #.+]@@ match only commits/changesets with a commit message in the form 'Merged PR #1234'
So
### Associated commits matches all
@@CSLOOP@@
* **ID ${csdetail.id} ** ${csdetail.message}
@@CSLOOP@@

### Associated commits with regex filter in form to match the text 'Merged PR #1234'
@@CSLOOP[^Merged PR #.+]@@
* **ID ${csdetail.id} ** ${csdetail.message}
@@CSLOOP[^Merged PR  #.+]@@

Let me know how it goes

This seems to be working great!  I did tweak the regex to be the inverse as I wanted to exclude the merge commits ^(?!Merged PR \d+).*$ , but seems to be working well.  Thanks again for the quick turnaround!

That's great news. It should work for any regex


fix(register): fix registering

just realized you cannot register because of the missing fields (specifically, date_of_birth, it's not required but when it's not provided it doesn't work properly, will also fix it on backend).
also enforced these fields so you cannot register without specifying all of it (except "About me").
also picking only required fields when sending it to client (need to do it for everything though).
can someone review this asap?

:tada: This PR is included in version 1.0.3 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


CIP-0116: add Conway json schema

The corresponding tests are located at https://github.com/mlabs-haskell/cip-0116-tests

Thanks @rphair
I can't edit the original comment, but here is a list of changes in this PR:

Add Conway era schema
Add required fields to UnitInterval
Add required fields to plutusData variants
Replace additionalProperties with unevaluatedProperties

See this issue for more details. In summary: schemas with unevaluatedProperties are easier to compose.

Add examples for some types

Useful when generating values from these schemas


Add GitHub workflows

Jobs for building, testing and linting on Linux, macOS, and Windows.

Thanks a lot <3


feat: 5207 - new "My proofs" and "Proof" pages

What

From the user page, a new button to the new "my proofs" page.
From "My proofs", links to "my proof" page.

Screenshots

new "my proofs" button
new "my proofs" page
new "my proof" page

Fixes bug(s)

Closes: #5207

Files
New files:

price_proof_page.dart: Full page display of a proof.
prices_proofs_page.dart: Page that displays the latest proofs of the current user.

Impacted files:

app_en.arb: added 3 labels for "my proofs"
app_fr.arb: added 3 labels for "my proofs"
price_data_widget.dart: instead of a web app link, we open the new "my proof" page
user_preferences_account.dart: added a link to open the new "my proofs" page

Codecov Report
Attention: Patch coverage is 0.83333% with 119 lines in your changes missing coverage. Please review.

Project coverage is 7.29%. Comparing base (4d9c7fc) to head (b02f3ac).
Report is 197 commits behind head on develop.

Files
Patch %
Lines

...mooth_app/lib/pages/prices/prices_proofs_page.dart
1.06%
93 Missing :warning:

.../smooth_app/lib/pages/prices/price_proof_page.dart
0.00%
17 Missing :warning:

...ib/pages/preferences/user_preferences_account.dart
0.00%
5 Missing :warning:

...smooth_app/lib/pages/prices/price_data_widget.dart
0.00%
4 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5389      +/-   ##
==========================================
- Coverage     9.54%   7.29%   -2.26%
==========================================
  Files          325     390      +65
  Lines        16411   19964    +3553
==========================================
- Hits          1567    1456     -111
- Misses       14844   18508    +3664

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

For the record it was my "1024th pull request merged"
🎆


office-365-worldwide-endpoints Missing IP Range for smtp.office365.com

smtp.office365.com seems not up to date:
52.98, 52.97, 40.100 are not listed and maybe more
Thanks

smtp.office365.com
Serveur :   dns.google
Address:  <IP_ADDRESS>

Réponse ne faisant pas autorité :
Nom :    LHR-efz.ms-acdc.office.com
Addresses:  2603:1026:c06:22::2
2603:1026:c06:2e::2
2603:1026:c06:1419::2
2603:1026:c06:1d::2
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
Aliases:  smtp.office365.com
outlook.office365.com
outlook.ha.office365.com
outlook.ms-acdc.office.com

@gitdevmod Please indicate which document you are referring to. Thanks

@gitdevmod Please indicate which document you are referring to. Thanks

https://docs.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide

https://docs.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide

@JoeDavies-MSFT Is there a way I can add the missing IPs to the addresses list for SMTP.office365.com? I remember you had once told me that this section is only accessed by PG and it is highly restricted content to modify.
Below are some of the IP's But there could be more that are missing, so if you can check with PG that would be great
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
Thanks
Sri

@JoeDavies-MSFT Is there a way I can add the missing IPs to the addresses list for SMTP.office365.com? I remember you had once told me that this section is only accessed by PG and it is highly restricted content to modify.
Below are some of the IP's But there could be more that are missing, so if you can check with PG that would be great
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
<IP_ADDRESS>
Thanks
Sri

@gitdevmod Thank you for your feedback. I'm working with the author to get this updated.

@gitdevmod Thank you for your feedback.


Android 8.1.0 Update getting tag was lost exception

Anybody having similar issues?
Android OS : 8.1.0
Getting this exception com.github.devnied.emvnfccard.exception.CommunicationException: Tag was lost. all the time after updating my android OS.

same issues with Android 7.1

any updates? also receive this error

any updates? also receive this error


disable touch overlay area & click the overlay button automatically based on a bool condition

Can we set the package in such a way that we can:

enable/disable touch overlay area (letting only the button to be clickable)?
click the overlay button automatically based on a bool condition?

I am developing a chat app where of personA taps a heart (or any other emoji) icon on his device, and the condition is sent personB's device which, the sent condition now in personB's device, will cause the click of the heart_overlay button thereby triggering the animation of the heart_overlay widget & showing the desired emoji icon.

Can we set the package in such a way that we can:

enable/disable touch overlay area (letting only the button to be clickable)?
click the overlay button automatically based on a bool condition?

I am developing a chat app where of personA taps a heart (or any other emoji) icon on his device, and the condition is sent personB's device which, the sent condition now in personB's device, will cause the click of the heart_overlay button thereby triggering the animation of the heart_overlay widget & showing the desired emoji icon

Summary,

let heart_overlay area touch/tap have disable/enable option
let the animation run automatically when a condition is met (with or without BackgroundWidget (now child) been clicked)

Seems easy to do, i'll make sure to release an update within the next 24 hours.

That will awesome. Thank you!

Few hours over due, but update is now live. Check out Heart Overlay: Version 1.4.0 ✌
You can now enable or disable gestures via the enableGestures boolean on the HeartOverlay .
HeartOverlay(enableGestures: false);

OR
you can also do that with the newly added HeartOverlayController.
heartOverlayController.setGesture(enabled: false);

You can also show an icon on screen by providing an offset to the HeartOverlayController's method showIcon(offset: ...).
heartOverlayController.showIcon(
    offset: offset,
 );

Initialize a HeartOverlayController and pass it to your HeartOverlay widget, you can then use the controller to add items to your board.
Here's an example that places an icon randomly on screen with a press of a button using the HeartOverlayController:

class _HeartOverlayTestWidgetState extends State<HeartOverlayTestWidget> {
  late HeartOverlayController heartOverlayController;

  @override
  void initState() {
    super.initState();
    heartOverlayController = HeartOverlayController();
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Expanded(
          child: HeartOverlay(
            controller: heartOverlayController,
            enableGestures: true,
          ),
        ),
        Padding(
          padding: const EdgeInsets.all(50.0),
          child: ElevatedButton(
            onPressed: () {
              // You can get the center offset
              // Offset centerOffset =
              //     heartOverlayController.getCenterScreenOffset(context);

              double iconSize = heartOverlayController.getSize() * 2;
              double height = heartOverlayController.getHeight() ??
                  MediaQuery.of(context).size.height;
              double width = heartOverlayController.getWidth() ??
                  MediaQuery.of(context).size.width;

              Offset offset = Offset(
                // DX
                (Random().nextDouble() * width).clamp(
                  iconSize,
                  width - iconSize,
                ),
                // DY
                (Random().nextDouble() * height).clamp(
                  iconSize,
                  height - iconSize - 100,
                ), // - 100 is for the button padding
              );

              // offset += centerOffset; // You can add offsets

              // Show Icon
              heartOverlayController.showIcon(
                offset: offset,
              );
            },
            child: const Text('Show Icon'),
          ),
        )
      ],
    );
  }
}

Make sure to close the issue if the issue has been resolved✌ and check out the CHANGELOG for additional details and know more about the next release.

Nice. Thank you!
I will check it out

personA taps a heart (or any other emoji) icon on his device

I figure this functionality requires the icon to change according to the user's selected icon, so i'll soon be adding a method to change the icon from the controller rather than changing it from the HeartOverlay widget itself.

Ok. I will still check it out, not done that yet

Hi @JohnF17 hope good. Any updates yet with regards to changing the icon from controller?

Hi @isaanyoha, doing well thanks, hope you are as well, I recon the other proposed features are working well, i'll soon add the icon changing method to the controller in just a few hours.

Yes, I am. Thank you! Ok, we will be waiting

@isaanyoha, Update is now live. Check out Heart Overlay: Version 1.4.1 ✌
You can now change icons on the fly using the HeartOverlayController, like this below
heartOverlayController.changeIcon(
    icon: const Text('👀'), // Required
    size: 60, // Not required
    horizontalOffset: 10, // Not required
    verticalOffset: 30, // Not required
    // You can also edit the splash animation details through this, though that would require the icon to be of type [Icon] to work
);

Make sure to close the issue if the issue has been resolved✌ and check out the CHANGELOG for additional details and know more about the next release.

Ok. Thank you!

Hi! @JohnF17, Please can you make the overlay act as truely transparent when the enableGestures: false (and when the icons shows up let the icons gestures be false). I am using stack widget where the heartOverlay is at the top most. I want to be able to click through the overlay when gesture is disabled (and the showing icons), to be able to tap a button that is in the container in the stack below the overlay widget

Hello @isaanyoha

Could you please make the overlay truly transparent when enableGestures is set to false?

You can set the decoration property of the HeartOverlay to this BoxDecoration(color: Colors.transparent) and i believe that should fix the issue

when the icons appear, ensure that their gestures are also disabled.

As a matter of fact, i was contemplating on adding this feature, ignoring pointer events of the icons being shown, i'll publish the package after you confirm it is working and to do that, go to your pubspec.yaml and replace the heart_overlay with the code below
heart_overlay:
    git:
      url: https://github.com/JohnF17/heart_overlay.git

After you confirm that it works well i will release it to pub.dev as heart_overlay: 1.4.2 and you can use that on the yaml file.

Woooooooow! Speed of reply is awesome. Thank you! Let me check it out right now

More explanation:
I added stack Widget because, I want transparent heartoverlay to be above my app's main ui and splashing icons over the main ui, yet I still want to allow users to be able access the app's main ui by clicking through the transparent heartoverlay widget that is topmost in the stack widget.

I've made another commit, run flutter pub get once again and try it

Ok, let me try

Yeaaaah! Works now. Thank you!

More explanation: ...

Hmm I've understood it well, you aren't talking about color transparency but rather gesture transparency (so the BoxDecoration solution won't help).
Here are two things that can help with performance and gesture registration.
For performance: Rather than putting the HeartOverlay widget inside a stack, put the other widget inside the child property of the HeartOverlay, that would just automatically place the HeartOverlay icon animations above your other widget so its all good.
Gesture registration: Wrap your other widget that's below the HeartOverlay or its child with an AbsorbPointer widget.

More explanation: ...

Hmm I've understood it well, you aren't talking about color transparency but rather gesture transparency (so the BoxDecoration solution won't help). Here are two things that can help with performance and gesture registration.
For performance: Rather than putting the HeartOverlay widget inside a stack, put the other widget inside the child property of the HeartOverlay, that would just automatically place the HeartOverlay icon animations above your other widget so its all good.
Gesture registration: Wrap your other widget that's below the HeartOverlay or its child with an AbsorbPointer widget.

Ok, noted. Thank you!

Please, can you put up the new version

Sure will, can you confirm if the gestures work as expected when you place your widget inside the child property? This might be a breaking change for others so i have to confirm this.

Ok, let me check. I will be right back

The child is not clickable as enableGestures: false

I didn't add AbsorbPointer. Hold on, me do that

Interesting, i guess i'll have to try to find a way to please both audiences, I was reading more about AbsorbPointer widget from stack overflow and it doesn't seem to be the answer for this situation.
Keep using the git branch as I try to find a way to fix this, i'll let you know what i come up with.

Still didn't work

Oh ok. Thank you!
For the git branch, hope things don't change on the fly as our app is in production

For the git branch, hope things don't change on the fly as our app is in production

Oh well, in that case i believe we should take time now to publish a working package, bare with me for a while, i'll revert the commit to its working state (and/or create a branch for you specifically) but i think i've created a solution, run flutter pub get  and check out my this commit, i think it pleases all, try it on both gestures enabled and disabled.

Good morning @JohnF17! Hope you are doing great.
Any update about laying HeartOverlay above?
My app is just set with the package, only that performances reduces overtime. I guess because of calling the setState() in my case. I believe you can solve this puzzle.
Btw, thanks for giving us such a beautifying widget. It looks amazing in my app

Hey! @JohnF17 maybe it was my fault. Now, I replace push with pushReplacement and it seems to be working better.
I will deploy and see how it goes on the long run. Thank you!

Thanks alot @isaanyoha! Hope you are doing great as well. I've actually made progress but this comes at a configuration cost.
The following condition applies to all children that receive tap events within the HeartOverlay's child

If enablegestures is set to true

Tap events in the child only work if the tapdowntype is double else they might not
And when tapdowntype is set to double and the child's callback works well, it might feel a bit delayed or slow but that's not a performance issue at all but rather flutter's gesturedetector widget having a 300ms delay waiting on the double tapdown before letting other callbacks work, you can visit the issue here

But If enableGestures is set to false

Tap events will work as normal

So for your case do you intend to keep gestures off at all times? do you want the tapdowntype to be double or single?

Yes. For me, enableGestures is set to false at all times

Are you using child or the stack method?

Are you using child or the stack method?
Stack method

Please, let my own method not bias your update for me. Maybe yours will work much better without future issues.
Finally, all I want is that HeartOverlay (properties: transparent, gesture disabled) canopies the main ui but still gives me full access (touch) my main ui because I want to control the heartoverlay from the main ui using the heartOverlayController.
Meanwhile, I am fine o. Thank you bruv!

Oh okay then, i'd highly recommend to check these conditions before release.
In your pubspec.yaml if you are using
1.
heart_overlay:
    git:
      url: https://github.com/JohnF17/heart_overlay.git

I'd like you to run flutter pub get and try the child, i recon it works well

If you intend on using the stack method rather than the child
revert back to the release

heart_overlay: 1.4.1

And wrap your heart_overlay widget with an IgnorePointer widget and set both ignoreSemantics and ignoring to true, that will fix everything and you don't have to worry about frequent releases on this git branch.

Ok, let me try it out now. I will update you


Trying to execute run.py in train folder renders an error

Hi,
Really great and helpful code!
I was trying to run train.py on the nimrod-uk-1km-test data and encountered the following error, it says "RuntimeError: Serialization of parametrized modules is only supported through state_dict()." I searched on torch's website and found an earlier commit, so I downgraded torch to v1.12.0 but this did not go away.
Torch Link: https://github.com/pytorch/pytorch/issues/69413
Can you guys help in debugging this issue? I am planning to use this on another dataset

**To Reproduce**
Steps to reproduce the behavior:
1. installing dependencies
2. execute train/run.py
and the above error shows in the terminal

Hi, are you using multiple GPUs? By default the run.py tries to use 6 GPUs, although it should be changed to 1. The spectrally normalized layers in PyTorch don't seem to work in multi-GPU setting as far as I have been able to get them. So if you do change it to 1 GPU, it should start training

I was earlier using cpu's, to sort the issue started using 1 gpu, but the training fills virtual memory of upto 200 GB(my system's limit) and the dataloader worker is killed. Can you suggest a way to bypass this.

I met the same issue, the memory keeps increasing to 256GB in the data loading process until it got killed by the system, any solution to solve this?

I met the same issue, the memory keeps increasing to 256GB in the data loading process until it got killed by the system, any solution to solve this?

Updates: My problem is solved by setting streaming=True in TFDataset as follows for my own dataset, by doing this, data are not first loaded into memory.
class TFDataset(torch.utils.data.dataset.Dataset):
def init(self, data_path, split):
super().init()
# self.reader = load_dataset(
#     "openclimatefix/nimrod-uk-1km", "sample", split=split, streaming=True
# )
self.reader = load_dataset(data_path, split=split, streaming=True)


Publish protoc-gen-go-aip as a GitHub Release

To be able to use the go-aip plugin for protoc it is currently required to build it from source.
It would be preferable to be able to download a pre-compiled binary from GitHub directly. i.e. publish the binaries together with the GitHub Release.
Is that something that you have considered or do you have another recommendation than compiling from source?

Hello, the generated code has dependencies on the release library (similar to grpc-go).
This means you want to use the generator which matches your installed version of aip-go.
The easiest way to ensure this is to build the binary using the version in modfile.

Thanks, that make sense. I close this issue.


Fix Textbox text position and Textbox size

If I type 'o' and press left arrow, it looks like this because the text is positioned without regard to textbox insets:

Also, the Textbox is too small, cutting off the bottom of descender characters like 'j' and 'y'.

Thanks for the bug reports!
The current Textbox implementation is hacked together from the remains of druid's, so it definitely needs a rewriting pass.

Wait, no, this is a PR. I assume it was an issue filing.
LGTM.

I've bypassed the tests, since all of them passed except one on windows which is currently flaky.
Thank you for the PR!

No problem, thank you for the project!


Add typing for IsomorphicDOMPurify

Addresses issue #1
Summary of Changes
https://www.npmjs.com/package/@types/dompurify contains the most up to date types for DOMPurify. This PR re-exports those defined types so that users of isomorphic-dompurify can make use of them in their typescript project without needing to install DOMPurify at all.
Example Usage
Typescript
// example.ts
import DOMPurify, {Config} from 'isomorphic-dompurify';

const options: Config = {
    ADD_TAGS: ['iframe'],
    FORCE_BODY: true,
    USE_PROFILES: {svg: true, svgFilters: true, html: true},
  }
const output = DOMPurify.sanitize("<foo></foo>", options) as string;

Default import
When importing using a CommonJS const x = require(...) or ES6 default import import x from ..., the code editor's intellisense will be able to make use of types even in a regular .js file. (See gif below)

The full list of types that DOMPurify exports can be found in the original definition file here.
How to test these changes
These steps will allow you to test the changes without needing to setup a typescript project.

Create a new directory and create a file called run.js in it.
Run npm init to initialize a package.json in this test app directory
Run npm link. This will allow you to load in local npm modules.
In your run.js file add the following code

// substitute in the absolute path to your isomorphic-dompurify code
const DOMPurify = require("/Users/ellul/src/github.com/kkomelin/isomorphic-dompurify");

You should now see that if you type DOMPurify. like in the gif above you will have autocomplete options based on the types.
Additionally in some code editors like VSCode, you can ctrl-click on the DOMPurify variable name and be brought to its type definition file (as seen below)

Repeat the same instructions as above but instead import the code using the ES6 import method along with all the named types that are also exported.

import DOMPurify, {
    DOMPurifyI,
    Config,
    HookName,
    HookEvent,
    SanitizeElementHookEvent,
    SanitizeAttributeHookEvent,
} from "/Users/ellul/src/github.com/kkomelin/isomorphic-dompurify";

I'm now going to create a new release.


Asynchronous Handlers?

In emit(), this object calls any registered handlers. Are those calls asynchronous or does it wait for each one to complete?

emit is synchronous and runs handlers one by one waiting for each one to complete.

I'm closing this one, let me know if you have any other questions @newlegendmedia


[REQ] Limit of players on the team without using the JSON file

Currently we can control the player limit on the team using the JSON file: https://shobhit-pathak.github.io/MatchZy/match_setup/
However, for those who do not use this system, just the .ready command to start the PUG, going live does not have a limit of players per team.
Example, my server has 12 slots, but 10 players on the server and everyone types .ready the PUG starts, it goes LIVE.
However, if players enter the server, they are not blocked from SPEC until a player who is on the teams disconnects. It would be interesting to have some cvar to control this limit of players on the team during LIVE and only allow SPEC to enter the teams if someone on the team disconnects, in this case someone abandons the match.
WarMod [BFG] plugin for CSGO had a feature like this, I believe it can help.
https://github.com/Versatile-BFG/Warmod_BFG/blob/4121c877fc8c9755ba1d46585d4a88e874f75703/scripting/warmod.sp#L527-L529

Any news about this feature? Can it be implemented?

@shobhit-pathak any news on this? Can we expect something like this?
Some kind of player limit control for teams would really be perfect. From what I've seen, it's currently only available for GET5, but I don't use it.

Hey!
Apologies for delayed reply, I'll be doing some research on this feature, though locking teams in pugs is something we can do via a convar. I'll be checking on it soon.
Thanks!

https://discord.com/channels/1160907911501991946/1160907912445710480/1295301901423870013
    public override void Load(bool hotReload)
    {
        // Add team join listener
        AddCommandListener("jointeam", JoinTeamListener);
    }

    /// <summary>
    /// Gets the current number of players, optionally filtering by team and bot inclusion.
    /// </summary>
    public static int GetCurrentNumPlayers(CsTeam? csTeam = null, bool includeBots = false)
    {
        return Utilities.GetPlayers().Count(player => player?.IsValid == true && (includeBots || (!player.IsBot && !player.IsHLTV)) && (csTeam == null || player.Team == csTeam));
    }

    public HookResult JoinTeamListener(CCSPlayerController? player, CommandInfo info)
    {
        if (player is null || !player.IsValid)
            return HookResult.Continue;

        // Get player count for each team
        int CtCount = GetCurrentNumPlayers(CsTeam.CounterTerrorist);
        int TCount = GetCurrentNumPlayers(CsTeam.Terrorist);

        // Max players per team
        int CtMax = 10;
        int TMax = 10;

        // Stop player from joining if team limit is exceeded
        if ((info.ArgByIndex(1) == "2" && CtCount >= CtMax) || (info.ArgByIndex(1) == "3" && TCount >= TMax))
        {
            string teamName = info.ArgByIndex(1) == "2" ? "Counter-Terrorist" : "Terrorist";
            int maxCount = info.ArgByIndex(1) == "2" ? CtMax : TMax;

            player.PrintToChat($"Can't join {teamName} team! Team limit ({maxCount}) exceeded.");

            // Move player to spec only if he is not in team :)
            if (player.Team is CsTeam.None)
                player.ChangeTeam(CsTeam.Spectator);

            player.ExecuteClientCommand("play sounds/ui/weapon_cant_buy.vsnd_c");
            return HookResult.Stop;
        }

        return HookResult.Continue;
    }


thrift proxy: fix function spelling in the tests of thrift proxy

Signed-off-by: wbpcode<EMAIL_ADDRESS>Commit Message: thrift proxy: fix function spelling in the tests of thrift proxy
Additional Description:
Simple name spelling fix.
Risk Level: None.
Testing: N/A.
Docs Changes: N/A.
Release Notes: N/A.
Platform Specific Features: N/A.

cc @rgs1


Move CSS/et al files from S3 to repo

There are some "invalid byte sequences" in many files that my Overcommit pre-commit hooks barfed on.
@QueerSynd @astronaut-wannabe Could you take a look at the files and see if there's hidden bad unicode characters or something?

There are some "invalid byte sequences" in many files that my Overcommit pre-commit hooks barfed on.
@QueerSynd @astronaut-wannabe Could you take a look at the files and see if there's hidden bad unicode characters or something?

Nevermind, these are all already in /public.
https://github.com/crimethinc/website/tree/main/public/features
Maybe we need to move them from public/ to app/assets/stylesheets/?
Then use the local ones instead of the CDN ones from the feature articles.

Nevermind, these are all already in /public.
https://github.com/crimethinc/website/tree/main/public/features
Maybe we need to move them from public/ to app/assets/stylesheets/?
Then use the local ones instead of the CDN ones from the feature articles.


Refactor to JAX?

JAX is a project from Google designed to have as similar an API as numpy, but can be run on either a CPU or a GPU.
Possible benefits

Faster processing
GPU capability could entail some future-proofing
Similarity to numpy should reduce development friction

Possible downsides

Google project get killed sometimes
There are "sharp bits"

I don't think this is ready for primetime. There are a few too many system specific installment requirements and undocumented dependency mismatches


How do I run wasmtime inside C

I followed this official wasmtime tutorial on embedding wasmtime in C. https://github.com/bytecodealliance/wasmtime/blob/main/examples/hello.c
It provides commands to compile the C code with hello-world wasm embedded, but I don't know what do the two lines (cargo build --release -p wasmtime-c-api, target/release/libwasmtime.a) do? cargo build is for building a rust application, what has it to do with compiling C code, let alone there is no cargo.toml, so the cargo build itself would also fail. And this static library target/release/libwasmtime.a is also not in the wasmtime repo. https://github.com/bytecodealliance/wasmtime
cargo build --release -p wasmtime-c-api
cc examples/hello.c
-I crates/c-api/include
-I crates/c-api/wasm-c-api/include \
target/release/libwasmtime.a \
-lpthread -ldl -lm
-o hello
./hello
Without question, I cannot get this hello-world wasm in C compiled and run :(
Thank you so much!

cargo build --release -p wasmtime-c-api

This is what compiles target/release/libwasmtime.a. You will have to run it from the root of your wasmtime clone. Rustc can target wasm, but by default it will compile for the host system.

cargo build --release -p wasmtime-c-api

This is what compiles target/release/libwasmtime.a. You will have to run it from the root of your wasmtime clone. Rustc can target wasm, but by default it will compile for the host system.

When I run cargo build --release -p wasmtime-c-api from the root of wasmtime clone, it says
error: failed to read pathtowasmtimeclone/wasmtime/crates/wasi-common/WASI/tools/witx/Cargo.toml
I dont know what to do.

cargo build --release -p wasmtime-c-api

This is what compiles target/release/libwasmtime.a. You will have to run it from the root of your wasmtime clone. Rustc can target wasm, but by default it will compile for the host system.

Thank you~! When I run cargo build --release -p wasmtime-c-api from the root of wasmtime clone, it says
error: failed to read pathtowasmtimeclone/wasmtime/crates/wasi-common/WASI/tools/witx/Cargo.toml
I dont know what to do.

It sounds like maybe the git submodules aren't cloned? Try this:
git submodule update --init

It sounds like maybe the git submodules aren't cloned? Try this:
git submodule update --init

Hi Chris, Thank you!! I thought simply a git would work. Now I am able to run the examples except the wasi one.
https://github.com/bytecodealliance/wasmtime/blob/eb650f6fe0e1f40432e7fa8d62b2885d0e4c5467/examples/wasi/main.c
The line 40 is:       FILE* file = fopen("target/wasm32-wasi/debug/wasi.wasm", "rb");
but there is no wasm32-wasi directory in my wasmtime clone. I have already  cargo build --release -p wasmtime-c-api   But  after this command, there is only a ./release directory and a CACHEDIR.TAG file in my ./target directory.
There is still something missing in my target directory I think

I think you will also need to run cargo build --target wasm32-wasi --example wasi to build just that file.

I think you will also need to run cargo build --target wasm32-wasi --example wasi to build just that file.

Thank you! I tried this command, but there is compiling error during cargo build:
Compiling errno v0.2.7
error[E0554]: #![feature] may not be used on the stable release channel
--> /home/zhen/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.2.7/src/lib.rs:20:33
|
20 | #![cfg_attr(target_os = "wasi", feature(thread_local))]
|                                 ^^^^^^^^^^^^^^^^^^^^^
Compiling time v0.1.44
error: aborting due to previous error
For more information about this error, try rustc --explain E0554.
error: could not compile errno.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

I'm going to close this since this is a pretty old issue and I believe the problems here were build-related. If there are still issues I can try to help out here or feel free to reach out on Zulip as well.


Add Postman 9.21.2

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

[x] Does your manifest conform to the 1.1 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@wingetbot run

Yeah looks like the installer is not available via https://dl.pstmn.io/download/version/9.21.2/win64.

The latest desktop platform release can be found here: https://dl.pstmn.io/api/version/latest


Vscode / Visual Studio tips for Rust Analyzer with cargo fuzz

Hey, thanks contributors for making and maintaining this awesome project!
I had an issue with vscode where editing files inside ProjectZ/fuzz/fuzz_targets/targetX.rs
wasn't working with or providing me any Rust Analyzer feedback.
At least when I would open the ProjectZ folder inside vscode.
I would get Rust Analyzer support when opening the fuzz folder, but that seemed to me
as a less than ideal workaround. I wanted to open the ProjectZ folder and work on both my project
and my fuzz_targets.
It turns out there is a solution by editing this into the end of my vscode settings.json,
I get Rust Analyzer support for both my parent project, and inside the fuzz/fuzz_targets folder.
    "rust-analyzer.linkedProjects": [
        "Cargo.toml",
        "fuzz/Cargo.toml"
    ]
}

At the moment I have that in my vscode user settings, and from a quick test, that global setting seems to work
fine with Rust projects without a fuzz folder.
You might want to put it in your vscode workspace settings if you want to control this on a project by project basis.

I wrote this to help future users. It can be closed. I will file a report at the book in case it should be added there.

For Helix add this:
[language-server.rust-analyzer.config]
linkedProjects = [ "Cargo.toml", "fuzz/Cargo.toml" ]

to your languages.toml file (on my system located in ~/.config/helix/)


T265: Old issue: Frame didn't arrived within 5000

Required Info

Camera Model
T265

Firmware Version
<IP_ADDRESS>9

Operating System & Version
Raspbian Buster, Ubiquity - all the same

Kernel Version (Linux Only)

Platform
Raspberry PI

SDK Version
<IP_ADDRESS>

Language

Segment
others

Issue Description
I know, this issue has already been discussed (but no solution so far). I can easily reproduce it by letting the T265 starr to a white wall w/o features or covering it with a towel or letting it run in a dark room.
Most the time the T265 recovers from that by reverting the initiating situation.  But  this helps not all the time. If it doesn't recover, it starts to deploy NaN coordinates at 200 Hz and there is no way to convince the cam to be in "save" areas again :)
What would be the suggested procedure then? Not even restart of the script seems to help. Only unplug/re-plug of USB, which is a little problem IMHO for robots :)

@neilyoung We are working to resolve this, and expect to have a significant improvement around this issue in a near-term (possibly next) release. In the meantime, however, it would be good to have a better way to reset after nan pose output begins. In our testing, we have found that calling pipe.stop() followed by pipe.start() will restore normal pose tracking. This starts a new tracking session, which is not desirable in many application contexts, but it's better than having to to physically unplug and replug the device.
Does re-starting your script effectively result in calls to pipe.stop() and start()? I'm imagining that it likely just does start() at the beginning, which would not fix the problem. One thing you could try is modifying your application to check for a first nan pose output, and when it occurs, call stop(), start(), and continue with your application as best you can. Can you please let us know the outcome, if you try this (or if you've already tried it)?

@harville thanks, yes meanwhile I also came to this conclusion, that an auto restart of my main loop (resulting in pipe.stop()/pipe.start()) does work.

Thanks for the helpful feedback, @neilyoung . It would be great to get some clarifications on your issue:

What exactly does the title of this ticket mean: Were you seeing no pose data at all being sent by the device for some time? Or was the data being sent, but was NaNs? 5000 is seconds, msec, samples?
You mention you can reproduce by pointing camera at a white wall, in a dark room, or covering camera. Is the camera static in these cases? Or what sort of sequence of motions is it undergoing?
What does "reverting the initiating situation" mean?

It would be great to get your additional feedback on the above, to better guide our efforts to improve in these areas.
Also, the new librealsense release 2.30.0 contains some improvements that may help address the NaN pose issues. If you are able to try it out, we would be interested in hearing about whether it helps to improve the issues you are reporting on here.
That last comment applies more generally to the community - any feedback on whether release 2.30.0 reduces NaN occurrence would be appreciated. We are actively working on this topic, but it can occur in a variety of ways, and there is a lot of randomness to it. Also, as indicated in the release notes, you might consider creating a raw data recording of the issue. We feed these into our debugging and analysis tools internally. We already have some recordings, but could use more.

@harville Sorry for being not specific enough. I didn't mention the specific situation and context, which produces this error.
First of all: The problem is still existent in 2.30.0 pre-release
OK, start over. There is a python example called t256_example.py. I replaced the for _ in range loop by a while (true): in order to let it run for a while.
After the initialisation phase the script waits for frames in frames = pipe.wait_for_frame() This sometimes excepts with the error mentioned in the title, especially in the mentioned situations (white wall, dark room, covered lenses). My camera is mounted on either a laptop or a Raspberry PI, so it is portable :), but always static. Even if I move the camera while covering the lenses the problem occurs.
The script terminates, if you don't catch the exception. In most cases the script recovers and if the "initiating situation" is reverted (you move away from white walls, uncover the lenses, switch the light on) everything goes as it went before.
Then there is sometimes the situation, that - even though there is a frame - an attempt to get out things like translation or rotation ends up in a "NaN" exception (not a number). Other environments say "Null pointer exception" or so.  I haven't seen that much "NaN" anymore with 2.30.0, but it might be, that I'm now prepared and catching every exception. Not sure.
Basically this is a non issue for me meanwhile. You can close it.


if config file is not exist so skip loading arguments from the file

When file is not exist then we can loading arguments from other sources so we don't need exiting from the program. It's not a critical error.

I have to reject your pr because it introduces inconsistent CLI behaviour.
When I explicitly specify a configuration file and it is not accessible I expect an error.


feat: LSDV-5069: Create new defaults for panels and tabs

PR fulfills these requirements

[X] Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
[ ] Tests for the changes have been added/updated (for bug fixes/features)
[ ] Docs have been added/updated (for bug fixes/features)
[X] Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
[X] Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)
(check all that apply)

[X] Product design
[X] Frontend

Describe the reason for change
new defaults for tab panels
What does this fix?
n/a
What is the new behavior?
new defaults for tab panels
What is the current behavior?
just different defaults
What libraries were added/updated?
N/A
Does this change affect performance?
no
Does this change affect security?
no
What alternative approaches were there?
n/a
What feature flags were used to cover this change?
N/A
Does this PR introduce a breaking change?
(check only one)

[ ] Yes, and covered entirely by feature flag(s)
[ ] Yes, and covered partially by feature flag(s)
[X] No
[ ] Not sure (briefly explain the situation below)

What level of testing was included in the change?
(check all that apply)

[ ] e2e
[ ] integration
[ ] unit

Which logical domain(s) does this change affect?
panel tabs frontend

Codecov Report
Patch coverage: 8.33% and project coverage change: -0.02 :warning:

Comparison is base (32c3ef4) 64.93% compared to head (8d3be5b) 64.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1362      +/-   ##
==========================================
- Coverage   64.93%   64.92%   -0.02%
==========================================
  Files         436      436
  Lines       27133    27137       +4
  Branches     7150     7157       +7
==========================================
- Hits        17619    17618       -1
- Misses       8187     8189       +2
- Partials     1327     1330       +3

Impacted Files
Coverage Δ

src/components/SidePanels/TabPanels/utils.ts
67.96% <ø> (ø)

src/stores/RegionStore.js
63.54% <0.00%> (-0.63%)
:arrow_down:

src/components/Filter/Filter.tsx
97.22% <50.00%> (+0.07%)
:arrow_up:

... and 1 file with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Experimental Rate Limit Support

This PR introduces pluggable token-bucket based rate limits that attempt to avoid hitting Pandora's server-site rate limits. The default behaviour is to just warn and do nothing else but consumers can plug in a throwing or a blocking strategy as needed. The pydora CLI learned to use the blocking strategy.
This needs unit tests and testing but wanted to post it as work-in-progress for comments. The plan is to land this for 2.0

Codecov Report

Merging #60 into master will decrease coverage by 0.01%.
The diff coverage is 57.14%.

@@            Coverage Diff             @@
##           master      #60      +/-   ##
==========================================
- Coverage   60.51%   60.49%   -0.02%
==========================================
  Files          14       15       +1
  Lines        1332     1410      +78
  Branches      131      135       +4
==========================================
+ Hits          806      853      +47
- Misses        526      554      +28
- Partials        0        3       +3

Impacted Files
Coverage Δ

pydora/player.py
0% <0%> (ø)
:arrow_up:

pandora/client.py
100% <100%> (ø)
:arrow_up:

pandora/clientbuilder.py
100% <100%> (ø)
:arrow_up:

pandora/ratelimit.py
66.66% <66.66%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5f4ed6...cbab786. Read the comment docs.

Going to abandon this and re-push it when I have some more time to work on it.


fix Counter.svelte location in create-svelte template

This should have been moved along with the other $lib stuff in #511. Right now a fresh copy of the template fails because it tries to import from $lib/Counter.svelte but the component isn't there.

This will also be an opportunity to see whether the automated create-svelte publishes work now.

Shouldn't this be done for the Skeleton template as well?

Shouldn't this be done for the Skeleton template as well?

There's no Counter.svelte in the skeleton template.

There's no Counter.svelte in the skeleton template.

I was referring to using $lib but you are right there is no components at all


cmd/compile: optimize XOR masking code

In the WebSocket protocol, clients have to generate a random masking key for every frame sent to the server and XOR mask the frame payload with the key. The server will unmask it on retrieval.
The mask/unmask function looks like this https://github.com/gorilla/websocket/blob/0ec3d1bd7fe50c503d6df98ee649d81f4857c564/mask_safe.go#L9-L15
This is masking byte by byte but can be made significantly faster if the masking was done word by word. Unfortunately, the Go compiler does not do this automatically so you have to use unsafe and write this yourself: https://github.com/gorilla/websocket/blob/0ec3d1bd7fe50c503d6df98ee649d81f4857c564/mask.go#L13-L54
Benchmarks at https://github.com/gorilla/websocket/issues/31
It would be nice if the Go compiler did this automatically.

The two links you posted are the same (copy-paste mistake?). The 2nd one in particular does not use unsafe.

My bad, fixed.
The second link was supposed to be https://github.com/gorilla/websocket/blob/0ec3d1bd7fe50c503d6df98ee649d81f4857c564/mask.go#L13-L54

Thank you for filing this issue @nhooyr and @ALTree for the triaging!
Kindly paging @josharian  @randall77 @martisch.

Please see #28113 #30553 and #28465
And https://github.com/golang/go/blob/68d4b1265ec7915dccfccf6c0e32f9ab2d9c3a86/src/crypto/cipher/xor_generic.go#L45
If you want fast xor, there are 4 different implementations in crypto/cipher.
I don't know whether the compiler can do so much optimization.

The compiler already recognizes sequences of byte loads and coalesces them into a single multi-byte loads. See e.g. the amd64 rules starting at https://github.com/golang/go/blob/e6ae4e86ad59c45f302a8828e77e6c234307fce4/src/cmd/compile/internal/ssa/gen/AMD64.rules#L1531. We could in theory write similar rules that convert a sequence of byte-wise load/xor/store operations to an XORQmodify.
In fact, I believe there is a way of writing this that would allow the compiler to do this optimization now. This code:
import "encoding/binary"

func f(key [4]byte, b []byte) {
	k := binary.LittleEndian.Uint32(key[:])
	v := binary.LittleEndian.Uint32(b)
	binary.LittleEndian.PutUint32(b, v^k)
}

Generates (at its core, surrounded by other stuff):
MOVQ	"".b+40(SP), AX
XORL	(AX), DX
MOVL	DX, (AX)

That seems pretty good.
What do you think, @nhooyr ?

(And if this is seriously performance-critical, you might want to manually inline the LittleEndian rountines and also duplicate key into a uint64 so that you can do 8 bytes at a time.)

That seems very reasonable @josharian
Will give this is a shot and let you know how the performance compares.

So benchmarked and here are the results on my machine (Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz):
$ go test -bench=BenchmarkMaskBytes
goos: darwin
goarch: amd64
pkg: github.com/gorilla/websocket
BenchmarkMaskBytes/size-2/align-4/byte-8         	500000000	         3.74 ns/op	 535.10 MB/s
BenchmarkMaskBytes/size-2/align-4/gorilla-8      	300000000	         3.93 ns/op	 508.44 MB/s
BenchmarkMaskBytes/size-2/align-4/gobwas-8       	300000000	         4.67 ns/op	 428.21 MB/s
BenchmarkMaskBytes/size-2/align-4/nhooyr-8       	300000000	         4.73 ns/op	 422.43 MB/s
BenchmarkMaskBytes/size-2/align-4/crypto/cipher-8         	100000000	        16.9 ns/op	 118.23 MB/s
BenchmarkMaskBytes/size-4/align-4/byte-8                  	300000000	         5.58 ns/op	 716.61 MB/s
BenchmarkMaskBytes/size-4/align-4/gorilla-8               	300000000	         5.56 ns/op	 719.80 MB/s
BenchmarkMaskBytes/size-4/align-4/gobwas-8                	200000000	         7.27 ns/op	 550.31 MB/s
BenchmarkMaskBytes/size-4/align-4/nhooyr-8                	200000000	         7.04 ns/op	 567.92 MB/s
BenchmarkMaskBytes/size-4/align-4/crypto/cipher-8         	100000000	        19.6 ns/op	 204.31 MB/s
BenchmarkMaskBytes/size-16/align-4/byte-8                 	100000000	        13.7 ns/op	1170.31 MB/s
BenchmarkMaskBytes/size-16/align-4/gorilla-8              	100000000	        20.2 ns/op	 793.15 MB/s
BenchmarkMaskBytes/size-16/align-4/gobwas-8               	200000000	         6.59 ns/op	2426.43 MB/s
BenchmarkMaskBytes/size-16/align-4/nhooyr-8               	100000000	        13.6 ns/op	1174.09 MB/s
BenchmarkMaskBytes/size-16/align-4/crypto/cipher-8        	100000000	        16.2 ns/op	 985.94 MB/s
BenchmarkMaskBytes/size-32/align-4/byte-8                 	100000000	        23.9 ns/op	1336.39 MB/s
BenchmarkMaskBytes/size-32/align-4/gorilla-8              	100000000	        20.6 ns/op	1551.76 MB/s
BenchmarkMaskBytes/size-32/align-4/gobwas-8               	200000000	         8.13 ns/op	3934.47 MB/s
BenchmarkMaskBytes/size-32/align-4/nhooyr-8               	100000000	        15.6 ns/op	2054.30 MB/s
BenchmarkMaskBytes/size-32/align-4/crypto/cipher-8        	100000000	        24.7 ns/op	1298.15 MB/s
BenchmarkMaskBytes/size-512/align-4/byte-8                	 5000000	       345 ns/op	1480.68 MB/s
BenchmarkMaskBytes/size-512/align-4/gorilla-8             	30000000	        53.8 ns/op	9525.00 MB/s
BenchmarkMaskBytes/size-512/align-4/gobwas-8              	50000000	        39.9 ns/op	12840.94 MB/s
BenchmarkMaskBytes/size-512/align-4/nhooyr-8              	20000000	        83.6 ns/op	6126.90 MB/s
BenchmarkMaskBytes/size-512/align-4/crypto/cipher-8       	10000000	       241 ns/op	2122.82 MB/s
BenchmarkMaskBytes/size-4096/align-4/byte-8               	  500000	      2674 ns/op	1531.63 MB/s
BenchmarkMaskBytes/size-4096/align-4/gorilla-8            	 5000000	       285 ns/op	14322.91 MB/s
BenchmarkMaskBytes/size-4096/align-4/gobwas-8             	 5000000	       282 ns/op	14478.90 MB/s
BenchmarkMaskBytes/size-4096/align-4/nhooyr-8             	 3000000	       539 ns/op	7596.43 MB/s
BenchmarkMaskBytes/size-4096/align-4/crypto/cipher-8      	 1000000	      1818 ns/op	2252.51 MB/s
PASS
ok  	github.com/gorilla/websocket	58.645s

Source code at https://github.com/nhooyr/websocket/blob/40b4f235f2e2730ad1d8b81852e7610a8251d080/mask_test.go#L136-L174
Interestingly, the crypto/cipher assembly XOR was the slowest but I might be using it wrong.
Your solution is 2x slower than gorilla and gobwas but fast enough for me as I do not want to use unsafe.
Thanks.
I'll leave this issue open in case you think there is still improvement that can be made.

How I implemented what you described:
// xor applies the WebSocket masking algorithm to p
// with the given key where the first 3 bits of pos
// are the starting position in the key.
// See https://tools.ietf.org/html/rfc6455#section-5.3
//
// The returned value is the position of the next byte
// to be used for masking in the key. This is so that
// unmasking can be performed without the entire frame.
func nhooyr(key [4]byte, keyPos int, b []byte) int {
	// If the payload is greater than 16 bytes, then it's worth
	// masking 8 bytes at a time.
	// Optimization from https://github.com/golang/go/issues/31586#issuecomment-485530859
	if len(b) > 16 {
		// We first create a key that is 8 bytes long
		// and is aligned on the keyPos correctly.
		var alignedKey [8]byte
		for i := range alignedKey {
			alignedKey[i] = key[(i+keyPos)&3]
		}
		k := binary.LittleEndian.Uint64(alignedKey[:])

		// Then we xor until b is less than 8 bytes.
		for len(b) >= 8 {
			v := binary.LittleEndian.Uint64(b)
			binary.LittleEndian.PutUint64(b, v^k)
			b = b[8:]
		}
	}

	// xor remaining bytes.
	for i := range b {
		b[i] ^= key[keyPos&3]
		keyPos++
	}
	return keyPos & 3
}

@nhooyr this is a case in which a little unrolling helps. Add something along these lines:
		for len(b) >= 32 {
			v := binary.LittleEndian.Uint64(b)
			binary.LittleEndian.PutUint64(b, v^k)
			v = binary.LittleEndian.Uint64(b[8:])
			binary.LittleEndian.PutUint64(b[8:], v^k)
			v = binary.LittleEndian.Uint64(b[16:])
			binary.LittleEndian.PutUint64(b[16:], v^k)
			v = binary.LittleEndian.Uint64(b[24:])
			binary.LittleEndian.PutUint64(b[24:], v^k)
			b = b[32:]
		}

I see 30%+ improvements from that. You may want to experiment a bit to find the sweet spot.
What's going on here is that reslicing (b = b[8:]) is expensive because the compiler needs to take care to avoid creating a pointer past the end of b. Unrolling dilutes that cost. Some of the techniques discussed in #27857 might help reduce that cost as well, but those don't appear likely to land before Go 1.14 at the earliest.
And with that, I think I'll go ahead and close this issue. Thanks very much for filing it--issues like these are helpful in finding opportunities to improve the compiler and runtime.

And thank you for the tips.

@josharian out of curiosity but do you have any idea why the crypto/cipher xor was so slow even though its written in assembly?

Unrolling the loop to 128 makes it faster than gobwas/ws and gorilla/websocket 😮
$ go test -bench=XOR -run=^\$
goos: darwin
goarch: amd64
pkg: nhooyr.io/websocket
BenchmarkXOR/2/basic-8         	300000000	         4.07 ns/op	 491.49 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/2/fast-8          	300000000	         4.73 ns/op	 423.15 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16/basic-8        	100000000	        12.6 ns/op	1273.17 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16/fast-8         	100000000	        13.4 ns/op	1197.26 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/32/basic-8        	100000000	        23.1 ns/op	1388.07 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/32/fast-8         	100000000	        23.8 ns/op	1343.96 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/512/basic-8       	 5000000	       349 ns/op	1466.36 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/512/fast-8        	30000000	        44.4 ns/op	11531.75 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/4096/basic-8      	  500000	      2582 ns/op	1585.85 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/4096/fast-8       	 5000000	       274 ns/op	14920.34 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16384/basic-8     	  200000	     10239 ns/op	1600.04 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16384/fast-8      	 1000000	      1073 ns/op	15267.46 MB/s	       0 B/op	       0 allocs/op
PASS
ok  	nhooyr.io/websocket	20.611s

crypto/cipher is fast for
largeBuffer := make([]byte, size)
xor(largeBuffer, ...)

But what you did is
largeBuffer := make([]byte, size)
for i := 0; i < 16; i += 16 {
    xor(largeBuffer[i:i+16], ...)
}

This is slow.
If you want that fast SIMD implementation, I think the assembly code needs to be changed for the WebSocket mask algorithm.

@crvv makes sense got it.
@josharian final code looks like https://github.com/nhooyr/websocket/blob/cfdbe6819dba18b345df68fa06ed1e499874cad8/xor.go#L28-L115
So just tiered loops going getting smaller in unrolled size, this doesn't seem to have any negative affect on performance at low or high byte sizes. However I noticed something interest. if I change the for loops after the 128 unrolled loop into into if statements which they logically are as the loops after cannot run for more than a single iteration, performance drops 30% at higher byte sizes which is confusing.

if I change the for loops after the 128 unrolled loop into into if statements which they logically are as the loops after cannot run for more than a single iteration, performance drops 30% at higher byte sizes which is confusing.

Interesting. Branch misprediction, perhaps? Loop head unrolling? It might be instructive to look at the generated code and at what perf counters tell you. If you learn more, please share, in case it is something we can teach the compiler to fix automatically.

as fast as gobwas/ws and gorilla/websocket

Hooray!
One important caveat: This is all tuned for amd64, which is little-endian and supports unaligned loads and stores. It'll work correctly on all architectures (because it is pure Go), but it might not be fast on them.
You could probably make it fast on a per-architecture basis (using build flags), if that matters to you.

Just to note the aligning key loop can be reduced to a bits.RotateLeft64

@renthraysk To clarify, that would involve changing the key's type to uint64 from [4]byte right? i.e there is no way to just replace the loop with bits.RotateLeft64 directly.

$ go test -bench=BenchmarkXOR -run=^\$
goos: darwin
goarch: amd64
pkg: nhooyr.io/websocket
BenchmarkXOR/2/basic-8         	298493414	         3.95 ns/op	 506.25 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/2/fast-8          	273740404	         4.43 ns/op	 451.88 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/2/fast2-8         	256999929	         4.63 ns/op	 432.01 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16/basic-8        	96471366	        12.5 ns/op	1280.55 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16/fast-8         	96853706	        12.0 ns/op	1330.76 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16/fast2-8        	222916975	         5.42 ns/op	2951.17 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/32/basic-8        	53923512	        21.8 ns/op	1469.46 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/32/fast-8         	95436625	        12.2 ns/op	2621.93 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/32/fast2-8        	189894780	         6.17 ns/op	5187.79 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/512/basic-8       	 3593703	       369 ns/op	1388.04 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/512/fast-8        	32837448	        36.0 ns/op	14223.76 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/512/fast2-8       	40974423	        27.6 ns/op	18531.62 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/4096/basic-8      	  474385	      2628 ns/op	1558.64 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/4096/fast-8       	 5921575	       212 ns/op	19308.44 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/4096/fast2-8      	 6145724	       191 ns/op	21422.74 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16384/basic-8     	  118580	      9822 ns/op	1668.03 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16384/fast-8      	 1565948	       767 ns/op	21355.19 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16384/fast2-8     	 1560382	       760 ns/op	21569.24 MB/s	       0 B/op	       0 allocs/op
PASS
ok  	nhooyr.io/websocket	26.730s

fast2 is with bits.RotateLeft64, pretty significant speedup, especially from 32 till 512, where the speed pretty much doubled.
🎊

That include using bits.RotateLeft(, 8) for the last remaining few bytes too?

Yeah, might have misremembered, and using binary.X.Uint32() to read 4 bytes in, perform the alignment rotation with RotateLeft32() and then expanded to 64 bits x<<32|x.
Also the last remain byte loop can use RotateLeft() instead of reading from the key array.

https://github.com/nhooyr/websocket/commit/646e967341551f499e7fc5a2286d02c9c0c238b7
https://github.com/nhooyr/websocket/blob/646e967341551f499e7fc5a2286d02c9c0c238b7/frame.go#L325-L443
$ go test -bench=BenchmarkXOR -run=^\$
goos: darwin
goarch: amd64
pkg: nhooyr.io/websocket
BenchmarkXOR/2/basic-8         	344487918	         3.43 ns/op	 582.99 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/2/fast-8          	312039567	         3.91 ns/op	 511.00 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/3/basic-8         	285057960	         4.31 ns/op	 696.14 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/3/fast-8          	295787498	         4.04 ns/op	 742.36 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/4/basic-8         	244778098	         4.75 ns/op	 841.51 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/4/fast-8          	361466797	         3.31 ns/op	1209.12 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/8/basic-8         	166173404	         7.09 ns/op	1129.10 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/8/fast-8          	262743075	         4.55 ns/op	1757.55 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16/basic-8        	100000000	        11.8 ns/op	1361.28 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16/fast-8         	260987524	         4.57 ns/op	3500.76 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/32/basic-8        	56211588	        21.1 ns/op	1515.55 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/32/fast-8         	216847578	         5.46 ns/op	5859.79 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/128/basic-8       	13744023	        83.5 ns/op	1532.62 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/128/fast-8        	128491503	         9.30 ns/op	13764.28 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/512/basic-8       	 3784251	       320 ns/op	1601.17 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/512/fast-8        	41965264	        26.9 ns/op	19009.42 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/4096/basic-8      	  458898	      2460 ns/op	1665.01 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/4096/fast-8       	 5955132	       198 ns/op	20699.90 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16384/basic-8     	  117724	      9961 ns/op	1644.87 MB/s	       0 B/op	       0 allocs/op
BenchmarkXOR/16384/fast-8      	 1532142	       760 ns/op	21545.42 MB/s	       0 B/op	       0 allocs/op
PASS
ok  	nhooyr.io/websocket	31.076s

Faster than basic XOR at even 3 bytes :)
Thanks @renthraysk

Another optimisation. Current code seems to be producing a bounds check per PutUint64(). Instead of passing an open ended slice b[x:] to PutUint64() using b[x:x+8] will eliminate them.
Eg
https://gist.github.com/renthraysk/5617b6aea3852c80abfa662d8ca2ff37

Thanks. Will give it a shot at some point. https://github.com/nhooyr/websocket/pull/171#issuecomment-550582028

@renthraysk I wonder if the bound checks could be eliminated if I reverse the order in which the uint64s are xored in each loop. Thus after the first bounds check, the rest of the PutUint64's in each loop would not need a bounds check.

Did not have any effect. Going to go with what you suggested instead.

About a 20% speedup with values >= 128 bytes with your suggestion implemented. 🚀 🔥
See https://github.com/nhooyr/websocket/pull/171/commits/15d0a18fa2042fb0bb8735374c7efe041e90c014
Thanks again.

Yeah, reordering wouldn't have made a difference. It was the  _ = b[7] line in PutUint64() that was cause the bounds checks. The compiler failed to prove it's not needed with PutUint64(b[8:], x) however it does eliminate the first check in PutUint64(b, x).
Looks like deficiency in the bounds checking elimination.

cc @zdjones

Opened https://github.com/golang/go/issues/35483

see https://github.com/golang/go/issues/24876 and https://github.com/golang/go/issues/19126


[Bug] Piston cannot break Reinforced Shulker Boxes

Screenshots

Environment

Minecraft: [1.20.1]
Fabric Loader: [0.14.22]
Fabric API: [0.86.1+1.20.1]

Yes I have the same issue. Should hopefully be a quick fix. This broke my 8x hopper speed, shulker box unloader that goes to my fully auto sorter.

fixed in version 2.5.0


Setup for auto-RoBERTa

Branch to be merged into main after swin is merged in there. For now, comparison set against swin for clarity.
Addition of fairseq
fairseq added as a subtree by:
i) Specifying a remote
git remote add -f fairseq https://github.com/facebookresearch/fairseq

ii) Then actually adding:
git subtree add --prefix AutoFormer/fairseq fairseq v0.12.2 --squash

Note: added version 0.12.2

MultiheadAttention
Todos

[ ] FairseqDropout -> FairseqDropoutSuper
[ ] Convert qkv projectors to LinearSuper
[ ] Add set_sample_config method
[ ] Modify forward

Things to look at:

quant_noise ?
xformers (currently: assuming it isn't used)

Reading and using sample space configuration
Steps:

[ ] Create a config file with sample space
[ ] Read it in and attach it to cfg
[ ] Create a sampling method to sample from the config space
[ ] Use the sampling method at the appropriate location


Don't crash if you click on the staging warning

Fixes https://github.com/artsy/collector-experience/issues/747
#trivial
Skip New Tests

Fails

:no_entry_sign:

Missing Test Files:

src/lib/Scenes/Favorites/__tests__/index-tests.tsx

If these files are supposed to not exist, please update your PR body to include "Skip New Tests".

  Generated by :no_entry_sign: dangerJS

Warnings

:warning:

Missing Test Files:

src/lib/Scenes/Favorites/__tests__/index-tests.tsx

If these files are supposed to not exist, please update your PR body to include "Skip New Tests".

  Generated by :no_entry_sign: dangerJS

👍


Issue with refute

I'm getting the following error with refute. Please help.
refuter= model.refute_estimate(identified_estimand,estimate,method= "data_subset_refuter")
UnboundLocalError: local variable 'refuter_class' referenced before assignment
UnboundLocalError                         Traceback (most recent call last)
 in
----> 1 refuter= model.refute_estimate(identified_estimand,estimate,method= "data_subset_refuter")
/databricks/python/lib/python3.7/site-packages/dowhy/causal_model.py in refute_estimate(self, estimand, estimate, method_name, **kwargs)
310             refuter_class = causal_refuters.get_class_object(method_name)
311
--> 312         refuter = refuter_class(
313             self._data,
314             identified_estimand=estimand,
UnboundLocalError: local variable 'refuter_class' referenced before assignment

@yukivhr can you post a working example so that I can reproduce the problem?

Closing due to inactivity. @yuktivhr feel free to re-open.


Select Public/Private School [#172422168]

Children should select whether they are in public or private school.
See [#172422168].

Looks good, but why is the change to the date tests part of this PR and doesn't seem labelled as an atomic commit? Also, it would be helpful to see screenshots to verify it looks like Figma

Looks good, but why is the change to the date tests part of this PR and doesn't seem labelled as an atomic commit?

In a way, yes - I got a bit lazy with my commits. In the end, I was simply going to add my tests for the school_type noise, but then I realized that adding school_type broke all the other assertions, since each one was making valid data separately. Rather than edit each one, I just DRY'ed the test.

LGTM! FYI @MatthewSchultz I manually rebased and squashed your commits. Not sure how to do this in a clean way in github without force pushing the branch.


allows partial-width label

This is a small update that allows the label tap in the basic_cup module to be partial-width instead of true or false.

Let me know if this option interests you. I found it very useful for single-width cups for things like pencils and soapstones. The label tap makes a great spot to pick up the whole cup but doesn't get in the way of using the cup.

Interesting.  At first glance I like this.  Let me think on it and I'll probably merge tomorrow.

I think I will touch this up a bit afterward because it is getting to the point where positional arguments are not really viable and all the optional parameters need to be specified by keywords.  So I'll probably add comments to that effect and adopt that policy internally where e.g. on line 49 the partitioned cavity should specify everything by keyword.  Otherwise these sorts of changes will break existing code (or the parameters have to be added at the end, which is not much better).


Add conductor to "projects using minitrace" section

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 80.9%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1690

Relevant Lines:
2089

💛  - Coveralls


First release

Do a first release of the project (this may require to define the release process and/or adding related github workflows)

https://github.com/fgiudici/ddflare/releases/tag/v0.1.0


Account Management - Data Architecture Refactoring - Support New Account Shell Creation

This is the starting point for where I'm envisioning needing more backend logic for creating a new account, persisting it in the database, and ultimately adding an AccountShell instance to the accounts reducer.

Dev task for implementing new UI data framework. Closing as this has been completed.


Basic shell completion

Click supports shell completion which we should document how to set up.
It should work for basic things like paths, but we can look at how to autocomplete things like column names (if CLI commands take them as parameters)

Just tried it and some stuff "just works":
eval "$(_VCF2ZARR_COMPLETE=bash_source vcf2zarr)"

Most stuff seems to work, except for filename completion on convert, explode and dexplode-init. This may be another reason to switch the VCFs argument to the end of these commands (although we should check it actually helps).
Ah - we're not telling click they are paths at all, so this may not be it. Opened #101


[bug] Error parsing Windows-style path strings

Describe the bug
On Windows toml and yaml parser will raise decoding problems when trying to read files with window-path like string (which containing backslashes). This was spotted in GitHub Actions on #941
This example should fail under Windows, although not tested there.
# app_test.py
from pathlib import Path
from dynaconf import Dynaconf

def test_problem(tmp_path):
    filename = tmp_path / "a.toml"
    with open(filename, "w", encoding="utf-8") as f:
        f.write(f"path='{Path.home()}'")
    settings = Dynaconf(settings_file=filename)
    assert settings.path

To be addressed on #1150


Some quality of life improvements for contributors

let's see what CI has to say about this

why

90s 😎


WIP Configuration

I've added a really short description on how to configure the type registry in cucumber-jvm.
In doing so I noticed that the configuration page it self only described cucumber ruby. And that there is no configuration info at all for cucumber js. I've just added an empty page for that.
Some links still need to be fixed and while checking those links I noticed that there is yet another configuration section in the api.md

Once done/merged, please redirect from wiki to new page(s):

https://github.com/cucumber/cucumber/wiki/Environment-Variables
https://github.com/cucumber/cucumber/wiki/cucumber.yml

Should #175 be merged here? Is there anything else needed (apart from fixing broken links)?

There is a structure problem with these docs.  The configuration is in two places and it's not the right configuration.

Raining now so I've got some time.

@mlvandijk How do I call the wizard and make him  show me a preview page?

Nevermind found the wizard (in the emerald city).

@mlvandijk I've rebased against master. Conflicts are gone.
I'd rather see that some one else sorts out the organizational problems though.
I've made a few attempts at splitting the configuration section into 3 parts but that causes even more problems. There are quite a few incoming pages.

Thnx; will give splitting a try then.

Some links:
https://cucumber.io/blog/2017/09/21/upgrading-to-cucumber-3 (Ruby - Parameter Type)
https://cucumber.io/blog/2017/07/26/announcing-cucumber-expressions (Ruby - Cucumber expressions)
https://github.com/cucumber/cucumber-js/blob/master/features/profiles.feature (JavaScript - Profiles)


v1.2.5

This repository contains GitHub workflows for managing releases automatically.
Please name this issue what you would like the new release to be called. E.x. "v1.0.0"
The following slash commands are available to use in comments on this issue:

Command
Description
Parameters

/release
Creates a new released based on the current state of the master branch
frontend=<version>backend=<version>gitapi=<version>status=<version>config=<version>activity=<version>artifacts=<version>participants=<version>dispatcher=<version>agnosticv=<version>anarchy=<version>poolboy=<version>

/promote
Promotes the created release to the next environment
N/A

/cancel
Cancels the current release (and closes this issue)
N/A

/finish
Completes the current release (and closes this issue)
N/A

/release frontend=v1.2.2 backend=v1.4.1 gitapi=v1.3.0 config=v1.1.0 status=v1.1.0 dispatcher=v1.0.15 activity=v0.1.0 artifacts=v0.1.0 participants=v0.1.0

/promote

/promote


Improve formatter on Payment.fns

Fixed, #35

This looks really great! A few things:

Can you remove the yarn.lock file?
It looks like the new formatting functions aren't actually used in the publicly exposed formatters. Can you hook those up?

Thank you so much!

This looks really great! A few things:

Can you remove the yarn.lock file?
It looks like the new formatting functions aren't actually used in the publicly exposed formatters. Can you hook those up?

Thank you so much!

sure
i think, webpack config is something wrong, converted JS file by coffee script compile at lib/index.js module is working.

rock@rock-macpro:~/work/payment (master)$node
> require('./lib/index.js')
{ [Function: Payment]
  fns:
   { cardExpiryVal: [Function: cardExpiryVal],
     validateCardNumber: [Function: validateCardNumber],
     validateCardExpiry: [Function: validateCardExpiry],
     validateCardCVC: [Function: validateCardCVC],
     cardType: [Function: cardType],
     formatCardNumber: [Function: formatCardNumber],
     formatCardCVC: [Function: formatCardCVC],
     formatCardExpiry: [Function: formatCardExpiry] },
  restrictNumeric: [Function],
  cardExpiryVal: [Function],
  formatCardCVC: [Function],
  formatCardExpiry: [Function],
  formatCardExpiryMultiple: [Function],
  formatCardNumber: [Function],
  getCardArray: [Function],
  setCardArray: [Function],
  addToCardArray: [Function],
  removeFromCardArray: [Function] }
>

Did you check by this module ? or dist/payment.js module ?

I'm just looking at your PR and the fact that your new formatCardExpiry function is not used here. Does that make sense?

Finally, apply review feedback!
:) !


feat(trivy): Add trivy hook

First of all, thank you so much for your amazing work! ❤
This is the first time I contribute to this repository so if there is any doubt or anything required to be fixed feel free to let me know it!
Put an x into the box if that apply:

[ ] This PR introduces breaking change.
[ ] This PR fixes a bug.
[x] This PR adds new functionality.
[ ] This PR enhances existing functionality.

Description of your changes
Adds a new Trivy hook.
Fixes #550
How can we test changes
Create a project with a Terraform file that looks like this:
resource "aws_security_group_rule" "my-rule" {
    type        = "ingress"
    cidr_blocks = ["<IP_ADDRESS>/0"]
}

When running the hook it shall show two errors with this configuration and how to fix them.
In order to ignore these errors, add a comment per rule on top of the resource specifying it to ignore it:
#trivy:ignore:AVD-AWS-0107
#trivy:ignore:AVD-AWS-0124
resource "aws_security_group_rule" "my-rule" {
    type        = "ingress"
    cidr_blocks = ["<IP_ADDRESS>/0"]
}

This shall make the hook to output no errors and, therefore, pass.
The same can be done with trivy binary executing:
trivy conf $(pwd)/path/to/your/file.tf --exit-code=1

Note: The exit-code flag forces the binary to exit with exit code 1 when any missconfiguration is found.
This has been already tested with pre-commit run and pre-commit run --all commands using this configuration in the .pre-commit-config.yaml file:
repos:
  - repo: https://github.com/arnaullamas/pre-commit-terraform
    rev: 4df7df5c2c9ff3840a4afd458e3dca42f23cd38d
    hooks:
      - id: terraform_trivy
        args:
          - --args=--skip-dirs="**/.terragrunt-cache"

Note: The args key is optional but useful if you currently are on a terragrunt project!

Also, let me add a deprecation notice to tfsec hook and I'll merge it

Hmm
To github.com:ArnauLlamas/pre-commit-terraform.git
 ! [remote rejected] master -> master (permission denied)
error: failed to push some refs to 'github.com:ArnauLlamas/pre-commit-terraform.git'

This PR is included in version 1.85.0 :tada:


The karate shell script does not have a shebang line and doesn't work in non POSIX shells such as fish

In fish, for example, the script fails with this error message:
Failed to execute process './karate'. Reason:
exec: Exec format error
The file './karate' is marked as an executable but could not be run by the operating system.

The file needs a shebang in the first line:
#!/bin/bash

or:
#!/bin/sh

Or an env based alternative.

@behrangsa I'm not an expert on this. is there a single change I can make so that nothing breaks on win / mac / linux ?
else I'm inclined to leave it as it is as the VS Code IDE support is preferred

never mind. just made the change, see commit above for details

Great! Thanks.
Might be better to use #!/usr/bin/env sh in case some uber nerds don't have bash on their computers.

@behrangsa no problem ! uber nerds are welcome to submit a PR in future :P

0.9.6 released


Pin Icon From Url

FEATURE REQUEST
Would be nice if we can set the pin image from a url. I can't do that right now.
PLATFORMS
which platform do you want?

[x] Android
[x] iOS
[x] UWP

same problem right now

you can do it by opening a Stream.  Ive done this approach, but I ran into timing issues with my map.
using (HttpClient client = new HttpClient())
{
Stream stream = await client.GetStreamAsync(url);
var bmp = SKBitmap.Decode(stream);
}

I think if amay077 can change the type of icon property from BitmapDescriptor to ImageSource(Xamarin.Forms) it will made much more easy accomplish all things we wanted.

Is there someone who know how to convert ImageSource to native Bitmap(Android:Bitmap, iOS:UIImage) or byte array?

Curious if anyone has found a good solution for this.  I originally did this using Akavache but ran into release problems with that plugin, in addition to the fact that it seemed like a large dependency to introduce to get a bitmap stream.


Scope should be larger

While it's great that you are looking at providing a formalised solution for localisation of extension strings this is not all that hard once you get past the total lack of documentation. What's hard is coordinating incremental updates when you have a contributor per translation. For example, I do English and French, and I have colleagues who speak English and Spanish, or English and Italian, or English and Icelandic. Every time I release a minor version, I have to coordinate changes to

readme
changelog
UI (settings descriptions etc)
UI dialog messages
manual

I can almost hear you drawing breath to say that github does diffs.
It's not good enough.

It's spread all over the place.
There's no coherent way to see what languages have been updated and which haven't.

What's required is tooling to manage localisation.

Tooling to identify translation candidates (literal strings)

ignore replacement tokens because these are already being localised
ignore literals found in an ignore list

Tooling to emit difference files requiring translation as a single file for the translator
Tooling to update the NLS source files from the translated difference file.

If you ask me this begs for implementation as a VS Code extension.
What are your thoughts?

The beauty of building a CLI that also had code entrypoints is that we can do both a CLI & a VS Code extension to assist folks. Not entirely sure what an extension would do to help besides be a Command Palette wrapper around the CLI

I had a notion of a split view of source and target language for the translator. It's not central.

Yeah that sounds really nice. If it were a web extension, I like the idea of pointing someone to a vscode.dev/github/.... url where they can contribute without cloning the repo locally

Another idea was to sketch out the translations using Azure translate so that translators just skim and take a hand when the sense is wrong or particular idiom is required as is often the case for software.

sketch out the translations using Azure translate

This sounds awesome.

Tyler, sorry to vanish off the face of the Earth... having a day job will do that. Especially if you also have a rural property to run.
GitHub retired node12 which forces a cascade of updates... and caused me to rediscover this package. Congratulations on the implementation of the Azure Translate idea, it's very nice.
You may be interested in translate.mjs which is a little js app I put together for my release workflow. It uses marked to parse Markdown documents into structural elements so it can present them to Azure Translate and then reconstruct the document. You can't just stuff a Markdown string through Azure Translate, it borks the document in its punctuation translation pass, eg for French it converts all backticks to apostrophe, and then System.Json.Text (which it uses) converts all the apostrophes to \u0027.
If you want to have a look, it's here at the moment but will end up in the root of master.


Can not get social vehicle id with history replay scenarios

BUG REPORT
High Level Description
Can not get social vehicle id with interaction dataset merging scenario.
SMARTS version
0.4.14, the latest develop branch
Previous associated issues
None
Steps to reproduce the bug
Run the example script examples/observation_collection_for_imitation_learning.py on INTERACTION dataset merging scenario which is attached below:
interaction_dataset_merging.zip
Resulting and expected behaviour
smarts.vehicle_index.social_vehicle_ids() is expected to return available vehicle ids but return an empty set.
https://github.com/huawei-noah/SMARTS/blob/f9c0f08702dc4a0a1e8874022d84b3688e10942b/examples/observation_collection_for_imitation_learning.py#L36
System information

Operating system & Environment [Please note if using Docker]: Ubuntu 16.04
Number of system cores available
Python version [Please note if using Jupyter] 3.7.9
Python packages [e.g. from pip freeze]
SUMO version 1.8.0
Date when bug occurred 2021.4.13

Thanks for filing this.
This seems to work for me on my local develop branch (and the .shf files in the attached scenario seem fine), so I'm thinking it's either  (a) related to not having a Renderer or (b) some environmental difference related to sqlite3 (which is used to query for the social vehicle ids).
Re (a), this could be related to Issue #696.  Even though SMARTS can now start without a display, if/when you try to add camera-based sensors to a vehicle (which require a Renderer, which still requires a display), it will throw an exception.  In the case of examples/observation_collection_for_imitation_learning.py, it is going to try to do that in the attach_sensors_to_vehicles() call.  So I would expect the example to fail there if not in a docker container (and it might still once we solve this problem).  However, it seems it's not even getting that far, so...
Re (b), could you please attach all of the messages (i.e., stdout and stderr) that appear in your console/terminal window when you run this?  I am wondering if there may be some clue there.
P.S.  re (a), I would also be interested to know if it acts any differently if you try to run it from a docker container (cf. #696).

I tried to run the same code inside the docker, and the function still returns an empty set.

I tried to run the same code inside the docker, and the function still returns an empty set.
It does not appear to have any stdout or stderr on console when I run the code.

@zbzhu99 and I figured this out together.  It's because no data was being returned at sim_time=0, it all started at sim_time=0.1 in the Interaction merging dataset.  I will update genhistories.py to ensure that the history actually starts at sim_time=0.

PR #766 should fix this and has now been merged into develop.
@zbzhu99 this will require rebuilding your scenario, for exmample:  scl scenario build --clean scenarios/interaction_dataset_merging


Toastr with action?

Is it possible to have a toastr with a custom click action?

what do you mean by 'Custom Click action'?

I would like to have the ability to attach a custom action when user presses a specific toastr. I.e reload page on toastr click. MatSnackBar has same functionality

It is best practice not to do this as the toastr component serves more of a notifying agent than a listening element. I'd like further information on your use case to provide a solution of better experience.

I would like to notify the user that a new update is available when he opens the app, since I am building a PWA. I dont like the idea of using a modal/popup, toastr seems to be best experience for this case. Not sure what could be the alternative..

Excellent idea.
I recommend using nb-alert for this task, you can add an event when the user clicks on the alert.
It should look something like this:

component.html:
<nb-alert status="success" (click)='test()' style="cursor: pointer;">
You have an update!

component.ts:
test(){
...some code
}

you can add a condition for the alert to appear such as *ngIf="update.available"
I hope this helped!

That is acceptable for me, but, I have another issue, seems like my LoginComponent does can not access anything from other modules.
It is declared in app.module.ts
and this is how app.module.ts looks like
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,
AppRoutingModule,
NbAlertModule,
NbLayoutModule,
ThemeModule.forRoot(),
NbSidebarModule.forRoot(),
NbMenuModule.forRoot(),
NbDatepickerModule.forRoot(),
NbDateFnsDateModule.forRoot({
parseOptions: { useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true },
formatOptions: { useAdditionalWeekYearTokens: true, useAdditionalDayOfYearTokens: true },
format: 'dd/MM/yyyy'
}),
NbDialogModule.forRoot(),
NbWindowModule.forRoot(),
NbToastrModule.forRoot(),
NbChatModule.forRoot({
messageGoogleMapKey: 'AIzaSyA_wNuCzia92MAmdLRzmqitRGvCF7wCZPY',
}),
CoreModule.forRoot(),
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
],
providers: [
PwaService,
],
declarations: [AppComponent, LoginComponent, AuthComponent, AuthCallbackComponent],
bootstrap: [AppComponent],
})
export class AppModule {
}
In my other feature modules that i lazy load, everything seems to work fine, its just this app.module.ts that is causing an issue.
Is there maybe some kind of setting that disables adding things to app.module.ts?
P.S. I tried re-compiling the app, and that didnt do anything..

That is another issue to be examined.
Can you mark this as solved and open another issue?
That'll provide maybe more people to help you with.
Thank you


[experimental] Bump Xcode on CI to 8.3

Testing to bump our CI to use Xcode 8.3.
I’d want to run a few jobs on Travis-CI before we adopt it.

Codecov Report

Merging #325 into master will increase coverage by 0.11%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #325      +/-   ##
==========================================
+ Coverage   80.31%   80.43%   +0.11%
==========================================
  Files          77       77
  Lines        6066     6066
==========================================
+ Hits         4872     4879       +7
+ Misses       1194     1187       -7

Impacted Files
Coverage Δ

sources/HUBUtilities.h
77.08% <0%> (+7.29%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25298b6...3ddeaaa. Read the comment docs.


Feat: I have included the Small selection of your profile in the about page

Describe the feature
I have included this in the 3d pin componenet from the aceternity UI where the user could see more about you in the profile page
Add ScreenShots

https://github.com/Sayak-Bhunia/mystory/assets/119944779/2e5b387e-2c2c-4c6f-b85f-221b736a671a
@Sayak-Bhunia pls do add the GSSOC Label .
Thanks in advance.
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

about section includes info about the project not the repo owner

@Kritika30032002 will change this one and update

closing this pr
also about section is assigned to someone else


[FIX]: Social venue walking direction image not displaying on website (KCSNA24)

The last change in PR https://github.com/kubernetes/contributor-site/pull/540 did not correctly display the Social Venue Walking Direction image on the socials page. This PR aims to resolve that.
cc @salaxander @stmcginnis @mfahlandt
Screenshot:

/lgtm
/approve

/lgtm

/approve


ISP headers too close to MCU

Move ISP headers a bit further (1-2 mm) away from the MCU footprint to allow connector to fit more easily.

Resolved in https://github.com/brianmutualaid/pin-check/commit/cdd5b755127893f69a9db292a5b3d78ad0599014


Tranql Auto-complete

For tranql when users type in name of an entity (such as asthma) we are currently using a translator service to resolve this to actual identifiers (eg MONDO:0004979).
This has some issues as sometimes the result curies might or might not exist in the graph. In addition the curies need to be normalized before sending to tranql for answers.
Maybe a better version would be actually using Redis search indexes via tranql to resolve to node ids that we know exist. In this article (http://www.odbms.org/2020/04/introducing-redisgraph-2-0/) they describe a problem that seems to fit this use case, where Graph nodes are looked up using indexes. This could enable us to get much better and accurate results.
It would be nice if we investigate this and implement a more reliable solution.

@frostyfan109 for discussions.

A couple additional thoughts:

The current implementation using translator SRI services takes some English substring (e.g. "asth") and tries to return concepts containing such a substring (e.g. "asthma", "asthenopia", "myasthenia", etc.). Replacing this form of search with a tranql-based implementation would allow us to leverage the context of the tranql redisgraph to return related and relevant terms beyond that of a basic textual search.
Cut out the middleman services (which aren't designed for high-traffic autocompletion requests in the first place). This should also improve autocompletion times by a few seconds, which is important since a user traditionally expects an autocomplete interface to be fast.

Related:

https://github.com/helxplatform/tranql/tree/feature/redisgraph-autocomplete
https://github.com/helxplatform/Plater/pull/4


fix: createPages type

we need to export js code not only types.

@beefchimi Thanks for confirming!

To test

Actually, you can go to the codesandbox ci page,

click here ☝ , and find "Local Install Instructions".

As an aside, I do appear to have an issue with compile for create-waku

I'm not sure, but it looks like pnpm install didn't work well, or?


Make sure find_package(Sqlpp11) can be done multiple times

It is expected that CMake packages can be found multiple times without
errors. The target generated and defined by CMake, e.g. in a
*Targets.cmake file have a similar guard.

Nice work. Thanks!


NEW SEED SERVERS

with HF upgrade - Bitcoin ABC 0.16, we need new server list who are running electrumX on upgraded node.

This might help you https://github.com/danny91/electrum/commit/757a7e519aa2e3dee97f79a9e3d1b56aa45668d5

https://www.reddit.com/r/btc/comments/7abc48/electron_cash/

thanks @danny91

electroncash.cascharia.com has been updated


[DEFECT] randomIntegers

Defect Description
Describe the defect
What did you expect to see happen?
In randomUtils, the randomIntegers method should generate random integers that are uniformly distributed
What did you see instead?
The generated random integers are not uniformly distributed
Do you have a suggested fix for the development team?
Edit lines 191-192 as follows:
intRange = high - low + 1.0
rawNum = low + random(engine=engine)*intRange - 0.5
Describe how to Reproduce
Steps to reproduce the behavior:
1.
2.
3.
4.
Screenshots and Input Files
Please attach the input file(s) that generate this error.  The simpler the input, the faster we can find the issue.
Platform (please complete the following information):

OS: [e.g. iOS]
Version: [e.g. 22]
Dependencies Installation: [CONDA or PIP]

For Change Control Board: Issue Review
This review should occur before any development is performed as a response to this issue.

[x] 1. Is it tagged with a type: defect or task?
[x] 2. Is it tagged with a priority: critical, normal or minor?
[x] 3. If it will impact requirements or requirements tests, is it tagged with requirements?
[x] 4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
[x] 5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)

For Change Control Board: Issue Closure
This review should occur when the issue is imminently going to be closed.

[x] 1. If the issue is a defect, is the defect fixed?
[x] 2. If the issue is a defect, is the defect tested for in the regression test system?  (If not explain why not.)
[x] 3. If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
[x] 4. If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
[x] 5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?

Closure checklist passed..
Closure approved via #1380.
@mandd , please send an email to the user list informing about the defect and its resolution