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
    
  
  
    
  | package main | |
| import ( | |
| "context" | |
| "log" | |
| "net" | |
| core "github.com/ipfs/go-ipfs/core" | |
| corerepo "github.com/ipfs/go-ipfs/core/corerepo" | |
| coreunix "github.com/ipfs/go-ipfs/core/coreunix" | 
  
    
      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
    
  
  
    
  | import pandas as pd | |
| import numpy as np | |
| import rpy2 | |
| import rpy2.robjects as robjects | |
| from rpy2.robjects.packages import importr | |
| from pprint import pprint | |
| import requests | |
| req = requests.get('http://www.google.com') | |
| pprint(req) | 
  
    
      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
    
  
  
    
  | wget -q -O- http://www.noodle.org/team | grep -c "member-bio" | 
  
    
      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
    
  
  
    
  | library(XML) | |
| #url = paste("http://www.census.gov/population/international/data/idb/region.php?N=%20Results%20&T=15&A=separate&RT=0&Y=","1980","&R=-1&C=US", sep="") | |
| years = seq(1980,2030,1) | |
| urls = paste("http://www.census.gov/population/international/data/idb/region.php?N=%20Results%20&T=15&A=separate&RT=0&Y=",years,"&R=-1&C=US", sep="") | |
| # INITIALIZING | |
| dd <- readHTMLTable(urls[1],header=T, stringsAsFactors=F)[[1]] | |
| x <- gsub(",", "", dd[dd$Age %in% c(18,19,20,21),3]) | |
| year <- dd[1,1] | 
  
    
      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
    
  
  
    
  | (when (>= emacs-major-version 24) | |
| (require 'package) | |
| (package-initialize) | |
| (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
| ("marmalade" . "http://marmalade-repo.org/packages/") | |
| ("melpa" . "http://melpa.milkbox.net/packages/") | |
| ) | |
| ) | |
| ) | 
  
    
      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
    
  
  
    
  | $ for i in {1..100}; do echo $(($RANDOM/1000)); done | spark | 
  
    
      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
    
  
  
    
  | http://stackoverflow.com/questions/21845124/python-simple-moving-average-class-based | 
  
    
      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
    
  
  
    
  | import requests | |
| import bs4 as BeautifulSoup | |
| def get_states(): | |
| page = requests.get("http://www.epa.gov/enviro/html/codes/state.html").content | |
| soup = BeautifulSoup.BeautifulSoup(page) | |
| def findstates(tr): | |
| tds = tr.find_all('td') | |
| for td in tds: | |
| a = td.find_all("a") | 
  
    
      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
    
  
  
    
  | from __future__ import print_function | |
| import numpy | |
| import random | |
| mylist = range(0,100) | |
| random.shuffle(mylist) | |
| myarray = numpy.array(mylist) | |
| # via http://stackoverflow.com/questions/2130016/splitting-a-list-of-arbitrary-size-into-only-roughly-n-equal-parts | |
| def chunkit(seq, N): | 
  
    
      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
    
  
  
    
  | # got some help here: http://stackoverflow.com/questions/22739070/function-of-a-list-of-data-frames-to-return-also-a-data-frame-in-r/ | |
| library(Amelia) | |
| set.seed(1234) | |
| myN <- 50 | |
| var1 <- runif(myN) | |
| var2 <- 2*var1 + rnorm(myN, 0, 1) | |
| var3 <- var1^2 + rnorm(myN, 0, 1) | 
NewerOlder