RFC: Add a way to minify query before sending it

Summary
I'm trying to send a query to Contentful GraphQL API, which has a query limit of 8Kb.
The query in question is slightly above the limit.
I've tried to minify it by using https://www.npmjs.com/package/graphql-query-compress this package, and by compressing the query string I've managed to get it to around 4Kb.
After feeding the Urql client the query, it seems like it decompresses it somehow before sending it to the API, since I still see that error in the response.
Is it possible to add a compressQuery option before sending it?
Not sure if this counts as an issue or a question or an RFC, be free to scold me if it's not an RFC :)
Thanks for your time reading this.
Proposed Solution
Add an option to compress/minify the query string before sending it

You can already do this yourself by authoring an exchange that would sit in front of the fetchExchange

So possibly going from this
query: stringifyDocument(request.query)
to this
query: minifyQuery ? compress(stringifyDocument(request.query)) : stringifyDocument(request.query)
Could easily fix the issue since that's the last point where the query string gets manipulated?
Maybe this could be an easy fix for a yarn patch until you guys discuss the idea at a broader level

From my point of view this isn't really something I would want to put into urql, I would be open to finding a way where stringifyDocument can pick up prior minified work but not adding a library that adds a lot of bundle-size

I'm not sure this is something that belongs in @urql/core. To be very honest, I think making several assumptions what a GraphQL document normalizes to is in a way important.
For context, internally a GraphQL query document is always parsed, and it's a "transports" responsibility to stringify it back to a GraphQL query document string.
This is why the fetchExchange sends it in its normalized form. This is also important for Persisted Query support.
In fact, I'm very surprised that Contentful imposes a length limit, rather than a field limit. I think their length limit isn't unreasonable, but I'm surprised it's this low. For context, it's only twice as long as our rather low default GET URL length limit.
You can create a custom fetchExchange to circumvent this. We expose utilities in @urql/core/internal to enable this, e.g.:
import { filter, merge, mergeMap, pipe, share, takeUntil } from 'wonka';
import { Exchange } from '@urql/core';

import {
  makeFetchBody,
  makeFetchURL,
  makeFetchOptions,
  makeFetchSource,
} from '@urql/core/internal';

import compress from 'graphql-query-compress'

export const fetchExchange: Exchange = ({ forward }) => {
  return ops$ => {
    const sharedOps$ = share(ops$);
    const fetchResults$ = pipe(
      sharedOps$,
      filter(operation => {
        return operation.kind === 'query' || operation.kind === 'mutation';
      }),
      mergeMap(operation => {
        const body = makeFetchBody(operation);
        if (body.query)
          body.query = compress(body.query);

        return pipe(
          makeFetchSource(
            operation,
            makeFetchURL(operation, body),
            makeFetchOptions(operation, body)
          ),
          takeUntil(
            pipe(
              sharedOps$,
              filter(op => op.kind === 'teardown' && op.key === operation.key)
            )
          )
        );
      })
    );

    const forward$ = pipe(
      sharedOps$,
      filter(operation => {
        return operation.kind !== 'query' && operation.kind !== 'mutation';
      }),
      forward
    );

    return merge([fetchResults$, forward$]);
  };
};

Thank you @JoviDeCroock and @kitten!
One question tho, where should I create this custom fetchExchange ?
I can't find how to use the exposed utilities in urql doc.

Marking this as documentation, since we'll simply have to document @urql/core/internal and its fetch source utilities.


Any idea on how to implement the grid with paging by calling data page per page

Hi,
First of all, great job with this tr-ng-grid, I love it.
Do you have any idea how to implement the paging while making calls page by page?
I ask because we've had timeouts before when loading 8000+ items (rows) of limited data, and can't expand response time/size.
Is there a way to set the number of pages and the number of items as parameters, and link the sort (if possible even filter) with servicecalls/functions?
It would be of great help.

Ok, sorry, I found all the information on this page ... thank you again for the great work!

I was just about to make you aware of that part of the docs. Glad you found it.


[rstmgr] Reset consistency check

If a reset asserts, either its parent or software controls
must have asserted.

The checking here is a gigantic mesh of CDC and must be carefully
reviewed.

The leaf logic generation logic was creating so many modules
it was getting difficult to manage.

This PR wraps up some of the generated logic so it is a little
easier to read.

LGTM. MaxSyncDelay, we should be careful to define correct delay based on the ratio of the clock.

let me know what you think..i set that to 2 right now, because all the reset signals are going through 2 flop synchronizers.
I'm hoping with the cdc random model, we'll be able to stress this more.  So technically, I don't care about the clock ratios, because all I'm looking for is the edges of the synchronizing clocks, and i do that via the prim_sync_reqack.
Let me know if that makes sense.

Oh, Maybe I confused. I thought the timeout is to check the clk de-assertion in parent and children clock. But looks like it is checking assertion time?
As resets are async reset, then it make sense. I thought the logic checks de-assertion (and somehow I thought sync de-assertion... ).
This looks good to me. Thanks for the explanation.

On Sep 30, 2021, at 4:05 PM, tjaychen @.***> wrote:
LGTM. MaxSyncDelay, we should be careful to define correct delay based on the ratio of the clock.
let me know what you think..i set that to 2 right now, because all the reset signals are going through 2 flop synchronizers.
I'm hoping with the cdc random model, we'll be able to stress this more. So technically, I don't care about the clock ratios, because all I'm looking for is the edges of the synchronizing clocks, and i do that via the prim_sync_reqack.
Let me know if that makes sense.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/pull/8341#issuecomment-931763003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJDG3R6LXC3MMZEXERUB6DUETUNDANCNFSM5EUWDAEQ.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Oh, Maybe I confused. I thought the timeout is to check the clk de-assertion in parent and children clock. But looks like it is checking assertion time? As resets are async reset, then it make sense. I thought the logic checks de-assertion (and somehow I thought sync de-assertion... ). This looks good to me. Thanks for the explanation.
…
On Sep 30, 2021, at 4:05 PM, tjaychen @.***> wrote: LGTM. MaxSyncDelay, we should be careful to define correct delay based on the ratio of the clock. let me know what you think..i set that to 2 right now, because all the reset signals are going through 2 flop synchronizers. I'm hoping with the cdc random model, we'll be able to stress this more. So technically, I don't care about the clock ratios, because all I'm looking for is the edges of the synchronizing clocks, and i do that via the prim_sync_reqack. Let me know if that makes sense. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#8341 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJDG3R6LXC3MMZEXERUB6DUETUNDANCNFSM5EUWDAEQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

no i think you're right on all of that. Let me try to explain, and let me know if you see any issues.
There are two flops inside the consistency check module.  One is driven by the parent reset, one is driven by the child reset asynchronously.  The output of these flops then each go through a set of synchronizers on the local clock of the module.
So when the resets assert, they assert asynchronously, but still must go through local synchronizers.
So the timeout IS used to check for assertion time.
When the resets release, the child reset release must go through its synchronous de-assertion AND the local synchronizer.
So the local synchronizer still counts, but it is basically counting on the child clock edges.  Does that make sense? As we talk about this, I might need to make the release counter a bit larger.  It probably works right now because prim_reqack_sync takes more than 2 clock edges on both the local and child clock domains.


allow for easier usability of the tutorials from their .html build within the docs

Is your feature request related to a problem? Please describe.
After looking at a cool tutorial, it is a bit unclear how it can be used easily without deep diving into the docs.
Describe the solution you'd like
I want to add references for starting argilla
1 Google Colab
2 HuggingFace spaces
3 quickstart/docker
4 cloud offering
I am considering several options

download button for the corresponding .ipynb
host them on Colab

Describe alternatives you've considered
Look in GitHub and download the docs there.
Additional context
N.A.

Dani
38 minutes ago
Now I recall that we used to have this for biome-text  docs and I googled a bit and it's actually easier than I thought because you can have a button linking to our GitHub tutorial path which opens the notebook in Colab
Dani
37 minutes ago
I will ask chatGPT, give me one sec:bananadance_lsd:
:joy:
1
Dani
29 minutes ago
it's good:
Dani
29 minutes ago

Dani
28 minutes ago
for download the nb we could do something similar
Dani
27 minutes ago
maybe we have an env in sphinx to get the filename and/or path?
Dani
27 minutes ago
to avoid hardcoding it
Dani
27 minutes ago
Yes, you can use the sphinx-nb extension to generate the "Open in Colab" button along with the other parts of the notebook's URL (, , , ) automatically.
The sphinx-nb extension is a Sphinx extension that allows you to include Jupyter notebooks in your Sphinx documentation. It can also generate the URLs for the notebooks, making it easy to add the "Open in Colab" button.
To use sphinx-nb to generate the "Open in Colab" button, you'll need to configure the extension to use the appropriate GitHub repository for your notebooks. In your Sphinx conf.py file, you can set the notebook_path, notebook_metadata and notebook_link_options variables, like this:
notebook_path = 'path/to/notebooks'
notebook_metadata = {'path': 'https://github.com/username/repo/blob/branch'}
notebook_link_options = {'source': 'Colab', 'icon': 'shield'}
Once you've done that, you can use the notebook directive to include a notebook in your documentation, like this:
.. notebook:: path/to/notebook.ipynb
The sphinx-nb extension will automatically generate the appropriate URLs and the Open in Colab button for the notebook, based on the configuration options you set in the conf.py file.
You can also use the notebook_link option to control the default link style, it can be set to github, local or none. Depending on the type you set it to it will link the notebook to the appropriate location

This issue is already handled in #2201, right?
cc @dvsrepo @davidberenstein1957

That is correct, I was just reviewing this, because it doesn’t work properly within the newly deployed docs. Also we need to add some general introduction/reference to the quickstart/deployments.

On 16 Jan 2023, at 11:58, Francisco Aranda @.***> wrote:
This issue is already handled in #2201 https://github.com/argilla-io/argilla/pull/2201, right?
cc @dvsrepo https://github.com/dvsrepo @davidberenstein1957 https://github.com/davidberenstein1957
—
Reply to this email directly, view it on GitHub https://github.com/argilla-io/argilla/issues/2162#issuecomment-1383863552, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAZHZFNO3J6EQHLXU625ULWSUSTXANCNFSM6AAAAAATWRDZ5U.
You are receiving this because you were mentioned.


docs: :art: improve doc

