Increase Large File Request Response Time AES

I discovered the response time for this when I turned off cloudflare.
For a 86MB file converted into a Base64 string the response time was almost 50 seconds. However, the benchmark method logger said the encryption process probably only took 1.5 seconds.
https://github.com/Encryption-API-Services/eas-api/issues/405

Humor the idea of using ZSTP compression before sending JSON strings to the server.

The first step in coding troubleshooting is to create a test route for this API to use AES256. The currently route is taking a 114.38MB Base64 string as the data to encrypt. Benchmarks for the request are listed in the controllers as follows.

Implementing ZSTD encryption on the .NET client side with eas-dotnet decreasing the overall request size to about 42 seconds.

Implementing ZSTD encryption on the on the web api side along with the client side compression a total response time is 45 seconds.

https://medium.com/@ma1f/file-streaming-performance-in-dotnet-4dee608dd953

https://makolyte.com/csharp-how-to-send-a-file-with-httpclient/

Moving the benchmark logger to the deserialization process produces a deserialization time of nearly 44 seconds. Our problem is the deserialization of the JSON payload.

These are benchmarks on the individual methods after switching to a MultipartFormDataContent form post on the front end.
The AES Encryption is taking longer than 1.5 seconds because of UTF8 string encoding because I don't have an AES method in rust that directly encrypts bytes.

The entire request time was reduced to 36 seconds from 52 seconds.

https://procodeguide.com/programming/file-upload-in-aspnet-core/?amp#Add_Controller-2

I did a performance test on the performant_encryption library using the same file that I am uploading to the IIS server.
public struct AesEncrypt
    {
        public IntPtr key;
        public IntPtr ciphertext;
    }

    [DllImport("performant_encryption.dll")]
    private static extern AesEncrypt aes256_encrypt_string(string nonce_key, string to_encrypt);
    private static void Main(string[] args)
    {
        try
        {
            DateTime now = DateTime.Now;
            byte[] fileBytes = File.ReadAllBytes("facebook-mike0191.zip");
            string base65 = Convert.ToBase64String(fileBytes);
            AesEncrypt encryptedPtr = aes256_encrypt_string(NonceGenerator.GenerateAES256Nonce(), base65);
            string encrypted = Marshal.PtrToStringAnsi(encryptedPtr.ciphertext);
            DateTime now2 = DateTime.Now;
            Console.WriteLine(now2 - now);
            Console.WriteLine("done");

        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

Now this really throws a wrench in the entire architecture of the platform as it currently stands. I was not anticipating this to be a problem until at least 1-2GB of data being sent to the server.
Another approach would to create wrappers around performant_encryption for each language and perform the encryption locally, however this would require an install of rust as a dependency for the user to use the SDKs.
User's would not be able to perform the encryption without an active license which could be verified thorough their API token.

https://learn.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-2.1#uploading-large-files-with-streaming

Another approach that I am willing to investigate is chunked uploading. Essentially over a specified amount of time we would send 1MB chunks to the server and store the results in memory directly within the application.
private static Dictionary<string, List<byte[]>> fileChunks = new Dictionary<string, List<byte[]>>();

[HttpPost("upload")]
public async Task<IActionResult> Upload()
{
    var form = await Request.ReadFormAsync();
    var file = form.Files.FirstOrDefault();

    if (file == null || file.Length <= 0)
    {
        return BadRequest("Invalid file");
    }

    var chunkNumber = Convert.ToInt32(form["chunkNumber"]);
    var totalChunks = Convert.ToInt32(form["totalChunks"]);
    var fileName = form["fileName"];

    var fileIdentifier = $"{fileName}_{Request.Headers["X-Upload-Identifier"]}";

    // Create a list for storing the file chunks if it doesn't exist
    if (!fileChunks.ContainsKey(fileIdentifier))
    {
        fileChunks[fileIdentifier] = new List<byte[]>();
    }

    using (var memoryStream = new MemoryStream())
    {
        await file.CopyToAsync(memoryStream);
        var chunkData = memoryStream.ToArray();

        // Save the chunk data in memory
        fileChunks[fileIdentifier].Add(chunkData);
    }

    if (chunkNumber == totalChunks - 1)
    {
        // Last chunk received, combine the chunks from memory
        var combinedData = fileChunks[fileIdentifier].SelectMany(c => c).ToArray();

        // Perform any processing or operations with the complete combined data

        // Clear the file chunks from memory
        fileChunks.Remove(fileIdentifier);

        return Ok("File uploaded successfully");
    }

    return Ok("Chunk uploaded successfully");
}

What we can also look into before switching the main architecture around is chunked uploading.
Let's say for instance we are performing AES.
Upon receiving the first chunk the server would generate the appropriate key to encrypt the first chunk and store the key in memory until the chunked upload was completed. Upon the last chunk we would send the key back to the user.
When sending the processed chunks back to the user the client side would reassemble the chunks into a user defined format.


Set FastMathFlags by default

Move setting of fast math flags from ScheduleLoad pass, so that it can be reused for both default and advanced path.
CI: https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/11302770929

Should be the fast math controlled by the user for tuning the accuracy?

Should be the fast math controlled by the user for tuning the accuracy?

According to the logic in https://github.com/triton-lang/triton/commit/84fe9dadad9633421d020b3fa5dea14367b19ea8, users are expected to use libdevice if they want high precision.

Should be the fast math controlled by the user for tuning the accuracy?

According to the logic in triton-lang/triton@84fe9da, users are expected to use libdevice if they want high precision.

Make sense. Another question not related to this PR. It seems the default path has already uses the fast math because we use the same lowering logic as the upstream. Is it?

Make sense. Another question not related to this PR. It seems the default path has already uses the fast math because we use the same lowering logic as the upstream. Is it?

Default path uses the same lowering logic as upstream, but it doesn't add fast math as aggressive as this PR. This PR adds to add possible operations that have the fast math interface.

this pr does not work, please hold.


Implemented support for gateway service name in meshNetworks

This supports specifying a network's gateway service name (registryServiceName) instead of explicit address.
If the service is a LoadBalancer, Pilot will extract the external LB address(es) from the matching k8s service resource on that network.
Benefits:

Users don't need to modify the primary's cluster ConfigMap with the remote gateway IP after setting up the remote cluster
Dynamically update changes to the LB addresses instead of manually modifying the ConfigMap

Closes #11837

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: ymesika
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: andraxylia
If they are not already assigned, you can assign the PR to them by writing /assign @andraxylia in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

install/OWNERS
pilot/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ymesika: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-integ-k8s-tests.sh
b9b24f3eff2dbebb0d63128cf044f339897285a2
link
/test istio-integ-k8s-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ymesika: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-integ-k8s-tests.sh
b9b24f3eff2dbebb0d63128cf044f339897285a2
link
/test istio-integ-k8s-tests

prow/istio-pilot-multicluster-e2e.sh
b9b24f3eff2dbebb0d63128cf044f339897285a2
link
/test istio-pilot-multicluster-e2e

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

The loadbalance weight for remote cluster endpoints is not correct, do not consider the number of gateway services and the number of hostname or addresses.

The loadbalance weight for remote cluster endpoints is not correct, do not consider the number of gateway services and the number of hostname or addresses.

@hzxuzhonghu I see. What do you expect to be the gw weights in a case, for example, with 2 gateways and 1 remote endpoint? It can't be 0.5.

@ymesika Would u have bandwidth continuing on this, if not I can take over

@ymesika: PR needs rebase.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


The GWT debugger options are confusing

There are many checkboxes and they don't seem to correlate obviously to

command-line options java -jar compiler.jar --help
CompilerOptions.java methods/fields (which I personally use directly) https://github.com/google/closure-compiler/wiki/Using-the-Compiler's-Java-API
service API https://developers.google.com/closure/compiler/docs/api-ref
additional webservice options https://github.com/google/closure-compiler/wiki/Additional-Webservice-Options

All this is rather confusing. To make it slightly easier when trying to create a test case in the debugger, I suggest updating the CompilationParam enum to have additional properties which describe how they map to at least some of the above options, and setting a tooltip in DebuggerGwtMain.
I might do this in a spare moment if you indicate it will be accepted as a PR.

We use the debugger to debug individual passes. If you want to repro something using simple or advanced optimizations, why can't you use http://closure-compiler.appspot.com?

I use the debugger to:

find out what types are being inferred
try to reproduce isolated test cases for specific weird errors or crashes so I can submit them; often I need to specify externs

... also I only discovered that other page yesterday!
I also don't know how to map the ~50 customisations we make (to CompilerOptions.java) to this page, e.g. specifying language in/out? If these are command-line options, I'm only familiar with the Java API.
All I'm suggesting is adding a tooltip to explain what Java API (and probably command-line option) each checkbox correlates to. And doing it myself. But only if it won't get rejected.

The debugger UX could definitely use some love. I don't see a reason to reject it, but I kinda feel like I'm still digging myself out from a pile of email after the holidays (which is why I haven't responded on several existing PRs), so it might take some time to get merged.


Ctrl-C doesn't kill python on windows

Like the title says - python 2.7, pyzmq and zeromq are both 2.1.4.
This simple code https://gist.github.com/920133 doesn't die when you hit ctrl-c in the terminal.

David Beazley's talk Python's GIL explains very well why signal handling starts to fail the moment you call into C code, or use threads, or even carry out some Python operations that the interpreter considers atomic enough not to interrupt: http://www.dabeaz.com/python/GIL.pdf (see page 22 for the gory details).
This is definitely a Python issue.

I am familiar with Beazley's talk, but it does not seem to clarify why this is a Windows-specific issue.  SIGINT works perfectly on posix.  This issue requires both Python and Windows - posix+Python interrupts fine, as does Windows+C.  But somehow on Windows the event fails to interrupt the libzmq call.

OK, I haven't used Windows in several years so I can't speak to this particular issue.


Add changelog for sse-c changes

This got dropped out of #274 during the rebase and I didn't catch it before merging.

Codecov Report
All modified lines are covered by tests :white_check_mark:

Comparison is base (0fb0ba2) 85.36% compared to head (3f9eb8e) 85.50%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #275      +/-   ##
===========================================
+ Coverage    85.36%   85.50%   +0.14%
===========================================
  Files           16       16
  Lines         2719     2719
===========================================
+ Hits          2321     2325       +4
+ Misses         398      394       -4

see 1 file with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


[YouWatch] can this site be suppoted?

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[x] At least skimmed through adding new extractor tutorial and youtube-dl coding conventions sections
[ ] Searched the bugtracker for similar pull requests

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Bug fix
[ ] Improvement
[x] New extractor
[ ] New feature

Description of your pull request and other information
This is more like a question. I'm not sure if the site fits the copyright-infringement policy.

This looks like copyrighted content. youtube-dl does not support sites dedicated to copyright infringement. Do they have rights to distribute this? If not provide an example URL that does not violate any copyrights.

Ok, I didn't read the example URL part.
The videos I find usually belongs to some tv network or film studio. I doubt strongly any of them would use this site to host their content. But, technically I can't know for sure since no uploader account name is shown any where on the video pages.
For the same reason I'm not able to provide such URL.

I decided to check out youwatch.org to check if there are legal videos available.
It appears youwatch.org doesn't have a public searchable list of videos available so it's hard to say how much the site is used for copyright infrigement.
The sites about page just says it's for sharing videos with friends with limited advertising that the uploader gets a percentage of money from and they have a policy like most sites saying to not upload content that infringes on copyright but it could be that most of it's content is infringing and the site operators just ignore that fact (Hard to figure out which when all videos are unlisted).


Uncaught Exception: Command failed:<PHONE_NUMBER>

An uncaught exception was reported.
Info:
OS: win32
Arch: ia32
GPMDP Version: 3.0.0
Time: Thu Mar 10 2016 23:09:28 GMT-0500 (Eastern Standard Time)
Error:
Command failed:<PHONE_NUMBER>
Error: Command failed:<PHONE_NUMBER>
System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.Utility.<LogIfThrows>d__4d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.FileDownloader.<DownloadFile>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwait
...Some of the stack is missing

This issue was created automatically inside the uncaughtException handler

Fixed this literally 2 seconds ago.  Wait for the next update check and you check get the new update

(5 minutes top)


Deserialize class with property which type is declared as interface

Hi,
Let's say we have the following declaration of interfaces an classes:
public interface IDataHolder
{
    byte[] Data { get; set; }
}

public class DataHolder : IDataHolder
{
    public byte[] Data { get; set; }
}

public class Data
{
    public IDataHolder DataHolder { get; set; }
}

Then I am trying to do the following:
var data = new Data {DataHolder = new DataHolder { Data = new byte[] {1, 2, 3}} };
var json = Utf8Json.JsonSerializer.ToJsonString(data);
data = Utf8Json.JsonSerializer.Deserialize<Data>(json);

The last line throws an error: System.InvalidOperationException: 'generated serializer for IDataHolder does not support deserialize.'
This definitely must be something easy but from documentation I cannot understand how to solve this.
Please help.

Not sure if this is still pending; but I'm having similar issues. As for your specific problem; my guess is that the generated serializer probably is unable to deserialize to an interface (IDataHolder), since it cannot create such an instance. You could try using a JsonConverter using a  discriminator field to provide the serializer with concrete type information. This is supported by Newtonsoft (and also System.Text.Json I'd say).

It'd be really cool to have workaround at least.

For what it is worth: I solved my issue by creating a custom IJsonFormatter. The type, in my case, was JSonDocument.
/// <summary>
/// Custom Utf8Json formatter for JsonDocument instances. The Utf8Json standard generated formatter
/// is unable to deserialize a JsonDocument instance. (serializing also always results in null)
/// </summary>
public sealed class Utf8Json_JsonDocFormatter : IJsonFormatter<JsonDocument>
{

    public void Serialize(ref JsonWriter writer, JsonDocument value, IJsonFormatterResolver formatterResolver)
    {
        if (value == null)
            writer.WriteString(string.Empty);
        else
        {
            // Write out the actual bytes. This might be a slow process so be prudent with
            // JsonDocument properties!
            using (var stream = new System.IO.MemoryStream())
            {
                Utf8JsonWriter utf8Writer = new Utf8JsonWriter(stream, new JsonWriterOptions { Indented = true });
                value.WriteTo(utf8Writer);
                utf8Writer.Flush();
                writer.WriteString(System.Text.Encoding.UTF8.GetString(stream.ToArray()));
            }
        }
    }

    public JsonDocument Deserialize(ref JsonReader reader, IJsonFormatterResolver formatterResolver)
    {
        var token = reader.GetCurrentJsonToken();

        if (token == JsonToken.String)
        {
            var content = reader.ReadString();
            // parse the JSON. Let exceptions fly and nuke the caller - we don't want to TryParse or catch anything here
            // for the sake of performance.
            return string.IsNullOrEmpty(content) ? null : JsonDocument.Parse(content);
        }
        return null;
    }
}

And then added it:
            Utf8Json.Resolvers.CompositeResolver.RegisterAndSetAsDefault(
            new Utf8Json.IJsonFormatter[]
            {
                 new Utf8Json_JsonDocFormatter()
            },
            new Utf8Json.IJsonFormatterResolver[]
            {
                Utf8Json.Resolvers.BuiltinResolver.Instance,
                Utf8Json.Resolvers.StandardResolver.Default
            });


less compatibility issues

I was just attempting to get my feet wet with the typescript node debugging support when I tumbled upon the following issue running the watch task:
c:\source\node-express-typescript\node_modules\accord\lib\index.js:31
      throw new Error(name + " version " + version + " is not currently supported");
      ^
Error: less version 1.7.5 is not currently supported
    at Object.exports.load (c:\source\node-express-typescript\node_modules\accord\lib\index.js:31:13)
    at Object.<anonymous> (c:\source\node-express-typescript\node_modules\gulp-less\index.js:9:29)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (c:\source\node-express-typescript\gulpfile.js:2:12)
    at Module._compile (module.js:435:26)

I haven't checked the javascript example but I presume both suffer the same problem.

How did you end up with accord?
Error is coming from node_modules\accord\lib\index.js:31 but accord isn't listed in package.json?
I was able to run watch just fine (after global installing gulp as you noted in your PR https://github.com/Microsoft/vscode-samples/pull/1).

Hmmm. Will reattempt and see. Trying to remember if I'd upgraded to npm 3 at that point and wondering if it had any bearing...

hi - i am seeing this error too, sorry about it.  i'm swamped after the thanksgiving break and will get to this asap.  pull requests are welcome :)

I made the following change to package.json and got it building again, but I did not do any extensive testing..
"less-middleware": "1.0.x",

"less-middleware": "^2.0.0",

After changing that, I cleaned the less and less-middleware folders from npm_modules and ran npm install again. It seems the hard version reference was causing an older version of Less to be pulled.

Yup that seems to fix it - do you want to issue a PR @djabraham ?

I’ll fix it, no need for a PR.
Thanks for doing this!
From: John Reilly<EMAIL_ADDRESS>Sent: Sunday, December 6, 2015 11:05 AM
To: Microsoft/vscode-samples<EMAIL_ADDRESS>Cc: Chris Dias<EMAIL_ADDRESS>Subject: Re: [vscode-samples] less compatibility issues (#2)
Yup that seems to fix it - do you want to issue a PR @djabrahamhttps://github.com/djabraham ?
—
Reply to this email directly or view it on GitHubhttps://github.com/Microsoft/vscode-samples/issues/2#issuecomment-162337294.

fixed with https://github.com/Microsoft/vscode-samples/commit/9cc7b89cabb42b419db6d4649a43011fe7abc20b

Sweet.


Create blotter for live trading

Zipline uses blotter class to interface with backtesting or normal brokers.
Currently in zipline-live blotter is unused: TradingAlgorithm's respective calls are
overridden to reach out the broker directly. This approach prevents zipline to keep
track of positions in the performance report.
Additionally, if we want to run backtest & live trading at the same time (e.g.: to enable dynamic activation of the strategy based on it's previous performance) the current approach won't work.
This ticket tracks the efforts of migrating to blotter_live.

Delivered with #70


Add SkipModuleManifestValidate parameter to Publish-PSResource cmdlet

PR Summary
This PR addresses issue #891 by adding a -SkipModuleManifestValidate parameter so user can optionally bypass this step during a publish operation.  This PR also updates module version to next beta version.
PR Context

PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[x] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[x] None
OR
[ ] Documentation needed

[ ] Issue filed:

User-facing changes

[ ] Not Applicable
OR
[x] Documentation needed

[x] Issue filed:  #899

Testing - New and feature

[x] N/A or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[x] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
OR
[ ] I have considered the user experience from a tooling perspective and enumerated concerns in the summary.

@PaulHigin Do we need to add a test for the new switch?


node settings do not work

Problem
The colour or size of the node does not change
Spread link: https://view.spreadviz.org/?output=ddf9ff80-334a-475d-8cdd-901925a32877/af15cdb0-df4a-4aef-86d9-642119a9da5e.json&maps=GH,SN,BF,GW,GN,SL,ML

Could not reproduce, please check @jpmonettas, close if not reproducible

@fbielejec @KanikaNahata I think the confusion here is between nodes and transition src/dst points which are not the same thing. Our current nodes customization changes the look of whatever is of type node on our data. The dots you see in the beginning/end of transitions are just part of transitions and they are always black and with a fixed radius. I can understand the confusion not sure what to do about it.

closing, not a bug


C++ Hard problem solved

Description
Edited the tasks/c++/hard/mystring.h and tasks/c++/hard/mystring.cpp files to solve the C++ hard problem MyString

Merged

This is an automated message from Fork, Commit, Merge [BOT].

Thank you for your contribution! Your pull request has been merged. The files have been reset for the next contributor.
What's next?
If you're looking for more ways to contribute, I invite you to check out my other projects. Just click here to find more. These projects contain real issues that you can help resolve. You can also check out the Influences section in the README to find more projects similar to this one.
Also please leave a star to this project if you feel it helped you, i would really appreciate it.
I look forward to seeing your contributions!


Listen to events

Are there any example or documentation on how to trigger custom events from a hap-nodejs server? Looking at adding socket.io events when home bridge events trigger to add a web ui interface. Any help would be appreciated.

As far as I know, calling setCharacteristic() causes the bridge to send out a notification to the controllers (your device/home hub).
I've used this for motion and contact sensors using Homebridge and it triggers home automation almost instantly.

Is it respond to iOS HomeKit status and UI view?
In other words, can HAP-NodeJS send hardware status change to HomeKit app runned on Apple Device?
For example:

presence sensor,
physical light switcher with a feedback

As I can see here: https://github.com/KhaosT/HAP-NodeJS/blob/master/accessories/MotionSensor_accessory.js
Sensor cannot trigger update. Who triggers updates here? Is HomeKit polles state with an interval? Know anybody what the interval?
My problem: I have an light with a lot of controllers (ifttt, button, HomeKit, voice) and HomeKit does not update its status

Your light / device should send the status changes as an event if you want semi real time updates.  Otherwise, the home app refreshes on its own schedule, roughly when you change rooms or open/close the app

On Dec 25, 2017, at 8:08 AM, Alexander Mextner<EMAIL_ADDRESS>wrote:
As I can see here: https://github.com/KhaosT/HAP-NodeJS/blob/master/accessories/MotionSensor_accessory.js
Sensor cannot trigger update. Who triggers updates here? Is HomeKit polles state with an interval? Know anybody what the interval?
My problem: I have an light with a lot of controllers (ifttt, button, HomeKit, voice) and HomeKit does not update its status
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Thank you, @NorthernMan54
Can you help to achieve it?:

Your light / device should send the status changes as an event

Doc link or code snippet will be such helpful

When I’m back home next week, and not limited to Mobile I can give better examples but there are two patterns that can be implemented depending on the device.  First would be the best case where the device generates events that can be passed to hap-nodejs and ultimately the HomeKit.  Second is to implement device polling, and update HomeKit with the current status.   Both of these patterns use the updateValue characteristic interface.  The first updates when a device event occurs, the second when polling occurs.
If you device doesn’t support events ( which Is most ) your stuck with polling, and the inherent lag associated with it.
I use the second pattern with my homebridge plugins that the devices don’t support events and the first with the ones that do.  My homebridge-dht does polling, while homebridge-heyu uses device events.

On Dec 25, 2017, at 5:26 PM, Alexander Mextner<EMAIL_ADDRESS>wrote:
Thank you, @NorthernMan54
Can you help to achieve it?:
Your light / device should send the status changes as an event
Doc link or code snippet will be such helpful
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I had not got answer though...


Hook up MIAA dashboard overview

Still not quite finished but most of the functionality is there. Need to do a design cleanup pass too.

Coverage increased (+0.05%) to 34.517% when pulling 211a6398763323bff4416fc5b7fcf3ecf8b14cc8 on chgagnon/miaaOverview into 46f72fef6a1c545a865af7135ac36cbdf93a6868 on master.


Possibly tensorflow related installation issue

I also noticed that I couldn't install package teachopencadd where was function seed_everything () because of the tensorflow-base.2.18.0 (something like this). Conda told me that I had corrupted file, pip told me that there was parse-function problem(if I remember correctly). I only want to say that I could resolve this problem with the help of pip install pytorch-lightning=1.7.7, where pytorch-lightning utilities.seed had the same function.

Originally posted by @Q84-wq in https://github.com/volkamerlab/teachopencadd/issues/419#issuecomment-2266633397

Hi @AndreaVolkamer,
Can anyone in your lab please take a look at this?
If tensorflow is a source of problems again, I wonder if we could remove T021 and T022 from our global teachopencadd package environment.
Why?
We have had so many issues already with having tensorflow as part of the installation and afaiu tensorflow is not really the go-to ML/DL package anymore. So why not instead add an installation only for these two talktorials (maybe really with pinned versions).

Hi @Q84-wq,
Could you please add some information on this issue: (a) your OS and (b) how you tried to install teachopencadd?
I just tried on MacOS via
CONDA_SUBDIR=osx-64 mamba create -n teachopencadd teachopencadd
and was not able to reproduce the error you described. But that might just be because your setup was different.
Many thanks!

Hello, miss Sydow,
I run my laptop on Windows 64-bit (Lenovo) and the app is Jupyter Notebook desktop. I tried again to install teachopencadd. Firstly I installed mamba into conda (I understand that it's not recommended, but it's more convenient for me) https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html, then I used
mamba create -n teachopencadd teachopencadd -c conda-forge -c defaults
and there was written "warning libmamba Problem type not implement SOLVER_RULE_STRICT_REPO_PRIORITY" many times,
and then "Could not solve the environment specs
The following packages are incompatible" and there were biopython - > python, numpy; biotite - > python, h5py 2.10.0 - > python_abi 3.6(3.7).* *_cp36(37)m, mdanalysis - > python_abi; tensorflow 1.14.0, numpy - > python
The second way, mamba env create -f https://raw.githubusercontent.com/volkamerlab/TeachOpenCADD/master/devtools/test_env.yml
conda activate teachopencadd, it has stuck on Solving environment for a really long time
Thank you very much!


asyncValidating selector for form?

Hi!
This is not a bug, but I was wondering how it is currently possible to check if any Field within a form is currently asyncValidating. I have this information on a Field level in the Fields meta, but the form meta does not have this kind of information (at least not with getFormMeta). Basically I'd need a selector like getFormAsyncValidating, because I need this information for a component outside the form. I'm doing async validation of my fields on change.
Any ideas on how to get this?
Thanks!

just realized this was added in 7.4.0, fml.


ensure_none naming is misleading

FRAME System's ensure_none ensures that the origin o represents an unsigned extrinsic.
This naming is consistent with the inner member of the RawOrigin enum:
pub enum RawOrigin<AccountId> {
	Root,
	Signed(AccountId),
	None,
}

During a Milestone Review for the Substrate Builders Program I had to clarify a team that was misled by the  ensure_none naming. The team had interpreted that ensure_none meant no one could call this extrinsic, which is literally the opposite of the meaning we're aiming to convey.
Even though the documentation already provides an accurate description, we could further avoid confusions by renaming ensure_none to ensure_unsigned.

Hey @bernardoaraujor , I would like to take this up.


Added overwrite to pipeline insert

This change is

/deploy test

/deploy test

/deploy test

/deploy test


Any chance it should be BehaviourSubject as a click input stream?

If I understand RxJS correctly the
var inputAddOneClicks$ = new Rx.Subject();

statement (from https://github.com/staltz/mvi-example/blob/master/src%2Fintents%2Fitems.js#L9) will create a cold stream which means that all the events ever replicated to it will be stored forever.
Wouldn't it be better to use Rx.BehaviorSubject() instead which only keeps the last value or convert the normal into the "hot" one using .share()?

Seems like I was wrong and Rx.Subject is hot by default


FEAT: Add Clock In / Clock Out picker to track time

Add telescope picker to choose to start a new clock timer. Lets you choose from headlines to quickly start a timer. If you already have a timer / clock running it will first stop your other timer to start the new one (orgmode may do this automatically, i am not sure).
@lyz-code if any of these features I start proposing adding become out of scope to what you want this plugin to be, just let me know... i will not take any offense to it, haha ;-)

As long as you help on maintaining that part of the code, I'm fine with it!

Actually, I imagine a lot more features, I would love to have. Regarding clocking I currently would prioritize more a timestamp search, because I often need this to reveal, when I worked on what - which I currently do with live_grep, but the UX could be better. But this feature also sounds interesting - but it probably would need an extension of the OrgApi.

Now that the clock is fixed in nvim-orgmode and I started to use it more frequently, this could be actually an interesting feature. Question is: how to access clocking via API? @kristijanhusak do you have any take on this?

@seflue we can expose it in a way. Ideally, we would have a separate OrgApiClock class that does the generic stuff, similar to what orgmode/clock/init.lua exposes, and also some clocking methods on the OrgApiHeadline.
Let me know what structure would work for you and we can discuss further.


Feature Change: Blindness toggle on or off. [For Pathfinder2e]

Not sure if this feature exists on other systems. Playing on PF2, game has enough rules for blinded without actively blinding token. Wondering if it was possible to put a toggle for whether blinded should cause this effect or not in the module settings.

But wouldn't you still have this problem when I add an opt-out setting? Because the system removes darkvision if your blinded, so without light sources that is effectively the same was PV's blindness. And don't you have the same problem with characters without darkvision all the time? Because they can't see in darkness at all.

I do have the same issue, I suppose. The only difference is that I have found a work around for that. I guess the issue is more in RBV implementation when combined with perfect vision. Sorry for the inconvenience.

This issue was closed, but to be more specific, the reason the pf2e does not blind tokens when they have blindness is because almost everyone internally voiced against it, since otherwise a person who is unconscious might as well get up and walk away because they can't see anything. Personally I've had to disable perfect vision in my own game because people who go unconcious (and thus are automatically blinded) can't see anything and had no motivation to stick around. I haven't had anyone go unconcious in many sessions, so I wasn't aware it was a thing for the longest time.

Have they been changes to the system regarding automatic blindness? When I implemented this, PF2e tried to blind the tokens by setting dim/bright vision ranges to zero. This of course is not proper blindness, but in dark scenes without light it effectively blinds the token. I just replaced this with proper blindness. It was seems to me the intention of the PF2e was it truly blind tokens with the blinded condition.
If the system removed its blindness automation, I would be open to adding a toggle for this. But if it still has it, I'm not sure how to proceed: do I override that as well if blindness automation is toggled off in PV? I don't really want to disable part of PF2e's automation.
Can't you remove the blinded condition manually of a unconscious player or does the automation immediately reapply the blinded condition? This would be my suggestion for a workaround if you want to keep PV around.
In v10 this is going to be PF2e's problem: sight limit is going to be a core feature, which gives the system the option to properly blind tokens. Consider v10 is close, I'll probably leave it as is unless the system removed its automatic blindness.


sqlserver failed TF samples is blocking other PRs

          > Hi @msampathkumar, thanks for reviewing the change. I saw the above `terraform-docs-samples-int-trigger (cloud-foundation-cicd)` failed with `--- FAIL: TestSamples/2/sqlserver_instance_private_ip (603.18s)`. I feel my change should not impact it. Please advice. Thanks.

Sorry for the trouble. The CICD is the process of being upgraded and we would have wait for it be completed or this bug to cleared up.
Originally posted by @msampathkumar in https://github.com/terraform-google-modules/terraform-docs-samples/issues/538#issuecomment-1834066305

Update: When tested, the samples seem be working fine. Said that, it took long time for the samples to deploy(~5 mins). Checking to improve the code.


[HACKTOBERFEST 2024] Completed Problem Solving and Algorithmic Thinking Quiz #56216

This pull request addresses issue #56216 as part of the Hacktoberfest 2024 initiative.
Summary of Changes:

Created a comprehensive Problem Solving and Algorithmic Thinking Quiz located at /curriculum/challenges/english/25-front-end-development/quiz-problem-solving-and-algorithmic-thinking.
Included 20 quiz questions focusing on various problem-solving approaches, as specified in the issue description.
Each question is relevant to the topics outlined and includes concise code blocks where applicable.

Topics Covered:

Problem Solving Approaches
Algorithmic Thinking

This contribution aims to enhance the educational resources available for learners and facilitate a better understanding of fundamental problem-solving concepts in programming.

that issue is not assigned to you, also if you want to contribute please follow the guidelines, which include not deleting the PR template


JavaScript and TypeScript interop

Title: Blazor JavaScript and TypeScript interop
Path: docs/javascript-typescript-interop.md
UID: client-side/blazor/javascript-typescript-interop
TOC: JavaScript/TypeScript interop between Dependency Injection and Host and deploy
Add to toc.md and to the docs index.md page in the same spot as the TOC.
@rstropek will take this one.

Improved .NET and JavaScript interoperability.
In some scenarios, when building a Blazor application you'll have to invoke JavaScript functions from .NET and .NET methods from JavaScript code. Blazor includes support for these two scenarios, calling JavaScript functions from C# and calling .NET methods from JavaScript.
Invoking JavaScript functions from .NET
There are times when your Blazor .NET code needs to call some JavaScript code, for example to expose some platform specific capability to the .NET application. For these cases, you can use the T Invoke<T>(functionName, args) and Task<T> InvokeAsync<T>(functionName, args) methods in the RegisteredFunction class to invoke a given set of functions registered with Blazor on the JavaScript side by calling Blazor.registerFunction('functionName',functionImplementation). For example:
Blazor.registerFunction(
    'echo',
    function(message){
        return message;
    });

Blazor.registerFunction(
    'echoAsync',
    function(message){
        return Promise.Resolve(message);
    });

var helloWorld = RegisteredFunction.Invoke<string>("echo","Hello world!");
var helloWorldAsync = await RegisteredFunction.InvokeAsync<string>("echoAsync","Hello world async!");

The JavaScript snippet above, registers the given functions as 'echo' and 'echoAsync' with the Blazor runtime.
Then, on the C# snippet, the functions are invoked by calling Invoke and InvokeAsync respectively passing in the function name (echo and echoAsync) and the desired message to reply back.
##Invoking .NET methods from JavaScript
In some scenarios JavaScript code in the browser needs to call .NET methods, for example when a callback in JavaScript is triggered. This can be achieved by using the functions Blazor.invokeDotNetMethod and Blazor.invokeDotNetMethodAsync from JavaScript. These two functions allow JavaScript to call sync and async .NET methods respectively. These methods must be static, non-generic, must not be overloaded and all the method parameters must be concrete types and deserializable using JSON. For example:
namespace Alerts
{
    public class Timeout
    {
        public static void TimeoutCallback()
        {
            Console.WriteLine('Timeout triggered!');
        }
    }
}

Blazor.invokeDotNetMethod({
    type: {
        assembly: 'MyTimeoutAssembly',
        name: 'Alerts.Timeout'
    },
    method: {
        name: 'Timeoutcallback'
    }
})

@rstropek Are you still interested in taking this one on?
If not, @guardrex do you want this one or should I go ahead and put together PR for it?

This topic should also cover putting the JS interop code in a Blazor class library (dotnet new blazorlib) so you can easily share it as a NuGet package.

@guardrex I can't think of anything more relaxing than writing Blazor docs! 😄

@danroth27 We haven't heard back, so I'm going to work on this one today (Saturday). I should have it submitted either tonight or tomorrow.


Fix rendering of injectedAnnotations in Helm charts

If an injected annotation value contained a double-quote character, the rendered istiod-injector-configmap YAML would be invalid. Unmarshalling the inject config would fail with: update error: failed to unmarshal injection template: error converting YAML to JSON: yaml: line 10: did not find expected key

Hi @luksa. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/ok-to-test

@zbintliff it did not, I don't think we realized that case would be impacted

no worries, glad I was able to find why it changed though.
thanks


SOLR-16458: Implement GET allLevels endpoint

https://issues.apache.org/jira/browse/SOLR-16458
Description
As mentioned on SOLR-15781, the v2 API implemented in this PR intends to breach the of the yet to be solved v2 API endpoints.
Solution
This PR implements a single v2 endpoint:

GET /api/node/logging/levels

The PR contains the code that is still under development. The idea is to confirm is the work is in the direction expected from the contributor.

Tests

No tests done

Checklist
Please review the following and check all that apply:

[x] I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
[ ] I have created a Jira issue and added the issue ID to my pull request title.
[x] I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
[x] I have developed this patch against the main branch.
[x] I have run ./gradlew check.
[ ] I have added tests for my changes.
[ ] I have added documentation for the Reference Guide

Hi Calvnce.  I guess you're off to a good start but obviously more to do.  You have a new source file here but nothing calls it; I don't think Solr uses any auto-registration based on scanning annotations (as some platforms might do).  For example AddReplicaPropertyAPI is registered in CollectionsHandler.  You'll want to test this of course, both an automated test but actually try it.  I recommend looking at other recent PRs pertaining to the V2 APIs.

Hi @calvnce , thanks for the PR!
At a glance I agree with David - this "resource" file is a great start but we'll need to register this somewhere for it to actually get detected and wired-up at runtime.  Typically this works by linking the V2 API to the v1 "RequestHandler".  RequestHandlers have a getJerseyResources method for this purpose.  (See the example here for reference, which links the AddReplicaPropertyAPI to CollectionsHandler.)
For the API you're addressing in this PR, you'd need to add a similar getJerseyResources method to Solr's LoggingHandler class.
Let me know if there's anything else I can do to help!

Hi, @gerlowskija
It has been a while since I did this PR. I have been doing self-study but it seems I lack some guide. I wish to get a mentor
Would you kindly consider taking me along as your mentee?

My schedule is a little inflexible at this point to set up anything formal, but I'm more than happy to help out as I can!  Do you have particular questions about this PR, or APIs in Solr that we can work through here?
Beyond this PR there are some really good resources out there on getting started with Solr.  I've actually done some workshops myself on Getting Started in Solr Contribution and even specifically on v1 and v2 APIs in Solr.
If you're looking for more synchronous help the Solr community has started having monthly virtual "meetups".  And we sporadically have "Office Hours" as well to help bootstrap new contributors interested in getting started with the project.  Those are usually discussed and scheduled on Solr's "Dev" mailing list that you can find information on here.

Alright, thanks for getting the ball rolling on this @calvnce !  I pushed up some changes that take your starting point and add the remaining APIs, tests and docs.
Curious if you have any thoughts or if this helps explain anything that was confusing before?  Lmk!  I'll aim to merge some time next week pending any major review feedback here.  (I've credited you in our 'CHANGES.txt' file as 'Calvince Otieno' - let me know if you'd prefer something different.) Thanks again Calvince!


GulpUglifyError: unable to minify JavaScript

Versions:
"gulp": "3.9.1",
    "gulp-clean-css": "2.0.12",
    "gulp-concat": "2.6.0",
    "gulp-imagemin": "3.0.3",
    "gulp-nodemon": "2.1.0",
    "gulp-rename": "1.2.2",
    "gulp-ruby-sass": "2.1.0",
    "gulp-sourcemaps": "1.6.0",
    "gulp-uglify": "2.0.0",

Code:
gulp.task('concat-prod', () => {
    return gulp.src(jsFilesArray)
        .pipe(concat('client.js'))
        .pipe(gulp.dest('assets/build/'))
        .pipe(uglify({mangle: false}))
        .pipe(rename('client.min.js'))
        .pipe(gulp.dest('assets/build/'));
});

Error:
internal/streams/legacy.js:59
      throw er; // Unhandled stream error in pipe.
      ^
GulpUglifyError: unable to minify JavaScript
    at createError (/home/user/user/client/node_modules/gulp-uglify/lib/create-error.js:6:14)
    at wrapper (/home/user/user/client/node_modules/lodash/_createHybrid.js:87:15)
    at trycatch (/home/user/user/client/node_modules/gulp-uglify/minifier.js:26:12)
    at DestroyableTransform.minify [as _transform] (/home/user/user/client/node_modules/gulp-uglify/minifier.js:76:19)
    at DestroyableTransform.Transform._read (/home/user/user/client/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:159:10)
    at DestroyableTransform.Transform._write (/home/user/user/client/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:147:83)
    at doWrite (/home/user/user/client/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:313:64)
    at writeOrBuffer (/home/user/user/client/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:302:5)
    at DestroyableTransform.Writable.write (/home/user/user/client/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:241:11)
    at DestroyableTransform.ondata (internal/streams/legacy.js:16:26)

Hi, I just land in this error:
GulpUglifyError: unable to minify JavaScript
Caused by: SyntaxError: Unexpected token: name (Adapter)

Uglify cannot parse ES6, it will throw you syntax errors. Either set TypeScript to target ES5, post-process your generated JS with babel, or use a different minifier.

Is an comment of 2016, is still valid?
ref: https://github.com/webpack/webpack/issues/2972#issuecomment-261705632


feat: (1) Support zero copy from tf tensor to dlpack  (2) Fix pymodul…

Add CMakeLists.txt

Fix python module function call conventions

Zero copy support

Use alignment=64, refer to https://github.com/apache/incubator-tvm/blob/master/src/runtime/ndarray.cc

Since tensor from OpKernelContext do not ensure memory alignment, buffer check is required.

If alignment is not compatible for original buffer from TensorFlow tensor, use OpKernelContext.allocate_temp() to allocate at least (orignal size + alignment) bytes as a new flat tensor, which back the actual used buffer to TVM functions. Extra data copy is required also.

LGTM


PLT-3535 MarloweBulkSync Server

[x] Added new bulk sync protocol.
[x] Added a server implementation to marlowe-sync
[x] Rewrote marlowe-finder to use bulk sync.

Pre-submit checklist:

Branch

[x] Tests are provided (if possible)
[ ] Test report is updated (if relevant)
[x] Commit sequence broadly makes sense
[x] Key commits have useful messages
[ ] Relevant tickets are mentioned in commit messages
[x] Formatting, PNG optimization, etc. are updated

PR

[x] Self-reviewed the diff
[x] Useful pull request description

Review required
[x] Substantial changes to code, test, or documentation
[ ] Change made to Marlowe validator (@bwbush and @palas must be included as reviewers)
Review not required
[ ] Minor changes to non-critical code, documentation, nix derivations, configuration files, or scripts
[ ] Formatting, spelling, grammar, or reorganization

[x] Reviewer requested

Thanks for performing that test, I'll investigate!


I have a sunburn

help

Use cooling gel

Use a cooling gel

Will try tomorrow, thank you. Closing as solved.


Plugin flexget.plugins.parsers.parser_guessit failed to import dependencies. No module named rules

Now that I've updated to 1.2.495 I'm getting a new error. I've done a pip update so I ought to have all the required modules:
2016-03-27 23:00 CRITICAL plugin                        Plugin `flexget.plugins.parsers.parser_guessit` failed to import dependencies
2016-03-27 23:00 ERROR    plugin                        No module named rules
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugin.py", line 381, in _load_plugins_from_dirs
    __import__(module_name)
  File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/parsers/parser_guessit.py", line 8, in <module>
    from guessit.rules import rebulk_builder
ImportError: No module named rules

weird.. https://github.com/guessit-io/guessit/blob/master/guessit/rules/init.py#L37
something may of went wrong with your guessit install..
maybe try
pip install --upgrade guessit

root@zzz:/home/stark# pip install --upgrade guessit
Downloading/unpacking guessit from https://pypi.python.org/packages/source/g/guessit/guessit-2.0.4.tar.gz#md5=2fc60912f7a12ca9573e265de23556d6
  Downloading guessit-2.0.4.tar.gz (73kB): 73kB downloaded
  Running setup.py (path:/tmp/user/0/pip-build-nWBLcd/guessit/setup.py) egg_info for package guessit

    Installed /tmp/user/0/easy_install-SIJO9v/pytest-runner-2.7/.eggs/setuptools_scm-1.10.1-py2.7.egg
    zip_safe flag not set; analyzing archive contents...

    Installed /tmp/user/0/pip-build-nWBLcd/guessit/.eggs/pytest_runner-2.7-py2.7.egg

    warning: no files found matching '*.ini' under directory 'guessit'
    warning: no previously-included files matching '*.pyc' found under directory 'guessit'
Requirement already up-to-date: rebulk>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from guessit)
Downloading/unpacking babelfish>=0.5.5 (from guessit)
  Downloading babelfish-0.5.5.tar.gz (90kB): 90kB downloaded
  Running setup.py (path:/tmp/user/0/pip-build-nWBLcd/babelfish/setup.py) egg_info for package babelfish

Downloading/unpacking python-dateutil from https://pypi.python.org/packages/any/p/python-dateutil/python_dateutil-2.5.2-py2.py3-none-any.whl#md5=50283d17f1a5c5919886af456afe4db1 (from guessit)
  Downloading python_dateutil-2.5.2-py2.py3-none-any.whl (201kB): 201kB downloaded
Requirement already up-to-date: six in /usr/lib/python2.7/dist-packages (from rebulk>=0.7.0->guessit)
Installing collected packages: guessit, babelfish, python-dateutil
  Found existing installation: guessit 0.11.0
    Not uninstalling guessit at /usr/lib/python2.7/dist-packages, owned by OS
  Running setup.py install for guessit

    warning: no files found matching '*.ini' under directory 'guessit'
    warning: no previously-included files matching '*.pyc' found under directory 'guessit'
    Installing guessit script to /usr/local/bin
  Found existing installation: babelfish 0.5.4
    Not uninstalling babelfish at /usr/lib/python2.7/dist-packages, owned by OS
  Running setup.py install for babelfish

  Found existing installation: python-dateutil 2.4.2
    Not uninstalling python-dateutil at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed guessit babelfish python-dateutil

Hm. I did  apt-get remove guessit and now I don't get that error.
So there seems to be some version incompatibility with guessit 0.11.0 and the dependency isn't checked correctly?

It's generally a bad idea to install python packages from apt. Always use pip if possible.

Not uninstalling guessit at /usr/lib/python2.7/dist-packages, owned by OS

This very line is the reason you should avoid installing Python packages with package managers that are not pip or easy_install. pip does not have the authority to uninstall/upgrade Python packages that are owned by the OS.


[Slash Commands] Some commands will remain undeleted on exit on self-hosted bot

Issue description
Self-hosting bots delete all of registered commands on exit, but Docker defaults to sending a SIGKILL in 10 seconds after sending SIGTERM.
If command deletion is limited by a rate limit, the bot may be killed before all commands are deleted.
2022/02/23 04:48:33 Registering command map on guild 80258********36117
2022/02/23 04:49:03 Received Sigterm or Kill signal. Bot will terminate in 1 second
2022/02/23 04:49:04 Deleting slash commands
2022/02/23 04:49:04 Deleting command help on guild 80258********36117
2022/02/23 04:49:05 Deleting command info on guild 80258********36117
2022/02/23 04:49:05 Deleting command link on guild 80258********36117
2022/02/23 04:49:05 Deleting command unlink on guild 80258********36117
2022/02/23 04:49:06 Deleting command new on guild 80258********36117
2022/02/23 04:49:06 Deleting command end on guild 80258********36117
2022/02/23 04:49:06 [DG2] restapi.go:155:RequestWithLockedBucket() Rate Limiting https://discord.com/api/v8/applications/805101314429943828/guilds/80258********36117/commands/945666729038716948, retry in 18.692s
2022/02/23 04:49:06 You are being rate limited.
# 👆👆👆 Killed here during waiting for retry, and commands `refresh`, `privacy` and `map` are not deleted

Workaround
stop_grace_period option for automuteus should be specified: https://docs.docker.com/compose/compose-file/compose-file-v3/#stop_grace_period
This option extends the wait time for sending SIGKILL. It is safe to set 1m as default value, since failed deletions will be retried and completed with a wait time of about 20 seconds.
2022/02/23 04:49:03 Received Sigterm or Kill signal. Bot will terminate in 1 second
2022/02/23 04:49:04 Deleting slash commands
2022/02/23 04:49:04 Deleting command help on guild 80258********36117
2022/02/23 04:49:05 Deleting command info on guild 80258********36117
2022/02/23 04:49:05 Deleting command link on guild 80258********36117
2022/02/23 04:49:05 Deleting command unlink on guild 80258********36117
2022/02/23 04:49:06 Deleting command new on guild 80258********36117
2022/02/23 04:49:06 Deleting command end on guild 80258********36117
2022/02/23 04:49:06 [DG2] restapi.go:155:RequestWithLockedBucket() Rate Limiting https://discord.com/api/v8/applications/805101314429943828/guilds/80258********36117/commands/945666729038716948, retry in 18.692s
2022/02/23 04:49:06 You are being rate limited.
2022/02/23 04:49:25 Deleting command refresh on guild 80258********36117
2022/02/23 04:49:25 Deleting command privacy on guild 80258********36117
2022/02/23 04:49:25 Deleting command map on guild 80258********36117
2022/02/23 04:49:26 [DG2] wsapi.go:868:CloseWithCode() called
2022/02/23 04:49:26 [DG2] wsapi.go:874:CloseWithCode() closing listening channel
2022/02/23 04:49:26 [DG2] wsapi.go:884:CloseWithCode() sending close frame
2022/02/23 04:49:27 [DG2] wsapi.go:897:CloseWithCode() closing gateway websocket
2022/02/23 04:49:27 [DG2] wsapi.go:908:CloseWithCode() emit disconnect event
# 👆👆👆 The bot has been gracefully shutted down

Version
Upstream slash-commands branch in automuteus.

I'd also be open to the option of configuring the bot itself instead of Docker. I run the bot outside of docker when I develop it, so I could look into that option. The bot catches the SIGTERM signal already, but it could wait to ensure the commands are deleted properly before exiting


Lens flares to WebGPU

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Snapshot stored with reference name:
refs/pull/15424/merge
Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15424/merge/index.html
To test a playground add it to the URL, for example:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15424/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/15424/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/15424/merge
https://gui.babylonjs.com/?snapshot=refs/pull/15424/merge
https://nme.babylonjs.com/?snapshot=refs/pull/15424/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/15424/merge#BCU1XR#0

WebGL2 visualization test reporter:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15424/merge/testResults/webgl2playwright/index.html

Visualization tests for WebGPU (Experimental)
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15424/merge/testResults/webgpuplaywright/index.html


Laravel 8.47.0 Shift

This pull request includes updates for the recent minor version release of Laravel as well as updates to your package dependencies. Feel free to commit any additional changes to the shift-ci-v8.47.0 branch.
Before merging, you need to:

Checkout the shift-ci-v8.47.0 branch
Review all pull request comments for additional changes
Run composer update
Test your application (no tests?)

:information_source: If you are running PHP 8 be sure to run composer update locally to ensure you have the proper versions of your dependencies to reflect your PHP 8 environment.

:warning: You are running version 4.6.0 of spatie/laravel-translatable. The latest version is 5.0.0. You should review this dependency to see if you can upgrade to the latest version.


Paulbartell/add gitattributes

Draft

Codecov Report

Merging #28 (670add4) into main (ea63fa9) will decrease coverage by 3.22%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
- Coverage   95.36%   92.13%   -3.23%
==========================================
  Files           4        4
  Lines        1186     1272      +86
  Branches      334      342       +8
==========================================
+ Hits         1131     1172      +41
- Misses         17       53      +36
- Partials       38       47       +9

Flag
Coverage Δ

unittests
92.13% <ø> (-3.23%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

event_groups.c
79.34% <ø> (ø)

list.c
100.00% <ø> (ø)

queue.c
93.25% <0.00%> (-5.99%)
:arrow_down:

stream_buffer.c
96.12% <0.00%> (ø)

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 2f6c91b...670add4. Read the comment docs.


feat: support regex in ape.reverts()

What I did

Added regex support in ape.reverts()
Cleared up RevertsContextManager tests and test docstrings

fixes: #873
fixes: APE-311
How I did it
Allow expected_message and dev_message in RevertsContextManager to accept re.Pattern objects
How to verify it
# Matches explictly "dev: foo" or "dev: bar"
with ape.reverts(re.compile(r"^dev: (foo|bar)$")):
    ...

# Matches explictly "dev: foo" or "dev: bar"
with ape.reverts(dev_message=re.compile(r"^dev: (foo|bar)$")):
    ...

Checklist

[x] All changes are completed
[x] New test cases have been added
[x] Documentation has been updated

Just had this thought: If the user provides a normal message but the assertion fails, I wonder if we should go ahead and check if it is a regex string and re-try the assertion. Thoughts?
I am worried users may get confused when regex-strings are not working.

Just had this thought: If the user provides a normal message but the assertion fails, I wonder if we should go ahead and check if it is a regex string and re-try the assertion. Thoughts?
I am worried users may get confused when regex-strings are not working.

@unparalleled-js The issue is we can't really check a regex without either having them pass in re.Pattern or using a different kwarg name (which is what Brownie does, e.g. dev_msg_pattern or similar)
If someone were to pass in a string that happened to contain regex characters like ? or ., we can't really tell if they were trying to use regex or trying to actually use a string
For example "test?" could be passed in as a string by accident, but let's say the dev comment in the contract is "test". If we treated that as regex then, it would actually pass the assertions even though it shouldn't. It seems like that could create confusion about what should or shouldn't be matched, since we're not using Brownie's method of using differently named kwargs


Uncaught TypeError: Cannot read property 'classList' of null

I'm having trouble getting this work on my test page.
I call headroom.js then initialize it using vanilla JS:
    <script type="text/javascript">
      var myElement = document.querySelector(".navbar");
      var headroom  = new Headroom(myElement);

      headroom.init();
    </script>

This is the CSS I'm using to style things:
.navbar	{
	position: fixed;
	height: 80px;
	bottom: 0;
	left: 0;
	width: 100%;
}
.headroom {
    transition: transform 200ms linear;
}
.headroom--pinned {
    transform: translateY(-100%);
}
.headroom--unpinned {
   transform: translateY(0%);
}

However, I get the following console error each time:
Uncaught TypeError:
Cannot read property 'classList' of null headroom.js:139
Headroom.init headroom.js:139
(anonymous function)(index):40
The weird thing is that .navbar definitely exists in the HTML. I've tried other elements, too, same problem. What really obvious thing am I failing to see?

Do you have an example online somewhere?
What browser/device? Is your script in the head or at the bottom of body? If head, then you'll need to wait until the dom is ready, see DOMContentLoaded. What do you see in the console with this code?
var myElement = document.querySelector(".navbar");
console.log(myElement); // is this null?
var headroom  = new Headroom(myElement);
headroom.init();

Going to close, as I'm fairly certain this isn't a headroom issue, but an implementation one (ideally this should have been posted on stackoverflow)

Yes, I apologize — I realized that after posting. I tried implementing again and had no problems.
--
Daniel Genser
email<EMAIL_ADDRESS>skype: DanielGenser
mobile:<PHONE_NUMBER>
On Mon, Jan 12, 2015 at 10:42 AM, Nick Williams<EMAIL_ADDRESS>wrote:

Going to close, as I'm fairly certain this isn't a headroom issue, but an implementation one (ideally this should have been posted on stackoverflow)
Reply to this email directly or view it on GitHub:
https://github.com/WickyNilliams/headroom.js/issues/138#issuecomment-69621231

No problems, thanks for letting me know


feat(deps): upgrade compiler dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-compiler-dependencies-2.x" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 1409

Questions ?
Please refer to the Backport tool documentation


AprilTags Support on DepthAI/megaAI

Start with the why:
In unstructured environments, DepthAI allows capabilities (spatial AI) which previously required multiple components (e.g. a depth camera, a host, and a neural processor) which then precluded application of this spatial AI in locations where embedded application is required (i.e. low size, weight, power, boot-time, and/or cost).
In structured environments (e.g. a warehouse), AprilTags (here) are the go-to, as they provide ‘cheat code’ level information on relative location (x,y,z) and pose (yaw, pitch, roll) of tags.  So these can be put on objects (boxes) for locating them, walls or floors for navigation, or on complicated structures to know their pose/location/etc. real time.
So if DepthAI supports AprilTags, it allows use of this cheat code (fully offloaded from the host) in conjunction with the unique value-add that other solutions can’t do - unstructured 3D location of objects of interest (e.g. a human).
So then DepthAI could enable for example collaborative robotics, where a human (an unstructured object) is followed in a warehouse, and DepthAI is providing all the AprilTags results so that this robot knows exactly where it is in physical space while it follows the person. (And all sorts of other collaborative tasks you could imagine).
This sort of application is exactly why the evgrandprix (and other autonomous) 1/5th scale autonomous-racing competitions put AprilTags on their vehicles. It allows a cheat-code for each vehicle to know the relative location of the other vehicles in xyz and yaw/pitch/roll.
And most importantly, these tags are so ubiquitous used, there’s probably a whole slew of use-cases that we can’t even think of that folks will use DepthAI for if AprilTags are cleanly supported, particularly if at a high framerate.  For example, Peter Mullen reached out this weekend for his application, here: https://april.eecs.umich.edu/software/apriltag, wanting April Tags support.  His application is interesting as he is mounting them on walls such that the camera can self-localize, and he has a system (above) which actually uses the location in pixel space of the corners of the April Tags to further improve the localization results (doing SLAM-like techniques).
So we should include his suggested additional output (the location in pixel-space of the detected corners of the April Tags) detailed below in what:
The how:
Characterize how many resources AprilTags takes.
If AprilTags looks to ‘heavy’ for this, then define which stream(s) it needs to be mutually exclusive with.  From their comment of “Real-time performance can be achieved even on cell-phone grade processors.” it seems like it will likely be runnable in parallel to the existing DepthAI functions.

https://april.eecs.umich.edu/software/apriltag

The what:
Implement April Tag detection on DepthAI as a stream that users can optionally enable, ideally while the other current functions are being used (neural inference, depth, etc.).
Enable a user-selectable optional output of meta-data (in addition to the 6DoF result that AprilTags gives) which is the pixel-space coordinates of the 4 corners of the april tags (maybe as an optional output) correlated with the tag ID - allowing folks to do their own work off that data, either ignoring our 6DOF result from April Tags, or combining their own algorithm on top of it.

As a quick update, initial support for this is in https://github.com/luxonis/depthai/pull/139.

Do you have an ETA for when this will be ready? Is there an example I can try now?

Sorry about the delay.  Let me ask internally.  We had put this on hold in lieu of other features which had to date been more popularly requested.

Any updates? I kinda got this camera specifically for the april tag support it advertised :/

Hi @tomvdb (and @r1b4z01d ),
So we are again working on this. @csaba-luxonis is working on it.  That said, we understand that we did indeed market this feature and then not get it out, so we are more than happy to provide a full refund on your purchase.
If you'd like to do so, please feel free to reach out to us at<EMAIL_ADDRESS>Thanks, and sorry about the delay.
-Brandon

Hi Brandon,
Nope, not getting my oak-D back ;) All good, I'm starting to think that april tags/aruco tags might be better suited on the host side anyways. I've been doing some experiments and want to try and see if the depth features can enhance my aruco data on the host side.
Thanks!

Thanks, @tomvdb .  :-). Yes, AprilTags actually will run fairly well on a lot of hosts.  We will be implementing it on DepthAI though as for pure-embedded usecases DepthAI is the only device that can run AprilTags.
@csaba-luxonis is on it.  The last time we implemented it (https://github.com/luxonis/depthai/pull/139), the approach did not parallelize well, and we ended up just running it on the little CPU in the Myriad X instead.  So we're starting from first principles this time to see if we can make it parallelize.

HI @Luxonis-Brandon , any eta for when AprilTags will be ready for the Oak-D? I could really use it for my project. Thanks!

So I know @csaba-luxonis was able to at least get it working on a single frame running on OAK-D.  And then was working on sizing automatically from the cameras using Image Manip node.  Will check in to see.  I don't immediately have an ETA though.

ok thanks!

Here's the initial cut at it, only works on full-frame as of now @GOBish @tomvdb @r1b4z01d .  There's a crash occurring with Image Manip node on Grey8 that is preventing it from working on lower resolutions/higher frame-rates.
https://github.com/luxonis/depthai-python/pull/298

Thanks @Luxonis-Brandon ! Will give it a shot.

Thanks, @GOBish !  And thanks goes to @csaba-luxonis , I'm just the messenger.  :-)

Hi @accio-robot ,
We don't have 6-DoF yet.  I'm not sure on the effort to add that.  I will ask internally.

As of version 2.15, AprilTags support has been mainline to the depthai.

I very much would like to see pose estimation of the april tag (I assume that's what the 6-dof is).  I was planning on using an april tag to assist with the docking of my robot, but without the pose estimation it won't orient correctly.

Currently, you can use the returned points to run opencv's solvePnP on the host to get the 6 DOF.
cc: @szabi-luxonis  on the efforts to add this on device.

Currently, you can use the returned points to run opencv's solvePnP on the host to get the 6 DOF. cc: @szabi-luxonis on the efforts to add this on device.

Feel free to initially implement on the LEON cores, since it's not computationally heavy for that amount of parameters.
We can look into porting to shaves once it's done, for extra performance, if needed.

Hhmm. I was thinking if we could just port the ePnP which you had tried already.

Hhmm. I was thinking if we could just port the ePnP which you had tried already.

ePnP is definitely easier to port, with Eigen implementation, otherwise the original uses opencv 1 or 2.
Either way is fine for this problem.

Hello Luxonis team and congratulations for your great job with in OAK.
I'm wondering if it's possible to know what is the detection algorithm used for the embedded AprilTag node currently? Is the detection method based on a specific branch of the official repository https://github.com/AprilRobotics/apriltag or it uses a deep-learning approach?

Hello Luxonis team and congratulations for your great job in OAK.
I'm wondering if it's possible to know what is the detection algorithm used for the embedded AprilTag node? Is this detection method based on a specific branch of the official repository https://github.com/AprilRobotics/apriltag or maybe it uses a deep-learning approach?

Thanks @themarpe for your assistance.

Has there been an update on this? I tried out the example here: https://github.com/luxonis/depthai-python/blob/main/examples/AprilTag/apriltag.py
Is seems to perform poorly vs just using OpenCV with apriltag library. I notice for example it doesn't seem to do well with my test images at the same distances, or orientations. And more importantly it seems to be unable to give me a detection, unless there is some movement. After detecting it seems to not maintain a lock on the tag, unless it moves slightly.
Am I doing something wrong?

This sample python code, that just accesses the camera image, and uses apriltag library would be my performance baseline. We don't seem to be close. Is there a way to get there?
import depthai as dai
import cv2
import apriltag

# Initialize AprilTag detector
detector = apriltag.Detector()

# Initialize Luxonis OAK-1-MAX pipeline
pipeline = dai.Pipeline()
cam = pipeline.createColorCamera()
cam.setPreviewSize(640, 480)
cam.setInterleaved(False)
cam.setFps(30)

# Define output stream
xout = pipeline.createXLinkOut()
xout.setStreamName("preview")
cam.preview.link(xout.input)

# Create device and start the pipeline
device = dai.Device(pipeline)
preview_queue = device.getOutputQueue(name="preview", maxSize=1, blocking=False)

while True:
    # Get the current frame from the camera
    frame = preview_queue.get().getCvFrame()

    # Convert frame to grayscale
    gray_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

    # Detect AprilTags in the grayscale frame
    detections = detector.detect(gray_frame)

    # Print detected AprilTags information
    for detection in detections:
        print(f"Detected AprilTag: ID {detection.tag_id}, Center ({detection.center[0]}, {detection.center[1]})")

    # Display the frame with AprilTag detections (optional)
    for detection in detections:
        cv2.circle(frame, tuple(detection.center.astype(int)), 4, (0, 255, 0), 2)
        cv2.putText(frame, str(detection.tag_id), tuple(detection.center.astype(int)), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)
    cv2.imshow('Preview', frame)

    # Exit the loop if 'q' key is pressed
    if cv2.waitKey(1) == ord('q'):
        break

# Clean up
cv2.destroyAllWindows()
device.close()
device = None

I'm testing using these tags printed on 8x11 paper. Open CV + Apriltag lib does amazing... Luxonis cam + Onboard MyriadX, not so much, sadly.


Will there be a docker for running our own instance locally?

Will there be a docker for running our own instance locally?

Thanks for comment, but I don't plan to provide Docker at this time.


WinBlur (Windows 10 & Above)

Soo... it's not working on windows 10, i guess.

This will work on the version of windows that supports these blur effects. Please do your research and check if your windows version is compatible. If so, then it's likely that the setting is just turned off and you have to turn it off. Cheers!

This will work on the version of windows 10 that supports these blur effects. Please do your research and check if your windows version is compatible. If so, then it's likely that the setting is just turned off and you have to turn it off. Cheers!

I did everything, and nothing work out, so i just installed win 11, and that fix this, so...
still thanks for your time and reply.


chore(deps): update common-dev-assets digest to e735fa7

This PR contains the following updates:

Package
Update
Change

common-dev-assets
digest
93c2ba7 -> e735fa7

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

/run pipeline

:tada: This PR is included in version 1.10.14 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


chore: upgrade jsonwebtoken version to 9

Small change, non urgent.

I'm sorry, may I ask what are the benefits of upgrading jsonwebtoken?
Because I have upgraded it before, and its documentation states that the minimum required Rust version is 1.67.0. However, in reality, it cannot compile if the version is lower than 1.73.0. This is a breaking change for some projects.

Oh no worries, it was just my project was using v9 so wanted to upgrade.
It's not important though since it has little impact.
Perhaps we could put it behind a jwtv9 feature flag.

This is not a priority, so I'll close until it's more viable.


Better integration with camel

Resolves #121

I have validated this build locally against quarkus-pooled-jms, and everything works as expected.

@turing85  That's great and is it possible to add these tests on https://github.com/apache/camel-quarkus/tree/main/integration-tests/jms-artemis-client ?

Looking at the tests you linked (I actually used them as template for my tests), isn't this case covered by the with-external-tests?

I think I never test it with @Identifier("externally-defined"). So it could be good to add a test with CustomConnectionFactory by using @Identifier. Would you like to work on it?

I do no t fully get what the actual gap in coverage is. Do you want to discuss this in the quarkus zulip chat?

On a side note: in the with-external, the @Identifier("externally-defined") is to activate the health endpoint, nothing more. As you can see in the application code itself, the identifier is not really used anywhere.

Ok, now I understand that @Identifier is only used for health check. If this is the case, I think the current tests in camel-quarkus are fine. So this PR could be closed or is there any other thing you need to be concerned with Camel?

@zhfeng from our side (quarkus-artemis), I think we are fine. It would be nice to have some additional tests on the camel-quarkus-side. I'll provide some tests to camel-quarkus as soon as I have some spare time. I removed the @Identifier-annotation from the with-external camel test to make it clear that this annotation is not needed in this case for the feature to work.

I was able to validate the current implementation against the relevant camel integration tests (the client-, sjms-, and sjms2-tests)

I took the liberty and re-organized the tests, introducing common-modules to eliminate code duplication. The PR "looks" big, but most of it is integration test implementation and refactoring.


Prototype mock scripted APIs "Reset" button doesn't seem to work as intended and removes the script from the resource

Description:
Once clicking the "Reset" button in the resource pane, the script should be reset to the original script generated from the OAS definition. But it doesn't seem to respond.
But if someone click on saves after clicking on reset, seems like the script gets removed from the API resource.
Steps to reproduce:

This is in progress

This issue has been fixed with latest changes in master. It is not reproducing in locally built pack.

Hence we can close this.


This print statement was only used for debugging and is not needed.

Removing a print statement from omni_listen_rfcat because it was only used to debug the following exception.
Looking at the rfcat code there is a loop that will raise(ChipconUsbTimeoutException()) every time, based on the loop criteria: while (time.time() - startTime)*1000 < wait
Here's a look at the related rfcat loop if you're curious to see where this exception is being raised.
/usr/local/lib/python2.7/dist-packages/rflib/chipcon_usb.py
    def recv(self, app, cmd=None, wait=USB_RX_WAIT):
        '''
        high-level USB EP5 receive.
        checks the mbox for app "app" and command "cmd" and returns the next one in the queue
        if any of this does not exist yet, wait for a RECV event until "wait" times out.
        RECV events are generated by the low-level recv thread "runEP5_recv()"
        '''
        startTime = time.time()
        self.recv_event.clear() # an event is only interesting if we've already failed to find our message

        while (time.time() - startTime)*1000 < wait:
            try:
                b = self.recv_mbox.get(app)
                if b:
                    if self._debug: print>>sys.stderr, "Recv msg",app,b,cmd
                    if cmd is None:
                        keys = b.keys()
                        if len(keys):
                            cmd = b.keys()[-1] # just grab one.   no guarantees on the order

                if b is not None and cmd is not None:
                    q = b.get(cmd)
                    if self._debug: print >>sys.stderr,"debug(recv) q='%s'"%repr(q)

                    if q is not None and self.rsema.acquire(False):
                        if self._debug>3: print ("rsema.UNlocked", "rsema.locked")[self.rsema.locked()],2
                        try:
                            resp, rt = q.pop(0)

                            self.rsema.release()
                            if self._debug>3: print ("rsema.UNlocked", "rsema.locked")[self.rsema.locked()],2

                            # bring it on home...  this is the way out.
                            return resp[4:], rt

                        except IndexError:
                            pass

                        except AttributeError:
                            sys.excepthook(*sys.exc_info())
                            pass

                        self.rsema.release()

                self.recv_event.wait((wait - (time.time() - startTime)*1000)/1000) # wait on recv event, with timeout of remaining time
                self.recv_event.clear() # clear event, if it's set

            except KeyboardInterrupt:
                sys.excepthook(*sys.exc_info())
                break
            except:
                sys.excepthook(*sys.exc_info())

            time.sleep(0.001)

        raise(ChipconUsbTimeoutException())

👍


Download/Upload Throttle Manager

Description of the new feature / enhancement
A manager tool much like the NetLimiter by Yours Locktime Software to overview and throttle network traffic of individual apps and services.

Scenario when this would be used?
When there's not much network bandwith available and a single app download is occupying the entire bandwith, but there is no setting to throttle downloads in the app.
Supporting information
No response

/dup #23874


Remove .netcore 2

.netcore2 does not support interactive login so removing it from the sample

@JimsonChalissery please accept whenever you can - this has been pending for a while and I'd like to close it down :)