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 python | |
from collections import defaultdict | |
from itertools import repeat | |
from pprint import pprint | |
from random import choice | |
def grid(height, width): | |
return [['0' for n in range(width)] for n in range(height)] | |
def place_bombs(grid, n_bombs): |
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 python | |
from collections import defaultdict | |
from itertools import chain, repeat | |
from random import choice | |
################## | |
# Map Generation # | |
################## | |
#============== |
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
crawl () { | |
case "$1" in | |
"cao" ) | |
user="joshua" | |
server="crawl.akrasiac.org" | |
;; | |
"cdo" ) | |
user="crawl" | |
server="crawl.develz.org" | |
;; |
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
crawl () { | |
case "$1" in | |
"cao" ) | |
user="joshua" | |
server="crawl.akrasiac.org" | |
;; | |
"cdo" ) | |
user="crawl" | |
server="crawl.develz.org" | |
;; |
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
crawl () { | |
case "$1" in | |
"cao" ) | |
user="joshua" | |
server="crawl.akrasiac.org" | |
;; | |
"cdo" ) | |
user="crawl" | |
server="crawl.develz.org" | |
;; |
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 | |
log_dir=~/irclogs/crawl | |
rm ~/names | |
grep -ir "$1" "$log_dir" | grep -oE "< [[:alnum:]]+>" | grep -ivE "(Henzell|Sequell|Gretell|Sizzell)" >> ~/names | |
python name_counts.py |
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 collections import defaultdict | |
with open("names") as f: | |
names = [name.strip() for name in f] | |
counts = defaultdict(int) | |
for name in names: | |
counts[name] += 1 |
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
Amulet of Cekugob | |
Amulet of the Air | |
Amulet of the Four Winds | |
Armour of the Dragon King | |
Autumn Katana | |
Black Knight's Horse Barding | |
Blowgun of the Assassin | |
Boots of the Assassin | |
Bow of Krishna "sharnga" | |
Brooch of Shielding |
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
Host cao | |
User joshua | |
HostName crawl.akrasiac.org | |
IdentityFile ~/.ssh/cao_key | |
Compression yes | |
Host cdo | |
User crawl | |
HostName crawl.develz.org | |
IdentityFile ~/.ssh/cao_key |
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 time | |
from math import sqrt | |
def sieve(stop): | |
stop += 1 | |
counter = 0 | |
num_list = range(2, stop) | |
for i in num_list: | |
counter += 1 | |
if i: |