Skip to content

Instantly share code, notes, and snippets.

View amyreese's full-sized avatar
🐍
herding snakes

Amethyst Reese amyreese

🐍
herding snakes
View GitHub Profile
version: 0.7.1
command: /Users/amethyst/workspace/ghstack/.venv/bin/ghstack
status: 18aa0a158 "Switch from argparse to click"
config_path = /Users/amethyst/.ghstackrc
conf = Config(proxy=None, github_oauth='<GITHUB_OAUTH>', github_username='amyreese', circle_token=None, fbsource_path='/Users/amethyst/local/fbsource', github_path='/Users/amethyst/local/ghstack-pytorch', default_project_dir='fbcode/caffe2', github_url='github.com', remote_name='upstream')
$ git remote get-url upstream
Using selector: KqueueSelector
git@github.com:ezyang/ghstack.git
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //test:RollingWindowCounterTest
-----------------------------------------------------------------------------
Running main() from gmock_main.cc
[==========] Running 3 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 3 tests from RollingWindowCounterTest/0, where TypeParam = SimpleRollingWindowCounter
[ RUN ] RollingWindowCounterTest/0.CountsAllEvents
[ OK ] RollingWindowCounterTest/0.CountsAllEvents (516 ms)
[ RUN ] RollingWindowCounterTest/0.CountsAllEventsMultithreadedTasks
@amyreese
amyreese / layout1.txt
Created November 18, 2019 18:55
Kinesis Freestyle Pro with Dvorak for Mac
[F1]>[esc]
[F2]>[F1]
[F3]>[F2]
[F4]>[F3]
[F5]>[F4]
[F6]>[F5]
[F7]>[F6]
[F8]>[F7]
[F9]>[F8]
[F10]>[F9]
diff --git a/aioitertools/asyncio.py b/aioitertools/asyncio.py
index a98b961..0038f02 100644
--- a/aioitertools/asyncio.py
+++ b/aioitertools/asyncio.py
@@ -9,7 +9,7 @@ Provisional library. Must be imported as `aioitertools.asyncio`.
import asyncio
import time
-from typing import Awaitable, Iterable, Optional, Set
+from typing import Awaitable, Iterable, Optional, Set, Tuple, cast
import asyncio
import signal
def handler(*args, **kwargs):
print(f"signal caught: {args} {kwargs}")
async def main():
for i in reversed(range(15)):
@amyreese
amyreese / gist:a6adf9e5dca020dd77080a08448fe952
Created May 12, 2019 03:15
CircuitPython docs build failure
(.venv) jreese@legion ~/workspace/circuitpython docs-reqs± » make html
sphinx-build -b html -d _build/doctrees -c . -E -v . _build/html
Running Sphinx v2.0.1
/Users/jreese/workspace/circuitpython/.venv/lib/python3.5/site-packages/sphinx/util/compat.py:33: RemovedInSphinx30Warni
ng: The config variable "source_parsers" is deprecated. Please use app.add_source_parser() API instead.
RemovedInSphinx30Warning)
/Users/jreese/workspace/circuitpython/.venv/lib/python3.5/site-packages/sphinx/util/compat.py:37: RemovedInSphinx30Warni
ng: app.add_source_parser() does not support suffix argument. Use app.add_source_suffix() instead.
app.add_source_parser(suffix, parser)
/Users/jreese/workspace/circuitpython/.venv/lib/python3.5/site-packages/sphinx/util/compat.py:37: RemovedInSphinx30Warni
# Sphinx version: 2.0.1
# Python version: 3.5.5 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10.1
# Last messages:
# reading sources... [ 21%] docs/supported_ports
#
# reading sources... [ 21%] docs/troubleshooting
#
# reading sources... [ 22%] license
import asyncio
from aiohttp import request
from aiomultiprocess import Worker
async def get(url):
async with request("GET", url) as response:
return await response.text("utf-8")
async def main():
p = Worker(target=get, args=("https://jreese.sh", ))
import asyncio
import aiohttp
import logging
import time
from aiomultiprocess import core, Pool
async def get(url):
session = aiohttp.ClientSession()
response = await session.get(url)
(.venv) jreese@legion ~/workspace/aql master » bowler do 'Query().select_class("Operation").rename("Comparison").diff()'
--- ./aql/column.py
+++ ./aql/column.py
@@ -11,7 +11,7 @@
@dataclass
-class Operation:
+class Comparison:
column: "Column"