git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| ''' | |
| @author Michael J Bommarito II | |
| @date Feb 26, 2011 | |
| @license Simplified BSD, (C) 2011. | |
| This script demonstrates how to use Python to archive historical tweets. | |
| ''' | |
| import codecs | |
| import csv |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| # GET LIST OF INSTALLED PACKAGES | |
| pkgs <- installed.packages(priority='NA')[,'Package'] | |
| save(pkgs, file="installed_pkgs.rda") | |
| # Install the most recent version of R: | |
| # Download the most recent version of R from The Comprehensive R Archive Network (CRAN) | |
| # To wipe the old R version | |
| rm -rf /Library/Frameworks/R.framework /Applications/R.app | |
| rm -rf /Library/Receipts/R-* |
| # Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg | |
| $ sudo chown -R `whoami` /usr/local/texlive | |
| $ tlmgr update --self | |
| $ tlmgr install ucs | |
| $ tlmgr install etoolbox | |
| # Install pandoc view homebrew |
| # Produce PDFs from all Markdown files in a directory | |
| # Lincoln Mullen | http://lincolnmullen.com | [email protected] | |
| # List files to be made by finding all *.md files and appending .pdf | |
| PDFS := $(patsubst %.md,%.md.pdf,$(wildcard *.md)) | |
| # The all rule makes all the PDF files listed | |
| all : $(PDFS) | |
| # This generic rule accepts PDF targets with corresponding Markdown |
| # libraries used. install as necessary | |
| library(shiny) | |
| library(RJSONIO) # acquiring and parsing data | |
| library(ggplot2) # graphs | |
| library(plyr) # manipulating data | |
| library(lubridate) #dates | |
| library(stringr) | |
| trim.leading <- function (x) sub("^\\s+", "", x) |
| doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
| toInstall <- c("sna", "ggplot2", "Hmisc", "reshape2") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| # Empty ggplot2 theme | |
| new_theme_empty <- theme_bw() | |
| new_theme_empty$line <- element_blank() | |
| new_theme_empty$rect <- element_blank() | |
| new_theme_empty$strip.text <- element_blank() |
| <script src="http://d3js.org/d3.v3.js"></script> | |
| <script type="text/javascript"> | |
| (function(){ | |
| // Probably not idiomatic javascript. | |
| this.countValue=0; | |
| updateView = function(message) { | |
| var svg = d3.select(".d3io").select("svg") |
| function getCanvasDiscussionEdges() { | |
| var canvas = "learn.canvas.net"; | |
| var type = "courses"; | |
| var id = "33"; | |
| var output = [["vert1_name","vert2_name","vert1_id","vert2_id","vert1_image_url","vert2_image_url","topic_id","topic_title","topic_url","created_at", "message_id", "message_text"]]; | |
| var doc = SpreadsheetApp.getActiveSpreadsheet(); | |
| var sheet = doc.getSheetByName("Sheet1"); | |
| var db = ScriptDb.getMyDb(); | |
| var topicList = callCanvasAPI(canvas, type, id, "discussion_topics", 50); | |
| var participants = {} |
| # load requisite libraries | |
| library(shiny) | |
| library(googleVis) | |
| # load raw data (NB not provided) | |
| tableByGame <- read.csv("../tableByGame.csv",stringsAsFactors=FALSE) | |
| # to create chart need to repeat one column and get negative of league position as hack | |
| tableByGame$game <- tableByGame$seasonGame | |
| tableByGame$lgPos <- -tableByGame$lgPos |