Skip to content

Instantly share code, notes, and snippets.

@jdbcode
Last active January 5, 2022 20:08
Show Gist options
  • Save jdbcode/e8a148626c223bc06bd738281dbc0bd5 to your computer and use it in GitHub Desktop.
Save jdbcode/e8a148626c223bc06bd738281dbc0bd5 to your computer and use it in GitHub Desktop.
Convert a Colab notebook to Markdown with nbconvert
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "colab_to_markdown.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyObyv/blOz99IFDoJ7mVnpl",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/jdbcode/e8a148626c223bc06bd738281dbc0bd5/colab_to_markdown.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "_TA0wpswvmho"
},
"outputs": [],
"source": [
"from google.colab import drive\n",
"drive.mount(\"/gdrive\")\n",
"!jupyter nbconvert --to markdown \"/gdrive/My Drive/Colab Notebooks/foo.ipynb\""
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment