Skip to content

Instantly share code, notes, and snippets.

@khdlr
Created April 12, 2017 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khdlr/a9e8e4df88fdb90214d9d2dffbe5a935 to your computer and use it in GitHub Desktop.
Save khdlr/a9e8e4df88fdb90214d9d2dffbe5a935 to your computer and use it in GitHub Desktop.
File to automatically import in a Jupyter Notebook session to get to work quickly
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from IPython.display import display
from IPython import get_ipython
from sqlalchemy import create_engine
from itertools import combinations, product, chain
from functools import partial
import fitz
import re
from tqdm import tqdm_notebook as progress
pd.options.display.float_format = "{:,.0f}".format
DB = create_engine('mssql://Senegal').raw_connection()
sql = partial(pd.read_sql, con=DB)
sql_exec = lambda x: pd.io.sql.execute(x, con=DB).commit()
try:
ipython = get_ipython()
ipython.magic("matplotlib inline")
except:
pass
plt.style.use('ggplot')
def figsize(*args):
plt.rcParams['figure.figsize'] = args
figsize(16, 8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment