Created
October 9, 2014 23:00
-
-
Save jdfreder/aee9b2079fc41ddbb81d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"kernelspec": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 2 | |
}, | |
"display_name": "IPython (Python 2)", | |
"language": "python", | |
"name": "python2" | |
}, | |
"name": "", | |
"signature": "sha256:54c242eecabc680c95b0f11909e567263f0b7e1371a21a3eb7e29f0add92f111" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"from IPython.html.widgets import Widget\n", | |
"Widget.widgets" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 1, | |
"text": [ | |
"{}" | |
] | |
} | |
], | |
"prompt_number": 1 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"%%javascript\n", | |
"window.slider = IPython.notebook.kernel.widget_manager.create_model(\n", | |
" 'WidgetModel', \n", | |
" 'IPython.html.widgets.widget_int.IntSlider',\n", | |
" function(model) { console.log('Create success!', model); });" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"javascript": [ | |
"window.slider = IPython.notebook.kernel.widget_manager.create_model(\n", | |
" 'WidgetModel', \n", | |
" 'IPython.html.widgets.widget_int.IntSlider',\n", | |
" function(model) { console.log('Create success!', model); });" | |
], | |
"metadata": {}, | |
"output_type": "display_data", | |
"text": [ | |
"<IPython.core.display.Javascript object>" | |
] | |
} | |
], | |
"prompt_number": 2 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"Widget.widgets" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 3, | |
"text": [ | |
"{u'41CDCAF911B5492BB3452A19CCEA02B9': <IPython.html.widgets.widget_int.IntSlider at 0x23d8a90>}" | |
] | |
} | |
], | |
"prompt_number": 3 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"widget = Widget.widgets.values()[0]\n", | |
"widget" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 4 | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment