`time.perf_counter_ns` always a 64-bit int?

2023-09-15 Thread rmlibre--- via Python-list
I'd like to capture the output of `time.perf_counter_ns()` as an 8-byte timestamp. I'm aware that the docs provide an undefined start value for that clock. I'm going to assume that means it can't be expected to fit within 8 bytes. However, it would be rather convenient if it could. Does anyone kno

sha3 internal state export & import

2021-08-27 Thread rmlibre
ew object? The goal is to be able to pause a hash object, then to store the state for some later time at which a new object can be created that's functionally equivalent to the first. Is there a simple way to do this? Best, rmlibre -- https://mail.python.org/mailman/listinfo/python-list

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-18 Thread rmlibre
There are many reasons Elements is a terrible English style guide: https://www.pure.ed.ac.uk/ws/files/8520953/PULLUM_2010_The_land_of_the_free_and_the_elements_of_style.pdf I would kindly recommend that folks just educate themselves on what white supremacy is & how it continues in both subtle & ov

Re: Ram memory not freed after executing python script on ubuntu system (rmlibre)

2020-05-28 Thread rmlibre
We just ran into this problem when running our aiootp package's memory hard password hashing function (https://github.com/rmlibre/aiootp/). The memory was not being cleared after the function finished running but the script was still live. We tried making sure everything went out of scop

Re: Asyncio question (rmlibre)

2020-02-27 Thread rmlibre
What resources are you trying to conserve? If you want to try conserving time, you shouldn't have to worry about starting too many background tasks. That's because asyncio code was designed to be extremely time efficient at handling large numbers of concurrent async tasks. For your application

Is asyncio.sleep() necessary when yielding?

2020-01-28 Thread rmlibre
(Sorry about the double submission) I'm trying to figure out how the event loop handles switching tasks inside of an async generator, and consequently, the constraints on its calling code. For example: > async def gen(): > for number in range(10 ** 7): > yield number > > > async def

Is asyncio.sleep() necessary when yielding?

2020-01-28 Thread rmlibre
I'm trying to figure out how the event loop handles switching tasks inside of an async generator, and consequently, the constraints on its calling code. For example: > async def > > > > > > -- https://mail.python.org/mailman/listinfo/python-list

Re: tab replace to space 4 (rmlibre)

2019-12-01 Thread rmlibre
> Its just that I've just began to touch tkinter, and would like to know of > bug-related pitfalls before I waste energy on trying to figure out what I > did wrong. :-\ One thing which is not obvious or easy to debug: Text widgets have some kind of inefficiency related to really long lines that d

GPG wrapper, ECC 25519 compatible?

2019-09-02 Thread rmlibre
I'm looking for a non-gui GPG wrapper that supports elliptic-curve 25519 for development. The only one's I've seen that support ECC, only support the p-XYZ curves created by NIST. I've tried monkey-patching python-gnupg to add 25519 support, but I can't get my head around that codebase. Or if you h

Re: Python unit test framework to fire 1000 unique concurrent requests (rmlibre)

2019-08-29 Thread rmlibre
If you want to try out some libraries to build your own tests, you could try aiohttp, aiodns, and asyncio. The requests using these libraries are made asynchronously, not completely in parallel, but produce a similar effect at lower cost. Some examples and docs on these can be found here: https://d

Re: Style suggestions/critiques (rmlibre)

2019-08-21 Thread rmlibre
You might could consider using numpy, and storing the points in a list or list-like class. numpy can convert a list into an array, and then you can do one line binary operations on each element in the list. An example, let's assume we start with your implementation, and make a list of your lines: