Slow performance

Hi
I'm creating an api to check if a user is member of a group.
Directly in powershell, the cmd takes only 41ms to exectue.
PS C:\Users\Administrator> measure-command {Get-ADGroupMember -Identity itchart -Recursive -Server stie2.articatech.local | Where-Object {$_. SamAccountName -eq "admin2"}}

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 0
Milliseconds      : 41
Ticks             : 419454
TotalDays         : 4.85479166666667E-07
TotalHours        : 1.16515E-05
TotalMinutes      : 0.00069909
TotalSeconds      : 0.0419454
TotalMilliseconds : 41.9454

But over Pode the response time takes 120ms or more, this is my code
#Start Pode Server
Import-Module ActiveDirectory
Start-PodeServer -Threads 20 {

    #Attach port 8000 to the local machine address and use HTTP protocol
    Add-PodeEndpoint -Address <IP_ADDRESS> -Port 8083 -Protocol HTTP

    #Create route and return a static value
    Add-PodeRoute -Method Get -Path '/static' -ScriptBlock {
        $data = Get-ADGroupMember -Identity itchart -Recursive -Server stie2.articatech.local | Where-Object {$_. SamAccountName -eq "admin2"}
        if($data.Count -eq 0) {
            Write-PodeTextResponse -Value 'false'  #-Cache -MaxAge 1800
        }
        else {
            Write-PodeTextResponse -Value 'true' #-Cache -MaxAge 1800
        }

    }
}

I'am doing something wrong?
Best Regards

Hi @abolinhas,
I would say this is expected. The overhead added from Pode will be on average an additional 40-80ms on top of the command being run in isolation. Pode needs to run a lot more logic for additional request parsing and response building, which adds extra time.
For example, this command takes 2-5ms for me in isolation:
Get-ChildItem c:\ | Select-Object Name

but once being run via Pode the request>response takes 40-70ms. And via a browser it'll add a few more milliseconds for rendering the DOM.
You could speed up the command you're running by removing the | and splitting it out into separate calls, and using foreach  over Where-Object:
$members = Get-ADGroupMember -Identity itchart -Recursive -Server stie2.articatech.local
$members = @(foreach ($mem in $members) {
    if ($mem.samAccountName -eq 'admin2') {
        $mem
    }
})

Hi
Thanks i will try it
This service need to support around 4k clients doing an avarange of 10rps each client.
Pode can handle such number of clients/request?
Do you recomend use Kestrel instead?
Best regards

H @abolinhas,
If you're looking for something that could handle a potential 40,000rps you would be far better off with pure ASP.NET and Kestrel (that, or Go/Rust). However, even there, like with Pode, you're going to very more than likely need horizontal scaling configured to handle the load.
I ran a quick performance test with a setup similar to yours (~120ms req duration and 20 threads), and I can get up to ~170rps with a single instance of Pode. (running on a Windows 10 laptop, 16GB RAM, 4 cores).
It also depends on the type of requests you're expecting. If they'll all for the AD example above, then yes, use something else. But if only a handful will be this, and the rest much simpler requests, I have had Pode doing ~300rps before. You could also implement caching as well - such as not running the same Get-ADGroupMemeber query every time, but only every now and then.

Thanks for the help.
I will close it.

Hi, @Badgerati
Apologies for re-opening this question, but I'm experiencing something similar.
I have a module that I'm using inside of Pode. Normal run of this module via CLI takes ~1500ms.
Module returns string output, I wrap that with  inside Pode and timing is the same.

If I use Pode with 2 threads, something interesting happens:
First request will take ~1600ms
Second request will take ~9000ms
Third request will take ~1600ms
Fourth request will take ~900ms
and so forth....
If I add more than 2 threads, the first request will be fast, then all other requests will be slow until served from the first thread.
I added timing inside my external module and can verify that the slowness comes from the reason Pode is calling the module.
Is there something that can be done to optimize this, other than running multiple instances of Pode with 1 thread on a given machine with a load-balancer?
Thanks,
Idan.

Hey @fatherofinvention,
A lot of this is going to be based on the spec of the hardware, the number of threads/runspaces enabled within Pode, and the request duration. For example, I've clocked Pode at ~300 rps myself, but this was on very simple and fast API calls - in which case to support 40,000 rps would be 133 instances of Pode.
One thing I should highlight is that I've never properly load or stress tested Pode, the only "performance" testing I've ever done is running a Pode server locally whilst running k6 scripts against it locally - all on the same machine, and k6 uses a lot of CPU when running. I've thought about trying to set up something to do it properly, but I just don't have the resources to do it.
I know there are people on Discord who have a Pode server running, and have 4k machines talking back to it as well - and they've said it handles it perfectly fine! Though I'm not sure what the request throughput is that they're doing.
Kestrel I would just forget, and it's the reason I stopped supporting fully Pode.Kestrel; since all of the request processing gets queued and then handled by PowerShell, that PowerShell processing becomes the bottleneck. Because of that bottleneck, Pode's socket listener and Kestrel clocked the same speeds. In Pode v1.0 Kestrel did make a speed difference, but since v2.0 Pode has just been on-par.
In theory, if you had powerful enough machines with load balancing, scaling, caching, and other optimisations then yes: you could handle 40,000 rps, I just don't know how many instances of Pode would actually be required. And it's also still dependant on request duration as well - if one API call took 1s that would greatly affect performance.
Without proper metrics to base it on, I'd say Pode would be best for handful to hundreds of users with the right optimisations. Or hundreds to thousands of machines if they're calling fast APIs in a "call-back-home" or "health status" manner.
Do you know what sorts of calls these users are going to be making, and the durations of requests etc.? If you do use Pode for this, please let me know, because I'd be very interested to know how it's going, and to know the results of any performance testing you might conduct yourself - if we can make Pode go faster, I'm all for it!
(one way I know of how to make Pode more performant is to move everything into .NET, and make Pode a compiled/binary PowerShell module instead. Something I've entertained for v3, but obviously it's a lot of work)
I know it's not the most helpful, but I hope that helps!

Thanks @fatherofinvention, that's really useful, and some interesting numbers as well! From the tool you ran, you didn't happen to get the RPS/RPM at all? I'll keep an eye here, as I'd be very interested to learn what you find as well 😄
The compiled module idea is a complicated one, as to do it would mean converting all of Pode over to C#. That would definitely restrict contributions and is why I've been very hesitant to do it, so any performance gains we can get in Pode current setup would be the most ideal.


TV parser doesn't deduplicate files

Starting from a valid spdx document, serialising it as tv and parsing it again leads to an invalid document.
To reproduce (using version 0.8.0a2):
from datetime import datetime

from spdx_tools.spdx.model.actor import Actor, ActorType
from spdx_tools.spdx.model.checksum import Checksum, ChecksumAlgorithm
from spdx_tools.spdx.model.document import CreationInfo, Document
from spdx_tools.spdx.model.file import File
from spdx_tools.spdx.model.package import Package
from spdx_tools.spdx.model.relationship import Relationship, RelationshipType
from spdx_tools.spdx.writer.write_anything import write_file
from spdx_tools.spdx.parser.parse_anything import parse_file
from spdx_tools.spdx.validation.document_validator import validate_full_spdx_document

def _create_minimal_document() -> Document:
    """This is a helper method to create a minimal document that describes two
    packages which both contain the same file."""
    creation_info = CreationInfo(
        spdx_version="SPDX-2.3",
        spdx_id="SPDXRef-DOCUMENT",
        data_license="CC0-1.0",
        name="SPDX Lite Document",
        document_namespace="https://test.namespace.com",
        creators=[Actor(ActorType.PERSON, "John Doe")],
        created=datetime(2023, 3, 14, 8, 49),
    )
    package_a = Package(
        name="Example package A",
        spdx_id="SPDXRef-Package-A",
        download_location="https://download.com",
    )
    package_b = Package(
        name="Example package B",
        spdx_id="SPDXRef-Package-B",
        download_location="https://download.com",
    )
    file = File(
        name="Example file",
        spdx_id="SPDXRef-File",
        checksums=[
            Checksum(ChecksumAlgorithm.SHA1, "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12")
        ],
    )

    relationships = [
        Relationship(
            "SPDXRef-DOCUMENT", RelationshipType.DESCRIBES, "SPDXRef-Package-A"
        ),
        Relationship(
            "SPDXRef-DOCUMENT", RelationshipType.DESCRIBES, "SPDXRef-Package-B"
        ),
        Relationship("SPDXRef-Package-A", RelationshipType.CONTAINS, "SPDXRef-File"),
        Relationship("SPDXRef-Package-B", RelationshipType.CONTAINS, "SPDXRef-File"),
    ]
    document = Document(
        creation_info=creation_info,
        packages=[package_a, package_b],
        files=[file],
        relationships=relationships,
    )

    return document

if __name__ == "__main__":
    document = _create_minimal_document()
    validation_messages_before_writing = validate_full_spdx_document(document)
    write_file(document, "test_file.spdx", False)
    document = parse_file("test_file.spdx")
    validation_messages_after_writing_and_parsing = validate_full_spdx_document(document)

    assert validation_messages_before_writing == validation_messages_after_writing_and_parsing

Thanks for raising the issue! :)
#695 should fix this


Fixed io extension build error

Description
The error was due to missing dynamic.hpp header that contained dynamic_io_fnobj. Adding the header back in to write.hpp headers of io extensions fixed the problem.
References
#653 (comment).
Tasklist

Add test case(s) N/A (run build and tests locally, all passed)

[ ] Ensure all CI builds pass
[x] Review and approve

thanks for the fix on my PR!
I'll join the club of surprised people that the bug was not caught in my own test run :-)


k8s: Consider session affinity parameters when comparing Services

Previously, if the sessionAffinity or sessionAffinityTimeoutSec of a Service changed, cilium would ignore the change. This meant that even though cilium correctly handles sessionAffinity, changing the sessionAffinity of a service without any other changes did not cause cilium to change its handling.
Add sessionAffinity and sessionAffinityTimeoutSec handling to the comparator for services, so that cilium will notice affinity changes.
Fixes: #12489
Fix handling of changes to session affinity configuration for Kubernetes services.

test-net-next

retest-net-next

retest-4.19

retest-4.9

retest-runtime

retest-gke


Why 8 character limit on back button titles?

I noticed in the code that even if a back title could fit based on the calculated dimensions, you still default to the truncated title if the back title length > 8 characters long.  This seems strange, because the width calculations should be sufficient to determine whether to use the back button button title or truncated back button title.
I’m especially concerned with usage on Tablets, where you could fit a large amount of text in the back button title and still fit comfortably.  I’d be fine making a PR that just bypasses this I character limit on tablets only, but why have the limit at all if you are doing width-based calculations?

It's an arbitrary limit that works well in many situations, we haven't had a chance to revisit yet. Width calculations are asynchronous whereas we know text length immediately

Ok, sorry for not being more specific, the bug is that on Tablets, where there is plenty of space, I expect it to usually not truncate the back button text, whereas right now it almost always truncates my back button text.

right, it's useful still in a new issue to provide an example and compare it to what you would expect from the built-in equivalent on ios and android

Is this still relevant? I couldn't find any code which checks if the back button label is more than 8 characters long.
I'm closing it for now.


Why is https://github.com/aspnet/AspNetWebStack private?

The old CodePlex repository for the 5.x branch of ASP.NET MVC hasn't been touched in nearly two years. Granted in that time likely most resources have been focused on ASP.NET Core which is here on GitHub.
Many other CodePlex projects have already moved to GitHub (EF6, Katana, etc.). And there are clues that the repository exists that it is being worked on. There are even published nightly builds.
But it remains unclear why the repository is still private. In the spirit open source development, shouldn't the repository be public, and work done in the open?
While Microsoft's priorities are clearly on ASP.NET Core and related projects, there are probably many customers that have heterogeneous applications (mix of older ASP.NET technology such as WebForms and services, in additional to newer MVC) that will be maintained for sometime and cannot simply be "upgraded" to ASP.NET Core. I, for one, would love to contribute fixes, enhancements, and new features to the 5.x ASP.NET MVC branch (for example; better async support).

The repository now appears to be public.

Ah, yes, sorry, I meant to post an update here! It is indeed public!


Add Development Guide.

Fixes #20
a more readable version of the guide is  here.
A few more things included in this pr are:

Added pre-commit
Also changed the version for black from 21.12b0 to 22.3.0 as the previous version had some errors. StackOverflow discussion abt this issue

cc; @veds12

Thanks @abhi-glitchhg.
Have left some comments

One of the really good CONTRIBUTING.md I have come across is that of PyTorch Ignite. Do have a look at it here if you want to.
A few sections that I feel would be really useful for folks new to the "GitHub/OpenSource Workflow" -- Quickstart guide for first-time contributors, Formatting code, Sending PRs (Not an exhaustive list).
It certainly would not be an exact copy for jeta, but most of the parts can be useful.

@abhi-glitchhg  any updates on this? I can take over this if it's not possible for you to complete it right now 😄

@abhi-glitchhg any updates on this? I can take over this if it's not possible for you to complete it right now smile

Extremely sorry for the delay. Will send pr by EOD.


Automating DbVisualizer.app installation

Thank you, but we can’t accept this. Your postflight block calls a GUI, and we avoid that.
app is also being used wrong, as it’s meant to link an app bundle that comes with the download package (which doesn’t happen, in this case).
zap and uninstall are welcome, though, but are you sure uninstall needs :signal and couldn’t achieve the result with quit?
If you make the changes and squash your commits, we can merge this in.

GUI appearing looks like an installer bug - I am using install4j unattended mode (-q), which is supposed to suppress GUI. It properly does so in the previous DbVisualizer version (9.1.11), but does not in the current version (9.2). I'll try to ask around on the DbVisualizer forums.
I tried to find a way to perform the installation directly to the Homebrew Cask Applications directory, but didn't find a method for that in the documentation. So I went with installing to the ${staged_path} and using app to symlink to the proper appdir. There's also an option of not specifying target installation directory and going with the one chosen by the installer, which some casks do, but using app seemed a rather harmless way to achieve proper rather directory. Can you recommend a better way, or do you see some harmful consequences of such approach that I don't?
uninstall :quit didn't close the application for me - no idea why, but sending TERM signal worked.
To be honest, main purpose of the PR was to automate the installation itself - there's not much use of a Cask that still requires a manual install. If you prefer to merge uninstall / zap without waiting for a reply from the guys behind DbVisualizer about a way to fully suppress GUI - let me know, I'll update this PR and create another one for the automated installation later if necessary.

I'll try to ask around on the DbVisualizer forums.

Thank you for the initiative.

there's not much use of a Cask that still requires a manual install.

You don’t have to go to the website and get it, which is one of the most boring steps.

If you prefer to merge uninstall / zap without waiting for a reply from the guys behind DbVisualizer about a way to fully suppress GUI - let me know, I'll update this PR and create another one for the automated installation later if necessary.

That sounds good. They may need to fix something internally that could be holding up the PR a while for nothing. With your suggestion we can already merge what can be done and take care of the rest later.
Your approach is good, and although we don’t usually do things like that, I don’t necessarily see it as an issue, if it works. When the time comes (i.e. when the issue of it calling a GUI is resolved and you make the new submission) we can discuss it more in depth and bring more maintainers into the discussion.
uninstall should also be improved to remove whatever else the installer dumps on the system. There are scripts and documentation geared for that, if you feel like taking a stab at it.

I've updated the PR to only contain uninstall and zap parts. It is still a single commit.

uninstall should also be improved to remove whatever else the installer dumps on the system.

The only other thing is DbVisualizer.app itself, but if the installation is not automated there's no way to determine which folder user selected while manually running the installer - ~/Applications, /Applications, or something else entirely. We can come back to this in the automated installation PR; if it would be done with app the removal of symlink in the Applications directory is done automatically.

The only other thing is DbVisualizer.app itself

So the only thing the installer does is move the app bundle somewhere? It doesn’t installing anything more?

but if the installation is not automated there's no way to determine which folder user selected while manually running the installer

You are correct. Working on it.

So the only thing the installer does is move the app bundle somewhere? It doesn’t installing anything more?

As far as I can see - yes, there are no other files or directories being created. Thanks for merging!


happy cat path is wrong

There is a small error in the example scripts when trying to display images. The images are referred to without a path, and the result is that the script will crash when trying to display the referenced image.
For example,
IOError: [Errno 2] No such file or directory: 'happycat_oled_32.ppm'
To fix this, I simply edited the buttons.py script at line 154 with an absolute path to the image file.
It was 👍
catImage = Image.open('happycat_oled_64.ppm').convert('1')
Changed to:
catImage = Image.open('/home/pi/Adafruit_Python_SSD1306/examples/happycat_oled_64.ppm').convert('1')
now, it works fine.

it depends on the directory you're running from - you should have it in the same directory you're running the script!


Added documentation for notFoundImage option

Documentation for 404 image pull request as per this:
https://github.com/tomitrescak/meteor-tomi-upload-server/pull/3

Thanks!


Use txid_limit only in get_oldest_tx()

(not tested)

works! thanks @mattmarcello !

hm, I don't understand this...

The txid_limit variable is used in several functions including get_utxos() and get_oldest_tx(). There is only get_oldest_tx() for which we are obliged to leave the txid_limit equal to 100 so as not to break the consensus. For the other functions, which are used to compose transactions, we do not need to keep this parameter which prevents, for example, composing a transaction with an address that has more than 100 transactions.


Value is truncated when using rawColumns

Summary of problem or feature request
First, many thanks for your awesome packadge !
The returned value (my table's id) is truncated when/without using rawColumns (see the sippets).
Maybe I use a wrong syntax ?
Code snippet of problem
$uais = Test::select([
                        'numero_uai',
                        'patronyme_uai',
                        ])->where('numero_uai','=','0330060L');

/*
returned value
dd($uais->get());
...
#original: array:2 [▼
        "numero_uai" => "0330060L"
        "patronyme_uai" => "FLORA TRISTAN"
...
*/
        return Datatables::of($uais)
            //->editColumn('numero_uai', 'partial.datatables_editcolumn_uai')
            ->rawColumns(['numero_uai'])
            ->make(true);

The Datatables command returns :
{"draw":0,"recordsTotal":1,"recordsFiltered":1,"data":[{"numero_uai":"330060","patronyme_uai":"FLORA TRISTAN"}],"queries":[{"query":"select count(*) as aggregate from (select '1' as `row_count` from `uais` where `numero_uai` = ?) count_row_table","bindings":["0330060L"],"time":26.02},{"query":"select `numero_uai`, `patronyme_uai` from `uais` where `numero_uai` = ?","bindings":["0330060L"],"time":0.52}],"input":[]}

As you can see, numero_uai value is now "330060" instead of '0330060L'.
It's the same thing if I comment the rawColumns ligne.
The schema and the Model are standard. The numero_id column is my table's primary key.
Schema::create('uais', function(Blueprint $table)
        {
            $table->string('numero_uai',8)->unique()->primary();
            ...
            $table->timestamps();
        });

<?php
namespace App;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

class Test extends Model
 {
 	protected $table = 'uais';

 	protected $primaryKey = 'numero_uai';

 	protected $fillable = [
		'numero_uai',
         ...];

	public 		$timestamps = true;
 }

System details

Operating System Linux homestead 4.4.0-51-generic #72-Ubuntu SMP Thu Nov 24 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
PHP Version 7.1.0
Laravel Version "5.4.*"
Laravel-Datatables Version "^7.2",

Thanks in advance

I don't see how this is happening, all that rawColumns does is preventing it from going through escapeRow($row)

This may not be a rawColumns issue, run it without it and confirm whether it gives you the same thing or not.

try replacing ::of() with ::eloquent() and see if that changes anything.

I think the problem here is in your model. Laravel automatically cast primary key to int which explains the output. Try setting your model to $incrementing = false;.

, I just add this in my model
public $incrementing = false;

My app is an upgrade from Laravel 5.1.11. I ignored this new feature.
Thanks a lot !


Fix relative links in markdown parser

The incredible bmatts strikes again!
/cc @bmathews @coopy

🚢 !!


Bot Framework Channel Emulator crashing on launch

I'm getting this error when I start the Bot Framework Channel Emulator (v <IP_ADDRESS>). It crashes immediately before I can do anything on the UI. I'm suspecting there to be some invalid form data that's causing the crash.
Is there a way to reset the form data for the app?
Below is the error message I get when I try to debug it.
An unhandled exception of type 'System.UriFormatException` occured in mscorlib.dll

Additional information: Invalid URI: The URI is empty.

You can use the same solution as https://github.com/Microsoft/BotBuilder/issues/758:
erase %temp%emul

@willportnoy Thanks! It worked.

I just stumbled upon the same thing. Why is this issue closed? It's obviously a bug.

We've been closing some of the issues that have not had recent activity.  I agree, it's definitely a bug.
In this case,

There is a workaround above for invalid data saved to the configuration file.
Also, I believe I had fixed this bug and prevented the emulator from crashing when there's invalid data in the url field.


Hyundai USA Sensor Unavailable State While Updating

Hello,
I am having an issue with many of the sensors (I think all the binary sensors) are going to the "unavailable" state for a few seconds while the integration is scanning (default 30 minute scan time), as shown in the attached screenshot.

I am not sure why exactly the sensors states are being updated before the scan is completed. As a result it makes it rather difficult to figure out when the states actually changed.

can you dump your Data entity when happens next time?

Is this using the current version? 1.2.1?

Once we have logs we can confirm but I am wondering if this occurs when the token expires.  I think the token on Kia USA is very short lived so I suspect it is logging in each time to grab the values.  I will try replicate by forcing my region to a short token TTL.

I can confirm this is happening hourly on my USA based 2021 Kia Sorento. I am currently running version 1.2.2.

Sorry for the delay.
It looks like the login token is expiring each time it tries to refresh my vehicle, and it must be during that token acquisition period that it is making the states "Unavailable".

2021-12-09 07:00:09 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - Refresh token started 2021-12-09 07:00:04.851854 2021-12-09 07:00:09.210144 True
2021-12-09 07:00:09 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - Refresh token expired
2021-12-09 07:00:09 DEBUG (SyncWorker_6) [custom_components.kia_uvo.HyundaiBlueLinkAPIUSA] kia_uvo - Sign In Response ...

Versions:
Home Assistant = 2021.12.0b4
Kia Uvo / Hyundai Bluelink = v1.2.2

Just for kick could you make your refresh cycle 29 minutes?   I am wondering if that changes the behavior at all.

Just for kick could you make your refresh cycle 29 minutes? I am wondering if that changes the behavior at all.

@cdnninja Unfortunately changing the refresh cycle to 29 minutes didn't seem to make any difference at all. Still have the various sensors going "Unavailable" for a few seconds during refresh. I am even on the latest and greatest version v1.2.3.

so, this is both happening in USA and CA, is that correct?

I'm definitely seeing this behavior with my 2022 Kona Electric in the US.
On Tue, Dec 21, 2021, at 11:18 AM, Fuat Akgün wrote:

so, this is both happening in USA and CA, is that correct?
—
Reply to this email directly, view it on GitHub https://github.com/fuatakgun/kia_uvo/issues/197#issuecomment-998913442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPLLW6HCGF4QIYSSBJ4N5LUSCSFNANCNFSM5JH2W7FA.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

@cdnninja , I have gone through logs below, my findings;

07:00:09 - Refresh token started 07:00:04 - 07:00:09 True - TOKEN NEEDS TO BE REFRESHED - 09 is greater than 04

07:00:10 - Refresh token started 07:30:09 - 07:00:10 False - No need to refresh as 09 is less than 10
The problem is here, token is to be expired just in 30 minutes? it was supposed to be daily, or I am wrong?

In EU, it is set to expire in 23 hours: https://github.com/fuatakgun/kia_uvo/blob/master/custom_components/kia_uvo/KiaUvoApiEU.py#L123

In CA, it is set to expire in 23 hours: https://github.com/fuatakgun/kia_uvo/blob/master/custom_components/kia_uvo/KiaUvoApiCA.py#L95

In US, it is set to expire in 1 hour: https://github.com/fuatakgun/kia_uvo/blob/master/custom_components/kia_uvo/KiaUvoAPIUSA.py#L195

Hyundai USA has a very short token which makes this more apparent.  It occurs with longer tokens as well.

got it, but when sensors become unavailable under these logs? https://github.com/fuatakgun/kia_uvo/issues/197#issuecomment-989815946

You somewhat need to coordinate it with the home assistant GUI.  Using the test API I set the token very short so that I can easily replicate., I can't seem to find the cause though.

hey, I also have in my local instance :) easier to debug now

yes, you are right, it is happening when token is expired and it needs to be refreshed, reading the code to find the culprit

updating config_entry might be causing to reload all entities:
            hass.config_entries.async_update_entry(
                config_entry, data=new_data, options=config_entry.options
            )

https://github.com/fuatakgun/kia_uvo/blob/cff4b711ebf7bcc69b1ac8c22361c69feea926e5/custom_components/kia_uvo/__init__.py#L190

yes, it is clear that reloading or updating the config_entry is causing this. next question, how can we avoid this?

@cdnninja , to help US users, can we extend 30 minutes expiration to 1 day? at least, issue will happen less and will impact less. Of course, we should continue investigation to find out solution.

From my understanding this is the Hyundai Token duration.  It expires that quickly.    I believe we are calculating it from the response right now.

updating config_entry might be causing to reload all entities:
            hass.config_entries.async_update_entry(
                config_entry, data=new_data, options=config_entry.options
            )

https://github.com/fuatakgun/kia_uvo/blob/cff4b711ebf7bcc69b1ac8c22361c69feea926e5/custom_components/kia_uvo/__init__.py#L190

Could we do this on unload instead?

You are right, we can do it while unloading or home assistant shutdown event. Idea behind was to keep latest credentials always up to date, so we don't need to over consume api calls.

This should have been resolved, thanks @cdnninja

This is now merged and released.   Let us know if you think it still occurs.


Fix defaulting of Replicas spec

Currently the default value are ignored because these specs are set to 0 by webhook. Update the type from int32 to *int32 to avoid that behavior and ensure the expected default values are used.

/test heat-operator-build-deploy-kuttl

/test heat-operator-build-deploy-kuttl


Unable to run the project locally

I can access the directory but I can't find the commands. I only get -bash: cargo: command not found. The same with the other editing commands.

The cargo command is a rust command.    You need to install rust with rustup.   If you just want to play around with the program there are release binary available too here.

Thanks for the support!


Localization android

Added localization strings to string files

Thanks for the PR, always good to have new languages!


Azure SqlServer - Invalid parameter 'storageEndpoint'

Getting this error message when creating a new Azure Sql Server:
__ (azure:sql:SqlServer)
error: 1 error occurred:
	* creating urn:pulumi:local::__::azure:sql/sqlServer:SqlServer::__: Error issuing create/update request for SQL Server "__" Blob Auditing Policies(Resource Group "__"): sql.ExtendedServerBlobAuditingPoliciesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="DataSecurityInvalidUserSuppliedParameter" Message="Invalid parameter 'storageEndpoint'. Value should be a blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net)."

After some googling it appears that this is a regression in the Azure Api:
https://github.com/Azure/azure-rest-api-specs/issues/11271
As a workaround I added the following to all SqlServer and Database entries:
        extendedAuditingPolicy: {
            storageEndpoint: storageAccount.primaryBlobEndpoint,
            storageAccountAccessKey: storageAccount.primaryAccessKey,
            retentionInDays: 1
        },

I see that Terraform have a temporary workaround merged already:
https://github.com/terraform-providers/terraform-provider-azurerm/pull/8975

Hi @andlju
Apologies here - this is actually fixed in https://github.com/pulumi/pulumi-azure/pull/744 and will get merged and released before Monday
Paul


Discovery is taking ages  and showing some errors in cloudwatch.

Describe the bug
Discovery is taking ages
Expected behavior
Discovery is taking ages and not showing any data. Errors in cloudwatch dashboards
Screenshots

Browser (please complete the following information):

Name [e.g. chrome]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

This is very likely related to the new Docker Hub rate limiting that causes the Discovery process container build process to fail. There is a full description and workaround here:
https://github.com/awslabs/aws-perspective/issues/98

Closing this as the discussion has moved to #98 .


Training code?

Thank you for an awesome contribution! Do you plan to release the training code?

Thank @dylanrstewart for your interest in this project. We plan to release all the train codes when this paper is accepted.


"Connection timed out" on own IP/Domain

I just looked at the logfile and it's got hundreds of lines, which are simlar to those:
Nov  3 18:05:55 mail postfix/qmgr[1434]: 81571C2D<EMAIL_ADDRESS>size=642, nrcpt=1 (queue active)
Nov  3 18:06:25 mail postfix/smtp[1436]: connect to mail.mydomain.com[123.456.789.123]:25: Connection timed out
Nov  3 18:06:25 mail postfix/smtp[1436]: 81571C2D<EMAIL_ADDRESS>orig_to=<root>, relay=none, delay=50784, delays=50754/0.01/30/0, dsn=4.4.1, status=deferred (connect to mail.mydomain.com[123.456.789.123]:25: Connection timed out)
Nov  3 18:10:55 mail postfix/qmgr[1434]: AA16BBDD: from=<>, size=2532, nrcpt=1 (queue active)
Nov  3 18:11:25 mail postfix/smtp[1449]: connect to mail.mydomain.com[123.456.789.123]:25: Connection timed out
Nov  3 18:11:25 mail postfix/smtp[1449]: AA16BBDD<EMAIL_ADDRESS>relay=none, delay=309063, delays=309033/0.01/30/0, dsn=4.4.1, status=deferred (connect to mail.mydomain.com[123.456.789.123]:25: Connection timed out)

Should this concern me and what did I do wrong leading up to this?

Hi @Brandl, I can't reproduce the problem on my instances.
Could you send and receive mails? Everything is ok regarding firewall/network?

Feel free to reopen if you have more information /logs to provide.


Add concatenate support for Ancilary Variables and Cell Measures

Addresses the concatenate half of #3552.

Since this involves changing the _as_defn() method for cell measures and ancillary variables, this probably depends on the work done in #3378.

bypass cml checking

That is neat !!

Thanks for patience @stephenworsley  !


Priya working version - Added ICD and CPT mappings for DILI

@karafecho @xu-hao I have added the ICD and CPT for all DILI variables.
@xu-hao I ran the yamllint - the only issue is the white space

changed have been manually merged into icees-api-repo


Fix multiplayer health flashing

Since the preUpdateActor hook only triggers on the originating client, we need to use a custom socket for the module and broadcast our flashing instructions to other clients.
This should close #34.

closes #34


Datepicker validation not reactive

Reproduction
https://formkit.link/c3a84494da93cebca11ce26e8a3930fa
Describe the bug
In this example, when selecting for both inputs the same day (e.g. 18th of October). The following action is to change the day of the end date to the 17th by using the keyboard. The validation error message for the end date is shown, but not for the start date. When changing the date of the start date to the 18th, then the validation error message is shown for the start date. And finally when changing the end date to the 20th, the validation error message of the start date remains, although it is valid.
Environment
• OS: macOS 14.0
• Browser Brave
• Version 1.59.117

Closing in favor of #1055


When the vehicle antenna was put into the warehouse, the terminal could not find the vehicle antenna in the warehouse and it disappeared forever!

I accidentally stored the car antenna into the terminal's storage, and then found that the car antenna was not in the storage list, and I couldn't get it out!

I've been able to store and retrieve the antenna on my test profile consistently during my other testing, so I think this is probably a conflict. Could you provide a profile code and steps to reproduce the issue from a new save?


Improve HelmRelease dependency tracking for diffs

Improve HelmRelease dependency tracking for diffs by tracking changes in dependencies like ConfigMaps and HelmReleases.
Fixes #817

Codecov Report
Attention: Patch coverage is 97.01493% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.77%. Comparing base (83ae11e) to head (bb38b63).

Files with missing lines
Patch %
Lines

flux_local/kustomize.py
50.00%
1 Missing :warning:

flux_local/manifest.py
96.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #821      +/-   ##
==========================================
+ Coverage   93.57%   93.77%   +0.20%
==========================================
  Files          21       21
  Lines        2257     2314      +57
