Last active
January 21, 2020 22:49
-
-
Save Netherdrake/6c3b73c394d47222feb7463056ed496e to your computer and use it in GitHub Desktop.
<JUPYTER>
This file contains 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
import os, pickle, gc, json | |
import datetime as dt | |
from pprint import pprint | |
from tqdm import tqdm_notebook as tqdm | |
from funcy import * | |
import numpy as np | |
import pandas as pd | |
import pandas_profiling | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
from plotnine import * | |
%matplotlib inline | |
%config InlineBackend.figure_format = 'retina' | |
%load_ext autoreload | |
%autoreload 2 | |
#import warnings; warnings.filterwarnings("ignore") |
This file contains 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
# optional formatting changes | |
pd.set_option("display.precision", 2) | |
pd.set_option("display.float_format", '{:20,.2f}'.format) | |
np.set_printoptions(suppress=True) | |
pd.set_option('display.max_columns', 200) | |
# plot styles | |
plt.style.use('seaborn') | |
sns.set(style='ticks') # whitegrid for lines | |
plt.rcParams['figure.figsize'] = (10.0, 6.0) |
This file contains 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
import hvplot.pandas | |
import holoviews as hv | |
from holoviews import opts | |
hv.extension('bokeh') |
This file contains 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
data_dir = partial(os.path.join, '/media/user/Data/ML/mlcourse.ai/data/a10/') | |
def pickle_it(obj, filename): | |
with open(data_dir(filename), 'wb') as f: | |
pickle.dump(obj, f, protocol=2) | |
def unpickle(filename): | |
with open(data_dir(filename), 'rb') as f: | |
return pickle.load(f) |
This file contains 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
from plotly.offline import iplot, init_notebook_mode | |
init_notebook_mode(connected=False) |
This file contains 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
import os, pickle, gc, json | |
from pprint import pprint | |
from tqdm import tqdm | |
from funcy import * | |
import pandas as pd | |
import numpy as np | |
import datetime as dt | |
pd.set_option("display.precision", 2) | |
pd.set_option("display.float_format", '{:20,.2f}'.format) | |
np.set_printoptions(suppress=True) | |
pd.set_option('display.max_columns', 200) | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
plt.style.use('seaborn') | |
sns.set(style='ticks') # whitegrid for lines | |
plt.rcParams['figure.figsize'] = (15.0, 9.0) | |
import plotnine | |
plotnine.options.figure_size = (15, 9) | |
from plotnine import * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment