Quick useful python profiling
Profiling your process
python -m cProfile -o profile_data.pstats my_program.py
Run python like this and it will create a file full of profiling stats.
Viewing the data
SnakeViz rocks. It's a lovely little visualisation tool that makes it very easy to see where your time is going
pip install snakeviz
snakeviz profile_data.pstats
This will launch a web server and your browser to interactively inspect the results. Enjoy!

