Having issues with importing the package in my TS file

Here's how I'm importing the package in my smart-wallet.ts file
import * as shamir from "shamir-secret-sharing";

Error
TS2307: Cannot find module 'shamir-secret-sharing' or its corresponding type declarations.

Here are the complete logs:
ERROR in /Users/shiven/Documents/code/smart-wallet-client/src/smart-wallet.ts
./src/smart-wallet.ts 2:24-47
[tsl] ERROR in /Users/shiven/Documents/code/smart-wallet-client/src/smart-wallet.ts(2,25)
      TS2307: Cannot find module 'shamir-secret-sharing' or its corresponding type declarations.
ts-loader-default_e3b0c44298fc1c14

webpack 5.89.0 compiled with 2 errors in 1527 ms

What's causing this and how can this be resolved? Let me know if you need any additional info. Thanks!

Could you include the official type declaration file for extending support to Typescript projects.

Hey @alfheimrShiven, from the error message, it looks like the build system cannot find the module at all. Are you sure it's been installed to your project's node_modules?
The project does export the proper ts declaration files. You can see them in the resulting NPM package here.

Hey @benjreinhart I'm sorry to bother you. It's working just fine. I was supposed to create this issue on another repo but got confused by very similar names I guess🫣.


Cannot Add a Vehicle to the Inventory

AP-13 As a user, I would like to add vehicles to the dealership's inventory

Description
When attempting to add a vehicle and click on the add vehicle the button does not do anything. No error is getting displayed.
Steps to Reproduce:

Go to the Inventory page

Click on "Add vehicle(s) to inventory" button

Fill out the vehicle information

An alert should appear on the modal indicating the occurrence of an error

On success, vehicle gets created.

Screenshots

No visual feedback on error:

This issue has been addressed and fixed.


[BUG] Current position percentage on TS130F Tuya cover not working properly

Hello,
Hope somebody could help me, or perhaps this issue could help others....
Bug/problem description:
"class": "zhaquirks.tuya.ts130f.TuyaTS130GP"
I can read/write the attribute via ZHA:
TuyaCoveringCluster (Endpoint id: 1, Id: 0x0102, Type: in)
current_position_lift_percentage (id: 0x0008)
but I always read the same value regardless of whether I activate the cover or not. This leads me to problems with automations that triggers based on the current position of the cover.
To Reproduce:
Raspberry-Pi-4b, HAOS
Coordinator: CONBEE-II
Covers:
"manufacturer": "_TZ3000_zirycpws",
"model": "TS130F",
"class": "zhaquirks.tuya.ts130f.TuyaTS130GP"
Setting cover position, opening, closing… (to 40% at the image)

Then, even waiting for minutes, when I read the current position attribute, I always get zero:

Other point: immediately and only after reading the attribute, if we look at the position of the cover entity, It has been changed to zero

but the real position of the physical cover is still 40%.
Additional information:

If I write a different value to the cluster attribute, it will last forever when I read it.
I think I remember that a few months ago it worked well
The calibration_time (id: 0xf003) attribute on the same cluster works fine

Solution I'd like?

Know if a simple solution exists
If it is a bug (on the zhaquirk ??), to be fixed
Perhaps, in the meantime, the community to be advised to avoid automations triggering based on the current position of the cover as the behavior of the covers, especially when HA restarts, would be somehow unpredictable.

Could you enable the debug logs and attach the HA interaction with the device?

Thank you for your help.
I’m attaching a filtered log file (home-assistant_2023-02-04T16-49-38.061Z_a.log) and other one (index_ieee_qry.txt) with just the records containing the ieee of the device and an index to the other file.
I looked for the ieee: a4:c1:38:0f:63:45:ee:b9 keeping related records before and after.
Hope this is what you asked me, otherwise please let me know.
home-assistant_2023-02-04T16-49-38.061Z_a.log
index_ieee_qry.txt

Could you also attach the device diagnostics?
And a question: after reading the cluster attribute if you set a cover position from HA (or from the device), the value is updated and keeped in time?

I'm attaching the device diagnostics.
zha-e9a3ea159f895001306b4586af9e3e5f-_TZ3000_zirycpws TS130F-60356910b2e6c9b13c975a29ba1e6fe4.json (3).txt
I'm not sure if I understand your question. Let me follow the example: after reading the cluster, the position indicator shows 0% but physically it is at 40%. Then, if I open the cover (up arrow), it starts to rise from 40%, not from 0%. Does it answer your question?

Yes, it does.
From what I can see, the device reports is updating the device data cache (as the normal behavior does), but when you read the device attribute (which does not take into account the cache), device reports that 0 value (which seems wrong) and stores it in the cache (which is the normal behavior).
From this point I don't see an easy solution. Maybe we can force the quirk to handle all the info from cache but seems too much taking into account that others attributes are getted from device without any problem.
I would suggest to fix the automations tringy to get the cover position from the entity status, and not from the Zigbee attribute read but not sure if that approach will feet your requirements.
I'm also curious about what happen when HA polls the device status. If I'm not wrong, every hour or so HA polls the device status and I have doubts if the cover position will be updated to 0 or not.

But I have problems with a trigger like this:
trigger:
  - platform: numeric_state
    entity_id: cover.room_1
    attribute: current_position
    below: 2

because when HA refresh the position (for instance when HA restarts), the automation triggers even if the cover position is above 2.
Does this trigger take into account the cache?. Or what should I do to make automations getting the cover position from the entity status?

Does this trigger take into account the cache?

I can't say.

Or what should I do to make automations getting the cover position from the entity status?

Your automation seems good to me. And I don't know why is triggering on refresh.
I would try with something like:
trigger:
  - platform: state
    entity_id:
      - cover.room_1
    from: open
    to: closed

But I don't know if would have the same problem on refresh. 🤷🏻♂

Better, I explain the original problem and perhaps you could help with some ideas.
The original problem is covers very often physically stop when reaching top or bottom positions but, when the cover is almost completely closed it stays in ‘closing’ state at position 99% and, when the cover is almost completely open it stays in ‘opening’ state at position 1%. This behavior leads to problems in lovelaces showing the covers states. I could see that setting the position of the cover at 100% or 0% respectively, the cover moves the remining 1%. So I tried the following automation:
trigger:
  - platform: numeric_state
    entity_id: cover.room1
    for:
      hours: 0
      minutes: 0
      seconds: 2
    attribute: current_position
    below: 2
condition: []
action:
  - service: cover.set_cover_position
    data:
      position: 0
    target:
      entity_id: cover.pers_multi_este_cover

reaching the problems I previosuly described...

... and taking into account my design, which I devised for greater availability purposes:

I think I worked out to a reasonable workaround by this automation:
trigger:
  - platform: state
    entity_id:
      - cover.room_1
    to: closing
    for:
      hours: 0
      minutes: 0
      seconds: 30
    id: "1"
  - platform: state
    entity_id:
      - cover.room_1
    to: opening
    for:
      hours: 0
      minutes: 0
      seconds: 30
    id: "2"
condition: []
action:
  - service: light.turn_off
    data: {}
    target:
      entity_id:
        - light.int_4c_room1_light_5
        - light.int_4c_room1_light_7
  - if:
      - condition: trigger
        id: "1"
    then:
      - service: cover.set_cover_position
        data:
          position: 0
        target:
          entity_id: cover.room_1
    else:
      - service: cover.set_cover_position
        data:
          position: 100
        target:
          entity_id: cover.room_1
mode: single

where 30 seconds = 10 seconds + callibration time


pkg/blobserver/namespace: staticcheck

Closing this, see my comment here:

https://github.com/perkeep/perkeep/pull/1405#issuecomment-894727096


systemd: fix services to allow TLS configurations via java.security.ciphers

This fixes the management server and systemd services to allow the
java.security.ciphers file to configure disabled TLS protocols and
algorithms. This also cleans up systemd service files for agent and
usage server, and deprecates use of jsvc when systemd can be used
directly.
This fixes #3140
Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[x] Cleanup (Code refactoring and cleanup, that may add test cases)

How Has This Been Tested?
Deploy systemd based environments using CentOS7 and Ubuntu 18.04. Verified first that TLS settings has no effect, then with the changes applied found in both usage, kvm agent and management server that systemd service works OK and TLS was configurable again.

@blueorangutan package

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2594

@blueorangutan test matrix

@GabrielBrascher please consider including this in <IP_ADDRESS> as this fixes the TLS configuration security issue.

Forward merging-note: master does not support ubuntu 14.04 and older, therefore jsvc dependency can be removed from master's debian/.

Considering this; @rhtyd do you think that this PR is a blocker for 4.12? If so, could you please register this PR as a blocker on the mailing list thread '[PROPOSE] RM for 4.12'? Thanks!

Yes @GabrielBrascher because the tls disabled settings is no longer honoured, it's a security issue. Will propose on the list.


Run GitHub Actions tests on Windows

This PR updates our GitHub Actions tests to run on both Ubuntu and Windows:

https://github.com/alphagov/govuk-frontend/issues/3638

Only Ubuntu runs Percy screenshots and Node.js package export tests
~Branch protection status checks will need updating to include the runner~
Update: Thankfully looks like GitHub ignores the (${{ matrix.runner }}) at the end of the status check name

Let's give these tests on Windows a spin! Glad Github picks up the mandatory checks without needing updating 🥳

@romaricpascal Sad times 😭
It's now run (again) and those checks are still waiting
Probably will have to re-add them all with ubuntu/windows at the end 🤦♂


Release creation proposal

Compile and add ready for use executible PolicyPlus into repository releases.

I just updated Help | About to display a useful version and published a snapshot as a proper GitHub release.


Keyboard.type fails with "insecure command argument recognition"

Following the usage instructions at https://omlins.github.io/JustSayIt.jl/stable/usage/#Fast-command-programming-with-voice-argument-functions, type fails:
julia> start(commands=commands, max_speed_subset=["ma", "select", "okay", "middle", "right", "double", "triple", "copy", "upwards", "downwards", "take"])
[ Info: JustSayIt: I am initializing...
[ Info: Listening for commands in English (United States) (say "sleep JustSayIt" to put me to sleep; press CTRL+c to terminate)...
[ Info: Starting command: click_left (latency: 11 ms)
[ Info: Starting command: type
[ Info: Command `type` aborted: insecure command argument recognition.
^C[ Info: Terminating JustSayIt...
[ Info: Stopped listening for commands.

Ref https://github.com/JuliaCon/proceedings-review/issues/121.

@pfitzseb : thanks for the issue. However, I don't think the link you posted points points to the right example. Could you please point to the right one?
Then, it might be here rather a documentation issue then a software issue, i.e., the documentation could potentially be clearer. Concretely, after starting the command "type" you need to specify the type mode; else it will abort as shown in your snippet. To see the available type modes say "help type" (more info about help is found here: https://omlins.github.io/JustSayIt.jl/stable/usage/#Help-on-commands-callable-by-voice)

Oh, gotcha. Definitely user error, I didn't realize type takes a second argument for some reason. The error message isn't particularly helpful though :)


pdist doesn't like my data shape

Description
I have been using scipy's pdist but my data is now too big to hold the result in memory.
I stumbled across dask-distance and tried just swapping in my code.
I needed to switch to using df.values, instead of just passing in my df, but that was fine.
But then I got the error:
~/miniconda3/envs/ovscrptd/lib/python3.6/site-packages/dask_distance/__init__.py in squareform(X, force)
    203     if conv == "tovec":
    204         if X.ndim != 2 or X.shape[0] != X.shape[1]:
--> 205             raise ValueError("X must be a square matrix.")
    206     elif conv == "tomatrix":
    207         if X.ndim != 1:

ValueError: X must be a square matrix.

Why must my input be a square matrix? Or, how can I get it to be a square matrix?
>>> input_dfd.values.shape
(nan, 245)

The shape of my original pandas dataframe is
>>> input_df.shape
(185084, 245)

Many thanks in advance for your thoughts.

Thanks for the feedback, Sarah.
Right, when we wrote this our interest was in Dask Arrays primarily. Converting Dask Dataframes to Dask Arrays should be fine. If you have specific suggestions on how it could be more friendly for Dataframes, please feel free to suggest.
Our design tried to follow SciPy's distance metrics closely. In particular pdist in SciPy returns a 1-D array that contains the upper triangle of the distance matrix as the matrix is symmetric. Usually looking at an example makes this more clear (if it's not already). So the call to squareform exists to perform this flattening operation. That said, it is rather inelegant currently and could probably benefit from some improvements.
Then the question becomes why does this fall down for your use case? Well if we have an array of unknown shape (e.g. (nan, nan) as your result likely has), it's difficult to check the shape and verify that is square. After all we don't know the dimensions. However we could argue for the pdist case we do. If we did bypass this check, we run into a different issue. Namely indexing is not permitted on unknown shapes as we don't know what the index corresponds to. This is key to flattening to preserve the order expected. Hopefully this provides some clarity about what is happening.
Though we really haven't addressed what we can do about this for your use case. There are a couple options. Have listed them below with some follow-up as to why they might be reasonable afterwards.

Use cdist instead.
Fill in the shapes ( https://github.com/dask/dask/issues/3293 ).
Improve squareform.
?

First it may seem natural to use pdist coming from SciPy to Dask, it may turn out that cdist is roughly equivalent to pdist in Dask. In SciPy this is obviously not true since this results in double the computation. However in Dask as we are using task graph with nodes keyed by the operations performed on them, some of those nodes may be repeated in an operation like cdist with the same array twice. If this does occur, Dask will just reuse the result, which will have the same effect as pdist, but without a calling to squareform, which is really all pdist does for you.
Second if cdist is duplicating computation and becoming generally expensive such that pdist is necessary, we can take a different tact. Namely we can try to fill in unknown dimensions in the array as discussed in issue ( https://github.com/dask/dask/issues/3293 ). In particular, this workaround should be reasonably effective. This works best if the array is persisted or the cost of computation is very cheap. At this point, going through squareform should be no problem as the shape is known.
Third it may turn out that both of the options above are not viable for any number of reasons. If this is the case, we should revisit how squareform works. This is probably a reasonable thing to do anyways as the existing implementation is pretty naive. Have some ideas, but they probably deserve some more thought and discussion before implementing anything. We can certainly discuss if there's interest.
There may of course be other options that are unlisted. Other suggestions are welcome. 😄
HTH


Add literal docs

Change Summary
Add docs for typing_extensions.Literal
Related issue number
(No issue)
Checklist

[x] Unit tests for the changes exist
[x] Tests pass on CI and coverage remains at 100%
[x] Documentation reflects the changes where applicable
[x] HISTORY.rst has been updated

if this is the first change since a release, please add a new section
include the issue number or this pull request number #<number>
include your github username @<whomever>

LGTM, please rebase and fix HISTORY. (sorry :bowing_man: )

@samuelcolvin Done


[docs-infra] Add line and word highlighting on code blocks

Closes #41509
Added the ability to highlight lines of code in a code snippet. Used the prism.js library (couldn't use rehype-pretty-code, see why below) with the line highlighting plugin, to apply the highlight. Example of use:
´´´javascript {1, 3-5}
foo {

someCode

return bar

}

Writing this inside a Markdown section would highlight lines 1,3,4,5 of the code snippet.
Briefly discussing how we worked on this feature, we started by trying to use the rehype-pretty-code library, following the recommendation provided on the issue, but eventually couldn't do it, due to the asynchronous nature of the Unified function, which works in the core of the library. Since the MUI project does not have async functions in the pages-related parts, we couldn't manage to do it, hence the switch to prism.js library. Also, a quick note, we added the useEffect on all the components' doc pages. If you want a certain page to have highlight enabled, it must be added to its export file.

Thanks for this significant effort! Adding a visual of the feature for fellow reviewers' convenience:

The only concern I have is: what is the performance impact of this feature (both in development and production: remote .css imports during build, adding a useEffect per demo)  versus the gain of being able to highlight code placed inline in .md files (not code placed inside demos)? To me the latter is marginal when compared to the former.

Hey, I was the co-author in this feature. Addressing the issues mentioned above: The only files we changed was parseMarkdown.js and parseMarkdown.test.js, and then we just added some css to the highlight. All useEffect changes are only made so we can add highlighting to the correspondent component of that file. The other commits were different attempts, like trying to use rehype library, but we ended up removing them and the only actual changes were in parseMarkdown.

Right, I think the diff shows more changes to the codebase than what you mentioned above; for instance the package.json continues to import rehype etc.

About the performance issue, if I understood correctly you are suggesting that implementing this inside a demo would make more sense rather than having the dev it inline on the .md file?

In some sense, yes - I was saying that the true benefit of highlighting, which I think is also the intention of the original issue, is to be able to highlight lines within demo files - not just code blocks placed inline in .md files. That benefit might make the trade off worth it.


🐛 Can't get past Verify Identity on Sanchonet

Area
Proposal Pillar
Domain
sanchogov.tools
Which wallet were you using?
Eternl 12.16.1 beta
Context
Trying to test Proposals, but can't get past Identity verification
https://www.loom.com/share/fa731e237bc848f393b83064ef4551c9?sid=b77da08e-1631-4d56-94c5-5815d977b386
Steps to reproduce

Go to Proposals tab
Try to verify identity

Actual behavior
Verify identity screen reappears after I have verfied in wallet
Expected behavior
Identity is verified, and I can use sanchogov

Tried in Demos wallet, same results: https://www.loom.com/share/91e36c8f59f04e5c81362e1733f810c9?sid=33e9bfec-0890-422c-a6c3-f0fb8f6fb92d

Tested and working on:

Eternl <IP_ADDRESS>
Demos 1.8.2


[JOSS] Paper Comments

The tool and paper look great! Here are some comments (mostly minor):
Summary

16: You say "...essentially point sources before their light passes through the atmosphere and telescope..." Obviously this is normally correct from the ground, but since this is specifically a JWST paper you may want to remove the atmosphere part, or change it to "...through the atmosphere (when observing from the ground) and telescope..."
23: Since you've restricted this to NIRCam for now, I'd add that in the last paragraph: "...tailored to JWST imaging" --> "...tailored to JWST NIRCam imaging"

Statement of Need

32: Don't need to redefine JWST here
33: Please put an "e.g.," in front of the COSMOS citation, NIRCam offers a lot more scientific opportunities than just that!
67: less --> fewer
While I agree that figure 2 highlights the need for non-Gaussian PSF models, would it be possible to make this a 4-panel figure showing what happens if you use a 2D Gaussian? I know that people are doing this, and it may be nice to show how much larger the residuals are
131 x 131 pixels is very large...I would be surprised if your fitter is actually able to pull anything useful out at that scale. Even your Figure 2 is just showing 75 pixels, and already it's basically noise at the edge even on a log scale. Even at 20 pixels or so (radius) you should have almost all the flux, so I'm not sure if/why you would need to go all the way to 4-5 arc seconds. Contamination from other objects would be pretty common at that level as well.

State of the Field

87: spelling out PIFF (and PSFex for that matter) should go to the first mention in the previous section
95: Best to change "twenty-five years ago" to a year, so that in future years the line still makes sense
125: "takes up" --> "covers"

I've addressed all of these comments in my latest rendition of the draft, and I have rerendered the PDF in the JOSS issue. To illustrate the non Gaussian nature of the PSF, I added a comparison between an idealized WebbPSF forward model and a Gaussian approximation. Thank you for your insights!

Looks great!


How to modify existing field caption (Source Expression is variables ) in Pages !

Hi ,
Can you please help me to modify existing field caption (Source Expression is variables ) in Pages !
(Highlighted in yellow colour in the pic , needs to be change )
Note:
Using W1 Version (CU 4)

I did some workaround so consider as case closed !


Single file library

The big advantage of your library is that it is very lightweight: there are only three files in it.
I wonder if you could go even further and reduce it into one single file? (such as picocli)
The main benefit would be to easily include it as source and therefore avoid adding dependencies.

Isn't it kind of an anti-pattern to include libraries as sources? Also AsyncReaderRecorder and PowerShell are very different classes and wouldn't fit well together.

It might be an anti-pattern indeed.
My purpose is to follow a zero-dependency policy in my libraries.
Therefore I need to repackage the dependencies of my libraries.
I've tried maven shade plugin. This plugin relocates dependencies by modifiying byte code directly. Unfortunatly, it doesn't repackage module-info classes (JPMS).
The second solution I've found so far is to to automate source extraction of dependecies to a second source directory before the compilation of all the source code (lib + dependencies). Having a single source file eases this.
AsyncReaderRecorder and PowerShell are indeed very different classes. My guess is that AsyncReaderRecorder could be moved into PowerShell as a private class if it has no use outside of the library itself.

Ok, I see. Your use case is quite special. Unfortunately I have no interest in changing the architecture of this library, as it fits most use cases just fine. The best solution would probably be to include all 3 files as source. Or I guess you could create something that packs everything into one class as inner classes.


[DRAFT] Make dynamic config

Refactor to prevent direct imports from assessment_mapping_fund_round.py. This is the place we define and map fund and round relations and configuration.
Instead we change all code to fetch these through the Config class, which based on the environment it may or may not add Sample Fund to the config.
It will be added for everything but prod.

Not needed!


Adds shell script for unbounded table read

Adds shell script that

Creates the asynchronously running unbounded job - the dataproc job is created in mode unbounded
Dynamically adds partitions - insert_dynamic_partitions.py is executed with the necessary parameters.
kills the dataproc job - As the read has completed and its correctness needs to be checked further.

/gcbrun


Override password reset templates

@gregnewman I tested the password reset flow in staging and it works, so I think you were right that it was the email not being set up.
I found the relevant templates for the process and did the initial override to use our base template, so once this is merged, it's ready for the real design! (The text in the screenshots is huge because I bump up my font size 👓  )
Result:

@gregnewman If you notice any other templates that need overriding, let me know!

@williln I think the confirmation for social auth for continue or cancel on login and signup need the same inheritance.

@gregnewman Yeah, I'm having trouble with that one (#403) but once I get it figured out I'll go through the social login flows and make sure the other templates are taken care of too.


Is this model can edit object motion?

Is this model can edit object motion?

I think it depends on the baseline's editability....


"ngrx-store-logger" has an incompatible peer dependency to "<EMAIL_ADDRESS>

Looks like the peer dependency needs to be updated for the newer version of @ngrx/store this is the same issue that occurred for a previous version, I linked that issue below
https://github.com/btroncone/ngrx-store-logger/issues/34

Looks like this will be resolved by the pending pull request https://github.com/btroncone/ngrx-store-logger/pull/32


flag provided but not defined: -password

I'm getting this issue when passing the password like this:
theme bootstrap --password=mypassword --store=test-store.myshopify.com

Error:
flag provided but not defined: -password

Also, [your-api-password] is misleading... Is it the password or the API secret?

There are detailed documents about what password it is referring to. http://shopify.github.io/themekit/#get-api-access What version of themekit are you using? I cannot reproduce that error and it seems like it is from an old flag parsing library that we no longer use.

I didn't realize that the app needed to be a private app directly in the store vs an app for a partner account. May want to add a disclaimer for where the app should be created from.

Yep. This isn't working. I'm running OSX 10.9.5. The error is consistent, even with the correct password.
$ theme configure --password=asdflkjasdlfkjasdf --store=xxxxx.myshopify.com --themeid=asdflkjasdflkjads

ERROR:
flag provided but not defined: -store

Again, what version are you on because that error you are receiving seems like it is from an old version.

Theme Kit v0.4.7

Please reinstall or update your themekit. The most recent version of themekit is v0.6.9

Thanks. Looks like it's not updated on homebrew though:
$ brew info themekit
shopify/shopify/themekit: stable v0.6.7
Theme Kit is a tool kit for manipulating shopify themes
https://shopify.github.io/themekit/
Not installed
From: https://github.com/shopify/homebrew-shopify/blob/master/themekit.rb

Yeah the homebrew recipe is behind a few patches but if install 0.6.7 and run theme update it will get the most recent version. The update command was introduced in 0.5.x

I got it. Looks like I had shopify_theme installed from ruby gems. All set. It's working 👍


provide php constants

Php has a lot of predefined constants. PHP_EOL, JSON_PRETTY_PRINT as examples.
I suppose it won't be hard to provide it since we can grab them in php with
get_defined_constants();

http://php.net/manual/en/function.get-defined-constants.php
It could be nice to have theses constants.
Thanks for that package :)

Good idea! I implemented this in pull request #161 .


[RFC] Adding CUDA Graphs conditional node support with user-friendly APIs

I’m working on CuPy’s CUDA Graph conditional node support and considering adding a more user-friendly graph constructing API to CuPy.
I have two possible plans to achieve this goal:

(A) “with” API
(B) Functional API

(A) “with” API
pseudo code
import cupy
from contextlib import contextmanager

# Add conditional node to capturing graph and
# switch to different stream to capture body graph
@contextmanager
def while_loop():
    ...
@contextmanager
def if_else():
    ...

a: cupy.ndarray = ...
b: cupy.ndarray = ...

with capture_context() as ctx:
    ...
    with ctx.while_loop( # while loop
        cond_fn=lambda: cupy.all(a == b),
        cond_fn_args=() # Optional
    ):
        ... # while loop body

    with ctx.if_else(cond_fn=lambda: cupy.all(a != b)) as cond:
        with cond.if_():
            ...
        with cond.else_():
            # Should we consider `else` body support?
            # Currently conditional node does not support `else`
            # but seems to add support in the near future.
            ...

graph = ctx.get_graph() # get captured graph
graph.launch()

Pros

Considering the construction of CUDA graphs through stream capture, this approach provides a natural API.
Allows for more concise writing of nested conditional nodes.

Cons

Defining a loop using the “with” syntax in Python may not be intuitive.
Adding a support for an "else" body can result in an awkward or unnatural syntax.

(B) Functional API
Is this the same approach with torch._higher_order_ops.while?
pseudo code
# Prepare GraphConverter class to hold graph capturing state
class GraphConverter:
    def __init__(self):
        self.state = ... # need to have a global state

    # Function to define while loop
    def while_loop(self, cond_fn):
        def inner_func(body_fn, body_args=None):
            ... # operation to construct graph
        return inner_func

    def condition(self, cond_fn):
        def inner_func(true_fn, false_fn=None):
            ...
        return inner_func

    def convert(self, func):
        ...
        return func

gc = GraphConverter()
@gc.convert # A decorator to convert function to CUDA graph
def target(a: cupy.ndarray, b: cupy.ndarray):
    # While
    def while_fn(args):
        ...
    gc.while_loop(cond_fn=lambda: cupy.all(a == b))(while_fn, body_args)

    # You can also write as follows
    @gc.while_loop(cond_fn=lambda: cupy.all(a == b))
    def while_fn2():
        nonlocal a, b
        ...

    # if-then-else
    def true_fn():
        ...
    def false_fn():
        ...
    gc.condition(cond_fn)(
        true_fn=true_fn,
        false_fn=false_fn # easier to add `else` support
    )
    # or
    @gc.condition(cond_fn)
    def true_fn2():
        ...

target(a, b) # construct and execute graph at the same time

Pros

Simplifies the addition of "else" support when the conditional node supports an "else" body.
Prevents issues related to unintentional variable overwriting and improper resource management, as functions naturally encapsulate variable scope.

Cons

Writing deeply nested programs can become complex and cumbersome, although using decorators can help alleviate this issue to some extent.
Requires the use of the "nonlocal" declaration or passing variables as arguments to access outer-scope variables.

Current status
I began implementing the API using the functional API approach (Plan B). However, switching to Plan A shouldn't be too time-consuming since the core implementation can be shared between both approaches.
I would like to ask your thoughts on these two ideas. Please let us know your preferences, potential advantages, pitfalls, and any other insights you might have.

xref #6290

Thanks for putting thoughts in this. A few drive-by comments:

I don't think we need to support else nodes, because without compiler help we have no way to validate if the user-provided else conditional function is strictly identical to the negate of the if counterpart. Users who need an else node should just write another if node.
Proposal A is fine with me if this is a concern:

Defining a loop using the “with” syntax in Python may not be intuitive.

because in order to use stream capture to build a graph that contains conditional nodes, we have to walk through all the nodes at least once, unconditionally. The with syntax allows that.

Proposal A's ctx usage to get a graph seems a bit odd to me. Usually after leaving the context manager, the context object is invalidated. (xref: https://github.com/cupy/cupy/pull/8502#issuecomment-2311671823) But it is probably just a nitpick.
I don't like gc in Proposal B, as it could be confusing with the garbage collector. How about calling it, say, "GraphBuilder" (and aliasing it to gb)?
When using the decorator approach in Proposal B, such as @gc.while_loop and gc.condition, it seems to we still need to call while_fn2 and true_fn2 in target in order to have them executed at least once and captured. Is it an oversight?

In any approach, my biggest question is how you plan to generate additional kernels that take an cudaGraphConditionalHandle as argument and call cudaGraphSetConditional to set the value based on user-provided Python functions. It seems to me either using CuPy JIT or CuPy kernel fusion is needed?


Clean up

[x]  Remove total count of team members just above list of team members
[x] Remove "Edit this page" button in footer
[ ] Remove filter button on team index page

@mtorres253 - I think we can break this out a little bit.  The remove unused pages / update team.yml seem like they would be better off in their own issues - items 1,2 and 5 are more front end issues.  I am taking care of these.  Can you more issues 3 and 4 somewhere else?

Yes I'll do that

I'll take the last checkbox @jbarnicle


How can I unmap tab?

I use the tab keymap for something else and would like to unmap it from Spectre but couldn't figure out how.
I tried to follow the documentation for other mappings and just replaced the example with "tab" instead, but it didn't seem to work.
This is what I tried to remap it off of <Tab> and into <S-Tab>
 mapping = {     ["tab"] = {         map = "<S-Tab>",         cmd = "<cmd>lua require('spectre').tab()<cr>", } }

Ahh, it was add recently. Yeah, we should add reconfiguration.

Hello what's the state of this

I nearly done #110 after I will do this. Should be easy. Sorry, I was inactive long-time only now recovering.

Can you guys try #211 . Add to config mapping without ['tab], ['shift-tab'] or remap to another key:
...
        ['tab'] = {
            map = 'gn',
            cmd = "<cmd>lua require('spectre').tab()<cr>",
            desc = 'next query'
        },
        ['shift-tab'] = {
            map = 'gp',
            cmd = "<cmd>lua require('spectre').tab_shift()<cr>",
            desc = 'previous query'
        },
...


"Deploy to Heroku" button

Add "Deploy to Heroku" button to README.md
https://devcenter.heroku.com/articles/heroku-button

I can take this if you don't mind!

Sure @alejandronanez, thanks


[BUG] LNURLDEVICE on a localhost node

Describe the bug
I've installed the newest version of lnbits and the plugin LNURLDEVICE.
When I want to create a instance (switch) an error 500 pops up.
lnbits itself works just fine
Desktop (please complete the following information):

LNbits version: newest

The lnbits uses a nginx reverse proxy (url: https://<IP_ADDRESS>:4002/lnurldevice/?usr....)
The error log looks like this:
Oct 27 17:42:07 rocky-raccoon poetry[61537]: 2022-10-27 17:42:07.31 | ERROR | handled error
Oct 27 17:42:07 rocky-raccoon poetry[61537]: 2022-10-27 17:42:07.31 | ERROR | ERROR:
Oct 27 17:42:07 rocky-raccoon poetry[61537]: Traceback (most recent call last):
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/lnurl/core.py", line 24, in encode
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     return Lnurl(_url_encode(url))
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/lnurl/types.py", line 161, in __init__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     self.url = url if url else self.__get_url__(bech32)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/lnurl/types.py", line 165, in __get_url__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     return parse_obj_as(Union[OnionUrl, ClearnetUrl], _lnurl_decode(bech32))
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/pydantic/tools.py", line 35, in parse_obj_as
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     return model_type(__root__=obj).__root__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/pydantic/main.py", line 406, in __init__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     raise validation_error
Oct 27 17:42:07 rocky-raccoon poetry[61537]: pydantic.error_wrappers.ValidationError: 2 validation errors for ParsingModel[Union[lnurl.types.OnionUrl, lnurl.types.ClearnetUrl]]
Oct 27 17:42:07 rocky-raccoon poetry[61537]: __root__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   URL host invalid, top level domain required (type=value_error.url.host)
Oct 27 17:42:07 rocky-raccoon poetry[61537]: __root__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   URL scheme not permitted (type=value_error.url.scheme; allowed_schemes={'https'})
Oct 27 17:42:07 rocky-raccoon poetry[61537]: During handling of the above exception, another exception occurred:
Oct 27 17:42:07 rocky-raccoon poetry[61537]: Traceback (most recent call last):
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 162, in __call__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     await self.app(scope, receive, _send)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/middleware/gzip.py", line 24, in __call__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     await responder(scope, receive, send)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/middleware/gzip.py", line 43, in __call__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     await self.app(scope, receive, self.send_with_gzip)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/middleware/cors.py", line 92, in __call__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     await self.simple_response(scope, receive, send, request_headers=headers)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/middleware/cors.py", line 147, in simple_response
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     await self.app(scope, receive, send)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/exceptions.py", line 93, in __call__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     raise exc
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     await self.app(scope, receive, sender)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     raise e
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     await self.app(scope, receive, send)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 670, in __call__
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     await route.handle(scope, receive, send)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 266, in handle
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     await self.app(scope, receive, send)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 65, in app
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     response = await func(request)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/fastapi/routing.py", line 227, in app
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     raw_response = await run_endpoint_function(
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/fastapi/routing.py", line 160, in run_endpoint_function
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     return await dependant.call(**values)
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/lnbits-legend/lnbits/extensions/lnurldevice/views_api.py", line 42, in api_lnurldevice_create_or_update
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     return {**lnurldevice.dict(), **{"switches": lnurldevice.switches(req)}}
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/lnbits-legend/lnbits/extensions/lnurldevice/models.py", line 77, in switches
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     lnurl_encode(
Oct 27 17:42:07 rocky-raccoon poetry[61537]:   File "/home/pi/.cache/pypoetry/virtualenvs/lnbits-UJme9GZJ-py3.9/lib/python3.9/site-packages/lnurl/core.py", line 26, in encode
Oct 27 17:42:07 rocky-raccoon poetry[61537]:     raise InvalidUrl
Oct 27 17:42:07 rocky-raccoon poetry[61537]: lnurl.exceptions.InvalidUrl
Oct 27 17:42:07 rocky-raccoon poetry[61537]: 2022-10-27 17:42:07.31 | ERROR | Exception in ASGI application
Oct 27 17:42:07 rocky-raccoon poetry[61537]: 2022-10-27 17:42:07.31 | INFO | <IP_ADDRESS>:51662 - "POST /lnurldevice/api/v1/lnurlpos HTTP/1.1" 500

lnurls need to be delivered over https, so it wont work locally


[WIP][DiscussionThread] Add more linting rules for sdk codebase

In the interest of upcoming SDK refactoring, I feel this is a good time to revisit our style checks as we refactor the codebase. I have added some style checks to start a discussion. THIS IS NOT FINAL. We can discuss in this PR and decide what works for all of us and then we can adapt those changes during the refactor. I have made sure to retain as many rules as I can from earlier checkstyle.xml. However, there was been few instance where I changed a rule. But for the most part of the diff, I have only added new rules and sorted them by sections (a comment consisting of url being the implicit header for that section). I have consciously avoided adding comments as I feel like many of the rule names are self explanatory and adding comments in a file of 400+ lines would decrease the readability. Also, this is not something we read on a regular basis. Many of the rules are just a google search away to read and understand what they do (And i have provided the urls in the comments).
Feel free to comment / commit to this PR as you wish.
I understand this PR may be a lot of decisions to make, so I have organized the changes by sections in http://checkstyle.sourceforge.net/checks.html in the checkstyle.xml as follows :
http://checkstyle.sourceforge.net/config_annotation.html
http://checkstyle.sourceforge.net/config_blocks.html
http://checkstyle.sourceforge.net/config_design.html
http://checkstyle.sourceforge.net/config_coding.html
http://checkstyle.sourceforge.net/config_header.html
http://checkstyle.sourceforge.net/config_imports.html
http://checkstyle.sourceforge.net/config_javadoc.html
http://checkstyle.sourceforge.net/config_metrics.html
http://checkstyle.sourceforge.net/config_misc.html
http://checkstyle.sourceforge.net/config_modifier.html
http://checkstyle.sourceforge.net/config_naming.html
http://checkstyle.sourceforge.net/config_regexp.html
http://checkstyle.sourceforge.net/config_sizes.html
http://checkstyle.sourceforge.net/config_whitespace.html

For where the rules needed a numerical value (For e.g.: Maximum method length), I have used sensible defaults but we can change them as we see fit. I feel that some of these style rules would make extending our code and testing easier. We can discuss this in slack too if you think it would be easier to communicate.

Thanks for the reviews @elezar and @kaiwalyajoshi
I am adding TODO in the checkstyle.xml for rules I don't want to fix in this PR. For example ideally, we should have a cyclomatic complexity of less than 10. But If i decide to breakdown every method that has cyclomatic complexity of > 10 it would bloat this PR's scope and may introduce unexpected logic changes as well if I am not careful enough. I want to add as many rules as possible with TODOs and then we can address each of them at our own pace. Once I am done, the diff of this PR would be large but i expected very less to none logic changes. I am planning for the diff to be only reformatting changes.

Fully formatted all the frameworks/* java files with new linting rules.
All new violations would be reported as errors, we can change the severity if this turns out to be a pain (i don't expect it to).
Added several TODO's and suppressed multiple rules in the source code. Feel free to fix them in future PRs whenever we modify the relevant files.
Excluded the test files from linting rules. We can address this in future PRs.
Also added a small guide on how the rules can be enforced. We don't need any new CI changes as one of the existing CI step (gradle check) already covers this.

@elezar @kaiwalyajoshi @kvish the diff is huge but I did not make any logic changes (The CI passed on first run :) ).
I really wanted to enforce the rule where we have only one parameter per line in method declaration but looks like checkstyle.xml does not have a provision for this (said so by one of checkstyle contributors). I tried to include a custom check to enforce this but it looks like a new module/jar is needed to do that and it felt like an overkill to do this. May be we can look at sevntu-checkstyle in future. The same would be nice to enforce for method chaining. This is especially helpful with java 8 lambdas and method chaining where intellij shows each method return type:

May be for now, we consciously enforce this style ourselves wherever we seem fit.

Merging this. We can always revert/fix if there are any other unexpected implications.


Pretrained Model Link is Broken

https://drive.google.com/drive/folders/1cAucUHO0FP_I-_atSpbyRwKEiflPPN7v?usp=sharing

The model was delete by Google, you can use the huggingface model.


Comments get deleted

Comments (both single line and multiline) get deleted on conversion.
Is that by design?

I would also really like if comments were preserved.

This should be fixed once https://github.com/koofr/javatoscala/pull/9 gets merged.

Fixed with #9.


docs/readme.md

[ ] what the app is
[ ] the app's tech stack
[ ] a screenshot or a few,
[ ] a network diagram,
[ ] a database schema
[ ] deployment information
[ ] code coverage / testing / travis badges
[ ] ...


chore(release): v0.7.1 🎉

:robot: I have created a release beep boop
0.7.1 (2023-07-18)
Bug Fixes

practs: bump to latest best practices (a1855f2)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/whodisio/whodis-react/releases/tag/v0.7.1 :sunflower:


GN-4544: Always get decision title from public decisions

Overview
Always get decision title from public decisions.
There was an issue where ?decisionTitle was not always fetched by public decisions query correctly. This fixes that 🙏
connected issues and PRs:

https://binnenland.atlassian.net/browse/GN-4544

Setup

Checkout
npm run start

How to test/reproduce

Go to Besluit Sample
Try to insert reference
Change filter to the one depicted on the image
Observe that results are rendered correctly

Challenges/uncertainties
Instead of using ?decisionTitle in both OPTIONAL fragment I've used different names based on where decisionTitle is coming from and then BOUND ( COALESCE, works a charm
Checks PR readiness

[X] UI: works on smaller screen sizes
[X] UI: feedback for any loading/error states
[X] Check if dummy app is correctly updated
[X] Check cancel/go-back flows
[X] changelog
[X] npm lint
[X] no new deprecations

The testing steps work fine, but they also seem to work on master, so I can't verify whether it has worked. I followed the steps and used the same filter as in the screenshot.


timeScale().fitContent() problem

Lightweight Charts Version: latest from unpkg
Problem: fitContent() and setVisibleRange() functions do not work as expected
CodeSandbox/JSFiddle/etc link: https://jsfiddle.net/wheasqzf/2/

I don't think that it's bug - we have a limitation of min/max bar spacing value. In case of bar spacing less than 1 we need to approximate values somehow (merge multiple bars into one?) to display the data correct. But it looks like feature (even like kind of big feature).

Got it. thanks. The approximation rule of data should be set by users, I suppose.


How about adding some shortcut keys like jupyter notebook ?

🥰I am very happy to have found such an easy-to-use REST client that can meet all my needs. I like the way to manage interfaces like documents.
When I use the httpBook extension, it is very similar to the UI of jupyter notebook, so I habitually press b to create a new cell, but it does not work as expected.
So can we add some shortcut keys like this?
Here are some introductions to jupyter notebook shortcut keys：https://towardsdatascience.com/jypyter-notebook-shortcuts-bf0101a98330

There are actually already the comands by default in VSCode (notebook.cell.insertCodeCellBelow). Only the default shortcuts use different keybindings. You just have to adapt them to your needs (see).


ocamlPackages.dns: 4.4.1 -> 4.5.0

Also adds new dependency mirage-time and its associated unix variant.
This update currently breaks jackline, waiting on upstream to fix it / my fix to get merged. Just opening this PR already so nobody else needlessly starts working on it :)
cc @vbgl

@GrahamcOfBorg build jackline

Build error was fixed in jackline, nixpkgs-review now reports no build errors.

Merged as b5f9eb06b5a2e6513944283ecef97be1d4c92509 and 0c4386bf0a55a7332c0948abcd9c875e8627847f.


Entrypoints

Allows for packages to list codecs in entrypoints, so that the package in question doesn't need to be imported in before the codec can be usable.
Notes:

the long list of try import/register in numcodecs/__init__ could be avoided by this.
we'll need a way to list all the available codecs
How.should this be documented?

Fixes #290
TODO:

[x] Unit tests and/or doctests in docstrings
[x] tox -e py39 passes locally
[x] Docstrings and API docs for any new/modified user-facing classes and functions
[x] Changes documented in docs/release.rst
[x] tox -e docs passes locally
[x] GitHub Actions CI passes
[x] Test coverage to 100% (Coveralls passes)

A reasonable way to test here would be to include a minimal package and .egg into the repo, and add it to sys.path during a test, checking to see if the basic codec included is automatically retrievable. Is that overkill, should I just skip testing code that is only meant for external packages? It does work for the only codec I have (https://github.com/fsspec/kerchunk/blob/main/kerchunk/grib2.py#L162 with so-far unmerged commit https://github.com/fsspec/kerchunk/pull/113/commits/a704c90f3096066f5f79427cd98633b846d4513f ).

Few quick thoughts:

This is great.
The implementation looks very sane to me.
:+1: for the sys.path-based unit test.
Having https://github.com/fsspec/kerchunk/commit/a704c90f3096066f5f79427cd98633b846d4513f is great though I wonder:

if there's anyway we can have an "integration" test (perhaps by extracting one or more production codecs from here?)
and if we should get feedback from other producers (cc: @cgohlke)

Finally, is there any issue with order of priority? I assume in the pre-entrypoints world, the fact that the user asserted numcodecs.register_codec at the right point helped to make the right thing happen. Now it would be more an order of the sys.path ordering, no? A partial solution may be to prioritize the numcodec register (https://github.com/zarr-developers/numcodecs/issues/278)

Sorry,  @cgohlke , I thought you were already on this thread, but that was, of course, for the linked issue.

if there's anyway we can have an "integration" test

I would rather do it with imagecodecs than kerchunk, the latter being more experimental and (for grib) needing cfgrib in the deps. Once imagecodecs has entrypoints, we can test against them.

is there any issue with order of priority

As things stand, entrypoints are being used as a backup, and anything registered using the existing path will be used first. If two entrypoints share the same name, the entrypoints module will choose one, indeed probably based on where they are in sys.path .
In Intake, we have warnings and clobber=bool for registering plugins, and also warn if entrypoints clash - but I don't think it's actually ended up being useful to do that. At most, I would suggest adding logging to the process, so a user can figure out what happened.

I would rather do it with imagecodecs than kerchunk,

:+1:

I would suggest adding logging to the process, so a user can figure out what happened.

:+1:

@joshmoore , added a couple of basic logger statements. Integration testing can wait on imagecodecs.

The imagecodecs package is still experimental/unstable. For now I published a separate package on PyPI with numcodecs entry points at imagecodecs-numcodecs:
import inspect
import pprint

from setuptools import setup

import imagecodecs
import imagecodecs.numcodecs

entry_points = [
    f'{cls.codec_id} = imagecodecs.numcodecs:{name}'
    for name, cls in inspect.getmembers(imagecodecs.numcodecs)
    if hasattr(cls, 'codec_id') and name != 'Codec'
]

pprint.pprint(entry_points)

setup(
    name='imagecodecs-numcodecs',
    version=imagecodecs.__version__,
    description='Numcodecs entry points for the imagecodecs package',
    # ...
    install_requires=['numcodecs', f'imagecodecs=={imagecodecs.__version__}'],
    entry_points={'numcodecs.codecs': entry_points},
)

Entry points:
[numcodecs.codecs]
imagecodecs_aec = imagecodecs.numcodecs:Aec
imagecodecs_avif = imagecodecs.numcodecs:Avif
imagecodecs_bitorder = imagecodecs.numcodecs:Bitorder
imagecodecs_bitshuffle = imagecodecs.numcodecs:Bitshuffle
imagecodecs_blosc = imagecodecs.numcodecs:Blosc
imagecodecs_blosc2 = imagecodecs.numcodecs:Blosc2
imagecodecs_brotli = imagecodecs.numcodecs:Brotli
imagecodecs_bz2 = imagecodecs.numcodecs:Bz2
imagecodecs_cms = imagecodecs.numcodecs:Cms
imagecodecs_deflate = imagecodecs.numcodecs:Deflate
imagecodecs_delta = imagecodecs.numcodecs:Delta
imagecodecs_float24 = imagecodecs.numcodecs:Float24
imagecodecs_floatpred = imagecodecs.numcodecs:FloatPred
imagecodecs_gif = imagecodecs.numcodecs:Gif
imagecodecs_jpeg = imagecodecs.numcodecs:Jpeg
imagecodecs_jpeg2k = imagecodecs.numcodecs:Jpeg2k
imagecodecs_jpegls = imagecodecs.numcodecs:JpegLs
imagecodecs_jpegxl = imagecodecs.numcodecs:JpegXl
imagecodecs_jpegxr = imagecodecs.numcodecs:JpegXr
imagecodecs_lerc = imagecodecs.numcodecs:Lerc
imagecodecs_ljpeg = imagecodecs.numcodecs:Ljpeg
imagecodecs_lz4 = imagecodecs.numcodecs:Lz4
imagecodecs_lz4f = imagecodecs.numcodecs:Lz4f
imagecodecs_lzf = imagecodecs.numcodecs:Lzf
imagecodecs_lzma = imagecodecs.numcodecs:Lzma
imagecodecs_lzw = imagecodecs.numcodecs:Lzw
imagecodecs_packbits = imagecodecs.numcodecs:PackBits
imagecodecs_pglz = imagecodecs.numcodecs:Pglz
imagecodecs_png = imagecodecs.numcodecs:Png
imagecodecs_rcomp = imagecodecs.numcodecs:Rcomp
imagecodecs_snappy = imagecodecs.numcodecs:Snappy
imagecodecs_spng = imagecodecs.numcodecs:Spng
imagecodecs_tiff = imagecodecs.numcodecs:Tiff
imagecodecs_webp = imagecodecs.numcodecs:Webp
imagecodecs_xor = imagecodecs.numcodecs:Xor
imagecodecs_zfp = imagecodecs.numcodecs:Zfp
imagecodecs_zlib = imagecodecs.numcodecs:Zlib
imagecodecs_zlibng = imagecodecs.numcodecs:Zlibng
imagecodecs_zopfli = imagecodecs.numcodecs:Zopfli
imagecodecs_zstd = imagecodecs.numcodecs:Zstd

Some codecs are read-only or may be non-functional depending on the binary distribution (raising delayed ImportError on use).
The codec names are prefixed with imagecodecs_. It might be necessary to version the codecs in case their API changes...

Interesting idea! So we can just include "imagecodecs-numcodecs" in requirements, and get both the codecs themselves and the entrypoints for auto import. I'm happy with that.
Any further changes we should do here, then?

re:

It might be necessary to version the codecs in case their API changes...

There is no provision for this anywhere in numcodecs. I suppose that if you were writing something that depended on a specific version of a codec, such as an intake catalog in a repo of its own, you can specify version requirements there.

ping to all

Sorry, was off collecting other use cases. As long as there is nothing we need to consider about the more complex use cases like versions upfront, then I'm still for moving forward, though perhaps as a 0.10.0.a1.
@cgohlke: is there anything you would need from your side?

cc @thomcom ( as this may be of interest for hooking in GPU compressors https://github.com/zarr-developers/community/issues/19#issuecomment-954300872 )

Considering that there are no pressing objections, and getting 0.10.0.a1 out for others to consume.

Thanks Martin for the PR and everyone for the review! 😄
To one of the questions Martin raised in the OP about docs, filed issue ( https://github.com/zarr-developers/numcodecs/issues/302 ) to discuss & track
The other question that occurred to me is what happens if an extension registers using an existing codec ID. Do we do anything about that currently? No worries if not. Just wanted to check. We can move this out to an issue if more discussion is needed 🙂

what happens if an extension registers using an existing codec ID

Programmatic registration takes precedence, entrypoints lookup is the fallback. So this should cause no surprises.

Ok so 3rd party modules can't override existing extensions (at least not without a user doing something explicit)?

Ok so 3rd party modules can't override existing extensions (at least not without a user doing something explicit)?

Correct: here, we check the registry first, which will include any entries from register_codec, which is how numcodecs itself puts codecs into the registry, without checking whether this clobbers a codec name.

Great, thanks Martin! 😄


fixed issue for review - [closed]

In GitLab by @liyanq528 on Dec 7, 2018, 07:14
Merges 20181006 -> dev

In GitLab by @wknet123 on Nov 13, 2019, 11:33
closed


When hovering over a checked checkbox, the background color changes

If I check a checkbox and then hover over it, the background changes from the primary color to transparent. In this image, the checkbox is checked and my mouse is hovering over it.
It looks like the background-color is being set to currentColor by tailwind and it's overriding the .checked\:bg-primary:checked

Any ideas?

@jamauro I have tested on https://salad-storybook.fly.dev/salad_ui_component/checkbox Safari browser but didn't see that happen.
Do you have sample code here?

Hmm I added the checkbox with mix salad.add checkbox
Here's my app.css
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

/* This file is for your main application CSS */

@layer base {
  :root {
  --background: 0 0% 100%;
  --foreground: 224 71.4% 4.1%;
  --card: 0 0% 100%;
  --card-foreground: 224 71.4% 4.1%;
  --popover: 0 0% 100%;
  --popover-foreground: 224 71.4% 4.1%;
  --primary: 220.9 39.3% 11%;
  --primary-foreground: 210 20% 98%;
  --secondary: 220 14.3% 95.9%;
  --secondary-foreground: 220.9 39.3% 11%;
  --muted: 220 14.3% 95.9%;
  --muted-foreground: 220 8.9% 46.1%;
  --accent: 220 14.3% 95.9%;
  --accent-foreground: 220.9 39.3% 11%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 20% 98%;
  --border: 220 13% 91%;
  --input: 220 13% 91%;
  --ring: 224 71.4% 4.1%;
  --radius: 1rem;
  --chart-1: 12 76% 61%;
  --chart-2: 173 58% 39%;
  --chart-3: 197 37% 24%;
  --chart-4: 43 74% 66%;
  --chart-5: 27 87% 67%;
}

.dark {
  --background: 224 71.4% 4.1%;
  --foreground: 210 20% 98%;
  --card: 224 71.4% 4.1%;
  --card-foreground: 210 20% 98%;
  --popover: 224 71.4% 4.1%;
  --popover-foreground: 210 20% 98%;
  --primary: 210 20% 98%;
  --primary-foreground: 220.9 39.3% 11%;
  --secondary: 215 27.9% 16.9%;
  --secondary-foreground: 210 20% 98%;
  --muted: 215 27.9% 16.9%;
  --muted-foreground: 217.9 10.6% 64.9%;
  --accent: 215 27.9% 16.9%;
  --accent-foreground: 210 20% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 20% 98%;
  --border: 215 27.9% 16.9%;
  --input: 215 27.9% 16.9%;
  --ring: 216 12.2% 83.9%;
  --chart-1: 220 70% 50%;
  --chart-2: 160 60% 45%;
  --chart-3: 30 80% 55%;
  --chart-4: 280 65% 60%;
  --chart-5: 340 75% 55%;
}

  * {
    @apply border-border !important;
  }
}

body { @apply bg-background text-foreground; }

here's the checkbox component that was added from salad-ui
defmodule HelloWeb.Component.Checkbox do
  @moduledoc false
  use HelloWeb.Component

  @doc """
  Implement checkbox input component

  ## Examples:
      <.checkbox class="!border-destructive" name="agree" value={true} />
  """
  attr :name, :any, default: nil
  attr :value, :any, default: nil
  attr :"default-value", :any, values: [true, false, "true", "false"], default: false
  attr :field, Phoenix.HTML.FormField
  attr :class, :string, default: nil
  attr :rest, :global

  def checkbox(assigns) do
    assigns =
      prepare_assign(assigns)

    assigns =
      assign_new(assigns, :checked, fn -> Phoenix.HTML.Form.normalize_value("checkbox", assigns.value) end)

    ~H"""
    <input type="hidden" name={@name} value="false" />
    <input
      type="checkbox"
      class={
        classes([
          "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 checked:bg-primary checked:text-primary-foreground",
          @class
        ])
      }
      name={@name}
      value="true"
      checked={@checked}
      {@rest}
    />
    """
  end
end

here's how I'm using the component
<.checkbox phx-click="toggle_todo"<EMAIL_ADDRESS><EMAIL_ADDRESS>/>

in the storybook you linked, I noticed that the order in which the background-color rules are being applied is flipped:

Here's a screen recording of the behavior. Note that it isn't specific to Safari. I'm using Chrome in this recording.
To repro, I created a new Phoenix project and added salad ui with mix salad.init. Then I added the checkbox component with mix salad.add checkbox
https://github.com/user-attachments/assets/81d61289-304f-4b56-9c0f-0935550884ad

If I add hover:checked:bg-primary to the class list for the checkbox component, it resolves the issue but this seems like it shouldn't be necessary. I would think that the specificity of the classes as is would be enough to override the [type=checkbox]:checked:hover as seen in the storybook.

I don't know why it doesn't override, I've added checked:focus:bg-primary checked:hover:bg-primary to the class list.
Thanks you


Can I use KV with a local Redis?

Hi, always love the clean API of vercel, been using KV with upstash/vercel redis for a while, wondering if it's possible to use a local redis? Assuming it's not well documented because not aligned with Vercel business model :)
Mostly for internet gapped use case

hey,
@vercel/kv is build in top of @upstash/redis and that's a http client for the upstash rest API. So you would need to run the upstash API locally in order to have a setup that runs offline. AFAIK thats not possible, sorry

I think my other answer was wrong.
you can have a look here: https://upstash.com/docs/oss/sdks/ts/redis/developing or in this issue: https://github.com/vercel/storage/issues/281


Make run_pre_built.py tied to save_paths.yaml

Silly mistake

This is fixed in THIS COMMIT in the development branch.


Legacy Grbl Keyboard jogging 2.0.36 XL

Keyboard jogging does not work when 2.0.36 XL is connected to legacy Grbl.  It worked with earlier edge versions though I have not tested in at least a month.

I forgot to copy some code to the XL version when refactoring jogging. I have uploaded a edge version with this in place.

Thanks!  I'll give it a try in a while (have to set up a legacy test bed or go into the makerspace). I'll let you know if it fixes.


Expand CRD pre-install Job to remove stale RCR CRD storage versions

Checklist

[ ] Update changelog in CHANGELOG.md.
[ ] Make sure values.yaml and values.schema.json are valid.

Tested in WC applying CRDs from a quite old Kyverno version, upgrading to our 0.8.0 app, then upgrading to this version. This forcibly removes v1alpha1 from the status.storedVersions of the 4 CRDs affected by this PR upstream when that version was removed. For [Cluster]ReportChangeRequests, this should generally have no impact, since those are created and deleted frequently. For the wgpolicy group CRDs [Cluster]PolicyReports, it is possible that other projects could use the CRD, but if we assume this to be a clean kyverno installation or an upgrade from any version since and including 1.5.x, those resources should already be using v1alpha2 as their storage version. If they aren't, it is unclear to me what the implications would be


💥💫

@77553322AHST did you mean to provide some information in this issue or should we close it?

@77553322AHST if there is any actual question or issue, please add appropriate information and reopen.  Thanks!

Okay


KeyValue Component - View

The text for "There are no rows to show." is too close to the line, which is probably related: https://github.com/rancher/dashboard/issues/696

This is no longer valid as we moved labels/annotatios in the detail view to detailtop.


alpha version of the kivy backend for matplotlib

Kivy backend for matplotlib.

There seems to be a white border around the plot, maybe a pos offset issue. https://i.imgur.com/UuqRtSX.png
@andnovar please fix the travis error.

Moved to https://github.com/kivy-garden/garden.matplotlib.


chore(master): release 1.1.64

:robot: I have created a release beep boop
1.1.64 (2023-05-21)
Miscellaneous

deps: update dependency @types/node to v18.16.14 (598f5a3)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/wayofdev/keywind/releases/tag/v1.1.64 :sunflower:


TYPE: Show that semantic entailment for Type * is equivalent to semantic entailment for Type

This is a technical request, inspired by a comment at #36.  It could be useful to have some way within Lean to show that the assertions
``theorem (G: Type *) [Magma G] (h: EquationX G): EquationY G`
and
theorem (G: Type) [Magma G] (h: EquationX G): EquationY G`
are equivalent to each other (or to LawX implying LawY).  Similarly for the counterexamples to such implications.  This type reduction should be achievable through the completeness theorem.

claim

I am sadly defeated by the universe handling in Lean.

disclaim

Completed in #458


Perform attributes normalization on access

Attributes normalization requires an allocation, which is both expensive to CPU and RAM. And it doesn't guarantee that such attribute will be accessed at all. Or accessed multiple times.
Therefore we could try performing normalization only on access. This would improve parsing performance and reduce memory usage by sacrificing attribute value access performance.
Also, it means we would have to return Cow<'input, str>) instead of &'input str. Which is meh...
And, a caller might not want to perform normalization to begin with. So this way we would be able to provide a raw access to an attribute value.

I look into this and from a first glance, the main problem seems to be that normalization is tied in with the xmlparser machinery which is not present at the time when Document is used to access the parsed representation. Furthermore, things like LoopDetector would need to be constructed on-demand instead once per parse which means they need to be cheap as their costs will not be amortized. (Or they have to be cached within Document leading to concurrency issues.)

Hm... you're right.
My problem with the current approach is when parsing SVG, there are some files with huge paths (<path d="..."/>) or base64 encoded images. And as soon as one of them contains a new line - we have to normalize it, i.e. allocate. Which is just a waste of memory.
I think we could try doing entity resolving during parsing, but new lines to spaces conversion during access. Including an optional method to return a "raw", but with entities resolved, value.

Doesn't seems like there is a good way to do this.


Logging and logger configuration demo "ros2 run composition api_composition" does not work

In section at
https://index.ros.org/doc/ros2/Tutorials/Logging-and-logger-configuration/#using-the-logger-config-component
The command
ros2 run composition api_composition
returns the error text
No executable found
This is with ros2 install from
https://ci.ros2.org/view/packaging/job/packaging_linux-aarch64/
and with setup.bash sourced.

This has already been fixed in ros2/ros2_documentation#216. The change will be visible on index.ros.org once the page got regenerated.


migrate all entity pages to composability api

Final and biggest piece of the composability migration. 🎉  This won't build or pass tests atm and I haven't tried it out manually either, it's just the code changes the we intend to have working in the future. Before that we also need a few external updates, e.g. https://github.com/RoadieHQ/backstage-plugin-travis-ci/issues/52. We ofc also need to port the app template and probably a couple of pieces in docs as well.

Tugboat has finished building the preview for this pull request!
Link:

https://pr4822-iqqtm3vxydn1mjce2sutxraeuz0qnpkv.tugboat.qa

Dashboard:

https://dashboard.tugboat.qa/604159eaf285af04bfa0bbc7

This won't build or pass tests atm and I haven't tried it out manually either, it's just the code changes the we intend to have working in the future.

@Fox32 https://github.com/backstage/backstage/pull/5000 :grin:

@Fox32 #5000 😁

Thanks, I will give it a try now

@Fox32 I have actually tried this out myself now without the Roadie plugins, and it does render entity pages x)

@Fox32 I have actually tried this out myself now without the Roadie plugins, and it does render entity pages x)

Works for me too! Just have to check whether my routing problem is also solved.

@Rugvip routing in entity pages works as expected, thank you!

This one's actually ready for review now 😅

I pulled this down and was clicking through a bit and noticed that docs within entity pages seems to fail to render subpaths. Eg. going to http://localhost:3000/catalog/default/component/documented-component/docs/sub-page/ blanks out with Uncaught Error: Routable extension component was not discovered in the app element tree.  error. The root of the docs (http://localhost:3000/catalog/default/component/documented-component/docs/) seem to render fine.

I pulled this down and was clicking through a bit and noticed that docs within entity pages seems to fail to render subpaths. Eg. going to http://localhost:3000/catalog/default/component/documented-component/docs/sub-page/ blanks out with Uncaught Error: Routable extension component was not discovered in the app element tree.  error. The root of the docs (http://localhost:3000/catalog/default/component/documented-component/docs/) seem to render fine.

We are also using
      <EntityLayout.Route path="/docs" title="Docs">
        <EntityTechdocsContent />
      </EntityLayout.Route>

in our app it it works fine 🤔

@Xantier It was fixed by https://github.com/backstage/backstage/pull/5203, but that's not part of this PR branch afaik

I can confirm, rebasing on master fixes this.

Shipping so that we can get the create-app changes as part of the release. The plugins are only disabled in the example-app, but let's re-enable them asap.

@Rugvip @Fox32
Fixes for all the plugins are in progress now, thanks to @Xantier. Apologies for the trouble.
https://github.com/RoadieHQ/backstage-plugin-github-pull-requests/pull/83
https://github.com/RoadieHQ/backstage-plugin-buildkite/pull/41
https://github.com/RoadieHQ/backstage-plugin-github-insights/pull/164/files
https://github.com/RoadieHQ/backstage-plugin-travis-ci/pull/58
https://github.com/RoadieHQ/backstage-plugin-firebase-functions/pull/37
https://github.com/RoadieHQ/backstage-plugin-aws-lambda/pull/44
https://github.com/RoadieHQ/backstage-plugin-argo-cd/pull/56
https://github.com/RoadieHQ/backstage-plugin-security-insights/pull/31


feat: expose handleOneAnalyticsEvent to headless

https://coveord.atlassian.net/browse/SFINT-3742
In order to log the Usage Analytics events for Service from headless, we need to get access to the handleOneAnalyticsEvent function.
This PR, makes the function accessible.

@francoislg Thanks for your input.

Now, I think the issue is the plugin, right? Can we expose them instead?

That is indeed the issue. Exposing handleOneAnalyticsEvent was an easy way to get what I needed. But yes, I think you are right that exposing the plugins would be cleaner. I'll look into that. Thanks

@lbergeron I'd be OK with merging this if you just want to get the feature out and improve it afterward by using the clients :smile:
Your pick!

After discussions on this review, it was decided that exposing handleOneAnalyticsEvent wasn't the right thing to do. coveo.analytics.js should instead expose a simplified and strongly-typed client to support Case Assist specific events.


MWPW-142746 Change mobile georouting background to svg

Change mobile georouting background from png to inline svg
Goal is better performance score, especially LCP
Note: I updated only mobile because the desktop performance score was fine and it kept the file size down.

Resolves: MWPW-142746
Test URLs:

Before: https://main--milo--adobecom.hlx.page/de/drafts/methomas/georouting?martech=off
After: https://methomas-geo-lcp-svg--milo--adobecom.hlx.page/de/drafts/methomas/georouting?martech=off

Bacom:
Regular:

https://main--bacom--adobecom.hlx.live/fr/?milolibs=methomas-geo-lcp-svg
Tabs:
https://main--bacom--adobecom.hlx.live/?milolibs=methomas-geo-lcp-svg&akamaiLocale=CA

Before:

After:

Forgot about tests. I'll reopen when those are done.

Edit I'm wrong with the svg reference 🤔. I was getting a good score, but it's now swinging back into negative territory because the georouting is still lcp. So the only thing to fix imo is the background image positioning

Yes, that's consistent with the information I found here: https://web.dev/articles/lcp#what-elements-are-considered
They even say that full <svg> support may be added in the future, so it's something for us to keep an eye on.

FYI I am no longer getting the near-100 results as seen in the description on the homepage due to authoring changes. They added a fragment to the top of the page for an event promo. However, other pages like AEM sites that don't have a fragment can still match those results:

@meganthecoder you probably need to change the target branch to point to stage now btw.


radicale: 3.0.3 -> 3.0.5

Motivation for this change
Things done

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

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

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

please loosen the version bounds for etesync-dav

@jonringer Done.


Add spam label

Add a label called "spam" for marking spam (like issues where only the template is send)
And then the msftbot deletes the issue

Don't delete issues immediately after being labeled "spam". Someone could accidently label a valid issue as "spam".

Why.

Unfortunately we can't

See #7788 #7764 #7747

Ok but a label would very useful so the core team can delete them

Things are getting bad: #7953

/cc @crutkas @enricogior This proves that this issue is valid

I have reported this to GitHub.

We need a possibility to immediatly delete such posts.

To delete, you have to be an admin.
I personally don't like the idea of auto-closing/deleting stuff unless a core team member has verified as well.
Quickest way to flag something would be to email us / report it to github. I do glance at email over the weekend / night but I do not proactively triage over those periods of times.

@crutkas Ok. So should I close this?

Well we can add a spam label that gets priority triage from the core team. These are rare occasions so it would not take much time.

@alannt77, i don't we'd tweak the triage process order to do one query that 99% of the time comes up blank first.  It would quickly be ignored.
For a bunch of the top issues, the person could have accidently clicked submit.  Rather use "needs author feedback".
For the one i deleted, yes, that truly is spam.  But we also get spam in comments which does need to be taken care of as well.  You can't label comments however

I just see minimal usage of the label but i can count very minimally the amount of times we'd use the tag.


Add extra step for specifying private IP for a public Application Gateway

As per the documentation, creating a public facing is fine. However, adding a private IP step to support both simultaneously as per FAQ is missing in the documentation at https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-create-gateway-portal

⚠ Idea migrated from UserVoice
Created By: I-van Leong
Created On: 2017/06/07 05:27:23 +0000
Votes at Migration: 1
Supporters at Migration: 1

This issue is now tracked with https://github.com/MicrosoftDocs/azure-docs/issues/8477


Upgrade Python Library

According to the OpenSearch documentation,
the recommended version for the Python Elasticsearch
client should be 7.13.4
So this commit updates the version.

yes, it works! so I am merging it :)


Auto trigger infinity scroll when scrolling to bottom view

Hi @LawrenceHan , I'm trying to auto triggerInfiniteScrolling when scrolling to bottom view, do you have any suggestion? currently we have to pull up to manually trigger it

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
    CGFloat magic = 600 * 2.0f; // feel free to change it to suit your need
    if (scrollView == _yourScrollView) {
        if (scrollView.contentSize.height > FLT_EPSILON) {
            if (!_isLoadingFromBottom && scrollView.contentOffset.y < (magic)) {
                // trigger it here
            }
        }
    }
}

@kieuquangloc147 Is it clear?

@LawrenceHan thank you for your suggestion, I know we can handle it in scrollViewDidScroll function and we have to write some conditions.
The reason is that I used to samvermette before I found out your fork, I wonder how samvermette did it in his origin project (samvermette/SVPullToRefresh), it looks like this:

This leads to change user experiences so I want to find out why it happened
If I can not find out any other resolution, I will use your suggestion 👍 thank you once again


Bug: Rxjs module not found issue

Hi,
After installing rxjs (npm install rxjs, and package.json did reference that ), I still unable to run the sample code. Strange that I don't have any problem running other node.js library, only this rxjs seems to have problem running and I wonder what is wrong as  rxjs is certainly been installed.  Can anyone identify what is wrong  ?
thank

https://github.com/ReactiveX/rxjs/issues/4416
Rxjs does not suppoer standard esm yet. Do not use --experimental-worker flag.


Swift documentation

Swift SDK changes: https://github.com/zksync-sdk/zksync2-swift/pull/11
Swift Examples: https://github.com/zksync-sdk/zksync2-examples/pull/1

@bojan-txfusion Can you also update the menu to actually display the Swift SDK? It was deleted a while ago

@bojan-txfusion Can you also update the menu to actually display the Swift SDK? It was deleted a while ago

If you talk about this menu (https://github.com/matter-labs/zksync-web-era-docs/tree/swift/docs/docs/api), it was added already. If it's some other menu, just let me know which one.

@bojan-txfusion You'd need to add the menu items in docs/.vuepress/sidebar/en.ts.

@bojan-txfusion You'd need to add the menu items in docs/.vuepress/sidebar/en.ts.

Just added.


Do not display images after upload

Hello
I have no problem uploading
But images are not displayed
After executing the php artisan storage:link command, only the storage folder is displayed and there are no uploaded files in it
.env
APP_URL=http://localhost:8000
Laravel Framework 8.6.0
unisharp: master

Solved!
I removed the storage folder from the public folder and ran the php artisan storage:link command again. The problem was solved!


Don't use ByteBufConvertible when not necessary

Motivation:
While doing a performance test using latest netty5 (from main branch, and java 11), I have observed a performance issue in the ChannelOutboundBuffer.total method.
I'm using new Buffer API.
So, when the msg parameter passed to io.netty5.buffer.api.internal.ChannelOutboundBuffer.total(Object msg)  is  an instance of the new Buffer type (io.netty5.buffer.api.bytebuffer.NioBuffer in my case), then the following method call takes around 31% of CPU
    private static long total(Object msg) {
        if (msg instanceof ByteBufConvertible) {
            return ((ByteBufConvertible) msg).asByteBuf().readableBytes();
        }
        if (msg instanceof FileRegion) {
            return ((FileRegion) msg).count();
        }
        if (msg instanceof ByteBufHolder) {
            return ((ByteBufHolder) msg).content().readableBytes();
        }
        return -1;
    }

Here, since the NioBuffer implements the ByteBufConvertible interface, then the asByteBuf() convertion method is called and it takes a lot of CPU. Please check asyncprofiler trace.
Modification:
Test if the passed parameter is an instance of a Buffer:
    private static long total(Object msg) {
        if (msg instanceof Buffer) {
            return ((Buffer) msg).readableBytes();
        }
        if (msg instanceof ByteBufConvertible) {
            return ((ByteBufConvertible) msg).asByteBuf().readableBytes();
        }
        if (msg instanceof FileRegion) {
            return ((FileRegion) msg).count();
        }
        if (msg instanceof ByteBufHolder) {
            return ((ByteBufHolder) msg).content().readableBytes();
        }
        return -1;
    }

Result:
there is no more performance issue after applying the above patch.

@franz1981 ,
I have not yet signed the CLA, I will do it asap :-)

By the way, about the CLA, I just saw with my company, and they said to me that they will sign the CLA on behalf of me, as they have already signed a corporate CLA.
I'll let you know once it is done.
thanks !

@johnou , I just applied your feedback.
(I'm still waiting for my company to sign the CLA, thanks).

my company has just signed the CLA.

thanks all for the review !


IMSI run but cant read data from gr gsm

dears
need your help why IMSi cant read the data from gr gsm as you can see in the picture the ge gsm have data but i cant see it in IMSI
any advice to solve the issue

dears
thanks for your support i had fix the issue but now is no showing the phone number in the IMSI .

same issue

@asyooty249
i'v same issue but i canno't get any data from console what did u do to fix that
root@kali:~/imsi/imsi# ./simple_IMSI-catcher.py --sniff
Nb IMSI ; TMSI-1     ; TMSI-2     ; IMSI              ; country      ; brand      ; operator              ; MCC  ; MNC   ; LAC    ; CellId ; Timestamp

No data == no IMSI send by the cell tower.
Try to change the frequency
Cell Id take few seconds to update.


Utility_meter sensor status incorrectly after rebooting Home Assistant

Home Assistant release with the issue:

0.98.1
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io
Component/platform:

https://www.home-assistant.io/components/utility_meter/
Description of problem:
After rebooting the Home Assistant, the status of the utility_meter sensor is set randomly.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):
2019-08-30 10:24:10 DEBUG (MainThread) [homeassistant.components.utility_meter] Setup utility_meter.gas_hourly
2019-08-30 10:24:10 DEBUG (MainThread) [homeassistant.components.utility_meter] Setup utility_meter.gas_daily
2019-08-30 10:24:10 DEBUG (MainThread) [homeassistant.components.utility_meter] Setup utility_meter.gas_monthly
2019-08-30 10:25:08 DEBUG (MainThread) [homeassistant.components.utility_meter.sensor] tracking source: input_number.gas_meter_reading
2019-08-30 10:25:08 DEBUG (MainThread) [homeassistant.components.utility_meter.sensor] tracking source: input_number.gas_meter_reading
2019-08-30 10:25:08 DEBUG (MainThread) [homeassistant.components.utility_meter.sensor] Track utility_meter.gas_monthly
2019-08-30 10:25:08 DEBUG (MainThread) [homeassistant.components.utility_meter.sensor] Track utility_meter.gas_monthly
2019-08-30 10:25:08 DEBUG (MainThread) [homeassistant.components.utility_meter.sensor] tracking source: input_number.gas_meter_reading

Additional information:

It looks like it's also starts with wrong tariff when resetting statistics on month over. E.g. it starts new month with monthly peak tariff collecting state, and daily offpeak tariff.
It should reset counter and continue with same states.

Can you share your configuration?

Here's relevant sections from my configuration:
automations.yaml:
  - alias: 'Tariff switch'     trigger:       - platform: time         at: '07:00:00'       - platform: time         at: '23:00:00'     action:       - service: utility_meter.next_tariff         entity_id: utility_meter.daily_energy       - service: utility_meter.next_tariff         entity_id: utility_meter.monthly_energy
configuration.yaml:
utility_meter:   daily_energy:     source: sensor.potreblennaia_elektroenergiia     cycle: daily     tariffs:       - peak       - offpeak   monthly_energy:     source: sensor.potreblennaia_elektroenergiia     cycle: monthly     tariffs:       - peak       - offpeak
It's just like in samples on  site.
Every 1-st day of each month it resets and I see that monthly_energy meter starts with 'peak' tariff despite it happens at night and daily_energy starts with 'offpeak' just like it should to.

Can you share your configuration?

utility_meter:
  gas_hourly:
    source: input_number.gas_meter_reading
    cycle: hourly
  gas_daily:
    source: input_number.gas_meter_reading
    cycle: daily
  gas_monthly:
    source: input_number.gas_meter_reading
    cycle: monthly

Just got additional info. Updated Hassio to 0.82 and got all 4 utility_meters in state "collecting"

@gyp5y please open a different issue, I'm deleting your comments from this one.

@stast1 how often do you update input_number.gas_meter_reading ?
Is it something you do manually every X days ?

Is it something you do manually every X days ?

This is a gas meter. The update is done automatically once a minute, if there is a gas flow rate or every X hours if there is no gas flow rate.


Default-Cookie-Experiation-Time only works

Hi,
I use the cookie store. I give the user the option to choose if he wants a session until the browser closes, or if he wants a 2 week session (expiration time: 1209600). This works fine if the user closes the browser just one time.
Let me explain:
After he closes the browser the first time, the cookie remains until he visits the application a second time. Because he doesnt have to log in, the expiration time wont be set to 2 weeks. If he closes the browser again the session (and the cookie) will be lost.
Does the default-value of the expiration-time affect an existing cookie?

How do you implement that? I guess you're using the cookie session store for that?

We're using a custom authenticator. In the LoginController I if a certain checkbox is activated. If thats the case I execute:
this.set('session.store.cookieExpirationTime', 1209600);
Thats the only time I set the expiration-time (in the authenticate-action of the LoginController).

You need to set the expiration time back to its default value (or null if you want to use session cookies) whe the checkbox is unchecked.

Here is the authenticate-Function:
actions: {
authenticate: function() {
		var _this 		        = this;
		var rememberMe 	= $("#remember-me");

		this._super().then(null, function(message) {
			_this.set('errorMessage', message);
		});

		if(rememberMe.prop("checked")) {
			this.set('session.store.cookieExpirationTime', 1209600);
		} else {
			this.set('session.store.cookieExpirationTime', null);
		}
	}
}

My Problem is that when I close the browser (after the login) and open it again the cookie still there. But when I close the Browser a second time, the cookie is gone.

Try setting the expiration time before you call _super.

Just tried it, still the same problem.

I think the problem is that the expiration-time of the cookie is set to default (null in my case) when the browser is opened again. But I may be wrong of course.

Can you post screenshots of Developer Tools -> Resources -> Cookies at the different points in time?

Ok,
before I log in:

after I logged in:

after I closed and reopend the browser:

Is the checkbox checked or unchecked in that example? Did you configure a default cooke expiration time?

In this example the checkbox was checked. No, I didn't change the default-value of the expiration-time. so it should be null.

I think I got it. The store gets rewritten after the session gets restored on application startup but because the default expiration time is null it will use that then. You'd have to store the expiration time somewhere else as well and set it accordingly in an initializer that runs before the 'simple-auth' initializer. Not sure whether or how this could be fixed in the library itself actually.

Ok, that was my impression as well.
My Problem was that i didn't found a way to read the expiration time in the cookie. And I didn't want to write it as additional information in the cookie itself because there it would be easy for the user to change it. I'm sure I will find a solution.
Thanks for the effort.

I don't think it's a problem if the user can change the expiration easily because if the user wouldn't be allowed to access/modify the security-critical data in the cookie that would be a problem anyway, but one you couldn't do anything against.
It would probably help if the cookie store wouldn't rewrite the cookie when the cookie already has the exact same data that would be written.

It would be awesome if the cookie-store wouldn't overwrite the date at all (if a cookie already exists)^^

It has to override because data may have changed - it just shouldn't replace with the exact same data.

That may be a good idea for the future^^

And I didn't want to write it as additional information in the cookie itself because there it would be easy for the user to change it.

For user changing the actual expiration time of a cookie is just as easy as changing its contents. I think, writing expiration time inside cookie doesn't create any additional security risks.
Also, solution with not touching cookie at all may not work as expected, because it will logout user after two weeks even if he used the app on the last day of those two weeks. If one sets a Rails session expiration time to say one week, it will be one week since the last request, but not since the last login.

Good point @snovity.

@snovity, @GolexPrime: would either of you (or anyone else who reads this of course) have time to look into this? I'm quite busy currently...

Stumbled over this issue. It's a legit bug because the 8th example simply won't persist more than one closing-opening of the browser.
Here's my workaround:
Install https://www.npmjs.com/package/ember-cli-cookie
Add this to your login controller:
  # A property the remember me checkbox is bound to
  rememberMe: true

  rememberMeChanged: Ember.observer 'rememberMe', Ember.on 'init', ->
    rememberMe               = @get 'rememberMe'
    Cookie                   = @get 'cookie'
    cookieName               = 'simple-auth-remember-me-expires-on'
    cookie                   = Cookie.getCookie cookieName
    cookieExpirationDuration = null

    if rememberMe and not cookie
      nowSeconds               = Math.floor Date.now() / 1000
      expiresInDays            = 31
      cookieExpirationDuration = 60 * 60 * 24 * expiresInDays #+ nowSeconds
      cookieExpirationTime     = nowSeconds + cookieExpirationDuration
      Cookie.setCookie cookieName, cookieExpirationTime, expires: expiresInDays, path: '/'

    else
      Cookie.removeCookie cookieName

    @get 'session.store'
      .cookieExpirationTime = cookieExpirationDuration

Create an initializer simple-auth-cookie-expiration:
`import CookieStoreConfig from 'simple-auth-cookie-store/configuration'`

# Takes two parameters: container and app
initialize = (container, app) ->
  console.log 'CookieStoreConfig', CookieStoreConfig
  app.inject('controller', 'cookie', 'cookie:main')

  Cookie = container.lookup 'cookie:main'

  # ember-cli-cookie does not accept options. :(
  # Remove this block when this PR is accepted:  https://github.com/achambers/ember-cli-cookie/pull/7
  Cookie.setCookie = (key, value, options) ->
    new Em.RSVP.Promise (resolve, reject) ->
      try
        Em.$.cookie key, value, options
        Em.run null, resolve
      catch e
        Em.run null, reject, e

  Object.defineProperty CookieStoreConfig, 'cookieExpirationTime', set: ->
  Object.defineProperty CookieStoreConfig, 'cookieExpirationTime', get: ->
    rememberMeExpiresOn = Cookie.getCookie 'simple-auth-remember-me-expires-on'

    result =
      if rememberMeExpiresOn?
        rememberMeExpiresOn = parseInt rememberMeExpiresOn, 10
        nowSeconds = Math.floor Date.now() / 1000
        rememberMeExpiresOn - nowSeconds
      else
        null

    result

SimpleAuthCookieExpirationInitializer =
  name: 'simple-auth-cookie-expiration'
  after: ['cookie']
  initialize: initialize

`export {initialize}`
`export default SimpleAuthCookieExpirationInitializer`

IE9+. Use on your own risk.

@lolmaus: cool. Do you think you could prepare a PR that changes the cookie store so that all of this would happen automatically inside the store (and probably the initializer of the cookie store extension library)?

@marcoow, this workaround is messy, hacky, untested and lacks support for old browsers.
Instead of going this way, you really should have session store maintain cookie expiration dates when it recreates them (why does it destroy original cookies in the first place?!). As it is impossible to read cookie expiration date, you should duplicate expiration dates within cookie bodies.

@lolmaus: what you're describing is actually what I was talking about for the PR - transparently storing the expiration date in the cookie and setting/updating it accordingly...

@marcoow, i'm not familiar with Simple Auth source code. Why don't you do it yourself?

@lolmaus because this is OSS and I encourage people to participate - also I have other things to do as well and am not working on this full time.

@marcoow, i shared what i managed to do so far.

@lolmaus, Can you please review my PR #451 regarding this issue ?

fixed by #451.


[SPARK-21721][SQL][Backport-2.1] Clear FileSystem deleteOnExit cache when paths are successfully removed

What changes were proposed in this pull request?
Backport SPARK-21721 to branch 2.1:
We put staging path to delete into the deleteOnExit cache of FileSystem in case of the path can't be successfully removed. But when we successfully remove the path, we don't remove it from the cache. We should do it to avoid continuing grow the cache size.
How was this patch tested?
Added test.

cc @yzheng616 @gatorsmile Backport #18934 to branch 2.1.

Test build #80665 has started for PR 18947 at commit a4806b3.

Test build #80665 has finished for PR 18947 at commit a4806b3.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/80665/
Test PASSed.

LGTM
Merging to 2.1

@viirya Could you close it? Thanks!

Thanks @gatorsmile @dongjoon-hyun