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
| # VBR (with loop) | |
| for f in *.wav; do lame --ti "path/to/file/album_art.jpg" --vbr-new -V 3 "$f" "${f%.wav}.mp3"; done | |
| # Non-VBR (no loop) | |
| lame --ti "path/to/file/album_art.jpg" -h -b "wavfile.wav" "mp3file.mp3" |
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
| painting | color_1 | color_2 | color_3 | color_4 | color_5 | |
|---|---|---|---|---|---|---|
| Adobe (Variant): Luminous Day by Josef Albers | #D77186 | #61A2DA | #6CB7DA | #b5b5b3 | #D75725 | |
| Homage to the Square (La Tehuana) by Josef Albers | #C00559 | #DE1F6C | #F3A20D | #F07A13 | #DE6716 | |
| Rainbow by Billy Apple | #F24D98 | #813B7C | #59D044 | #F3A002 | #F2F44D | |
| Spar by Per Arnoldi | #C2151B | #2021A0 | #3547B3 | #E2C43F | #E0DCDD | |
| Bicycle Rider By The Loire by Milton Avery | #F3C937 | #7B533E | #BFA588 | #604847 | #552723 | |
| Cello Player by Milton Avery | #E2CACD | #2E7CA8 | #F1C061 | #DA7338 | #741D13 | |
| The Swan by Hilma af Klint | #D6CFC4 | #466CA6 | #D1AE45 | #87240E | #040204 | |
| Untitled (Black King Catch Scorpio) by Jean-Michel Basquiat | #8CABD9 | #F6A7B8 | #F1EC7A | #1D4D9F | #F08838 | |
| DUSTHEADS by Jean-Michel Basquiat | #C11432 | #009ADA | #66A64F | #FDD10A | #070707 |
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
| # via http://www.enoriver.net/2015/02/09/r-version-of-tsfill-and-xfill-combined/ | |
| xtill <- function(x) { | |
| dt <- copy(x) | |
| xtkeys <- c('zip.cd','cal.dt') | |
| clkeys <- c('zip.cd','dma.cd') | |
| xtfull <- CJ(unique(x[,zip.cd]),unique(x[,cal.dt])) | |
| clfull <- unique(subset(x,select=c(zip.cd,dma.cd))) | |
| setnames(xtfull,c('V1','V2'),xtkeys) | |
| setkeyv(xtfull,xtkeys) |
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
| get.clip <- function(header = TRUE, stringsAsFactors = FALSE, ...) { | |
| read.table(pipe("pbpaste"), sep = "\t", header = header, stringsAsFactors = stringsAsFactors, ...) | |
| } |
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
| clear all | |
| set obs 10000 | |
| capture program drop detect_rd | |
| program define detect_rd, rclass | |
| syntax varlist(numeric max=1) [if] | |
| if "`if'" == "" { | |
| local ifcond "" | |
| } | |
| else { |
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
| cut -d , -f1-3 input.csv > output.csv |
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(readxl) | |
| library(ggplot2) | |
| library(reshape2) | |
| asq.data <- read_excel("ASQ.xlsx") | |
| variables <- c("Interval" , | |
| "CommunicationResults" , | |
| "GrossMotorResults" , | |
| "FineMotorResults" , | |
| "ProblemSolvingResults", |
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
| webuse nlswork, clear | |
| gen grade_bin = floor(grade/2) * 2 + 1 | |
| levelsof year, local(years) | |
| foreach yr of local years { | |
| binscatter ln_wage grade if year == `yr', linetype(connect) xq(grade_bin) msymbol(none) title("`yr'") | |
| } |
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
| webuse nlswork, clear | |
| gen count_ln_wage = !missing(ln_wage) | |
| collapse (sum) count_ln_wage (mean) ln_wage, by(grade year) | |
| label var count_ln_wage "Number of individuals" | |
| label var ln_wage "Average log(wage)" | |
| levelsof year, local(years) | |
| foreach yr of local years { |
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
| # Save file as matplotlibrc in folder ~/.matplotlib | |
| backend: TkAgg | |
| # Enable fonts | |
| # See: http://matplotlib.org/1.3.1/users/usetex.html | |
| font.family : serif | |
| font.serif : Times, Palatino, New Century Schoolbook, Bookman, Computer Modern Roman | |
| font.sans-serif : Helvetica, Avant Garde, Computer Modern Sans serif | |
| font.cursive : Zapf Chancery |