I hereby claim:
- I am stesh on github.
- I am stesh (https://keybase.io/stesh) on keybase.
- I have a public key ASDB0VqQYaP4igLHS3te3PuHl8rM26fyeyTxo0gq1VjG-Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| >>> from Queue import PriorityQueue | |
| >>> l = [PriorityQueue()] * 10 | |
| >>> [hash(x) for x in l] | |
| [-9223372036579180054, -9223372036579180054, -9223372036579180054, -9223372036579180054, -9223372036579180054, -9223372036579180054, -9223372036579180054, -9223372036579180054, -9223372036579180054, -9223372036579180054] | |
| >>> l = [PriorityQueue() for _ in range(10)] | |
| >>> [hash(x) for x in l] | |
| [275597326, 275597335, 275597371, -9223372036579178388, 275597470, -9223372036579178289, 275597829, -9223372036579177930, 275597928, -9223372036579177831] |
| #!/usr/bin/python | |
| from collections import defaultdict | |
| def nested_defaultdict(f, n): | |
| if n == 1: | |
| return defaultdict(f) | |
| else: | |
| return defaultdict(lambda: nested_defaultdict(f, n-1)) |
| #!/bin/sh | |
| app="/Applications/SWI-Prolog.app" | |
| export SWI_HOME_DIR="$app/Contents/swipl" | |
| exec "$app/Contents/MacOS/$(basename $0)" $@ |
| #!/bin/bash | |
| [ -z "$1" -o -z "$2" ] && ( | |
| cat <<EOF >&2 | |
| Usage: $0 <YouTube URL> <filename> | |
| EOF | |
| exit 1 | |
| ) | |
| URL="$1" |
| <Perl> | |
| use Apache2::ServerUtil; | |
| my @sites = ( | |
| "netsoc.tcd.ie", | |
| "issue.netsoc.tcd.ie", | |
| "meta.netsoc.tcd.ie", | |
| "cubewww.cube-external.netsoc.tcd.ie", | |
| "meecro.netsoc.tcd.ie", | |
| "phpmyadmin.netsoc.tcd.ie", |
| #!/usr/bin/python | |
| from subprocess import call | |
| open = lambda s: call(['open', 'http://%s' % s]) | |
| news = [ | |
| 'bbc.co.uk', | |
| 'theguardian.co.uk', | |
| 'telegraph.co.uk', |
| #!/bin/bash | |
| export PATH=$PATH:/opt/hadoop/hadoop-0.20.2/bin/ | |
| HDFS_PATH="/user/s1317371" | |
| if [ -e $1 ]; then | |
| rm $1 | |
| fi |
| >>> detect_language(u'Buenas días') | |
| 'spanish' | |
| >>> detect_language(u'Hello there') | |
| 'english' | |
| >>> detect_language(u'Guten Tag') | |
| 'german' |
| #!/bin/bash | |
| if [ $# -ne 1 ]; then | |
| echo "Usage: $0 <title>" > /dev/stderr | |
| exit 1 | |
| fi | |
| title="$1" | |
| cat > "$title.tex" <<EOF |