/usr/share/polymake/resources/jupyter-polymake/SliderWidgetWithJohnsonSolids.ipynb is in polymake-common 3.2r2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"@python\n",
"import ipywidgets as widgets\n",
"from IPython.display import display, clear_output\n",
"\n",
"def print_cube(dim):\n",
" kernel = get_ipython().kernel\n",
" output=kernel._run_polymake_command( \"johnson_solid(\" + str(dim) +\")->VISUAL\" )\n",
" stream_content = { 'wait': False }\n",
" kernel.send_response( kernel.iopub_socket, 'clear_output', stream_content )\n",
" stream_content = { 'data': { 'text/html': output[output.find(\".@@HTML@@\") + 9:-12] } }\n",
" kernel.send_response( kernel.iopub_socket, 'display_data', stream_content )\n",
"display(interactive(print_cube,__manual=True,dim=(1,92)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "polymake",
"language": "polymake",
"name": "polymake"
},
"language_info": {
"codemirror_mode": "perl",
"file_extension": ".pm",
"mimetype": "text/x-polymake",
"name": "polymake"
},
"widgets": {
"state": {
"d6b16eac4d314714bfdfff1c4fba92e7": {
"views": [
{
"cell_index": 0
}
]
}
},
"version": "1.2.0"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|