Skip to content

Instantly share code, notes, and snippets.

View jgwerner's full-sized avatar
🙃

Greg Werner jgwerner

🙃
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jgwerner
jgwerner / datascience_workflow.md
Created June 20, 2017 17:26
Standard data science workflow

Data Science Workflow

Define the Problem

  • What is the problem? Provide formal and informal definitions.
  • Why does the problem need to be solved? Motivation, benefits, how it will be used.
  • How would I solve the problem? Describe how the problem would be solved manually to flush domain knowledge.

Prepare Data

@jgwerner
jgwerner / jupyter_notebook_config.py
Created May 19, 2017 03:05
Jupyter Notebook config enabled for IFrames.
from jupyter_core.paths import jupyter_data_dir
import subprocess
import os
import errno
import stat
c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.port = 8888
c.NotebookApp.open_browser = False
@jgwerner
jgwerner / nvidia_docker_install.sh
Last active March 7, 2023 05:55
Nvidia docker installation script
# based in large part from https://raw.githubusercontent.com/khwilson/nvidia-docker-aws/master/nvidia.sh
#!/bin/bash
set -x
set -e
# Update and upgrade
echo "--"
echo "-- Running ubuntu updates and Ugrade"
@jgwerner
jgwerner / restructured_cheat_sheet.rst
Created February 17, 2017 19:20
reStructuredText cheat sheet

Advanced Topics

  • first-section

First Section

@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 / 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 / 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

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 / 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(