View minikube-wrinkles.sh
#!/bin/sh
# workaround some wrinkles I've encountered when working with minikube
# run via `cat minikube-wrinkles.sh | minikube ssh`
# workaround kubernetes/minikube#1568 (pods cannot connect to own service ip)
sudo ip link set docker0 promisc on
# make hostpath volumes world-writable by default
sudo chmod -R a+rwX /tmp/hostpath-provisioner/
sudo setfacl -d -m u::rwX /tmp/hostpath-provisioner/
View bench.py
# example zmq benchmark
# LICENSE: CC-0 (Public Domain)
from multiprocessing import Process
import os
import time
import zmq
View post-run-cell.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View test-priority.py
import os
from traitlets.config import Config, Configurable, Application
from traitlets import Unicode
os.environ['FOO_VALUE'] = 'foo-from-env'
os.environ['APP_VALUE'] = 'app-from-env'
class Foo(Configurable):
value = Unicode('default', envvar='FOO_VALUE', config=True)
View widgets.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View job-deadline.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View test.py
"""
Python implementation of https://github.com/jupyterhub/jupyterhub/issues/1261
"""
import json
import requests
username = 'minrk'
password = 'secret'
hub_url = 'http://127.0.0.1:8765'
View pyzmq-ipc-perf.py
from concurrent.futures import ProcessPoolExecutor
import os
import time
import zmq
NMSGS = 1000000
MSG_SIZE = 200
URL = 'ipc://pyzmq-test.sock'
# URL = 'tcp://127.0.0.1:5555'
View jupyterhub_config.py
import pwd
import grp
from dockerspawner import SystemUserSpawner
class SystemGroupSpawner(SystemUserSpawner):
# local unix groups a user might be a member of
groups = ['admin']
View custom.css
/*
place this in your ~/.jupyter/custom/custom.css
to move the toolbar to the bottom of the page,
hopefully making it easier to reach for smart boards (@elliewix)
*/
div#maintoolbar {
position: fixed;
bottom: 0;
}