operator
modulefunctools
moduleitertools
moduletoolz
, fn
and funcy
modulesmrjob
operator
modulefunctools
moduleitertools
moduletoolz
, fn
and funcy
modulesmrjob
For more examples
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from IPython.html.widgets import interactive
from IPython.display import display
:0: FutureWarning: IPython widgets are experimental and may change in the future.
from scipy.stats import beta
plt.style.use('ggplot')
def dist(a=1, b=1):
x = np.linspace(0, 1, 100)
pdf = beta.pdf(x, a, b)
plt.plot(pdf)
return pdf
widget = interactive(dist, a=(0.0, 5.0), b=(0.0, 5.0))
widget.background_color = 'lightsalmon'
display(widget)
widget.close()
# Currnet settings of variables
widget.kwargs
{'a': 0.8, 'b': 0.7}
# Current value of function
pdf = widget.result
plt.plot(pdf);