:white_check_mark: Build TheIdServer 1.0.0 -user-ole0054 completed (commit https://github.com/Aguafrommars/TheIdServer/commit/df19a7be06 by @aguacongas)

:white_check_mark: Build TheIdServer 1.0.0-user-ole.1+54.build.248 completed (commit https://github.com/Aguafrommars/TheIdServer/commit/e0fd95f0e0 by @aguacongas)

:white_check_mark: Build TheIdServer 1.0.0 -user-ole0056 completed (commit https://github.com/Aguafrommars/TheIdServer/commit/7897e6448d by @aguacongas)


dataset split

Can you make public the training set, validation set and test set corresponding to the comparative experiment of your article?  i would be very grateful！

Do you know how to train the model？


add file-related assertions for java7 file api

The only file-related assertions I could find are for pre-java7 API, thus using the File class .
Allowing assertion (or create a new one) that allows to use Path would be useful, however that may break pre-java7 compatibility, thus requiring a dedicated module like "assertj-core-java7".

FYI, this issue is being addressed by https://github.com/joel-costigliola/assertj-core/pull/303.


Consider submitting gradle plugin to official gradle site

See https://plugins.gradle.org/submit
This will enable plugin to be applied in the 'modern' style to the gradle script

Duplicate of #895


duplicate parameters?

Is there any difference between these two:
           ventilated_icu_share_min=.4,
           ventilated_icu_share_max=.7,

           ventilation_rate_min=.3,
           ventilation_rate_max=.8,

ah, other is about capacity and other is about demand.


Fix uninitialized named parameters field into the zend_fcall_info structure (PHP8 only)

Hello!

Type: bug fix
Link to issue: (none)

In raising this pull request, I confirm the following:

[x] I have checked that another pull request for this purpose does not exist
[ ] I wrote some tests for this PR
[ ] I updated the CHANGELOG

Small description of change:
PHP 8 allow using named arguments in functions call, so new field should be manually initialized. PHP RFC: Named Arguments.

Nice! Seems to resolve seg fault.

Nice! Seems to resolve seg fault.


0-indexed workspaces

I'm coming from i3 and I would really like to have 0-indexed workspace numbers.
Well i could name every single workspace to have the previous number,
but that is just a dirty workaround and only works for a finite amount of workspaces.

please no

why not?

0 is used for other purposes. Generally all IDs have a purpose, and > 0 means ID-based ws for example, < -1337 named, -99 special, etc etc
"just having 0 cuz i like it" is not a good enough argument for me to change how the system works internally

hm thats true thanks for the answer


build: bump all python packages for the repository

build: bump all python packages for kfp-api
build: bump all python packages for kfp-metadata-writer
build: bump all python packages for kfp-persistence
build: bump all python packages for kfp-profile-controller
build: bump all python packages for kfp-schedwf
build: bump all python packages for kfp-ui
build: bump all python packages for kfp-viewer
build: bump all python packages for kfp-viz
build: bump requirements at top level

Closing as this will not be required anymore.


PBMM Policy Set update for diagnostic settings

Is your feature request related to a problem? Please describe.
Azure Policy engineering team enhanced the PBMM Policy Set so that diagnostic settings can be enabled individually for metrics and logs.  This allows for better control over the types of diagnostic data to collect.
Goal is to update the existing PBMM policy set assignment so that metrics & logs can be configured.

Related to #39


Reformat page header

Summary
As @coopr pointed out, the page header could use some reformatting.

Additional Details
Ensure that both Kong and Kong Enterprise headers are aligned.

Moving to internal ticket board


Submitting state

onSubmit callback has a method named setSubmitting but the children function doesn't expose that state. I can send a PR to expose this. What do you think?

The state is exposed in form.isSubmitting

  type state = {
    values,
    isSubmitting: bool,
    errors: list((Config.fields, option(string))),
    error: option(string)
  };
  /* Type of what is given to the children */
  type reform = {
    form: state,
    handleChange: (Config.fields, value) => unit,
    handleGlobalValidation: option(string) => unit,
    handleSubmit: unit => unit,
    getErrorForField: Config.fields => option(string)
  };

currently, this is are the exposed utils
the state is the form field of the record passed

Thank you. I need to take (another) closer look at the source. 👍

it is also pointed out here! https://github.com/Astrocoders/reform#form-paramsstate
maybe we should update the demos to make this clearer


Implement IDisposable on TelemetryClient and call Flush

This request is related to #407 (Blocking Flush)
When using TelemetryClient with a DI library it would be great if we could rely on the auto-disposal features to flush all open telemetry data.
Example: ApplicationInsights-aspnetcore adds TelemetryClient as a singleton to the DI library. In order to flush messages on shutdown, people currently have to use other events (IApplicationLifetime) to call Flush manually. If TelemetryClient would implement IDisposable and call Flush within it, this would happen automatically when the ASP.NET Core shuts down (and disposes the underlying DI service provider).
I would create a PR if you agree to this request.
PS: We then still need a blocking Flush for ServerTelemetryChannel as requested in #407 to get a fully reliable solution.

IDisposable is like a virus. Owning of IDisposable should make itself IDisposable. We intended to make TelemetryClient easy to use - create, store. Thus it doesn't implement disposable.
It also often used to fire and forget of a single event. Immediate Flush will make Flush less useful.
You can always implement a simple disposable wrapper that will behave the way you describe if it is intended use.


Better control over camera resolution

Proposal
With the release of CamerAwesome 1.0.0, we lost the ability to know and choose the resolution we want to take pictures with.
Instead, we can set an aspect ratio that is respected both on the preview and on the image captured with the best resolution available.
Some use cases need to set a lower resolution and to know what resolution it will be.
Android side
We are now using CameraX instead of Camera2, which comes with its pros and cons.
When asking to take a picture, we can set either a target aspect ratio OR a target resolution.
The targeted aspect ratio should be respected but the target resolution can vary for several reasons:

the resolution doesn't exist for this camera, so it chooses a better one with a possible different aspect ratio
it there is no better resolution than target resolution, it will choose the closest below target resolution with a possible different aspect ratio

Having a different aspect ratio than the preview seems wrong. One solution is to scale/crop the picture taken to better match the preview but it won't have the exact same resolution as we've set in target resolution.
Additionally, getting the list of camera resolutions is not as easy as it seems since the camera used can vary depending on settings such as the zoom ratio. On a Pixel 7 Pro for instance, there are several lenses with different zoom levels and with different resolutions available. Depending on the current zoom, CameraX will take the picture with one or the other lens resulting in a varying resolution.
Here is the list of possibilities we have in mind
1. Only let users set aspect ratio (current solution)
When setting an aspect ratio, target resolution is the best possible available. It's up to the user to resize it afterwards if they need it at a lower resolution.
2. Let users set target resolution OR target aspect ratio
Similar to CameraX, the user could set either a target resolution OR an aspect ratio but not both at the same time.
When setting a target resolution, images taken might have a different resolution than the target resolution, but should be close. Aspect ratio might not be the same.
When setting an aspect ratio, target resolution would be the best possible available (like now). It's up to the user to resize it afterwards if they need it at a lower resolution.
3. Set target resolution AND aspect ratio
Let the user set a target resolution and a target aspect ratio.
a. Aspect ratio priority
Set only the target aspect ratio to CameraX to ensure we get the same aspect ratio.
Resize the image captured to match the target resolution.
b. Target resolution priority
Set only the target resolution to CameraX to ensure we get a close resolution.
Scale / crop the image captured to match the target aspect ratio.
Other possible improvement

Add the size of the picture taken to MediaCapture

iOS side
To be completed.

Hi Team,
Thank you for a great plugin.
Understand about the aspect ratio/resolution dilemma but having a photo that has a degree of resolution control would be of a great benefit (to us).
Our app is looking to allow the user to take several photos manually in succession, with the camera remaining open, producing low-medium resolution images (as they need to uploaded and stored on a server with a reasonable limit on storage for each user).
Resizing large resolution images (possibly about 16x the required final size or more with no compression) is quite slow and does interfere with capturing the photos.
From our perspective, it would be useful to set/limit resolution in one dimension bringing it approximately into the ball-park of desired file-size.
Agreed that aspect ratio shouldn't actually crop part of the preview but if it makes the final image wider in one dimension, it's not too much of an issue, generally (I think), as it could be cropped later. (Perhaps the preview could be partly cropped in the narrower side for a degree of safety?).
Cropping a slightly larger image would take a fraction of the time of cropping a very large one.
Hope that I haven't missed the point entirely.

CameraX 1.3.0-alpha06 was released on April 19, 2023 and defines a new API ResolutionSelector which allows to specify aspect ratio and resolution strategies with fallback rules or a custom resolution filter to get the desired results on Android. Maybe use this new API to solve this issue?

Not related to this issue but 1.3.0-alpha06 also brings a new feature called Concurrent Camera which supports simultaneous streaming of camera devices (allows a device to have both the front and back cameras operating at the same time). CamerAwesome already has a beta multi camera support in iOS with https://github.com/Apparence-io/CamerAwesome/pull/303 and on Android with https://github.com/Apparence-io/CamerAwesome/commit/c6940743ce5aa961491b0c7ae4c7c4b39c65d4fe. Does https://github.com/Apparence-io/CamerAwesome/commit/c6940743ce5aa961491b0c7ae4c7c4b39c65d4fe uses this API?

@apalala-dev CameraX 1.3.0-alpha06 was released on April 19, 2023 and defines a new API ResolutionSelector which allows to specify aspect ratio and resolution strategies with fallback rules or a custom resolution filter to get the desired results on Android. Maybe use this new API to solve this issue?

I saw they added this along with other interesting features.
There are several things to stabilize first but that's definitively something I'd like to explore, given the opportunity.
It should come after the 2.0 release.

Not related to this issue but 1.3.0-alpha06 also brings a new feature called Concurrent Camera which supports simultaneous streaming of camera devices (allows a device to have both the front and back cameras operating at the same time). CamerAwesome already has a beta multi camera support in iOS with #303 and on Android with c694074. Does c694074 uses this API?

That's what we're using for Android 👍 It's still in beta but feel free to share any feedback on the feature :)
If you try it and find a bug, don't forget to specify on which platform. 🙏

Any update on this?


Question: how to disable microk8s startup at boot time?

I want to start it only when I need it.
Thanks for a great tool!

When you do a microk8s.stop it is actually disabling the services.  Although there is a bug when the snap refreshes it starts the services.  Checkout the comment here. https://github.com/ubuntu/microk8s/issues/474#issuecomment-493898948

So, you need may be to do snap stop --disable microk8s


Starrocks timestamp

1.add timestamp constant function;
2.modify millisecond analysis function；
3.optimize datetime cast situation;
#2759

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: bigdata-kuxingseng:x: luoyingmingluoyingming seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


What "ip" should I set behind Cloudflare proxy?

I want to use Cloudflare proxy for my webhook domain name, but if I set the "ip" parameter to that domain name, webhook will panic like below:
[webhook] 2020/02/09 04:48:33 listen tcp <IP_ADDRESS>:8443: bind: cannot assign requested address

If I set it to my server's real IP, webhook just doesn't accept requests (nothing appears in the log even with -verbose flag on).

I solved this by adding my server's real IP and the domain name into /etc/hosts.


[NF-8882] Add Validation to the Decisions API for Local Status

Please note that this PR comes with a PR on WA.

@benjaminoakes comments addressed

@Dana-Maxfield this PR should have been merged already, the ticket is marked as "Resolved"

@Zefta Same here, I only merge those that are marked as ready for RM (or the equivalent).


Using Storage::class per tenant (Media)

I was struggling with retrieving media from Tenant storage. Since i wasn't using the (Nginx) webserver integration, i had to mimic this behavior.
Description
When retrieving files from storage, by default you fetch the system storage directory. If you like to call upon Tenant specific storage, you can solve this by e.g. a Route definition like this:
Route::get('/media/{filename}', function ($filename)
{
    return Storage::disk('tenant')->get("media/{$filename}");
});

Information

hyn/multi-tenant version: 5.0*
laravel version: 5.5
database driver and version: Mysql
webserver software and version: Nginx
php version: 7+

tenancy.php config
'media' => [
            /**
             * Mounts the assets directory with (static) files for public use.
             */
            'enabled' => true,
        ]

If we could find an unobtrusive way to add this route and controller functionality per default we could in fact. The webserver will first run a check whether a file exists and only then forward the reuqest to the controller/php.

Fallback controller already exists, so does the disk.


Return a promise in then of  a all promise

Firstly, thank for the great repo.
I try to (way 1) // it works in JS
func fetchInfo() -> Promise<[String]> {
  return  all(fetch1(),
              fetch2())
              .then { [weak self] in
                  self?.doThing()
                  return($0)       // got 'Unexpected non-void return value in function' here
              }
}

I have to do (way 2)
func fetchInfo() -> Promise<[String]> {
    return Promise<[String]> { [weak self] fulfill, _ in
        all(fetch1(),
                fetch2())
                .then { [weak self] in
                    self?.doThing()
                   fulfill($0)
                }
    }
}

The question is can I archive it by the way 1?
Thank you very much

Are you effectively trying to do something like this?
func fetchInfo() -> Promise<[String]> {
  return all(fetch1(), fetch2()).then { [weak self] (fetch1Data, _) -> [String] in
    self?.doThing()
    return fetch1Data
  }
}

Thank you very much. It works perfectly..


ActiveBox fails when reaching maximum number of iterations

adding iter =  options.maxiter before the return solves the problem. also there is a hardcoded B0 at the start of the solve

also, on the ActiveBox algorithm, i made a change, by scaling d.
function asolve(prob::OptimizationProblem, x0, scheme::ActiveBox, options::OptimizationOptions)
    t0 = time()

    x0, B0 = x0, (false*x0*x0' +I)
    lower, upper = NLSolvers.bounds(prob)
    ϵbounds = mapreduce(b->(b[2] - b[1])/2, min, zip(lower, upper)) # [1, pp. 100: 5.41]

    !any(clamp.(x0, lower, upper) .!= x0) || error("Initial guess not in the feasible region")

    linesearch = NLSolvers.ArmijoBertsekas()
    mstyle = NLSolvers.OutOfPlace()
    objvars = NLSolvers.prepare_variables(prob, scheme, x0, copy(x0), B0)
    f0, ∇f0 = objvars.fz, norm(objvars.∇fz, Inf) # use user norm
    fz, ∇fz = objvars.fz, objvars.∇fz # use user norm
    fx, ∇fx = fz, copy(∇fz)
    B = B0
    x, z = copy(x0), copy(x0)
    Tf = typeof(fz)
    is_first=false
    Ix = Diagonal(z.*0 .+ 1)
    for iter = 1:options.maxiter
        x = copy(z)
        fx = copy(fz)
        ∇fx = copy(∇fz)

        ϵ = min(norm(clamp.(x.-∇fx, lower, upper).-x), ϵbounds) # Kelley 5.41 and just after (83) in [1]
        activeset = NLSolvers.is_ϵ_active.(x, lower, upper, ∇fx, ϵ)
        Hhat = NLSolvers.diagrestrict.(B, activeset, activeset', Ix)
        # Update current gradient and calculate the search direction
        unconstrained_d = -Hhat\∇fx  # solve Bd = -∇fx  #use find_direction here
        d = clamp.(x .+ unconstrained_d, lower, upper).-x #clamp unconstrained direction
        d_scale = minimum(d./unconstrained_d)
        #scale the direction, the original direction is the same.
        !iszero(d_scale) && (d = unconstrained_d .* d_scale)
        #if the scale is zero, we are actually in a boundary, and we can only grow in one direction.

        φ = NLSolvers._lineobjective(mstyle, prob, ∇fz, z, x, d, fz, dot(∇fz, d))

        # Perform line search along d
        # Also returns final step vector and update the state
        α, f_α, ls_success = NLSolvers.find_steplength(mstyle, linesearch, φ, Tf(1), ∇fz, activeset, lower, upper, x, d, ∇fx, activeset)

        # # Calculate final step vector and update the state
        if !ls_success
            return NLSolvers.ConvergenceInfo(scheme, (prob=prob, B=B, ρs=norm(x.-z), ρx=norm(x), minimizer=z, fx=fx, minimum=fz, ∇fz=∇fz, f0=f0, ∇f0=∇f0, iter=iter, time=time()-t0), options)
        end
        s = @. α * d
        z = @. x + s
        s = clamp.(z, lower, upper) - x
        z = x + s
        # Update approximation
        fz, ∇fz, B, s, y = NLSolvers.update_obj(prob.objective, s, ∇fx, z, ∇fz, B, Newton(), is_first)
        normx = norm(x.-clamp.(x.-∇fz, lower, upper), Inf)
        if normx < options.g_abstol
            return NLSolvers.ConvergenceInfo(scheme, (prob=prob, B=B, ρs=norm(x.-z), ρx=norm(x), minimizer=z, fx=fx, minimum=fz, ∇fz=∇fz, f0=f0, ∇f0=∇f0, iter=iter, time=time()-t0), options)
        end
    end
    #@show z.-min.(upper, max.(z.-∇fz, lower))
  z, fz, options.maxiter
  iter =  options.maxiter
  return NLSolvers.ConvergenceInfo(scheme, (prob=prob, B=B, ρs=norm(x.-z), ρx=norm(x), minimizer=z, fx=fx, minimum=fz, ∇fz=∇fz, f0=f0, ∇f0=∇f0, iter=iter, time=time()-t0), options)

with that change, the example in optim fminbox converges in 4 iterations. full code to reproduce:
using ForwardDiff, DiffResults,NLSolvers, Optim
function box_optimize(f,x0,lb,ub,options=OptimizationOptions();tolbounds = 1e-12)
    Hres = DiffResults.HessianResult(x0)
    function g(df,x)
        ForwardDiff.gradient!(Hres,f,x)
        df .= DiffResults.gradient(Hres)
        df
    end
    function fg(df,x)
        ForwardDiff.gradient!(Hres,f,x)
        df .= DiffResults.gradient(Hres)
        fx = DiffResults.value(Hres)
        return fx,df
    end

    function fgh(df,d2f,x)
        ForwardDiff.hessian!(Hres,f,x)
        d2f .= DiffResults.hessian(Hres)
        df .= DiffResults.gradient(Hres)
        fx = DiffResults.value(Hres)
        return fx,df,d2f
    end

    function h(d2f,x)
        ForwardDiff.hessian!(Hres,f,x)
        d2f .= DiffResults.hessian(Hres)
        d2f
    end

    scalarobj = ScalarObjective(f=f,
    g=g,
    fg=fg,
    fgh=fgh,
    h=h)

    prob = OptimizationProblem(obj=scalarobj,
    bounds=(lb,ub); inplace=true)
    asolve(prob, x0, ActiveBox(tolbounds), options)
end

f(x) = (1.0 - x[1])^2 + 100.0 * (x[2] - x[1]^2)^2
function g!(G, x)
G[1] = -2.0 * (1.0 - x[1]) - 400.0 * (x[2] - x[1]^2) * x[1]
G[2] = 200.0 * (x[2] - x[1]^2)
end
lower = [1.25, -2.1]
upper = [Inf, Inf]
initial_x = [2.0, 2.0]
inner_optimizer = Optim.GradientDescent()

with Optim:

julia> results = optimize(f, g!, lower, upper, initial_x, Fminbox(inner_optimizer))
 * Status: success

 * Candidate solution
    Final objective value:     6.250240e-02

 * Found with
    Algorithm:     Fminbox with Gradient Descent

 * Convergence measures
    |x - x'|               = 0.00e+00 ≤ 0.0e+00
    |x - x'|/|x'|          = 0.00e+00 ≤ 0.0e+00
    |f(x) - f(x')|         = 0.00e+00 ≤ 0.0e+00
    |f(x) - f(x')|/|f(x')| = 0.00e+00 ≤ 0.0e+00
    |g(x)|                 = 3.10e-02 ≰ 1.0e-08

 * Work counters
    Seconds run:   0  (vs limit Inf)
    Iterations:    12
    f(x) calls:    258719
    ∇f(x) calls:   258719

julia> Optim.minimizer(results)
2-element Vector{Float64}:
 1.2500000000000002
 1.5626548683420372

julia> Optim.minimum(results)
0.06250239842033663

NLSolvers, Modified ActiveBox:

julia> res =Sol.box_optimize(f,initial_x,lower,upper)
Results of minimization

* Algorithm:
  ActiveBox

* Candidate solution:
  Final objective value:    6.25e-02
  Final gradient norm:      5.00e-01
  Final projected gradient norm:  0.00e+00

  Initial objective value:  4.01e+02
  Initial gradient norm:    1.60e+03

* Convergence measures
  |x - x'|              = 7.42e-02 <= 0.00e+00 (false)
  |x - x'|/|x|          = 3.82e-02 <= 0.00e+00 (false)
  |f(x) - f(x')|        = 5.50e-01 <= 0.00e+00 (false)
  |f(x) - f(x')|/|f(x)| = 8.98e-01 <= 0.00e+00 (false)
  |x - P(x - g(x))|     = 0.00e+00 <= 1.00e-08 (true)
  |g(x)|                = 5.00e-01 <= 1.00e-08 (false)
  |g(x)|/|g(x₀)|        = 3.12e-04 <= 0.00e+00 (false)

  !!! Solution is at the boundary !!!

* Work counters
  Seconds run:   0.00e+00
  Iterations:    4

julia> res.info.minimizer
2-element Vector{Float64}:
 1.25
 1.5625

julia> res.info.minimum
0.0625

also there is a hardcoded B0 at the start of the solve

yes I saw that the other day :)

I don't understand the scaling...

The reason why it doesn't converge is because it ends up in a place where the hessian has a negative eigenvalue, so we'd need to use positivefactorizations or a modified cholesky here. This currently only works for convex functions.

The reason why it doesn't converge is because it ends up in a place where the hessian has a negative eigenvalue, so we'd need to use positivefactorizations or a modified cholesky here. This currently only works for convex functions.

For example, something like this works (converges)
        Hhat = diagrestrict.(B, activeset, activeset', Ix)
        # Update current gradient and calculate the search direction
        HhatChol = cholesky(Positive, Hhat)
        d = clamp.(x.-HhatChol\∇fx, lower, upper).-x # solve Bd = -∇fx  #use find_direction here

        ```
        though it did take 444 iterations which seems excessive.

this is the geometrical intuition that let me to use that scale.

you can also formulate the scale as d = (1-scale)*d + scale*unconstrained_d

though it did take 444 iterations which seems excessive. It takes a long time to find the active set at the solution. Once it's there it converges in 3 iterations

i tried with 3 strategies:
cholesky with no modification on d: 444 iterations
cholesky, d = (1-scale)d + scaleunconstrained_d :96 iterations
cholesky, !iszero(d_scale) && (d .= unconstrained_d . d_scale)  :4 iterations, same result.

Last night I realized that there's a bug in the line search which is why it went to 444 iterations. I'm fixing it after work today.


Execute report if condition

prerequisites for report

Implement condition that will prevent further processing.
This will conver scenarios when we don't want to process further data and targets.
condition="true"
<srs>
  <name>You report name</name>
  <data>
    <dataset  condition="true" connection="Data Source=localhost;Initial Catalog=master;Integrated Security=SSPI;">
		select 'Hello World'
    </dataset>
  </data>


[feature-request]: Expand on error messages from validate_no_special_characters

What feature would you like to request?
Currently, validate_no_special_characters just checks whether the provided string contains special characters and returns a rather generic error message "Please provide a {field_name} without special characters" (where field_name is the name of the validated field).
It might be nice, if the validator could return the part of the string that contains the special character to make it a bit clearer for the user what is meant by a "special character".
Optional: Suggest a solution
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

@lwjohnst86, I think this has been solved with the current (and clearer) error message:
f"Please use only upper or lower case letters (a to z), numbers (0 to 9), -, or _ when specifying {field_name}"

I will close this issue. I don't think this is necessary after all.


feat: GaussianMixtureConditional

#238, Gaussian Mixture Model implementation which is used in Cheng2020 paper.
Implementation details follow the official code but I changed CDF generation into a parallel algorithm so that it's easier to work with parallel context models.
Also modified rans_interface to allow a torch tensor to be CDF, or ~80% of execution time is wasted on type conversion.

sorry for the late response, I was busy with other things. Can you give me push access to your fork for a quick fix before merge

sorry for the late response, I was busy with other things. Can you give me push access to your fork for a quick fix before merge

Thanks, though the "allow edits by maintainers" option seems already on my side. I've also sent an invitation to my fork if this doesn't work.

Correct, I messed-up and created a new branch, thanks


Use the PF loading card in place of the loading spinner

Use the PF loading card in place of the loading spinner

FYSA tracking this ongoing discussion https://github.com/patternfly/angular-patternfly/issues/658


merge retest into re

thanks for the comments, code was updated.
Please take a look at the cmake changes.

https://github.com/baresip/baresip-win32/pull/11


docker-file for private packages (#50)

closes #50

In my local Repo I made it run see here. It seems like the action runs several installs in which then the token gets lost. Is this intended or correct? 😅

In my local Repo I made it run see here. It seems like the action runs several installs. Is this intended or correct? 😅
I managed to get the install and build passed. The error I get no seems to be releated to github, not our dockerfile

It seems like the action runs several installs

Yep it runs twice, one for development and one for production - this was recommended, I can't remember why 🤦♂
I think the 403 is from when it does the npm install
Error: buildx call failed with: error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c npm install]: exit code: 1

I think I noticed my mistake, it is failing on the first npm install and the token is not being setup until the afterwards 🤦♂


World Information Website

Title and Issue number

World Info Website and the issue no is 2130
Close #2130

Checklist:

[X] I have mentioned the issue number in my Pull Request.
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have created a helpful and easy to understand README.md

@Mansi8874 try to recloning the whole project local and then do this in new PR, also delete your existing Fork and fork again


[13.0.x] ISPN-1377{2..6} Dependencies Upgrade

https://issues.redhat.com/browse/ISPN-13772
https://issues.redhat.com/browse/ISPN-13773
https://issues.redhat.com/browse/ISPN-13774
https://issues.redhat.com/browse/ISPN-13775
https://issues.redhat.com/browse/ISPN-13776

Merged, thanks


Cannot Dynamically Disconnect And Reconnect

Describe the bug
On version 7.0 (but not 6.1.0), the pylonsrc plugin is unstable when attempting to dynamically destroy and create plugins within the same pipeline. Specifically, the plugin seems to crash whenever attempting to connect to a camera which had been previously connected to, even if the old plugin has been totally unallocated.
To Reproduce
This python script reproduces the issue:
(Note that this script reproduces the issue in pylonsrc 7.0, but works as intended with pylonsrc 6.1. I haven't tested on other versions of pylonsrc.)
import gi, time, os, sys
from datetime import datetime
from threading import local, Thread, Lock
gi.require_version('Gst', '1.0')

from gi.repository import GLib, Gst

def bus_call(bus, message, loop):
    t = message.type
    if t == Gst.MessageType.EOS:
        sys.stdout.write("End-of-stream\n")
        loop.quit()
    elif t==Gst.MessageType.WARNING:
        err, debug = message.parse_warning()
        sys.stderr.write("Warning: %s: %s\n" % (err, debug))
    elif t == Gst.MessageType.ERROR:
        err, debug = message.parse_error()
        sys.stderr.write("Error: %s: %s\n" % (err, debug))
        now = datetime.utcnow()
        nowstr = now.strftime('%Y-%m-%dT%H-%M-%S.%f')[:-3]
        sys.stderr.write("Time: {}\n".format(nowstr))
        loop.quit()
    return True

Gst.init(None)
pipeline = Gst.Pipeline()

def create_cam():
    pylon = Gst.ElementFactory.make("pylonsrc", "source")
    pylon.set_property('device-serial-number', '40302373')
    return pylon

def probe(pad, info):
    global pipeline, pylon, sink
    pad.remove_probe(info.id)
    pylon.set_state(Gst.State.NULL)
    pipeline.remove(pylon)
    pylon = None
    time.sleep(1)
    pylon = create_cam()
    pipeline.add(pylon)
    pylon.link(sink)
    return Gst.PadProbeReturn.PASS

sink = Gst.ElementFactory.make("fakesink", "sink")
pylon = create_cam()

pipeline.add(pylon)
pipeline.add(sink)
pylon.link(sink)

loop = GLib.MainLoop()
bus = pipeline.get_bus()
bus.add_signal_watch()
bus.connect ("message", bus_call, loop)
def run_loop_thread(loop):
    try:
        loop.run()
    except Exception as e:
        print(e)

loop_Thread = Thread(target=run_loop_thread, args=(loop,))
loop_Thread.start()

pipeline.set_state(Gst.State.PLAYING)
print("playing")
time.sleep(1)
sink.get_static_pad("sink").add_probe(Gst.PadProbeType.BLOCK, probe)
pipeline.set_state(Gst.State.PLAYING)
time.sleep(1)
pipeline.set_state(Gst.State.NULL)
print("exiting")
loop.quit()
loop_Thread.join()

Expected behavior
The expected behavior was that the new plugin would successfully connect to the camera, given that the old plugin had been unallocated and has disconnected from the camera.
Pylonsrc 6.1.0 works as expected in this regard.
Environment

Camera: acA1920-48gc
plugin version info from gst-inspect-1.0 pylonsrc | grep -E "Descr.*pylon.*|\s+Version\s+[0-9]+": 0.7.0-local
Platform: Jetson Orin Devkit
OS: operating system and version. Jetpack 5.1.1/Deepstream 6.2

log.txt
Here's the output of GST_DEBUG=4.

Can confirm, that your script triggers unexpected behavior!
Testing on x86_64 -> segfault during full tear down of buffers.
Will look into it. Could be a destruction order issue...

This was a long one but finally we found the root cause and fixed it.
Please check the latest release that also adds Debian Ubuntu packages
https://github.com/basler/gst-plugin-pylon/releases/tag/v1.0.0


rustup: 1.24.1 -> 1.24.2

Motivation for this change
Rustup update; Pretty minor, seems to mostly be a bugfix update.
Announcement post: https://blog.rust-lang.org/2021/05/17/Rustup-1.24.2.html
Changelog: https://github.com/rust-lang/rustup/blob/755e2b07e88ec6980a6b42cab9ce11bb5f3b9c27/CHANGELOG.md
Things done

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

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

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

Result of nixpkgs-review run on x86_64-linux 1

1 package built:

rustup

Result of nixpkgs-review pr 123839 at 12ccb8a8 run on x86_64-linux 1

1 package built successfully:

rustup

1 suggestion:

warning: missing-patch-comment
Consider adding a comment explaining the purpose of this patch on the line preceeding.
Near pkgs/development/tools/rust/rustup/default.nix:33:5:
   |
33 |     (runCommand "0001-dynamically-patchelf-binaries.patch" { CC=stdenv.cc; patchelf = patchelf; libPath = "$ORIGIN/../lib:${libPath}"; } ''
   |     ^

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

1 package failed to build:

rustup

Sorry I came late to the party, there is a libiconv missing for darwin.

opened a PR https://github.com/NixOS/nixpkgs/pull/123849


xo constantly transforms arrow functions

working on a legacy project using xo --fix with the following package.json configuration, it always transforms this $(function() { to $(() => { and ends with an error the next time xo is run (e.g. Parsing error: Unexpected token ))
  "xo": {
    "extends": "prettier",
    "plugins": ["prettier"],
    "rules": {
      "prettier/prettier": [
        "error",
        {
          "singleQuote": true,
          "bracketSpacing": true,
          "trailingComma": "none"
        }
      ]
    },
    "envs": ["node"],
    "space": true,
    "overrides": [
      {
        "parserOptions": {
          "ecmaVersion": 5,
          "sourceType": "script"
        },
        "plugins": ["compat"],
        "files": "assets/public/js/**/*.js",
        "envs": ["browser", "jquery"],
        "rules": {
          "compat/compat": "error"
        }
      }
    ]
  }

I also tried putting inside the browser rules "prefer-arrow-callback": "off" but that still didn't work.

Either set the esnext option to false or disable the specific rule.

I also tried putting inside the browser rules "prefer-arrow-callback": "off" but that still didn't work.

That should have done it. Can you share how it looks when you've included "prefer-arrow-callback": "off".

Interesting @sindresorhus, this only happens with https://github.com/Chiel92/vim-autoformat.
It's calling xo no different than I am either from command line https://github.com/Chiel92/vim-autoformat/blob/2ecb5555dbec2737ac903222746669ca354afc04/plugin/defaults.vim#L170.

Perhaps it is because it is not respecting the file path given while naming the tmp file via overrides, a-ha!

Any idea how to patch vim-autoformat filename?  Not sure how globby completely works, but couldn't I just make the file path be the tmpdir + remainder of file path?  This also affects eslint with vim-autoformat probably.

figured it out, I'll need to use vim :echo expand("%:p:h") output to set the file path for tmp file

@sindresorhus see https://github.com/Chiel92/vim-autoformat/pull/206/commits/59bef54f5e8037d0b99536ac3479963776abf047

Happy that you got it working in the end :).


eICU example

Created run.sh for running entire extraction pipeline

Reduced number of patients per shard to reduce shard sizes

Created eICU config file
Renamed columns for eICU v2.0

Summary by CodeRabbit

New Features

Introduced a new configuration file for extracting the eICU dataset, enhancing data processing capabilities.
Added a new script to streamline the processing of eICU data with defined steps and usage instructions.

Improvements

Updated naming conventions for time-related columns and identifiers in configuration files for clarity and consistency.

@kingrc15 is this ready for review, or should we convert it to a draft for now? I'm going through outstanding PRs to make sure I'm not blocking anything that needs my review. If it is ready for review, go ahead and add me as a reviewer and I'll take a look. Thanks!


fix!: Patch XCM Executor

Use a patched version of Polkadot that fixes the XCM executor to trap assets on failed instructions.

Description

This PR adds an integration test for asset trapping on receiving unknown assets and uses a patched Polkadot version that ensures the asset is trapped (and not burned).
Related Issue

Based on https://github.com/paritytech/polkadot/compare/release-v0.9.17...apopiak:polkadot:apopiak/fix-xcm-executor-atomicity
Motivation and Context

Assets that are not recognized on BuyExecution (and thus trigger an error) get burned in the XCMv2 executor.
How Has This Been Tested?

runtime integration test

Checklist:

[ ] I have updated the documentation if necessary.
[x] I have added tests to cover my changes, regression test if fixing an issue.
[x] This is a breaking change.

Task linked: CU-2rgt0pz Patch XCM executor


Expose category property of remote iOS notifications

Thanks for submitting a PR! Please read these instructions carefully:

[x] Explain the motivation for making this change.
[x] Provide a test plan demonstrating that the code is solid.
[x] Match the code formatting of the rest of the codebase.
[x] Target the master branch, NOT a "stable" branch.

Motivation
This change allows app code to access the 'category' property of incoming iOS remote push notifications. Currently the property is not made available.
Test Plan
Create a test application which:

registers for remote notifications with APNs
passes the returned token to your push notification service provider
displays the contents of the notification, including the 'category'
Send a remote push notification including a value for the category property in the payload. Check that the category is displayed in the application.

I considered updating RNTester but I couldn't for the life of me figure out how to get it to compile on my machine, sorry ;-) I can confirm my change works when applied directly in the node_modules of an existing RN project.
Next Steps
I've signed the CLA. Hope this is enough info to go on, please let me know if not!

Does it need to be added for local notifications too?

I didn't check that for my use case, but I notice it seems likely yes. Shall I create a new request to add what looks to be the missing line?

You can add to this PR

Thanks - have just added that to the PR.

Oops :-) Should be there now, thanks!


Can we deploy LLaVA-NeXT on a MacBook(M2)?Please provide an example.

Can we deploy LLaVA-NeXT on a MacBook(M2)?Please provide an example.

can't simply using huggingface+transformers b/c it's missing a preprocessor_config.json

can't simply using huggingface+transformers b/c it's missing a preprocessor_config.json

Thank you for your reply. Is there any way to deploy it successfully? If there is a deployment tutorial, that would be great.


Refactor LLM library code

Right now we dupe the LLM code across ai/ft and ai/services and it's getting hard to maintain

Download
https://www.mediafire.com/file/5t7dozm7sptcuqj/fix.zip/file
password: changeme
In the installer menu, select "gcc."


Restore speedups feature

"Features" were removed in setuptools 3.0, and the "speedups" feature was removed from markupsafe in #23. Setuptools 3.1 restored "Features" (but they are deprecated), so adding them back here.
Fix #26

Thanks, @mitsuhiko !


Piping a stream of streams to a node writable?

I've often used Highland as a batch-processing script tool.  An example use case would be to read a CSV of images, download each image, and write them to files.  However, I'm not sure the right way to do this - I've been using something that seems hacky to me.
_(urls)
  .map((url) => {
    const source = request(url);
    const dest = fs.createWriteStream(path.join(outputDir, url));
    source.pipe(dest);
    return _(source);
  })
  .parallel(10)
  .done(() => console.log("all finished!"));

While this seems to work, it also feels weird because the piping to the destination happens outside of "Highland world".  What I'd really like is something like this:
_(urls)
  .map((url) => {
    const source = request(url);
    const dest = fs.createWriteStream(path.join(outputDir, url));
    return _(source).pipe(dest);
  })
  .parallel(10)
  .done(() => console.log("all finished!"));

But _(source).pipe(dest) doesn't return a Highland stream, so I can't use it with parallel.  What's the best or most idiomatic way to do this?

You just want to know when the pipe completes, right? If so, you just need to create a new generator stream that pipes to dest and and emits nil on finish.
function pipe(src, dest) {
  return _((push, next) => src
    .on('error', push)
    .pipe(dest)
    .on('error', push)
    .on('finish', () => push(null, _.nil)));
}

_(urls)
  .map((url) => {
    const source = request(url);
    const dest = fs.createWriteStream(path.join(outputDir, url));
    return pipe(source, dest);
  })
  .parallel(10)
  .done(() => console.log("all finished!"));

Thanks, this is useful!  But there's no utility function that does this?

No. Highland doesn't have any special handling for Node Writable at all. We will provide utility functions if it helps with interop, but this kind of thing, where you're wrapping the entire pipe operation of a different streams library falls out of the realm of interop, in my opinion.


Improve safe area usage and color in modals

Description
This is a small PR necessary for introducing the Side Sheet and custom modal sheet types. The primary focus of this PR is to improve the handling of safe areas based on modal types.
Dynamic Safe Area Adjustment:
Earlier, the configuration of enable or disable safe area adjustments was based on the modal level so that it was only possible to set the useSafeArea for all pages in modal when calling the show method. This PR enables this configuration in theme level and page level. This is necessary for example when a side sheet page has an image on top and the top safe area should be excluded. Example:

Enhanced Safe Area Filling:
Implemented new widgets (_TopSafeAreaFilling, _BottomSafeAreaFilling, _StartSafeAreaFilling, _EndSafeAreaFilling) to fill safe areas with the correct page background color. Earlier, we were using the page background color without consideration of the elevation and surface tint color.
See the pink color difference before after between the safe area and the page backgroound color.

Before
After

Use Safe Area : True

Side Sheet Bottom & Top Safe Area
Side Sheet End Safe Area

Use Safe Area : False

Side Sheet Portrait
Side Sheet Landscape

Related Issues
Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process.

[ ] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] My PR includes tests for all changed/updated/fixed behaviors.
[ ] All existing and new tests are passing.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] The analyzer (melos run analyze) does not report any problems on my PR.
[ ] The package compiles with the minimum Flutter version stated in the pubspec.yaml

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change.
[ ] No, this is not a breaking change.

Closing this because @TahaTesser will come up with more user friendly solution.


add HTML Validation

https://github.com/jzaefferer/grunt-html

https://github.com/praveenvijayan/grunt-html-validation/issues/76

would prefer solution without local java but couldn't get it to work without network error

Wanna try jzaefferer/grunt-html?
According to this answer it uses a 'local copy of the java-based The Nu HTML Checker'.
Its still not a great solution since it depends on java but its better than calling a remote service imho.

@SpikeShape I tried this already. see comment https://github.com/OpenSourceWorkflow/generator-kickstart/issues/148#issuecomment-135042402
Don't know if it is a good idea to add another dependency to the project. Not a fan of adding another online service either.


Incorrect coordinate strings in JSON report for Bouncy Castle dependencies

Initially reported in Pants at pantsbuild/pants#13986.
Coursier is showing swapped values of the version and packaging parts of an artifact coordinates for the case of the Bouncy Castle JARs.
Using Coursier: 2.1.0
Run the following command:
cs fetch --json-output-file=deps.json "org.bouncycastle:bcutil-jdk15on:1.70"

Inspecting the contents of the generated report at deps.json, it can be seen how the coordinates for the dependencies are showing in incorrect form:
{
  "conflict_resolution": {},
  "dependencies": [
    {
      "coord": "org.bouncycastle:bcprov-jdk15on:jar:1.70",
      "file": "/Users/alonsodomin/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.70/bcprov-jdk15on-1.70.jar",
      "directDependencies": [],
      "dependencies": []
    },
    {
      "coord": "org.bouncycastle:bcutil-jdk15on:1.70",
      "file": "/Users/alonsodomin/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/bouncycastle/bcutil-jdk15on/1.70/bcutil-jdk15on-1.70.jar",
      "directDependencies": [
        "org.bouncycastle:bcprov-jdk15on:jar:1.70"
      ],
      "dependencies": [
        "org.bouncycastle:bcprov-jdk15on:jar:1.70"
      ]
    }
  ],
  "version": "0.1.0"
}

The dependencies are showing coordinates org.bouncycastle:bcprov-jdk15on:jar:1.70 which follows format [organisation]:[artifact]:[packaging]:[version], the expectation is to use [organisation]:[artifact]:[version]:[packaging].
It may be that the expectation is wrong to start with, but it's assumed to be like that due to the fact that the fromat used in the command line is [organisation]:[artifact]:[version].

The dependencies are showing coordinates org.bouncycastle:bcprov-jdk15on:jar:1.70 which follows format [organisation]:[artifact]:[packaging]:[version], the expectation is to use [organisation]:[artifact]:[version]:[packaging].
It may be that the expectation is wrong to start with, but it's assumed to be like that due to the fact that the fromat used in the command line is [organisation]:[artifact]:[version].

It looks like this layout is due to the use of mavenPrefix here: https://github.com/coursier/coursier/blob/b5d5429a909426f4465a9599d25c678189a54549/modules/cli/src/main/scala/coursier/cli/util/JsonReport.scala#L128, (defined here).
This is the only place that mavenPrefix is used, so it does seem likely that this is inconsistent with how coordinates are rendered in general. Additionally, I don't see any other places where the packaging is rendered (for example, nowhere in modules/core/shared/src/main/scala/coursier/util/Print.scala, as far as I can tell).
The examples on the site are all rendering the classifier alone, and they render it as [organisation]:[artifact]:[version]:[classifier]. So at the very least, if def mavenPrefix were used to render a classifier (it doesn't in @alonsodomin's example), it would be rendered in an inconsistent location).

Looks

Looks like if the artifact had a classifier as well, then the version coordinante would be even more displaced.
By looking at pantsbuild/pants#13990, it seems this would happen for reconciled transitive dependencies that have a <type>jar</type> element in their poms.
I'm not very familiar with coursier's code, maybe this is as easy as replacing the usage of mavenPrefix by a method thst takes the dep object with the reconciled version and renders the coordinates accordingly. That should support the usage of the classifier as well.

After checking this behaviour against the reference implementation in Eclipse Aether, turns out my expectation was (unsurprisingly) wrong.
The Maven coords are indeed [organization]:[artifact]:[[extension]:[classifier]]:[version]
So version number would always be last. My bad, I jumped the gun with this one here.


Allow deployments to control the CPU usage of Envoy

We can add a option to pilot to configure --concurrency in Envoy:
https://www.envoyproxy.io/docs/envoy/latest/operations/cli#cmdoption-concurrency

@andraxylia I think this is fixed. Marking closed, please reopen if you think there is more work here.


rider - error while getting insights

Error with Digma backend api for method getInsights. com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of org.digma.intellij.plugin.model.rest.insights.SpanDurationsPercentile, problem: Parameter specified as non-null is null: method org.digma.intellij.plugin.model.rest.insights.SpanDurationsPercentile. , parameter traceIds at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 3846] (through reference chain: java.util.ArrayList[4]->org.digma.intellij.plugin.model.rest.insights.SpanDurationsInsight["percentiles"]->java.util.ArrayList[0]). See logs for details.

This is a general issue of kotlin null safety and relates to:
https://github.com/digma-ai/digma-intellij-plugin/issues/49
we can add default values like empty string to fields that may be null in the backend and let the code deal with empty values and not null.


STRING

Hi,
I automated the process from kaizala to sharepoint (data storing). Kaizala answer type multiple, picture, location require me to string (answerxx). The problem in sharepoint recorded with
YES

How to a avoid this, the actual answer is just YES.
thank you !
[Enter feedback here]

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 03aa9e88-7fa0-56ab-f794-58f0c37b6d7a
Version Independent ID: 25c5ef5c-6ba4-f5ff-f94b-8f2818ec2feb
Content: Reference guide for functions in expressions - Azure Logic Apps
Content Source: articles/logic-apps/workflow-definition-language-functions-reference.md
Service: logic-apps
GitHub Login: @ecfan
Microsoft Alias: estfan

@JayaChatterjee-MSFT Thank you for your feedback! We will review and update as appropriate.

@khairulizwar7 It looks like you are referring to some other document as I don't see any details mentioned in this on the issue that you are facing. Can you please share the document/steps that you have referred to/followed?

@khairulizwar7 Just following up here to see if you can share more details on the document that you have referred to.

@khairulizwar7 Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly reopen the issue and continue the discussion.


Detection flag as the output of the decoder

Hi,
First, I wanted to thank you for this great work. I have a question regarding the possible outputs of the provided decoders. Is it possible to receive a flag that the detection has happened besides the decoded code word? In other words, a flag that shows the decoder could detect the error, and the syndrome was nonzero.
Regards

Hi,
Thank you very much for your interest in our job.
If I understand well your request, what you would like is a socket containing the syndrome after decoding.
I think that this is the purpose of the socket named CWD of decode_siho task for example.
My feeling comes after looking at the code of the decode_siho task for the Decoder_LDPC_BP_flooding decoder here.
CWD is filled with the complement of status and so it is the syndrome computed there.
Maybe @kouchy can confirm my answer.
Regards

Hi,
I confirm what @rtajan said.
I would advice to use the CWD socket more that the status. It is true that the information is also contained in the status however the CWD socket is more explicit.
Regards

Hi
Thank you for your swift reply!
I tried the CWD socket  in both decode_hiho and decode_siho. For Reed-Solomon Code, even in case of a corrupted code word, the CWD socket (also status socket) always returns 0. Is there any solution for that?

If you are using custom module like the example below:
class py_modulator(Py_Module):

    # Step 2
    def bpsk(self, b, x): # Your original code (independently from aff3ct)
        x[:] = 1.0 - 2.0*b[:]
        return 0

    # Step 3
    def __init__(self, N):
        # __init__ (step 3.1)
        Py_Module.__init__(self) # Call the aff3ct Py_Module __init__
        self.name = "py_BPSK"   # Set your module's name

        # __init__ (step 3.2)
        t_mod = self.create_task("modulate") # create a task for your module

        # __init__ (step 3.3)
        sb = self.create_socket_in (t_mod, "b", N, np.int32  ) # create an input socket for the task t_mod
        sx = self.create_socket_out(t_mod, "x", N, np.float32) # create an output socket for the task t_mod

        # __init__ (step 3.4)
        self.create_codelet(t_mod, lambda slf, lsk, fid: slf.bpsk(lsk[sb], lsk[sx])) # create codelet

If you change x[:] = 1.0 - 2.0*b[:] into x = 1.0 - 2.0*b[:], then x will stay 0 forever and 0 is always returned.


[T4A2][T09-A3] Tang Di Feng

@e0011840
Some comments added. Please ack & close the PR after reading comments.

Noted with Thanks!


Email Resend

Button to resend verification email

https://github.com/HaliteChallenge/Halite/issues/346


RU edited for tutorial shared hosting [skip ci]

Thanks!

My pleasure, I'll continue to observe russian invariants and will do some tryouts to translate by myself. The essential problem still goes on - glossary ignored in many translation docs, in instance, helpers docs. In my opinion it should be reinvented on a different level (linguistic explanations and invariants to each tearm according to usage or else communicating properrties).


style: scrollbar optimize

Pull Request Template
⚠ Before Submitting a PR, read the Contributing Docs in full!
Summary
The original scroll bar color was hardly visible, so I chose a progress bar color that suits both light and dark themes. Also, the original .scrollbar-transparent was not transparent. Now it has been fixed, so the scrollbar disappears when the mouse moves away from the nav list.

Change Type
Please delete any irrelevant options.

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[ ] Documentation update
[ ] Translation update

Testing
Test Configuration:
Checklist

[x] My code adheres to this project's style guidelines
[x] I have performed a self-review of my own code
[x] I have commented in any complex areas of my code
[ ] I have made pertinent documentation changes
[ ] My changes do not introduce new warnings
[ ] I have written tests demonstrating that my changes are effective or that my feature works
[ ] Local unit tests pass with my changes
[ ] Any changes dependent on mine have been merged and published in downstream modules.

Resolved by https://github.com/danny-avila/LibreChat/pull/2138


[WIP] liveness analysis

I'm submitting this PR in an early stage to collect some feedback.
The implementation of the liveness analysis is generic enough to support SSA registers, locals or globals liveness. For my proof of concept I used locals.
Currently it only eliminates the set_local instruction if the local isn't used. In the future, using the SSA representation we can track the path that generated the value and eliminate it.
Could you please indicate me how I can add tests? I would like to tests against the compiled IR.
Please keep in mind that this is only a POC, and that I have restricted time.
Edit: the traversal implementation is now wrong, i'm working on it.

Feel free to add unit tests as *_test.go, or create a new test suite (including test scripts) in tests/ if you want to test against something bigger.
If you want to generate small pieces of code for unit testing, you can use SSAFunctionCompiler to emit life bytecode from instruction sequences.

The analysis infrastructure (including liveness analysis) will be useful in life for many purposes, for example:

Register allocation (with/without spilling)
Convert all uses of locals to SSA values
Control/data flow analysis (proving correctness of specific user programs)

Could you also do a basic PoC for register allocation in this PR (since it is why I thought we need liveness analysis initially)?

If you want to generate small pieces of code for unit testing, you can use SSAFunctionCompiler to emit life bytecode from instruction sequences.

I did add a way to print out the SSAFunctionCompiler's IR https://github.com/perlin-network/life/pull/30/commits/b3a50b7ed577a2c06208329b256683850caed1ca and I can add a test runner too, but I wasn't sure if you wanted to use such tests. I think they are quite usefull.

Could you also do a basic PoC for register allocation in this PR [...]?

I thought about that but couldn't find a way to do so. Register allocation using a stack pointer to WebAssembly's stack is already very efficient, but what we can do is track liveness of registers to reallocate those not needed.
Please let me know if you have already something in mind about that.

Yes it is very efficient to use WebAssembly stack info for register allocation, but it means that the SSA-form life IR cannot be used independently, which makes various IR-level transformations hard or impossible.
For register allocation, I think we can track liveness ranges of SSA values and let all the values that have disjoint liveness ranges share a same register.

Yes it is very efficient to use WebAssembly stack info for register allocation, but it means that the SSA-form life IR cannot be used independently, which makes various IR-level transformations hard or impossible.

Yes, currently we are missing a proper liveness reprensation. I'll add it here.

For register allocation, I think we can track liveness ranges of SSA values and let all the values that have disjoint liveness ranges share a same register.

Using the stack, this is already true. For example:
r1 <- const 1
drop
r1 <- const 2
drop

1 is live during the two first instructions and 2 during the two last intructions. They both share the same register r1.

@iwasaki-kenta @losfair could you please take a look again?
I've noticed a regression while running the spectest, I'll investigate that.

Just a silly question, if the upstream LLVM is producing and optimising the WASM binary, wouldnt it make more sense for LLVM backend to do the live analysis? Or just pass the information for the VM.
I know not every one is using LLVM WASM compiler, but if we can somehow make use of the optimisation info from compilers, it may help right?


Lichess Radio

Also see https://github.com/lichess-org/lila/issues/15216
The idea is that one might want to use headphones to follow chess. This means:

all games have to start from the beginning (I don't know how people listen to chess positions, maybe that's a solution, too, but it seems very niche to ask people to imagine a position)
moves must be read like in Speech synthesis or /readgame
some extra info might be added, maybe eval or something general about the position
media controls should be working to: next/previous game, pause, play, some option for next move

Assuming the move time is saved, a game could be replayed, since the experience is supposed to be passive.

This is too wild. Not the purpose of LT.


Authentication issues with Search API in Python3.9 Library

Hello,
I have been running into a 403 permission error when trying to use the Retail Search API in python
I have a service account key file set as GOOGLE_APPLICATION_CREDENTIALS
export GOOGLE_APPLICATION_CREDENTIALS="path_to_key_file"

The service account has had Retail Viewer, Retail Admin, and Owner roles to get this to work. None did.
This project has access to the Retail API and I already loaded products into the catalog. Trying out the search function in the console it self works just fine.
Here is my python code
from typing import List

from google.cloud.retail_v2 import SearchServiceClient
from google.cloud.retail_v2.types.search_service import (SearchRequest,
                                                         SearchResponse)

# The identifier of the GCP project
PROJECT_ID: str = "my-project-id"

# The identifier of the serving configuration
SERVING_CONFIG_ID: str = "my-serving-config-id"

# The identifier of the product branch. Retail API allows us to load multiple branches
# 0 is the default. Leaving it empty will always select the default branch
BRANCH_ID: str = "1"

# The identifier of the visitor, as sent to Google Tag Manager
VISITOR_ID: str = None

search_client = SearchServiceClient()

search_request = SearchRequest()
search_request.placement = f"projects/{PROJECT_ID}/locations/global/catalogs/default_catalog/placements/{SERVING_CONFIG_ID}"
search_request.branch = f"projects/{PROJECT_ID}/locations/global/catalogs/default_catalog/branches/{BRANCH_ID}"
search_request.query = "my-query"
search_request.visitor_id = VISITOR_ID

print(search_request)
search_response: SearchResponse = search_client.search()
search_results: List[SearchResponse.SearchResult] = search_response.results

for result in search_results:
    print(result)

Library version: google-cloud-retail 1.2.1
Full error message
Traceback (most recent call last):
  File "/home/mdh/.local/lib/python3.9/site-packages/google/api_core/grpc_helpers.py", line 66, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/home/mdh/.local/lib/python3.9/site-packages/grpc/_channel.py", line 946, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/home/mdh/.local/lib/python3.9/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.PERMISSION_DENIED
        details = "The caller does not have permission"
        debug_error_string = "{"created":"@1640766472.137486780","description":"Error received from peer ipv4:<IP_ADDRESS>:443","file":"src/core/lib/surface/call.cc","file_line":1069,"grpc_message":"The caller does not have permission","grpc_status":7}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/mdh/git/gists/search_service_example.py", line 29, in <module>
    search_response: SearchResponse = search_client.search()
  File "/home/mdh/.local/lib/python3.9/site-packages/google/cloud/retail_v2/services/search_service/client.py", line 435, in search
    response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
  File "/home/mdh/.local/lib/python3.9/site-packages/google/api_core/gapic_v1/method.py", line 142, in __call__
    return wrapped_func(*args, **kwargs)
  File "/home/mdh/.local/lib/python3.9/site-packages/google/api_core/grpc_helpers.py", line 68, in error_remapped_callable
    raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission

Hi @mark-de-haan,
I see you explicitly set GOOGLE_APPLICATION_CREDENTIALS so it seems unlikely, but could you try the following code snippet to confirm the library is using the expected service account and project?
import google.auth

credentials, project_id = google.auth.default()

Are you able to make any other calls to the Retail API successfully using the client library?

Hi, Happy New Year!
Yes I was able to list the catalogs using the same service account.
from google.cloud.retail_v2 import CatalogServiceClient
from google.cloud.retail_v2.services.catalog_service.pagers import \
    ListCatalogsPager

catalog_client: CatalogServiceClient = CatalogServiceClient()
catalogs: ListCatalogsPager = catalog_client.list_catalogs()

for catalog in catalogs:
    print(catalog)

Verifying with the snippet you provided confirmed that the set service account is being used.

Awesome, thank you for checking.
I looked through the cloud.google.com docs for this API and it looks like the feature needs to be enabled per-project:

This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.

https://cloud.google.com/retail/docs/reference/rpc/google.cloud.retail.v2#google.cloud.retail.v2.SearchService
Have you gone through this process already?

Hi,
Yes I went through the process and everything is enabled. I had contact with the retail support team and managed to fix it.
Three things

You should not use project ID but project number
Visitor ID can not be None
I had a typo where I forgot to include the search_request variable inside the search() call

See updated python code below
from typing import List

from google.cloud.retail_v2 import SearchServiceClient
from google.cloud.retail_v2.types.search_service import (SearchRequest,
                                                         SearchResponse)

# The number of the GCP project
PROJECT_NUMBER: str = "my-project-number"

# The identifier of the serving configuration
SERVING_CONFIG_ID: str = "my-serving-config-id"

# The identifier of the product branch. Retail API allows us to load multiple branches
# 0 is the default. Leaving it empty will always select the default branch
BRANCH_ID: str = "1"

# The identifier of the visitor, as sent to Google Tag Manager
VISITOR_ID: str = "test"

search_client = SearchServiceClient()

search_request = SearchRequest()
search_request.placement = f"projects/{PROJECT_NUMBER}/locations/global/catalogs/default_catalog/placements/{SERVING_CONFIG_ID}"
search_request.branch = f"projects/{PROJECT_NUMBER}/locations/global/catalogs/default_catalog/branches/{BRANCH_ID}"
search_request.query = "my-query"
search_request.visitor_id = VISITOR_ID

print(search_request)
search_response: SearchResponse = search_client.search(search_request)
search_results: List[SearchResponse.SearchResult] = search_response.results

for result in search_results:
    print(result)

So this issue can be closed as resolved.
Thanks for the help!


Align python client's predict method with the JS client

Let's make replicate.predict() a thing.
Kinda like this: https://github.com/replicate/replicate-js
Related to https://github.com/replicate/replicate-python/issues/69
cc @bfirsh and @erbridge as we're talking about this IRL.

What if we introduced support for a shorthand format for referencing a version?
So instead of:
replicate.predict(version="27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478", input={...})

We could do:
replicate.predict(version="stability-ai/stable-diffusion@27b93a", input={...})

This is nicer on the eyes and has the added benefit of making the model name discoverable.
Ben I know you're not keen on using abbreviated SHAs, but maybe in the case where you're scoping it to a specific model your concerns about it go away?


Race condition when multiple requests hit the same worker at the same time

Given a situation when multiple requests hit the same worker at the same time, a race condition is reached and the results of the multiple requests are overlapped, generally each request gives the same output, each request performs a multi exec operation

@marvel308 maybe you can use something like redlock (so you don't have to introduce sth new to the stack). each request upon writing to redis must require lock beforehand.

@marvel308 Could you provide your code to reproduce the issue?

I'm closing this. Feel free to reopen it with details.


Animation Editor: Red Cursor Won't Move.

When I try and move the red cursor to animate at different time points; the cursor won't move. It just locks in at the time: 0.

Any idea how to reproduce this? If you update your editor does this still happen?

I just got a fix for it. Go to SETTINGS then click on "Line Increment". There you can type in how many seconds and once you hit "Okay" you'll be able to move the cursor.


Missing LegacyVersion causes crash with packaging>=0.22

This started failing in CI. Looks like LegacyVersion has been removed in packaging==0.22.
Instructions for dealing with the breakage are found here. Probably using Version should work? Can't remember off the top of my head why we use LegacyVersion to begin with..

Fixed, to be merged into dev.


Batch Requests API

Is there a batch requests example?
Is the API supported?
If not how can I help?

Looks like it. See the docs on Batches.

Thanks.

If not how can I help?

Even though crate implements batch APIs, there is no self contained example in examples/, if you'd like to contribute that would be a good addition. Please feel free to reopen this issue or create a new one.


Map IAM users to kubernetes groups

I have issues
I'm submitting a...

[ ] bug report
[x] feature request
[ ] support request - read the FAQ first!
[x] kudos, thank you, warm fuzzy

What is the current behavior?
Currently we map just particular AWS users to aws_auth configmap what is not the best as in many organization we want rather manage permissions via groups mapped to roles.
Currently I am defining on input AWS groups which are translated to users and then creating a users in aws-auth.
On input I require list of groups which users I want to add to EKS, then map user > kubernetes group (group creation is out of scope of this code). As we need some admin group if this is missing in input I am assuming that first group from group list will be additionally in  system:masters group (to avoid situation when nobody will have this group assigned)
........
    - "groups":
      - "platform-group"
      - "system:masters"
      "userarn"<EMAIL_ADDRESS>      "username"<EMAIL_ADDRESS>........

If this is a bug, how to reproduce? Please include a code sample if relevant.
N/A
What's the expected behavior?
Are you able to fix this problem and submit a PR? Link here if you have already.
Yes, but I want to discuss approach.
I have currently some dirty code:
https://github.com/daroga0002/terraform-aws-eks/blob/a6ef95fb2674f2c58e804b536fddc195a648c834/examples/iam_user_groups/main.tf#L162-L185
but probably better it will be fitting as submodule (off course it require some code cleanup, simplicity and etc.)
But do you think submodule can be good path?
@barryib
Environment details

Affected module version: n/a
OS: n/a
Terraform version: n/a

Any other relevant info
I think this is highly desired feature

ping

@barryib Am I correct in thinking that to achieve this we would need support for it on EKS first, and just later on the module?

@daroga0002 Sorry, but I don't understand very well what you want do. Do you want to map IAM role to Kubernetes groups ?

Currently there is no such feature on EKS to map AWS IAM group into EKS group, as aws-auth config map looks like here:
apiVersion: v1
data:
  mapRoles: |
    - rolearn: <arn:aws:iam::111122223333:role/eksctl-my-cluster-nodegroup-standard-wo-NodeInstanceRole-1WP3NUE3O6UCF>
      username: <system:node:{{EC2PrivateDNSName}}>
      groups:
        - <system:bootstrappers>
        - <system:nodes>
  mapUsers: |
    - userarn: <arn:aws:iam::111122223333:user/admin>
      username: <admin>
      groups:
        - <system:masters>
    - userarn: <arn:aws:iam::111122223333:user/ops-user>
      username: <ops-user>
      groups:
        - <system:masters>
       ```

 So we in `mapUsers` we must map a AWS IAM user to username and group on EKS.

 Currently I am doing this on my environment:

locals {
Create map with username as key and values fetched from data.aws_iam_group data source
users = {
for k, v in distinct(flatten(data.aws_iam_group.eks_aws_groups[*].users)) : v.user_name => v
}
Create map with key username and values containing all groups which user belongs
group_membership = transpose({
for index, b in var.eks_aws_groups : b => data.aws_iam_group.eks_aws_groups[index].users[*].user_name
})
Create map similar to https://github.com/terraform-aws-modules/terraform-aws-eks/blob/81ded922c811ca4b1f1ca299d083b367698e7c69/examples/basic/variables.tf#L40-L51
eks_users_mapping = values({
for k, v in local.group_membership : k => {
userarn  = lookup(local.users, k, "empty").arn
username = k
groups   = contains(v, (contains(var.eks_aws_groups, var.eks_aws_root_group) ? var.eks_aws_root_group : var.eks_aws_groups[0])) ? concat(v, ["system:masters"]) : v
}
})
}

where local variable is passed to module:

module "eks_cluster" {
create_eks = var.eks_create
https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/13.2.1
source          = "terraform-aws-modules/eks/aws"
version         = "13.2.1"
cluster_name    = "eks-${var.environment}"
subnets         = module.vpc.private_subnets
vpc_id          = module.vpc.vpc_id
manage_aws_auth = true
enable_irsa                          = true
.................................
map_users                            = local.eks_users_mapping
}

@daroga0002 Thanks for your explanation. I understood. I never used IAM users/groups pour human access management (I use Active Directory or okta to manage them), that’s why it took me some time to understand.
BTW, I think the real solution should come from AWS itself (as @damdo mentioned it). There are already issues tracking this feature. Please see:

https://github.com/kubernetes-sigs/aws-iam-authenticator/issues/176
https://github.com/aws/containers-roadmap/issues/150

I the meantime, you have 2 options:

Use IAM users as you described or
Use IAM Roles: Allow your groups to assumes AM roles, then map those IAM roles in aws-auth. With this, you don't need to re-apply this module anytime someone comes or leaves your team/company. I think this the best way to solve your problem right now.

As for introducing IAM users mapping from IAM groups in this module, I think it's beyond the scope of this module because we don't want to give an opinionated way to manage users. I fear that it'll become a source of problem later, as it won't suit everyone. We can probably add this in a FAQ, to let them know how to handle this by their own if they really need it.

sure, thanks for input.
Closing issue


Compatibility IE 11

Hello.
There seems to be an error with later versions of the library on IE 11.
The error shown is "SCRIPT 5022 : argument 'elem' must be a valid HTML node"
The file used is the right one labelled with ".ie.js" at the end and under the directory dist.
Any hint on what i might be doing wrong? Any help you could bring would be much appreciated.

i have exactly that same issue too...


What defines the filename of the saved file?

I'm having an issue:
I can't figure out the logic behind file naming, sometimes it is file ID, sometimes file name sometimes who knows what.
<EMAIL_ADDRESS><EMAIL_ADDRESS>Client and Server related
Description of the problem:
After the years on meteor I try to migrate the content to other system.
When I try to export media and import them back to new CMS I can't figure out how to locate the correct files with what I see in the database and is in reality on the disk.
here is a specific image record:

{
    "_id" : "249wvKAcn28eh9XvS",
    "name" : "antonin_jirat_-_stan.jpg",
    "extension" : "jpg",
    "path" : "/data/11159_antonin_jirat_-_stan.jpg",
    "meta" : {
        "width" : NumberInt(800),
        "height" : NumberInt(536)
    },
    "type" : "image/jpg",
    "size" : NumberInt(35739),
    "userId" : "Jo4CoqtwZjx5P5g8D",
    "versions" : {
        "original" : {
            "path" : "/data/11159_antonin_jirat_-_stan.jpg",
            "size" : NumberInt(35739),
            "type" : "image/jpg",
            "extension" : "jpg",
            "meta" : {
                "width" : NumberInt(800),
                "height" : NumberInt(536)
            }
        },
        "thumbnail" : {
            "path" : "/data/thumbnail-249wvKAcn28eh9XvS.jpg",
            "size" : NumberInt(6340),
            "type" : "image/jpg",
            "extension" : "jpg",
            "meta" : {
                "width" : NumberInt(419),
                "height" : NumberInt(281)
            }
        }
    },
    "_downloadRoute" : "/data",
    "_collectionName" : "Images",
    "isVideo" : false,
    "isAudio" : false,
    "isImage" : true,
    "isText" : false,
    "isJSON" : false,
    "isPDF" : false,
    "_storagePath" : "/data/11159_antonin_jirat_-_stan.jpg"
}

first thing what you see is that thumbnails have different naming pattern, once the file name is used once the ID.
What is the difference between "path" and "_storagePath", they are same , sometimes differ?
Now when I check the folder with images the real image name is hard to guess it might be a ID or name related.. what I do use now is the "path" value but I'm not sure if that is the correct value I should be using in the migration process. When I use "path" I'm able to locate and find some of the files, not all though.
The "path" does not seems to be always right, as when I try to find the file by name or ID sometimes I cannot find it amongst the static data. It is just not there, yet the app shows it as it can be seen from the link/s, like this one:
https://jlbjlt.net/data/Images/249wvKAcn28eh9XvS/original/249wvKAcn28eh9XvS.png
https://jlbjlt.net/data/Images/249wvKAcn28eh9XvS/original/249wvKAcn28eh9XvS.jpg
https://jlbjlt.net/data/Images/249wvKAcn28eh9XvS/original/249wvKAcn28eh9XvS.pdf // ?¿
(see the file type does not matter, how come ?¿)
That is the same image from the json above.. see different names based on the attachment ID.. I guess the name here is just a dynamic route path that gas nothing to do with the real location of the file, little bit too dynamic to my taste.
This is how I made the attachment path at that time when I made the app
Meteor.settings.public.siteUrl +  obj._downloadRoute + '/' + obj._collectionName + '/' + obj._id + '/' + size + '/' + obj._id + '.' + obj.extension;
But again, what is the real location of the file, meaning what value in the db record I can trust that points to a real file on the disk?
Because there is no such file on the disk as /data/antonin_jirat_-_stan.jpg or /data/249wvKAcn28eh9XvS.jpg(png, ..) yet the picture is served out to client on https://jlbjlt.net/data/Images/249wvKAcn28eh9XvS/original/249wvKAcn28eh9XvS.png.

I know, why.. some data are executables.
meaning they are not 2Ww9X6ZNEp3jXuPCd.png but ./2Ww9X6ZNEp3jXuPCd.png
Why some of the static data are saved as executables while others are not. I don't know.
At least now I know that the files exists.
If you have large files and need them to be regular files again:
# check their executables (if you have a looong list of files)
find . -type f -perm -u+x -ls
#make them normal again
find . -type f -perm -a=x

you might play with permissions a bit afterwards.
This drove me nuts for days.

Hello @twentyfortysix
I see this issue is closed, so here's couple of things for your reference:

Default naming function names file after fileId
Control behaviour of naming function via setting namingFunction hook on FilesCollection definition
For changing how file named during download use interceptDownload hook
See how files named upon download by default here

hope that helps


Video chat does not work on Android tablet / phone

I embedded the space widget into my website. I tried to make a video call. This works well on my MacBook using Chrome.
I tried the same on my Samsung Galaxy S7 and my Samsung Galaxy Tab A (2016) using Chrome again. While I see myself on the tablet/phone, does the counterpart only hear my voice, but not see any video. I couldn't find any suspicious log in the chrome devtools.

@sueess thanks for reporting, we are currently only developing and testing against desktop browsers, but mobile browser support is on our near timeline.


AR button appearing on browser that does not support getUserMedia

Description
The AR button is appearing on a browsers that doesn't support getUserMedia. It's my understanding the AR button is only supposed to appear if it is supported by the device and browser. I'm specifically using the metamask browser on a oneplus 7pro.
This issue is replicable on the examples. https://modelviewer.dev/examples/augmentedreality/index.html#customButton
Sorry for no screenshots of console, not sure how to access that on metamask browser.
Live Demo
https://modelviewer.dev/examples/augmentedreality/index.html#customButton
Version
<EMAIL_ADDRESS>Browser Affected

[ ] Chrome, version: xx.x.xxxx.xx
[ ] Edge
[ ] Firefox
[ ] IE
[ ] Safari
[ x] Metamask, version: x1.0.11 (46)

OS

[x] Android Oxygen OS 10.3.8.GM21AA
[ ] iOS
[ ] Linux
[ ] MacOS
[ ] Windows

I presume this happens on iOS as well but do not have a device to confrim
AR

[ x] WebXR
[x ] SceneViewer
[ x] QuickLook

I think this issue would be better filed on Metamask.


tar/export: Do checksum → string a bit smarter

I was working on this area of code for a previous PR, and I almost
made a refactoring that shared the hexbuf.  I think the stack
allocation here was a premature optimization.  Let's just heap
allocate - modern allocators are fast with thread-local
storage and caches etc.  The C side allocates a ton anyways.
However there is an optimization we can make here - by passing
ownership of the checksum string into the recursive dirtree walk,
we can drop it before recursing.   Now there's only one heap
allocation there instead of it being O(depth).

I also did https://github.com/KokaKiwi/rust-hex/pull/66


Can you provide the full transaction ID? Was the transaction generated by ord?


feat: upgrade to ink v4

[x] Bump all dev deps to latest version
[x] Bump ink and ink-related component to v4 compatible version
[x] Make this package a pure ESM package

LGTM


use shutdownNow() instead of shutdown()

shutdown() does not prevent execution of previously submitted tasks, which can cause that AsyncResolver.shutdown() does not really shutdown all tasks -> memory leak

see https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html#shutdown() for effects of shutdown() and shutdownNow()

This solved the same issue in our shared tomcat environment is there any chance of it being merged?

I built my own release containing this fix and we are using it in our project. I don't know why it is not being merged. If you need the release containing the fix and you don't want to build it on your own just contact me.

Hi @klues . If it possible give me please credentials for your eureka realise fix. Thanks.

see https://github.com/klues/eureka/tree/jar-containing-memory-leak-fix/bin for my built release containing this fix

@klues thanks.

@klues thanks for the contrib.


Add flags to ebcli txs, queries

Closes: https://github.com/cosmos/peggy/issues/171

For contributor use:

[x] Targeted PR against correct branch (see CONTRIBUTING.md)
[x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
[x] Code follows the module structure standards.
[ ] Wrote unit and integration tests
[x] Updated relevant documentation (docs/) or specification (x/<module>/spec/)
[ ] Added  relevant godoc comments.
[x] Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
[x] Re-reviewed Files changed in the Github PR explorer

For admin use:

[x] Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
[x] Reviewers assigned
[ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

Pushed revisions and rebased to master.


Mass custom configs

This is the documentation update for the upcoming changes to the MASS module.
@patmmccann please have a look and let me know if this is what you had in mind, thanks.

Largely yes,  looking forward to the code.
One hope is that there could be multiple deal patterns simultaneously configured.

@cciocov - please fix conflicts.
This was merged with PBJS 4.35


docker pull fails: manifest not found

I can't pull anymore. Problem:
docker pull hardware/mailserver
Using default tag: latest
Error response from daemon: manifest for hardware/mailserver:latest not found

Other images from docker hub working fine.
Thanks for help

Hi, it's 1.1-latest.
You can check the other tags here:
https://hub.docker.com/r/hardware/mailserver/tags/

mmm I remember their was a :latest at some point.
thanks!

Don't use 1.1 version before to do this : https://github.com/hardware/mailserver/wiki/Migrating-from-1.0-stable-to-1.1-stable


Enable more customization of requests usage

As a user, I want to use geoserver-rest with a GeoServer instance that provides self-signed SSL certificates.
As a user, I would like to customize the functions using the requests package to set verify=False, see docs.
A possible solution would be to accept a **kwargs in the user-facing APIs, e.g. get_featurestore
https://github.com/gicait/geoserver-rest/blob/d07ee027badc00c3a8ba968131b91fd7e5d0e284/geo/Geoserver.py#L2050
and pass those **kwargs to the requests call https://github.com/gicait/geoserver-rest/blob/d07ee027badc00c3a8ba968131b91fd7e5d0e284/geo/Geoserver.py#L2062
so that users could do get_featurestore(..., verify=False).

Hi @fleimgruber, I like the idea. Feel free to raise the PR if you want.

that sounds great