Skip to content

Instantly share code, notes, and snippets.

@EnkrateiaLucca
Created July 28, 2023 12:02
Show Gist options
  • Save EnkrateiaLucca/17856a8d02891d9eaff135d1813e3d2d to your computer and use it in GitHub Desktop.
Save EnkrateiaLucca/17856a8d02891d9eaff135d1813e3d2d to your computer and use it in GitHub Desktop.
a bunch of jupyter widgets
Display the source blob
Display the rendered blob
Raw
# Real-time Updates:
import ipywidgets as widgets
from IPython.display import display
output = widgets.Output()
slider = widgets.IntSlider(description='Slider')
def update_output(change):
with output:
output.clear_output()
print(f"Slider value: {change['new']}")
slider.observe(update_output, 'value')
display(slider, output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment