This file contains 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
{ | |
"id": "root", | |
"x": 0, | |
"y": 0, | |
"children": [{ | |
"id": "n1", | |
"labels": [ { "text": "n1" } ], | |
"width": 10, | |
"height": 10, | |
"x": 24, |
This file contains 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
{ | |
"id": "root", | |
"children": [{ | |
"id": "n1", | |
"labels": [ { "text": "n1" } ], | |
"width": 10, | |
"height": 10 | |
},{ | |
"id": "n5", | |
"labels": [ { "text": "n5" } ], |
This file contains 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
nohup /bin/bash -c 'WORDS=("please help me" "i am so alone" "i am lonely" "pssssst" "hello" "hey, listen."); while [ 1 = 1 ]; do say "${WORDS[$[ $[ RANDOM % ${#WORDS[@]} ]]]}" -v Whisper -r 1.5; sleep 3; done' & |
This file contains 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
# FiveThirtyEight ggplot2 theme from http://minimaxir.com/2015/02/ggplot-tutorial/ | |
fte_theme <- function() { | |
# Generate the colors for the chart procedurally with RColorBrewer | |
palette <- brewer.pal("Greys", n=9) | |
color.background = palette[2] | |
color.grid.major = palette[3] | |
color.axis.text = palette[6] | |
color.axis.title = palette[7] | |
color.title = palette[9] |
This file contains 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
# adapted from http://is-r.tumblr.com/post/36660147376/dominant-color-palettes-with-k-means | |
library(ggplot2) | |
library(reshape2) | |
library(EBImage) | |
imageLoader <- function(lib) { | |
rd <- readImage(lib) | |
longImage <- melt(rd) | |
rgbImage <- reshape(longImage, timevar="Var3", idvar=c("Var1", "Var2"), direction="wide") |