Skip to content

Instantly share code, notes, and snippets.

Scott Hendrickson DrSkippy

Block or report user

Report or block DrSkippy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
View gist:a4c2a52c47c1eee7d641
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
@DrSkippy
DrSkippy / gnip_stream.py
Created Oct 16, 2012
Consuming the Gnipstream with python urllib2
View gnip_stream.py
#!/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 Sep 27, 2012
Year-by-year 1-column comparison of timeseries data with facet_wrap
View year-over-year-comp.r
#!/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
@DrSkippy
DrSkippy / ColorBrewer.r
Created Sep 20, 2012
ColorBrewer Colors as Vectors for R
View ColorBrewer.r
#
# Generated Vectors
# (2012-09-20 16:00:18.137289)
# color Pastel2_Qualitative_7
Pastel2_Qualitative_7 <- c( rgb(179, 226, 205, maxColorValue=255), rgb(253, 205, 172, maxColorValue=255), rgb(203, 213, 232, maxColorValue=255),
rgb(244, 202, 228, maxColorValue=255), rgb(230, 245, 201, maxColorValue=255), rgb(255, 242, 174, maxColorValue=255),
rgb(241, 226, 204, maxColorValue=255))
# color Pastel2_Qualitative_6
Pastel2_Qualitative_6 <- c( rgb(179, 226, 205, maxColorValue=255), rgb(253, 205, 172, maxColorValue=255), rgb(203, 213, 232, maxColorValue=255),
You can’t perform that action at this time.