Skip to content

Instantly share code, notes, and snippets.

@sagarkar10
Created July 5, 2019 12:27
Show Gist options
  • Save sagarkar10/853edec7e3e87237baeea9e5288eacaf to your computer and use it in GitHub Desktop.
Save sagarkar10/853edec7e3e87237baeea9e5288eacaf to your computer and use it in GitHub Desktop.
This gist is to hold my frequently used code snippets and load them directly into my notebook
# use black extension for each cell execution automatically
# msut have nb_black and black installed
# just run this magic in the first line of the code
%load_ext nb_balck
# show all output from the running cell
# available options : 'all', 'last', 'last_expr', 'none', 'last_expr_or_assign'
# default: 'last_expr'
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
# frequent imports
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment