Performance Issue Report: Performance problem with PooledUnsafeDirectByteBuf#writeZero() method when writing little data

Expected behavior
I expected to achieve good performance even when writing little data.
Actual behavior
However, I noticed a significant decrease in performance when writing little data.
Upon further investigation, I suspect that the root cause of this issue may be related to the suboptimal performance of the jdk/internal/misc/Unsafe.setMemory0 method.
Steps to reproduce
Minimal yet complete reproducer code (or URL to code)
package com.xiaohongshu.infra.benchmark;

import java.util.concurrent.TimeUnit;

import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.profile.AsyncProfiler;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.PooledByteBufAllocator;

/**
 * @author lvshichang
 * Created on 2023-11-08.
 */

@State(Scope.Benchmark)
public class WriteZeroBenchmark {

    private ByteBufAllocator allocator;

    private ByteBuf byteBuf;

    @Setup
    public void setup() {
        allocator = new PooledByteBufAllocator(true);
        byteBuf = allocator.directBuffer(8192);
    }

    @TearDown
    public void release() {
        byteBuf.release();
    }

    @Benchmark
    @BenchmarkMode({Mode.Throughput})
    @OutputTimeUnit(TimeUnit.MILLISECONDS)
    public void writeManual(Blackhole blackhole) {
        byteBuf.markWriterIndex();
        try {
            for (int i = 0; i < 8; i++) {
                byteBuf.ensureWritable(i);
                for (int j = 0; j < i; j++) {
                    byteBuf.writeByte(0);
                }
            }
            blackhole.consume(byteBuf);
        } finally {
            byteBuf.resetWriterIndex();
        }
    }

    @Benchmark
    @BenchmarkMode({Mode.Throughput})
    @OutputTimeUnit(TimeUnit.MILLISECONDS)
    public void writeUnsafe(Blackhole blackhole) {
        byteBuf.markWriterIndex();
        try {
            for (int i = 0; i < 8; i++) {
                byteBuf.writeZero(i);
            }
            blackhole.consume(byteBuf);
        } finally {
            byteBuf.resetWriterIndex();
        }
    }

    @Benchmark
    @BenchmarkMode({Mode.Throughput})
    @OutputTimeUnit(TimeUnit.MILLISECONDS)
    public void writeManualBig(Blackhole blackhole) {
        byteBuf.markWriterIndex();
        try {
            for (int i = 64; i < 128; i++) {
                byteBuf.ensureWritable(i);
                for (int j = 0; j < i; j++) {
                    byteBuf.writeByte(0);
                }
            }
            blackhole.consume(byteBuf);
        } finally {
            byteBuf.resetWriterIndex();
        }
    }

    @Benchmark
    @BenchmarkMode({Mode.Throughput})
    @OutputTimeUnit(TimeUnit.MILLISECONDS)
    public void writeUnsafeBig(Blackhole blackhole) {
        byteBuf.markWriterIndex();
        try {
            for (int i = 64; i < 128; i++) {
                byteBuf.writeZero(i);
            }
            blackhole.consume(byteBuf);
        } finally {
            byteBuf.resetWriterIndex();
        }
    }

    public static void main(String[] args) throws RunnerException {

        Options opt = new OptionsBuilder()//
                .include(WriteZeroBenchmark.class.getSimpleName())//
                .warmupIterations(3)//
                .warmupTime(TimeValue.seconds(10))//
                .measurementIterations(3)//
                .measurementTime(TimeValue.seconds(10))//
                .threads(1)//
                .jvmArgsAppend("-Dio.netty.buffer.checkBounds=false", "-Dio.netty.buffer.checkAccessible=false")

                .addProfiler(AsyncProfiler.class,
                        "libPath=/home/admin/async-profiler-2.9-linux-x64/build/libasyncProfiler.so;output=flamegraph;verbose=true;event=cpu")
                .forks(1)//
                .build();

        new Runner(opt).run();
    }
}

Benchmark Result:
Benchmark                                  Mode  Cnt      Score     Error   Units
WriteZeroBenchmark.writeManual            thrpt    3  14255.164 ± 475.204  ops/ms
WriteZeroBenchmark.writeManual:·async     thrpt             NaN               ---
WriteZeroBenchmark.writeManualBig         thrpt    3     77.641 ±   1.365  ops/ms
WriteZeroBenchmark.writeManualBig:·async  thrpt             NaN               ---
WriteZeroBenchmark.writeUnsafe            thrpt    3   3353.325 ±  64.074  ops/ms
WriteZeroBenchmark.writeUnsafe:·async     thrpt             NaN               ---
WriteZeroBenchmark.writeUnsafeBig         thrpt    3    326.171 ±   5.618  ops/ms
WriteZeroBenchmark.writeUnsafeBig:·async  thrpt             NaN               ---

Netty version
4.1.100.Final
JVM version (e.g. java -version)
JDK 11.0.20, OpenJDK 64-Bit Server VM, 11.0.20+8-LTS
OS version (e.g. uname -a)
3.10.0-514.10.2.el7.x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

There are a few issues in your benchmark that I think need to be fixed first to ensure the benchmark is meaningful:

Your methods should either use a BlackHole or return something so it might not get optimised away.
You should create a new ByteBufAllocator in a @Setup method to ensure that you not benefit from already cached buffers in one case.

Even better would be to just allocate the buffer once and reuse it.

It seems that despite making modifications based on the suggestions , the JMH test results remain consistent.

#5315 I don't think this pull request has enough evidence of improved performance.

Please try with a most recent version and...I see that the methods up there aren't inclined, which is weird. Please attach the perfasm data or the compiler logs to be sure of it OR just do not inline (there's a compiler control annotation for that) the benchmark method, to grant  inclining depth to be just enough to have while chain of methods fully inlinied.
Secondary, add a test which force a blackhole consume on each write op or we risk to measure how good autovectorization is, I'd kick in (which isn't likely not implemented for setMemory iirc).
Last but not least, clarify yourself first what is what you want to measure and what the real code will look like (and if it can even be reproduced) ie are you using setZero for some reason like that? What is the context of it? Is it slowing down the surrounding code?

I am a developer of Thrift's RPC framework, and the THeader protocol needs to add 0-4 bytes of padding. I used the writeZero method to add padding. But in the production environment, the flame graph shows that the padding accounts for a significant width. Compared with the serialization of the actual fields, the padding should be very small. This phenomenon aroused my suspicion, so I did the above JMH test.

Thanks for the clarification, if you have a proper prod code, I stil believe is not what you would exactly would do for maximum speed
eg
writeManual is writing 8 zeros, while writeUnsafe is writing 1 + 2 + 3 + ... + 8 = n * (n + 1)/2  = 72 bytes according to https://netty.io/4.1/api/io/netty/buffer/ByteBuf.html#writeZero-int- API, where the parameter length determine how many zeros are placed.
This should be fixed by replacing the loop with a single writeZero call.
Assuming the actual code in Thrift is instead using the buffer API correctly, there are still inherent inefficiencies of Unsafe's setMemory implementation for very small lengths (smaller than the word's size and more, given that the underlying JDK impl could rely on the platform one, which in turn has some bootstrap cost, if vectorized, see https://github.com/real-logic/agrona/blob/5acc4a8e0cbc3a740ac15b0421b900a03bb6565a/agrona/src/main/java/org/agrona/AbstractMutableDirectBuffer.java#L77 and https://github.com/real-logic/agrona/blob/5acc4a8e0cbc3a740ac15b0421b900a03bb6565a/agrona-benchmarks/src/main/java/org/agrona/concurrent/SetMemoryBenchmark.java#L38)  AND that writeXYZ has to move forward writers index each time too, which means performing one tiny more operation for each tiny operations, doubling the work (I suggest instead, for Thrift to use the setXYZ variants in Netty, and just move the writer index manually at the end, while done).
I can both check to open a JDK issue and send a Netty change to do something similar to what Agrona does, but given that there things are usually done using "magic" thresholds which not always hold for every possible architecture and operating system, I strongly encourage you to consider my point related writer indexes AND try in your specific case yourself (replacing the variable single zero write with a mix of setByte/setShort/setInt based on length of the padding)

But before sending a PR, to improve it: @normanmaurer wdyt? if you are against adding paths to improve it, which is, IMO (yet to measure), with 2 different mindsets:

option 1: trying to do better then the JDK (ie by making memset to happen more often) AND tiny writes to avoid the thread-state barriers due to Unsafe::setMemory0
option 2: just makes tiny writes to work better (adding a special code path for <= 8 bytes - or slightly more)

lmk

@franz1981 I think option 2 might be something we could consider.

Sending a PR now, @imangry can give it a shot


feat(Algebra/Homology): the symmetry of the total complex

[x] depends on: #10711

bors merge


Greatly enhanced Apple Music capability

With enhanced functionality that has just been published to sonos-http-api, you now have native Echo-like song playing capabilities for Apple Music.  Added capabilities for:

Queue and play up to 50 of the most popular tracks for an artist name
Play a song title
Play a combination of artist name and song title
Play an Apple Music Radio station based on an artist name, song title, or combination of artist name and song title
Queue and play of to 50 of the most popular tracks for the artist that is currently playing
Start playing a radio station based on the current artist and song title that is playing

Great - I'm looking forward to this functionality myself.  It looks like you removed the "preset" syntax, though?  We'll have to furnish a replacement (maybe something like "run preset") and document that, since it's historically been the primary use case

Sounds good. It conflicted directly with the simplicity of being able to say "Play SONG/AUTHOR in ROOM" .  I was actually just trying to remove the Play intent and didn't think about Play PRESET.  I like your idea about redoing it as "Play preset PRESET".  Will you put it back in or would you like me to?

I'm putting the Play preset in now...

I have added it back.  The only difference from the earlier version is the utterance.  You now say "Play preset PRESET".

  It seems a shame to effectively disable the "play" utterance for everyone who does not use Apple Music.
I suggest a minor change to make it friendlier for everyone:

Keep "play preset PRESET"
Change "play" to only use Apple Music if an option is set in options.js.  Maybe something like "musicservice = 'apple'".  Default would be false.  Opens the door to adding 'spotify' and other services later.  I'm imagining this is basically an if->then in index.js' PlayIntent.  If the option is 'apple' then use apple; otherwise default to using a preset, calling the same function that "play preset PRESET" would call.

Hi Ryan,
I like your idea to have an option to point to a user’s preferred default music service.  One question though, the PRESETS have a defined slot while the “music” services have to use the LITERAL in order to accommodate the millions of potential tracks and artists.  How would the option handle a change in the utterance?  I suppose that the preset could switch to a LITTERAL too, but I think that you might lose some accuracy.   Understand that the iTunes search uses a fuzzy search so the Alexa interpretation just has to be close, not exact.  The defined slot search is supposed to work in a similar fashion but I found that the accuracy dropped off significantly without the predefined presets.
Maybe the way to handle it is keep play “preset” PRESET, but have the configurable option (Apple, Spotify, etc., Presets) use the LITTERAL slot instead of the PRESETS slot.  If you are willing to incorporate fuse.js (https://github.com/krisk/Fuse ), then it will always find the best match.  This is what I’ve done with the SiriusXM functionality in Jimmy’s node-sonos-http-api solution (beta) to find the right channel name and/or number.  It works very well.
BTW,
I have the solution updated for the new beta node-sonos-http-api being worked on that is almost complete.  I’ve added support for SiriusXM and I’m finishing up Pandora now.
[cid:image001.gif@01D1C591.E0D3C600]http://www.infor.com/
Jim Plourde | VP Cloud Services
mobile:<PHONE_NUMBER> | office:<PHONE_NUMBER> | jim.plourde<EMAIL_ADDRESS>| http://www.infor.comhttp://www.infor.com/
From: Ryan Graciano<EMAIL_ADDRESS>Reply-To: rgraciano/echo-sonos<EMAIL_ADDRESS>Date: Monday, June 13, 2016 at 1:38 AM
To: rgraciano/echo-sonos<EMAIL_ADDRESS>Cc: James Plourde<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [rgraciano/echo-sonos] Greatly enhanced Apple Music capability (#30)
I like this feature a lot, but it's only available for those who have Apple Music. It seems a shame to effectively disable the "play" utterance for everyone who does not use Apple Music.
I suggest a minor change to make it friendlier for everyone:

Keep "play preset PRESET"
Change "play" to only use Apple Music if an option is set in options.js. Maybe something like "musicservice = 'apple'". Default would be false. Opens the door to adding 'spotify' and other services later. I'm imagining this is basically an if->then in index.js' PlayIntent. If the option is 'apple' then use apple; otherwise default to using a preset, calling the same function that "play preset PRESET" would call.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/rgraciano/echo-sonos/pull/30#issuecomment-225492991, or mute the threadhttps://github.com/notifications/unsubscribe/ASedkOr5eH7Lbc_HLfV_nrb-U0U1aXJqks5qLOzWgaJpZM4IjygE.

After thinking about it, since "play {preset}" has no room and the presets are well defined, I don't think that this will collide with the Music intents.  I still like your "options" idea for being able to integrate other music services with the same Music intents.

Hey guys,
I'm super interested in this feature (about to get an Echo Dot as we speak). As an avid Apple Music and Sonos user, this feature closes the loop for home music automation for me.
If there is anything you need to help moving this forward (code, testing, whatever), let me know. Happy to help!

You can use this to test if you like.  The master branch works with the master branch of node-sones-http-api and the beta branch works with the beta branch of n-s-h-a

I'd love to add Spotify integration. It looks like I'd need to add Spotify searching on node-sonos-http-api, and then add the Echo functionality here. Would people be interested in this?

Just answered your post on jishi's project. I've created a new service called musicSearch that extends what I did for appleMusic to Spotify and I will add others. I'll then enhance what I did here to add a Config setting that will allow someone to choose which service to use for the same intents that now only support Apple Music.

I meant to add that I already have Spotify working in the new service.  As I indicated in jishi's project, I'll submit it when I get back around the 7th.

musicSearch now supports Apple Music, Spotify, and Deezer.  A pull request has been submitted on the beta branch of node-sones-http-api and it is already available on my beta branch.  I'm working on the echo-sonos functionality now.  A new musicService setting in options.js will allow you to specify which music service to use.  The default is Apple Music.  I'll submit a pull request here once I finish testing the echo-sonos changes.

@jplourde5 - sounds great. Looking forward to trying it out

I'll submit it as soon as it gets pushed into node-so is-http-api.

@jplourde5 I'm looking over the code for this. How hard would it be to add musicSearch support for the queue or Sonos music library? I have a network hdd with ~2000 mp3s on it. Using the node-sonos-http-api you can use http://localhost:5005/living room/queue/[start-index]/[count] to get the queue in json. This gives you the song file uri and names. I noticed if you only use the /queue it only gives the first 500 songs. If you request start index 0 and count of 2000 it still only gives you the first 1000 songs.  I was going to play around with grabbing the first 1000 then requesting the second 1000 and add them together, then use the fuzzy search to find the song and get the uri to send to Sonos to play.
I'll start playing with it as I have time. I figured I'd mention it to you as well since you already know how this works and it might be simple for you to add in. Thanks for all the work on the new additions!

Already working on it.

I just wanted you to know that I'm very excited about this. I just installed my new Sonos system, have an echo and use Apple Music, and would love to link it all together. I was so excited when I saw this.
Thanks for all your (and rgraciano's) work!

I wanted to set this up this weekend at my house. If I understand this correctly, then I should use jplourde5/echo-sonos/beta (not rgraciano/echo-sonos)? Are there plans to merge these changes to rgraciano/echo-sonos?

Correct.  I got everything working last night.  I want to do a little more testing once I wind down from my day job ;).  I'll then create releases for both of my branches, node-sones-http-api-beta and echo-sones, and post the links (which you can probably figure out anyway).

@jplourde5 - Awesome! Thank you for all your hard work!

@jplourde5 thanks so much for doing this!  Can you let us know when this is pulled in? I attempted to get it working but it seems like the beta (from your fork) version of n-s-h-a doesn't understand the musicsearch action route.

You have to use my distributions for now while it is being tested. The nsha is built on jishi's beta branch which is working well. Echo-Sonos is built on the main branch and I'm shooting for the default behavior to be the same as the original.

Is there any current/planned functionality for playing artists from Amazon Music?
Currently, is it just through "favorites" or "playlists"?

I should be able to add it fairly easily.  Are you using this with the Echo?  If so, we are testing the echo-side now.  The node-sones-http-api side is solid.  We are still working on some utterance tuning for the echo.  It is working great for me and another tester. Two others are having problems with consistency that we are trying to figure out now.

I would be using it with Echo. I have not yet over to your fork; it is currently setup with the rgraciano build.

Great.  Let us finish working through the echo-sonos testing and it should be easy to add Prime support.

pjkottke, looking for a public music search api for Amazon Music and I'm coming up empty. I can't add support without a search api.  Let me know if you can find one and I'll take a look.

I'll take a look, but after a brief search it doesn't look good. I may have misunderstood the current end-goal of the project. I was hoping to be able to speak the name of an artist I have in my personal Amazon library. Is the current implementation for streaming services only (Apple Music, Spotify, etc.)? Maybe I just need to get a Spotify account again...

musicSearch supports Apple Music, Spotify, Deezer, and the Sonos local music library. Other services can be added but there has to be a public api for searching for the music.

Switching the skill trigger from Sonos to sonos fixed it for me too!
Now I have a new request... Is it possible to automatically shuffle the music played? For example, if you say "alexa ask sonos to play artist the rolling stones", then on Apple Music you will always hear Gimme Shelter first. Doing the same natively on Echo will usually start with a different song each request.

I've kicked the thought around a few times, but didn't do it because there are already commands for shuffle mode and repeat. Another challenge is that you may get the same first song regardless, because I purposely don't wait for the entire queue to be loaded before playing. The other thing to note if you turn shuffle on is that you will always want repeat on also because the first song playing gets pushed down into the queue as the other tracks load and the songs added above will not play unless repeat is on.  This all mainly comes about because Sonos now loads the queue in random order instead of playing the queue in random order like it used to do.
Thoughts?


update setup.py to use requirements.txt

Summary
Update setup.py to use requirements.txt.
This is discussed in Terra Qiskit/qiskit-terra#1586.
Details and comments

I agree with this change, however the PR #45 adds the following line to requirements.txt:
--extra-index-url https://pypi.gurobi.com

This is one of those flags that only works on requirements.txt but will fail on setup.py. If that PR goes ahead with that then we cannot use requirements.txt in setup.py. I will add a hold to this PR pending a decision next meeting.

I think gurobi should be extra_required. Then, it is not included requirements.txt and this PR works.

Unfortunately because gurobipy is hosted on a private pypi site, it doesn’t work in setup.py via setuptools for security reasons. It can’t currently be in install_requires or extra_required. I will probably just remove it from requirements.txt in the other PR and the approve this one.

I have a worry to include a private pypi site in requirements.txt because our CI may fail due to their server error.

Exactly, that is why I want to remove it from requirements.txt in the other PR and let the users install themselves.


[SC-304] SC custom resource to manage products

AWS cloudformation does not support product deprecation so we've
been doing it manually however that's been an error prone process.
We need an automated way to deprecate products versions on every
update.
This PR provides a general custom resource to manage service catalog
products.  A function has been added to deprecate product versions.

closing messed up PR


Suppress an error when doing SM2 sign/verify ops

This was fixed in #8321 right after the 1.1.1 was released but never
back ported to 1.1.1. Now fix it.
Issue reported from lua-openssl project.

Hope I have added to right labels according to what was discussed on last week's f2f meeting ;-)

Pushed to 1.1.1 as 325c9ac198, thanks.


Development env. deployment

Due to decommission of AWS, we need to switch Development/Playground environment deployment to something like dev.winden.app on OVH.
This might require to have separate branch like dev, where all such changes first are merged there and then PRs created to main branch.
Long term solution could be, that each PR with be deployed separately with sort of prefix.

I would really like to avoid another branch. That's a lot of extra work. Could it be tag-based instead at least? (e.g. "whatever is in the playground" is based on some tag)
It's also probably not ideal to have it as a subdomain of the "real" application, as cookies and same-origin etc can "leak" unexpectedly.


fix unable to download tails file error when tails directory not exists.

Checklist

[x] have run AriesFrameworkTests
[x] I have run AllTests

Description
There's no tails folder in document in first place which cause fail to download tails file.

I should have created the folder first. Thanks.


feat: use Lake to resolve modules (WIP)

This is just a proof of concept of the idea we have been tossing around on the Zulip thread. The Lake changes needed to make it work are not even part of the PR yet However, this proof of concept does demonstrate a few design decision that I think are worth discussing before (and if) this change moves forward.

Leanpkg support. Most relevant Lean 4 projects have migrated to Lake. Thus, is it fine to drop leanpkg support in the server and simply have one code path which goes through Lake? Or should an alternate code path retaining the old behavior be kept for now?

Resolving modules in the lean CLI. Currently Lake is only used in the server to resolve modules. The direct lean command line interface will still just use LEAN_PATH as before. Conceivably, this could be changed as well by having a new LEAN_MODUULES environment variable that contains preresolved module to olean mappings (in JSON form). The lean executable could even conceivably call out to lake print-paths to build these on the fly if LEAN_MODULES is empty. Some road bumps to this approach are: (i) Lake does not exist in stage 0, so the latter strategy would not function there yet, (ii) replacing LEAN_PATH with LEAN_MODULES would require an update to an code not using Lake run Lean code. However, this could be avoided by still falling back to LEAN_PATH resolution for the time being (thus having both LEAN_PATH and LEAN_MODULES support).

Import-specific error messages. In the current proof of concept, the new system is only used to provided per-import "could not find olean for X" messages. This could be further augmented by adding a per-module errors field to the interop, thus allowing the server to show per-import build errors.

Missing import tolerance. Should the server continue elaboration even if some modules are missing?

That time when you misspell feat as fear and don't notice until the bot informs you. 🤣

Closing, we should revisit when we have more pressing needs for more granularity in LEAN_PATH


CockroachDB 23.1: Detecting comments even though there are none

Bug description
We are currently not testing CockroachDB 23.1, and when they rolled out that version to their cloud product we noticed several regressions in Introspection.
Via the example of Introspection warnings:
For https://github.com/prisma/database-schema-examples/blob/main/postgres/noalyss-account/schema.sql:
22.1:
// *** WARNING ***
//
// The following models were ignored as they do not have a valid unique identifier or id. This is currently not supported by Prisma Client:
//   - "theme"
//
// These constraints are not supported by Prisma Client, because Prisma currently does not fully support check constraints. Read more: https://pris.ly/d/check-constraints
//   - Model: "audit_connect", constraint: "valid_state"
//
// These objects have comments defined in the database, which is not yet fully supported. Read more: https://pris.ly/d/database-comments
//   - Type: "model", name: "dossier_sent_email"
//   - Type: "field", name: "dossier_sent_email.id"
//   - Type: "field", name: "dossier_sent_email.de_date"
//   - Type: "field", name: "dossier_sent_email.de_sent_email"
//   - Type: "field", name: "dossier_sent_email.dos_id"
//   - Type: "model", name: "user_global_pref"
//   - Type: "field", name: "user_global_pref.user_id"
//   - Type: "field", name: "user_global_pref.parameter_type"
//   - Type: "field", name: "user_global_pref.parameter_value"

23.1:
// *** WARNING ***
//
// The following models were commented out as we could not retrieve columns for them. Please check your privileges:
//   - "dossier_sent_email"
//   - "user_global_pref"
//
// The following models were ignored as they do not have a valid unique identifier or id. This is currently not supported by Prisma Client:
//   - "dossier_sent_email"
//   - "theme"
//   - "user_global_pref"
//
// These items were renamed due to their names being duplicates in the Prisma Schema Language:
//   - Type: "model", name: "dossier_sent_email"
//   - Type: "model", name: "dossier_sent_email"
//   - Type: "model", name: "user_global_pref"
//   - Type: "model", name: "user_global_pref"
//
// These constraints are not supported by Prisma Client, because Prisma currently does not fully support check constraints. Read more: https://pris.ly/d/check-constraints
//   - Model: "audit_connect", constraint: "valid_state"
//
// These objects have comments defined in the database, which is not yet fully supported. Read more: https://pris.ly/d/database-comments
//   - Type: "model", name: "audit_connect"
//   - Type: "model", name: "dossier_sent_email"
//   - Type: "field", name: "dossier_sent_email.id"
//   - Type: "field", name: "dossier_sent_email.de_date"
//   - Type: "field", name: "dossier_sent_email.de_sent_email"
//   - Type: "field", name: "dossier_sent_email.dos_id"
//   - Type: "model", name: "dossier_sent_email"
//   - Type: "model", name: "progress"
//   - Type: "model", name: "recover_pass"
//   - Type: "model", name: "theme"
//   - Type: "model", name: "user_global_pref"
//   - Type: "field", name: "user_global_pref.user_id"
//   - Type: "field", name: "user_global_pref.parameter_type"
//   - Type: "field", name: "user_global_pref.parameter_value"
//   - Type: "model", name: "user_global_pref"
//   - Type: "model", name: "version"
//

Diff:
--- C:/Users/Jan/Desktop/left	Sat Jun 24 01:16:58 2023
+++ C:/Users/Jan/Desktop/right	Sat Jun 24 01:17:01 2023
@@ -1,18 +1,38 @@
 // *** WARNING ***
 //
+// The following models were commented out as we could not retrieve columns for them. Please check your privileges:
+//   - "dossier_sent_email"
+//   - "user_global_pref"
+//
 // The following models were ignored as they do not have a valid unique identifier or id. This is currently not supported by Prisma Client:
+//   - "dossier_sent_email"
 //   - "theme"
+//   - "user_global_pref"
+//
+// These items were renamed due to their names being duplicates in the Prisma Schema Language:
+//   - Type: "model", name: "dossier_sent_email"
+//   - Type: "model", name: "dossier_sent_email"
+//   - Type: "model", name: "user_global_pref"
+//   - Type: "model", name: "user_global_pref"
 //
 // These constraints are not supported by Prisma Client, because Prisma currently does not fully support check constraints. Read more: https://pris.ly/d/check-constraints
 //   - Model: "audit_connect", constraint: "valid_state"
 //
 // These objects have comments defined in the database, which is not yet fully supported. Read more: https://pris.ly/d/database-comments
+//   - Type: "model", name: "audit_connect"
 //   - Type: "model", name: "dossier_sent_email"
 //   - Type: "field", name: "dossier_sent_email.id"
 //   - Type: "field", name: "dossier_sent_email.de_date"
 //   - Type: "field", name: "dossier_sent_email.de_sent_email"
 //   - Type: "field", name: "dossier_sent_email.dos_id"
+//   - Type: "model", name: "dossier_sent_email"
+//   - Type: "model", name: "progress"
+//   - Type: "model", name: "recover_pass"
+//   - Type: "model", name: "theme"
 //   - Type: "model", name: "user_global_pref"
 //   - Type: "field", name: "user_global_pref.user_id"
 //   - Type: "field", name: "user_global_pref.parameter_type"
-//   - Type: "field", name: "user_global_pref.parameter_value"
\ No newline at end of file
+//   - Type: "field", name: "user_global_pref.parameter_value"
+//   - Type: "model", name: "user_global_pref"
+//   - Type: "model", name: "version"
+//
\ No newline at end of file

There seem to be two big problems:

Some columns are detected as "could not retrieve columns".
Many more object are detected to have comments

Problem #2 was tried to be resolved via https://github.com/prisma/prisma-engines/pull/4055 (waiting confirmation)


Contacts page

List information clearly and in a good manner to view

Added in ff32439
Also I'm not dead... Yet
~Brian


First-class multi-sig support

Step 1: Decide on implementation
We can choose between

off-chain authorization aggregation (multiple signatures on one transaction) or
on-chain authorization aggregation (multiple independent transactions to trigger an action).

1. off-chain authorization aggregation
Advantages: compatibility with the Comos multisig  method (multiple pubkey squeezed into one multisig "pubkey")
Disadvantages: sequence numbers must not change during the signing process (i.e. a user that signed must not broadcast a different transaction until the multisig transaction is comitted); starting with Stargate, the signing mode must be coordinated before composing the transaction; off-chain infrastructure requires to aggregate the signatures.
2. on-chain authorization aggregation
Advantages: signing process is independent (one single signature tx per authorization); can be implemented nicely in wallets that track the authorization state
Disadvantages: higher fees due to multiple transactions; not yet standardized as far as I know
Option 2. can either be implemented using groups accounts (do they exist yet?) or CosmWasm.
Step 2: Implement

I would aim for Option 2 - doing on-chain aggregation.
This is both more flexible and likely to be more supported once groups or CosmWasm are enabled on a chain. Option 1 seems more legacy, and even after 1.5 years, there is no better way to aggregate these sigs than a cli and sending files over telegram

On-chain authorization aggregation it is. Blocked by implementing a multisig contract now.

https://github.com/CosmWasm/cosmwasm-plus/tree/master/contracts/cw3-fixed-multisig has been implemented for a few weeks now. You can use that implementation to develop multisig. The cw3 spec is fixed (unless you raise issues with it), and I will be adding more complex implementations for it with different init/admin features, but the actual propose/vote/execute logic (using the multisig) will remain the same.
Unblocked

There was request for clarification before you can start on this. I will make an attempt to clarify and please ask questions of what is still poorly defined:
We want a high-level interface for using multisigs. Right now, we focus on the "on-chain aggregation" approach, using cosmwasm cw3 contracts. We should be able to expose a similar (or identical) API backed by sdk "group module" if/when that is implemented (but providing a very similar UX). We should be able to eventually design a "off-line signature aggregation" process inspired by this work.
Ideal User flow (wallet) - submission:

Enter a multisig address and "assume identity" (wallet checks if you are a member)
When using an app, show all queries as the multisig
When hitting eg. "send tokens" or "buy name" in a dApp, instead of signing the tx directly, this should trigger a "multisig proposal"
Ideally this should require no changes to the calling app (and handled transparently in some pre-signing processor), in practice it may require a different format, but should be easy for an dApp to support both.

User flow - approval:

Enter a multisig address and view current open proposals
Click on a proposal to see what was going to be signed along with an (optional) reason/note
Easy approve/reject/execute interface

Note: adding subkey support may be a simpler (but related) workflow that should fit in the same icf milestone and may be a good way to get started here.

For code flow and the lower-level API we want to wrap, please refer to the cw3 spec. That should be considered in draft form, so if you want to modify this API in order to provide better UX, please add issues on cosmwasm-plus for that.


Quizapp project : Adding the feature of picking random question from the quizData

Is your feature request related to a problem? Please describe.
No, it's not a problem. I tried to enhance the functionality of the quiz app project listed in the repository.
Describe the solution you'd like
The quizapp.js file in the assets folder of the project shows all the questions index-wise. I want to add the feature where the random question appears every time and no question is repeated
Additional context
With this feature, the complexity of the Quiz game increases as the user doesn't know which question would appear now.

Please assign this issue to me under GSSOC'21 and label to it.

@Vishal-raj-1 @urvashi-code1255 Please assign this issue to me under gssoc'21

@ridsuteri Please assign this issue to me under GSSOC'21


lr_find suggestion ignores lr steps

🐛 Bug
lr_find computes suggestions using np.gradient() but only provides the array of losses, ignoring the lr at which each loss was computed. As such, np.gradient() assumes homogenous stepping size, which is not true when using exponential mode, which is the default mode.
This is visible here: https://github.com/Lightning-AI/lightning/blob/acd4805f1a284e513272d150de6f98f27a0489b3/src/pytorch_lightning/tuner/lr_finder.py#L201
Which is executed irrespective of the mode.
Possible fix of suggestion() in lr_finder.py (I'm not addressing the already present TODO):
losses = np.array(self.results["loss"][skip_begin:-skip_end])
losses = losses[np.isfinite(losses)]
lrs = np.array(self.results["lr"][skip_begin:-skip_end])
lrs =  losses[np.isfinite(losses)]

if len(losses) < 2:
    # computing np.gradient requires at least 2 points
    log.error(
        "Failed to compute suggestion for learning rate because there are not enough points. Increase the loop"
        " iteration limits or the size of your dataset/dataloader."
    )
    self._optimal_idx = None
    return None

# TODO: When computing the argmin here, and some losses are non-finite, the expected indices could be
#   incorrectly shifted by an offset
# Kotchin's note: simulatneous attempt at addressing the TODO
min_grad = np.gradient(losses, lrs).argmin()
self._optimal_idx = np.arange(len(self.results["loss"]))[skip_begin:-skip_end][np.isfinite(losses)][min_grad]
return self.results["lr"][self._optimal_idx]

To Reproduce
It's trivial, but here's a minimal code to highlight how this matters:
import matplotlib.pyplot as plt
import numpy as np

losses = np.sin(np.arange(0, 6, 0.1))
lrs = np.exp(np.arange(-9, -1, (-1 - -9)/len(losses)))

plt.plot(lrs, losses)
min_grad_pl = np.gradient(losses).argmin() # Current PL implementation
plt.scatter(lrs[min_grad_pl], losses[min_grad_pl], c='red', label='PL suggestion')
min_grad = np.gradient(losses, lrs).argmin() # Expected PL implementation
plt.scatter(lrs[min_grad], losses[min_grad], c='green', label='expected suggestion')
plt.xscale('log')
plt.legend()
plt.xlabel('lr')
plt.ylabel('loss')
plt.show()

Executing the code below will yield the follow illustration which should highlight the issue:

Expected behavior
Yield the correct lr suggestion, accounting for the non-homogeneous lr steps.
Environment
pytorch-lightning 1.7.1
python 3.10.4
Additional context
EDIT: added code suggestion placement detail.
EDIT2: Attempt at addressing the TODO in the suggestion() function.
cc @akihironitta @borda @rohitgr7

I'm facing some github issues so I can't actually make a PR myself, but I wanted to share the below code which I'd propose to make it work, addressing the commented TODO in the passing, hopefully in a satisfactory way. This is intended as a drop-in replacement for the suggestion() function:
    def suggestion(self, skip_begin: int = 10, skip_end: int = 1) -> Optional[float]:
        """This will propose a suggestion for an initial learning rate based on the point with the steepest
        negative gradient.

        Args:
            skip_begin: how many samples to skip in the beginning; helps to avoid too naive estimates
            skip_end: how many samples to skip in the end; helps to avoid too optimistic estimates

        Returns:
            The suggested initial learning rate to use, or `None` if a suggestion is not possible due to too few
            loss samples.
        """
        losses = np.array(self.results["loss"][skip_begin:-skip_end])
        lrs = np.array(self.results["lr"][skip_begin:-skip_end])
        is_finite = np.isfinite(losses)
        losses = losses[is_finite]
        lrs =  lrs[is_finite]

        if len(losses) < 2:
            # computing np.gradient requires at least 2 points
            log.error(
                "Failed to compute suggestion for learning rate because there are not enough points. Increase the loop"
                " iteration limits or the size of your dataset/dataloader."
            )
            self._optimal_idx = None
            return None

        min_grad = np.gradient(losses, lrs).argmin()
        all_losses_idx = np.arange(len(self.results["loss"]))
        idx_non_skipped = all_losses_idx[skip_begin:-skip_end]
        idx_finite = idx_non_skipped[is_finite]
        self._optimal_idx = idx_finite[min_grad]
        return self.results["lr"][self._optimal_idx]

This has been validated on the following snippet of code:
import lightning as L
from lightning.pytorch.demos.boring_classes import BoringDataModule, BoringModel
import torch, torchvision
import matplotlib.pyplot as plt

#https://pytorch-lightning.readthedocs.io/en/stable/advanced/training_tricks.html#learning-rate-finder

L.seed_everything(42)

class LitModel(L.LightningModule):
    def __init__(self, lr=1e-4):
        super().__init__()
        self.l1 = torch.nn.Linear(28 * 28, 10)
        self.lr = lr

    def forward(self, x):
        return torch.relu(self.l1(x.view(x.size(0), -1)))

    def training_step(self, batch, batch_idx):
        x, y = batch
        y_hat = self(x)
        loss = torch.nn.functional.cross_entropy(y_hat, y)
        return loss

    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters(), lr=self.lr)

class MNISTDataModule(L.LightningDataModule):
    def __init__(self, data_dir: str = "path/to/dir", batch_size: int = 32):
        super().__init__()
        self.data_dir = data_dir
        self.batch_size = batch_size

    def setup(self, stage: str):
        self.mnist_test = torchvision.datasets.MNIST(self.data_dir, train=False, download=True, transform=torchvision.transforms.ToTensor())
        self.mnist_predict = torchvision.datasets.MNIST(self.data_dir, train=False, download=True, transform=torchvision.transforms.ToTensor())
        mnist_full = torchvision.datasets.MNIST(self.data_dir, train=True, download=True, transform=torchvision.transforms.ToTensor())
        self.mnist_train, self.mnist_val = torch.utils.data.random_split(mnist_full, [55000, 5000])

    def train_dataloader(self):
        return torch.utils.data.DataLoader(self.mnist_train, batch_size=self.batch_size)

boring_model = LitModel()
boring_dm = MNISTDataModule(data_dir='MNIST_tmp/')

trainer = L.Trainer(   logger=False,
                        enable_checkpointing=False,
                        auto_lr_find=True)
lr_finder = trainer.tuner.lr_find(boring_model, boring_dm)

# Results can be found in
print("LR finder results:", lr_finder.results)
# Pick point based on plot, or get suggestion
new_lr = lr_finder.suggestion()
print("Found LR:", new_lr)

plt.plot(lr_finder.results['lr'], lr_finder.results['loss'], color='blue', label='lr finder loss')
#plt.xscale('log') # Can comment out leave in to compare the results as it can be difficult to see optimal lr in log scale
ymin, ymax = plt.ylim()
plt.vlines(new_lr, ymin, ymax, color='red', label='suggestion')
plt.legend()
plt.show()

Previously, optimal lr was 0.09120108393559097 and now optimal lr is 0.0007585775750291836. 2 orders of magnitude of difference.
This was tested on:
python=3.10
torch=1.12
torchvision=0.13
lightning=1.9.0.dev0

@Borda this seems like a drop-in replacement. I can open a PR with this code if @kotchin has issues/does not want to do that anymore. What do you think?

@mrembalski indeed, I'm still facing the same issue on my account and have had to halt all MR... If anyone else is willing to merge, it would be helpful.


Sometimes, Error happened when I use s3-select

TraceBack is
raise EventStreamError(parsed_response, self._operation_name)

botocore.exceptions.EventStreamError: An error occurred (TruncatedInput) when calling the SelectObjectContent operation: The GZIP deflator finished before all input data was read.
I don't know why it happened
Sometimes.

This error is actually coming back from the service. It sounds like the compressed file stored in S3 is either corrupt or the service is otherwise having some issue decompressing the file correctly. Since this is happening on the service side we won't be able to help you much. Try asking on the S3 service forum here.

Hi,
Is this issue solved?What is the root cause of the error? I am also facing the same issue when concurrent threads post the request (during load test)
Is this the problem with S3 select or S3 while zipping the access logs?


SHA1.h misses #include  for the definition of ULONG_MAX

resulting in SHA1.cpp usint UINT_32=unsigned int, and other sources using UINT_32=unsigned long

Good catch!
Preparing a fix...

See #1312 as proposed solution. I strongly suspect this is also the underlying issue for #1298.


Move metadata package to the public API

Motivation:
We need to expose a MetadataService to a Plugin via a
PluginContext, but to no avail because MetadataService is not part
of the public API.
Modifications:

Rename server.internal.metadata to server.metadata.
Move User and UserWithToken from server.internal.admin.auth to
server.metadata.

Result:

It is now possible to expose MetadataService in PluginContext.

Note that we do not expose a MetadataService to a Plugin just
yet. It will be done in a follow-up PR.

Thanks!


Filling in current_file in FileDialog causes two !is_inside_tree() errors

Godot version:
3.0.2
Issue description:
If a scene contains a FileDialog with it's current_file property filled in it will produce two errors:
Condition ' !is_inside_tree() ' is true.
----------
Type:Error
Description:
C Error: Condition ' !is_inside_tree() ' is true.
C Source: scene\gui\control.cpp:2067
C Function: Control::grab_focus

This happens when the scene loads
Steps to reproduce:
Make a scene, add a FileDialog, fill in the current_file property and load the scene.
Minimal reproduction project:
file_dialog_error.zip
The scene is called Control.tscn, load it and the errors will occur

I notice this only happens if the contents of current_file has a period in it.

Just happened to me too.


Add Vault.gg

They are another NA CEVO/ESEA team. Also, this is my last add for today ;)

You can add as much as you like. I'll try to keep updating as much as possible :)

Okay. Just didn't want to spam you. Did the size work okay or is it too
small?
On Aug 15, 2016 1:52 AM, "Oskar Risberg"<EMAIL_ADDRESS>wrote:

You can add as much as you like. I'll try to keep updating as much as
possible :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/kokarn/csgo-data/issues/159#issuecomment-239756605,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARfY4lJ-4QFS4uw88M7C4tGEbECxi-UAks5qgCivgaJpZM4JihQU
.

It's a bit small. Not sure if it's github shrinking or what's happening. Just link the original from now on and i'll do what i can :)

Alright, do you want me to relink this one?
On Aug 15, 2016 1:24 PM, "Oskar Risberg"<EMAIL_ADDRESS>wrote:

It's a bit small. Not sure if it's github shrinking or what's happening.
Just link the original from now on and i'll do what i can :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/kokarn/csgo-data/issues/159#issuecomment-239917891,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARfY4tn5ofOhyHucQa8utEYKCMTsSx36ks5qgMsLgaJpZM4JihQU
.

If you find something with a great resolution, please do. The current one is 469x469 https://github.com/kokarn/csgo-data/blob/master/teams/Vault/logo-469x469.png


Multiple projects for a single rasa instance

Description of Problem:
In pre-1.x versions of rasa, one could train different projects with different models and of course different training data.
When one initialized rasa, one could specify the models folders containing each one of those projects.
Then the HTTP API also allowed specifying which project to run actions against to ... for example, the parse endpoint could be used like:
curl -X POST localhost:5000/parse -d '{"query":"Hola", "project": "myproject"}'

I'm unable to find documentation to achieve the same with a single rasa 1.x instance
Thanks in advance

Thanks for submitting this feature request 🚀@Ghostvv will get back to you about it soon!✨

hi @jahirfiquitiva ! discussion is here https://github.com/RasaHQ/rasa/issues/3259


is converted to 0xA0 in InnerText

I found a quite weird problem.
I follow the guide "Decode and strip HTML" example to decode the html before loading
https://html-agility-pack.net/online-examples
HtmlDocument doc = new HtmlDocument();
string subcriterionCritiqueDecode = WebUtility.HtmlDecode(page); // decode html first before loadHtml
doc.LoadHtml(subcriterionCritiqueDecode);

I have some html code like this inside a :
1.0 through  version 2.0

I expect the   will be converted to space (hex: 0x20) in the InnerText, however I found that the HAP converted it into 0xA0! (I checked by showing the hex value using Console.WriteLine("{0:X2}", (int)ch);
HAP version: 1.11.46
.NET version: 7.0.1

Note that these code examples are not part of the HAP documentation but rather a collection of example code snippets made by 3rd parties. And unfortunately, the HAP team didn't really vet/curate these samples and included some of rather questionable quality. And one of them is "Decode and strip HTML".
Therefore, don't take these examples as guidance of how to do things properly. Only use these examples to get some indications and pointers to what functionality, methods, types, etc. are available in HAP, but don't trust the example code itself...

(Edit: Oops, i did read your issue report wrong, and i wrote an incorrect comment, which i deleted)
Your expectation is not correct.
  is the HTML entity for the no-break space character, and the character code for the no-break space character is indeed 0xA0.
(Please be so kind and close this issue report, as it is based on an incorrect assumption. Thanks!)


No streaming option

Currently Kaku downloads the full song to your hard drive which can take a long time, it'd be useful to have an option to stream from the site just like Atraci.

Ahhh ... if you did check the settings page, you'll notice that there is one option to let you change the streaming from video to audio. And if you are using audio format, it would be blast-fast to download the whole song.

I think that should answer your question so i'll close first. Feel free to reopen if you found any other bugs.

Actually, I have had this on before posting the issue. I feel like a streaming option would be very useful for when the connection is wonky.

@EragonJ
I would be clearer if the video player space would disappear when only the audio stream isselected

i think the change would be minor and i don't plan to implement that because it's kinda weird to keep changing UI there. Thanks for providing feedbacks here.

I do not like the way you're going with this project, "it's kinda wierd" and "the change would be minor". The video view is absolutely useless with the option selected and it actually looks "kinda wierd" having it without having any video. The suggestion screenshot by @reddit-is-fun looks much cleaner.

@zatherz You're free to submit a pull request and the dev might accept it. In my opinion this would be an improvement, but definitely a minor one. Developers have been cooperative so far.

come on ... it's open source project and it's always welcome to have you guys' PR if you think things are important. It's my personal idea about that improvement and I still got more important things to do like syncing, online DJ, mobile app version and so on.
It would be thankful if you can jump in and be part of contributors @zatherz ! It would be awesome.
@reddit-is-fun thanks for leaving your idea here. :)


Switch from versioneer to setuptools_scm

Codecov Report

Merging #3 into master will decrease coverage by 1.46%.
The diff coverage is 60%.

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
- Coverage   39.36%   37.89%   -1.47%
==========================================
  Files           4        4
  Lines          94       95       +1
==========================================
- Hits           37       36       -1
- Misses         57       59       +2

Impacted Files
Coverage Δ

xreshaper/__init__.py
66.66% <60%> (-33.34%)
:arrow_down:

Continue to review full report at Codecov.

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


Update README.md

Adding h37-fakestream to the list

I think the list is sorted alphabetically. Please sort your entry accordingly.

Created new pull request to take this into account.
Glenn Vanderlinden
Lead Technical Services
Human37
+32 472 58 55 62 <+32+472+58+55+62>
@.***
human37.com
Cantersteen 47, 1000 Brussels, Belgium
On Fri, 12 Jan 2024 at 11:01, ST-DDT @.***> wrote:

I think the list is sorted alphabetically. Please sort your entry
accordingly.
—
Reply to this email directly, view it on GitHub
https://github.com/faker-js/awesome-faker/pull/1#issuecomment-1888787950,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV5AI536PBDFQUQI2QVYGLDYOECWXAVCNFSM6AAAAABBXZEX2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBYG44DOOJVGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Superseded by https://github.com/faker-js/awesome-faker/pull/3


fix link to Azure SKUs

fix link to Azure SKUs (previously led to SKUs which are not relevant to ADX)

@yonileibowitz : Thanks for your contribution! The author(s) have been notified to review your proposed change. @avnera

@orspod

@yonileibowitz, thanks for your contribution
#sign-off

@orspod: I'm sorry - only the author of this article, @avnera, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.

@Jak-MS - I am the content dev for Azure Data Explorer and content owner of this doc. Please approve and merge. TIA

@Jak-MS - thanks!


feat: use radio buttons for action deletion and add help panel information

Video: https://microsoft.sharepoint.com/:v:/t/convsysresearch/EfI74vzjYN5HjkAxel4x6KMBD-Cr7w13avC_pKo0zmEM7Q?e=CVATSb
Also changes it so the option to remove placeholders doesn't show up when the action is not used.
I assume this will break some of the existing tests relying on ConfirmCancel modal.
Wonder how this will change when we add the ability to replace actions as well.

:tada: This PR is included in version 0.358.0 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Torch dataloader not slow

Hi there, nice package but I think that the reason that torch dataloader was slow due to the fact that you are transforming to tensor and normalizing for torch but not for jax.

Hi there, thanks for the comment 😃
You're right in that I should probably have created a more in depth comparison between both data loaders.
I should remove the transformations and let it run again. I haven't checked the PyTorch dataloader's source code whether the transformations are applied lazily (i.e. only during iteration time which would make it indeed slower) or if they are applied directly as I generate the datasets. I'm thinking it's the former because I can index the dataset and would already get the transformed data (I'll double check this later -- I'm currently on my phone as I'm going home from work). Or perhaps the transformations are applied during the indexing. In any case, I'll double check this and post the results :)

Hi again. I double checked it and you were right! The PyTorch dataloader is not slow and my tests were wrong because I used the transformations. Now, Jaxonloader is just a bit faster but it's negligible almost. Thanks for pointing this out! I removed the misleading statements.
As a side note, I noticed another issue when testing this on a GPU (in which case it's actually a bit slower!) which is that it's trying fit the entire dataset into GPU memory! That's not good and needs to be fixed. I'll get on that soon.


/proximity command is messed up, only shows teams

Latest versions.

#853

Fixed https://github.com/twizmwazin/CardinalPGM/commit/43c4a332de071ab3174ec0ad0725c0930695abdd


What's best way to use Now with babel?

My app's code lives in /src. I use Flow type annotations & async/await, so I either run it via babel-node or strip/tranpsile it with babel.
So my NPM scripts look like this:
    "dev": "babel-node src/index.js",
    "babelify": "babel src -d ./dist",
    "start": "node index.js" // this file is in project root, but imports from `./dist`

I run npm run babelify, then now, but this throws the following error:
> Installed to /home/nowuser/src/node_modules/3507677b72fdc3fde6c22daf0c5b8ca8465b37d2/vendor/linux-x64-51/binding.node
> ▲ npm start
>     at Function.Module._load (module.js:441:3)
> module.js:474
>     throw err;
>     ^
> Error: Cannot find module './dist/app.js'
>     at Function.Module._resolveFilename (module.js:472:15)
>     at Function.Module._load (module.js:420:25)
>     at Module.require (module.js:500:17)
>     at require (internal/module.js:20:19)
>     at Object.<anonymous> (/home/nowuser/src/index.js:1:157)
>     at Module._compile (module.js:573:32)
>     at Object.Module._extensions..js (module.js:582:10)
>     at Module.load (module.js:490:32)
>     at tryModuleLoad (module.js:449:12)
> start exited with status 0

I tried changing npm start to npm run babelify && node index.js, but I don't have permission to write to dist.
babel-node index.js seems to work, but afaik babel-node isn't meant for production use.
What's best practice for using babel in a case like this? Can I make now include my dist folder in the upload? Or do I have to use babel-node?

You should do the transpilation and other stuff that modifies filesystem in build (or now-build) step.
And then in the start (or now-start) just start up the app.

thanks @jamo  -- but I thought build scripts were run before install?
from landing page faq:

How Do I Run My Build Process?
To define a script that has to be run everytime before install, specify a build script in package.json

Is that's the case, wouldn't babel fail b/c it hadn't been installed?  Or is there a way to run a script b/t install and start ?

I'm pretty sure it's a unfortunate typo in the faq...

@brandonmp Fixed that! The build script will be run after the installation of the packages.


Requirements from app reviewer. Get transaction info first production env, then sandbox.

lib version
<dependency>
    <groupId>com.apple.itunes.storekit</groupId>
    <artifactId>app-store-server-library</artifactId>
    <version>1.0.0</version>
</dependency>

We submitted the application and was rejected. The reviewer wrote the following comment:

When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code “Sandbox receipt used in production,” you should validate against the test environment instead.

To meet the conditions of the reviewer, we initialize for each environment client and data verifier:
 AppStoreServerAPIClient sandboxClient =
                new AppStoreServerAPIClient(encodedKey, keyId, issuerId, bundleId, Environment.SANDBOX);
SignedDataVerifier sandboxDataVerifier = new SignedDataVerifier(rootCAs, bundleId, appAppleId, Environment.SANDBOX, false);

 AppStoreServerAPIClient prodClient =
                new AppStoreServerAPIClient(encodedKey, keyId, issuerId, bundleId, Environment.PRODUCTION);
SignedDataVerifier prodDataVerifier = new SignedDataVerifier(rootCAs, bundleId, appAppleId, Environment.PRODUCTION, false);

and implemented the following logic
       try {
            getAllSubscriptionStatuses(prodClient, prodDataVerifier, originalTransactionId, subscriptionGroupId)
        } catch (e: APIException) {
            getAllSubscriptionStatuses(
                sandboxClient,
                sandboxDataVerifier,
                originalTransactionId,
                subscriptionGroupId
            )

I have a couple of questions:

If this is a requirement from Apple, maybe this logic should be in your library? So that your customers don't think about it.

The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code “Sandbox receipt used in production,” you should validate against the test environment instead.

In this case the library returns
{
  “errorCode” : 4040010,
  “errorMessage” : “Transaction id not found.”
}

This error matches enum constant com.apple.itunes.storekit.client.APIError#TRANSACTION_ID_NOT_FOUND
It's ok?
@dvcer

Hello @nemezmaksim, that requirement generally applies for the use of receipts with the deprecated Verify Receipt endpoint, however with StoreKit 2, you already have access to the environment of the transaction in https://developer.apple.com/documentation/storekit/transaction/3963920-environment, which can be passed along with the signed data. This removes the need to do the two-call methodology.

@nemezmaksim Did the above comment resolve your issue?

Please reopen or file a new issue for any further questions


Renaming ref as namedType and then deprecating ref

[x] Renamed ref to namedType
[x] Aliased ref to namedType
[x] Deprecated ref

The following PR simply swaps out the naming of ref to instead be called namedType and deprecates the old method name accordingly.

Amazing! Thank you for getting to this.
Can you replace the documentation as well? Then this'll be good to merge.
https://github.com/saiichihashimoto/sanity-typed/blob/main/packages/schema-builder/README.md#object-named

I believe I already did @saiichihashimoto : https://github.com/saiichihashimoto/sanity-typed/pull/43/files#diff-f8ba4160c6d7f62bc6529c066613045813cb6cb1fb03181af888b5d662abf46bR818
Is that what you're referring to or is there another spot I missed?

no, I just can't read. Approved!

Hey @saiichihashimoto, so I've tried to do this, but I'm being told that Husky has a pre-rebase hook that catching and preventing me from doing so. Furthermore, it's also not a great idea to rebase pushed commits. If we can let it slide this one time, I'll make every future commit with conventional commits.

Hey @saiichihashimoto, so I've tried to do this, but I'm being told that Husky has a pre-rebase hook that catching and preventing me from doing so. Furthermore, it's also not a great idea to rebase pushed commits. If we can let it slide this one time, I'll make every future commit with conventional commits.

It's no problem, we can push this through. It just isn't going to deploy until the next commit that triggers a release, but I suspect that will be pretty soon.


Added KidsCanCode to video tutorials

I believe that KidsCanCode should be added to the video tutorials because he is an awesome resource for beginners and experienced Godot users alike. As well as consistently assisting people in Discord, Reddit, and on the forums.
This is in relation to this opened issue: #95

Thanks! :smiley:
(I amended the commit to follow alphabetical order in the list.)


PLAT-143745 Added screenshot tests for Sprite

Checklist

[X] I have read and understand the contribution guide
[ ] A CHANGELOG entry is included
[ ] At least one test case is included for this feature or bug fix
[X] Documentation was added or is not needed
[ ] This is an API breaking change

Issue Resolved / Feature Added
Sprite component had no screenshot tests.
Resolution
I added tests for Sprite component.
Additional Considerations
Links
PLAT-143745
Comments

LGTM


[Extension Feature Request] Add Support for Multiple JIRA Servers / Accounts

Context
The JIRA extension is so far super useful to quickly search & create issues for a single JIRA server. However, it'll be even better if we have the ability to search for issues from multiple JIRA servers which would totally eliminate using the JIRA app on macOS or using pinned tabs on the browser.
Who will benefit with this feature?
Any user with multiple jira servers / accounts

.


Cannot drag & drop when using a custom slot inside the #item slot

Before I explain my confusion, I want to say that I have read the issue at #24 , but what I don't understand is why does it still happen when I only render a single item inside that slot?
With some debugging, I noticed that the defaultNodes in the code below are some text elements whose direct children (they only have 1 child) are the components I actually want to be draggable.

Here is my code:
DraggableWrapper.vue
<template>
	<draggable
		class="paletteGroup"
		:group="{ name: groupName, pull: 'clone', put: false }"
		:sort="false"
		:empty-insert-threshold="0"
		:clone="onClone"
		:model-value="elements"
		:item-key="itemKey"
		@start="onStart"
		@end="onEnd"
	>
		<template #item="dragOpts">
			<slot name="item" v-bind="dragOpts" />
		</template>
	</draggable>
</template>

PaletteComponents.vue
<template>
      <draggable-wrapper
            :group-name="category.key"
            :elements="category.items"
      >
            <template #item="{ element }">
	            <palette-item
		            :item="element"
		            :group-key="category.key"
		            class="paletteItem"
	            />
            </template>
      </draggable-wrapper>
</template>

PaletteItem.vue
<template>
	<div>
		<q-btn
			:id="`${item.key}--component`"
			class="fdp-block"
			size="sm"
			padding="0"
			stack
			unelevated
			flat
			no-caps
		>
			<q-img
				:src="item.icon"
				fit="contain"
			/>
		</q-btn>
		<label class="component-label">{{ item.label }} </label>
	</div>
</template>

Any insight or potential fix is welcome. Wrapping the slot with a div solves the issue but creates a lot of other issues with my layout.

Yes, I had the same problem. if you use the component natively. the problem will be solved.
change DraggableWrapper.vue


Add on score reached block to the Info category

The other quick variables (life, countdown) have events tied to them for simple use in a game.  Score doesn't…but it would be so powerful if it did!
Richard coded this block up for me, and I'd love to add it to the Info category.

Also posting for feedback on Arcade teams channel.
@Jaqster  @abchatra  @riknoll

Done


Make sure CHIP_CONFIG_DARWIN_STORAGE_VERBOSE_LOGGING is always defined.

Possibly as 0.

Fast-tracking platform-specifif fix with platform owner review.


fix: update qdrant to support python 3.7

Revert "feat: make distance metric configurable in Weaviate backend"

LGTM, I suspect you will add in the config the distance right?

no it is not in relation to the distance parameter. I was just trying to revert to check why CI is breaking


[C++][Parquet] Shrink using realloc Buffer instead of doing a memcpy in FlatColumnReader::Impl::TypedReadBatch

See https://issues.apache.org/jira/browse/ARROW-360 This should avoid the two memcpys at the end.
Reporter: Uwe Korn / @xhochy
Assignee: Uwe Korn](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=uwe) / @xhochy
Related issues:

C++: Add method to shrink PoolBuffer using realloc (depends upon)

Note: This issue was originally created as PARQUET-761. Please see the migration documentation for further details.

Uwe Korn / @xhochy:
We already implemented this as part of a previous PR


[REQ] Display specials only for unlocked item when opening cases

When a case is opened if a yellow item shows up while spinning it should land on it always.
On CS2 the behaviour is there is no yellow item showing up unless it''s going to land on it

I'm pretty sure I've seen special items being skipped when case opening, but I wasn't able to find a footage of it.  Do you have any other source supporting this behavior?

Well. I can ask one of my players to record next time they open cases. but it has happend over 20 times on like 600 cases openings.

I'm actually referring to CS2 itself, in Inventory Simulator I'm sure this is happening as we don't filter out special items unlocks from the dummy unlocks.

had a lot of players saying that should be the case but indeed I can't confirm it by searching online either and I never opened a single case and don't watch videos of youtubers. Best method is find video proof of some youtuber opening cases and whether this happens.


FZF_THEME not used

It seems kubectl-explore does not use my default fzf theme configured FZF_THEME.
Is there any other way to do themes?

@norman-zon Thanks for reaching out.
I don't use fzf for fuzzy-finder, use it below instead.
https://github.com/kei6u/kubectl-explore/blob/e0673e9d7211b8b9d4591c30416df61fec1f75ca/go.mod#L7
So, I think you can not use fzf configurations.

I'm sorry for the noise. I don't know why I assumed you used fzf. Thanks for the quick response.


wasmprinter: add option to print instructions in folded form

This is a draft PR that depends on #1788 and #1789.
This PR adds an option to wasmprinter to print instructions in folded form, which some people find more comprehensible. It uses the arity information provided by #1789 (which is only computable once the earlier sections have been read, as in #1788) to group instructions with their operands.
(PR 3/3 of adding support for printing instructions in folded form)

(Let me rebase to support stack switching and then I'll mark this ready for review.)


webview source attribuate has http://www.xamarin.com/, missing https which throws the non-secure error

In the Layout section, you have some webview sample code with the source attribute having the following value: http://www.xamarin.com/, but because it is not https, is throws a security error. Perhaps you meant for this to happen to showcase the mobile platforms complaining about non-secure sites? Or, maybe the docs need to have https in it?

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

ID: ef31dc71-3610-6c18-2bda-d0bb70804c92
Version Independent ID: 02f7dc7b-541b-4b82-b33c-4e974fb94d8c
Content: Xamarin.Forms WebView - Xamarin
Content Source: docs/xamarin-forms/user-interface/webview.md
Product: xamarin
Technology: xamarin-forms
GitHub Login: @davidbritch
Microsoft Alias: dabritch

Hi @edwardm
Thanks for pointing this out - I've updated the samples and doc to use HTTPS, in a PR that will go live later today.


Use a sensor for the lat and longitude

Great card, it would be nice to use a sensor for the let and longitude instead typing the numbers.
For example a have a sensor: sensor.next_gp_let and sensor.next_gp_long and use it like this:
type: custom:weather-radar-card
marker_latitude: sensor.next_gp_let
marker_longitude: sensor.next_gp_long

I am guessing you are looking at having the card follow your location? I will wait a little while to gather other enhancement requests so they can be prioritised before committing to doing it.
Also as a brand new card (although the code has been tested with the Australian version) I am going to prioritise any bugs found first.

Yes by example, in my case it would like to show the radar at the current F1 Grand Prix.

Are you able to share the config of the sensors you use for the GP location. It may be useful for testing when I get to looking at that.
At zoom 10 the card is about 40km square, you must have very small states. I am not sure if increasing will help much since the radar data doesn't appear to be much more granular than that, but yes it is possible to adjust. Unfortunately right now it looks like you have perfectly fine weather so it is hard for me to observe.

@robbinonline  I am considering doing this, but I need an example of a sensor config for the location.

Here’s an example from Tesla integration. The location tracker has lat/long as attributes.
Would be handy to have a second marker on the map, defined as a sensor. From which the lat/long attributes would be pulled.

HA companion app location OTOH shows one state attribute with two values inside. This format would work for people who want to see the rain situation in “where I am” == where a HA tracked device is. Arguably this is a format with more users than the Tesla tracker format. And this would effectively work for the “weather along my route” scenario too: often it’s the HA user driving, with their companion app. So that’s where the car is. And that’s where to center the map and the marker (of choice?)
hope this helps

Any update on this? It would be great to set the marker location via sensor data as well.


TST+FIX: LTA conversions

I think it won't change your tests, but I think this line has source and destination swapped:
https://github.com/poldracklab/nitransforms/blob/45a0a2fe4268714b0f7237bab65cb084d806fa68/nitransforms/io/lta.py#L243
That line would work okay if xform['m_L'] were the ras2ras matrix and you wanted to calculate the vox2vox matrix from it. However, we want to do the opposite:

Let R be a matrix representing a ras2ras transform and V the matrix representing the equivalent vox2vox transform.
Let Asrc and Adst be the affines of source and destination, respectively.

Then, R = inv(Adst) . V . Asrc.
So, if we want to extract V from R, we need to multiply the inverses of each side:
            M = dst.as_affine().dot(xform['m_L'].dot(np.linalg.inv(src.as_affine())))

yeah, i was just looking at how LTA convert implements and you got it
https://github.com/freesurfer/freesurfer/blob/933dc7794c15243e7f0370e912c6e877b87eda66/utils/transform.cpp#L3707
Even changing the algorithm, I'm still not sure why it is not working in my example...

Can you update the line with my suggestion?

Okay - I decided to use the affine-RAS.fs.lta as the baseline (RAS2RAS), and convert it to VOX2VOX using lta_convert. There is still a slight discrepancy, albeit much smaller than before.
In [3]: v2v_m
Out[3]:
array([[ 9.9999899e-01, -9.9999935e-04,  9.9999981e-04,  3.9999959e+00],
       [ 1.4049364e-03,  6.2160885e-01, -7.8332651e-01,  1.9999948e+00],
       [ 1.6171722e-04,  7.8332722e-01,  6.2160969e-01, -9.9998468e-01],
       [ 0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  1.0000000e+00]],
      dtype=float32)

In [4]: r2r_m
Out[4]:
array([[ 9.9999899e-01, -9.9999935e-04,  9.9999981e-04,  4.0000000e+00],
       [ 1.4049363e-03,  6.2160885e-01, -7.8332651e-01,  2.0000000e+00],
       [ 1.6171722e-04,  7.8332716e-01,  6.2160963e-01, -1.0000000e+00],
       [ 0.0000000e+00,  0.0000000e+00,  0.0000000e+00,  1.0000000e+00]],
      dtype=float32)

Codecov Report

Merging #36 into master will increase coverage by 1.31%.
The diff coverage is 25%.

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
+ Coverage   91.92%   93.24%   +1.31%
==========================================
  Files           8        8
  Lines         570      577       +7
  Branches       75       77       +2
==========================================
+ Hits          524      538      +14
+ Misses         30       21       -9
- Partials       16       18       +2

Flag
Coverage Δ

#unittests
93.24% <25%> (+1.31%)
:arrow_up:

Impacted Files
Coverage Δ

nitransforms/linear.py
79.16% <ø> (+0.83%)
:arrow_up:

nitransforms/io/lta.py
94.36% <25%> (+4.73%)
:arrow_up:

Continue to review full report at Codecov.

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


Local echo disable under ssh command

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

VS Code Version:  1.80.0
OS Version:  Windows 11

Steps to Reproduce:

open the terminal, you will see the local echo function is good.
just ssh a remote server then local echo function is disabled.

This is because the local echo is handled for the connection between the client (terminal) and the server (shell), not the server and the SSH target. This is by design, by there are improvements that could impact things in https://github.com/microsoft/vscode/issues/135644 and https://github.com/microsoft/vscode/issues/126209


How to install the latest GoSublime?

Hi,all, I am want to use sublime text3 + gosublime for golang developing, but I have encontred some problems, but I have encountered some problems, can you give me help?
1）Install sublime text3
2 ) Install package control according to  _https://packagecontrol.io/installation#st3_
3 ) Install gosublime, but it doesn't support now, so I follow the instructions below.

