text:
loading more reviews

minor enhancement to load more reviews

Hi! Looking good! Can we chat about the state variables here? I'm not sure I understand the flow

Adding comments from our discussion here also:
onClick function should be two lines - first line should be setNumRevsToGet( (numRevsToGet) => numRevsToGet + 2)
second line should be getReviews(numRevsToGet)

Looking great!

authors: AdamPJohnson saraschaeffer

repo: Prangly/ProjectCatwalk


text:
Documentation around connecting to a cluster with a tls:// address

At Coiled, we have several users excited to use Prefect 2.0 with our clusters. Our small OSS team is kicking the tires on Prefect 2.0 as well.
Between our experiences and what we're hearing from our users, there's a small gap in the documentation in how to connect to any cluster (Coiled or otherwise) whose scheduler is at a TLS address.
The current README's example uses a TCP address. But a TLS address appears to be more complicated.
import time

from prefect import task, flow
from prefect_dask.task_runners import DaskTaskRunner
from coiled import Cluster

cluster = Cluster(name="quick-test", package_sync=True)
runner = DaskTaskRunner(address=cluster.scheduler_address)
print(cluster.scheduler_address)

@task(name="shouter")
def shout(number):
    time.sleep(0.5)
    print(f"#{number}")

@flow(task_runner=runner)
def simple_count_to(highest_number):
    for number in range(highest_number):
        shout.submit(number)

if __name__ == "__main__":
    simple_count_to(10)

And that prints/raises:

TLS Address and trackback
tls://34.226.191.236:8786
09:41:49.052 | INFO    | prefect.engine - Created flow run 'naughty-antelope' for flow 'simple-count-to'
09:41:49.052 | INFO    | prefect.task_runner.dask - Connecting to an existing Dask cluster at tls://34.226.191.236:8786
09:41:49.053 | ERROR   | Flow run 'naughty-antelope' - Crash detected! Execution was interrupted by an unexpected exception.
Traceback (most recent call last):
  File "/Users/paul/work/office-hours/support-metrostar/test_scratch.py", line 27, in <module>
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/prefect/flows.py", line 390, in __call__
    return enter_flow_run_engine_from_flow_call(
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/prefect/engine.py", line 152, in enter_flow_run_engine_from_flow_call
    return anyio.run(begin_run)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/anyio/_core/_eventloop.py", line 70, in run
    return asynclib.run(func, *args, **backend_options)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 292, in run
    return native_run(wrapper(), debug=debug)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
    return await func(*args)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/prefect/client.py", line 104, in with_injected_client
    return await fn(*args, **kwargs)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/prefect/engine.py", line 221, in create_then_begin_flow_run
    state = await begin_flow_run(
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/prefect/engine.py", line 328, in begin_flow_run
    flow_run_context.task_runner = await stack.enter_async_context(
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/contextlib.py", line 575, in enter_async_context
    result = await _cm_type.__aenter__(cm)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/contextlib.py", line 181, in __aenter__
    return await self.gen.__anext__()
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/prefect/task_runners.py", line 168, in start
    await self._start(exit_stack)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/prefect_dask/task_runners.py", line 267, in _start
    self._client = await exit_stack.enter_async_context(
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/contextlib.py", line 575, in enter_async_context
    result = await _cm_type.__aenter__(cm)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/distributed/client.py", line 1347, in __aenter__
    await self
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/distributed/client.py", line 1178, in _start
    await self._ensure_connected(timeout=timeout)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/distributed/client.py", line 1241, in _ensure_connected
    comm = await connect(
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/distributed/comm/core.py", line 289, in connect
    comm = await asyncio.wait_for(
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/asyncio/tasks.py", line 479, in wait_for
    return fut.result()
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/distributed/comm/tcp.py", line 436, in connect
    kwargs = self._get_connect_args(**connection_args)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/distributed/comm/tcp.py", line 483, in _get_connect_args
    ctx = _expect_tls_context(connection_args)
  File "/Users/paul/mambaforge/envs/hydro/lib/python3.9/site-packages/distributed/comm/tcp.py", line 389, in _expect_tls_context
    raise TypeError(
TypeError: TLS expects a `ssl_context` argument of type ssl.SSLContext (perhaps check your TLS configuration?) Instead got None

The crux of the matter is that distributed needs more information about the scheduler to the DaskTaskRunner, specifically an SSLContext for the cluster. We're working on cooking up an example right now for our own docs, but I think a minimal example for the README would help Coiled and non-Coiled users alike.
This issue is to gauge interest in contributing such an example to prefect_dask docs. Here are the relevant distributed docs: https://distributed.dask.org/en/stable/tls.html

I think this should work when cluster is existing distributed.deploy.Cluster with cluster.security set:
task_runner = DaskTaskRunner(
  address=cluster.scheduler_address,
  client_kwargs={'security': cluster.security}
)

Note thought that security isn't a required attribute on distributed.deploy.Cluster, but I believe this is a standard attribute for clusters that do have TLS keypair set.
I think a really nice API for DaskTaskRunner would allow you to pass existing cluster, and have it use security if set. This is what happens when you do client = distributed.Client(cluster=cluster), as you can see at https://github.com/dask/distributed/blob/1314ebb8671493290d284bf24b1ed1da1749f90c/distributed/client.py#L846-L847

I put together a quick PR, feel free to use/edit as you see fit.

source: gharchive/issue

authors: ntabris phobson

repo: PrefectHQ/prefect-dask

license_type: permissive

license_source: github-api


text:
Orion agent

Working chart for server with updated PG

Closing as moved to own repo

source: gharchive/pull-request

repo: PrefectHQ/prefect-recipes


text:
Revert "Remove crowdin upside down language"

No more needed withe the following PR: https://github.com/PrestaShop/PrestaShop/pull/7705

Thank you @maximebiloe

authors: aleeks maximebiloe


text:
Release version 2.3.4

Questions
Answers

Description?
Release new version of the module. We forgot to update the version in the last one.

Type?

BC breaks?

Deprecations?

Fixed ticket?

How to test?

Merging as it's only a version bump.


text:
As a user, I want to filter library members to those with a lending card available on the site so that I can focus on members with cards and borrowing activity.

Testing Notes
The functional for filtering by whether a member has a card is in place, and it should:

[x] toggle when clicked (with hover effects, etc. to indicate it has been clicked)
[x] Upon hitting enter to submit the form, should filter to the only card holders for current query
[x] If search is filtered by name query (i.e. Ab*), should reflect a count of how many card holders there are in the current search.

Increasing to 2pt since, as @bwhicks noted yesterday, this requires faceting for displaying a count.

This looks great!

it does toggle when clicked (with hover effects, etc. to indicate it has been clicked) - when I click, it looks like I have and has the check mark; when I click again to release it the check mark becomes the question mark with info effect
when I enter, the member count is dropped from 6000+ to 637, the members with cards
When I search with name query (i.e. Ab*), it shows how many card holders are in that search

authors: clmahoney rlskoeser thatbudakguy

repo: Princeton-CDH/mep-django


text:
Bedrock Protocol Not Working On Computer! What Could be the issue?

I am trying to connect my Minecraft server to my discord through ThirdEye so I have logs but turns out my computer is giving me issues and I do not understand what is happening. Pete the owner of ThirdEye Instructed me to contact you or I re-install windows. What could be the issue? I do not know why the bedrock protocol is not working for me
here is the command prompt that is running into issues. I have Visual Studios, Cmake, and I followed the proper instructions over on this page https://github.com/pete9xi/thirdeye
Hopefully, you can help me with this issue the command prompt text is located here:
message (1).txt
Thank you,
Daystormer

No update provided, reopen if you have more information

authors: Daystormer extremeheat

repo: PrismarineJS/bedrock-protocol

license: MIT


text:
Fix Calendar Date Validation to Restrict Past Dates

Related Issue
None
Fixes:  #857
Description
Updates the calendar date validation to prevent users from selecting dates prior to the current date, ensuring valid and up-to-date submissions.
Type of PR

[X] Bug fix

Screenshots
Before

After

Checklist:

[x] I have made this change from my own.
[x] My code follows the style guidelines of this project.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generate no new warnings.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers and screenshots after making the changes.

@akash70629 Your pull request has been successfully merged! Don't stop here—continue contributing by addressing more issues and aiming to become a top contributor. Exclusive swag awaits for those who go the extra mile!
Great contribution ! 🎉

@akash70629 Due to a conflicting issue, some code was removed from the repository. We are investigating the matter. Meanwhile kindly create the PR again for merging.Please Do Sync fork before then add your part in code  BuddyTrail. Thank you for your understanding!

@akash70629 Due to a conflicting issue, some code was removed from the repository. We are investigating the matter. Meanwhile kindly create the PR again for merging.Please Do Sync fork before then add your part in code BuddyTrail. Thank you for your understanding!

@PriyaGhosal It's strange 😕😕 !!! Anyway Here is the same PR #912 merge it .

repo: PriyaGhosal/BuddyTrail


text:
[Feature Request] QwikCity Support

I have made some changes to get this package working in QwikCity.
Working

Commands

init
build
build --watch

What works

Build routes for pages in the src/routes directory. This includes adding params and searchParams as well.

Not Yet Working

API Routes

ie GET/PUT/POST/DELETE.

I had to update the build command to go through and determine which build command to use, as the code was only setup to use the next build command as it was.
You can take a look at my changes here.
https://github.com/RumNCodeDev/declarative-routing
I placed them all in a single commit located here
I will probably also have to update the dependency checks to handle the Qwik V2 as that will have a different import as they are moving out of the @builder.io repo, and into its own repo for v2.

I think i might need to make a slight change to get routes that used named layouts supported as well. Just need to update it from only index.tsx to also search for index@something.tsx as well

If the idea is that you'd just export from page.tsx or route.tsx directly, NextJS doesn't allow exporting anything it doesn't know about from those files. And also it would break code splitting since routes would hard link to all the routes and pages.

This fork that I stubbed out would not be for use with NextJS, this would be to add a 3rd option, and to have Delcarative Routing feature for a project built with Qwik/QwikCity. I do not believe it should affect any of the existing code for NextJS/React-Router-Dom as its just adding a 3rd option, unless I am mistaken.

I've got no problem with that. Let's add support for Qwik City.

Awesome, glad to hear it. I have to update the readme a bit more, add support for named layouts, and then should be good aside from maybe trying to figure out the api routes.

Darn... that shared refactor that happened just recently will require me to make a lot of changes.. Oh well.. just gotta knock them out i suppose

Sorry. We just moved a few things into a shared folder. And the NextJS version went through some decent changes.

No worries, obviously everybody wants whats best for the project overall. Its my fault for being slow to get this knocked out

authors: RumNCodeDev jherr

repo: ProNextJS/declarative-routing


text:
Calcpad hangs

When I selected one of them:

and then press calculation the calcpad stop and close.
Hull Girder Design - DNV V0.zip
Thanks,

Hi!
Thank you for reporting this. Nice worksheet! I will check why crashing and not just handling this exception and showing a message.
However, the reason is that you have two selection boxes with name "Selection2" on lines 79 and 196. Also, enclose selections with the preceding text in paragraphs, by adding <p> and </p> before and after. I fixed these things for you and attached the worksheet bellow. It works now:
Hull Girder Design - DNV V0 - ned.zip
Also, some things can be made in easier ways:
f_r = switch(Option ≡ 0; 1; Option ≡ 1; 0.9; Option ≡ 2; 0.8; Option ≡ 3; 0.7; Option ≡ 4; 0.6; Option ≡ 5; 0.5)
This works, but you can use the 'take' function instead:
f_r = take(Option + 1; 1; 0.9; 0.8; 0.7; 0.6; 0.5)
'+ 1' is needed because the indexes of the 'take' functions start from 1.
But if you start 'Option' from 1, like on line 205:
k = switch(Option ≡ 1; 1; Option ≡ 2; 0.78; Option ≡ 3; 0.72; Option ≡ 4; 0.66; Option ≡ 5; 0.62)
it will get even simpler:
k = take(Option; 1; 0.78; 0.72; 0.66; 0.62)
Also, I noticed you have many switches, where you are interpolating inside. I could not go deeper in this, but if these are some empirical nomograms in the code, you can consider using the ready made line interpolation function in Calcpad:
y = line(x; y1; y2; y3...)
You can check this example for interpolating wind load above ground:
https://github.com/Proektsoftbg/Calcpad/blob/main/Examples/Demos/Interpolation.cpd
I hope the above recommendations will be useful for you. I wish you success! :)

Hi! I also managed to find where the crash happened and fixed it. You can reinstall the program from this link:
https://github.com/Proektsoftbg/Calcpad/releases/download/v6.2.0/calcpad-setup-en-x64.exe
If you already have installed version 6.2.0. Install it first to make sure that everything will be replaced properly.
I am sorry for the inconvenience, my mistake.
Also, you can already use the new #split and #wrap options to brake long equations instead of the macro. This will make the program simpler and cleaner.

Hi! Thanks for your support and all the recommendations!!
Best regards!

authors: BasilioPV Proektsoftbg

repo: Proektsoftbg/Calcpad


text:
[AUFGABEN] Aufgabentypen "Ersetzen" und "Kombinieren" zusammenlegen?

In https://github.com/Programmiermethoden/Dungeon/issues/382#issuecomment-1482820202 ist die DSL-Eingabe für die Definition einer Ersetzungsaufgabe angedeutet. Da die Definition der Mengen per DSL (aktuell) keine Beschränkungen bzgl. Elementanzahl vorgeben , könnte mit dieser Repräsentation sowohl Ersetzung als auch Kombination abgebildet werden (vgl. hierzu auch PR #444). Kombinieren wäre damit eher ein Sonderfall der Ersetzung.
Laut Protokoll #22 stand sowieso im Raum, ob wir die Aufgabentypen nicht zusammenlegen.
Meinungen dazu?

@cagix @bcg7 @AMatutat ping. Hier eine Entscheidung zu treffen ist wichtig, um jetzt #444 auf einen finalen Stand zu bringen.

@malt-r Wenn die Konzepte und Strukturen sich sinnvoll vereinigen lassen und quasi durch Konfiguration oder "Injection" von Verhalten (Funktionsreferenzen o.ä.) steuern lassen, sehe ich einen großen Vorteil auf der Implementierungsebene.
Ob man das dem User (also den Lehrenden, die die DSL bedienen) dann auch so verkauft, steht auf einem anderen Blatt. Es könnte sinnvoll sein, dass auf User-Ebene zu differenzieren (über Sprachkonstrukte der DSL) und dann im Interpreter wieder zu vereinigen und dann entsprechend zu bearbeiten.

Aus dem Meeting mit @AMatutat, @AKirsch1 und @malt-r vom 03.05.23:
Die beiden Aufgabentypen werden zu "Ersetzen" zusammengefasst, da die Abgrenzung der beiden Typen uns unter Berücksichtigung der geplanten Eingabe (in https://github.com/Programmiermethoden/Dungeon/issues/382#issuecomment-1482820202 angedeutet) aktuell nicht mehr sinnvoll erscheint. Wir würden eher den Weg gehen und die unterschiedlichen Anwendungsfälle (ersetze 1 Element durch n Elemente; ersetze n Elemente durch 1 Element; ersetze n durch m Elemente) in der Doku für den Aufgabentyp darzustellen. Falls uns doch nachher auffällt, dass die Trennung sinnvoll ist, schätzen wir den Aufwand, das nachher wieder zu trennen als relativ gering ein.

Wie im Meeting vom 03.05.23 besprochen: "Kombinieren" und "Ersetzen" wird zu "Ersetzen" zusammengelegt und die unterschiedlichen Anwendungsfälle (von denen Kombinieren dann auch einer wird) werden in der Doku zum Aufgabentyp dargestellt.

authors: cagix malt-r

repo: Programmiermethoden/Dungeon


text:
Abstände Icons Hauptmenü anpassen

User Story
Im Hauptmenü sind die Abstände für Moodle Login und Hilfe-Button nicht im gleichen Abstand wie in den anderen Menüs positioniert.
Akzeptanzkriterien

[ ] Akzeptanzkriterium 1
[ ] Akzeptanzkriterium 2

Definition of Ready

[ ] User Story ist klein genug für Sprint
[ ] User Story ist für jeden Beteiligten klar verständlich
[ ] User Story Aufwand ist geschätzt
[ ] User Story hat Akzeptanzkriterien
[ ] User Story hat einen Mehrwert für das Produkt oder die Entwicklung
[ ] User Story Ursprung ist bekannt (Stakeholder)
[ ] User Story ist Release zugewiesen

Definition of Done

[ ] Alle Akzeptanzkriterien sind erfüllt
[ ] Die Ergebnisse der Recherche wurden von mindestens einer anderen Person gereviewt (oder in Paired Researching gearbeitet)
[ ] Dokumentation wurde, falls nötig, angelegt (Wiki)
[ ] Dokumentation des Vorgehens wurde angelegt (Zenhub Kommentar)
[ ] Research wurde, falls möglich, in UML Klassendiagrammen bzw. Komponentendiagrammen getestet
[ ] Die Realisierung der User Story wurde erfolgreich durch den Product Owner abgenommen

Hey team! Please add your planning poker estimate with Zenhub @DerKatsche @Grunick @Lizardguard

authors: AdLer-Lukas splican


text:
Themenbereich suchen

Als Lehrender möchte ich einen Themenbereich suchen können.
Akzeptanzkriterien

[ ] Akzeptanzkriterium 1
[ ] Akzeptanzkriterium 2

Definition of Ready

[ ] User Story ist klein genug für Sprint
[ ] User Story ist für jeden Beteiligten klar verständlich
[ ] User Story Aufwand ist geschätzt
[ ] User Story hat Akzeptanzkriterien
[ ] User Story hat einen Mehrwert für das Produkt oder die Entwicklung
[ ] User Story Ursprung ist bekannt (Stakeholder)
[ ] User Story ist Release zugewiesen

Definition of Done

[ ] Alle Akzeptanzkriterien sind erfüllt
[ ] Die Realisierung der User Story wurde erfolgreich durch den Product Owner abgenommen
[ ] Die Implementierung ist in GitHub
[ ] Eine Code Review wurde durchgeführt (oder in Pairing Programm erstellt)
[ ] Die Codekonventionen sind eingehalten
[ ] Unittestabdeckung muss größer 90% sein
[ ] Alle Tests müssen bestanden sein
[ ] Benutzerdokumentation angelegt (Handbuch)
[ ] Technische Dokumentation angelegt (ZenHub)
[ ] UML Klassendiagramme und Komponentendiagramme erstellt und aktuell
[ ] Die Dokumentation in der Realisierung wurde erstellt (Quellcode)
[ ] Changelog angelegt
[ ] Es gibt keine bekannten Bugs

#old - will not be implemented

repo: ProjektAdLer/Autorentool


text:
Code error.

Describe the bug
It just doesn't work
To Reproduce
Steps to reproduce the behavior:

Try to login.
The page stays loading infinitely.

Expected behavior
It should work...
Screenshots

Desktop (please complete the following information):

OS: [Manjaro]
Browser [Chromium]
Version [Latest]
Plugins [Some]
Resolution [1920x1080]
URL [mail.protonmail.com]

I leave my extensions here.

It seems that the problem has been solved, I don't know if you have updated or something, but I have not touched my accessories.
So I close this.

repo: ProtonMail/WebClient

license: mit

license_source: bigquery


text:
🛑 Plesk - Falkenstein (DE) is down

In fce8340, Plesk - Falkenstein (DE) (fsn1.proxeuse.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Plesk - Falkenstein (DE) is back up in 0accf86 after 3 minutes.

repo: Proxeuse/status


text:
React router does now allow refresh or arbitrary address access

React router seems to be working when you work within the app and it generates new URLs for different pages.
But, it doesn't seem to allow refreshes (page not found), or going to one of the generated URLs. This may be a problem with how the backend (nginx or flask) is routing those addresses to the frontend.
Either way, seems important, and would allow clickable password reset links, and perhaps allow the frontend to also handle password confirmation links.

Fixed in #155

repo: PsychoinformaticsLab/neuroscout


text:
support for third-party (custom) daemons

Product
Please check the corresponding boxes below for which products this is about.

[x] Panel
[ ] Daemon
[ ] Dockerfile(s) [Please list if so: __ ]

Type

[ ] Bug or Issue
[ ] Feature Request
[x] Enhancement
[ ] Other

I noticed on your roadmap you had AWS support indicated. I'd like to see a few changes added to the panel that allows use of third-party daemons.

pufferd, written in go (https://github.com/PufferPanel/pufferd)

i wish Pterodactyl had a go based daemon as that seems a bit faster but if the panel could interact with the pufferpanel one that would be great. I am aware pufferpanel is a fork of pterodactyl.

AWS opsworks support for execution of custom resources to perform daemon-like installs

This is already technically possible so long as the daemon you are using follows the same API style as the core daemon. Not sure I really get what you're asking for with the AWS stuff since I don't personally make use of a lot of AWS features. That roadmap goal is most likely going to be back-burnered until a future release mostly because of the sheer amount of things in 0.5.0 and 0.6.0.

Is there anything specific that would need to happen panel-side for this to be implemented in your mind? I'm going to close this issue for now, but if there is something specific in the panel that needs to be changed, let me know.

@DaneEveritt After reviewing some changes I wanted pushed for this feature request I was wondering if you could consider adding a modules or library section into Panel@6 (similar to modules/library from Boxbilling) that would add on to the app/Http/Controllers/API on any event call. That means end users could add in custom modules to perform events on actions such as node or server creation. Modules could then be enabled or disabled by admins in the Panel. example: Panel/modules/Event/ServerUpdate.php could have an OnServerCreate call API (Panel/app/Http/Controllers/API/ServerController.php) that would perform apt-get update && apt-get upgrade at the time of server creation request inside the panel.
Modules could also go a bit further and allow third party reports, graphs or pages to be added into a tab of the Panel including different views - just like Boxbilling. Example: Panel/modules/Panel/Overviewer.php could add a tab inside the panel which server owners could click on to display Minecraft-Overviewer of their server.
At some point it would be good to also see Daemon become a module under that but from the looks it appears its a bit too involved.

This would be a kind of plugin system I guess? I really like the idea. if there is no seperate issue for that, could you open one? This is not really related to this one here. Also with 0.6.0 there are some severe changes to services coming, I would love to see the possibility to add custom pages into the panel for specific services to make some tasks easier (this will get complicated I guess though)

authors: DaneEveritt feardevilz schrej

repo: Pterodactyl/Panel


text:
Invalid Regex on Ark

Ark settings/control panel has an invalid Regex, /^(\w\.*)$/, both on the server and admin password field.
That regex limits the input to a single character only. (a will work aa will fail).

My RegEx is not that great but i'm pretty sure \.* allows 0..n of any character.

How about /^[\w\.]*$/ ?

That works but don't forget to add the capture group.
/^([\w\.]*)$/

Fixed in https://github.com/Pterodactyl/Panel/commit/97cad1d55e234c9cf8c27184b47678d7ba244591#diff-2cdf53d8555853b659047fd9346dda77R237


text:
Request for Permission to Translate Plugin "Avaice" into Chinese

Dear Punish,
I hope this message finds you well. I am reaching out to express my admiration for your exceptional plugin, "Avaice." It has proven to be an invaluable tool, and I deeply appreciate the effort you've put into its development.
I am writing to request your permission to undertake the task of translating "Avaice" into Chinese through the Ecommons platform. As a Chinese user, I believe that providing a localized version will greatly benefit the Chinese-speaking community and increase the plugin's accessibility to a broader audience.
I want to assure you that I will handle the translation process with utmost care and accuracy, ensuring that the essence and functionality of the original plugin are preserved. If you grant me permission, I will promptly begin working on the Chinese translation to the best of my abilities.
Please let me know if you have any specific guidelines or preferences regarding the translation. Your valuable input will be invaluable in ensuring a high-quality localized version.
Thank you for considering my request. I genuinely appreciate your contributions to the community, and I am eager to contribute back by making "Avaice" available to a wider audience.
Looking forward to your response.
Best regards,
Yuwuhuo
[Please accept my apologies if there are any unintended offenses or linguistic inaccuracies in this letter, as the content was generated using Google Translate.]

Hello! You can translate it of course, but please keep in mind that Ecommons's translation engine is in early development still and may be changed in future

authors: Limiana yuwuhuo

repo: PunishXIV/Avarice


text:
server: status off Settings

I'm trying to setup this on my test vps , where Ive only terminal no GUI . I've tried to access it a bit change in loki.py and change ===> app.run() into ===> app.run(host='0.0.0.0.0') . >But the issue is when I logged into panel server status is OFF.  when I switch to settings and server tab . I put my WAN IP there and server does not start. IP box turned RED . Any idea what's wrong.
Regards

I set this up on vps by configuring PRIVATE_IP variable to real ip and modifying app.run() to
app.run(host='REALIP')
I think this might help you.

@gra1w keep thing simple I did the same ;) .vi lib/const.py  and set both PRIVATE_IP and PUBLIC_IP to your REAL_WAN_IP / VPS_IP. Below is the python3.7 for best running loki.
#Installing 3.7 python
`sudo apt install -y
build-essential
checkinstall
sudo apt install -y
libreadline-gplv2-dev
libncursesw5-dev
libssl-dev
libsqlite3-dev
tk-dev
libgdbm-dev
libc6-dev
libbz2-dev
`
cd wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz cd Python-3.7.2 ./configure --enable-optimizations --enable-loadable-sqlite-extensions make -j 1 make altinstall
Regards


text:
Fix BigInt TypeError in getPermissionsRaw

Replace 0 with 0n to avoid a TypeError about mixing BigInt with other types in the getPermissionsRaw() function

This error appear on
Canary 92762 (a95e09a) Host 1.0.37 Windows 10 64-Bit (10.0.19042)
So far the fix does work somehow


text:
How to pass string array parameters from Rust to PyO3

🌍 Environment

Your operating system and version: Windows 10 updated
Your python version: 3.9
How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?:  via python-3.9.1-amd64.exe
Your Rust version (rustc --version): 1.52.0 updated
Your PyO3 version: 0.13.2
Have you tried using latest PyO3 master (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?: No

💥 Reproducing
Hi there,
I use Rust to call python pandas function via PyO3, but I did not sure how to pass string array parameters like ’names‘, would you like to give me a hand? Thank you very much.
pub async fn calculate_base_ohlc()-> PyResult<()> {
    debug!("test pandas");

    let gil = Python::acquire_gil();
    let py = gil.python();
    let pd = PyModule::import(py, "pandas")?;

    let arg1 = "./data/20201001.csv";
    let arg2 = "names=['s','u','c','a','v']";
    let arg3 = "index_col=1";
    let arg4 = "parse_dates=True";
    let args = PyTuple::new(py, &[arg1, arg2, arg3, arg4]);
    let df = pd.call1("read_csv", args);

    debug!("df = {:?}", df);

    Ok(())
}

There are some compile errors:
021-03-03 15:37:05.810243 DEBUG [ohlc::base_ohlc::pandas:15] test pandas
sys:1: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex); you can avoid this warning by specifying engine='python'.
2021-03-03 15:37:06.136407 DEBUG [ohlc::base_ohlc::pandas:33] df = Err(PyErr { type: <class 'ValueError'>, value: ValueError('header must be integer or list of integers'), traceback: Some(<traceback object at 0x00000238378729C0>) })

@CHCP looks like some of the arguments you're trying to pass are keyword arguments.
These need to go in a PyDict, and then you can use PyModule::call instead of call1.

Hi, and welcome to PyO3!
The first problem here is that passing keyword arguments needs to be done differently: the tuple in call1 is only for positional arguments. In your example you're doing the equivalent of pandas.read_csv("./data/20201001.csv", "names=['s','u','c','a','v']", "index_col=1", "parse_dates=True").
For passing keyword arguments, you need to use the "full" method, i.e. call, with a dictionary containing the keyword args. The second problem is the actual passing of the list of strings for names: for that, use an array or vector on the Rust side.
In short, you need something like this:
    let arg1 = "./data/20201001.csv";
    let args = PyTuple::new(py, &[arg1]);
    let mut kwargs = PyDict::new();
    kwargs.set_item("names", ["s", "u", "c", "a", "v"]);
    kwargs.set_item("index_col", 1);
    kwargs.set_item("parse_dates", true);
    let df = pd.call("read_csv", args, Some(kwargs));

Btw, the output you showed are not "compile errors" - compilation was successful and your code ran, producing the debug outputs you showed.

@CHCP looks like some of the arguments you're trying to pass are keyword arguments.
These need to go in a PyDict, and then you can use PyModule::call instead of call1.

Thanks @davidhewitt

Hi, and welcome to PyO3!
The first problem here is that passing keyword arguments needs to be done differently: the tuple in call1 is only for positional arguments. In your example you're doing the equivalent of pandas.read_csv("./data/20201001.csv", "names=['s','u','c','a','v']", "index_col=1", "parse_dates=True").
For passing keyword arguments, you need to use the "full" method, i.e. call, with a dictionary containing the keyword args. The second problem is the actual passing of the list of strings for names: for that, use an array or vector on the Rust side.
In short, you need something like this:
    let arg1 = "./data/20201001.csv";
    let args = PyTuple::new(py, &[arg1]);
    let mut kwargs = PyDict::new(py);
    kwargs.set_item("names", ["s", "u", "c", "a", "v"]);
    kwargs.set_item("index_col", 1);
    kwargs.set_item("parse_dates", true);
    let df = pd.call("read_csv", args, Some(kwargs));

Btw, the output you showed are not "compile errors" - compilation was successful and your code ran, producing the debug outputs you showed.

Thanks @birkenfeld
I change to use "call" function, the argument "name" should be use vec, like this:
    let list = vec!["s", "u", "c", "a", "v"].to_object(py);
    kwargs.set_item("names", list);

But there are another questions:  I use python "pandas“ to calculate OHLC, the python code is:
        df = pandas.read_csv(file, names=[ 's','u', 'c', 'a','v'], index_col=1, parse_dates=True)
        data_c =  df['c'].resample(counts, closed='left', label='left').ohlc()
        data_a =  df['a'].resample(counts, closed='left', label='left').last()
        data_v =  df['v'].resample(counts, closed='left', label='left').sum()

But in Rust, ”df“ is a Result<&PyAny, PyErr> trait, it can't to call "resample" and "ohlc/sum/last" functions. so How can I do for this?
pub async fn calculate_base_ohlc()-> PyResult<()> {
    debug!("test pandas");
    let gil = Python::acquire_gil();
    let py = gil.python();
    let pd = PyModule::import(py, "pandas")?;

    let arg1 = "./data/20201001.csv";
    let args = PyTuple::new(py, &[arg1]);
    let mut kwargs = PyDict::new(py);
    let list = vec!["s", "u", "c", "a", "v"].to_object(py);
    //kwargs.set_item("names", "['s', 'u', 'c', 'a', 'v']");
    kwargs.set_item("names", list);
    kwargs.set_item("index_col", 1);
    kwargs.set_item("parse_dates", true);
    let mut df = pd.call("read_csv", args, Some(kwargs));
    debug!("df = {:?}", df);

    let arg2 = "T";
    let args2 = PyTuple::new(py, &[arg2]);
    let mut kwargs2 = PyDict::new(py);
    kwargs2.set_item("closed", "left");
    kwargs2.set_item("label", "left");
    //let res =  df.call("resample", "T", Some(kwargs2));
    //let data_c = res.call("ohlc");

    Ok(())
}

Thanks again for your help.

Result<&PyAny, PyErr> (aka PyResult<&PyAny>) is an enum, which is ether an Ok value containing the function result, or an Err containing the exception raised. This is how Python's exceptions map to Rust.
I see your example pyfunction returns PyResult<()>. So you can propagate the exception and otherwise use the value contained with the ? operator.
So you should write
let mut df = pd.call("read_csv", args, Some(kwargs))?;

And now df will be an &PyAny you can do things with.

Can you try with kwargs.set_item("names", vec!["s", "u", "c", "a", "v"]);?
To call methods on the resulting PyAny, use the call_method family of methods.

authors: CHCP birkenfeld davidhewitt


text:
Debugging docs for rust-gdb

Since PyO3 uses cdylib for Python shared objects, it does not receive the pretty-print debug hooks in rust-gdb (rust-lang/rust#96365). I think adding information about this to the debugging documentation for PyO3 would help avoid confusion as to why pretty printers are not loaded. I'm happy to update the docs when I get a chance.
https://github.com/PyO3/pyo3/blob/main/guide/src/debugging.md#L38

Thanks for sharing! It sounds like this is potentially something that upstream rustc might fix one day?

That is my hope. I'm not sure the right way to get visibility on the upstream issue.

authors: cjermain davidhewitt


text:
ci: enable full builds with a label

As a replacement for bors try, this PR adds a CI-build-full label which, when present, should trigger the full build instead of just the 3.11 runs.

Looks like that's working as hoped! Note that this works like CI-no-fail-fast where it doesn't automatically re-trigger CI on application, you need to push / reopen the PR to trigger a new actions run.

One thing we should probably keep in mind is that this runs the full CI on the branch, not the result of merging the branch as the merge queue does or as bors would have.

Very true! The merge queue will still run on the merge result before completing the merge, so we may see failures at that stage.

authors: adamreichold davidhewitt


text:
QP support for MOSEK, COPT, MindOpt

MOSEK:

The solsta.dual_infeas_cer should be interpreted as "infeasible_or_unbounded"
An empty constraint list can lead to an AttributeError when reading out duals. This is handled like in the Gurobi interface.

COPT

For reading out the solver status, need to handle the case where model.type == "QP"
An empty constraint list can lead to an AttributeError when reading out duals. This is handled like in the Gurobi interface.
The check in the test test_quadratic_model for the y variable was too restrictive. 10 is the lowest value y has to take in the cost-optimum, but increasing this value (which was what COPT did) yields the same objective value. Degeneracy.

MindOpt:

According to the developers, MindOpt does not yet support reading in QPs via LP file, only via MPS file.
An empty constraint list can lead to an AttributeError when reading out duals. This is handled like in the Gurobi interface.

HiGHS:

Added warning regarding #171

Tests:

The QP test for unbounded problems was flawed. By reversing the sign of the objective function with quadratic terms, the problem became non-convex. This caused MOSEK to complain (matrix was not positive semidefinite) and was also the cause why "SCIP" needed special handling. I exchanged that with a new test case that is unbounded yet convex.

Environment:

Was there a reason to not add xpress to the solvers in setup.py?

This is awesome, thanks @fneum. The xpress installation does not seem to be available on mac for python 3.11. Perhaps we can find a way to ignore it for mac.

authors: FabianHofmann fneum

repo: PyPSA/linopy


text:
UserWarning for testing_epoch_end in 0.9.1rc4

Just informing about the user warning I was displayed:
YYY\anaconda3\envs\pt_cpu\lib\site-packages\pytorch_lightning\utilities\distributed.py:37: UserWarning: The testing_epoch_end should not return anything as of 9.1.to log, use self.log(...) or self.write(...) directly in the LightningModule warnings.warn(*args, **kwargs)
although I don't have the testing_epoch_end method in my class. UPDATE: The warning does not appear when I implement it.
I'm using 0.9.1rc4.
If it's being resolved elsewhere and I missed that, feel free to close the issue.

@chrismaliszewski it seems as there is a missing check if the method is overwritten, mind sends a PR?

It's fine now. Closing.

authors: Borda chrismaliszewski

repo: PyTorchLightning/pytorch-lightning


text:
Update API references for Callbacks

What does this PR do?

Update API references for Callbacks
Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

[ ] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[x] Did you make sure to update the documentation with your changes? (if necessary)
[ ] Did you write any new necessary tests? (not for typos and docs)
[ ] Did you verify new and existing tests pass locally with your changes?
[ ] Did you list all the breaking changes introduced by this pull request?
[ ] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?
Make sure you had fun coding 🙃
cc @borda @rohitgr7 @awaelchli @ananthsub @daniellepintz

Converting to draft as the build's failing...


text:
prune check on Trainer fit result

What does this PR do?
prune check on Trainer fit result...
Before submitting

[ ] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[x] Did you make sure to update the documentation with your changes? (if necessary)
[x] Did you write any new necessary tests? (not for typos and docs)
[x] Did you verify new and existing tests pass locally with your changes?
[x] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified
[x] Check that target branch and milestone match!

Did you have fun?
Make sure you had fun coding 🙃

Done ;]
On Mon, 11 Jan 2021 at 12:22, chaton notifications@github.com wrote:

@tchaton requested changes on this pull request.
In tests/models/test_restore.py
https://github.com/PyTorchLightning/pytorch-lightning/pull/5453#discussion_r554979122
:

 # correct result and ok accuracy

assert result == 1, 'training failed to complete'

assert trainer.state == TrainerState.FINISHED, "Training failed with %s" % trainer.state

Would be good to change them all to f-string.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/PyTorchLightning/pytorch-lightning/pull/5453#pullrequestreview-565264536,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABOBOVDGHF5RBEPGT6KNYPLSZLNPDANCNFSM4V4Z3NCQ
.

Done ;]
On Mon, 11 Jan 2021 at 12:22, chaton notifications@github.com wrote:

@tchaton requested changes on this pull request.
In tests/models/test_restore.py
https://github.com/PyTorchLightning/pytorch-lightning/pull/5453#discussion_r554979122
:

 # correct result and ok accuracy

assert result == 1, 'training failed to complete'

assert trainer.state == TrainerState.FINISHED, "Training failed with %s" % trainer.state

Would be good to change them all to f-string.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/PyTorchLightning/pytorch-lightning/pull/5453#pullrequestreview-565264536,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABOBOVDGHF5RBEPGT6KNYPLSZLNPDANCNFSM4V4Z3NCQ
.


text:
script to generate strong password

Description
This PR includes py script to gen password with python script.
Fixes #(issue_no)
Type of change
Choosing one or more options from the following as per the nature of your Pull request.

NOTE: These boxes can be checked using [X]

[ ] Bug fix (non-breaking change which fixes an issue)

[X] New feature (non-breaking change which adds functionality)

[X] Documentation Update

Checklist:
Please tick all the boxes that are fulfilled by your Pull Request.

[X] I have named my files and folder, according to this project's guidelines.
[X] My code follows the style guidelines of this project.
[X] My Pull Request has a descriptive title. (not a vague title like Update index.md)
[X] I have commented on my code, particularly in hard-to-understand areas.
[X] I have created a helpful and easy to understand README.md, according to the given README_TEMPLATE.
[ ] I have included a requirements.txt file (if external libraries are required.)
[X] My changes do not produce any warnings.
[X] I have added a working sample/screenshot of the script.

We already have a similar script in our sister repo python-mini-projects


text:
Update README.md

Added Angela & Thomas to Session 5

Great, thanks. I merged it.

repo: Python-do-ECARES/Classes


text:
READY FOR REVIEW - Fix #144. Expand newint.divmod and newint.rdivmod.

Fix #144. Expand newint.divmod and newint.rdivmod to fall back to <type 'long'> implementations where appropriate.

Thanks very much, Matt! I've merged this into the v0.14.x branch.

@edschofield, my pleasure. My apologies for creating this originally from master instead of that branch. I was ignorant of your workflow.

authors: edschofield posita

repo: PythonCharmers/python-future


text:
Add undo/redo buttons

Is your feature request related to a problem? Please describe.
When a creation/destruction action is taken, I'd like to be able to undo it, and if I change my mind before I've done something else, I'd like to be able to redo it.
Describe the solution you'd like
When an action is taken, I can click undo to reverse it.
When an action has been reversed, and no actions have been taken, I can click redo to restore the reversed action.
To implement this, simply use an actionStack. To undo, pop off an action onto the redoStack. To redo, pop the redoStack top and push it onto the actionStack.
Additional context
Discussed in 2/21 meeting.

This opens up the possiblity for more than one redoStack: if the state that had an associated redo is returned to, we can recover it. But having two stacks keeps things simple.

This issue is not relevant anymore. Closing it. See #323 for more details.

authors: nelimee smburdick

repo: QCHackers/tqec


text:
增加对 UILayoutGuide 的支持？

如题

暂时没有该计划，因为我实在搞不懂这个特性，也没用过，看看有没有热心网友帮忙加一下。

authors: hughkli iOSleep

repo: QMUI/LookinServer


text:
List concatenation not working

Of these three functions which concatenate two lists, only the third one works properly:
def concat1():
    a = ['a', 'b']
    b = ['c', 'd']
    return a + b

def concat2():
    a = ['a', 'b']
    b = ['c', 'd']
    return [*a, *b]

def concat3():
    a = ['a', 'b']
    b = ['c', 'd']
    r = []
    r.extend(a)
    r.extend(b)
    return r

The first returns a string, 'a,bc,d', and the second returns a list containing two nested lists, [ [ 'a', 'b' ], [ 'c', 'd' ] ]
I have tested this in the latest PyPI version, 3.9.0, which is also the latest Git master revision at the time of writing this.

Related: [1] * 4 does not produce [1, 1, 1, 1] as expected

Are these not working even with operator overloads enabled using the opov pragma?

Thanks! This fixes all cases except for [*a, *b], which still produces [['a', 'b'], ['c', 'd']].
IMO this feature should be made more prominent in the docs, given that it silently produces incorrect behaviour. Even more helpful would be to emit a warning when it is obvious that non-numeric objects are being added (in my case it I was adding list literals, which should be easy to detect).

authors: JennaSys chrisb-fico

repo: QQuick/Transcrypt


text:
2.3.4 W0323 13:04:52.632426 10515 pika_trysync_thread.cc:88] Reply from master after trysync: wait

一直停留在这个位置 从
I0323 13:04:52.632654 10515 pika_trysync_thread.cc:111] Need wait to sync

看一下主从有没有什么waring日志

我也碰到了这个问题：pika版本是2.3.3
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
W0409 19:31:46.304848  8847 pika_trysync_thread.cc:88] Reply from master after trysync: OK
W0409 19:31:46.305025  8847 pika_trysync_thread.cc:88] Reply from master after trysync: wait

主库的日志呢？

主节点发现了这个waring
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
W0409 17:48:41.867890 22956 pika_server.cc:809] rsync send file failed! From: list, To: list/, At: 172.16.192.46:12221, Error: 2560
W0409 19:24:37.387856 22956 pika_server.cc:809] rsync send file failed! From: list, To: list/, At: 172.16.192.46:12221, Error: 2560

v2.3.3版本rsync需要使用root权限，通过root启动pika后解决。
另外查看有没有同步，简单的方式是：查看从库的dbsync大小
多谢 @Axlgrep 指导

authors: Axlgrep jianghenglz xieyiwen


text:
Loading time

With icons being at most 30-100 pixels wide it doesn't make sense that they're taking almost a minute to load. My internet usually at 2-5 mpbs.

I also pressed "next" too many times, it took a lot of time for the map to load (1-2 minutes), despite me looking at the same route previously.

Unfortunately this sounds like an ISP or CDN issue in your area or region, you can check this by using routes on your browser instead and you will most likely encounter similar loading times. Our assets are in the kilobytes and most of the time you'll only load a few megabytes worth of data. This is not a technical issue on our end that we can fix as we're configured to deliver our assets globally through our CDN provider.

repo: Qiqis-Notebook/qnb-client


text:
progress tracking on "why quantum"

Steps to reproduce the problem

Go to https://learn.qiskit.org/course/introduction/why-quantum-computing
Scroll down to first multiple-choice question
Click on correct answer
See error of progress not  icon not advancing

What is the current behavior?
Progress icon does not indicate progress
What is the expected behavior?
Progress icon should fill when up when the multiple-choice question is correctly answered
Screenshots (optional but very helpful)

Environment (optional but very helpful)

Device: laptop (macbook pro)
OS: MacOS
Browser: Firefox. It works fine in Chrome

Additional context (optional)
This seems to be an issue specific to Firefox. Other pages with progress tracking still work just fine.

This repository is no longer maintained. It has been superseded by IBM Quantum Learning.

authors: JRussellHuffman vabarbosa

repo: Qiskit/platypus


text:
Add a parameters method to the operators

What is the expected behavior?
Calling QuantumCircuit.parameters returns a set of the Parameter objects in the circuit.
The OperatorBase should support this too, since it too can be parameterized.

Hi @Cryoris
Can you point me to the QuantumCircuit.parameters file?

It's a method here: https://github.com/Qiskit/qiskit-terra/blob/76f21b011171486ccc77775ea29f51be196755e2/qiskit/circuit/quantumcircuit.py#L1645
In an OperatorBase either the coefficients can be parameterized (ie of type ParameterExpression -- careful, this is not the same as a plain Parameter) or if it contains a CircuitOp or CircuitStateFn, the underlying circuit can be parameterized. You can probably recursively check these two and return a set of all Parameters you found,.

It's a method here: https://github.com/Qiskit/qiskit-terra/blob/76f21b011171486ccc77775ea29f51be196755e2/qiskit/circuit/quantumcircuit.py#L1645
In an OperatorBase either the coefficients can be parameterized (ie of type ParameterExpression -- careful, this is not the same as a plain Parameter) or if it contains a CircuitOp or CircuitStateFn, the underlying circuit can be parameterized. You can probably recursively check these two and return a set of all Parameters you found,.

I see that the OperatorBase class can accept coefficients of different types like int, float etc. Is the code expected to return all those coefficients for this feature request? Also, if it does contain the ParamterExpression, is it supposed to return the ParamterExpression object?

It's supposed to only return the Parameter objects, no floats/ints. If you have a ParameterExpression you can get the Parameters it contains by ParameterExpression.parameters. Essentially the behaviour should be the same as for the QuantumCircuit and its parameters method 🙂

Closed as solved by #1194

authors: Cryoris VANRao-Stack shadab-entrepreneur woodsp-ibm

repo: Qiskit/qiskit-aqua


text:
[WIP] SamplerV2

Summary
Fixes #1313

Reopening from fork

repo: Qiskit/qiskit-ibm-runtime


text:
qiskit.aqua.components.multiclass_extensions has no newer equivalent

What is the expected enhancement?
The migration guide at qiskit.aqua shows there is no equivalent for multiclass_extensions. It would be great if the new qiskit provides this feature too. Do let me know if something already exists. Thank you !

@sri1905 I believe there's no need to port multiclass_extensions. If you want to run multi-label classification via QSVC (is it what you are looking for?) then everything should work out of box. For example a 3-label classification on the iris dataset:
from qiskit import Aer
from qiskit.circuit.library import ZZFeatureMap
from qiskit.utils import QuantumInstance
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split

from qiskit_machine_learning.algorithms import QSVC
from qiskit_machine_learning.kernels import QuantumKernel

if __name__ == '__main__':
    x, y = load_iris(return_X_y=True)
    samples = 30

    # 150 samples, 3 classes
    # iris dataset contains 50 samples of each class and samples are sorted by class label
    # so we sample a balanced sub-dataset of `samples` samples in total
    indices = [int(50 * (i % 3) + (float(i) / samples * 50)) for i in range(samples)]

    features = x[indices]
    labels = y[indices]

    train_features, test_features, train_labels, test_labels = train_test_split(features, labels, test_size=5, shuffle=False)

    qi = QuantumInstance(backend=Aer.get_backend('aer_simulator_statevector'),
                         seed_simulator=12345,
                         seed_transpiler=12345)

    qk = QuantumKernel(feature_map=ZZFeatureMap(feature_dimension=4), quantum_instance=qi)
    model = QSVC(quantum_kernel=qk)
    model.fit(train_features, train_labels)
    predicts = model.predict(test_features)
    print("true    :", test_labels)
    print("predicts:", predicts)
    score = model.score(test_features, test_labels)
    print("score   :", score)

Produces on my laptop:
true    : [1 2 0 1 2]
predicts: [0 2 0 1 2]
score   : 0.8

Please let me know if you have questions.

@adekusar-drl thank you for your example. It does show how to perform classification with 3 classes. However, I believe there is an issue with four or more classes as @jonvet demonstrated in #251. I shall implement once and let you know if I face any errors/irregularities. Thank you

@sri1905 Was this issue resolved? I'm not closing #251meanwhile.

@sri1905 Was this issue resolved? I'm not closing #251meanwhile.

Yes, this issue can be closed. Thank you

repo: Qiskit/qiskit-machine-learning


text:
Quantum and classical registers can be set by floats

Information

Qiskit Terra version: 0.19.6
Python version:
Operating system:

What is the current behavior?
This works:
qc = QuantumCircuit(3.7, 3.5)

Steps to reproduce the problem
What is the expected behavior?
Suggested solutions

Can I give take this?

sure...

Hey! can I give it a shot too?

Hey @1ucian0 , just checking to see how its going... can I give a shot too?

There is a pending PR already for this issue

Hi! Is this issue open?

I think the pending PR is close to be merged.

Closed via https://github.com/Qiskit/qiskit-terra/pull/4858

repo: Qiskit/qiskit-terra


text:
Avoid installing deps with tox -e docs-clean

Pull Request Test Coverage Report for Build 4995259005

0 of 0   changed or added relevant lines in 0 files are covered.
10 unchanged lines in 4 files lost coverage.
Overall coverage decreased (-0.006%) to 85.913%

Files with Coverage Reduction
New Missed Lines
%

qiskit/circuit/tools/pi_check.py
1
91.23%

crates/accelerate/src/vf2_layout.rs
3
94.74%

crates/qasm2/src/lex.rs
3
91.14%

qiskit/pulse/library/waveform.py
3
93.75%

Totals

Change from base Build 4992996150:
-0.006%

Covered Lines:
71094

Relevant Lines:
82751

💛  - Coveralls

bump @jakelishman

authors: Eric-Arellano coveralls


text:
Transpiler: Singleton and List description in docstring now reflected in type hinting

Summary
The docstring in qiskit-terra/qiskit/compiler/transpiler.py specified that a singleton or list version of each of the parameters could be passed to the circuits. The type hinting only reflected the singleton aspect. I cleaned up the naming by giving aliases to some of the longer type hints and made sure the list version of the parameter was represented in each type hint.
Details and comments
I don't believe that I need to use reno to document these changes, but if it is necessary just reject the request with a comment about reno and I can update it.

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

Thanks for the PR! Coincidentally, we're actually in the process of deprecating the broadcasting behavior of this interface, i.e. removing the list variants of these parameters. This is being done in #8835.
From that PR, it sounds like we might rather leave the type hints in their current incomplete state. Feel free to comment on the PR if you'd like to weigh in 😄.

Closing due to above discussion; we're moving in a different way on this.  Thank you for the interest in contributing, though!

authors: CLAassistant Eriken79 jakelishman kevinhartman


text:
update community terra

I updated some of the examples in qiskit-tutorial/community/terra/ to work on qiskit 0.6

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

authors: CLAassistant muneerqu

repo: Qiskit/qiskit-tutorial


text:
Add MCRX, MCRY and MCRZ gates to the circuit library

What should we add?
Currently we have the methods mcrx, mcry and mcrz in the QuantumCircuit class, but they don't appear in the circuit library.
I would suggest to add them to the circuit library as the other multi-controlled gates.
In addition, in order to make a unified API as the other multi-controlled gates, these gates should include the following:

The angles should be of type ParameterValueType (not only float).
Add ctrl_state parameter (like in MCXGate).
The control method of the rx, ry and rz gates, should call the MCRX, MCRY or MCRZ gates respectively (if there are more than two qubits)

Following the discussion in https://github.com/Qiskit/qiskit/issues/12863#issuecomment-2260278687, I'll close this issue (and transfer some tasks to #12863)

Following the discussion in https://github.com/Qiskit/qiskit/issues/12863#issuecomment-2260278687, I'll close this issue (and transfer some tasks to #12863)

repo: Qiskit/qiskit


text:
Qiskit installation instruction on windows :

pip install fails - installation instructions for Windows:
https://qiskit.org/documentation/install.html
Here below the different tests

Bare windows qiskit installation

Get Miniconda Windows installer from https://docs.conda.io/en/latest/miniconda.html
Install Miniconda3
pip install qiskit # installation works perfectly as python package installed is 3.7 (brought by conda)

Virtual conda environment qiskit installation

Get Miniconda Windows installer from https://docs.conda.io/en/latest/miniconda.html
conda create -n  python=3   # T his will install python 3.8.1 in environment
pip install qiskit  # fails during Terra and Aer installation, Because pip doesn’t find a package for  python 3.8, it tries to download the source code of Terra and Aer and build it by itself, thus requiring a C++ compiler. This is the misleading error message received: "error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/".

The misleading error message makes Customers not understanding why a C++ compiler is needed.  And they do not want to install one. If they have VS 2017 installed then the installation fails on cvxopt as a pre-requisite. A 'conda install cvxopt' fixes the problem and running a pip install qiskit again works.

Using Qiskit on Windows requires VC++ runtime components

When installing Miniconda3 or Anaconda3, VS 2015 C++ runtime is provided as part of Conda.

Here below the recommendations, aren't they obsolete ?
Microsoft Visual C++ Redistributable for Visual Studio 2017
Microsoft Visual C++ Redistributable for Visual Studio 2015
If you install Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.22.27821 or Microsoft Visual C++ 2017 Redistributable (x64) - 14.16.27029 which one will be used ?  the 2015 version from Conda ? one of the version in Windows ?

What should the documentation say instead?
Today python 3.8 creates problems when pip install.  The documentation should mention it.  Do we need to install Redistributables if provided in Anaconda3 or Miniconda3.  Unless when installing python only, then windows redistributables need to be recommended  ?

This fails due to a downstream dependency, namely cvxopt, that is not Py38 compatible yet. It is also not compatible with our license and has been removed in the master branch.   Qiskit itself was not Py38 compatible itself until just recently. Anytime there is a major Python update packages take time to verify compatibility. Having to change the documentation every time this happens, and then changing it back will just lead to inconsistency as someone must remember to change this and rebuild the docs.

I understand that it is not a solution having constant updates to the documentation.
Next release of qiskit will support Py38 so this pb will go away. However it would be interresting to let customer know what Python releases are supported by pointing pypi.org for example.
Also giving simple steps to install qiskit in a bare windows env would help.  Not everyone install in a virtual env.

So the install documentation already links to the pypi page and says refer to the Programming Language section of the package metadata on that page:
https://qiskit.org/documentation/install.html (it's the second sentence)
Do you have a suggested place or alternative wording or formatting for that?
When using a supported version of python pip install qiskit should work fine on windows 64 bit (32bit  operating systems aren't supported in general because of aer) because there are precompiled binaries available for everything (except some optional dependencies in aqua). In that situation a venv is not required nor is conda. However, I will say because qiskit still uses namespace packages (at least until #559 is addressed) running in a virtualenv is strongly recommended. It gives you and undo button in case the namespace gets out of sync (which happens quite frequently). If your're using a virtualenv you can simply create a new one when that happens, but if the namespace gets broken on system python that's much more difficult to clean up. Also, from personal experience on windows using conda is generally a good idea because it provides precompiled packages for most of the non-python libraries most of the stack requires.
That all being said Qiskit 0.15.0 is out now and includes support for python 3.8 so the underlying problem here has gone away. I'm not going to close this yet though because there might be suggestions on how to improve the documentation more to clear up things here.

honestly i hadn't look at the second sentence :-(
The wording is correct to me. It specifies which specific versions of Python are supported.  Thanks

authors: ibmccmpl mtreinish nonhermitian patdenim


text:
Adding faq

Fixes #111

@ajavadia i decided to put the citation under a FAQ. Can you add any other questions you been asked a lot? Same with you @nonhermitian

@derivation also add questions here you think should be. I am just using this a placeholder to get the citation question on the web.

Going to keep this open until I hear back from @Travis-S @dongreenberg @jenglick

@jaygambetta here's a question that I got from the QStart team. Do you think it's a Qiskit question for the FAQ or an IBM Q services question not fit for the FAQ?
How do the priorities I set correspond to the queuing process for jobs I submit to IBM Q devices?

this is a IBM Q questions.

Ok. I thought so, too. I'm also reaching out to Anna Obikane who's been synthesizing her observations of the IBM Q Experience user forum https://quantumexperience.ng.bluemix.net/qx/community. At first blush, there are Qiskit related questions on there.

sure we can remove the qiskit ones from there

From Travis:

[ ] How do I determine where I am in the queue?
[ ] When I run a VQE algorithm in Aqua, are the circuits I re-submit with new parameters sent to the back of the queue?
[x] How can I simulate an Aqua algorithm with noise effects included?

authors: derivation jaygambetta


text:
Oxidize PauliFeatureMap

Summary
This PR oxidizes the PauliFeatureMap (and derivatives) and implements a first step in refactoring the circuit library, where structurally fixed circuits are moved to functions. As part of this, PauliFeatureMap & co. are pending deprecation.
Details and comments

This code is ~8x faster than it's Python equivalent. The most time is spent in parameter multiplication, which could be further improved by caching the expression across the repetitions, or (bigger scale) have the parameter logic in Rust.
If #12767 is merged, this will be handled in a follow up.

Pull Request Test Coverage Report for Build 10575480058
Details

242 of 248 (97.58%)  changed or added relevant lines in 7 files are covered.
23 unchanged lines in 4 files lost coverage.
Overall coverage increased (+0.02%) to 89.233%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

crates/accelerate/src/circuit_library/pauli_feature_map.rs
193
195
98.97%

crates/circuit/src/operations.rs
20
22
90.91%

qiskit/circuit/library/data_preparation/pauli_feature_map.py
21
23
91.3%

Files with Coverage Reduction
New Missed Lines
%

qiskit/transpiler/passes/synthesis/unitary_synthesis.py
2
88.43%

crates/qasm2/src/lex.rs
3
92.98%

qiskit/synthesis/two_qubit/xx_decompose/decomposer.py
6
90.84%

crates/qasm2/src/parse.rs
12
97.15%

Totals

Change from base Build 10563485346:
0.02%

Covered Lines:
71879

Relevant Lines:
80552

💛  - Coveralls

authors: Cryoris coveralls


text:
Fix CUGate parameter assignment issues

Modified CUGate.params, both property and setter, to handle all 4 params [theta,phi,lam,gamma] and maintain base_gate, CUGate, parameters [theta,phi,lam]
Added qiskit.CUGate.__deepcopy__ to maintain all 4 params in a copy
Added CU3 to CU equivalence to the equivalence library
Added test case test_assign_cugate to test_parameters.TestParameters
Fixes https://github.com/Qiskit/qiskit-terra/issues/7410
Fixes https://github.com/Qiskit/qiskit-terra/issues/7326

Summary
Maintain all 4 params [theta,phi,lam,gamma] in CUGate but only pass [theta,phi,lam] to the base_gate UGate.  This allows assignment of parameters to CUGates with current assign_parameters methodology; and allows cu3_to_cu mapping back into the equivalence library.
Details and comments
Fixes #7410 Problem extracting Statevector when using a binded parametric controlled gate
Fixes #7362  CUGate's params getter does not comply with circuit's assign_parameters

@rrodenbusch: I'm really sorry for this PR staling - it's completely my fault.  I just tried to move this to merge now, but unfortunately various bits and bobs have changed within the library since the time of this PR, and the workaround here was no longer sufficient.  I made #11032 to be the spiritual successor of this PR, and since I built heavily on the research you'd done to find a viable strategy here, I've credited you as a co-author of it - I hope that's ok.

No worries.  So am I to understand that you did find a fix?
On Tue, Oct 17, 2023, 17:02 Jake Lishman @.***> wrote:

@rrodenbusch https://github.com/rrodenbusch: I'm really sorry for this
PR staling - it's completely my fault. I just tried to move this to merge
now, but unfortunately various bits and bobs have changed within the
library since the time of this PR, and the workaround here was no longer
sufficient. I made #11032 https://github.com/Qiskit/qiskit/pull/11032
to be the spiritual successor of this PR, and since I built heavily on the
research you'd done to find a viable strategy here, I've credited you as a
co-author of it - I hope that's ok.
—
Reply to this email directly, view it on GitHub
https://github.com/Qiskit/qiskit/pull/9118#issuecomment-1767259931, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AE3FKC4X2QQIEB4MX4Q2M5LX73573AVCNFSM6AAAAAAR45NND2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRXGI2TSOJTGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

It solves several of the reported bugs, including the ones this PR was trying to fix, for sure, though the root cause is fundamentally that CUGate should not be a ControlledGate with a base_gate of UGate since they're incompatible.  That's harder work to fix properly, though, and we're in the process of redoing several bits of how controlled-gate synthesis will work, so I'm not keen to add new dummy gates to be the CUGate.base_gate until we know if that'll be necessary.

authors: jakelishman rrodenbusch


text:
Better Exceptions hangs Dask Distributed execution on exception

Here is the reproduction:
import better_exceptions

import dask
import dask.distributed

def x():
    assert 0

if __name__ == '__main__':
    client = dask.distributed.Client()
    dask.delayed(x)().compute(get=client.get)

If I run this code with import better_exceptions commented out, I can see the AssertionError traceback and the program exits:
$ python test.py
distributed.utils - ERROR -
Traceback (most recent call last):
  File "/opt/conda/lib/python3.5/site-packages/distributed/utils.py", line 212, in f
    result[0] = yield make_coro()
  File "/opt/conda/lib/python3.5/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/opt/conda/lib/python3.5/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/opt/conda/lib/python3.5/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/opt/conda/lib/python3.5/site-packages/distributed/client.py", line 1551, in _get
    result = yield self._gather(packed)
  File "/opt/conda/lib/python3.5/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/opt/conda/lib/python3.5/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/opt/conda/lib/python3.5/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/opt/conda/lib/python3.5/site-packages/distributed/client.py", line 996, in _gather
    traceback)
  File "/opt/conda/lib/python3.5/site-packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "qq3.py", line 8, in x
    assert 0
AssertionError
Traceback (most recent call last):
  File "qq3.py", line 12, in <module>
    dask.delayed(x)().compute(get=client.get)
  File "/opt/conda/lib/python3.5/site-packages/dask/base.py", line 96, in compute
    (result,) = compute(self, traverse=False, **kwargs)
  File "/opt/conda/lib/python3.5/site-packages/dask/base.py", line 203, in compute
    results = get(dsk, keys, **kwargs)
  File "/opt/conda/lib/python3.5/site-packages/distributed/client.py", line 1590, in get
    resources=resources)
  File "/opt/conda/lib/python3.5/site-packages/distributed/utils.py", line 223, in sync
    six.reraise(*error[0])
  File "/opt/conda/lib/python3.5/site-packages/six.py", line 686, in reraise
    raise value
  File "/opt/conda/lib/python3.5/site-packages/distributed/utils.py", line 212, in f
    result[0] = yield make_coro()
  File "/opt/conda/lib/python3.5/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/opt/conda/lib/python3.5/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/opt/conda/lib/python3.5/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/opt/conda/lib/python3.5/site-packages/distributed/client.py", line 1551, in _get
    result = yield self._gather(packed)
  File "/opt/conda/lib/python3.5/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/opt/conda/lib/python3.5/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/opt/conda/lib/python3.5/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/opt/conda/lib/python3.5/site-packages/distributed/client.py", line 996, in _gather
    traceback)
  File "/opt/conda/lib/python3.5/site-packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "qq3.py", line 8, in x
    assert 0
