#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
| $("h3.list_header").each(function(sectionIndex){ | |
| var sectionName = $(this).text().replace(/Chapter .+ - /,"").replace(/\:/,'-').replace(/^(V|I|X)+\. /,''); | |
| $(this).parent().next().find("a.lecture-link").each(function(videoIndex){ | |
| var $lectureLink = $(this); | |
| var videoName = $.trim($lectureLink.text()); | |
| var downloadLink = $lectureLink.attr('href').replace('view','download.mp4'); | |
| var cookieHeader = ' --header \"Cookie:'+ document.cookie + '\" '; | |
| var directory = (sectionIndex+1) + '. ' + sectionName + '/'; | |
| var filename = directory + (videoIndex+1) + '. ' + videoName + '.mp4'; |
| ffmpeg -i INFILE -r 25 -f mpeg -vcodec mpeg1video -ar 48000 -b 1500k -acodec mp2 -ar 44100 -ac 1 -y OUTFILE.mpg |
| drop table if exists raw_tweets; | |
| drop table if exists tweets; | |
| drop table if exists positive_hashtags_per_day; | |
| drop table if exists count_positive_hashtags_per_day; | |
| drop table if exists top5_positive_hashtags_per_day; | |
| create table raw_tweets (json string); | |
| load data local inpath 'sample.json' into table raw_tweets; | |
| create table tweets as |
| Interactive charts and slides with R, googleVis and knitr | |
| ======================================== | |
| ```{r results='asis', echo=FALSE, message=FALSE, tidy=FALSE} | |
| library(googleVis) | |
| G <- gvisGeoChart(Exports, "Country", "Profit", | |
| options=list(width=250, height=120), chartid="c1") | |
| T <- gvisBarChart(Exports[,1:2], yvar="Profit", xvar="Country", | |
| options=list(width=250, height=260, | |
| legend='none'), chartid="c2") |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| library(shiny) | |
| library(ggplot2) | |
| function(input, output) { | |
| dataset <- reactive({ | |
| diamonds[sample(nrow(diamonds), input$sampleSize),] | |
| }) | |
| output$plot <- renderPlot({ |
| doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
| toInstall <- c("ReadImages", "reshape", "ggplot2") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| imageLoader <- function(url){ # This function takes a URL, and generates a data.frame with pixel locations and colors | |
| # Download to disk, load | |
| download.file(url, "tempPicture.jpg", mode = "wb") # Stash image locally | |
| readImage <- read.jpeg("tempPicture.jpg") | |
| library(shiny) | |
| library(gmp) | |
| drawStar <- function(center, length, pts, direction=0, segments=F, colour=F) { | |
| if(length(pts)==0) return() | |
| if(segments & (pts[1]==2)) direction <- direction + pi/2 | |
| for(i in 1:pts[1]) { | |
| point <- center + | |
| length*c(cos(direction+pi/2+i*2*pi/pts[1]), | |
| sin(direction+pi/2+i*2*pi/pts[1])) |