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
#!/bin/bash | |
# Seed random generator | |
RANDOM=$$$(date +%s) | |
# read all jpg files in folder | |
# replace the $( ) with '' for older versions | |
# creates an array of all the files in ~/bin/images/wp | |
FILES=(~/bin/images/wp/*) |
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
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("ggplot2", "proxy") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
nIncrements <- 36 | |
eachIncrement <- seq(0, 1, len = nIncrements) | |
colorSweep <- expand.grid(eachIncrement, eachIncrement, eachIncrement) | |
moduloRemainder <- with(colorSweep, Var1*(nIncrements-1)) %% | |
floor(sqrt(nIncrements)) |
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
################################################################################ | |
## Experiment with PSO | |
################################################################################ | |
## make data | |
mu <- 5 | |
sigma <- 10 | |
Y <- rnorm(1000,mu,sigma) |