text:
Make error message (for when the admin intervention flag is set) work with Test PyPI

Right now, when someone tries to upload a package to PyPI but the admin intervention flag is set (meaning that we're under a spam attack and the PyPI admins have temporarily shut off all uploads), the error message we send them includes -- hardcoded -- the URL https://pypi.org. Instead, we should use Pyramid's URL routing to refer to the URL of the PyPI in question, thus ensuring that we send error messages that, as appropriate, refer to pypi.org, test.pypi.org, or any other future PyPI.
To fix this, look at warehouse/forklift/legacy.py and tests/unit/forklift/test_legacy.py (the test is test_fails_with_admin_flag_set), and make changes similar to the changes I made in #3183. If you're used to string substitution/string formatting in Python, this should be a pretty approachable first Warehouse issue.

Good First Issue: This issue is good for first time contributors. If you've already contributed to Warehouse, please work on another issue without this label instead. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our Getting Started Guide. If you are working on this issue and have questions, please feel free to ask them here, #pypa-dev on Freenode, or the pypa-dev mailing list.

I believe @saxenanurag is working on this in #3405.

Hi. Sorry I have been moving apartments. I will get back to this soon.

authors: brainwane saxenanurag

repo: pypa/warehouse


text:
Email notification for demoted/removed user

Followup to #1000: we should email the user (and possibly all the other owners/maintainers of a project as well) when they were an owner/maintainer of a project but have just been demoted or removed from the project.

if a user is removed from a [maintainer or owner] role, then that user should also be emailed (e.g., to prevent an attacker who has compromised one owner, from silently removing other owners of a package, prior to uploading a new malicious package, thereby circumventing #997).

-- @edmorley

To do this the right way, we should wait till we have #5863 implemented, so we can draw on the event logging and use it to trigger this notification.

I finally got the code in #3853 rebased on master, and am looking at driving the notifications from the event logging.  I don't see any triggers or signal plumbing in #6339.  When you say the event logging should trigger the notification, are you talking about calling these notifications directly from Project.record_event and User.record_event?  Or are you looking for us to use the db signals to watch for UserEvent objects being created?

I defer to @di and @ewdurbin and @yeraydiazdiaz on this.

@di do you have some feedback on @rascalking's question?

I think either could work. I think it would be probably more straightforward to just do this in *.record_event, and probably more thorough to hook into ProjectEvent/UserEvent object creation.
I think what would be even more powerful is if every Event was published to our task queue, and for every individual type of event, there was a way to resolve asynchronous actions that should happen as a result of that event, like sending an email. That's a bit more than what we're asking for here right now though.

@rascalking Any updates here? Are you still working on this?

Sorry, I don't think I'm going to be able to finish this.

Thank you, @patelneel55!

source: gharchive/issue

authors: brainwane di rascalking

license_type: permissive

license_source: github-api


text:
Fix package_releases with a non-existent project

Fixes this:
import xmlrpc.client

c = xmlrpc.client.ServerProxy("https://pypi.org/pypi")
c.package_releases("this-doesnt-exist")

raising:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    c.package_releases("asdadsadsadasdasd")
  File "/Users/dstufft/.pyenv/versions/3.6.2/lib/python3.6/xmlrpc/client.py", line 1112, in __call__
    return self.__send(self.__name, args)
  File "/Users/dstufft/.pyenv/versions/3.6.2/lib/python3.6/xmlrpc/client.py", line 1452, in __request
    verbose=self.__verbose
  File "/Users/dstufft/.pyenv/versions/3.6.2/lib/python3.6/xmlrpc/client.py", line 1154, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/Users/dstufft/.pyenv/versions/3.6.2/lib/python3.6/xmlrpc/client.py", line 1170, in single_request
    return self.parse_response(resp)
  File "/Users/dstufft/.pyenv/versions/3.6.2/lib/python3.6/xmlrpc/client.py", line 1342, in parse_response
    return u.close()
  File "/Users/dstufft/.pyenv/versions/3.6.2/lib/python3.6/xmlrpc/client.py", line 656, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32500: 'application error'>

Which is ultimately:
NoResultFound: No row was found for one()
  File "pyramid/tweens.py", line 39, in excview_tween
    response = handler(request)
  File "pyramid/router.py", line 156, in handle_request
    view_name
  File "pyramid/view.py", line 642, in _call_view
    response = view_callable(context, request)
  File "pyramid/config/views.py", line 181, in __call__
    return view(context, request)
  File "pyramid/viewderivers.py", line 390, in attr_view
    return view(context, request)
  File "pyramid/viewderivers.py", line 368, in predicate_wrapper
    return view(context, request)
  File "warehouse/sessions.py", line 302, in wrapped
    return view(context, request)
  File "warehouse/csrf.py", line 38, in wrapped
    return view(context, request)
  File "pyramid/viewderivers.py", line 439, in rendered_view
    result = view(context, request)
  File "warehouse/legacy/api/xmlrpc/cache/derivers.py", line 43, in wrapper_view
    view, (context, request), {}, key, _tag, expires
  File "warehouse/legacy/api/xmlrpc/cache/services.py", line 56, in fetch
    return self.redis_lru.fetch(func, args, kwargs, key, tag, expires)
  File "warehouse/legacy/api/xmlrpc/cache/fncache.py", line 94, in fetch
    func.__name__, key, func(*args, **kwargs), tag, expires
  File "pyramid_rpc/mapper.py", line 99, in _nonclass_view
    response = self.mapply(view, params, keywords)
  File "pyramid_rpc/mapper.py", line 133, in mapply
    return ob(*args)
  File "warehouse/legacy/api/xmlrpc/views.py", line 197, in package_releases
    func.normalize_pep426_name(package_name))
  File "sqlalchemy/orm/query.py", line 2854, in one
    raise orm_exc.NoResultFound("No row was found for one()")

This comes from https://sentry.io/python-software-foundation/warehouse-production/issues/528467317/

Note: This behavior matches what Legacy PyPI did here.

source: gharchive/pull-request


text:
Do not push tab state to history. #3997

Fixes #3997

I think we probably still want this behavior, we just don't want it to happen on page load when there is no fragment.

Updated, here's a capture of the current behaviour

authors: di yeraydiazdiaz


text:
Loading environments/tools fails silently

Bug
When launching application, its and tools environments are loaded from json files. If there is syntax error in them, they are not loaded but it fails silently, no error message or warning. This is making it hard to find out why something is not working as expected.

This is somewhat resolved in 3.0 by validating the syntax at the time of saving the environments in the settings. I'd say that makes this a lower priority.

authors: antirotor mkolar

repo: pypeclub/OpenPype

license: MIT


text:
Robotics_motion Service Abnormal Disconnection

During a cyclic endurance test, after running 3160 cycles, the robot stopped moving. The following error messages were output in the output window:

cycle count:
3158
cycle count:
3159
cycle count:
3160
Execute procedure "hello" failed:
Traceback (most recent call last):
File "/home/boomy/venv/lib/python3.9/site-packages/pyri/sandbox/pyri_sandbox.py", line 290, in Next
self._locself._procedure_name
File "<pyri_sandbox>", line 15, in hello
File "/home/boomy/venv/lib/python3.9/site-packages/pyri/robotics/sandbox_functions.py", line 96, in robot_movej
move_gen = motion_service.movej(robot_name, joint_pos_degree, float(speed_perc))
File "/home/boomy/venv/lib/python3.9/site-packages/RobotRaconteur/RobotRaconteurPythonUtil.py", line 244, in
return lambda self, *args: stub_functioncallgenerator(stub, m1.Name, m1, *args)
File "/home/boomy/venv/lib/python3.9/site-packages/RobotRaconteur/RobotRaconteurPythonUtil.py", line 457, in stub_functioncallgenerator
return GeneratorClient(stub.GeneratorFunctionCall(name, m), type1.ReturnType, param_type, stub, stub.RRGetNode())
File "/home/boomy/venv/lib/python3.9/site-packages/RobotRaconteur/RobotRaconteurPython.py", line 6639, in GeneratorFunctionCall
return _RobotRaconteurPython.WrappedServiceStub_GeneratorFunctionCall(self, FunctionName, args)
RobotRaconteur.RobotRaconteurPythonError.RequestTimeoutException: RobotRaconteur.RequestTimeout Request timeout

Attempting to run Procedures again results in the same error and displays the following message box:

The web page shows that robotics_motion is in a disconnected state:

Attempts to manually start the pyri-robotics-motion-service service fail with the message: "Exception: Identifier UUID or Name already in use":

I have checked the log information but did not find any useful error messages.
pyri-core-2024-01-19--13-33-08.zip
System Version: Ubuntu 22.04 + Preempt RT (please disregard 'VirtualBox' as it is actually running on a physical machine).
Python Environment: pyenv + Python 3.9.5
Installation Method: Followed the instructions in the readme, installed using pip and pyri-cli webui-install
Robot: Realman RML63
Robot Driver: TCP + JSON protocol communication at 100Hz
Could you please advise on how to further investigate this issue to improve system stability? Also, I increased the sampling points to 40 as per this issue. Might this change be affecting the system? Thanks for your help!

Hi @maxwelllls, the procedure runtime sandbox is not intended to have the cycle looped within the produce. If possible, please use the "Main" panel to create a state machine and call the produce repeatedly. You can have it "Jump" at the end of the block to the same block name to repeat.
https://github.com/pyri-project/pyri-core/blob/master/doc/user_programming_guide.md#main-state-machine

Following your suggestion, I switched to using the main component for loop testing. However, after about 1000 iterations, the pyri_robotics_motion_service still crashed, leading to the failure of movej command calls.

By using netstat -an | grep 55921, it can be observed that a TCP server remains in the LISTEN state, and a large number of TCP connections are stuck in the closing process, not closing correctly.

The steps to reliably reproduce the issue are as follows:
Run run_2ur5e_sim, set two groups of joint poses with minimal differences, which I've named ur_ref_pos_1 and ur_ref_pos_1_1, then cycle through them. It takes about 10 minutes to reach 1000 iterations and cause a crash."

Using the command netstat -an | grep 55921 it can be observed that the TCP server remains in the LISTEN state, but a large number of TCP connections are stuck in the CLOSE_WAIT state. This seems to indicate an issue with the server-side program logic, possibly failing to properly handle the logic for closing connections.

After enabling debug mode, the log files obtained continuously indicate failures in IPv6 connections, but there is no information related to the crash.
debug_log.txt

Hi, thank you very much for taking the time to address this issue. I have also been studying the RR source code, hoping to gain a deeper understanding and contribute to the development of this project. I appreciate your efforts and look forward to any insights you may have regarding the problem.

Hi@johnwason，After spending some time reading the source code and debugging, I've been able to pinpoint that void ServiceSkel::CleanupGenerators() starts to clean up outdated Generators after 10 minutes, which then highly likely leads to timeouts when calling the movej function. The code uses mutexes to protect generators, but I suspect there might be conflicts with other resources, such as ASIO.
Given the vastness of the RR framework, my understanding of the code is still quite limited. Could you provide some guidance on directions for further investigation?

@maxwelllls can you run pip list on your venv so I can see what packages and versions are installed?

Also can you look at the developer console on the web browser? It looks like the browser may be creating a lot of connections and closing them.

Following your instructions, I have provided the requested information. The console messages appeared only upon accessing the webpage and did not update when starting or encountering issues with the Procedures. It was a few minutes after the failure of running Procedures that new messages indicating "client closed" appeared. Attached are the results of the pip list command, screenshots of the browser page, and the full browser console output for your review.
pip list.txt
Screenshot
console-export-2024-3-7_9-0-41.txt
I hope this information helps with troubleshooting. Thank you for your guidance and support.

Thanks for the data
I think I have reproduced the problem. I am trying to track down the cause.
The connection errors you see in the console are actually normal behavior. There are several candidate URLs to connect to the services, and the errors you are seeing are the rejected URLs. It looks like the connections are successful.

By shortening the cleanup time for generators to 1 minute and increasing the call frequency of movej as much as possible (unrelated to the length of the movej path, using rapid short paths and 100% speed), the issue can be quickly reproduced. Looking forward to your findings.

I think the problem is in the class TrajectoryMoveGenerator in pyri.robotics.robotics_motion_service.__main__. The cleanup generator function is collecting this class. Something is causing a leak or possibly a concurrency problem. This class is currently implemented as a synchronous generator, where it really should be an asynchronous generator. See https://robotraconteur.github.io/robotraconteur/doc/core/latest/python/api/Generators.html . There is a newer utility in the companion library to help with this design pattern: https://github.com/robotraconteur/robotraconteur_companion_python/blob/master/src/RobotRaconteurCompanion/Util/TaskGenerator.py

It looks like objects from Toppra may be passed to the generator. If Toppra memory is being released by RR it could definitely cause a problem.

The problem was a complex interaction between locks in C++ and the Python Global Interpreter Lock (GIL). In the CleanupGenerators() function, In the function, the generators_lock is used to protect the map during modification. Before, the generators were being destroyed when the generators_lock was still held. Because the objects being destroyed were from Python, the GIL had to be locked. Because of the order of locking, this was causing deadlocks with other threads. The pull request https://github.com/robotraconteur/robotraconteur/pull/179 modifies the destruction process so that the actual deletion in Python happens after the lock is released. This is a complex interaction that is harder to predict and can be even harder to fix.
There was also an issue where the generators were not being deleted immediately once they were complete rather than later with a timeout. That is why the issue was only showing up after a while.
Releasing the core Robot Raconteur library is a little complicated so you will need to build from source until I am able to release it.
There is also a problem where the motion execution will get stuck if you stop the procedure. This is unrelated and I will work on fixing it. For now, if you click "Enable Jog" it will clear the deadlock.

Thank you for resolving this issue. Building from source is feasible, and I've been trying to fix this problem through code modifications this week. Currently, the code uses CleanupGenerators to delete outdated Generators. Could we consider explicitly calling close to clean up these Generators?

After reviewing your pull request, I noticed that SendGeneratorResponse() now explicitly erase the generators.
I’ve successfully run 5000 tests without issues.

https://github.com/robotraconteur/robotraconteur_standards/blob/master/draft/object_protocol.md#generatornext
This is the spec on how the generator should behave. I think there are still a few more places the lifecycle needs to be improved but I think the major errors are fixed.

Then, can I directly base my work on the standard robot, adding functions such as nativeMoveL, nativeMoveC that directly call the robot's own APIs, bypassing the planning part and sending commands directly to the robot?

authors: johnwason maxwelllls

repo: pyri-project/pyri-robotics


text:
Variance of any wave function

May I know if there's a method to evaluate the variance ($$Var(\Psi) = \langle\Psi|\hat{H}^2|\Psi\rangle - \langle\Psi|\hat{H}|\Psi\rangle^2$$ for any $$\Psi$$(like UHF/RHF)?

Analytical evaluation of $H^2|\Psi\rangle$ is not currently available. This feature will be unlikely added in the future.

Probably related to #1669.

authors: Jackson0106 jeanwsr sunqm

repo: pyscf/pyscf


text:
Updated tests to work with new test-data organization

the test data folders were changed and some filenames were changed. This PR also includes some other small changes that I needed to make in order to get the tests to pass.
Closes #142

The Vega model should not always be 5000 because other modes need different models, hence the check and making the filename each time.

Yes, I agree, but I found this bug as part of this work; fixing it is beyond the scope of this PR.  I've opened an issue: #150 to address it.

Maybe I am misunderstood.   Did it break?  Or were you just trying to clean up code?

Regarding Vega5000. I don't remember if it broke or not....I think I noticed it because my linter identified those variables (model and file) were not being used.  So I commented out their declarations to call more attention to the problem.  So yes, that change was just me cleaning the code.

I think it would be easier to simply convert whatever the uses to all lowercase letters because eventually there will be other instruments.

Again, I agree, this part of the code needs attention. I just added a "quick fix".  I've opened an issue to address the larger issue more thoughtfully: #151

One thing I am personally working on in all my coding projects is having pull requests address one problem and to try to avoid "coding creep". This makes pull requests easier to review and to merge when they don't touch too many things at once.
Here are some documents which have influenced my approach

https://gist.github.com/sktse/569cb192ce1518f83db58567591e3205
https://google.github.io/eng-practices/review/developer/small-cls.html - where CL = pull reqest.

authors: kelle michaelcushing

repo: pyspextool/pyspextool


text:
Add R: prefix implementation and unit tests

I have created a separate PR to clean up the git log.
Proposal for parametrized tests
Since all of the standard tests can be expressed in the form of [existing envs] + [ini file] -> [new envs], I propose having a parametrization with these three parameters. For more advanced tests, we can leave the previous example if there's a need.

Instead of this custom class can we just use pytest.param instead please?

Thank you for feedback, let me know if you'd have further comments/suggestions

Have few more comments also make sure CI passes.

Can you please allow change from maintainers? I can't push to this PR https://github.com/gaborbernat/pytest-env/commit/7c193da4420ceab55b12502821082e5ecefa4a1c

Can you please allow change from maintainers? I can't push to this PR gaborbernat@7c193da

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork

It is already enabled for this PR (#9 ), let me know if I can do anything else

Please check the linked commit and apply all changes as are there, including naming.

Please check the linked commit and apply all changes as are there, including naming.

Changes applied, please review

authors: Elijas gaborbernat

repo: pytest-dev/pytest-env


text:
Do not overwrite np = numpy with an array size.

The function failed to be called with python3

Coverage remained the same at 76.004% when pulling 8e6a853c71a56cf20c2fa4f6e5047814111cb9df on ochurlaud:patch-1 into 7b07af353a6455accbbc55fd379a1fd69c584622 on python-control:master.

I would not expect this to only affect Python 3.

Can you provide an example that demonstrates the error?
Since np as an identifier for numpy is not used within the function scope after where np is assigned to an array size, it is not an error. I agree that changing the name would improve the style, but it is not a matter of correctness.

Hum, I don't remember: it was some time ago. Comparing to other modules, t should be call _np I think instead of what I wrote. Anyway: as it's a small fix, without huge repercussions, I think it should be somehow done.
Even if you don't use my PR, just do the correction somehow?

I fixed this on #100.  It is a bug; if, on that branch, I revert from np_ to np,  I get the error below.  I'd have to read up on how Python handles globals and locals to explain this (did that change in Python 3?).
Test h2syn
----------------------------------------------------------------------
Traceback (most recent call last):
  File "robust_test.py", line 34, in testH2syn
    k = control.robust.h2syn(p, 1, 1)
  File "/home/rory/src/python-control/control/robust.py", line 91, in h2syn
    n = np.size(P.A,0)
UnboundLocalError: local variable 'np' referenced before assignment

Ok, then maybe merging #100 would be better than mine.

Changes from pull request #100 were merged, which subsumes changes from here, as noted above. In particular, cf. lines 93 and 157 of control/robust.py as of commit d4e015598cc88d0b08104754b899e1f6156eb68a (current tip of master branch).
@ochurlaud Nonetheless, thanks for this pull request. I should have been faster to review it.

authors: coveralls ochurlaud roryyorke slivingston

repo: python-control/python-control

license_source: bigquery


text:
Updated discord invite regex to match leading http/https/www

Closes #123

Added new optional groups to start of pattern

r"(https?://)?(www\.)?"

Added additional unit tests to confirm both re.match and re.search works as intended
Unified usage of flags keyword argument
Removed an existing redundant character class

Looks good, could you bump the version up by a minor version, and document the change in the change log.
There's some info about the change log in the docs readme

repo: python-discord/bot-core


text:
Add default unicode emoji for trashcan

https://github.com/python-discord/site/pull/882
@wookie184

We still want to use the custom one on the server, so this would require setting the env variable in production.
An alternative approach would be to use the Client.debug constant, which defaults to true, but is set to false in production. If this is true we would use the unicode default if the env var wasn't set (this wouldn't require any changes to production environment variables)
Do @python-discord/devops have a preference?

An alternative approach would be to use the Client.debug constant, which defaults to true, but is set to false in production. If this is true we would use the unicode default if the env var wasn't set (this wouldn't require any changes to production environment variables)

I don't see Client.debug being false anywhere, if anything, we need to set it false by ourselves. Am I right? Or does this happen outside constants.py

The BOT_DEBUG environment variable is set in production, production environment variables can only be set by a member of the devops team. Since it's already set that's why I suggested using it to determine what default to use for the reaction (keeping the reaction production constant here also makes it easier to change in the future if necessary).

Sorry, I forgot that isn't a f-string thing, can just remove the f, my bad 😅

Hmm wait i'm not even sure if it's working without, let me try it

Hmm wait i'm not even sure if it's working without, let me try it

okay, I will be waiting.

Hmm wait i'm not even sure if it's working without, let me try it

okay, I will be waiting.

Never mind, just fixing the lint error should be fine. I just had BOT_DEBUG=false in my .env for some reason.

repo: python-discord/sir-lancebot


text:
Add py.typed files

Fixes https://github.com/python-poetry/poetry/issues/5099
This PR adds a py.typed file to mark the poetry-core source code as containing type hints.
Having poetry-core typed allows Poetry plugins to be more thoroughly type checked with Mypy.

Hello @NiklasRosenstein,
thanks a lot for your contribution :+1:
We would like to wait for this until we thoroughly type checked poetry-core itself with mypy to give you the best experience with it. :smiley:
fin swimmer

Hey @finswimmer,
Don't you think that having some wrong types is better than no types to check against?
It also opens up the opportunity for consumers for poetry-core to detect typing issues; see #270

I think on the whole this would be better in than not in

we probably have made progress on the typechecking in this project since this MR was originally raised
most remaining errors are probably mostly on internal methods and won't harm users of this library
but anyway surely the only user of this library that counts is poetry itself, and if poetry would find it helpful to have typing here then that's the main thing

And if there are still mistakes then having a py.typed will encourage putting them right.
We could be still further ahead on the typechecking if the MRs that helped to progress this would be merged.  https://github.com/python-poetry/poetry/issues/5017 asks for community help, but poetry is slow to accept that help when it arrives.  I added a list of open MRs that I know about at https://github.com/python-poetry/poetry/issues/5017#issuecomment-1110052823.

I suppose this can be closed because py.typed has already sneaked in via #331. 😉

py.typed has already sneaked in via https://github.com/python-poetry/poetry-core/pull/331.

I just noticed that myself!  This was an accident, I'd been trying the effect of adding this and... well, I guess an empty file is an easy thing to miss in a diff.
Anyway, I came here to say that it had gone in accidentally but I reckon that it should stay anyway, happy to see that this was already the thought.

