Justetc Social Services (non-profit)Jan 31 · 1 min read
from __future__ import print_function
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgetsdef f(x):
return xinteract(f, x=10);interactive(children=(IntSlider(value=10, description='x', max=30, min=-10), Output()), _dom_classes=('widget-…interact(f, x=True);interactive(children=(Checkbox(value=True, description='x'), Output()), _dom_classes=('widget-interact',))interact(f, x='Hi there!');interactive(children=(Text(value='Hi there!', description='x'), Output()), _dom_classes=('widget-interact',))@interact(x=True, y=1.0)
def g(x, y):
return (x, y)interactive(children=(Checkbox(value=True, description='x'), FloatSlider(value=1.0, description='y', max=3.0, …interact(f, x=['apples','oranges']);interactive(children=(Dropdown(description='x', options=('apples', 'oranges'), value='apples'), Output()), _do…from IPython.display import display
def f(a, b):
display(a + b)
return a+bw = interactive(f, a=10, b=20)type(w)ipywidgets.widgets.interaction.interactivew.children(IntSlider(value=10, description='a', max=30, min=-10),
IntSlider(value=20, description='b', max=60, min=-20),
Output())display(w)interactive(children=(IntSlider(value=10, description='a', max=30, min=-10), IntSlider(value=20, description='…