## 23rd January 2017
At the time of writing, the pip install of toree is not compatible with spark 2.x. We need to use the master branch from git.
sudo apt install openjdk-8-jdk-headless
| (defpackage :brainfuck (:use :cl)) | |
| (in-package :brainfuck) | |
| (defun string->brainfuck (source) | |
| (let* ((fragments | |
| (map 'list | |
| (lambda (c) | |
| (case c | |
| (#\> "(incptr 1)") |
| # Add these to your .bash_profile / .zshrc / etc. | |
| # Starts a Clojure repl | |
| function rebel-clj() { | |
| clojure -Sdeps "{:deps {com.bhauman/rebel-readline {:mvn/version \"0.1.4\"} $@}}" -m rebel-readline.main | |
| } | |
| # Starts a browser REPL | |
| function rebel-cljs() { | |
| clojure -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.1.7\"} com.bhauman/rebel-readline-cljs {:mvn/version \"0.1.4\"} $@}}" -m figwheel.main |
| #!/usr/bin/env bash | |
| set -ex | |
| JUPYTER_PASSWORD=${1:-"<YOUR_PASSWORD_HERE>"} | |
| NOTEBOOK_DIR=${2:-"<PATH_TO_S3_NOTEBOOK_BUCKET>"} | |
| # home backup | |
| if [ ! -d /mnt/home_backup ]; then | |
| sudo mkdir /mnt/home_backup |
| #!/usr/bin/env bash | |
| # jupyter | |
| ssh -o ServerAliveInterval=10 -o StrictHostKeyChecking=no -i ~/AWS-datascience-EMR.pem -N -L 8889:${1}:8889 hadoop@${1} & | |
| # sparkUI | |
| ssh -o ServerAliveInterval=10 -o StrictHostKeyChecking=no -i ~/AWS-datascience-EMR.pem -N -L 18080:${1}:18080 hadoop@${1} & | |
| # hadoop fs | |
| ssh -o ServerAliveInterval=10 -o StrictHostKeyChecking=no -i ~/AWS-datascience-EMR.pem -N -L 8088:${1}:8088 hadoop@${1} & |
| FROM ubuntu:16.04 | |
| # Locales | |
| ENV LANGUAGE=en_US.UTF-8 | |
| ENV LANG=en_US.UTF-8 | |
| RUN apt-get update && apt-get install -y locales && locale-gen en_US.UTF-8 | |
| # Colors and italics for tmux | |
| COPY xterm-256color-italic.terminfo /root | |
| RUN tic /root/xterm-256color-italic.terminfo |
| #!/bin/bash | |
| #exit on error | |
| set -e | |
| # create our directories | |
| mkdir -p $HOME/local $HOME/src | |
| ############ | |
| # libevent # | |
| ############ |
| import code | |
| # at the place where you'd want to debug | |
| code.interact(local=dict(globals(), **locals())) |