[TS migration] Migrate 'Tab.js' lib to TypeScript

Details

Migrated Tab.js to TS. I had to move ONYXKEYS.SELECTED_TAB to the COLLECTION section. Previously, it was put in the wrong place.
Fixed Issues

$ https://github.com/Expensify/App/issues/24816
PROPOSAL: N/A
Tests

[ ] Verify that no errors appear in the JS console
[ ] Go to the Request Money flow
[ ] Switch tabs, check if everything works

Offline tests

N/A
QA Steps

[ ] Verify that no errors appear in the JS console
[ ] Above tests

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

https://github.com/Expensify/App/assets/104823336/1bda5bcc-48f8-48b1-b893-3717033b2155

Mobile Web - Chrome

https://github.com/Expensify/App/assets/104823336/77996b20-6ff8-4f16-9310-6cb0f00c1f2a

Mobile Web - Safari

https://github.com/Expensify/App/assets/104823336/9405b261-dd1e-49f6-80e8-8640a7a94267

Desktop

https://github.com/Expensify/App/assets/104823336/d9f5dec0-4ed0-4846-9508-f1c9f76f9bdc

iOS

https://github.com/Expensify/App/assets/104823336/ebf20d9a-5859-4dc4-8907-6c2796c2ac25

Android
https://github.com/Expensify/App/assets/104823336/dda5cae6-2a4a-4b7d-9676-10573ca7febf

More context why selectedTab has to be moved to collection keys.

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/johnmlee101 in version: 1.3.69-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/mountiny in version: 1.3.69-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to staging by https://github.com/johnmlee101 in version: 1.3.70-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.70-8 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

Thanks for migrating SELECTED_TAB to a collection, it's been on my todo list 😄


completion handler

A completion handler with success/error of the operation inside setImageURL method could be useful in order to place another (local) image if download fails or url is not valid.
It should be very easy to integrate if you have used AFNetworking.
Great class man!

Thanks !
So a placeholder image for unsuccessful download. Is that your point ?

Done and tagged 1.1.0. Thx !


[BUG] Pair Score Sentence Transformer Training is not supported on Google Collab

Prerequisites

[X] I have read the documentation.
[X] I have checked other issues for similar problems.

Backend
Colab
Interface Used
CLI
CLI Command
Link from README.md https://colab.research.google.com/github/huggingface/autotrain-advanced/blob/main/colabs/AutoTrain.ipynb
I am attempting Pair Score Sentence Transformer Training.
UI Screenshots & Parameters
No response
Error Logs
Training is starting... Please wait!
INFO     | 2024-08-31 01:57:16 | autotrain.cli.autotrain:main:60 - Using AutoTrain configuration: config.yml
Traceback (most recent call last):
File "/usr/local/bin/autotrain", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/autotrain/cli/autotrain.py", line 61, in main
cp = AutoTrainConfigParser(args.config)
File "<string>", line 4, in __init__
File "/usr/local/lib/python3.10/dist-packages/autotrain/parser.py", line 142, in __post_init__
raise ValueError(f"Task `{self.task}` is not supported")
ValueError: Task `st` is not supported
An error occurred while starting training!
Error: Training failed with exit code: 1

Additional Information
No response

fixed in v0.8.14 and above.


Too many open files - getcwd (Errno::EMFILE)

Running rake spec:controllers crashes with following stacktrace
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/formatters/base_formatter.rb:110:in `expand_path': Too many open files - getcwd (Errno::EMFILE)
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/formatters/base_formatter.rb:110:in `backtrace_line'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/formatters/base_text_formatter.rb:129:in `format_caller'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/formatters/base_text_formatter.rb:67:in `block in dump_pending'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/formatters/base_text_formatter.rb:64:in `each'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/formatters/base_text_formatter.rb:64:in `dump_pending'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/reporter.rb:75:in `block in notify'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/reporter.rb:74:in `each'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/reporter.rb:74:in `notify'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/reporter.rb:22:in `conclude'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/reporter.rb:14:in `report'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/command_line.rb:24:in `run'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/runner.rb:55:in `run_in_process'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/runner.rb:46:in `run'
	from /Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/runner.rb:10:in `block in autorun'
rake aborted!
ruby -S bundle exec rspec ./spec/controllers/activities_controller_spec.rb ./spec/controllers/application_controller_spec.rb ./spec/controllers/attractions_controller_spec.rb ./spec/controllers/authentication_spec.rb ./spec/controllers/destinations_controller_spec.rb ./spec/controllers/home_page_controller_spec.rb ./spec/controllers/hotels_controller_spec.rb ./spec/controllers/invites_controller_spec.rb ./spec/controllers/itineraries_controller_spec.rb ./spec/controllers/itinerary_templates_controller_spec.rb ./spec/controllers/peru_controller_spec.rb ./spec/controllers/places_controller_spec.rb ./spec/controllers/rooms_controller_spec.rb ./spec/controllers/sessions_controller_spec.rb ./spec/controllers/stays_controller_spec.rb ./spec/controllers/transportation_options_controller_spec.rb ./spec/controllers/travel_tips_controller_spec.rb ./spec/controllers/user_action_logger_controller_spec.rb ./spec/controllers/users_controller_spec.rb ./spec/controllers/visits_controller_spec.rb ./spec/controllers/wishes_controller_spec.rb failed
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/rake_task.rb:139:in `rescue in block (2 levels) in initialize'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/rake_task.rb:135:in `block (2 levels) in initialize'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:1112:in `verbose'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rspec-core-2.5.0/lib/rspec/core/rake_task.rb:131:in `block in initialize'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
/Users/aakash/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/bin/rake:19:in `load'
/Users/aakash/.rvm/gems/ruby-1.9.2-p136@cleverbootz/bin/rake:19:in `<main>'

I am running Rails 3.0.4 + rspec-core 2.5.1 + rspec-rails 2.5.0 with ruby 1.9.2p136 on Snow Leopard

I'm seeing this suddenly on a project, rake spec has been working fine (during a Rails 2.3 -> 3.0.10 upgrade), but it seems the closer I'm getting to making all the specs pass this suddenly popped up out of nowhere.
Environment:

rspec (2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
rspec-mocks (2.7.0)
rspec-rails (2.7.0)

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
What else can I provide to help trace this issue?

Having this same issue. Using the same versions as @kennethkalmer

I'm not able to duplicate this on my system, so my guess is it has to do with the integration of a specific set of libraries. Can either of you (@jsmestad or @kennethkalmer) put a repo up on github that I can clone, bundle, run and see the error?

I'm seeing this error with the latest rspec config too.
/rspec-core-2.8.0/lib/rspec/core/formatters/base_formatter.rb:16:in `expand_path': Too many open files - getcwd (Errno::EMFILE)

Environment :

rspec (2.8.0)
rspec-rails (2.8.1)

➜  ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]

Removing this line in a spec seems to fix this issue
before { I18n.locale = :en }

This may come from my upgrade from 10.7.2 to 10.7.3 ...

I saw a similar error:
Errno::EMFILE:
Too many open files - export LANG=C && identify -ping /var/folders/Zs/ZsrfIQQ9GX8aKUqzkFG0XU+++TI/-Tmp-/mini_magick20120225-7817-17gqsdi.jpg 2>&1

I started seeing this after upgrading to carrier_wave 0.5.8. Reverted to 0.5.4 and the issue went away.


zl size issues

The last PR did improve the current situation, but now I'm experiencing crashes in Pd!
This happens when I recreate an object and reinstantiate it with a different list size as in:

Note that first the object needs to receive something, apparently, one way or another, something seems wrong when changing the size, and that wasn't happening before

The problem with "group" I mentioned on the facebook chat still remains. It won't process a list with length = 5 if it's size is set to 3

nothing really happens when you clicjk the list with 5 elements (it should group and output the first 3 elements, then store the remaining 2 for the next grouping). So I need to send it single float values so it can group into a list.

So, this last PR changed the behaviour for "anythings". This is an image I sent yesterday before the last PR, you can see it would process an "anything" message like "x 1 2 3 4 5" and output its lenght.

Well... now... what happens is that it'll print out "0"

but if you give it a proper list, then it'll do the thing and work as it should, so either of this messages will output "3" (which is the maximum list size).

Similarly, in "reg" mode, if you give it an anything, it won't process, when the size is less than the input list.

but it works when it is a list

fixed with https://github.com/porres/pd-cyclone/pull/379


Finish converting sal-submit

https://github.com/salopensource/sal-scripts/blob/main/payload/usr/local/sal/bin/sal-submit

https://github.com/forvitinn/swift-sal/commit/5a0d14aa29a122349563e45ac53a455dcb39fd0c


Addition of lighted and shaded triangles to PSM3D

This should be achieved via a settable lighting mode and configurable ambient and directional lights.

Shaded triangles added in 20bd23f8f0f8c23832abf5d69776e926cc205e01. Lighting system to be worked on soon.

Lighting system with ambient and diffuse lighting added in 32b158f708f44873e30e7485978c65e8aee98f44.


How to dump the machine code after AOT compilation?

Hi, I want to dump the compiled machine code but I don't find the related option.
How could I do it? Thank you!

There's no "official" way to do this but for debugging what you can do is call Module::serialize (or wasmtime compile) and then run objdump -S on the output. While not "officially supported" we're unlikely to change that since Wasmtime developers themselves frequently use it for debugging.

Depending on what you need it for, you might also find wasmtime explore helpful; it'll produce an HTML-format dump correlating wasm instructions with the machine code that they were compiled into.

Oh thank you @jameysharp I keep forgetting to mention that as well! And it's probably a lot more useful than objdump to bood!


What can we do to make the model return results faster? It's really slow now？

What can we do to make the model return results faster? It's really slow now？

Without any other detail, hard to help. Usually, it's because people are loading a huge 12B model on a small GPU, or no GPU. When the work is partly on the CPU, it's very slow. Please see the README: https://github.com/databrickslabs/dolly#generating-on-other-instances This tells you how to fit the models on various GPUs, which also gives you a sense of the hardware required. Generation takes seconds to tens of seconds depending on model and hardware.

This is my graphics card information, but it usually takes me 5-6 minutes to respond
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.12    Driver Version: 525.85.12    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla V100-SXM2...  On   | 00000000:00:1B.0 Off |                    0 |
| N/A   39C    P0    69W / 300W |   3125MiB / 16384MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  Tesla V100-SXM2...  On   | 00000000:00:1C.0 Off |                    0 |
| N/A   37C    P0    62W / 300W |   3125MiB / 16384MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   2  Tesla V100-SXM2...  On   | 00000000:00:1D.0 Off |                    0 |
| N/A   39C    P0    68W / 300W |   3197MiB / 16384MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   3  Tesla V100-SXM2...  On   | 00000000:00:1E.0 Off |                    0 |
| N/A   39C    P0    67W / 300W |   3197MiB / 16384MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A     46308      C   ...onserver/bin/tritonserver     3122MiB |
|    1   N/A  N/A     46308      C   ...onserver/bin/tritonserver     3122MiB |
|    2   N/A  N/A     46308      C   ...onserver/bin/tritonserver     3194MiB |
|    3   N/A  N/A     46308      C   ...onserver/bin/tritonserver     3194MiB |
+-----------------------------------------------------------------------------+```

tokenizer = AutoTokenizer.from_pretrained("databricks/dolly-v2-7b", padding_side="left")
model = AutoModelForCausalLM.from_pretrained("databricks/dolly-v2-7b",device_map="auto", trust_remote_code=True)
......
input_ids = tokenizer(PROMPT_FORMAT.format(instruction=prompt), return_tensors="pt").input_ids.to("cuda")
gen_tokens = model.generate(input_ids, pad_token_id=tokenizer.pad_token_id, eos_token_id=end_key_token_id,
do_sample=True, max_new_tokens=max_length, top_p=top_p, top_k=0)[0].cpu()

You want to load in float16 on V100s, but otherwise that looks OK. Splitting across GPUs can be a double-edged sword - you probably don't fully utilize them as tensors have to move across 4 devices. But I wouldn't think that makes it so slow. You can check the device map from model.hf_device_map; you might try device_map="sequential" too.
Inference takes about 5-15 seconds on a single A10, in comparison.


OTel: bump to 1.32.0/1.26.0, detect resource attrs in CLI

This is the first time bumping since adding the replace pinning to module go.mods, and it took a bit of a rework to deal with go.work.
In particular, any modules that rely on go.work need to additionally have a replace rule installed to go.work, otherwise you'll get an error as soon as you bump one module's individual replace rules.
So now the go.mod and go.work replacing happens by running go mod edit and go work edit in PostCommands, which also avoids the issue of modfile.ParseLax not parsing replace rules.
Also, now we go mod tidy before go work use . which is important for bumping the Go version that ends up in go.work.

note: holding off on this, since nothing requires it, and it currently breaks the Bass SDK 😭
Error logs:

✘ .withExec(args: ["go", "build", "-o", "/bass", "./entrypoint"]): Container! 0.6s
# dagger.io/dagger/telemetry
/go/pkg/mod/dagger.io/dagger@v0.12.2/telemetry/exporters.go:92:23: cannot use log (variable of type "go.opentelemetry.io/otel/sdk/log".Record) as *"go.opentelemetry.io/otel/sdk/log".Record value in argument to e.OnEmit
! process "go build -o /bass ./entrypoint" did not complete successfully: exit code: 1

I think the fix is trivial - the Bass SDK should just be using the internal codegen'd telemetry package instead - but yeah, this would still break modules in the ecosystem.
Safest bet might be to just fix the Bass SDK and give time for peoples' dependency graph to roll forward to it.

Maybe a specific reason to do this - we can't bump grpc until we add this.
https://github.com/grpc/grpc-go/blob/e8055ea11f96238b0fb14b1062abb598c33fc9c3/go.mod#L13-L18


Maljdan/job handler finished limit

Pull Request Description
What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)
It starts addressing issue #112
What are the significant changes in functionality due to this change request?
It improves the performance of the JobHandler. Better queuing system

For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.

[ ] 1. Review all computer code.
[ ] 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
[ ] 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
[ ] 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
[ ] 5. If significant functionality is added, there must  be tests added to check this. Tests should cover all possible options.  Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in  XML block, the node <internalParallel> to True.
[ ] 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change.  The requirements and the requirements test shall be in sync.
[ ] 7. The merge request must reference an issue.  If the issue is closed, the issue close checklist shall be done.
[ ] 8. If an analytic test is changed/added is the the analytic documentation updated/added?

please remove old code rather then commenting

Job Test qsubs:linux-hpc on 00ef2a3 : invalidated by @alfoa


Support for "Adaptive Order Independent Transparency with Raster Order Views" on Metal 2?

Hi,
just tested these "new transparency sample" on Windows.. Raster Order Groups mode works OK on DX API..
doing a quick test on Vega of these sample on Macos seems the Raster Order View variant (Intel paper) is missing on Macos altough Metal2 supports "Raster Order Groups"..
As you probably know Raster Order Groups is an optional feature of Metal2 but it's implemented on Vega Metal2 driver, as it shows :
areRasterOrderGroupsSupported 1
so are you planning to implement Raster order group support on the transparency sample on Macos?
would be nice as there aren't many (if any) samples of using Raster Order Groups on Metal..
also note I opened some time ago an issue requesting exposing Raster order groups in Vulkan:
https://github.com/KhronosGroup/Vulkan-Ecosystem/issues/27
so hope eventually it's exposed and transparency AOIT mode can be supported also on Vulkan..
thanks..

Hi Antoine,
nice.. wasn't aware that there weren't also any wave intrinsics Metal samples..
good to know interested in giving a look on ROV on Metal.. as there are some Apple provided samples but they seem all IOS only and targeted towards showing new A11 chip features and using also things like imageblocks.. so not directly portable to MacOS without some thought..
thanks..

Hi,
just pointing out that VK_EXT_fragment_shader_interlock is available so a ROV sample could be supported now on all APIs (D3D12,VUlkan,Metal2)

ROV sample now supported on D3D12, Vulkan.

Can we close it then?


Added iview-table-page to Table

Combines Table and Page components of iview UI together. Based on Vue 2.x.

Mail received, I revise it before submitting. Thank you。
At 2019-07-21 14:41:26, "kazuya kawaguchi"<EMAIL_ADDRESS>wrote:
@kazupon requested changes on this pull request.
Thank you for your PR!
Always add your items to the end of a list. To be fair, the order is first-come-first-serve.
https://github.com/vuejs/awesome-vue/blob/master/CONTRIBUTING.md
CONTRIBUTING.md have a rule in the above.
Could you update the it please?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I have already submitted it. Please check it. Thank you.

Thank you  @kazupon  @vue-bot


Do not use ops.testing._TestingFilesystem

After https://github.com/canonical/operator/pull/960 (ops 2.5.0), we now get
.tox/scenario/lib/python3.10/site-packages/scenario/fs_mocks.py:7: in <module>
    from ops.testing import _TestingFilesystem, _TestingStorageMount  # noqa
E   ImportError: cannot import name '_TestingFilesystem' from 'ops.testing'

@PietroPasotti Are you looking at this error? This is preventing us from using ops >= 2.5.0

Just back from holiday, will take a look soon


[Feature Request]: "Remember me" / persistent sessions

Description
Hi there, thanks for the great package!
As someone with pretty limited confidence in auth / security, I was wondering how I should go about implementing persistent sessions (aka. the "Remember me" option)? I'm not building something handling especially high-risk data (or I probably wouldn't bother with something like that), but I'd like to get things right anyways.
From my understanding after skimming through a few posts on the InfoSec Stack Exchange, just setting a long expiration for the session doesn't do the trick, since the tokens don't get hashed in the database and an unhashed persistent token would be password equivalent (until it's invalidated at least).
Yet creating a new key feels conceptually wrong and seems like it leads to a whole new set of issues, like not getting removed on invalidateAllUserSessions, which breaks a bit with the nice structure and abstractions we get with Lucia. I would also anticipate that this leads to having to implement some solution where the client passes their token as a password whenever they're in a persistent session etc. etc. and I'm very quickly starting to feel out of my comfort zone! :D
A few posts also mentioned the potential overkill of using a password hashing algorithm for session tokens, where the key space would already be huge, along with some other approaches like the one mentioned here that seems not-replicable by relying on the existing key / session primitives.
Is there a nice way to approach this using Lucia as-is that I'm not seeing, and if not is it something that may be supported in a future release?

I'm not sure what kind of "remember me" feature you're looking for? Either way, persistent session that outlasts auth kinda negates the point of having short, rotating auth sessions, no?  With the current set up, you can configure Lucia to generate sessions with a longer timeout.

Yup, your understanding of the expiration is correct.

I think I have bigger problems

Yeah, you should be worrying about emails and stuff like that.


model dependent on dataset order

I have ran into a situation where it appears that simply reordering the input dataset changes the output model. I make sure that X,y are reordered jointly, of course. repeat training on the same order dataset reproduces the exact same results. So, this is not some general stochasticity, but rather changes with the samples order in the dataset.
I have tried reading the knot_candidates and knot_search code to find if there is anywhere the data order could come into play, but was unable to follow the code well enough to detect such a place.
I cannot share my actual data, so I will try to reproduce this with a demo dataset. In the mean time, I would be grateful to know if this is expected, or if it is surprising to others as it is to me. I would appreciate any direction for further testing this, or suggestions for how to prevent this from happening, if it can be done.

UPDATE:
I tried printing the summary for different models trained from different orderings of the dataset, and it seems that the knots are selected identically, but the prunning ends up with different models (different terms are pruned or not).
This seems to indicate that the issue might lie within the prunning process. I will try to take a look in that part of the code next.

UPDATE (2):
Looking at the trace for two models trained of two different orderings of the dataset I noticed that while the Forward pass trace is the same for both (except for knot numbers being different due to different order in the dataset), the prunning trace looks different from the 0th iteration. Specifically, this is the last line of the Forward trace for both-
Forward Pass
--------------------------------------------------------------------
iter  parent  var  knot  mse        terms  gcv      rsq    grsq
--------------------------------------------------------------------
...
52    0       1    355   7.745107   102    244.473  0.594  -11.781
--------------------------------------------------------------------
Stopping Condition 0: Reached maximum number of terms

And the first lines of the prunning pass for both-
1:
Pruning Pass
--------------------------------------------------
iter  bf   terms  mse    gcv      rsq    grsq
--------------------------------------------------
0     -    102    7.75   244.473  0.594  -11.781
1     87   101    7.74   223.585  0.594  -10.689

2:
Pruning Pass
--------------------------------------------------
iter  bf   terms  mse    gcv      rsq    grsq
--------------------------------------------------
0     -    102    7.75   244.699  0.594  -11.792
1     10   101    7.74   223.505  0.594  -10.684

I find it curious that although the prunning trace in 1 indicates that the 0th iteration starts from the same values as the finish of the forward pass, for prunning trace 2 there are slight differences in the 0th iteration already. In the first iteration we can see that different terms are being pruned as well. This leads, in the end, for the two models to end up with different terms unpruned, as well as a different number of terms kept in the model, four terms for one model and five for the other.
Any idea as to why the prunning seems to start from a different point than the Forward phase ended? Or am I misinterpreting the traces?

@odedbd Thanks for this report.  This is not desired behavior.  I'm guessing there is some numerical instability in the pruning code.  These things can be tough to track down, so it would of course help a lot if you could provide some way to reproduce it.  If you're comfortable sharing data privately, feel free to email me (address is on my github page) and we can set up any method of transfer you're comfortable with (including an NDA if necessary).  If not, any descriptive statistics you can give about your data set might help.  For example, you can use numpy.linalg.cond to calculate the condition number of your data (and your transformed data).
Is one of the pruned models substantially worse than the other?  Also, can you share system information such as operating system, python version, numpy version, etc?
Finally, as a workaround some people have used py-earth without pruning in a pipeline with an elastic net or similar model.  Assuming the elastic net model is not sensitive to data ordering, this would potentially solve your problem (assuming this is actually causing a problem for you).

@jcrudy Thank you for your suggestions. I have sent you an email re sharing the data privately.
In the mean time, using ElaticNet sounds like an interesting idea for my use cases. I especially like the potential for shrinking coefficients non-sparsely using some ridge regularization. Is there anything to it more than setting allow_pruning=False when running fit, then using the transform method before running ElasticNet fit? I guess I should be able to construct a scikit-learn Pipeline with the Earth estimator acting as a transformer, right?

I've finally looked into this.  The issue is caused by the pruning of terms with extremely similar contributions to MSE.  These terms are so similar that choosing which to prune comes down to comparing the 15th digit or so.  Changes in data ordering can affect this 15th digit due to completely reasonable numerical instability in various numpy algorithms.  While it's slightly annoying that this behavior occurs, I'm thinking it isn't worth it to try to fix since it will generally not result in a worse model, just a different model.
@odedbd, there may be use cases I haven't thought of in which this behavior is harmful.  If you have one, please let me know.  For now, I'm marking this as wontfix.

@jcrudy Thank you for taking the time to look into this. For my internal use case this produced a more problematic outcome, but I am unsure whether that was due to similar 15th digit instability or not. What's the best way for me to check this? Is there some verbosity flag I could set in order to see what the differences in MSE are during training?

@odedbd Are you comfortable installing from source?  I can make a branch that will print out the information you need during fitting.

@jcrudy That would be great. Please let me know what branch I should checkout and how to make sense of the printouts.

@odedbd The branch is called issue_179.  If you compare the _pruning.pyx file against master, you'll see that all I did was make it print out the basis function and loss after removal for each term at each step of pruning whenever verbose >= 2.  It's not nicely formatted or anything, but should do what you need.
In case you're unfamiliar with how the pruning pass works, here it is:  at each step of pruning, for every term in the model, the term is removed, the loss is calculated, and the term is replaced.  The term whose removal resulted in the smallest increase in loss is then removed.  The process repeats until no terms remain.  The terms from the step that had the smallest loss (in terms of GCV) make up the final model.
So, using this higher verbosity, you should be able to see the how different the losses are from removing different terms at each step.

@jcrudy thanks for setting up the branch. I will try to build the code and test it on my use case. I'll update with my findings.

@jcrudy I am unable to properly build the issue branch. The python setup.py install command seemed to have worked without giving out any error. However, when I try from pyearth import Earth I get an exception:
ImportError: No module named _forward
I do see in the setup.py install output the lines-
copying build\lib.win-amd64-2.7\pyearth_forward.c -> build\bdist.win-amd64\egg\pyearth
copying build\lib.win-amd64-2.7\pyearth_forward.pxd -> build\bdist.win-amd64\egg\pyearth
copying build\lib.win-amd64-2.7\pyearth_forward.pyd -> build\bdist.win-amd64\egg\pyearth
My working environment is 64bit Windows 10 with python2.7. I tried running the build using the VS 64bit command console.
Any suggestions on what I might need doing? I am currently setting up a new environment on ubuntu16.04 with python2.7, I plan to try running the build there as well.

@odedbd Apologies, I just saw that this post went unanswered.  Have you changed directories after installing with setup.py?  If not, that will probably fix the problem.

@odedbd I mean as in the cd command.  Often people have the problem you're seeing because they have tried to run py-earth from the source directory.


Update for new nested buffer protocol

Adresses https://github.com/ipython/ipywidgets/issues/1220. I did do not have much time, feel free to edit.

Thanks. I'll fix a few things and merge.

Thanks!

Looks good 👍 . Again the seperate.. :roll_eyes:


Getting some kind of file error and undefined variable

This happens for all options, and I have tried editing the code, but it just breaks more. I would appreciate some help.

I managed to get further, but now I get a "HTTP Error 400: Bad Request" error when trying to use the answer bot. It is also the only one that gets further.

I currently don't have access to my GitHub account nor any of my other
accounts so I can't help you BUT I wish you the best of luck with fixing
the issue♥
On Tuesday, March 12, 2024, smashbombs @.***> wrote:

This happens for all options, and I have tried editing the code, but it
just breaks more. I would appreciate some help.
—
Reply to this email directly, view it on GitHub
https://github.com/CPScript/Kitty-Tools/issues/73#issuecomment-1989923857,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT5HQA755WTLCFUVTASL5CDYXZU4TAVCNFSM6AAAAABERNAFC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZHEZDGOBVG4
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

you need to download pytython...


add support for custom tag in gitops template

Type of Change

[ ] Bugfix
[X] Enhancement / new feature
[ ] Refactoring
[ ] Documentation

Description
see https://github.com/Staffbase/gitops-github-action/pull/89
Checklist

[ ] Add relevant labels (for example type of change or patch/minor/major)
[ ] Make sure not to introduce some mistakes
[X] Update documentation
[ ] Review the Contributing Guideline and sign CLA
[ ] Reference relevant issue(s) and close them after merging

I have read the CLA Document and I hereby sign the CLA

recheck

If I understand the change correctly, the custom tag is always preferred. Does this mean that you only create releases with the custom tag? Otherwise, you use the normal logic? 🤔 If this is the case, I would adapt the documentation as it only affects the prod tag.

Correct; we have a monorepo and want to tag with prefix/version, and use the action to release code within the prefix folder with version version, so an initial step extracts both variables and the gitops workflow uses them.
I'll update the docs and rerequest review.


[Bug]: When playing a live stream using opencv after several hours the program stops.

Description
When playing a live stream using opencv after several hours the program stops.
and this is shown in the terminal
tls @ 0x7f866699c300] Error in the pull function.
[tls @ 0x7f866699ba40] Error in the pull function.
[tls @ 0x7f866bf40880] Error in the pull function.
[tls @ 0x7f866bf59440] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866bf4db40] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866be61940] Error in the pull function.
[tls @ 0x7f866bf53e00] Error in the pull function.
[tls @ 0x7f866699c840] Error in the pull function.
[tls @ 0x7f866699c840] Error in the pull function.
[tls @ 0x7f866699bc00] Error in the pull function.
[tls @ 0x7f866699c840] Error in the pull function.
[tls @ 0x7f866bf60c80] Error in the pull function.
[tls @ 0x7f866699be80] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866bf53e00] Error in the pull function.
[tls @ 0x7f86669cbe40] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866bf59440] Error in the pull function.
[tls @ 0x7f866bf53e00] Error in the pull function.
[tls @ 0x7f866bf59440] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866bf59440] Error in the pull function.
[tls @ 0x7f8655055d00] Error in the pull function.
[tls @ 0x7f866bfdef40] Error in the pull function.
[tls @ 0x7f8655f70340] Error in the pull function.
[tls @ 0x7f8655f80ec0] Error in the pull function.
[tls @ 0x7f8655f6d040] Error in the pull function.
[tls @ 0x7f8655f81880] Error in the pull function.
[tls @ 0x7f8655fa0900] Error in the pull function.
[tls @ 0x7f8655f81880] Error in the pull function.
[tls @ 0x7f8655fbcd00] Error in the pull function.
[tls @ 0x7f8655fb3780] Error in the pull function.
[tls @ 0x7f865509a9c0] Error in the pull function.
[tls @ 0x7f8655f81880] Error in the pull function.
[tls @ 0x7f8655ffdb80] Error in the pull function.
[tls @ 0x7f8655ff8fc0] Error in the pull function.
Issue Checklist

[X] I have searched open or closed issues for my problem and found nothing related or helpful.
[X] I have read the Documentation and found nothing related to my problem.
[X] I've read the Issue Guidelines and wholeheartedly agree.

Expected behaviour
run code
No problems
4 to 6 hours later
video stops
Actual behaviour
run code
No problems
4 to 6 hours later
video stops
Steps to reproduce
run code
No problems
4 to 6 hours later
video stops
Terminal log output
08:25:19 ::    Helper     ::   INFO   :: Running VidGear Version: 0.2.6
08:25:19 ::    Helper     :: WARNING  :: GStreamer not found!
08:25:19 ::    CamGear    ::   INFO   :: Verifying Streaming URL using yt-dlp backend. Please wait...
08:25:23 ::    CamGear    ::   INFO   :: [Backend] :: Streaming URL is fully supported. Available Streams are: [144p, 240p, 360p, 480p, 720p, 1080p, best, worst]
08:25:23 ::    CamGear    :: WARNING  :: Livestream URL detected. It is advised to use GStreamer backend(`cv2.CAP_GSTREAMER`) with it.
[tls @ 0x7f866699c300] Error in the pull function.
[tls @ 0x7f866699ba40] Error in the pull function.
[tls @ 0x7f866bf40880] Error in the pull function.
[tls @ 0x7f866bf59440] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866bf4db40] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866be61940] Error in the pull function.
[tls @ 0x7f866bf53e00] Error in the pull function.
[tls @ 0x7f866699c840] Error in the pull function.
[tls @ 0x7f866699c840] Error in the pull function.
[tls @ 0x7f866699bc00] Error in the pull function.
[tls @ 0x7f866699c840] Error in the pull function.
[tls @ 0x7f866bf60c80] Error in the pull function.
[tls @ 0x7f866699be80] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866bf53e00] Error in the pull function.
[tls @ 0x7f86669cbe40] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866bf59440] Error in the pull function.
[tls @ 0x7f866bf53e00] Error in the pull function.
[tls @ 0x7f866bf59440] Error in the pull function.
[tls @ 0x7f866be487c0] Error in the pull function.
[tls @ 0x7f866bf59440] Error in the pull function.
[tls @ 0x7f8655055d00] Error in the pull function.
[tls @ 0x7f866bfdef40] Error in the pull function.
[tls @ 0x7f8655f70340] Error in the pull function.
[tls @ 0x7f8655f80ec0] Error in the pull function.
[tls @ 0x7f8655f6d040] Error in the pull function.
[tls @ 0x7f8655f81880] Error in the pull function.
[tls @ 0x7f8655fa0900] Error in the pull function.
[tls @ 0x7f8655f81880] Error in the pull function.
[tls @ 0x7f8655fbcd00] Error in the pull function.
[tls @ 0x7f8655fb3780] Error in the pull function.
[tls @ 0x7f865509a9c0] Error in the pull function.
[tls @ 0x7f8655f81880] Error in the pull function.
[tls @ 0x7f8655ffdb80] Error in the pull function.
[tls @ 0x7f8655ff8fc0] Error in the pull function.

Python Code
from vidgear.gears import CamGear
import cv2

stream = CamGear(source='live-video-url', stream_mode = True, logging=False).start() # YouTube Video URL as input

while True:
    frame = stream.read()
    cv2.imshow("Output Frame", frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

VidGear Version
0.2.6
Python version
3.9.6
OpenCV version
4.6.0
Operating System version
mac, windows 10
Any other Relevant Information?
No response

This not a Vidgear related bug but the FFmpeg backend your installed OpenCV binaries are using. As mentioned clearly in docs, you need to Install OpenCV with Gstreamer Backend to solve this error: https://abhitronix.github.io/vidgear/latest/help/camgear_faqs/#how-to-compile-opencv-with-gstreamer-support


data picker tests: fix "Set element prop via the data picker" tests

https://github.com/concrete-utopia/utopia/pull/5780 removed the test suite that this issue refers to


Pass userID prop to chat adapter setUserId()

Fixes #2818

Changelog Entry
Added

Resolves #3544. Send user ID from props to chat adapter, by @timenick in PR [#3544)(https://github.com/microsoft/BotFramework-WebChat/issues/3544).

Changed

Bumped all dependencies to the latest versions, by @compulim in PR #3594, PR #3694, and PR #3544

Production dependencies

<EMAIL_ADDRESS>

Specific Changes

Bumped to<EMAIL_ADDRESS>Will now call directLine.setUserId if the function is available on the chat adapter

This will pass the user ID from Web Chat prop, to DLJS just before it connect
In scenarios, secret or token without user ID, developer can pass user ID thru props and the bot receiving the start conversation activity will receive the user ID

Need update the package.json and add tests after DLJS changes released.
Related to https://github.com/microsoft/BotFramework-DirectLineJS/pull/316

[x] I have added tests and executed them locally
[x] I have updated CHANGELOG.md
[x] I have updated documentation

Review Checklist

This section is for contributors to review your work.

[x] ~Accessibility reviewed (tab order, content readability, alt text, color contrast)
[x] ~Browser and platform compatibilities reviewed
[x] ~CSS styles reviewed (minimal rules, no z-index)
[x] ~Documents reviewed (docs, samples, live demo)
[x] ~Internationalization reviewed (strings, unit formatting)
[x] package.json and package-lock.json reviewed
[x] ~Security reviewed (no data URIs, check for nonce leak)
[x] ~Tests reviewed (coverage, legitimacy)

Adding [DRAFT] to this since there are DLJS changes & tests blocking. @timenick please remove [DRAFT] and ping us again when you're ready.

Verified the behavior with @p-nagpal and we agree it looks good.


use micrometer metrics exporter

Based on #23

gRPC not supported anymore
env vars not supported anymore, because they will only affect the trace and log exporter

I needed to add the following to build.gradle
implementation "io.opentelemetry:opentelemetry-semconv:$otelVersion-alpha"
without it, I got an error for an error for the import:
import io.opentelemetry.semconv.resource.attributes.ResourceAttributes in OpenTelemetryConfig

I needed to add the following to build.gradle
implementation "io.opentelemetry:opentelemetry-semconv:$otelVersion-alpha"

Thanks - fixed :smile:


DigitalOcean Buckets/Spaces, firewalls and load balancers

(All) the tests fail, and some assistance is appreciated. Probably the code can be simplified and tidied up a bit. Feel free to push to my branch; it's open to repository owners.
You can tick off the two items in #1194 that relate to Digital Ocean once this has been merged.

Hey @atombrella  - this is great, thanks for contributing!
Looks to me like trivial things, for example - https://github.com/aquasecurity/tfsec/pull/1246/files#diff-c1653e36b79f10d53f0fd47f68061d5e04cc0969d6778850b05f4da72b73506bR80 - the ForwardingRules aren't being added to the loadbalancer, but the load balancer is being added to the returned loadbalancers
I've made a tweak below which fixes that particular issue.
func adaptLoadBalancers(module block.Modules) (loadBalancers []compute.LoadBalancer) {

	for _, block := range module.GetResourcesByType("digitalocean_loadbalancer") {
		forwardingRules := block.GetBlocks("forwarding_rule")
		fRules := []compute.ForwardingRule{}

		for _, fRule := range forwardingRules {
			rule := compute.ForwardingRule{}
			rule.EntryProtocol = fRule.GetAttribute("entry_protocol").AsStringValueOrDefault("", fRule)
			fRules = append(fRules, rule)
		}
		loadBalancers = append(loadBalancers, compute.LoadBalancer{
			ForwardingRules: fRules,
		})
	}

	return loadBalancers
}

Hey @atombrella  - happy to make the changes to the branch if you want, I was assuming you'd want a hint at the issue. I'm easy either way - we just really appreciate the contributions :+1:

I fixed the spaces tests :tada: However, I'm not really sure what I'm doing wrong with the firewall adapters, as those tests fail.

@atombrella Cool, nice one, I'll take a quick look at the firewall issue.

@atombrella the remaining issues were all entirely my own fault, so I've pushed fixes accordingly. Thanks for your perseverance!


Incorrect use of alias_method for Formula#plist

Methods that are expected to be overridden by child classes cannot be alias_method'ed.
From the Ruby docs:
#alias_method(new_name, old_name) ⇒ self (private)

Makes new_name a new copy of the method old_name. This can be used to retain access to methods that are overridden.

In Formula#plist, we see that the default method (that returns nil) is being aliased as :startup_plist. This means Formula#startup_plist will always execute the nil-returning plist method, even when #plist is overridden by child classes.
Pure Ruby example:
class C
  def f; 13; end
  alias_method :g, :f
end

class D < C
  def f; 31; end
end

# 2.3.0:3> c = C.new; [c.f, c.g]
# => [13, 13]
# 2.3.0:4> d = D.new; [d.f, d.g]
# => [31, 13]

Intended result would be d.g to return d.f == 31
This breaks formulae using inline plists (by defining the #plist method) and brew-services, which will invoke formula.startup_plist.
Formula example:
$ brew create "http://example.com/example_app-1.0.tar.gz" --no-fetch
# Add a `plist` method to the formula

$ brew cat example_app
# => https://gist.github.com/f764b0f5fd6d5a9447ac1dfaf44b1e04

$ brew irb
irb(main):001:0> f = Formulary.factory("example_app")
=> #<Formula example_app (stable) /usr/local/Library/Taps/homebrew/homebrew-core/Formula/example_app.rb>
irb(main):002:0> f.plist
=> "<!-- XML content -->\n"
irb(main):003:0> f.startup_plist
=> nil

Here we expected f.startup_list to return the XML content in f.plist

Methods that are expected to be overridden by child classes cannot be alias_method'ed.

What would the correct solution here be, for our learning?
Unrelatedly, f.startup_plist is deprecated at this point anyway so should probably just be removed if it's been broken for this long.

Simply define #startup_list invoking #plist:
class Formula
  def plist; nil; end
  def startup_plist; plist; end
end

class App < Formula
  def plist; "<!-- XML is like violence -->"; end
end

f = Formula.new; p [f.plist, f.startup_plist]
# => [nil, nil]
app = App.new; p [app.plist, app.startup_plist]
# => ["<!-- XML is like violence -->", "<!-- XML is like violence -->"]


bug fixes 2.0

Fixed bug with inability to download spreadsheet and error messages not showing. Added updates where temperature and other features only allow numbers in the spreadsheet. Added (g/L) and (ug/mL) to generated metadata outputs.


jQuery DatePicker href #

Moment.js v2.12.0 combined with jQuery UI v1.11.4 will produce a DatePicker that will open a new page with a # href link when a date is clicked in the calendar. I guess one could suppress it with event.preventDefault() but I do not observe this behavior in Moment.js v2.11.2.

I highly doubt this is an issue in moment :) We do nothing related to windows, events, clicks, globals etc etc etc. Just the js Date object.
I'd rerun the experiment and look for other changes.

Agreed.  There's nothing in moment that could possibly affect that.  If you can reproduce a snippet somewhere (such as jsFiddle), then I'll help you track down the problem.


Oracle JDBC Interceptor for X-Ray

Customers have requested an additional Oracle-style JDBC interceptor to complement the existing MySQL and PgSQL interceptors.

You may want to use the brand new decorator:
https://github.com/aws/aws-xray-sdk-java/issues/88#issuecomment-570328275


CORGI_657 duplicate product stream manifest packages

Combine all upstream and provides components into a single distinct 'packages' list for de-duplication in product stream manifest.

@juspence Please merge this once you're done with the data migration on stage.


AppSyncApi: support lambda authorizer

Currently, there is no way to set the defaultAuthorization or additionalAuthorizationModes prop on SST's AppSyncApi construct's AppSyncApiProps to a LAMBDA authorizationType and supply it's config. I've been trying to use the cdk constructs and even tried creating the graphApi and importing it into the AppSyncApi construct but to no working avail.
Would be nice to be able to do something to this effect:

// Add to and create Appsync Api:
    const appsyncApi = new sst.AppSyncApi(this, 'graph-authz-api', {
      graphqlApi: {
        schema: "graphql/schema.graphql",
        authorizationConfig: {
          defaultAuthorization: {
            authorizationType: appsync.AuthorizationType.API_KEY,
            apiKeyConfig: {
              expires: cdk.Expiration.after(cdk.Duration.days(365)),
            },
          },
          additionalAuthorizationModes: [
            {
              authorizationType: appsync.AuthorizationType.LAMBDA,
              lambdaAuthorizerConfig: {
                handler: iAuthZFn
              }
            }
          ]
        },
      },
      ...
   }

We are transition this repo to https://github.com/sst/v2 and are closing this issue for now. If it is still relevant please reopen it there - sorry for the trouble


Use swift-frontend from the host for SupportedFeatures.json

Addresses rdar://71282911

@swift-ci please build toolchain

@swift-ci please smoke test

Follow up of #34655

Hmm, Im not sure how this is supposed to work.  There are two scenarios here:

you are building the standard library only and you specify the SWIFT_NATIVE_SWIFT_TOOLS_PATH
you are building the Swift toolchain for testing which will build the standard library.  In such a case, SWIFT_NATIVE_SWIFT_TOOLS_PATH is not set, and swift-frontend should be used from SWIFT_RUNTIME_OUTPUT_INTDIR.

In fact, I would argue that the first case doesn't apply to this at all - the SupportedFeatures.json should be generated when generating the toolchain, so it should always be executed from the output directory.  Even in the cross-compilation case, it should be the version of the toolchain that is being built that determines the features of the toolchain, not the host toolchain that may be used in the generation of the toolchain.
Perhaps the right thing to do here is to only generate it if the toolchain is not being cross-compiled, that is:
if(NOT CMAKE_CROSSCOMPILING).

SWIFT_NATIVE_SWIFT_TOOLS_PATH is used during the compilation of the macOS toolchain -- in particular when we are cross compiling we are setting that to the host toolchain we just built (see https://github.com/apple/swift/blob/main/utils/build-script-impl#L1791), which should be what we want.
This target seems only run if we are building bin\swift-frontend, so the change should not affect building the stdlib only

@swift-ci please test Windows

@swift-ci please test stdlib with toolchain

Build failed
Swift Test OS X Platform
Git Sha - 3055b686055755511875ea1313000ae628a295b0

This target seems only run if we are building bin/swift-frontend, so the change should not affect building only the standard library

Thats what I had assumed and hence why I had said

I would argue that the first case doesn't apply to this at all - the SupportedFeatures.json should be generated when generating the toolchain

This code path is specific to building the toolchain.  But, I wanted to verify that the assumption was correct.  It seems that it is.

SWIFT_NATIVE_SWIFT_TOOLS_PATH is used during the compilation of the macOS toolchain -- in particular when we are cross compiling we are setting that to the host toolchain we just built (see https://github.com/apple/swift/blob/main/utils/build-script-impl#L1791), which should be what we want.

This is where I think that the problem actually is.

Perhaps the right thing to do here is to only generate it if the toolchain is not being cross-compiled, that is:
if(NOT CMAKE_CROSSCOMPILING).

AIUI, the features are meant to be the features of the toolchain being built, not the features with which the toolchain was built.  This means that we need to run the binary that is being generated.  This requires that we are not cross-compiling.  In the case that we are cross-compiling, we have no good way to ensure that the toolchain was built at the same revision and same configuration (configuration can impact the feature set in theory).

Sorry for not understanding your point in the first place -- I based my fix on a similar issue (https://github.com/apple/swift/pull/33402) without realizing that in this case that the role of the executable itself is more relevant.

Just a note about this point,
you are building the Swift toolchain for testing which will build the standard library.
In such a case, SWIFT_NATIVE_SWIFT_TOOLS_PATH is not set

Even if SWIFT_NATIVE_SWIFT_TOOLS_PATH is not externally passed in by CMake, it is internally defined and used, so it has always been set to something and can be used for invocations like this. I don't know about features.json, so not saying anything about the overall pull.

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 3055b686055755511875ea1313000ae628a295b0
Install command
tar zxf  swift-PR-34686-494-ubuntu16.04.tar.gz
More info

Thanks everyone for the feedback!
Closing this for the sake of clarity.

macOS Toolchain
Download Toolchain
Git Sha - 3055b686055755511875ea1313000ae628a295b0
Install command
tar -zxf  swift-PR-34686-767-osx.tar.gz --directory ~/


CI remote pull_request_target

I found that building the image every time a PR is submitted will trigger the API current limit with a certain probability, so I removed the image build every time the PR is submitted and retained the logic of building the image after the merge is successful.

/assign

ref: https://github.com/arduino/setup-protoc/issues/6


python311Packages.pettingzoo: init at 1.24.3

Description of changes
Add python package pettingzoo, an API standard for multi-agent reinforcement learning environments, with popular reference environments and related utilities.
Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 309813 run on aarch64-darwin 1

2 packages marked as broken and skipped:

python312Packages.pettingzoo
python312Packages.pettingzoo.dist

2 packages failed to build:

python311Packages.pettingzoo
python311Packages.pettingzoo.dist

4 packages built:

python311Packages.pytest-markdown-docs
python311Packages.pytest-markdown-docs.dist
python312Packages.pytest-markdown-docs
python312Packages.pytest-markdown-docs.dist

Result of nixpkgs-review pr 309813 run on aarch64-linux 1

2 packages marked as broken and skipped:

python312Packages.pettingzoo
python312Packages.pettingzoo.dist

6 packages built:

python311Packages.pettingzoo
python311Packages.pettingzoo.dist
python311Packages.pytest-markdown-docs
python311Packages.pytest-markdown-docs.dist
python312Packages.pytest-markdown-docs
python312Packages.pytest-markdown-docs.dist

Result of nixpkgs-review pr 309813 run on x86_64-darwin 1

2 packages marked as broken and skipped:

python312Packages.pettingzoo
python312Packages.pettingzoo.dist

2 packages failed to build:

python311Packages.pettingzoo
python311Packages.pettingzoo.dist

4 packages built:

python311Packages.pytest-markdown-docs
python311Packages.pytest-markdown-docs.dist
python312Packages.pytest-markdown-docs
python312Packages.pytest-markdown-docs.dist

Result of nixpkgs-review pr 309813 run on x86_64-linux 1

2 packages marked as broken and skipped:

python312Packages.pettingzoo
python312Packages.pettingzoo.dist

6 packages built:

python311Packages.pettingzoo
python311Packages.pettingzoo.dist
python311Packages.pytest-markdown-docs
python311Packages.pytest-markdown-docs.dist
python312Packages.pytest-markdown-docs
python312Packages.pytest-markdown-docs.dist

Result of nixpkgs-review pr 309813 run on x86_64-darwin 1

2 packages marked as broken and skipped:

python312Packages.pettingzoo
python312Packages.pettingzoo.dist

6 packages built:

python311Packages.pettingzoo
python311Packages.pettingzoo.dist
python311Packages.pytest-markdown-docs
python311Packages.pytest-markdown-docs.dist
python312Packages.pytest-markdown-docs
python312Packages.pytest-markdown-docs.dist

Result of nixpkgs-review pr 309813 run on aarch64-darwin 1

2 packages marked as broken and skipped:

python312Packages.pettingzoo
python312Packages.pettingzoo.dist

6 packages built:

python311Packages.pettingzoo
python311Packages.pettingzoo.dist
python311Packages.pytest-markdown-docs
python311Packages.pytest-markdown-docs.dist
python312Packages.pytest-markdown-docs
python312Packages.pytest-markdown-docs.dist

Result of nixpkgs-review pr 309813 run on aarch64-linux 1

2 packages marked as broken and skipped:

python312Packages.pettingzoo
python312Packages.pettingzoo.dist

6 packages built:

python311Packages.pettingzoo
python311Packages.pettingzoo.dist
python311Packages.pytest-markdown-docs
python311Packages.pytest-markdown-docs.dist
python312Packages.pytest-markdown-docs
python312Packages.pytest-markdown-docs.dist

Result of nixpkgs-review pr 309813 run on x86_64-linux 1

2 packages marked as broken and skipped:

python312Packages.pettingzoo
python312Packages.pettingzoo.dist

6 packages built:

python311Packages.pettingzoo
python311Packages.pettingzoo.dist
python311Packages.pytest-markdown-docs
python311Packages.pytest-markdown-docs.dist
python312Packages.pytest-markdown-docs
python312Packages.pytest-markdown-docs.dist


New section and, website, grammar question

Added Goods after discussion with fluffypony
Added cryptonit.net under this section
Used the esperanto form of monero. This has implication, because so far we avoided the matter of choosing because we avoided the plural. This doesn't mean only English plural or only Esperanto plural is accepted - both could, like both color and colours are accepted. Still, style-wise, it is better to stick to one word (color everywhere or colour everywhere) so this question still remains for -s vs -j.

Why not use it as an adjective for this?
"Physical Monero coins"

Yep, forgot there is no plural for adjective in English. This only postpone the matter though (not that I have problem with postponing - urgent first, less urgent later).
We shall mention Bitcoin coins too, we should not filter the content that a website sell (as long as it is legal, of course)
"Physical Monero and Bitcoin coins"

My personal opinion is that a plural can be skipped completely:

"That'll be 5 Monero, sir"
"How many Monero do I owe you?"
"They sell Monero on Poloniex"
"The vast quantity of Monero available"

I can't (yet) think of a sentence where plurality is necessary.

Don't we say "That'll be 5 dollars, sir"?
/me thought he understands English plural

Yes we do, but not every currency name behaves like that. Take French Francs, for example:-P
A better example is the Yen. We don't say "that'll be 5 Yens, sir", we just say "that'll be 5 Yen, sir", and then karate-chop them into oblivion.

OK so let's go with Physical Monero and Bitcoin coins (ugly "coin-coin" here, but Monero has to be first!)

Sounds good - if you make the changes to your patch-5 branch and push them then this PR will update and I can merge it

Seems to be done. I'll wait confirmation before closing, though.

Perfect:)


Expose Decimal struct

This PR expose Decimal struct detail. So json/json5 can use it to parse double.

only types needed here? If that's the case, I would rather duplicate its definitions to avoid inter-dependencies

No, the to_double needed also. It pulls nearly whole strconv pkg.


[$500] IOS - Request - Camera blinks when switching between tabs

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.3.90-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Issue found when executing PR https://github.com/Expensify/App/pull/28792
Action Performed:

Go to + > Request money
Go to Scan and enable camera access if not allowed yet
Go to Distance, then Manual a few times
Go back to Scan

Expected Result:
The camera should not blink when switching between tabs
Actual Result:
Camera blinks when switching between tabs
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[x] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

Staging:
https://github.com/Expensify/App/assets/78819774/a1e719fd-a44c-4363-9c67-f9724eaf9f12
Production:
https://github.com/Expensify/App/assets/78819774/8789ba6d-21bc-49c1-87f0-70ce45214b75

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~019e1abb1d81693a85
Upwork Job ID:<PHONE_NUMBER>381212672
Last Price Increase: 2023-10-25

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

Identify the pull request that introduced this issue and revert it.
Find someone who can quickly fix the issue.
Fix the issue yourself.

@isabelastisser You are right. Issue was found when executing PR https://github.com/Expensify/App/pull/28792

So you're right on the cause, I'm wondering if it's a bug or just how phone cameras work - it's not actually blinking, it's just - for a second - showing the last image it saw before you navigated away. Like, point it at one thing, switch away, point it at another thing, and then switch back to the camera - you'll see the first thing for a second. I think it might just be the camera initializing again?
But maybe we could send it selectedTab just a second earlier, it looks like it might not be triggered until the tab is fully visible, rather than on press. If we could activate it earlier then maybe it could work.
Also cc @dukenv0307 @mountiny @mananjadhav who worked on that PR because I know very little about cameras.
@ishpaul777 I think you can build for a physical device via XCode? I'm not sure if that requires any special access or anything

This is bit of a bummer because I couldn’t this on iOS physical device myself.
I can see the issue right now, but I am afk and I am not sure if I can confirm the exact behavior as of now.

Confirmed not a blocker, we should still look into this though! It looks like the new code activates the camera later than it used to - so only when the camera is fully in view, rather than as soon as the button is pressed, or as soon as the scroll begins. So we should figure out a way to get that activated earlier, without undoing the fix made in #28792

Sounds like an external issue, adding label

I agree this is not a blocker, I have seen the blink but I have seen that in previous versions too @dukenv0307 I think this should be handled as a regression from your PR though as it introduced it cc @sonialiap

@mountiny we'll want to fix this in https://github.com/Expensify/App/issues/27879 and then pay the reporter, is that correct?

Yeah I think ideally @dukenv0307 and @mananjadhav would take care of this as a regression (or at least an improvement) from #27879 - let me know if you think differently @mountiny

I agree we can take this as an improvement from the previous PR. But we would still need help to test it on IOS.
@dukenv0307 can we please work on the follow up PR?

I can help testing. I can install app on iOS physical device

I agree this should be treated as a regression and so we could also close this issue, pay the reporter first but handle this in the original issue

Okay cool, that works for me. Closing! I just commented on the main issue with these details.


Bump k8s to 0.18 dependencies

Related: https://github.com/knative/eventing/pull/3348
Proposed changes

./hack/update-deps.sh --upgrade
Propagate context.Context

/cc @slinkydeveloper

/lgtm
/approve


RT-5.4: Aggregate Forwarding Viable

Fixes #450
Test checked and run internally

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1181

Relevant Lines:
2098

💛  - Coveralls


feature request: test if passing expression to empty()

http://us3.php.net/manual/en/function.empty.php

Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.

would it be possible to test if an expression is being passed to empty()?
but still allow vars/properties such as empty(Yii::app()->user->id) and empty(self::$myProperty)
unit-testing should catch empty(getSomeValue()) from going to prod in a 5.4 environment... we all have unit-testing right?  ☺

Hi @bkdotcom
Unfortunately, we cannot test on that as PHPMD is a static code analysis tool. We do not execute the code and getting the information out of the code examples you provided, would depend on executing the code.

Don't mistake my request as a request to catch runtime errors like
// I don't expect/want phpmd to catch this
$var = null;
$var->foo; // Notice: Trying to get property of non-object

Nor am I expecting phpmd to catch undefined property/method type runtime errors.
If a visual code inspection (static analysis performed by human) can determine validity then static analysis performed by algorithm should be able to as well
I don't know what type of static analysis tools are at our disposal.
This is likely a "is it worth the effort/expense" question
This isn't my area of expertise at all, but I cobbled together a big ugly regex that seems to do a decent job for a first effort.

/**
 * nothing at runtime (that I can think of) will change whether or not these are "valid" / "invalid"
 *  (non-object / undefined property/method type runtime errors aside)
 */

$snipsValid = array(
    '$dingus',
    '$dingus->$varProp',
    '$dingus::$staticProp',
    '$dingus->prop',
    '$dingus->prop["foo + bar"]',
    '$dingus->prop[foo + bar]->prop',
    '$dingus->someMethod()->prop',
    'dingus::$staticProp',
    'dingus::someMethod()->prop',
    '${$classVar}->{$varProp}',
    '${$classVar}->$propVar',
);
$snipsInvalid = array(
    'trim($name)',
    '$var+$var',
    '1+1',
    '0',
    '"string"',
    'MYCONST',
    'dingus::MYCONST',
    '$dingus::MYCONST',
    '$dingus->buildObj()',
);

test($snipsValid, true);
test($snipsInvalid, false);

/**
 * This in no way attempts to validate whether snips will parse, logic errors, etc.
 * Nor expected to detected non-object / undefined method/prop type runtime errors
 */
function test($testArray, $expect)
{
    $regExProp = '(\w*|\{\$\w+\})(\[.+?\])*';
    $regEx = '/^
        \s* # ignore leading whitespace
        (
            \$(\w|\{\$\w+\})+                   # var followed by
            (::\$'.$regExProp.'|::\w+\(       # 0 or 1 static prop or method
                .*?                 # method params
            \)(?=::|->))?
            |                       #   OR
            \w+                     # classname followed by
            (::\$'.$regExProp.'|::\w+\(       # static prop or method
                .*?                 # method params
            \)(?=::|->))
        )
        (->'.$regExProp.'(\(       # 0 or more property or methods
            .*?         # method params
        \)(?=::|->))?)*
        (->\$?'.$regExProp.')?
        \s* # ignore trailing whitespace
    $/x';
    $success = true;
    foreach ($testArray as $test) {
        $isVar = preg_match($regEx, $test);
        if ($isVar != $expect) {
            echo 'Test Failed for '.htmlspecialchars($test).' expected '.($expect?'true':'false').'
';
            $success = false;
        }
    }
    if ($success) {
        echo 'all is well
';
    }
}

outputs:
all is well
all is well

This is likely a "is it worth the effort/expense" question

Good point and I tend to say it is not as it is quite an edge case.


WG Charter updates

Hi. The OSSF TAC is seeking to get an issue(1) closed out. We want to ensure all working groups have a complete charter.md file and as I reviewed this group's file I noticed that this WG does not have a charter in place. The Tooling WG has the best example of what we'd like to see(2), it can be copied and adjusted for this WG. Can you please make a copy, review with the WG, adjust as needed, and post it into your repo? Thank you for your assistance in this matter.
(1) - https://github.com/ossf/tac/issues/9
(2) - https://github.com/ossf/wg-security-tooling/blob/main/CHARTER.md

https://github.com/ossf/project-template/issues/4

After discussion in the WG meeting today. We will wait for further wordsmithing on the template (linked above). Then we'll customize it with a pointer to our goal (https://github.com/ossf/wg-securing-critical-projects#focus) and leads (co-chairs).

Charter has been updated and merged into repo.


Last Standing Issue : Blur Page which occurs on some pages

I am personally having issues with removing the blur myself. And I see your code also is.
Any thoughts or ideas on how to get around this? Or how it is chosen which pages will be blurred?
I cant even manually figure out how to bypass the blur in dev tools.

Well, they arent blurring the images, they are just fetching a low res png image from their server and scaling to look blurred, it's just a big low-resolution picture. I am looking into it.
You can star the repo and check in once in a while or also do pull requests for suggestions.

I noticed it was a tiny image too, after playing with the html. Any ideas on what can be done to resolve this? There has to be an original image we can find and load somehow. However it may be dynamic and difficult to do.

Hey @danieltyukov  or @lol98lol98x any chance you guys have thought of a fix for this? Praying you do somehow :(

Hello, I installed 2.3.0 on edge/mac and still get blurred pages.
Thanks

Hey @danieltyukov,
dont know if you ralized yet, but fetching the low res images p. ex.: "page3.webp" as the file "bg3.png" will return you the full res image from the server without checking any authentification ;)
Im currently still having my finals but would love to help you implement a workaround!

Hey @danieltyukov, dont know if you ralized yet, but fetching the low res images p. ex.: "page3.webp" as the file "bg3.png" will return you the full res image from the server without checking any authentification ;)
Im currently still having my finals but would love to help you implement a workaround!

Show me an example link vs what it should be. And I'll try to automate it via javascript

Hey @danieltyukov, dont know if you ralized yet, but fetching the low res images p. ex.: "page3.webp" as the file "bg3.png" will return you the full res image from the server without checking any authentification ;)
Im currently still having my finals but would love to help you implement a workaround!

really cool man, if you can either make a pr or drop me some instructions on how you achieve that ill make a release under your name for this repo.

For a noob ,,, how to you fetch the *.png instead .
Right Clicking and saving isnt working

@o0LINNY0o in the newest release the png should be fetched automatically and is added to the created print-preview.
If there occur any issues let me know :)

@o0LINNY0o in the newest release the png should be fetched automatically and is added to the created print-preview. If there occur any issues let me know :)

i downloaded and install the source and the 2.3.0 and i still get this :
https://imgur.com/a/8DaIfAl

Sure thing & thanks for your support.
Here is the 2.3.0 Error
https://imgur.com/a/oxRUf1C
the Manually Downloaded Code was creating a clear download , but the pages were made up of the previous clear picture...
eg. Page 2 was repeated for a blurred out Page 3

@L30-stack @o0LINNY0o
https://github.com/danieltyukov/studocuhack/releases/tag/v2.4.0
latest release has the changes fixing the error + L30 changes, feedback is welcome, ill keep this issue open for now

@L30-stack the blur page is still there, I am still checking over your added code, and your reference links, I think they added secure protection for those pages on the server side right?

Hey @o0LINNY0o,
I just tested your document. The issue you get is unfortunately currently not supported.
Studocu sometimes separates documents in a background (we support loading the full res image) and text in the front (currently not supported).
Therefore in your case the text from page 1 is displayed in all pages where the new background was added but no text was available. (Page 3,6...)

@L30-stack the blur page is still there, I am still checking over your added code, and your reference links, I think they added secure protection for those pages on the server side right?

The full res pages are only added to the pdf document view in the second window. Still works fine for me

From the network logs, it looks like they implemented something similar to this: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html
I don't think this is possible to circumvent.

@tooxo i am currently overall studying their method, this part you got right, here is some basic info you can then through reference dig deeper on bypassing that stuff too https://labs.detectify.com/writeups/bypassing-and-exploiting-bucket-upload-policies-and-signed-urls/


LED negative numbers

Continuation of #41 .

There's a function addLeadingZeroIfNeeded that ensures we don't start with a . or : - perhaps put that after any -, so -.1 turns into -0.1 and -:01 turns into -0:01?


add color to category

Create front for insert category with color
In add event: will be show all user categories with their color

Codecov Report

Merging #228 (53164f3) into develop (cff596e) will decrease coverage by 0.26%.
The diff coverage is 87.23%.

@@             Coverage Diff             @@
##           develop     #228      +/-   ##
===========================================
- Coverage    98.77%   98.50%   -0.27%
===========================================
  Files           64       64
  Lines         2849     2872      +23
===========================================
+ Hits          2814     2829      +15
- Misses          35       43       +8

Impacted Files
Coverage Δ

app/routers/categories.py
87.17% <83.33%> (-9.38%)
:arrow_down:

app/routers/event.py
98.07% <100.00%> (+0.02%)
:arrow_up:

Continue to review full report at Codecov.

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

Thank you for the fixes! Great work :)


We should allow retrying chainsafe's rate limit error

  2024-03-25T12:59:29.939024Z ERROR opendal::services: service=chainsafe operation=delete path=3c38dba2-dd61-47e2-b154-77376d69003e -> Unexpected (permanent) at delete => {
  "message":"API rate limit exceeded"
}

Context:
   uri: https://api.chainsafe.io/api/v1/bucket/***/rm
   response: Parts { status: 429, version: HTTP/2.0, headers: {"date": "Mon, 25 Mar 2024 12:59:29 GMT", "content-type": "application/json; charset=utf-8", "content-length": "41", "x-ratelimit-remaining-second": "479", "x-ratelimit-remaining-minute": "2929", "x-ratelimit-remaining-hour": "0", "x-ratelimit-remaining-day": "87456", "x-ratelimit-remaining-month": "2918516", "x-ratelimit-remaining-year": "19783341", "ratelimit-limit": "10000", "ratelimit-remaining": "0", "ratelimit-reset": "31", "retry-after": "31", "x-ratelimit-limit-second": "500", "x-ratelimit-limit-minute": "3000", "x-ratelimit-limit-hour": "10000", "x-ratelimit-limit-day": "100000", "x-ratelimit-limit-month": "3000000", "x-ratelimit-limit-year": "20000000", "x-kong-response-latency": "5", "server": "kong/3.4.0"} }
   service: chainsafe
   path: 3c38dba2-dd61-47e2-b154-77376d69003e

https://github.com/apache/opendal/actions/runs/8420412461/job/23055166794

E       opendal.UnexpectedError: Unexpected (persistent) at Writer::close, context: { uri: https://api.chainsafe.io/api/v1/bucket/***/upload, response: Parts { status: 429, version: HTTP/2.0, headers: {"date": "Mon, 25 Mar 2024 16:08:20 GMT", "content-type": "application/json; charset=utf-8", "content-length": "41", "x-ratelimit-remaining-second": "500", "x-ratelimit-remaining-minute": "2545", "x-ratelimit-remaining-hour": "0", "x-ratelimit-remaining-day": "55808", "x-ratelimit-remaining-month": "2886868", "x-ratelimit-remaining-year": "19751693", "ratelimit-limit": "10000", "ratelimit-remaining": "0", "ratelimit-reset": "3100", "retry-after": "3100", "x-ratelimit-limit-second": "500", "x-ratelimit-limit-minute": "3000", "x-ratelimit-limit-hour": "10000", "x-ratelimit-limit-day": "100000", "x-ratelimit-limit-month": "3000000", "x-ratelimit-limit-year": "20000000", "x-kong-response-latency": "5", "server": "kong/3.4.0"} }, service: chainsafe, path: random_file_f3633685-6ce7-4e24-b106-1c0db5ac7275 } => {
E         "message":"API rate limit exceeded"
E       }

chainsafe has high rate limits now.

I have disabed it for now in https://github.com/apache/opendal/pull/4381


Http Error 404: Animepahe

Source name
Animepahe
Source language
English
Source link
https://animepahe.ru/
Other details
Whenever I redownload Aniyomi, it works but suddenly stops after like a week or two and keeps saying "HTTP ERROR 404"
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a title with source name.
[X] I have updated all installed extensions.
[X] I have opened WebView and checked that the source website is down.
[X] I will fill out all of the requested information in this form.

We don't manage that extension anymore.


Added AngouriMath

Mathematics/AngouriMath - AngouriMath
It's a library for symbolic manipulations (from parsing expressions to solving equations/printing in latex/calculus/linear algebra/etc) for .NET.
I hope it's allowed to suggest own projects, as long as they meet the criteria:
Generally useful to the community: it seems to be so. It's quite young and yet, people already use it.
Actively maintained: yes, very actively (all issues are considered within a couple of hours, most get closed by the next release).
Stable: yes in a sense, that could be used in a production. Not in the sense that it has no bugs :).
Documented: yes, in code, in Wiki, in website's Wiki, and in website's Almanac of functions.
Tests: yes, for C#, F#, and C++ parts. ~80% coverage, if it's needed.
Thank you for your consideration.

I hope it's allowed to suggest own projects

Thats what people do all the time :smile:
Looks good to me!

@pleb, hey, sorry for ping. Is quozd doing okay? I see there has been no activity on his GH profile since March or about so, just wondering, if he's doing well.


fix: remove old overlay delete

This change is

Now that all nodes in the network are using > 1.0.0, we can remove this bit of old code.

there's a lot of this stuff and not just here... locastore, statestore and other places. btw the assumption that all nodes are running over 1.0 is one thing, but you're effectively blocking old nodes of a migration path to upgrade (conceptually. whether it is really needed is a different story).


Upgrade when.js to latest

When.js is currently at v1.7.1, latest available (as of now) is 3.7.7.  Looking at the changes betwen latest and then, there are plenty of 'massive' performance improvements.  Might be a good idea to upgrade to take advantage.  There are two 'breaking' versions between there so would require looking through all promise code to bring into a+ compliance.
As an aside, you may want to consider putting when.js as a dependency in package.json (though there are probably good reasons for just committing it).

Thanks @mmacaula!  We've been discussing changing our promise library recently.  I think we're going to look into replacing when with bluebird.  @mramato can elaborate, but I think there's a feature in the version of when that we're using that makes it a little more work to upgrade, but we'd like to take care of this soon.

Sounds great!  Yeah I think i've seen that 'feature' around the code, I suspect it's the passing of onFulfilled handlers to things like when(). Bluebird definitely seems to be the fastest out there now, but when.js is definitely not far behind (or far enough to matter maybe).
Feel free to close this issue if it's easier to manage.

Specifically the feature in the old version of when.js that we rely on (for better or worse) is that calling .then on resolved promises executes immediately.  Promises A+ requires that handlers must be invoked on the next turn of the loop, which is an unfortunate choice from a performance perspective.  More detail here: http://thanpol.as/javascript/promises-a-performance-hits-you-should-be-aware-of/
In practical terms in Cesium, upgrading without addressing this change in behavior would add several frames of extra latency on every terrain and imagery tile load.

It looks like Bluebird has features that would help with dealing with this: http://bluebirdjs.com/docs/api/synchronous-inspection.html

@shunter I was just looking at the synchronous inspection stuff yesterday.  I may try and do this at the code sprint next week.

@mramato would we upgrade to Bluebird or use ES6 promises?  Could we wait that long for ES6 to be widely used?

Native ES6 Promises are fairly limited and it still makes a lot of sense for us to use Bluebird in Cesium. (For example, there is no finally function, no map, each, etc..)

Hello from next year! Is there still a plan to move from When to Bluebird?  I use native promises extensively and it's a bit of a hassle to keep track of which flavor I'm getting depending on where it came from...

Hi @thw0rted, no update here.  This is something that we'd love to do, but it's going to be a huge undertaking and we haven't been able to prioritize this yet.  If we were to do this today I think we'd probably still choose bluebird for promises.

I would be more than happy to review a PR if someone was interested in working on this.  The initial port (while touching a ton of code) shouldn't be too bad from a complexity standpoint.  With some helper functions you might be able to do things incrementally on a branch without breaking everything at once.

Just as an aside: I hadn't read up on the state of promise libraries in a while, and the last time I looked into it the main selling point was that native (A+) Promise support was still spotty.  I was all set to make a case for abandoning libraries, then I read some of those articles with performance comparisons -- and now I think I might go ahead and switch my own code to Bluebird.  Man, this native stuff is slow!

Hello from a year and a half later!  Has anybody on the team thought about this issue recently?  Matt did the big ES6 conversion, and it occurred to that this might be a good time to take a look at the state of asynchronous best practices today.  Is Bluebird still the gold standard?  Does moving to async/await help with the performance problems from 2016?  I know one of the concerns that came up during the ES6 project was how to handle ThirdParty deps -- getting rid of when altogether would be a pretty big win in that department.

I actually have a branch that gets rid of when completely and just uses native promises.  Not sure of its current state, but it only took like an hour to do: https://github.com/AnalyticalGraphicsInc/cesium/tree/promises-promises
That branch was forked from ES6 and is way out of date.  I would probably just start over again with master when I have time.
The main work is:

Figure out a solution for IE or combined Cesium.js, do we polyfill in combined only?  Not polyfill at all and tell the user to do it?
Hard performance numbers to make sure it's not negatively impacted.
I think the specs are completely broken and need to be fixed, we do some weird things so it requires investigation
General testing to make sure we didn't introduce other regressions.


Radio player

Sorry, looks like we never responded on this, but it's out of scope of the project, which we're maintaining as a simple example. People can publish their extensions separately, for example this list: http://ktinkerer.co.uk/list-mods-raspberry-pi-aiy-project/