Last active
September 25, 2019 04:20
-
-
Save hiepph/e15639f476ecad0d79537ae2cc4c3e97 to your computer and use it in GitHub Desktop.
Jupyter notebook tricks
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
# GPUs select | |
import os | |
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" | |
os.environ["CUDA_VISIBLE_DEVICES"]="0" | |
# Auto-reload external modules | |
%load_ext autoreload | |
%autoreload 2 | |
# Matplotlib | |
%matplotlib inline | |
import matplotlib.pyplot as plt | |
plt.rcParams['figure.figsize'] = (10, 20) | |
# Bokeh | |
from bokeh.io import output_notebook, show | |
output_notebook() | |
# Ignore warning | |
import warnings | |
warnings.filterwarnings('ignore') | |
# Change size | |
plt.rcParams["figure.figsize"] = (20,3) |
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
# bind to 0.0.0.0, no browser, and different port | |
jupyter notebook --ip 0.0.0.0 --no-browser --port 6006 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment