Skip to content

Instantly share code, notes, and snippets.

Last active December 8, 2018 20:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yang-zhang/ae8905f9c03b2ffa5120b6e634ed36a3 to your computer and use it in GitHub Desktop.
Common commands to add to top of jupyter notebooks
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from pathlib import Path
from collections import defaultdict, Counter
import pdb
import datetime
from tqdm import tqdm_notebook as tqdm
import pickle
import seaborn as sns
from IPython.display import display, Image as IImage
import sys, os, shutil
import json
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
pd.set_option('display.max_colwidth', -1)
def show_dct(dct, n=3):
return list(dct.items())[:n]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment