Sample solution for the file

I have updated the sample solution for the challenge seed code.

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Sample solution for the challenge seed code

Closed and Reopened this PR to attempt to resolve a specific Travis build failure.


separate user profile

Description
Hey @shyamtawli, I separate 5 users profile data in src/data folder in json format and then create a seperate route to show it . But i came to a solution like import the all 5 data and and merge the all the developer data in a single array. But this is not a good practice because we have to do this thing manually like merging the array by writing the user array data in a single array.
Here is the route  /dev/testprofile and also i added link in sidebar you check it out there.

@Hayat4144 Nice work but manually importing each profile is not effective and also you said it is not a good practice. What if we have 100 profiles than our codebase will not look good. Find a way that we can render all the profiles in data folder.

it's most difficult to read different file and merge all the data in a single file or single array in frontend side. if we do this thing in backend , it is possible because of read and write the file because of most backend language provide this  features.But in the frontend it is almost impossible now.I will try to find different way.

@Hayat4144 Okay, If you find something that can be done only in frontend than let me know, if not we will do something for that.

Description
I found a new effective and easy solution the problem we face, By putting the data folder in public folder , where i make a request to fetch all the data of the users.
Let me explain
Reading and writing a file in frontend is almost impossible. But we can make a request to own server to get all the user profile by simply put all the user profile data in public folder and make request.create a profilelist.json file in public/data folder and all the users profile data . put all the users profile filename in the form of array in profilelist.json like this:-
["hayatprofile.json","alexprofile.json","dzprofile.json"]
Now make a request to /data/profilelist.json to get all the filename and make another request with filename we get from filename.
This way we can optamized the code and it is easy way.

if you have any doubts or questions feel free to ask.

@Hayat4144 We can't deploy home and test profile page to master branch, you have to remove the changes that are not related to it. You just have to separate profiles and render them all. Like you have the come with the idea above, execute it for all profiles.
If you have any doubts than message me on Twitter.

Ok i will remove the test and home page . I had already make changes to profile components to render the user profile in but there are only 5 separate file of developers. I will transfer all the data in public folder of other developers then I will make final commit.

Hey, @shyamtawli  i created all the developers profile separately and put all the profiles in public data and i also modified the app.js .If there is any spelling mistake in developer names please forgive me.We need to just update the README.md for changes made to add profile. if you have any further question or any doubt don't hesitate to ask.
Happy Coding

@Hayat4144 Good Work. I will review it soon. Busy with some college work.

@Hayat4144 The Profiles are not rendering from separated files, they are still rendering from Profile.json file.

Here is all changes i make in App.js
Here is the steps what i made  chages:-

I created data folder in public directory inside it i put all the developer profile with their name there is one more file that is Profilelist.json file in this i put all the source of developer file in array.
Then i make changes to App.js before i make change the developers profile data is coming from the profile src/data/Profile.json file.
what i have done , i make a get request to /data/ProfileList.json (this is public directory files) .
Get all the name of the files and and make another request /data/${filename} which get all the profile data of developers.
And set the profiles state to data i get from above request .
Change the Suffleprofiles(argument) from this Suffelprofiles(data) to Suffelprofiles(profiles).
Render all the profiles as previous render with profilecomponent.

We don't need to change the profilecomponent .
Here is the code i make changes
const fetchData = async () => {
    try {
      const abortController = new AbortController();
      const signal = abortController.signal;
      setFetching(true);
      const fileListResponse = await fetch(`/data/ProfileList.json`, {
        signal,
      });
      const fileList = await fileListResponse.json();

      const ProfileDataPromise = fileList.map(async (filename) => {
        const profileResponse = await fetch(`/data/${filename}`, { signal });
        const data = await profileResponse.json();
        return data;
      });

      const AllProfileDataSetteled = await Promise.all(ProfileDataPromise);
      setProfiles(AllProfileDataSetteled);
      setFetching(false);
    } catch (error) {
      error.name === "AbortError"
        ? console.info("Data fetching has been aborted")
        : console.error(error);
    }
  };

  useEffect(() => {
    const abortController = new AbortController();
    const signal = abortController.signal;

    fetchData();

    return () => {
      abortController.abort();
    };
  }, []);

// change the suffleprofiles parameter to profile state
const shuffledProfiles = shuffleProfiles(profiles);

{/*  This is more clean way of writing conditional rendering */}
      {profiles.length < 1 && searching ? <NoResultFound /> : null}
      {profiles.length > 0 && !searching
        ? shuffledProfiles.map((profiles, index) => {
            return <Profile data={profiles} key={index} />;
          })
        : null}
      {searching &&
        profiles.map((profile, index) => {
          return <Profile data={profile} key={index} />;
        })}

Any question or doubt feel free to ask.

@Hayat4144 You have made changes but in App.js see line number 6 import datas from "./data/Profile.json";this line is rendering profiles.

Hey @shyamtawli , you are confused with search rendering and simple rendering. I already acknowledge about the search functionality of the website. I will try to explain it , in search functionality we  have to use the profile.json file as main data because it contains whole the profile json data. so we get the whole data from this file and then perform some search operation. for simple rendering i use the public/data/ profiles data . so i fetch the data and render it.
If you have any doubt let me know.

@Hayat4144 share your social handle, lets chat there.

Here is my linked profile

Hey @shyamtawli , I checked it and i am very glad to contribute to this project. But you removed my code and make little changes to it then you published it in your own . I know the the commit added and code is not in proper way . i just code it to tell you how it work. But i don't mind . i am very glad to contribute to this project. I am busy now a days so i can't contribute . I am going to start my ecommerce business.I make the web app  ready for production. I need some help in it .if you want to help me contact me on linkedin.

@Hayat4144 I have send you connection request.

I already accept it. Now you can talk to me.


Hide messages based on keywords or exact phrases

In #279 we created a filter "Hide messages based on keywords", so this new filter is an enhancement of the existing filter.
Description:
In order to define a phrase for a filter, put it inside double quotes.

Just tried it, works fine! There is only one thing: I get notifications for filtered posts which is a bit irritating when you click on the notebook notification and don't see anything new in mentions timeline afterwards.

@vinzv  I see. Thank you for noticing.
This is because these filtered messages are not completely "blocked", they are still stored...
For now I will apply the same filter before notification.

I wouldn't block them either to avoid inconveniences. Hiding
notifications is fair enough.

Implemented in v.22


[1/2D]Update documentation with the new metrics

PR prepared:
https://github.com/newrelic/docs-website/compare/develop...rubenruizdegauna:develop

Blocked until new memory metrics are released and release version is updated. Already reviewed by @cristianciutea


lemminx: init at 0.22.0

Add LemMinX LSP server for XML
Description of changes

This PR adds LemMinX, a Language Server Protocol server for XML: https://github.com/eclipse/lemminx/
The build process is a complex build with Maven and GraalVM, so this PR is pulling a pre-build binary.
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Superseded by #256447.


Drop Node.js 4.x support

nodejs/Release: Node.js Foundation Release Working Group

Node.js 4.x is already Maintaince mode.
Node.js 4.x will be EOL at April 2018.
We will drop Node.js 4.x support in near future.
This issue track Node.js 4.x support.
Plan

[x] Update CI https://github.com/textlint/textlint/blob/53eb7bdcf0f90da8906d75d6e92a1ed236680892/.travis.yml#L4 #507

Remove node v4, instead of add node v6 as minimal support

[ ] Add engines to textlint/package.json?
[ ] Update readme

This means that dropped testing in Node.js v4.
Code base is not udpated.
(textlint work on Node.js v4 for a little while)

I've removed Node.js 4 from Travis CI.
Because, it block CI..
https://github.com/textlint/textlint/pull/507/commits/0c49f0bb183b2bcc428d5b0ba8ff92449e142559


allow MP server scripts to compile with -dev or developer 1

currently doesn't include implementations for GetRandomPilotLoadout() and GetRandomTitanLoadout(), this doesn't matter in practice since they're only called on bots, which we don't have, but it might be nice to have implementations for these if we ever want to API them

note: also doesn't currently support sp, unsure how much work would have to be done to allow sp scripts to compile, i believe @taskinoz has done work on this in icepick


Mark message unread

This PR:
Resolves #557
1.  Adds button to mark inbox message as unread again
Screenshots (if applicable):
https://github.com/codeforpdx/PASS/assets/71395931/cf7e7735-5f75-44c3-8bef-25fd3536277a

Looks good to me 👍


remove API token from app .zip

AQLCodeGen.zip contains a BAM token in line 24 of app/views.py.
This token needs to be removed or at least revoked for security reasons.

Resolved


Add PATCH method to modify resources -> moved to #2263

Allow a new call to the REST API, using method PATCH, to modify
resources.
The body of the request should use JSON Patch
(https://tools.ietf.org/html/rfc6902) to specify the modifications.
Only metatada could be modified.
For node resources, some fields inside metadata could not be changed.
TODO:

[x] test noderule/edgerule modifications
[x] test with ES backend
[X] tests
[ ] add to swagger

run tests

Example of use:
➜ curl <IP_ADDRESS>:8082/api/node/test -XPATCH -d '
[
                {
                  "op": "add",
                  "path": "/Metadata/NewProp",
                  "value": "foobar"
                },
                {
                  "op": "modify",
                  "path": "/Metadata/Prop",
                  "value": "changed prop"
                },
                {
                  "op": "remove",
                  "path": "/Metadata/OldProp"
                },
]'

Moved to PR #2263 to allow maintainers modifications


How much epochs for WMT 14 DE-EN & EN-DE

Hi Junliang,
Thanks for your nice code.
Could you tell me how much epochs you training for wmt 14 tasks, and would you like to share your training command shell for these tasks?
Thank you.

Thanks for your interest!
For AT model, we train the model around 100k steps. For NAT model, generally the longer the better because the mask-predict model converges slower, and we report our score from the model trained for 500k steps. All with max-tokens=2048,update-freq=2 and 8 GPUs, and the training shell is the same as in IWSLT14 De-En, except that we use bert-base-cased for English.

Thanks for the reply,
Do I need to tune the arch to "transformer_nat_ymask_bert_two_adapter_wmt_en_de_bert_base" ?
Additionally, I try your shell on iwslt and get some good results over iwslt, however, for wmt 14 de-en, I only got 29+ bleu. Which seems far away from the paper.
Here is my shell, would you like to tell me which setting is wrong? I train this model over 8 titan v100 with max-tokens=8192
python3 train.py $DATA_DIR \   --task bert_xymasked_wp_seq2seq -s de -t en \   -a transformer_nat_ymask_bert_two_adapter_wmt_en_de_bert_base \   --optimizer adam --adam-betas '(0.9, 0.98)' --clip-norm 0.0 \   --lr-scheduler inverse_sqrt --warmup-updates 4000 --warmup-init-lr '1e-07' \   --lr 5e-4 --min-lr '1e-09' \   --criterion label_smoothed_length_cross_entropy --label-smoothing 0.1 \   --weight-decay 0.0 --max-tokens 8192 --update-freq 1 --max-update 300000 \   --left-pad-source False --adapter-dimension 512 \   --use-adapter-bert --bert-model-name ${DISK}/bert-base-cased --decoder-bert-model-name ${DISK}/bert-base-german-cased \   --keep-last-epochs 5 --save-dir ${model_dir} --ddp-backend no_c10d --max-source-positions 500 --max-target-positions 500 --fp16 \

The setting seems correct, I think the problem is on the training set. As stated in the "Inference and Evaluation" section of our paper, for WMT14 En-De/De-En translation, we use the training set generated by sequence-level knowledge distillation. Mask-Predict does not perform well on the raw training dataset for this task.
In this issue the authors of the DisCo paper have provided the distilled data they used, maybe you can have a try.
You can also try a larger learning rate (such as 7e-4) which is usually beneficial for large batchsize.

Thanks for the reply,
The dataset I use is the distilled data from disco paper. So it seems very confused.

Emmm, how you preprocess the dataset?

Basically, I use the file tokenization.py under the folder "bert" in your code.
Like this:
`text_file_path = disk_path + "valid.en"
save_file_path = disk_path + "valid.wordpiece.en"
vocab_file_path = disk_path + "en.dict"
text_file = open(text_file_path, 'r')
save_file = open(save_file_path, 'w')
tok = tokenizer(vocab_file_path, do_lower_case=False)
for line in text_file:
line = line.strip()
tok_line = " ".join(tok.tokenize(line))
save_file.write(tok_line)
save_file.write('\n')
`
And then I use preprocess.py to convert them into binary for fairseq, seems like only 0.1% is setted to be [unk] for testing set.

Addtionally, for wmt data, there are around 40 samples over long than 512 (the max len in bert), so I think we have to set --max-source-positions 500 --max-target-positions 500  which is also different from IWSLT command.

I see. I re-checked your command and find that we set --adapter-dimension to 2048 instead of 512 for WMT tasks, maybe thats the point.

Aha, thank you!
But I also recommend you also share your training commands over wmt datasets~

Below is our script for WMT14 En-De translation. For De-En, just exchange bert-base-cased and bert-base-german-cased.
python $HOME/train.py $DATA_DIR \
  --task bert_xymasked_wp_seq2seq \
  -a transformer_nat_ymask_bert_two_adapter_wmt_en_de_bert_base \
  --optimizer adam --adam-betas '(0.9, 0.98)' --clip-norm 0.0 \
  --lr-scheduler inverse_sqrt --warmup-updates 4000 --warmup-init-lr '1e-07' \
  --lr 0.0007 --min-lr '1e-09' \
  --criterion label_smoothed_length_cross_entropy --label-smoothing 0.1 \
  --weight-decay 0.0 --max-tokens 2048 --update-freq 2 \
  --no-progress-bar --log-format json --log-interval 100 \
  --max-update 500000 --save-dir $MODEL_DIR --left-pad-source False \
  --use-adapter-bert --decoder-bert-model-name bert-base-cased --bert-model-name bert-base-german-cased

Hi Junliang,
I train this shell command for 100 epochs, but only got sacre bleu = 24.5 (BLEU+case.mixed+lang.en-de+numrefs.1+smooth.exp+test.wmt14/full+tok.13a+version.1.4.2 = 24.5 ) at WMT 14 en de. Which is relatively lower than the original mask-predict.
Would you like to share your checkpoints over WMT tasks?
Thanks

Hi, currently I cannot get access to the old checkpoints. But for your convenience, I re-train the model on the WMT14 De-En task, and get 33.39 BLEU score after 150k training steps. Please refer to this link for the checkpoint. Training longer will get better results.
We use the average of last 10 checkpoints and directly report the tokenized BLEU score provided by fairseq Generate test with beam=4: BLEU = 33.39, 66.7/41.2/27.6/18.8 (BP=0.966, ratio=0.966, hyp_len=67656, ref_len=70005), and the script is identical to that in IWSLT14 De-En. Please re-check your pipeline carefully.

I try your ckpt but only got this result:
| Generate test with beam=4: BLEU4 = 30.27, 65.7/39.8/26.2/17.6 (BP=0.914, ratio=0.918, syslen=67696, reflen=73759)
And I got some results like this

T-2911	The throwaway society does not think
H-2911	0.0	The Disposable Society does Not Think

I thought maybe my data is wrong? Would you like to share your tokenized data with fairseq dict?


support neptune1.3 during fallback

Description of changes:
When deploying neptune-export locally, I get the correct cluster parameter group for our cluster running engine version <IP_ADDRESS>.   Command, using the latest published neptune-export.jar:
java -jar neptune-export.jar nesvc \
  --root-path /Users/zacharyp/code/temp \
  --json '{
            "command": "export-pg",
            "outputS3Path" : "s3://somebucket/neptune_export",
            "params": {
              "clusterId" : "foobar",
              "cloneCluster" : true,
              "cloneClusterInstanceType" : "db.r6g.large",
              "cloneClusterEngineVersion" : "<IP_ADDRESS>"
              "exportId" : "foobar20240425",
              "scope" : "edges",
              "format" : "json",
              "perLabelDirectories" : true
            }
          }'

However, when I run the same command from an ECS instance, I am getting this exception in the logs (faking some data here):
INFO - [2024-04-25 17:27:39,891] Cluster ID              : foobar
INFO - [2024-04-25 17:27:39,891] Port                    : 8182
INFO - [2024-04-25 17:27:39,891] Engine                  : <IP_ADDRESS>
INFO - [2024-04-25 17:27:39,891] IAM DB Auth             : false
INFO - [2024-04-25 17:27:39,891] Streams enabled         : false
INFO - [2024-04-25 17:27:39,891] Parameter group family  : neptune1.2
INFO - [2024-04-25 17:27:39,891] Cluster parameter group : foobarneptunedbclusterparams1-3

...

INFO - [2024-04-25 17:27:39,893] Cloning cluster foobar...
INFO - [2024-04-25 17:27:40,338] Source clusterId           : foobar
INFO - [2024-04-25 17:27:40,338] Target clusterId           : neptune-export-cluster-6db25
INFO - [2024-04-25 17:27:40,338] Target instance type       : db.r6g.large
INFO - [2024-04-25 17:27:40,913] DB cluster parameter group : neptune-export-cluster-6db25-db-cluster-params
INFO - [2024-04-25 17:27:40,913] Completed creating DB cluster parameter group in 0 seconds
INFO - [2024-04-25 17:27:41,370] DB parameter group         : neptune-export-cluster-6db25-db-params
INFO - [2024-04-25 17:27:41,370] Completed creating parameter groups in 0 seconds
INFO - [2024-04-25 17:27:41,370] Creating target cluster...
INFO - [2024-04-25 17:27:43,043] An error occurred while creating target cluster. Elapsed time: 1 seconds
INFO - [2024-04-25 17:27:43,043] An error occurred while cloning cluster. Elapsed time: 3 seconds
INFO - [2024-04-25 17:27:43,043] An error occurred while exporting property graph. Elapsed time: 4 seconds
INFO - [2024-04-25 17:27:43,043] com.amazonaws.services.neptune.model.AmazonNeptuneException: The Parameter Group neptune-export-cluster-6db25-db-cluster-params with DBParameterGroupFamily neptune1.2 cannot be used for this instance. Please use a Parameter Group with DBParameterGroupFamily neptune1.3 (Service: AmazonNeptune; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 009cc573-69a1-445f-a250-df42ff10a061; Proxy: null)

I believe that this default to 1.2 must be happening when it runs in ECS?  The task running in ECS does have the permissions required, including rds:DescribeDBClusterParameters.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

To note, after using the jar built by this change, my deployed ECS task works...
INFO - [2024-04-25 19:04:30,123] Cluster ID              : foobar
INFO - [2024-04-25 19:04:30,123] Port                    : 8182
INFO - [2024-04-25 19:04:30,123] Engine                  : <IP_ADDRESS>
INFO - [2024-04-25 19:04:30,123] IAM DB Auth             : false
INFO - [2024-04-25 19:04:30,123] Streams enabled         : false
INFO - [2024-04-25 19:04:30,123] Parameter group family  : neptune1.3
INFO - [2024-04-25 19:04:30,123] Cluster parameter group : foobarneptunedbclusterparams1-3

Hi @zacharyp,
Thanks for spotting this bug and submitting the PR. The cause of the failure is likely due to insufficient permissions in ECS. The solution you've added here looks good to me, I will find some time to test it out in the next few days before merging the fix.

Hi @zacharyp, Thanks for spotting this bug and submitting the PR. The cause of the failure is likely due to insufficient permissions in ECS. The solution you've added here looks good to me, I will find some time to test it out in the next few days before merging the fix.

the ECS permissions makes sense.  I swear I checked like 4 times :). Thanks


Brazilian portuguese translation of Firebase UI

pt-BR translation port from https://github.com/firebase/FirebaseUI-Android/pull/384
PS: Not 100% sure if I should commit the FirebaseUI.xcodeproj/project.pbxproj file

Thanks for doing this!  The reason the diff is so big is because we usually run pod deintegrate before committing.

@morganchen12 That was the exactly that tip I was looking for. How include the (translated) files without include all pod things ;)
Updated. Thanks for the tip!

FYI @drishi94, @yramanchuk

Closing this as localizations have been added by the auth team and we don't have a process for accepting external localizations. Sorry!


commander land setpoint spike

There is a setpoint spike in X/Y when performing a landing. But it only happens if you are in position mode.
To reproduce the issue: make posix_sitl_default gazebo, wait until the home position is set, then commander takeoff, switch to position and fly a bit and then commander land.
When just doing commander takeoff and commander land, it does not happen.
Might be related/similar to https://github.com/PX4/Firmware/pull/7190?

Actually the spike also occurs when switching from position to e.g. hold (but then not when landing). Could be the switch from control_manual to control_auto.


Can't seem to extend a placeholder or class which consists solely of media query content coming from Breakpoint

Hi,
I have the following placeholder and class set up:
.is-hidden-tablet,
%is-hidden-tablet {
  @include breakpoint($lap) {
    display: none;
  }
}

When I try and use @extend %is-hidden-tablet; then I get this error message:
>> ".menu--secondary .menu .menu__item:last-of-type" failed to @extend "%is-hidden-tablet".
>> The selector "%is-hidden-tablet" was not found.

If I change my placeholder and class to the following then everything works okay:
.is-hidden-tablet,
%is-hidden-tablet {
  content: "";
  @include breakpoint($lap) {
    display: none;
  }
}

I don't think this is a bug with Sass or Breakpoint as I can't reproduce the issue in Sassmeister: http://www.sassmeister.com/gist/35cc92c46ec3154fb723581aaed3943e
Does anyone have any idea what might be the cause?
➜  npm list node-sass
└─┬<EMAIL_ADDRESS>  └──<EMAIL_ADDRESS>
➜  npm list breakpoint-sass
└──<EMAIL_ADDRESS>

Additionally, if I write a regular, plain CSS media query inside .is-hidden-tablet / %is-hidden-tablet (instead of making a call to breakpoint() then I do not get any errors.

I'm having the same issue.


Adds list for when Preferred Version is None

Fixes #799

@ajkiessl  Thinking on what Ana said at retro, should I filter pubs whose preferred version is None from this scope? It makes sense to me that we don't need to check file version if we know the preferred version is None, but I wasn't sure if I was overlooking anything. https://github.com/psu-libraries/researcher-metadata/blob/c14fde0fbf6a3223c7dc8fed001c2bc13b4219d3/app/models/activity_insight_oa_file.rb#L40
On a similar note, should pref version None be filtered from other workflow scopes? Not the base one, but scopes for each step so we aren't using resources on publications we know can't be deposited? preferred_file_version_none_email_sent will keep pubs out of the workflow once the email goes out, but I'm thinking about the time between when we know preferred version is none and when an admin can manually review & send the email.

@Smullz622

should I filter pubs whose preferred version is None from this scope? It makes sense to me that we don't need to check file version if we know the preferred version is None

Hmm my initial thought was it probably doesn't matter much to filter these out.  By the time a file record has gotten to the point where its preferred version is "None" it will have already gone through several other steps of processing, been manually reviewed, and manually selected as "None".  It will likely already have its file downloaded and have its version determined at this point.
On the other hand, if a user uploads a file, it goes through all that processing, an admin sets the preferred version to "None", then the user deletes the file and uploads a new file to AI, we could avoid excess processing of that file by filtering out the "None"s.  I'm not sure it's worth making the scopes more complex to reduce a small amount of processing for rare circumstances, though.
So ultimately, I don't think it's worth filtering the "None"s out of this scope.

should pref version None be filtered from other workflow scopes?  Not the base one, but scopes for each step so we aren't using resources on publications we know can't be deposited?

I think it depends.  I don't think admins will try to determine if the preferred version is "None" until after the preferred version has been checked in OAB.  In order to do that, we need to verify the DOI.  So we don't need to filter them out of those.  I don't think we need to filter them out of needs_oa_metadata_search in Publication either.  For similar reasons to the needs_version_check one, and I guess there's the chance we'd still want to know if something with a preferred version of "None" has any open access data.    For the file_version_check_failed scope in Publication, I think we do run the risk of the preferred version "None" types ending up in there when we don't want them to, so they should be filtered out of this.  The needs_permissions_check in ActivityInsightOAFiles is similar to the needs_version_check one above.  We don't need to get permissions data for the files, but by the time preferred version "None" is set, it will likely have already been checked.


Conversation instead of Wakeword with StreamAssist is working

Hi Alexx,
i combined youre great StreamAssist (thanks for this great integration) with my mp3-time-extract-script.
Now its possible to do a normal conversation with the StreamAssist instead of needing everytime a wakeword.
the conversationmode can be activated and disabled.
But i have one thing i cant found to make the conversation better. How i can make the listentime by the sst start longer? Because now we must react very fast after the beep sound. And maybe i can delete the another beep by conversation mode then.
if my solution is finish i will share it.
Thanks for youre help.

StreamAssist does not have its own conversation logic. It simply invokes the Home Assistant's built-in mechanics.
It's pretty hard to get involved there:
https://github.com/AlexxIT/StreamAssist/blob/49fde307ea11ecd1495b2bdcff3409217fe10b10/custom_components/stream_assist/core/__init__.py#L150-L165

StreamAssist does not have its own conversation logic. It simply invokes the Home Assistant's built-in mechanics. It's pretty hard to get involved there:
https://github.com/AlexxIT/StreamAssist/blob/49fde307ea11ecd1495b2bdcff3409217fe10b10/custom_components/stream_assist/core/__init__.py#L150-L165

yes i already mentioned this. In this fork here they reached this step. but unfortunately without the wakeword detection inside.
i tried to combined it but i havent enough knowledge to integrated the wakeword there.
thanks for youre replay.

I have now managed to get the VoiceCommandSegmenter integrated. It is not a visually appealing solution as you currently only have to change the values in the script and restart HA to apply them.
Also, the settings are currently global and cannot be evaluated for every device. But it is a start and looks like it works.
You can adjust the following values:
vad_mode
vad_silence_second
vad_speech_second
vad_timeout_seconds vad_reset_seconds
Best regards


[TC-302] Change Log Created On Edit Profile Details and Close - GH #1341

The original issue was https://github.com/Comcast/traffic_control/issues/1341
I was seeing some Change Log entries which made me question my team mates.
Update profile with name: EDGE_R730XD_532-733
They haven't changed anything, but here's the steps to reproduce.
Parameters -> Select Profile
Select Profile Details
Select Edit
Select Close (So no change are done, they simply wanted to copy&paste)
At this point, a change log entry is produced for something that wasn't updated.
https://github.com/Comcast/traffic_control/blob/master/traffic_ops/app/lib/UI/Profile.pm#L190-L212
Author: Dewayne Richardson
JIRA Link: https://issues.apache.org/jira/browse/TC-302
Found Version: 2.1.0

related to old TO UI. closing.


TypeError: 'querySelector' called on an object that does not implement interface Element.

Versions:
MacOS 11.0.1
Firefox 83.0
This is using webpack 4.
I'm getting this error after upgrading from 5.0.0-alpha3 to -beta1. All worked fine in alpha3.
Uncaught TypeError: 'querySelector' called on an object that does not implement interface Element.
    findOne bootstrap.esm.js:965
    Modal bootstrap.esm.js:2564
    js bootstrap.esm.js:3103
    handler bootstrap.esm.js:369
    addHandler bootstrap.esm.js:448
    on bootstrap.esm.js:474
    js bootstrap.esm.js:3077
    Webpack 7
        __webpack_require__
        js
        __webpack_require__
        0
        __webpack_require__
        <anonymous>
        <anonymous>

This happened when I provided data-bs-toggle but did not provide data-bs-target


Handle channels with useCurrentUserAsSender

Add an option to user email of the current user when sending mail using this plugin.
(The plugin version 1.0.1 will work with the newly added feature, but will display the email of the default sender rather than user email)
Version 1.0.2

Version 1.0.1

With both versions of the plugin, the mail will be actually sent using the email address of the user running the recipe.

The changes look fine, but I noticed a couple of cases where the fallbacks don't work as well as elsewhere.
This check was responsible - recipe.py line 103-4:
if not (channel_has_sender or is_sender_present):
    raise AttributeError("No value provided for the sender")

This happens in these two cases:
(1) Use current user email OFF Default email address: BLANK Sender (in plugin): BLANK (2) Use current user email: ON but user has no email Default email address: BLANK
I.e. when we have no sender info in the channel, user account or recipe config - so in the current code should fallback to the dss instance email.
We could probably just remove lines 98-104, as this will trigger the fallback. If the DSS email isn't populated, we get errors indicated the problem in the output table. I feel this is an extreme edge case and this is fine. (I don't think it's worth checking this up front from the plugin).

done here


Sample with master/detail

We should add a sample with a master view and a detail view

[ ] create web side
[ ] create Android project
[ ] create iOS project
[ ] test CLI
[ ] add to sample list

see cobalt tutorial repository


Why not use the auto-bed-leveling with the minda-probe on the prusa-mini?

Why not use the auto-bed-leveling with the minda-probe on the prusa-mini?
since the bed-leveling seems a design-bug in the mini (maybe fixed with firmware),
see this one for the hw-bug, and more on the prusa-forum
why do it all mechanical like your way?

According to Prusa, can't find the source right now, the M/PINDA can compensate for ~.05mm of difference. Some have had luck up to 1.1mm even. But the compensation has its limits. That's where this mod comes into play.
This mod is not required, but it can help in cases when the firmware can't handle irregularity in the print bed. Additionally, I believe it's better to not have to rely on software to fix a hardware problem.
Regarding the "MINDA H/W bug", this mod is not something that will help, and any S/W fix that PRUSA might release, will not be a fix but a workaround. The MINDA is limited in repeatable accuracy due to the missing thermister and this cannot be "fixed" in code without additional hardware. In short, the values returned by the MINDA differ depending on the temperature of the sensor itself. Without knowing the temperature of the sensor, the sensor cannot return an absolute measurement, but a relative one.

yeah  , thanks.
i had problems with first-layer on my mini and investigated the prusa-forum for this.
there is ongoing discussion about minda...think the hw-mod is a (temporary) solutions.
most people expect the bed-leveling to be correct everytime without manual intervention = out of the box.
thanks for soem way out of  this..

As I mentioned, this is not a fix for the MINDA value discrepancies due to sensor temperature issue. This mod will NOT fix that.


use generic enum for arrays, remove OptIter, add more methods

cc @Emilgardis

cc @Emilgardis
Look again, please.

bors r=Emilgardis


Included a bit more information about the escape character and listed…

… its uses with whitespace and special characters.

Also added a more overall description of the order of operations in Python.


[Concurrency] Introduce @actorIndependent attribute.

Introduce a new attribute @actorIndependent that specifies that a
given declaration is considered to be independent of any actor.
Actor-independent declarations do not have access to actor-isolated
state, even when they are declared as instance members of the actor.
On the other hand, actor-independent declarations can be used to
conform to (synchronous) requirements in protocols.

@swift-ci smoke test

@swift-ci please smoke test

@swift-ci please smoke test


Add Guide for Poster Submission and Printing

[ ] Write a guide or add to another instructing on poster-related issues

We might put this one on the back burner because I don't think we print posters anymore.


Fixed: Anthropic API Integration Update for System Message Handling

Issue:
The previous version of the code encountered a problem with handling system messages when using the Anthropic API. System messages were not being correctly passed in API requests, which could lead to improper functioning of chat models.
Solution:
The following key changes were made to address the issue:

Updated the handling of system messages in the stream_response and get_completion methods.
Modified the format for passing messages to the Anthropic API.
Added additional error handling and debug information.

Change Details

System Message Handling

In both stream_response and get_completion methods, extraction of system message content was added:
system_message, messages = pop_system_message(messages)
system_message_content = system_message.get('content', '')

Message Format Modification

In the get_completion method, the way messages are formatted for the Anthropic API was changed:
formatted_messages = []
formatted_messages.extend([{"role": msg["role"], "content": msg["content"]} for msg in messages])

API Call Update

The Anthropic API call was updated in both methods. Now the system message is passed as a separate parameter:
response = self.client.messages.create(
    model=model_id,
    system=system_message_content,
    messages=formatted_messages,
    # ... other parameters ...
)

Debug Information Addition

Debug outputs were added to facilitate problem diagnosis:
print("Formatted messages:", formatted_messages)
print("Model ID:", model_id)

Improved Error Handling

More detailed handling of BadRequestError was added:
except anthropic.BadRequestError as e:
    print(f"Bad Request Error: {e}")
    print(f"Request data: {e.request}")
    print(f"Response data: {e.response}")
    raise

It works. I cannot edit https://github.com/open-webui/pipelines/blob/main/examples/pipelines/providers/anthropic_manifold_pipeline.py please change the code. Other users can update this pipe locally, here full new code (copy/paste):
"""
title: Anthropic Manifold Pipeline
author: justinh-rahb + petr shkumatov
date: 2024-06-26
version: 1.2
license: MIT
description: A pipeline for generating text using the Anthropic API.
requirements: requests, anthropic
environment_variables: ANTHROPIC_API_KEY
"""

import os
import anthropic
from anthropic import Anthropic, RateLimitError, APIStatusError, APIConnectionError
from anthropic.types import MessageParam
from schemas import OpenAIChatMessage
from typing import List, Union, Generator, Iterator
from pydantic import BaseModel
import requests

from utils.pipelines.main import pop_system_message

class Pipeline:
    class Valves(BaseModel):
        ANTHROPIC_API_KEY: str = ""

    def __init__(self):
        self.type = "manifold"
        self.id = "anthropic"
        self.name = "anthropic/"

        self.valves = self.Valves(
            **{"ANTHROPIC_API_KEY": os.getenv("ANTHROPIC_API_KEY", "")}
        )
        self.client = Anthropic(api_key="")

    def get_anthropic_models(self):
        # In the future, this could fetch models dynamically from Anthropic
        return [
            {"id": "claude-3-haiku-20240307", "name": "claude-3-haiku"},
            {"id": "claude-3-opus-20240229", "name": "claude-3-opus"},
            {"id": "claude-3-sonnet-20240229", "name": "claude-3-sonnet"},
            {"id": "claude-3-5-sonnet-20240620", "name": "claude-3.5-sonnet"},
            # Add other Anthropic models here as they become available
        ]

    async def on_startup(self):
        print(f"on_startup:{__name__}")
        pass

    async def on_shutdown(self):
        print(f"on_shutdown:{__name__}")
        pass

    async def on_valves_updated(self):
        # This function is called when the valves are updated.
        self.client = Anthropic(api_key=self.valves.ANTHROPIC_API_KEY)
        pass

    # Pipelines are the models that are available in the manifold.
    # It can be a list or a function that returns a list.
    def pipelines(self) -> List[dict]:
        return self.get_anthropic_models()

    def pipe(
        self, user_message: str, model_id: str, messages: List[dict], body: dict
    ) -> Union[str, Generator, Iterator]:
        try:
            if "user" in body:
                del body["user"]
            if "chat_id" in body:
                del body["chat_id"]
            if "title" in body:
                del body["title"]

            if body.get("stream", False):
                return self.stream_response(model_id, messages, body)
            else:
                return self.get_completion(model_id, messages, body)
        except (RateLimitError, APIStatusError, APIConnectionError) as e:
            return f"Error: {e}"

    def stream_response(
        self, model_id: str, messages: List[dict], body: dict
    ) -> Generator:
        system_message, messages = pop_system_message(messages)
        system_message_content = system_message.get('content', '')
        max_tokens = (
            body.get("max_tokens") if body.get("max_tokens") is not None else 4096
        )
        temperature = (
            body.get("temperature") if body.get("temperature") is not None else 0.8
        )
        top_k = body.get("top_k") if body.get("top_k") is not None else 40
        top_p = body.get("top_p") if body.get("top_p") is not None else 0.9
        stop_sequences = body.get("stop") if body.get("stop") is not None else []
        print(f"stream_response: {messages}")
        print(f"stream_response: {system_message}")

        stream = self.client.messages.create(
            model=model_id,
            system=system_message_content,
            messages=messages,
            max_tokens=max_tokens,
            temperature=temperature,
            top_k=top_k,
            top_p=top_p,
            stop_sequences=stop_sequences,
            stream=True
        )

        for chunk in stream:
            if chunk.type == "content_block_start":
                yield chunk.content_block.text
            elif chunk.type == "content_block_delta":
                yield chunk.delta.text

    def get_completion(self, model_id: str, messages: List[dict], body: dict) -> str:
        system_message, messages = pop_system_message(messages)
        system_message_content = system_message.get('content', '')
        max_tokens = body.get("max_tokens", 4096)
        temperature = body.get("temperature", 0.8)
        top_k = body.get("top_k", 40)
        top_p = body.get("top_p", 0.9)
        stop_sequences = body.get("stop", [])

        formatted_messages = []
        formatted_messages.extend([{"role": msg["role"], "content": msg["content"]} for msg in messages])
        print("Formatted messages:", formatted_messages)
        print("Model ID:", model_id)

        try:
            response = self.client.messages.create(
                model=model_id,
                system=system_message_content,
                messages=formatted_messages,
                max_tokens=max_tokens,
                temperature=temperature,
                top_k=top_k,
                top_p=top_p,
                stop_sequences=stop_sequences,
            )
            return response.content[0].text
        except anthropic.BadRequestError as e:
            print(f"Bad Request Error: {e}")
            print(f"Request data: {e.request}")
            print(f"Response data: {e.response}")
            raise

Hi! Thanks for your efforts in fixing this. As it happens I've already been working on a port of this original code to the new function platform and resolved this issue. My backport is largely complete and my system message handling is similar to how you've done here, so I'll add you as a coauthor to the PR. The backport also will handle images for Claude 3.5 Sonnet.

Fixed:

#124

Sorry, first version was a bug. This code works well with or without system prompt:
"""
title: Anthropic Manifold Pipeline
author: justinh-rahb + petr shkumatov
date: 2024-06-26
version: 1.2
license: MIT
description: A pipeline for generating text using the Anthropic API.
requirements: requests, anthropic
environment_variables: ANTHROPIC_API_KEY
"""

import os
import anthropic
from anthropic import Anthropic, RateLimitError, APIStatusError, APIConnectionError
from anthropic.types import MessageParam
from schemas import OpenAIChatMessage
from typing import List, Union, Generator, Iterator
from pydantic import BaseModel
import requests

from utils.pipelines.main import pop_system_message

class Pipeline:
    class Valves(BaseModel):
        ANTHROPIC_API_KEY: str = ""

    def __init__(self):
        self.type = "manifold"
        self.id = "anthropic"
        self.name = "anthropic/"

        self.valves = self.Valves(
            **{"ANTHROPIC_API_KEY": os.getenv("ANTHROPIC_API_KEY", "")}
        )
        self.client = Anthropic(api_key="")

    def get_anthropic_models(self):
        # In the future, this could fetch models dynamically from Anthropic
        return [
            {"id": "claude-3-haiku-20240307", "name": "claude-3-haiku"},
            {"id": "claude-3-opus-20240229", "name": "claude-3-opus"},
            {"id": "claude-3-sonnet-20240229", "name": "claude-3-sonnet"},
            {"id": "claude-3-5-sonnet-20240620", "name": "claude-3.5-sonnet"},
            # Add other Anthropic models here as they become available
        ]

    async def on_startup(self):
        print(f"on_startup:{__name__}")
        pass

    async def on_shutdown(self):
        print(f"on_shutdown:{__name__}")
        pass

    async def on_valves_updated(self):
        # This function is called when the valves are updated.
        self.client = Anthropic(api_key=self.valves.ANTHROPIC_API_KEY)
        pass

    # Pipelines are the models that are available in the manifold.
    # It can be a list or a function that returns a list.
    def pipelines(self) -> List[dict]:
        return self.get_anthropic_models()

    def pipe(
        self, user_message: str, model_id: str, messages: List[dict], body: dict
    ) -> Union[str, Generator, Iterator]:
        try:
            if "user" in body:
                del body["user"]
            if "chat_id" in body:
                del body["chat_id"]
            if "title" in body:
                del body["title"]

            if body.get("stream", False):
                return self.stream_response(model_id, messages, body)
            else:
                return self.get_completion(model_id, messages, body)
        except (RateLimitError, APIStatusError, APIConnectionError) as e:
            return f"Error: {e}"

    def stream_response(
        self, model_id: str, messages: List[dict], body: dict
    ) -> Generator:
        system_message, messages = pop_system_message(messages)

        params = {
            "model": model_id,
            "messages": messages,
            "max_tokens": body.get("max_tokens", 4096),
            "temperature": body.get("temperature", 0.8),
            "top_k": body.get("top_k", 40),
            "top_p": body.get("top_p", 0.9),
            "stop_sequences": body.get("stop", []),
            "stream": True
        }

        if system_message:
            system_message_content = system_message.get('content', '')
            params["system"] = system_message_content

        print(f"stream_response messages: {messages}")
        print(f"stream_response system_message: {system_message}")

        stream = self.client.messages.create(**params)

        for chunk in stream:
            if chunk.type in ("content_block_start", "content_block_delta"):
                yield chunk.content_block.text if chunk.type == "content_block_start" else chunk.delta.text

    def get_completion(self, model_id: str, messages: List[dict], body: dict) -> str:
        system_message, messages = pop_system_message(messages)

        formatted_messages = [{"role": msg["role"], "content": msg["content"]} for msg in messages]

        params = {
            "model": model_id,
            "messages": formatted_messages,
            "max_tokens": body.get("max_tokens", 4096),
            "temperature": body.get("temperature", 0.8),
            "top_k": body.get("top_k", 40),
            "top_p": body.get("top_p", 0.9),
            "stop_sequences": body.get("stop", [])
        }

        #fix NULL system message
        if system_message:
            system_message_content = system_message.get('content', '')
            params["system"] = system_message_content

        print("Formatted messages:", formatted_messages)
        print("Model ID:", model_id)

        try:
            response = self.client.messages.create(**params)
            return response.content[0].text
        except anthropic.BadRequestError as e:
            print(f"Bad Request Error: {e}")
            print(f"Request data: {e.request}")
            print(f"Response data: {e.response}")
            raise

Fixed:

Update Anthropic Manifold Pipeline to v0.1.2 #124

@petunder I'll need your email address to add you as a coauthor.

<EMAIL_ADDRESS>Pls check new version. There is a bug fix

@petunder afaik my current PR's code works, I don't think I'll be needing the above but feel free to open another PR after this is merged if you feel there's more improvements to make.


Fix main inconsistencies after speech and task API integrations.

Update HISTORY to prepare for v0.5.0.
Deprecate two methods that run basic aggregations in Benchmark.
Update example notebooks according to the new APIs. Also slightly change the names.

@emanuele-moscato feel free to take a look ;) Basically, I've aligned all example notebooks except for the speech XAI one.


RAR Download Method

This PR switches the download scheme to download a single RAR file and extract the relevant ROMs. The only issue is that the user is required to have RAR installed on their system.

So it looks like python's patool package depends on the system's patool which in turn depends on (rar, unrar, or 7z) to be installed, and not one of these installations happens automatically. This is a bit ridiculous.
I don't think patool is a good idea if it just depends on something else to be installed. Also make sure that the python interface, if any, is in setup.py.

So by interface, you mean command line args?

No. I mean that patoolib is imported in the python, and its not required in setup.py

So like, is there any python library that just depends on rar or unrar to be installed? This way, we could cut one middleman out of the picture.

The only other one I know of is RarFile, but that one doesn't seem to have very good support. According to this: https://stackoverflow.com/questions/1185959/read-content-of-rar-file-into-memory-in-python , there is no pypi library that can install unrar for you

I guess my point is that the current method doesn't work well either, as I had to install 3 dependencies in sequence, by hand, in order to get the thing to work. I hope that with RarFile there will only be 1 thing to install by hand.
Either way, I would be a lot happier if there was a check for proper support before the download starts so you don't have to wait for it to download only for it to crash. Perhaps we can include a simple rar file in the repo and try to extract it just so the user gets the error message before download finishes?
Also, a download bar would be nice? https://stackoverflow.com/questions/40544123/how-to-use-tqdm-in-python-to-show-progress-when-downloading-data-online

Ok so I can implement the test unrar and the progress bar now. Regarding patools, its not installable via pip? Adding that to the requirements should fix it right

So there is a python library of patools which is installable with pip, which in turn calls a system library for patools which is not.
Adding the python library to the requirements and the setup.py would be nice.

And yes, that sounds like a good plan to me.


displayNotification does nothing on Android 13 (API 33)

I'm trying to tinker with bare minimum example. Basically I have a Button that calls displayNotification in its onPress handler. Android versions from 7 to 12L work fine, I see popup with Decline and Answer buttons.
On Android 13, however, (I'm using emulator) nothing happens. The only thing I can see in log is message from endCall handler after 30 seconds (timeout).
Thanks for your work! If you need any additional information or testing, I'm more than ready to collaborate.

I think I got it.
https://developer.android.com/about/versions/13/behavior-changes-13#privacy
So I added POST_NOTIFICATIONS to manifest and asked for it manually via PermissionsAndroid before trying to call displayNotification.

Thanks @degorov


Combined ulge file

Combine encrypted log data and symmetric key into one single .ulge file.

LGTM! I'd like see this  offered upstream first though to avoid merge conflicts later...

LGTM! I'd like see this offered upstream first though to avoid merge conflicts later...

Yes, I created PR's for upstream already for code and documentation:
https://github.com/PX4/PX4-Autopilot/pull/24024
https://github.com/PX4/PX4-user_guide/pull/3468

Upstream PR version still needs to be verified with HW (e.g. fmu-v5x) before creating the PR.

Now commits are cherry-picked from upstream


Process spark query once in sql repo for handling validations and other operations.

More details, comments in this PR: https://github.com/opensearch-project/sql/pull/2884/files
Today, we might be running spark query through parser multiple times, ideally we should be parsing it once.
Analyze and optimize these operations.

Catch All Triage - 1, 2, 3


added kanister app #569

Added arkade install kanister
Expected Behaviour

works as expected
arkade install kanister
arkade info kanister
Current Behaviour

Are you a GitHub Sponsor (No)
Check at https://github.com/sponsors/alexellis

[ ] Yes
[X] No

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

What Kubernetes distribution are you using?

kubectl version

Operating System and version (e.g. Linux, Windows, MacOS):

uname -a

cat /etc/os-release

What arkade version is this?

arkade version

Added in #585


Mithril 1.0.1 does not write "value" attributes for input elements to the DOM

The value attribute is not being set in the DOM when drawing an input element:
m("input", {type: "text", value: "foo"}) // outputs <input type="text"/> only

See here for an example: https://jsbin.com/cokezaxoxi/edit?html,js,output

Chrome Stable

Firefox Dev Edition

Edge

IE 11

It seems like there's something else going on here, I can't repro anywhere. Can you give some more details on the browser you're seeing this in?

It works in Safari 10.0.3 as well...
value is set as a property (conceptually vnode.dom.value = '...', not vnode.dom.setAttribute('value', '...')), it isn't reflected as an attribute in the DOM inspector. Nevertheless, it works fine.

I was able to reproduce it in Chrome 56.0.2924.87 (Mac OS X). It does display in the UI, but as @pygy demonstrated, it isn't written as a DOM attribute. Setting the value property does work, but it's unexpected behavior to not output the attribute to the DOM, being that the signature (http://mithril.js.org/hyperscript.html) is:
vnode = m(selector, attributes, children) // attributes is described as "HTML attributes"

Mithril's attributes does not map directly to DOM attributes. value is a (like checked, scrollTop, and others) is a DOM property and as such is set directly as an object property of the element rather than as an attribute. When writing plain HTML there is no distinction — you must provide initial properties in the same way you provide attribute. But because Mithril operates in a live DOM it must make the distinction.
To put it another way, setting value as a DOM attribute would not have an effect on the dynamic behaviour of the value property.
There are some special exceptions: custom elements (native web components) require all input to be set as DOM attributes in order to trigger their internal lifecycles. But in this case, it isn't necessary.

@barneycarroll another exception is ; Without an initial DOM attribute value, this control will clear the fields instead of setting them to the initial value in the DOM. There are other workarounds of course, but that's another valid case.

@marques-work The engine already takes many corner cases into account, see https://github.com/lhorie/mithril.js/blob/ad144072b622f063dcd1c7757978302b4c7ca492/render/render.js#L468-L498 for the current code

@pygy thanks for the context. I think @kyleolivo and I are fine with closing the issue as the behavior was an explicit implementation decision. It just caught us off guard that value was treated differently from the other common HTML attributes on input elements.

@marques-work You're welcome :-)


[advice]Cellpose troubleshooting

I trained a cellpose model and used it with a morphology2D file outside of sopa and got pretty good results, however when running it with the same image on sopa I don't get as many cells. I think it might have to do with the image settings ( e.g. contrast, etc), and maybe the patching??
What do you suggest for troubleshooting this? I guess I can use the CLI and try different parameters there? and then move to snakemake?
Thanks

Hello @cstrlln,
Do you use the same cellpose parameters in both cases?
Did you only check the total number of cells, or did you visually saw that Sopa was missing cells? Because Sopa does some filtering to remove artefacts (i.e., segmented cells that are too small to be a cell), so it may lead to a smaller number of cells, but since only artefacts are removed it should look good. You can check this comment in the FAQ that may help you concerning this.
In brief, you can check the following:

make sure to use the same cellpose parameters
check if min_area is not too high (note that the area is in pixels^2, and a too large value can lead to a big drop in cell number)
have a look to the log file for the segmentation (rule called "patch_segmentation_cellpose" if you use the pipeline) and see how many artefact cells are removed. If you use the CLI or the API, the logs will appear in the console/terminal.
try different values for gaussian_sigma and clip_limit (but default values usually work well, so I would not try this option first)

It's really unlikely to be due to the patching process, though.
Yes, you can use the CLI to debug this, as you'll directly see the number of cells logged in your terminal after sopa resolve cellpose.
I suggest performing the tests on one FOV to make it quick. I also recommend using a large patch size so that you have only one patch, it will be easier for testing purposes.
I hope this will help you!

Not yet, but I'm thinking about adding it
So, if I add it, I'll let you know!


WIP: Try re-enabling OSX64 builds

Attempt to re-enable OSX64 builds to see if it still segfaults (as mentioned at #45). Also tidying up the recipe/meta.yaml file a bit.

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

Addresses #45

@conda-forge-admin, please rerender


Save RiotAPI.getChampions(); data

Hi again,
Sorry for all of these questions, please bear with me.
Is there a way to save the data from RiotAPI.getChampions(); and reuse/read that data instead of retrieving the same data from Riot's servers every time? In terms of Android programming, I do not want to retrieve so much data every time I launch my app.
I think I would need to do List<Champion> champions = RiotAPI.getChampions(); and save that to a file somehow and then when I launch my app, I need to read that file and process it? Or is that the wrong way to do it?
(For LoadPolicy.LAZY or LoadPolicy.UPFRONT)

Hey, feel free to email me directly with problems if you don't want to keep opening issues.
There's a DataStore interface that can replace the in-memory caching with RiotAPI.setDataStore(). It'll do exactly what you're looking for. Currently, there's a Hibernate implementation which will use Hibernate to cache things in a RDB. (I don't actually know if this will work for Android, but worth looking in to.)
There's also a (slapped-together and buggy) FileSystemDataStore which will just use serialized files on the filesystem instead of a database.
You might need to edit either of these to get them working properly on Android or implement your own DataStore with an Android-based database, but DataStore is way to do this in Orianna.

Thanks again, I'll try that out.


refactored training_bath

Fixes  #2320
Co-authored with #2327

Hello @williamFalcon! Thanks for opening this PR.

In the file pytorch_lightning/trainer/training_loop.py:

Line 673:13: E731 do not assign a lambda expression, use a def

Do see the Hitchhiker's guide to code style


app: forced static folder fix

Fixes problem with static endpoint also being installed on the API
Flask application. (closes #36, addresses #33)

Moves default instance and static folder paths to cookiecutter
template. Existing installations must update their application
factories.

Signed-off-by: Lars Holm Nielsen<EMAIL_ADDRESS>

Please amend commit message otherwise there is an issue with kwalitee prepare release: s/(closes #36, addresses #33)/(closes #36) (addresses #33)/. Thanks

Superseded by #40


Resolve comments for #188 (SQLite out of memory)

Placeholder to address issues raised in #188 review

Tasks:

Move logging into base class
Set the ptrDb to null instead using a separate dbInvalid flag
Create unit test to check for the Out of Memory error


ImportError: No module named 'rcca'

Thanks for your code!
An error occurred when I run the main.py."ImportError: No module named 'rcca'"
Could you please tell me how to solve the problem ?
File "D:\Anaconda\program\envs\detectron2\lib\site-packages\torch\utils\cpp_extension.py", line 974, in load
keep_intermediates=keep_intermediates)
File "D:\Anaconda\program\envs\detectron2\lib\site-packages\torch\utils\cpp_extension.py", line 1190, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "D:\Anaconda\program\envs\detectron2\lib\site-packages\torch\utils\cpp_extension.py", line 1535, in _import_module_from_library
file, path, description = imp.find_module(module_name, [path])
File "D:\Anaconda\program\envs\detectron2\lib\imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'rcca'

Hi!
I am sorry for the problem. This is my test module, which did not appear in the final version. You can directly comment out the relevant code. It's like the implementation here.


Effort gets confused by backing property

I have an entity that looks something like this:
[Column("Startdate", TypeName = "Date")]
private DateTime _startdate { get; set; }

[NotMapped]
public LocalDate Startdate
{
    get => LocalDate.FromDateTime(_startdate);
    set => _startdate = value.ToDateTimeUnspecified();
}

This works just fine with EF (though projection doesn't work). I try to seed the database using Effort.DataLoaders.ObjectData like this:
Data.Table<MyEntity>().Add(new MyEntity { Id = 1, Startdate = new NodaTime.LocalDate(2008, 01, 01) });

It seems as if Effort tries to assign LocalDate directly to _startdate when quering DbContext, based on the exception:
Effort.Exceptions.EffortException: 'Unhandled exception while trying to initialize the content of 'Table<dbo_MyEntity>' table'

First inner exception:
EffortException: An unhandled exception occurred while trying to assign value 'Tuesday, 1 January 2008' to Property 'Startdatum' of type 'System.DateTime' during entity initialization for table 'Effort.Internal.DbManagement.Schema.TableName'

Second inner exception:
InvalidCastException: Specified cast is not valid.

That is one way I probably could do it, yes. If it's by design that ObjectData should not support not mapped properties then I guess you can close this issue since "It's not a bug, it's a feature" :)

lol ;)
Perhaps in the future, it will work as expected but for now, let say that's by design.


Export as CSV/JSON is exporting only the first 2 columns.

Export as CSV/JSON is exporting only the first 2 columns.

Fixed in master

Thanks I came here because I am experiencing the same issue but I guess I will just have to wait for the changes to propagate their way up.

It's fixed in 0.9.1 which is out since yesterday.

Thank you @mistercrunch


fix for Math.round

Great, thanks for the explanation! If you can restore the original feature tests in the main shim file, and add a new, separate variable that represents your new feature tests, I'd be happy to merge this!

@Yaffle why did you close this?

@ljharb , too many commits...
I need to a add a comment message about buggy browsers also

No need to clutter up the repo with a second PR, just rebase this one and force push :-)

@ljharb , I do not know how to rebase repo.

@Yaffle While I suggest you research how and learn (it's an awesome and powerful tool), you can also git branch -m patch-2 tmp ; git checkout master ; git checkout -b patch-2 and then check out any changes you want from tmp, and force push patch-2 which will update the PR accordingly.

@ljharb thanks for help with git

If you are interested - I am trying to add tests to test262: https://github.com/tc39/test262/pull/219

OK, if we could condense this down to 1 or 2 commits on top of latest master one last time, I'll merge it in ASAP :-) From your explanations, I can figure out how to name the constants later, so thanks for that!

@ljharb

You mean conceptually? The reason I put both is because I found engines where in fact they aren't the same.
No, I am not.
The engine for which 0.5 - Number.EPSILON / 4 is not equal to 0.5 - Number.EPSILON / 3.99` (when Number.EPSILON is defined), probably, has much bigger problems with floating point arithmetic.

0.5 - Number.EPSILON / 4 * 1 <= 0.5 - Number.EPSILON / 3.99 <= 0.5 - Number.EPSILON / 4 * (4 / 3.99), BUT there should exist only next numbers:
0.5 - Number.EPSILON / 4 * 1
0.5 - Number.EPSILON / 4 * 2
And so this value SHOULD be equal to 0.5 - Number.EPSILON / 4 * 1.
Currently, you are replacing Math.round with your implementation even in Chrome and Firefox, where it is not buggy, seems.

@ljharb ?

@Yaffle I would be happy to accept a PR with failing tests, or improvements - I'm not sure I grasp exactly why there's an issue, and since the spec does not mandate any precision, I'm afraid I won't have time to get to it quickly (absent a PR).

@ljharb 1) you are replacing not buggy Math.round in Chrome; 2) you have strange code


Add mouse interaction section

Addresses issue https://github.com/MicrosoftDocs/terminal/issues/6

Docs Build status updates of commit 8d96475:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

TerminalDocs/tips-and-tricks.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


bugtool: Dump NAT BPF maps entries with bpftool

If cilium bpf nat list fails, then we will be able to resort to the raw dumps when debugging.

This change is

test-me-please

Coverage increased (+0.003%) to 44.507% when pulling 8dc23cd72a7556c6a67fcd3cf0a3f78e30f00f93 on pr/brb/fix-bugtool into 1810709a25e50d8db9101d1ede71be8568220317 on master.


minor: release V2.2.9 rc

Codecov Report

Merging #642 (646dd1f) into V2.2.X (48ed257) will decrease coverage by 0.06%.
The diff coverage is 69.97%.

@@            Coverage Diff             @@
##           V2.2.X     #642      +/-   ##
==========================================
- Coverage   71.23%   71.17%   -0.07%
==========================================
  Files         290      292       +2
  Lines       21046    21238     +192
==========================================
+ Hits        14992    15116     +124
- Misses       6054     6122      +68

Impacted Files
Coverage Δ

apps/backend/agent/manager.py
37.28% <0.00%> (-0.32%)
:arrow_down:

.../components/collections/agent_new/register_host.py
97.17% <ø> (+1.12%)
:arrow_up:

apps/backend/components/collections/job.py
90.90% <ø> (ø)

apps/backend/components/collections/plugin.py
81.87% <ø> (ø)

apps/backend/plugin/views.py
36.80% <ø> (ø)

apps/backend/subscription/steps/agent.py
58.99% <ø> (ø)

apps/backend/urls.py
100.00% <ø> (ø)

apps/node_man/handlers/plugin_v2.py
85.35% <ø> (ø)

apps/node_man/handlers/policy.py
83.37% <ø> (ø)

apps/node_man/handlers/security_group.py
88.46% <ø> (ø)

... and 33 more

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 27157f7...646dd1f. Read the comment docs.


*: make gc not write db directly

What is changed and how it works?
Issue Number: Ref #12842
What's Changed:
We rely on non-concurrent memtable write for dynamic regions to
achieve best performance. This PR makes sure writes of compaction
filter be redirected to apply thread when dynamic regions is enabled.

The solution may miss data if TiKV crashes before writes are flushed
to disk. Note even for v1, it's also possible to leave garbage if writes
to rocksdb fail. We need to scan default CFs and check for orphan
versions.

Check List
Tests

Unit test
Integration test

Release note
None

/merge


Compare to webcatalog, another WebApp → Desktop App MetaA pp

Homework

[x] I looked at nativefier --help and https://github.com/nativefier/nativefier/blob/master/docs/api.md
[x] I searched existing issues, open & closed. Yes, my question is new.
[x] I'm using the latest version available at https://github.com/nativefier/nativefier/releases

Your question
I'm using WebCatalog  currently, and use its code to build https://github.com/tiddly-gittly/TiddlyGit-Desktop , and I see nativefier today, so being curious.
Can you briefly describe the difference between two, so users can compare?

Looking over your app (and WebCatalog), from a high level, here's the distinctions I'd make:
For WebCatalog in general:

WebCatalog
Nativefier

License
Paid (with a limited free tier and an open source backend)
Completely free and open source

Base Technology
Electron
Electron

Interface
OS Native UI
Command line

Catalog
Catalog of pre-built apps
No current catalog (but we're working on it #1130 #1166)

For your use case in specific, from a quick glance, I think Nativefier and WebCatalog would be fairly equivalent as you're building on WebCatalog (with an added internal web server from what I see) to display a web page from the local server. Even going to raw Electron would likely do what you want (in which you'd get a little more control, but a little more difficulty).
If there is a particular need that you are looking for, we can certainly let you know if we support that (or plan on supporting that). The good news is that porting from one to the other would be fairly simple as the root of Electron is the same.
One caveat to that though is that Nativefier is really meant as a command line tool for generating apps, not as a framework for building apps on your own. So while you are free to do so (in the spirit of open source), it's not necessarily a designed for or supported use case.
Hope this helps.

Thank you Adam, that is clear. I will recommend Nativefier along with WebCatalog if I'm going to introduce them on social media.

I am working on my own GUI for nativefier although it currently lacks most of the options found in the nativefier cli.
https://github.com/mattruzzi/nativefier-gui


BUG: click.prompt cannot handle dates

@pastewka I edited your fix slightly to change the output format from '2020-03-04 00:00:00' to '2020-03-04' (commit dcea0f3db0a2ede3471e857689e7f8d38dadb9fa)
I also added your contribution to the change log (commit f635bb87367b222b518502795f59c20ab5fe2cec) and the contributors file (commit 71185646f7da5967c159fc3464e545ffdae5a96a)
This code has been included in the 0.23.1 release of dtool-create: https://pypi.org/project/dtool-create/0.23.1/

Note that my edit in (commit dcea0f3db0a2ede3471e857689e7f8d38dadb9fa) converts Yaml dates to strings:
I.e. if the template is:
---
sometime: 2020-03-04

and a user updates the date using dtool readme interactive to 2020-02-01 the resulting README.yml file will be:
somtime: '2020-02-01'

(note the quotes around '2020-02-01').
I did not realise that isoformat dates without quotes were a special type in YAML.
I can change the code to return 2020-02-01 without quotes if that is desirable. I.e. for the yaml to conserve the date type from the template to the resulting dataset readme.
What do you think?

It may be better to have this explicitly as a date, but I am not sure how relevant this is. If you convert back, than there is probably no way to get rid of the time information (00:00:00 above)? In that case I would opt for simplicity.
Dates and times are weird anyway since you really also need the time zone to interpret them properly, unless there is some agreement to normalize to UTC. I guess this would be important in the context of data provenance.

I think I can get it to return the date without the time information (00:00:00) by changing the line:
d[key] = new_value.date().isoformat()

to:
d[key] = new_value.date()


Debugger should use larger string truncation limit when evaluating from the Debug Console

Steps to reproduce

Create a new C# Console app
Replace the content with below
Set a breakpoint where indicated
Start debugging
From the Debug Console, evaluate 'longString'

Expected  behavior
The full value of longString should be displayed (up until a fairly large truncation value)
Actual behavior
longString is truncated after 1024 characters
Work around
Right click on the value in the Debug Console and invoke 'Copy'
Content of the app
    public static void Main()
    {
        string longString = "[" + new string('*', 1024) + "]";
        Console.WriteLine(longString); // breakpoint here
    }

Fixed with #6765


call/cc and dynamic-wind example from R7RS

this is example that don't work as expected:
biwascheme> (let ((path '())
                  (c #f))
              (let ((add (lambda (s)
                           (set! path (cons s path)))))
                (dynamic-wind
                  (lambda () (add 'connect))
                  (lambda ()
                    (add (call-with-current-continuation
                           (lambda (c0)
                             (set! c c0)
                             'talk1))))
                  (lambda () (add 'disconnect)))
                (if (< (length path) 4)
                    (c 'talk2)
                    (reverse path))))
=> (connect talk1 disconnect connect #<undef> disconnect)

the #<undef> should be talk2.  Page 53 https://small.r7rs.org/attachment/r7rs.pdf

Simplified version.
(define n 0)
(define c #f)
(define (add s)
  (print s)
  (inc! n))

(begin
  (dynamic-wind
    (lambda () (add 'connect))
    (lambda ()
      (add (call/cc (lambda (cc) (set! c cc) 'talk1))))
    (lambda () (add 'disconnect)))
  (when (< n 4)
    (c 'talk2)))

Output:
connect
talk1
disconnect
connect
4   // should be 'talk2
disconnect


Fix the link to the PredictionStickAround

Whoops didn't look to see this was a merge request and not an issue, I pushed a commit that fixed it. I merged this anyways though. Thanks, I had not noticed this.


Missed custom check plugins list in many views

Hi,
In the menu "New", custom check plugins weren't present in many views.

Oups sorry, it is a mistake.

lgtm - @frankh can I leave with you?


[ES sink]Test logger in ES sink

This issue is to track the test coverage on logger in ES sink:
https://github.com/opendistro-for-elasticsearch/simple-ingest-transformation-utility-pipeline/blob/30f35e4abb8f4354ec6b93691e4c6f2f84e42637/situp-plugins/elasticsearch/src/main/java/com/amazon/situp/plugins/sink/elasticsearch/ElasticsearchSink.java#L51
Ref: https://www.baeldung.com/junit-asserting-logs

I'm not sure if we should do this, I would rather test the exceptions and state instead of log messages. @erosas @laneholloway ?

Testing on exception and state would be what I prefer, asserting based on log results is a little iffy.


Fix graph search used in declaration pruning

This PR fixes an error in the graph search used in declaration pruning by properly accounting for the meaning of merge nodes in the fixpoint calculation.
I expect this PR to fix the nondeterminism issue reported in #560 . However, the cause of incompleteness when using /prune remains a mystery.

The original code attempted to traverse the outgoing edges of a merge node as soon as it was discovered, i.e., before all reachable nodes are known. This would not be correct based on my understanding of what this code is trying to accomplish. It is possible that a merge node is discovered and processed and its outgoing edges are ignored because some member of the merge node is not known to be in the current visited set. But if the processing had been delayed, we could have discovered that all members of the merge node have been visited and therefore the outgoing edges need to be processed.
If my understanding of visited set is correct, the older code could result in reporting a subset of the real visited set.

Could you add a test on FindReachableNodesInGraphWithMergeNodes that fails without this change?

I have only written end-to-end tests before that are executed from the command line using lit. You are suggesting something else here?

I suspect there is another problem with the code but I have not attempted to fix it yet. The code in Prune.ComputeDeclarationDependencies calculates the dependency graph whose nodes are either a Declaration or a Declaration[]. It is possible that there are two instances of Declaration[] which contain the same Declaration's. Based on my understanding of what this code is trying to accomplish, those two instances must be unified in the dependency graph. In other words, we want the nodes in the dependency graph to be either Declaration or HashSet and we want the key comparison in the dictionary representing the dependency graph to be done on set semantics rather than memory address semantics.

I have also attempted a fix to the second bug I described above.

The original code attempted to traverse the outgoing edges of a merge node as soon as it was discovered, i.e., before all reachable nodes are known. This would not be correct based on my understanding of what this code is trying to accomplish. It is possible that a merge node is discovered and processed and its outgoing edges are ignored because some member of the merge node is not known to be in the current visited set. But if the processing had been delayed, we could have discovered that all members of the merge node have been visited and therefore the outgoing edges need to be processed. If my understanding of the meaning of merge nodes is correct, the older code could result in reporting a subset of the real visited set.

But if the merge node was visited and not all incoming edges had been visited, then the merge node was not added to the visited set, so it would be visited again when another incoming edge would be visited, ensuring that if ever all the incoming edges of the merge node would be visited, then the outgoing edges would be as well.
        var node = todo.Pop();
        if (visitedEdges.Contains(node)) {
          continue;
        }

        if (node is IEnumerable<object> objects) {
          if (!visitedEdges.IsSupersetOf(objects)) {
            continue;
          }
        }
        // note that the add is skipped if the above continue is hit.
        visitedEdges.Add(node);

I suspect there is another problem with the code but I have not attempted to fix it yet. The code in Prune.ComputeDeclarationDependencies calculates the dependency graph whose nodes are either a Declaration or a Declaration[]. It is possible that there are two instances of Declaration[] which contain the same Declaration's. Based on my understanding of what this code is trying to accomplish, those two instances must be unified in the dependency graph. In other words, we want the nodes in the dependency graph to be either Declaration or HashSet and we want the key comparison in the dictionary representing the dependency graph to be done on set semantics rather than memory address semantics.

The default equality/hashcode implementation of HashSet looks at the elements in the set, not the pointer of the HashSet:
https://dotnetfiddle.net/hl2GbS

The default equality/hashcode implementation of HashSet looks at the elements in the set, not the pointer of the HashSet: https://dotnetfiddle.net/hl2GbS

Does that alleviate your concern?

No. The problem I had in mind was something like this: https://dotnetfiddle.net/FxobuY. I would have liked to see the number of members in collectionOfHashSets to be 2 rather than 3.

After your explanation of the original code, I agree that the first problem I pointed out will not happen.

Upon reading the code in AxiomVisitor.VisitExpr, I detected some other potential problems:

It looks like the field pos to track polarity of an expression was added to Expr class just for this use case.  It should not be added to a core class such as Expr. Rather, we should attempt to track this state in AxiomVisitor itself.

The propagation of pos looks erroneous to me. For example, I see this code

n.Args[0].pos = Expr.NegatePosition(n.Args[0].pos);

to update pos of the child when the parent n is a Not expression. I suspect the intention was to do
n.Args[0].pos = Expr.NegatePosition(n.pos);

Otherwise, nested negation will not be handled correctly. There are similar problems in handling of other expressions also.

I stumbled upon the helpful comment in CommandLineOptions.cs that explains the design of the pruning feature. Here are a few thoughts on the design.
The uses declaration seems odd to me for two reasons. First, it may happen that an axiom constrains several functions in which case I would like to add an edge from each of those functions to the axiom. With the current design, we would have to copy the axiom in the uses clause of each of the functions. Second, just as a matter of taste (and Boogie tradition), it is better to use attributes to introduce experimental features into Boogie. Later, when the feature is well understood, we can introduce custom ergonomic syntax for it. The uses clause could have been simulated by adding an attribute on axioms comprising names of functions/constants from which edges to the axiom must be added.
The design of the :include_dep attribute given the rationale of easy migration did not make sense to me. Migration concerns would suggest that we preserve existing behavior by default, which would be to do as little pruning as possible. With the current semantics of :include_dep, an unannotated axiom is likely to be dropped because of lack of incoming edges resulting in excessive pruning which would then have to be turned off by suitably adding :include_dep. The alternative of adding references from declarations mentioned in the axiom by default and changing the behavior based on suitable attribute on the axiom would be an alternative design.

The default equality/hashcode implementation of HashSet looks at the elements in the set, not the pointer of the HashSet: https://dotnetfiddle.net/hl2GbS

Does that alleviate your concern?

No. The problem I had in mind was something like this: https://dotnetfiddle.net/FxobuY. I would have liked to see the number of members in collectionOfHashSets to be 2 rather than 3.

Err.. You're right, thanks.

Because of the invariant above and your explanation of the code, the search does not depend on logical equality over nodes of type Set; reference equality suffices.

I think it would be OK to use logical set quality for the Declaration[] objects when putting them in edges in ComputeDeclarationDependencies, but indeed it's not required.

The algorithm and implementation seems to be highly customized to the specifics of pruning code.

GraphAlgorithms.FindReachableNodesInGraphWithMergeNodes still seems generic to me, that's why it's in that location.

It would be nice to document all these specific details.

I think mentioning in ComputeDeclarationDependencies  that it's OK if there are multiple Declaration[]s with the same set representation in the edges graph, would be good.

I will not land this PR. The discussion is useful for anybody who wants to refactor the pruning code. In addition to the discussion above, I also want to point out that the untyped API of the graph search method is not desirable. A cleaner formalization ought to be possible.


400 error: Invalid parameter: file_urls

Hey y'all,
I am receiving the following error when trying to pass some file urls into the /template/update_files/[:template_id] endpoint.
/hellosign_sdk/utils/request.py", line 258, in _check_error
    raise err_cls("%s error: %s" % (response.status_code, json_response["error"]["error_msg"]), response.status_code)
hellosign_sdk.utils.exception.BadRequest: 400 error: Invalid parameter: file_urls

SDK Version 4.0

Hi Matthew!
Just wanted to close the loop on the Github issue since we've been communicating on the ticket. I've created an issue for this internally. In the meantime, you can use a requests library to build a raw HTTP request or make a cURL request.
Internal reference number: 10093
Related ticket number: 11055793

Thanks for the update!
FWIW I submitted a PR that fixes the issue: https://github.com/hellosign/hellosign-python-sdk/pull/77


如何修改drv->devs->path的路径

I can see how ‘drv‘ is initialized in configure. c, but I am not aware of the specific implementation details. May I ask if this structure dynamically allocates memory?
在configure.c中 我可以看到drv如何初始化 但具体实现细节我并不知晓 请问该结构体是动态分配内存吗？
/* Query the driver and device information. */
if (perm_set_capabilities(&err, CAP_EFFECTIVE, ecaps[NVC_INFO], ecaps_size(NVC_INFO)) < 0) {
warnx("permission error: %s", err.msg);
goto fail;
}
if ((drv = libnvc.driver_info_new(nvc, NULL)) == NULL ||
(dev = libnvc.device_info_new(nvc, NULL)) == NULL) {
warnx("detection error: %s", libnvc.error(nvc));
goto fail;
}
I would like to try modifying the path parameters of drv ->dev ->path
我想尝试修改drv->devs->path的路径参数
thanks!!!
十分感谢！！！

@linjianshu may I ask what the end goal is in this case? There may be alternatives such as using the Container Device Interface (CDI) to do achieve these.


IPC Format

Umbrella issue for the IPC format.

[x] #182
[x] #173
[x] #150
[ ] Split chunked arrays into batches
[ ] Support stats on ArrayView #272

I also think the IPC stream should only contain inline buffer lengths. The reader can then optionally be constructed with the buffer offset/lengths if the caller has access to them. Otherwise the stream must be consumed in order.
This can help to reduce the size of flat buffer messages.

Closing this for now in favor of milestone V0


[5.1] Queue: remove .php_cs.cache

There's another one at src/Illuminate/Foundation/Console/stubs/.php_cs.cache

Nevermind, not anymore


[[CHORE]] Tidy up checkPunctuators to not require array literal

As discussed on #2489 remove the requirement for an array literal

I like the thought, but the name checkPunctuators doesn't really make sense when you are checking a single token against a single punctuator value. What do you think about defining a separate checkPunctuator function?

Change made. I rebased because it involved changing every line.

rebased on master

Hey Luke: this no longer applies cleanly, but you've already had to rebase twice (two times too many for a patch like this), so I've rebased this time. Given the straightforward nature of this patch, the resolution was trivial, but I still feel weird modifying someone else's patch without their knowledge. If you can verify that https://github.com/jugglinmike/jshint/commit/850c19317c6b45b1723c7ef7ffd8e7ac2a0c9fae looks good to you, I'll land it right away.

yep, looks fine.

Great! 850c193 is now in master. Thanks for following up on my gripe :) One day, I'd like to have a Token class (and corresponding source file) with methods like this attached to it.


Method 'description' from 'example_group.rb' has no parameters

For each endpoint, I provide a few sentences describing what is it for.
The following code correctly generates the swagger.json file and includes description of the endpoint.
get 'pets' do
      produces 'application/json'
      description 'Some description'

However, my IDE, RubyMine, complains all the time that the description method has 0 parameters while I have provided 1.
Why does the method description from example_group.rb have no parameters?

I'm also using Rubymine and have replicated the issue. Happily it's related to an issue in the parameters code in relation to overrides which I've already risen a ticket for some time ago (https://youtrack.jetbrains.com/issue/RUBY-18948)
If you look at the Rswag::Spec:ExampleGroupHelpers, description has this:
 # NOTE: 'description' requires special treatment because ExampleGroup already
      # defines a method with that name. Provide an override that supports the existing
      # functionality while also setting the appropriate metadata if applicable
      def description(value=nil)
        return super() if value.nil?
        metadata[:operation][:description] = value
      end

This is pretty much just a Rubymine bug


Choose other colours for points on map

Looking at the legend, it currently looks like all clustered points on the map are Bestreden:

I suggest the following styles:
Cluster

[x] background-color: rgba(var(--bs-dark-rgb)); color: white;

[x] If possible, replace the polygon blue below with #ea792a:

Status colors:

[x] Rename Standaard to Gerapporteerd
[x] Sort in legend as: Gerapporteerd, Gereserveerd, Bestreden
[x] All points should have stroke="#3c3c3c" (not #000)
[x] Gerapporteerd (css class reported): fill="rgba(var(--bs-dark-rgb)" (could also be danger) but likely more informative to keep the same as clusters
[x] Gereserveerd (css class reserved): fill="rgba(var(--bs-warning-rgb)"
[ ] Use the same warning class to indicate in the information details that something is reserved
[ ] Bestreden (css class eradicated): fill="rgba(var(--bs-success-rgb)"

Selected dot

[ ] Geselecteerd (css class active): stroke="#ea792a and stroke-width="4" (see screenshot above)
[ ] Remove this pop-up:

Most of it is implemented, could not test colour change for reserved (currently broken) + no orange when selected.

Use the same warning class to indicate in the information details that something is reserved -> fixed

#127


JSON codec cannot handle scalar array

This could be marked as "expected behaviour", since JSON documents must be objects or arrays, not scalars. However, I think the JSON codec should be able to cope with simple strings.
Minimal, reproducible code sample, a copy-pastable example if possible
import numcodecs
j = numcodecs.JSON()
import numpy as np
x = np.array("value", dtype="O")
j.encode(x)

File ~/conda/envs/py39/lib/python3.9/site-packages/numcodecs/json.py:59, in JSON.encode(self, buf)
     57 buf = np.asarray(buf)
     58 items = buf.tolist()
---> 59 items.append(buf.dtype.str)
     60 items.append(buf.shape)
     61 return self._encoder.encode(items).encode(self._text_encoding)

AttributeError: 'str' object has no attribute 'append'

Problem description
Expect to successfully roundtrip the value
Version and installation information
Please provide the following:

Value of numcodecs.__version__
0.10.2
Version of Python interpreter
'3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:00:33) \n[Clang 13.0.1 ]'
Operating system (Linux/Windows/Mac)
MacOS on M1
How NumCodecs was installed (e.g., "using pip into virtual environment", or "using conda")
conda and source

The JSON codec also has problems with simple dictionaries, e.g., when x = {"a": 1} or x = np.array({"a": 1}, dtype=object) in the example above.

I suppose that those are scalars from this point of view. The code supposes that the outermost structure is a list. This should not be hard to fix.

Yeah, that seems to be a hard requirement. The internal workings indeed assume that an array is encoded. I don't know if this is by design, but it would be nice to be able to use the JSON codec with object arrays in zarr.

I think an object array does work now
In [128]: import numcodecs

In [129]: j = numcodecs.JSON()

In [130]: import numpy as np

In [131]: j.encode(np.array([{"X": 1}, {"Y": 2}], dtype="O"))
Out[131]: b'[{"X":1},{"Y":2},"|O",[2]]'

Well, yes it works for arrays with at least one dimension, but not for zero-dimensional arrays. Sorry if I was not clear in my earlier post. I agree that this is edge case, but I feel it's possible to support this. Moreover, it's always nice to have border coverage.

--- a/numcodecs/json.py
+++ b/numcodecs/json.py
@@ -54,8 +54,8 @@ class JSON(Codec):
         self._decoder = _json.JSONDecoder(**self._decoder_config)

     def encode(self, buf):
-        buf = np.asarray(buf)
-        items = buf.tolist()
+        buf = np.array(buf)
+        items = np.atleast_1d(buf).tolist()
         items.append(buf.dtype.str)
         items.append(buf.shape)
         return self._encoder.encode(items).encode(self._text_encoding)
@@ -63,7 +63,10 @@ class JSON(Codec):
     def decode(self, buf, out=None):
         items = self._decoder.decode(ensure_text(buf, self._text_encoding))
         dec = np.empty(items[-1], dtype=items[-2])
-        dec[:] = items[:-2]
+        if not items[-1]:
+            dec[...] = items[0]
+        else:
+            dec[:] = items[:-2]
         if out is not None:
             np.copyto(out, dec)

?

Yeah, this works for me! Thanks

OK, let's make it a PR and see if anyone has a more elegant resolution.


Tag for SPM

main brunch must have tag 0.1.0 for spm

Hi, will do that as soon as the first version is ready


Feedback: Provide more guidance on using Fiddler

Customers can use more feedback on leveraging the Fiddler tool for a network trace.  There are several downloads available for Fidder, including Fiddler Everywhere, so I think providing some kind recommendation may help there on which one to use.  Additionally, the File --> Export --> Save options were not there with Fiddler Everywhere, but there is an option to do an Export, so again the instructions should be I think relative to the type of Fiddler version used.
I realize that there's no control over a third-party tool and updates that affect it, but if we're going to provide some guidance on referencing a tool for a network trace, I believe it will help if we provide customers more information to better understand how to use it if they are not familiar with it.  Hope this helps.  Thanks!

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

ID: 370e8541-684e-6a57-4805-085c20f89aae
Version Independent ID: 5ffc18f1-bafb-1249-aa8a-3bb6b685ee6c
Content: How to collect a network trace
Content Source: articles/azure-web-pubsub/howto-troubleshoot-network-trace.md
Service: azure-web-pubsub
GitHub Login: @yjin81
Microsoft Alias: yajin1

@brmcmill
Thanks for your feedback! We will investigate and update as appropriate.

Thanks @ManoharLakkoju!  Additional feedback: While using Fiddler Everywhere, it does ask if you want to perform a secure HTTPS capture, but requires a cert to be installed.  I do not know if this is a preferred method here or not, but it's a third party cert and may not be ideal for customers to leverage in their environments.  Just additional guidance to consider adding if needed.


Tab completion to suggest executables first

Description of the new feature/enhancement
When pressing the tab-key to have the terminal autofill a suggestion of a file name present in the current folder, the first suggestion should be an .exe-file if there is a file matching the pattern, and only after that any other alternatives (in the way it does now).
The reason is that when I use tab completion, I always use it for folder navigation (not applicable) and to not have to type the full name of the executable I want to run.
Further Feature Examination
Note that this feature does not necessarily have to be limited to executables. It could just as well (with the same implementation, I believe) be used for other types of well-known file system entities.
For example, if I just recently launched a .cmd-file (which is not, the first suggestion), the next time I use tab completion the first suggestion could be the same .cmd-file again. The first time I used tab completion, the most likely candidate was the .exe-file but I chose a less likely candidate. On the second time the previous .cmd-file is more likely. I am trying to show that there is room for more intelligence here, as the keyword is "most likely". However, this could also lead to confusion and annoyance, so extending the feature this far should be evaluated carefully first (:

Proposed technical implementation details (optional)

Precondition: The application already has a list of well-known executable types (.exe, .bat, .cmd, .sh etc.) prioritized in the most appropriate way (i.e. exe before cmd, cmd before bat and so on).
Assemble the list of potential suggestions (i.e. how I guess tab completion works now).
Sort the suggestions based on the list in step 0.
Use the topmost suggestion.
If pressing tab again, continue cycling through the ordered list until there are no more well-known types.
If the ordered list is exhausted, continue with the "classic" suggestions.

When using tab completion to cycle through suggestions, I expect the most likely suggestion to be the first suggestion, followed by relevant suggestions, and lastly anything else that does not seem the user's most likely choice.

If you're using PowerShell, then this sounds like a suggestion to file on that shell directly, over at https://github.com/PowerShell/PowerShell (or possibly https://github.com/PowerShell/PSReadline, I'm not sure if PSReadline gets involved in tab completion).
If you're using cmd.exe, unfortunately, we won't be updating cmd.exe anytime soon. Neat idea, but not something we can change unfortunately.