I hereby claim:
- I am astronouth7303 on github.
- I am astraluma (https://keybase.io/astraluma) on keybase.
- I have a public key ASAryKyuDpM03VLlWyWLGP3dG8ItyZH0Q77LV0yyAKpuKwo
To claim this, I am signing this object:
| import asyncio | |
| async def say(what, when): | |
| await asyncio.sleep(when) | |
| print(what) | |
| # print() is already buffered by Python, IPC Pipes, etc | |
| # You should still async it, but it's only going to bite | |
| # when other things go wrong. |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python3 | |
| """ | |
| A little script to make minimal pyz packages for zipsafe programs. | |
| NOTE: zip safe means: | |
| * No package expects to be able to use open() to access data it shipped with | |
| * No compiled modules | |
| """ | |
| import argparse | |
| import os |
Proof of Concept of using Python+Async to connect to a server over SSH.
Requires:
msgpacktornado<5Run client.py, assumes you're running ssh-server on localhost and that you can log in to it.
| import functools | |
| from gi.repository import GObject | |
| from gi.repository import Gio | |
| from gi.repository import GLib | |
| def runloop(func): | |
| @functools.wraps(func) | |
| def wrapped(*pargs, **kwargs): | |
| func(None) |
| import collections.abc | |
| import pathlib | |
| __all__ = ('root',) | |
| class AttrsView(collections.abc.KeysView): | |
| def __init__(self, root): | |
| self._root = pathlib.Path(root) |
| ACTION=="add", ENV{ID_SERIAL}=="*?", RUN+="/home/astraluma/udev-handler" |
cybre.desktop to ~/.local/share/applications/usr/local/share/pixmaps/cybre.pngThe basic idea: Define GraphQL queries as importable modules.
For example:
# queries.gql
#!starwars
query HeroForEpisode($ep: Episode!) {
hero(episode: $ep) {| #!/usr/bin/python3 | |
| import enum | |
| import dataclasses | |
| import struct | |
| import asyncio | |
| import weakref | |
| class InvalidPacket(Exception): | |
| """ |