From 45c9afe4526fbb42814a97769a839907f8fdec08 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Wed, 28 Dec 2022 17:36:59 +0000 Subject: [PATCH 1/4] add template notebook --- template_notebook.ipynb | 186 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 template_notebook.ipynb diff --git a/template_notebook.ipynb b/template_notebook.ipynb new file mode 100644 index 000000000..521770eda --- /dev/null +++ b/template_notebook.ipynb @@ -0,0 +1,186 @@ +{ + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "id": "domestic-remove", + "metadata": {}, + "source": [ + "(template_notebook)=\n", + "# This is a template notebook\n", + "\n", + ":::{post} January, 2023\n", + ":tags: binomial regression, generalized linear model, \n", + ":category: beginner\n", + ":author: Jane Doe\n", + ":::" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "72588976-efc3-4adc-bec2-bc5b6ac4b7e1", + "metadata": {}, + "source": [ + "This is some introductory text. Consult the [style guide](https://docs.pymc.io/en/latest/contributing/jupyter_style.html)." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "elect-softball", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import arviz as az\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "import pandas as pd\n", + "import pymc as pm" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "level-balance", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "%config InlineBackend.figure_format = 'retina'\n", + "az.style.use(\"arviz-darkgrid\")\n", + "rng = np.random.default_rng(42)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "sapphire-yellow", + "metadata": {}, + "source": [ + "## My lovely content here" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "21e66b38", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Your code here\n" + ] + } + ], + "source": [ + "print(\"Your code here\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "b743d58b-2678-4e17-9947-a8fe4ed03e21", + "metadata": {}, + "source": [ + "## Authors\n", + "- Authored by [Benjamin T. Vincent](https://github.com/drbenvincent) in January 2023 " + ] + }, + { + "cell_type": "markdown", + "id": "closed-frank", + "metadata": {}, + "source": [ + "## References\n", + ":::{bibliography}\n", + ":filter: docname in docnames\n", + ":::" + ] + }, + { + "cell_type": "markdown", + "id": "0717070c-04aa-4836-ab95-6b3eff0dcaaf", + "metadata": {}, + "source": [ + "## Watermark" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "sound-calculation", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Last updated: Wed Dec 28 2022\n", + "\n", + "Python implementation: CPython\n", + "Python version : 3.11.0\n", + "IPython version : 8.7.0\n", + "\n", + "pytensor: 2.8.11\n", + "\n", + "pymc : 5.0.1\n", + "numpy : 1.24.0\n", + "arviz : 0.14.0\n", + "pandas : 1.5.2\n", + "sys : 3.11.0 | packaged by conda-forge | (main, Oct 25 2022, 06:21:25) [Clang 14.0.4 ]\n", + "matplotlib: 3.6.2\n", + "\n", + "Watermark: 2.3.1\n", + "\n" + ] + } + ], + "source": [ + "%load_ext watermark\n", + "%watermark -n -u -v -iv -w -p pytensor" + ] + }, + { + "cell_type": "markdown", + "id": "1e4386fc-4de9-4535-a160-d929315633ef", + "metadata": {}, + "source": [ + ":::{include} ../page_footer.md :::" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "pymc_env", + "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.11.0" + }, + "vscode": { + "interpreter": { + "hash": "d5f0cba85daacbebbd957da1105312a62c58952ca942f7218a10e4aa5f415a19" + } + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From da0f7b284fb3a86c1d19fc0c5bf25e60757a6753 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Wed, 28 Dec 2022 19:00:59 +0000 Subject: [PATCH 2/4] Update template_notebook.ipynb Co-authored-by: Oriol Abril-Pla --- template_notebook.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template_notebook.ipynb b/template_notebook.ipynb index 521770eda..ea6558a90 100644 --- a/template_notebook.ipynb +++ b/template_notebook.ipynb @@ -11,7 +11,7 @@ "\n", ":::{post} January, 2023\n", ":tags: binomial regression, generalized linear model, \n", - ":category: beginner\n", + ":category: beginner, reference\n", ":author: Jane Doe\n", ":::" ] From 3ca0998e035392c603975fa96675bee45c6013f6 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Wed, 28 Dec 2022 19:01:06 +0000 Subject: [PATCH 3/4] Update template_notebook.ipynb Co-authored-by: Oriol Abril-Pla --- template_notebook.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template_notebook.ipynb b/template_notebook.ipynb index ea6558a90..edf2c3c34 100644 --- a/template_notebook.ipynb +++ b/template_notebook.ipynb @@ -153,7 +153,8 @@ "id": "1e4386fc-4de9-4535-a160-d929315633ef", "metadata": {}, "source": [ - ":::{include} ../page_footer.md :::" + ":::{include} ../page_footer.md", + ":::" ] } ], From 05d8426fe7356f5bb1e5318b53cf6adc371274ee Mon Sep 17 00:00:00 2001 From: "Benjamin T. Vincent" Date: Thu, 29 Dec 2022 19:14:30 +0000 Subject: [PATCH 4/4] footer + comment --- template_notebook.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template_notebook.ipynb b/template_notebook.ipynb index edf2c3c34..4c25207ad 100644 --- a/template_notebook.ipynb +++ b/template_notebook.ipynb @@ -50,7 +50,7 @@ }, "outputs": [], "source": [ - "%config InlineBackend.figure_format = 'retina'\n", + "%config InlineBackend.figure_format = 'retina' # high resolution figures\n", "az.style.use(\"arviz-darkgrid\")\n", "rng = np.random.default_rng(42)" ] @@ -153,7 +153,7 @@ "id": "1e4386fc-4de9-4535-a160-d929315633ef", "metadata": {}, "source": [ - ":::{include} ../page_footer.md", + ":::{include} ../page_footer.md\n", ":::" ] }