-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample_notebook.gist
1 lines (1 loc) · 1.36 KB
/
example_notebook.gist
1
{"description":"gist-service/ipywidgets/research 2","files":{"ipywidgets.py3":{"content":"# New file ipywidgets.py3\n\nfrom ipywidgets import IntSlider, Text, VBox\nfrom IPython.display import display\n\ns = IntSlider(max=200, value=100)\nt = Text()\n\ndef update_text(change=None):\n t.value = str(s.value ** 2)\n\ns.observe(update_text, names='value')\nupdate_text()\ndisplay(VBox([s, s, s, t]))\n"},"part2.py3":{"content":"from ipywidgets import IntSlider, Text, VBox\nfrom IPython.display import display\n\ns = IntSlider(max=200, value=100)\nt = Text()\n\ndef update_text(change=None):\n t.value = str(s.value ** 2)\n\ns.observe(update_text, names='value')\nupdate_text()\ndisplay(VBox([s, s, s, t]))"},"part3.py3":{"content":"\ndisplay(VBox([s, s, s, t])) "},"part4.py3":{"content":"1+1"},"part5.py3":{"content":"display(s)"},"part7.py":{"content":"from ipywidgets import IntSlider, Text, VBox\nfrom IPython.display import display\n\ns = IntSlider(max=200, value=100)\nt = Text()\n\ndef update_text(change=None):\n t.value = str(s.value ** 2)\n\ns.observe(update_text, names='value')\nupdate_text()\ndisplay(VBox([s, s, s, t])) "},"part8.py":{"content":"import matplotlib.pyplot as plt\nimport numpy as np\nx = np.linspace(0, 3*np.pi, 500)\nplt.plot(x, np.sin(x**2))\nplt.title('A simple chirp')"},"scratch.R":{"content":"# keep snippets here while working with your notebook's cells"}}}