Default template for iPython notebook (using Jupyter)

I know it may not be what you’re looking for (this example is not good for working on notebooks that need to be run in multiple environments, e.g. shared), but I put the following in a file called ipython_config.py in my .ipython folder.

c.InteractiveShellApp.exec_lines = ['%matplotlib inline',
    'import numpy as np',
    'import scipy.constants as scc',
    'import scipy.integrate as sci',
    'from mpl_toolkits.mplot3d import Axes3D',
    'import scipy.optimize as sco'
]

This runs before anything runs in any interactive console, including the jupyter notebook. If you want explicit boilerplating, I think that you will be disappointed (unless you want to build in the functionality for us ☺)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)