This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am SunDwarf on github. | |
* I am eyes (https://keybase.io/eyes) on keybase. | |
* I have a public key whose fingerprint is 8B8B 35B1 7125 4CB5 F7C4 5874 B33B 7868 C4AE 93CA | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified from https://gist.github.com/cesarkawakami/887ba74c4bc99464feba | |
import dis | |
import struct | |
import types | |
# WHY. | |
def instancemethod(f): | |
if getattr(f, "im_func", None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DRIVE=/dev/sdd | |
TAR_LOC=/home/eyes/Downloads/ArchLinuxARM-rpi-2-latest.tar.gz | |
echo "Enter IP of new Pi..." | |
read ip | |
echo "Unmounting existing partitions..." | |
umount -v ${DRIVE}1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
I'm so sorry. | |
""" | |
import inspect | |
import collections.abc as collections_abc | |
from collections import OrderedDict | |
def overloadable(func): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
I'm so sorry. | |
""" | |
import inspect | |
import collections.abc as collections_abc | |
from collections import OrderedDict | |
def overloadable(func): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A uWSGI adapter for Kyoukai. | |
This allows you to run Kyoukai with uWSGI as the web server. It translates the WSGI protocol into Kyoukai itself. | |
""" | |
import asyncio | |
import greenlet | |
import functools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A HTTP/2 interface to Kyoukai. | |
This uses https://python-hyper.org/projects/h2/en/stable/asyncio-example.html as a reference and a base. Massive thanks | |
to the authors of this page. | |
""" | |
import asyncio | |
import importlib | |
import ssl | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
def gi(s, k): | |
try: | |
return s[k] | |
except KeyError: | |
raise AttributeError(k) from None | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Step 1: Add ~/.local/bin to PATH if it's not there already. | |
if ! [[ ":$PATH:" == *":$HOME/.local/bin:"* ]]; then | |
export PATH=$HOME/.local/bin:$PATH | |
fi | |
# Step 2: Bootstrip pip into user directory using get-pip.py. | |
curl https://bootstrap.pypa.io/get-pip.py | python3 - --user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import asks | |
import curio | |
import traceback | |
from curious import Client | |
from curious.commands.manager import CommandsManager | |
from typing import Dict, Set | |
client = Client(token=sys.argv[1]) |
OlderNewer