Skip to content

Commit

Permalink
move show_html.ipynb to notebooks for general use
Browse files Browse the repository at this point in the history
  • Loading branch information
rjleveque committed Jan 28, 2023
1 parent 08f6a23 commit b952488
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@
"Useful if you are not able to open the html file due to security issues, e.g. on a Jupyter Hub."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "65af1a93-6e69-4516-bee0-d8b8aa226751",
"metadata": {},
"outputs": [],
"source": [
"from IPython.display import HTML"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -28,6 +18,7 @@
"outputs": [],
"source": [
"def show_element(elem, h=600):\n",
" from IPython.display import HTML\n",
" embed_url = f\"<embed src='{elem}' width='100%%' height='{h}px' />\"\n",
" return HTML(embed_url)"
]
Expand Down Expand Up @@ -85,6 +76,14 @@
"source": [
"show_element('_plots/movie_fig1.html')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d3b0928c",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -103,7 +102,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down

0 comments on commit b952488

Please sign in to comment.