Last active
February 17, 2021 19:07
-
-
Save dkirkby/df96e1b2bedbe0f1b69ff2b600caf9dc to your computer and use it in GitHub Desktop.
Useful bits for a jupyter notebook preamble
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%reload_ext autoreload | |
%autoreload 1 | |
%matplotlib inline | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# Modules imported by devpkg must also be listed here to get the same treatment. | |
%aimport devpkg | |
%aimport devpkg.util | |
import warnings | |
warnings.simplefilter(action='ignore', category=FutureWarning) | |
# https://jakevdp.github.io/blog/2017/12/05/installing-python-packages-from-jupyter/ | |
import sys | |
!conda install --yes --prefix {sys.prefix} --user condapkg | |
!{sys.executable} -m pip install --user noncondapkg | |
!{sys.executable} -m pip install --user git+https://github.com/dkirkby/gitpkg | |
# If you didn't already have a $HOME/.local/ you will need to restart the kernel first. | |
# https://nersc.service-now.com/nav_to.do?uri=incident.do?sys_id=1ddfaf0edb4f7340b259fb0e0f961904%26sysparm_view=ess | |
import noncondapkg | |
import gitpkg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment