Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Collier datawookie

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am datawookie on github.
  • I am datawookie (https://keybase.io/datawookie) on keybase.
  • I have a public key whose fingerprint is F835 3643 5C64 6895 617E B3D1 196E B595 5F70 8E76

To claim this, I am signing this object:

View ami-rstudio-packages.R
install.packages(c(
"aws.s3",
"broom",
"CEoptim",
"fst",
"furrr",
"geosphere",
"ggmap",
"gmapsdistance",
"googledrive",
@datawookie
datawookie / unicode symbols
Last active Mar 18, 2022
Useful Unicode characters
View unicode symbols
https://github.com/muan/unicode-emoji-json
° — degree
💣 — bomb
💥 — explosion
🔥 — fire
🎉 — tada
🧯 — fire extinguisher
🎉 — party popper / tada
@datawookie
datawookie / quotes-data.txt
Last active Jul 11, 2020
Quotes suitable for many occasions
View quotes-data.txt
But invariably, simple models and a lot of data trump more elaborate models based on less data.
— Halevy, Alon, Peter Norvig, and Fernando Pereira. 2009. The Unreasonable Effectiveness of Data. IEEE Intelligent Systems 24 (2) (March): 8-12. doi:10.1109/MIS.2009.36.
Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom.
— Clifford Stoll
Errors using inadequate data are much less than those using no data at all.
— Charles Babbage
I never guess. It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts.
View springer-books.R
library(DBI)
library(readr)
library(htmlTable)
library(dplyr)
library(janitor)
springer_search <- read_csv("https://link.springer.com/search/csv?previous-end-year=2020&facet-content-type=%22Book%22&date-facet-mode=in&previous-start-year=2020&facet-language=%22En%22&showAll=false&query=&facet-start-year=2020&facet-end-year=2020")
springer_search <- springer_search %>%
clean_names() %>%
@datawookie
datawookie / s3-backup.sh
Last active Jan 16, 2019
Compress file and copy to S3
View s3-backup.sh
#!/bin/bash
# $ s3-backup data-file.txt s3://my-backup-folder
#
# Install under /usr/bin/ if it will be run from cron.
FILEPATH=$1
FILENAME=`basename $FILEPATH`
FILEDATE=`date +%Y%m%d-%H%M`-$FILENAME
@datawookie
datawookie / dated-backup.sh
Last active Nov 7, 2018
Created a dated version of a file and persist on S3.
View dated-backup.sh
#!/bin/bash
# Created a dated version of a file and persist on S3.
#
# Usage:
#
# dated-backup.sh file-to-backup.txt s3://name-of-bucket/
FILE=$1
BUCKET=$2
View skeleton.stan
functions { # User-defined functions [Optional]
}
data { # Data (external) [Optional]
}
transformed data { # Preprocess data [Optional]
}
parameters { # Model parameters (must precede model) [Mandatory]
}
transformed parameters { # Preprocess parameters [Optional]
@datawookie
datawookie / Productivity Hacks - Buffon Needle.md
Last active Mar 17, 2018
Files for Productivity Hacks talk.
View Productivity Hacks - Buffon Needle.md

Some files for talk about Productivity Hacks.

Setup:

Launch a t2.2xlarge instance (8 cores) on AWS.

  1. Start a tmux session. Create two horizontal panes (Ctrl-b ").
  2. sudo apt update && sudo apt install -y htop r-base
  3. wget -O buffon-needle.R http://bit.ly/2HieqWc
View Productivity Hacks - Travelling Salesman.md

Some files for talk about Productivity Hacks.