This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Author: Richard Careaga | |
Date: 2014-07-10 | |
Title: NOAAscrape.py | |
Description: Download temperature time series data and save to CSV file | |
Example results (date, temperature, difference from 1901-2000 mean for month): | |
"1895-01-15",26.69,-3.43 | |
"1896-01-15",31.48,1.36 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Data Science | |
http://radar.oreilly.com/2010/06/what-is-data-science.html,What is data science? (oreilly.com) | |
http://hortonworks.com/blog/how-to-get-started-in-data-science/,How To Get Started In Data Science (hortonworks.com) | |
http://www.insidephilanthropy.com/home/2014/4/14/whos-getting-the-big-bucks-for-data-science-and-why.html,Who's Getting The Big Bucks? (insidephilanthropy.com) | |
http://www.citeworld.com/article/2139987/big-data-analytics/heres-how-one-company-built-its-data-science-operation.html,How To Build A data Science Team (citeworld.com) | |
http://www.computerworld.com/s/article/9248050/Cornell_Tech_funded_startup_launching_bootcamp_for_data_scientists,Data Science Bootcamp (computerworld.com) | |
http://www.datasciencetoolkit.org/,Data Science Toolkit (datasciencetoolkit.org) | |
http://blog.stephenwolfram.com/2013/04/data-science-of-the-facebook-world/,Data Science of the Facebook World (blog.stephenwolfram.com) | |
http://strata.oreilly.com/2011/05/data-science-terminology.html,Why The Term “Data Scien |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# original example from Digg Data website (Takashi J. OZAKI, Ph. D.) | |
# http://diggdata.in/post/58333540883/k-fold-cross-validation-in-r | |
library(plyr) | |
library(randomForest) | |
data <- iris | |
# in this cross validation example, we use the iris data set to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# installing/loading the latest installr package: | |
install.packages("installr"); require(installr) #load / install+load installr | |
updateR() | |
# Then just follow the prompts... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
example.md: example.Rmd | |
./knit | |
example.ipynb: example.md | |
notedown example.md | sed 's/%%r/%%R/' > example.ipynb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m <- matrix(1:12, nrow=3) | |
# Double every element | |
# =================== | |
# Method 1: nested for loop | |
for(i in seq_len(nrow(m))) { | |
for(j in seq_len(ncol(m))) { | |
m2[i, j] <- m[i, j] * 2 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simply display the contents of the webcam with optional mirroring using OpenCV | |
via the new Pythonic cv2 interface. Press <esc> to quit. | |
""" | |
import cv2 | |
def show_webcam(mirror=False): | |
cam = cv2.VideoCapture(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(rCharts) | |
require(rjson) | |
#get source from original example | |
#this is a JSON, so will need to translate | |
#this is complicated and unnecessary but feel I need to replicate | |
#for completeness | |
#expect most data to come straight from R | |
#in form of source, target, value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## See http://gettinggeneticsdone.blogspot.com/2013/06/customize-rprofile.html | |
## Load packages | |
library(BiocInstaller) | |
## Don't show those silly significanct stars | |
options(show.signif.stars=FALSE) | |
## Do you want to automatically convert strings to factor variables in a data.frame? | |
## WARNING!!! This makes your code less portable/reproducible. |