Last active
July 15, 2018 12:05
-
-
Save nokados/6442b3f796d90e8ab2ed219442d02d95 to your computer and use it in GitHub Desktop.
Snippet for the first block in Jupyter Notebook. Import core libraries, set random seed, enable autoreload imported files
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
%load_ext autoreload | |
%autoreload 2 | |
import pandas as pd | |
from tqdm import tqdm_notebook, tqdm_pandas, tnrange | |
import time | |
import numpy as np | |
from IPython.display import clear_output | |
import pickle as pkl | |
import os | |
import random as rn | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
def reproducibility(): | |
os.environ['PYTHONHASHSEED'] = '0' | |
np.random.seed(42) | |
rn.seed(12345) | |
# tf.set_random_seed(1234) # if you use tensorflow | |
reproducibility() | |
pd.set_option('display.max_colwidth', 1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment