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; print(open(os.path.basename(__file__)).read()) |
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 shutil | |
import sys | |
cmd_re = re.compile('(\w+)\s+.*') | |
if 'zsh' in sys.argv[1]: | |
cmd_re = re.compile(".*;(\w+)\s+.*") | |
history= open(sys.argv[1], 'rb').read() |
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
#!/usr/bin/env python2.7 | |
import re | |
import shlex | |
import subprocess | |
LIST_ROUTES="/usr/sbin/netstat -nr" | |
IFCONFIG="/sbin/ifconfig" | |
DELETE_LINK="/sbin/route -n delete {destination} -link {linkno}" | |
DELETE_NET="/sbin/route -n delete -ifscope {netif} -net {destination}" |
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
#!/usr/bin/env python3 | |
import glob | |
import gzip | |
import logging | |
import multiprocessing | |
import os | |
import re | |
import sys | |
MODDATE_RE=re.compile("\s*<LastModDate Value=\"(\d+)\".") |
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/bash | |
while true; do | |
code=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-7} | head -n 1) | |
aria2c "https://bit.ly/$code" | |
done |
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
autocorrecting hypernet coding | |
antidiscrete nets |
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
#!/usr/bin/env python3 | |
import sys | |
import os | |
import sys | |
import Quartz | |
d = Quartz.CGSessionCopyCurrentDictionary() | |
LOCKED_FILE = '$HOME/tmp/.locked' |
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 random | |
ITERS = 10000 | |
a = ['g', 'g', 'c'] | |
stay_results = [] | |
for i in range(ITERS): | |
random.shuffle(a) | |
init_choice = int(random.random()*len(a)) | |
goat = [i for i in range(3) if i != init_choice and a[i] != 'c'][0] |
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
#!/usr/bin/env python3 | |
import argparse | |
import datetime | |
import re | |
import os | |
import hashlib | |
import logging | |
import sys | |
import subprocess |
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 csv | |
import os | |
import re | |
import sys | |
from bs4 import BeautifulSoup | |
from pathlib import Path | |
DATA_DIR = sys.argv[1] | |
TYPE_MAP = { |