Put custom.css in .jupyter/custom/
(if you are running recent version of Jupyter).
Note: Tested only on Chrome. Let me know if something is not working.
""" | |
Copyright (C) 2015 Baxter Eaves | |
License: Do what the fuck you want to public license (WTFPL) V2 | |
Bayesian hierarchical clustering. | |
Heller, K. A., & Ghahramani, Z. (2005). Bayesian Hierarchical Clustering. | |
Neuroscience, 6(section 2), 297–304. doi:10.1145/1102351.1102389 | |
""" | |
import itertools as it |
"Dynamic plotting in matplotlib. Copy and paste into a Jupyter notebook." | |
# written October 2016 by Sam Greydanus | |
%matplotlib notebook | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import time | |
def plt_dynamic(x, y, ax, colors=['b']): | |
for color in colors: | |
ax.plot(x, y, color) |
"""Hack to add per-session state to Streamlit. | |
Usage | |
----- | |
>>> import SessionState | |
>>> | |
>>> session_state = SessionState.get(user_name='', favorite_color='black') | |
>>> session_state.user_name | |
'' |