authors: NiklasRosenstein dimbleby finswimmer radoering

repo: python-poetry/poetry-core

license: mit


text:
can not set a eventloop to streamz

when i set a asyncio eventloop to  streamz there is a error '_UnixSelectorEventLoop' object has no attribute 'add_callback'

evn: pyhton3,7

requirements:
structlog==19.1.0
streamz==0.5.2
cmp-version==3.0.0
confluent-kafka==1.3.0
hiredis==1.0.0
aredis==1.1.5
geoip2==3.0.0
msgpack==1.0.0
protobuf==3.11.3
grpcio==1.29.0
aiogrpc==1.7

code:

...
def main(loop):
   ...
   source = Stream.from_kafka(value["in"], LISTENED_KAFKA_PARAMS, asynchronous=True,loop=loop)
        source.buffer(10000).map(lambda x: json.loads(x.decode("utf-8"))).filter(data_filter).sink(value["handdler"])
        sources[key] = source
    for source in sources.values():
        source.start()

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    main(loop)
    try:
        log.warn("process start")
        loop.run_forever()
    except KeyboardInterrupt:
        pass
    finally:
        loop.close()
        log.warn("process stoped")

Since streamz has been around a while, it might need to be a tornado IO loop - but those can be made from asyncio loops, so a single lie for conversion should save you. https://www.tornadoweb.org/en/stable/asyncio.html#tornado.platform.asyncio.AsyncIOLoop

thanks

repo: python-streamz/streamz


text:
fix tests for strict exception groups

fix tests to work with strict and non-strict exception groups
add python 3.12 to build, drop python 3.7 (end of life)
upgrade dev dependencies where needed for newer python versions

@VincentVanlaer I explained it in a thread of another project, but merely patching tests to handle strict exception groups doesn't provide any assurance that the runtime code supports strict exceptions.  For example, where the API was previously raising a bare exception, it might now raise an ExceptionGroup (the API should probably never raise Exception group).  Likewise, internally to the runtime, if there are any except statements catching bare exceptions, they need to be ported to excptiongroup catches.

My main goal wasn't to fully assure the exception groups are as expected, but to have the dependencies be up to date to support python 3.11 (grpc is problematic, as it seems you have noticed) for runnign tests locally. I should have explained that in more detail, my bad! I agree with your assessment about exception groups though. Thanks for making the final changes!

@VincentVanlaer what version of Trio is used in your project?  I'm thinking of doing a purerpc release with the restriction trio < 0.25, which gives a strong hint that the package isn't ready for strict exception groups (I doubt anyone is going out of their way to override the default and enable it).

I'm currently using the latest trio release, and haven't encountered any problems. I'll make an issue to discuss this further this evening.

repo: python-trio/purerpc


text:
🛑 Avatar Api is down

In d72670b, Avatar Api (https://avatar.roblox.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Avatar Api is back up in 0c6c7f7 after 13 minutes.

repo: pythoniaweb/roblox-status


text:
🛑 2FA Api is down

In 46ee0a5, 2FA Api (https://twostepverification.roblox.com/) was down:

HTTP code: 404
Response time: 114 ms

Resolved: 2FA Api is back up in 61125d4 after 1 hour, 4 minutes.


text:
Learning to use clr-loader

I am learning to use clr-loader because my environment does not allow non-pure python libraries.
If I were using pythonnet I would something like:
>>> import clr
>>> clr.AddReference('System.Data')
<System.Reflection.RuntimeAssembly object at 0x00000229C0EC3288>
>>> from System.Data import DataTable
>>> DataTable()
<System.Data.DataTable object at 0x00000229C0EC3288>

What would be the equivalent in clr-loader?
FYI, my goal is to call the Server constructor of this.

clr_loader is extremely limited with regard to what you can call, pretty much exactly what is given in the example: A function with the signature static int ...(IntPtr arg, int size)
The .NET Core (or 5, 6, ...) hosting api is intentionally very limited. If you need more, please use Python.NET.

authors: filmor matthias-github

repo: pythonnet/clr-loader


text:
Performance dependent on GPU type?

Hi, is flex attention performance dependent on GPU type?
Do you have any (anecdotal or quantitative) estimates of performance improvements for different GPU types?
(Related to #21 )

Hi ALex, when you say GPU types, do you mean NV vs AMD, or V100 vs H100?
Flex Attention has hand written heuristics for A100 & H100, therefore it should perform best on these GPUs out of the box. For other models, you might want to turn on max_autotune to generate the optimal performance. We're working on generating some performance comparisons on different GPUs, and will update once we get them.

Hi - thanks for the reply!
I meant more V100 vs H100 etc.
thanks for the tips - and look forward to performance comparisons!

authors: alex-hh joydddd

repo: pytorch-labs/attention-gym


text:
numeric difference with/without float8 all-gather when enabling torch.compile

when torch.compile is enabled, there is numeric difference in test_cls.assertEqual(losses[0], losses[1], atol=1e-4, rtol=1e-4)
for eager, with/without float8 all-gather is on par, test_cls.assertEqual(losses[0], losses[1])
repro
pytest -s test/float8/test_fsdp2/test_fsdp2.py -k test_transformer_parity

@bdhirsh @vkuzo wonder if you have some suggestions on how to debug torch.compile numerics? My current approach is enable TORCH_LOGS="output_code" and put breakpoints/printing in output code python files

repo: pytorch/ao


text:
.circleci: Bump xcode workers to 9.4.1

Upstream is on 9.4.1 and we were experiencing issues when conda-build
was attempting to check for overlinking and failed out due to some files
not existing in xcode 9.0
Should fix issues for macOS builds
Similar to https://github.com/pytorch/vision/pull/2633
Signed-off-by: Eli Uriegas eliuriegas@fb.com

Is this related?
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
  The CMAKE_C_COMPILER:

    /Applications/Xcode-9.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:3 (project):
  The CMAKE_CXX_COMPILER:

    /Applications/Xcode-9.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!

The error is related to a caching error, I've force-pushed a commit that should clear the cache

I don't believe the failures are related to the contents of this PR, going to go ahead and merge and will watch CI to make sure it doesn't cause any other issues.

authors: seemethere vincentqb

repo: pytorch/audio


text:
WMT14en2de validation dataset is not newstest2013?

❓ Questions and Help
Before asking:

search the issues.
search the docs.

What is your question?
I understand that prepare-wmt14en2de.sh generates train/valid/test sets automatically, but I do not see newstest2013, which is used as dev set in many papers, is directly used. The valid set is instead generated by splitting the training set? Do I miss something here or I should modify the script to account for newtest2013?
If we are using newstest 2013 as valid set, newstest 2014 as test set. The best BLEU score on the dev set should be close to the score on the test set. I trained a Transformer base on europarlv7, it can score over 30 BLEU score on the dev set, but only 20 on the test set? This might suggest that actual dev set we use is not newstest 2013? Thank you
Code

What have you tried?
What's your environment?

fairseq Version (e.g., 1.0 or master): 0.9
PyTorch Version (e.g., 1.0): 1.2
OS (e.g., Linux): Linux
How you installed fairseq (pip, source): source
Build command you used (if compiling from source):
Python version: 3.7
CUDA/cuDNN version: 10.2
GPU models and configuration:
Any other relevant information:

@myleott Hi, could you look at this problem? I'm really in a hurry.

@alexeib Hi, could you look at this query? Am I missing something here?

Hi @haorannlp,
We used a subset extracted from train as validation set in this setup, that was a fairly common practice back when this script was written. You're right that nowadays, I'd use newstest13 for validation instead. If you'd like, feel free to add an option to the script to use newstest2013 as a valid and send a pull request.
Thanks,
Sergey

authors: edunov haorannlp

repo: pytorch/fairseq


text:
mBART w/ Arabic source language

Hi --
I was able to ~ reproduce the results of fine-tuning mBART for English->Romanian translation.  I'm interested in trying to reproduce some of the other results in the paper.
I'm curious whether anything needs to be done in either the preprocessing or training scripts to account for the fact that Arabic is written right-to-left instead of left-to-right.  I'm assuming I should be using the same approach that was used in mBART pre-training, but unfortunately I don't think the source code for that is available (yet?).
Thanks!

@myleott maybe you're the right person to direct the question to?
Or @sshleifer? I've seen you do a lot of inspection of the mBART model as well.
Thanks!

I don't know the answer, but excited to learn!

authors: bkj sshleifer


text:
functionalize: AttributeError: 'fn' object has no attribute 'code'.

import torch
from torch.fx.experimental.proxy_tensor import make_fx
from functorch.experimental import functionalize

def fn(a):
    a = a * 2
    a.relu_()
    return a

input = torch.randn([1, 1])
graph_module = torch.fx.symbolic_trace(fn)
fx_graph = make_fx(functionalize(graph_module))(input)

Results in the following error:
Traceback (most recent call last):
  File "/tmp/repro.py", line 69, in <module>
    fx_graph = make_fx(functionalize(graph_module))(input)
  File "/usr/local/google/home/silvasean/pg/torch-mlir/it.venv/lib/python3.10/site-packages/torch/fx/experimental/proxy_tensor.py", line 618, in wrapped
    if not hasattr(f, '__code__') or inspect.unwrap(f).__code__.co_flags & inspect.CO_VARARGS:
  File "/usr/local/google/home/silvasean/pg/torch-mlir/it.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1265, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'fn' object has no attribute '__code__'. Did you mean: '__copy__'?

Removing functionalize makes the error go away.
Replacing this line with if True: makes the error go away and the program behaves as expected:
https://github.com/pytorch/pytorch/blob/6ef85dc99079b770d96e4cc87bdc5b047441e9a9/torch/fx/experimental/proxy_tensor.py#L609

As discussed in Slack, a workaround is to wrap the output of functionalize in a Python function: functionalized_fx_graph = make_fx(lambda x: functionalize(fx_graph)(x))(input).
But it's not a real solution to the problem.

authors: IvanYashchuk silvasean

repo: pytorch/functorch


text:
Transformer block that supports jagged tensor as input

The standard transformer block supports input tensors that will have same sequence length.
This requires padding the example sequences to the same length in a batch if the lengths are not equal.
The introduction of JaggedTensor does support the variable length examples. Can we support a transformer block that can efficiently work with JaggedTensor or KeyedJaggedTensor as input, instead of converting them to the dense and padded form?

Hi, this seems like a question for core library https://github.com/pytorch/pytorch

authors: henrylhtsang yuhuishi-convect

repo: pytorch/torchrec


text:
Update API ref for torchtune/data

Context
What is the purpose of this PR? Is it to

[ ] add a new feature
[ ] fix a bug
[x] update tests and/or documentation
[ ] other (please add here)

Please link to any issues this PR addresses.
Changelog

Include missing APIs in live docs
Rename message converters to be less llama2 specific

Test plan
Please make sure to do each of the following if applicable to your PR. (If you're not sure about any one of these just ask and we will happily help.)

[x] run pre-commit hooks and linters (make sure you've first installed via pre-commit install)
[ ] add unit tests for any new functionality
[x] update docstrings for any new or updated methods or classes
[x] run unit tests via pytest tests
[ ] run recipe tests via pytest tests -m integration_test
[ ] manually run any new or modified recipes with sufficient proof of correctness

[ ] include relevant commands and any other artifacts in this summary (pastes of loss curves, eval results, etc.)

One thing that's a bit confusing to me on the data page is the relationship between "Chat Formats" and "Instruct Templates", if they're all just templates maybe they should be grouped together under text templates?

At this rate I might just combine them altogether...

Commandeered this diff here: #1091

Closed by #1091

authors: RdoubleA joecummings

repo: pytorch/torchtune


text:
Remove unused import

I forgot it in #7243 - lint should be back to green
cc @pmeier

I'm being naughty and I'll merge without an approval because this is very minor and because there's no one around for a stamp at this time

Post mortem stamp although GH doesn't let me do it properly

authors: NicolasHug pmeier

repo: pytorch/vision


text:
implement steve-cmd ls

Probably want to use blessings to get colors and tables and such.
Might even want to specify which fields you want to see. So, it defaults to:

title
whiteboard

but allows you to specify the fields explicitly.

Don't use blessings. Do use prettytable (https://pypi.python.org/pypi/PrettyTable).

We're using tabulate already, so we don't need to add PrettyTable.

repo: pyvideo/steve


text:
How to get text of static

I want to get text "OANDA-GMT+2 Live" from this window

I try to get  text of listitem in listbox
output of print_ctrl_ids is
ListBox - ''    (L554, T431, R1064, B634)
['', 'ListBox', '0', '1']
child_window(auto_id="1296", control_type="List")
   |
   | Header - 'Элемент управления "Заголовок"'    (L556, T433, R1062, B457)
   | ['Элемент управления "Заголовок"', 'Header', 'Элемент управления "Заголовок"Header']
   | child_window(title="Элемент управления "Заголовок"", control_type="Header")
   |    |
   |    | HeaderItem - 'Address'    (L556, T433, R733, B457)
   |    | ['AddressHeaderItem', 'Address', 'HeaderItem', 'HeaderItem0', 'HeaderItem1']
   |    | child_window(title="Address", control_type="HeaderItem")
   |    |
   |    | HeaderItem - 'Company'    (L733, T433, R986, B457)
   |    | ['Company', 'CompanyHeaderItem', 'HeaderItem2']
   |    | child_window(title="Company", control_type="HeaderItem")
   |    |
   |    | HeaderItem - 'Ping'    (L986, T433, R1062, B457)
   |    | ['Ping', 'PingHeaderItem', 'HeaderItem3']
   |    | child_window(title="Ping", control_type="HeaderItem")
   |
   | ListItem - ''    (L556, T457, R1062, B477)
   | ['2', 'ListItem', 'ListItem0', 'ListItem1']
   |    |
   |    | Static - ''    (L560, T457, R626, B477)
   |    | ['3', 'Static', 'Static0', 'Static1']
   |    |
   |    | Static - ''    (L733, T457, R986, B477)
   |    | ['4', 'Static2']
   |    |
   |    | Static - ''    (L986, T457, R1062, B477)
   |    | ['5', 'Static3']
   |
   | ListItem - ''    (L556, T477, R1062, B497)
   | ['6', 'ListItem2']
   |    |
   |    | Static - ''    (L560, T477, R626, B497)
   |    | ['7', 'Static4']
   |    |
   |    | Static - ''    (L733, T477, R986, B497)
   |    | ['8', 'Static5']
   |    |
   |    | Static - ''    (L986, T477, R1062, B497)
   |    | ['9', 'Static6']
   |

but if I try to make
print( terminal.OpenanAccount.ListBox.ListItem1.children_texts()) it show me['', '', '']
If I try to instect with utility Inspect.exe it show me
How found:	Focus
RuntimeId:	"[42.4981930.2.2]"
BoundingRectangle:	{l:589 t:397 r:1095 b:417}
ProcessId:	3344
ControlType:	UIA_ListItemControlTypeId (0xC357)
LocalizedControlType:	"элемент списка"
Name:	""
HasKeyboardFocus:	true
IsKeyboardFocusable:	true
IsEnabled:	true
IsOffscreen:	false
FrameworkId:	"Win32"
ProviderDescription:	"[pid:3344,hwnd:0x0 Annotation:Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main(parent link):Microsoft: ListView Item Proxy (unmanaged:uiautomationcore.dll)]"
SelectionItem.IsSelected:	true
SelectionItem.SelectionContainer:	"" список
LegacyIAccessible.ChildId:	0
LegacyIAccessible.DefaultAction:	"Двойной щелчок"
LegacyIAccessible.Description:	""
LegacyIAccessible.Help:	""
LegacyIAccessible.KeyboardShortcut:	""
LegacyIAccessible.Name:	""
LegacyIAccessible.Role:	элемент списка (0x22)
LegacyIAccessible.State:	выделенный,с фокусом ввода,фокусируемое,выделяемое (0x300006)
LegacyIAccessible.Value:	""
IsDockPatternAvailable:	false
IsExpandCollapsePatternAvailable:	false
IsGridItemPatternAvailable:	false
IsGridPatternAvailable:	false
IsInvokePatternAvailable:	true
IsLegacyIAccessiblePatternAvailable:	true
IsMultipleViewPatternAvailable:	false
IsRangeValuePatternAvailable:	false
IsScrollPatternAvailable:	false
IsScrollItemPatternAvailable:	true
IsSelectionItemPatternAvailable:	true
IsSelectionPatternAvailable:	false
IsTablePatternAvailable:	false
IsTableItemPatternAvailable:	false
IsTextPatternAvailable:	false
IsTogglePatternAvailable:	false
IsTransformPatternAvailable:	false
IsValuePatternAvailable:	false
IsWindowPatternAvailable:	false
IsItemContainerPatternAvailable:	false
IsVirtualizedItemPatternAvailable:	false
IsSynchronizedInputPatternAvailable:	false
FirstChild:	"" текстовый
LastChild:	"" текстовый
Next:	"" элемент списка
Previous:	"" элемент списка
Other Props:	Object has no additional properties
Children:	"" текстовый
	"" текстовый
	"" текстовый
Ancestors:	"" список
	"" диалоговое окно
	"Open an Account" диалоговое окно
	"8746201: OANDA - MetaTrader" окно
	"Рабочий стол" панель
	[ No Parent ]

Please help

Hi @polearnik how about Inspect.exe properties for the children static texts? Are there some legacy properties with meaningful values?
If yes, try this code:
for child in terminal.OpenanAccount.ListBox.ListItem1.children():
    print(child.legacy_properties()) # prints a dictionary

I try your code but it show
{'ChildId': 0, 'DefaultAction': '', 'Description': '', 'Help': '', 'KeyboardShortcut': '', 'Name': '', 'Role': 41, 'State': 0, 'Value': ''} {'ChildId': 0, 'DefaultAction': '', 'Description': '', 'Help': '', 'KeyboardShortcut': '', 'Name': '', 'Role': 41, 'State': 0, 'Value': ''} {'ChildId': 0, 'DefaultAction': '', 'Description': '', 'Help': '', 'KeyboardShortcut': '', 'Name': '', 'Role': 41, 'State': 0, 'Value': ''}

OK, it seems UI Automation API can't access this text. Can you try using Application(backend="win32")? The interface for Win32 ListView is slightly different and items are not visible in Spy++ (you can see only ListView control itself), but they should be accessible using ListViewWrapper methods.

NO its seems imposible to get text/I find another way to get text.Text in listbox is a names of srv files in app folder

authors: polearnik vasily-v-ryabov

repo: pywinauto/pywinauto


text:
Multi-level WindowSpecification objects (3+ levels in a chain)

Allow 3+ levels in an access chain of attributes.
Add method texts() into ListViewWrapper.
Add class Desktop as an alternative root of WindowSpecification objects (without process info).
Fix "copypasta" bug in backend.py.

[Current coverage][cc-pull] is 95.94%

Merging [#211][cc-pull] into [UIA][cc-base-branch] will decrease coverage by 0.02%

@@                UIA       #211   diff @@
==========================================
  Files            32         32
  Lines         18206      18234    +28
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits          17471      17494    +23
- Misses          735        740     +5
  Partials          0          0

Powered by Codecov. Last updated by [0d3a8ab...11d47f4][cc-compare]
[cc-base-branch]: https://codecov.io/gh/pywinauto/pywinauto/branch/UIA?src=pr
[cc-compare]: https://codecov.io/gh/pywinauto/pywinauto/compare/0d3a8ab1e417994f88dd1e461413f11bfabc4f35...11d47f4baf01e64b8eed968051a93ffd358dd315?src=pr
[cc-pull]: https://codecov.io/gh/pywinauto/pywinauto/pull/211?src=pr

authors: codecov-io vasily-v-ryabov


text:
chore: promote test1 to version 0.0.2

chore: promote test1 to version 0.0.2
this commit will trigger a pipeline to generate the actual kubernetes resources to perform the promotion which will create a second commit on this Pull Request before it can merge

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign q1323829945
You can assign the PR to them by writing /assign @q1323829945 in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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


text:
🛑 nitter.tiekoetter.com is down

In 5216107, nitter.tiekoetter.com (https://nitter.tiekoetter.com) was down:

HTTP code: 502
Response time: 590 ms

Resolved: nitter.tiekoetter.com is back up in 6a0636c after 2 hours, 9 minutes.


text:
🛑 nitter.pw is down

In 61223dd, nitter.pw (https://nitter.pw) was down:

HTTP code: 404
Response time: 346 ms

Resolved: nitter.pw is back up in 0019c10.


text:
🛑 nitter.cutelab.space is down

In 3104eb3, nitter.cutelab.space (https://nitter.cutelab.space) was down:

HTTP code: 0
Response time: 0 ms

Resolved: nitter.cutelab.space is back up in 1e0b245 after 16 minutes.


text:
🛑 nitter.tiekoetter.com is down

In b03e209, nitter.tiekoetter.com (https://nitter.tiekoetter.com) was down:

HTTP code: 502
Response time: 562 ms

Resolved: nitter.tiekoetter.com is back up in a62441a after 13 minutes.


text:
🛑 notabird.site is down

In b4988b8, notabird.site (https://notabird.site) was down:

HTTP code: 520
Response time: 51 ms

Resolved: notabird.site is back up in b64781e.


text:
🛑 notabird.site is down

In a223971, notabird.site (https://notabird.site) was down:

HTTP code: 520
Response time: 109 ms

Resolved: notabird.site is back up in ba1dc6e after 5 minutes.


text:
🛑 nitter.tiekoetter.com is down

In 3338ada, nitter.tiekoetter.com (https://nitter.tiekoetter.com) was down:

HTTP code: 502
Response time: 562 ms

Resolved: nitter.tiekoetter.com is back up in 74f09b7 after 10 hours, 45 minutes.


text:
🛑 nitter.pw is down

In 49ccf5b, nitter.pw (https://nitter.pw) was down:

HTTP code: 404
Response time: 302 ms

Resolved: nitter.pw is back up in 5914c98.


text:
build-snapshot: Add method to return versionName from system dump

Adding a method to allow users to return the value of installed package versionName. This is essentially a short-form version number of the app's package typically shown within the app itself which can be used for UI validation and passing as needed.
Ex. An installed package's versionCode returns 11200050. The package's versionName returns 11.2.0
This example of the differences is supplied in the method's associated comment.

it should be available in 6.2.28+

authors: bsuscavage vdelendik

repo: qaprosoft/carina


text:
Feature/frontend test

Merging

Frontend snapshot testing pull request

repo: qasidd/trap-mern-project


text:
关于级联列表能否使用切片数据做为选项值

if err = f.SetDefinedName(&excelize.DefinedName{
Name:     "Vegetables",
RefersTo: "Sheet1!$B$2:$B$6",
Scope:    "Sheet1",
}); err != nil {
fmt.Println(err)
return
}
示例代码中，使用B2-B6的值做为"Vegetables"对应的级联列表的选项，此处能否支持传入["a","b","c"]这种方式

You can define an array constant with array formula in defined name , but which can't be used for dependent drop list.

I closed this issue. If you have any questions, please let me know to reopen this anytime.

authors: MoShQing xuri

repo: qax-os/excelize


text:
Kubernetes Integration

Summary
This projects seems to supply the best DNS server in a container that one could ask for (especially when it comes to security features). Therefore, I'd like to help with documenting Kubernetes. I came across this as coreDNS does not seem to be able to do DNSSEC validation (which I find to be ridiculous). Therefore, I can point coreDNS to this container in my cluster and let this container do the resolution over TLS/HTTP with DNSSEC etc.
What would this help look like?
I am going to write a Deployment, Service and configMap which should suffice to get this up and running in a cluster. I would then add a document, maybe in the form of a KUBERNETES.md, because Kubernetes support should stay community-maintained (as it is a lot of work and maintainers most likely do not have the time).
Why this issue?
I want to ask first before doing the work in order to avoid unnecessary work. If maintainers are fine with this, I will submit a PR in the future.

That sounds perfect. Go for it!
Note however that the current latest and v1.x.x docker images do dns over tls AND Dnssec, not Https. I could add https now that Unbound supports it if really needed, but...
Since before Unbound added support for DNS over HTTPS I started working on a full go only implementation of DNS over TLS+HTTPS which is available in tag :v2.0.0-beta. Now that one doesn't do DNSSEC yet, and there is also a bug where the server hangs when shutting down. It will also have breaking changes (different variables, be based on Scratch etc.). So don't use that one for now, but just so you're aware you might need to update your files in the next few weeks (maybe 1-2 months).

I'm currently using the v2 Beta and it seems to work fine. I would like to stay on the beta version to test the latest changes. I do not actually need DoH, because I use DoT. DNSSEC is something I look forward to :D Reach back to me when DNSSEC is ready :)
I will come up with a PR when I'm ready and I will put this in a new file :)

Great, I'll try to focus on DNSSEC. Right now I'm adding Prometheus metrics to debug (the lazy way) that shutdown issue. If you use v2, leave the UPDATE_PERIOD=0 so it doesn't restart for now. Mine stalls about every ~2 weeks with a 12 hours restart period and it has to be manually rebooted ughh. I'll let you know once #60 is done.

@qdm12 Have a look at #83, these are the instructions :)
Just reach back to me when DNSSEC is ready :)

@qdm12 #83 is ready to be merged :)

Ah ok sorry about that I thought you wanted to wait for DNSSEC! (subscribe to #60 then 😉)
I'm going to be annoying, sorry in advance, but sadly I rebased v2.0.0-beta on master so there is a whole lot of weird deltas on the PR now (especially for the readme.md for some reason).
Would you mind doing that on your forked repo (basically redo your changes on a fresh k8s branch):
git checkout k8s
cp KUBERNETES.md KUBERNETES.md.bak
git checkout v2.0.0-beta
git pull
git branch -D k8s
git checkout -b k8s
mv KUBERNETES.md.bak KUBERNETES.md

Then small manual step, re-add
If you're running Kubernetes, there is a separate article on [how to set up K8s](https://github.com/qdm12/dns/blob/v2.0.0-beta/KUBERNETES.md).

Before ## Docker tags in the README.md
Finally
git add .
git commit -m "chore(K8s): add Kubernetes usage instructions"
git push --force

Thanks!!

No big deal, just a rebase :) I hope I did it right though :D
I will subscribe to #60. In the meantime, #83 can be merged and this issue closed.

I will close this as #83 was merged.

Thanks @georglauterbach!


text:
healthz return raw str, but decode use .json()

    def send(self, request: Request, type_: Type[T]) -> T:
        response = self.middleware(request, self.send_inner)
        if response.status_code in [200, 201, 202]:
            try:
                return parse_as_type(response.json(), type_)
            except ValidationError as e:
                raise ResponseHandlingException(e)
        raise UnexpectedResponse.for_response(response)

When I try to call the method client.http.service_api.healthz(), I find the return value is "healthz check passed", but the api uses resp.json() which causes a crash!

hi @1120475708
We are not exposing service api methods into the client api, they are currently meant to be invoked with curl / wget / etc

Alright, I appreciate your response. @joein

repo: qdrant/qdrant-client


text:
Добавить в описании ссылку на блог

https://baskovsky.ru/2022/03/comment-lint/

Даже лучше ссылку на презентацию

4dae3981e9a1d7cb296ce9d45bd7688f10e24962

repo: qertis/comment-lint


text:
适配移动端

手机端浏览器显示效果不太好，需要适配一下

另外 Dark Mode 我准备来适配一下，之前项目刚好做过

移动端暂时不打算适配。Dark Mode我打算用CSS变量来做。

嗯嗯，好的，我这两天给你发一个 PR。另外看了你的其他 Repo，非常有设计感，真的很棒！


text:
I search bug.

Buddy, I found a bug in the plugin. If you click on a note often, then at some point it will open on its own and will not require a password. That is, the password window opens, but disappears with frequent clicks.

Let me try，did you found the bug in your phone or windows?


text:
多入口工程( 分支 mpa1) 在 dev 模式下 配置问题

开发模式  http://localhost:8090

怎么时时预览 src 下的 web admin 2个工程?
webpack 配置中并没有找到对应

http://localhost:8090/admin.html
http://localhost:8090/web.html
webpack 想要的配置在生成首页中
exports.genHtmlPlugins = function () {

    var baseWebpackConfig = require('./webpack.base.config');
    var path = require('path')
    var plugins = [];
    Object.keys(baseWebpackConfig.entry).forEach(function (name) {
        plugins.push(
            new HtmlWebpackPlugin({
                filename: isProd ? path.resolve(__dirname, `../dist/${name}/index.html`) : name + '.html',
                template: 'index.tpl.html',
                chunks: isProd ? ['manifest', 'vendor', `${name}-vendor`, name] : [name],
                inject: true
            }))
    })
    return plugins
}

authors: Hank-wood qinshenxue


text:
Migrate to pathlib

Summary
This looks a lot cleaner to me than the os.path.dirname() stuff that existed previously (and which I am the author of).
Details and comments

Pull Request Test Coverage Report for Build 1983922222

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 1978461002:
0.0%

Covered Lines:
11

Relevant Lines:
11

💛  - Coveralls

Pull Request Test Coverage Report for Build 1983922222
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 1978461002:
0.0%

Covered Lines:
11

Relevant Lines:
11

💛  - Coveralls

authors: coveralls garrison


text:
Test Issue - jrrxg

Test Body - yrszwnrjpl

Test Comment - pnara

repo: qlikqaa/dummyrepo


text:
Test Issue - qqnde

Test Body - piluvynzoj

Test Comment - enwgh


text:
Test Issue - vfnki

Test Body - rinavvdhwo

Test Comment - svkhz


text:
Test Issue - gsawp

Test Body - ciixlltqpe

Test Comment - ermaj


text:
Test Issue - bhffw

Test Body - bjrrcohxgt

Test Comment - ikiwp


text:
Test Issue - xxfvc

Test Body - afxomsoscj

Test Comment - vsmoq


text:
Test Issue - ytoqc

Test Body - kcfguntuac

Test Comment - kwpcm


text:
Test Issue - fyhav

Test Body - hiiskikrlc

Test Comment - zfuwz


text:
Test Issue - xinor

Test Body - wsdcggkftt

Test Comment - rawxl


text:
Test Issue - ghkfx

Test Body - hkedsgmshh

Test Comment - igteb


text:
Test Issue - evqjj

Test Body - tejdflrhng

Test Comment - bkdhg


text:
Test Issue - ltsrk

Test Body - iveoimqiyy

Test Comment - qibxw


text:
Test Issue - iuptk

Test Body - kidfrtlgos

Test Comment - qlsjo


text:
Test Issue - naete

Test Body - dgqkwhxyky

Test Comment - bbljr


text:
Test Issue - pyehe

Test Body - eookdaqgvs

Test Comment - jicyn


text:
Test Issue - atgsb

Test Body - rufhkkudao

Test Comment - hphtv


text:
Test Issue - dqqld

Test Body - yzjzvcmosu

Test Comment - glmrr


text:
Test Issue - dmhdk

Test Body - gomvywtwun

Test Comment - aiecg


text:
Test Issue - uqafx

Test Body - fiftznouqs

Test Comment - cmhyt


text:
Test Issue - rqxll

Test Body - refoenrfnp

Test Comment - wpfxr


text:
Test Issue - vhvoo

Test Body - bxwxukqgws

Test Comment - sexdu


text:
Presentation Mode

As I stare down the barrel of my presentation at JSM and posit::conf, I've realized it'd be quite a bit prettier if I transitioned my nascent keynote presentation into a revealjs presentation. And as I start thinking about my revealjs presentation, I start thinking, geesh, why don't I just write a closeread story.
So: what do you think about (at some point) adding a presentation-mode: true yaml option. It could:

strip all content (but not structure) out of the narrative col
apply a layout that collapses the width of the narrative down to nil or near-nil.

The effect would be that the sticky-col would take up the whole width of the screen and the speaker would more or less be speaking the narrative paragraphs instead of displaying them.
If nothing else, it seems like it'd be useful exercise in carefully crafting one of these things: the stickies much be compelling enough to be able to speak over with no text on the screen. It could also be useful if someone spends a ton of time crafting a beautiful closeread story and they're asked to present it live.

In a related vein, we could provide a filter that converts a closeread story to a revealjs doc by collecting each sticky (and any effects) and dropping each into a separate slide.

Makes sense to me! I feel like it could be a layout option alongside overlay and sidebar — the narrative col gets display: none and the sticky col gets the full width.
I'll see if I can get moving on the layouts this morning!

Yep, that sounds like the way to do it!

Another idea for how to do it:
format:
  closeread-html:
    presentation-mode: {false, true, toggle-on, toggle-off}

Where toggle-on would be in presentation mode but present a small icon, kinda in the same vein of code-folding, that would allow the viewer of the HTML to toggle it off.

authors: andrewpbray jimjam-slam

repo: qmd-lab/closeread


text:
When creating an object first try to GET it

Guys, I'm trying to create a simple object but when I do it, it first run a GET and of corse since the resource doesn't exists it rise an exception:
s = my_bucket.objects.build "holaaaa/"
s.save

opening connection to my_bucket.s3.amazonaws.com:80...
opened
<- "GET /holaaaa/? HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: Ruby\r\nDate: Tue, 18 Oct 2016 17:03:03 GMT\r\nAuthorization: AWS xxxxxxx=\r\nHost: my_bucket.s3.amazonaws.com\r\n\r\n"
-> "HTTP/1.1 404 Not Found\r\n"

Is this the expected behavior?
UPDATED: The problem is when you don't set the content of the file.

I haven't used it for a while, so I'm not sure if this is an expected behavior. If you think it is, feel free to create a PR with a test case.

It shouldn't really be the expected behavior, will try to work on a PR. Thanks!

authors: mustela qoobaa


text:
Read json from standard input

Would it be possible for the following to read json input from stdin?
qpdf --json-input - output.pdf

The discussion in #54 indicates that it isn't practical to read a pdf file from stdin, and one reason given concerns the xref table at the end of the pdf file.
I have the impression that qpdf doesn't rely on the xref table when reading JSON input. So I wonder if this feature might be practical.
(Also, as qpdf can output json to stdout, taking json input on stdin would be pleasingly symmetrical.)
My use case is that I am calling qpdf from some rust code, essentially as follows. Note the use of two temporary files.
// call qpdf --json-output input_pdf and capture output
let json = Command::new("qpdf").args(["--json-output", input_pdf]).output()?;
write_to_tempfile(&json, "/tmp/tempONE.json");

// call qpdf --show-pages --json-input /tmp/tempONE.json and capture output, and extract page data
let page_data = Command::new("qpdf").args(["--show-pages", "--json-input", "/tmp/tempONE.json"]).output()?;
let page_data = extract_page_data(page_data);

// transform the json
let json2 = transform_the_json(json, page_data);
write_to_tempfile(&json2, "/tmp/tempTWO.json");

// call qpdf --json-input --object-streams=generate /tmp/tempTWO.json output_pdf
Command::new("qpdf").args(["--json-input", "--object-streams=generate", "/tmp/tempTWO.pdf", output_pdf]);

Both temporary files could be avoided if qpdf could read json from stdin.

As you correctly surmised, qpdf doesn't rely on a cross-reference table with JSON, but it still lazily loads stream data from the original JSON or the data files, so it is still not possible to read qpdf JSON from standard input. Bear in mind that qpdf streams can provide their data as external files, which further complicates this. When qpdf uses a JSON file as standard input, it reads all the objects into memory, and for each stream data, is uses a StreamDataProvider object to retrieve the stream data from a stored offset in the JSON file or from the external file containing the stream data. A single JSON is free to intermix those two ways of storing stream data, and qpdf fully supports that.
Looking at your example above, there a few ways I can see to possibly improve it, though the way you're doing it is okay.

Use something like the tempfile crate to create more security temporary files with unpredicatble names, which avoids clashes if you run this more than once concurrently. (Maybe you know this and are hard-coding the temporary file names for simplicity in your example.)
Use --show-pages on the original input instead of on the JSON output. qpdf is more efficient at reading regular PDF files than JSON files, and since --json-output preserves object IDs (unlike QPDFWriter), you can mine information from the original PDF. Alternatively:
Instead of using --show-pages, you can pass --json-key=pages as an additional parameter to the first command. The information about the pages will be included in t he JSON output in the "pages" key. You can mine the information from there, which is probably easier from the rust code and has the advantage that the syntax is guaranteed to be stable.

So I would suggest
// call qpdf --json-output input_pdf and capture output and page metadata
let json = Command::new("qpdf").args(["--json-output", "--json-key=pages", input_pdf]).output()?;
write_to_tempfile(&json, "/tmp/tempONE.json");

// transform the json, reading page data from `"pages"`, which is ignored by --json-input
let json2 = transform_the_json(json); // modify to look at "pages", not just "qpdf"
write_to_tempfile(&json2, "/tmp/tempTWO.json");

// call qpdf --json-input --object-streams=generate /tmp/tempTWO.json output_pdf
Command::new("qpdf").args(["--json-input", "--object-streams=generate", "/tmp/tempTWO.pdf", output_pdf]);

with the added enhancement of using better temporary files.

Thank you for clarifying the situation with json input.
Thank you also for the code suggestions, they are very helpful. I didn't think of using --show-pages on the first run and wasn't aware of --json-key=pages at all.

authors: jberkenbilt qooxzuub

repo: qpdf/qpdf


text:
微信小程序无法打开，卡加载

涉及规则:
微信
使用平台:
微信
描述问题:
小程序卡加载进不去
提供截图:
无
提交规则:
无

那个小程序 最好有截图之类的


text:
🛑 Proyosi is down

In 8f24b7d, Proyosi (https://proyosi.com/) was down:

HTTP code: 503
Response time: 566 ms

Resolved: Proyosi is back up in e9e35d9.

repo: qtekfun/upptime


text:
Update coinstake display in RPCs for transactions

Update for #856. #856 is present also before the fork, so it is not introduced with the fork.
The RPCs listtransactions and gettransaction are updated to display the coinstake transaction without display of the send type outputs. The update is similar with the display in the GUI.

Looks like it is not fixed yet, those txs still shown as send

Test on master before fix: listtransactions
[
  {
    "address": "qMU5a7fRk8nTUZhtWkcbjJW7Zp9sVfLxDD",
    "category": "generate",
    "amount": 101.20000000,
    "label": "",
    "vout": 1,
    "confirmations": 1,
    "blockhash": "fadf0d16d4799e699206c28a2e293130c58193e66e8dea1400a8b30fad13f852",
    "blockindex": 1,
    "blocktime": 1599827904,
    "txid": "93cf095a4a34479dd3c4789c6332ae4679c6f69a89299efa9add5e1681afc4e8",
    "walletconflicts": [
    ],
    "time": 1599827904,
    "timereceived": 1599827913,
    "bip125-replaceable": "no"
  },
  {
    "address": "qQqb2kfGG7Q6MBp3ALhVbTUoZhEYH6znJT",
    "category": "send",
    "amount": -2.80000000,
    "vout": 2,
    "fee": 4.00000000,
    "confirmations": 1,
    "blockhash": "fadf0d16d4799e699206c28a2e293130c58193e66e8dea1400a8b30fad13f852",
    "blockindex": 1,
    "blocktime": 1599827904,
    "txid": "93cf095a4a34479dd3c4789c6332ae4679c6f69a89299efa9add5e1681afc4e8",
    "walletconflicts": [
    ],
    "time": 1599827904,
    "timereceived": 1599827913,
    "bip125-replaceable": "no",
    "abandoned": false
  },
  {
    "address": "qMU5a7fRk8nTUZhtWkcbjJW7Zp9sVfLxDD",
    "category": "send",
    "amount": -101.20000000,
    "label": "",
    "vout": 1,
    "fee": 4.00000000,
    "confirmations": 1,
    "blockhash": "fadf0d16d4799e699206c28a2e293130c58193e66e8dea1400a8b30fad13f852",
    "blockindex": 1,
    "blocktime": 1599827904,
    "txid": "93cf095a4a34479dd3c4789c6332ae4679c6f69a89299efa9add5e1681afc4e8",
    "walletconflicts": [
    ],
    "time": 1599827904,
    "timereceived": 1599827913,
    "bip125-replaceable": "no",
    "abandoned": false
  },
  {
    "category": "send",
    "amount": 0.00000000,
    "vout": 0,
    "fee": 4.00000000,
    "confirmations": 1,
    "blockhash": "fadf0d16d4799e699206c28a2e293130c58193e66e8dea1400a8b30fad13f852",
    "blockindex": 1,
    "blocktime": 1599827904,
    "txid": "93cf095a4a34479dd3c4789c6332ae4679c6f69a89299efa9add5e1681afc4e8",
    "walletconflicts": [
    ],
    "time": 1599827904,
    "timereceived": 1599827913,
    "bip125-replaceable": "no",
    "abandoned": false
  }
]

Test the fix on time/listtxfix: listtransactions
[
  {
    "address": "qMU5a7fRk8nTUZhtWkcbjJW7Zp9sVfLxDD",
    "category": "generate",
    "amount": 1.20000000,
    "label": "",
    "vout": 1,
    "confirmations": 1,
    "blockhash": "fadf0d16d4799e699206c28a2e293130c58193e66e8dea1400a8b30fad13f852",
    "blockindex": 1,
    "blocktime": 1599827904,
    "txid": "93cf095a4a34479dd3c4789c6332ae4679c6f69a89299efa9add5e1681afc4e8",
    "walletconflicts": [
    ],
    "time": 1599827904,
    "timereceived": 1599827913,
    "bip125-replaceable": "no"
  }
]

Above data is from test that was performed.
The send operations are removed in the fix for mined transaction and look similar with the GUI solution as described in the analysis.
So not able to reproduce it after the fix. If you are able to reproduce it after the fix please provide description how to reproduce it.

I just built and ran a new version of qtum-qt/qtumd and issued the same rpc command to it, the output doesn't change.
BTW do why all those different transactions have the same txid and why the generated amount of the new branch is not 4 QTUMs.

They have the same ID because they are the same coinstake transaction.
It spend 100 coins to generate 104 coins in the PoS block, from which 1.2 are to the miner and 2.8 coins are to the delegate.
The amount is 1.2 because the fee for the super staker that was used was 30%, so 30% of 4 is 1.2 QTUM, the value for the reward is 4 if no super staker is used.
The second representation is simplified displaying of the same coinstake transaction as you want to see (only the reward), without the internal send operations, they are just summarized.

repo: qtumproject/qtum


text:
vim startup 150ms slower since #93

$ git checkout baac332
$ nvim --startuptime /tmp/nvim-bad.txt
$ grep 'sourcing.*cmp_nvim_ultisnips' /tmp/nvim-bad.txt
247.983  000.147  000.147: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/autoload/cmp_nvim_ultisnips.vim
248.239  143.683  119.665: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/after/plugin/cmp_nvim_ultisnips.lua

vs
$ git checkout baac332^
$ nvim --startuptime /tmp/nvim-good.txt
$ grep 'sourcing.*cmp_nvim_ultisnips' /tmp/nvim-good.txt
097.585  000.098  000.098: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/autoload/cmp_nvim_ultisnips.vim
097.729  001.621  000.779: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/after/plugin/cmp_nvim_ultisnips.lua

Still not okay with current main (2be0eda0f7fbf47ebd9fbdace369cc45d57acf49):
cmp_nvim_ultisnips.snippets')
099.720  000.308  000.181: require('cmp_nvim_ultisnips.source')
099.758  000.037  000.037: require('cmp_nvim_ultisnips.config')
099.760  000.547  000.202: require('cmp_nvim_ultisnips')
099.862  000.015  000.015: sourcing /home/tomi/.vim/pack/bundle/start/ultisnips/plugin/UltiSnips.vim
100.122  000.011  000.011: sourcing /home/tomi/.vim/after/plugin/UltiSnips.vim
100.658  000.074  000.074: sourcing /usr/share/nvim/runtime/autoload/provider/pythonx.vim
123.710  000.209  000.209: sourcing /usr/share/nvim/runtime/autoload/remote/host.vim
123.822  023.446  023.163: sourcing /usr/share/nvim/runtime/autoload/provider/python3.vim
124.147  000.017  000.017: sourcing /usr/share/nvim/runtime/autoload/provider.vim
208.096  000.336  000.336: require('cmp_nvim_ultisnips.treesitter')
208.358  000.038  000.038: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/autoload/cmp_nvim_ultisnips.vim
208.607  109.468  085.057: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/after/plugin/cmp_nvim_ultisnips.lua

Probably the best way to fix this would be to introduce a wrapper autoload/cmp_nvim_ultisnips_utils.vim (or .lua, required late) that loads the python script and provides wrapper functions, to make sure it's loaded lazily.


text:
Small documentation bug

In https://www.squiggle-language.com/docs/Api/DistSampleSet
SampleSet.fromDist: (list<number>) => sampleSet

should be
SampleSet.fromDist: (distribution) => sampleSet

Good point, thanks! We'll need to get these to be auto-generated later.

authors: NunoSempere OAGr

repo: quantified-uncertainty/squiggle


text:
Is there a log file ?

Hi,
I can see log information printed on the console, but the info is not that much. Is there a log file to save more log information, such as http request history and server errors ?
Thanks,
Jin

+1

@bluesky8640 @yaelal The project uses log4j under the scenes.  You need to define in the log4j conf file that you wish to log to a file.  You can either update the log4j config file in source and recompile, or pass a log4j config file at runtime using -Dlog4j.configuration={path to file}

this is my solution:
run
java -Dlog4j.configuration=file:"./config/log4j.properties" ...
$ cat log4j.properties
log4j.rootLogger=INFO, kafkaOffsetMonitor
log4j.appender.kafkaOffsetMonitor=org.apache.log4j.RollingFileAppender
log4j.appender.kafkaOffsetMonitor.File=./logs/kafka-offset-monitor.log
log4j.appender.kafkaOffsetMonitor.MaxFileSize=20MB
log4j.appender.kafkaOffsetMonitor.MaxBackupIndex=10
log4j.appender.kafkaOffsetMonitor.layout=org.apache.log4j.PatternLayout
log4j.appender.kafkaOffsetMonitor.layout.ConversionPattern=[%d] %p %m (%c)%n

repo: quantifind/KafkaOffsetMonitor


text:
Add sphinx documentation

Would be great to have all the risk metrics have html docs before we release.

http://quantopian.github.io/empyrical/

Looks great, want to do a PR with the sphinx sources?

https://github.com/quantopian/empyrical/pull/22

authors: ahgnaw twiecki

repo: quantopian/empyrical


text:
Error displaying widget: model not found

Environment

Operating System
macOS Mojave
Python Version: $ python --version
Python 3.7.4
How did you install Qgrid: (pip, conda, or other (please explain))
Installed with pip commands from README
Python packages: $ pip freeze or $ conda list (please include qgrid, notebook, and jupyterlab versions)

$ pip freeze | grep -E "qgrid|jupy|ipy"
ipykernel==5.1.3
ipython==7.9.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jupyter==1.0.0
jupyter-client==5.3.4
jupyter-console==6.0.0
jupyter-core==4.6.1
jupyterlab==1.1.4
jupyterlab-server==1.0.6
qgrid==1.2.0
scipy==1.3.1

Jupyter lab packages (if applicable): $ jupyter labextension list

   app dir: /Users/louismartin/miniconda3/envs/dev/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v1.0.3  enabled  OK
        jupyterlab-plotly v1.4.0  enabled  OK
        jupyterlab_vim v0.11.0  enabled  OK
        plotlywidget v1.4.0  enabled  OK
        qgrid v1.1.1  enabled  OK

Description of Issue
I know this issue has been raised before and should have been fixed by #275 but it does not seem to be fixed for me and all other issues are closed.
Here is the error that I get when using qgrid:
import qgrid
qgrid.show_grid(df_newsela)
> Error displaying widget: model not found

What steps have you taken to resolve this already?

Reinstall qgrid and jupyterlab extension
Install qgrid and jupyterlab extension from source following: https://github.com/quantopian/qgrid/issues/261#issuecomment-539508331

Is there anything that I missed to make it work?

I had similar issues. I think this might be related to the issue and solution discussed here. Check your JavaScript console output to verify.

Seems like people here found a solution to the core issue. If it is still a problem, please reopen. Thanks!

I am facing the same issue on my Mac when I run the code in JupyterLab.
Name: plotly
Version: 4.14.3

Name: notebook
Version: 6.2.0

Name: ipywidgets
Version: 7.6.3

authors: gerrymanoim jnissin louismartin vickysharma0812

repo: quantopian/qgrid


text:
Batch load Pipeline columns

Pass multiple atomic terms to load_adjusted_array if they share the same loader and extra_rows.

@richafrank looks like the test for this is failing on travis.  Is this ready to review?

Apparently that test isn't deterministic, but feel free to check out everything else.

@richafrank this all seems reasonable to me.  I had a couple inline comments on particular implementations, but nothing major.
Two thoughts:

I had imagined the loader-dispatching mechanism being encapsulated in a class rather than just passing a function to SimplePipelineEngine.  The main scenario where I imagine it being useful for the dispatching to be stateful is if we want to memoize lazy construction of loader objects, which we'll probably want to do downstream.  I suppose there's nothing preventing us from just passing around a method of an object as the dispatch function, but that starts to feel a bit obscure to me.  Thoughts?

There are a few places where we branch on term.atomic and then iterate over term.inputs and term.mask.  It might make sense to have all terms provide a dependencies property or somesuch, which is either term.inputs + (term.mask,) or (), so that the right behavior for iterating over the dependencies of a term falls out correctly no matter what.  This comment is easier to change later, so it's probably less important to do right now.

@ssanderson
Agreed about term.atomic - this had been my intent originally, but got delayed.  I've added term.dependencies now.
I disagree about passing a class to SimplePipelineEngine - passing around a boundmethod feels very pythonic to me.  Passing an object whose method we call isn't too bad, but it feels like bloat of that interface, since it's currently a single method.  If we continue to add more functionality to it and pass those methods explicitly as well, then let's reconsider when the interface to SimplePipelineEngine.__init__ grows too large.

@richafrank this looks good to me modulo the couple inline comments I left.

Thanks @ssanderson - patching those up now.

@richafrank FYI, I'm looking at the downstream changes now.

authors: richafrank ssanderson

repo: quantopian/zipline


text:
命令行API设计

补充JupyterBook的CLI没有提供的命令行工具，包括：

qtdocs init: 空项目初始化，主要包括创建toc和config文件、把_build文件夹加入.gitignore。
qtdocs init toc: 创建toc文件
qtdocs init config: 创建config文件

通过—override选项覆盖原有toc和config文件，需要用户手动打开。

需要检测.gitignore里是否已有_build，避免重复添加

authors: Guo-Zhang huangrihang

repo: quanttide/quanttide-docs-python


text:
add: 2023-spring-lab1-intro-to-dynamic-circuits

大変遅くなってしまいすみません。
2023-spring-lab1-intro-to-dynamic-circuitsについて、
アウトプットを作成いたしました。レビューの程よろしくお願いいたします。

@shu-co3

.gitignoreの差分がまだ出ている（フォーマット）ようなので巻き戻しお願いします
_toc.yamlの編集が含まれていませんがビルドしたページにコンテンツ表示されましたか？

repo: quantum-tokyo/iqc-textbook


text:
Command build-reqs and git repository dependencies inside custom wheel package

Description
When using the kedro build-reqs and having a git repository dependency inside a custom wheel package, it detects conflicts where they don't exist.
Context
We heave a custom python library that depends on a git repository like git+git://github.com/some/repo@some-commit we use this because this repo has a bug in the dependencies of it's latest release that was fixed in the master branch, but not released just yet.
Upon building the wheel package of our library pip install -r src/requirements.in works like a charm. But when asking for the kedro build-reqs to analyse it, fake dependency conflicts happen.
Steps to Reproduce

Create a virtual environment and add pip3 install kedro to it.
In a blank kedro root, add the following lines to src/requirements.intsfresh
protobuf>=3.12.0
git+git://github.com/matrix-profile-foundation/matrixprofile@6bea7d4445

Run kedro build-reqs and kedro install to see that it works
Deactivate and Delete the virtual environment and re-create it, this time adding pip3 install kedro poetry
Create a fake package with poetry: poetry new my_package
Go to the new package folder: cd my_package
Add the following lines to pyproject.toml :[tool.poetry.dependencies]
python = "^3.8"
tsfresh = "*"
protobuf = ">=3.12.0"
matrixprofile = { git = "https://github.com/matrix-profile-foundation/matrixprofile.git", rev = "6bea7d4445" }

Create the package: poetry build
Copy the wheel package into kedro root folder: cp dist/my_package-0.1.0-py3-none-any.whl ../.
Go back to Kedro root: cd ..
Clean the src/requirements.in and add the package alone my_package-0.1.0-py3-none-any.whl
Run kedro build-reqs
Watch it take some time and give up on a dependency problem that does not exist. Error 1
Add git+git://github.com/matrix-profile-foundation/matrixprofile@6bea7d4445 back to the src/requirements.in along with the custom package.
Run kedro build-reqs
Run kedro install
Watch for an even weirder result Error 2

Expected Result
Correct generation of requirements.txt to install afterwards
Actual Result
Error 1: In step 13 was:
Could not find a version that matches protobuf==3.11.2,>=3.12.0 (from matrixprofile==1.1.10->tsfresh==0.18.0->my-package==0.1.0->-r src/requirements.in (line 1))
( ... )
There are incompatible versions in the resolved dependencies:
  protobuf==3.11.2 (from matrixprofile==1.1.10->tsfresh==0.18.0->my-package==0.1.0->-r src/requirements.in (line 1))
  protobuf>=3.12.0 (from my-package==0.1.0->-r src/requirements.in (line 1))

Error 2: In step 17 was:
ERROR: Cannot install -r src/requirements.txt (line 52) and matrixprofile 1.1.10 (from git+git://github.com/matrix-profile-foundation/matrixprofile@6bea7d4445) because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested matrixprofile 1.1.10 (from git+git://github.com/matrix-profile-foundation/matrixprofile@6bea7d4445)
    my-package 0.1.0 depends on matrixprofile 1.1.10 (from git+https://github.com/matrix-profile-foundation/matrixprofile.git@6bea7d4445)

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Your Environment
Clean python 3.8 virtual environment with additional pip3 install poetry kedro

kedro, version 0.17.4
Python 3.8.11
openSUSE Tumbleweed

Thanks for the very thorough bug report! I've tried this out and decided it's not a kedro bug but rather some problem with poetry or piptools (and I suspect the latter). Note that kedro build-reqs is just a thin wrapper around pip-compile.
What seems to be happening here is that the specification matrixprofile = { git = "https://github.com/matrix-profile-foundation/matrixprofile.git", rev = "6bea7d4445" } from step 7 is not being picked up in step 13. In step 13 piptools is still trying to install matrixprofile==1.1.10, which has pinned protobuf==3.11.2. This directly conflicts with the specification protobuf = ">=3.12.0", hence the error message 1.
In step 17, it seems that again piptools is a bit confused about resolving the git dependency of matrixprofile. Notice that one of them is looking for git+git:// and one is looking for git+https://, and it's clearly not resolving these to the same thing.
As to where the problem is, I'm not exactly sure. But if you examine the the METADATA in the .whl file generated by poetry, there's this line:
Requires-Dist: matrixprofile @ git+https://github.com/matrix-profile-foundation/matrixprofile.git@6bea7d4445
which looks good to me. Hence I think it may be a problem with piptools and I would suggest bringing this up with them first.
As for short term fixes, I would suggest:

play around with git+git:// compared to git+https://
download master branch of matrixprofile and make your own local .whl file for it and specify that as a requirement
specify the matrixprofile requirement in requirements.in only (others can stay in poetry if you like)

Since this isn't actually a kedro issue I'm going to close it, but thank you for the report 🙂  Good luck with it!

authors: AntonyMilneQB pedro-ricardo

repo: quantumblacklabs/kedro


text:
Fix the quantum teleportation example

The current example code shows errors in teleportation like the following output.
$ python examples/quantum_teleportation.py
Circuit:
0: ───X^0.78───Y^0.341───@───H───M───────@───
                         │       │       │
1: ───H────────@─────────X───────M───@───┼───
               │                     │   │
2: ────────────X─────────────────────X───@───

Bloch Sphere of Message After Random X and Y Gates:
x:  -0.0 y:  -0.6368 z:  -0.771

Bloch Sphere of Qubit 2 at Final State:
x:  -0.6763 y:  -0.6368 z:  -0.3703

This PR fixes it, and raises a ValueError when the final state is not close to the expected state.

Create a case where ValueError is thrown so that it can be covered by coverage.

I've moved the success check into example_test.py. The pytest coverage passes now.

Automerge cancelled: Spurious failure. Github API requires me to be an admin on the fork repository to merge master into the PR branch. Hit 'Update Branch' for me before trying again.

Automerge cancelled: The automerge label was removed.

authors: CirqBot pingyeh

repo: quantumlib/Cirq


text:
Minor restructuring

Wrote a wrapper for Slater determinant preparation. Now there are only two functions from utils/_slater_determinants.py which are exposed in utils/__init__.py. I think this gives a cleaner interface and will make it easier to write about in the paper.
Minor changes to documentation and a conversion function.

Or, more importantly, tests seem to fail in python2.7 and 3.6!

I got the checks to pass by removing the Givens rotations example. I plan to eventually add a better example, perhaps directly to the demo notebook, which demonstrates Slater determinant preparation at a higher level of abstraction.

That seemed like a useful example. What exactly was failing?

The Givens rotation example notebook used the function givens_decomposition from utils/_slater_determinants.py, which I chose to remove from utils/__init__.py in this PR. My reasoning was that in practice the higher-level function (wrapper) that I introduced here will probably always be called instead. Anyway, I'm going to take a break now until next week but if you think we should keep the lower level function in the namespace as well as the example it should be a quick fix.

authors: babbush kevinsung

repo: quantumlib/OpenFermion


text:
Increase flexibility of stim.Circuit.diagram filter_coords args

Fix the fact that it doesn't take DemTarget instances
Allow passing strings like "D5" and "L0"
Allowing passing an individual filter instead of a list
Allowing saying 'detslice' instead of 'detslice-svg'

Fixes https://github.com/quantumlib/Stim/issues/616

@mmcewen-g

repo: quantumlib/Stim


text:
Any plans for adding Karma and Protractor testing?

See here for more detailed discussion of use cases, advantages and limitations of Karma and Protractor:
http://stackoverflow.com/questions/17070522/can-protractor-and-karma-be-used-together/29619467#29619467

Yes, I plan to add, but maybe one month later.

Let me know if you need any help.
Commercial or not :)

I am really apricate for your close attention. More thank...
Realy I need help. I just want to learn how can you help me? What do you mean with commercial? You can access me via e-mail info [at] quantumui.org

authors: dmitriz mehmetotkun

repo: quantumui/quantumui


text:
Fix guide in extension metadata

Refs https://github.com/quarkiverse/quarkus-amazon-services/issues/577

/review @gsmet

repo: quarkiverse/quarkus-amazon-services


text:
Do not append Helm classifier in the tar files

As this seems to be included with systems like ArgoCD, we are not appending the classifier. Users that still want this behaviour, can use the new property quarkus.helm.tar-file-classifier=helm and the generated tar file will be generated as before <app name>-<app-version>-helm.tar.gz. I've also checked that this is how the Helm command line behaves when using helm package <chart name>.
Fix https://github.com/quarkiverse/quarkus-helm/issues/110

cc @csscriptplus

repo: quarkiverse/quarkus-helm


text:
Ability to serve a default response?

Since integrating with OpenAI costs real money, should there be a way that I can serve a default response if I want to "turn off" the integration at runtime? Maybe when I'm running in dev mode or if I'm doing a quick demo I don't want it to make "real" calls to an openai provider.

I certainly could add my own logic to whatever code I have that calls my ai service, but it would be nice if the library itself could support it.

How do you envision this would look like?

There would be some new config property, that when set to true, first the api-key (or the other required azure properties if using the azure extension) would no longer be required.
Then, maybe at the point of making the http request, some runtime exception is thrown instead? Maybe some new ClientCallBypassedException or something.
Then in the ai service interface I could use a fallback, either globally for all exceptions, or just for that specific exception, to return some default of my choice.
This way it keeps the extension from caring about what to do in that case?
Just a thought.

My question was really how this would looks from a user code pespective. What would the user set / change / configure?

I can whip up some sample code when I get to my desk if you'd like.

Sure, I'd like to see what you have in mind.

Here's what I'm thinking (I'm not good at naming things and I'm just pulling things out of thin air :) ).
In application.properties:
quarkus.langchain4j.openai.make-live-requests=false # This would be `true` by default
# OR
quarkus.langchain4j.azure-openai.make-live-requests=false # This would be `true` by default

The fact that I set the property to false would then make it so other properties, like api-key, are no longer required. When the service went to make the downstream call, if make-live-requests==false it would throw some new exception type (ClientCallBypassedException).
Then in my code I would do:
@RegisterAiService
public interface OpenAiNarrationService extends NarrationService {
  @SystemMessage("You are a marvel comics writer, expert in all sorts of super heroes and super villains.")
  @UserMessage("""
    Narrate the fight between a super hero and a super villain.

    During the narration, don't repeat "super hero" or "super villain".

    Write 4 paragraphs maximum. Be creative.

    The narration must be:
    - G rated
    - Workplace/family safe
    - No sexism, racism, or other bias/bigotry

    Here is the data you will use for the winner:

    +++++
    Name: {fight.winnerName}
    Powers: {fight.winnerPowers}
    Level: {fight.winnerLevel}
    +++++

    Here is the data you will use for the loser:

    +++++
    Name: {fight.loserName}
    Powers: {fight.loserPowers}
    Level: {fight.loserLevel}
    +++++

    Here is the data you will use for the fight:

    +++++
    {fight.winnerName} who is a {fight.winnerTeam} has won the fight against {fight.loserName} who is a {fight.loserTeam}.

    The fight took place in {fight.location.name}, which can be described as {fight.location.description}.
    +++++
    """)
  @Fallback(fallbackMethod = "narrateFallback")
  String narrate(Fight fight);

  default String narrateFallback(Fight fight, ClientCallBypassedException clientCallBypassed) {
    // It would be nice in here if I had access to the CDI context and could use other beans to form a response
    // Maybe I'm storing something as a property inside an @ConfigMapping class I'd want to read in here
    return "Some fallback because make-live-requests was turned off";
  }

  default String narrateFallback(Fight fight) {
    // It would be nice in here if I had access to the CDI context and could use other beans to form a response
    // Maybe I'm storing something as a property inside an @ConfigMapping class I'd want to read in here
    return "some fallback because something else happened";
  }
}

So this way it would only work if the fallback annotation was present. That doesn't seem ideal, no?

In this case yes the fallback annotation would have to be there yes. I was trying to think of a way that was least invasive for the library. Otherwise the rest call would have to return something. Using this approach the rest client stays "dumb", meaning it doesn't need to know about any particular response it needs to serve.
Just a thought though.

Right, I need to ponder on it

If I went ahead and brought up a PR that implemented this exception-based approach, would you entertain it? Or do you need to shake out the best design first? I'm really itching to have this capability, as when running locally (or in other environments where my credit card isn't available) I'd really like the app to work.

Upon starting to look at implementation details it looks like I'll have to do something in upstream langchain4j first. The config property/flag would need to get into the langchain4j model classes (OpenAiChatModel/etc).

This is because things like OpenAiRecorder directly return the upstream Langchain4j model classes which are then used by QuarkusOpenAiClient.QuarkusOpenAiClientBuilderFactory. There doesn't seem to be a way to feed QuarkusOpenAiClient with a property without going through the Langchain4j model objects.
On the Azure side it looks like the extension manages its own set of model classes.
Would it be worthwhile on the openai "vanilla" side to make it so the extension has its own set of model objects? These could extend the ones provided by upstream, so there wouldn't be much change actually.
I could work that into this change, or create a separate PR just for that if you'd like. Let me know what you think.

Would it be worthwhile on the openai "vanilla" side to make it so the extension has its own set of model objects? These could extend the ones provided by upstream, so there wouldn't be much change actually.

Sure, extending upstream sounds fine

Unfortunately that doesn't seem to be possible due to how Langchain4j is done.

In the Quarkus langchain extension, how does QuarkusOpenAiClient.Builder get invoked and the builder methods on it called? I see the factory getting registered in https://github.com/quarkiverse/quarkus-langchain4j/blob/main/openai/openai-common/runtime/src/main/resources/META-INF/services/dev.ai4j.openai4j.spi.OpenAiClientBuilderFactory, but where do the factory methods actually get invoked on the builder?

public abstract class OpenAiClient {
    public static OpenAiClient.Builder builder() {
        for (OpenAiClientBuilderFactory factory : ServiceHelper.loadFactories(OpenAiClientBuilderFactory.class)) {
            return factory.get();
        }
        // fallback to the default
        return DefaultOpenAiClient.builder();
    }
}

The extension provides QuarkusOpenAiClientBuilderFactory to hook into that

Right I saw that, but where do the methods on the builder actually get invoked within the extension? When application code uses @RegisterAiService the QuarkusOpenAiClient.Builder and its methods must get invoked somewhere in order to create the QuarkusOpenAiClient instance and register it as a bean.

@RegisterAiService uses the chatModel that is configured in OpenAiRecorder

Can you point me to where in the codebase this actually happens? At some point a bean instance for QuarkusOpenAiClient is registered somewere, no? I tried searching for references on QuarkusOpenAiClient but didn't find it, or maybe I overlooked it. Where are the QuarkusOpenAiClient.Builder methods actually called?

Can you point me to where in the codebase this actually happens? At some point a bean instance for QuarkusOpenAiClient is registered somewere, no?

Nope, an instance of the client is created per model (these models are the beans).
So in upstream Langchain4j when
        this.client = OpenAiClient.builder()
                .openAiApiKey(apiKey)
                .baseUrl(baseUrl)
                .organizationId(organizationId)
                .callTimeout(timeout)
                .connectTimeout(timeout)
                .readTimeout(timeout)
                .writeTimeout(timeout)
                .proxy(proxy)
                .logRequests(logRequests)
                .logResponses(logResponses)
                .build();

happens, the client is created

Gotcha! That was the missing link I've been looking for! So back to my previous comment about having our own models that extend the Langchain4j ones - that would give us the ability to customize the builder.
Maybe one enhancement for upstream langchain4j would be to stub out to a separate method where it does that. That way it could be overridden in our own model classes and we could add additional attributes.
The current way it works is that getting new attributes onto that builder involve changes to https://github.com/ai-for-java/openai4j which then have to be pulled into langchain4j, then pulled into here. It would be nice if we could enhance it for things specific to Quarkus that are above & beyond.

It would be nice if we could enhance it for things specific to Quarkus that are above & beyond.

Sure yeah

Once langchain4j/langchain4j#549 is released then this will consume that.

authors: edeandrea geoand