Last active
November 6, 2020 20:00
-
-
Save cpatdowling/6b2e1e54649c2a2bf7a448b9b4fc40f5 to your computer and use it in GitHub Desktop.
Personal header for Jupyter Notebooks:
This file contains hidden or 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
#cells will fill entire width of the browser | |
from IPython.display import display, HTML | |
display(HTML(data=""" | |
<style> | |
div#notebook-container { width: 95%; } | |
div#menubar-container { width: 65%; } | |
div#maintoolbar-container { width: 99%; } | |
</style> | |
""")) | |
#Tells Jupyter to reload custom classes from scratch everytime an import cell is run, if you edit a custom class | |
#between imports Jupyter would otherwise need to be restarted completely. Buyer beware: old class objects in the | |
#current namespace will cause errors at execution | |
%load_ext autoreload | |
%autoreload 2 | |
#switches matplotlib to show plots in the browser rather than opening a new window | |
%matplotlib inline | |
#always forget to do this for better looking plots | |
#import seaborn | |
#seaborn.set() | |
from jupyterthemes import jtplot | |
# currently installed theme will be used to | |
# set plot style if no arguments provided | |
jtplot.style() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment