Skip to content

Instantly share code, notes, and snippets.

@gwli
gwli / Makefile
Created December 2, 2018 08:40 — forked from lmullen/Makefile
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@gwli
gwli / simple_neural_network_diagram
Created March 13, 2017 03:47 — forked from thigm85/simple_neural_network_diagram
Graphviz script to draw a simple neural network diagram. Copy this to a `file.txt` file and then run `dot -Tpng -O file.txt` from command-line to get a .png figure with the diagram.
digraph G {
rankdir=LR
splines=line
node [fixedsize=true, label=""];
subgraph cluster_0 {
color=white;
node [style=solid,color=blue4, shape=circle];
@gwli
gwli / multi_class_neural_netwrok_diagram
Created March 13, 2017 03:46 — forked from thigm85/multi_class_neural_netwrok_diagram
Graphviz script to draw a multi-class neural network diagram. Copy this to a `file.txt` file and then run `dot -Tpng -O file.txt` from command-line to get a .png figure with the diagram.
digraph G {
rankdir=LR
splines=line
nodesep=.05;
node [label=""];
subgraph cluster_0 {
color=white;
@gwli
gwli / 0_reuse_code.js
Created September 14, 2016 02:29
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
@gwli
gwli / dot.py
Created July 5, 2014 18:17 — forked from esle/dot.py
"""
dot directive (require graphviz)
"""
from docutils import nodes
from docutils.parsers.rst import directives, Directive
import subprocess as sp
nthUnnamed = 0