Skip to content

Instantly share code, notes, and snippets.

View stringertheory's full-sized avatar

Mike Stringer stringertheory

View GitHub Profile
@stringertheory
stringertheory / ks.R
Created April 7, 2014 21:27
Bootstrap KS test
# read in data
onlydown <- read.table('scores-onlydown.dat')[,1]
random <- read.table('scores-random.dat')[,1]
# use bootstrap version of KS test
library(Matching)
ks.boot(onlydown, random)
@stringertheory
stringertheory / threes_plot.py
Created March 14, 2014 15:14
A quicky script to make a vincent stacked area plot with the results of the threes simulation [this blog post](http://datascopeanalytics.com/what-we-think/2014/03/14/are-you-really-any-good-at-threes).
# standard library
import sys
import random
# 3rd party
import numpy as np
import vincent
N_SAMPLES = 10000
@stringertheory
stringertheory / threes_simulation.py
Last active June 26, 2023 14:00
A quicky python script to simulate random pushes in the Threes game at threesjs.com, as described in http://datascopeanalytics.com/what-we-think/2014/03/13/are-you-really-any-good-at-threes
# standard library
import sys
import random
import time
# need to pip install selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException