From dd2916d61139a8d13bb45f76d31f76a101000deb Mon Sep 17 00:00:00 2001 From: Tom Hodson Date: Thu, 19 May 2022 19:14:04 +0200 Subject: [PATCH] Add the second lesson about packaging --- learning/02 Packaging it up.ipynb | 69 +++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 learning/02 Packaging it up.ipynb diff --git a/learning/02 Packaging it up.ipynb b/learning/02 Packaging it up.ipynb new file mode 100644 index 0000000..5c287f0 --- /dev/null +++ b/learning/02 Packaging it up.ipynb @@ -0,0 +1,69 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "dcddb3be-940b-4416-aec5-7159354c7cc0", + "metadata": {}, + "source": [ + "

Markov Chain Monte Carlo for fun and profit

\n", + "

๐ŸŽฒ โ›“๏ธ ๐Ÿ‘‰ ๐Ÿงช

" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "6e51fe6c-a8b8-48ed-9e7f-70e18945e597", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "\n", + "# This loads some custom styles for matplotlib\n", + "import json, matplotlib\n", + "with open(\"assets/matplotlibrc.json\") as f: matplotlib.rcParams.update(json.load(f))" + ] + }, + { + "cell_type": "markdown", + "id": "6327bffe-5a27-4643-929e-a9d41672cd2c", + "metadata": {}, + "source": [ + "## Packaging\n", + "\n", + "Now that we have some code, we're going to factor it out into a little python package, this has a few benefits:\n", + " - foo\n", + " - bah" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "58bef986-9d69-4ef6-8a64-9eaf29c3424e", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python [conda env:jupyter3.9] *", + "language": "python", + "name": "conda-env-jupyter3.9-py" + }, + "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.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}