Skip to content

Instantly share code, notes, and snippets.


Maxwell A McKinnon maxwellmckinnon

View GitHub Profile
maxwellmckinnon / 300 IQ
Last active Dec 29, 2019
Obscure analogy generator from word embeddings
View 300 IQ
def random_analogies():
r = lambda: random.randint(0,len(embeddings)-1)
x = list(embeddings.keys())[r()]
y = list(embeddings.keys())[r()]
z = list(embeddings.keys())[r()]
restart = False
for w in [x, y, z]:
if not w.isalpha():
restart = True
View SF_Dir_Organization.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
maxwellmckinnon /
Created Oct 31, 2017
Solution to zero move nim
# Chris Grundy McKinnon method
import sys
from functools import reduce
g = int(input().strip())
for a0 in range(g):
n = int(input().strip()) # num of heaps
p = [int(p_temp) for p_temp in input().strip().split(' ')] # pile counts