Skip to content

Instantly share code, notes, and snippets.

View chongxi's full-sized avatar

chongxi lai chongxi

  • Astera.org
  • California
View GitHub Profile
@chongxi
chongxi / example.py
Created May 3, 2018 16:52 — forked from schlamar/example.py
mplog: Python advanced multiprocessing logging.
import logging
import multiprocessing
import time
import mplog
FORMAT = '%(asctime)s - %(processName)s - %(levelname)s - %(message)s'
logging.basicConfig(level=logging.DEBUG, format=FORMAT)
existing_logger = logging.getLogger('x')
@chongxi
chongxi / draw_neural_net.py
Created November 9, 2016 15:06 — forked from craffel/draw_neural_net.py
Draw a neural network diagram with matplotlib!
import matplotlib.pyplot as plt
def draw_neural_net(ax, left, right, bottom, top, layer_sizes):
'''
Draw a neural network cartoon using matplotilb.
:usage:
>>> fig = plt.figure(figsize=(12, 12))
>>> draw_neural_net(fig.gca(), .1, .9, .1, .9, [4, 7, 2])
@chongxi
chongxi / 0_reuse_code.js
Created October 20, 2015 03:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console