Created
November 8, 2023 14:52
-
-
Save alonsosilvaallende/d44cb3d440b42a581b2652ed9c4af8fa to your computer and use it in GitHub Desktop.
Solara-Altair.ipynb
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
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"provenance": [], | |
"authorship_tag": "ABX9TyMkzqWdqU85VzEIPFx/zzcU", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
}, | |
"widgets": { | |
"application/vnd.jupyter.widget-state+json": { | |
"774583bde885497a988a677e9b67ad86": { | |
"model_module": "jupyter-vue", | |
"model_name": "HtmlModel", | |
"model_module_version": "^1.10.1", | |
"state": { | |
"_dom_classes": [], | |
"_events": [], | |
"_jupyter_vue": "IPY_MODEL_d4d4acd37dde4926a63a9f4f0ff0f4bd", | |
"_model_module": "jupyter-vue", | |
"_model_module_version": "^1.10.1", | |
"_model_name": "HtmlModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vue", | |
"_view_module_version": "^1.10.1", | |
"_view_name": "VueView", | |
"attributes": {}, | |
"children": [], | |
"class_": null, | |
"layout": null, | |
"slot": null, | |
"style_": "display: none", | |
"tag": "span", | |
"v_model": "!!disabled!!", | |
"v_on": null, | |
"v_slots": [] | |
} | |
}, | |
"042ba31052914d7caae11b2ab39cc5d8": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"b1242d2e515940b7bd94c2b4ed4635b8": { | |
"model_module": "@jupyter-widgets/controls", | |
"model_name": "VBoxModel", | |
"model_module_version": "1.5.0", | |
"state": { | |
"_dom_classes": [], | |
"_model_module": "@jupyter-widgets/controls", | |
"_model_module_version": "1.5.0", | |
"_model_name": "VBoxModel", | |
"_view_count": 1, | |
"_view_module": "@jupyter-widgets/controls", | |
"_view_module_version": "1.5.0", | |
"_view_name": "VBoxView", | |
"box_style": "", | |
"children": [ | |
"IPY_MODEL_afb0ddf8797c4b7f84f6fd34a2ac8fc1" | |
], | |
"layout": "IPY_MODEL_042ba31052914d7caae11b2ab39cc5d8" | |
} | |
}, | |
"afb0ddf8797c4b7f84f6fd34a2ac8fc1": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "SheetModel", | |
"model_module_version": "^1.8.5", | |
"state": { | |
"_dom_classes": [], | |
"_events": [], | |
"_jupyter_vue": "IPY_MODEL_d4d4acd37dde4926a63a9f4f0ff0f4bd", | |
"_metadata": null, | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.8.5", | |
"_model_name": "SheetModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.8.5", | |
"_view_name": "VuetifyView", | |
"attributes": {}, | |
"children": [ | |
"IPY_MODEL_f972f8be6c5444bab5b9a3bf7e003e18", | |
"IPY_MODEL_f9a0e9f9666a4c679093891daa23943c" | |
], | |
"class_": "d-flex ma-0", | |
"color": null, | |
"dark": null, | |
"elevation": 0, | |
"height": null, | |
"layout": null, | |
"light": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"slot": null, | |
"style_": "flex-direction: column; align-items: stretch; row-gap: 12px;;", | |
"tag": null, | |
"tile": null, | |
"v_model": "!!disabled!!", | |
"v_on": null, | |
"v_slots": [], | |
"width": null | |
} | |
}, | |
"6b0caca68bc34f598cd79611e9633f67": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"aee068478d674b4cb9dc44edaf6ba55f": { | |
"model_module": "@jupyter-widgets/base", | |
"model_name": "LayoutModel", | |
"model_module_version": "1.2.0", | |
"state": { | |
"_model_module": "@jupyter-widgets/base", | |
"_model_module_version": "1.2.0", | |
"_model_name": "LayoutModel", | |
"_view_count": null, | |
"_view_module": "@jupyter-widgets/base", | |
"_view_module_version": "1.2.0", | |
"_view_name": "LayoutView", | |
"align_content": null, | |
"align_items": null, | |
"align_self": null, | |
"border": null, | |
"bottom": null, | |
"display": null, | |
"flex": null, | |
"flex_flow": null, | |
"grid_area": null, | |
"grid_auto_columns": null, | |
"grid_auto_flow": null, | |
"grid_auto_rows": null, | |
"grid_column": null, | |
"grid_gap": null, | |
"grid_row": null, | |
"grid_template_areas": null, | |
"grid_template_columns": null, | |
"grid_template_rows": null, | |
"height": null, | |
"justify_content": null, | |
"justify_items": null, | |
"left": null, | |
"margin": null, | |
"max_height": null, | |
"max_width": null, | |
"min_height": null, | |
"min_width": null, | |
"object_fit": null, | |
"object_position": null, | |
"order": null, | |
"overflow": null, | |
"overflow_x": null, | |
"overflow_y": null, | |
"padding": null, | |
"right": null, | |
"top": null, | |
"visibility": null, | |
"width": null | |
} | |
}, | |
"f0adbd40b6fd4368864692412e893959": { | |
"model_module": "jupyter-vue", | |
"model_name": "TemplateModel", | |
"model_module_version": "^1.10.1", | |
"state": { | |
"_model_module": "jupyter-vue", | |
"_model_module_version": "^1.10.1", | |
"_model_name": "TemplateModel", | |
"_view_count": null, | |
"_view_module": null, | |
"_view_module_version": "", | |
"_view_name": null, | |
"template": "<template>\n <div>\n <div ref=\"plotElement\"></div>\n </div>\n</template>\n<script>\nmodule.exports = {\n created() {\n this.vegaLoaded = this.loadVega();\n this.do_plot_debounced = _.debounce(async () => {\n await this.vegaLoaded;\n this.do_plot()\n }, 100)\n },\n mounted() {\n this.do_plot_debounced();\n },\n watch: {\n spec() {\n this.do_plot_debounced();\n },\n listen_to_click() {\n this.do_plot_debounced();\n }\n },\n methods: {\n do_plot() {\n require(['vega', 'vega-lite', 'vega-embed'], (vega, vl, vegaEmbed) => {\n (async () => {\n const spec = {\n ...this.spec,\n };\n const { view } = await vegaEmbed(this.$refs.plotElement, spec);\n // events https://github.com/vega/vega-view#event-handling\n if (this.listen_to_click) {\n view.addEventListener('click', (event, item) => {\n if (item && item.datum) {\n this.altair_click(item.datum);\n } else {\n this.altair_click(null)\n }\n })\n }\n if (this.listen_to_hover) {\n view.addEventListener('mouseover', (event, item) => {\n if (item && item.datum) {\n this.altair_hover(item.datum);\n } else {\n this.altair_hover(null)\n }\n })\n }\n })();\n });\n },\n async loadVega() {\n await this.loadRequire();\n requirejs.undef(\"vega\")\n requirejs.undef(\"vega-lite\")\n requirejs.undef(\"vega-embed\")\n require.config({\n map: {\n '*': {\n 'vega': `${this.getCdn()}/vega@5/build/vega.min.js`,\n 'vega-lite': `${this.getCdn()}/vega-lite@5/build/vega-lite.min.js`,\n 'vega-embed': `${this.getCdn()}/vega-embed@6/build/vega-embed.min.js`,\n }\n }\n })\n // pre load\n await new Promise((resolve, reject) => {\n require(['vega', 'vega-lite', 'vega-embed'], () => {\n resolve()\n }, reject)\n });\n },\n loadRequire() {\n /* Needed in lab */\n if (window.requirejs) {\n console.log('require found');\n return Promise.resolve()\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.getCdn()}/[email protected]/require.js`;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n },\n getBaseUrl() {\n if (window.solara && window.solara.rootPath !== undefined) {\n return solara.rootPath + \"/\";\n }\n // if base url is set, we use ./ for relative paths compared to the base url\n if (document.getElementsByTagName(\"base\").length) {\n return \"./\";\n }\n const labConfigData = document.getElementById('jupyter-config-data');\n if (labConfigData) {\n /* lab and Voila */\n return JSON.parse(labConfigData.textContent).baseUrl;\n }\n let base = document.body.dataset.baseUrl || document.baseURI;\n if (!base.endsWith('/')) {\n base += '/';\n }\n return base\n },\n getCdn() {\n return (typeof solara_cdn !== \"undefined\" && solara_cdn) || `${this.getBaseUrl()}_solara/cdn`;\n }\n },\n}\n</script>\n" | |
} | |
}, | |
"f972f8be6c5444bab5b9a3bf7e003e18": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.8.10", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_d4d4acd37dde4926a63a9f4f0ff0f4bd", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.8.10", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.8.10", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [], | |
"layout": "IPY_MODEL_6b0caca68bc34f598cd79611e9633f67", | |
"methods": null, | |
"template": "\n<template>\n <div class=\"solara-markdown rendered_html jp-RenderedHTMLCommon\" style=\"\"><h1 id=\"altair-example\">Altair Example</h1></div>\n</template>\n\n<script>\nmodule.exports = {\n mounted() {\n if(window.mermaid)\n mermaid.init()\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n }\n this.$el.querySelectorAll(\"a\").forEach(a => this.setupRouter(a))\n window.md = this.$el\n },\n methods: {\n setupRouter(a) {\n let href = a.attributes['href'].value;\n if(href.startsWith(\"./\")) {\n // TODO: should we really do this?\n href = location.pathname + href.substr(1);\n a.attributes['href'].href = href;\n // console.log(\"change href to\", href);\n }\n if(href.startsWith(\"./\") || href.startsWith(\"/\")) {\n // console.log(\"connect link with href=\", href, \"to router\")\n a.onclick = e => {\n console.log(\"clicked\", href)\n if(href.startsWith(\"./\")) {\n solara.router.push(href);\n } else {\n solara.router.push(href);\n }\n e.preventDefault()\n }\n } else if(href.startsWith(\"#\")) {\n // console.log(\"connect anchor with href=\", href, \"to custom javascript due to using <base>\")\n href = location.pathname + href;\n a.attributes['href'].value = href;\n } else {\n console.log(\"href\", href, \"is not a local link\")\n }\n }\n },\n updated() {\n // if the html gets update, re-run mermaid\n if(window.mermaid)\n mermaid.init()\n if(window.MathJax && MathJax.Hub) {\n MathJax.Hub.Queue(['Typeset', MathJax.Hub, this.$el]);\n }\n }\n}\n</script>\n " | |
} | |
}, | |
"f9a0e9f9666a4c679093891daa23943c": { | |
"model_module": "jupyter-vuetify", | |
"model_name": "VuetifyTemplateModel", | |
"model_module_version": "^1.8.10", | |
"state": { | |
"_component_instances": [], | |
"_dom_classes": [], | |
"_jupyter_vue": "IPY_MODEL_d4d4acd37dde4926a63a9f4f0ff0f4bd", | |
"_model_module": "jupyter-vuetify", | |
"_model_module_version": "^1.8.10", | |
"_model_name": "VuetifyTemplateModel", | |
"_view_count": null, | |
"_view_module": "jupyter-vuetify", | |
"_view_module_version": "^1.8.10", | |
"_view_name": "VuetifyView", | |
"components": null, | |
"css": null, | |
"data": null, | |
"events": [ | |
"altair_click", | |
"altair_hover" | |
], | |
"layout": "IPY_MODEL_aee068478d674b4cb9dc44edaf6ba55f", | |
"listen_to_click": false, | |
"listen_to_hover": false, | |
"methods": null, | |
"spec": { | |
"config": { | |
"view": { | |
"continuousWidth": 400, | |
"continuousHeight": 300 | |
} | |
}, | |
"data": { | |
"name": "data-326837c1ad5148687152e9abb8f07183" | |
}, | |
"mark": "bar", | |
"encoding": { | |
"x": { | |
"field": "a", | |
"type": "nominal" | |
}, | |
"y": { | |
"field": "b", | |
"type": "quantitative" | |
} | |
}, | |
"$schema": "https://vega.github.io/schema/vega-lite/v4.17.0.json", | |
"datasets": { | |
"data-326837c1ad5148687152e9abb8f07183": [ | |
{ | |
"a": "A", | |
"b": 3 | |
}, | |
{ | |
"a": "B", | |
"b": 5 | |
}, | |
{ | |
"a": "C", | |
"b": 4 | |
} | |
] | |
} | |
}, | |
"template": "IPY_MODEL_f0adbd40b6fd4368864692412e893959" | |
} | |
} | |
} | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/alonsosilvaallende/d44cb3d440b42a581b2652ed9c4af8fa/solara-altair.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"!pip install -q solara altair" | |
], | |
"metadata": { | |
"id": "NXRpmrThZj-w" | |
}, | |
"execution_count": 1, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 366 | |
}, | |
"id": "QEZLNBI4ZfRe", | |
"outputId": "fd4a21c7-f0dd-4151-e175-5e515a3394b8" | |
}, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/html": [ | |
"\n", | |
"<div id=\"altair-viz-ff01796b3e4b481fad4c4a44ec8affa7\"></div>\n", | |
"<script type=\"text/javascript\">\n", | |
" var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n", | |
" (function(spec, embedOpt){\n", | |
" let outputDiv = document.currentScript.previousElementSibling;\n", | |
" if (outputDiv.id !== \"altair-viz-ff01796b3e4b481fad4c4a44ec8affa7\") {\n", | |
" outputDiv = document.getElementById(\"altair-viz-ff01796b3e4b481fad4c4a44ec8affa7\");\n", | |
" }\n", | |
" const paths = {\n", | |
" \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n", | |
" \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n", | |
" \"vega-lite\": \"https://cdn.jsdelivr.net/npm//[email protected]?noext\",\n", | |
" \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n", | |
" };\n", | |
"\n", | |
" function maybeLoadScript(lib, version) {\n", | |
" var key = `${lib.replace(\"-\", \"\")}_version`;\n", | |
" return (VEGA_DEBUG[key] == version) ?\n", | |
" Promise.resolve(paths[lib]) :\n", | |
" new Promise(function(resolve, reject) {\n", | |
" var s = document.createElement('script');\n", | |
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n", | |
" s.async = true;\n", | |
" s.onload = () => {\n", | |
" VEGA_DEBUG[key] = version;\n", | |
" return resolve(paths[lib]);\n", | |
" };\n", | |
" s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n", | |
" s.src = paths[lib];\n", | |
" });\n", | |
" }\n", | |
"\n", | |
" function showError(err) {\n", | |
" outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n", | |
" throw err;\n", | |
" }\n", | |
"\n", | |
" function displayChart(vegaEmbed) {\n", | |
" vegaEmbed(outputDiv, spec, embedOpt)\n", | |
" .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n", | |
" }\n", | |
"\n", | |
" if(typeof define === \"function\" && define.amd) {\n", | |
" requirejs.config({paths});\n", | |
" require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n", | |
" } else {\n", | |
" maybeLoadScript(\"vega\", \"5\")\n", | |
" .then(() => maybeLoadScript(\"vega-lite\", \"4.17.0\"))\n", | |
" .then(() => maybeLoadScript(\"vega-embed\", \"6\"))\n", | |
" .catch(showError)\n", | |
" .then(() => displayChart(vegaEmbed));\n", | |
" }\n", | |
" })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300}}, \"data\": {\"name\": \"data-326837c1ad5148687152e9abb8f07183\"}, \"mark\": \"bar\", \"encoding\": {\"x\": {\"field\": \"a\", \"type\": \"nominal\"}, \"y\": {\"field\": \"b\", \"type\": \"quantitative\"}}, \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.17.0.json\", \"datasets\": {\"data-326837c1ad5148687152e9abb8f07183\": [{\"a\": \"A\", \"b\": 3}, {\"a\": \"B\", \"b\": 5}, {\"a\": \"C\", \"b\": 4}]}}, {\"mode\": \"vega-lite\"});\n", | |
"</script>" | |
], | |
"text/plain": [ | |
"alt.Chart(...)" | |
] | |
}, | |
"metadata": {}, | |
"execution_count": 2 | |
} | |
], | |
"source": [ | |
"import altair as alt\n", | |
"import pandas as pd\n", | |
"\n", | |
"source = pd.DataFrame({\n", | |
" 'a': ['A', 'B', 'C'],\n", | |
" 'b': [3, 5, 4]\n", | |
"})\n", | |
"\n", | |
"chart = alt.Chart(source).mark_bar().encode(\n", | |
" x='a',\n", | |
" y='b'\n", | |
")\n", | |
"chart" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"import solara\n", | |
"\n", | |
"@solara.component\n", | |
"def Page():\n", | |
" solara.Markdown(\"#Altair Example\")\n", | |
" solara.AltairChart(chart)\n", | |
"Page()" | |
], | |
"metadata": { | |
"colab": { | |
"resources": { | |
"http://localhost:8080/_solara/cdn/[email protected]/require.js": { | |
"data": "CjwhRE9DVFlQRSBodG1sPgo8aHRtbCBsYW5nPWVuPgogIDxtZXRhIGNoYXJzZXQ9dXRmLTg+CiAgPG1ldGEgbmFtZT12aWV3cG9ydCBjb250ZW50PSJpbml0aWFsLXNjYWxlPTEsIG1pbmltdW0tc2NhbGU9MSwgd2lkdGg9ZGV2aWNlLXdpZHRoIj4KICA8dGl0bGU+RXJyb3IgNDA0IChOb3QgRm91bmQpISExPC90aXRsZT4KICA8c3R5bGU+CiAgICAqe21hcmdpbjowO3BhZGRpbmc6MH1odG1sLGNvZGV7Zm9udDoxNXB4LzIycHggYXJpYWwsc2Fucy1zZXJpZn1odG1se2JhY2tncm91bmQ6I2ZmZjtjb2xvcjojMjIyO3BhZGRpbmc6MTVweH1ib2R5e21hcmdpbjo3JSBhdXRvIDA7bWF4LXdpZHRoOjM5MHB4O21pbi1oZWlnaHQ6MTgwcHg7cGFkZGluZzozMHB4IDAgMTVweH0qID4gYm9keXtiYWNrZ3JvdW5kOnVybCgvL3d3dy5nb29nbGUuY29tL2ltYWdlcy9lcnJvcnMvcm9ib3QucG5nKSAxMDAlIDVweCBuby1yZXBlYXQ7cGFkZGluZy1yaWdodDoyMDVweH1we21hcmdpbjoxMXB4IDAgMjJweDtvdmVyZmxvdzpoaWRkZW59aW5ze2NvbG9yOiM3Nzc7dGV4dC1kZWNvcmF0aW9uOm5vbmV9YSBpbWd7Ym9yZGVyOjB9QG1lZGlhIHNjcmVlbiBhbmQgKG1heC13aWR0aDo3NzJweCl7Ym9keXtiYWNrZ3JvdW5kOm5vbmU7bWFyZ2luLXRvcDowO21heC13aWR0aDpub25lO3BhZGRpbmctcmlnaHQ6MH19I2xvZ297YmFja2dyb3VuZDp1cmwoLy93d3cuZ29vZ2xlLmNvbS9pbWFnZXMvbG9nb3MvZXJyb3JwYWdlL2Vycm9yX2xvZ28tMTUweDU0LnBuZykgbm8tcmVwZWF0O21hcmdpbi1sZWZ0Oi01cHh9QG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAobWluLXJlc29sdXRpb246MTkyZHBpKXsjbG9nb3tiYWNrZ3JvdW5kOnVybCgvL3d3dy5nb29nbGUuY29tL2ltYWdlcy9sb2dvcy9lcnJvcnBhZ2UvZXJyb3JfbG9nby0xNTB4NTQtMngucG5nKSBuby1yZXBlYXQgMCUgMCUvMTAwJSAxMDAlOy1tb3otYm9yZGVyLWltYWdlOnVybCgvL3d3dy5nb29nbGUuY29tL2ltYWdlcy9sb2dvcy9lcnJvcnBhZ2UvZXJyb3JfbG9nby0xNTB4NTQtMngucG5nKSAwfX1AbWVkaWEgb25seSBzY3JlZW4gYW5kICgtd2Via2l0LW1pbi1kZXZpY2UtcGl4ZWwtcmF0aW86Mil7I2xvZ297YmFja2dyb3VuZDp1cmwoLy93d3cuZ29vZ2xlLmNvbS9pbWFnZXMvbG9nb3MvZXJyb3JwYWdlL2Vycm9yX2xvZ28tMTUweDU0LTJ4LnBuZykgbm8tcmVwZWF0Oy13ZWJraXQtYmFja2dyb3VuZC1zaXplOjEwMCUgMTAwJX19I2xvZ297ZGlzcGxheTppbmxpbmUtYmxvY2s7aGVpZ2h0OjU0cHg7d2lkdGg6MTUwcHh9CiAgPC9zdHlsZT4KICA8YSBocmVmPS8vd3d3Lmdvb2dsZS5jb20vPjxzcGFuIGlkPWxvZ28gYXJpYS1sYWJlbD1Hb29nbGU+PC9zcGFuPjwvYT4KICA8cD48Yj40MDQuPC9iPiA8aW5zPlRoYXTigJlzIGFuIGVycm9yLjwvaW5zPgogIDxwPiAgPGlucz5UaGF04oCZcyBhbGwgd2Uga25vdy48L2lucz4K", | |
"ok": false, | |
"headers": [ | |
[ | |
"content-length", | |
"1449" | |
], | |
[ | |
"content-type", | |
"text/html; charset=utf-8" | |
] | |
], | |
"status": 404, | |
"status_text": "" | |
} | |
}, | |
"base_uri": "https://localhost:8080/", | |
"height": 71, | |
"referenced_widgets": [ | |
"774583bde885497a988a677e9b67ad86", | |
"042ba31052914d7caae11b2ab39cc5d8", | |
"b1242d2e515940b7bd94c2b4ed4635b8", | |
"afb0ddf8797c4b7f84f6fd34a2ac8fc1", | |
"6b0caca68bc34f598cd79611e9633f67", | |
"aee068478d674b4cb9dc44edaf6ba55f", | |
"f0adbd40b6fd4368864692412e893959", | |
"f972f8be6c5444bab5b9a3bf7e003e18", | |
"f9a0e9f9666a4c679093891daa23943c" | |
] | |
}, | |
"id": "-fJVEgshaDl6", | |
"outputId": "6ada3a90-d142-42fe-8432-5c0f2d25338f" | |
}, | |
"execution_count": 3, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"Html(layout=None, style_='display: none', tag='span')" | |
], | |
"application/vnd.jupyter.widget-view+json": { | |
"version_major": 2, | |
"version_minor": 0, | |
"model_id": "774583bde885497a988a677e9b67ad86" | |
} | |
}, | |
"metadata": { | |
"application/vnd.jupyter.widget-view+json": { | |
"colab": { | |
"custom_widget_manager": { | |
"url": "https://ssl.gstatic.com/colaboratory-static/widgets/colab-cdn-widget-manager/b3e629b1971e1542/manager.min.js" | |
} | |
} | |
} | |
} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"Cannot show ipywidgets in text" | |
], | |
"text/html": [ | |
"Cannot show widget. You probably want to rerun the code cell above (<i>Click in the code cell, and press Shift+Enter <kbd>⇧</kbd>+<kbd>↩</kbd></i>)." | |
], | |
"application/vnd.jupyter.widget-view+json": { | |
"version_major": 2, | |
"version_minor": 0, | |
"model_id": "b1242d2e515940b7bd94c2b4ed4635b8" | |
} | |
}, | |
"metadata": { | |
"application/vnd.jupyter.widget-view+json": { | |
"colab": { | |
"custom_widget_manager": { | |
"url": "https://ssl.gstatic.com/colaboratory-static/widgets/colab-cdn-widget-manager/b3e629b1971e1542/manager.min.js" | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment