Skip to content

Instantly share code, notes, and snippets.

View walkerjeffd's full-sized avatar

Jeff Walker walkerjeffd

View GitHub Profile
@walkerjeffd
walkerjeffd / setup.sh
Last active August 29, 2015 14:02
Raspberry Pi Set Up
# Raspberry Pi Set Up Shell Script
# By Jeff Walker
# I created this to make it easier to re-install/re-configure my pi in case I need to start from scratch.
# Assumes Occidentalis v0.2 is being used.
# Run an update
# sudo apt-get update
# Adafruit WebIDE
@walkerjeffd
walkerjeffd / LOGGER00.csv
Last active August 29, 2015 14:04
Riffle-ito Script for DHT22
DATETIME RTC_TEMP_C TEMP_C HUMIDITY_PCT BATTERY_LEVEL
2014-07-15 21:05:29 25.50 25.70 70.40 5.15
2014-07-15 21:05:35 25.50 25.70 70.30 5.14
2014-07-15 21:05:40 25.50 25.70 70.30 5.14
2014-07-15 21:05:45 25.50 25.70 70.30 5.14
2014-07-15 21:05:51 25.50 25.70 70.30 5.14
2014-07-15 21:05:56 25.50 25.60 70.19 5.14
2014-07-15 21:06:02 25.50 25.60 70.30 5.14
2014-07-15 21:06:07 25.50 25.70 70.30 5.14
2014-07-15 21:06:12 25.50 25.60 70.30 5.14
@walkerjeffd
walkerjeffd / README.md
Last active September 16, 2015 21:57
hello-d3-block-builder
@walkerjeffd
walkerjeffd / README.md
Last active September 17, 2015 00:10
Epicyclic Gearing Quickly

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

forked from mbostock's block: Epicyclic Gearing

Used Block Builder to fork and make it go fast!

@walkerjeffd
walkerjeffd / README.md
Last active September 29, 2015 20:08
Bar Chart
@walkerjeffd
walkerjeffd / README.md
Created November 17, 2015 01:18
timeseries-uncertainty
@walkerjeffd
walkerjeffd / README.md
Last active November 17, 2015 02:09
timeseries-uncertainty
@walkerjeffd
walkerjeffd / zoo_regular.R
Created August 7, 2013 23:02
R function for creating a regular and continuous zoo object from two vectors of dates/datetimes and values with optional fill values
zoo.regular <- function(dates, values, by="hour", fill=NA) {
# convert time series to regular zoo object
require(zoo)
z <- zoo(values, dates)
z <- merge(z, zoo(, seq(floor_date(start(z), 'day'),
ceiling_date(end(z), 'day'),
by)),
fill=fill)
z <- z[1:(length(z)-1)]
return(z)
@walkerjeffd
walkerjeffd / is_regular.R
Created August 7, 2013 23:04
R function to test is vector of datetimes is regular and continuous
is.regular <- function(x) {
# returns TRUE if vector x of POSIXct datetimes is continuous and regular
# by checking if there are more than one unique difftime between each row
x.difftime <- difftime(x[2:length(x)], x[1:(length(x)-1)], units='secs')
if (length(levels(factor(x.difftime))) > 1) {
return (FALSE)
} else {
return (TRUE)
}
}
@walkerjeffd
walkerjeffd / README.md
Created January 22, 2016 20:55
transition test