Skip to content

Instantly share code, notes, and snippets.

View jgwerner's full-sized avatar
🙃

Greg Werner jgwerner

🙃
View GitHub Profile
@jgwerner
jgwerner / install.sh
Last active October 9, 2017 14:06
Clean setup for JupyterHub demo
# Installs new JupyterHub with Ubuntu 14.04 (Trusty) on host
# with self signed SSL certificate. Change SSL section
# to incorporate procedure for signing with trusted CA.
#!/bin/bash
# make install dir
mkdir /home/ubuntu/install-host
# set environment vars
@jgwerner
jgwerner / troubleshooting.md
Created May 29, 2015 23:21
Trouble shooting draft for JupyterHub

#DRAFT

#Introduction

JupyterHub was developed to offer additional choices when running Jupyter Notebook servers (formerly known as IPython Notebooks). Basically, three options may be configured:

  1. Single user environments: one user needs one notebook to be spawned on their local or remote machine
  2. Temporary multiple user environments: multiple users need notebooks spawned for each user with temporary home paths
  3. Permanent multiple user environments: multiple users need notebooks spawned for each user with permanent home paths
worker_processes 1;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
#!/bin/bash
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get purge maven maven2 maven3
sudo apt-add-repository ppa:andrei-pozolotin/maven3
sudo apt-get update
sudo apt-get install maven3
@jgwerner
jgwerner / jupyterhub_config.py
Created November 12, 2015 16:51
jupyterhub_config.py
# Configuration file for Jupyter Hub
c = get_config()
import os
import sys
sys.path.insert(0, '/srv/jupyterhub_config')
# Base configuration
c.JupyterHub.log_level = "INFO"
c.JupyterHub.db_url = "postgresql://{}:{}@{}:{}/{}".format(

Overlay Network on local machine with VirtualBox

Set up K/V server

set up k/v store with virtualbox

docker-machine create -d virtualbox mh-keystore

switch docker to k/v machine context

eval "$(docker-machine env mh-keystore)"

@jgwerner
jgwerner / pyspark-config
Created July 5, 2016 21:28
PySpark Jupyter Notebook configuration
# Jupyter Notebook Python, Spark, Mesos Stack
## What it Gives You
* Jupyter Notebook 4.2.x
* Conda Python 3.x and Python 2.7.x environments
* pyspark, pandas, matplotlib, scipy, seaborn, scikit-learn pre-installed
* Spark 1.6.0 for use in local mode or to connect to a cluster of Spark workers
* Mesos client 0.22 binary that can communicate with a Mesos master
@jgwerner
jgwerner / nginx.conf
Last active July 14, 2017 10:16
openresty-nginx.conf.
worker_processes auto;
error_log /dev/stdout debug;
events {
worker_connections 2048;
}
http {
upstream flaskserver {
ip_hash;
@jgwerner
jgwerner / useful-docker-commands.md
Last active February 1, 2017 17:51
Useful docker commands

Maintenance and troubleshooting commands

Installing Docker

Docker install script is probably the best way to install docker with Ubuntu, as it's the official bash script maintained by Docker and is updated with latest features:

$ curl -sSL https://get.docker.com | sh

Uninstalling Docker

@jgwerner
jgwerner / restructured_cheat_sheet.rst
Created February 17, 2017 19:20
reStructuredText cheat sheet

Advanced Topics

  • first-section

First Section