Skip to content

Instantly share code, notes, and snippets.

@geidsmoe
geidsmoe / riddler_classic_927_2019.py
Last active September 30, 2019 22:48
Simulates a grueling 1000 game season between the teams of Riddler League Baseball.
import random
def game(t1, t2):
runs = [0, 0]
for i in xrange(9):
inning_runs = inning(t1, t2)
runs[0] += inning_runs[0]
runs[1] += inning_runs[1]
@geidsmoe
geidsmoe / war.py
Created February 6, 2019 00:33
Riddler Classic 2/1/2019
import numpy as np
def war(h1, h2):
h1_wins = 0
h2_wins = 0
for c1, c2 in zip(h1, h2):
if c1 > c2:
h1_wins += 1
else:
h2_wins += 1
from splinter import Browser
with Browser() as browser:
email = "email"
password = "password"
url = "https://www.facebook.com/"
browser.visit(url)
browser.fill("email", email)
browser.fill("pass", password)
button = browser.find_by_id('u_0_n')