Skip to content

Instantly share code, notes, and snippets.

@anbrjohn
anbrjohn / draw_neural_net.py
Last active March 5, 2021 19:34 — forked from craffel/draw_neural_net.py
Draw a neural network diagram with matplotlib!
#!/usr/bin/env python3
"""
Created by @author: craffel
Modified on Sun Jan 15, 2017 by anbrjohn
Modifications:
-Changed xrange to range for python 3
-Added functionality to annotate nodes
"""
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1