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
.head.vars as $fields | ($fields | @csv), (.results.bindings[] | [.[$fields[]].value] | @csv) |
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
#cloud-config | |
# In order to access RStudio server via the web interface, you must log on with | |
# a user account that allows password access. This script does not add that user | |
# by default. You may either ssh as root into the server and `adduser` as | |
# normal, or script a user addition here: | |
# users: | |
# - name: # username # | |
# lock-passwd: false # allow login with password |
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
year | nationality | artists_strict | |
---|---|---|---|
1550 | Flemish | 67 | |
1550 | Dutch | 38 | |
1551 | Flemish | 66 | |
1551 | Dutch | 38 | |
1552 | Flemish | 70 | |
1552 | Dutch | 37 | |
1553 | Flemish | 72 | |
1553 | Dutch | 37 | |
1554 | Flemish | 76 |
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
iconv -t UTF8 -f MACROMAN < file.csv > file-utf8.csv |
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
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=OUTPUT.pdf INPUT.pdf |
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
yday_months_x <- scale_x_discrete(breaks = cumsum(c(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)), labels = month.name) |
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
#' Replace all matching values | |
#' | |
#' @param v Vector whose values are to be replaced | |
#' @param pairs A named vector of replacements | |
#' @export | |
#' @examples | |
#' x <- c("a", "a", "b", "c") | |
#' p <- c("a" = "alpha", "b" = "beta") | |
#' replace_each(x, p) | |
replace_each <- function(v, pairs) { |
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
msg <- function(..., prob = 0.25) { | |
if (runif(1) > prob) { | |
return(invisible()) | |
} | |
messages <- c(...) | |
message(sample(messages, 1)) | |
} | |
encourage <- function() { |
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
theme(axis.text.x = element_text(angle = 45, hjust = 1)) |
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
convert image -density 300 -units pixelsperinch outimage |