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 | |
import random | |
import re | |
import sys | |
from collections import defaultdict, namedtuple | |
from itertools import chain, count | |
from operator import add | |
from random import choice | |
from string import uppercase |
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 | |
import random | |
import re | |
import sys | |
from collections import defaultdict, namedtuple | |
from itertools import chain, count | |
from operator import add | |
from random import choice | |
from string import uppercase |
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 | |
from collections import defaultdict | |
def update(input): | |
counts[input] += 1 | |
def play(): | |
rcounts = {str(v): k for k, v in counts} | |
return rcounts[max([str(val) for val in counts.values())]] |
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 | |
print "bot 1" | |
if input is '': | |
print "input = ''" | |
else: | |
print input | |
output = random.choice(['R', 'P', 'S']) | |
print "bot 1" | |
print output |
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 | |
import time | |
from math import sqrt | |
def sieve(stop): | |
''' | |
That sieve of eratosthenes thing. Implemented directly from the | |
pseudocode found here: | |
http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Implementation | |
''' |
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): | |
''' | |
That sieve of eratosthenes thing. Implemented directly from the | |
pseudocode found here: | |
http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Implementation | |
''' | |
stop += 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
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: |
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
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
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 |