Skip to content

Commit 181258b

Browse files
committed
Clean the widget state from the examples.
1 parent 17ff106 commit 181258b

15 files changed

+140
-13478
lines changed

docs/source/examples/Beat Frequencies.ipynb

Lines changed: 3 additions & 150 deletions
Large diffs are not rendered by default.

docs/source/examples/Exploring Graphs.ipynb

Lines changed: 1 addition & 212 deletions
Large diffs are not rendered by default.

docs/source/examples/Export As (nbconvert).ipynb

Lines changed: 3 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,7 @@
5656
"cell_type": "code",
5757
"execution_count": 3,
5858
"metadata": {},
59-
"outputs": [
60-
{
61-
"data": {
62-
"application/javascript": [
63-
"IPython.notebook.kernel.widget_manager.get_model('dbac6947a2e64ce2b7e065d44ed668a0').then(function(model) {\n",
64-
" model.set('value', IPython.notebook.notebook_name);\n",
65-
" model.save();\n",
66-
"});\n"
67-
],
68-
"text/plain": [
69-
"<IPython.core.display.Javascript object>"
70-
]
71-
},
72-
"metadata": {},
73-
"output_type": "display_data"
74-
}
75-
],
59+
"outputs": [],
7660
"source": [
7761
"js = \"\"\"IPython.notebook.kernel.widget_manager.get_model('%s').then(function(model) {\n",
7862
" model.set('value', IPython.notebook.notebook_name);\n",
@@ -86,18 +70,7 @@
8670
"cell_type": "code",
8771
"execution_count": 4,
8872
"metadata": {},
89-
"outputs": [
90-
{
91-
"data": {
92-
"text/plain": [
93-
"'Export As (nbconvert).ipynb'"
94-
]
95-
},
96-
"execution_count": 4,
97-
"metadata": {},
98-
"output_type": "execute_result"
99-
}
100-
],
73+
"outputs": [],
10174
"source": [
10275
"filename = notebook_name.value\n",
10376
"filename"
@@ -177,50 +150,7 @@
177150
"cell_type": "code",
178151
"execution_count": 7,
179152
"metadata": {},
180-
"outputs": [
181-
{
182-
"data": {
183-
"application/vnd.jupyter.widget-view+json": {
184-
"model_id": "4c4793b1e89b4c2c9fdd5ca43628656c",
185-
"version_major": 2,
186-
"version_minor": 0
187-
},
188-
"text/plain": [
189-
"A Jupyter Widget"
190-
]
191-
},
192-
"metadata": {},
193-
"output_type": "display_data"
194-
},
195-
{
196-
"data": {
197-
"application/vnd.jupyter.widget-view+json": {
198-
"model_id": "35bf7dd1365142e987d5a82bb780fb8c",
199-
"version_major": 2,
200-
"version_minor": 0
201-
},
202-
"text/plain": [
203-
"A Jupyter Widget"
204-
]
205-
},
206-
"metadata": {},
207-
"output_type": "display_data"
208-
},
209-
{
210-
"data": {
211-
"application/vnd.jupyter.widget-view+json": {
212-
"model_id": "5f1541cd051a4724895ad70c1667d7b4",
213-
"version_major": 2,
214-
"version_minor": 0
215-
},
216-
"text/plain": [
217-
"A Jupyter Widget"
218-
]
219-
},
220-
"metadata": {},
221-
"output_type": "display_data"
222-
}
223-
],
153+
"outputs": [],
224154
"source": [
225155
"display(exporter_names, export_button, download_link)"
226156
]
@@ -252,120 +182,6 @@
252182
"nbconvert_exporter": "python",
253183
"pygments_lexer": "ipython3",
254184
"version": "3.6.2"
255-
},
256-
"widgets": {
257-
"application/vnd.jupyter.widget-state+json": {
258-
"state": {
259-
"05d8491d372840a48d90dde3e208fcc7": {
260-
"model_module": "@jupyter-widgets/base",
261-
"model_module_version": "1.0.0",
262-
"model_name": "LayoutModel",
263-
"state": {}
264-
},
265-
"25c06f6aac9f45dd82fc7da4e86f17de": {
266-
"model_module": "@jupyter-widgets/controls",
267-
"model_module_version": "1.0.0",
268-
"model_name": "DescriptionStyleModel",
269-
"state": {
270-
"description_width": ""
271-
}
272-
},
273-
"35bf7dd1365142e987d5a82bb780fb8c": {
274-
"model_module": "@jupyter-widgets/controls",
275-
"model_module_version": "1.0.0",
276-
"model_name": "ButtonModel",
277-
"state": {
278-
"description": "Export",
279-
"layout": "IPY_MODEL_d08ca97108a34349a09bde36dcb32fbd",
280-
"style": "IPY_MODEL_a4740d1c40044f9cb0e3ace43d36b5d1"
281-
}
282-
},
283-
"39f2cae935da4bc1a3f49f3b6c201914": {
284-
"model_module": "@jupyter-widgets/base",
285-
"model_module_version": "1.0.0",
286-
"model_name": "LayoutModel",
287-
"state": {}
288-
},
289-
"4c4793b1e89b4c2c9fdd5ca43628656c": {
290-
"model_module": "@jupyter-widgets/controls",
291-
"model_module_version": "1.0.0",
292-
"model_name": "DropdownModel",
293-
"state": {
294-
"_options_labels": [
295-
"asciidoc",
296-
"custom",
297-
"html",
298-
"latex",
299-
"markdown",
300-
"notebook",
301-
"pdf",
302-
"python",
303-
"rst",
304-
"script",
305-
"slides"
306-
],
307-
"index": 2,
308-
"layout": "IPY_MODEL_05d8491d372840a48d90dde3e208fcc7",
309-
"style": "IPY_MODEL_25c06f6aac9f45dd82fc7da4e86f17de"
310-
}
311-
},
312-
"5c1d539574d748b5985dd3065139e3aa": {
313-
"model_module": "@jupyter-widgets/controls",
314-
"model_module_version": "1.0.0",
315-
"model_name": "DescriptionStyleModel",
316-
"state": {
317-
"description_width": ""
318-
}
319-
},
320-
"5f1541cd051a4724895ad70c1667d7b4": {
321-
"model_module": "@jupyter-widgets/controls",
322-
"model_module_version": "1.0.0",
323-
"model_name": "HTMLModel",
324-
"state": {
325-
"layout": "IPY_MODEL_d429162825b44a6db07c991f1640669a",
326-
"style": "IPY_MODEL_a234ed57cee64ed2b384d886955db6ed"
327-
}
328-
},
329-
"a234ed57cee64ed2b384d886955db6ed": {
330-
"model_module": "@jupyter-widgets/controls",
331-
"model_module_version": "1.0.0",
332-
"model_name": "DescriptionStyleModel",
333-
"state": {
334-
"description_width": ""
335-
}
336-
},
337-
"a4740d1c40044f9cb0e3ace43d36b5d1": {
338-
"model_module": "@jupyter-widgets/controls",
339-
"model_module_version": "1.0.0",
340-
"model_name": "ButtonStyleModel",
341-
"state": {}
342-
},
343-
"d08ca97108a34349a09bde36dcb32fbd": {
344-
"model_module": "@jupyter-widgets/base",
345-
"model_module_version": "1.0.0",
346-
"model_name": "LayoutModel",
347-
"state": {}
348-
},
349-
"d429162825b44a6db07c991f1640669a": {
350-
"model_module": "@jupyter-widgets/base",
351-
"model_module_version": "1.0.0",
352-
"model_name": "LayoutModel",
353-
"state": {}
354-
},
355-
"dbac6947a2e64ce2b7e065d44ed668a0": {
356-
"model_module": "@jupyter-widgets/controls",
357-
"model_module_version": "1.0.0",
358-
"model_name": "TextModel",
359-
"state": {
360-
"layout": "IPY_MODEL_39f2cae935da4bc1a3f49f3b6c201914",
361-
"style": "IPY_MODEL_5c1d539574d748b5985dd3065139e3aa",
362-
"value": "Export As (nbconvert).ipynb"
363-
}
364-
}
365-
},
366-
"version_major": 2,
367-
"version_minor": 0
368-
}
369185
}
370186
},
371187
"nbformat": 4,

docs/source/examples/Factoring.ipynb

Lines changed: 2 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,7 @@
6161
"cell_type": "code",
6262
"execution_count": 5,
6363
"metadata": {},
64-
"outputs": [
65-
{
66-
"data": {
67-
"text/plain": [
68-
"Eq(x**12 - 1, (x - 1)*(x + 1)*(x**2 + 1)*(x**2 - x + 1)*(x**2 + x + 1)*(x**4 - x**2 + 1))"
69-
]
70-
},
71-
"execution_count": 5,
72-
"metadata": {},
73-
"output_type": "execute_result"
74-
}
75-
],
64+
"outputs": [],
7665
"source": [
7766
"factorit(12)"
7867
]
@@ -81,22 +70,7 @@
8170
"cell_type": "code",
8271
"execution_count": 6,
8372
"metadata": {},
84-
"outputs": [
85-
{
86-
"data": {
87-
"application/vnd.jupyter.widget-view+json": {
88-
"model_id": "4881277b809f4cbd801354f1ff9870c2",
89-
"version_major": 2,
90-
"version_minor": 0
91-
},
92-
"text/plain": [
93-
"A Jupyter Widget"
94-
]
95-
},
96-
"metadata": {},
97-
"output_type": "display_data"
98-
}
99-
],
73+
"outputs": [],
10074
"source": [
10175
"interact(factorit, n=(2,40));"
10276
]
@@ -128,85 +102,6 @@
128102
"nbconvert_exporter": "python",
129103
"pygments_lexer": "ipython3",
130104
"version": "3.6.2"
131-
},
132-
"widgets": {
133-
"application/vnd.jupyter.widget-state+json": {
134-
"state": {
135-
"1da7a3342e7840229ceffd2f01dde105": {
136-
"model_module": "@jupyter-widgets/base",
137-
"model_module_version": "1.0.0",
138-
"model_name": "LayoutModel",
139-
"state": {}
140-
},
141-
"207cf1b19bad4ffa8e90aacf4c450cdc": {
142-
"model_module": "@jupyter-widgets/controls",
143-
"model_module_version": "1.0.0",
144-
"model_name": "IntSliderModel",
145-
"state": {
146-
"description": "n",
147-
"layout": "IPY_MODEL_3a85b93fb0f54a2db982e19b57829eb4",
148-
"max": 40,
149-
"min": 2,
150-
"style": "IPY_MODEL_7beb2c31fe2142229b0f61bbe7df496b",
151-
"value": 21
152-
}
153-
},
154-
"28c1526d2427423eb1f2283606297a5f": {
155-
"model_module": "@jupyter-widgets/base",
156-
"model_module_version": "1.0.0",
157-
"model_name": "LayoutModel",
158-
"state": {}
159-
},
160-
"3a85b93fb0f54a2db982e19b57829eb4": {
161-
"model_module": "@jupyter-widgets/base",
162-
"model_module_version": "1.0.0",
163-
"model_name": "LayoutModel",
164-
"state": {}
165-
},
166-
"4881277b809f4cbd801354f1ff9870c2": {
167-
"model_module": "@jupyter-widgets/controls",
168-
"model_module_version": "1.0.0",
169-
"model_name": "VBoxModel",
170-
"state": {
171-
"_dom_classes": [
172-
"widget-interact"
173-
],
174-
"children": [
175-
"IPY_MODEL_207cf1b19bad4ffa8e90aacf4c450cdc",
176-
"IPY_MODEL_6e0c212535ad453182bcc6695bfb79e9"
177-
],
178-
"layout": "IPY_MODEL_28c1526d2427423eb1f2283606297a5f"
179-
}
180-
},
181-
"6e0c212535ad453182bcc6695bfb79e9": {
182-
"model_module": "@jupyter-widgets/output",
183-
"model_module_version": "1.0.0",
184-
"model_name": "OutputModel",
185-
"state": {
186-
"layout": "IPY_MODEL_1da7a3342e7840229ceffd2f01dde105",
187-
"outputs": [
188-
{
189-
"data": {
190-
"text/plain": "Eq(x**21 - 1, (x - 1)*(x**2 + x + 1)*(x**6 + x**5 + x**4 + x**3 + x**2 + x + 1)*(x**12 - x**11 + x**9 - x**8 + x**6 - x**4 + x**3 - x + 1))"
191-
},
192-
"metadata": {},
193-
"output_type": "display_data"
194-
}
195-
]
196-
}
197-
},
198-
"7beb2c31fe2142229b0f61bbe7df496b": {
199-
"model_module": "@jupyter-widgets/controls",
200-
"model_module_version": "1.0.0",
201-
"model_name": "SliderStyleModel",
202-
"state": {
203-
"description_width": ""
204-
}
205-
}
206-
},
207-
"version_major": 2,
208-
"version_minor": 0
209-
}
210105
}
211106
},
212107
"nbformat": 4,

0 commit comments

Comments
 (0)