This file contains hidden or 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
# Taken from streamlink | |
import re | |
from binascii import unhexlify | |
from collections import namedtuple | |
from itertools import starmap | |
from urlparse import urljoin, urlparse | |
This file contains hidden or 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 collections | |
import json | |
import threading | |
from Queue import Queue | |
import _jsonnet as jsonnet | |
class LazyExecutor(threading.Thread): |
This file contains hidden or 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
0eJzFfe3OHjdy7K0E/r0KZvg95wbORRwEgSy/8QqxPiDJuwmCvffzWJvdl3xbxanhVEt/Fl5ZZnH6aTab7Ori//z082+/P3389Pb9l5/+z7/8z09vvzy9e/xD96d/+pef3r758P7z40//3+Pfv//l6b8e/7g//vjz21/fv/7t63/25b8/Pv3xn339zx//6v3rd1///+vPn5/e/fzb2/e/vnr3+s2f375/ehV/+tvf/u3xV/7y9Onz2w/vH3+rtBpC24+thsefP73/8vbL26f/xfv44fPj/339a//z038//vfVXrZ/zY+/98csXsX2r/lv//iP/vvf3//+7uenT/87vX/M4dOHnz98/PDpy0+Pv/jNAXPtBqzfHjB0A/789tdXT789vfny6e2bVx8//PYERy77v27/HDn/6/atkWM38runX97+/m5h8FC/PXiSDA5mnpcH73/B8u3By+PPfnn76THc3//b/ks+/v7uI/41j87mYPDaD/b249OrLx9e/frpw+/vf8HDhvNh22zOHMzgMenbMMcE5um/Pn56+vz51QPj6dPfsV79/PTb12X8z0X6/uPvk9UQzmewbzen8OH3L7M5DFYIYA779zMDmkJwNkO/TjYwhyhZKGj0BRceLIfGzdqlEhrAmYURrZPAKVR3J+kj9be3w1lk+sccPn/87e2XL4+//6d/YP77IwP48Okx0tdt9O2vf55YonOmAMLjzgSuL59ev//8x3b9dztQeGB/Cnej1MmP384/ObwMUuHGJzfik19GpG/h3fjkSkxhFpAE/p4LYfYk9LRCfPPLcFbW8Yawhr6PCWvs92UCj4lhLF4i8Jh4xeJFAk8ZmcI5XmQi00pYAIlKZMLQnTXZz2EHc2BC08o3gxQjvoxDd/B6H4oA72XM+VYMuGPjfg4gL4+ztOqOHyM8ZRyKhB+/jENXbXyyvUXCjV+GphuhfsBDbvwyNN3B65bNfoAbg5ehSbRMd5Aep100ProB6ed/6Zai36jg6Mu3N/1vD38LJqQ |
This file contains hidden or 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
0eNqkvd2SZTeOpfkuuk4v2/wn61XGxsaUyqissJZCspA01mVt+e4T2eXu4ZO9gbO+da5CUuiAJIgFcJPAwv/64a8///npt6+fv/zxw7//rx8+//Trl99/+Pf/63/98Pvnv3/58ed//rc//uu3Tz/8+w+f//j0yw9/+eHLj7/8899+/P33T7/89efPX/7+8suPP/3n5y+fXtoP//jLD5+//O3T//zh38s//vJQxKf/+dvXT7///vLH1x+//P7br1//ePnrp5//+CCkCkJ+/Nv/++OXnz797eWnz19/+vPzx5+3537e//F//+WHT1/++PzH50//rZL//S//9f98+fOXv376+m2N71J++/xN9F9++O3X37/9z79++edo3wS8lHn+8sN/ffuHsf/xz7n8y+/r/+/3L3/8+vL3r7/++eVvqaR1J6k9nsnOZtIf/35lvx+Pfz+z38/Hvx/Z7xfR5Mw0uR/PpGczOY9/37Lfl4sspWVLKYWIqu+z+ssPf/v89dNP//3X804wMdxx7gXXO8GP7Xikdly6LuBeZ4MsbbyLeqyzxyY+UsMs67GAkgrYZGn1fmm3u3aI4EvXWSVY6EufcX3suXu6GZUgoAMzqY8R0NNdrp3MDOxyJcjoZJcnENzILj9GTMt3mSCmkV1+HCVausuNIKOBXW4kZjSwy40gpoJdbo0IBpvUHseSmppPI4ipZJMex5Kamw85L1WyywQxhewyiTEF7HK/HuqypLvcCWJK0ZfcCWLKdX/K6neCH8eYcqVL/o6M3//49Onnl5/+89Pvf9zJWW9WPW/lDOcDaAgrnPr3zP3Mli5g3ArY+hfR/QyO/kl0K2BczjeRoNxR9E+c+5lV/RvrXkDTBdzuzujOR5aiG+FDOIXEECy3pEtbuoD7GQiWe6UCiKt+F3W7mElseHxH9EOvP4v+nXi7yPndhn/9/PPL10//8fnLp6//lX4ltsf2M5v+lXg/r+58v87H0Wg+tuyRgnaSY/5oYC+XvhUX2Iqtf2/fL/ixB+8 |
This file contains hidden or 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
0eJzEve/OHjdy7XsrG/N5FDT/k+dWDg4Cj0fbI4wtC5Kc7CDIvZ+WZ09EvuVFriarnnxJPLbEqq6HLFaTv1r9n3/6y8+/vf/0+cPHr3/6f/7Xf/7pw9f3v9z/0P3bP/+vP3348dePX+5/+//e//3jX9//n/sf3f2vv3z46eMPP//+177+x6f33/7a73/9/k8ff/jl9//9w5cv73/5y88fPv707pcffvzbh4/v34U//dd//X/3H/m395+/fPj14/2nci3eV9eu4u9///7j1w9fP7z/v/Y+/frl/l+//7H//NN/3P/3nc/lX9L957558S64f0n/9c+/9B//+vG3X/7y/vP/de+fPnz+9S+/fvr189c/3X/wjweM3YDXHw/ouwH/8uGnd+9/fv/j188ffnz36def3+OR679c/xzZ3//8RyOHbuRf3v/1w2+/7Ax+/fHgUWNwBzxP24OXYfA/DHi+/91fP3y+h/vH3+2f5P3/+fT5/Zcv7758+vnD16/3H7//26+/ff3029d/vefsr5/vgX7/4T/89LfJr547J9ofP2EhnPj6+YePX77Nr3d/ef8zaQ4EtBLmfrsX4OefPv96//9/GLz/zH+vvo93CLAHaf3A7Y0H/uCB0/qB3UXYO3jiSLjgDoP+j4mHfQjrqDuvOM8C8czhjb18YK8SzxcVn88T9pKiPUfYY5IVa+8i7CnmpdQIe0xi2kkLCdhj0tDJmux9iH/sg2dS084zB2DvbR46sdfPoQzsvc05f5QDTmLc+1CAD2/zkNY8RvY089C1nsf+bR56GuPF9nYR0/htajpJ9Rcxjd+mJqWtxYPU5G1rpn5WQRfeZivtCqIPA5jZ4W22MgwDcsG6kOrDABZcYAoppTAgF5icdhKG7u3Xg0UYZnnu02+/fKLeUuDo/Xvfpw+f3r/7+uu7fzwMFzk07qyKIu0M0XHAzqx64qODRq+H0UHjzrIMG52+DvHgxMCq7gHPFZ3S+OgEpPf/2SmFI0bfP725iN/i7To+2Uwz8Vu |
This file contains hidden or 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 os | |
import re | |
import time | |
import argh | |
PATTERNS = { | |
# Hard code Player 1 here to ignore uselss matches like "World" |
This file contains hidden or 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
// Proof of concept for exploring an idea I had with using rust's type system | |
// to manage the di/ei instructions on a Gameboy (if I ever get rust-on-gb working). | |
// It works as follows: We have a zero-sized IntFlag object. It's zero sized | |
// because it is NOT actually maintaining the state. It mediates access to the state | |
// at compile time by being borrowed. | |
// Each function that MAY disable interrupts (either in itself or a child func) must | |
// take a &mut IntFlag. It can then borrow that for an IntDisableGuard, | |
// as long as it releases it before the original borrow's lifetime expires (ie. by returning). |
This file contains hidden or 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 itertools as it | |
import argh | |
def get_tries(codes, permute, start, offset, hardcodes): | |
""" | |
codes is list of codes | |
permute is a permutation of (0, 1, 2) where the value at index i | |
is the index (MSD first) of the digit in the counting number to be used in that position. |
This file contains hidden or 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
from urllib import urlencode | |
import requests | |
import argh | |
def build_url(base, **kwargs): | |
return '{}?{}'.format(base, urlencode(kwargs)) |
This file contains hidden or 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
#!/bin/env python2 | |
import os | |
import re | |
import time | |
import argh | |
PATTERNS = { |