Skip to content

Instantly share code, notes, and snippets.

@jmhummel
jmhummel / 2018-09-28-classic.md
Last active September 30, 2018 04:52
2018-09-28-classic-results

Go here to see the python script!

Number of starting permutations

51480

Number of moves required:

{0: 1, 1: 65, 2: 1253, 3: 9653, 4: 27422, 5: 12946, 6: 140}

Stats:

@jmhummel
jmhummel / 2018-09-28-classic.py
Last active September 30, 2018 04:39
2018-09-28-classic-code
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
# See: https://gist.github.com/jmhummel/fe7604ab830567d5939b21d3e6c57dfa for results!
import ast
import random
import datetime
import multiprocessing
from multiprocessing import Pool
@jmhummel
jmhummel / 2018-09-07-classic.py
Created September 7, 2018 23:27
Riddler 2018-09-07 Classic, "I’d Like To Use My Riddler Lifeline"
import random
def open_pack(set_size=100):
return random.sample(xrange(set_size), 10)
def collect(set_size=100):
owned = set([])
packs_bought = 0
while len(owned) != set_size:
packs_bought += 1
@jmhummel
jmhummel / 2018-08-31-express.py
Created September 3, 2018 00:52
Riddler 2018-08-31 Express, "The New National Pastime: Competitive Coin Flipping"
import random
def enum(**enums):
return type('Enum', (), enums)
Coin = enum(HEADS='H', TAILS='T')
Team = enum(RED='Red', BLUE='Blue')
Goal = enum(RED=[Coin.HEADS, Coin.TAILS], BLUE=[Coin.HEADS, Coin.HEADS])
def flip():
@jmhummel
jmhummel / genesis_public_key
Last active March 5, 2018 07:31
genesis_public_key
0494fc7e6e72b2cc80f06bb5a1afec91c72b82bcff527e66c021e90d4fc1be41342d9a8f22ba4973402131f90a08c723f221729ef56b09f25f2be9d475b1b3ae34;matty1983