Notes on how this blog is generated
Based on https://www.fast.ai/2020/01/20/nb2md/, using nbdev and the fastai repo template.
Notes:
- It’s very important that the title be in a single cell at the beginning. only the
# My titlepart will be included in the processed markdown file. - This post is generated by this notebook, by activating the virtualenv and running:
./make-post.py notebooks/2020-09-06-example-post.ipynb
Here is an image that is copy/pasted into the cell:

Here is some LaTeX:
Here is some code:
for x in range(10):
print(x)
0
1
2
3
4
5
6
7
8
9
Here is some more markdown.
And here is some code that generates an SVG:
import pygraphviz as pgv
from IPython.display import Image, SVG, display
import networkx as nx
def draw(graph):
svg = nx.nx_agraph.to_agraph(graph).draw(prog='dot',format='svg')
display(SVG(svg))
import networkx as nx
G = nx.DiGraph()
G.add_edge('a', 'b')
G.add_edge('a', 'c')
G.add_edge('b', 'd')
G.add_edge('c', 'd')
G.add_edge('e', 'f')
G.add_edge('h', 'f')
G.add_edge('confounder', 'h')
G.add_edge('confounder', 'f')
draw(G)
Here is some code that generates latex from sympy:
import sympy
x, y = sympy.symbols('x y')
sympy.expand((x + y) ** 20)
And the same thing, but hidden (should be blank):
And the same thing, but with the input hidden (should have Latex but not the code):
And the same thing, but with the output hidden (should have the code but not the Latex):
# hide_output
import sympy
x, y = sympy.symbols('x y')
sympy.expand((x + y) ** 20)