==========================================
+ Hits         2112     2170      +58
+ Misses        145      144       -1

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


About time-steps

Hi, don't know if you are still there~ May I ask the applied time-steps of trained SNN, according to the code and paper, I found it to be one defaultly. Have you tried to add up the time-steps? Thanks!

No, we haven't tried, doing multiple timesteps with the same input makes sense for static tasks (e.g. classification without a temporal dimension, such as MNIST), but less so for streaming tasks, especially when the sensor has such a high temporal resolution


Fix stuff related to page_params.people_list

This is mostly code cleanup, with a few minor bug fixes thrown in.

Automated message from Dropbox CLA bot
@showell, it looks like you've already signed the Dropbox CLA. Thanks!

Awesome, this looks great, merged!


Upgrade git-commit-id-maven-plugin 6.0.0 -> 7.0.0

This PR contains the following updates:

Package
Type
Update
Change

git-commit-id-maven-plugin
build
major
6.0.0 -> 7.0.0

Release Notes

git-commit-id/git-commit-id-maven-plugin (git-commit-id-maven-plugin)
v7.0.0: Version 7.0.0
Compare Source
Version 7.0.0 is finally there and includes various bug-fixes and improvements :-)
⚠ This is a potentially breaking release. Read the release-notes carefully ⚠
Potential Breaking changes:
The main key-aspects that might cause a breakage when migrating to the new version:

Drop support for Maven 3.1.0-alpha-1 ⚠

minimal required maven version is now Maven 3.2.5 (to support Maven 4.0.0)

New Features / Bug-Fixes:
The main key-aspects that have been improved or being worked on are the following:

https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/639 / https://github.com/git-commit-id/git-commit-id-maven-plugin/pull/642: Resolve worktree .git files to repository .git directory
Update several plugins

updated git-commit-id-plugin-core from 6.0.0-rc.5 to 6.0.0-rc.6, that update brings

https://github.com/git-commit-id/git-commit-id-plugin-core/issues/57: Stop relying on javax.json 1.1.4

the dependency for javax.json:javax.json-api:1.1.4 was replaced with jakarta.json:jakarta.json-api:2.1.2
the dependency for org.glassfish:javax.json:1.1.4 was replaced with org.eclipse.parsson:parsson:1.1.4

bump jgit from <IP_ADDRESS>303070854-r to <IP_ADDRESS>309050840-r
bump commons-io:commons-io from 2.11.0 to 2.14.0
bump org.slf4j:slf4j-simple from 2.0.7 to 2.0.9

bump several maven plugins

bump maven-plugin-api from 3.1.0-alpha-1 to 3.9.2
bump maven-plugin-plugin from 3.6.0 to 3.9.0
bump maven-assembly-plugin from 3.4.2 to 3.6.0
bump maven-dependency-plugin from 3.5.0 to 3.6.0
bump maven-release-plugin from 3.0.0-M7 to 3.0.1
bump maven-enforcer-plugin from 3.2.1 to 3.4.1
bump maven-compiler-plugin from 3.8.1 to 3.11.0
bump maven-gpg-plugin from 3.1.0
bump maven-clean-plugin from 3.1.0 to 3.3.1
bump maven-resources-plugin from 3.1.0 to 3.3.1
bump maven-jar-plugin from 3.2.0 to 3.3.0
bump maven-surefire-plugin from 2.22.2 to 3.1.2
bump maven-install-plugin from 2.5.2 to 3.1.1
bump maven-javadoc-plugin from 3.2.0 to 3.6.0
bump maven-source-plugin from 3.2.1 to 3.3.0

Bump or replace various plugins for testing

bump commons-io:commons-io from 2.11.0 to 2.14.0 (test dependency)
bump org.slf4j:slf4j-simple from 2.0.7 to 2.0.9 (test dependency)
replace org.eluder.coveralls:coveralls-maven-plugin:4.3.0 with io.jsonwebtoken.coveralls:coveralls-maven-plugin:4.4.1 (test dependency)

Getting the latest release
The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:
<dependency>
    <groupId>io.github.git-commit-id</groupId>
    <artifactId>git-commit-id-maven-plugin</artifactId>
    <version>7.0.0</version>
</dependency>

Getting the latest snapshot (build automatically)
If you can't wait for the next release, you can also get the latest snapshot version from sonatype, that is being deployed automatically by github actions:
<pluginRepositories>
    <pluginRepository>
        <id>sonatype-snapshots</id>
        <name>Sonatype Snapshots</name>
         <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
    </pluginRepository>
</pluginRepositories>

Even though the github actions will only deploy a new snapshot once all tests have finished, it is recommended to rely on the released and more stable version.
Known Issues / Limitations:

This plugin is unfortunately not working with Heroku which is due to the fact how Heroku works. In summary Heroku does not copy over the .git-repository but in order to determine the git properties this plugin relies on the fact that it has access to the git-repository. A somewhat workaround to get some information is outlined in https://github.com/ktoso/maven-git-commit-id-plugin/issues/279#issuecomment-301284022
Using maven's plugin prefix resolution (e.g. mvn com.test.plugins:myPlugin:myMojo) might result in unresolved properties even with <injectAllReactorProjects>true</injectAllReactorProjects>. Please refer to https://github.com/git-commit-id/maven-git-commit-id-plugin/issues/287 or https://github.com/git-commit-id/maven-git-commit-id-plugin/issues/413#issuecomment-487952607 for details and potential workarounds

Reporting Problems
If you find any problem with this plugin, feel free to report it here

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

Suggested commit message:
Upgrade git-commit-id-maven-plugin 6.0.0 -> 7.0.0

See:
- https://github.com/git-commit-id/git-commit-id-maven-plugin/releases/tag/v7.0.0
- https://github.com/git-commit-id/git-commit-id-maven-plugin/compare/v6.0.0...v7.0.0


vagrant box for further testing

need a version of the packerfile to export to a vagrant box, to start writing playbooks for snapshot management, automated backups, etc

the current ubuntu-zfs.json would be rather large, with 4 disks, but some machines we'll be deploying will only have one disk. just need to test being able to centrally back up stuff from other systems (which won't require having a multi-disk setup for testing)

ubuntu-zfs-efi-single.json is a smaller image, that I planned to use for local testing...but so far I've found these problems:

vagrant user doesn't exist
vagrant insecure key not installed
openssh not installed
guest additions not setup properly (makes sense, because my goal target was a physical server)

will need to address these in order to make a vagrant box work properly

now have a semi-working example, but have to manually enter the LUKS passphrase on boot - related to #32 we should make a multi-stage build that implements the insecure method of autounlock for the vagrant image

vagrant box successfully created in a4d08bfe49d2e27d2b8b7381d6b4a54960747e03


Scripts 2.1 (ESM Modules)

Improves ScriptType to be extendible by class, while preserving current scripting features (attributes, events, components).
This allows you to write scripts as module javascript files.
Scripts-related data in the hierarchy and templates will work as before, even if the old script is replaced with a module script.
Fixes #5906
Example:
class Rotator extends pc.ScriptType { // should extend ScriptType
    static name = 'rotator'; // if defined, then this name will be used instead of class name

    speed = 42;

    update(dt) {
        this.entity.rotate(dt * this.speed, 0, 0);
    }
}

// add script to the script registry
app.scripts.add(Rotator);

// attach a script to an entity
entity.script.create(Rotator);

// can be attached by a script name too (allows lazy-loading for scripts)
entity.script.create('rotator');

Attributes work as before:
class Rotator extends pc.ScriptType {
    static name = 'rotator';

    update(dt) {
        this.entity.rotate(dt * this.speed, 0, 0);
    }
}

// attributes can be defined as before
Rotator.attributes.add('speed', { type: 'number', default: 42 });

You can define multiple scripts per file and import them as needed:
export class Rotator extends pc.ScriptType {
    // ...
}
export class Translator extends pc.ScriptType {
    // ...
}

Currently pc.createScript automatically adds it to the script registry.
So module scripts when loaded, should be added to the script registry:
import { Rotator } from './scripts/rotator.mjs';

// ...
app.scripts.add(Rotator);

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

Improves ScriptType to be extendible by class, while preserving current scripting features (attributes, events, components).
This allows you to write scripts as module javascript files.

Maybe I understand wrong, what is new about that? @aidinabedi implemented that and showcased it as example in his 2020 PR: https://github.com/playcanvas/engine/pull/1908
I also use bundler-free ESM in combination with pc.ScriptType without any problems: https://github.com/kungfooman/playcanvas-test-es/blob/master/es6/rotate.js
Anyway, what I like is established and introducing the static name for registering script's - allowing bundlers/minifiers to change all class names, but sticking to this custom name :+1:

Maybe I understand wrong, what is new about that? @aidinabedi implemented that and showcased it as example in his 2020 PR: #1908

Unfortunately that PR has not been merged.
This PR will implement mjs workflow, which is not part of other PR. Classes actually are not strictly necessary for mjs, but it is most non-modern part that also have some specifics in the way it should work with mjs. Especially for Editor. Its more complex than it looks.

Updated slightly description.
I've done more testing, and it is usable in Editor already:
class Rotator extends pc.ScriptType {
    static name = 'rotator';

    update(dt) {
        this.entity.rotate(dt * this.speed, 0, 0);
    }
}

pc.registerScript(Rotator);

Rotator.attributes.add('speed', { type: 'number', default: 42 });

Attributes are parsing as expected as well.

This looks nice, and seems like a worthwhile improvement to the existing script system. Any thoughts @willeastcott @slimbuck @marklundin
It does not go as far as https://github.com/playcanvas/engine/pull/5764 is going with the new scripting system, but it's a nice improvement for existing system, and I think both should be considered for the inclusion in the engine.
The ESM Script PR is aiming at engine being fully imported by the module scripts (for example like https://github.com/playcanvas/model-viewer), allowing unused parts of the engine to be three-shaken out during a bundling step (follow up PRs)

@Maksims Presumably you didn't mean to include the update to package-lock.json. Can you back that out, please?

This may be related to the above, but I tried a swap in the current build, and it throws Uncaught SyntaxError: Identifier 'Test' has already been declared, I assume because the class has already been declared and behaves like a const. I could make it work using a let, but syntactically it's a bit strange
let Test = class extends pc.ScriptType {}

Is there maybe a better way of doing this?

This may be related to the above, but I tried a swap in the current build, and it throws Uncaught SyntaxError: Identifier 'Test' has already been declared, I assume because the class has already been declared and behaves like a const or let. I could make it work using a var, but syntactically it's a bit strange
var Test = class extends pc.ScriptType {
    initialize(){}
    update(){}
}

Is there maybe a better way of doing this?

Yes, they are related. Unfortunately as scripts are executed on load in global context, const collisions (class collisions are same) are happening. var Test = class extends pc.ScriptType { - does works around it, but you are right, it does not look slick.
With ESM modules, this won't be a problem, as when you import script it wont collide.
As swap is a power-user feature, it can be well documented on how to write scripts for hot-swapping. I'm afraid there might be no pretty easy workaround here.

I'd vote for the attribute (which is processed later) to override the variable value on the class.

It would be good if default was optional

I've looked into issue of conflicting attributes with class properties. Because attributes are declared as a prototype accessors after class definition, but properties are not defined as accessors (get/set), there is no way in javascript to detect if a property exists on a class definition.
The only thing we can detect is the accessors (get/set methods) from a class definition:
class Test {
    foo = 42;

    set bar(value) {
        this.foo = value;
    }
    get buz() {
        return this.foo;
    }
}

Test.prototype.hasOwnProperty('foo') === false;
Test.prototype.hasOwnProperty('bar') === true;
Test.prototype.hasOwnProperty('buz') === true;

So there are a few things we can do:

Introduce new property for the attributes, like "predefined: true", so it will not override the accessor, and use its value as a default one.
In Editor, during parsing, we can instantiate a class instance, and check its properties, so we can mark attributes as "predefined" automatically.
Predefined attributes - means users won't have events when attribute is set and can handle their values set/get and copying if needed.

I'm afraid there is no easy solution to this here.

Hey @Maksims, sorry for taking so long on this. Just reviewing now, is this PR still required? it seems like the name property already works if it's explicitly defined or inferred via the constructor/function name. I may be missing something though.

Hey @Maksims, sorry for taking so long on this. Just reviewing now, is this PR still required? it seems like the name property already works if it's explicitly defined or inferred via the constructor/function name. I may be missing something though.

If current implementation already works well with the name, and even if name is not provided (defaults to name of a class), then yep, its fine to close it.


New contributor onboarding: Refine pre-flight onboarding meeting agenda

Pre-flight onboarding doc: https://docs.google.com/document/d/1MXLw6ReirpFRAWfhYPwaypWFRYmuP3gHpRKeJam-JaA/edit

Updated the talking points/agenda for pre-flight onboarding discussion, as part of meeting with the Chinese Historical Society of Southern California.


merkle intermediate layers

This change is

#531
#530
#529
#528
#527
#526
#548  👈
dev

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @spapinistarkware and the rest of your teammates on  Graphite

Codecov Report
Attention: Patch coverage is 96.47059% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 95.35%. Comparing base (df3b5d1) to head (f49ba4a).

Files
Patch %
Lines

src/commitment_scheme/blake2_merkle.rs
82.75%
4 Missing and 1 partial :warning:

src/commitment_scheme/verifier.rs
97.05%
2 Missing and 1 partial :warning:

src/commitment_scheme/prover.rs
99.10%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #548      +/-   ##
==========================================
- Coverage   95.36%   95.35%   -0.01%
==========================================
  Files          66       66
  Lines        9984    10103     +119
  Branches     9984    10103     +119
==========================================
+ Hits         9521     9634     +113
- Misses        395      402       +7
+ Partials       68       67       -1

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

Merge activity

Apr 2, 7:18 AM EDT: @spapinistarkware merged this pull request with Graphite.


sync stop illegal character code

What happened:
I use juicefs sync OSS to COS，some Bucket had complete,but one bucket fault.
This is error report:
2023/02/06 17:27:14.562011 juicefs[58073] : Syncing from oss://storage-private/ to cos://storage-private-12345/ [sync.go:619]
2023/02/06 17:27:40.774668 juicefs[58073] : Fail to list: XML syntax error on line 3574: illegal character code U+001F, retry again [sync.go:156]
2023/02/06 17:27:41.090834 juicefs[58073] : Fail to list: XML syntax error on line 3574: illegal character code U+001F, retry again [sync.go:156]
2023/02/06 17:27:41.419623 juicefs[58073] : Fail to list: XML syntax error on line 3574: illegal character code U+001F, retry again [sync.go:156]
2023/02/06 17:27:41.785279 juicefs[58073] : Fail to list after c/attachment/temp/1650560322584433827/word.docx: XML syntax error on line 3574: illegal character code U+001F [sync.go:166]
2023/02/06 17:27:41.785303 juicefs[58073] : Listing failed, stop syncing, waiting for pending ones [sync.go:682]
2023/02/06 17:27:41.785966 juicefs[58073] : Found: 102985, copied: 0 (0 B), checked: 0 B, deleted: 0, skipped: 102985, failed: 0 [sync.go:892]
How to reproduce it (as minimally and precisely as possible):
/opt/juicefs-1.0.3 sync --bwlimit 6048 --threads 30<EMAIL_ADDRESS><EMAIL_ADDRESS>Anything else we need to know?
Environment:
./juicefs-1.0.3 -V
juicefs version 1.0.3+2022-12-27.e4bf15a
[root@120-28 opt]#  uname -a
Linux 120-28 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@120-28 opt]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

We will add the encodeing-type parameter to each listobject request of the object store if it supports.


Include commit SHA in openbazaard version

Expected to see the SHA from which this build was produced in the version:
$ ./openbazaar-go-darwin-10.6-amd64 -v
0.12.1 (e4f4bee1b02398573987456d85aa5d3ce8f6e19de)

In the case where the SHA is not available (for whatever reason) it should read (!unknown) with the leading bang a character impossible to appear in a SHA.

I don't know of any common formats for this.

How could this work if. If you compile it with the hash it will change the hash of that commit.

We're not committing the builds themselves. Just ensure the build process of the server INCLUDES the hash that it came from. (When we do a release, it's build FROM a SHA but not included in the SHA.)


Option to use the same media (screenshots, logos, tiles) for multiple/all locales?

It would be nice if I did not have to manually upload the same images for every single locale.

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

ID: 303075ec-ed9b-7ba4-15c5-242f93d53eb2
Version Independent ID: 15d3653d-af25-8ee7-2e94-01057a734de4
Content: Publish An Extension - Microsoft Edge Development
Content Source: microsoft-edge/extensions-chromium/publish/publish-extension.md
Product: microsoft-edge-chromium
GitHub Login: @MSEdgeTeam
Microsoft Alias: msedgedevrel

I have 30 locales and submitting a logo, tiles and screenshots for each is ridiculous.

@alexanderby yes it absolutely is, I guess at least I don't feel dumb now for not seeing any option to work around that.

Yes, this shock me I found out I have to upload images and fill the forms for each locales.
So, we can sure Edge Store developers didn't try their own dog food.

We understand your concern. The work being done for this is in progress and should be rolled out soon. I am hoping the new design should address all these concerns and more.

The feature is now live.

You can choose to duplicate or copy your assets across all languages without having to manually upload for all languages.
You can choose to remove languages from store details page if you do not have the details localized for a language.

Write to us at<EMAIL_ADDRESS>if you have any more feedback, we would love to put it in our backlog and work on it.


Add URL to slack message

Before:

After:

Url should only be sent for monitor types applicable. (See #2727)

Could you add
Resolves https://github.com/louislam/uptime-kuma/issues/3351
To the description to close this issue if/once this issue is merged.


Create repository tags for 0.6.1 and 0.6.2

Quite handy to have :)

For posterity.

https://github.com/racker/rackspace-monitoring/releases/tag/v0.6.1
https://github.com/racker/rackspace-monitoring/releases/tag/v0.6.2


Decommissioning demo deployments

In order to decommission the demo, we need to complete the following steps:

[x] remove references from public-facing the BC Digital Trust website (@alexgmetcalf )
[x] save a back-up of the agent wallets (@WadeBarnes / @esune)
[ ] spin down the deployments (@WadeBarnes / @esune )
[ ] archive this repository (@WadeBarnes / @esune )
[ ] close this issue (@WadeBarnes / @esune )

@WadeBarnes @rajpalc7 wallets have been backed-up and deployments spun down in all environments. Everything is ready for resources to be freed.


Refresh index fixes

Description
Fixes some issues with insertions in refreshIndex.

Separates out Compute and UpdateLastUpdated operations into their own separate AddRemoveResultType and IndexResultType.
We now update the last updated at field even if the item hasn't changed.
We now only insert items into UpdateNewVersion if the cacheKey has changed.
Delete duplicate rows in the tag_catalog and global_cache if they exist.
Adds unique constraints on tag_catalog and global_cache to prevent application errors in the future and restrict duplicate insertions.
CodebaseIndexer now marks all UpdateLastUpdated operations as completed when they are returned by the indexers.
The results.addTag loop in CodebaseIndexer always inserts.

Checklist

[x] The base branch of this PR is dev, rather than main
[x] The relevant docs, if any, have been updated or created

Testing

Hitting the reindex button multiple times should be a noop.

Great improvements here! 👍


[Chore|sde]  updated env-config.js removed unwanted configs

Description

updated env-config.js removed unwanted configs .
trivy scan workflow update and docker image changed for scanning.

Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review:

[x] DEPENDENCIES are up-to-date. Dash license tool. Committers can open IP issues for restricted libs.
[x] Copyright and license header are present on all affected files

@almadigabor Please review the request.


How to add Linear Gradient text?

As of the current version, this feature is not available. Will work on it and make it available in the next release @mehtanidhi28


Change Feature.removeFeature callback to remove featureIds parameter and replace it with features

For consistency with the rest of the API we don't send back feature ids anymore.  We will replace it with features[] which will send back an array of the Features that were removed.

To test fix:

Create overlay
Create features f1, f2, f3, f4
Remove features by selecting f1 and f2 and "Delete selected features"
In top right corner of window hover over toaster popup. Identify f1_#######, f2_####### listed as successfully removed

To test test case:
1)Load test script
2) search for "handleUnplotFeatureTransactionComplete"
3) Verify two channels found and onSuccess was called


intCast to index in bindValue

Adding @intCast to index in bindValue in conn.zig. Compiler indicates conflict between usize and c_int.
Surprisingly, it does not complain about the same error in line #139. Maybe it will in the future. At your discretion, change here too.

thanks


Socket events fix.

Correct me if I'm wrong, but if there's an error when you execute end() on the socket, it will crash the server cause there's no more events that will catch the error.
I'm not sure if that's the case, but there were some weird errors that crashed the server that were connected to the rtmp socket. That crash appeared right after someone disconnected. And since this is the only place that I could find that could cause errors to bubble up with the socket I think it's pretty safe to assume that that's the problematic place.

Yes, in a development branch, I also put this in front to fix the error of the socket exception that did not listen to 'error'.


Request: Add .Jar Emulator such as J2ME

I think ArkOS would be a great platform to play old mobile games on. Thanks for all you do.

Perhaps you can try this through the psp emulator and report your findings.
https://wololo.net/2016/12/15/trip-homebrew-lane-pspkvm/

Any update on this?

Were you able to run Gangstar on the emulator?

I have tried some java games over the pspkvm  and most of them don't work.
Would it be possible to add j2me emulator like AmberElec has it?

Last time I tried it, it wasn’t very good.  I’ll review again.

I've decided this is not something I will pursue as I have no desire for j2me at this time.  I may change my mind in the future and if I do, I will include one in a future update.

Some colleagues will be able to run Java on the Arkos, more specifically on the R36s, so I have no audio, but they are already seeing if this can be fixed.

Any luck? @C4RLO5-13


Prism vs Highlight.js: Why choose one over the other?

Related: #3619 #3621 #3623
In trying to figure out the direction of the project moving forward, where we go, how we should or shouldn't integrate with other parsers (at the 1st party level), it'd be helpful to know WHY people prefer Highlight.js to Prism - or how they think about the differences.  No detail is too large or too small.  Or if you evaluated other highlighting solutions (than just these two), those thoughts would be welcome here also - provided you have a few points of comparison.
The parsing engines are of course very different.  But I've never really thought about which is "better" in an absolute sense... I've just always assumed that a mono-culture is bad - and that it's good we have two great choices for highlighting on the client-side - and that people obviously have reasons for preferring one over the other.
Suddenly I'm much more curious about the WHY, and what those reasons are.  Anyone care to share?
Lets keep this civil and respectful... it's ok to share perceived negatives, buts lets about things like "Highlight.js sucks because" or vise versa, etc...

I'll start:

Highlight.js often has more readable grammar definitions (for non regex wizards) - this is one of the reasons that drew me to it.
Prism seems to have more community interest/contributors.
Highlight.js is currently largely closed to 1st party grammars (too few maintainers).
Prism seems more open, though I'm not sure how often new grammars are added.

@RunDevelopment How would you feel about some sort of cross-posting of this?

Prism seems to have more community interest/contributors.

This is pure speculation, but I have the feeling that Prism's popularity is tied closely to that of its author.

Highlight.js often has more readable grammar definitions (for non regex wizards)

As a contributor to both projects, I wanted to share my opinion on this. For obvious reasons, I prefer reading (and writing!) grammar definitions as used by Highlight.js. I would love to see some numbers, on how much optimized RegEx patterns contribute to the performance of Prism. If there's a significant gain, it makes sense, but developer experience is an important factor as well. Personally, I've been using retrie to optimize my contributions to Prism. In my opinion, that's a clear task for a computer and it kind of surprises me that contributions are higher Prism. I've noticed for myself, that I'm slower at updating my Prism grammar rules because of this extra step.

How would you feel about some sort of cross-posting of this?

I just did :)
It might be good to more clearly signpost this as a survey where we are collection feedback from the community.

because optimized Regex patterns are requested by the maintainers and not part of an automatic process

Sorry, that's my fault.
 They were not only hard to read, write, and maintain, they were also slower than many "unoptimized" regexes. Turns out, browsers optimize character runs, so breaking up words too much can make regexes slower. Optimizing regexes based on tries sounds good in theory, but unfortunately rarely helps in practice. The old saying "premature optimization is the root of all evil" rang true once again. So I've changed course for a few years now and focus on readable regexes instead. Most of my usual nits and critiques when reviewing regexes were even automated by making a linter.
I know this isn't a Q&A, but I still wanted to respond to it, because it was directly my fault.

For me, the number one reason to use Highlight.js over anything else is the automatic language detection. I maintain a PHP library that's mostly used in forum software such as phpBB and Flarum. In my experience, most users don't fill in name of the programming language when posting code blocks.

I came to hightlight.js because I use Aciidoc-revealjs to create my slide decks and the has the best support for hightlight.js. I never worked with prism and only contributed some new keywords to hightlight, but I am think I am better with the "simple" approach taken by hightlight ;-)

Ho, in here because use highlight.js in my blog with line numbers and copy button, but cannot found a way to make a download button.
So, search for this and found prism download button (seems to work as expected).
Is there any way to make similar for highlight.js? 😅

dose Prism have all these themes?

I think a major weakness of both syntax highlighters is they're based on regular expressions. Most if not all of the languages they highlight are not regular languages.
A syntax highlighter having proper context-free parsers would be a major reason to prefer one over all others. An earley p

I am testing out react-syntax-highlighter which offers both highlight.js and prism and for my use case highlight.js is much faster. I am basically trying to have editable code with live syntax highlighting.
Prisma has better jsx/tsx support but its not worth it for the difference  in speed.
highlight.js does seem to support jsx/tsx a fair amount but a small thing that messes it up is something like this
import { Comp_ } from "@component";
import { cn } from "../../Utils/cn";
import { useDarkMode } from "usehooks-ts";

const Comp = <T,/*<- this trailing comma as well as this comment*/>({className, ...props}: Comp_.Props<T>) => {
    return (
        <Comp_ {...props} classname={cn("w-full", className)} />
    );
}

export {DatePicker};

I find this last post a bit confusing/misleading on several points... so I'm hiding it.  Neither library uses a simple lexer/tokenizer (that walks the code one character at a time).

