Skip to content

Instantly share code, notes, and snippets.

@yang-zhang
Last active December 8, 2018 20:54
Embed
What would you like to do?
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
pd.set_option('max_colwidth',500)
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