Concerns about excessive runtime

In the paper it shows "The overall model design is largely motivated by efficiency. Given a precomputed image embedding, the prompt encoder and mask decoder run in a web browser, on CPU, in ∼ 50ms. This runtime performance enables seamless, real-time interactive prompting of our model."
But while testing the script "automatic_mask_generator_example" and the checkpoint "sam_vit_b_01ec64.pth" with gpu inference, it takes about 1.65s on average. Would it be possible to make the inference pipeline to take only 50ms?
mask_generator = SamAutomaticMaskGenerator(sam)

import time

total_time = 0.0
for i in range(10):
    start = time.time()
    masks = mask_generator.generate(image)
    total_time += (time.time() - start)
print("infer time: {}".format(total_time * 0.1))

This is our official implementation of how to run mask prediction using the onnx model with multithreading in the browser and the precomputed image embedding. This should have ~50ms latency.  https://github.com/facebookresearch/segment-anything/tree/main/demo
Please see the README in the demo folder for more details.

Yes, the problem is with the embedding.  On my 3080 Ti, it takes ~1.5 seconds to compute an embedding for a 640x480 image.   In the FAQ on the segment anything site, they say the embedding should take 0.15 seconds on A100 (suggesting an A100 does inference 10X faster than a 3080).
This isn't called out super-clearly in the paper, but they do mention a few times that the embedding encoder is "heavyweight".  It appears it could be replaced with a "cheaper" encoder that outputs a CxWxH embedding, but I assume you'd have to retrain the model and the resulting performance might be a lot worse.  Personally, i wish the embedding time was more explicitly called out in the paper.

I followed that web demo (https://github.com/facebookresearch/segment-anything/tree/main/demo) and still cannot get close to 50 ms. Running the onnx model consistently takes 90 and 100 ms. I timed it with the following to isolate just model inference latency:
console.time("run model")
const results = await model.run(feeds);
console.timeEnd("run model")

I'm using the quantized model, and I can see that onnx is using ort-wasm-simd-threaded.wasm which I believe verifies that I'm using SharedArrayBuffers.
Is the demo missing something that would speed it up to 50 ms?

hi, we have proposed a method for rapid 'segment anything', using just 2% of the SA-1B dataset. It achieves precision comparable to SAM in edge detection (AP, .794 vs .793) and proposal generation tasks (mask AR@1000, 49.7 vs 51.8. E32). Additionally, our model is 50 times faster than SAM-H E32. The model is very simple, primarily adopting the yolov8seg structure. We welcome everyone to try it out, github: https://github.com/CASIA-IVA-Lab/FastSAM, arxiv: https://arxiv.org/pdf/2306.12156.pdf


QA Testing: Write 2 tests for 2 pages that don't have tests

I am waiting for my pull requests to merge so I can move this issue to completed.


fix: replace inline python with js action

Tested by changing .trunk-internal to point to this branch, resulting in this successful run, as well as with the repo tests on this PR.

can we use pnpm here?

The z-shell repo tests are failing due to linter failures - stylelint is exiting with code -11 (segfault) with no output in stdout or stderr, and I don't know why or how to debug that.


Suggestion: Preview webpages within a codiad tab

Is there a possibility for someone to create a plugin that facilitates the ability to preview webpages in tabs as they are being worked on - possibly through a frame that automatically refreshes when the source is saved?
As someone who uses Codiad in full-screen mode often it would be a big help.

that is currently not possible without a hugh rewrite of codiad's core components

You don't necessarily need a plugin in Codiad to do this; instead either a browser plugin or toolchain component that facilitates live reload should suffice.

Okay, thanks for the responses.


OTAR015 - CRISPR data: Define how the data should be included in the platform

The options for inclusion of the CRISPR data from OTAR015 currently are:

Create a new datatype.
Add it as a new data source to an existing data type.
Add it to Affected Pathways which will be changed to Pathways & Systems Biology soon.
Other?

We need to think about the use cases and implications (changes to association and evidence pages for example) of each option.
Some relevant information can also be found in this ticket: https://github.com/opentargets/platform/issues/78
Use cases

Take my thoughts with a grain of salt ...
But would the best option be 3 - adding it to the pathways and systems bio data? Reason being that if the underlying benefit of the data is showing if a particular gene is essential in a cancer cell, its sort of like saying "this gene is involved in a cancer-causing pathway"?
Alternatively, because we have other CRISPR projects ongoing, is now the time to open up a new datatype to accommodate future growth?
Also, I think we need to consider adding summary data to the target profile page as their website will have a target page that we can link to. I'll follow up with Miguel P. to see if I can get updated screenshots.

We also need to think of this in the light of other potential CRISPR data we will get, and whether we want to give that sort of data it's own data type. The Affected pathways type is an underused slot, so putting more data into that makes sense, but we need to get the naming right.

Worth taking into account that some users may not expand the data types to select individual data sources. So some users may miss out finding this new and cool CRISPR data.
One comment from user:

make clear the CRISPR data comes from Open Targets (as they will assume it's better quality than other data sources).

Potential UX design sessions with Talisman Therapeutics staff on how to display CRISPR data in the Platform:
Martin Crossley and Tom Campbell

Updated screenshots for the CRISPR portal have been provided by Miguel P. and are available on the [OT Platform Team Google Drive].(https://drive.google.com/drive/folders/1OJqYKMYnI6tODMWjBkQslaUAEwQ1XEDP)

It was decided to move this data into the Pathways & SysBio data type. Progress can be followed here: #163.


[Request test] Profile edit option and multilingual option

Uploaded on February 3, 2023 at 01:27 (GMT+9)
FallGuysStats 1.133 Multilingual Ver.zip

While using the FallGuysStats program well, I modified things that I personally wish I needed.
Once first,
While directly using the "Create / edit profiles" item uploaded in pull requests, various bug fixes and features were added.

Added option to display profile in overlay in settings.

Added various shortcut keys while the overlay is in focus.
2.1 'P' key : Toggle profiles in sequence.
2.2 Number 1~9 keys: Select profiles from 1 to 9.
2.3 Shift + Mouse Wheel: Toggles up and down the profile.
2.4 Shift + up and down arrow keys : Toggle the profile up and down.

Added option to display user count per console.

Added multilingual options. There may be awkward parts because Japanese was helped by Google Translate. (Currently available in English, Korean and Japanese)

Fixed option to auto-launch Fall Guys client in FallGuysStats. This requires registering the Epic Games Fall Guys shortcut file in Settings.

After testing enough, I'm going to do a pull request.
Feedback is appreciated.

+ Jan 31, 2023 23:25 (GMT+9)
Fixed a bug where each round was recognized as a final in Finals Marathon mode and the win and final were counted.
The blastball mod has the same issue, but currently there is no log data for the blastball mod, so it will be fixed when the next blast ball mod returns.

+ Feb 1, 2023 03:19 (GMT+9)
Fixed finals and win count bugs for below modes.
but testing is not possible because the mode is not currently active.

Hex-a-gone Trials
Hex-a-Gravity Trials
Hex-a-thon
Blast Ball Trials

Feb 1, 2023 15:10 (GMT+9)
When running stats, if there is data from the previous show, a profile can be selected and saved.

Thanks for your contribution.
I can't download zip.
Could you please upload the zip in another way?
If you are in trouble, I can help you with the Japanese translation.
Here is list of round ids:
Hex-a-gone Trials
r1: round_floor_fall_event_only_01
r2: round_floor_fall_event_only_02
final: round_floor_fall_event_only_final
Hex-a-Gravity Trials
r1: round_floor_fall_event_only_low_grav_01
r2: round_floor_fall_event_only_low_grav_02
final: round_floor_fall_event_only_low_grav_final
Hex-a-thon
r1: round_floor_fall_event_walnut
r2: round_floor_fall_event_walnut_r2
final: round_floor_fall_event_walnut
r1: round_hexaring_event_walnut
r2: round_hexaring_event_walnut_r2
final: round_hexaring_event_walnut_final
r1: round_hexsnake_event_walnut
r2: round_hexsnake_event_walnut_r2
final: round_hexsnake_event_walnut_final
Blast Ball Trials
r1: round_blastball_arenasurvival_blast_ball_trials_01
r2: round_blastball_arenasurvival_blast_ball_trials_02
final: round_blastball_arenasurvival_blast_ball_trials_fn

FallGuysStats 1.133 Multilingual Ver.zip
@iku55 I added exception handling code for each mode with the data you provided, but testing is not possible because the mode is not currently active.

Feb 1, 2023 15:10
When running stats, if there is data from the previous show, a profile can be selected and saved.

FallGuysStats 1.133 Multilingual Ver.zip

@iku55 Do you have a list of mod ids? Below is all I have.

main_show [Solo Show]
squads_2player_template [Duos Show]
squads_4player [Squads Show]
event_only_races_any_final_template [Day at the Races Solo]
event_only_finals_v2_template [Finals Marathon]

@iku55 Isn't the last round in "Hex-a-thon" mode "round_floor_fall_event_walnut_final" instead of "round_floor_fall_event_walnut"? And for "Blast Ball Trials", is it correct that the last round is appended with "_fn"?

Sorry, Hex-a-thon is a mistake
final: round_floor_fall_event_walnut -> round_floor_fall_event_walnut_final
"_fn" in "Blast Ball Trials" is correct.
Here is Japanese translation suggestions:
--Stats--
クドス -> Kudos
勝つ -> 勝利 or 勝利数
--Level Details--
ランク -> 順位
人員 -> 人数
--Overlay--
n ラウンド -> ラウンド n
--Edit Profiles--
登録 -> 追加
--Settings--
Statsス自動更新 -> Statsを自動更新 or 自動更新
Statsを実行するときにポールガイズクライアントも一緒に実行する -> Statsを実行するときにFallGuysも一緒に実行する
Show list
Round list
Please note that there are shows/rounds that are not used.
I will send you an easy-to-understand list tomorrow or the day after tomorrow
I've been busy lately and may not be able to debug or reply right away.

@iku55 A 403 error page is exposed due to lack of access.

Please try again.
I'll send you the HTML just in case.
list.zip

@iku55 I edited and uploaded it in Japanese that you suggested.
FallGuysStats 1.133 Multilingual Ver.zip

@iku55 I am working on mapping the name of the show into Korean. Could you help me with the Japanese mapping?

Here is my advices.

@iku55 I am working on mapping the name of the show into Korean. Could you help me with the Japanese mapping? Fall Guys show name translation

I can give you the names of all the shows in Japanese and Korean, but I don't think it's a good idea to update them every time a show is added.

Japanese translation suggestions:
--Main--
フィルタリング -> フィルタ
全体 -> すべて
プロフィール -> プロファイル
プロフィール設定 -> プロファイル設定
統計を表示 -> オーバーレイ
統計を隠す -> オーバーレイ
--Settings--
*Statsがログファイルパスを見つけられない場合は、ここにポールガイズクライアントのログファイルパスを直接入力してください。 -> *Statsがログファイルパスを見つけられない場合は、ここにFallGuysクライアントのログファイルパスを直接入力してください。
Stats -> 統計
フォントの選... -> フォント選択
フォントの初... -> リセット
セーブ -> 保存
--Profile Settings--
修正 -> 名前を変更
移動する -> データを移動

In the data migrated from the old version, the number of people by platform is displayed as "0", but I think "-" or "" is better.

settings version has not changed. Should change for compatibility (22->23)

Uploaded on February 2, 2023 at 23:12 (GMT+9)
FallGuysStats 1.133 Multilingual Ver.zip
@iku55 First of all, I applied the font only to the overlay. Please check how it is.

sorry, I made some mistakes in translation.
Japanese translation suggestions:
--Main--
統計を表示 -> オーバーレイ -> オーバーレイを表示
統計を隠す -> オーバーレイ -> オーバーレイを隠す
--Overlay--
ピン -> ping

Can you tell me some popular free fonts that look good in Japanese?

I recommend Noto Sans JP because of the font used in Fall Guys.
Also, change the overlay default font back to Titan or change it for each language.

I didn't understand what exactly the settings version meant in 4.

When you change the DB, you should change the user settings version like this commit.

It is necessary to map the ID of the show in English, Korean, and Japanese.

Okay.. If there are more shows in the future, I may not be able to give you show names, but is that okay?
Shows (English)
Shows (Japanese)
Shows (Korean)
Rounds (English)
Rounds (Japanese)
Rounds (Korean)
(I deleted the data I sent on February 1st.)

@iku55 Like the last time, the 403 error page is being exposed because there is no permission.

Uploaded on February 6, 2023 at 2
FallGuysStats 1.133 Multilingual Ver.zip
2:10 (GMT+9)
As you suggested, I applied the default font for each language. And minor bug fixes.
Also, there is a grid keystroke bug in the current release version, so I commented out the code.

Here is html: html.zip

Uploaded on February 7, 2023 at 13:50 (GMT+9)
FallGuysStats 1.133 Multilingual Ver.zip
@iku55 Thanks to you, I was able to finish it. Thank you.

Why not submit this as a PR?

Just wanna say I really appreciate the work you both did here, thanks.

Hi, so I came across an issue when trying to launch the game via the tracker?

@123JLaney123 I wasn't aware of this, but is it still possible to run fallguys through steam?

@qutrits It's always been possible to run through Steam, they just removed it from the Steam store when the game went free to play. You can still play it on Steam if you owned it and it works perfectly fine.
Then someone pointed out to me the ability to launch the game through the tracker got broken after the last update. Hence why I posted the above images.

FallGuysStats.zip
@123JLaney123 I don't have the steam version, so could you get it from the link above and test it to see if it runs well with steam?

@qutrits It worked when I clicked the "Launch Fall Guys" button but when I set it to auto-launch I got this

I just tried it again and it auto-launched fine.


Add md5sum to filename for caching

Is your feature request related to a problem? Please describe.
The index.json for my blog (~2600 posts) is ~3.68 (1.38 zipped) MiB large. Would be nice to have md5sum or something similiar in the filename to be able to set caching to a high value for that file.
Describe the solution you'd like
index-.json instead of index.json

The index.json should be cached by the browser once loaded. Could you please describe it in details?

If thats the case it should be fine. I don't really know much about caching. What I know is, that I could set a very long caching time for objects that won't change anymore (a file with md5sum of its content in its name) while I can't do that on files when they tend to change on every blog post.
Sometimes I don't post anything for 1 week + and there should be no need to download the unchanged index.json every few days. Or does the browser ask somehow the server if the file was changed?
I recently changed my DokuWiki to Hugo with the docys theme and there the json file for offline search uses some hash for the filename. So I thought that could be a good idea.

Yep, it should be changed on creating or modifying any posts, since the index.json included all the pages.

As for the second case, I believe that is about client side(browser) and server side(such as Nginx) setting.

I didn't know about the hash you mentioned, would you mind providing the live site?

Not a live site. I switched to another search implementation on my new wiki because the original one from docsy theme resulted in page speed of ~54 instead of 89. I could switch back to it on wiki.natenom.com for some time if you needed it.
This is where the naming happens: https://github.com/google/docsy/blob/030c04b86b5705d24945fc4a47da1b700aec9ff3/layouts/partials/search-input.html#L7

I see, but the fingerprint is not used for improving performance or caching, since the filename's md5 hash should be differenced between the new and old index.json, the browser will always load the new one.
I think web server configuration would be a good entry point.

{{/* Use md5 as finger print hash function to shorten file name to avoid file name too long error. */ -}}
https://github.com/google/docsy/blob/030c04b86b5705d24945fc4a47da1b700aec9ff3/layouts/partials/search-input.html#L6


exportPCM Wrong method return type

I'm actually using<EMAIL_ADDRESS>with Typescript 3.8
VS Code suggest me that wavesurfer.exportPCM() is not an async function
WaveSurfer.exportPCM(length: number, accuracy: number, noWindow?: boolean | undefined, start?: number | undefined): string
But the official documentation says
exportPCM(length: number, accuracy: number, noWindow: boolean, start: number, end: number): Promise

But the official documentation says

Where did you find this, can you link it?

since 3.3.0  wavesurfer.exportPCM now accepts an optional end argument and returns
a Promise (#1728)
the doc is correct, but wavesurfer has no typings file so i think vscode do not understand the jsdoc
/**
 * Exports PCM data into a JSON array and opens in a new window.
 *
 * @param {number} length=1024 The scale in which to export the peaks
 * @param {number} accuracy=10000
 * @param {?boolean} noWindow Set to true to disable opening a new
 * window with the JSON
 * @param {number} start Start index
 * @param {number} end End index
 * @return {Promise} Promise that resolves with array of peaks
 */

since 3.3.0 wavesurfer.exportPCM now [...] returns a Promise

Closing as fixed.


Question about conflicting modsecurity_rules/modsecurity_rules_file precedence

This question is in relation to some troubles the downstream ingress-nginx project has with modsecurity: https://github.com/kubernetes/ingress-nginx/issues/8388
When conflicting modsecurity rules/settings are loaded, how is that conflict resolved? Is it always "last write wins"? Seems that's not always the case.
For example, say I have the following config:
modsecurity on;
modsecurity_rules 'SecRuleEngine On';
modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
  # modsecurity.conf includes the line: "SecRuleEngine DetectionOnly"
modsecurity_rules_file /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf;
  # Just Includes all the coreruleset rules files

If "last write wins", I would expect that modsecurity_rules 'SecRuleEngine On'; would do nothing; the subsequent line would override that and set the mode to DetectionOnly. But for me, the mode stays "On" with the above config and requests get blocked instead of just logged. However other users have reported the opposite behavior as well: https://github.com/kubernetes/ingress-nginx/pull/8021
Looking at the source code, I would expect that "last write wins" is the intended behavior: https://github.com/SpiderLabs/ModSecurity/blob/5519f6cfae45a47d8dc3ac1b084319611a9b386b/headers/modsecurity/rules_set_properties.h#L45-L48
But are there situations where "last write wins" doesn't hold?

Hi @mac-chaffee ,
I'd have to take a more in-depth look to provide a definitive answer, but a similar-sounding question arose at least once before ( https://github.com/SpiderLabs/ModSecurity-nginx/issues/183 ).
The hypothesis in that case was that using two different nginx directives (i.e. both 'modsecurity_rules' and 'modsecurity_rules_file') may result in the precedence of those directives being dominant.
Based on that earlier issue, if you were to use either 'modsecurity_rules' or 'modsecurity_rules_file' in both of those cases, that would likely give you the 'last wins' behaviour that you are expecting.

'modsecurity_rules' and 'modsecurity_rules_file' have precedence of their own outside of just the order in which they're listed in nginx.conf? Just skimming the code, it looks like those directives both just edit the same RulesSet struct:
https://github.com/SpiderLabs/ModSecurity-nginx/blob/2497e6ac654d0b117b9534aa735b757c6b11c84f/src/ngx_http_modsecurity_module.c#L310-L375
Which calls these functions:
https://github.com/SpiderLabs/ModSecurity/blob/b89c737ad3f20cccfe966631b28157f3b5d25832/src/rules_set.cc#L294-L311

Oh I do see they are changing mmcf->rules_inline vs. mmcf->rules_file, so maybe there is a difference, hmm

it will just merge.

Anything more on this?

Yes, sounds like we haven't identified exactly what should take precedence over what.
It would be good to document this somewhere because the prevailing wisdom is incorrect: that last writer always wins and they will "just merge".
In my experiments, it seems that modsecurity_rules does take precedence over modsecurity_rules_file, but as I mentioned other users have reported the opposite. So there's also the possibility there could be a bug in the code that makes the order inconsistent.
We'd need a firm answer on how rule precedence works in modsecurity-nginx before documenting anything I think.

So your issue is resolved? -- perhaps by using either of those directives both times and not mixing?

If mixing modsecurity_rules/modsecurity_rules_file is supported, then my question is still unanswered. But if you're saying mixing modsecurity_rules/modsecurity_rules_file isn't supported, I'd think we should definitely document that.
I'd be happy to contribute documentation and inform the ingress-nginx folks (they mix directives too), just not sure what to tell them.

Hi @mac-chaffee ,
I didn't say it isn't supported. I was only suggesting:

a probable reason that you were experiencing a result that surprised you and
a way to avoid that surprising result (not mixing the two)

At the moment, I cannot really devote time to investigating a more in-depth answer. I did hope, however, to help you deal with your immediate issue.

Any new info here? What's the expected behaviour with both "modsecurity_rules" and "modsecurity_rules_file" options in use, as that's what you easily end up with when using k8s ingress-nginx modsecurity features and config options..


maestral-qt: 1.1.0 -> 1.2.0

Motivation for this change
New release https://github.com/SamSchott/maestral/releases/tag/v1.2.0
The first commit is a duplicate of #98073 to make sure this branch actually works. The PR that caused this issue has been reverted in a4e50bb197f032ec447a13f56910ff035b32017f.
This PR also includes necessary dependency updates for the maestral base package, and transitively dropbox. The updated maestral package also requires a new package dbus-next.
The dbus-next package has testing disabled at the moment because I get and I'm not sure what to do about this.
running install tests
no Makefile or custom buildPhase, doing nothing
pythonCatchConflictsPhase
pythonRemoveBinBytecodePhase
pythonImportsCheckPhase
Executing pythonImportsCheckPhase
setuptoolsCheckPhase
Executing setuptoolsCheckPhase
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing dbus_next.egg-info/PKG-INFO
writing dependency_links to dbus_next.egg-info/dependency_links.txt
writing top-level names to dbus_next.egg-info/top_level.txt
reading manifest file 'dbus_next.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'dbus_next.egg-info/SOURCES.txt'
running build_ext
error: [Errno 2] No such file or directory: '/build/dbus_next-0.1.4/test/data/introspection.xml'
note: keeping build directory '/tmp/nix-build-python3.8-dbus-next-0.1.4.drv-0'
error: --- Error --- nix-daemon
builder for '/nix/store/06g2adww93xpq9957frc5pqmfd5z01y3-python3.8-dbus-next-0.1.4.drv' failed with exit code 1; last 10 log lines:
  WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
  running egg_info
  writing dbus_next.egg-info/PKG-INFO
  writing dependency_links to dbus_next.egg-info/dependency_links.txt
  writing top-level names to dbus_next.egg-info/top_level.txt
  reading manifest file 'dbus_next.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'dbus_next.egg-info/SOURCES.txt'
  running build_ext
  error: [Errno 2] No such file or directory: '/build/dbus_next-0.1.4/test/data/introspection.xml'
error: --- Error -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-build
error: --- Error --- nix-daemon
1 dependencies of derivation '/nix/store/8p39zvlwmqm8kh6vinxzxii001pyisbg-maestral-qt-1.2.0.drv' failed to build

Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@jonringer Done


Auto sizing TextBox does not behave correctly after pasting large text

Currently, if you have an auto sizing TextBox without a width defined, when you paste text larger than the TextBox width the cursor and pasted text is not position correctly.
The ideal scenario is the TextBox resizes to fit all the text, with the caret positioned at the far right side of the TextBox. However, currently Avalonia will resize the TextBox to almost fit the text, and it will position the caret to the previous max width instead of the new max width. The latter is especially problematic as it tends to disorient users as they don't quite understand what's going on since they can only see a little bit of the text.
Testing this same thing out in WPF, it matches the ideal behavior with the cursor positioned at the far right of the TextBox and everything fitting exactly.

Note: We have to test this against the new TextLayout that is available soon

Fixed by #3075


Feature/infrastructure task doctrine mapping

Q
A

Bug fix?
no

New feature?
yes

BC breaks?
no

Deprecations?
no

Tests pass?
yes

Fixed tickets
#166

License
MIT

This PR needs to resolve the PR #163 because Task needs the MemberId

@benatespina Requires rebase


Added support for different address families to mbedtls_net_bind()

And for optionally allowing IPv4 connections on IPv6 sockets.
This makes it possible to specify which address family you want to use, so things like servers don't bind to an IPv6 interface when you're expecting connections on IPv4, or vice versa. It also allows, if enabled, servers bound to IPv6 interfaces to accept connections from both IPv4 and IPv6.

Hi! Thanks for the contribution!
Looking at it, is it really necessary to add a new compile time option of MBEDTLS_AF6_ALLOW_AF4? We really already have too many compile time options, and I'm not sure this one is necessary. It only changes platform code after all, so will only be executed on POSIX platforms. Is there another way of doing this?

In addition, unfortunately our policy is to not accept contributions, without a Contributor’s Licence Agreement (CLA) signed or authorised by yourself or your employer.
If this is a personal contribution, the easiest way to do this is if you create an mbed account and accept this click through agreement. Alternatively, you can find a slightly different agreement to sign here, which can be signed and returned to us, and is applicable if you don't want to create an mbed account or alternatively if this is a corporate contribution.
Thanks for your understanding and again, thanks for the contribution!

I have an mbedtls account, and have accepted the agreement, though I'm not sure how to link it with Github? My username is Cl9.
And no, there doesn't need to be a compile option, it depends on how much customizability you want. I imagine that it wont affect most people at all, but some people wont want it binding to both, it's up to you.

Thanks! I found the account.


Changes necessary for building samples on Windows.

A minor modification to allow samples to build on Windows.

Zephyr not define DTC_OVERLAY_FILE in build system.
So, we have no way to select overlay file to load in build system at this time.
(This PR may became problem when this repository integrate to main line.)
It must pass with -DDTC_OVERLAY_FILE externally as option.
For example, west build ... -- -DDTC_OVERLAY_FILE=[overlay file path].
Is it not worked correctly?

Zephyr not define DTC_OVERLAY_FILE in build system.

@soburi , yes this was indeed one of the challenges I faced in the making of this project. You can refer to my blog here to read more on how I solved this issue.
But yes @ddeletic  is right here, we can make use of DTC_OVERLAY_FILE in build time

@ddeletic @DhruvaG2000
Currently, this module is not integrated into the mainline, so I think that's fine for now. However, if it is integrated into the mainline, it will be necessary to reconsider at some point.

@soburi , please excuse me but I don't still understand your exact concern?
Is the way it is currently implemented non ideal? Kindly help me understand the potential issues it could cause

@DhruvaG2000
Simply because it except to this variable set from the command line.
If the command line gives the DTC_OVERLAY_FILE option, it will not add but overwrite the value set in CMakeLists.txt. It may cause incorrect behavior.
At the moment, Only some files that are processed in the cmake/modules/configuration_files.cmake can automatically load the overlay.
I think we need to rethink cmake extensions when integrating.
(I think the way of the handling shield will be helpful.)

Ah yes got it, when someone wants to build using west build passing another
overlay other than the arduino dt overlay.. it will cause issues likely.
Maybe something like a += or something may help?
Let's think about it.
On Mon, 7 Aug, 2023, 06:05 Tokita, Hiroshi, @.***>
wrote:

@DhruvaG2000 https://github.com/DhruvaG2000
Simply because it except to this variable set from the command line.
If the command line gives the DTC_OVERLAY_FILE option, it will not add but
overwrite the value set in CMakeLists.txt. It may cause incorrect behavior.
At the moment, Only some files that are processed in the
cmake/modules/configuration_files.cmake can automatically load the
overlay.
I think we need to rethink cmake extensions when integrating.
(I think the way of the handling shield will be helpful.)
—
Reply to this email directly, view it on GitHub
https://github.com/zephyrproject-rtos/gsoc-2022-arduino-core/pull/74#issuecomment-1667024962,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJ2S3QACDL6KDWMXJOWOVKDXUAZ6JANCNFSM6AAAAAA3EIVKYU
.
You are receiving this because you were mentioned.Message ID:
@.***>

@ddeletic
This way violates Zephyr's expected use of DTC_OVERLAY_FILE.
So we should not show a bad example in examples.
However, this repository has not yet merged, so we don't need to fix it now.
In this case, documentation is a better way to help beginners.
If you want to solve it implicitly, I think proposing a comprehensive solution to handle overlay files is better.
(I think it will probably be a set of specs and a framework written in cmake. It is a bit hard work.)


Move user guide into user guide page

Move the draft UG content into the User Guide page in your repository. Update the content/structure/formatting as necessary, to match the final form of the UG. If a feature is not implemented in the current version, you can either omit it from the UG or mark it as 'Coming soon' (e.g., ## Archiving contacts [coming soon]).
Remember to omit nitty-gritty details in the previous 'internal' UG Draft if they are not appropriate for the actual UG.
As mentioned before, while it is more convenient for one person to update the entire UG, we recommend that each person updates their own part of the docs so that we can easily track the contribution of each member using RepoSense.

Completion:
Kenvyn

[ ] Create entry
[ ] Help command
[ ] Known issues

Matt

[x] Delete entry
[x] Quick start

Bing heng

[ ] Edit entry
[ ] Exit command
[ ] FAQ

Xihua

[ ] List command
[ ] Command summary


Upgrade embedded Docker client

I received an email from Docker stating:

This is a second reminder about the upcoming deprecation for support of clients versioned 1.5 earlier in Docker Hub.

On December 7, 2015, pulls via clients 1.5 and earlier will be disabled. Only version 1.6 or later will be supported

Weave bundles Docker client 1.3, so this must be upgraded.

dup of #1683


Æ!Å Unknown jailbreak. Aborting.

Platform: Electra Latest (With all updates and dev tools from the repo)
The issue I am getting is the following
$ root# bash bfinject -P BAFlights -L decrypt
Æ!Å Unknown jailbreak. Aborting.

Fixed in https://github.com/BishopFox/bfinject/pull/18


Created a threaded part 1 program that doubles FPS

Whenever I use OpenCV, I employ a threading type approach. I just applied it here and saw a double in frame rate performance. It is really simple and shouldn't be that hard if you still want to up the frame rate.

Great, I will dig into this one shortly, thanks very much! Hope this works. Need all the FPS we can get. I was messing as well with using pywin32 for even faster screenshots too. it's waaaaaaaaaay faster, but I can't seem to figure out how to get it to a numpy array shaped for openCV without too much hacking around that ruins the FPS.

So I implemented this into the main.py like so:
`import numpy as np
from PIL import ImageGrab
import cv2
import time
import pyautogui
from directkeys import PressKey,ReleaseKey, W, A, S, D
from draw_lanes import draw_lanes
from getFrame import getFrameThread
def roi(img, vertices):
#blank mask:
mask = np.zeros_like(img)

#filling pixels inside the polygon defined by "vertices" with the fill color
cv2.fillPoly(mask, vertices, 255)

#returning the image only where mask pixels are nonzero
masked = cv2.bitwise_and(img, mask)
return masked

def process_img(image):
original_image = image
# convert to gray
processed_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# edge detection
processed_img =  cv2.Canny(processed_img, threshold1 = 200, threshold2=300)
processed_img = cv2.GaussianBlur(processed_img,(5,5),0)

vertices = np.array([[10,500],[10,300],[300,200],[500,200],[800,300],[800,500],
                     ], np.int32)

processed_img = roi(processed_img, [vertices])

# more info: http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_imgproc/py_houghlines/py_houghlines.html
#                                     rho   theta   thresh  min length, max gap:
lines = cv2.HoughLinesP(processed_img, 1, np.pi/180, 180,      20,       15)
m1 = 0
m2 = 0
try:
    l1, l2, m1,m2 = draw_lanes(original_image,lines)
    cv2.line(original_image, (l1[0], l1[1]), (l1[2], l1[3]), [0,255,0], 30)
    cv2.line(original_image, (l2[0], l2[1]), (l2[2], l2[3]), [0,255,0], 30)
except Exception as e:
    print(str(e))
    pass
try:
    for coords in lines:
        coords = coords[0]
        try:
            cv2.line(processed_img, (coords[0], coords[1]), (coords[2], coords[3]), [255,0,0], 3)

        except Exception as e:
            print(str(e))
except Exception as e:
    pass

return processed_img,original_image, m1, m2

def straight():
PressKey(W)
ReleaseKey(A)
ReleaseKey(D)
def left():
PressKey(A)
ReleaseKey(W)
ReleaseKey(D)
ReleaseKey(A)
def right():
PressKey(D)
ReleaseKey(A)
ReleaseKey(W)
ReleaseKey(D)
def slow_ya_roll():
ReleaseKey(W)
ReleaseKey(A)
ReleaseKey(D)
for i in list(range(4))[::-1]:
print(i+1)
time.sleep(1)
frameThread = getFrameThread().start()
last_time = time.time()
counter = 0
last_time = time.time()
while True:
screen = np.array(frameThread.returnFrame())
print('Frame took {} seconds'.format(time.time()-last_time))
last_time = time.time()
new_screen,original_image, m1, m2 = process_img(screen)
#cv2.imshow('window', new_screen)
cv2.imshow('window2',cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB))
if m1 < 0 and m2 < 0:
    right()
elif m1 > 0  and m2 > 0:
    left()
else:
    straight()

#cv2.imshow('window',cv2.cvtColor(screen, cv2.COLOR_BGR2RGB))
if cv2.waitKey(25) & 0xFF == ord('q'):
    cv2.destroyAllWindows()
    break`

When things are going smoothly, it does indeed appear to double FPS, but, when errors get hit, it seems to wreak serious havoc. That's not really YOUR fault, it's a poor code base to start, but, currently, implementing this to the existing code causes it to perform worse, despite general FPS being better. For some reason, when there's an error, FPS suddenly plummets to 1 or 2 FPS and then the agent doesn't do anything.

Hmm not sure why the code embed decided to be ugly.

Huh. Since Github doesn't seem to be showing code really great, could you pastebin it? I really am curious about this issue.

https://pastebin.com/ZqV8VQDw

Code embedding works fine in GitHub. You have to enclose your code inside a   ```python and ``` fence. (https://guides.github.com/features/mastering-markdown/)

import numpy as np
from PIL import ImageGrab
import cv2
import time
import pyautogui
from directkeys import PressKey,ReleaseKey, W, A, S, D
from draw_lanes import draw_lanes
from getFrame import getFrameThread

def roi(img, vertices):

    #blank mask:
    mask = np.zeros_like(img)

    #filling pixels inside the polygon defined by "vertices" with the fill color
    cv2.fillPoly(mask, vertices, 255)

    #returning the image only where mask pixels are nonzero
    masked = cv2.bitwise_and(img, mask)
    return masked
def process_img(image):
    original_image = image
    # convert to gray
    processed_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    # edge detection
    processed_img = cv2.Canny(processed_img, threshold1 = 200, threshold2=300)

    processed_img = cv2.GaussianBlur(processed_img,(5,5),0)

    vertices = np.array([[10,500],[10,300],[300,200],[500,200],[800,300],[800,500],
                     ], np.int32)

    processed_img = roi(processed_img, [vertices])

    # more info: http://docs.opencv.org/3.0-    beta/doc/py_tutorials/py_imgproc/py_houghlines/py_houghlines.html
    #                                     rho   theta   thresh  min length, max gap:
    lines = cv2.HoughLinesP(processed_img, 1, np.pi/180, 180,      20,       15)
    m1 = 0
    m2 = 0
    try:
        l1, l2, m1,m2 = draw_lanes(original_image,lines)
        cv2.line(original_image, (l1[0], l1[1]), (l1[2], l1[3]), [0,255,0], 30)
        cv2.line(original_image, (l2[0], l2[1]), (l2[2], l2[3]), [0,255,0], 30)
    except Exception as e:
        print(str(e))
        pass
    try:
        for coords in lines:
            coords = coords[0]
            try:
                cv2.line(processed_img, (coords[0], coords[1]), (coords[2], coords[3]), [255,0,0], 3)

            except Exception as e:
                print(str(e))
    except Exception as e:
        pass

    return processed_img,original_image, m1, m2
def straight():
    PressKey(W)
    ReleaseKey(A)
    ReleaseKey(D)

def left():
    PressKey(A)
    ReleaseKey(W)
    ReleaseKey(D)
    ReleaseKey(A)

def right():
    PressKey(D)
    ReleaseKey(A)
    ReleaseKey(W)
    ReleaseKey(D)

def slow_ya_roll():
    ReleaseKey(W)
    ReleaseKey(A)
    ReleaseKey(D)

for i in list(range(4))[::-1]:
    print(i+1)
    time.sleep(1)

frameThread = getFrameThread().start()
last_time = time.time()
counter = 0

last_time = time.time()
while True:
    screen = np.array(frameThread.returnFrame())
    print('Frame took {} seconds'.format(time.time()-last_time))
    last_time = time.time()
    new_screen,original_image, m1, m2 = process_img(screen)
    #cv2.imshow('window', new_screen)
    cv2.imshow('window2',cv2.cvtColor(original_image, cv2.COLOR_BGR2RGB))

    if m1 < 0 and m2 < 0:
        right()
    elif m1 > 0  and m2 > 0:
        left()
    else:
        straight()

    #cv2.imshow('window',cv2.cvtColor(screen, cv2.COLOR_BGR2RGB))
    if cv2.waitKey(25) & 0xFF == ord('q'):
        cv2.destroyAllWindows()
        break`


Bigger test set

We need a bigger test set. We currently have 4 nodes (of 2 typed) and 3 edges (of 2 types).
The bigger test set should contain more different nodes/edges, especially with more property-types, e.g. properties with types Date, List of Strings, List of numbers, ...
With the current test set it's also not possible to create a 100% branch coverage since we only have the property types string and number.

/CC @PianoRollRepresentation

I created a bigger test set. The problem now is that most of the e2e-tests are fitted to the smaller test sets and fail for the bigger one. Maybe it is a good idea that it would be possible to choose the testing-dump in the e2e-test. That would be possible by manipulating the neo4jService-config database-name. But I have no idea how to change the name of a neo4j-database. Currently all dbms have the name 'neo4j'

Since we run every test in one run, the test itself must decide on the database name. However, this will not happen since this would mean that the test must restart the backend server with different env variables.
Better is starting multiple backends on different ports where each instance connects to a different db. Each test might then redirect the original requests to other ports (e.g. redirect http://localhost:8080/api/search/all to http://localhost:8081/api/search/all). This is simple, but requires a change in the CI.
Let's discuss that on the dev meeting on monday.


cmake: Fix 'make' generator targets

Remove 'RxCpp' library target when it's used outside of
Visual Studio. This was supposed to be a virtual target,
not an actual one that builds libRxCpp.so.
The build never worked because it was missing setting the
compiler/linker flags from shared.cmake
Resolves: #477

Maybe flake? Didn't see this CI failure on other PRs.
E: Unable to locate package g++-4.9
E: Couldn't find any package by glob 'g++-4.9'
E: Couldn't find any package by regex 'g++-4.9'

Yes, that was a flakey build. Thanks!


Stabilize 2021 edition

This stabilizes the 2021 edition.
Closes #9781

r? @alexcrichton
(rust-highfive has picked a reviewer for you, use r? to override)

Opening a draft in preparation for when the 2021 edition is stabilized. This cannot be merged until the rustc side (https://github.com/rust-lang/rust/pull/88100) hits nightly.

:umbrella: The latest upstream changes (presumably #9803) made this pull request unmergeable. Please resolve the merge conflicts.

:umbrella: The latest upstream changes (presumably #9831) made this pull request unmergeable. Please resolve the merge conflicts.

https://github.com/rust-lang/rust/pull/88100 is merged, but due to some bors failures, it was only merged a few hours after nightly was released. So I guess we'll have to wait for the next nightly, in a bit more than 15 hours from now.

If you rebase this on the master branch again, we could already bump the cargo submodule to this branch in the rust repository, if we don't want to wait. I think the tests will pass fine in that repository, without waiting for nightly, right?

@alexcrichton This should be ready to go.

I think the tests will pass fine in that repository, without waiting for nightly, right?

I would prefer to avoid bypassing the regular route here.  Thanks, though!  I'll take care of getting things merged tomorrow.

@bors: r+

:pushpin: Commit 68753e2874c69f6e3b3a1347b5469dcda6c10384 has been approved by alexcrichton

:hourglass: Testing commit 68753e2874c69f6e3b3a1347b5469dcda6c10384 with merge ac58670849ea877a3357a182a290b3b66138ad70...

:sunny: Test successful - checks-actions
Approved by: alexcrichton
Pushing ac58670849ea877a3357a182a290b3b66138ad70 to master...


How to scale ReproServer?

Originally opened 2019-11-14 22:36 EST by @remram44
Not a problem for now, but worth thinking about.
Running multiple web pods wouldn't work because specific ones would know about specific builds/runs.
Changing VM states to not trigger multiple builds might be good but still cause issues. Plus container restart would have all reproservers watching all running pods.
I think the best option is probably to keep one reproserver per cluster, and just run multiple clusters. This is also an opportunity for federation, e.g. there could be "nyu reproserver" and "umass reproserver" and links would point to one specific server and everything would work. It could also be used to have institutional instances providing better quotas to their own employees.

Originally posted by @nust
Have you considered building ReproServer on top of Binder? I guess you're much more flexible now in what infrastructure you can provide, but the federation aspect would come with the BinderHubs.

Originally posted by @remram44
I think running Binder on top of ReproServer might make more sense? But really they are very similar systems.


VsCode tasks events do not fire

VSCode Version: 1.24.1
OS Version: Windows 10

Steps to Reproduce:

I am writing an extension for VsCode. I am trying to get notifications on tasks start and end (specifically the "Build" task). I wrote the following in the startup code of my extension:
tasks.onDidStartTask.apply(function(event: any) {   console.log(event); });
The code for hooking the apply is called, but the callback is never called.

I tried with tasks.json version "0.1", and with version "2.0", to no avail

This works for me using a simple example like this:
'use strict';
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';

// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {

    vscode.tasks.onDidStartTask((event) => {
        console.log(`Task started ${event.execution.task.name}`);
    })

}

// this method is called when your extension is deactivated
export function deactivate() {
}

and in the package.json having
    "activationEvents": [
        "*"
    ]


[v1.18]: Add CaaSP kube-proxy container image

It will be squashed in https://github.com/SUSE/caasp-container-images/pull/66


The dataset

May I ask if it is possible to release the dataset?  Thank you very much! Looking forward to seeing them.

I have searched for the PICAI dataset, but it has expired and I'm unable to download the dataset.

Also, I downloaded it according to your instructions, but it failed to download.
ERROR: Could not find a version that satisfies the requirement cinemri.visualisation (from versions: none)
ERROR: No matching distribution found for cinemri.visualisation.
I've tried many solutions but none of them worked. I hope you can help me solve this problem.

Hi, thanks for your interest in the paper! I will be able to respond in detail later this week and have a look for you on these issues.
The missing cinemri dependency is my bad, I will update that.

Sorry for the late reply, I have fixed the cinemri dependency, and also included the utils.py files.
As for the PICAI dataset, I am unsure what the problem is? Using the following two links you should be able to download it (and the annotations)
zenodo
github for annotation


Improve reference scores when using instructor-large (to behave like all-MiniLM-L6-v2)

In the response it is referencing some documents which has no relation with the question asked with a random score assigning with it. Even if it's answering from llm data source (not from UserData) it's still referencing those documents. Can you clarify how and why it is referencing those documents from UserData which has no similarity from the question asked and how is the score assigned to those documents?

Hi.  I also feel like the scores are a bit high for unrelated things.  I didn't find any bugs, but I'll check on it again.  Thanks!

Hi @RohanKaran I checked both FAISS and chroma in debug mode and both give the same score for the documents in various checks.
However, I find that the instruct embedding gives relatively flat score distribution, making it hard to tell relevant from irrelevant.  Something like --hf_embedding_model=sentence-transformers/all-MiniLM-L6-v2 gives a distribution that's sharper and seems to distinguish better.

Hi @RohanKaran I checked both FAISS and chroma in debug mode and both give the same score for the documents in various checks.
However, I find that the instruct embedding gives relatively flat score distribution, making it hard to tell relevant from irrelevant. Something like --hf_embedding_model=sentence-transformers/all-MiniLM-L6-v2 gives a distribution that's sharper and seems to distinguish better.

That helped a bit, now the scores are not absolutely random.
But in some cases if I normally say "hi" or any normal conversation having All_Relevant selected as document choice, it gives some weird answers and quotes a document with 0 or nearly 0 scores. Is there a way to not use UserData and only LLM db in case the scores are low.

You can check the cut_distance to be lower than 1.64 here:
https://github.com/h2oai/h2ogpt/blob/2c0b4120069cc9892703492586b8902c209ba20b/generate.py#L1546
Maybe try 1.5.  It might lead to cases when should have used document but didn't.
Also, the 0 score is because I show the score like this: https://github.com/h2oai/h2ogpt/blob/2c0b4120069cc9892703492586b8902c209ba20b/gpt_langchain.py#L2191-L2192
So I take 1.5 - distance divided by 1.5.  So a score of 0 will show up when the "max" triggers as occurs when "score" is > 1.5 but still < 1.64.
So UI/CLI scores of 0 will no longer show if you use cut_distanct=1.5 and very nearly 0 scores will be removed if you make it even a bit smaller.

You can check the cut_distance to be lower than 1.64 here:
https://github.com/h2oai/h2ogpt/blob/2c0b4120069cc9892703492586b8902c209ba20b/generate.py#L1546
Maybe try 1.5. It might lead to cases when should have used document but didn't.
Also, the 0 score is because I show the score like this:
https://github.com/h2oai/h2ogpt/blob/2c0b4120069cc9892703492586b8902c209ba20b/gpt_langchain.py#L2191-L2192
So I take 1.5 - distance divided by 1.5. So a score of 0 will show up when the "max" triggers as occurs when "score" is > 1.5 but still < 1.64.
So UI/CLI scores of 0 will no longer show if you use cut_distanct=1.5 and very nearly 0 scores will be removed if you make it even a bit smaller.

Thanks, solves the problem.

Hi @pseudotensor  why are the reference scores same for two different answers from different models? Does it measure the relevance between doc sources and the prompt, not doc sources and response?

Correct, the score is currently related to the distance between the query and chunk of data, not the response and chunk of data.  The latter can be done though.

Correct, the score is currently related to the distance between the query and chunk of data, not the response and chunk of data. The latter can be done though.

The latter should be better, because we have to assume that LLMs will give best answers. By measuring cosine distance with the response, we should get the correct chunks. The ranking of chunks also will be good in that case.


Update gitignore and remove meta files

This looks great to me and would clean up the repository. @nfeuer what say you?

This ratio of added to deleted lines must be a record for me 🥇 😂


fix: Fix outline issue

Description
Fixing an outline issue on Safari 15 by replacing outline with border.

Related links, issue #, if available: n/a
How has this been tested?

Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness

Changes include appropriate documentation updates.
Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
Changes do not include unsupported browser features, see CONTRIBUTING.md.
Changes were manually tested for accessibility, see accessibility guidelines.

Security

If the code handles URLs: all URLs are validated through the checkSafeUrl function.

Testing

Changes are covered with new/existing unit tests?
Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

this MR seems to do a lot with components that have shadow, for example: cards
previous demo:
https://d21d5uik3ws71m.cloudfront.net/components/fdf0ecc84ff28f6a9b5a88be9b8d8945616fd73b/index.html#/light/cards/basic
this demo: https://d21d5uik3ws71m.cloudfront.net/components/a5a5947eda507e3bc29058388d45441171a0fd34/index.html#/light/cards/basic

How can I use this new release but still have the previous shadow-ish look?

Hello!
We are an evolving design system and such changes may happen from time to time, as we continue our design work.
Our design provides as-is.
There are some theming capabilities, but not to that much extent as it needs to change borders back to shadows


Update how AffixAllocator infers shared from parent

AffixAllocator used to only check if Allocator.instance is shared. If the parent Allocator doesn't have an instance field, the check will be false, even though the Allocator is shared.

@ZombineDev can you please add the assert?

I updated the unittest and added static asserts;


Editor: issue with calendar_dates feed

Observed behavior
When importing the San Diego feed (which has individual calendar_dates defined for each day of service) into the editor, aren't those calendar_dates supposed to be imported as new entries in the calendars table? I found that they did not seem to make it into that table and so it was not possible to edit any of the trips defined for those entries in the Timetable Editor. Further, on publishing the editor snapshot, the calendars seemed to be very jumbled.
Expected behavior
Imported editor feed should have calendars entries for each calendar_date
Steps to reproduce the problem

Import GTFS (manually upload, because there are issues with that URL - see #312)
Load feed into editor
View calendars table
Publish snapshot
View feed trips histogram

Any special notes on configuration used
Please describe any applicable config files that were used
Version of datatools-server and datatools-ui if applicable (exact commit hash or branch name)
If using this in conjunction with datatools-ui, this info can be found by clicking on the gear icon on the sidebar.

:tada: This issue has been resolved in version 3.7.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 3.8.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Fix theme editor is opened only once

Closes #97278

This isn't a complete solution, this makes only the theme editor work like this, and no other resource editor, like shaders, which work the same way

shader editor doesn't have a close button tho

Yes it does? It's a bottom bar editor and all of them can be closed

could you pls send a video 🥺. Couldn't really figure out how to close it

Click the bottom bar where it says "Shader"

Did you mean "Shader Editor" ? That doesn't really close like the "Theme Editors" close button works because that'll also hide the "theme" button from the bottom panel

That's two different issues then, but it wasn't clear in the original thread wat OP meant by closing, so removing the link with that issue to discuss the behavior when closing the bottom bar specifically and keeping this for the close button

https://github.com/user-attachments/assets/b75e69f3-7ae6-497f-a80f-7535b2ea3b75
Did you mean this? I think that's intentional behavior.  Cause user closed it by themself and they can easily open that.

No I mean clicking the "Shader Editor" button on the bar, the way to close any editor in the bottom bar

Yes I did that before recording.
Also the theme editor respect if the user has closed the editor from bottom bar
https://github.com/user-attachments/assets/75b2c3ae-9e77-4bbd-9564-d7edd03c25be

I thought op literally meant to hit the close button and close it so I didn't raise any questions either.

The problem is that if we close the theme editor (using the close button), then when we click on the theme in the inspector, the theme editor will not open again, for this we need to select any other node, and then Control with the theme again, then the theme editor will open again, you must agree, quite strange behavior

Check out the artifact. One thing to keep in mind tho is if the theme in the editor is unfolded and you close the theme with the button, to open the theme again you'll need to fold and then unfold again to open the theme in the inspector

This fix is wrong.
The bug is caused because closing Theme Editor does not remove it from active editors. I'm working on a proper fix.


Add class methods typings

It's auto-completing nicely but it's not showing an error for me when I pass a string to velocity.
@krzysztofciombor can you please review?

Thanks @brunolemos this looks good

I just noticed the openDrawer options is not optional in this pr but should be, you may quick fix that


Bump g2 to 3.5.1 and g2tmpl to 1.13.0 in configs/containers/specs/jedi-ci.yaml

Summary
Yesterday's update of g2 and g2tmpl in configs/common/packages.yaml didn't make it into configs/containers/specs/jedi-ci.yaml. This PR fixes it.
Testing

No CI testing needed
Manual testing using workflow_dispatch: running https://github.com/JCSDA/spack-stack/actions/runs/10490815988/job/29058420870

Applications affected
JEDI CI
Systems affected
JEDI CI containers
Dependencies
n/a
Issue(s) addressed
Resolves #1260
Checklist

[x] This PR addresses one issue/problem/enhancement, or has a very good reason for not doing so.
[ ] These changes have been tested on the affected systems and applications.
[ ] All dependency PRs/issues have been resolved and this PR can be merged.

Note. Compile error of<EMAIL_ADDRESS>with clang@14. Created an issue in the nceplibs-g2 repo with more information: https://github.com/NOAA-EMC/NCEPLIBS-g2/issues/745


SignUp page UI can be modified.

Issue Report
Title
UI of SignUp page can be modified.
Description
The SignUp UI is not looking good.
The boxes of firstname, lastname, pasword, email etc. are not visible which gives it a page like look.
And Add eye icons on password and confirm password.
Add hover effects on create Account and SignIn with Google.
Expected Behavior
Add boxes for the firstname,lastname
Add hover effects on Create and SignIn with Google.
Add eye icons for password visibility in password and confirm password.
Screenshots (if applicable)

Additional Context
Kindly assign this to me under GSSOC'24-extd and Hacktoberfest.

Closing as resolved in Pr #239


Fix #68 Move popup to outside of the window when closing it

This PR make sure the popup not cover any content of the page when it is closed by move it to outside of the window.

@mram What kind of feedback were you looking for from me? I don't have an opinion on the technical aspects of this PR.

I added a new commit to make everything belongs to popup scoped in .popup

Thanks!


Question about the naive baselines

Hi authors,
Congratulations on your great work! I have a few questions about you paper. It would be great if you can kindly answer them!
In your paper Tab.1 and Tab. 2, your baselines are extremely high, i.e. comparable or even better then L2P and DualPrompt.
Also in Tab.1 and Tab.2, the results of Seq-FT are also much higher the numbers reported in L2P paper. For CIFAR100 dataset, L2P reported 33.61% for Seq-FT while you reported 77.61%.
Could you explain why this happened? Did you use the task identity during inference? I.e., for the test set in each task, did you filter out the logits of other tasks?
Also is my understanding to the naive baseline correct? For CIFAR-100, you insert some new parameters into the pretrained model, i.e. 20 prompts and a 100-class classifier. Then you train the new parameters sequentially on each task. During inference, given a test image, you predict the category from the 100-class classifier without any other information (i.e. task class mask). Is this right?
Thanks!

Hi klauscc,
I'm very sorry for the delayed response as I've been quite busy lately.
Thank you for your interest in our work.
Regarding Seq-FT, we use the same training and inference method as DualPrompt, except for the use of SGD optimizer, learning rate of 0.01 (scale based on batch size 128), and weight decay of 5e-4, since we fine-tune all parameters of the pre-trained model. The difference in performance could be attributed to the local classification loss.
Regarding the naive baseline, your understanding is basically correct. We did insert the prefixes with length 20 into each of the shallowest 5 transformer blocks and used the same training and inference method as DualPrompt. You can verify this using the code released by Jaeho Lee or the DualPrompt authors.
If you have any further questions, please don't hesitate to reach out to me. And if I don't reply promptly, please feel free to send me an email as a reminder.
Thank you again for your interest.
Best regards,
Qiankun Gao

Hello @klauscc,
I noticed that there hasn't been any progress on the issue for quite a long time, so I will go ahead and close this issue. If you have any other questions or concerns, please don't hesitate to reach out to me again.
Best regards,
Qiankun Gao


Duplicated path in filename when commit_only_source is true

https://github.com/sat28/githubcommit/blob/44f52ce03482c2b5a5c1914aa39fbfbb52d1d7da/githubcommit/handlers.py#L62

@luokar can you suggest the fix?

filename = filename.replace('ipynb', 'py')
GIT_PARENT_DIR and GIT_REPO_NAME are added in the following repo.git.add command.

@codyznash and @luokar pls see if this helps - https://www.youtube.com/watch?v=vKx_4zFvOi8


README example dosen't actually show usage

Am I missing something? I don't actually see the call to memoizeOne here...
const memoizeOne = require('async-memoize-one')
const got = require('got')

const fetchData = url => got(`https://api.microlink.io?url=${url}`)

;(async () => {
  // fecthing data for first time
  await fetchData('https://example.com/one')

  // served data from cache; no fetching!
  await fetchData('https://example.com/one')

  // previous execution parameters are different, so fetching again
  await fetchData('https://example.com/two')

  // previous execution parameters are different, so fetching again
  await fetchData('https://example.com/one')
})()

Thanks for reporting, I forgot call the method 😅


Remove redundant draining of request/response body

A tiny refactoring as a follow-up from https://github.com/http4s/http4s/pull/6116#discussion_r825437891

Sure, this will wait for #6125. Furthermore, I could give it a try to fix hereafter conflicts of merging.

I'm merging to get off the board, but not rolling forward from 0.22 until we get what's in flight for 0.23 released.


Move to SharpDX 3.10

From @demiurghg on July 2, 2016 8:38
Copied from original issue: demiurghg/FusionEngine#75

Fixed in 740b9868f0b6616428bb8f42fb841fae53ac9384
Actually, project has been moved to SharpDX 3.1.1


Create Lovecraft.md

NOTE:

Please fill out the template below

Write down the general details of the book

[Details like Title, Author, Genre and the Goodreads page of the book]

Why do you think the book is a must-read?

[Write here]

Does this book contain any profane, violent or vulgar content?

Y/N

Lovecraft
General details

Title: H.P. Lovecraft: The Complete Fiction

Author: H.P. Lovecraft

Genre: Horror, Fiction, Science Fiction

Goodreads:  4.37 Stars - 7,773 Ratings - 234 Reviews

Why do you think the book is a must-read?

This is an excellent collection of books by H.P. Lovecraft, one of the great masters of horror. You can follow his progress as a writer through the decades.

These stories delve into the origins of evil and create an entire universe of ancient horrors. Authors inspired by these works create fiction in the Lovecraftian Universe.

Lovecraft represents a classic author of the New England Gothic and inspired authors such as Stephen King.

Does this book contain any profane, violent or vulgar content?

Yes

I failed to fill out the template but it is all in the file.


CASMCMS-9205: Add missing fields to CFS config imports

CSM 1.4 backport of https://github.com/Cray-HPE/docs-csm/pull/5542

/backport release/1.3


Check CHANGELOGs for broken links on release branches

Signed-off-by: Quan Tian<EMAIL_ADDRESS>

Codecov Report

Merging #3553 (ffad7c1) into main (3899efc) will increase coverage by 5.18%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3553      +/-   ##
==========================================
+ Coverage   38.20%   43.39%   +5.18%
==========================================
  Files         114      210      +96
  Lines       15249    25226    +9977
==========================================
+ Hits         5826    10947    +5121
- Misses       8940    13188    +4248
- Partials      483     1091     +608

Flag
Coverage Δ

integration-tests
?

unit-tests
43.39% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

antrea/pkg/ovs/ovsconfig/errors.go

antrea/pkg/agent/openflow/client.go

antrea/pkg/ovs/ovsctl/interface.go

antrea/pkg/agent/cniserver/testing/utils.go

antrea/pkg/agent/interfacestore/types.go

antrea/pkg/ovs/openflow/ofctrl_packetin.go

antrea/pkg/agent/openflow/service.go

antrea/pkg/apis/controlplane/v1beta2/helper.go

antrea/pkg/ovs/openflow/logs.go

...ea/pkg/agent/ipassigner/responder/arp_responder.go

... and 314 more

Question - what we do if a link is broken? Do we modify the CHANGELOG?

Got it!

/skip-all


It is needed to prevent memory leaks


allow-transfer for master zone

I am new to the world of dns and bind and wanted to know if there was a reason not to use allow-transfer for the slave in this file ? https://github.com/globocom/GloboDNS/blob/master/app/models/domain.rb#L305

Hello, this config is set via web interface rewriting the named.conf file.
The file you mentioned, manipulate files of zones and include those files to the named.conf.
If you have everything working, go to the bind9 tab, logged as admin, and you will see the config from named.conf for each master and slaves.

thank you I did not know that allow-transfer could be put also in named.conf and especially I thought that with allow-transfer in a zone we told the master to transfer to the slave, in fact it's the opposite

In our environment, we don't assign specific transfer restrictions in the zone level.


Interpreting Outputs

Hello,
I'm trying to understand how to interpret some of the Indeterminate outputs from pypgx for CYP2D6 GRCh38. It is not clear to me why an Indeterminate call is made. Few examples below. Explaining these might help my understand the rest.
Unnamed: 0 | Genotype | Phenotype | Haplotype1 | Haplotype2 | AlternativePhase | VariantData | CNV
123 | Indeterminate | Indeterminate | *17;*2; | *29;*2; | ; | *29:22-42129132-C-T,22-42127608-C-T:0.675,0.631;*17:22-42129770-G-A:0.294;*2:22-42126611-C-G,22-42127941-G-A:1.0,1.0; | Tandem2A
1234 | Indeterminate | Indeterminate | *2; | *2; | ; | *2:22-42127941-G-A,22-42126611-C-G:1.0,1.0; | Tandem3
12345 | Indeterminate | Indeterminate | *28;*2; | *2; | ; | *28:22-42129087-G-C,22-42130773-C-T:0.525,0.589;*2:22-42126611-C-G,22-42127941-G-A:1.0,1.0; | Tandem1A
123456 | Indeterminate | Indeterminate | *2; | *4;*10; | *65; | *4:22-42128945-C-T:0.483;*10:22-42130692-G-A,22-42126611-C-G:0.448,1.0;*65:22-42130692-G-A,22-42127941-G-A,22-42126611-C-G:0.448,0.457,1.0;*2:22-42127941-G-A,22-42126611-C-G:0.457,1.0; | WholeMultip1
1234567 | Indeterminate | Indeterminate | *2; | *17;*2; | ; | *17:22-42129770-G-A:0.527;*2:22-42127941-G-A,22-42126611-C-G:1.0,1.0; | Tandem2B

@anh151,
Good question! If you look more closely at these samlpes, they all have a structural variant call (e.g. Tandem3) in the CNV column. In these particular cases, PyPGx did not know how to interpet these calls in the context of candidate star alleles (i.e. the Haplotype1 and Haplotype2 columns) and thus produced Indeterminate calls. Please let me know if you have additional questions.
Best regards,
Steven

Hey Steven,
Let's take for example the second sample. It looks like pypgx detected a *2 allele on each chromosome. But then also a structural variant somewhere. Is a *2+strucutral variant allele tandem not possible? Or is the structural variant that doesn't match any known definitions?
-Andrew

@anh151,
The latter is what I menat -- i.e. that particular combination does not match any known star allele definition. If you are interested in learning more about alleles defined by SV, please see PyPGx's allele table and also the list of example SV alleles in the Genes page (see CYP2D6 page as an example).

Great! That helps a lot. Thanks.
-Andrew


Bump smallvec: 0.2 -> 0.4.

It's small, but merging this would clear up a duplicate dependency warning in Servo, so it'd be nice to see it happen!


MINOR: Correct warning

This warning is misleading since increasing the number of threads without increasing the number of Streams clients does not improve the situation when there is not enough available capacity for standby replicas.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Call for review: @ableegoldman

Some unrelated test failures:
Build / JDK 15 / org.apache.kafka.connect.integration.RebalanceSourceConnectorsIntegrationTest.testMultipleWorkersRejoining
Build / JDK 8 / kafka.admin.TopicCommandWithAdminClientTest.testDescribeUnderReplicatedPartitions()
Build / JDK 8 / org.apache.kafka.streams.integration.KTableKTableForeignKeyInnerJoinMultiIntegrationTest.shouldInnerJoinMultiPartitionQueryable

Merged to trunk


Index page getting a little unwieldy

The page at http://godoc.org/-/index is getting quite large, taking some time to load. I can understand the convenience of being able to Cmd+F and find packages by name this way, but the number of Go packages is only going to increase faster and faster over time.
How would you feel about paginating or filtering by first letter?

I'm going to close this because the various measures that will improve this are documented by other issues. (eg #172)


Provide a way for callers to see HTTP exceptions

Whether a request() or urlopen() call is given retries=0 or retries=<positive-int>, the exception returned on most connection and network failures is a MaxRetryError. This prevents client code from seeing the “real error” that killed the connection and, therefore, clients based on urllib3 cannot, say, adjust their behavior based on whether the problem is any of the various errors at the HTTP level, or whether the problem is some specific socket error.
At least three solutions are possible, and I defer to the maintainers to decide which is the most urllib3-ish.
First, it could be judged a design error to have introduced MaxRetryError in the first place, and the final attempt's exception could be allowed to make it through to the client (some would want to throw in a retry_count attribute to add a bit of information about what happened, but I am not sure that that is advisable). The except clause near line 350 of connectionpool.py would then look something like:
        except (HTTPException, SocketError), e:
            # Connection broken, discard. It will be replaced next _get_conn().
            conn = None
            # If this was the last try, let the caller see the real error.
            if not retries:
                raise

Other adjustments to the code might accomplish the same thing — a larger refactoring could eliminate even making the final attempt inside of an except:, for example — but this is the simplest approach I could find for this first approach.
Second, the MaxRetryError could be marked up with a list of failures. This would be a bit tricky, since there are finicky problems with keeping stack traces around, but at least the exception object from each failure could be kept around — shorn of its stack trace — and delivered back with the MaxRetryError. This would even make it clear whether the problem was an actual network death of the HTTP protocol, or whether something like a redirect loop had kept the request going through too many attempts — and thus much more information would be available for the client to determine what had happened.
Finally, retries=None could be a special signal that the bare exception should be returned. This would maintain (so far as I can see) 100% compatibility with the current code base. The ConnectionPool.urlopen() function needs two or three lines adjusted so that the None value avoids offending the various if statements, but with minimal intrusion the change lets someone like me — whose application, alas, cares quite deeply what mode of failure an HTTP request encounters — take advantage of urllib3 but without breaking existing code that might always expect the MaxRetryError exception. (Oh, and, beware — in Python 2, None < 0 is True, I just discovered, so the retries < 0 will catch a None value unless an extra clause is inserted!)
Of course, other approaches might also be possible that I have not thought of.
I very much like the quality of code that I am seeing in urllib3 and, if I can only get the actual exceptions back that it encounters, these already-written connection pools are going to save me a lot of work. Thanks!

:+1:, I'll look into it closer this weekend.

@brandon-rhodes Which solution would you choose?

Um. Well.
Okay.
[Thinks for several minutes.]
You've got me.
To my vast surprise, it turns out that I would actually do something more complicated!
First, I would make the API distinguish between redirection and errors. To me, it is a fundamentally different issue to tell a library “be willing to go through 4 redirections, but then stop; 5 is right out!” than to tell the library “if you get a 404 or 500 or cannot even resolve the hostname, just try again a few times, and then let me know after all your attempts have failed.” In fact, the latter is not a feature that had ever occurred to me, until I saw it this week in this library — why would a 404 or 500 or name resolution error or broken socket be likely to suddenly fix itself with a second or third retry? I guess I possess daily evidence that it does in fact help, which is demonstrated every time I hit “reload” on a hung page load and my browser magically gets it successfully the second time. But following up an error with an automatic retry seems very different than following successful redirects. Yet urllib3 uses the same retries counter for both.
So, first, I would introduce a new parameter redirects=3 to urlopen() and have that counter be the one that counts down when stepping through 3xx responses. And each subsequent response object would have a redirectred_from attribute that held the previous response object, so that a quick for loop on the part of the user would let them see the whole chain of responses that had led them to the final page. (Would the series of requests also need to get saved, I wonder, or does the response chain alone provide enough information for them to reconstruct what happened? For now my idea is that they only need the responses.)
I am not sure whether running out of redirections should result in an error.  If the user wants three redirections followed, and the result is still a 303, then can't the 303 response be returned and they can deal with it themselves?  Or does providing a redirects > 1 value mean that you expect the library to follow the 3xx codes all the way to their conclusion, and you need a violent out-of-band event like an exception to let you know that the sequence did not conclude with a 200? For the moment I am going with the exception, and that's also how the library currently works.
Of course MaxRetryError now needs two subclasses. MaxRedirectError would mean merely that after retries attempts a 3xx code is still being returned. MaxErrorError (gads, I need a better name for that; maybe MaxFaultError? no, that's not HTTP terminology) would signal the quite different situation where a series of 404 or 500 errors finally exhausted the retries limit. But of course there is another choice that could be made here: just letting the final 404 or 500 exception object hit the user, instead of disguising it behind MaxRetryError.
And I should mention one complication: even though redirects=3 and retries=None as parameter defaults would seem to be pretty much what anyone would sanely want as a default — after all, that's what the browser does, it hides redirects from the user but exposes actual failures to fetch pages — there is one situation where something like the current retries logic can be quite nice: when you are fetching a huge file with curl or wget and are able to fetch some of it but then the connection dies but then the tool, through an option, does not reissue the exact same request that failed, but a new request that fast-forwards past what has been fetched so far. Why have I not brought up this stunningly useful case in my discussion? Because: I think that, instead of making urlopen() even more complicated, this feature could easily be provided in a separate function or tool that (a) called urlopen() with retries=None and redirects=3 to get redirected to and try downloading the resource; (b) if it fails partway through, try a direct fetch of that final URL with retries=None and redirects=0 this time; and (c) put the pieces together to return them (unless some kind of counter or time limit of its own has run out). Of course this could not be done with .data or even simply with a parameterless .read() because, unless I'm forgetting something, both of those will discard everything they've read if they hit an error; but the tool could use little .read(1024) calls or something and thus hopefully only lose a few bytes when the error finally killed their read loop.
So, to sum up: what would I do?
If I had no users or were still in alpha, I would remove the

Ah craziness. :P
A few thoughts:

@kennethreitz's Requests does much of what you already want on top of urllib3, such as tracking the redirect path.

I feel really uncomfortable having a Response object which inherits from Exception and could be raised or returned. Not quite sure why, I need to think about this more. I guess I haven't seen this pattern done before and my instinct tells me there will be gotchas there.

There's an open related issue on the old GoogleCode project which still needs to be migrated to Github if people are passionate about it: (18) There should be separate limits for redirect and failure.
Based on this, my thoughts were to create a kind of Retries object which you can create and pass in place of a plain integer, and it would track Retries on a more granular scale, such as:
urlopen(..., retries=Retries(total=7, redirect=5, timeout=3))

Obviously each param would be optional and None would mean infinite. Passing in a plain integer like retries=7 as we do now in place of a Retries object would translate to retries=Retries(total=7).
Then we could attach this Retries object along with exceptions or responses for additional debugging information.

Your thoughts on this?

Interesting subject.

But following up an error with an automatic retry seems very different than following successful redirects.

I totally agree. That's what I felt from the very beginning and the reason I opened (18) There should be separate limits for redirect and failure. issue which I'm glad Andrey remembers about. Btw, I would migrate this here and move discussion about redirects/retries over to it.

But urllib3 has existing users. What then?

With all my sympathy for Andrey and urllib3 we should remember it's very young project and I wouldn't hold necessary changes off because of backward compatibility. If it's rather easily doable then sure but not for any price.

I create a subclass of HTTPResponse called HTTPErrorResponse. The HTTPResponse.from_httplib() would make instances of the > latter for non-200 responses (but would not, itself, raise them).

I do not like treating non-200 responses (read 3xx ones) as errors in any circumstances. It just doesn't feel right.

The retries parameter sticks around (...)

Sure.

A new redirects parameter appears (...)

What can I say? At last :)

The urllib3 keeps its current assumption that only 200-level responses are useful to users (...)

Andrey, do you agree with this? I don't and I think there's no such assumption and if current behavior suggests otherwise it's only because the library has been lacking redirect/retry separation what influenced its behavior in a bad way.

When it gets a 3xx as a final return value after exhausting the redirects counter, it raises the 3xx HTTP response itself as an exception.

As it should has already been clear from my previous remarks I'm against this.

When a redirect is followed, the previous HTTP response (though not its body?) is saved as the (...)

As Andrey noted requests lib does this. However I hoped requests would use redirect logic from urllib3 and then creating history could probably be moved to urllib3 as well. Kenneth said (couldn't find this post now) requests would never use redirect logic from urllib3, however. The division between what should be in urllib3 and what in requests is tricky. However I have a feeling that right now urllib3 is not as extensible as it could and that's the reason requests do many things on its own.
On the idea of responses being returned or raised. It's too cool idea not make use of it :) The question is how to use it :)

Based on this, my thoughts were to create a kind of Retries object

Nice! However, we have to remember this never can be as elastic as signals. For example if someone would like to have some time-based adaptive retry strategy it's only feasible with signals.

With all my sympathy for Andrey and urllib3 we should remember it's very young project and I wouldn't hold necessary changes off because of backward compatibility. If it's rather easily doable then sure but not for any price.

It's been around since 2008, which is moderately old as far as Python projects go. :-)

The urllib3 keeps its current assumption that only 200-level responses are useful to users (...)

urlopen(..., redirect=False)

... [stuff about Requests doing its own redirect logic]

urllib3 has exactly 3 lines of redirect logic with the goal of covering +80% of use cases (to avoid mandatory boilerplate) but not 100%, this is why you can turn off redirecting easily altogether.
    def urlopen(self, ...):
        ...
        redirect_location = redirect and response.get_redirect_location()
        if redirect_location:
            return self.urlopen(..., retries-1)

This is how I'd prefer to keep it, since anything more sophisticated would still not cover 100% user cases and it wouldn't be worth the added complexity to the codebase.
I'm satisfied with the extendability of urllib3 in this department as it is (ie. redirect=False and do it yourself).

Nice! However, we have to remember this never can be as elastic as signals. For example if someone would like to have some time-based adaptive retry strategy it's only feasible with signals.

I don't understand what you mean by signals. As for time-based adaptive retry strategy, I use things like apiclient/ratelimiter.py.

Oh!
My gut feeling is that it's a terrible idea — passing even more complex information into urlopen() and thus requiring it to have even more complicated logic inside. If you really want to go from two (retries and redirects) to three (adding total) parameters that control redirection, then I think you are definitely reaching a level of complexity where redirection should just be moved into a separate object altogether. Keep the connection pool simple. And have a RetryRobot or something that can be instantiated with (total=7, redirect=5, timeout=3) and then will go to town making requests to a Pool or a simpler HTTP dispatcher beneath it.
Or, again, am I missing the point, and you're willing to swallow a more and more complicated urlopen() function because the alternative is the much-reviled handler stack supported by urllib2? Or are the problems with urllib2 in some awkwardness in the way it wants pieces to compose, and not in the idea itself?

@brandon-rhodes I welcome you to add yourself to the CONTRIBUTORS.txt file, your design review, fixes, and improvements are very worthy of recognition. :)

Are you arguing, for example, that wget or curl would be correct to return the body of a 3xx response as their standard output and exit with a non-error return code?

Z:\>curl http://httpbin.org/redirect/2 && echo SUCCESS
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>

Redirecting...

You should be redirected automatically to target URL: /redirect/1.  If not click the link.SUCCESS

Thanks, @piotr-dobrogost
@brandon-rhodes — The thing that I'm trying to keep in mind is that we're not building a browser, and we're not building a command-line tool, or a downloader, or a web crawler, or an API client. We're building a library that could be used to build any of these things (and that means even if the endpoint server is doing something weird and unusual).

Well, in this case maybe it would really be better not to do any redirects? Following redirects is feature expected from these higher level tools you mention and not from low level tool.

@piotr-dobrogost — I'm abashed! I am a longtime wget user and expected curl to work the same way, and was completely wrong. :)
@shazow — Agreed! The purpose is to be a library. And two things stand in the way of the library being dropped into place to provide connection pooling where a more primitive library might have been in use before. (1) It hides real communications errors behind its own MaxRetryError which both invalidates except: clauses that might already be standing around HTTP request calls, and also means that meaningful error messages can neither be logged nor presented to users. (2) It hides errors regardless of whether they arise from pooling or not. That is, instead of doing a hide-the-error-and-magically-retry in the one singular situation where an old connection is being used — to, appropriately, make the connection pooling transparent — it will hide errors even from completely new connections just pulled off of the queue. This means that urllib3 cannot be used by a developer who wants an automatic retry to take place when an old connection proves stale (and thus not have extra errors appear in their app merely because connection pooling is taking place), but who needs to avoid the expense of double-requests taking place every time a bad hostname is typed or a target host is down.

@piotr-dobrogost:
I believe the significant number of users are using urllib3 to access HTTP-based APIs. Some people use it to mimic a browser, but I think that's a minority and Requests is a great option for that.
I think not doing redirects at all is a bad idea--at least it would annoy me greatly and increase the barrier to entry for the library. I am not opposed to improving the redirect logic. I'm just weary of diminishing returns.
If you'd like to compile a list of redirect scenarios you'd like for urllib3 to handle better (ideally in the form of unit tests), we can take a crack at it and see what's feasible without increasing complexity significantly.
@brandon-rhodes:

It hides real communications errors [...]

Yup, we're all in agreement here. This bug will remain open until this is fixed. I'm leaning towards attaching more such information to the exception that does get raised.

It hides errors regardless of whether they arise from pooling or not. [...]

Pooling errors should not be raised, that would indicate that the library is broken as that is one of the core functions (unlike redirects). I already agreed above that the number of retries needs to be configurable for each kind of failure.

[...] double-requests taking place every time a bad hostname is typed or a target host is down.

Does retries=False not allow you to do this (assuming we fix the problems above)?


getDetails

Hi, I'm currently trying to get the details of a list of Places in Paris. The first iteration works fine but the second get stuck on getDetails().
        List<Place> places = client.getNearbyPlaces(48.927597, 2.263365, 10, GooglePlaces.MAXIMUM_RESULTS);
        for (Place place : places) {
            System.out.println("Name: " + place.getName());
            Place detail = place.getDetails();
            System.out.println("ID: " + detail.getPlaceId());
        }

EDIT : I tried to create my own RequestHandler extending your DefaultRequestHandler and replaced the HttpClient. You provide exactly the same thing as HttpClients.getDefault() and I replaced it with HttpClients.getMinimal() and it works like a charm.
private final HttpClient client = HttpClients.createMinimal();

I am not at all expert in this, I don't get why your way doesn't work and mine does. Would you please explain to me what the issue is ?

What do you mean by it gets stuck on getDetails()? Are there any errors?

No, no errors. It looked like an infinite loop.
I tried to let it run a few minutes in case I get a timeout or anything but it didn't happen.
And when I submit the GET request directly from my browser I receive the response immediately.

Same here

I had the same issue when I used the current (v.2.1.2) Maven repository. My solution was to fork the latest version and create a local maven repository.

Like I said, in the DefaultRequestHandler just init the HttpClient with HttpClients.getMinimal() fixes this bug.


feat(Archive/Imo): IMO 2024 Q5

Formalize IMO 2024 problem 5.
Note that this solution is longer than any of the existing IMO formalizations in either the mathlib archive or compfiles; feel free to golf, where doing so isn't adverse to the role of such formalizations as readable examples. Various definitions using proofs (that certain paths used in an optimal strategy are valid paths) by essentially split_ifs <;> simp <;> omega are (subjectively, not counted heartbeats) slow for Lean to process; in those cases, I think the tactics used are a better approach as an example than a faster but lower-level and probably longer proof would be, so rather than making those proofs longer to speed them up it might be better to treat them as examples that might show opportunities for speeding up those tactics.

[x] depends on: #18473
[x] depends on: #18593

maintainer merge

Thanks :tada:
bors merge


Taxonomy Support: API support

(@swissspidy bit of a placeholder to make sure that our pods are on the same page for adding taxonomy support for 1.12, please edit as you set fit.)

[ ] Communicate with Infra to get proper structure for saving tags and categories.
[ ] Make sure nothing new needs to get added on the infra side of things for tags and categories to be created/edited/deleted from a story in the editor.

Taxonomy handling in the REST API already exists in WordPress core to its full extent. I doubt we'll have to do any custom work on this end. Perhaps some slight modification to make usage a bit easier.
REST API reference for tags and categories:
https://developer.wordpress.org/rest-api/reference/tags/
https://developer.wordpress.org/rest-api/reference/categories/
And for posts:
https://developer.wordpress.org/rest-api/reference/posts/
What's important to understand is that a story can potentially have X taxonomies associated with it. Not just categories or tags.
All supported taxonomies are exposed via _links in the REST API response, where there is a dedicated wp:term entry. Example of a post that has 2 taxonomies:

And because these resources can be embedded using ?_embed, it's easy to get a list of all associated terms in those taxonomies. Example of a post that has 1 term in the "category" taxonomy.

I defer to the REST API reference for documentation, but basically to create a new term you'd POST to wp/v2/<taxonomyslug>, to update an existing term you'd POST to wp/v2/<taxonomyslug>/<id>
There's no UI in the editor to delete terms themselves, so we don't need to worry about that.
To associate a term with a post/story, just provide the list of terms in a POST request to /web-stories/v1/web-story/<id> as per the reference.
Example for posts:
curl -X POST https://example.com/wp-json/wp/v2/posts/<id> -d '{"categories":<array of terms in the category taxonomy>}'

To get you started testing taxonomy support in stories, drop this file in wp-content/plugins or upload it as a plugin through WordPress admin:
https://gist.github.com/swissspidy/62d54f3f48a81b88a0f2b07fd32f844e
This will set up 4 new taxonomies for testing.

@littlemilkstudio To get a list of all taxonomies available for stories: GET wp/v2/taxonomies?type=web-story. Or in packages/story-editor/src/app/api/apiProvider.js:
const getTaxonomies = useCallback(() => {
    return apiFetch({
      path: addQueryArgs('/wp/v2/taxonomies/', { type: 'web-story' }),
    });
  }, []);

Can use the hierarchical field to determine whether to show the freeform component or not.
Can use name for the actual panel/label name in the editor UI (so it will be translated automatically)


add cordova should add ios-sim

We should make it so the user doesn't have to install ios-sim manually.

Only if running on a Mac, I would think.


support an empty map configuration value

Discovered that an empty string when attempting to specify an empty map for a configuration value wasn't working. This is a quick patch to make it work.

thanks!

glad to be of service.


Trunk builds an arbitrary binary out of available ones when not explicitly selected in index.html

Example
This project defines two different binaries
https://gitlab.com/samoylovfp/rust-browser-extension/-/tree/15d24e062e68cd637bc9ce39e1fefd0fedcbd89c
when running trunk build it takes an arbitrary one of those and processes it into the dist directory.
Running trunk build repeatedly flips between two different outcomes
$ for i in `seq 10`; do trunk build &>/dev/null; ls dist/*.wasm; done
dist/ff-ext-793a8876bb5256ae_bg.wasm
dist/ff-ext-a98d0f18bde50465_bg.wasm
dist/ff-ext-793a8876bb5256ae_bg.wasm
dist/ff-ext-793a8876bb5256ae_bg.wasm
dist/ff-ext-793a8876bb5256ae_bg.wasm
dist/ff-ext-793a8876bb5256ae_bg.wasm
dist/ff-ext-793a8876bb5256ae_bg.wasm
dist/ff-ext-793a8876bb5256ae_bg.wasm
dist/ff-ext-a98d0f18bde50465_bg.wasm
dist/ff-ext-793a8876bb5256ae_bg.wasm

Expected
One of the following to happen

trunk to pick up binary that has the same name as the package
trunk to emit an error since there is an ambiguity in what to build with an explanation on how to add a <link data-trunk ... /> tag into index.html to resolve the ambiguity and exit with a non-zero code.

Thanks for the awesome tool!
It is extremely handy to have a single command to build a deployable dist with a single command with no npm dependencies!

I am willing to provide an implementation if the course of action is OK with maintainers

Hello there. There is indeed rather strange behavior; however, I am not so sure that this is an issue with Trunk. Technically, Trunk simply uses Cargo to perform the builds, and will interpolate details into the call to cargo based on the details (or lack thereof) in the <link data-trunk rel="rust"/>.
As stated in the docs here: data-bin: (optional) the name of the binary to compile and load. If the Cargo project has multiple binaries, this value will be required for proper functionality. So, this is apparently some ambiguity with Cargo (as that is what is used to build any Rust code), and in order to address this, you should use the data-bin attribute in your rel="rust" link in order to address this issue.
Hopefully that helps :). If so, I'll let you close this issue.

Additionally, we could detect such cases proactively, and then bail with a warning to ensure that folks don't run into this type of issue.

I'll see how difficult it is to add this check

Please see related PR
https://github.com/thedodd/trunk/pull/476


Fix Syntax issue when closing a script on the same line

This PR fixes a syntax highlight issue when closing a script tag on the same line.
The issue is caused because of the .*> which matches twice, first were we would expect, after <script> and then again after <script></script> because all ></script is captured by .*
My change seems to fix it without introducing regressions.

Before:

After:

I put some minimal reproductions on the main description, here's my real use case:
Before:

After:

Sure, not a problem


ReadMe Step 3: Number 11

Step 3: Number 11: Instruction says:
Find the Client ID value and copy it aside, you will need this later when configuring your application.
Nowhere do I see this "Client ID" of the service being used again in ReadMe. So what is the point of copying it and setting it aside? I suspect this is the reason this sample is failing with AccessDenied

Microsoft has renamed it to Application ID