Skip to content

Instantly share code, notes, and snippets.

View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
@import url(https://raw.github.com/jasondavies/d3-parsets/master/d3.parsets.css);
body {
font-family: sans-serif;
font-size: 16px;
width: 960px;
margin: 1em auto;
View mtcars_aaS.R
# You will need to get your own API key by creating an account at api.blockspring.com
# install.packages(c("httr", "RJSONIO"))
library(httr)
library(RJSONIO)
mtcars_aaS <- function(api_key, mpg_min = "0", mpg_max = "10e6",
cyl_min = "0", cyl_max = "10e6",
disp_min = "0", disp_max = "10e6",
hp_min = "0", hp_max = "10e6",
View mtcars_as_a_service.R
# mtcars as as service
# Create a JSON API for your data with GitHub + Blockspring
# This script will filter rows of mtcars based on API parameters
# import relevant libraries
suppressMessages(library(dplyr))
suppressMessages(library(RJSONIO))
# Get data from GitHub
View results.R
library(dplyr)
create_tbl_df <- function(...){
tbl_df(as.data.frame(matrix(...)))
}
results <- create_tbl_df(nrow=5, ncol=2)
View help.md
View Codebook_sample2.md

https://gist.github.com/kirstenfrank/218c36a1938055d0f4e4sample codebook.

It's very similar to a Statistical Analysis Plan, actually.

Setup, there is a dogwalking business. It wants to analyze its work.

Raw data is: name of dog, address of owner, time walked, date walked, size of dog (small, medium, or large), health of dog (well or sick) on that date and time, comments, and pay.

The business wants to assign ID# to the dogs, and codewords to the address to make this data anonymous. There isn't anything to do to the comments--since free text is all over the place.

View ssh.md

However this is done in PuTTY 😕 :

ssh schliepe@opensub00.umiacs.umd.edu

Type in your password, then when you're in try:

cd /nfshomes/kross/fletching
View keybase.md

Keybase proof

I hereby claim:

  • I am seankross on github.
  • I am seankross (https://keybase.io/seankross) on keybase.
  • I have a public key whose fingerprint is 920D 6BAA 1092 52E6 9977 1CE8 B5CD 7B45 761C C977

To claim this, I am signing this object:

@seankross
seankross / R Plot Differences
Created Dec 2, 2012
Plots difference between two stocks
View R Plot Differences
setwd('~/Desktop/R/Inputs')
getYahooCsv <- function(startDate, endDate, ticker){
  string <- paste("http://ichart.finance.yahoo.com/table.csv?s=",ticker,
                  "&a=",startDate[1]-1,"&b=",startDate[2],"&c=",startDate[3],
                  "&d=",endDate[1]-1,"&e=",endDate[2],"&f=",endDate[3],"&g=d&ignore=.csv",
                  sep="")
  
  return (read.csv(string))
}
You can’t perform that action at this time.