Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX: make notebook runnable in GoogleColab #83

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions docs/lambda-k-pi/automated.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"mystnb": {
"code_prompt_show": "Import Python libraries"
},
Expand All @@ -31,10 +28,27 @@
},
"outputs": [],
"source": [
"# ruff: noqa: S404, S603, S607\n",
"\n",
"from __future__ import annotations\n",
"\n",
"import logging\n",
"import os\n",
"\n",
"if \"COLAB_BACKEND_VERSION\" in os.environ:\n",
" import subprocess\n",
"\n",
" from google.colab import output\n",
"\n",
" dependencies = [\n",
" \"ampform\",\n",
" \"graphviz\",\n",
" \"ipywidgets\",\n",
" \"ipympl\",\n",
" \"tensorwaves[jax,pwa]\",\n",
" ]\n",
" subprocess.check_call([\"pip\", \"install\", *dependencies])\n",
" output.enable_custom_widget_manager()\n",
"import warnings\n",
"from collections import defaultdict\n",
"from fractions import Fraction\n",
Expand Down Expand Up @@ -766,7 +780,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
Loading