AssertionError
distributed.nanny - INFO - Worker closed
distributed.nanny - INFO - Worker closed
distributed.nanny - INFO - Worker closed
distributed.nanny - INFO - Worker closed
distributed.nanny - INFO - Worker closed
distributed.nanny - INFO - Worker closed
distributed.nanny - INFO - Worker closed
distributed.nanny - INFO - Worker closed
distributed.client - WARNING - Client report stream closed to scheduler

However, once I have import better_exception, the output is blank and the program just hangs forever.

@Qix- Any ideas? I have just noticed TBVaccine project and its hook works well with Dask Distributed...
@skorokithakis Thank you for mentioning TBVaccine! It works great for me where better-exceptions just breaks things.

Might be an endless loop while formatting. I'm going to be pretty busy the next few weeks but will try to take a look for you.
Thank you for the repro case, that's super helpful :)

@frol Hi!
I wanted to work on this issue but unfortunately I can not reproduce the error.
Are you still able to reproduce it?
If so, some information about your configuration may be usefull: distribution, libraries versions (run pip freeze), python version (run python --version).
I have studied the source code a bit and I do not see where there could be an infinite loop.
Sometimes your snippet takes a long time to run but the error always appears in the end (although I do not see any logging messages), with or without better_exceptions imported.

@Delgan Either dask or distributed has changed something so it works fine now with the latest versions of those. Downgrading pip install dask==0.14.3 distributed==1.16.1 makes the issue reproducible.

@frol Indeed, I can reproduce the error now, thank you!

So, better_exceptions is hanging here.
Prepend the format_value function with:
if getattr(v, '__name__', None) == '_get':
    help(v)
    print("The program will crash...")
print("v =", v)

And then...

Strangely, it is not possible to display the method.
My traceback is slightly different from yours.
The first line is result[0] = yield gen.maybe_future(func(*args, **kwargs)).
It appears that this func function is actually the _get method which cannot be displayed.
This is why it prevents better_exceptions to format the traceback.
The function make_coro of your traceback appears with v1.16.3 and uses func too.
There is no error with TBVaccine because it does not introspect this traceback.
I then tried to study the code of distributed but wow... It is a little  bit too complex for me.
It is perhaps related to this __str__ function.
In the end, it looks like the bug came from distributed and not better_exceptions.
The bug stopped occurring with v1.17.0 when they removed the _get function.
However, I am not sure that the bug has completely disappeared.
Maybe it has just been moved, and that the snippet here does not show it anymore.

authors: Delgan Qix- frol

repo: Qix-/better-exceptions


text:
Upgrade Shell (task #5387)

This shell script handles automatic upgrades, by fetching all tasks using a specific naming convention, like src/Shell/Task/Upgrade20180213.php, and execute them in chronological order.

Codecov Report

Merging #468 into master will decrease coverage by 0.46%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master     #468      +/-   ##
============================================
- Coverage     28.39%   27.92%   -0.47%
- Complexity      733      780      +47
============================================
  Files            69       71       +2
  Lines          2571     2718     +147
============================================
+ Hits            730      759      +29
- Misses         1841     1959     +118

Impacted Files
Coverage Δ
Complexity Δ

src/Shell/Task/Upgrade20170316Task.php
0% <0%> (ø)
9 <1> (?)

src/Shell/Task/Upgrade20170119Task.php
0% <0%> (ø)
32 <32> (?)

src/Shell/UpgradeShell.php
0% <0%> (ø)
7 <7> (?)

src/Routing/ApiRouter.php
100% <0%> (ø)
12% <0%> (+8%)
:arrow_up:

Continue to review full report at Codecov.

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

authors: codecov-io georgeconstantinou

repo: QoboLtd/project-template-cakephp


text:
Native buttons to control playback don't work

I've installed the latest version on Linux Mint 18 and it's working properly. I've tried to assign some keyboard shortcuts to play/pause a song, play next song, play previous song,... but when I click on my shortcut the action is not executed.

If this is using dbus-send, this currently isn't implemented. I had put in the functionality but something happened with mrpis-service for node, so until I figure out a way to develop MPRIS/DBus there will not be any way to control it externally.
I have looked into global shortcuts as part of Electron but these do not get assigned under Linux as they are already assigned with Gnome/Unity - probably as part of MPRIS control.
I hope this helps to your confusion?

Thanks for the fast reply.
I don't know if it's using dbus-send or mrpis but now I understand why it's not working.
Thanks!

As of currently it doesn't use either, but I intend to add it in a future release

I have added B-Dus/MPRIS control, can you tell me whether this improves the functionality you wanted?

Have you created a new 64 bit .deb package? If you create a new one (even if it's not final and only for tests) I can try it.

Sure I can try making one for you

https://github.com/Quacky2200/Spotify-Web-Player-for-Linux/releases/tag/0.9.4

It works like a charm! I've assigned keyboard shortcuts to:

Next song
Previous song
Play/Pause

And everything is working as expected.
I've also tested the notifications and now the only appear once. When I change the song the same notification is re-used.
Thank you very much! :+1:

That's awesome to hear, I'm glad it works for you. :+1:
I find the notifications a tiny bit buggy (same instance so they take a small time to update) and D-Bus must uses a separate process with Node.JS so if the notifications stop working you may have to kill all spotifywebplayer/node processes but we'll cross that path if it comes to it - it's the most stable one I can make so far...despite the major bugs I had to deal with :)

I'm always listening Spotify while working so this next week I'll use it most of the day and let you now if there's some problem with the notifications.


text:
feature request: support diff highlighting

Over at Pydata-Sphinx-Theme we've had a user request to support .diff highlighting: https://github.com/pydata/pydata-sphinx-theme/issues/1506
I haven't looked at all the themes in this repo, but I looked at a11y_high_contrast_dark and _light and here is (I think) the problem:

Generic.Inserted is undefined
Generic.Deleted, Generic.Heading and Generic.Subheading are all defined as the same color (Colors.blue)

https://github.com/Quansight-Labs/accessible-pygments/blob/58caf8c2441670664fd01697688090fd914bfbfb/a11y_pygments/a11y_high_contrast_dark/style.py#L94-L104
I think what is needed is to define Inserted as Colors.green, change Deleted to Colors.red, and (maybe?) change either Heading or Subheading so they are different from one another. The addition of Inserted probably means that a gi class should get added to the CSS files too (unless those are auto-generated? I don't have much experience with pygments development).
For reference, in Monokai (which has better diff highlighting), Deleted is pink, Inserted is a light-yellowish-green, Subheading is a sort of greenish-light-grey, and Heading is undefined.
https://github.com/pygments/pygments/blob/8f3bec7982ba52915ee95f34f18e188243364600/pygments/styles/monokai.py#L100-L111

Thanks for opening this issue @drammock - I will look into these improvements. But since I am going to be on a few weeks leave this fix might only be available in a month or so.

I was talking with @trallard and I believe there are a few things we can try/do.

[ ] generate thumbnails with diff.

I believe it is possible to highlight not only the diff but the underlying language as well. This raise some questions, how do you handle colors, the way other things handle this is that inserted/removed only change the background of the lines.

[ ] Look into a decide wether we can use muted version of greed/red to represent diffs.

authors: Carreau drammock trallard

repo: Quansight-Labs/accessible-pygments


text:
Add interactive documentation examples to at least one project

📝 Summary

Make all the examples in the API reference guide and tutorials of at least 1 project interactive via JupyterLite or PyScript (available to end users).
🚀 Tasks / Deliverables

TBD
📅 Estimated completion

12 months milestone
📋 Additional information

An experimental deployment was done by @steppi for SciPy, see https://github.com/scipy/scipy/issues/19729. Getting ready to do that for the 1.12.0 release which is coming out soon I believe. And then this initial goal will be met.
After that, it's on to further improvements and other projects (xref gh-19 for that year 2 goal).

https://pywavelets.readthedocs.io/en/latest/ is interactive now. There's no shortage of things left to do to mature/polish everything, and deploy things for SciPy and then other projects. But let's leave that for gh-19. I'd say that this goal was met, so closing.

For the record, the work consisted of:

a lot of jupyterlite-sphinx improvements & feature releases
adding CI jobs for Emscripten/Pyodide and ensuring that the test suite passes with it
documentation improvements in the project, modernizing everything etc.. Examples in the API reference work automatically, other code examples in narrative code needed custom directives like .. try-exampes::

Nightly wasm32 wheels are also being produced and uploaded to https://anaconda.org/scientific-python-nightly-wheels/. Those should still be pulled in though (right now the pywavelets inside Pyodide is used); an issue with CORS headers needs resolving on the anaconda.org index to make that work with Pyodide's micropip.

authors: rgommers trallard


text:
API change : add a parameter to filter out dependencies packages

To achieve an usable alpha version of Gator UI, we need to distinguish "listed packages" (the ones from the env yml file) from the dependencies it has. For instance, if asking for pandas, pandas is the list package and numpy would be the dependency.
Let's add a parameter in the API request to filter out the dependency packages
Issue related to #242

Alternatively to changing the API, we can achieve the same goal ( have the list of listed packages without the dependencies ) in a two-step way :
Starting from a given environment :

retrieve its current_build_id : /api/v1/environment/[namespace]/[env_name]/
this yields a result similar to :

{
  "data": {
    "current_build_id": 2,
    "id": 1,
    "name": "env_test_1",
    "namespace": {
      "id": 1,
      "name": "default"
    }
  },
  "status": "ok"
}

from this, retrieve its listed packages : /api/v1/build/[current_build_id]/ which yields something like :

{
  "data": {
    "ended_on": "Wed, 16 Feb 2022 06:32:53 GMT",
    "environment_id": 1,
    "id": 2,
    "scheduled_on": "Wed, 16 Feb 2022 06:31:56 GMT",
    "size": 368554461,
    "specification": {
      "created_on": "Wed, 16 Feb 2022 06:31:56 GMT",
      "id": 2,
      "name": "env_test_1",
      "sha256": "b55c5f8389ce9b6e2b5a9b38ad742d739e6e76f06b24ff3b797bc72a41b1a01d",
      "spec": {
        "channels": [
          "conda-forge"
        ],
        "dependencies": [
          "ipykernel",
          "pandas",
        ],
        "name": "env_test_1",
        "prefix": null
      }
    },
    "started_on": "Wed, 16 Feb 2022 06:31:59 GMT",
    "status": "COMPLETED"
  },
  "status": "ok"
}

The result under ["data"]["specification"]["spec"]["dependencies"] is what's needed.

Closing as this is no longer valid

authors: kcpevey pierrotsmnrd

repo: Quansight/conda-store


text:
Documentation on kubernetes resources and functions for each provider to calculate resources

Description
A common problem that we have had with QHub deployments is getting the memory and cpu right for the jupyterhub and dask gateway profiles. In an effort to further automate this process we would like qhub to be aware of cpu/memory usage of nodes in given kubernetes deployments. Example:

https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#memory_cpu

Success Criterial

[x] #796
[x] #795

def allocatable_memory(total_memory):
     return 0.75 * total_memory

def allocatable_cpu(total_cpu):
      return 0.9 * total_cpu

I've tested it by comparing the output fomr thekubectl command showed above withint the results for the gcp allocation formula... the difference is not too much (~0.6 VCPU or 200~800 Mb ).

The difference is not too much (0.6 VCPU or 200/800 Mb)

This is still quite a bit. Do you have a document that you are compiling that shows what you have measured?

Note that Google may be using Mebibytes: https://simple.wikipedia.org/wiki/Mebibyte

Ephemeral storage: https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#local_ephemeral_storage
Eviction threshold for GCP:
https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#local_ephemeral_storage

Looks like the formulas check out and get nearly exactly right.
# kubernetes units
# E,P,T,G,M,K   10^3, 10^6, ... bytes
# Ei, Pi, Ti, Gi, Mi, Ki = 2^10, 2^20, ... bytes

# https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#node_allocatable

import math

def available_cpu(cpu : int):
    # 6% of the first core
    reserved = 0.06
    if cpu > 1:
       reserved = reserved + 0.01
    if cpu > 2:
       reserved = reserved + 0.005
    if cpu > 3:
       reserved = reserved + 0.005
    if cpu > 4:
       reserved = reserved + 0.0025 * (cpu - 4)
    return cpu - reserved

def available_memory(memory : int):
    # memory in bytes
    Gi = 2**30
    Mi = 2**20
    Ki = 2**10

    eviction_threshold = 100*Mi

    if memory < Gi:
        return memory - (255 * Mi)

    reserved = min(memory, 4*Gi) * 0.25
    if memory > 4*Gi:
        reserved = reserved + min(memory - 4*Gi, 4*Gi) * 0.20
    if memory > 8*Gi:
        reserved = reserved + min(memory - 8*Gi, 8*Gi) * 0.10
    if memory > 16*Gi:
        reserved = reserved + min(memory - 16*Gi, 112*Gi) * 0.06
    if memory > 128*Gi:
        reserved = reserved + (memory - 128*Gi) * 0.02

    return memory - reserved - eviction_threshold

print(available_cpu(4))
print(available_memory(16399092 * 1024) / 1024)

print(available_cpu(8))
print(available_memory(32888740 * 1024) / 1024)

Incoming long description of how we can estimate the allocatable memory and cpu for a given instance size. There are two parts to this problem.

When you provision say a 2 Gi x 1 cpu instance only a fraction of the 2 Gi is actually usable since the linux kernel consumes some memory along with devices that are connected. This is a non-negligible amount. Here is a table with my findings. This problem will exist on every cloud provider. This was checked by provisioning a vm on each cloud provider of different sizes and checking cat /proc/meminfo | grep MemTotal

| Kb Available | Physical Storage | place |
|--------------+------------------+-------|
|     32898016 |               32 | pc    |
|     32823188 |               32 | pc    |
|    263856156 |              256 | pc    |
|     65480752 |               64 | pc    |
|    131716428 |              128 | pc    |
|    131947532 |              128 | pc    |
|    131838128 |              128 | pc    |
|     16269920 |               16 | pc    |
|     16296824 |               16 | pc    |
|     16254080 |               16 | pc    |
|     16399092 |               16 | gcp   |
|     32888740 |               32 | gcp   |
|      1004852 |                1 | do    |
|      2035508 |                2 | do    |
|      4030664 |                4 | do    |
|      8152848 |                8 | do    |
|    263945852 |              256 | do    |
|      4040796 |                4 | gcp   |
|     65969820 |               64 | gcp   |
|      1009616 |                1 | gcp   |
|      2041808 |                2 | gcp   |
|      8152988 |                8 | azure |
|     32887408 |               32 | azure |
|      8166288 |                8 | aws   |
|     61811360 |               60 | aws   |
|    193680648 |              192 | aws   |
|     15807620 |               16 | aws   |
|     32525428 |               32 | aws   |
|     32938904 |               32 | aws   |

When I did a linear fit I got 0.9833x - 1.205e8 where x is the physical number of bytes of the machine and the result is the available memory.

Next cloud providers with their kubernetes implementations reserve a set amount of ram and cpu. Many example are seen in this issue. The formula for calculation on gpu is above and quite accurate within 10Mi.

With this approach we should reliably get the available memory within 150Mi. There are a few outliers. The OS/distro does seem to have a significant impact on the available memory. This was especially clear on aws ubuntu.

Without any tweaking this got the available kubernetes memory within 20Mi. So I think a 200Mi fudge factor would be more than enough.
# kubernetes units
# E,P,T,G,M,K   10^3, 10^6, ... bytes
# Ei, Pi, Ti, Gi, Mi, Ki = 2^10, 2^20, ... bytes

# https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#node_allocatable

import math

def available_cpu(cpu : int):
    # 6% of the first core
    reserved = 0.06
    if cpu > 1:
       reserved = reserved + 0.01
    if cpu > 2:
       reserved = reserved + 0.005
    if cpu > 3:
       reserved = reserved + 0.005
    if cpu > 4:
       reserved = reserved + 0.0025 * (cpu - 4)
    return cpu - reserved

def available_memory(memory : int):
    # memory in bytes
    Gi = 2**30
    Mi = 2**20
    Ki = 2**10

    # using linux kernel requirements
    memory = memory * 0.9833 - 1.205e8

    eviction_threshold = 100*Mi

    if memory < Gi:
        return memory - (255 * Mi)

    reserved = min(memory, 4*Gi) * 0.25
    if memory > 4*Gi:
        reserved = reserved + min(memory - 4*Gi, 4*Gi) * 0.20
    if memory > 8*Gi:
        reserved = reserved + min(memory - 8*Gi, 8*Gi) * 0.10
    if memory > 16*Gi:
        reserved = reserved + min(memory - 16*Gi, 112*Gi) * 0.06
    if memory > 128*Gi:
        reserved = reserved + (memory - 128*Gi) * 0.02

    return memory - reserved - eviction_threshold

print(available_cpu(4))
print(16 * 2**30 / 1024 - 16399092)
print(available_memory(16 * 2**30) / 1024 - 13610740)

print(available_cpu(8))
print(32 * 2**30 / 1024 - 32888740)
print(available_memory(32 * 2**30) / 1024 - 29093796)

# so within the 20Mi for the estimate

Without any tweaking this got the available kubernetes memory within 20Mi. So I think a 200Mi fudge factor would be more than enough.
# kubernetes units
# E,P,T,G,M,K   10^3, 10^6, ... bytes
# Ei, Pi, Ti, Gi, Mi, Ki = 2^10, 2^20, ... bytes

# https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#node_allocatable

import math

def available_cpu(cpu : int):
    # 6% of the first core
    reserved = 0.06
    if cpu > 1:
       reserved = reserved + 0.01
    if cpu > 2:
       reserved = reserved + 0.005
    if cpu > 3:
       reserved = reserved + 0.005
    if cpu > 4:
       reserved = reserved + 0.0025 * (cpu - 4)
    return cpu - reserved

def available_memory(memory : int):
    # memory in bytes
    Gi = 2**30
    Mi = 2**20
    Ki = 2**10

    # using linux kernel requirements
    memory = memory * 0.9833 - 1.205e8

    eviction_threshold = 100*Mi

    if memory < Gi:
        return memory - (255 * Mi)

    reserved = min(memory, 4*Gi) * 0.25
    if memory > 4*Gi:
        reserved = reserved + min(memory - 4*Gi, 4*Gi) * 0.20
    if memory > 8*Gi:
        reserved = reserved + min(memory - 8*Gi, 8*Gi) * 0.10
    if memory > 16*Gi:
        reserved = reserved + min(memory - 16*Gi, 112*Gi) * 0.06
    if memory > 128*Gi:
        reserved = reserved + (memory - 128*Gi) * 0.02

    return memory - reserved - eviction_threshold

print(available_cpu(4))
print(16 * 2**30 / 1024 - 16399092)
print(available_memory(16 * 2**30) / 1024 - 13610740)

print(available_cpu(8))
print(32 * 2**30 / 1024 - 32888740)
print(available_memory(32 * 2**30) / 1024 - 29093796)

# so within the 20Mi for the estimate

Amazing! Thank you so much for this data as well as the python template. May I ask if you tested a QHub deployment with those resources specs?

@costrouc @viniciusdc can you update this issue and include additional action items?
Also, should we close #796 in favor of this issue?

Hi Kim, some context here, some clients and users related that it would be beneficial to qhub to:

have a tool to identify system mem/cpu usage, need to instantiate a determined profile. Right now we suppose some values that are `good enough to create each user/worker pod, but they don't reflect the total capabilities of the machine type and cluster node assigned to the profile.

So @costrouc and I worked on getting an automatic tool to generate the qhub profiles based on the machine type the user requests with the most efficient resource utilization. Chris came with the prototype within the above comment to address #795  (which was closed by the stale bot), and some docs should then be added to inform the user about this.
We have the prototype, but now:

we need to implement this by taking into consideration the new structure of qhub (post 0.4.0)
test and debug as each cloud provider has a different way to inquire machine type data (that's why only a few of the cloud providers would get this initially)
then test with an end-to-end deployment:
this comment  sumirezes the most important information regarding this issue.

Closing in favor of https://github.com/nebari-dev/nebari/issues/35

authors: costrouc kcpevey tylerpotts viniciusdc

repo: Quansight/qhub


text:
RPCs to support integrations with any language

The LEAN engine has some great abstractions/interfaces (IDataFeed, ITransactionHandler, etc) that are pluggable. However, it's difficult to implement these interfaces in languages other than C#/python.
Has there been any consideration to exposing these services over some sort of rpc/socket/protocol?
I would like to run the LEAN container and interact with it as a service via other toolchains (go, zig, js, etc).

@seanlaff Guess there won't be official support for RPC soon, but you can always do it yourself making Lean either as rpc server / or client, and contribute back :-)

We had prototypes of this and the backtesting process was just too slow. Since it's all event-driven the synchronous RPC overhead was enough to slow it all by 10x. We also could not afford the bandwidth to maintain N copies of documentation with all the different examples of variations on the API so had to narrow the focus to the two most popular.

authors: jaredbroad mw66 seanlaff

repo: QuantConnect/Lean


text:
Convert from CRLF to LF for GDAXDownloader

Produced from git autocrlf

Any particular reason this change is needed? It looks like most (maybe all?) of the files in this repo (except any .sh scripts) use windows line ending conventions of CRLF -- if we do want to use unix style LF line ending convention than we should convert the entire repository in one fell swoop.
@jaredbroad -- what's your preference here? CRLF or LF line endings? Perhaps we should also update the CONTRIBUTING.md to specify how to configure git to ensure line endings remain consistent.

This is the only file that kept causing showing as changed with my Git client (GitKraken). I assumed it was autocrlf that was changing the file.
Does anyone else have a similar issue?

On 29 Oct 2018, at 7:30 pm, Michael Handschuh notifications@github.com wrote:
Any particular reason this change is needed? It looks like most (maybe all?) of the files in this repo (except any .sh scripts) use windows line ending conventions of CRLF -- if we do want to use unix style LF line ending convention than we should convert the entire repository in one fell swoop.
@jaredbroad -- what's your preference here? CRLF or LF line endings? Perhaps we should also update the CONTRIBUTING.md to specify how to configure git to ensure line endings remain consistent.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Thanks for PR @dd-w -- suggest we keep it as the bulk of repo for now like @mchandschuh mentioned.
I'm guessing your IDE/git is converting it as you work on the files

@jaredbroad @mchandschuh I looked into it further and from what I can tell, in this repo on Github the only file that has CRLF line ending is GDAXDownloader.cs. I could only verify this by downloading the raw files from Github - not by checking out the repo as Git will automatically converts to CRLF for me.

Great point, I foolishly checked the files on my local machine.

authors: dd-w jaredbroad mchandschuh


text:
fix math in discrete_dp.rst

This is probably the best solution because I don't think math works in bullet lists

@natashawatkins Thanks, looks good.

authors: jstac natashawatkins

repo: QuantEcon/lecture-source-py