Skip to content

Instantly share code, notes, and snippets.

@moble
moble / show_dimensions.tex
Last active September 4, 2020 16:44
Get latex to tell you its sizes, then use those sizes in matplotlib to create plots that will fit perfectly in your latex file
% Anywhere you want to see the dimensions latex is using, just place
% this command in the tex file itself, run latex, and look for these
% items in the compilation output. For example, to see these numbers
% as latex uses them within the text, just put this command in the
% main text. To see them in a figure caption, just put this command
% where you write the caption text. Note that the standard
% points-per-inch ratio is 72.27.
\makeatletter
@randyzwitch
randyzwitch / ipython-notebook-ec2.py
Created November 21, 2013 21:50
Setting up IPython Notebook as a remote server
#### Start IPython, generate SHA1 password to use for IPython Notebook server
$ ipython
Python 2.7.5 |Anaconda 1.8.0 (x86_64)| (default, Oct 24 2013, 07:02:20)
Type "copyright", "credits" or "license" for more information.
IPython 1.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.