Skip to content

Commit 2c97938

Browse files
committed
Add the deoms
1 parent 518fd7b commit 2c97938

File tree

7 files changed

+1656
-0
lines changed

7 files changed

+1656
-0
lines changed

demos/explanation.png

5.79 KB
Loading

demos/explanation.svg

Lines changed: 323 additions & 0 deletions
Loading

demos/index.ipynb

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# widget-code-input demos\n",
8+
"\n",
9+
"You can visualize here a few demos of the `widget-code-input` widget for Jupyter, a widget that allows you to write snippets of code in the form of a function, and then test them.\n",
10+
"\n",
11+
"This widget is best used in combination with the [appmode](https://pypi.org/project/appmode/) plugin for Jupyter.\n",
12+
"\n",
13+
"Click on the headers to go to the respective demo."
14+
]
15+
},
16+
{
17+
"cell_type": "markdown",
18+
"metadata": {},
19+
"source": [
20+
"## [Simple showcase](./showcase.ipynb)\n",
21+
"This demo is a simple showcase of the functionality of this widget.\n",
22+
"It shows:\n",
23+
"\n",
24+
"- how to use the widget\n",
25+
"- how to get and set the content of the function body from python\n",
26+
"- how to monitor events from python (e.g. perform on operation in python every time the code is changed by the user)\n",
27+
"- that it is possible in insert multiple, independent widgets in the same notebook\n",
28+
"- how to obtain the function object from the widget and how to run it"
29+
]
30+
},
31+
{
32+
"cell_type": "markdown",
33+
"metadata": {},
34+
"source": [
35+
"## Exercise: compute the point at which a projectile would hit the ground \n",
36+
"### [Non-zooming version](./projectile-inline.ipynb) - [Interactive version](./projectile-notebook.ipynb)\n",
37+
"This demo shows a possible exercise for students: given the initial parameters of a projectile (height of launch, velocity), ask the student to write the function to compute the position where the projectile will hit the ground."
38+
]
39+
},
40+
{
41+
"cell_type": "code",
42+
"execution_count": null,
43+
"metadata": {},
44+
"outputs": [],
45+
"source": []
46+
}
47+
],
48+
"metadata": {
49+
"kernelspec": {
50+
"display_name": "Python 2",
51+
"language": "python",
52+
"name": "python2"
53+
},
54+
"language_info": {
55+
"codemirror_mode": {
56+
"name": "ipython",
57+
"version": 3
58+
},
59+
"file_extension": ".py",
60+
"mimetype": "text/x-python",
61+
"name": "python",
62+
"nbconvert_exporter": "python",
63+
"pygments_lexer": "ipython3",
64+
"version": "3.6.5"
65+
}
66+
},
67+
"nbformat": 4,
68+
"nbformat_minor": 2
69+
}

0 commit comments

Comments
 (0)