Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Hendrickson DrSkippy

View GitHub Profile
@DrSkippy
DrSkippy / stats.py
Created May 1, 2012
Python/Numpy/Scipy/Matplotlib statistical summary and histogram column of numbers
View stats.py
#!/usr/bin/env python
import sys
import numpy
import scipy
import scipy.stats
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-b", "--bins", dest="bins", default=50,
help="Number of bins (default = 50)")
@DrSkippy
DrSkippy / q1fy22 models
Last active Sep 29, 2021
q1fy22 models
View 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
View gist:a4c2a52c47c1eee7d641
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DrSkippy
DrSkippy / plotTimeSeries.r
Created Jan 24, 2012
R script for plotting time series volume data with ggplot, gridextra
View plotTimeSeries.r
#!/usr/bin/env Rscript
#
# Plot time series volume data
# install.packages("ggplot2", dependencies = TRUE )
# install.packages("gridExtra", dependencies = TRUE )
library(ggplot2)
library(gridExtra)
@DrSkippy
DrSkippy / sim.py
Last active Jan 12, 2016
Simulate patterns in sequences of of random symbols
View sim.py
#!/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 / urls.py
Created Mar 20, 2012
Lengthen Short URL with service longurl.org
View urls.py
#!/usr/bin/env python
#
# Scott Hendrickson
# 2012-03-18
#
import sys
import re
import urllib
import httplib2
View g_tweets.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View h_tweets.geojson
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 Nov 12, 2012
Graphic showing how many months old you are compared to median and long lifespans
View AgeProgressMeter.pde
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 Oct 22, 2012
Connecting to Gnip Streams within Python Threads
View streamingToThreads.py
#!/usr/bin/env python
import time
import threading
from threading import Lock
import base64
import zlib
import urllib2
printloc = Lock()
CHUNKSIZE = 2000