In [4]: dis.dis(try0)
19 0 LOAD_GLOBAL 0 (set)
3 LOAD_FAST 0 (x)
6 LOAD_ATTR 1 (keys)
9 CALL_FUNCTION 0
12 CALL_FUNCTION 1
15 LOAD_ATTR 2 (intersection)
18 LOAD_FAST 1 (y)
21 LOAD_ATTR 1 (keys)
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 bash | |
NYAN=('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbmbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' | |
'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmb' |
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
G4='-f 392.00' | |
C5='-f 523.25' | |
E5='-f 659.26' | |
G5='-f 783.99' | |
whole='-l 2048' | |
dottedhalf='-l 1536' | |
half='-l 1024' | |
dottedquarter='-l 768' | |
quarter='-l 512' |
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/bash | |
nevergonnagiveyouup() { | |
false | |
while [ $? -ne 0 ]; do | |
${@} | |
if [ $? -ne 0 ]; then | |
echo "[$(\date +%Y.%m.%d_%H%M)] FAIL: trying again in 60 seconds..." | |
sleep 60 |
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/bash | |
wait_do() { | |
if [[ `uname` == 'Darwin' ]]; then | |
if ! command -v fswatch &>/dev/null; then | |
echo "fswatch not found!" | |
return | |
fi | |
fswatch . ${@} | |
else |
I hereby claim:
- I am wting on github.
- I am wting (https://keybase.io/wting) on keybase.
- I have a public key whose fingerprint is 677D 5827 5462 6086 8DC8 7AEC 6391 002C 8D7D FCE5
To claim this, I am signing this object:
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 binascii | |
import struct | |
class Punk(object): | |
"""Full blog post about hiding data within PNG files here: | |
http://blog.brian.jp/python/png/2016/07/07/file-fun-with-pyhon.html | |
Example use case: |
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 hypothesis import given, settings | |
from hypothesis.strategies import lists, sampled_from | |
def new_state(): | |
return {'big': 0, 'small': 0} | |
def invariants(state): | |
return (0 <= state['small'] <= 3 and | |
0 <= state['big'] <= 5) |
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 zsh | |
local args name num | |
if git rev-parse --git-dir &>/dev/null; then | |
git grep -En "(def|class) ${@}[[:space:]]*[(:]" \ | |
| uniq \ | |
| while read line; do | |
name=$(echo "${line}" | awk 'BEGIN { FS=":" }; { print $1 }') | |
num=$(echo "${line}" | awk 'BEGIN { FS=":" }; { print $2 }') |
OlderNewer