Question about the benchmarks

I was looking at the code for pad-left and left-pad and was wondering about how fair the benchmarks are.
Both pad-left and left-pad use the same sort of algorithm for creating the padding yet in the benchmarks pad-left is about twice as fast. The reason for this difference in speed is the repeat-string package. As long as the padding char remains the same it doesn't recreate the string, it simply returns a cached version.
It is a very nice optimisation which can make quite the difference but it also skews the benchmark results.  The left-pad implementation is actually padding the string on each iteration where pad-left already has part of the answer ready after the first iteration.
When benchmarking the speed of both packages, would it not be more fair if it was done without the caching of repeat-string? Or perhaps make sure no two iterations use the same padding character.
I feel that now the benchmarks are only running a single case which heavily favours the implementation of pad-left. By adding cases which would render the caching by repeat-string moot you would get a better representation of how fast both algorithms are.

You know what, I'm seriously losing hope in this community. I created this lib two years ago, then they just updated their code to be similar, now you're on THIS repo asking me why I did something wrong?
How about asking left-pad why they didn't just use this lib instead of re-creating the same code? Nothing else needs to be said. I shouldn't have to defend something I did before the code in left-pad existed.

Both pad-left and left-pad use the same sort of algorithm for creating the padding yet in the benchmarks pad-left is about twice as fast.

I published this two years ago using that algorithm in repeat-string. left-pad is slowly updating their code to be more like this one. Should I have anticipated that they would copy the code and made different decisions based on that.

It is a very nice optimisation which can make quite the difference but it also skews the benchmark results.

It improves benchmark results because it makes the code more performant. It's repeating a string - not randomizing one. The point is to emulate what might happen in reality.  If you're suggesting that it's unlikely for someone to repeat a string "so much" or to repeat the same string on different function calls, that's not a debate I want to engage in.  In any case, it's a totally valid and super useful optimization.
Still, would I remove a legit optimization to help another library? Especially one that's copying off this one? How did you get the nerve to even ask these questions?

would it not be more fair if it was done without the caching of repeat-string? ... By adding cases which would render the caching by repeat-string moot you would get a better representation of how fast both algorithms are.

wouldn't it be more fair for me to just focus on writing code instead of having to defend something I created two years ago against something that's copying my lib?
Regarding the code. Did you actually thing about what you were writing before you typed out those words? The core algorithms are essentially the same!??! So 1) how would either lib be faster if the code was identical (if I removed the caching), and 2) again, why not just use this lib?!

I'm sorry to hear my message made you feel so defensive, that was most certainly not my intention. It was also not at all my intention to suggest you should alter the code of your package, I only meant to suggest altering the benchmarks. I would also like to note that I was not aware of the history between pad-left and left-pad and that it was such a delicate subject. I only learned of left-pad through the readme of your project.
My question/suggestion was just out of curiosity. It started with me wondering what would be the fastest way to pad a string. I made a couple of implementations and started looking into a good way to compare them, this led me to benchmark.js. Based on the benchmarks I ran on my implementations the one that used Duff's device was the quickest at about 115k ops/sec on my machine.
Then I opened Google, searched for "pad left" and found your package at the top of the search results. I installed the package, added a new benchmark and was blown away when your package did 35M ops/sec on my machine. Curious how you achieved such a vastly superior performance I started to look at the code. The caching of the result turned out the be biggest reason why. Once I implemented this in my implementation with Duff's device my padding method achieved almost the same ops/sec as yours.
On your Github page for the pad-left package it states it is the fastest implementation and the benchmarks with left-pad are featured prominently in the readme. This made me curious about their implementation. Looking at their code I noticed the way of creating the padding string also used  if (num & 1) and num >>= 1.This made me wonder if both implementations would score about the same if caching is taken out of the equation. What I wound up doing is taking the caching out of pad-left and benchmarked it against left-pad and both wound up scoring about 6M ops/sec.
The fact that pad-left and left-pad scored roughly the same when caching is taken out of the equation made me think about the value of the benchmarks. Even my crappy implementation scored almost the same ops/sec with the caching mechanism as your package but I would never think of  my implementation is being as good as yours.
Like I said, I am sorry if my message offended you. I love the package you've made, the optimization with the caching is awesome and like I wrote in the original message, it makes quite the difference in performance. I only meant to exchange ideas about the meaning and relevance of the benchmarks.
I might be pushing it but after looking at the code I do have two questions about repeat-string.

Given the impact caching has on the performance, have you ever considered caching something like the last 5 strings to repeat? Would this add something useful in your opinion or do you feel this is something which will not help much in real world usage?
Inside the while loop there is a check for !num and it breaks out of the while loop. I was wondering if this was added for performance reasons? It doesn't seem to be strictly needed as the while loop already checks for num > 0. Furthermore, is there is specific reason you check for !num inside the while loop instead of num === 0?

I'm sorry I responded so badly. I tend to get passionate about projects I care about, and I was already on edge since you're not the first person to create an issue of a similar nature related to left-pad.

have you ever considered caching something like the last 5 strings to repeat

It's worth a shot, but my gut tells me that it would probably have a negative impact on performance. The reason is that when caching strings we keep everything on the stack and avoid creating any references in memory. That said, v8 is getting so optimized that it might not matter as much anymore. I guess try adding objects anywhere in the function and see what happens. It will either be noticeably slower or nothing lol.

Once I implemented this in my implementation with Duff's device my padding method achieved almost the same ops/sec as yours.

Really? That's surprising, as I recall none of the other algorithms in the benchmarks were even close. But I don't recall if I was using caching at the time. anyway that's a good pattern. I like the combo of while/switch statements

Inside the while loop there is a check for !num and it breaks out of the while loop. I was wondering if this was added for performance reasons?

Yes, since we're a) a bit-shifting num on the previous line, it might be 0 at that point, b) building up the string exponentially, and c) slicing off excess when the string is returned, the longer the string is the more benefit there is to breaking as early as possible. Put another way, if we don't break there, the string will effectively double in size on the next line after it has already reached it's max length, and it's cheaper to check num than it is for .substr to search a longer string. This is why I check twice - both times are just before the string is doubled.
the caveat with caching is that it needs to be implemented correctly so that that cache is cleared when the pattern changes and, if necessary, provide a way to clear the cache from outside the closure. otherwise you're just creating memory leaks.

Is there is specific reason you check for !num inside the while loop instead of num === 0?

No it would probably be better to use num === 0, since strict equality is always faster. It wouldn't make much difference, but if I wrote the code today I'd use num === 0

Thank you for your long and detailed answer! I really appreciate you taking the time to answer my questions and I found the answers to be really useful.

Really? That's surprising, as I recall none of the other algorithms in the benchmarks were even close.

That's funny because it was the part that didn't surprise me at all. The benchmark was now only incurring the performance penalty of my slower repeat string algorithm once instead of each run.
I am still trying to wrap my head around how the repeat-string algorithm works. I understand the purpose of each line, I know what each line does and still I am unable to explain it in plain English. The part I am struggling with the most is where you add the value of str to res. Why do you have to do this each time the least significant bit is set? I guess my math skills are letting me down here. Is there any reading material on the subject you can recommend?
I really enjoyed reading your code and I am in still in awe of the performance you managed to achieve. Thanks for making it open source and giving others the opportunity to learn something.

That's funny because it was the part that didn't surprise me at all.

one thing that really impacts the benchmarks is the optimizations that have happened in v8 over the past couple of years. When I created this lib, while or for loops were substantially faster (orders of magnitude) than native methods like .forEach. but today the gap has closed significantly, to the point where native methods and loops are often equal.


Meri/enterprise

[x] cluster
[x] console
[ ] tables
[ ] table list
[ ] nodes
[ ] node list
[ ] help

Codecov Report

Merging #371 into master will not impact coverage.

@@           Coverage Diff           @@
##           master     #371   +/-   ##
=======================================
  Coverage   38.48%   38.48%
=======================================
  Files          19       19
  Lines        1629     1629
=======================================
  Hits          627      627
  Misses       1002     1002

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 03449b2...204a3df. Read the comment docs.


Virtus cannot define attributes on Objects

I was trying to replace Parameters with Virtus. One of the features of Parameters, is being able to define parameters on Objects as well as Classes. Virtus does not want to be extended into an Object.
class Test
end
obj = Test.new
obj.extend Virtus::ClassMethods

NoMethodError: undefined method `const_set' for #<Test:0x00000002aeb878>
    /home/hal/.rvm/gems/ruby-1.9.3-p0/gems/virtus-0.0.9/lib/virtus/class_methods.rb:16:in `extended'

This has a very low priority now. I'll mark it as a suggestion and we can work on it later.

I believe this may be resolved with the work in #41, though I haven't verified this specific use-case.

Shoot, I just reviewed #41 and it turns out I used #module_eval, which is not going to work with arbitrary objects. I'm fairly sure the call to #module_eval could be harmlessly replaced with a call to #instance_eval instead (or, AFAICT, #__send__ would work fine as well): https://github.com/solnic/virtus/pull/41/files#L4R16

@emmanuel can you follow up please?


nixos/kdeconnect: remove alias from default package

Description of changes
error: attribute 'kdeconnect' missing

       at /nix/store/0wv2ds7g8v5brr4776gmrmmi3ilk2wvh-source/nixos/modules/programs/kdeconnect.nix:15:17:

           14|     package = mkOption {
           15|       default = pkgs.kdeconnect;
             |                 ^
           16|       defaultText = literalExpression "pkgs.kdeconnect";

Things done

Built on platform(s)

[ ] 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

[ ] 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
[ ] 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

[ ] Fits CONTRIBUTING.md.

Taken from https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/aliases.nix#L641=


Modification methods wrong overwrite properties in the current model.

moveAsLast and moveAsFirst methods working as expected but after initialization they incorrectly overwrite 'lft' and 'rgt' properties in the current model.
And when I update my model (saveNode()), correct property in the table overwrites whith this wrong data.
There is problem with method correctCachedOnMoveNode(), when I turn it of , methods start working properly.

There is no more internal cache. Its planned as depency. Also behavior can be used without any cache for now. So we can complettely forget about troubles like this in future.

There is no more internal cache. Its planned as depency. Also behavior can be used without any cache for now. So we can complettely forget about troubles like this in future.


[top_earlgry] Rename parameter file passed to chip_env_pkg

chip_env_pkg is using parameters with are related to the
alert_handler, but they are actually specfic to the chip environment,
not to the alert handler environment. Rename the generated file to
reduce the confusion.
(There is another slightly different file alert_handler_env_pkg__params.sv.tpl
in the hw/ip/alert_handler tree, which is part of the self-test of the alert
handler. We'll need to clean that up in a follow-up once I understand
how all the dots are actually connected.)

The alert_handler_env_pkg__params.sv.tpl are generated from alert_handler hjson to get number of alerts and async mode. We initially auto-generate that because it is not encouraged to use design parameters (the initial version of alert_hander parameters are hardcoded). But now since the alert related design parameters are automatically generated from hjson, I think it is okay to directly use design parameters.
I can simply delete the alert_handler_env_pkg__params.sv.tpl and use NAlerts and AsyncOn from alert_handler_reg_pkg.
WDYT?

I can simply delete the alert_handler_env_pkg__params.sv.tpl and use NAlerts and AsyncOn from alert_handler_reg_pkg.

Sounds good to me!

Thanks for the feedback Philipp. https://github.com/lowRISC/opentitan/pull/5476 should clear the confusion :)

The alert_handler_env_pkg__params.sv.tpl are generated from alert_handler hjson to get number of alerts and async mode. We initially auto-generate that because it is not encouraged to use design parameters (the initial version of alert_hander parameters are hardcoded). But now since the alert related design parameters are automatically generated from hjson, I think it is okay to directly use design parameters.
I can simply delete the alert_handler_env_pkg__params.sv.tpl and use NAlerts and AsyncOn from alert_handler_reg_pkg.
WDYT?

SGTM.


Table queries stopped working after upgrade to latest 3.21.0 version

Which service(blob, file, queue, table) does this issue concern?
Table
Which version of the Azurite was used?
3.21.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
What's the Node.js version?
v 16.18.0
What problem was encountered?
Bad requests when query gets executed. Worked in the previous version.
Steps to reproduce the issue?
2023-01-10T10:52:25.437Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 info: DispatchMiddleware: Operation=Table_QueryEntities
2023-01-10T10:52:25.437Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2023-01-10T10:52:25.437Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.
2023-01-10T10:52:25.438Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Tue, 10 Jan 2023 10:52:25 GMT\n/devstoreaccount1/devstoreaccount1/customers()"
2023-01-10T10:52:25.438Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:gik6OwVuxEbxe51oXuBSWckmDpSpLpciLNkzZrOuaG8=
2023-01-10T10:52:25.438Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.
2023-01-10T10:52:25.438Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 verbose: DeserializerMiddleware: Start deserializing...
2023-01-10T10:52:25.438Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 info: HandlerMiddleware: DeserializedParameters={"options":{"queryOptions":{"format":"application/json;odata=minimalmetadata","filter":"(true and RowKey eq 'settings') and ((false or PartitionKey eq '1P23QNX4') or PartitionKey eq 'ABC_123') or PartitionKey eq '1A2BC3DE'"},"requestId":"01f67662-0ec0-4413-a45b-d38de35d90a6","dataServiceVersion":"3.0"},"version":"2020-12-06"}
2023-01-10T10:52:25.443Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 error: ErrorMiddleware: Received a MiddlewareError, fill error information to HTTP response
2023-01-10T10:52:25.444Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 error: ErrorMiddleware: ErrorName=StorageError ErrorMessage="The query condition specified in the request is invalid."  ErrorHTTPStatusCode=400 ErrorHTTPStatusMessage=undefined ErrorHTTPHeaders={"x-ms-error-code":"InvalidInput","x-ms-request-id":"2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0","x-ms-version":"2021-10-04"} ErrorHTTPBody="{\"odata.error\":{\"code\":\"InvalidInput\",\"message\":{\"lang\":\"en-US\",\"value\":\"The query condition specified in the request is invalid.\\nRequestId:2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0\\nTime:2023-01-10T10:52:25.443Z\"}}}" ErrorStack="\"StorageError: The query condition specified in the request is invalid.\\n    at Function.getQueryConditionInvalid (/usr/local/lib/node_modules/azurite/dist/src/table/errors/StorageErrorFactory.js:79:16)\\n    at Function.generateQueryForPersistenceLayer (/usr/local/lib/node_modules/azurite/dist/src/table/persistence/LokiTableStoreQueryGenerator.js:27:49)\\n    at LokiTableMetadataStore.queryTableEntities (/usr/local/lib/node_modules/azurite/dist/src/table/persistence/LokiTableMetadataStore.js:252:67)\\n    at TableHandler.queryEntities (/usr/local/lib/node_modules/azurite/dist/src/table/handlers/TableHandler.js:316:81)\\n    at /usr/local/lib/node_modules/azurite/dist/src/table/generated/middleware/HandlerMiddlewareFactory.js:58:18\\n    at /usr/local/lib/node_modules/azurite/dist/src/table/generated/ExpressMiddlewareFactory.js:77:63\\n    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/azurite/node_modules/express/lib/router/layer.js:95:5)\\n    at trim_prefix (/usr/local/lib/node_modules/azurite/node_modules/express/lib/router/index.js:328:13)\\n    at /usr/local/lib/node_modules/azurite/node_modules/express/lib/router/index.js:286:9\\n    at Function.process_params (/usr/local/lib/node_modules/azurite/node_modules/express/lib/router/index.js:346:12)\""
2023-01-10T10:52:25.444Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 error: ErrorMiddleware: Set HTTP code: 400
2023-01-10T10:52:25.444Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 error: ErrorMiddleware: Set HTTP Header: x-ms-error-code=InvalidInput
2023-01-10T10:52:25.445Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 error: ErrorMiddleware: Set HTTP Header: x-ms-request-id=2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0
2023-01-10T10:52:25.445Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 error: ErrorMiddleware: Set HTTP Header: x-ms-version=2021-10-04
2023-01-10T10:52:25.445Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 error: ErrorMiddleware: Set content type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
2023-01-10T10:52:25.445Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 error: ErrorMiddleware: Set HTTP body: "{\"odata.error\":{\"code\":\"InvalidInput\",\"message\":{\"lang\":\"en-US\",\"value\":\"The query condition specified in the request is invalid.\\nRequestId:2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0\\nTime:2023-01-10T10:52:25.443Z\"}}}"
2023-01-10T10:52:25.453Z 2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0 info: EndMiddleware: End response. TotalTimeInMS=18 StatusCode=400 StatusMessage=Bad Request Headers={"server":"Azurite-Table/3.21.0","x-ms-error-code":"InvalidInput","x-ms-request-id":"2f1bb080-5d32-4fa4-bdf4-fdd387c89bb0","x-ms-version":"2021-10-04","content-type":"application/json;odata=minimalmetadata;streaming=true;charset=utf-8"}

Have you found a mitigation/solution?
Use previous version

@BennyM
Thanks for raising this issue!
We will look deeper into it and update you.
@edwin-huber
It looks related with with the true/false in query (true and RowKey eq 'settings') and ((false or PartitionKey eq '1P23QNX4') or PartitionKey eq 'ABC_123') or PartitionKey eq '1A2BC3DE', and might be related with the change in https://github.com/Azure/Azurite/pull/1521. Not sure if you have any idea on this？

It looks the error is in function: https://github.com/Azure/Azurite/blob/e383fc08c64d3f59c089dc7e338a86ec300c636a/src/table/persistence/QueryTranscriber/StatePredicateFinished.ts#L343
For checkSingleTerm() function, currently the code assume it should only be ParensOpen/ParensClose/Operator, but actually it can also be a boolean value.
I will raise a fix PR soon.

@blueww to give you some more context. Queries are built with an expression and then given to QueryAsync.
   var query = PredicateBuilder.False<MyEntity>();
   foreach (var partitionKey in partitionKeys)
   {
      query = query.Or(entity => entity.PartitionKey == partitionKey);
   }

Similar to an approach illustrated here.

I have raised a PR to fix this issue.
@edwin-huber, could you please help to review the PR as it change the code raised by you on https://github.com/Azure/Azurite/pull/1521.

This totally makes sense... I did not include that case.
I'm reviewing the PR.

Close this issue as the fix is already released in Azurite 3.22.0.


Add Microsoft Exchange and Graph icons

Adds Microsoft Exchange and Graph API logos.

Thank you for the PR nice icon additions.


[AzureRmWebAppDeploymentV4] Bad deployment and not seeing Function App Linux on list

Required Information
Question, Bug, or Feature?
Type: Bug
Enter Task Name: AzureRmWebAppDeploymentV4
Environment

Server - Azure Pipelines or TFS on-premises? : Coporate account

Agent - Hosted: windows-2019 / ubuntu-latest

Issue Description
Using the AzureRmWebAppDeploymentV4 task, I have two strange behaviour:

When selecting "App Service type" as "Function App on Linux", my function app created on Linux ASP is not available. The service connection is OK, I have all my others Web ou Function Apps (Linux or Windows) in the same RGs.
It's not that annoying, I can write it manually.
To be noted : When publishing from Visual Studio 2019, I can see and select my Function App after selecting "Azure Function App (Linux)"

The most annoying : When deploying my zip of my built project to my Function App, I noticed that it's not working and the Function App is somehow "transformed" to a Function App for Container.
From the task logs, I can see the following :
Trying to update App Service Configuration settings. Data: {"linuxFxVersion":"DOCKER|microsoft/azure-functions-dotnet-core2.0:2.0","appCommandLine":""}
And after the deployment, using the publishing Wizard of Visual Studio 2019, I can no longer see my Function App when selecting "Azure Function App (Linux)" but I can see it when selecting "Azure Function App Container".

Hi there,
As a complement to my previous post, I noticed a strange behaviour when deploying to my Function App (Linux) with this task, it updates two properties on the JSON of my service (seen on resources.azure.com) :

kind : from functionapp,linux to functionapp,linux,container
Site property LinuxFxVersion value : from dotnet|3.1 to DOCKER|microsoft/azure-functions-dotnet-core2.0:2.0

For the latter, I tried to force set the property when deplying with the task parameter but I didn't work
Here is the configuration of the Azure DevOps task :

Here is the log from the execution :
2020-10-06T14:32:43.5453068Z Trying to update App Service Configuration settings. Data: {"linuxFxVersion":"DOCKER|microsoft/azure-functions-dotnet-core2.0:2.0","appCommandLine":""}
2020-10-06T14:32:45.6896112Z Updated App Service Configuration settings.
2020-10-06T14:32:45.6904955Z Trying to update App Service Configuration settings. Data: {"linuxFxVersion:":"dotnet|3.1"}
2020-10-06T14:32:47.9279020Z Updated App Service Configuration settings.

@BastienPerdriau for second issue check if runtime stack is selected. If yes try removing that value.

It seems to work better now. Not sure if it's related to removing that value (I had few other errors so I made some changes).
But it seems that the deployment task is no longer trying to force this setting : {"linuxFxVersion":"DOCKER|microsoft/azure-functions-dotnet-core2.0:2.0","appCommandLine":""}.

yes its because of runtimestack. we have observed similar issue before  #13427 we will investigate this further. we will track this issue with 13427. closing this issue.

No problem for closing.
If I can suggest to take a look to the first issue I spoke about the missing function apps when selecting "Function App (Linux)" in the UI.


Outlook Web App - can't use backspace key in emails when BackStop enabled

I am experiencing this issue on Chrome using the Outlook Web App.  Backstop 2.0.1  Version 51.0.2704.103 m.  Windows 10 Home edition. Dell Inspiron 7746 computer.  Unchecking the BackStop stops the problem.


Use in HttpClient

Is there anyway of making HttpClient use this?
I'm processing files from blob storage of up to 100Mb in a webjob and I'm trying to minimise the amount of disk I/O and also memory churn.
Any other suggestions gratefully received.

Going to close this (not really on-topic / an issue) but basically: yes. If you use the Content property of HttpResponseMessage (e.g. from a GetAsync) you can use something like CopyToAsync in order to copy the response content to any Stream object (incl RMS).


How to change the diffusion steps

Thank you for your excellent work!
I run this code on my own dataset about bladder tumor but I get very poor results. I guess the reason may be that my dataset is too small, resulting in overfitting.  The train_loss is very small with only about 0.003 but the Dice Score is very low. So I want to use a smaller diffusion_steps.
However , when I run the segmentation_train.py with the following instruction:
python scripts/segmentation_train.py --diffusion_steps 800
the program error occured as following:

I feel very strange because when the diffusion step is reduced, the program's memory requirements for memory of the GPU should be reduced. And I want to know that have you met the similar problem or can you tell me how to run this code with a smaller diffusion steps properly?
I would appreciate if you can reply me at your convenience. Thanks a lot.

Hi
Thanks for your interest. Can you maybe plot one image of your predicted segmentation map? This might help me to see where the problem is with your low dice score.
Actually, using less diffusion steps won't solve your problem. T=1000 seems to work fine with most applications. There is work that proposes T=4000 for better results, but this will take forever. Moreover, this will not reduce GPU memory consumption. So I suggest to stick with T=1000 and investigate more in what went wrong.

Hi
Thanks for your interest. Can you maybe plot one image of your predicted segmentation map? This might help me to see where the problem is with your low dice score. Actually, using less diffusion steps won't solve your problem. T=1000 seems to work fine with most applications. There is work that proposes T=4000 for better results, but this will take forever. Moreover, this will not reduce GPU memory consumption. So I suggest to stick with T=1000 and investigate more in what went wrong.

Hi
Thanks for your interest. Can you maybe plot one image of your predicted segmentation map? This might help me to see where the problem is with your low dice score. Actually, using less diffusion steps won't solve your problem. T=1000 seems to work fine with most applications. There is work that proposes T=4000 for better results, but this will take forever. Moreover, this will not reduce GPU memory consumption. So I suggest to stick with T=1000 and investigate more in what went wrong.

Thank you for your reply.
The following are the five predicted segmentation masks of one bladder tumor image.

The Dice Score above is about 0.08.
I trained the model for about 51000 steps.  The loss droped below 0.01 after about 5500 steps and fluctuated between 0.003-0.005 after 30000steps.
I am truly grateful for your kind assistance.

Hi
This seems like it is generating random segmentation masks, and not segmentation masks that belong to your input image. Do you properly stack the input image and the noisy segmentation mask channel-wise in every step during training and sampling?

Hi,
Actually there is an error in the code making impossible to change the number of diffusion step.
In segmentation_train.py at line 33, the schedule sampler takes an extra argument maxt=1000, that goes into the UniformSampler class in resample.py such that even if you change -diffusion_steps flag, the Sampler will everytime sample with 1000 diffusion step.
I recommand to check the original code of OpenAI
and replace the class UniformSampler by the following one :
`class UniformSampler(ScheduleSampler):
def init(self, diffusion):
self.diffusion = diffusion
self._weights = np.ones([diffusion.num_timesteps])
def weights(self):
    return self._weights`

Hi
Oh sorry, yes if you change the number of diffusion steps, you also need to adapt the maxt accordingly. But this was only I parameter I played around with, so dropping maxt does not make any difference. Thanks for fixing it!


VRP Some nodes only to be served by particular type of vehicle. The vehicle can serve 2 types of node.

some nodes refrigerated Must be served by refrigerated vehicles in the fleet
some nodes oil must be served by oil vehicles in the fleet
all ordinary nodes can be served by any vehicle in the fleet
all vehicles ----> have capacities associated with it.
all nodes ------> may have load associated with it
all nodes ------> definitely have vehicle type associated with it. (oil or refrigerated or ordinary)
I tried solving it using DimensionWithVehicleCapacity constraint but it is defined if particular vehicle is supposed to serve particular types of node
I also tried figuring out the solution using allowing nodes for vehicle but cannot map the solution in mind.

Restrict the vehicle var of the nodes.
Search for the mailing list.


Training GVE causes error in state_dict()

I followed the steps to train a GVE model on the CUB dataset. After the first epoch, it starts evaluating and then proceeds to save the model. The following error is thrown:
Traceback (most recent call last):
  File "main.py", line 114, in <module>
    torch.save(model.state_dict(), checkpoint_path)
  File "/home/daniel/projects/pytorch-vision-language/models/lrcn.py", line 80, in state_dict
    state_dict = super().state_dict()
  File "/home/daniel/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 616, in state_dict
    module.state_dict(destination, prefix + name + '.', keep_vars=keep_vars)
TypeError: state_dict() got an unexpected keyword argument 'keep_vars'

According to lrcn.py state_dict() calls super().state_dict(), which corresponds to the state_dict() method in the nn.Module class. The last lines in that method are:
for name, module in self._modules.items():
    if module is not None:
        module.state_dict(destination, prefix + name + '.', keep_vars=keep_vars)
return destination

These lines call the state_dict method of every module in the model, which includes a SentenceClassifier. The state_dict method for this class is
def state_dict(self, full_dict=False):
    return super().state_dict()

Since its signature doesn't match that of the method being called from nn.Module.state_dict(), the error is thrown.

Thanks for the detailed error report. I will fix it momentarily.


Update Contribution Docs, and Add Codespaces Docs

Related Issues
fixes: link to the issue
Description
Update contribution docs, and add a Codespaces tutorial.

@bziser @ShacharKidor @ilaner Please review the docs and see if you have any suggestions / fixes (we'll ask the docs-review team to review it after the changes).
I have a few remaining changes I need to apply (so ignore these issues for now):

Fix the existing GIF of creating a new Codespace to create it from a new branch instead of the master branch on tut-setup-dev-codespace.md
Add a GIF of creating a pull request from a fork to contributing.md
Add a GIF of opening an already-created Codespace and entering the web-based VSCode IDE on tut-setup-dev-codespace.md.

@bakatzir I've added you as well as I also modified some docs related to community & partner packs.

@bakatzir @ShacharKidor @ilaner @bziser Doc review completed.

@ShacharKidor @ilaner Please review :)

@ilaner @bziser @ShacharKidor Docs were reviewed again as requested by @MichaelYochpaz


Add  Coverage.Table! to show more details about coverage

Can you add a Table formatted output to the Coverage Class to output more like this:
File:Line resource_name covered_flag

Hi @karcaw
There was a long-term goal to allow people to specify their own templates (https://github.com/sethvargo/chefspec/blob/622a05b9f362f4219d0b89825d543518a9998ebf/lib/chefspec/coverage.rb#L124-L136), but never really took off. I would gladly review a PR to add this functionality, but I think the output should be JSON, not table format. If you want machine-parsable output, JSON is the best bet :smile:

I don't want machine parse-able, just a list of all resources.  I'll work up a PR for you to review

Hi @karcaw
It's very unlikely I will accept a PR to print things in table format just so they are "pretty". Everyone has a different style, and I think custom templates are a more realistic option in that case.


[Testsuite] Get rid of most of the recursive shared library Makefiles

Most of the secondary Makefiles we have are just a couple variable
definitions and then an include of Makefile.rules. This patch removes
most of the secondary Makefiles and replaces them with a direct
invocation of Makefile.rules in the main Makefile. The specificities
of each sub-build are listed right there on the recursive $(MAKE)
call. All the variables that matter are being passed automagically by
make as they have been passed on the command line. The only things you
need to specify are the variables customizating the Makefile.rules
logic for each image.
This patch also removes most of the clean logic from those Makefiles
and from Makefile.rules. The clean rule is not required anymore now
that we run the testsuite in a separate build directory that is wiped
with each run. The patch leaves a very crude version of clean in
Makefile.rules which removes everything inside of $(BUILDDIR). It does
this only when the $(BUILDDIR) looks like a sub-directory of our
standard testsuite build directory to be extra safe.
Reviewers: aprantl, labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68558
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@374076 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit a105d87cb9ab09a24b73edfc1bf23505ebf03f65)

@swift-ci test and merge


md-select falls out of screen (app component)

the options of md-select fall out of screen
a cdk-overlay-container div jumps outside of  how is this possible?

Can you post a Plunkr showing the issue? You can use this as a template http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

You probably forgot to import the theme/core styles
-> https://material.angular.io/guide/theming

Closing this issue as it does not follow the issue template. Please file a new issue that follows the template, which gives the team the information needed to investigate.

@bboehm86 That indeed fixes it! I'm really confused how that could be the case, I cannot find any information on it!


Some style changes and corrections

I would have accepted the new pull request, but I'd already changed some bigger things in the new update. Feel free to re-add to the new main.py file and make PR again.


Use css-to-js-sourcemap-worker

Replaces built-in sourcemapping

It have a mistake in docs: It is saying DebugUtility but it is actually DebugEngine @rtsao

Also please do not miss this issue, the worker is not working for me: https://github.com/rtsao/styletron/issues/254


Wrong amount of characters is being displayed with emoji

VSCode Version: 1.36.0
OS Version: Windows 64 bit 10.0.18362

Steps to Reproduce:

Open a file containing emojis
Select some emojis

Does this issue occur when all extensions are disabled?: Yes

@Wouterr0 can you help provide the original content of the file shown in the screenshot to help reproduce?

You can hit win and .(dot) key to get some emojis but here is the text:
😃1⃣😣🙄😊🤗😑👨🦰👨🦰👩🦰👱♂ some
text 😎😎😍

@Wouterr0 when you say "Wrong amount of characters is being displayed", do you mean the status bar item "9 selected" or something else ?

Yes, sorry for the duplicate.


dapp build creates non-deterministic json structure

Running the same dapp build will create different json files that are structurally the same, but are serialized in a different order. The order is reversed at random intervals.
For example, one invocation may create a json file that defines ContractA and then ContractB, while the next invocation may create a json file that defines ContractB and then ContractA.
While the json are interchangeable, they are not identical and they can't be compared as strings.
This was discovered when setting up tests for brew, which tested the output of dapp build.

.

Can we not avoid having to test the output of dapp build in brew? I don't think we can easily solve this because json is an unordered data format?

I solved it by testing it with jd instead if comparing the strings. I opened the issue as an FYI

Word, given that this is not a blocker, closing.


chrome://settings/fonts Dropdowns are disabled and cannot be changed by user under Windows XP SP3

Describe the bug
The chrome://settings/fonts settings are disabled under Windows XP SP3 x86.
To Reproduce
Steps to reproduce the behavior:

Go to chrome://settings/fonts.
Every setting under this page are disabled and cannot be modified by end user.

Expected behavior
By default, Chromium allows the end user to change the font fallback list for sans-serif, serif and monospace font.
Screenshots

Desktop (please complete the following information):

OS: Windows XP Service Pack 3, x86, Simplified Chinese varient
32-bit Superium 122.0.6261.152 (R4)

Additional context
Why this matters to me?
The default monospace font for every simplified Chinese varient of Windows (whether XP or anything higher) is true garbage by all means. I need to change it to Consolas.

See issue #261.

And even more important than "see issue 261" is please close your duplicated ticket @chenyiping1995 . It does just congest the bugtracker.


wip(sitetitle): img component

Description

Closes #2161
What does this PR change? Give us a brief description.
Did you change something visual? A before/after screenshot can be helpful.

@delucis thanks for the feedback. would be eternally grateful if you could help clarify a couple things regarding the expected outcomes 🙇 :
<Image> component now used in <SiteTitle>:
The Image asset is being referened twice.

Once in index.mdx:

hero:
  tagline: Congrats on setting up a new Starlight project!
  image:
    file: ../../assets/houston.webp

A second time in astro config:

logo: {
  src: './src/assets/houston.webp',
},

Upon running npm build, three images are processed:

A 400x400 Hero <Image>(houston.CZZyCf7p_tstkr)
A 800x800 Logo <Image>(houston.CZZyCf7p_Z1FoQLb)
unused: houston.CZZyCf7p
I should be aiming to remove the unused asset  - which should have been automatically removed ?
https://github.com/withastro/starlight/issues/2161#issuecomment-2283933628
Furthermore, if we want to reduce the output images down to one, I should further set the Logo's <Image> props too also be 400x400, so we don't build an 800x800 and 400x400 of the same image.

I should be aiming to remove the unused asset - which should have already been automatically removed ? #2161 (comment)

That issue is specific to SVGs — for other image formats we definitely still want two different outputs because they’ll be different sizes as you noticed. That said, I don’t know if Astro is smart enough not to duplicate even SVGs, but that would be the test case rather than the .webp Houston image.

I should be aiming to remove the unused asset - which should have already been automatically removed ? #2161 (comment)

That issue is specific to SVGs — for other image formats we definitely still want two different outputs because they’ll be different sizes as you noticed. That said, I don’t know if Astro is smart enough not to duplicate even SVGs, but that would be the test case rather than the .webp Houston image.

ahh woops I got carried with webp ..Will investigate with SVG! Thank you.

I should be aiming to remove the unused asset - which should have already been automatically removed ? #2161 (comment)

That issue is specific to SVGs — for other image formats we definitely still want two different outputs because they’ll be different sizes as you noticed. That said, I don’t know if Astro is smart enough not to duplicate even SVGs, but that would be the test case rather than the .webp Houston image.

Good evening, sorry for the wait.
I've done some digging, and as you already stated, the Image component changes alone aren't enough - the SVGs are still being duplicated. I've tried playing w/ config and some methods from /assets but to no avail.
I assume this should be addressed in core astro build process, not starlight(?). I'd happily do it, if you think that is the appropriate step.
note: I'll take this off draft for now.

Aha, good to know. My guess would be that because Astro hashes the options used with <Image> and getImage() when creating the image hash, those are taken into account even when the different width/height technically aren‘t impacting the output file, generating two hashes. Thanks for digging into it.
Bit fiddly to work around: either we manually switch to a regular <img> when we detect an SVG was passed to Starlight or like you say, look into fixing this in Astro itself.

Aha, good to know. My guess would be that because Astro hashes the options used with <Image> and getImage() when creating the image hash, those are taken into account even when the different width/height technically aren‘t impacting the output file, generating two hashes. Thanks for digging into it.
Bit fiddly to work around: either we manually switch to a regular <img> when we detect an SVG was passed to Starlight or like you say, look into fixing this in Astro itself.

Cool thanks, will take another look this weekend!

Aha, good to know. My guess would be that because Astro hashes the options used with <Image> and getImage() when creating the image hash, those are taken into account even when the different width/height technically aren‘t impacting the output file, generating two hashes. Thanks for digging into it.
Bit fiddly to work around: either we manually switch to a regular <img> when we detect an SVG was passed to Starlight or like you say, look into fixing this in Astro itself.

Good evening, SVG appears to no longer double with the conditional svg checks!
So I've implemented the checks in the relevant components which use the Image component: Hero, SiteTitle.
Had to play around w/ SiteTitle render logic abit to handle cases like these:

Any issues let me know :)


Add several devtools and also apply role to c-nodes

This PR installs several trivial devools. After discussion with @enasca, we think that this role may also be suitable for the c-nodes. So this PR also renames the role to reflect it in the naming.
I do not know how to test this PR. Is that something you could assist with @hfrSchmidt?

I'll check out the branch and test this with one of the c-nodes

The changes are applied to the managed_cluster_compute group as well. I'm merging the PR.


.NET RCE stuf

I don't know if this is related (it probably is) and I don't know if y'all need to change anything about this (I'm guessing y'all need to change one thing)
.NET versioned >= 6.0.0 has an RCE vulnerability, and the versions affected goes as far up until 6.0.16. The patched version is 6.0.18
Same for .NET 7:
.NET versioned >= 7.0.0 has an RCE vulnerability, and the versions affected goes as far up until 7.0.5. The patched version is 7.0.7
Read the "spammed" issues here (issue no. 250 + no. 252-261)
I already updated my .NET to the latest versions, being 6.0.18 (just so I can run your program) and 7.0.7 (for everything else)

this is not my screenshot

Good to know, but there isn't really anything I'm supposed to do about this. I guess I might add a notice about it though.

Good to know, but there isn't really anything I'm supposed to do about this. I guess I might add a notice about it though.

Maybe change the target version for the installer from 6.0.0 to like 6.0.18? (I didn't do the research before saying, I will do it rn)

The target version is 6.0.16, not 6.0.0, and .NET lets people use older patch versions.

The target version is 6.0.16, not 6.0.0, and .NET lets people use older patch versions.

😬 you should probably change it to the patched version 6.0.18

And my point is that changing it to 6.0.18 wouldn't actually stop anything from older versions.

Trying to say this in a nicer way but I know how .NET works, I know it allows you to use older versions, but I'm not saying all this to stop people from using older versions, but, changing the target version from 6.0.16 to 6.0.18, is probably a good idea.

Yeah, I know.


Shortcut Guide for Power Toys

Description of the new feature / enhancement
Another page of hotkeys and descriptions based on the hotkeys associated with PowerToys, using the same style as the existing Shortcut Guide PowerToy
Scenario when this would be used?
When I want to use a PowerToy and I don't remember its hotkey, it would be great to see a list of available keys.
Supporting information
I don't have any supporting information. It just seems like the sort of thing that people would find useful.

/dup https://github.com/microsoft/PowerToys/issues/15405


NumberBox: Forward information to the inner TextBox for better UIA experience

Description

NumberBox now forwards header if its a string or the AutomationProperties.Name property if no header is present.
Motivation and Context

Closes #3505
How Has This Been Tested?

Add new API test
Screenshots (if appropriate):

/azp run

/azp run

/azp run

/azp run


Kraken Tests failing due to non existent asset

Describe the bug
Kraken tests are failing due to non-existent asset, not sure if this is intentional?
I'll be honest I don't really understand the new test suite syntax/workflow petioptrv is there any documentation you could point me at please?
For example have the old environment variables for api keys been removed?
-------------------- >> begin captured logging << --------------------
hummingbot.core.utils.async_utils: ERROR: Unhandled error in background task: Error fetching Kraken market snapshot for COINALPHA-HBOT. Error is ['EQuery:Unknown asset pair'].
Traceback (most recent call last):
  File "/home/runner/work/hummingbot/hummingbot/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/runner/work/hummingbot/hummingbot/hummingbot/core/data_type/order_book_tracker.py", line 178, in _init_order_books
    self._order_books[trading_pair] = await self._data_source.get_new_order_book(trading_pair)
  File "/home/runner/work/hummingbot/hummingbot/hummingbot/connector/exchange/kraken/kraken_api_order_book_data_source.py", line 117, in get_new_order_book
    snapshot: Dict[str, Any] = await self.get_snapshot(
  File "/home/runner/work/hummingbot/hummingbot/hummingbot/connector/exchange/kraken/kraken_api_order_book_data_source.py", line 103, in get_snapshot
    raise IOError(f"Error fetching Kraken market snapshot for {original_trading_pair}. "
OSError: Error fetching Kraken market snapshot for COINALPHA-HBOT. Error is ['EQuery:Unknown asset pair'].

Steps To Reproduce
Run Kraken tests
Release version
development
┆Issue is synchronized with this Clickup task by Unito

@TheHolyRoger, can you point me to the tests you're running please? They all pass on my end (see attached screenshot).
One thing to note is that there are currently two sets of tests for the Kraken connector. The first one chronologically is under test/connector/exchange/kraken. These are integration tests really, since they interact with the actual Kraken server. The more recent set of tests is under test/hummingbot/connector/exchange/kraken. Those are unit tests where the API responses for both REST endpoints and websocket connections are mocked.
The first set of tests is bound to give you some problems as those are not ran by the GitHub CD pipeline and may be out outdated.
As for how the mocking is performed, we don't have a specific documentation yet, but we use aioresponses to mock REST API requests made with aiohttp, and a combination of patch and our NetworkMockingAssistant to mock websocket connections made using either aiohttp or websockets (which is the case of Kraken).
You can see examples of both in the user stream data source unit tests for Kraken.

Tagging this issue as resolved, no reported Kraken test failing on recent Github validation checks


Enhance CassandraImpl Support

'Read specific column from all rows' support

Codecov Report

Merging #459 into release-1.15 will decrease coverage by 0.01%.
The diff coverage is 0%.

@@                Coverage Diff                 @@
##             release-1.15     #459      +/-   ##
==================================================
- Coverage           40.77%   40.76%   -0.02%
  Complexity            775      775
==================================================
  Files                 110      110
  Lines                7623     7625       +2
  Branches              858      859       +1
==================================================
  Hits                 3108     3108
- Misses               4175     4177       +2
  Partials              340      340

Impacted Files
Coverage Δ
Complexity Δ

.../sunbird/cassandraimpl/CassandraOperationImpl.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

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 c9ddaf8...bba5ce1. Read the comment docs.


feat(responsive): app fully mobile responsive using media queries

Web is now fully responsive on different screen widths as requested in #9

Looks good. Would you be able to fix the merge issues though! It maybe best to wait till the footer pr is merged to not have to do this again.

Done, I have resolved it.

Yea we are still waiting on the footer though

The footer is now done so I can merge this. Thanks a lot for the help! Happy hacktoberfest :D


fix: #4215 404 in documentation due to migrated configuration examples

Description
This PR fixes #4215
Notes for Reviewers
Signed commits

[ ] Yes, I signed my commits.

Good catch! Looks good to me


Clean urls can not support refresh page?

At the official level，nextjs can clean urls and create Dynamic Pages.
The address: https://learnnextjs.com/basics/server-side-support-for-clean-urls/create-a-custom-server.
But,It will be as 404's page when Refresh page.
How to do ?

They do, check you have added them to be handled in your custom server. Also check the custom server Express example.


Update all the gems

In addition:

Updating Rspec - fixes #57
Updating Devise testing and bypass - addresses Devise deprecation warnings
Updating Capybara timeout setting - addresses Capybara deprecation warnings

Somebody needs to merge this pull request, because I am not authorized to do so.

This has been deployed to stage and production.


x/crypto/bcrypt: document handling of zero bytes

What version of Go are you using (go version)?

$ go version
go version go1.13 darwin/amd64

Does this issue reproduce with the latest release?
yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/user/Library/Caches/go-build"
GOENV="/Users/user/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/user/.go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/p9/jzgqgm3j02148q3nc_1mqc780000gn/T/go-build020284917=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

bcrypt.CompareHashAndPassword is error for this case ( "fxIyAIbpWcmAtQ==", "$2y$10$xMl6FD2r7TEHtm0j0hNSeOp5hA3FNWiJjSe/qbgEwZot/sohdZpBi").
type TestCase struct {
	password         string
	salt             string
	expectedPassword string
}

var tests = []TestCase{
	{
		"11111111", "RDcSaT5tERV3vQ==",
		"$2y$10$zVntO2ZlOr5UiNEb0zoWIOD1mf.kKgtEL8g/U.DavCtlb2EStfSyu",
	},
	{
		"11111111", "fxIyAIbpWcmAtQ==",
		"$2y$10$xMl6FD2r7TEHtm0j0hNSeOp5hA3FNWiJjSe/qbgEwZot/sohdZpBi",
	},
}

func TestPassword(t *testing.T) {
	for _, test := range tests {
		salt1, _ := base64.StdEncoding.DecodeString(test.salt)
		result := pbkdf2.Key([]byte(test.password), salt1, 35000, 32, sha512.New)
		t.Log(result)
		t.Fatal(bcrypt.CompareHashAndPassword([]byte(test.expectedPassword), result))
	}
}

the playground link is  https://play.golang.org/p/ZdHeD1h6xW-
fxIyAIbpWcmAtQ==,  $2y$10$xMl6FD2r7TEHtm0j0hNSeOp5hA3FNWiJjSe/qbgEwZot/sohdZpBi
But in php this case is right.
$password = '11111111';
$salt = 'fxIyAIbpWcmAtQ==';
$pbkdf22hash = hash_pbkdf2('sha512', $password, base64_decode($salt), 35000, 64);
$p0 = base64_encode(hex2bin($pbkdf22hash));
$excepted_hash = '$2y$10$xMl6FD2r7TEHtm0j0hNSeOp5hA3FNWiJjSe/qbgEwZot/sohdZpBi';
print_r(password_verify(base64_decode($p0), $excepted_hash));

in php 5.6:
<?php
$p0 = "Q0zCWhgeEtFYkAANuzKuTOctZVbZjxy4Aa7Yox1cZ0M=";
$salt = base64_decode('eE1sNkZEMnI3VEVIdG0wajBoTlNlTw==');
echo $salt;
echo "\n";
$result = password_hash(base64_decode($p0), PASSWORD_BCRYPT, ['salt' => $salt]);
echo $result;

the salt in php at  password_hash is right.
What did you expect to see?
bcrypt.CompareHashAndPassword return nil.
What did you see instead?
bcrypt.CompareHashAndPassword return "crypto/bcrypt: hashedPassword is not the hash of the given password"

The C bcrypt library (which PHP uses) has a limitation: the password cannot contain any 0 bytes.  If there is a 0 byte in the password, everything after it is ignored for the purposes of the calculating the hash. Go intentionally does not emulate this behaviour.
There are a couple workarounds. First, you can strip off everything following a 0 byte yourself before calling GenerateFromHash/CompareHashFromPassword. Doing this makes your test cases pass:
https://play.golang.org/p/Gv2ZyJoXnn0
result := pbkdf2.Key([]byte(test.password), salt1, 35000, 32, sha512.New)
if i := bytes.IndexByte(result, 0); i >= 0 {
	result = result[:i]
}
fmt.Println(bcrypt.CompareHashAndPassword([]byte(test.expectedPassword), result))

However, it's probably a bad idea to discard key material like that. If interoperability with the C library is a concern, a better solution would be to avoid passing binary data to bcrypt in the first place.
result := pbkdf2.Key([]byte(test.password), salt1, 35000, 32, sha512.New)
result = []byte(hex.EncodeToString(result))
fmt.Println(bcrypt.CompareHashAndPassword([]byte(test.expectedPassword), result))

@FiloSottile @katiehockman

As @magical said, silently discarding data from the input is dangerous and not a bahavior we want to replicate. For random inputs there is a 1/256 chance the first byte will be a zero, in which case the hash generated by the PHP library will always be the same, which is a security issue. You should probably encode the input.
We should mention this behavior in the docs, though.

Could I try to pick this issue?

Go for it.

I am wondering where is the document that I should add to?


Create minimal example Jenkins-Shark communication

Create a minimal example ("Hello World"), trying out Jenkins-Shark communication, triggered by a branch of SuperElastix.git, as suggested by Marius at the sprint.

The branch for this issue is https://github.com/SuperElastix/SuperElastix/tree/SELX-101-Example-Jensins-Shark

Tested the ability to publish files at barmsijs.lumc.nl  by adding them to /bamexport (during sh-session at shark), and doing chmod: https://barmsijs.lumc.nl/cedekker_temp/index.html (link may only temporarily be available)

Succeeded! I got a mail from 'root', saying:
Job 4385966 (SuperElastix_job) Complete
User             = sa_ci
Queue            =<EMAIL_ADDRESS>Host             = weaselshark.researchlumc.nl
Start Time       = 10/24/2017 13:41:09
End Time         = 10/24/2017 13:41:19
User Time        = 00:00:00
System Time      = 00:00:00
Wallclock Time   = 00:00:10
CPU              = 00:00:00
Max vmem         = 19.219M
Exit Status      = 0


Update user notification icon

Coverage remained the same at 28.057% when pulling aa7e7bea009d89433dd203d82bcf21d0860d0f18 on alioso:update-user-notification-icon into 734ffc05c6e10c547ecf68f84dc9f2358c712980 on linode:develop.

Looks good across various devices. 👍


WIP: Expressions using CQL Engine

For discussion:
Implements a simple "expressions" concept (#189) using a CQL engine. SetAttribute, Observations, and VitalSigns now include an "expression" field which gets translated and passed to a CQL engine for evaluation.  The details of the implementation are all abstracted away in a new ExpressionProcessor class. The translation layer allows for selected attributes, identified with a ruby-esque "#{attr}", on the patient to be referenced and added to the evaluation context.
For example, the expression "#{age} / 2 + 7" for a patient with the attribute "age" defined as 26 will result in the following CQL being evaluated:
library Synthea version '1'

context Patient

define age: 26
define result: age / 2 + 7

My goal here was to enable the kind of basic calculations that are used in the current Java modules, without forcing module writers to care about the details and boilerplate of CQL.
Some open questions:

Do we want to allow more complex logic, perhaps allowing people to write raw/multiline CQL to be passed directly to the engine?
How should we support referencing vital signs? I do like keeping vital signs separate from attributes, but at the same time if we can define arbitrary vital signs there isn't much distinguishing them and it may be easier to just merge vital signs back into attributes.
How should we support referencing the current time? (Ex. to reproduce the current smoking logic which uses a linear formula based on the current year) Do we want to add any convenience items or leverage the existing CQL date operators?
Is this missing anything else?

Reviving this thread as mathematical expressions for vital sign / attribute assignment will be a necessity for physiology submodule support that I'm working on. I expect models will frequently provide parameters which do not line up specifically with Synthea's set of vital signs, but which are mathematically related.
For example, the initial model I'm working with is a circulatory haemodynamics model which provides left ventricle volume (V_lv). In order to match that up with our Left Ventricular Ejection Fraction (LVEF) vital sign, we'll need an expression of the form "LVEF = max(V_lv) - min(V_lv)".
I suspect we could easily run into situations where more complex mathematical expressions involving square roots, exponentials, trig functions, logarithms, etc. are required. Looking through the repositories it's unclear to me if CQL supports these functions. Some alternative libraries which may provide mathematical expression functionality more specifically are mXparser or EvalEx.
If CQL supports the functions mentioned above and can support sufficiently powerful expressive capability then I'm all for using that. But if not then I'd recommend going with something more math expression specific.
Thoughts?

CQL supports many mathematical operations.  Check out the following to parts of the reference section in the CQL spec:
https://cql.hl7.org/09-b-cqlreference.html#arithmetic-operators-4
https://cql.hl7.org/09-b-cqlreference.html#aggregate-functions
Do those sets of capabilities seem robust enough for what you'd need?

One other thing I'll add is regarding the approach of generating a CQL file w/ the pertinent data hard-coded.  The description uses this example:
library Synthea version '1'

context Patient

define age: 26
define result: age / 2 + 7

This approach requires CQL-to-ELM to recompile every CQL snippet for every Synthea patient.  CQL-to-ELM compilation is fairly fast, but I wouldn't say it's cheap.  It would be more efficient if you could write the CQL snippet with parameters for the variable data.  Then you only need to run CQL-to-ELM once and you pass in the parameter values when you execute it for each patient.  Using this approach, your example might look like this:
library Synthea version '1'

parameter PatientAge Integer

context Patient

define result: PatientAge / 2 + 7

The other approach, which is more complicated but also more robust, would be to use CQL retrieves to get the current Synthea patient's data for calculation -- but then you'd need to implement a data source to work w/ the Synthea data.  If you did that, though, you could use something like CQL's AgeInYears operator to automatically get the patient's age.  But... for now, the more reasonable approach is probably parameters.

Thank you @cmoesel! This is all great info and it seems like CQL should give us everything we need. I'll start working that into my physiology branch and let you know if I run into any hiccups.


Daily Diary Entry WebApp

Title and Issue number

Title : Daily Diary Entry WebApp
Issue No. : #429
Code Stack : HTML, CSS, JS, Nodejs
Close #429

Video (mandatory)

https://github.com/apu52/METAVERSE/assets/71439585/4adb545f-f111-4e19-8725-6d72935ca93b
Checklist:

[x] I have mentioned the issue number in my Pull Request.
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have created a helpful and easy to understand README.md
[x] I have updated the projectData.json file for my contribution
[x] I have added the img of my project in the assets/img section

Additional context (Mandatory )
Are you contributing under any Open-source programme?

Yes, Codepeak 2023

@HemantKumar01  can you kindly not put spaces in the folder name and the image name please update the projectData.json as well.

@5h0ov renamed the files and changed them in projectData.json also


feat(tailwind-plugins): add token extender plugin

TASK: #1395
Description, Motivation and Context
This PR adds a Tailwind plugin that will enable users to add new custom tokens, such as an arbitrary height for a header for instance.
Types of changes

[ ] 🛠 Tool
[ ] 🪲 Bug fix (non-breaking change which fixes an issue)
[x] ✨ New feature (non-breaking change which adds functionality)
[ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] 🧾 Documentation
[ ] 📷 Demo
[ ] 🧪 Test
[ ] 🧠 Refactor
[ ] 💄 Styles

I think I prefer to keep the default Tailwind's implementation for this.
Once developers are familiar with Tailwind, it's easier if they know of the theme structure and set tokens themselves. I don't think we need this abstraction.
In leboncoin they have:
module.exports = plugin.withOptions(
  () => undefined,
  () => ({
    theme: {
      extend: {
        screens: {
          tiny: '480px',
          custom: '971px',
        },
        width: {
          'page-min': '320px',
          'page-max': '1066px',
        },
        maxWidth: {
          'page-max': '1066px',
        },
        minWidth: {
          'page-min': '320px',
        },
      },
    },
  })
)

So 1066px is used twice. They could simply use a constant to reach the same result:
const MIN_PAGE_WIDTH = '320px'
const MAX_PAGE_WIDTH = '1066px'

module.exports = plugin.withOptions(
  () => undefined,
  () => ({
    theme: {
      extend: {
        screens: {
          tiny: '480px',
          custom: '971px',
        },
        width: {
          'page-min': MIN_PAGE_WIDTH,
          'page-max': MAX_PAGE_WIDTH,
        },
        maxWidth: {
          'page-max': MAX_PAGE_WIDTH,
        },
        minWidth: {
          'page-min': MIN_PAGE_WIDTH,
        },
      },
    },
  })
)

👋  @Powerplex ,
The idea for this plugin came from a question from @andresz1 , who wanted to use an arbitrary token for the new documentation website.
As you said, we can use the default method of extending the theme manually, which we already do. This plugin just makes things a little less cumbersome when you have a token that you want to use for different theme keys. However, beyond that, I agree that it does not add much value 🤷
The only other thing it does is create a CSS variable for you, which you can reference in your code using arbitrary values like [flex-basis:--your-token].
But even then, you could achieve the same result without this plugin by using the theme function ➡  [flex-basis:theme(height.your-token)].
So, I would board with not using this plugin and closing the PR 👍

Closing this PR, as we can get by without it for now


Malformed selection error in csubst_site

Dear Kenji,
I am trying to use csubst_site to map convergent substitutions on protein structures. Most of them came out fine except for one sample where I am getting the above error. In the pdf that gets generated, none of the convergent sites are plotted. I have used my own determined protein models from SwissModel as the pdb input. The alignment of the model and input sequence looks good as well.
Another quick question, the input or the site algorithm is the same as for the csubst analysis algorithm correct? In my case, it's the output of cdskit hammer.
I've attached the log file of the site algorithm.
Thanks
csubst.34202113_6.txt

Another quick question, the input or the site algorithm is the same as for the csubst analysis algorithm correct? In my case, it's the output of cdskit hammer.

Yes, the inputs should be the same between site and analyze.
Could you provide a reproducible example including input files and CSUBST command?

Dear Kenji,
Here's a folder with all the data to reproduce the above.
Issue.zip

Dear Kenji,
Here are the files to reproduce the above analysis.
Issue.zip

The error appears to stem from a lack of convergence and/or double divergence in specified branches (I tested with 23,26,51,55,116,130,175,180,218). Following this comment, I will release version 1.3.17, which should allow for the creation of a .pse file without encountering any errors. However, the results may lack biological significance due to the absence of convergence.


Add option to search tab groups in chrome

Looks like there is no API for tab groups at all for the moment ( https://bugs.chromium.org/p/chromium/issues/detail?id=930988 ) but once there is I will make adding support a priority

now see https://bugs.chromium.org/p/chromium/issues/detail?id=1106846


Bootstrap 5

It might be worth considering moving to bootstrap 5 in the future, but due to use in gems it might be difficult.

We've upgraded to Bootstrap 5 in #463 (in June 2023)


add provider/supportURL information to stacks/samples

Which area this feature is related to?
/area registry
Which functionality do you think we should add?

Why is this needed? Is your feature request related to a problem?
This is a blocker for https://github.com/devfile/api/issues/539
Detailed description:

[x] Create support doc for stacks & samples we own, stacks/samples within devfile-samples, and the following stacks hosted at devfile registry:

go

java-maven

Java-springboot

nodejs-angular

nodejs-nextjs

nodejs-nuxtjs

nodejs-react

nodejs-svelte

nodejs-vue

php-laravel

Python

Python-django

[ ] Update devfiles in stack/samples we owned to include provider & supportURL information

[x] Update registry index content to include provider field. (registry-viewer will need this information to create filter)

Describe the solution you'd like

a new repo will be created under devfile-samples org, devfile-samples/support.  The repo will be used to track issues on stacks/samples we own.
The support information will be stored in this repo's readme.
Describe alternatives you've considered

Additional context

repo created under devfile-samples for issue tracking: https://github.com/devfile-samples/support

provider and supportURL information has been added to samples:
https://github.com/nodeshift-starters/devfile-sample.git
https://github.com/devfile-samples/devfile-sample-code-with-quarkus.git
https://github.com/devfile-samples/devfile-sample-java-springboot-basic.git
https://github.com/devfile-samples/devfile-sample-python-basic.git
and registry index for samples: https://github.com/devfile/registry/blob/main/extraDevfileEntries.yaml

closing as rotten (created > 2 years). Feel free to re-open if it's not a requirement.


[BUG] Unable to register extension with OpenSearch version 2.15.0

What is the bug?
I have a running distribution of OpenSearch version 2.15.0 which was installed using the method on the following link.
https://opensearch.org/docs/latest/install-and-configure/install-opensearch/tar/
I enabled the experimental extension feature in the opensearch.yml file and then run the distribution.
Then while trying to register the extension, it gave me version incompatibility error so I changed the versions in hello.json extension sample file.

After that, when I again tried to register the extension, it gave the following errors on the running OpenSearch and the registration was unsuccessful, as I could not get a response from the sample extension.
java.lang.IllegalStateException: Received message from unsupported version: [7.9.99] minimal compatible version is: [7.10.0]
        at org.opensearch.transport.TransportHandshaker$HandshakeResponseHandler.handleResponse(TransportHandshaker.java:189)
        at org.opensearch.transport.TransportHandshaker$HandshakeResponseHandler.handleResponse(TransportHandshaker.java:161)
        at org.opensearch.transport.NativeMessageHandler.doHandleResponse(NativeMessageHandler.java:427)
        at org.opensearch.transport.NativeMessageHandler.handleResponse(NativeMessageHandler.java:419)
        at org.opensearch.transport.NativeMessageHandler.handleMessage(NativeMessageHandler.java:174)
        at org.opensearch.transport.NativeMessageHandler.messageReceived(NativeMessageHandler.java:126)
        at org.opensearch.transport.InboundHandler.messageReceivedFromPipeline(InboundHandler.java:121)
        at org.opensearch.transport.InboundHandler.inboundMessage(InboundHandler.java:113)
        at org.opensearch.transport.TcpTransport.inboundMessage(TcpTransport.java:800)
        at org.opensearch.transport.nativeprotocol.NativeInboundBytesHandler.forwardFragments(NativeInboundBytesHandler.java:157)
        at org.opensearch.transport.nativeprotocol.NativeInboundBytesHandler.doHandleBytes(NativeInboundBytesHandler.java:94)
        at org.opensearch.transport.InboundPipeline.doHandleBytes(InboundPipeline.java:143)
        at org.opensearch.transport.InboundPipeline.handleBytes(InboundPipeline.java:119)
        at org.opensearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:95)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:280)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:689)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:652)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at java.base/java.lang.Thread.run(Thread.java:1583)

How can one reproduce the bug?

Install OpenSearch as mentioned in the following link.
https://opensearch.org/docs/latest/install-and-configure/install-opensearch/tar/
Open opensearch.yml. Search for opensearch.experimental.feature.extensions.enabled, uncomment it, and set it to true.
Run the opensearch binary.
Run the sample hello extension as explained in this guide.
https://github.com/opensearch-project/opensearch-sdk-py/tree/main/samples/hello
Register the extension.

What is the expected behavior?
Error logs on OpenSearch.
java.lang.IllegalStateException: Received message from unsupported version: [7.9.99] minimal compatible version is: [7.10.0]
        at org.opensearch.transport.TransportHandshaker$HandshakeResponseHandler.handleResponse(TransportHandshaker.java:189)
        at org.opensearch.transport.TransportHandshaker$HandshakeResponseHandler.handleResponse(TransportHandshaker.java:161)
        at org.opensearch.transport.NativeMessageHandler.doHandleResponse(NativeMessageHandler.java:427)
        at org.opensearch.transport.NativeMessageHandler.handleResponse(NativeMessageHandler.java:419)
        at org.opensearch.transport.NativeMessageHandler.handleMessage(NativeMessageHandler.java:174)
        at org.opensearch.transport.NativeMessageHandler.messageReceived(NativeMessageHandler.java:126)
        at org.opensearch.transport.InboundHandler.messageReceivedFromPipeline(InboundHandler.java:121)
        at org.opensearch.transport.InboundHandler.inboundMessage(InboundHandler.java:113)
        at org.opensearch.transport.TcpTransport.inboundMessage(TcpTransport.java:800)
        at org.opensearch.transport.nativeprotocol.NativeInboundBytesHandler.forwardFragments(NativeInboundBytesHandler.java:157)
        at org.opensearch.transport.nativeprotocol.NativeInboundBytesHandler.doHandleBytes(NativeInboundBytesHandler.java:94)
        at org.opensearch.transport.InboundPipeline.doHandleBytes(InboundPipeline.java:143)
        at org.opensearch.transport.InboundPipeline.handleBytes(InboundPipeline.java:119)
        at org.opensearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:95)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:280)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:689)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:652)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at java.base/java.lang.Thread.run(Thread.java:1583)

What is your host/environment?
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Architecture: x86-64
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.

Hey @mzainab24 thanks for this report.   It's been a while since I mucked with this code, but it looks like the transport handshakes use the 3.0.0 version:
https://github.com/opensearch-project/opensearch-sdk-py/blob/29d98e603fc32b48fcc7b5fba0e091bce2b9f12e/src/opensearch_sdk_py/transport/version.py#L11
I took a quick look at the Version Class in OpenSearch and it's a bit confusing to me how all that math works out.
But I'd suggest as a first try, set that Version constant in this extension to 20150000 and see if that resolves the issue.

OK, spent a little bit more time looking into this.  I think this is indeed a bug, specifically: this extension uses the same version in the response as it received in the request:
https://github.com/opensearch-project/opensearch-sdk-py/blob/29d98e603fc32b48fcc7b5fba0e091bce2b9f12e/src/opensearch_sdk_py/actions/internal/transport_handshake_request_handler.py#L49
The version being sent, however, is a "minCompatVersion" rather than the current one.
            } else if (version.onOrAfter(Version.V_2_0_0)) {
                minCompatVersion = Version.fromId(7099999);
            }
            handshakeRequestSender.sendRequest(node, channel, requestId, minCompatVersion);

This runs afoul of 2.x version checking which requires 7.10.0 minimum.  That version checking happened to work on 3.x but doesn't work on 2.x.
TLDR, we should not use the inbound "min compatibility" in our response.
I think if we pass None for the version in the above request handler code, it will default to the current version (3.0.0) and should work.

@dbwiddis Isn't there an easier workaround for @mzainab24 in the extension itself?

Isn't there an easier workaround for @mzainab24 in the extension itself?

Nothing really configurable, this is our hardcoded TCP handshake.   We just sent back the same version which worked on 3.x so I never really dug into why it worked and assumed it would.  It's clearly not the same thing.
I believe the bugfix is probably to change this line to something else, probably Version.CURRENT
https://github.com/opensearch-project/opensearch-sdk-py/blob/29d98e603fc32b48fcc7b5fba0e091bce2b9f12e/src/opensearch_sdk_py/actions/internal/transport_handshake_request_handler.py#L49
I haven't had any time to set it up to test yet.

@dbwiddis thank you for the insights. I am currently using the opensearch-sdk-py as a Python library and building my extension on top of it. Could I inquire if there are any upcoming commits that might address this issue?
Another thing to mention is that the extension registration works perfectly fine when I clone the whole code of OpenSearch, the latest version 2.15.0 from https://github.com/opensearch-project/OpenSearch.git, and in that way I do not have to change the below version in the json file.
"opensearchVersion":"3.0.0",
"minimumCompatibleVersion":"3.0.0"
to 2.15.0 and it works. But when I install OpenSearch from a tarball, using the Advanced Packaging Tool (APT) package manager, or using docker to configure and manage OpenSearch, then I receive the above mentioned error.
The OpenSearch version numbers differ for all of the above:
Clone the code from github: version number = 3.0.0-SNAPSHOT
tar, apt and docker = 2.15.0
I want to avoid cloning the code and running the distribution from it to simplify my deployments.

@mzainab24 I can certainly make a PR to change that version number, but as mentioned I haven't had time to test it so it's an informed guess that it may fix the problem.  I'll make that commit now.

@dblock @mzainab24 FYI, I just spent some time digging through all the related Java code (again) and it's a bit more complex.   The proposed PR fix might work as a quick unblocker but is not the right long term fix, which I'm still trying to wrap my head around.
Key point is that there are two different version numbers being exchanged in these handshakes.
Here's the inbound bytes from the handshake header from a 3.0.0 cluster:
#b'ES\x00\x00\x001\x00\x00\x00\x00\x00\x00\x00\x08\x08\x08 \x0b\x83\x00\x00\x00\x1a\x00\x00\x00\x16internal:tcp/handshake\x00\x04\xa3\x8e\xb7A'

It's easier to read with Netty debug.  Here's just the header part.
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 45 53 00 00 00 31 00 00 00 00 00 00 00 08 08 08 |ES...1..........|
|00000010| 20 0b 83 00 00 00 1a                            |......          |
+--------+-------------------------------------------------+----------------+

The 08 20 0b 83 starting at byte 15, after stripping the mask bit, is 0x200b83 or 2100099.  This is the "minimum compatibility version".  The handshake was sent from a 3.x cluster, so that was the latest minor version (2.10.0) at the time that was logged.
Here's the full handshake:
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 45 53 00 00 00 31 00 00 00 00 00 00 00 08 08 08 |ES...1..........|
|00000010| 20 0b 83 00 00 00 1a 00 00 00 16 69 6e 74 65 72 | ..........inter|
|00000020| 6e 61 6c 3a 74 63 70 2f 68 61 6e 64 73 68 61 6b |nal:tcp/handshak|
|00000030| 65 00 04 a3 8e b7 41                            |e.....A         |
+--------+-------------------------------------------------+----------------+

The a3 8e b7 41 at the end is OpenSearch Vint type, so is read in little-endian order 7 bits at a time.  After stripping the mask bit, it's 0x2DC723 or 3000099.  That's the version of OpenSearch sending the request.

As an extension we are not supposed to care about compatibility, and since the transport layer hasn't changed, we don't have to.
So we can send back the same version (which we tried to do) as long as we distinguish between the two types.
The bug here is that we were sending back the minimum compatible version in both fields.  This happened to work on 3.x because the minimum compatible version being sent was the lastest 2.x version (2.10.0) in this case so the extension was responding "Hey, I'm running version 2.10.0 and that's my minimum compatible!"   Except when we connect from a 2.x cluster, the min compat is (ES) 7.9 and we're reporting that as our minimum compatible (OK) and our current version (not OK, as OpenSearch 2.x is only compatible with the latest (7.10) previous minor version.
TLDR: the PR fix as it is, is wrong.

The version argument to OutboundMessageRequest should be the min compat version (which in the current code is ES 7.9 and it's ok to leave it like that)
The message argument to OutboundMessageRequest is a TransportHandshakerHandshakeRequest which should contain the current version.

So the only change needed is
            TransportHandshakerHandshakeResponse(Version(Version.CURRENT)),

and I'll build in some more tests and docs this weekend.

@dbwiddis 👨🎤 thanks for fixing this


Added option no_dup to WrHierGO.

Added option no_dup to WrHierGO. Setting this to True prints the GO hierarchy from a given root as a flat list, i.e. with no duplications of any term. To test the functionality of this option, there is a new test - write_hier_nodups - in test_write_hier.py.

I'd note that the failure of tests is not related to your fixes.
It seems that many URLs (e.g. link to go-basic.obo) are now moved and broke the tests that tried to download first. I'll see if there is a fix.


Can't be imported from CommonJS and/or instructions not clear?

This is a really neat idea! However, my first attempt at forking a package and republishing it (by following the instructions in the README.md) resulted in the following error when I tried to run my CJS project using the package I just forked:
/node_modules/@vallerance/globby/index.js:1
import fs from 'node:fs';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1031:15)
    at Module._compile (node:internal/modules/cjs/loader:1065:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.@vallerance/globby (/home/joshua/WebDev/projects/no-code/dist/packages/tsc-compilers/main.js:606:18)
    at __webpack_require__ (/home/joshua/WebDev/projects/no-code/dist/packages/tsc-compilers/main.js:672:41)

This was because index.js had ESM style code.
I figured out I could solve this by doing the following for each forked package:
cd package/
cp ../transpiled ./

This replaced the ESM style code with CJS style code. From there, I could simply increment the version and republish. This resolved the error I was getting from my project and it ran fine with the forked packages.
I'm not sure if this is a bug in this project somewhere, or if maybe the instructions weren't clear (or maybe missing a step).

Opps! I'm sure it's a bug here in commonify due to the node: prefix. As said in the readme this mostly an experiement and I didn't test it extensively on a lot of packages. I don't plan on working much on it, but if you find a solution I'm happy to merge a PR!


feat: support the syslog notification

Configuration
Support the local file log and syslog .
Note: syslog doesn't support the Windows platform.
notify:
  log:
    - name: log file # local log file
      file: /var/log/easeprobe.log

    - name: Remote syslog # syslog ((!!!
The diff coverage is 77.27%.

@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
+ Coverage   91.58%   91.63%   +0.04%
==========================================
  Files          43       41       -2
  Lines        2805     2809       +4
==========================================
+ Hits         2569     2574       +5
- Misses        167      168       +1
+ Partials       69       67       -2

Impacted Files
Coverage Δ

report/types.go
76.92% <ø> (ø)

report/result.go
92.85% <16.66%> (-2.63%)
:arrow_down:

report/sla.go
94.44% <100.00%> (+0.30%)
:arrow_up:

daemon/daemon_unix.go

daemon/daemon_windows.go

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 23b27bb...4912320. Read the comment docs.

finally, passed the unit test... 🥳

Does this also include the logging of the start up messages or just probe output?

LGTM


Comet showing no data output / stuck on processing?

CodeCarbon version: 2.1.4
Python version: Python 3.10.6
Operating System: MacOS 12.6

Description
Describe what you were trying to get done.
Run the mnist-comet.py example from the readme in Comet
Tell us what happened, what went wrong, and what you expected to happen.
What I Did

Add Comet API key
In the [mnist-comet.py](https://github.com/mlco2/codecarbon/blob/master/examples/mnist-comet.py) example file:
replace experiment = Experiment()
With
experiment = Experiment(api_key="[MY_API_KEY]")
and then run the example:
python3 examples/mnist-comet.py
Added the emissions tracker Codecarbon Footprint panel in Comet
Saved the view.

Code is running but the panel shows no meaningful data.

Stopping the experiment from the command line ends at "Processing 100%" and the panel is now blank:

This is the console output when I start training:
022-10-07 15:53:18.842331: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
[codecarbon INFO @ 15:53:24] [setup] RAM Tracking...
[codecarbon INFO @ 15:53:24] [setup] GPU Tracking...
[codecarbon INFO @ 15:53:24] No GPU found.
[codecarbon INFO @ 15:53:24] [setup] CPU Tracking...
[codecarbon INFO @ 15:53:24] Tracking Intel CPU via Power Gadget
[codecarbon INFO @ 15:53:25] >>> Tracker's metadata:
[codecarbon INFO @ 15:53:25]   Platform system: macOS-12.6-x86_64-i386-64bit
[codecarbon INFO @ 15:53:25]   Python version: 3.10.6
[codecarbon INFO @ 15:53:25]   Available RAM : 32.000 GB
[codecarbon INFO @ 15:53:25]   CPU count: 8
[codecarbon INFO @ 15:53:25]   CPU model: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
[codecarbon INFO @ 15:53:25]   GPU count: None
[codecarbon INFO @ 15:53:25]   GPU model: None
COMET INFO: Couldn't find a Git repository in '/Users/mheavers/Documents/Prototypes/Environment/code carbon' nor in any parent directory. You can override where Comet is looking for a Git Patch by setting the configuration `COMET_GIT_DIRECTORY`
COMET INFO: Experiment is live on comet.com https://www.comet.com/heaversm/general/be01805cf04a47fd98aa44a2e2b548db

2022-10-07 15:53:29.628779: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
COMET INFO: Ignoring automatic log_parameter('verbose') because 'keras:verbose' is in COMET_LOGGING_PARAMETERS_IGNORE

@Lothiraldan

@Lothiraldan do you have an idea on this issue with CodeCarbon in Comet ?

Closing as we have no answer from Comet.


ban appeal

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Username:
Server name (all applicable):
Logs:
Where needed, please find your logs with the method down below. Make sure to include the file, or better yet, use a site like https://pastebin.com/ to add it to the ticket without copy pasting all the contents of the file.
For the Minecraft Launcher : C:\Users\USER\AppData\Roaming.minecraft\logs
For the Technic Launcher: C:\Users\USER\AppData\Roaming.technic\modpacks\pixelmon-reforged\logs
For the ATLauncher: C:\Users\USER\AppData\Roaming\ATLauncher\Instances\PixelmonCraft\logs
For the Twitch Launcher: C:\Users\USER\Documents\Curse\Minecraft\Instances\PACK\logs
Additional context
Add any other context about the problem here.

oops am i able to get unbanned my username is MintyKN it was MintyAL

Hello! We do not do appeals on the tracker anymore. https://forms.gle/DEztQ4nqAYJcYK6X8 click this link and fill out the appeal


Bump version to v0.4.0

Ah, permissions issue I guess? I'll fix your permissions for future releases.

I ran the release script but I couldn't do it from main (maybe permissions)? It's not clear whether to do it from main or a branch

I ran the release script but I couldn't do it from main (maybe permissions)? It's not clear whether to do it from main or a branch

You should do it from main. I fixed your permissions so next time it should work for you.


[BUG] Polish characters in custom font error.

Describe the bug
Bug exist when I want to use a custom font on project.
I have a problem with New Atten from Typekit but I tested that bug with Potta One from Google Fonts.
Font is attached to the project correctly but polish diacritic marks not working correctly.
I built project with yarn dev and yarn build too and the result is the same.
Steps

Choose font e.g. from google fonts which include polish characters ęółśćź
Attach to project on nuxt.config.js file
Build project

Additional context

font for testing -> Potta One
font for testing -> New Atten
System - Ubuntu 20.04.2 LTS
shopware-pwa v. 0.6.1
storefront-ui v. 0.7.18

added link to nux.config.js
    link: [       { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Potta+One&display=swap'}     ]

Update from SFUI team: there was a new nuxt project created without SFUI and added link in nuxt config to font that was used for tests - Potta One. The result is below

Next, Potta One font was changed to another google font Akaya Telivigala (also with Polish characters). And the result is below:

Both fonts are displayed properly (with Polish characters) on google fonts website


fix(api): stacktrace in an api error

Fix #3087

Beautiful(ish? 😅)

Wow, that turned our really well. :D


NeonController/NeonControllerBase should log unhandled exceptions

These classes include logging methods that log to the ambient Neon logger but we don't currently log anything for uncaught and unhandled exceptions.  Perhaps we should be doing this within WebHelper.AddNeon()
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-3.1

Perhaps exception filters are the answer:
https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/filters?view=aspnetcore-3.1#exception-filters

We need to implement the #904 changes first.

DONE for v2.2.0


import error in async_benchmark.py

hi,
the async_benchmark.py script isnt working anymore. im thinking its because the function name show_result() changed to show_result_pyplot() in mmdet.apis.inference.

Hi @frnhfr ,
Thanks for your report, would you like to create a PR to fix that?

Fixed in https://github.com/open-mmlab/mmdetection/pull/4367

Fixed in https://github.com/open-mmlab/mmdetection/pull/4367


S3 Storage Configuration Changes Between DTR 2.2 and 2.3

File: datacenter/dtr/2.3/guides/release-notes.md, CC @joaofnfernandes
Customer, PrismHR, upgraded from DTR 2.2.x to 2.3.x and could no longer push images.  After troubleshooting it was identified that there are additional configuration steps required for DTR 2.3 that were not required in DTR 2.2.  Customer has requested that we add a note in the release notes for DTR 2.3 to identify this change.
DTR 2.3 additional configuration steps:
Configure your clients
If you’re using a TLS certificate in your storage backend that’s not globally trusted, you’ll have to configure all Docker Engines that push or pull from DTR to trust that certificate. When you push or pull an image DTR redirects the requests to the storage backend, so if clients don’t trust the TLS certificates of both DTR and the storage backend, they won’t be able to push or pull images. Learn how to configure the Docker client.
And if you’ve configured DTR to skip TLS verification, you also need to configure all Docker Engines that push or pull from DTR to skip TLS verification. You do this by adding DTR to the list of insecure registries when starting Docker.

@caervs would you know about these DTR 2.3 steps?

Yes. DTR has the ability to redirect engines to the storage backend for pulls. I'd have to look into it to confirm if this was introduced in 2.3. The instructions specified make sense. You can also disable redirects in DTR but at the cost of potentially lower performance.

Closing this ticket due to its age, and the impending refactor. If you think this is in error, feel free to reopen. Thanks!