Skip to content

Instantly share code, notes, and snippets.

@bbarrilleaux
bbarrilleaux / IrisClustering.ipynb
Created March 28, 2014 19:36
IPython notebook using scikit-learn for K-means clustering.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bbarrilleaux
bbarrilleaux / UFOsightings.R
Created February 18, 2014 05:07
UFO sightings
library("maps")
library("ggplot2")
library("RColorBrewer")
library("mapproj")
# data from infochimps, http://www.infochimps.com/datasets/60000-documented-ufo-sightings-with-text-descriptions-and-metada
tsvfile <- "chimps_16154-2010-10-20_14-33-35/ufo_awesome.tsv"
ufo <- read.table(tsvfile, sep ="\t", fill=TRUE, stringsAsFactors = FALSE)
@bbarrilleaux
bbarrilleaux / FitbitStats.py
Last active April 8, 2017 21:59
Analysis and plots of Fitbit step counts
import numpy as np
import pandas as pd
import matplotlib
import pylab
from matplotlib import pyplot
from scipy.stats import gaussian_kde
data = pd.read_csv('fitbit.csv', usecols = [0, 1], parse_dates = True)
#count and remove days where <100 steps were logged,
@bbarrilleaux
bbarrilleaux / FlossChart.py
Last active December 31, 2015 09:49
Python code to graph my tooth flossing habits using both RPy and Matplotlib.
import numpy as np
import pandas as pd
import matplotlib.pyplot as pyplot
import rpy2.robjects as robjects
from rpy2.robjects.packages import importr
data = pd.read_csv('FlossChart.csv', usecols = [0, 1],
parse_dates = True)
data['daynumber'] = data.date.map(lambda x:
// LPD8806 LED Code for our Yacht Club's Anchor
/*************************************************************************************/
#include "LPD8806.h" // Library Here: https://github.com/adafruit/LPD8806
#include "SPI.h"
int totalLEDs = 14;
int dataPin = 2;
int clockPin = 3;