Moving to Vite from Create-React-App and configuring ESLint and Jest

Work in progress...
Moving from Create-React-App to Vite, but needed to configure Jest and ESLint separately.
Tests are currently revealing a lot of problems, but it might be due to version mismatches..
Work continues, but here for visibility and discussion.

Currently build creates the following bundles:
vite v4.4.2 building for production...
✓ 7026 modules transformed.
build/index.html                        1.00 kB │ gzip:   0.49 kB
build/assets/no-image-8357d694.png     15.80 kB
build/assets/logo-b4500173.png         74.85 kB
build/assets/index-1fa73d97.css         0.15 kB │ gzip:   0.14 kB
build/assets/index-f34bef88.js         79.27 kB │ gzip:  21.56 kB
build/assets/react-cf7ffb75.js        355.08 kB │ gzip: 110.22 kB
build/assets/vendor-3ace2543.js     1,136.06 kB │ gzip: 344.80 kB

I started to split them, as can be seen with react and vendor, but the latter is still too big...

Separated Material UI (most of it):
vite v4.4.2 building for production...
✓ 7026 modules transformed.
build/index.html                      1.08 kB │ gzip:   0.51 kB
build/assets/no-image-8357d694.png   15.80 kB
build/assets/logo-b4500173.png       74.85 kB
build/assets/index-1fa73d97.css       0.15 kB │ gzip:   0.14 kB
build/assets/index-82a0392d.js       79.29 kB │ gzip:  21.55 kB
build/assets/react-4a2fe1f5.js      354.40 kB │ gzip: 110.06 kB
build/assets/material-dcbda5c5.js   443.40 kB │ gzip: 128.16 kB
build/assets/vendor-ecc0f051.js     692.09 kB │ gzip: 216.18 kB

I will leave the build like this, unless some comments arrive.
The used libraries could be evaluated once the UI redesign begins...

@pashidlos about the Dockerfile, are those all chown commands really needed as the image should have the right user already?

@pashidlos about the Dockerfile, are those all chown commands really needed as the image should have the right user already?

not sure if it's still valid now
initially it was a problem with default user in nginx image

@paazmaya create release after it's merged to build prod image
https://github.com/Visual-Regression-Tracker/frontend/releases

@pashidlos now Codacy is stuck, previously it was not finding dependencies... What can we do?

@paazmaya I guess it failed due to huge commit number
I started build manually https://app.codacy.com/gh/Visual-Regression-Tracker/frontend/issues?bid=36499867
anyway, this is already complex PR so I would move out fixing code style issues separately
don't forget to squash commits on merge


WP 3.5.1 F Run basic tests on a small ~5 patch region of the SXDS field.

As agreed at 12/MAR/21 planning process meeting this task has been completed and hence this ticket can be closed.


Session Dead

After Creating the http link, I call the link from the browser but I session Dead right after some second.
I change the expires date also, but still same result any help please. How to get persistence stager

I too, i've the problem.
Attack MSHTA isn't working !

See #20


Add support for integer function SVG colors: rgb(int, int, int)

This pull request add support for integer function SVG colors in the format rgb(int, int, int).

Hello Clément,
Thanks for your pull request. It's currently producing a couple of compiler warnings:
https://travis-ci.org/pocketsvg/PocketSVG/builds/392116796#L537
Could you please fix those? I'll be happy to merge afterwards.

merged via https://github.com/pocketsvg/PocketSVG/commit/708c8b49be819d0f36024761d9d0489342c7654f


CI: steampipe hangs on schemas

I've gotten alerts of the CI failing after https://github.com/nextstrain/status/pull/4.
Seems like the CI jobs intermittently hangs on steampipe schemas:

March 08, 2024, 1:43AM PST
March 09, 2024, 4:51AM PST
March 12, 2024, 10:29PM PDT
March 12, 2024, 11:26AM PDT - I noticed this hanging, so I manually cancelled the workflow.

They all had similar logs that show Waiting for Steampipe plugin schemas to be ready… until the job times out at GitHub Action's 6hr limit.
mkdir -p build
./steampipe-psql --quiet --no-psqlrc --no-align --tuples-only --set=ON_ERROR_STOP= < pathogen-workflows.sql > build/pathogen-workflows.json
Using PGHOST=localhost PGPORT=9193 PGUSER=steampipe PGDATABASE=steampipe
Steampipe Postgres service not available; starting it…
Steampipe service is running:

Database:

  Host(s):            <IP_ADDRESS>, ::1, localhost
  Port:               9193
  Database:           steampipe
  User:               steampipe
  Password:           ********* [use --show-password to reveal]
  Connection string:  postgres://steampipe@<IP_ADDRESS>:9193/steampipe

Managing the Steampipe service:

  # Get status of the service
  steampipe service status

  # View database password for connecting from another machine
  steampipe service status --show-password

  # Restart the service
  steampipe service restart

  # Stop the service
  steampipe service stop

Waiting for Steampipe plugin schemas to be ready…
Waiting for Steampipe plugin schemas to be ready…
Waiting for Steampipe plugin schemas to be ready…
Waiting for Steampipe plugin schemas to be ready…
Waiting for Steampipe plugin schemas to be ready…
(...)
Error: The operation was canceled.

Haven't seen this issue since a run on April 2, maybe it's no longer an issue 🤞

Damn, I might have jinxed it (hanging workflow). I shouldn't have said anything.

Odd. As a workaround for now, we could impose a workflow/job timeout of 10 minutes? 20 minutes? or similar and not let things hang for 6 hours.

Closing as this hasn't been observed for a while now and we have the workaround of a GitHub-level workflow timeout thanks to #11.


notification_endpoint is null error

Getting an error when running the solid webhook demo
To reproduce ;
Run the CSS in memory fs mode
Register for a new pod,
Click the login and then Create document
Click Subscribe and the error is thrown

The subscribe endpoint code looks like this
app.get("/subscribe", async (req, res) => {
  const authSession = await getAuthSession(req);
  console.log(authSession);
  try{
    const { unsubscribeEndpoint } = await subscribe(
    `${POD_ORIGIN}${RESOURCE_CONTAINER}`,
    `${LOCAL_ORIGIN}/webhook`,
    { fetch: authSession.fetch })
    unsubscribeUris.push(unsubscribeEndpoint);
  }catch(error){
    console.log(error);

  }
  console.log("Subscribed to Resource");
  renderDashboard(res);
});

The undefinable value in the error is the notification_endpoint URL, I checked the notification config and everything looks okay
{
      "comment": "The WellKnown Builder for base notifications",
      "@id": "urn:solid-server:default:BaseNotificationWellKnownBuilder",
      "@type": "NotificationWellKnownBuilder",
      "args_baseUrl": { "@id": "urn:solid-server:default:variable:baseUrl" },
      "args_notificationEndpointPath": "gateway"
    },

If it helps this is the configuration that I used for the demo application example:
const PORT = 3001;
const LOCAL_ORIGIN = `http://localhost:${PORT}`;
const POD_ORIGIN = `http://localhost:3000`;
const RESOURCE_NAME = "test.ttl";
const RESOURCE_CONTAINER = "/webhookPod/profile/";
const RESOURCE_PATH = `${RESOURCE_CONTAINER}${RESOURCE_NAME}`;

This library only works with the experimental webhook implementation in this pull request: https://github.com/solid/community-server/pull/1080. A vanilla version of CSS will not work with it. Also, note that webhooks on Solid are very experimental and will change in the future.


Invalid IP in abuse-ch-threatfox

This is an invalid IP: https://github.com/CriticalPathSecurity/Zeek-Intelligence-Feeds/blob/master/abuse-ch-threatfox-ip.intel#L18

Working on a filter routine for the Abuse-CH feeds now.

The invalid IP of "143.404.146.87" is part of the source feed from Abuse-CH.  However, it has been removed and will be filtered as we continue to pull the Threatfox feed each hour. Thank you for letting me know!


update misc SSL attributes

* remove references to long-deprecated dedicated certs (replaced by `advanced`)
* update the list of allowed certificate authorities
* fix some of the custom hostname docs copy

i've swapped these two resources over to autogenerated documentation but in doing so, uncovered that we don't have all the fields documented. up to you if you'd like to go through and add these before we merge. i'm fine either way.
something else that is problematic here is that we're using a TypeMap for the ownership_verification and ownership_verification_http nested objects. using a TypeMap pretty much means we don't have control over the keys and as such, can't document them automatically (among other internal issues). we may want to introduce a [breaking change for 4.x]https://github.com/cloudflare/terraform-provider-cloudflare/issues/1646) to add this to the schema as a TypeList instead.

Oh cool I was curious about the 2 different docs. I can file a followup to improve the documentation more, I just fixed this since it was noticeably wrong :)


.listfiles giving a null exception (in app error could not read images)

Hi Shubham,
I wanted to test the efficiency of facenet tf lite model so i tried running your app but it always gives the toast as " could not read images make sure you have files according to readme "
I rebuild your app and added the google services file, i added all the READ/WRITE permissions and i found that imageDir give the proper director but imageDir.listfiles return a null exception. I have directories in the images folder as specified but it is unable to list them

The imageDir.listFiles() method would throw a NullPointerException maybe because the imageDir is itself null. As you said you have created the images directory correctly, make sure you have created this directory in the device's internal storage and not the external storage.

You may rebuild the project to check if the issue is solved. See this commit.

I have no external sd card in my device, filepath which received in logcat was /storage/emaluated/0/images
i created  folders in it as jeff_bezos and tested if it was a valid directory with isdirectory() it returned a true value, so I am not sure why .listfiles() method is returning null value

Okay i will try to rebuild it again

I tried the latest commit, still facing the same issue, I have added the logs for directory check and file path
 val imagesDir = File( Environment.getExternalStorageDirectory()!!.absolutePath + "/images" )
            val imagesSubDir1 = File( Environment.getExternalStorageDirectory()!!.absolutePath + "/images/vedant" )
            Log.w("fullpath", "" + imagesDir)
            if(imagesSubDir1.isDirectory){
                Log.w("fullpath", "yes" )
            }
            val imageSubDirs = imagesDir.listFiles()
            Log.w("fullpath", "" + imageSubDirs)
            if ( imageSubDirs == null ) {
                Toast.makeText( this , "Could not read images. Make sure you've have a folder as described in the README" ,
                        Toast.LENGTH_LONG ).show()
                return

Logcat output:
2020-09-17 21:34:51.211 16013-16013/com.ml.quaterion.facenetdetection W/fullpath: /storage/emulated/0/images
2020-09-17 21:34:51.211 16013-16013/com.ml.quaterion.facenetdetection W/fullpath: yes
2020-09-17 21:34:51.211 16013-16013/com.ml.quaterion.facenetdetection W/fullpath: null

@vedant-creator, thanks for the logs. I'll go through the issue once again and revert back to you. Also, please share your device's Android version so that I can resolve any issues with the API quickly.

I am using Android 10
Thank you for the efforts i hope the issue get solved

Hey @shubham0204 thanks for your support
I have solved the issue, in android 10 or API level above 29
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
android:requestLegacyExternalStorage="true"
needs to be added in manifest file


Need for FS shim

In the rescript-lang site, the fs api appears to only be used by getStaticProps implementations. I never understood why the empty shim is needed if nextjs takes care of compiling and extracting getStaticProps for the node environment. Consider adding more documentation to next.config.js.

There are some instances where code is getting pulled into e.g. the blog. We recently refactored a lot of code because we switched to a full mjs setup, so I am not even sure if this is still relevant anymore. Will need to try.


Project List JSON Specification

The specification of all JSON items retrieved when making a request to JAMA's REST for a user's list of projects.
Array of primitive project items:
  "title": "Project Array",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": { "type": "integer"
    },
    "name": { "type": "string" }
    },
    "required": ["id", "name"]
    }
  }```

Is there no pull request associated with this issue?


paho-mqtt-c: 1.3.9-2 in 'galactic/distribution.yaml' [bloom]

Increasing version of package(s) in repository paho-mqtt-c to 1.3.9-2:

upstream repository: https://github.com/eclipse/paho.mqtt.c.git
release repository: https://github.com/nobleo/paho.mqtt.c-release.git
distro file: galactic/distribution.yaml
bloom version: 0.10.7
previous version for package: null

As per request here: https://github.com/nobleo/paho.mqtt.cpp-release/issues/1

Holding for Galactic Sync

Propose to hold for this as well: https://github.com/ros/rosdistro/pull/30552#issuecomment-904436518

Good to go now.


命令行光标错位

A problem occurred using the command line (zsh)：Cursor misalignment，“｜” this is Cursor
~/Desktop/MyGitee/Public_demo(mas|ter*) »
Restarting vscode and reinstalling it won't work

~/Desktop/MyGitee/Public_demo(mas|ter*) »

光标固定在了分支上，重启vscode、重新安装都不好使

感谢您创建此问题！
然而，由于您没有使用英语，我们很难进行处理。如果可能，请您将此问题描述修改为英文。请您直接编辑此问题，不要提交回复或新问题。
请注意，机器翻译服务通常无法处理用于讨论软件问题所需的技术性语言，所以我们推荐您寻找一位熟悉相关技术的人来协助翻译。
如果您无法做到，没有关系。此问题已经被标记为需要翻译，等待社区成员志愿进行翻译。

Thanks for creating this issue!
Unfortunately, as the description is not in English, it's hard for us to work on. If possible, please edit the original issue to be in English.
In our experience, automatic translation services are not able to handle the technical language needed to effectively communicate about software issues, so we recommend finding a human translator who is familiar with our technology to help.
Otherwise, we have marked this as needing translation and a community member may be able to help out.

Please provide a screenshot or a gif illustrating the problem (attaching images won't work via email, you need to go to github.com). See this wiki page for more general info on how to report actionable terminal issues.
/label info-needed terminal

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Create RS <-> JDK9 bridge jar

Reactive Streams are available in JDK9 inside: java.util.concurrent.Flow.
Providing converters between org.reactivestreams.* and java.util.concurrent.Flow.* would be quite useful.
I propose to add a subproject/jar to the reactive streams project.

Sounds good but IDE support for JDK 9 is limited, at least Eclipse can't properly use a JDK 9 installment. Same may be true with travis: no oraclejdk9 yet therefore some sudo trickery may be required.

@akarnokd That's a good point, it ought to be possible to install the jdk9 from java.net and compile-package-publish locally.

Figuring out how to use JDK9 with gradle may be tricky as well, there is some support coming https://github.com/gradle/gradle/blob/master/design-docs/jdk9-support.md though I wasn't able to make it work in the hour I tried now, needs some more research how to use it.

I wonder if sbt will be able to use jdk9 OOTB.

I wonder if sbt will be able to use jdk9 OOTB.

Currently no.
And it's a bit more than "using jdk9", we need to be able to compile module-info.java into module-info.class. Here's a sample project and how to use javac to compile: https://github.com/ktoso/jdk9-module-sandbox

Good idea we already do that with reactor and it actually passes the normal TCK: Publishers.convert(Flow.Publisher) (not sure the other way is that useful). That would be great to get that in some common jar indeed. However I failed a few tests with SubmissionPublisher so worth having a common look!
Sent from my iPhone

On 2 Nov 2015, at 8:43 p.m., Viktor Klang (√<EMAIL_ADDRESS>wrote:
Reactive Streams are available in JDK9 inside: java.util.concurrent.Flow.
Providing converters between org.reactivestreams.* and java.util.concurrent.Flow.* would be quite useful.
I propose to add a subproject/jar to the reactive streams project.
—
Reply to this email directly or view it on GitHub.

However I failed a few tests with SubmissionPublisher so worth having a common look!

Is there something wrong with SubmissionPublisher?

Here is a single utility class that does the conversions.

Nice one, David!
It would be useful having the converters also introspected the parameters
to avoid nesting.
if (rsPublisher instanceof Flow.Publisher) return
(Flow.Publisher)rsPublisher;
else …
On Wed, Nov 11, 2015 at 4:58 PM, David Karnok<EMAIL_ADDRESS>wrote:

Here is https://gist.github.com/akarnokd/8f1a3e31882c076c704f a single
utility class that does the conversions.
—
Reply to this email directly or view it on GitHub
https://github.com/reactive-streams/reactive-streams-jvm/issues/294#issuecomment-155825963
.

--
Cheers,
√

If one implements both APIs, it should show up in the type and there is no need to call the conversion methods.

toFlow(toReactive(flowA)) should return flowA
--
Cheers,
√
On 14 Nov 2015 15:21, "David Karnok"<EMAIL_ADDRESS>wrote:

If one implements both APIs, it should show up in the type and there is no
need to call the conversion methods.
—
Reply to this email directly or view it on GitHub
https://github.com/reactive-streams/reactive-streams-jvm/issues/294#issuecomment-156702785
.

In this case, toFlow has to check if Publisher is the bridge's own type, look into it and extract the original flow. This is not available with the current lambda form. Since both wrappings are really thin, it doesn't really matter if one goes instanceof + cast or let the JIT inline the calls.

Does the HotSpot JIT inline N-level nestings? And how would it trace this
when you pass the instance around?
On Sat, Nov 14, 2015 at 3:54 PM, David Karnok<EMAIL_ADDRESS>wrote:

In this case, toFlow has to check if Publisher is the bridge's own type,
look into it and extract the original flow. This is not available with the
current lambda form. Since both wrappings are really thin, it doesn't
really matter if one goes instanceof + cast or let the JIT inline the calls.
—
Reply to this email directly or view it on GitHub
https://github.com/reactive-streams/reactive-streams-jvm/issues/294#issuecomment-156708880
.

--
Cheers,
√

By default, HS inlines something like 20 levels deep as far as I remember but this can be increased with command line parameters. But why would you want to have such pass-through wrap-unwrap in a codebase? I think the dev should recognize this as being unnecessary and simply not do it.

Having written a couple of these converters in the past, you'll be amazed
how people use them. Having things end up like a N-level nested data
structure which could be prevented with a simple branch is a cheap price to
pay in order to avoid some pretty weird error reports. :)
On Sat, Nov 14, 2015 at 8:27 PM, David Karnok<EMAIL_ADDRESS>wrote:

By default, HS inlines something like 20 levels deep as far as I remember
but this can be increased with command line parameters. But why would you
want to have such pass-through wrap-unwrap in a codebase? I think the dev
should recognize this as being unnecessary and simply not do it.
—
Reply to this email directly or view it on GitHub
https://github.com/reactive-streams/reactive-streams-jvm/issues/294#issuecomment-156738411
.

--
Cheers,
√

@akarnokd It is needed,as you can take a look at the ForkJoinPool 's code.

Fine, I've updated the bridge to do the checks, casts and unwrapping if necessary.

@akarnokd Excellent! Thank you

@akarnokd Would you like to contribute it to reactive-streams-jvm?

Sure.

Fantastic! Would you mind opening a PR?

I know very little about Gradle, subprojects or how to setup a JDK 9 environment.

Same here, but having a PR means that more people can help out.
Collaborating via Gists is slightly less fun :)
On Sat, Nov 21, 2015 at 10:15 PM, David Karnok<EMAIL_ADDRESS>wrote:

I know very little about Gradle, subprojects or how to setup a JDK 9
environment.
—
Reply to this email directly or view it on GitHub
https://github.com/reactive-streams/reactive-streams-jvm/issues/294#issuecomment-158681763
.

--
Cheers,
√

I think a easier and more reliable would be create another jar for java 9 which will extend the org.reactivestreams.* interfaces to their equivalent java.util.concurrent.Flow.*
I can create a PR with this change if you agree.

There is already a bridge PR waiting for Java 9/Travis/Gradle to be operational.
Also implementing both interfaces at the same time causes ambiguities, plus requires internal bridging if you don't want to duplicate logic.
interface MixPublisher<T> extends
org.reactivestreams.Publisher<T>, java.util.concurrent.Flow.Publisher<T> { }

interface MixSubscriber<T> extends
org.reactivestreams.Subscriber<T>, java.util.concurrent.Flow.Subscriber<T> { }

MixPublisher<T> p = ...
MixSubscriber<T> s = ...

p.subscribe(s);
 ^
  ambiguous overload

I already took a look however add the bridge IMO will make things more complicate. My idea is make the reactive-streams exchange the java9 classes, like
interface Publisher extends Flow.Publisher {}
and release a new module with org.reactivestreams:reactive-streams-java9
In this way we are not going to have ambiguities and it will allow all current implementation compatible with java 9 if running in java 9 environment.
The downside it will be the dependency management.

@rotilho That solution will not fly: jigsaw will choke on it and it will create classpath-order issues.

Awesome to be able to close this issue, @akarnokd! :)


IndexError: index -1 is out of bounds for axis 0 with size 0

I followed the instructions to train the model using CSV files but I keep getting  IndexError: index -1 is out of bounds for axis 0 with size 0 in line 240 of csv_eval. When I printed the true positives and false positives, they were empty arrays. I can't figure out the problem as I used https://github.com/martinzlocha/anchor-optimization to optimize the anchor configuration for my dataset.
I am running the code on the Tsinghua-Tencent 100k traffic sign benchmark. I augmented the data before sending it to the model because I needed class-wise augmentation to generate enough training images.  Right now, I have around 800-1800 images per class and I have 33 classes.

The error was due to the true positives and false positives lists being empty which was caused by not optimizing the anchor configuration.

hey @nikeshdevkota how did you resolve this issue please?
I get this error:
csv_eval.py", line 240, in evaluate
print("Precision: ",precision[-1])
IndexError: index -1 is out of bounds for axis 0 with size 0

Could you please explain more about it?
I'm having the same error.


Update style guide for tr

@selimsumlu there are some trailing spaces in the doc to fix. See the report here.


Make VQE (example MaxCut) split in several batches for a run on real backend so that your credits "recharge" between batches

Running a max-cut optimisation (with only 4 edges ) using a vqe based on the aqua tutorial. I tried it with a simple noise model and qasm simulator. I started logging and VQE needs many evaluation cycles. The result is what i expected on a qasm simulator without noise. However with noise the VQE doesn't converge. On a real backend i ran out of credit, so first on the simulator. But what is the best setting?
With the Nealer-Mead optimizer the algorithm gives a working solution.
max_cut_noise.zip
I would like to run this on a real backend. Is it possible to let VQE split the algorithm in seperate or spaced batches and combine the measurements at the end.

I am not sure I understand your question correctly if you are asking how to batch the circuits required by the optimizer, there is one flag you can use to batch the circuits needed for N evaluations within one iteration into one job (max_evals_grouped). You can set this number to the number of evaluations required by the optimizer in one iteration.
https://github.com/Qiskit/qiskit-aqua/blob/master/qiskit/aqua/algorithms/adaptive/vqe/vqe.py#L92
However, please note that Aqua might split your jobs depends on the limitation of the real device. E.g., if max_experiments of the backend is 75 and you have 100 circuits in total. Aqua will split your job into two jobs and combine the results later.

My goal would be to run a vqe algoritme  for a optimization problem like maxcut on a real backend. Could batch processing help considering the fact that vqe algoritme needs a lot of evaluation steps on a real noisy backend.

The batch process bundles more circuits into one job; in this case, you might submit fewer jobs. Then, fewer communications are needed between cloud and local machine.
The number of evaluation steps you need depends on the optimizer, the noise might affect different optimizers differently. I do not have a single answer.
On the other hand, the noise model in the simulator is not exactly the same to the real hardware (usually less noise as compared to the real hardware). There is no guarantee that if you get good results on noisy simulation and then you will get good results on real hardware.
When you run on real hardware, do you use readout error mitigation? It helps to get more accurate results.

I will point out that the notion of credits will soon disappear.

Credits have been removed. There is a job limit of 5 jobs which Aqua now respects so I am closing this issue as it is no longer relevant.


Add the option to add a destination address to dexie-rewards

This would allow us to distribute rewards for multiple offers to a single address as a single coin. The destination address needs to be submitted to the claim endpoint and has to to be included in the signed message as well.

completed in https://github.com/dexie-space/dexie-rewards/pull/2


[🐞] useContent() always return undefined

Which component is affected?
Qwik Runtime
Describe the bug
I'm using useContent() to return items from menu.md, previous version works fine but 1.2.x return undefined. I have created a stackblitz reproduction.
Reproduction
https://stackblitz.com/edit/qwik-starter-zhy6u4?file=src%2Froutes%2Fmenu.md,src%2Froutes%2Flayout.tsx
Steps to reproduce

Create menu.md with items
Use useContent() in layout.tsx
It return undefined

System Info
System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
    Memory: 11.80 GB / 15.59 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 19.3.0 - /mnt/wslg/runtime-dir/fnm_multishells/15056_1689232911462/bin/node
    Yarn: 1.22.19 - /mnt/wslg/runtime-dir/fnm_multishells/15056_1689232911462/bin/yarn
    npm: 9.6.4 - /mnt/wslg/runtime-dir/fnm_multishells/15056_1689232911462/bin/npm
    pnpm: 8.6.3 - /mnt/wslg/runtime-dir/fnm_multishells/15056_1689232911462/bin/pnpm
  npmPackages:
    @builder.io/qwik: 1.2.6 => 1.2.6
    @builder.io/qwik-city: 1.2.6 => 1.2.6
    undici: 5.22.0 => 5.22.0
    vite: ^4.3.9 => 4.4.3

Additional Information
No response

@tanftw Your stackblitz's working fine, isn't it?

@maiieul Thank you, I think it was fixed in the recent version so I will close this issue.


can we use it in flutter app directly show qr code ?

as it doesnt show qr code fonepay in mobile is there any way we can show qr code also in our flutter app?

Hi @mahendrajungthapa, thanks for the issue. For QR, it's their (fonePay's) web view hai, so I think it's responsive, and seems like in small devices they hide it. Other than the small devices, it works on iPad/tabs. But I will look further enhancement if something can be done in V2.


Can you try branch 394-history-limit, is it works fast on your machine?

@nvbn I just want to make certain that the history_limit variable is digit. :)
Before i open the pull request. I have a simple test. if i don't set the history limit , it cost more than one second to match the closest  command，sometimes worse. when I set the history_limit to 2000,it will just takes 0.1s or so. So this effect is what I want.
Any way, I will test the branch 394-history-limit and @ you

@nvbn i just try the branch 394-history-limit.
if i not set THEFUCK_HISTORY_LIMIT.
 DEBUG: Trying rule: history; took: 0:00:01.225300
when i set THEFUCK_HISTORY_LIMIT=2000
DEBUG: Trying rule: history; took: 0:00:00.343468
more info:
➜  thefuck git:(394) ✗ wc -l ~/.zsh_history
   10027 /Users/superadmin/.zsh_history

@lovedboy 394-history-limit helped you and can merge it into master?

@nvbn  I think so. :)


ISPN-5844 Fix usage of generics in Infinispan Query

https://issues.jboss.org/browse/ISPN-5844

Pushed, thanks


[question] How to add additional device types / Unknown type.

Hi there, new to your project.  thanks for all the work, so far so good.
I've deployed zwave2mqtt in a docker using the container image: robertslando/zwave2mqtt:latest
been slowly adding devices, which for the most part go okay, but i'm running into issues with a couple.
the first is an Inovelli sensor, which adds okay, but comes up ans an unknown type.  This is where my knowlege gets very fuzzy, i found the following gethub: https://github.com/InovelliUSA/OpenZWave which i think has their device definitions, but i have no idea where to apply that (or if that is even the issue).  So that's question 1.
Question 2, i have one device that when i set configuration values, it doesn't stick.  If i set, then hit the refresh button on the page, it stays changed.. but if i switch pages (like to config) and back to devices, the setting is back to its original value.  I dont see any errors in the debug log, and at this point i'm assuming it's a hardware issue, as no other device exhibits this behavior, but though i would still mention it.
Thanks for any input or help!

found the following gethub: https://github.com/InovelliUSA/OpenZWave which i think has their device definitions, but i have no idea where to apply that (or if that is even the issue)

It's already installed in the docker container along with its devices db.
Please enable auto update device db zwave setting in order to make an auto update of the db.

i have one device that when i set configuration values, it doesn't stick. If i set, then hit the refresh button on the page, it stays changed

When you select a configuration than you need to hit the airplain button on the right. So a notification should appear with 'Value Updated' to confirm the change is done correctly. After a container restart you need to press on refresh to see the actual configuration values


Optimize view on Mobile

Maybe have two tricks next to each other

Remove Date on Mobile two reduce size of tricks


earlyoom: Apply security recommendations from package maintainer

My pull request might not be the most elegant solution, but it implements the security restrictions recommended by the package maintainer. I would appreciate any help with verifying and testing the changes. Thank you very much! :D
Source for my changes: https://github.com/rfjakob/earlyoom/blob/master/earlyoom.service.in

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[ ] Fits CONTRIBUTING.md.

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

Hello. Firstly, welcome to nixpkgs.
Your changes aren't indented correctly, if you could address that it'd be great.
Please also view CONTRIBUTING.md to see how commits should be titled.
If you can link the documentation from easyoom which recommends these options that would be helpful for review.

Hi @06kellyjac,
Thank you so much for your suggestions!
I've updated my Pull Request to include the documentation I referenced for my change. Additionally, I’ve edited the title of the Pull Request to better reflect the changes.
Could you please let me know what is incorrect or missing to make my commit approvable? Specifically, regarding the comment "Your changes aren't indented correctly."

Hi @06kellyjac,
I've implemented all your suggestions except for the SystemCallFilter so far. I must say, NixOS has impressively high standards for PRs!
To be honest, I'm not sure how to squash the commits. If you could assist with that, I’d really appreciate it (I rarely use Git commands). It looks like all the checks have passed successfully so far. :D
Thanks!


[Feature request] Dark Mode

Idea
Can we get dark mode like in the MakeMKV container please?

Yes it's already supported.
For example, you have have a dark interface when running:
docker run --rm -ti -p 5800:5800 -e DARK_MODE=1 jlesage/filezilla

Sorry, i am using a old unRAID template from before Dark Mode was Added, i just added the Variable to my template and it works perfectly. thanks

No problem.  It's too bad that unRAID is no longer updating template of installed containers... :(


Update Nginx to use SHA-512 to store basic auth password hashes

This PR updates the nginx image to use SHA-512 instead of Crypt to store basic auth hashes. This enables Nginx to correctly utilize more than the first eight characters of a supplied basic auth password.
Closes #140

I just hacked this into my nginx docker file
RUN printf "test:$(openssl passwd -6 password)\n" >> /etc/nginx/.htpasswd

[debug]nginx:/app$ cat /etc/nginx/.htpasswd
test:$6$uCj6YyI/JghRMU0d$3WMjIynvqX9..PaibInWhK4bd9uj7/9gs9Q2yuasMgs9.M2ZL39OygjMZJCHqrFf8E9f8bJWhxwQleCBW3YQD.

This output what was expected, and I was able to login via HTTP Auth as expected. Seeing as this is an entrypoint, this is not a breaking change, and .htpasswd file will be updated when the container is relaunched with this new image.


Legion go i Can no longer update an error message comes up

Describe the bug
remote error: cryptographic signature verification failed: invalid signature when vali dating ASN.1 encoded signature, it's been like that a few weeks I'm hoping there's a fix without having to do a clean install 🤞.
What did you expect to happen?
I click the bazzite update icon and this error comes up.
Output of rpm-ostree status
No response
Hardware
No response
Extra information or context
No response

Hey there
We made a mistake a few weeks ago, and this resulted in broken system updates.
Please see this forum post for remediation steps.
https://universal-blue.discourse.group/t/important-announcement-regarding-system-updates-action-needed/2689

We have a script that will resolve the issue. You are strongly recommended to review the script first prior to running it by inspecting it here 1.0k. You can either perform those steps by hand or use this following command:
$ curl -sL https://fix.universal-blue.org/ | sudo bash


Level editor cursor not restricted to level area

@clickmazes
I tried this... https://david-pfx.github.io/PuzzleScriptNext/src/editor.html?hack=864ec7e3b35626a844b6e292bb5b04b7. And in LEVEL-EDITOR the cursor will list objects below the grid as if there are extra hidden rows. And when I click to place an item it will appear several rows up. Here is a screen shot with the cursor below the grid, but listing objects on the grid (5 rows above).
https://cdn.discordapp.com/attachments/1276344761179050074/1276571753623064586/Screenshot_2024-08-23_at_16.58.53.png?ex=66ca0397&is=66c8b217&hm=322df2d7d7f09b1526182564632e7a925d0aee93966e33094f3708689bbc8ef6&
This does look like a regression issue - because I cannot reproduce the behaviour on stable release. I.e. here... https://puzzlescriptnext.polyomino.com/editor.html?hack=864ec7e3b35626a844b6e292bb5b04b7

This issue doesn't occur on the canvasy branch, so it must be an issue introduced in a very recent update. I might guess the fix for https://github.com/david-pfx/PuzzleScriptNext/issues/76 - because it's in the same area of code.

Fixed. It was experimental code, now reverted.


algorithm of Lottery Ticket Hypothesis Pruning

Hi,
Do the algorithm of Lottery Ticket Hypothesis Pruning be implemented in the project?

Hi,
Currently the LTH pruning is not included in this repo. We're working on the new version and will release it soon.

Good job! Good news!
Eagerly look forward to your new version.


Who should be gitblamed for syncs?

Noticed that @cansavvy you are comming up as committing the changes when I launch a sync from AnVIL Template.
It should probably be github actions, jhudsl robot, or ideally, whoever launched the sync so we can trace changes back.

I think all we need to switch this is change the PAT to be from jhudsl-robot. Right now our jhudsl organization is using a PAT from my account.

I just changed the GH_PAT for this organization to be from jhudsl-robot so let's see if that fixes this.

Yep! Fixed! https://github.com/jhudsl/AnVIL_Template_Test/pull/12

Nice!  I'd been meaning to ask about that.


Is this library still maintained?

It seems to be dead, no PRs or issues were addressed in the last ~2 years.

@floriankraemer I re-implemented it entirely at https://github.com/somnambulist-tech/validation not sure if anything there would be of use to you.

Oh nice, I see some nice changes. 👍 I already did some as well, like adding interfaces and tooling. Especially phpstan already helped to find a few things and it's just at level 5 for now. https://github.com/floriankraemer/validation/tree/refactor


Add ability to update the DynamoDbMoshi marshaller with new config

The only way I can add custom mappers (i.e. for values4k classes) is by making a new ConfigurableMoshi with a reflective backend.  kotlinx-metadata works, but I would rather avoid adding reflection to my lambdas.  It's impossible for me to inject the existing Kotshi factory into a new ConfigurableMoshi, because the class is module internal.
This new update method will allow me to make a copy of an existing DynamoDbMoshi, while providing additional custom marshallers.  For example:
val lens = DynamoDbMoshi.update {
    value(CustomValue)
}.autoDynamoLens<MyDbObj>()

I see an update method like this being very powerful in the built-in http4k-format marshallers as well.

Yeah - this seems useful and would be awesome if we could get it into the others. For the moment though, happy to merge it here. 🙃

Codecov Report

Merging #188 (3bd00c4) into master (0434083) will increase coverage by 0.00%.
The diff coverage is 100.00%.

:exclamation: Current head 3bd00c4 differs from pull request most recent head d2b0ba8. Consider uploading reports for the commit d2b0ba8 to get more accurate results

@@            Coverage Diff            @@
##             master     #188   +/-   ##
=========================================
  Coverage     65.07%   65.08%
- Complexity      808      809    +1
=========================================
  Files           417      417
  Lines          4871     4872    +1
  Branches        433      433
=========================================
+ Hits           3170     3171    +1
  Misses         1454     1454
  Partials        247      247

Impacted Files
Coverage Δ

...rg/http4k/connect/amazon/dynamodb/DynamoDbMoshi.kt
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


src: win pipe add unix domain socket support

Support Unix Domain Socket on windows.
Try use UDS as pipe backend when the pathname is not prefixed with //./pipe, which otherwise use NamedPipe as usual.

Needs a test and also.... did you run the test suite locally? I count 36 failures.

Not yet, still work in progress.
In fact I am using node to develop since it is easier for debugging.
I'll add sufficient tests once I done the main part, for sure.
By the way, how to deal with mingw it seems have no support of afunix.h

We'd need to return UV_ENOSYS there.

Quick question: rather than make it implicit based on the prefix, how about marking it explicit by taking a flag in uv_pipe_init ?

I think that is also an approach but maybe we need to contribute to more downstream projects like nodejs to opt-in this feature, like exposing some api or js binding. Doing it implicitly prevents that, and //./pipe is distinguished enough from file paths.
Further more, I think a flag at init also doesn't have a clear meaning for projects like nodejs. Maybe the user needs to set a option to true when createConnection to enable this feature? Thats kind of no point, I think the user already have full awareness when they pass a file path as a parameter.
That also breaks cross platform because we then need to set a flag depends on when we using Windows, however on this cross platform library we should just don't let user know about such detailed flag?

I think that is also an approach but then we need to contribute to more downstream projects like nodejs to opt-in this feature, like exposing some api or js binding. Doing it implicitly prevents that, and I think //./pipe is distinguished enough from file paths.

The 2 are not orthogonal, why doesn't Node do the path checks and pass the flag down to the native layer? Just thinking out loud.

Further more, I think a flag at init also doesn't have a clear meaning for projects like nodejs. Maybe the user needs to set a option to true when createConnection to enable this feature? Thats kind of no point, I think the user already have full awareness when they pass a file path as a parameter.

But it makes perfect sense from libuv's perpective IMHO, which is the library in question here :-)

That also breaks cross platform because we then need to set a flag depends on when we using Windows, however on this cross platform library we should just don't let user know about such detailed flag? It does no harm at all comparing to the existing behavior.

We have ample precedent on platform specific flags (see UDP flags) when one wants something specific about a given system.
Not pushing hard on this, just trying to understand what sounds best. @libuv/collaborators any other thoughts?

Both are acceptable to me!

We'd need to return UV_ENOSYS there.

I found we could just pretend like we never support UDS on mingw (eg. always use NamedPipe as usual), see latest commit.

OK, it seems all basic functions are working. Now, we need to decide whether let libuv automatically decide the backend, or by pass a explicit arg at uv_pipe_init to enable this feature, which seems breaking to me because the existing args accepts a bool arg ipc, and adding parameter brings breaking change. The reason is:
All tests test a bad name pipe named bad-pipe, while UDS accepts a relative path and now, it creates a uds named bad-pipe, by creating the file at cwd.

If we choose automation, we need to think about the tests.

If we choose init, you may suggest how to enable this explicitly. Another problem is, this feature seems better be enabled at bind2/connect2, because you may not know which backend to use when you init or creating the pipe, but later.

Is it a strong guarantee that these functions' address will not change across all types of scoket and process lifetime?

s it a strong guarantee that these functions' address will not change across all types of scoket and process lifetime?

Seems that way: https://github.com/python/cpython/blob/5eb7fd4d0fc37b91058086181afebec41e66e5ad/Modules/overlapped.c#L174

but won't it also break ABI in tcp.c? Seems AcceptEx also used there.

No, we can leave the pointer in the structure, but it will be unused.

On second thought, this change will make bad-pipe as a valid unix domain socket, is it a breaking API change?

Yep, a flag in I it will make it exploit so the expectation will be clearer.

Add an extra param beside int ipc? Like int ipc, int uds? Or int ipc, int flags for future?

We'd need to introduce a new constructor, so following the TCP example: uv_pipe_init_ex which takes flags indeed. The IPC parameter should also be a flag btw, so this can be used to setup an IPC pipe using UDS. Is that supported btw?

That sounds good, I know nothing about ipc mode, could be supported if it is a higher layer protocol can be transparently sent by any stream.

In principle it should work, but the tests you'll add will tell ;-)


AppendGrid to JSON

Hello,
is there a function to transform all rows into a Json scructure? For example:
$('#tblAppendGrid').appendGrid({
        initRows: 0,
        columns: [
            { name: 'pct_qtd', display: 'Qtd', type: 'text', ctrlAttr: { readonly: true, required: true }, ctrlCss: { width: '80px'} },
            { name: 'pct_obs', display: 'Obs', type: 'text', ctrlAttr: { readonly: true, required: true }, ctrlCss: { width: '80px'} },
        ],
});

var data = {'pct_qtd': 1, 'pct_obs': 'abc'};
$('#tblAppendGrid').appendGrid('appendRow', [data]);
var data = {'pct_qtd': 10, 'pct_obs': 'cdf'};
$('#tblAppendGrid').appendGrid('appendRow', [data]);

I want a function to return the JSON, so i can save and restore the table's data using the browser's localStorage.
[
    {"pct_qtd":1, "pct_obs":"abc"},
    {"pct_qtd":10, "pct_obs":"cdf"},
]

Hi andersonls,
Have you tried getAllValue? It will return the grid data in array format that I believe is what you wanted.
Hope it can help. Thanks for using appendGrid!

Hi @hkalbertl, yes i ended up using getAllValue with JSON stringify
var data = $('#tblAppendGrid').appendGrid('getAllValue');
var jsonData = JSON.stringify(data);

And to restore
var data = JSON.parse(jsonData);
$('#tblAppendGrid').appendGrid('appendRow', data);

Good to know :)

One more question, does this work with subgrids?
One of my tables has a subgrid and the above code is not working (the subgrid is not being populated). Do i need to write a wrapper for the appendRow to populate the subgrid?
The getAllValue returns something like:
[{"id":"1059","box_name":"P","weight":"1","ped_serial_0":1}]

I also tried implementing the subPanelGetter to return the array in the same format as passed to the initData of the SubGrid demo:
[{"id":"1059","boxName":"P","weight":"1","SubGridData":[{"ped_serial":1}]}]

Hi,
If you initialize the grid based on my SubGrid example, probably sub-grid data in "object mode" is generated.
I guess you can modify your subPanelGetter function as follow:
{
  subPanelGetter: function (uniqueIndex) {
    return {
      // Get sub-grid data in "array mode" and save it to the property named `SubGridData` that matched to `rowDataLoaded`
      SubGridData: $('#tblSubGrid_' + uniqueIndex).appendGrid('getAllValue')
    };
  }
}

The getAllValue should generate data exactly the same as the one in your initData.
If not, please show me your code and sample data for checking :)

Ok, now it's working. I forgot to add the rowDataLoaded method.
It still doesn't work with the appendRow method, but i can work with the initData instead. I only need this once when the page is loaded.

Not bad! Good luck in your project!


[WIP] Add sum as a static function

Description
Add torch.sum equivalent. This is to support "reducing across dimensions" (as @aanurraj required it :stuck_out_tongue: )
Checklist

[x] I have followed the Contribution Guidelines and Code of Conduct
[x] I have commented my code following the OpenMined Styleguide
[x] I have labeled this PR with the relevant Type labels
[x] My changes are covered by tests

Q: Why can't we use the GradSum from grad_functions.py

Q: Why can't we use the GradSum from grad_functions.py

Yes, I noticed the same after making the PR. Although, for some reason passing the dim arg to it does not work right. I am investigating it.
(I should have marked this as WIP but forgot to :sweat_smile: )

@Syzygianinfern0 could we close this?

@Syzygianinfern0 could we close this?

Yep 😅


Text-Flicker when updating navigation bar title on visibilitychange

This error occured on a Android >= 4.4.2 device.

On which Android runtime version are you getting this?

i got this error on a 4.4.2 and a lollipop device using Crosswalk.

i have added a video: https://youtu.be/aPhSRmgPqZc


Something went wrong when evaluating the results on ImageNet

When I evaluated the result on ImageNet (not the subset), I got the bug as follows:
THCudaCheckWarn FAIL file=/opt/conda/conda-bld/pytorch_1524586445097/work/aten/src/THC/THCStream.cpp line=50 error=59 : device-side assert triggered
Does anyone have any thought about the issue?

@ChongjianGE  I have a similar error:
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1579022022457/work/aten/src/THC/THCGeneral.cpp line=141 error=60 : peer mapping resources exhausted
Traceback (most recent call last):
File "/DATA7_DB7/data/xchen/Multi-view-Clustering-master/CMC-master/LinearProbing.py", line 483, in
main()
File "/DATA7_DB7/data/xchen/Multi-view-Clustering-master/CMC-master/LinearProbing.py", line 432, in main
train_acc, train_acc5, train_loss = train(epoch, train_loader, model, classifier, criterion, optimizer, args)
File "/DATA7_DB7/data/xchen/Multi-view-Clustering-master/CMC-master/LinearProbing.py", line 277, in train
res = model(input, opt.layer)
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/DATA7_DB7/data/xchen/Multi-view-Clustering-master/CMC-master/models/alexnet.py", line 45, in forward
return self.encoder(x, layer)
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/nn/parallel/data_parallel.py", line 148, in forward
inputs, kwargs = self.scatter(inputs, kwargs, self.device_ids)
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/nn/parallel/data_parallel.py", line 159, in scatter
return scatter_kwargs(inputs, kwargs, device_ids, dim=self.dim)
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/nn/parallel/scatter_gather.py", line 36, in scatter_kwargs
inputs = scatter(inputs, target_gpus, dim) if inputs else []
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/nn/parallel/scatter_gather.py", line 28, in scatter
res = scatter_map(inputs)
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/nn/parallel/scatter_gather.py", line 15, in scatter_map
return list(zip(*map(scatter_map, obj)))
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/nn/parallel/scatter_gather.py", line 13, in scatter_map
return Scatter.apply(target_gpus, None, dim, obj)
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/nn/parallel/_functions.py", line 89, in forward
outputs = comm.scatter(input, target_gpus, chunk_sizes, ctx.dim, streams)
File "/DB/rhome/xchen/anaconda2/envs/Conda_python3_5/lib/python3.5/site-packages/torch/cuda/comm.py", line 147, in scatter
return tuple(torch._C._scatter(tensor, devices, chunk_sizes, dim, streams))
RuntimeError: cuda runtime error (60) : peer mapping resources exhausted at /opt/conda/conda-bld/pytorch_1579022022457/work/aten/src/THC/THCGeneral.cpp:141
Process finished with exit code 1
Have you solved it yet?


Work related

I have not seen any work in your repo. The dead line is on Wednesday.

Duly noted. Thank you for your concern!


Error when I put Level.sav.json on convert

Have you modified the save files
Yes I modifier some value (number)
Have you tried the latest release
Yes I have the last one
Describe the bug

What I need to do to fix it ?


Create a default test

Hi,
Once the project is generated, it doesn't have a test so, when we build pytest fails and so does the build.
Probably worth adding a single dummy test.
Not asking work to be done, merely tracking the need :)
Cheers,

cc @russmiles


AttributeError: 'NoneType' object has no attribute 'group'

Source code:
from googletrans import Translator

# translator = Translator(service_urls=[
# 	'translate.google.com',
# ])
translator = Translator()

data = str(open('first-post.md', encoding='utf8', newline='\n').read())
# print(data)
translations = translator.translate([data], src='en', dest='fa')
print(translations)
print(translations._response.http_version)

for translation in translations:
	print(translation.origin, ' -> ', translation.text)

Output:
C:\Users\Max\Desktop>python translate.py
Traceback (most recent call last):
  File "C:\Users\Max\Desktop\translate.py", line 10, in <module>
    translations = translator.translate([data], src='en', dest='fa')
  File "C:\Users\Max\AppData\Local\Programs\Python\Python310\lib\site-packages\googletrans\client.py", line 177, in translate
    translated = self.translate(item, dest=dest, src=src, **kwargs)
  File "C:\Users\Max\AppData\Local\Programs\Python\Python310\lib\site-packages\googletrans\client.py", line 182, in translate
    data = self._translate(text, dest, src, kwargs)
  File "C:\Users\Max\AppData\Local\Programs\Python\Python310\lib\site-packages\googletrans\client.py", line 78, in _translate
    token = self.token_acquirer.do(text)
  File "C:\Users\Max\AppData\Local\Programs\Python\Python310\lib\site-packages\googletrans\gtoken.py", line 194, in do
    self._update()
  File "C:\Users\Max\AppData\Local\Programs\Python\Python310\lib\site-packages\googletrans\gtoken.py", line 62, in _update
    code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'

More information:
C:\Users\Max\Desktop>python --version
Python 3.10.8

Content of init.py file:
"""Free Google Translate API for Python. Translates totally free of charge."""
__all__ = 'Translator',
__version__ = '3.0.0'

from googletrans.client import Translator
from googletrans.constants import LANGCODES, LANGUAGES  # noqa

Probably helpful

Got the same problem

Also got the same problem...

I currently have this problem as well

Actually, I just got it to fix by updating to the newest version. That will solve the problem

Actually, I just got it to fix by updating to the newest version. That will solve the problem

Oh nice, How and to which version?

Actually, I just got it to fix by updating to the newest version. That will solve the problem

Oh nice, How and to which version?

4.0.0-rc1 this version works

Actually, I just got it to fix by updating to the newest version. That will solve the problem

Oh nice, How and to which version?

pip install googletrans==4.0.0-rc1

the same problem here.

The same problem here too

I remember that I was able to fix this issue, but I cannot remember exactly how. However It seems that it works on version 4.0.0-rc1, so instead of doing pip install try to force it to do the most recent version. Seems backwards but I believe that is how I fixed it, all I remember was that it was an easier fix than I thought.

Try pip install googletrans==4.0.0-rc1

However, this link worked for me.
It uses an older version of googletrans
pip install googletrans==3.1.0a0

It works for me

Weird, do you have a sample code @Yildirimm?

However, this link worked for me. It uses an older version of googletrans pip install googletrans==3.1.0a0

Excellent This Worked for me!

there is a way to install last version with conda? I mean, which will be the solution to avoid conflicts for an env fully created with conda?

For those who have the same problem. Just make sure don't forget to install the working versions (4.0.0-rc1 or 3.1.0a0) in the venv, like me. it took me 1 hour to figure out where I went wrong.

i am having the same issue. i have tried both version 4.0.0-rc1 and 3.1.0a0. both of them gives error none type has no attribute group. the code was working find in my local host. but in client server it does not work. what is the issue. i am using 3.1.0a0 as of now

Version 4.0.0-rc1 did the trick for me

However, this link worked for me. It uses an older version of googletrans pip install googletrans==3.1.0a0

Thank you, it works!


Investigate whether or not AuthorizationGenerator needs an async version

Examine existing AuthorizationGenerator implementations and look for any blocking i/o. If not, then for now we'll assume there's no great demand for an async version.
If we identify blocking i/o then create an AsyncAuthorizationGenerator interface based on the existing AuthorizationGenerator interface

An AuthorizationGenerator can trigger blocking i/o but doesn't automatically do so. I suggest adding an AsyncAuthorizationGenerator class which, as well as a generate method, can also offer two static methods:-
(1) fromBlockingAuthorizationGenerator (to be used to wrap blocking i/o).
(2) fromNonBlockingAuthorizationGenerator (to be used when it can be guaranteed that the authorisation generator will not perform blocking i/o)
This naturally leads to the concept of a standard class being provided with each async implementation which can wrap a piece of blocking code and convert it into non-blocking code which returns a CompletableFuture wrapped version of the code.

I think actually we're going to need an AsyncAuthorizationGeneratorFactory class rather than static methods.

Suggest we rename AsynchronousComputation to AsynchronousComputationFactory since it actually serves as a creator of asynchronous computations from synchronous ones.
Static methods should look something like:-
(1) fromNonBlockingAuthorizationGenerator(AuthorizationGenerator authGen, AsynchronousComputationFactory computationFactory)
(2) fromBlockingAuthorizationGenerator(AuthorizationGenerator authGen, AsynchronousComputationFactory computationFactory)

See issue #21


Featue/restart

Sorry about that - not sure what I did wrong there.  This should not have been submitted to your repo.


Not working if account is temp disabled

If some of the people that you follow has the account temp disabled the script will not work.
I will fix this ASAP.

Fixed


pass client host and port to remote interface

when chrome is running on some other port than the default
chromeless was failing silently
(node:93065) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: connect ECONNREFUSED <IP_ADDRESS>:9222
(node:93065) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:93065) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: connect ECONNREFUSED <IP_ADDRESS>:9222

I also get this error when using other port than 9222, but I also need to change this line to include port: this.options.cdp.port to work. Can someone verify this?

I can confirm that without this change, using remote host and port does not work properly, i.e. new Chromeless({..., cdp: {host: '<IP_ADDRESS>'}}) throws an error.
However, error is not raised when Chrome is also running on localhost with remote debugging port enabled. So i assume that it does the version check against the local instance but everything else works against remote Chrome instance as expected.


Reverts Zone.ttl

Reverts default zone ttl as it is not supportable across all providers.
See #357

NetflixOSS » denominator » denominator-pull-requests #118 SUCCESS
This pull request looks good


Revises :party edge ruleset

In direct response to the recent issue raised here.

Validations:

making sure adiabatic conditions don't trigger default party edge tag
making sure OtherSideCoefficients (as outside boundary condition values) does trigger default party edge tag


napari.layers cannot be found on master

🐛 Bug
Probably introduced in #2662, one can no longer do:
import numpy as np
import napari

image = napari.layers.Image(np.random.random((500, 500)))

Trying this on master, I get:
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/projects/napari/napari/__init__.py in __getattr__(name)
     75     try:
---> 76         return locals()[name]
     77     except KeyError:

KeyError: 'layers'

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
<ipython-input-2-c7cb80ce1324> in <module>
----> 1 layer = napari.layers.Image(np.random.random((500, 500)), scale=[10, 10])

~/projects/napari/napari/__init__.py in __getattr__(name)
     76         return locals()[name]
     77     except KeyError:
---> 78         raise AttributeError(f"module 'napari' has no attribute {name!r}")

AttributeError: module 'napari' has no attribute 'layers'

from napari import layers works fine, so the module is there. :grimacing:
This is an API breakage so it unfortunately needs to be fixed before 0.4.9.

This is an API breakage so it unfortunately needs to be fixed before 0.4.9.

Indeed :)

The bug is not strictly high-severity since there is a workaround. The severity is pretty low when there is a workaround however annoying the bug may be.
Higher severities are associated with napari actually breaking, segfaulting without any means for the users to have a workaround to get napari running 🤓

On another note, I have seen this happen on some other packages (even python standard library itself I think) so the question I have (in general) once you import the top module, should you be able to access any submodule form it?

yeah, we've never exported layers in the napari namespace... so this has worked in the past due to other inner modules importing it.

once you import the top module, should you be able to access any submodule from it

not automatically, it depends on what else imports it.  For instance, take this package structure:
my_module/
├─ __init__.py
├─ a.py
├─ b.py

where a.py and b.py are empty and
# __init__.py
from . import a

In [1]: import my_module

In [2]: my_module.a
Out[2]: <module 'my_module.a' from '~/my_module/a.py'>

In [3]: my_module.b
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-5cb7b5e01231> in <module>
----> 1 my_module.b

AttributeError: module 'my_module' has no attribute 'b'

however, if within a.py you import b:
# a.py
from . import b

then it works as @jni was expecting in the first post:
In [1]: import my_module

In [2]: dir(my_module)
Out[2]:
['__builtins__',
 '__cached__',
 '__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__path__',
 '__spec__',
 'a',
 'b']

In [3]: my_module.b
Out[3]: <module 'my_module.b' from '~/my_module/b.py'>

So basically, the fact that it worked before was an indirect import of napari.layers somewhere inside some other module that we do export in napari.__init__.  The __getattr__ approach definitely requires you to be explicit about the namespace of the top level package ... but I'm not sure that's a bad thing?

The getattr approach definitely requires you to be explicit about the namespace of the top level package ... but I'm not sure that's a bad thing?

Well it is a convenience, and it was like that before (for other reasons) but I do not think being explicit about the imports is bad either.

ok.  I've played with this a little and while I can fix layers pretty easily with the __getattr__, it's not as easy for all of the things (experimental for instance is giving me circular import problems with the approaches I've tried).  So if we want to get back the behavior of being able to import napari and then access all of the top level modules implicitly, we may want to roll back #2662 as well...
which will of course bring back the double import problem in __main__
@jni, are you still feeling pretty strongly about keeping the cli module inside napari.__main__?

So if we want to get back the behavior of being able to import napari and then access all of the top level modules implicitly, we may want to roll back #2662 as well...

Oh no :-\

I can fix layers pretty easily with the getattr, it's not as easy for all of the things (experimental for instance is giving me circular import problems with the approaches I've tried)

Hmm, that sucks, but I suspect there is a solution somewhere. Don't have time to look at this in detail right now but there is discussion happening about this pattern at the scipy ecosystem level — here is the scikit-image PR and the SPEC discussion. As you can see the skimage PR went for aaaaaages so there's certainly a lot of subtlety, but it might be "done" now.

yeah, we've never exported layers in the napari namespace... so this has worked in the past due to other inner modules importing it.

I did wonder about that, but I was excited to see it work in my usage and then got used to it! 😂

@goanpeca feel free to correct my label usage. 😊

i'd say lets just roll it back, and deal with the slow imports some other way

I'm sure it can "be done" ... but after playing with it for 30 minutes or so, it started to feel like a rabbit hole of magic that's going to be a continual frustration (and it also exposed that we've been relying on python imports and sys.modules being even cooler than we knew behind the scenes for us).

Just chatting with @stefanv now, he says all the magic is here:
https://github.com/scikit-image/scikit-image/pull/5101/files#diff-cd88cca5d4b70042d79332dc7132ad42a8ea07929b479cf64be5bddb1f7f0548R5
and here:
https://github.com/scikit-image/scikit-image/pull/5101/files#diff-5cf0c3839f5afeb18eb878337af2a47e09d91e50080d007d9c3f5123659ce2d8R96-R97
so we should be able to copy that lazy.py and use it. Imma give it a try.

Working now (locally tested at least) in #2816. 🤞 for the CI!


Fix outline colors on subscribe links and volume div for accessibility

Subscribe links outline color on focus was set to black, which was invisible against the black background. Updated to theme yellow.
Also, volume div was set to the webkit default blue while its sibling elements were set to the theme yellow. Updated to theme yellow.
This is a resubmission of PR #210
@416serg

@ben-foster 👏🏼 Thanks, Ben!

Thanks for your patience @416serg !


Any plans on supporting writing WGSL for all gfx_backends?

This has been done for Rusts wgpu project that also does cross platform rendering.
Except it supports using WGSL without any modification for each platform and does so at runtime with naga.
I am sure you can pre-compile at boot if necessary or even at build, but it would be nice for having it at runtime just for ease of use.
This means a single wgsl file can be used cross platform for all backends (dx11, vulkan, metal, webgl and wgpu)
struct Globals {
    mvp: mat4x4<f32>,
    size: vec2<f32>,
    _pad0: u32,
    _pad1: u32,
};

struct Locals {
    position: vec2<f32>,
    velocity: vec2<f32>,
    color: u32,
    _pad0: u32,
    _pad1: u32,
    _pad2: u32,
};

@group(0)
@binding(0)
var<uniform> globals: Globals;

@group(1)
@binding(0)
var<uniform> locals: Locals;

struct VertexOutput {
    @builtin(position) position: vec4<f32>,
    @location(0) tex_coords: vec2<f32>,
    @location(1) color: vec4<f32>,
};

@vertex
fn vs_main(@builtin(vertex_index) vi: u32) -> VertexOutput {
    let tc = vec2<f32>(f32(vi & 1u), 0.5 * f32(vi & 2u));
    let offset = vec2<f32>(tc.x * globals.size.x, tc.y * globals.size.y);
    let pos = globals.mvp * vec4<f32>(locals.position + offset, 0.0, 1.0);
    let color = vec4<f32>((vec4<u32>(locals.color) >> vec4<u32>(0u, 8u, 16u, 24u)) & vec4<u32>(255u)) / 255.0;
    return VertexOutput(pos, tc, color);
}

@group(0)
@binding(1)
var tex: texture_2d<f32>;
@group(0)
@binding(2)
var sam: sampler;

@fragment
fn fs_main(vertex: VertexOutput) -> @location(0) vec4<f32> {
    return vertex.color * textureSampleLevel(tex, sam, vertex.tex_coords, 0.0);
}

This is also much better than generating outputs per language as well. I am currently trying to make sokol work with Swift and having to deal with build times and outputting specific swift shader code is a hassle. Being runtime generated and working out of the box would be a much smoother experience.

Maybe some time in the future, but only as offline tool similar to sokol-shdc (https://github.com/floooh/sokol-tools/blob/master/docs/sokol-shdc.md)
Adding a runtime shader compiler to sokol-gfx would add too much bloat to the library. But there's a feature request to turn sokol-shdc into a library: https://github.com/floooh/sokol-tools/issues/34 - so sokol-gfx would still take backend specific shader input, but application could link against this library to get a runtime compilation solution. This would easily increase the binary size by at least 10x (from a few hundred KBytes to several MBytes).
I'm rolling around the idea in my head to switch the offline shader authoring language from GLSL to WGSL one day, if Tint is up to the task. Currently Tint is already used in sokol-shdc, but only for translating SPIRV into WGSL.
But Tint could also be used to translate WGSL into the various target shader languages, it's just unclear at the moment if Tint can support all requires targets (mainly HLSL5 and GLSL es300), because Tint has been written for WebGPU, but D3D11 and GLES3 aren't exactly 'first class' WebGPU backends.
If Tint can completely replace the combination of glslangValidator, SPIRVTools and SPIRVCross currently used in sokol-shdc, that would be a pretty big win. It's not very high on the priority list though.

and outputting specific swift shader code is a hassle

Btw: sokol-shdc has the bare_yaml target for such situations where a target language isn't directly supported. This gives you the output shaders as files, and a reflection file in a simple YAML format (you don't need a full YAML parser to parse this file). You can then either load this data at runtime, or use your own offline tool to generate Swift code.


I have upgraded to 9.0.0 on BottleCapDave's update and now the charts no longer work

I raised a issue on Bottlecap Dave's github and he has suggested I raise this here as there appears to be a issue with the card
https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/547

Correct, please see issue #27
Downgrade back to 8.x and it will work for now

I removed 9.0.0 and installed 8.5.2 and still get the error

I removed 9.0.0 and installed 8.5.2 and still get the error

it would appear that downgrade is not working - I have the same issue


Implement unit normalization

This PR implements an approach to normalize any unit in a model that represents an absolute count of something (e.g., population).

Codecov Report

Merging #194 (c548cae) into main (3a3a931) will increase coverage by 0.16%.
The diff coverage is 94.73%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main     #194      +/-   ##
==========================================
+ Coverage   76.46%   76.63%   +0.16%
==========================================
  Files          65       67       +2
  Lines        5053     5115      +62
==========================================
+ Hits         3864     3920      +56
- Misses       1189     1195       +6

Impacted Files
Coverage Δ

mira/metamodel/ops.py
77.38% <84.00%> (+1.15%)
:arrow_up:

mira/metamodel/utils.py
94.44% <94.44%> (ø)

mira/metamodel/__init__.py
100.00% <100.00%> (ø)

mira/metamodel/template_model.py
60.54% <100.00%> (+0.31%)
:arrow_up:

mira/metamodel/templates.py
84.61% <100.00%> (-0.92%)
:arrow_down:

mira/metamodel/units.py
100.00% <100.00%> (ø)

tests/test_ops.py
92.10% <100.00%> (+1.67%)
:arrow_up:

... and 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

:tada:


Update releasing docs from run-through with Nikki

We discovered an issue: #833 but chose to skip over that problem by giving Nikki temporary (already-revoked) privileges to bypass branch protection. The doc is updated assuming that one can actually push directly to main, but I think we should switch to doing all releases in PRs and update the doc accordingly. What does everyone think?

📚 Documentation preview 📚: https://earthaccess--834.org.readthedocs.build/en/834/

This isn't rendering nicely in Mkdocs. Needs fix!

Fixed up the formatting in Mkdocs! 5b84afc

Looks great!

Thanks, @nikki-t !


Script generation is not working, xyzColumn not showing fields in editor.ts, QuickFilter not being added seems like scripts not being built.

I have  two issues that seem to be related as if the script generation is not working.
I have TypeScript 2.8.3 installed. VS2015 Update3. I am not sure of the original serenity version I used to build the project. (I actually created a new project and merged my old into the new in an attempt to fix these issues but no dice I am at the same point).
Issue 1: Added quick filter to my xyzRow QuoteRow (for Company Name) - while I currently have a Status QuickFilter working - my new QuickFilter does not even appear .
Issue 2: Added fields from the Database table to the Sales Person xyzRow, xyzColumn - the new fields do not show up in the editor dialog but they do in the GridDialog.
I  added 2 columns to the SalesPersonTable
InActive
InActiveDate
So I added them to my xyzRow and xyzColumn
When I build my project and transform the T4 templates - the fields show up in my xyzGrid but when I click on the field to pop up the editor - the editor does not show the new fields.
my xyzRow
    [ConnectionKey("QUOTESDB"), Module("QUOTESDB"), TableName("[dbo].[SalesPerson]")]
    [LookupScript("QUOTESDB.SalesPerson", Permission = "?")]
    [DisplayName("Sales Person"), InstanceName("Sales Person")]
    [ReadPermission(PermissionKeys.Administration)]
    [ModifyPermission(PermissionKeys.Administration)]
    [DeletePermission(PermissionKeys.Administration)]
    public sealed class SalesPersonRow : Row, IIdRow, INameRow
    {

        [DisplayName("Id"), Identity, Hidden]
        public Int32? Id
        {
            get { return Fields.Id[this]; }
            set { Fields.Id[this] = value; }
        }

        [DisplayName("First"), Size(25),  QuickSearch, Hidden]
        public String First
        {
            get { return Fields.First[this]; }
            set { Fields.First[this] = value; }
        }

        [DisplayName("Last"), Size(25), QuickSearch, Hidden]
        public String Last
        {
            get { return Fields.Last[this]; }
            set { Fields.Last[this] = value; }
        }

        [DisplayName("Code"), Size(5)]
        public String Code
        {
            get { return Fields.Code[this]; }
            set { Fields.Code[this] = value; }
        }

        [DisplayName("Name"), Size(75), QuickSearch]
        public String FullName
        {
            get { return Fields.FullName[this]; }
            set { Fields.FullName[this] = value; }
        }

        [DisplayName("InActive")]
        public Boolean InActive
        {
            get { return Fields.InActive[this]??false; }
            set { Fields.InActive[this] = value; }
        }

        [DisplayName("InActive Date")]
        public DateTime InActiveDate
        {
            get { return Fields.InActiveDate[this]??DateTime.Parse("Jan 1, 2299"); }
            set { Fields.InActiveDate[this] = value; }
        }

        IIdField IIdRow.IdField
        {
            get { return Fields.Id; }
        }

        StringField INameRow.NameField
        {
            get { return Fields.FullName; }
        }

        public static readonly RowFields Fields = new RowFields().Init();

        public SalesPersonRow()
            : base(Fields)
        {
        }

        public class RowFields : RowFieldsBase
        {

            public Int32Field Id;

            public StringField First;

            public StringField Last;

            public StringField Code;

            public StringField FullName;

            public BooleanField InActive;

            public DateTimeField InActiveDate;
        }
    }
}

myxyzColumn
    [ColumnsScript("QUOTESDB.SalesPerson")]
    [BasedOnRow(typeof(Entities.SalesPersonRow), CheckNames = true)]
    public class SalesPersonColumns
    {
        [EditLink, DisplayName("Db.Shared.RecordId"), AlignRight]
        public Int32 Id { get; set; }
        [Hidden]
        public String First { get; set; }
        [Hidden]
        public String Last { get; set; }

        [EditLink, Width(180, Max = 180, Min = 100), AlignCenter]
        public String FullName { get; set; }

        [Width(100, Max = 100, Min = 100), AlignCenter]
        public String Code { get; set; }

        [Width(80, Max = 100, Min = 50), AlignCenter]
        public Boolean InActive { get; set; }

        [Width(120, Max = 150, Min = 50), AlignCenter]
        public DateTime InActiveDate { get; set; }
    }

I have found out my SalesPerson Row issues - I had forgot to add those values also the xyzForm.cs .
However I am looking at why my quickfilter is not showing up - It has been applied as an attribute.


Issue when saving a newly added display element

Link to report - https://20229-qc.cortezaproject.org/reporter/304208470234632194/builder
Gif of the issue:

Fixed

What

Reporter chart display element configuration was not properly saved on creation

How

Properly updated the chart display element options when chart type changed

Tested and added the Cl entry. Since everything is already merged I will by straightly closing this issue.


WSL version: <IP_ADDRESS>: no longer able to use external X server with Windows 10 (20H2)

Version
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19042.2486

WSL Version

[ ] WSL 2
[X] WSL 1

Kernel Version
Linux version 4.4.0-19041-Microsoft<EMAIL_ADDRESS>(gcc version 5.4.0 (GCC) ) #2311-Microsoft Tue Nov 08 17:09:00 PST 2022
Distro Version
Ubuntu Release:        22.04
Other Software
emacs 28.1 running in Ubuntu 22.04/WSL1
Repro Steps

Start X server vcXsrv
start emacs on a terminal of Ubuntu 22.04
emacs running in terminal mode, not using the X server running as before

Expected Behavior
The emacs should be started in GUI mode.
Actual Behavior
The emacs was started in terminal mode, not GUI one.
Diagnostic Logs
Some more observations.

My Windows version might be too old to take advantage of WSL2/WSLg to run the Linux GUI applications properly.
Indeed, Ubuntu 22.04 still runs in WSL 1 mode

I'd be happy to be able to use an external X server to run GUI emacs, but I cannot now. Even if I run vcXsrv, the X server would not be used by emacs GUI.
If I could revert back to the earlier version of WSL. I cannot find an earlier version of WSL to restore.

The problem is solved:
Inspired by https://github.com/hubisan/emacs-wsl/blob/master/run-emacs-wsl-1/wsl-1_2-emacs.bat
I changed to the following
export DISPLAY=:0.0

from
export DISPLAY=<IP_ADDRESS>:0.0
then I can start GUI app in Ubuntu/WSL1 again.


Bug: Battery Drain from either MacOS Sonoma or JAX-GPU

Does this issue occur when all extensions are disabled?: Yes/No
Yes

VS Code Version: 1.84.1 (Universal)
OS Version: MacOS 14.1 (23B74)  Darwin arm64 23.1.0

Steps to Reproduce:

Open VSCode
Run JAX code on GPU through VSCode Terminal

I am not sure if this is an issue with Sonoma or with JAX-GPU, since I updated to Sonoma to be able to use JAX-GPU. But since I updated, my battery life has declined considerably, and I believe something with VSCode is to blame.
Activity Monitor indicates that something in VSCode is draining the battery:

I tried disabling extensions etc., but I don't think extensions are the issue since VSCode doesn't appear to be draining battery when I'm not using it. I haven't been using VSCOde much the past few days, which is when this issue started - what I have done is a few hours of coding (not enough to explain this amount of battery drainage) and running some JAX-GPU code through the VSCode Terminal. I believe this is to blame, but the amount of time the code was actually running was maybe 5-10 minutes, it was very short code. You can see that the current usage is close to 0. It's possible the processes didn't end properly, but aren't running now.
I also ran Process Explorer:

Sorry about the lack of specifics relating to reproducing the issue, since I am not sure what's happening.
Thank you!

Does the application causing increased battery consumption change when running the same JAX code from external terminal ?

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Add support for assembly in partial trust mode

Allows the assembly to be used in SQLCLR for example.

Add AllowPartialTrustedCallers assembly attribute
Skip Getter Factories that error out because of partial trust

Hey there, I'd love to include this however I think there could be some optimisation to be done by caching the ValueGetters that are removed as currently every time they will be removed and reset. I don't really have the time to do this but if you'd like to amend your contribution with the change i'd be happy to merge it.
Thanks,

I'll have to do some experiments with this.  My goal on this front was support for SQLCLR embedding the assembly into a database - with this patch, it works, as long as you strictly avoid any of the reflection-based components.  If you throw a pile of dictionaries or XML or lists at it, Nustache runs inside a MSSQL Server like a champ.
The problem is that the errors if you don't are really hairy, and there's no good way for an assembly to know if it's running in a low-trust context other than the exceptions of "you're not allowed to do that" without jumping to a new C# version.
I'll probably have to keep a similar workflow of "just try it and if you get an exception fail over into low-trust-mode" but I would keep a flag and a 2nd listing of "these are the low-trust getter factories, and some better error-messages.  Maybe a global setter to switch it into low-trust mode.
The challenge is that most of the getter factories are fine, it's the actual getters they instantiate that fail in low-trust mode.  That could be handled with polite error messages.
The special problem is, iirc (haven't tried it without my patch in months), PropertyDescriptorValueGetterFactory, where the factory throws a HostProtectionException just checking if it's applicable.
The other problem, of course, is that unit testing low-trust features is agony, so I haven't bothered.  NUnit doesn't have any support of switching trust modes to speak of.

Another option is to use my other library Stubble. It's a little more configuration based which may work better in a low trust environment as you could remove those that. I've never actually done any work in that area but I'd be interested in your findings.
As for this pull request, the implementation with catching the exception does seem like the only real solution but performing that once and then caching that low trust list is probably more efficient although I have no numbers to back that up.


feat(integration): DEMO- NCERT-Tutor Agent Integration

Introducing NCERT Tutor: A Revolutionary Approach to Simplifying Learning
Pull Request for Review
Overview
We are excited to propose the addition of NCERT Tutor, a comprehensive learning solution designed to transform the educational landscape. Leveraging advanced technology, NCERT Tutor aims to make learning more accessible, efficient, and engaging for students. This pull request outlines the vision, future scope, and core functionalities of NCERT Tutor, inviting collaboration and feedback from the development team.
Vision
NCERT Tutor envisions a world where learning is simplified, and students can easily grasp complex concepts through personalized tutoring experiences. Our project targets to:

Enhance learning attitudes and aptitude among students.
Provide extensive support to students preparing for exams.
Automate and ease the processes of memorization and concept revision through autonomous agents.

Future Scope
We are committed to continuously evolving NCERT Tutor by:

Introducing a conversational interface to allow students to ask follow-up questions, incorporating their queries into the learning material.
Implementing interactive flashcards for efficient concept retention and revision, creating an engaging user experience.

Core Functionalities
NCERT Tutor in Action
NCERT Tutor automates the learning process by:

Fetching relevant chapter content from the NCERT website based on user input.
Summarizing the content and creating comprehensive notes and question banks.
Providing a seamless interaction for a personalized tutoring experience.

Technology Stack
NCERT Tutor is built with Python, utilizes Fetch.ai for decentralized agent communication, and incorporates various other technologies for a robust and scalable solution.
Getting Started
Instructions for setting up NCERT Tutor are provided, ensuring an easy start for contributors and users alike.
Your Feedback and Contributions
We invite the development team to review this pull request. Your feedback and contributions are crucial for the growth and improvement of NCERT Tutor. Together, we can make a significant impact on the educational journey of countless students.
For a closer look at our project and its potential, please refer to the attached presentation and video demo. Let's collaborate to make learning a delightful experience for students worldwide.
Links for Further Exploration

deltav  demo here

Video Demo: Watch Here

Project Presentation: View Presentation

We look forward to your valuable insights and suggestions. Together, let's shape the future of education.
Thank you for considering NCERT Tutor as an addition to your platform.

This is a hackathon example and hence needs to be moved from integrations to hackathon examples. Closing the PR in integrations and creating a new PR in hackathon examples with a reference to this one.


Run against a specific server without downloading the full server list.

speedtest-cli --list times out a lot. I'm in Vietnam, so my connection is rough sometimes, but I figure that's when this tool is most useful.
I'm writing a little bash script to results into a csv file on every test run so you can see at a glance wifi network name, speed, date of test and so on. It tries to hit a server in San Francisco so that it tests the cross-pacific connection speed.
speedtest-cli --server 5754 is cool, but it always tries to download the server list before running the actual test, and this often times out. That isn't so cool.
Is there a way to run the test against a specific server without downloading the whole server list? Is this what the --source option is for? It's not explained in the docs, and nowhere is the IP for server 5754 printed.
Here's the bash script, in case you're interested in what I'm up to:
date="$(date +"%Y-%m-%d")"
time="$(date +"%l:%M%p")"
dest=5754
destination="San Francisco [$dest]"
# Split a string at the delimeter 'Network ' into variables 1, 2, etc.
wifi=`networksetup -getairportnetwork en0 | awk -F'Network: ' '{printf $2}'`
outputFile=~/Desktop/sf-speedtest-output.csv

# -------------------------------------------- Say what we're about to do
echo "$wifi --> $destination"
echo "Running speedtest-cli..."

# -------------------------------------------- Start the Test
# Run a command, printing to stdout while it runs, but also saving the output to a variable
exec 5>&1
output=$(speedtest-cli --server $dest | tee >(cat - >&5))

# Parse the output for useful data
down=`echo "$output" | awk -F'Download: ' '{printf $2}'`
down=`echo "$down" | awk -F' ' '{printf $1}'`
up=`echo "$output" | awk -F'Upload: ' '{printf $2}'`
up=`echo "$up" | awk -F' ' '{printf $1}'`
ping=`echo "$output" | awk -F'km]: ' '{printf $2}'`
ping=`echo "$ping" | awk -F' ms' '{printf $1}'`
echo "Speeds: $down/$up mbps. Ping: $ping ms."

# -------------------------------------------- Save to File
# File Format: wifi, downspeed, upspeed, date, time, destination, ping
echo "$wifi,$down,$up,$date,$time,$destination,$ping" >> $outputFile
echo "Test results saved to $outputFile"

Currently there is no way to not pull the full server list.  When you specify a single server we still need the server list to output information about that server.  Speediest.net does not provide a way to get details about only a single server.
Also --source is listed in the --help output as Source IP address to bind to.

Yes, obviously I've read that, both in --help and in README.md. What is a source IP address? is this a server?

I can pull a server IP from the web gui of speedtest but if I drop it in to the source command:
speedtest-cli --source <IP_ADDRESS> // Could not retrieve speedtest.net configuration

Bupkis

The source is where the speedtest originates from which would be where you run this script from.  It allows you to test on different interfaces on your machine.  It has nothing to do with speedtest.net servers.


Logo and menu items are misaligned in headers

https://design.undp.org/?path=/story/components-navigation-components-main-navigation-country-header--country-header
https://design.undp.org/?path=/story/components-navigation-components-main-navigation-global-header--global-header

It seems stylesheet hasn't loaded fully in your case, that's what I see:

I see the same as Adam

Yeah, we just did it interactively and I see it. The issue is not universal so i need to find out why it is happening

Note to myself, it seems the issue appeared between following builds:
last known good build: https://8cd85435.design-system.pages.dev/?path=/story/components-navigation-components-main-navigation-global-header--global-header
next build displaying broken widgets: https://c193c0bb.design-system.pages.dev/?path=/story/components-navigation-components-main-navigation-global-header--global-header
First bad version is based on this commit: https://github.com/undp/design-system/commit/a922da6678662aebe82194ee937ae88010c3bb89

@theadamparker , verify and sign off for release: https://develop.design-system.pages.dev/?path=/story/components-navigation-components-main-navigation-country-header--country-header

@Jura this fix is verified.


TOML parse error: Invalid table header: Duplicate key version

Run ruff . with this pyproject.toml in an empty directory:
# pyproject.toml

[tool.hatch]
version.source = "vcs"

[tool.hatch.version.raw-options]
local_scheme = "no-local-version"

Outputs error only without --isolated in newest 0.0.222:
$ ruff --version
ruff 0.0.222
$  ruff .
error TOML parse error at line 6, column 1
  |
6 | [tool.hatch.version.raw-options]
  | ^
Invalid table header
Duplicate key `version`

$ ruff . --isolated
warning: No Python files found under the given path(s)

This file is parsed fine by other tools, such as Hatchling, python-build, Black, isort etc. Fuller version at https://github.com/hugovk/norwegianblue/
Error both with and without --isolated in 0.0.219:
$ ruff --version
ruff 0.0.219
$ ruff .
error TOML parse error at line 6, column 1
  |
6 | [tool.hatch.version.raw-options]
  | ^
Invalid table header
Duplicate key `version`

$ ruff . --isolated
error TOML parse error at line 6, column 1
  |
6 | [tool.hatch.version.raw-options]
  | ^
Invalid table header
Duplicate key `version`

Error only without --isolated in 0.0.220:
$ ruff --version
ruff 0.0.220
$ ruff .
error TOML parse error at line 6, column 1
  |
6 | [tool.hatch.version.raw-options]
  | ^
Invalid table header
Duplicate key `version`

$ ruff . --isolated
warning: No Python files found under the given path(s)

Looks like both toml and toml_edit fail to parse the toml content, see https://www.rustexplorer.com/b/vthrz3
$ ./playground
Err(
    Error {
        inner: ErrorInner {
            kind: Custom,
            line: Some(
                5,
            ),
            col: 0,
            at: Some(
                55,
            ),
            message: "duplicate key: `version`",
            key: [
                "tool",
                "hatch",
            ],
        },
    },
)
Err(
    TomlError {
        message: "TOML parse error at line 6, column 1\n  |\n6 | [tool.hatch.version.raw-options]\n  | ^\nInvalid table header\nDuplicate key `version`\n",
        line_col: Some(
            (
                5,
                0,
            ),
        ),
    },
)

I'm not familiar with the Rust release process, will this be closed when https://github.com/toml-rs/toml/issues/439 is available in Ruff, so I can just watch this issue? :)

Yeah it should be! I'll try upgrading. It looks like they just cut a release.

Looks like #2040 should close this out.

Sorry, a little confusion with respect to the toml crate -- the upgrade I performed did solve this problem, but it had the potential to introduce some other incompatibilities with TOML 1. So I want to revert for now, just to minimize churn. I expect this to be closed out soon-ish, but we do need a new release. (See: #2058.)

Thank you for the fix, I can confirm this is fixed in 0.0.231.
I'm impressed it only took 9 days for: report to Ruff, report upstream to Rust TOML library, report upstream to the language-agnostic TOML test suite, then the test suite updated and released, then the TOML library updated and released, and then Ruff updated and released!


Cannot return back to Show examples default page after search

Description:
When you do a non-matching search, cannot come back to the default view.

Steps to reproduce:
Affected Versions:
OS, DB, other environment details and versions:
Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

Duplicate of https://github.com/ballerina-platform/plugin-vscode/issues/313


booking-up-for-beauty: misleading example for output format on exercise 5

Description
Exercise 5:

Return the anniversary date of the salon's opening
Implement the AnniversaryDate function that returns the anniversary date of the salon's opening for the current year in UTC.

Assuming the current year is 2020:

AnniversaryDate()

// Output: 2020-09-15

Function signature:
func AnniversaryDate() time.Time {
	// solution here
}

Issue
The output example suggest a formatted time 2020-09-15 which will require a string type, when the function signature requires a time.Time output. Based on exercise instructions, students will use the function time.Date(), which will return a different output.
Suggestion
Use the output for time.Date() and specify that the time of the day doesn't matter:
AnniversaryDate()

// Output: 2020-09-15 00:00:00 +0000 UTC

Good catch, thanks for bringing this to our attention.
I agree with changing the output to 2020-09-15 00:00:00 +0000 UTC as it is what calling String() on a date will output. Along with a clarification that the time of day doesn't matter, might be worth to reinforce that the output is a time.Time representing a date.

I would be fine with this change as a quick fix. Long term we should think about maybe changing the task so that a string is returned there which is really 2020-09-15 and teaching time.Format that way.


Missing lock file

This project does not have a dependency lock file, meaning that future builds are unpredictable and might break at any time (especially since most dependencies in package.json are declared as a version range). Even with fixed versions in package.json, a missing lock files means that there is no control over transitive dependency versions.
The .gitignore file in this repo mentions:

Only apps should have lockfiles

However, this is not true. Libraries, just like apps, should have a lock file. A great and detailed explanation is given at https://yarnpkg.com/blog/2016/11/24/lockfiles-for-all/
Please add a lock file (preferably yarn.lock) to this repository.

I wouldn’t say I’m missing it, bob.
Indeed, only apps should have lockfiles. That the build could break at any time is a feature - because that’s what consumers experience too.
Using a dev-only lockfile like package-lock or yarn.lock is hostile to consumers, since it’s putting the comfort of maintainers before that of users.
As long as i have a say in it, no published project I’m involved in will ever have a lockfile.


[FLINK-25227][table-planner] Fix LEAST/GREATEST to return primitives

What is the purpose of the change
Previously, LEAST and GREATEST functions would return primitive
types in the generated code implementing their logic, producing issues
for operators applied on top of them, and most importantly comparison
operators, i.e.:
f0 INT, f1 INT
SELECT GREATEST(f0, f1) = GREATEST(f0, f1)

would return FALSE, since the generated code would return Integer
instead of int, as the result of GREATEST, and the = operator
on Integer objects would return false, even if the actual integer
value of them was the same.
Brief change log

Change code generation for LEAST/GREATEST to return primitive types instead of boxed, (null is already handled correctly with the use of nullTerms.

Verifying this change
This change added tests and can be verified as follows:

Added more tests in GreatestLeastFunctionsITCase

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changed class annotated with @Public(Evolving): no
The serializers: no
The runtime per-record code paths (performance sensitive):no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? not applicable

Needs to be backported to 1.15 as well.