Skip to content

Instantly share code, notes, and snippets.

@khdlr
Created Apr 12, 2017
Embed
What would you like to do?
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