mirror of
https://github.com/ImperialCollegeLondon/ReCoDE_MCMCFF.git
synced 2025-06-26 08:51:16 +02:00
Add the second lesson about packaging
This commit is contained in:
parent
52dc309013
commit
dd2916d611
69
learning/02 Packaging it up.ipynb
Normal file
69
learning/02 Packaging it up.ipynb
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "dcddb3be-940b-4416-aec5-7159354c7cc0",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<h1 align=\"center\">Markov Chain Monte Carlo for fun and profit</h1>\n",
|
||||
"<h1 align=\"center\"> 🎲 ⛓️ 👉 🧪 </h1>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user