Skip to content

Instantly share code, notes, and snippets.

View DrSkippy's full-sized avatar

Scott Hendrickson DrSkippy

View GitHub Profile
@DrSkippy
DrSkippy / q1fy22 models
Last active September 29, 2021 20:41
q1fy22 models
####################################################################
"""
successful sprints Fraction Achievement
0 | 0.00 | 0.90
1 | 0.33 | 0.93
2 | 0.67 | 0.97
3 | 1.00 | 1.00
4 | 1.33 | 1.03
5 | 1.67 | 1.07
6 | 2.00 | 1.10
@DrSkippy
DrSkippy / sim.py
Last active January 12, 2016 20:50
Simulate patterns in sequences of of random symbols
#!/usr/bin/env python
# Scott Hendrickson
# @drskippy
# On average, how long do we have to wait for the various patterns in a random sequence
import random
import itertools
import string
import sys
import numpy as np
@DrSkippy
DrSkippy / gist:a4c2a52c47c1eee7d641
Last active December 21, 2017 23:45
cookie map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DrSkippy
DrSkippy / AgeProgressMeter.pde
Created November 12, 2012 04:00
Graphic showing how many months old you are compared to median and long lifespans
import java.util.*;
int boxSize = 5; // pixel size of month representation
int boxSpacing = 4; // vertical and horizontal spacing
int decadeSpacing = 2*boxSpacing; // extra space between decades
int markerOverhang = 18;
int margin = 150;
int w;
// Ages
int age = 0;
@DrSkippy
DrSkippy / streamingToThreads.py
Created October 22, 2012 21:52
Connecting to Gnip Streams within Python Threads
#!/usr/bin/env python
import time
import threading
from threading import Lock
import base64
import zlib
import urllib2
printloc = Lock()
CHUNKSIZE = 2000
@DrSkippy
DrSkippy / gnip_stream.py
Created October 16, 2012 19:26
Consuming the Gnipstream with python urllib2
#!/usr/bin/env python
import urllib2
import base64
import zlib
import threading
from threading import Lock
import json
import sys
import ssl
@DrSkippy
DrSkippy / year-over-year-comp.r
Created September 27, 2012 19:24
Year-by-year 1-column comparison of timeseries data with facet_wrap
#!/usr/bin/env Rscript
library(ggplot2)
library(stringr)
library(gridExtra)
library(scales)
args <- commandArgs(trailingOnly = TRUE)
format_si <- function(...) {
# Format a vector of numeric values according