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
| ############################################################ | |
| ## Title: Animated Beating Heart in R | |
| ## Author: Jared Knowles | |
| ## Forked: Tony Boyles | |
| ## Date: February 14, 2014 | |
| ############################################################ | |
| library(animation) | |
| library(ggplot2) |
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 glob, slate | |
| for filename in glob.glob( '*.pdf' ): | |
| with open(filename) as f: | |
| doc = slate.PDF(f) | |
| fileout = open(filename.rstrip('.pdf')+'.txt', 'w+') | |
| fileout.writelines(doc) |
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
| desc | brand | size | proof | price | alcohol_ml | shot_equiv | cents_per_shot | display_vol | abv | bpd | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| BEER | Lionshead Pilsner | 58673.8 | 9 | 84.99 | 2640 | 155.2941176 | 57.10376125 | 1/2 Keg | 4.5 | 1.751264854 | |
| BEER | Pabst | 58673.8 | 9 | 89.99 | 2640 | 155.2941176 | 60.46320125 | 1/2 Keg | 4.5 | 1.653961552 | |
| BEER | Budweiser | 58673.8 | 9 | 99.99 | 2640 | 155.2941176 | 67.18208125 | 1/2 Keg | 4.5 | 1.488548854 | |
| BEER | Bud Light | 58673.8 | 8.4 | 99.99 | 2464 | 144.9411765 | 71.98080135 | 1/2 Keg | 4.2 | 1.389338934 | |
| BEER | Miller Lite | 58673.8 | 8.4 | 99.99 | 2464 | 144.9411765 | 71.98080135 | 1/2 Keg | 4.2 | 1.389338934 | |
| BEER | Coors Light | 58673.8 | 8.4 | 99.99 | 2464 | 144.9411765 | 71.98080135 | 1/2 Keg | 4.2 | 1.389338934 | |
| BEER | Yuengling Traditional Lager | 58673.8 | 9 | 124.99 | 2640 | 155.2941176 | 83.9792813 | 1/2 Keg | 4.5 | 1.190815266 | |
| BEER | Michelob Ultra | 58673.8 | 8.4 | 129.99 | 2464 | 144.9411765 | 93.5772014 | 1/2 Keg | 4.2 | 1.068697592 | |
| BEER | Yuengling Traditional Lager | 29336.9 | 9 | 66.99 | 1320 | 77.64705882 | 90.0192476 | 1/4 Keg | 4.5 | 1.110912076 |
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(devtools) | |
| devtools::install_github("dplyr") | |
| library(dplyr) | |
| devtools::install_github("bigrquery") | |
| library(bigrquery) | |
| billingID <- "Insert Your Project's Billing ID Here" | |
| gdelt <- src_bigquery(billingID, "GDELT") | |
| events <- tbl(gdelt, "events") |
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
| function htmlreplace(element){ | |
| var nodes=element.childNodes; | |
| for(var n=0;n<nodes.length;n++){ | |
| if(nodes[n].nodeType==3){ | |
| var r=new RegExp('[pP][^A-Za-z0-9]+[vV]alue', 'gi'); | |
| if(nodes[n].textContent){ | |
| nodes[n].nodeValue=nodes[n].textContent.replace(r,'P. Funk'); | |
| }else{ | |
| nodes[n].nodeValue=nodes[n].nodeValue.replace(r,'P. Funk'); | |
| } |
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
| Array.prototype.repeat = function(times, each) { | |
| if(!times){return this;} | |
| if(!each){each=1;} | |
| var that = this; | |
| var temp=Array(each*this.length); | |
| this.forEach(function(el, i){ | |
| for(j = 0; j < each; j++){ | |
| temp[i * each + j] = el; | |
| } | |
| }); |
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(ggplot2) | |
| data <- data.frame( | |
| Time=1:20, | |
| Love=cumsum(abs(rnorm(20, sd = 5)*100))) | |
| ggplot(data,aes(Time,Love)) + | |
| stat_smooth(se=FALSE, aes(color="Red", size=3)) + | |
| theme(legend.position = "none", | |
| axis.text.x = element_blank(), |
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
| <?php | |
| /** | |
| * PostGIS to GeoJSON | |
| * Query a PostGIS table or view and return the results in GeoJSON format, suitable for use in OpenLayers, Leaflet, etc. | |
| * | |
| * @param string $geomfield The PostGIS geometry field *REQUIRED* | |
| * @param string $srid The SRID of the returned GeoJSON *OPTIONAL (If omitted, EPSG: 4326 will be used)* | |
| * @param string $fields Fields to be returned *OPTIONAL (If omitted, all fields will be returned)* NOTE- Uppercase field names should be wrapped in double quotes | |
| * @param string $parameters SQL WHERE clause parameters *OPTIONAL* | |
| * @param string $orderby SQL ORDER BY constraint *OPTIONAL* |
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
| AIED.2012.ch1.pdf | |
| AIED.2012.ch2.pdf | |
| AIED.2012.ch3.pdf | |
| AIED.Appendix1.pdf | |
| AIED.C1.pdf | |
| AIED.C2.pdf | |
| AIED.C3.pdf | |
| AIED.C4.pdf | |
| AIED.C5.pdf | |
| AIED.C6.pdf |
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
| if(!require("devtools")){ | |
| install.packages("devtools") | |
| library("devtools") | |
| } | |
| install_github("aaboyles/phoxy") | |
| library("phoxy") | |
| library("data.table") | |
| library("lubridate") | |
| library("ggplot2") |