Skip to content

Instantly share code, notes, and snippets.

@rossant
rossant / latex_to_image.py
Created February 12, 2018 13:46
Convert a LaTeX equation into EPS and PNG with Python
import os
import os.path as op
from pathlib import Path
import shutil
import subprocess
import tempfile
from IPython.lib.latextools import genelatex
@romuald
romuald / gist:0346c76cfbbbceb3e4d1
Created April 30, 2015 16:05
Sub-millisecond profiling for python pstats
# -*- coding: utf8 -*-
"""
A simple monkeypath for the pstats module to be able to see sub-millisecond timings
If display value is 0.000, display the time in microseconds
"""
import pstats
def f8(x):