Max connection limit of ratchet websocket

Hi, I am new in ratchet web socket, and my application is like "FACEBOOK", so can i use the ratchet web socket in PHP(Laravel)? And also tell me : How many connections working concurrently?
Sorry for my English...

@sanjayinx I researched that question recently. Take a look at this https://github.com/ratchetphp/Ratchet/issues/300 and also open https://rtcamp.com/tutorials/linux/increase-open-files-limit/.
TLDR: 1024 cocurrent connections in default PHP build, can be recompiled + also You need to raise Your OS nofile limit.

Unfortunately I have the same problem. I tested on both windows and linux ( on linux everything increased and optimised ) and I cannot make more than 254 connections. This is really frustrating and it would be nice to hear some advice/solutions.

With PHP 7.1 we have a limit 255. Could it be cause of PHP build?

@alexslipknot I have already found a solution for this, please see: https://github.com/ratchetphp/Ratchet/issues/300

@Mecanik thank. So I have to use Event instead of LibEvent or SocketStream? I'm not exactly using Ratchet but project is very similar. I'm afraid that moving to another extension will case a lot of work. Maybe it is possible to increase stream_socket limit at least with rebuilding PHP?

@alexslipknot You can increase anything you want, it will still not pass 1024 connections. Using another extension would not affect anything, but you can always test and see. If you use PHP 7 then use "event" and it will be fine.

@Mecanik alright, thank you, I'll try :)

Well. After installing pecl extension "Event" and implementing some websocket-server I found that maximum connections still 255. So I guess there is system restrictions.
I'm using Debian on docker with PHP 7.1.7
Maybe I'm doing something wrong? Here is limits for process:

@alexslipknot Ok, you have gone so far so do not change anything back. Tell me, are you using PHP-FPM ?

@Mecanik Yes. Indeed. But anyway I'm starting script within console, so I guess it is CLI in my case

@alexslipknot Ok, have a look at my code above and use it. See what the values are, based on that we can find out where the limit is. I had it before, but I cannot remmeber 100% where. Please use the code I posted above.

@Mecanik if you're talking about issue300 - I think there is no need to check if (class_exists)
Because my example using definitely Event. So my code looks like:
Starting server:
    $this->base = new EventBase();
    $this->event = new EventListener($this->base, [$this, 'accept'], $this->base, EventListener::OPT_CLOSE_ON_FREE | EventListener::OPT_REUSABLE, -1, $this->server);

And accept connection method:
public function accept($listener, $connectionId, $address, $id)
{
    $buffer = new EventBufferEvent($this->base, $connectionId, EventBuffer::OPT_CLOSE_ON_FREE);
    $this->clients[$connectionId] = $connectionId;
    echo "connection count: " . count($this->clients) . "\n";
    // ... some more stuff
}

@alexslipknot Well this is where you are wrong, just because you manually call EventBase() does not mean it will use the "event" extension. I tried the same thing before and had no results, until I checked with the code I told you above.
Make sure you are using "even" extension, then the factory will use ExtEventLoop which is what you need.
Make sure the limits are increased accordingly: https://easyengine.io/tutorials/linux/increase-open-files-limit/
Make sure if you are using PHP-FPM, that you have edited /etc/php/7.0/fpm/php-fpm.conf like so:
; Set open file descriptor rlimit for the master process.
; Default Value: system defined value
rlimit_files = 65536

; Set max core size rlimit for the master process.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
rlimit_core = unlimited

Then give it a try, but please check what I said.

@Mecanik Thanks for helping me. I'm really appreciate that.
So about extension: no,  when I call new EventBase without extension - it will terminate process immediately with error:

Undefined class

So I'm definitely using Event
But! Event listener is just a worker that starting inside from master. And my master using stream_socket_server to create server. So I guess that can be reason of limitation.
EventListener accept socket in $target param. So should I use something else? In my case this is stream_socket that listen tcp connection over SSL over wss protocol.

@alexslipknot I'm trying to help you, but in order to do that I need you to answer my questions...
Did you do any of the steps I told you to do ?

I've uploaded structured archive with configs.
@Mecanik by the way: I already tried with EventListener (server now using it as $server) instead of stream_socket_server but still no luck. :(

@alexslipknot Checking your configuration, I found the first problem. You are not using "event"properly, I do not think Ratchet detects it. ( react )
So please do the following:
-Create "event.ini" in "\etc\php\7.1\mods-available" and insert: "extension=event.so"

Perform the following 2 commands:

ln -sf /etc/php/7.1/mods-available/event.ini /etc/php/7.1/fpm/conf.d/20-event.ini
ln -sf /etc/php/7.1/mods-available/event.ini /etc/php/7.1/cli/conf.d/20-event.ini

Then please remove "extension=event.so" from "\etc\php\7.1\fpm\php.ini" because it will not load it here anyway.
Then do: service php7.1-fpm restart
Afterwards please start the server with:  "exec /usr/bin/php7.0 index.php" and do your test.
It might not load even now the extension properly, so to further assist you please do exactly the steps I mentioned, and insert in your "index.php" or whatever file you use this:
if (function_exists('event_base_new')) {
    		echo "\033[0m We can use LibEventLoop!!" . PHP_EOL;
    	} elseif (class_exists('libev\EventLoop', false)) {
    		echo "\033[0m We can use LibEvLoop!!" . PHP_EOL;
    	} elseif (class_exists('EventBase', false)) {
    		echo "\033[0m We can use ExtEventLoop!!" . PHP_EOL;
    	}
    	else
    	{
    		echo "\033[0m We can use StreamSelectLoop!!" . PHP_EOL;
    	}

So we can see what is the server using when it starts.

Even when I know that those things are the same and will not help to )) I did all steps that you mentioned above. And as I expected: We can use ExtEventLoop!!
So really I think that some limitations are in my docker container.

@alexslipknot Great stuff, so it's using the correct extension. Now we know that Ratchet is not limited anymore. Regarding the docker, if it's a container it may have limits from the parent machine! So no matter what we do, it may not work.
Why don't you try with a normal VPS ? But with the same configurations...

@Mecanik ))) Thanks for your optimism. I'll try it on real server. Anyway with steam_socket real server has limits with 255 connections. Well... any manipulations on the real production server scare me because I haven't test environment. Only production. But anyway I'll write here the results.

Well, At least I got what's the problem. These limitations are from operating system. So on Debian 7 I have limits with 255 connections and on Debian 8 I have limits with 199 connections. I tried not only with PHP. I also tried with example on C++ ... So I have to look how to avoid those limits on Debian.

@alexslipknot OS limits are easy to increase, and they should increase; but if you are running as a Container it might not be possible because the "mother host" is restricting it and there is nothing you can do.

Finally! I found the solution! Thanks a lot for everyone!
Problem was: I was testing connection limits from one browser. But the browser has a limit for it :)

I had an experience which may help somebody.
My server was stoping responding after one hour when the number of concurrent socket connections reached about 700. After doing all of the possible solutions, I realized that I had a ProxyPass in apache which redirects port 443 (SSL) to 8080 (my socket port). Finally, I increased the ServerLimit in my Apache prefork configuration from 700 to 1700 and the problem was solved temporarily.
This shows that if you use ProxyPass of Apache (or another webserver) the Apache will become busy as it is between the client and WebSocket server.


Facebook connexion blocked

Bonjour,
I've just noticed that a filter is blocking the facebook connection, I try to connect with facebook on the soundcloud site and I can't, so I decide to test with my fai's, and it works.  I'm going to look in your lists, I saw that another person gave you filters, I'm going to analyze them, I think that's where it comes from, some websites don't work for me anymore like for example playing a streaming video on my favorite team's website. I come back to you to tell you what :)
(Can't see the problem, too many filters for me :/ . )

@TechComputerServiceDunkerque
Here's what you can do to debug this. Open a website in google chrome.
Right-click on the page, and click Inspect Element. Go to Network tab.
Reload the page.
Observe for network requests that has error.
You can also filter by status-code:204.

Hi @TechComputerServiceDunkerque ,
I think for facebook, it is connect.facebook.net. I'll try to add this now. hold on.

@TechComputerServiceDunkerque , I made the fix, can you test on your side as well?

@TechComputerServiceDunkerque , do let me know if you still face any issues with this.

It's okay on this side for facebook, but it blocks players.brightcove.net. It's possible to whitelist it, thank you.

It is also impossible to open a file on mega.nz

Sure I'll add those domains to the whitelist.
A week ago, I swapped this out: https://raw.githubusercontent.com/EnergizedProtection/block/master/ultimate/formats/hosts
for this one: https://raw.githubusercontent.com/EnergizedProtection/block/master/blu/formats/hosts
the ultimate might be too strict and blocks too many list. I think I'll revert this change as well.

This is done now, and deployed to live servers. Please test to make sure it works.
After that we can close this issue.

Mega.nz is still blocked

Mega works very badly with Bancuh, now there's an error message...
[url=https://www.noelshack.com/2020-08-3-1582121272-2020-02-19-15-06-02-mega-nz-ea5e381d56d4.jpg][img]https://image.noelshack.com/minis/2020/08/3/1582121272-2020-02-19-15-06-02-mega-nz-ea5e381d56d4.png[/img][/url]

Hi @TechComputerServiceDunkerque ,
It seems that we've been getting more issues, ever since I implemented this task: https://github.com/ragibkl/adblock-dns-server/issues/12
Maybe those lists are too strict. I've had to whitelist several domains already since then.
I'm adding a few more whitelist. Let me know if it is still an issue.

Hi @TechComputerServiceDunkerque , do test this out and let me know so I can close this issue.

I see problems on aptoide tv, it's a playstore app. I can't download files. The problem of facebook ads persists on android apps, I can't find a list that blocks. For the moment, I don't see any blocked site. If I come across any sites, I'll let you know. Mega's problem is solved.

If you ever need to translate French into English, go to this site, I speak to you in English thanks to him and the translation is clean compared to google translation: https://www.deepl.com/translator#

Hi @TechComputerServiceDunkerque ,

I'm glad we fixed the issue with Mega download.

I'm also not sure how we can block facebook ads on android. If you have any ideas in future, please share them at here

Meanwhile, I think I will temporarily undo the work in here
I think it is too strict. We can review them again later. Maybe after we fix aptoide store. I'll close this issue once I undo that change.

Closing this for now. Please file a new issue ticket for any new issues.


Password protect web interface

Is there any way to password protect the web interface?

This would be a nice feature.  Maybe with an API key so direct linking to recordings and thumbnails would still be possible.

Yes this would be a good feature, will implement soon

i would like it too i opened another one can it be linked it?
https://github.com/roflcoopter/viseron/issues/440

Can't wait to have it working! 👍😎

@spupuz @nittanygeek
I had some problems with the builds regarding python deps in the aarch64 and armv7l images after merging #469 but it is all fixed now.
I will release a beta soon but if you want to try it out now you can do so by pulling the dev tag.
To enable auth you need to add it to your webserver config, like this:
webserver:
  auth:

You can set session timeout parameters if you want to, more information is on the dev version of the docs:
https://dev--viseron.netlify.app/components-explorer/components/webserver
Note: You will be redirected to the onboarding page on initial startup where you will create your first admin user. You cant yet add other users but i will implement that right away. I wanted to get the PR merged with a minimal set of features as the PR was getting very big


Selecting a custom python interpreter does not work properly.

Environment data
VS Code version: 1.40.0
Extension version (available under the Extensions sidebar): 2019.10.44104
OS and version: Windows_NT x64 10.0 18362.449
Python version: Customized Python 2.7.16 x64
Type of virtual environment used: N/A
Relevant/affected Python packages and their versions: Python itself
Jedi or Language Server? N/A

Expected behaviour
After the python path is specified in in the settings.json, VS Code should select Python Interpreter.
The python path is specified like:
"python.pythonPath": "${workspaceFolder}/sqlite/bin/custom_python.exe",

Actual behaviour
After specifying the Python path in settings.json and restarting VS code, the following error occurs:
"No Python interpreter is selected. You need to select a Python interpreter to enable features such as IntelliSense, linting, and debugging."

The interpreter specified in the Python path is also displayed as "current intepreter", but is not started. If you call the interpreter manually in the powershell, this works without problems.
Strangely enough, the Python interpreter sometimes works if you restart VS code several times and then wait about 5-10 minutes, but not always.
Also a diagnostic code is given in the output:
c:\Projects\my_workspace> ./sqlite/bin/custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py

Diagnostic Code: InvalidPythonInterpreterDiagnostic, Message: No Python interpreter is selected. You need to select a Python interpreter to enable features such as IntelliSense, linting, and debugging.

If you execute the line above the diagnostic code with the customized interpreter, then the following is output, which looks correct first:
PS C:\Projects\my_workspace> .\sqlite\bin\custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py

{"is64Bit": true, "versionInfo": [2, 7, 16, "final"], "version": "2.7.16 (v2.7.16:413a49145e, Mar  4 2019, 01:37:19) [MSC v.1500 64 bit (AMD64)]", "sysPrefix": "C:\\platform\\PlatformLocation"}

In the VS Code Version 1.37.1 is this still functional, so after that something was broken during the updates.
Maybe the issue was introduced after version 1.37.1 and before 1.40.0.
Steps to reproduce:
Difficult to reproduce, because we are using a customized python interpreter.
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
User belongs to experiment group 'AlwaysDisplayTestExplorer - experiment'
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
Starting Jedi Python language engine.
conda --version
pyenv root
python3.7 -c "import sys;print(sys.executable)"
python3.6 -c "import sys;print(sys.executable)"
python3 -c "import sys;print(sys.executable)"
python2 -c "import sys;print(sys.executable)"
python -c "import sys;print(sys.executable)"
py -3.7 -c "import sys;print(sys.executable)"
py -3.6 -c "import sys;print(sys.executable)"
py -3 -c "import sys;print(sys.executable)"
py -2 -c "import sys;print(sys.executable)"
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -c "import sys;print(sys.executable)"
conda info --json
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -m flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s c:\Projects\my_workspace\cs\pcs\projects\__init__.py
cwd: c:\Projects\my_workspace
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -m flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s c:\Projects\my_workspace\cs\pcs\projects\__init__.py
cwd: c:\Projects\my_workspace
/usr/bin/env python -c "import sys;print(sys.executable)"
c:\Projects\my_workspace/sqlite/bin/custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
c:\Projects\my_workspace/sqlite/bin/custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
c:\Projects\my_workspace/sqlite/bin/custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
c:\Projects\my_workspace/sqlite/bin/custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -c "import sys;print(sys.prefix)"
cwd: c:\Projects\my_workspace
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -c "import sys;print(sys.prefix)"
cwd: c:\Projects\my_workspace
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -c "import sys;print(sys.executable)"
cwd: c:\Projects\my_workspace
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -c "import sys;print(sys.executable)"
cwd: c:\Projects\my_workspace
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: c:\Projects\my_workspace
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: c:\Projects\my_workspace
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -m site --user-site
cwd: c:\Projects\my_workspace
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -m site --user-site
cwd: c:\Projects\my_workspace
/usr/bin/env python -c "import sys;print(sys.executable)"
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -m nose --collect-only -vvv tests
cwd: c:\Projects\my_workspace
c:\Projects\my_workspace/sqlite/bin/custom_python.exe -m nose --collect-only -vvv tests
cwd: c:\Projects\my_workspace
~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
~\AppData\Local\Microsoft\WindowsApps\python3.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
~\AppData\Local\Microsoft\WindowsApps\python3.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
c:\Projects\my_workspace/sqlite/bin/custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
c:\Projects\my_workspace/sqlite/bin/custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
Diagnostic Code: InvalidPythonInterpreterDiagnostic, Message: No Python interpreter is selected. You need to select a Python interpreter to enable features such as IntelliSense, linting, and debugging.
c:\Projects\my_workspace/sqlite/bin/custom_python.exe completion.py
cwd: c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles
c:\Projects\my_workspace/sqlite/bin/custom_python.exe completion.py
cwd: c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles
/usr/bin/env python -c "import sys;print(sys.executable)"
Linting Output - flake8
22,80,E,E501:line too long (95 > 79 characters)
23,80,E,E501:line too long (83 > 79 characters)
51,1,F,F401:'cdb.objects.State' imported but unused
103,80,E,E501:line too long (102 > 79 characters)
121,80,E,E501:line too long (95 > 79 characters)
133,80,E,E501:line too long (116 > 79 characters)
135,80,E,E501:line too long (97 > 79 characters)
138,80,E,E501:line too long (99 > 79 characters)
139,80,E,E501:line too long (82 > 79 characters)
142,80,E,E501:line too long (107 > 79 characters)
143,80,E,E501:line too long (83 > 79 characters)
145,80,E,E501:line too long (149 > 79 characters)
146,80,E,E501:line too long (82 > 79 characters)
147,80,E,E501:line too long (128 > 79 characters)
149,80,E,E501:line too long (94 > 79 characters)
150,80,E,E501:line too long (106 > 79 characters)
151,80,E,E501:line too long (94 > 79 characters)
152,80,E,E501:line too long (100 > 79 characters)
153,80,E,E501:line too long (161 > 79 characters)
154,80,E,E501:line too long (107 > 79 characters)
155,80,E,E501:line too long (108 > 79 characters)
156,80,E,E501:line too long (106 > 79 characters)
157,80,E,E501:line too long (91 > 79 characters)
159,80,E,E501:line too long (110 > 79 characters)
160,80,E,E501:line too long (107 > 79 characters)
162,80,E,E501:line too long (81 > 79 characters)
167,80,E,E501:line too long (90 > 79 characters)
169,80,E,E501:line too long (95 > 79 characters)
184,80,E,E501:line too long (86 > 79 characters)
200,80,E,E501:line too long (84 > 79 characters)
202,80,E,E501:line too long (81 > 79 characters)
217,80,E,E501:line too long (96 > 79 characters)
255,80,E,E501:line too long (80 > 79 characters)
256,80,E,E501:line too long (90 > 79 characters)
258,80,E,E501:line too long (91 > 79 characters)
265,80,E,E501:line too long (80 > 79 characters)
266,80,E,E501:line too long (90 > 79 characters)
267,80,E,E501:line too long (87 > 79 characters)
279,80,E,E501:line too long (133 > 79 characters)
281,80,E,E501:line too long (95 > 79 characters)
292,80,E,E501:line too long (98 > 79 characters)
322,80,E,E501:line too long (88 > 79 characters)
331,80,E,E501:line too long (88 > 79 characters)
394,80,E,E501:line too long (91 > 79 characters)
398,80,E,E501:line too long (88 > 79 characters)
402,80,E,E501:line too long (90 > 79 characters)
406,80,E,E501:line too long (105 > 79 characters)
409,80,E,E501:line too long (92 > 79 characters)
410,80,E,E501:line too long (95 > 79 characters)
414,80,E,E501:line too long (84 > 79 characters)
416,80,E,E501:line too long (80 > 79 characters)
427,80,E,E501:line too long (90 > 79 characters)
433,80,E,E501:line too long (91 > 79 characters)
436,80,E,E501:line too long (84 > 79 characters)
444,80,E,E501:line too long (84 > 79 characters)
448,80,E,E501:line too long (93 > 79 characters)
450,80,E,E501:line too long (83 > 79 characters)
451,80,E,E501:line too long (100 > 79 characters)
459,80,E,E501:line too long (129 > 79 characters)
461,9,F,F841:local variable 'prj_mgr_role' is assigned to but never used
478,80,E,E501:line too long (93 > 79 characters)
493,80,E,E501:line too long (96 > 79 characters)
501,80,E,E501:line too long (98 > 79 characters)
512,80,E,E501:line too long (88 > 79 characters)
533,80,E,E501:line too long (83 > 79 characters)
534,80,E,E501:line too long (88 > 79 characters)
537,80,E,E501:line too long (91 > 79 characters)
547,80,E,E501:line too long (108 > 79 characters)
549,80,E,E501:line too long (97 > 79 characters)
561,80,E,E501:line too long (95 > 79 characters)
575,80,E,E501:line too long (82 > 79 characters)
585,80,E,E501:line too long (97 > 79 characters)
589,80,E,E501:line too long (92 > 79 characters)
590,80,E,E501:line too long (94 > 79 characters)
594,80,E,E501:line too long (90 > 79 characters)
596,80,E,E501:line too long (120 > 79 characters)
599,80,E,E501:line too long (109 > 79 characters)
608,20,E,E713:test for membership should be 'not in'
608,80,E,E501:line too long (85 > 79 characters)
610,80,E,E501:line too long (103 > 79 characters)
611,80,E,E501:line too long (82 > 79 characters)
613,80,E,E501:line too long (82 > 79 characters)
619,80,E,E501:line too long (81 > 79 characters)
650,80,E,E501:line too long (81 > 79 characters)
672,80,E,E501:line too long (92 > 79 characters)
691,40,E,E711:comparison to None should be 'if cond is None:'
691,80,E,E501:line too long (83 > 79 characters)
699,80,E,E501:line too long (85 > 79 characters)
711,80,E,E501:line too long (82 > 79 characters)
712,80,E,E501:line too long (97 > 79 characters)
713,80,E,E501:line too long (82 > 79 characters)
714,80,E,E501:line too long (96 > 79 characters)
716,80,E,E501:line too long (92 > 79 characters)
719,80,E,E501:line too long (91 > 79 characters)
721,80,E,E501:line too long (110 > 79 characters)
723,80,E,E501:line too long (99 > 79 characters)
731,80,E,E501:line too long (91 > 79 characters)
739,80,E,E501:line too long (89 > 79 characters)
740,80,E,E501:line too long (91 > 79 characters)
741,80,E,E501:line too long (98 > 79 characters)
822,80,E,E501:line too long (91 > 79 characters)
848,80,E,E501:line too long (87 > 79 characters)
849,80,E,E501:line too long (110 > 79 characters)
851,80,E,E501:line too long (84 > 79 characters)
857,80,E,E501:line too long (90 > 79 characters)
858,80,E,E501:line too long (101 > 79 characters)
864,80,E,E501:line too long (86 > 79 characters)
882,80,E,E501:line too long (80 > 79 characters)
883,47,W,W601:.has_key() is deprecated, use 'in'
889,80,E,E501:line too long (88 > 79 characters)
896,80,E,E501:line too long (99 > 79 characters)
922,80,E,E501:line too long (88 > 79 characters)
937,13,E,E125:continuation line with same indent as next logical line
943,13,E,E125:continuation line with same indent as next logical line
950,13,E,E125:continuation line with same indent as next logical line
954,5,E,E125:continuation line with same indent as next logical line
957,17,E,E125:continuation line with same indent as next logical line
960,17,E,E125:continuation line with same indent as next logical line
964,5,E,E125:continuation line with same indent as next logical line
964,80,E,E501:line too long (80 > 79 characters)
967,17,E,E125:continuation line with same indent as next logical line
970,17,E,E125:continuation line with same indent as next logical line
979,80,E,E501:line too long (80 > 79 characters)
982,80,E,E501:line too long (109 > 79 characters)
993,12,E,E713:test for membership should be 'not in'
994,80,E,E501:line too long (100 > 79 characters)
1002,12,E,E713:test for membership should be 'not in'
1003,80,E,E501:line too long (104 > 79 characters)
1016,80,E,E501:line too long (88 > 79 characters)
1017,80,E,E501:line too long (109 > 79 characters)
1020,80,E,E501:line too long (83 > 79 characters)
1021,20,E,E713:test for membership should be 'not in'
1022,80,E,E501:line too long (114 > 79 characters)
1055,27,E,E127:continuation line over-indented for visual indent
1062,80,E,E501:line too long (82 > 79 characters)
1063,20,E,E127:continuation line over-indented for visual indent
1068,80,E,E501:line too long (81 > 79 characters)
1078,19,E,E127:continuation line over-indented for visual indent
1139,80,E,E501:line too long (87 > 79 characters)
1142,80,E,E501:line too long (81 > 79 characters)
1157,80,E,E501:line too long (91 > 79 characters)
1177,80,E,E501:line too long (97 > 79 characters)
1193,80,E,E501:line too long (83 > 79 characters)
1195,80,E,E501:line too long (102 > 79 characters)
1212,80,E,E501:line too long (80 > 79 characters)
1217,80,E,E501:line too long (100 > 79 characters)
1219,80,E,E501:line too long (100 > 79 characters)
1223,80,E,E501:line too long (91 > 79 characters)
1225,80,E,E501:line too long (101 > 79 characters)
1227,80,E,E501:line too long (110 > 79 characters)
1229,80,E,E501:line too long (80 > 79 characters)
1231,80,E,E501:line too long (97 > 79 characters)
1234,80,E,E501:line too long (83 > 79 characters)
1235,80,E,E501:line too long (81 > 79 characters)
1236,80,E,E501:line too long (81 > 79 characters)
1240,80,E,E501:line too long (83 > 79 characters)
1241,80,E,E501:line too long (91 > 79 characters)
1252,80,E,E501:line too long (86 > 79 characters)
1257,80,E,E501:line too long (90 > 79 characters)
1259,80,E,E501:line too long (96 > 79 characters)
1262,80,E,E501:line too long (80 > 79 characters)
1265,80,E,E501:line too long (92 > 79 characters)
1270,80,E,E501:line too long (98 > 79 characters)
1271,80,E,E501:line too long (91 > 79 characters)
1282,80,E,E501:line too long (90 > 79 characters)
1285,80,E,E501:line too long (82 > 79 characters)
1289,80,E,E501:line too long (81 > 79 characters)
1290,80,E,E501:line too long (105 > 79 characters)
1292,80,E,E501:line too long (80 > 79 characters)
1296,80,E,E501:line too long (81 > 79 characters)
1297,80,E,E501:line too long (118 > 79 characters)
1300,80,E,E501:line too long (83 > 79 characters)
1302,80,E,E501:line too long (80 > 79 characters)
1304,80,E,E501:line too long (82 > 79 characters)
1305,80,E,E501:line too long (106 > 79 characters)
1307,80,E,E501:line too long (81 > 79 characters)
1311,80,E,E501:line too long (82 > 79 characters)
1312,80,E,E501:line too long (119 > 79 characters)
1316,80,E,E501:line too long (82 > 79 characters)
1317,80,E,E501:line too long (104 > 79 characters)
1318,80,E,E501:line too long (84 > 79 characters)
1319,80,E,E501:line too long (82 > 79 characters)
1321,80,E,E501:line too long (116 > 79 characters)
1323,80,E,E501:line too long (80 > 79 characters)
1325,80,E,E501:line too long (82 > 79 characters)
1326,80,E,E501:line too long (104 > 79 characters)
1327,80,E,E501:line too long (95 > 79 characters)
1335,80,E,E501:line too long (100 > 79 characters)
1336,80,E,E501:line too long (91 > 79 characters)
1344,80,E,E501:line too long (100 > 79 characters)
1345,80,E,E501:line too long (91 > 79 characters)
1350,80,E,E501:line too long (100 > 79 characters)
1351,80,E,E501:line too long (91 > 79 characters)
1355,80,E,E501:line too long (117 > 79 characters)
1356,80,E,E501:line too long (113 > 79 characters)
1357,80,E,E501:line too long (134 > 79 characters)
1360,80,E,E501:line too long (81 > 79 characters)
1361,80,E,E501:line too long (103 > 79 characters)
1362,80,E,E501:line too long (94 > 79 characters)
1363,80,E,E501:line too long (88 > 79 characters)
1366,80,E,E501:line too long (92 > 79 characters)
1384,80,E,E501:line too long (93 > 79 characters)
1385,80,E,E501:line too long (89 > 79 characters)
1403,80,E,E501:line too long (85 > 79 characters)
1405,80,E,E501:line too long (84 > 79 characters)
1407,80,E,E501:line too long (87 > 79 characters)
1409,80,E,E501:line too long (87 > 79 characters)
1420,80,E,E501:line too long (95 > 79 characters)
1422,80,E,E501:line too long (114 > 79 characters)
1423,80,E,E501:line too long (112 > 79 characters)
1424,80,E,E501:line too long (92 > 79 characters)
1425,80,E,E501:line too long (93 > 79 characters)
1428,80,E,E501:line too long (95 > 79 characters)
1430,80,E,E501:line too long (116 > 79 characters)
1431,80,E,E501:line too long (112 > 79 characters)
1432,80,E,E501:line too long (92 > 79 characters)
1433,80,E,E501:line too long (93 > 79 characters)
1437,80,E,E501:line too long (96 > 79 characters)
1439,80,E,E501:line too long (116 > 79 characters)
1440,80,E,E501:line too long (113 > 79 characters)
1441,80,E,E501:line too long (93 > 79 characters)
1442,80,E,E501:line too long (94 > 79 characters)
1445,80,E,E501:line too long (96 > 79 characters)
1447,80,E,E501:line too long (118 > 79 characters)
1448,80,E,E501:line too long (113 > 79 characters)
1449,80,E,E501:line too long (93 > 79 characters)
1450,80,E,E501:line too long (94 > 79 characters)
1459,80,E,E501:line too long (80 > 79 characters)
1657,80,E,E501:line too long (100 > 79 characters)
1672,32,E,E127:continuation line over-indented for visual indent
1700,80,E,E501:line too long (93 > 79 characters)
1729,80,E,E501:line too long (81 > 79 characters)
1732,80,E,E501:line too long (100 > 79 characters)
1733,80,E,E501:line too long (96 > 79 characters)
1736,80,E,E501:line too long (123 > 79 characters)
1737,80,E,E501:line too long (112 > 79 characters)
1738,80,E,E501:line too long (114 > 79 characters)
1746,80,E,E501:line too long (82 > 79 characters)
1760,80,E,E501:line too long (81 > 79 characters)
1766,80,E,E501:line too long (92 > 79 characters)
1769,80,E,E501:line too long (105 > 79 characters)
1770,80,E,E501:line too long (93 > 79 characters)
1874,80,E,E501:line too long (111 > 79 characters)
1875,80,E,E501:line too long (90 > 79 characters)
1877,80,E,E501:line too long (84 > 79 characters)
1878,80,E,E501:line too long (98 > 79 characters)
1882,80,E,E501:line too long (98 > 79 characters)
1885,80,E,E501:line too long (87 > 79 characters)
1886,80,E,E501:line too long (84 > 79 characters)
1887,80,E,E501:line too long (85 > 79 characters)
1889,80,E,E501:line too long (100 > 79 characters)
1890,80,E,E501:line too long (80 > 79 characters)
1895,80,E,E501:line too long (89 > 79 characters)
1908,80,E,E501:line too long (86 > 79 characters)
1916,80,E,E501:line too long (83 > 79 characters)
1928,80,E,E501:line too long (108 > 79 characters)
1964,80,E,E501:line too long (91 > 79 characters)
1995,80,E,E501:line too long (80 > 79 characters)
2000,80,E,E501:line too long (87 > 79 characters)
2003,80,E,E501:line too long (91 > 79 characters)
2060,80,E,E501:line too long (94 > 79 characters)
2063,80,E,E501:line too long (80 > 79 characters)
2064,80,E,E501:line too long (87 > 79 characters)
2065,80,E,E501:line too long (84 > 79 characters)
2087,80,E,E501:line too long (93 > 79 characters)
2098,80,E,E501:line too long (114 > 79 characters)
2161,80,E,E501:line too long (114 > 79 characters)
2183,80,E,E501:line too long (114 > 79 characters)
2211,80,E,E501:line too long (94 > 79 characters)
2212,80,E,E501:line too long (108 > 79 characters)
2213,80,E,E501:line too long (93 > 79 characters)
2219,80,E,E501:line too long (80 > 79 characters)
2223,80,E,E501:line too long (92 > 79 characters)
2224,80,E,E501:line too long (87 > 79 characters)
2235,41,W,W601:.has_key() is deprecated, use 'in'
2251,80,E,E501:line too long (86 > 79 characters)
2272,1,F,F811:redefinition of unused 'InfoMessage' from line 65
2323,80,E,E501:line too long (88 > 79 characters)
2324,80,E,E501:line too long (95 > 79 characters)
2340,80,E,E501:line too long (86 > 79 characters)
2353,80,E,E501:line too long (85 > 79 characters)
2361,80,E,E501:line too long (88 > 79 characters)
2412,80,E,E501:line too long (93 > 79 characters)
2415,80,E,E501:line too long (80 > 79 characters)
2421,80,E,E501:line too long (105 > 79 characters)
c:\Projects\my_workspace/sqlite/bin/custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py
c:\Projects\my_workspace/sqlite/bin/custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py

@skozitzki Can you run this command and share the output?
custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py

@karthiknadig Thanks for fast response! I already run the command as mentioned in "actual behaviour" above. If I run it, I'll get the following output:
PS C:\Projects\my_workspace> .\sqlite\bin\custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py

{"is64Bit": true, "versionInfo": [2, 7, 16, "final"], "version": "2.7.16 (v2.7.16:413a49145e, Mar  4 2019, 01:37:19) [MSC v.1500 64 bit (AMD64)]", "sysPrefix": "C:\\platform\\PlatformLocation"}

Ah, sorry I missed that. Does the sysPrefix look right to you? Is that the right location. That seems wrong.

@karthiknadig Yes, the path in the sysPrefix is correct. There the installed product platform is located.

Thanks for confirming.

I have the same problem. Opening the Python log output seems to remedy this every time.

Hi,
we also use a custom interpreter. Our problem is that the timeout in vs code to retrieve the interpreter infos for the initialization step is too short. Maybe you can try my pull request. If it works pls vote for us. https://github.com/microsoft/vscode-python/issues/8856

Ok guys I have some info that might help, this problem might be caused by errors in the environment of your custom python interpreter. These could be errors not being shown/passed by to VSCode. In my case it was due to a package i'm developing that was renamed, breaking one of the .pth files in the intepreter environment.
When i deleted the .pth file pointing to the old package and 're-installed' it, everything was fine and dandy again.
Background
I've been having this problem on and off as well, across both MacOS and Win10 - the python extension will sometimes refuse to recognise a previously working python intepreter configured in the project settings.json (in this case, the 'TPOC' environment, screenshot below).
When this bug occured I tried to run the debugger, the 'select intepreter' drop down doesn't show it as an option, even though in the 'current' bar it is there (per the settings.json), even totally re-installing vscode/python doesn't fix this. Very frustrating.
VSCode shows 'TPOC' ( the env i want to use) as 'current', but doesn't let me select it

The other environments work fine (e.g. 'travis')
So I ran the interpreterInfo.py file using my 'TPOC' python intepreter, and got this error:

Turns out that package (which is what I'm currently working on) had been re-named but the .pth link is outdated. Deleting the .pth link and re-installing the package meant that vscode was happy with the 'tpoc' interpreter again.
To Summarise, it could be errors in the environment preventing vscode from loading the interpreter.
Side note, The 'select intepreter' drop down still doesn't show TPOC as an option, but it works when I put the interpreter path in manually.

Ok guys I have some info that might help, this problem might be caused by errors in the environment of your custom python interpreter. These could be errors not being shown/passed by to VSCode. In my case it was due to a package i'm developing that was renamed, breaking one of the .pth files in the intepreter environment.

Thanks for taking the time to write this. I think we can rule this out in the case as originally reported:

@karthiknadig Thanks for fast response! I already run the command as mentioned in "actual behaviour" above. If I run it, I'll get the following output:
PS C:\Projects\my_workspace> .\sqlite\bin\custom_python.exe c:\Users\user\.vscode\extensions\ms-python.python-2019.10.44104\pythonFiles\interpreterInfo.py

{"is64Bit": true, "versionInfo": [2, 7, 16, "final"], "version": "2.7.16 (v2.7.16:413a49145e, Mar  4 2019, 01:37:19) [MSC v.1500 64 bit (AMD64)]", "sysPrefix": "C:\\platform\\PlatformLocation"}

In my case, the custom interpreter simply was too slow for the default timeout sometimes. #8856 fixes this for me.

I have the same problem. This happens whenever if I specify a non-default Python path (i.e. one that is not automatically detected by the Extension).
Extension: 2021.3.680753044
VSC: 1.55.2 (3c4e3df9e89829dce27b7b5c24508306b151f30d, 2021-04-13T09:35:57.887Z)
OS: Windows_NT x64 10.0.19042


proxy.golang.org<EMAIL_ADDRESS>uses wrong hash

It seems like proxy.golang.org points<EMAIL_ADDRESS>to 6d7d2a3fe8243809b3c3a710792c8498292e2fc3 rather than aac894721b23c07b83dd2d36abba9f94b9b36a2c which is the correct commit which is tagged by v0.7.0

looks like they moved a tag, by design the proxy doesn't allow it.


CollectionItem search uses a hardcoded products id

I'm trying to use the collections feature to pull in an ActiveRecord model. I believe the settings for a section should determine which collection is called, but unless the collection is name products, it doesn't work, and you see a 500 error in the logs.
The API call here uses a hardcoded value, products, so the API call won't work if you have a collection of any other name.
https://github.com/maglevhq/maglev-core/blob/fecaea7d08dba71eb3cd1cc683b1d97e84a53820/app/frontend/editor/components/kit/collection-item-input.vue#L13
Thanks for this great library! I've been looking for something like this for a while.

this is quite embarrassing :-( Anyway, thanks for taking a look at it!
I'll fix that ASAP.
Thanks!

fixed by c76a6e5f5f78dbb50c87cd1cd7d90499697eafdf


@wuxiaobo pip install accelerate==0.27.2

          @wuxiaobo pip install accelerate==0.27.2

Originally posted by @hiyouga in https://github.com/hiyouga/LLaMA-Factory/issues/2552#issuecomment-1960694766
升级accelerate==0.27.2 报错
File "/home/.local/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 241, in init
raise ValueError('prefetch_factor option could only be specified in multiprocessing.'
ValueError: prefetch_factor option could only be specified in multiprocessing.let num_workers > 0 to enable multiprocessing.
2024-02-23 07:01:44 [INFO] Releasing Orion resource ...
2024-02-23 07:01:44 [WARNING] Async service is stopped.

Duplicate of #2548


Segmentation fault with lxml 5.0.0 on Linux

I've been using python3-saml for a while and recently encountered a new major issue on fresh installations which seems to be caused by the lxml toolkit for Python recently releasing version 5.0.0. The program encounters a segmentation fault when processing the ACS endpoint or generating metadata.
This core issue might be with xmlsec/python-xmlsec, but I'm not familiar with the inner workings of xmlsec.template.create to definitively say.
Minimal Reproducible Example
Dockerfile
FROM python:3.9

RUN apt-get update && apt-get install -y libxml2-dev libxmlsec1-dev libxmlsec1-openssl
RUN pip install python3-saml

RUN mkdir certs
RUN openssl req -new -x509 -days 3652 -nodes -out certs/sp.crt -keyout certs/sp.key -subj /

COPY main.py .
CMD ["python3", "main.py"]

Python program in main.py
import faulthandler

from onelogin.saml2.settings import OneLogin_Saml2_Settings

faulthandler.enable()

saml_settings = OneLogin_Saml2_Settings(
    {
        "sp": {
            "entityId": "sp",
            "assertionConsumerService": {"url": "https://sp.com"},
        },
        "idp": {
            "entityId": "idp",
            "singleSignOnService": {"url": "https://idp.com"},
        },
        "security": {
            "signMetadata": True,
        },
    },
    custom_base_path=".",
)
metadata = saml_settings.get_sp_metadata()
print(metadata)

Expected Behavior
The SAML metadata should be generated and printed
Actual Behavior
The metadata signing causes a segmentation fault
Fatal Python error: Segmentation fault

Current thread 0x00007fc16b317b80 (most recent call first):
  File "/usr/local/lib/python3.8/site-packages/onelogin/saml2/utils.py", line 738 in add_sign
  File "/usr/local/lib/python3.8/site-packages/onelogin/saml2/metadata.py", line 216 in sign_metadata
  File "/usr/local/lib/python3.8/site-packages/onelogin/saml2/settings.py", line 740 in get_sp_metadata
  File "main.py", line 23 in <module>

To produce expected behavior
Add "lxml<5" to the pip install command in the Dockerfile and observe the metadata can be properly signed
Additional Information

From more experimentation with the Dockerfile, the issue occurs on other Python versions including 3.8 and 3.12.
I do not face this issue when running the same experiment on macOS 12 with libxmlsec1 v1.2.37
The fatal error message is occasionally different such as "Bus error" or "Floating point exception" (line 763)
I encountered a similar issue when running in AWS Lambda (Runtime.ExitError, floating point exception)

Ahh I wish I spent a little longer searching: a similar issue was reported in #360, and this issue seems to be resolved when installing lxml not from binary as noted in the project README
RUN pip install python3-saml --no-binary lxml

See #388 for ongoing discussion.

See #389 for ongoing discussion.

@taesungh I was struggling with this issue, and thanks to you creating it, I reached the workaround 🙏🏼


Auto generate the Response

User expects some output after any Sql exectute. But medoo doesn't output anything after insert weather Insert is executed or not.

insert() and update() returns the PDOStatement object, so you can use its methods to get more information.
$data = $database->update("account", [
	"age[+]" => 1
], [
	"user_id[>]" => 100
]);

// Returns the number of rows affected by the last SQL statement
echo $data->rowCount();


Vulkan pipeline cache is not prefixed with GPU model, causing it to be invalidated when switching GPUs on a project

Godot version
4.2.dev d2f76e878
System information
Godot v4.2.dev (d2f76e878) - Fedora Linux 38 (KDE Plasma) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 Laptop GPU () - 13th Gen Intel(R) Core(TM) i9-13900H (20 Threads)
Issue description
Vulkan pipeline cache is not prefixed with the GPU model name (or perhaps GPU index), causing it to be invalidated when switching GPUs on a project. This unnecessarily increases loading times when you switch GPUs back and forth, which is something you may have to do frequently when benchmarking.
(Remember that pipeline cache isn't compatible across GPU models, so it has to be made unique for each GPU.)
WARNING: Invalid pipelines cache header.
     at: _load_pipeline_cache (drivers/vulkan/rendering_device_vulkan.cpp:9187)

For reference, here's the system information with the integrated GPU used in Godot (this is --gpu-index 0 on my end, but Godot picks the dedicated GPU first if not told explicitly):

Godot v4.2.dev (d2f76e878) - Fedora Linux 38 (KDE Plasma) - X11 - Vulkan (Forward+) - integrated Intel(R) Graphics (RPL-P) () - 13th Gen Intel(R) Core(TM) i9-13900H (20 Threads)

I'm not sure if https://github.com/godotengine/godot/pull/80296 resolves this. cc @RandomShaper
Steps to reproduce
You need a system with access to 2 different GPUs. A laptop with hybrid graphics makes this easy, but you can also use a desktop with a dedicated GPU and integrated graphics explicitly enabled in the UEFI.

Open the editor on a project, or run a project with --gpu-index 0 for the first time. Notice the "invalid Vulkan pipeline cache" warning message.
Do the same a second time. Notice there is no warning message.
Do the same, but with --gpu-index 1. Notice the warning message again.
Do the same a second time. Notice there is no warning message.
Use --gpu-index 0 again, and notice the warning message appearing. This is the unexpected part.

Minimal reproduction project
Any project can be used to reproduce this issue, but I've used https://github.com/Calinou/godot-reflection to test this.

I'm not sure if #80296 resolves this

It does as of now. 😃

We have the same issue in the GLES3 shader cache as well

Reopening, as the issue is still present with OpenGL (https://github.com/godotengine/godot/pull/80296 only fixes Vulkan).

CC @bitsawer Can you take a look at this in addition to your current PR investigatin Shader caching issues?

Sure, I'll can add the selected device name / ID to the OpenGL cache key too.

Seeing this for the first time in 4.3. dev 4

Im in Mobile mode.
W 0:00:00:0279   pipeline_cache_create: Invalid/corrupt pipelines cache.
<C++ Source>   drivers/vulkan/rendering_device_driver_vulkan.cpp:3832 @ pipeline_cache_create()

@ConstantChange This is a similar but different issue, as the one you have is about the Vulkan pipeline cache, not the OpenGL shader cache. So it needs a dedicated bug report.
That being said, I can reproduce the issue and I've been meaning to report it myself, but while doing so I found how to fix it, so I'll just make a PR directly. So no need for a new issue this time :)


Add support for junit and json reports.

This tool is very useful to be running for CI/CD documentation. We use gitlab and generate documentation using Gitlab Pages. We also run this tool in the CI environment prior to generating the docs, verifying that there are no spelling mistakes.
To better improve how we work with the spellchecker, I wanted some integration with Gitlab utilizing Junit reports. As such, this implements Junit reports.
It also implements JSON reports, but only because they are an easy win. Additional report types can come later if they are wanted.
Here is a screenshot of the junit report's output displaying in Gitlab:

Note: I don't work with Javascript at all for my day job, and so my familiarity with the proper way to implement things, or the best approaches/practices is pretty much non existent. As such, there are probably issues with the implementation of this, but it works.

As far as testing goes, the two types of reports implemented here are generated by JSON.stringify() and generated by another package, so I'm not entirely sure if reports are necessary besides "It generates them". But if you require tests I will see what I can do. It has been manually tested, and is currently in "production" for us now (It's in use in our CI system).

Oh and I'm glad to hear that you're finding this tool useful.

Released in v4.1.0.


Sharpen the image using Linear filter

Hi ,
I need to create sharpen image using linear filter.
I found the sharp will create sharpen image using gaussian filter and i found this code in sharp
Parameters
sigma Number? the sigma of the Gaussian mask, where sigma = 1 + radius / 2.
flat Number the level of sharpening to apply to "flat" areas. (optional, default 1.0)
jagged Number the level of sharpening to apply to "jagged" areas. (optional, default 2.0)
The Problem statement is
Input i am getting for sharpen (image processing) of linear filter and its parameter are
Kernal Size : 5 and Strength:10 .
Kernel Size: Here, you adjust the filter kernel size. The filter kernel size indicates how many neighboring pixels from the source image are included in the calculation of a pixel in the filtered image.
Strength: Here, you set the weighting of the filter kernel. The higher the weighting, the better the contrast of the filtered image. However, an excessive weighting can lead to interfering effects, such as noise.
Using the above input need to create sharpen image using sharp library
can i use this sharp library to create sharpen image
If Yes .How can i map or convert kernal and Strength inputs to above sharp  library to implement sharpen.
Is gaussian filter and Linear filter are same algorithm ?
How can i implement this ?
Thanks
Vinay

Cross-posted at: https://github.com/kleisauke/net-vips/issues/24.

@vinaymuthanna0727 Please don't cross-post the same question to multiple places without also cross-linking as this can waste multiple maintainers' time.
Please read the docs for vips' sharpen operation at http://libvips.github.io/libvips/API/current/libvips-convolution.html#vips-sharpen if you wish to understand more about how it works.
What you describe may be better achieved using a convolution matrix - sharp exposes this feature of libvips via the convolve operation.

Hi ,
Able to get the sharpen image using convolve operation.
Need to increase the sharpness in the convolve operation what are the parameter need to be changed in the operation .
Current Input to the convolve  operation is
var sharpenImages = function (data) {
return new Promise((resolve, reject) => {
var inputPath = "...Images/Series005/series005.tif";
var outputPath = "...Images/Series005/img.tif";
common.getPixels(inputPath).then(function () {
sharp(inputPath)
.convolve({
width: 3,
height: 3,
kernel: [0,-1,0,-1,5,-1,0,-1,0]
})
.toFile(outputPath, function (err, info) {
if (err)
return reject(err);
            return resolve("1");
        });
    }, function (err) {
        return reject(err);
    });

});
};
Thanks
Vinay

General questions about selecting the relevant convolution matrix for a given task are not specific to sharp and are probably more suited to either Stack Overflow or the more specialised https://dsp.stackexchange.com/ site. Perhaps search them for examples of 5x5 or 7x7 matrices - good luck!

Thank you..


SSD has an index issue.

There seems to be something wrong with the ssd training. I am using a jetson nano2gb, and have adjusted the images so that I do not obtain a memory low warning.
File "/home/nano2gb1/Documents/jetson-inference/python/training/detection/ssd/vision/transforms/transforms.py", line 13, in intersect
max_xy = np.minimum(box_a[:, 2:], box_b[2:])
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
"/home/nano2gb1/.local/lib/python3.6/site-packages/torch/optim/lr_scheduler.py:123: UserWarning: Detected call of lr_scheduler.step() before optimizer.step(). In PyTorch 1.1.0 and later, you should call them in the opposite order: optimizer.step() before lr_scheduler.step(). Failure to do this will result in PyTorch skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
"https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate", UserWarning)
warning - image 20210212-103721 has object with unknown class 'fifty'
warning - image 20210212-103359 has object with unknown class 'thirty'
warning - image 20210212-103749 has object with unknown class 'fifty'
Traceback (most recent call last):
File "train_ssd.py", line 343, in
device=DEVICE, debug_steps=args.debug_steps, epoch=epoch)
File "train_ssd.py", line 113, in train
for i, data in enumerate(loader):
File "/home/nano2gb1/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 363, in next
data = self._next_data()
File "/home/nano2gb1/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 989, in _next_data
return self._process_data(data)
File "/home/nano2gb1/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1014, in _process_data
data.reraise()
File "/home/nano2gb1/.local/lib/python3.6/site-packages/torch/_utils.py", line 395, in reraise
raise self.exc_type(msg)
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/nano2gb1/.local/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop
data = fetcher.fetch(index)
File "/home/nano2gb1/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/nano2gb1/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/nano2gb1/.local/lib/python3.6/site-packages/torch/utils/data/dataset.py", line 207, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/home/nano2gb1/Documents/jetson-inference/python/training/detection/ssd/vision/datasets/voc_dataset.py", line 81, in getitem
image, boxes, labels = self.transform(image, boxes, labels)
File "/home/nano2gb1/Documents/jetson-inference/python/training/detection/ssd/vision/ssd/data_preprocessing.py", line 34, in call
return self.augment(img, boxes, labels)
File "/home/nano2gb1/Documents/jetson-inference/python/training/detection/ssd/vision/transforms/transforms.py", line 55, in call
img, boxes, labels = t(img, boxes, labels)
File "/home/nano2gb1/Documents/jetson-inference/python/training/detection/ssd/vision/transforms/transforms.py", line 277, in call
overlap = jaccard_numpy(boxes, rect)
File "/home/nano2gb1/Documents/jetson-inference/python/training/detection/ssd/vision/transforms/transforms.py", line 30, in jaccard_numpy
inter = intersect(box_a, box_b)
File "/home/nano2gb1/Documents/jetson-inference/python/training/detection/ssd/vision/transforms/transforms.py", line 13, in intersect
max_xy = np.minimum(box_a[:, 2:], box_b[2:])
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
"
I have the same , and have tried to retake the data several times with different resolutions, reloaded the "requirements.txt". I am NOT using the container because I want to use this in an embedded Wifi denied region and would like it to re-train networks when commanded to do so locally.
https://github.com/dusty-nv/jetson-inference/blob/master/docs/pytorch-ssd.md
Followed the above instructions without the container. I uploaded the latest SD card files on Tuesday.

Hi @Li-camera-isp-test, sorry for the delay - I wonder if perhaps some bounding box in your XML annotations is malformed or corrupt.
What I recommend is uncommented this line of code:
https://github.com/dusty-nv/pytorch-ssd/blob/e7b5af50a157c50d3bab8f55089ce57c2c812f37/vision/datasets/voc_dataset.py#L76
That will print out the imageID's / bounding boxes of each image that is loaded.  Also set the batch size to 1, so you can more easily find which image is causing the exception.


MCS-68 Fixed many little bugs discovered during integration testing

Picked-up objects now retain their previous rotation
Fixed bugs with stacking objects using the PutObject action
Trying to look up or down too far (past +/- 90 degrees) now does nothing correctly and returns a new CANNOT_ROTATE action status
Use an object's closest point rather than its center point to decide on whether to return an OBSTRUCTED action status
Added the NOT_MOVEABLE action status
Updated the order in which specific action status are returned (NOT_* vs OUT_OF_REACH)
Set held object colliders to be invisible so held objects won't obstruct visibility to other objects.
Updated Changelog in README.

Looks good. @ThomasSchellenbergNextCentury Probably on your radar, but do we want to document the new action statuses in the MCS repo?

Yep, that's done here: https://github.com/NextCenturyCorporation/MCS/pull/225


[BUG] AttributeError while Trying to use operator without making init_beanie call

Describe the bug
Beanie find near operator is giving an AttributeError, if not made the init_beanie call.
AttributeError: geo. Did you mean: 'get'?
I am using the same code as the document: https://beanie-odm.dev/api-documentation/operators/find/#near
To Reproduce
class GeoObject(BaseModel):
    type: str = "Point"
    coordinates: Tuple[float, float]

class Place(Document):
    geo: GeoObject

    class Collection:
        name = "places"
        indexes = [
            [("geo", pymongo.GEOSPHERE)],  # GEO index
        ]

Near(Place.geo, 1.2345, 2.3456, min_distance=500)

Expected behavior
Should response the query
Additional context
I am trying to make inter-servcice communication and generate the query from one service while the model and server are on another.
init_beanie call is made on the server and working like a charm. Now I want to make a generic query processor and it looks like beanie has a good one, but I am unable to use the models from the client service as no init_beanie is called.
Can any of you please suggest any solution of the problem.
Version

Python 3.10.12
pip 22.0.2
pydantic 2.8.2
beanie 1.26.0

This is expected you must call innit beane to establish what mongoversion you are calling and even connection to mongo
this is similar like other orm works and is not a bug

To add onto 07pepa's answer, this is not strictly ORM/ODM related. This is Pydantic related.
You could not even do for example GeoObject.type since Pydantic does not allow this. You can access class members once you instantiate the class, since Pydantic needs to take care of all of the validation and so on.
Beanie does some magic(1) in its init_beanie() call to enable this usage for those operators, so init_beanie() must always be called.
(1) Basically the Beanie init_document_fields() helper method calls setattr(cls, k, ExpressionField(path)) which adds every model field to the class as an ExpressionField that basically transforms every named attribute to its string representation.


"Odd" characters in QRPGLESRC/XML001 cause compile failure

Windows 10 in the USA.  Displaying source from GITHUB.COM using the Brave browser.
These two lines have "odd" characters which cause the compile to fail.  An easy fix to create a correct comment in my local source.

I see the odd characters and I am fixing them
But I want to point out that my compile succeeds.  I wonder if you are transferring the files to IFS as UTF-8.  This is a requirement for Bob.
The RPG rules are that any char in col 5 is ignored and column 6 is ignored if col 7 is an *


Revert "Bump nats.go client version to support direct gets by subject"

Reverts nats-io/natscli#551

@kozlovic so is this the intended behaviour of the KV support in nats.go that it only works in latest server?
before reverting and causing more churn let’s just see if we can figure out if it’s expected behaviour.

As far as I understood it would try to make the bucket with the new setting - this would be ignored by old server. And KV client would not use direct gets if the stream isn’t configured with that option thus old and new streams and servers are supported?

Correct. KVs currently created in the cli don't do direct gets. So they will still work for previous server versions. However, this will no longer work with an older server if a kv stream is upgraded to AllowDirect.
I'm assuming this is indented behavior, but I agree we should check with @kozlovic

If the KV stream is created with AllowDirect, then the direct get should work with latest of server: note that v2.9.0 has not been released yet, but the "direct" get feature and allow direct will technically be available only in 2.9.0+.

We may still have a bug, but if KV code uses direct only if stream has the allow_direct boolean set, then it should not be a problem (if the server is latest from main)

Then as you say against an old server if the KV tried to create it and it didn’t end up getting that setting it should work.
Perhaps the client assumes because it asks for direct support or will get it and then it goes and just use it without again checking the created bucket? Wild guess.
We don’t need to revert just check out older commit and see if we can reproduce to see what’s before we decide to revert

Yup. I'll test a KV with AllowDirect on 2.8.4 and verify is still uses non-direct gets

The client KV code when creating the stream sets the AllowDirect boolean to true and check the returned stream info to have it still set in order to set an internal boolean that dictates if direct-get can be used. Again, for the "bind" to existing KV, the stream info must have AllowDirect set to set the internal boolean.

So I was able to test this with server 2.8.4 and 2.9.0-beta.18 and found that I could create and operate kvs just fine. In 2.8.4 we can't even set allowdirect since the server doesn't know about it, which makes sense.
The only nit we would run into here is if someone was running nightlies post AllowDirect being merged in and was using it. But yeah, no issues between releases on my end.

OK then we need to see what those failed tests was

Agreed

+ go test -v --failfast -p=1 ./...
=== RUN   TestCLIKVGet
Error:     kv_test.go:56: nats utility failed: exit status 1
        nats: error: context deadline exceeded
--- FAIL: TestCLIKVGet (5.08s)

unfortunately tests dont give much useful there

If I reproduce that scenario locally and run that test with trace:
=== RUN   TestCLIKVGet
    kv_test.go:56: nats utility failed: exit status 1
        21:20:27 >>> $JS.API.STREAM.INFO.KV_T

        21:20:27 <<< $JS.API.STREAM.INFO.KV_T: {"type":"io.nats.jetstream.api.v1.stream_info_response","config":{"name":"KV_T","subjects":["$KV.T.\u003e"],"retention":"limits","max_consumers":-1,"max_msgs":-1,"max_bytes":-1,"max_age":0,"max_msgs_per_subject":1,"max_msg_size":-1,"discard":"new","storage":"file","num_replicas":1,"duplicate_window":120000000000,"sealed":false,"deny_delete":true,"deny_purge":false,"allow_rollup_hdrs":true,"allow_direct":true},"created":"2022-08-03T19:20:26.773746Z","state":{"messages":1,"bytes":40,"first_seq":1,"first_ts":"2022-08-03T19:20:26.775833Z","last_seq":1,"last_ts":"2022-08-03T19:20:26.775833Z","num_subjects":1,"consumer_count":0}}
        21:20:27 >>> $JS.API.DIRECT.GET.KV_T.$KV.T.X.Y

        nats: error: context deadline exceeded
        exit status 1

Yup. So it looks like in the test It's calling the API that doesn't exist. Investigating...

OK, so I reckon this is just something that affects nightlies but it will work fine between releases so we dont need to revert.
Essentially:

Old nightly did set the direct supported flag
Old nightly did return the supported flag
KV tried to use direct feature old nightly didnt have

So its nightly weirdness, we dont need to revert.

Yes. I suspect that is what is happening, Previous server dependency was pinned to https://github.com/nats-io/nats-server/commit/da305f2044cb, which I believe had direct get support in it. It will time out on that nightly commit.
I'm going to run the tests against 2.8.4 release and see what happens

Sounds good. Thanks @ripienaar


Change repository name

Current repository name (get5-web-go) does not seem right since I am going to develop get5-web uncompatible system.
maybe take get5-web name or G5, Go5 or got5-web?

Current repository name (get5-web-go) does not seem right since I am going to develop get5-web uncompatible system. maybe take get5-web name or G5, Go5 or got5-web?

Hi!! got5-web sounds good.. :)

Maybe got5-manager? Since got5 itself works on web.
Maybe I can integrate got5 into this repository.


Could not find module Monad.Hooks.WindowSwallowing

Problem Description
When I try to import into my xmonad.hs
import XMonad.Hooks.WindowSwallowing

I get this error

Could not find module Monad.Hooks.WindowSwallowing

Steps to Reproduce
Give detailed step-by-step instructions on how to reproduce the problem.
Configuration File
Simply try to import XMonad.Hooks.WindowSwallowing in xmonad.hs
Checklist

[x] I've read CONTRIBUTING.md

I tested my configuration

[x] With xmonad version <IP_ADDRESS>
[ ] With xmonad-contrib version <IP_ADDRESS>

The template asks for your xmonad and xmonad-contrib versions for a reason: this module only exists in 0.17.0, and it's up to your distribution to package it.

Sorry, I see you filled the versions in (it's not in 0.16 which is still packaged by most distros).
How do you have your xmonad config set up for building? Are you using stack or cabal? Do other xmonad-contrib modules work?

It definitely belongs here. But if other modules are also missing then we need to figure out if you have xmonad-contrib installed correctly.

@geekosaur  Okay, this is what I am importing to my config atm, and don't seem to have any other issues - what else can I provide?
import XMonad

-- import XMonad.Hooks.WindowSwallowing

import qualified XMonad.StackSet as W

import XMonad.Config.Desktop

import XMonad.Util.EZConfig
import XMonad.Util.Run
import XMonad.Util.SpawnOnce
import XMonad.Util.Cursor
import XMonad.Util.NamedScratchpad

import XMonad.Hooks.DynamicLog (dynamicLogWithPP, wrap, xmobarPP, xmobarColor, shorten, PP(..))
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat, doCenterFloat)

import XMonad.Layout.Decoration
import XMonad.Layout.NoBorders
import XMonad.Layout.Renamed
import XMonad.Layout.ResizableTile
import XMonad.Layout.Spacing
import XMonad.Layout.Spiral
import XMonad.Layout.Tabbed
import XMonad.Layout.ThreeColumns
import XMonad.Layout.Gaps
import XMonad.Layout.NoBorders
import XMonad.Layout.LayoutModifier (ModifiedLayout)

import qualified Data.Map as M
import Data.Maybe (fromJust)
import Data.Monoid

import Colors.MyScheme

What does xmonad --version return?  I still get the feeling that you
are not on 0.17.0.

@slotThe
$ xmonad --version

Outputs
xmonad <IP_ADDRESS>

@sebasijan That's really curious; the xmonad version in $PATH is responsible for recompiling, so my guess was that you forgot to upgrade that one.  I don't really know what to tell you other than "have you tried uninstalling and installing it again?" :)
Just to double check; all of the error messages you posted mention Monad.Hooks.WindowSwallowing; I assume that's a typo?

In my experience the two can get out of sync really easily. In particular, we've had more than one case of someone having both /usr/bin/xmonad and ~/.local/bin/xmonad (or ~/.cabal/bin, etc.) and the result being rather confused.

On Tue, Apr 05 2022 03:41, brandon s allbery kf8nh wrote:

In my experience the two can get out of sync really easily. In
particular, we've had more than one case of someone having both
/usr/bin/xmonad and ~/.local/bin/xmonad (or ~/.cabal/bin, etc.)
and the result being rather confused.

Oh, right, the xmonad executable in $PATH when a shell is already
loaded may not be the one that xmonad uses when it was started by e.g. a
display manager.

@geekosaur  I think you are definitely on to something:
bassie@Skoot-Top:~$ /usr/bin/xmonad --version
xmonad 0.15
bassie@Skoot-Top:~$ ~/.local/bin/xmonad --version
xmonad <IP_ADDRESS>

Not quite sure how to verify from here which one is actually being executed on launch/recompile though

I'd just remove the one you don't want, make sure your session can find the other one (this may require adding a like like source ~/.bash_profile to your ~/.xsession), and xmonad --restart.

You're having exactly the problem that was supposed to fix: your DE was using /usr/bin/xmonad and that's why it couldn't find the module.
How is your desktop manager configured? Do you have a file ~/.xsession which runs xmonad, or does it use a file like /usr/share/applications/xmonad.desktop?

@geekosaur I can see /usr/share/applications/Xmonad and ~/.xsession but not sure which one is being used
I will delete each one and see what happens

@sebasijan where do we stand on this?  did you manage to solve it?

@slotThe  Unfortunately not - I'm not sure what steps to take next

@sebasijan Your DM somehow needs to be aware of ~/.local/bin, so you can either source the file where you set your $PATH in .xsession, add a .desktop file like here or even just symlink ~/.local/bin/xmonad to /usr/bin/xmonad

Any updates? This isn't really an issue with xmonad/xmonad-contrib. Maybe open a discussion and let's close this issue

Agreed


upload_file raises internal server error (500)

Describe the bug
upload_file raises 500. 🥲
Reproduction
upload_file(path_or_fileobj="/content/dummy/anscombe.json", path_in_repo="./anscombe.json", repo_id="merve/test-dataset", repo_type='dataset')

Logs
About to commit to the hub: 1 addition(s) and 0 deletion(s).
DEBUG:huggingface_hub.hf_api:About to commit to the hub: 1 addition(s) and 0 deletion(s).
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_errors.py in hf_raise_for_status(response, endpoint_name)
    212     try:
--> 213         response.raise_for_status()
    214     except HTTPError as e:
8 frames
/usr/local/lib/python3.7/dist-packages/requests/models.py
 in raise_for_status(self)
    940         if http_error_msg:
--> 941             raise HTTPError(http_error_msg, response=self)
    942

HTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/api/datasets/merve/test-dataset/preupload/main
The above exception was the direct cause of the following exception:

HfHubHTTPError                            Traceback (most recent call last)
<ipython-input-33-a04df30414b9> in <module>
----> 1 upload_file(path_or_fileobj="/content/dummy/anscombe.json", path_in_repo="./anscombe.json", repo_id="merve/test-dataset", repo_type='dataset')

/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs)
     92                 validate_repo_id(arg_value)
     93
---> 94         return fn(*args, **kwargs)
     95
     96     return _inner_fn

/usr/local/lib/python3.7/dist-packages/huggingface_hub/hf_api.py in upload_file(self, path_or_fileobj, path_in_repo, repo_id, token, repo_type, revision, identical_ok, commit_message, commit_description, create_pr, parent_commit)
   2231             revision=revision,
   2232             create_pr=create_pr,
-> 2233             parent_commit=parent_commit,
   2234         )
   2235

/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs)
     92                 validate_repo_id(arg_value)
     93
---> 94         return fn(*args, **kwargs)
     95
     96     return _inner_fn

/usr/local/lib/python3.7/dist-packages/huggingface_hub/hf_api.py in create_commit(self, repo_id, operations, commit_message, commit_description, token, repo_type, revision, create_pr, num_threads, parent_commit)
   2035                 revision=revision,
   2036                 endpoint=self.endpoint,
-> 2037                 create_pr=create_pr,
   2038             )
   2039         except RepositoryNotFoundError as e:

/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs)
     92                 validate_repo_id(arg_value)
     93
---> 94         return fn(*args, **kwargs)
     95
     96     return _inner_fn

/usr/local/lib/python3.7/dist-packages/huggingface_hub/_commit_api.py in fetch_upload_modes(additions, repo_type, repo_id, token, revision, endpoint, create_pr)
    375         params={"create_pr": "1"} if create_pr else None,
    376     )
--> 377     hf_raise_for_status(resp, endpoint_name="preupload")
    378
    379     preupload_info = validate_preupload_info(resp.json())

/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_errors.py in hf_raise_for_status(response, endpoint_name)
    252         # Convert `HTTPError` into a `HfHubHTTPError` to display request information
    253         # as well (request id and/or server error message)
--> 254         raise HfHubHTTPError(str(HTTPError), response=response) from e
    255
    256

HfHubHTTPError: <class 'requests.exceptions.HTTPError'> (Request ID: UhHsDxMBluql0nUY6KeYL)
Internal Error - We’re working hard to fix that as soon as possible!

System Info
huggingface-hub-0.10.0.dev0
huggingface-hub @ git+https://github.com/huggingface/huggingface_hub@5958f17a012d7420b53f4a0cc6a51b2d13a3866a (main branch)

Was able to reproduce the error:
import json
from time import time

from huggingface_hub import HfFolder, create_repo, upload_file, whoami

token = HfFolder().get_token()

data = {"foo": "bar"}
path = "anscombe.json"
path_in_repo = "./anscombe.json"

repo_type = "dataset"
repo_name = "test-dataset__" + str(round(time()))
user = whoami()["name"]
repo_id = f"{user}/{repo_name}"

with open(path, "w") as f:
    f.write(json.dumps(data))

print(create_repo(repo_id=repo_id, repo_type=repo_type))

print(
    upload_file(
        path_or_fileobj=path,
        path_in_repo=path_in_repo,
        repo_id=repo_id,
        repo_type=repo_type,
        token=token,
    )
)

Closing as it's resolved.
Below should be set that way:
path_in_repo="anscombe.json"

But still it's a bit weird it gives 500 for this.

Can you open an issue in moon-landing, at least for the 500?

Can you open an issue in moon-landing, at least for the 500?

@coyotte508 yep, done. I'm closing this one then.


MVP of portfolio

Essential information, pages, and features are added.

Hi. I made some more commits based on your comments.

Hi, I have corrected the grammar.

You seem to be adding changes for follow on weeks to this pull request. For example add Datastore dependency. So this PR never gets done. It would be better to divide the work into multiple distinct PRs. It was regrettable that you merged into this PR (see above.)
Can you separate the portfolio frontend from the backend Java code portions of the application? They are (at least conceptually) separable. GitHub isn't very smart about stacked PRs but it's at least possible (though I disagree with the rebase vs merge comments in that article.

I think I realized why this is happening. It's probably the same mistake as last week. I was working on the server branch with the comment feature and pulling changes from another branch, but all my server-side commits got recorded under both branches.

Hi Rob. I have rebased the git history on this branch to only include the content commits. I'm not too sure if I have done everything correctly, but I basically rebase this branch by removing the server-side commits and then git push with --force. Could you take another look at this PR? Thanks a lot.

I made the changes.


[Breadth Coverage] Alertsmanagement

az alertsmanagement action-rule create/update/show/delete/list
Alert ation rule doc:
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/alerts-action-rules
Spec:
https://microsoft.sharepoint.com/:w:/r/teams/AzureManagementExperience/Shared Documents/Service Specifications/ALERTSMANAGEMENT/ALERTSMANAGEMENT RP Speclet.docx?d=w43edc9a7d24b4a5ab6931dd3cfdea469&csf=1&e=xFNipR

This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

@qwordy Hi. What's the relationship between alertmanagement and monitor? In the spec, I found that the command should be az monitor action rule create. Can we have an offline meeting?

@qwordy Hi. What's the relationship between alertmanagement and monitor? In the spec, I found that the command should be az monitor action rule create. Can we have an offline meeting?

I'll use monitor as command name


Introduce vk() and sc() key chord specifiers

This commit introduces an alternative to specifying key bindings as a combination of key modifiers and a character. It allows you to specify an explicit virtual key as vk(nnn).
Additionally this commit makes it possible to bind actions to scan codes. As scan code 41 appears to be the button below the Escape key on virtually all keyboards, we'll be able to bind the quake mode hotkey to win+sc(41) and have it work consistently across most if not all keyboard layouts.
PR Checklist

[x] Closes #7539, Closes #10203
[x] I work here
[ ] Tests added/passed

Validation Steps Performed
The following was tested both on US and DE keyboard layouts:

Ctrl+, opens settings ✔
Win+` opens quake mode window ✔
Ctrl+plus/minus increase/decrease font size ✔

Should this be added to profiles.schema.json too?

@KalleOlaviNiemitalo Yeah I can do that. 👍
The space in the description field is rather limited though, so I've planned to add the actual, exhaustive, description to the online docs only.

Rather than the description, I meant this regular expression https://github.com/microsoft/terminal/blob/84e30bcd3a63d5f6207bee5af43e43600dc328e6/doc/cascadia/profiles.schema.json#L7

@KalleOlaviNiemitalo Oh wow that's a rather... comprehensive regex. 😄
I'm not sure if it's worth keeping it that complex, since it would get out of sync every time the VKEY_NAME_PAIRS list is changed in the code. (And it uses backtracking...)
For now I'll just remove the backtracking from the regex and update it with the 5 new key chord types.

👏 This is a huge win for key bindings in general. I wish all video games switched to scan codes instead of being layout dependent.


Support multiple DockerHub accounts/registries

Is your feature request related to a problem? Please describe.
Currently when adding a DockerHub account to Portainer, all users can use these credentials
Describe the solution you'd like
Introduce support for multiple DockerHub accounts as an evolution to DockerHub registry support. This could be made available via an additional tab in the Create registry view that this  PR introduces.
This would open up the ability to use access control on DockerHub, bringing our handling of DockerHub in line with the rest of the resources in Portainer. It would also bring further functionality to the Registry Management extension with the ability to browse multiple DockerHub registries

We have added support for multiple Docker Hub registries, so I'm closing this issue.


Parameter grouping and structural identifiability

It's clear that sometimes parameters need to be grouped as part of the estimation process. For example, it is not possible to estimate particle radius and diffusivity separately from input-output data, only diffusion time $R^2/D$. In practice, however, one would have to set an (arbitrary) radius or diffusivity and estimate the other parameter, but only report diffusion time. Some packages exist for checking the 'in principle' identifiability of parameters, notably STRIKE-GOLDD, but this is Matlab-based. We probably want to avoid this issue and instead be very careful in hand-holding users through the parameter estimation process to make them aware that not all parameters are 'free' parameters.

I can see this being very easy if we only allow users to use a specific set of models, and very difficult if we allow users to BYOM (bring your own model) :)

@all-contributors add @davidhowey to ideas and @martinjrobins to ideas, mentoring


Diffuser is more a Humidifier with a Lightbulb

First off all thank you very much for adding all my devices that were unsupported.
I got 2 Diffuser they more like Humidifier. They evaporate Water with ultrasonic vibration. Any they got a LED light inside.
So my Feature Request is could you make its Homebridge Service from "Air Purifier, Lightbulb" to "Humidifier, Lightbulb".
In addition mine got no "switch", its always on. Is it possible to overwrite this with the Advanced Options?

I have the same thought but, homekit humidifier requires Current Relative Humidity, most diffuser don't have this. change to Humidifier would always display a text like "decreasing humidity to 0%". What do you think about it?
you can try to overwrite dp code 'switch' into anything unused. by the way, is the switch working for you? or just didn't show up in your device's tuya control panel?

I did overwrite my Diffuser to Product Code jsq for Humidifier and mapped DP Code 'switch' to 'switch_spray'. I didn't noticed the humidity sensor. But you're absolutely right that's not the way it should appear on the home app.
With advanced options I run into problems with my "always on" device. On the one hand with DP Code 'switch' to 'switch_spray' it will spray even if I just want to turn on the LED. On the other hand with DP Code 'switch' to 'switch_led' the led will light up even if I just turned on the spray. Unfortunately there is nothing unused.
In addition, without the Productcode mapping the LED won't show as RGB in Home App is there a way to fix that?

You mean your diffuser only have switch_spray and switch_led, don't have switch? If so, I can remove the requirement of switch in the future version.
the reason why spray and led are both opened is because the current code will turn on the main switch if spray or led is opened.
RGB is not supported yet, since many products have mixed feature like lights, I haven't configured out how to better support this, since RGB light's code is complicated, copy it between every products seems not good to maintain...

Mine don't have switch. Here is my Standard Instruction Set:

Code
Type
Values

switch_spray
Boolean
"{true,false}"

mode
Enum
{   "range": [     "large",     "small"   ] }

countdown
Enum
{   "range": [     "cancel",     "1",     "3",     "6"   ] }

switch_led
Boolean
"{true,false}"

work_mode
Enum
{   "range": [     "colour",     "colourful1"   ] }

bright_value
Integer
{   "unit": "",   "min": 0,   "max": 255,   "scale": 0,   "step": 1 }

colour_data
String
{   "maxlen": 255 }

Got it. switch will be change to optional later. for the lights I will support it in the future.

rgb supported in beta.18, please have a try.

Sorry to tell you but now its crashing:
[12/29/2022, 3:53:58 PM] TypeError: Cannot read properties of undefined (reading 'property')     at /homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/accessory/characteristic/Light.ts:116:39     at DiffuserAccessory.updateAllValues (/homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/accessory/BaseAccessory.ts:112:46)

Sorry I forget to add colour_data for color schema, could you try remap colour_data to colour_data_hsv ? I will add this code in the next version.

how can i control the rgb of my diffuser? it only shows the on off lightbulb on home app?

@antonioreyna  probably your rgb schema is not show up, please see readme, change the control mode.

Sorry to reply late, wasn't in town.
Unfortunately there is still a crash with the defusers:
[1/4/2023, 9:37:28 AM] TypeError: Cannot destructure property 'max' of 'colorSchema.property.v' as it is undefined.     at /homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/accessory/characteristic/Light.ts:116:17     at DiffuserAccessory.updateAllValues (/homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/accessory/BaseAccessory.ts:112:46)

@JoshuaSokolowski Can you post your device's status? these can be found in device list json, see faq.

{
    "active_time":<PHONE_NUMBER>,
    "biz_type": 0,
    "category": "xxj",
    "create_time":<PHONE_NUMBER>,
    "icon": "smart/icon/ay15591173285745WPhW/cc3c02174f6b1468ed8c56cc6d233962.jpg",
    "id": "xxxxxxxxxxxxxxx",
    "ip": "x.x.x.x",
    "lat": "xxxxxxx",
    "local_key": "xxxxxxx",
    "lon": "xxxxxxx",
    "model": "本厂通用模块",
    "name": "Zimmer Aroma Diffuser",
    "online": false,
    "owner_id": "xxxxxxx",
    "product_id": "0kezozmqlu2iv0ki",
    "product_name": "Aroma Diffuser",
    "status": [
      {
        "code": "bright_value",
        "value": 0
      },
      {
        "code": "colour_data",
        "value": "00000000000000"
      },
      {
        "code": "countdown",
        "value": "cancel"
      },
      {
        "code": "countdown_left",
        "value": 0
      },
      {
        "code": "mode",
        "value": "large"
      },
      {
        "code": "switch_led",
        "value": false
      },
      {
        "code": "switch_spray",
        "value": false
      },
      {
        "code": "work_mode",
        "value": "colour"
      }
    ],
    "sub": false,
    "time_zone": "+01:00",
    "uid": "xxxxxxx",
    "update_time":<PHONE_NUMBER>,
    "uuid": "xxxxxxx",
    "schema": [
      {
        "code": "bright_value",
        "mode": "rw",
        "type": "Integer",
        "property": {
          "unit": "",
          "min": 0,
          "max": 255,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "colour_data",
        "mode": "rw",
        "type": "String",
        "property": {
          "maxlen": 255
        }
      },
      {
        "code": "countdown",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "cancel",
            "1",
            "3",
            "6"
          ]
        }
      },
      {
        "code": "countdown_left",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "min",
          "min": 0,
          "max": 360,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "mode",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "large",
            "small"
          ]
        }
      },
      {
        "code": "switch_led",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "switch_spray",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "work_mode",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "colour",
            "colourful1"
          ]
        }
      }
    ]
  },
  {
    "active_time":<PHONE_NUMBER>,
    "biz_type": 0,
    "category": "xxj",
    "create_time":<PHONE_NUMBER>,
    "icon": "smart/icon/ay15591173285745WPhW/cc3c02174f6b1468ed8c56cc6d233962.jpg",
    "id": "xxxxxxx",
    "ip": "x.x.x.x",
    "lat": "xxxxxxx",
    "local_key": "xxxxxxx",
    "lon": "xxxxxxx",
    "model": "本厂通用模块",
    "name": "Studierzimmer Aroma Diffuser",
    "online": true,
    "owner_id": "xxxxxxx",
    "product_id": "0kezozmqlu2iv0ki",
    "product_name": "Aroma Diffuser",
    "status": [
      {
        "code": "bright_value",
        "value": 0
      },
      {
        "code": "colour_data",
        "value": "00000000000000"
      },
      {
        "code": "countdown",
        "value": "cancel"
      },
      {
        "code": "countdown_left",
        "value": 0
      },
      {
        "code": "mode",
        "value": "large"
      },
      {
        "code": "switch_led",
        "value": false
      },
      {
        "code": "switch_spray",
        "value": false
      },
      {
        "code": "work_mode",
        "value": "colour"
      }
    ],
    "sub": false,
    "time_zone": "+01:00",
    "uid": "xxxxxxx",
    "update_time":<PHONE_NUMBER>,
    "uuid": "xxxxxxx",
    "schema": [
      {
        "code": "bright_value",
        "mode": "rw",
        "type": "Integer",
        "property": {
          "unit": "",
          "min": 0,
          "max": 255,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "colour_data",
        "mode": "rw",
        "type": "String",
        "property": {
          "maxlen": 255
        }
      },
      {
        "code": "countdown",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "cancel",
            "1",
            "3",
            "6"
          ]
        }
      },
      {
        "code": "countdown_left",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "min",
          "min": 0,
          "max": 360,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "mode",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "large",
            "small"
          ]
        }
      },
      {
        "code": "switch_led",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "switch_spray",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "work_mode",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "colour",
            "colourful1"
          ]
        }
      }
    ]
  }```

I've just noticed your colour_data is String type, the normal one should be Json. It's not supported...
      {
        "code": "colour_data",
        "mode": "rw",
        "type": "String",
        "property": {
          "maxlen": 255
        }
      }

where do i see that status log?

i have this on mine

Hi again thank you very much for preventing my homebridge from crashing. Would it be possible to add support for color_data as string?
The schema is two bytes each of R, G, B, followed by followed by four bytes of hue (in the range 0 to 360) followed by two bytes of value, followed by two bytes which represent the brightness.
All values except for hue are 0-255, and all values must be set.
To recap: RR GG BB HHHH VV BrBr

@antonioreyna https://github.com/0x5e/homebridge-tuya-platform#troubleshooting
@JoshuaSokolowski I don't understand why the color_data string have both rgb and hsv? the "value" and "brightness" are they the same thing (hsv/hsb)?

Found this: https://github.com/esphome/esphome/pull/4383
Sorry, life is always busy... Will update when I'm free.


DOMException if selector contains unescaped quotes

If the value passed to Input contains unescaped quotes ('' or "") in them, then it results in a DOMException. I was able to trace it back to this line.
Reproduced the error in the browser console:
const ITEM_SELECTOR = `[cmdk-item=""]`;
const VALUE_ATTR = `data-value`;

const value = `canceling statement due to "statement timeout"-item-index-0`;

document.querySelector(`${ITEM_SELECTOR}[${VALUE_ATTR}="${value}"]`);

The error:
Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '[cmdk-item=""][data-value="canceling statement due to "statement timeout"-item-index-0"]' is not a valid selector.

I actually ran into this error while browsing Supabase docs, where the above described issue can be replicated by searching for the following: “canceling statement due to statement timeout” (without the quotes) and then hovering over the first item returned in the results.

Should cmdk handle this or should the end-user be escaping the quotes themselves? IMO, given that the value is an internal state variable (not exposed to the end-user), cmdk should validate the selector somehow. But I might be missing something. Either way, thanks for taking a look at this, and LMK if you need further info.
PS: Thanks for such a great library! 💖

@pacocoursey What's the timeline of getting this fix released? This is causing us issues in production. I noticed that this was fixed in 8aecf2d but hasn't been released yet


Dynamic Loading Module

[Hieu LE]: let's define all path to cal driver and resource via config or entry point.
and DO NOT HARD CODED ANYMORE.

@hieulq Done with the last 3 commits in callib branch.

commit 1
commit 2
commit 3

@ntk148v pong, reviewing!

@ntk148v good job, seems that we need to improve the test case and examples of CAL. I'm gonna close this issue and move to the next issue with examples.
Thanks for your efforts, great works!


[SPARK-47697][INFRA] Add Scala style check for invalid MDC usage

What changes were proposed in this pull request?

Add Scala style check for invalid MDC usage to avoid invalid MDC usage s"Task ${MDC(TASK_ID, taskId)} failed", which should be log"Task ${MDC(TASK_ID, taskId)} failed".
Why are the changes needed?

This makes development and PR review of the structured logging migration easier.
Does this PR introduce any user-facing change?

NO
How was this patch tested?

Manual test, verified it will throw errors on invalid MDC usage.
Was this patch authored or co-authored using generative AI tooling?

No

cc @panbingkun

Merged to master for Apache Spark 4.0.0.

@panbingkun if the corner case happens, we can always disable the new rule temporarily in the call site.


Included Traction Guest into Certified Connectors.

This PR adds a folder "TractionGuest" to the Certified Connectors folder. It includes the apiDefinitions and apiProperties files as well as a readme.

 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: jzhang729 sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.