Skip to content

Instantly share code, notes, and snippets.

View khturner's full-sized avatar

Keith H. Turner khturner

View GitHub Profile
@khturner
khturner / RStudio_EC2.md
Created April 24, 2019 02:02
A quick template for booting up a fresh EC2 instance with RStudio Server running

Provision EC2 instance

  • Use AMI Ubuntu Server 18.04 LTS (HVM), SSD Volume Type - ami-005bdb005fb00e791 (64-bit x86)
  • At least a t2.medium
  • At least 30 GB Root volume
  • Set up TCP port 22 and port 8787 (RStudio server) access for my IP
  • Tag with Name = turbo-rstudio
  • Use the turbo-rstudio keypair
    • You already have this .pem file in your ~/Downloads/ dir, already did chmod 0400
library(tidyverse)
shared_file <- read_tsv("data/mothur/kws_final.an.shared") %>%
select(-label, -numOtus) %>%
# melt, onvert to relative abundance
gather("OTU", "abundance", starts_with("Otu")) %>%
group_by(Group) %>%
mutate(abundance = abundance / sum(abundance)) %>% ungroup
tax_file <- read_tsv("data/mothur/kws_final.an.cons.taxonomy") %>% select(-Size) %>%
@khturner
khturner / SoullessSamSimon.md
Last active April 5, 2017 12:57
A neural net that generates Simpsons episodes

Soulless Sam Simon - A Simpsons script bot

First we're gonna get an EC2 instance up and running with the training data

# Run on an AWS c4.xlarge EC2
$ sudo apt-get update
$ sudo apt-get install r-base-core docker.io