Skip to content

Instantly share code, notes, and snippets.

@krassowski
Created November 20, 2021 15:59
Show Gist options
  • Save krassowski/9cecfcc0efd1177c124a066f7d0ece8b to your computer and use it in GitHub Desktop.
Save krassowski/9cecfcc0efd1177c124a066f7d0ece8b to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "fb712941-d914-46bb-865e-59219e4a24e4",
"metadata": {},
"outputs": [],
"source": [
"from IPython.display import HTML"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "ac5961bf-c8de-47f6-9d46-eeb9a5e22155",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<a href=\"https://jupyter.org\">Jupyter</a>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"HTML('<a href=\"https://jupyter.org\">Jupyter</a>')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "cb492b7c-7020-40a4-a613-5a31d88dcc88",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<img src=\"https://jupyter.org/assets/main-logo.svg\" alt=\"Jupyter Logo\">"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Project Jupyter exists to develop open-source software\n"
]
}
],
"source": [
"display(HTML('<img src=\"https://jupyter.org/assets/main-logo.svg\" alt=\"Jupyter Logo\">'))\n",
"print('Project Jupyter exists to develop open-source software')"
]
}
],
"metadata": {
"citation-manager": {
"items": {}
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment