feat: fast const pow

Implement efficient pow2 and pow10 using const arrays
Pull Request type

Please check the type of change your PR introduces:

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] Documentation content changes
[ ] Other (please describe):

What is the current behavior?

Currently, the implementation of pow2 and pow10 functions uses if/else branches, which is less efficient than using lookup tables.
Issue Number: N/A
What is the new behavior?

Implement pow2 and pow10 using const arrays for efficient lookup
Update keccak code to use the new pow2 implementation
Significant gas usage reduction (e.g., keccak test gas usage reduced from 2,399,388 to 1,289,988)

Does this introduce a breaking change?

[ ] Yes
[x] No

Other information

This PR takes advantage of Cairo 2.7.0's reintroduction of "dw like hardcoded function results" via const arrays to implement efficient lookup tables for pow2 and pow10. These functions are commonly used in various projects, including Alexandria for bitshifting and in DeFi applications for handling ERC20 decimals. I introduced a u128 version (should be the one used in most usecases), and a u256 version for both pow2 and pow10. The u256 version of pow2 uses the u128 one.
The new implementation significantly reduces gas usage. For example, I updated keccak implementation to use this new function and the test_bytes_keccak test saw a reduction in estimated gas usage from 2,399,388 to 1,289,988.
closes https://github.com/keep-starknet-strange/alexandria/issues/323

I see some places where pow is used pow(2, ...) could you also update those? Same for pow(10, ...)

I can do it but I am not sure it makes sense because pow(2, ...) uses a generic, so it returns T. If I try to replace its usages by pow2 I will usually have to .try_into().unwrap() which implies a range_check which could be avoided by making a variant of pow2 for each type, but it's probably better to wait for a feature of the language allowing us to do it automatically. What do you prefer?

@Th0rgal Guess it is case specific then 🤔 , do as you believe is the best 😄

Okay, here is a summary:

I updated traverse from storage_proof. Initially I used pow2_u256 but we got only about ~8% steps decrease vs ~15% using a new pow2_felt252 which could be useful in other usecases.

I fixed the comment of count_digits_of_base which said it returned a felt252 while it returned a u128 and I returned a u32.

I updated karatsuba to use pow10 (and adapted the typings to use u32 when possible)

I updated armstrong_numbers to use u32 when possible (implied by previous change).

We use pow(2,  x) in the tests, I think that's fine.

I look into BitShift traits, we could update them so they take a u32 n. We should be able to use pow2 (u128 version) without additional range_check on them because we do a & MAX and then try_into() after. Should I do it or do you want to keep the exact type? I think it would cause a lot of breaking changes.

Reimplementing rotate_right: again we should take a u32 n but here we will have to reimplement pow2 for each binary type except u128. I would suggest to wait for a way to do it automatically.

Any idea why the root lock file is changed?

Any idea why the root lock file is changed?

Yes, I added math dependency to alexandria_merkle:
[dependencies]
alexandria_math = { path = "../math" }

I thought it would be cleaner than copy pasting the code, but I can do it if you prefer.

Oh wow... My bad on that one, missed that toml file 😅


Dependencies

It'd be nice if there was a complete list of dependencies somewhere so I can avoid the whole build-getError-installDependency-repeat loop to find them all, especially when it complains about things like check for which it's not clear what I actually need to install...

Easiest way is to grep for "dependency()" in meson.build
$> grep "\<dependency(.*)" meson.build
   dep_udev = dependency('libudev')
   dep_libevdev = dependency('libevdev')
   dep_check = dependency('check', version: '>= 0.9.10')

Then just install the respective .pc file for each dependency with your package manager. In Fedora, you can do that with dnf install 'pkgconfig(libevdev)' and so on.
In the past I found that having a hand-maintained list of dependencies on top of configure.ac/meson.build tends to be outdated.

Perhaps a note on how to do this in the readme might be good, or have the
build do that itself up top?
On Tue, May 16, 2017 at 11:02 AM, Peter Hutterer<EMAIL_ADDRESS>wrote:

Easiest way is to grep for "dependency()" in meson.build
$> grep "<dependency(.*)" meson.build
dep_udev = dependency('libudev')
dep_libevdev = dependency('libevdev')
dep_check = dependency('check', version: '>= 0.9.10')
Then just install the respective .pc file for each dependency with your
package manager. In Fedora, you can do that with dnf install
'pkgconfig(libevdev)' and so on.
In the past I found that having a hand-maintained list of dependencies on
top of configure.ac/meson.build tends to be outdated.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/libratbag/libratbag/issues/158#issuecomment-301629065,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYhndR2o2dgmulYSRNgvvEAL7Py3zTxhks5r6Nl7gaJpZM4Nbr6_
.

--

J.Chris Findlay
(c:

sure, a note in the readme works. Want to submit a PR for that?


Handle AnnData regions tables

With https://github.com/ome/ome-zarr-py/pull/256 (work in progress) we hope to have AnnData tables available to napari-ome-zarr.
I've been using this to read "points" tables and display as tracks:
https://github.com/ome/napari-ome-zarr/pull/81
So now I also want to handle "regions" tables in napari.
I've been looking at the https://github.com/kevinyamauchi/ome-ngff-tables-prototype/blob/main/examples/save_load_squidpy_segment.py example.
The logic as I follow it goes:

The labels layer is added first without any table data
Read the AnnData as dataframe (X and var) and combine it with the obs to give "features_table"
get all the label values from the label.data
get the label IDs from the features_table, e.g. cell_id column, and check if we're missing any label values
If so, duplicate a table row and assign a cell_id so that ALL label values have a corresponding row in the table
Sort the features_table by cell_id, so that the order of rows matches the order of label values in the label layer
Pick a random column to use to color the labels - convert to float and use the range to assign colors
Pass the features_table dataframe to napari as "features" on an NEW labels layer

Then you can use https://www.napari-hub.org/plugins/napari-properties-viewer to show a table of features for each label:
In this screenshot, I edited the code to use cell_id for color rather than a random column:

I was thinking of doing something similar in napari-ome-zarr with the following differences:

Try not to duplicate the labels layer. Just add table info to a single labels layer.
Avoid duplicating rows of data. Either create "blank" rows that only have the cell_id OR possibly use a dictionary for features with cell_id as key instead of a dataframe (might be less performant)?
Don't pick a random column for color - sometimes this causes an error if a string column is picked from the obs data. Either just pick cell_id as above, or not add color at-all.

cc @kevinyamauchi @LucaMarconato @giovp

Another comment on using the table to store other types of geometries: I think that storing points, circles, etc in tables should be considered still as in a prototype phase.
In the ome-ngff-tables-prototype repo we tried to use the table to store points, circles and even (in a hacky way) polygons, as showed in the merfish example, even if the NGFF Table specs doesn't say anything about how to store coordinates in a table, but after these tests, we decided to use tables (in spatialdata) only for storing annotations but not spatial coordinates/geometries. We still use table to annotate features on circles, polygons (so that in a downstream analysis it doesn't matter if, say, cells, are represented as polygons or labels), but we don't allow tables to be in a coordinate system. We instead save the coordinates in .parquet files or ragged representations of polygons saved to Zarr, and we deal with io with libraries like geopandas, dask (dataframes) and dask-geopandas.
In the future we should all share our gained experiences when discussing how to store coordinates, geometries and ROIs in term of future NGFF specs.

Hi Luca, I just tried the spatialdata-sandbox/mibitof download and to_zarr.py....
(spatialdata) Williams-MacBook-Pro:spatialdata-sandbox wmoore$ cd mibitof/
(spatialdata) Williams-MacBook-Pro:mibitof wmoore$ python download.py
(spatialdata) Williams-MacBook-Pro:mibitof wmoore$ python to_zarr.py
Traceback (most recent call last):
  File "/Users/wmoore/Desktop/SPATIALDATA/spatialdata-sandbox/mibitof/to_zarr.py", line 6, in <module>
    from spatialdata import SpatialData
ImportError: cannot import name 'SpatialData' from 'spatialdata' (unknown location)

I have the following versions:
$ pip freeze | grep spatialdata
-e git+https://github.com/scverse/napari-spatialdata@2716a406f28dcf889474ab60671cde360c7327a2#egg=napari_spatialdata
-e git+ssh://git@github.com/scverse/spatialdata.git@8266a0f4a2d6a3ef7373b4f1f855de4a7b3c184c#egg=spatialdata
-e git+https://github.com/scverse/spatialdata-io@55ca02d52030757da62bc69802e34a15e28aa70d#egg=spatialdata_io
-e git+ssh://git@github.com/scverse/spatialdata-notebooks.git@6c54e94874d96450c7a1453f68d53445a7fb0ea0#egg=spatialdata_notebooks

Previously before I updated to latest spatialdata commit, I got:
Traceback (most recent call last):
  File "/Users/wmoore/Desktop/SPATIALDATA/spatialdata-sandbox/mibitof/to_zarr.py", line 7, in <module>
    from spatialdata.transformations import Identity
ModuleNotFoundError: No module named 'spatialdata.transformations'

when at commit:
commit 85a813b285d21fed51405f3fd5cd46f17b3017f9 (HEAD)
Merge: 848e063 72d4732
Author: LucaMarconato<EMAIL_ADDRESS>Date:   Fri Mar 10 00:35:03 2023 +0100
    Merge pull request #183 from scverse/some_docstrings

Any idea what branch/commit I need to use here for all those repos?

@LucaMarconato I don't know if you've seen https://github.com/ome/ngff/issues/178 which discusses other table formats as part (or NOT) of the NGFF spec, including parquet?
@kkyoda is using NGFF AnnData tables to store tracks (e.g. see https://github.com/openssbd/bdz/pull/2) and I have been looking to handle that in napari-ome-zarr to display tracks in napari - see #81
But if you prefer to store points & tracks in parquet then we're already seeing divergence on this and it would be good to converge so we don't waste time on different solutions.
What are the advantages with parquet for that data, compared with AnnData?
Maybe add to the discussion at https://github.com/ome/ngff/issues/178?
I'm not at-all familiar with parquet, and I don't see any maintained JavaScript tools for reading the data, which is a shame but maybe not a blocker.

Any idea what branch/commit I need to use here for all those repos?

Hi, I think the problem is due to the fact that the version in pip is not the current one (we are not updating pip regularly since we haven't released yet). If you do an editable install of the main branch it should work.
Additionally, please mind the following two points:

if you install spatialdata-io or napari-spatialdata it could reinstall spatialdata from pip. I suggest to use editable installs also for those two repos and run pip install -e . spatialdata last, so that the other installations are not overriding it with the pip version.
in napari-spatialdata, the branch to use is spatialdata, we will have to do a major refactoring in that repo and sync it with main, but we don't have time at the moment. It's likely happening next month. Until the refactoring the performance will also suffer, we will address them when working on this issue: https://github.com/scverse/napari-spatialdata/issues/42.

Initially we drafted the table specification to also specify how to store points and other geometries https://github.com/ome/ngff/pull/64#issuecomment-1133393761. But later we decided to simplify it and focus solely on how to use tables to store annotations for labels https://github.com/ome/ngff/pull/64/commits/f8f2fd0f386d779ed153caa4cebed8535bd5ec71.
This is because otherwise the table specification would have required to define transformation and coordinate systems for the coordinates, but the transforms specs are still being discussed, so we wanted to be decoupled from it and rather iterate later on.
As a result of not specifying how to store geometries in the table specification, we selected the storage method that best suited development and runtime efficiency. Currently, we use .parquet files for points and ragged arrays saved to Zarr for circles and polygons. The first makes lazy loading the data possible, the second is convenient for io with geopandas.
After the first iteration of development is complete, and the transformation specification is finalized, we would like to re-discuss how to store points and shapes, agree on a representation and change our io APIs.

OK - so I created a new conda env and reinstalled everything... The installed versions look the same as above, but the import is working this time!
conda create -n spatialdata310 python=3.10
conda activate spatialdata310
cd spatialdata
pip install -e .
cd ../napari-spatialdata/
pip install -e .
cd ../spatialdata-io
pip install -e .
cd spatialdata-notebooks/
pip install -e .

 pip freeze | grep spatialdata
-e git+https://github.com/scverse/napari-spatialdata@2716a406f28dcf889474ab60671cde360c7327a2#egg=napari_spatialdata
spatialdata @ git+https://github.com/scverse/spatialdata.git@8266a0f4a2d6a3ef7373b4f1f855de4a7b3c184c
-e git+https://github.com/scverse/spatialdata-io@23be3852d650b34cc0ae5f4a91ea67acfec11839#egg=spatialdata_io
-e git+ssh://git@github.com/scverse/spatialdata-notebooks.git@d9cfe01cca258b45a34fad8e6db6dd5f5f594a25#egg=spatialdata_notebooks

$ python
Python 3.10.10 (main, Mar 21 2023, 13:41:39) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from spatialdata import SpatialData
>>>

But...
$ cd spatialdata-sandbox/mibitof/
$ python download.py
$ python to_zarr.py

$ python -m spatialdata view data.zarr
/Users/wmoore/opt/anaconda3/envs/spatialdata310/lib/python3.10/site-packages/geopandas/_compat.py:123: UserWarning: The Shapely GEOS version (3.11.1-CAPI-1.17.1) is incompatible with the GEOS version PyGEOS was compiled with (3.10.4-CAPI-1.16.2). Conversions between both will be slow.
  warnings.warn(
/Users/wmoore/opt/anaconda3/envs/spatialdata310/lib/python3.10/site-packages/spatialdata/__init__.py:9: UserWarning: Geopandas was set to use PyGEOS, changing to shapely 2.0 with:

	geopandas.options.use_pygeos = True

If you intended to use PyGEOS, set the option to False.
  _check_geopandas_using_shapely()
Usage: python -m spatialdata [OPTIONS] COMMAND [ARGS]...
Try 'python -m spatialdata --help' for help.

Error: No such command 'view'.

Solved via chat, it was a typo in the info showed in print(), the correct command is python -m napari_spatialdata view data.zarr

Can you please do import spatialdata; print(spatialdata.__path__)? I think that it will give you a path in site-packages and not the one in which you cloned the repo, because I think that this command
cd ../spatialdata-io
pip install -e .

tries to override the editable installation even if it is there.

Ah! There was a problem introduced by a recent pr. I will fix it. Please notice that (at least on my machine), running the commands described in https://github.com/ome/napari-ome-zarr/issues/85#issuecomment-1490381773 will reinstall spatialdata from Github. To restore the editable install I had to do:
pip uninstall spatialdata
# cd spatialdata repo
pip install -e .

Yes, I had already found that I needed to re-install from source! Strange...

Great that it works! One extra info, we uploaded (and we are keeping up-to-date) the various datasets already converted to NGFF in a S3 storage; you can find the URLs here.
We haven't tested loading the data from the cloud yet (I think we have to fix the consolidated metadata). I'll keep you posted, but if you want to also experiment any feedback would be appreciated 😊


D3D12HDR: "Current Output HDR Support" is false

Device: Lenovo ThinkPad X1 Extreme
Graphics Card1: Intel UHD Graphics 630
Graphics Card2: NVIDIA GeForce GTX 1050 Ti Max-Q 4GB GDDR5
"Settings"-"Apps"-"Video playback"-"Stream HDR video" : ON
Using "Movies & TV" to play a HDR10 video, it looks good. But run D3D12HDR sample, the  "Current Output HDR Support" is false, it means that the screen isn't support HDR?
I think the result may be wrong: When use 10bit format, press "H" to switch the output signal to "ST.2084", the display is same as before.

Display need to support HDR10 & you need to enable the same in OS page.

Display need to support HDR10 & you need to enable the same in OS page.

Thanks, after enabled the "HDR and WCG" option, HDR Support is true. Besides, if I disable "HDR and WCG" option, there are any way to detect HDR support?(In other words, how to check if windows has "HDR and WCG" option?)

Try https://docs.microsoft.com/en-us/uwp/api/windows.graphics.display.advancedcolorinfo.isadvancedcolorkindavailable#Windows_Graphics_Display_AdvancedColorInfo_IsAdvancedColorKindAvailable_Windows_Graphics_Display_AdvancedColorKind_

Found this by pure chance.
And I could be wrong, but here goes.
The HDR, the lenovo displays have, are somehow connected to Dolby Vision as that's the software they suggested downloading for my laptop when they finally got it working.
What this means is that the display doesn't support HDR10, which is what the windows supports to my understanding.
My laptop is Lenovo Thinkpad X1 gen3 with "HDR display".
To my understanding, Dolby vision is only available through Dolby's own api's and that's not the same as Windows HDR. And that's why there is a notion that it's only "HDR Video" not the usual what actual HDR 10bit displays have. It's more of HDR for netflix and apps like that.
To get the right HDR enabled, do as follows:
When you open "Display settings", there should be text saying "Play HDR Games and apps" and a switch under it to toggle HDR on or off.
If you don't have option named like that in the settings, you won't be able to get the D3D12HDR example to detect or display HDR.
That's it.
Hope that helps, and yes, I was sort of disappointed that the HDR my laptop supported was Dolby Vision also.

@jgavert
Thanks, you are right. Thinkpad X1 Extreme is only support Dolby Vision, not HDR10, when I play a HDR10 video, the "Movies & TV" will change HDR content to SDR, then display it. After I connected X1 to a display which support HDR10, Windows' display settings will appear an option, and I can enable the HDR support.


checkov: 3.2.48 -> 3.2.49

Diff: https://github.com/bridgecrewio/checkov/compare/refs/tags/3.2.48...3.2.49
Changelog: https://github.com/bridgecrewio/checkov/releases/tag/3.2.49
Description of changes

Things done

Built on platform(s)

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

[ ] Fits CONTRIBUTING.md.

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

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

2 packages built:

checkov
checkov.dist


Question: base64 vs blob for small/medium size images

In our project we use base64 for avatars and thumbnails to render them as fast as possible, but the original image comes as blob and it doesn't really matter when to convert it to base64. So we came across a question which format is better for storing in the database. It looks like base64 takes more disk space, but what about the speed? I've seen somewhere in the source code that blob gets reconstructed before writing it to the database (I'm not really sure), so it looks like base64 should be faster, but I'd like to know if you have better knowledge in this area. Thanks.

@DZakh Did you finally come to a conclusion what's better to use, in terms of speed (base64 vs. blob vs. arraybuffer)?
In my case I'm also just storing lots of thumbnails (<200x200px)

@DZakh Did you finally come to a conclusion what's better to use, in terms of speed (base64 vs. blob vs. arraybuffer)? In my case I'm also just storing lots of thumbnails (<200x200px)

I would use a Blob but as I said, I haven't done any performance measuring on this.

@DZakh Did you finally come to a conclusion what's better to use, in terms of speed (base64 vs. blob vs. arraybuffer)? In my case I'm also just storing lots of thumbnails (<200x200px)

I would use a Blob but as I said, I haven't done any performance measuring on this.

@DZakh Did you finally come to a conclusion what's better to use, in terms of speed (base64 vs. blob vs. arraybuffer)? In my case I'm also just storing lots of thumbnails (<200x200px)

I would use a Blob but as I said, I haven't done any performance measuring on this.

@dfahlander Thanks - and that's what I'm doing atm - I just didn't do some performance comparison, e.g. when trying to load/show a couple of hundereds of these blobs quickly (e.g. thumbnails)...
Before that I used Arraybuffers (which also worked quite good) and switched to Blobs as they are a bit easier to handle (and I think it's a little bit better in terms of memory usage). But Dexie did handle all types fine so far.

@DZakh Did you finally come to a conclusion what's better to use, in terms of speed (base64 vs. blob vs. arraybuffer)? In my case I'm also just storing lots of thumbnails (<200x200px)

Yes, we've decided to store small pictures such as thumbnails in base64. The only advantage of base64 over blob is that it displayed synchronously. For example it's very important with infinite lists.
Talking about performance there's almost no difference for images lighter than 1mb, but after this the processing time increases exponentially. I didn't make measurements with dexie, but I did with sending images to worker. For small files it was around 2ms both base64 and blob, but when I did measurements with bigger files around 50mb it became ~1500ms for base64, but stayed 2ms for blob.
Talking about size, base64 is around 1.5 times heavier than blob, but as I said before it's not a big difference for small images.
If you need synchronously display thumbnails or to store small images in some weird plaices (eg local storage), then stick with base64, in all other cases I would consider blob.
It's not a question of performance but a problem you want to solve.

@DZakh Wow - thanks for this very valuable information 👍
In my case I am loading a couple of thousand SVGs from the file-system (in the browser - using fetch-requests (or xhr) and show them in a grid ( + using some intersectionObserver to only show the visibles).
The process is pretty slow if I just set the image.src to the svg (because the svgs must be read, and rendered). So the idea is to save a small thumbnail (as png) of a rendered svg on first load and from there on show the png when rendering the list. This should be much quicker than showing the svg, especially if I can get the thumbnails out of the db quickly :)
So for me both options will work - Blob or base64 - but if I read your comment correctly base64 could have some benefits for my scenario...

If users scroll fast, they will see a blank space instead of a thumbnail, because it takes some time to load an url from blob (between 5ms-25ms in my case, you can check it in the network tab). It's only for a moment, but noticeble. You can only solve the problem with base64. Moreover even with base64 there's another problem - how to load the resource itself before it's shown to user :)

Haha - thanks - that's okay... I am showing a 1-px placeholder in the grid (scaled to target-size with css) while the image loads, so that's fine for me. I'll check that out asap, but your comments are really great - so I'll give base64 a whirl first...

@DZakh After some experiments I am facing another issue - so I hope you have some insights here as well:

I am reading SVGs and converting them to base64 (image/png)

I tried doing that as fast as possible, but it seems indexedDB doesn't like that (I tried Dexie.put and Dexie.bulkPut) but it seems indexedDB is not getting all images (records missing,etc...).

@dfahlander Did you (or someone else) try to create 2000+ thumbnails fast to a Dexie database? Could it be that I need to throttle (or queue) lots of images? There are really very, very little places on the web where people store images (or even larger amount of images) in Dexie (most what I found is strings/json). So any comment welcome here.

After creating a base64 image, would it make sense to create that image to a blob (with even more overhead), to make use of async loading and optimized memory?


fix: reorder exports in package.json

Resolves https://github.com/ismail9k/vue3-carousel/issues/457

@ismail9k please check the issue and the changes here.


⚠ Bofrost.fr has degraded performance

In 8613806, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 2073 ms

Resolved: Bofrost.fr performance has improved in 288ad2f after 6 minutes.


update readme.md build status

The ESS status image was not working for others.
The build status images now links to the respective build sites (travis and gitlab-ci)

I think it makes more sense this way. In 283691f I had made the links to the repositories on github/bitbucket but then I figured actually one is probably more curious about the test output than the sources if one is clicking on these links.
@ilist2 It would be good if the ESS one could be provided by the Jenkins instead of Gitlab-CI, do you know how to do that?

From e-mail:
This would be it, but we would also need to as IT, to make the page accessible without logging in.

-- Ivo

@tapsns I leave it for you then if you want to merge this now or if you prefer to wait for us to add public read access to the Jenkins server. The Jenkins server is our "official test server", while GitLab was my personal trial.

We can update the README file for the new link once it is made public so it will be displayed as a valid link.


Add a helper class to perform checks with the current environment.

The helper class could be called Env and its methods could be:

IsDevelopment(): Checks if the current environment name is development or dev.
IsTest(): Checks if the current environment name is test.
IsStaging(): Checks if the current environment name is staging.
IsProduction(): Checks if the current environment name is production or prod.
IsEnvironment(string envName): Compares the current environment name against the specified value of envName.

Use:
bool value = Env.IsDevelopment();
bool value2 = Env.IsEnvironment("dev");

The current environment is defined through the environment variable DOTNET_ENV and with the above methods it is possible to check if the current environment is development, test, staging, or production.
Related to the issues #14, #22.

An additional property has been added to the Env class:
Console.WriteLine(Env.CurrentEnvironment);

This property is used to gets or sets the name of the current environment (dev, test, staging, or production).


Respect Encoding and Byte Order Mark when reading text files

This PR adds code to support files with a Byte Order Mark. Windows programs seem to commonly leave one at the start of a file, indicating the endianness and the Encoding. The code now supports UTF-8 and UTF-16 (in big and little endian).
Closes #1738
Closes #1433

Codecov Report

Merging #1748 into master will increase coverage by 0.1%.
The diff coverage is 27.02%.

@@            Coverage Diff            @@
##           master    #1748     +/-   ##
=========================================
+ Coverage   51.95%   52.06%   +0.1%
=========================================
  Files         159      160      +1
  Lines       12413    12435     +22
=========================================
+ Hits         6449     6474     +25
+ Misses       4971     4963      -8
- Partials      993      998      +5

Impacted Files
Coverage Δ

cmd/restic/cmd_backup.go
44.88% <0%> (ø)
:arrow_up:

cmd/restic/global.go
27.16% <0%> (ø)
:arrow_up:

internal/fs/helpers.go
0% <0%> (ø)
:arrow_up:

internal/textfile/read.go
83.33% <83.33%> (ø)

internal/backend/rclone/backend.go
70.32% <0%> (-1.94%)
:arrow_down:

internal/archiver/buffer.go
94.87% <0%> (+2.56%)
:arrow_up:

internal/checker/checker.go
67.64% <0%> (+3.82%)
: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 ecbbd85...f77bc0f. Read the comment docs.


integrate seems to not be working and returns 0 with a WARNING

import jax
import jax.numpy as jnp
from jaxtyping import Float32, Array
from autofd import function
import autofd.operators as o
Define the normal distribution q_lambda(theta) with dependency on lambda
@function
def q_lambda(theta: Float32[Array, ""], lambda_: Float32[Array, ""]) -> Float32[Array, ""]:
mu, sigma = 0.0, 1.0  # Mean and standard deviation for the normal distribution
return jnp.exp(-(theta - lambda_) ** 2 / (2 * (sigma ) ** 2)) / ((sigma ) * jnp.sqrt(2 * jnp.pi))
Define the likelihood p(x|theta)
@function
def p_x_given_theta(x: Float32[Array, ""], theta: Float32[Array, ""]) -> Float32[Array, ""]:
return jnp.exp(-(x - theta) ** 2 / 2) / jnp.sqrt(2 * jnp.pi)
Define the functional to compute E_{q_lambda}[p(x|theta)]
@function
def E_q_p(x: Float32[Array, ""], lambda_: Float32[Array, ""]) -> Float32[Array, ""]:
@function  # Decorate integrand with @function
def integrand(theta: Float32[Array, ""]) -> Float32[Array, ""]:  # Explicit return type
return p_x_given_theta(x, theta) * q_lambda(theta, lambda_)
return o.integrate(integrand)
x = jnp.array(50.0)
lambda_ = jnp.array(1.0)  # Initial lambda value
result = E_q_p(x, lambda_)

WARNING:absl:grids_and_weights is None, this will create a dummy integration that always returns 0. The gradient of this dummy integration would still work.
0.0


Feature/branding image. Closes #774

Tested and works.
I think we should require steps to take when we will have backwards incompatible changes for database. What you think @brylie ?
Manual steps are probably fine for this case, but we should think about taking the migrations package to project and research how to use it.

PR looks good!
Agreed with @jykae about migrations tool.

I am testing out a possible migration. This is still work-in-progress.

I have tried several times to migrate files from the ProjectLogo FS Collection to the BrandingFiles FS Collection with no success. I opened a support request to see if there is a clear way to migrate files between FS Collections. There are at least two other support requests and one documentation file that hints at a possible solution:

migrate from gridfs to s3
Migrating from gridfs to filesystem
How to: Convert a file already stored

I have also opened a [related bug report with yogiben:autoform-file](File ID reference is not being saved in related collection), with regards to the file ID not being stored in the branding document. I recommend that we deprecate the yogiben:autoform-file from our project, if this issue is not addressed soon.

Tested by having existing uploaded images, had to upload images for new collection. I think we could just drop the old collections manually then. Migration path for this seemed quite hard.
Though I think tempstore should be cleared after saving the file to actual collection, https://github.com/CollectionFS/Meteor-CollectionFS/issues/415
The situation on DB after test:

Exceptions should be catched:
Exception from sub projectLogo id 3AeXJjFxf9wfZLPRA TypeError: Cannot read property 'projectLogoId' of undefined
I20160520-14:56:06.559(3)?     at [object Object].<anonymous> (server/publish/branding.js:6:31)
I20160520-14:56:06.559(3)?     at packages/matb33_collection-hooks/collection-hooks.js:275:1
I20160520-14:56:06.559(3)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160520-14:56:06.559(3)?     at [object Object]._handler (packages/matb33_collection-hooks/collection-hooks.js:274:1)
I20160520-14:56:06.559(3)?     at maybeAuditArgumentChecks (livedata_server.js:1698:12)
I20160520-14:56:06.559(3)?     at [object Object]._.extend._runHandler (livedata_server.js:1023:17)
I20160520-14:56:06.560(3)?     at [object Object]._.extend._startSubscription (livedata_server.js:842:9)
I20160520-14:56:06.560(3)?     at [object Object]._.extend.protocol_handlers.sub (livedata_server.js:614:12)
I20160520-14:56:06.560(3)?     at livedata_server.js:548:43
I20160520-14:56:06.563(3)? Exception from sub coverPhoto id jQPgBhbBCc7WWh9by TypeError: Cannot read property 'coverPhotoId' of undefined
I20160520-14:56:06.563(3)?     at [object Object].<anonymous> (server/publish/branding.js:19:30)
I20160520-14:56:06.563(3)?     at packages/matb33_collection-hooks/collection-hooks.js:275:1
I20160520-14:56:06.563(3)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160520-14:56:06.563(3)?     at [object Object]._handler (packages/matb33_collection-hooks/collection-hooks.js:274:1)
I20160520-14:56:06.564(3)?     at maybeAuditArgumentChecks (livedata_server.js:1698:12)
I20160520-14:56:06.564(3)?     at [object Object]._.extend._runHandler (livedata_server.js:1023:17)
I20160520-14:56:06.564(3)?     at [object Object]._.extend._startSubscription (livedata_server.js:842:9)
I20160520-14:56:06.564(3)?     at [object Object]._.extend.protocol_handlers.sub (livedata_server.js:614:12)
I20160520-14:56:06.564(3)?     at livedata_server.js:548:43

One regression actually: We had preview image working previously, now it requires page refresh..

I would like to have a chat with you @brylie about this PR? I think this is currently quite minor improvement. If we take this to next release manual dropping of old collections has to be marked down. Making migrations for this is probably too difficult. Let's try to avoid this kind of situations if customer installation base grows.

@jykae how can we avoid this type of situation going forward? Should we try the migration again now?


Constrain sequence lenses so that an absent declaration is not valid

A key invariant of scuemata is that authors must define lenses for all sequences after the first. While it's impossible to generically verify the completeness of the translations in these lenses, or the lacunae the may emit, the bare minimum here is erroring if the author doesn't define a lens, at all.
Unfortunately, when we take the #Lens definition
https://github.com/grafana/thema/blob/b7b433093f2fd56c11e68a45b0c3ee7b7850ca8c/lineage.cue#L48-L67
and reference it directly in seqs where we want lens instances to appear:
https://github.com/grafana/thema/blob/b7b433093f2fd56c11e68a45b0c3ee7b7850ca8c/lineage.cue#L72-L80
it means that a lineage is still valid even when the author omits the field. The questions are:

What's a reasonable thing to force a constraint failure on? Should #Lens itself be refactored so that it's more amenable to doing this?
How do we square wanting this to be incomplete with also wanting to provide helpers that reduce some of the boilerplate of writing lenses?

Maybe this is just yet another place where we need a must() check (cue-lang/cue#943), particularly to emit the right error.
Note that this issue is targeting a relatively minimal check - to climb up to our true-goal invariant, in addition to basic lens existence, we have to be certain that a) the Lens connects the end of the prior sequence to the head of its current sequence, and b) that given a concrete input valid wrt the predecessor schema, the rel of both forward and reverse lenses is sufficient to produce a concrete output of the successor schema.

Closing this out because it's ancient. It still applies, but #82 will address this problem.


GroupUpdated Message Type

Is your feature request related to a problem?
One thing that is going to have to change as part of the move to Inbox IDs is the GroupMembershipChanges transcript message that we write when someone is added or removed from the group. At the bare minimum we are going to need to make it reference inbox_id instead of account_address.
A GroupUpdated message type that would cover both membership changes as well as changes to the mutable metadata. We're going to need some way for apps to display the event that someone changed the group name/description/admin roles, and it feels like the appropriate place.
Describe the solution to the problem
No response
Describe the uses cases for the feature
No response
Additional details
No response

Looking at IntentKind enum, this seems to have been added. Re-open if not @cameronvoell


Appselect page

Created a new page with route for both the tweet analysis and text summary page

Merge completed


[stable/anchore-engine] Update to v0.2.3 of anchore-engine

Update the chart to support anchore-engine v0.2.3 and some features introduced since v0.2.1.

Adds prometheus metric support
Adds archive driver support for using s3, swift, or db based storage for analysis output
Removes the "localanchore" analyzer mode, as it has been removed in anchore-engine
Switch to using the pod name as the "hostid" for anchore services, internal ids for service components

What this PR does / why we need it:
Updates anchore-engine chart to support anchore-engine v0.2.3. Adds support for archive drivers, prometheus metrics, and fixes some issues that the old chart had with newer versions of anchore-engine.
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:

/lgtm

/lgtm

thx @viglesiasce


Tab completion error

I just checked out the latest commit : 4a64dcbc6f15b9b2cd3883a96f81bc94a5a0fe24 I am having issues with the completion: for instance if I hit tab after vim.tiny I get the following error:
vim.tiny bash: vim.tiny: syntax error: invalid arithmetic operator (error token is ".tiny")

Note that when hitting tab just after vim.tin, it will complete to vim.tiny . The issue only happens after the space is added.
N.B. : I didn't have this issue before installing bash-it.

System details:
$ bash-it version
Current git SHA: 4a64dcb on 2018-10-18T15:43:37+02:00
https://github.com/Bash-it/bash-it/commit/4a64dcb
Compare to latest: https://github.com/Bash-it/bash-it/compare/4a64dcb...master

$ bash --version
GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

@msis, do you use Debian and its bash-completion package?
I had the same issue with it.
I solved it in this commit: https://github.com/caguettaz/bash-it/commit/c0389d0ff14bb0d4502b7fd5f3a564d773328695
It's dirty though, and only works with bash 4.2 and up, hence the lack of PR.

Here's a quick explanation of the fix:
bash-completion uses an associative array named _xspecs, which it needs to be declared to work properly.
It's declared using declare -A, which is local when executed within a function.
This would be fine when sourcing the file straight away, but bash-it sources files from within the function _load_bash_it_files, making declare -A variables invisible in the global scope, hence the issue.
My quick and dirty fix temporarily makes every 'declare' global using an alias, which is less than ideal.
A cleaner fix would probably be to do away with function _load_bash_it_files and load files inline. That's not great either though.

This issue is very stale, so I close it. Thanks for contributing and posting!


Indexes for batch_size >= 2 in spatial_cross_attention.py

https://github.com/zhiqi-li/BEVFormer/blob/df4023928133d3aa56c96c8185b66f15511bd86e/projects/mmdet3d_plugin/bevformer/modules/spatial_cross_attention.py#L137-L142
It seems to generate indexes for each batch per camera? Add an extra For-Loop?

https://github.com/zhiqi-li/BEVFormer/blob/df4023928133d3aa56c96c8185b66f15511bd86e/projects/mmdet3d_plugin/bevformer/modules/spatial_cross_attention.py#L137-L142 It seems to generate indexes for each batch per camera? Add an extra For-Loop?

same questions, any idea or explanation for these lines? which seems like a bug? @whai362 @zhiqi-li @daijifeng001

I got same question with you.
Do you solve it?
Can you explain the function that you solve this?
Please and Thanks!


Fix possible typo logs files -> log files

I think the correct sentence is :
The current backend implementations include logging of files and webhooks.
and not
The current backend implementations include logs files and webhooks.
But I might be wrong / interpreting it incorrectly.

/check-cla

@aneesh-joshi Any issue while signing the CLA?

@aneesh-joshi I'm going to close this PR for now, feel free to open once you get the email situation / CLA resolved.
https://git.k8s.io/community/CLA.md#the-contributor-license-agreement
Let me know if you have any questions!
/close


[BugFix] return column created from this->type() and hold const inputs for map functions (backport #26974)

Fixes #issue
What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.1
[ ] 3.0
[ ] 2.5
[ ] 2.4

[FE PR Coverage Check]
:heart_eyes: pass : 0 / 0 (0%)

[FE PR Coverage Check]
:heart_eyes: pass : 0 / 0 (0%)


[Zotero 7 Beta] BBT cannot load after update

Debug log ID
CGCLUU35-fio-QvFxDXHpZxk2
What happened?
Just  after updating the last bug, I got a an error that BBT could not load.
I saved the debug log ID (CGCLUU35-fio-QvFxDXHpZxk2), disabled BBT are re-enabled it.
Now it works. But the debug log ID may still be useful?
BBT version <IP_ADDRESS>85.6293
Zotero 7.0.0-beta.79+95d5a5417 (64-bit)
Windows 10

I cannot reproduce, so I don't know what happened.
You can close the issue if the debug log is not useful.

Would have loved to see the log -- could it be you visited file.io after upload? For security considerations, the logs from file.io are deleted after anyone downloads them.

I am in the broken state again.
The "Send debug log to file.io" does not work.
I keep it this way in case I can report anything useful to you.

Do you see any errors in the Zotero log viewer that might indicate why file.io isn't working?

Nothing moves when I try to use the "Send debug log to file.io".
1716243260691	addons.xpi	WARN	Checking C:\Program Files\Zotero\distribution\extensions for addons

1716243261580<EMAIL_ADDRESS>WARN	Loading extension<EMAIL_ADDRESS>Reading manifest: Warning processing version: version must be a version string consisting of at most 4 integers of at most 9 digits without leading zeros, and separated with dots

1716243261599<EMAIL_ADDRESS>WARN	Loading extension<EMAIL_ADDRESS>Reading manifest: Using experimental APIs requires a privileged add-on.

1716243263156	addons.xpi	WARN	Addon with ID undefined already installed, older version will be disabled

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Error: Failed to load resource://services-settings/remote-settings.sys.mjs" {file: "resource://gre/modules/PartitioningExceptionListService.sys.mjs" line: 88}]

[JavaScript Error: "uncaught exception: undefined"]

[JavaScript Error: "TypeError: emptyListMessage is null" {file: "chrome://zotero/content/standalone/standalone.js" line: 687}]
ZoteroStandalone</this.updateAddonsPane/<@chrome://zotero/content/standalone/standalone.js:687:7

appName => Zotero, version => 7.0.0-beta.79+95d5a5417, os => Windows 10.0 19045, locale => en-GB, extensions => Better BibTex for Zotero (<IP_ADDRESS>85.6293, extension), OpenH264 Video Codec provided by Cisco Systems, Inc. (<IP_ADDRESS>, plugin), Widevine Content Decryption Module provided by Google Inc. (4.10.2710.0, plugin), Open PDF for Zotero (0.0.11, extension, disabled), Zotero Better Authors (4.1.3, extension, disabled), ZoteroPreview (0.7.8, extension, disabled), Translate for Zotero (1.1.0-beta.41, extension, disabled), Actions and Tags for Zotero (1.0.0-beta.39, extension, disabled), Zotero OCR (0.7.2, extension, disabled), Notero (0.5.16, extension, disabled), Zotero Attanger (1.2.2, extension, disabled), Better Notes for Zotero (1.1.4-beta.73, extension, disabled)

Did you see a message saying Zotero translator init timed out?

You don't need to keep it this way, I need to go to sleep, will be back in the morning.

I had 2 popup windows, one saying some "[...] Ready" and then another one with an error.
I could not catch them.
I will keep it this way and be back in the morning.
Thanks!

Ok, got it this time:

And the debug log ID after the screenshot: BIWBP79S-fio-bu5VcpcujZIA

After update:

8A7XNEUE-fio-WuMbi1QF1kSB

This one seems to solve the problem of BBT not loading.
I have restarted a few times without seeing the issue anymore.
Thank you very much!
It can take a while to load, but it is similar time as without BBT:
UUPP4VGJ-fio-34hgWdHws0Oq
N9CDTMGC-euc/<IP_ADDRESS>86.6298-7

^&*#! will these problems never stop... anything relevant you see in the log viewer? If you install https://github.com/retorquere/zotero-debug-log alongside, does file.io work?

Waiting a bit, I got these:
(3)(+0013810): {better-bibtex startup: [translators]} +288006 idle: Tue May 21 2024 11:09:08 GMT+0200 (Central European Summer Time), save-database idle

(3)(+0000000): {better-bibtex startup: [translators]} +1 emit: better-bibtex event emit idle {"state":"idle","topic":"save-database"}

(3)(+0012980): {better-bibtex startup: [translators]} +12979 idle: Tue May 21 2024 11:09:21 GMT+0200 (Central European Summer Time), save-database active

(3)(+0000000): {better-bibtex startup: [translators]} +1 emit: better-bibtex event emit idle {"state":"active","topic":"save-database"}

(3)(+0034627): {better-bibtex startup: [translators]} +34626 idle: Tue May 21 2024 11:09:56 GMT+0200 (Central European Summer Time), save-database idle

(3)(+0000000): {better-bibtex startup: [translators]} +1 emit: better-bibtex event emit idle {"state":"idle","topic":"save-database"}

(3)(+0001911): {better-bibtex startup: [translators]} +1911 idle: Tue May 21 2024 11:09:58 GMT+0200 (Central European Summer Time), save-database active

(3)(+0000000): {better-bibtex startup: [translators]} +0 emit: better-bibtex event emit idle {"state":"active","topic":"save-database"}

If the BBT plugin can load, the debug log can finally be sent: FJLZF5QX-fio-ZytQtgpWajMT
The debug log from zotero-debug-log still does not work:

What platform are you on?

I am on Windows 10.
Here is what I get from "Restart with Logging Enabled..." in the BBT debug output log window: 7YYQK4XW-euc/<IP_ADDRESS>86.6306-7
But this time it was successful.
I have restarted the computer. It is now successfully loading the last few times I have tried.
I will update here if it comes back again.

Note that that "Send debug log to file.io" popup window only appears when the plugin is fully loaded (the Citation key column appears in the Items Tree), even if I click on it very early in the startup process. This is probably why I cannot get the debug ID when BBT does not load.

 7YYQK4XW-euc/<IP_ADDRESS>86.6306-7 gave me something useful, new build incoming.

Note that that "Send debug log to file.io" popup window only appears when the plugin is fully loaded

You mean without zotero-debug-log installed. This is so weird. It's the first thing I do. Load order of plugins is not deterministic, so with zotero-debug-log installed it could be that just zotero-debug-log loads after BBT. But BBT also has file.io registration, and that should be the first thing it does. It also should disappear after 15s.

Same again...
I have updated BBT, then activated it (only BBT). The Citation key column appeared before restart.
Then I restart, and BBT does not load anymore.
Same symptoms as mentioned before, except that the Feeds are working properly now: https://github.com/retorquere/zotero-better-bibtex/issues/2885

The BBT extension does not appear in the Settings.

The Export and Cite sections do not display in the Settings:

"Send debug log to file.io" -> "Better BibTeX" does not do anything. Also nothing appears in the Debug Output log.

Here are the errors I get in the debug output of Zotero:

1716290242965	addons.xpi	WARN	Checking C:\Program Files\Zotero\distribution\extensions for addons

1716290243575<EMAIL_ADDRESS>WARN	Loading extension<EMAIL_ADDRESS>Reading manifest: Warning processing version: version must be a version string consisting of at most 4 integers of at most 9 digits without leading zeros, and separated with dots

1716290243587<EMAIL_ADDRESS>WARN	Loading extension<EMAIL_ADDRESS>Reading manifest: Using experimental APIs requires a privileged add-on.

1716290244290	addons.xpi	WARN	Addon with ID undefined already installed, older version will be disabled

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Error: Failed to load resource://services-settings/remote-settings.sys.mjs" {file: "resource://gre/modules/PartitioningExceptionListService.sys.mjs" line: 88}]

[JavaScript Error: "uncaught exception: undefined"]

[JavaScript Error: "Translators not yet loaded"]

[JavaScript Error: "Translators not yet loaded"]

[JavaScript Error: "Translators not yet loaded"]

[JavaScript Error: "Translators not yet loaded"]

[JavaScript Error: "Translators not yet loaded"]

[JavaScript Error: "Translators not yet loaded"]

[JavaScript Error: "TypeError: emptyListMessage is null" {file: "chrome://zotero/content/standalone/standalone.js" line: 687}]
ZoteroStandalone</this.updateAddonsPane/<@chrome://zotero/content/standalone/standalone.js:687:7

appName => Zotero, version => 7.0.0-beta.80+9de70613a, os => Windows 10.0 19045, locale => en-GB, extensions => Better BibTex for Zotero (<IP_ADDRESS>86.6307, extension), OpenH264 Video Codec provided by Cisco Systems, Inc. (<IP_ADDRESS>, plugin), Widevine Content Decryption Module provided by Google Inc. (4.10.2710.0, plugin), Open PDF for Zotero (0.0.11, extension, disabled), Zotero Better Authors (4.1.3, extension, disabled), ZoteroPreview (0.7.8, extension, disabled), Translate for Zotero (1.1.0-beta.41, extension, disabled), Actions and Tags for Zotero (1.0.0-beta.39, extension, disabled), Zotero OCR (0.7.2, extension, disabled), Notero (0.5.16, extension, disabled), Zotero Attanger (1.2.2, extension, disabled), Better Notes for Zotero (1.1.4-beta.73, extension, disabled), Debug Log for Zotero (2.0.17, extension, disabled)

I have activated the plugin "Debug Log for Zotero" version 2.0.17.
Restarted Zotero.
Same problem again.
Both options "Send debug log to file.io" -> "Debug Log" & "Better BibTeX" do not do anything and do not trigger any message in the Debug Output log.
The new Debug Ouptut content:
1716290937236	addons.xpi	WARN	Checking C:\Program Files\Zotero\distribution\extensions for addons

1716290937955<EMAIL_ADDRESS>WARN	Loading extension<EMAIL_ADDRESS>Reading manifest: Warning processing version: version must be a version string consisting of at most 4 integers of at most 9 digits without leading zeros, and separated with dots

1716290937967<EMAIL_ADDRESS>WARN	Loading extension<EMAIL_ADDRESS>Reading manifest: Using experimental APIs requires a privileged add-on.

1716290937968<EMAIL_ADDRESS>WARN	Loading extension<EMAIL_ADDRESS>Reading manifest: Using experimental APIs requires a privileged add-on.

1716290939221	addons.xpi	WARN	Addon with ID undefined already installed, older version will be disabled

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Error: Addon must include an id, version, and type" {file: "resource://gre/modules/addons/XPIProvider.jsm" line: 1723}]

[JavaScript Error: "Error: Failed to load resource://services-settings/remote-settings.sys.mjs" {file: "resource://gre/modules/PartitioningExceptionListService.sys.mjs" line: 88}]

[JavaScript Error: "uncaught exception: undefined"]

[JavaScript Error: "uncaught exception: undefined"]

[JavaScript Error: "SyntaxError: redeclaration of const Zotero" {file: "chrome://zotero/content/customElements.js" line: 1}]
@chrome://zotero/content/customElements.js:1:1
@chrome://zotero/content/update/update-header.js:8:25

[JavaScript Error: "TypeError: emptyListMessage is null" {file: "chrome://zotero/content/standalone/standalone.js" line: 687}]
ZoteroStandalone</this.updateAddonsPane/<@chrome://zotero/content/standalone/standalone.js:687:7

appName => Zotero, version => 7.0.0-beta.80+9de70613a, os => Windows 10.0 19045, locale => en-GB, extensions => Debug Log for Zotero (2.0.17, extension), Better BibTex for Zotero (<IP_ADDRESS>86.6307, extension), OpenH264 Video Codec provided by Cisco Systems, Inc. (<IP_ADDRESS>, plugin), Widevine Content Decryption Module provided by Google Inc. (4.10.2710.0, plugin), Open PDF for Zotero (0.0.11, extension, disabled), Zotero Better Authors (4.1.3, extension, disabled), ZoteroPreview (0.7.8, extension, disabled), Translate for Zotero (1.1.0-beta.41, extension, disabled), Actions and Tags for Zotero (1.0.0-beta.39, extension, disabled), Zotero OCR (0.7.2, extension, disabled), Notero (0.5.16, extension, disabled), Zotero Attanger (1.2.2, extension, disabled), Better Notes for Zotero (1.1.4-beta.73, extension, disabled)

Restart with Logging Enabled...
-> BBT can finally load: P7E6N3FE-euc/<IP_ADDRESS>86.6307-7

There's no BBT activity in this log. Can you try this way of starting zotero and generating a log?

This does not seem to work:

The content of "Transcript.txt":
**********************
Début de la transcription Windows PowerShell
Heure de début :<PHONE_NUMBER>3947
Nom d'utilisateur : MJ-DELL\mjthoraval
Utilisateur runAs :  MJ-DELL\mjthoraval
Nom de la configuration :
Ordinateur : MJ-DELL (Microsoft Windows NT 10.0.19045.0)
Application hôte : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ID de processus : 19132
PSVersion: 5.1.19041.4412
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.4412
BuildVersion: 10.0.19041.4412
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: <IP_ADDRESS>
**********************
Transcription démarrée, le fichier de sortie est C:\Users\mjthoraval\Desktop\transcript.txt
PS>Erreur de terminaison (Start-Process) : « Impossible d’exécuter cette commande en raison de l’erreur : Le fichier spécifié est introuvable. »
Start-Process : Impossible d’exécuter cette commande en raison de l’erreur : Le fichier spécifié est introuvable.
Au caractère Ligne:2 : 1
+ Start-Process -FilePath "C:\Program Files (x86)\Zotero\zotero.exe" -A ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Start-Process : Impossible d’exécuter cette commande en raison de l’erreur : Le fichier spécifié est introuvable.
Au caractère Ligne:2 : 1
+ Start-Process -FilePath "C:\Program Files (x86)\Zotero\zotero.exe" -A ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

C:\Users\mjthoraval>
PS>Start-Transcript -Path "$HOME\Desktop\transcript.txt"
Start-Process -FilePath "C:\Program Files\Zotero\zotero.exe" -ArgumentList "-ZoteroDebugText"
**********************
Fin de la transcription Windows PowerShell
Heure de fin :<PHONE_NUMBER>4040
**********************

I have waited more than 5 minutes this time before sending the Stop-Transcript command.
It is still empty:
**********************
Début de la transcription Windows PowerShell
Heure de début :<PHONE_NUMBER>5729
Nom d'utilisateur : MJ-DELL\mjthoraval
Utilisateur runAs :  MJ-DELL\mjthoraval
Nom de la configuration :
Ordinateur : MJ-DELL (Microsoft Windows NT 10.0.19045.0)
Application hôte : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ID de processus : 19132
PSVersion: 5.1.19041.4412
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.4412
BuildVersion: 10.0.19041.4412
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: <IP_ADDRESS>
**********************
Transcription démarrée, le fichier de sortie est C:\Users\mjthoraval\Desktop\transcript.txt
C:\Users\mjthoraval>
PS>Stop-Transcript
**********************
Fin de la transcription Windows PowerShell
Heure de fin :<PHONE_NUMBER>0241
**********************

And as reported before, disabling the plugin and re-enabling it is enough to make it work again.

 7YYQK4XW-euc/<IP_ADDRESS>86.6306-7 gave me something useful, new build incoming.

Note that that "Send debug log to file.io" popup window only appears when the plugin is fully loaded

You mean without zotero-debug-log installed. This is so weird. It's the first thing I do. Load order of plugins is not deterministic, so with zotero-debug-log installed it could be that just zotero-debug-log loads after BBT. But BBT also has file.io registration, and that should be the first thing it does. It also should disappear after 15s.

I have tested with only the BBT plugin.

Maybe something wrong during the installation of the plugin?
When I enable the plugin, I get in the Debug Output:
1716294705044<EMAIL_ADDRESS>WARN	Loading extension<EMAIL_ADDRESS>Reading manifest: Warning processing version: version must be a version string consisting of at most 4 integers of at most 9 digits without leading zeros, and separated with dots

1716294705045<EMAIL_ADDRESS>WARN	Loading extension<EMAIL_ADDRESS>Reading manifest: Using experimental APIs requires a privileged add-on.

[JavaScript Error: "uncaught exception: undefined"]

And when I disable it:
[JavaScript Error: "uncaught exception: undefined"]

When I enable the plugin, I get in the Debug Output:

That's because I have 5-part versions for the debug build. It's just a warning.

Windows is such a pain for debugging. Nothing works. And since I've moved to apple silicon, I can't even run vmware for testing.
If you start cmd (windows-r, cmd), then in that console window, type
"C:\Program Files (x86)\Zotero\zotero.exe" -ZoteroDebugText

I think a 2nd console window will pop up. In that console window, the logging should appear. I think in the top-left you can select edit-select all, edit-copy -- I don't have access to Windows so I am working from memory here.

The command starts Zotero, but I cannot see any other window opening, and nothing in the console window.

Got it: https://www.zotero.org/support/debug_output#windows
I have added -console to get it to work:
"C:\Program Files\Zotero\zotero.exe" -console -ZoteroDebugText

output.txt

🤬 Zotero.Translators.init() is still stuck, even with peeking. And the Zotero crew is not picking up on my support request for this.

Let me know if I can do anything to move forward on this.
Hopefully the can identify the problem soon.

I have tried all the steps I did before to trigger the bug.
It is still working reliably now.
The problem is fixed I think.

It's a work-around more than a fix, but this gets things going. Can you do one more test for me? open Tools -> Developer -> Run Javascript, check Run as async function, and run this:
await Zotero.Translators.init()
return 'done'

then uninstall BBT, restart Zotero, and repeat these steps. It should in both cases print done, but I think at least with BBT installed it will not print anything.

That was not what I expected. I don't know what to make of this. It's most likely a time-sensitive issue then, but await Zotero.Translators.init() reliably hangs for you and others when I call it (as I must) in BBT startup.
In any case, I've reported this to the Zotero devs, and in the mean time, I have a workaround.

Can I bother you once more about this? The Zotero crew wants to look into this, but they're asking

We'd want to see a Debug ID from startup (or debug log sent to<EMAIL_ADDRESS>from someone who can reproduce this.

I can produce a build that will reintroduce this problem. I can't reproduce it myself unfortunately.

I can reproduce with the test build <IP_ADDRESS>86.6307 above.
Debug ID: D503095659
Or with the new test build <IP_ADDRESS>86.6313:
Debug ID: D813083066

On the new test build <IP_ADDRESS>86.6307, the test commands do not work anymore:
await Zotero.Translators.init()
return 'done'

Trying to test again in the test build <IP_ADDRESS>86.6307, to see if I had made a mistake or if there is some randomness also on that, and now the bug is gone...
I actually don't know how to reproduce the bug reliably.

On the new test build <IP_ADDRESS>86.6313, the test commands do not work anymore:

Both with and without BBT installed?

This was with the BBT installed.
When I disable BBT, it works.

Here is another Debug ID with a successful loading of BBT: D522314190
It is exactly the same configurations as above:
BBT version <IP_ADDRESS>86.6313
Zotero 7.0.0-beta.80+9de70613a (64-bit)
Windows 10
One of the things that I did since the previous Debug ID is to disable BBT and re-enable it, as was previously reported in the other threads in the forums.
Hopefully the comparison can give some clues on what went different between them.

Finally... It took me a long time, but I have managed to get back into the broken mode with the test build <IP_ADDRESS>86.6313.
I was starting to doubt that the bug had ever existed.
Now that I am back into it, note that the connector in Firefox is also broken:

So the problem is likely the same as the other one: https://github.com/retorquere/zotero-better-bibtex/issues/2887
I am still testing, but I think that the way to get back into the broken mode was achieved by enabling and disabling multiple times BBT during the loading of Zotero. On the way, this has send me several nasty errors, including one saying that I had broken the translators, opening this page: https://www.zotero.org/support/kb/unable_to_load_translators_and_styles
Still need to do more testing to confirm this.

Hopefully the comparison can give some clues on what went different between them.

Thanks man. I hope the Zotero devs can shed some light here. But I think I've also just seen a report pass by where the workaround didn't fix the startup issue :(

So the problem is likely the same as the other one: #2887

I was hoping they were the same problem, because I have absolutely no idea how that can even happen.

I am still testing, but I think that the way to get back into the broken mode was achieved by enabling and disabling multiple times BBT during the loading of Zotero.

This is timing sensitive. BBT takes some time to start up and I don't know what Zotero does if you disable a plugin while it's starting.

Ok, it indeed seems to be time sensitive.
Here is some of the zoology I got when playing with enabling and disabling the plugin. But after all these, BBT is still able to recover and load properly. I am again not able to reproduce the bug anymore.
Some of the errors obtained when disabling and enabling BBT during the statup of Zotero:

[JavaScript Error: "Could not stat file(C:\Users\mjthoraval\Zotero\translators\Better BibLaTeX.js) because it does not exist" {file: "resource://gre/modules/Prompter.sys.mjs" line: 1231}]

Gotta love transient errors

Another remark, probably not important, but this is all I got for now.
Here is the header menu when BBT is running and working:

After I disable BBT, it becomes:

Finally one that I can say "that's a zotero bug". The item pane in Zotero 7 is one of the few places where I interact with Zotero strictly through it's formal APIs.

A few more just for the record:

A few more just for the record:

Is this after a fast enable/disable? This shouldn't happen if BBT is allowed full startup/shutdown.

This is just for a random combination of changing version of BTT, enable/disable of BBT, start/shutdown of Zotero...
If you think that any of these is useful, I can try to reproduce.
But if this is likely happening when doing something very wrong in Zotero, then it is probably what I did.
I still cannot get back to the broken mode now.

When I was giving up reproducing the bug, I reactivated all my plugins and restarted Zotero...
And it is back in the broken mode...
I have disabled all the other plugins and kept only BBT -> It stays in the broken mode.
I have disabled the automatic sync to produce a clean Debug Output -> Still in broken mode.
I have no idea what triggered the problem. But at the moment it is reproducible at every restart of Zotero.
At least, I can now produce a new clean Debug ID in the latest beta from "Restart with Logging Enabled...":
Debug ID D472271866
2024_05_23 - Debug Output BBT Bug.txt
BBT version <IP_ADDRESS>86.6313
Zotero 7.0.0-beta.81+721f54fe4 (64-bit)
Windows 10
I have waited 20 minutes this time before submitting it, in case there was any doubt that anything was still happening that could eventually start BBT.
It is easy to solve the problem: disable BBT, restart Zotero, enable BBT, restart Zotero -> The bug is gone.
But I will stay in this broken mode a few more days in case anyone gets some more idea of testing that can be done.

Trying to be exhaustive on what I can report.
I confirm that the connector in Firefox is broken again, so most likely the same bug:

Here is the Debug Output for refreshing the page and trying to import from Firefox:
Debug ID: D382407023
2024_05_23 - Debug Output BBT Bug - Connector.txt
(5)(+0016493): POST /connector/ping HTTP/1.1 Host: <IP_ADDRESS>:23119 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0 Accept: */* Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate, br, zstd Content-Type: application/json X-Zotero-Version: 5.0.124beta4 X-Zotero-Connector-API-Version: 2 Content-Length: 2 Origin: moz-extension://746bca92-3333-4b62-ba48-91b1f8aea7ec Connection: keep-alive Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin

(3)(+0007186): {better-bibtex startup: [translators]} +23678 idle: Thu May 23 2024 09:56:22 GMT+0200 (Central European Summer Time), save-database idle

(3)(+0000001): {better-bibtex startup: [translators]} +1 emit: better-bibtex event emit idle {"state":"idle","topic":"save-database"}

(3)(+0001309): {better-bibtex startup: [translators]} +1309 idle: Thu May 23 2024 09:56:23 GMT+0200 (Central European Summer Time), save-database active

(3)(+0000000): {better-bibtex startup: [translators]} +1 emit: better-bibtex event emit idle {"state":"active","topic":"save-database"}

Thanks! I've added this to the report, you can go back to the regular release for the time being. Zotero said they'd look into the issue, and until that sheds some light on the matter, I don't think there's anything we can do.

I have tried restarting the computer and opening Zotero before anything else -> the bug is still here.
BBT is working after a simple disable/enable.
And the bug can be repeated reliably when in the broken mode.
Assuming that something got broken during installation or update of BBT, is there a way to send you the current state of BBT with all parameters? There should be some parameter written somewhere that would be different from a normal installation?
Another observation: When in the broken state, if I click on an item in the Items Tree during loading, with the "Bibliography Entry" mode of the header in the Item Pane, the header will be stuck on "Loading..." for ever:

After waiting for the loading of Zotero to finish, switching item gets the header working again:

I'm fairly certain I am experiencing the same issue, where BBT is not starting, I get the error:

Better BibTeX startup failed
ReferenceError: name is not defined

With BBT Version 6.7.201, Zotero 7.0.0-beta.81+721f54fe4 (64-bit), on Windows 10.
When I restarted with logging enabled I got this Zotero Debug ID: D205623513, and this for BBT: 667PZV5F-fio-VF7UrGprTIFr.
When I: Disable BBT -> Restart Zotero -> Re-enable BBT -> Restart Zotero, I have this: RHMMIUQ4-fio-IYEiZgHbaZIW
And if I enable Zotero Debug Output Logging I see this when I try to enable:
(3)(+0037158): Enabling plugin<EMAIL_ADDRESS>
(3)(+0000006): Calling bootstrap method 'startup' for plugin<EMAIL_ADDRESS>version 6.7.201 with reason ADDON_ENABLE

(2)(+0000000): Plugin<EMAIL_ADDRESS>is missing bootstrap method 'startup' this.warn@chrome://zotero/content/xpcom/zotero.js:1258:71 _callMethod@chrome://zotero/content/xpcom/plugins.js:196:16 onEnabling@chrome://zotero/content/xpcom/plugins.js:463:13 callAddonListeners@resource://gre/modules/AddonManager.sys.mjs:1535:48 callAddonListeners@resource://gre/modules/AddonManager.sys.mjs:3768:52 updateAddonDisabledState@resource://gre/modules/addons/XPIDatabase.jsm:2891:34 setUserDisabled@resource://gre/modules/addons/XPIDatabase.jsm:783:25 enable@resource://gre/modules/addons/XPIDatabase.jsm:1342:27 handleEvent@chrome://mozapps/content/extensions/aboutaddons.js:2509:27

Not sure if this is indeed the same issue, if not I can open a new one, but if so, maybe the logs from another system may help narrow down the cause...

different problem, see #2882
Ah, sorry. Either way, BBT 6.7.202 seems to work for me now


High concurrency problem

Now  I have a problem。 I use cluster  mode client。 When high concurrency，t took more than 5s to return the result。127 machines access 15 billion data every day。

Tracing down performance issues in a high load arrangement is always subject to configuration, network and environment issues, nothing we can really do here unless you can spot a bottleneck. Please measure command latencies, TCP buffer fill ratios and profile your application to identify which parts cause the slowdown.

Tracing down performance issues in a high load arrangement is always subject to configuration, network and environment issues, nothing we can really do here unless you can spot a bottleneck. Please measure command latencies, TCP buffer fill ratios and profile your application to identify which parts cause the slowdown.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.


get_all_user_data fails with a 10103 error and no message

I started receiving an unrecognized error after attempting to fetch user data using accounts generated with your account creator tool. It occasionally works, but other times it responds with a 10103 error which has no associated message:
Traceback (most recent call last):
  File "c:\Users\Will\Desktop\projects\genshin-impact-spiral-abyss-stats\test.py", line 14, in <module>
    user_data = get_all_user_data(606355280)
  File "C:\Python39\lib\site-packages\genshinstats\genshinstats.py", line 232, in get_all_user_data
    data = get_user_stats(uid, cookie)
  File "C:\Python39\lib\site-packages\genshinstats\genshinstats.py", line 181, in get_user_stats
    data = fetch_endpoint(
  File "C:\Python39\lib\site-packages\genshinstats\genshinstats.py", line 167, in fetch_endpoint
    return _request(method, url, cookies=cookie, **kwargs)
  File "C:\Python39\lib\site-packages\genshinstats\utils.py", line 109, in inner
    return func(*args, **kwargs)
  File "C:\Python39\lib\site-packages\genshinstats\genshinstats.py", line 140, in _request
    raise_for_error(data)
  File "C:\Python39\lib\site-packages\genshinstats\errors.py", line 80, in raise_for_error
    raise error
genshinstats.errors.GenshinStatsException: 10103 Error ()

Here's a minimal example of the code I'm using. accounts.json is untouched after it's generated by the account creator.
from genshinstats import get_all_user_data, set_cookies
from json import load

def load_json(filename):
    with open(filename) as json_file:
        return load(json_file)

accounts = load_json("accounts.json")
cookies = [account["cookies"] for account in accounts]
set_cookies(*cookies)

user_data = get_all_user_data(123456789)
print(user_data)

What does this error mean?

Oh looks like my account creator has a bug then, 10103 means your account exists but doesn't have a hoyolab username. I'll try and see if I can make some fix with how the hoyolab accounts are made.

I believe I've spotted the problem. When I run the account creator, at the end of the create_hoyolab_account stage it refreshes the page before hoyolab can register the account properly. I added a simple time.sleep before the refresh at the end of that function, and the accounts it generates are now all usable. So yeah, no problems on genshinstats's end, although mapping that error code to a message would probably be useful.

Thanks, I thought it was caused by something completely different. I'm sorry it took so long, I was a bit busy lately.


Add docker support

Hi @maebeale this is Robin from LAMA.
Adding support for launching the application using docker would make it easier to test the application.
By providing a docker-compose.yml file, it would allow developers to rapidly deploy the application for local testing and evaluation.

[x] Allow the application to be launched for local testing & development using docker-compose
[ ] Create new user accounts in the testing environment
[ ] Implement a production-ready docker-compose setup that can be used for organizations that are not able to use Heroku

See #85

Thanks @grenewode ! Totally works! (We just tested it with a new collaborator to the project.)
Also, you were right re the Log out button. When we moved the navbar out of Rails and in to Vue, it stopped working. I'll make an issue for that for now.


"RuntimeError: Division by 0Node number 1252 (FLOOR_MOD) failed to invoke." after conversion from TensorFlow to tflite

1. System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 20.04
TensorFlow installation (pip package or built from source): tb-nightly==2.6.0a20210706 installed via pip

2. Code
I am trying to convert a model from Pytorch -> ONNX -> Tensorflow -> tflite. The conversion works, but the results diverge between Tensorflow and tflite.
The original model is a Faster-RCNN with a MobileNet backbone (fasterrcnn_mobilenet_v3_large_320_fpn to be exact). I am having a similar, but different issue when converting the same model with a Resnet backbone (see my other issue for that: https://github.com/tensorflow/tensorflow/issues/50676 )
import tensorflow as tf
import numpy as np

# tensorflow inference: works
model_tf = tf.saved_model.load('assets/tfsavedmodel')
sample = np.zeros((1, 3, 256, 256), dtype=np.float32)
model_tf(input=sample)  #works

# tflite inference: fails
interpreter = tf.lite.Interpreter('assets/model.tflite')
print(interpreter.get_input_details()[0]['shape'])  # array([  1,   3, 256, 256], dtype=int32)
model_tflite = interpreter.get_signature_runner()
out_tflite = model_tflite(input=sample)

Fails with error:
Traceback (most recent call last):
  File "/home/florian/projects/video-analysis-prototype/model-conversion/convert.py", line 375, in <module>
    Converter().verify()
  File "/home/florian/projects/video-analysis-prototype/model-conversion/convert.py", line 371, in verify
    verify_tflite(self.target_dir/self.fname_tflite, x)
  File "/home/florian/projects/video-analysis-prototype/model-conversion/convert.py", line 45, in verify_tflite
    output = signature(input=tf.constant(np.zeros_like(sample)))  # FIXME: get actual sample in
  File "/home/florian/projects/video-analysis-prototype/model-conversion/venv/lib/python3.8/site-packages/tensorflow/lite/python/interpreter.py", line 239, in __call__
    self._interpreter.invoke()
  File "/home/florian/projects/video-analysis-prototype/model-conversion/venv/lib/python3.8/site-packages/tensorflow/lite/python/interpreter.py", line 905, in invoke
    self._interpreter.Invoke()
RuntimeError: Division by 0Node number 1252 (FLOOR_MOD) failed to invoke.

Model files mentioned can be found here: https://florianletsch.de/media/assets-tflite.zip (468 MB)
This is how I converted the model (note that this takes >1hr, not sure why)
converter = tf.lite.TFLiteConverter.from_saved_model('assets/tfsavedmodel')
converter.experimental_enable_resource_variables = True  # requires tf-nightly or tf-nightly-cpu
converter.target_spec.supported_ops = [
  tf.lite.OpsSet.TFLITE_BUILTINS,
  tf.lite.OpsSet.SELECT_TF_OPS
]

tflite_model = converter.convert()
with open('assets/model.tflite', 'wb') as f:
    f.write(tflite_model)

3. Failure after conversion

Conversion works but model can't be loaded for inference, see error message above.

Environment
Output of pip freeze
absl-py==0.13.0
astunparse==1.6.3
cachetools==4.2.2
certifi==2021.5.30
chardet==4.0.0
flatbuffers==1.12
gast==0.4.0
google-auth==1.32.1
google-auth-oauthlib==0.4.4
google-pasta==0.2.0
grpcio==1.38.1
h5py==3.1.0
idna==2.10
keras-nightly==2.6.0.dev2021062500
Keras-Preprocessing==1.1.2
libclang==12.0.0
Markdown==3.3.4
netron==5.0.0
numpy==1.19.2
oauthlib==3.1.1
onnx==1.9.0
onnx-tf==1.8.0
onnxruntime==1.8.0
opt-einsum==3.3.0
Pillow==8.3.1
protobuf==3.17.3
pyasn1==0.4.8
pyasn1-modules==0.2.8
PyYAML==5.4.1
requests==2.25.1
requests-oauthlib==1.3.0
rsa==4.7.2
six==1.15.0
tb-nightly==2.6.0a20210706
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow-addons==0.13.0
termcolor==1.1.0
tf-estimator-nightly==2.6.0.dev2021062501
tf-nightly-cpu==2.7.0.dev20210706
torch==1.9.0
torchvision==0.10.0
typeguard==2.12.1
typing-extensions==3.7.4
urllib3==1.26.6
Werkzeug==2.0.1
wrapt==1.12.1

@thaink Can you take a look at this?

Currently this runs into a different issue with tf-nightly: gist
2.15.0-dev20230814
[  1   3 256 256]
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
[<ipython-input-2-b10951ef2781>](https://localhost:8080/#) in <cell line: 11>()
      9 print(interpreter.get_input_details()[0]['shape'])  # array([  1,   3, 256, 256], dtype=int32)
     10 model_tflite = interpreter.get_signature_runner()
---> 11 out_tflite = model_tflite(input=sample)

[/usr/local/lib/python3.10/dist-packages/tensorflow/lite/python/interpreter.py](https://localhost:8080/#) in __call__(self, **kwargs)
    247                                           self._subgraph_index)
    248
--> 249     self._interpreter_wrapper.Invoke(self._subgraph_index)
    250     result = {}
    251     for output_name, output_index in self._outputs:

RuntimeError: tensorflow/lite/kernels/non_max_suppression.cc:108 (max_output_size_value >= 0) was not true.Node number 5 (NON_MAX_SUPPRESSION_V4) failed to prepare.Node number 7 (WHILE) failed to prepare.Node number 9 (WHILE) failed to prepare.Node number 544 (IF) failed to prepare.

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The TFLite team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the TFLite space.
Thanks.


extreme slow ssh connection

Lapce Version
0.2.8
System information
windows11 to archlinux
Describe the bug
the current version i have will reinstall the lapce-proxy every time again
it can get the correct version ,but the returned format is wrong
so everytime you connect to a remote server or open a remote folder
it would be extreme slow
Additional information
duplication of https://github.com/lapce/lapce/issues/2202
duplication of https://github.com/lapce/lapce/issues/2476
          Workaround:

Open Lapce, establish the remote connection and wait for the button to become green. Open a separate terminal and connect to the remote machine using SSH, and make the following changes to /tmp/lapce-proxy.sh.
-  lapce_installed_ver=$("${lapce_dir}/lapce" --version | cut -d'v' -f2)
+  lapce_installed_ver=$("${lapce_dir}/lapce" --version | cut -d' ' -f2)

-   if [ "${lapce_installed_ver}" = "${lapce_new_ver}" ]; then
+   if [ "v${lapce_installed_ver}" = "${lapce_new_ver}" ]; then

And then use chattr +i /tmp/lapce-proxy.sh to make the file readonly.
Finally, restart Lapce and then everything will be fine.
Originally posted by @peterjc123 in https://github.com/lapce/lapce/issues/2202#issuecomment-1451585178
this worked

after the configuration ,the working experience is nice


fix: 避免openstack session==nil

这个 PR 实现什么功能/修复什么问题:
避免openstack session==nil
是否需要 backport 到之前的 release 分支:

release/3.2

/area region
/cc @zexi

Codecov Report

Merging #6728 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6728      +/-   ##
==========================================
- Coverage    7.15%    7.14%   -0.01%
==========================================
  Files         648      648
  Lines      109488   109488
==========================================
- Hits         7830     7828       -2
- Misses     101059   101060       +1
- Partials      599      600       +1

Flag
Coverage Δ

#aFlag
7.14% <ø> (-0.01%)
:arrow_down:

Impacted Files
Coverage Δ

pkg/appsrv/response.go
66.17% <0.00%> (-2.95%)
:arrow_down:

Continue to review full report at Codecov.

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


IGNITE-18230 Packaging: MSI installer for winget package

https://issues.apache.org/jira/browse/IGNITE-18230
Use the setupbuilder plugin to create MSI installer for the ignite3-db.
Use gradlew msi to create an installer in the packaging\db\build\distributions\ignite3-db-3.0.0.msi.
Micronaut update was required since the old version doesn't work when installed in the path with spaces.

LGTM


Status line renders strangely

There are weird spaces between status line items (airline) and a white line just above the command line.
Here's what it looks like in GNvim:

Hi,
Is it latest goneovim?
If so, I want a minimal init.vim that can reproduce the problem.

I get the white line under the statusbar issue with a completely empty init.vim and my normal conf.

@smolck
Perhaps the problem you pointed out is the message window border?
The border color can be controlled with the MsgSeparator highlight.

I'm not sure; I'm talking about what @darkermatter put in the opening comment:

. . . a white line just above the command line.

Could that be caused by the MsgSeparator highlight?

. . . a white line just above the command line.

Could that be caused by the MsgSeparator highlight?

Yes, I think that is a message separator. So it can be controlled with MsgSeparator highlight

There are weird spaces between status line items (airline)

This is a problem with screen drawing.

There are weird spaces between status line items (airline)

I have detected the cause.
This will be fixed in v0.4.1.

Yes, I think that is a message separator. So it can be controlled with MsgSeparator highlight

I can confirm this. I wonder why it never showed up in terminal nvim.

There are weird spaces between status line items (airline)

I have detected the cause.
This will be fixed in v0.4.1.

I can also confirm that the latest commit fixes this problem.
Thanks so much Akiyoshi! :-)

I can confirm this. I wonder why it never showed up in terminal nvim.

Umm, my understanding may be inadequate. For example, the default behavior when MsgSeparator is not explicitly set. I will keep this in my mind until v0.4.2.

One of those mysteries of the universe :-)
I never set it explicitly until now and it never showed in the terminal or any other gui.

@akiyosi I have a similar issue

It renders fine in gnome-terminal:

I even tried this minimal vimrc:
`if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.config/nvim/plugged')
Plug 'tpope/vim-fugitive'
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'dense-analysis/ale'
Plug 'ryanoasis/vim-devicons'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
call plug#end()
set mouse=a
set number
set runtimepath^=~/.config/nvim runtimepath+=~/.config/nvim/after
let &packpath = &runtimepath
set clipboard+=unnamedplus
let g:airline_theme='murmur'
let g:airline_powerline_fonts = 1
let g:airline#extensions#ale#enabled = 1
let g:airline#extensions#statusline#enabled = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#wordcount#filetypes = '\vasciidoc|help|mail|markdown|markdown.pandoc|org|rst|tex|text'
if exists('g:gonvim_running')
colorscheme dracula
endif
source /home/chinmay/.config/nvim/devicons.vim
`

goneovim version - 0.4.5-linux (from releases page)

It renders fine when powerline fonts are disabled
(let g:airline_powerline_fonts=1 is not set)

@akiyosi Since it renders fine without powerline, should I open a new issue?

Solved :
https://github.com/vim-airline/vim-airline/wiki/FAQ#the-powerline-font-symbols-are-partially-messed-up
@akiyosi Please close this

@PitcherTear22
Hmmm, I think this problem is a bug. The reason is that with the minimal vimrc you gave, goneovim lacks the highlighting of the powerline font symbol, as in your screenshot, but neovim-qt displays it correctly.
I'm debugging and don't know what's causing it.

Hmm yes the airline wiki says this problem shouldn't exist I you use powerline fonts, so it is a bug

But it would be better if this issue was closed and a new issue opened because it works fine without powerline fonts

neovim-qt displays it correctly.
Yep all other GUIs I have tried display it correctly

I've confirmed that neovide has similar issues, but what about in your environment?

But it would be better if this issue was closed and a new issue opened because it works fine without powerline fonts

I think this issue is a bug so I would like to keep the issue open or recreate it as a separate issue.

Yes, recreate it as a separate issue

I've confirmed that neovide has similar issues, but what about in your environment?

Sorry, neovide is not supported by my laptop's graphics card. I'll test when I get my desktop working again.

It also breaks the same way when you set the column number icon by creating another section:
" set the CN (column number) symbol:
let g:airline_section_z = airline#section#create(["\uE0A1" . '%{line(".")}' . "\uE0A3" . '%{col(".")}'])

Although it also breaks in terminal:

Ugh, I have no idea what is causing this highlight disappearing problem. I've set the same GUI options as neovim-qt;
 rgb = true
 ext_tabline = true
 ext_popupmenu = true
 ext_linegrid = true

I debugged the GUI's hl_attr_define event with the abobe option, and We can see that the neovim-qt highlights have not disappeared.
hl_attr_define__neovim-qt.log
hl_attr_define__goneovim.log
Number 76 and later in the log are the highlights used by the vim-airline symbol.
I don't know why the goneovim only disappear the highlights after Number 76.
@bfredl
I'm sorry to call you on such short notice.
If you have any awareness of the cause of the problem in this matter, I would appreciate it if you could comment.

I've confirmed that neovide has similar issues, but what about in your environment?

Neovide doesn't have this issue but it doesn't render some powerline symbols like line number and has problems with devicons:

@PitcherTear22
Thanks for the information.
Perhaps the issue of some symbols not showing up and the issue of disappearing highlights is a separate issue.
I will continue to examine the issue of highlight disappearance, but there is no promising perspective at this time. Hmmm.

I have found a workaround for this problem.
Add the following line to init.vim
set termguicolors

I'm not sure why the above setting gets around the problem, but I've seen this setting embedded internally in other GUIs where the highlights haven't disappeared.
I may embed this setting in the next release.

Yep solved

But this is an actual GUI instead of a terminal with true colour, so this shouldn't be needed right?

Yes, that's exactly your point.
In fact, if you look at the vim-airline code, there is a conditional branch on gui_running.
However, the GUI in this context essentially refers to gvim. neovim's GUI is a completely different architecture than gvim's, and gui_running cannot be treated as an internal state of the neovim GUI at this time. It seems that the reason for this problem is that existing plug-ins do not recognize neovim GUI as a GUI.
In nvim-qt and gnvim, termguicolors are explicitly set at startup because they pseudo-recognize the plug-in side as a true color terminal, and make the GUI side notify the true color information.
Therefore, you are right to use set termguicolors as a workaround at this time. Of course, the next In the release, I'm going to improve it so that Goneovim automatically sets it up at boot time, even if the user doesn't set set termguicolors.

because plugins don't recognise neovim gui as a GUI.

In that case, wouldn't it be better to set g:gui_running internally? Or would that lead to more complications?

As I understand it, gui_running and g:gui_running are two completely different properties. Currently Neovim does not provide a way for the GUI to have gui_running.

oh


ID Localization for IPv4/IPv6 Dual-Stack

Hi,
I made translation to Indonesia language for this page docs/concepts/services-networking/dual-stack.md
Thanks,
Aris.

I also have the same problem with new glossary.
10:20:36 PM: Error: Error building site: "/opt/build/repo/content/id/docs/reference/glossary/service.md:9:1": failed to unmarshal YAML: yaml: line 8: could not find expected ':'
/assign @girikuncoro

/cc @phanama

mas @ariscahyadi I still found formatting error here, can you fix it?

mas @ariscahyadi I still found formatting error here, can you fix it?

Push the fix... hopefully, solve the error :)

Hmm seems like it’s still got error in the build phase.

Hmm seems like it’s still got error in the build phase.

I think due to some other error because the build stop here 9:31:03 PM: Build ready to start

Hmm seems like it’s still got error in the build phase.

I think due to some other error because the build stop here 9:31:03 PM: Build ready to start

Just make a small change to initiate build and it works.

Thanks for the response and fixing the formatting! @ariscahyadi
I still have some comments to improve our translation! Everything else looks great.
Even though we have tons of comments (maybe because the page is still an alpha page), this is really exciting to translate and review! 😄

Thanks for your comments @phanama! I know that I am not good in technical writing, especially in bahasa :)
Also, I don't expect that somebody will double check the translation with KBBI :)

/approve


Adding a REPL

Fixes #49
Adds a basic REPL, you can:

Open graph files from the file systems and view the output and run them.
Edit graphs and see the mermaid output update in real-time.
Run the graphs and see the output as well as basic probe information.

Screenshot:

do not merge - I need to merge to my main first. Sorry - I didn't check the merge target in the UI.


Remove Wiki Sidebar HTML, LESS, JS

Pre-Submission Checklist

[X ] Your pull request targets the staging branch of FreeCodeCamp.
[X ] Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
[X ] You have only one commit (if not, squash them into one commit).
[X ] All new and existing tests pass the command npm run test-challenges. Use git commit --amend to amend any fixes.

Type of Change

[ ] Small bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[X ] Breaking change (fix or feature that would change existing functionality)
[ ] Add new translation (feature adding new translations)

Checklist:

[X ] Tested changes locally.
[X ] Closes currently open issue (replace XXXX with an issue no): Closes #9807

Description

Yikes, @dhcodes we have commits that have got in between yours.
Can you try rebasing this of staging and then a squash?
FIRST take a back up of your changes (physically copy the files somewhere safe)
git checkout fix/remove-wiki-sidebar
git pull --rebase upstream staging
git log -n 10 --oneline

This will give you just top 10 commits
Then you can count and squash whatever is yours.
git rebase -i HEAD ~ 3
git push origin fix/remove-wiki-sidebar --force

If the above fails or you get stuck. Below is a sure shot way.

Checkout staging git checkout staging
Delete fix/remove-wiki-sidebar by doing git branch -D fix/remove-wiki-sidebar
Create the branch again git checkout -b fix/remove-wiki-sidebar
Copy the files you saved back
Add them, commit them
Force push with git push origin fix/remove-wiki-sidebar --force

Thanks @raisedadead for taking the time to write that up. I was sort of at a loss. I was planning to come back to it this morning anyway but forgot to close it for the time being. My Git skills are apparently not great.

@dhcodes we have all gone thru this, git is weird at start but once you understand it, it's the awesomest SCM/VCS tool ever built. Good luck and happy fixing!

@dhcodes thanks for contributing.

Thanks again for all the help @raisedadead


⚠ Bofrost.be has degraded performance

In f73486e, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 979 ms

Resolved: Bofrost.be performance has improved in c157962 after 9 minutes.


add prow presubmission/postsubmission scripts.

address #17

@sebastienvas  How to test these scripts? I just copied from mixer.

Jenkins job broker/presubmit passed

In order to test on Prow, you need to add a config here for your jobs, ie broker-presubmit and broker-postsubmit.

Once you do that they'll show up in the PR and prow.istio.io

I should do that after I merge this PR. right?

Jenkins job broker/presubmit passed

No before. You can add the skip_report: True, if you don't want other PR so get affected.
https://github.com/istio/test-infra/blob/master/prow/config.yaml#L34

I've merged PR #425. How can I test now?

/retest

/retest

/retest

/retest

I fixed codecov and set the token in Prow. Prow finally started
https://k8s-gubernator.appspot.com/build/istio-prow/pull/istio_broker/20/broker-presubmit/2/

FYI - postsubmit is passing as well
https://k8s-gubernator.appspot.com/build/istio-prow/broker-postsubmit/1/
Thanks for doing this ! I'll remove the skip_report.


Not updating number of showed items when adding value to Realm DB using @realm/react

Current behavior
I use the useQuery from @realm/react
const groups = useQuery("Group");

When I reference this list in FlashList and add an item to the DB, it will not appear, it will still show the same number of items.
<FlashList
            data={this.groups}
            renderItem={this.renderItem}
            estimatedItemSize={120}
            overrideItemLayout={this._overrideItemLayout}
        >
</FlashList>

Quickly browsing through the FlashList code it looks to me like it only updates when the reference of the data prop changes.
Thus changing it to the following resolves the issue:
<FlashList
            data={[...this.groups]}
            renderItem={this.renderItem}
            estimatedItemSize={120}
            overrideItemLayout={this._overrideItemLayout}
        >
</FlashList>

Expected behavior
This is from a performance aspect in my opinion not optimal as it needs to copy the array all the time.
There is a similiar discussion on the realm-js Github when using @realm/react with FlatList. It seems to be solved with FlatList.
See: https://github.com/realm/realm-js/issues/5404
Platform:

[x] iOS
[x] Android

Environment
"@shopify/flash-list": "^1.4.2",

I have the same issue when using useRef and push to array. List does not update when reference is the same, even with extraData={data.length}