Skip to content

Instantly share code, notes, and snippets.

View gmmeyer's full-sized avatar
:shipit:
shipit

Greg Meyer gmmeyer

:shipit:
shipit
View GitHub Profile
@afeld
afeld / gist:5201086
Last active August 17, 2023 18:43
job boards
# you can make a text file of request times (in ms, one number per line) and import it here, or you can use a probability distribution to simulate request times (see below where setting req_durations_in_ms)
# rq = read.table("~/Downloads/request_times.txt", header=FALSE)$V1
# argument notes:
# parallel_router_count is only relevant if router_mode is set to "intelligent"
# choice_of_two, power_of_two, and unicorn_workers_per_dyno are only relevant if router_mode is set to "naive"
# you can only select one of choice_of_two, power_of_two, and unicorn_workers_per_dyno
run_simulation = function(router_mode = "naive",
reqs_per_minute = 9000,
@dsparks
dsparks / electoral_map.R
Created November 7, 2012 13:44
Electoral map
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("maps", "ggplot2", "RColorBrewer")
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
new_theme_empty <- theme_bw() # Create our own, mostly blank, theme
new_theme_empty$line <- element_blank()
new_theme_empty$rect <- element_blank()
new_theme_empty$strip.text <- element_blank()
new_theme_empty$axis.text <- element_blank()