Skip to content

Instantly share code, notes, and snippets.

View SYAN83's full-sized avatar
🎯
Focusing

SHU YAN SYAN83

🎯
Focusing
  • Amazon
  • Seattle, WA
View GitHub Profile
@SYAN83
SYAN83 / docker-cleanup-resources.md
Created November 20, 2017 15:47 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@SYAN83
SYAN83 / tst.py
Created November 10, 2017 18:05 — forked from anonymous/tst.py
"""Running code with jupyter_client and saving outputs"""
# LICENSE: CC-0 (public domain)
from binascii import a2b_base64
from jupyter_client.manager import start_new_kernel
def handle_output(msg):
msg_type = msg['header']['msg_type']
@SYAN83
SYAN83 / jupyter_client_sample.py
Created November 10, 2017 18:05 — forked from chiral/jupyter_client_sample.py
sample code for jupyter_client
from subprocess import PIPE
from jupyter_client import KernelManager
import time
try:
from queue import Empty # Py 3
except ImportError:
from Queue import Empty # Py 2
km = KernelManager(kernel_name='ir')
km.start_kernel()
@SYAN83
SYAN83 / ipython_notebook+spark.md
Created April 28, 2016 14:02 — forked from tommycarpi/ipython_notebook+spark.md
Link Apache Spark with IPython Notebook

How to link Apache Spark 1.6.0 with IPython notebook (Mac OS X)

Tested with

Python 2.7, OS X 10.11.3 El Capitan, Apache Spark 1.6.0 & Hadoop 2.6

Download Apache Spark & Build it

Download Apache Spark and build it or download the pre-built version.