Both parsers tokenize based on regex scanning.
Both can highlight operators/punctuation (see #2500). (depends on the grammar)
Both have line number plugins.

I find this last comment a bit confusing/misleading on several points... so I'm hiding it. Neither library uses a simple lexer/tokenizer (that walks the code one character at a time).

Both parsers tokenize based on regex scanning.
Both can highlight operators/punctuation (see Discuss: Higher fidelity language highlighting (in general) #2500). (depends on the grammar)
Both have line number plugins.

Thanks for the information.
From the https://highlightjs.org/, I cannot find any information mentioning the plugin part.
No demo with line numbers.
The discussion seems to be lengthy. Any easy way to make highlights to the operators and punctuations etc like PrismJS?

Prisme does not support language autodetection https://github.com/PrismJS/prism/issues/1313
so highlightjs is the winner, i could not find anything that does autodetection except this closed source thing
https://torchlight.dev/
so the choice is easy for me

thank you highlightjs for your great work.

Plugin system was hard to use, lacked functionality,

I think we have a few good hooks, but I'd be open to adding more if they were well thought out.  Open to suggestions.

FYI: It looks like Prism isn't being maintained anymore unfortunately. The last activity was > 2 years ago (Aug 2022). So, for anyone who's starting fresh and choosing a (new) highlighter, that may be an important factor worth considering.

@joshgoebel sorry for the late reply. It been a while now, totally forgot what troubles i was running into with plugins.


Merge build-pipeline into master

bla bla

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: janvoglesby sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


Allow zero length SETTINGS frames to be parsed.

Zero length SETTINGS frames are permitted by RFC 7540 but the frame
parser currently throws a FRAME_SIZE_ERROR.

Allow zero length SETTINGS frames to be parsed
Added a test

Parsing zero length SETTINGS frames don't throw an error.

Thanks @glbrntt!


Update index.md

Modified add user steps and updated screenshots

I've incorporated these into a larger PR #82


Add method to search to return first entry that matches the search

Currently, you can call .returnAll, '.return, and .count` to return results from a search. Add a convenience method to just get the first item.

Is this already implemented? I've been wanting to work on this.

Merged to dev. Will be included in the next release.


[Bug] After deploying for a period of time (2 days), the speed slows down and the memory usage increases

Checklist

[X] 1. I have searched related issues but cannot get the expected help.
[ ] 2. The bug has not been fixed in the latest version.
[X] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
[X] 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
[X] 5. Please use English, otherwise it will be closed.

Describe the bug
After deploying for a period of time (2 days), the speed slows down and the memory usage increases
model is llava-onevision
Reproduction
just like sglang official example, deploy server
Environment
python: 3.9
sglang:0.3.0
cuda:12.1
torch:2.4.0
flashinfer:0.1.6+cu121torch2.4

Please use the latest v0.4.0.post1

Please use the latest v0.4.0.post1

v0.4.0.post1 need python3.10，has v0.3.6 version fixed this bug?


New version: TOML v1.0.2

Registering package: TOML
Repository: https://github.com/JuliaLang/TOML.jl
Created by: @KristofferC
Version: v1.0.2
Commit: 7653c7a5ec9fcc54b16b41e072ec46ebcd2a0aa7
Reviewed by: @KristofferC
Reference: https://github.com/JuliaLang/TOML.jl/commit/7653c7a5ec9fcc54b16b41e072ec46ebcd2a0aa7#commitcomment-47416948

[noblock]
@KristofferC Any idea why this is failing AutoMerge? Maybe it's because AutoMerge runs on 1.6, and TOML is a stdlib on 1.6?

Yes, the only version it knows is v1.0.0: https://github.com/JuliaLang/julia/blob/675c96ffa20cfda97d3ce4f6a00149121386b7da/stdlib/TOML/Project.toml#L3


Translation: Needs Spanish translation

See https://github.com/koenvervloesem/snips-app-supervisor/tree/master/translations
This app needs entities injection for disabling and enabling apps, which is only supported in English, French and German for now.

OK, I have proposed a new es.py

I don't see a pull request?


segment function

This segment(iterable, n=1) function splits the iterable in a list of lists. Every sublist must contain as elements slices of the iterable, and must have length n. The list must contain all the possible sublist. Example:
>>> segment('12345', 3)
[['1', '23', '45'], ['12', '3', '45'], ['12', '34', '5'], ['1', '2', '345'], ['1', '234', '5'], ['123', '4', '5']]
>>> segment((x for x in range(5)), 2)
[[(0, 1), (2, 3, 4)], [(0, 1, 2), (3, 4)]]

Source code:
<EMAIL_ADDRESS>The idea was requested here:
<EMAIL_ADDRESS>Thanks to Mark Dickinson for the algorithm.

Good news - I think we already have a function that does this: partitions.
I would accept a PR that gave it a second argument that caused only the length-n segments to be emitted.

I know about partitions, but they have not the same behaviors. segment divide the iterable in slices, if possible, and returns the slices. partitions divide the elements in sublists. Example:
>>> import more_itertools as mi

It's (more or less) the same

>>> iterable = (1, 2, 3)
>>> tuple(mi.partitions(iterable))
([[1, 2, 3]], [[1], [2, 3]], [[1, 2], [3]], [[1], [2], [3]])
>>> tuple(segment(iterable, 2))
([(1,), (2, 3)], [(1, 2), (3,)])

It's NOT the same

>>> iterable = "abc"
>>> tuple(mi.partitions(iterable))
([['a', 'b', 'c']], [['a'], ['b', 'c']], [['a', 'b'], ['c']], [['a'], ['b'], ['c']])
>>> tuple(segment(iterable, 2))
(['a', 'bc'], ['ab', 'c'])

Furthermore I think a dedicated function is more fast.
PS: anyway, my previous implementation was wrong. This is the correct one:
<EMAIL_ADDRESS>

Thanks for the clarification. I don't think the difference is big enough for a new function - but do post performance numbers if you have them?

(venv) marco@buzz:~/sources/tests/more_itertools$ python3.9 -m pyperf timeit --rigorous --affinity 0 -s 'import more_itertools as mi' '[x for x in mi.partitions("Lorem ipsum dolor sit") if len(x) == 3]'
.........................................
Mean +- std dev: 2.58 sec +- 0.06 sec

(venv) marco@buzz:~/sources/tests/more_itertools$ python3.9 -m pyperf timeit --rigorous --affinity 0 -s '
import itertools as itools

def segment(it, n=1):
    if n < 1:
        raise ValueError(f"Number of segment must be > 0, {n} found")

    try:
        len_it = len(it)
        it[0:0]
        it_true = it
    except TypeError:
        it_true = tuple(it)
        len_it = len(it_true)

    if len_it < n:
        err = f"Iterable length {len_it} must be greater than number of segments {n}"
        raise ValueError(err)

    return (
        [it_true[i:j] for i, j in zip((0, ) + startends, startends + (len_it, ))]
            for startends in itools.combinations(range(1, len_it), n-1)
    )

' '[x for x in segment("Lorem ipsum dolor sit", 3)]'
.........................................
Mean +- std dev: 205 us +- 3 us

I think that this is a good idea. Some thoughts on the topic.
Functions
more-itertools has two functions to partition a sequence of elements: partitions, that is order preserving, and set_partitions that is not. The latter has an optional parameter to set the number of parts (or classes), while the former has not. It would be interesting to have a similar signature, and maybe to update the name of the partitions function (but keep it for compatibility reasons):
def segments(iterable, k=None): # with a 's', synonym for partitions
    # order preserving

def set_partitions(iterable, k=None):
    # not order preserving

Segment counting
I wrote a small program to compare the number of partitions in segments when the  number of segments is fixed or not:
>>> def segments_count(n, k=None):
...     if k is None: # number of elements of `partitions(range(n))`
...         return 2**(n-1)
...     else:         # segments of size k
...         import math
...         # combinations of k-1 boundaries out of n-1 positions
...         return math.factorial(n-1)//(math.factorial(n-k)*math.factorial(k-1))

>>> s = "Lorem ipsum dolor sit"
>>> L = len(s)
>>> S = segments_count(L, 3)
>>> S
190
>>> len(list(segment(s, 3))) # check
190
>>> B = segments_count(L)
>>> B
1048576
>>> import more_itertools as mi
>>> len(list(mi.partitions(s))) # check
1048576
>>> (1-S/B)*100
99.98188018798828

That means that, in @Marco-Sulla's example, if you want to generate all 3-segments of the sequence "Lorem ipsum dolor sit" by filtering all segments (the return of partitions), you just throw away more than 99.98% of the partitions. Conclusion: a dedicated function would definitely be useful.
Benchmark
The most intriguing:
>>> int(B/S)
5518
>>> int(2.55/202e-9) # from @Marco-Sulla's timeit
12623762

Meaning: we pick 1 partition out of 5518, but only need 1 out of 12623762 portion of time. Since the implementation is almost the same, the times should be proportional.
Here's my test:
>>> from timeit import timeit as ti
>>> S0 = ti(lambda: [x for x in segment("Lorem ipsum dolor sit", 3)], number=10)
>>> S0
0.0012054299950250424
>>> B0 = ti(lambda: [x for x in mi.partitions("Lorem ipsum dolor sit") if len(x) == 3], number=10)
>>> B0
15.179263051999442
>>> int(B0/S0)
12592

That seems more realistic. @Marco-Sulla: can you check your benchmark?
Implementation
The loop:
for startends in powerset(range(1, n)):
    ...

is similar to:
for k in range(1, n + 1):
    for startends in itools.combinations(range(1, n), k - 1):
        ...

that is
for k in range(1, n + 1):
    yield from segments(iterable, k)
# or itertools.chain(*(... for k in ...)) if faster

We just need to "unfold" the current implementation to get the segments function.

I think that this is a good idea.

:-)

It would be interesting to have a similar signature [from set_partitions]

Well, no problem. I prefer n because k remembers me more the factorials, but there's no problem to rename it.

and maybe to update the name of the partitions function (but keep it for compatibility reasons):
def segments(iterable, k=None): # with a 's', synonym for partitions
    # order preserving

So you're proposing to change partitions to segments, add an optional k parameter and return the "old" partitions if k is None, otherwise return the proposed segments output?
Beware: as I wrote before, the two functions as similar but different outputs. While partitions returns a list of lists, segments returns a list of slices. This is the same for the most of iterables, except for text sequences like str, bytes etc. Indeed, in partitions example a string is used, and an additional for loop with a join is used to recompose the slice.
So IMHO partitions and segments are better to be separate.
About segment VS segments, as for k, I prefer segment, but maybe it's better to follow the library convention.
About segments returning all the segments if k is None, I don't think it's a good idea. It's a completely different behavior, that maybe requires another function. And to speed up checks, it could be simply triggered if k < 1 (that currently raises error).

>>> S0 = ti(lambda: [x for x in segment("Lorem ipsum dolor sit", 3)], number=10)

Well, I don't know why you use lambda :-)
>>> ti(lambda: [x for x in segment("Lorem ipsum dolor sit", 3)], number=10)
0.0022441959008574486
>>> ti('[x for x in segment("Lorem ipsum dolor sit", 3)]', globals={"segment": segment}, number=10)
0.0015578940510749817

Anyway, I didn't use timeit directly. I used pyperf, a tool that is used by py devs themselves to compare performance of different Python releases. And before to use it properly, it's recommended to do a system tuning:
(venv) marco@buzz:~/sources/tests/more_itertools/venv$ sudo python3.9 -m pyperf system tune
Tune the system configuration to run benchmarks

Actions
=======

Perf event: Max sample rate set to 1 per second
CPU Frequency: Minimum frequency of CPU 0-3 set to the maximum frequency
CPU scaling governor (intel_pstate): CPU scaling governor set to performance
Turbo Boost (intel_pstate): Turbo Boost disabled: '1' written into /sys/devices/system/cpu/intel_pstate/no_turbo
IRQ affinity: Stop irqbalance service
IRQ affinity: Set affinity of IRQ 122-124,126,129-131 to CPU 0-3

System state
============

CPU: use 4 logical CPUs: 0-3
Perf event: Maximum sample rate: 1 per second
ASLR: Full randomization
Linux scheduler: No CPU is isolated
CPU Frequency: 0-3=min=max=2600 MHz
CPU scaling governor (intel_pstate): performance
Turbo Boost (intel_pstate): Turbo Boost disabled
IRQ affinity: irqbalance service: inactive
IRQ affinity: Default IRQ affinity: CPU 0-3
IRQ affinity: IRQ affinity: IRQ 0-17,51,67,120-131=CPU 0-3
Power supply: the power cable is plugged

Advices
=======

Linux scheduler: Use isolcpus=<cpu list> kernel parameter to isolate CPUs
Linux scheduler: Use rcu_nocbs=<cpu list> kernel parameter (with isolcpus) to not schedule RCU on isolated CPUs

and I used subsequently --affinity option, to use every time the same, single core, because I have not isolated the cores (too much work :-D In teory, if your computer does not do something else, it's okay)
Why the results are so different? I don't know. Maybe partitions performs better with multicore, or segments performs better in single thread.

The loop:
for startends in powerset(range(1, n)):
    ...

is similar to:
for k in range(1, n + 1):
    for startends in itools.combinations(range(1, n), k - 1):

Well, but segments does not do this. It does:
[iterable[i:j] for i, j in zip((0, ) + startends, startends + (n, ))]
            for startends in combinations(range(1, n), k-1)

that is, in a slower but more readable manner:
res = []

all_flat_startends = combinations(range(1, n), k-1)

for flat_startends in all_flat_startends:
    slices = []
    starts = (0, ) + flat_startends
    ends = flat_startends + (n, )
    startends = zip(starts, ends)

    for i, j in startends:
        slice = iterable[i:j]
        slices.append(slice)

    res.append(slices)

return res

PS: for a premature optimization :-D, maybe it's better to use from itertools import combinations. Dots slows down the operations of some nanoseconds :-D

I would still merge a PR that adds a second argument (length) to partitions, but I'm not up for renaming the existing function or changing its output types.

While partitions returns a list of lists, segments returns a list of slices

Yes, but if you wrap the iterable in a list (as in partitions), this is the same. Are you specifically interested in string slices? (By the way, you made me notice that I may have introduced an issue in my last PR!).

So you're proposing to change partitions to segments, add an optional k parameter and return the "old" partitions if k is None, otherwise return the proposed segments output?

Yes, that was the idea, but with a consistant output (lists of chars instead of string slices).

but I'm not up for renaming the existing function or changing its output types. (from @bbayles)

Okay.

About segments returning all the segments if k is None, I don't think it's a good idea. It's a completely different behavior, that maybe requires another function.

That seems consistent to me. And that's the way set_partitions works. Plus, the algorithm is the same (see below).

Well, I don't know why you use lambda :-)

To not to have to write my code in a string.

Why the results are so different? I don't know. Maybe partitions performs better with multicore, or segments performs better in single thread.

When I saw the benchmark, I thought that with something like:
for k in range(1, n+1):
    yield from segments(iterable, k)

We could dramatically speed up partitions. But that's already what partitions makes (see below). Hence I don't see the cause of the difference.
Here's the below...
You have currently:
def partitions(iterable):
    sequence = list(iterable)
    n = len(sequence)
    for i in powerset(range(1, n)):
        yield [sequence[i:j] for i, j in zip((0,) + i, i + (n,))]

def powerset(iterable):
    s = list(iterable)
    return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1))

What I'm saying is that this is exactly the same algorithm as segments.
First, rename one of the arguments to avoid confusions:
def partitions(iterable):
    sequence = list(iterable)
    n = len(sequence)
    for start_end in powerset(range(1, n)):
        yield [sequence[i:j] for i, j in zip((0,) + start_end, start_end + (n,))]

Now,
for start_end in powerset(range(1, n)):
    yield [sequence[i:j] for i, j in zip((0,) + start_end, start_end + (n,))]

Is (len(range(1, n)) == n - 1):
for start_end in chain.from_iterable(combinations(range(1, n), r) for r in range(n)):
    yield [sequence[i:j] for i, j in zip((0,) + start_end, start_end + (n,))]

That is equivalent to (unfold chain.from_iterable):
for r in range(n):
    for start_end in combinations(range(1, n), r):
        yield [sequence[i:j] for i, j in zip((0,) + start_end, start_end + (n,))]

And to (shift r):
for r in range(1, n + 1):
    for start_end in combinations(range(1, n), r - 1):
        yield [sequence[i:j] for i, j in zip((0,) + start_end, start_end + (n,))]

And to (list comprehension and generator):
for r in range(1, n + 1):
    yield from ([sequence[i:j] for i, j in zip((0,) + start_end, start_end + (n,))]
                for start_end in combinations(range(1, n), r - 1))

That is (if segments is only the returned generator of the complete function):
for r in range(1, n + 1):
    yield from segments(sequence, r)

You have exactly the same structure as in set_partitions.

(By the way, you made me notice that I may have introduced an issue in my last PR!).

False alarm, because divide returns an iterable of iterators on slices.

Well, you can change it to this:
from itertools import combinations
from more_itertools import powerset

def partitions(iterable, k=0):
    sequence = list(iterable)
    n = len(sequence)

    if k < 1:
        all_startends = powerset(range(1, n))
    else:
        all_startends = combinations(range(1, n), k-1)

    return (
        [sequence[i:j] for i, j in zip((0, ) + startends, startends + (n, ))]
            for startends in all_startends
    )

Anyway, this forces you to rejoin strings and strings-like objects if you want the slices. Furthermore, it uses sequence = list(iterable), that is slower than sequence = tuple(iterable): 239 us +- 6 us vs 216 us +- 5 us. Furthermore tuple uses less memory.
The difference between partitions and segments it's all here:
    try:
        n = len(iterable)
        iterable[0:0]
        sequence = iterable
    except TypeError:
        sequence = tuple(iterable)
        n = len(sequence)

segments first tries to see if the iterable supports len() (ie it's not an iterator) and if it supports slicing. If yes, it uses it directly, otherwise tries to convert to a tuple.
partitions, on the contrary, converts any iterable to a list, so also special sequences, like str, that perfectly supports len() and slicing.
That's why IMHO segments is more appropriate and fast for text sequences.
But if you want to simply add a parameter to partitions, ok, that's no problem.

Well, you can change it to this:

That's a clean version.

sequence = list(iterable), that is slower than sequence = tuple(iterable)

You're right. I see another reason to use tuple: the sequence is designed to be immutable, thus we should not use a (mutable) list.

The difference between partitions and segments it's all here:

That's funny because I used a similar trick here (without looking at your code). It's indeed a good idea and can avoid an expensive copy, but has an impact on the output, as you stated. @bbayles will decide if that's acceptable (I think he already gave the answer).
Note that in this case, if the copy is O(n), you are fighting against O(2^n) (partitions) or O((n k)) (segments) hence the time used for the copy should be negligible in most cases. And if the memory is an issue, then the iterable size would be too big for the generator to end in a reasonable time...

The difference between partitions and segments it's all here:

That's funny because I used a similar trick here (without looking at your code). It's indeed a good idea and can avoid an expensive copy, but has an impact on the output, as you stated. @bbayles will decide if that's acceptable (I think he already gave the answer).

Yes, that's because IMHO also a new function is better. We can have them both, the parameter for partitions and a new function segments.
Furthermore, if you pass segments(tuple("ABCDEF"), 3), you will have the same output of partitions("ABCDEF", 3). But I suspect that people wants slices for strings the majority of times... it's in the example of partitions too! :-)

Note that in this case, if the copy is O(n), you are fighting against O(2^n) (partitions) or O((n k)) (segments) hence the time used for the copy should be negligible in most cases

Not if k is small or very near to n :-)


make binaryninja.Architecture more pythonic

To get a list of supported architectures for binjapython API, you read the list property of binaryninja.Architecture:
binaryninja.Architecture.list
[<arch: aarch64>, <arch: armv7>, <arch: mips32>, <arch: powerpc>, <arch: x86>, <arch: x86_64>, <arch: 6502>]
Can we support list() of architecture, or perhaps add an iterator? And other such pythonic things?

Some of these are fixed, open bugs for specific issues.


Unable to restart BLE (NimBLE) after being stopped, WDT timeout (IDFGH-7752)

Environment

Development Kit:      [ESP32C3 custom board]
Module or chip used:  [ESP32C3]
IDF version: v4.4-367-gc29343eb94
Build System:         [idf.py]
Compiler version: riscv32-esp-elf-gcc (crosstool-NG esp-2021r2-patch3) 8.4.0
Operating System:     [Windows]
(Windows only) environment type: [Plain Command Prompt].
Using an IDE?: [Yes (please give details)] VS Code
Power Supply:         [external 3.3V]

Problem Description
Hi! I'm experiencing the issue with the BLE start aftter disabling it for power saving. The issue happens unpredictably, so sometimes BLE starts correctly and without any problems. BLE restart is requested by GPIO interrupt.
I found that the watchdog is triggered just after btdm_controller_enable(mode) is called.
Expected Behavior
At startup MCU starts advertising. When the device connects and disconnects, BLE is deinitialized, MCU moves to light sleep mode with Bluetooth low power clock specified as "External 32kHz Crystal". Once the GPIO interrupt occurs (causing the queue to pass a command to the appropriate task) the BLE is initialized again and starts advertising.
Actual Behavior
MCU starts correctly, during BLE initialization a function btdm_controller_enable(mode) (inside esp_bt_controller_enable) stucks, cuasing watchdog to trigger.
Steps to reproduce

Initialize NibBLE stack and start advertising;
Connect to the ESP32C3 with NimBLE app (or similar);
Disconnect from ESP32C3;
Initiate an interrupt on GPIO8 (with GPIO_INTR_LOW_LEVEL).

Debug Logs
In case of success:
W (39851) BTDM_INIT: esp_bt_controller_mem_release not implemented, return OK
I (39851) BTDM_INIT: BT controller compile version [d913766]
I (39895) BTDM_INIT: Bluetooth MAC: 7c:df:a1:bf:eb:c2

I (39901) BLE: BLE Host Task Started
I (39913) NimBLE: GAP procedure initiated: advertise;
I (39913) NimBLE: disc_mode=2
I (39913) NimBLE:  adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=1280 adv_itvl_max=1760
I (39914) NimBLE:

In case of failure:
W (50108) BTDM_INIT: esp_bt_controller_mem_release not implemented, return OK
I (50108) BTDM_INIT: BT controller compile version [d913766]
I (50151) BTDM_INIT: Bluetooth MAC: 7c:df:a1:bf:eb:c2

E (55107) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (55107) task_wdt:  - IDLE (CPU 0)
E (55107) task_wdt: Tasks currently running:
E (55107) task_wdt: CPU 0: btController

Did you solve it?

Hi @hyu7000 ,
I tried reproducing this issue by initiating an interrupt  on GPIO8 (with GPIO_INTR_LOW_LEVEL). But the issue didn't get reproduced. NimBLE stack re-initializes without any issues.

Hi,
Can you please send a demo application to reproduce this issue? and also sdkconfig if possible.

@IshaESP i use arduino-esp32.
when i add BLEDevice::init("title"); in my code, below log occur.
task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
like the writer said. this log show me after btdm_controller_enable(mode) is called.
but i didnt know what is this function.
are you need a code in arduino-esp32?

Hi,
I don't have an arduino-esp32 setup. Can you send me either one of these things for debugging the issue:

Your demo application. OR
Existing IDF application with which I will be able to reproduce this at my end.

@IshaESP you can use the blecent_throughput and modify it to stop and start the blecent_host_task

Hi @ChrisEAlfred ,
I tried blecent application on IDF v4.4 on ESP32C3 to continuously init deinit nimble stack in a loop. It works. Can you refer to that example?
Or let me know if there is any thing different being done in the application.
Attaching the log for the same.
blecent_init_deinit_terminal_log.zip

Hi @ChrisEAlfred ,
I tried blecent application on IDF v4.4 on ESP32C3 to continuously init deinit nimble stack in a loop. It works. Can you refer to that example?
Or let me know if there is any thing different being done in the application.
Attaching the log for the same.
blecent_init_deinit_terminal_log.zip

Hi @zimacode  , is this issue still observed , any updates ?

Closing issue. Feel free to reopen with details, if needed.


[HOTFIX] Show Segment with stage returns empty

Why is this PR needed?
ListStageFiles function has a bug, leading to the failure of listing stage files
What changes were proposed in this PR?
The code related to list stage files has been modified. bug solved
Does this PR introduce any user interface change?

No

Is any new testcase added?

Yes

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/1760/

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/3502/

retest this please

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/3505/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbon_PR_Builder_2.4.5/1763/

LGTM


Ban and kick reason length fix

Closes #861
Description
This PR main direction is to shorten reason in places, where is limit of characters. Main places is: Kick and Ban Audit Log entries, user notification and ModLog entries. This also limits ModLog entry description length. Added limits to watching too.
Still to-do

[ ] Add test for characters limits
[ ] Remove DB entries when applying infraction fail.

@MarkKoz Now this should be fixed.

@sco1 I now made changes, but problem is, I can't change pardon_infraction. This buildup and log text generating don't allow this way.

Why do you need to change pardon_infraction?

@MarkKoz Now should OK.

All the truncation seems to be fine though.

@ks129 Can you please update this pull request with a proper description? It's not acceptable to just write "Closing #861" as your pull request description - the description is supposed to provide a high level overview over specifically what this pull request does.
I'd also like to suggest that this PR address two more related and fairly minor issues:

If the ban does fail, for some other reason, it would be nice if we could reset the state properly so we don't get an erroneous state. This includes removing the record from our database and deleting the DM that was sent to the member so they don't get a false infraction notice.
We should add a test that tests a ban with a ban reason of over 512 characters.

@lemonsaurus I fixed PR description. About tests, there are currently no tests for this moderation side.

@ks129 looks like you're right, I thought we had more tests for moderation. We do have the tests in here https://github.com/python-discord/bot/blob/master/tests/bot/cogs/moderation/test_silence.py but not for most of the other moderator commands.
It would still be nice to see a single test, specifically for this problem. Would you be able to write that? No need to write a complete suite of tests for the entire moderation cog, but we got to start somewhere, right?

@lemonsaurus So I should write test only for these functions that have shortening?

doesn't this just apply to bans?

@lemonsaurus I added truncation to ban, kick and ModLog entries. Should I write to test to every of them?

Yeah, that seems fine to me. They can all be in the same class, though. You're basically just testing truncation.
also, we should probably get tests up and running for moderation features. That's gotta be one of the most important cogs we have. It's funny that we have extensive testing for Duck Pond but we don't have any tests for our most crucial commands.

@lemonsaurus I added now removing infraction from DB when applying fail and moved DM sending to later, so this check is this failed before sending it. Also made tests, but ban and kick reason shortening is in one file, ModLog's one is in another file.


Update CONTRIBUTING.md

For HactoberFest 2022

Read the Readme File First.
and also star this repo.
 As mentioned for you have to edit CONTRIBUTION.md File same time.
Kindly make PR after completion of all steps.
Don't Pull Request only for CONTRIBUTION.md changes. Make sure after contribution you need to edit CONTRIBUTION.md
Then create PR.
Delete this PR. and Update in previous by closing it and the create PR with proper guidelines.

Delete this PR. and Update in previous by closing it and the create PR with proper guidelines.

Need to Update in single PR.
PR is not accepted.