Read the extension example and make sure you understand its contents. File an issue if you have any concerns.   // I don't know what should I need to do?

Uninstall GoSublime // Not installed before

Run the command git clone https://margo.sh/GoSublime to install GoSublime from the development branch. // clone to C:\Users\xxx\AppData\Roaming\Sublime Text 3\Packages

Restart Sublime Text. The status bar should instruct you to press ctrl+.,ctrl+x or cmd+.,cmd+x which creates the margo extension file. Please read all comments in the file. //

margo.sublime build failed: press `ctrl +.`, `ctrl+x` to configure margo or check console for errors.

If you've already switched to the new margo implementation, it might help to check the extension example for changes as there are some API breakages.

@dingrui37 what problems are you having? The instructions and the error message says to press ctrl+., ctrl+x. Did you press that key binding?

I am using Sublime build 3167, Can not find the GoSublime pacakge.

@lifangmoler Installation instructions are here https://github.com/DisposaBoy/GoSublime#installation--support

@DisposaBoy Code completion function can not be used.

@dingrui37

Did you read the extension example file https://margo.sh/s/extension-example ?

The final step (and the error message in the status bar) says to press ctrl+.,ctrl+x. Did you press it?

@DisposaBoy I followed the instruction.
i did not see the final step and no status bar shown up after i restarted the Sublime.

I do not have GoSublime installed ( it is not available to find via install package)
I cloned GoSublime  into this folder:  /Applications/Sublime Text.app/Contents/MacOS/Packages
And then restarted the Sublime.
Anything wrong?

@lifangmoler Package Control is not supported. You need to install GoSublime with git clone (as you did).
That path looks incorrect. The editable packages directory is somewhere inside your home directory like /Users/<username>/Library.... You can find it via the Sublime Text menu Menu > View > Browse Packages.

@lifangmoler If you're sure it's working, maybe you installed this branch some time in the past?

GoSublime was working before.  I got the error plugin_host has exited unexpectedly, plugin functionality won't be available until Sublime Text has been restarted. Then I tried to install the latest version Sublime and found the GoSublime is not available to Package Control to install anymore. I googled the issues online and tried to figure it out by myself before leaving messages here. So I may have installed the branch yesterday

@lifangmoler the plugin_host crash is probably related to this issue https://github.com/SublimeTextIssues/Core/issues/2327#issuecomment-425767504. It should be fixed now, but only in the paid/dev version of Sublime Text.

Thanks @DisposaBoy


Not an issue but .... Fixed footers?

Hi Is there a way of creating a fixed header AND fixed footer?
Thanks

Until this time Phonon's not have a official footer fixed (not in docs). You can do this using CSS rules...
footer {
	position:fixed;
	right:0px;
	bottom:0px;
	width:100%;
}

this case you need add tag footer in your 'screen page', the same to header... try 👍

That should still work. Thanks again.


Groovy-7961 : NoSuchElementException

https://issues.apache.org/jira/browse/GROOVY-7961
This is a similar PR to
https://github.com/apache/groovy/pull/412

PR merged, thanks!


Fix linking on Rust versions that unprefix jemalloc

Fixes #43, fixes #44.

@bors-servo r+

:pushpin: Commit e7a98e3 has been approved by SimonSapin

:hourglass: Testing commit e7a98e3 with merge d17c7b4...

@bors-servo r+

:pushpin: Commit 81db71e has been approved by SimonSapin

:hourglass: Testing commit 81db71e with merge 5271fb4...

:sunny: Test successful - travis


Add typed return for Object.defineProperties

Search Terms
Object.defineProperties typed
Suggestion
const newObject = Object.defineProperties(o, map);
Use Cases
Creating extensions of certain properties while still being able to type-check them
Examples
/** @type {NodeList} */
const nodeListObject = Object.defineProperties(/** @type {Node[]} */ ([]), {
    item: {
      enumerable: false,
      /** @param {number} [index] */
      value: function item(index) { return this[index]; },
    },
  });

Checklist
My suggestion meets these guidelines:

[ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[ ] This wouldn't change the runtime behavior of existing JavaScript code
[ ] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

The current type I'm using is the following:
interface ObjectConstructor {
  defineProperties<T1, T2 = PropertyDescriptorMap>(o: T1, properties: T2 & ThisType<T1>): T1 & {
        [K in keyof T2]: (
          T2[K]['get'] extends Function ? ReturnType<T2[K]['get']> :
          T2[K]['set'] extends Function ? Parameters<T2[K]['set']>[0] :
          T2[K]['value'] extends undefined ? any : T2[K]['value']
        )
      };
}

It seems alright but I would love to get some feedback. Currently, I'm targeting against .get() first, then .set(arg0) and finally .value.
See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties

Yours won’t correctly handle non‑writable properties, whereas mine is much more correct:
interface ObjectConstructor {
	defineProperty<
		T,
		P extends PropertyKey,
		V = P extends keyof T ? T[P] : unknown,
		W = P extends keyof T ? true : false
	>(
		target: T,
		property: P,
		descriptor: TypedPropertyDescriptor<V> & { readonly writable?: W },
	): T
		& { readonly [K in P as W extends false ? K : never]: V }
		& { -readonly [K in P as W extends true ? K : never]: V };

	defineProperties<T, M extends PropertyDescriptorMap>(
		target: T,
		properties: M & ThisType<T>
	): T & {
		readonly [
			K in keyof M as M[K] extends { readonly writable: false }
				? K
				: K extends keyof T
				? never
				: K
		]: M[K] extends Readonly<TypedPropertyDescriptor<infer V>>
			? V
			: any;
	} & {
		-readonly [
			K in keyof M as M[K] extends { readonly writable: true }
				? K
				: K extends keyof T
				? K
				: never
		]: M[K] extends Readonly<TypedPropertyDescriptor<infer V>>
			? V
			: any;
	};
}

Ah, I didn't see TypedPropertyDescriptor which would make things much easier. Any reason why this isn't part of the typings?

@clshortfuse
It’s probably for legacy compatibility.
Which is probably the same reason as to why strictBindCallApply is not the default.

@ExE-Boss Your definition seems far more useful. Perhaps it would make sense to turn into a PR?
Adding proper definitions of Object.defineProperties would be one way to approach getters/setters in CoffeeScript, which doesn't currently have built-in support so recommends using defineProperty. Lack of TypeScript support came up in this discussion.


FakeUserAgentError: Maximum amount of retries reached

Hi, I am getting following error in scholar.log even after using proxy. Can anyone help me with this?
INFO:scholarly:Getting https://scholar.google.com/citations?hl=en&view_op=search_authors&mauthors=Steven A. Cholewiak
WARNING:fake_useragent:Error occurred during loading data. Trying to use cache server https://fake-useragent.herokuapp.com/browsers/0.1.11
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
self.send(msg)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
self.connect()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/http/client.py", line 1392, in connect
server_hostname=server_hostname)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/ssl.py", line 412, in wrap_socket
session=session
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/ssl.py", line 853, in _create
self.do_handshake()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/ssl.py", line 1117, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Python/3.7/site-packages/fake_useragent/utils.py", line 67, in get
context=context,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Python/3.7/site-packages/fake_useragent/utils.py", line 154, in load
for item in get_browsers(verify_ssl=verify_ssl):
File "/Library/Python/3.7/site-packages/fake_useragent/utils.py", line 97, in get_browsers
html = get(settings.BROWSERS_STATS_PAGE, verify_ssl=verify_ssl)
File "/Library/Python/3.7/site-packages/fake_useragent/utils.py", line 84, in get
raise FakeUserAgentError('Maximum amount of retries reached')
fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached

This is expected behavior. Google Scholar is blocking requests from the proxies. You need to catch the exception and try again.


Add MakePrimers func

This PR adds a MakePrimers function to primers.go. This function simply builds primers to a targetTm for a given sequence (usually, these sequences have defined places where they start and stop, so you don't have fudge room to work out the most efficient secondary structure location).
There isn't functionality specific to Phusion, which would be great (see here : https://tmcalculator.neb.com/#!/help) since it is the best off-patent polymerase around. however, NEB's Tm calculator reliably gives about 5c above the current MeltingTemp function, so I can just use that to design primers by aiming for 55c on our function (when I really want 60c)

Lets revisit this function with a better PCR function. Ideally, you should just put in a list of primers and a get a list of sequences out, instead of being limited to only forward and reverse inputs.

@Koeng101 what's your strategy for a new, better PCR function then?

Instead of giving forward and reverse primers, you give a list of primers.


Initial valid field does not become invalid?

Hi all,
Using this example:
http://parsleyjs.org/doc/examples/simple.html
If you fill in a value for fullname, hit "validate" button and then remove all fullname characters, eg. the field is now invalid since it is required, it still shows as valid, background is green.
If you validate the form before filling in a value for firstname, it validates and shows error. When adding text it becomes valid, removing text shows error.
Is this by design?
Tested in chrome.
Kind regards
Bob

Looks like a bug to me. Once you've attempted to validate a field once, I think policy is to validate it all the time after that.

[This] (https://github.com/guillaumepotier/Parsley.js/blob/6dd76a03b89b25ea33f423b64232120bcd8cf2b8/src/parsley/ui.js#l45-l48) code seems to be the issue.
If a field is valid initially, it isn't tracked for keyboard changes.

If it turns out this is not a bug, here is a workaround to track all fields once the form is validated:
parsley.on('form:validated', function (form) {
        setFieldsInvalid(form);
});

function setFieldsInvalid(form) {
    for (var n = 0; n < form.fields.length; n++) {
        var field = form.fields[n];
        ParsleyUI.manageFailingFieldTrigger(field);
    }
}

Kind regards
Bob

The latest release will refresh the error messages before the events are fired, which resolves the issue.
Related: #1030 and #1052
Thanks!

@marcandre this still seems like an issue in the online demo here:
http://parsleyjs.org/doc/examples/simple.html
Fill in a value for fullname, hit "validate", background for fullname is green. Next, remove all fullname characters so that the field becomes invalid (fullname is a required field so background should be red), however background is still green?

Actually I was wrong. Once a field has generated an error once, then it get revalidated rapidly to signify rapidly when the error disappears.

@marcandre thanks for clarifying.
In the latest version I notice my workaround for manually registering fields to the form doesn't work anymore since the method, ui.manageFailingFieldTrigger has been removed.
Is there any other way to manually register the field to be tracked for validations?
Kind regards
Bob

If I'm not mistaken, setting the trigger option to "input" will have basically the same effect, no?

Thanks, the following seems to work:
Before I do the first validation I change the trigger option to input:
Parsley.options.trigger = 'input';
var valid = parsleyForm.validate();
It doesn't work if I first validate and then change the options:
var valid = parsleyForm.validate();
Parsley.options.trigger = 'input';
But this is in line with the documentation, in that once parsley options are set they cannot easily be changed.

You may want to set only the field's or the form's options (e.g. parsleyForm.options.trigger = 'input'), or if you set the data attribute (of the fields, or of the form if for all fields) then you don't even have to worry about it.


Origin: Eldest Sibling - crashes when spawning primitives of your own species

Reported by [CN]突击队队员 and confirmed by joakim.westergaard.
See title.
[14:35:01][effect_impl.cpp:4814]: setting primitive age on country that is not primitive! file: scripted effect create_late_primitive_empire_of_my_species at file: scripted effect generate_same_species_late_primitives_on_planet at file: scripted effect reroll_planet_and_generate_same_species_primitives at file: scripted effect terraform_planet_and_generate_same_species_primitives at file: scripted effect choose_random_planet_to_terraform_and_generate_same_species_primitives at file: events/00_emo_eldest_sibling_event.txt line: 44 line: 1 line: 1 line: 1 line: 1 line: 1

Fixed in version 1.14.2
Issue was related to using a re-implementation of generate_late_primitives_on_planet (to insert the original empire species). Switched to using a trick, overwriting last_generated_species by executing modify_species without any modifications on the original empire species.


Secret Mini has a glitched horn sound effect.

Just listen to the small video below, it starts fine then it finishes with a weird cartoon spring-like sound effect, it's quite hilarious.
My video showcasing this issue.

Yeah weird and known bug. I think Reflections got that too since it's caused by elevator sound on Havana secret base. Not loading sound bank with it resolves that issue

Fixed in https://github.com/OpenDriver2/REDRIVER2/pull/70/commits/50a60a5e3a2a082a327ceab4c841a5e326d5999f

Fixed in https://github.com/OpenDriver2/REDRIVER2/pull/70/commits/50a60a5e3a2a082a327ceab4c841a5e326d5999f


Pretty up the Quick Links menu

The quick links area needs some styling.

@ludamillion do you have any suggestions here for this?

Sure thing. I'll look at it in more detail but I expect just some better spacing would be enough.

If we properly apply the Bootstrap styling we get this. Personally I think this is fine. As long as we're using Bootstrap we might as well take advantage of it.

Sorry I missed this!  Sounds good to me @ludamillion  thanks.


Use descriptive method name, not API endpoint

At the moment, the methods in SaltStackClient are called like the salt netapi endpoints they are connecting to. If this method naming scheme is followed, at some point we well have overloaded methods of the same names calling their netapi endpoints with POST and GET respectively. While this will work, because the method signatures will be different, it's highly unintuitive if the users of our library do not know the netapi (and I think they shouldn't be expected to).
So, a simple question in a short pull request: would you consider a different, more descriptive naming scheme for these methods, and shield the user of this library from the details of the salt netapi, or was this a deliberate decision?

Incapsulation?

I would say it is OK to create a layer on top of the API endpoints, as long as we make sure that users of the library know which endpoint is used. It seems likely to me that the library will hold more than one method POSTing to /minions. The API actually expects [lowstate data] (http://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_tornado.html#term-lowstate) in the request body, which offers a lot of flexibility and our current minions() method is already a strong simplification of that!
We should therefore probably offer a minions() method that takes a Lowstate Java Object as parameter (doesn't exist yet) offering the full flexibility. We can even choose a different name, but startJob() doesn't fit here since you can actually run more than one command. There can be other methods talking to the same endpoint e.g. to just schedule the run of one command, like the current minions(). These are convenience methods and can have any appropriate name that should of course be chosen carefully (+ endpoint should be mentioned in JavaDoc).
About the naming itself my impression is that the docs talk more about commands than about jobs. So an appropriate name for the existing method might be startCommand() rather than startJob()?
If I understand correctly there could further be two variants of the GET version of /minions: getMinions() and getMinionDetails(String mid).

@renner Well, /minions is already convenience URL. :-) While I cannot agree more that this method is already simplification and sort of convenience method, I still think you're talking about a bit different case, where convenience methods taking over the cumbersome burden of passing "raw" low-state parameters. In this case I would agree with you that methods, like getMinions() and getMinionDetail(String mid) or even  something like getMinionDetail(Minion minion)  would be a great convenience additions to the main method, offered by Salt. This would indeed allow to us have a Java feel here and intuitively mapping this to the Salt. However, before that I would like to have an ability to call Salt with its way, something like passing previously constructed low state object.
But still I see nothing about "job" in the Salt documentation and in my opinion that would introduce something foreign.

Summarizing this into a general policy:

We use the API endpoint name as the Java method name wherever it makes sense in order to make clear which endpoint a library method correlates to.
In case the API endpoint name doesn't make sense we come up with appropriate method names that go along with the [netapi documentation] (http://docs.saltstack.com/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html).

This documentation says about the /minions endpoint:
Start an execution command and immediately return the job id

Since minions() is clearly not a good name for the existing convenience method, would you mind to rename it to startCommand() in order to stick with that documentation as good as possible?

Done, thanks for your comments!

Merging, thanks for your contributions!


feat(docs): add coc-rust-analyzer

r? @mark-i-m
bors delegate=mark-i-m

bors r=JeanMertz

Ah, sorry, I missed the first ping. I haven't tried this plugin and don't know the author (or their trustworthiness), but it looks nifty.

Just as an FYI: I don't know the author either, but did vet the code, and they are very fast in adding new features to get it up to par with the vscode plugin. I've get to run into any major issues.
I thought of rolling my own plugin, but then this one came along, and it's been working great so far. Definitely recommended for Vim users looking into using RA.