Skip to content

Instantly share code, notes, and snippets.

View alessandrocucci's full-sized avatar

Alessandro Cucci alessandrocucci

View GitHub Profile
@craffel
craffel / draw_neural_net.py
Created January 10, 2015 04:59
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])
@nateGeorge
nateGeorge / coding_standard.py
Created July 16, 2016 16:56
coding standards, originally from enthought
# taken from here: http://web.archive.org/web/20110527163743/https://svn.enthought.com/enthought/browser/sandbox/docs/coding_standard.py
""" This module is an example of the Enthought Python coding standards.
It was adapted from the Python Enhancement Proposal 8 (aka PEP 8) titled
'Style Guide for Python Code' (http://www.python.org/peps/pep-0008.html).
The first item in a module must be a documentation string (docstring). The
first line of the docstring should be a one line summary. If a more
detailed description is required, put an empty line before it.