Skip to content

Commit 4f4a51b

Browse files
committed
Move events content into folder
1 parent 9f3f2e7 commit 4f4a51b

9 files changed

+33
-157
lines changed

notebooks/05.00-Widget_Events.ipynb renamed to notebooks/05.Events/05.00-Widget_Events.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@
288288
"outputs": [],
289289
"source": [
290290
"def on_F_change(change):\n",
291-
" degree_C.value = # Fill this in!\n",
291+
" degree_C.value = 0 # Fill this in with proper content!\n",
292292
" \n",
293293
"# Add line here to have degree_F observe changes in value and call on_F_change "
294294
]
@@ -581,7 +581,7 @@
581581
"name": "python",
582582
"nbconvert_exporter": "python",
583583
"pygments_lexer": "ipython3",
584-
"version": "3.8.3"
584+
"version": "3.8.10"
585585
}
586586
},
587587
"nbformat": 4,

notebooks/05.02-OPTIONAL-Widget_Events_2_--_bad_password_generator,_version_1.ipynb renamed to notebooks/05.Events/05.02-OPTIONAL-Widget_Events_2_--_bad_password_generator,_version_1.ipynb

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"metadata": {
7-
"collapsed": true,
8-
"jupyter": {
9-
"outputs_hidden": true
10-
}
11-
},
6+
"metadata": {},
127
"outputs": [],
138
"source": [
149
"import ipywidgets as widgets"
@@ -53,10 +48,7 @@
5348
"cell_type": "code",
5449
"execution_count": null,
5550
"metadata": {
56-
"collapsed": true,
57-
"jupyter": {
58-
"outputs_hidden": true
59-
}
51+
"tags": []
6052
},
6153
"outputs": [],
6254
"source": [
@@ -75,12 +67,7 @@
7567
{
7668
"cell_type": "code",
7769
"execution_count": null,
78-
"metadata": {
79-
"collapsed": true,
80-
"jupyter": {
81-
"outputs_hidden": true
82-
}
83-
},
70+
"metadata": {},
8471
"outputs": [],
8572
"source": [
8673
"password_widget = widgets.VBox(children=[helpful_title, password_text, password_length])\n",
@@ -91,14 +78,11 @@
9178
"cell_type": "code",
9279
"execution_count": null,
9380
"metadata": {
94-
"collapsed": true,
95-
"jupyter": {
96-
"outputs_hidden": true
97-
}
81+
"tags": []
9882
},
9983
"outputs": [],
10084
"source": [
101-
"# %load solutions/bad-password-generator/bad-pass-pass1-widgets.py\n"
85+
"# %load solutions/bad-pass-pass1-widgets.py"
10286
]
10387
},
10488
{
@@ -114,10 +98,7 @@
11498
"cell_type": "code",
11599
"execution_count": null,
116100
"metadata": {
117-
"collapsed": true,
118-
"jupyter": {
119-
"outputs_hidden": true
120-
}
101+
"tags": []
121102
},
122103
"outputs": [],
123104
"source": [
@@ -134,14 +115,11 @@
134115
"cell_type": "code",
135116
"execution_count": null,
136117
"metadata": {
137-
"collapsed": true,
138-
"jupyter": {
139-
"outputs_hidden": true
140-
}
118+
"tags": []
141119
},
142120
"outputs": [],
143121
"source": [
144-
"# %load solutions/bad-password-generator/bad-pass-pass1-passgen.py\n"
122+
"# %load solutions/bad-pass-pass1-passgen.py"
145123
]
146124
},
147125
{
@@ -157,10 +135,7 @@
157135
"cell_type": "code",
158136
"execution_count": null,
159137
"metadata": {
160-
"collapsed": true,
161-
"jupyter": {
162-
"outputs_hidden": true
163-
}
138+
"tags": []
164139
},
165140
"outputs": [],
166141
"source": [
@@ -171,14 +146,11 @@
171146
"cell_type": "code",
172147
"execution_count": null,
173148
"metadata": {
174-
"collapsed": true,
175-
"jupyter": {
176-
"outputs_hidden": true
177-
}
149+
"tags": []
178150
},
179151
"outputs": [],
180152
"source": [
181-
"# %load solutions/bad-password-generator/bad-pass-pass1-observe.py"
153+
"# %load solutions/bad-pass-pass1-observe.py"
182154
]
183155
},
184156
{
@@ -213,7 +185,7 @@
213185
"name": "python",
214186
"nbconvert_exporter": "python",
215187
"pygments_lexer": "ipython3",
216-
"version": "3.7.3"
188+
"version": "3.8.10"
217189
}
218190
},
219191
"nbformat": 4,

notebooks/05.03-OPTIONAL-Widget_Events_2_--_Separating_Concerns.ipynb renamed to notebooks/05.Events/05.03-OPTIONAL-Widget_Events_2_--_Separating_Concerns.ipynb

Lines changed: 19 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
6-
"metadata": {
7-
"collapsed": true,
8-
"jupyter": {
9-
"outputs_hidden": true
10-
}
11-
},
5+
"execution_count": null,
6+
"metadata": {},
127
"outputs": [],
138
"source": [
149
"import ipywidgets as widgets"
@@ -33,13 +28,8 @@
3328
},
3429
{
3530
"cell_type": "code",
36-
"execution_count": 6,
37-
"metadata": {
38-
"collapsed": true,
39-
"jupyter": {
40-
"outputs_hidden": true
41-
}
42-
},
31+
"execution_count": null,
32+
"metadata": {},
4333
"outputs": [],
4434
"source": [
4535
"def calculate_password(length):\n",
@@ -61,20 +51,9 @@
6151
},
6252
{
6353
"cell_type": "code",
64-
"execution_count": 7,
54+
"execution_count": null,
6555
"metadata": {},
66-
"outputs": [
67-
{
68-
"data": {
69-
"text/plain": [
70-
"'ppcdOhADeC'"
71-
]
72-
},
73-
"execution_count": 7,
74-
"metadata": {},
75-
"output_type": "execute_result"
76-
}
77-
],
56+
"outputs": [],
7857
"source": [
7958
"calculate_password(10)"
8059
]
@@ -90,24 +69,9 @@
9069
},
9170
{
9271
"cell_type": "code",
93-
"execution_count": 8,
72+
"execution_count": null,
9473
"metadata": {},
95-
"outputs": [
96-
{
97-
"data": {
98-
"application/vnd.jupyter.widget-view+json": {
99-
"model_id": "4f6597e4ec5d43c1984e61987fa0a49b",
100-
"version_major": 2,
101-
"version_minor": 0
102-
},
103-
"text/plain": [
104-
"A Jupyter Widget"
105-
]
106-
},
107-
"metadata": {},
108-
"output_type": "display_data"
109-
}
110-
],
74+
"outputs": [],
11175
"source": [
11276
"helpful_title = widgets.HTML('Generated password is:')\n",
11377
"password_text = widgets.HTML('No password yet')\n",
@@ -123,12 +87,7 @@
12387
{
12488
"cell_type": "code",
12589
"execution_count": null,
126-
"metadata": {
127-
"collapsed": true,
128-
"jupyter": {
129-
"outputs_hidden": true
130-
}
131-
},
90+
"metadata": {},
13291
"outputs": [],
13392
"source": []
13493
},
@@ -145,13 +104,8 @@
145104
},
146105
{
147106
"cell_type": "code",
148-
"execution_count": 10,
149-
"metadata": {
150-
"collapsed": true,
151-
"jupyter": {
152-
"outputs_hidden": true
153-
}
154-
},
107+
"execution_count": null,
108+
"metadata": {},
155109
"outputs": [],
156110
"source": [
157111
"def update_password(change):\n",
@@ -173,24 +127,9 @@
173127
},
174128
{
175129
"cell_type": "code",
176-
"execution_count": 9,
130+
"execution_count": null,
177131
"metadata": {},
178-
"outputs": [
179-
{
180-
"data": {
181-
"application/vnd.jupyter.widget-view+json": {
182-
"model_id": "4f6597e4ec5d43c1984e61987fa0a49b",
183-
"version_major": 2,
184-
"version_minor": 0
185-
},
186-
"text/plain": [
187-
"A Jupyter Widget"
188-
]
189-
},
190-
"metadata": {},
191-
"output_type": "display_data"
192-
}
193-
],
132+
"outputs": [],
194133
"source": [
195134
"password_widget"
196135
]
@@ -219,24 +158,9 @@
219158
},
220159
{
221160
"cell_type": "code",
222-
"execution_count": 21,
161+
"execution_count": null,
223162
"metadata": {},
224-
"outputs": [
225-
{
226-
"data": {
227-
"application/vnd.jupyter.widget-view+json": {
228-
"model_id": "8a10e24d23af40c38aac7af707c35929",
229-
"version_major": 2,
230-
"version_minor": 0
231-
},
232-
"text/plain": [
233-
"A Jupyter Widget"
234-
]
235-
},
236-
"metadata": {},
237-
"output_type": "display_data"
238-
}
239-
],
163+
"outputs": [],
240164
"source": [
241165
"from ipywidgets import interact\n",
242166
"from IPython.display import display\n",
@@ -252,24 +176,9 @@
252176
},
253177
{
254178
"cell_type": "code",
255-
"execution_count": 22,
179+
"execution_count": null,
256180
"metadata": {},
257-
"outputs": [
258-
{
259-
"data": {
260-
"application/vnd.jupyter.widget-view+json": {
261-
"model_id": "f12a8bf7afde4ac1a158b3ee188e785e",
262-
"version_major": 2,
263-
"version_minor": 0
264-
},
265-
"text/plain": [
266-
"A Jupyter Widget"
267-
]
268-
},
269-
"metadata": {},
270-
"output_type": "display_data"
271-
}
272-
],
181+
"outputs": [],
273182
"source": [
274183
"@interact(length=(8, 20))\n",
275184
"def print_password(length):\n",
@@ -279,12 +188,7 @@
279188
{
280189
"cell_type": "code",
281190
"execution_count": null,
282-
"metadata": {
283-
"collapsed": true,
284-
"jupyter": {
285-
"outputs_hidden": true
286-
}
287-
},
191+
"metadata": {},
288192
"outputs": [],
289193
"source": []
290194
},
@@ -313,7 +217,7 @@
313217
"name": "python",
314218
"nbconvert_exporter": "python",
315219
"pygments_lexer": "ipython3",
316-
"version": "3.7.3"
220+
"version": "3.8.10"
317221
}
318222
},
319223
"nbformat": 4,

0 commit comments

Comments
 (0)