├── .gitignore
├── requirements.txt
├── logo.png
├── _build
├── html
│ ├── index.html
│ ├── objects.inv
│ ├── _static
│ │ ├── file.png
│ │ ├── logo.png
│ │ ├── minus.png
│ │ ├── plus.png
│ │ ├── styles
│ │ │ └── theme.css
│ │ ├── vendor
│ │ │ └── fontawesome
│ │ │ │ └── 6.5.2
│ │ │ │ ├── webfonts
│ │ │ │ ├── fa-brands-400.ttf
│ │ │ │ ├── fa-regular-400.ttf
│ │ │ │ ├── fa-solid-900.ttf
│ │ │ │ ├── fa-solid-900.woff2
│ │ │ │ ├── fa-brands-400.woff2
│ │ │ │ ├── fa-regular-400.woff2
│ │ │ │ ├── fa-v4compatibility.ttf
│ │ │ │ └── fa-v4compatibility.woff2
│ │ │ │ ├── js
│ │ │ │ └── all.min.js.LICENSE.txt
│ │ │ │ └── LICENSE.txt
│ │ ├── scripts
│ │ │ ├── bootstrap.js.LICENSE.txt
│ │ │ ├── quantecon-book-theme.js
│ │ │ └── pydata-sphinx-theme.js
│ │ ├── check-solid.svg
│ │ ├── play-solid.svg
│ │ ├── copy-button.svg
│ │ ├── documentation_options.js
│ │ ├── webpack-macros.html
│ │ ├── copybutton.css
│ │ ├── sphinx-thebe.css
│ │ ├── copybutton_funcs.js
│ │ ├── design-tabs.js
│ │ ├── togglebutton.css
│ │ ├── sphinx-thebe.js
│ │ ├── _sphinx_javascript_frameworks_compat.js
│ │ ├── doctools.js
│ │ ├── sphinx_highlight.js
│ │ ├── language_data.js
│ │ ├── togglebutton.js
│ │ ├── clipboard.min.js
│ │ ├── copybutton.js
│ │ └── pygments.css
│ ├── _sources
│ │ ├── mymarkdownfile.md
│ │ ├── intro.md
│ │ ├── markdown-notebooks.md
│ │ ├── markdown.md
│ │ ├── markdown-notebooks.ipynb
│ │ └── notebooks.ipynb
│ ├── .buildinfo
│ ├── reports
│ │ └── notebooks.err.log
│ ├── _sphinx_design_static
│ │ └── design-tabs.js
│ ├── searchindex.js
│ ├── genindex.html
│ ├── search.html
│ └── mymarkdownfile.html
├── .doctrees
│ ├── intro.doctree
│ ├── markdown.doctree
│ ├── notebooks.doctree
│ ├── environment.pickle
│ ├── mymarkdownfile.doctree
│ └── markdown-notebooks.doctree
└── jupyter_execute
│ ├── markdown-notebooks.ipynb
│ └── notebooks.ipynb
├── mymarkdownfile.md
├── _toc.yml
├── intro.md
├── _config.yml
├── markdown-notebooks.md
├── markdown.md
├── notebooks.ipynb
└── references.bib
/.gitignore:
--------------------------------------------------------------------------------
1 | _build/
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | jupyter-book
2 | matplotlib
3 | numpy
4 |
--------------------------------------------------------------------------------
/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/logo.png
--------------------------------------------------------------------------------
/_build/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/_build/html/objects.inv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/objects.inv
--------------------------------------------------------------------------------
/_build/html/_static/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/file.png
--------------------------------------------------------------------------------
/_build/html/_static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/logo.png
--------------------------------------------------------------------------------
/_build/html/_static/minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/minus.png
--------------------------------------------------------------------------------
/_build/html/_static/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/plus.png
--------------------------------------------------------------------------------
/_build/.doctrees/intro.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/.doctrees/intro.doctree
--------------------------------------------------------------------------------
/_build/.doctrees/markdown.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/.doctrees/markdown.doctree
--------------------------------------------------------------------------------
/_build/.doctrees/notebooks.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/.doctrees/notebooks.doctree
--------------------------------------------------------------------------------
/_build/.doctrees/environment.pickle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/.doctrees/environment.pickle
--------------------------------------------------------------------------------
/_build/.doctrees/mymarkdownfile.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/.doctrees/mymarkdownfile.doctree
--------------------------------------------------------------------------------
/_build/.doctrees/markdown-notebooks.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/.doctrees/markdown-notebooks.doctree
--------------------------------------------------------------------------------
/_build/html/_static/styles/theme.css:
--------------------------------------------------------------------------------
1 | /* Provided by Sphinx's 'basic' theme, and included in the final set of assets */
2 | @import "../basic.css";
3 |
--------------------------------------------------------------------------------
/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.ttf
--------------------------------------------------------------------------------
/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimishra91/helloworld_book/main/_build/html/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.woff2
--------------------------------------------------------------------------------
/mymarkdownfile.md:
--------------------------------------------------------------------------------
1 | # Here's my sample title
2 |
3 | This is some sample text.
4 |
5 | (section-label)=
6 | ## Here's my first section
7 |
8 | Here is a [reference to the intro](intro.md). Here is a reference to [](section-label).
--------------------------------------------------------------------------------
/_build/html/_sources/mymarkdownfile.md:
--------------------------------------------------------------------------------
1 | # Here's my sample title
2 |
3 | This is some sample text.
4 |
5 | (section-label)=
6 | ## Here's my first section
7 |
8 | Here is a [reference to the intro](intro.md). Here is a reference to [](section-label).
--------------------------------------------------------------------------------
/_toc.yml:
--------------------------------------------------------------------------------
1 | # Table of contents
2 | # Learn more at https://jupyterbook.org/customize/toc.html
3 |
4 | format: jb-book
5 | root: intro
6 | chapters:
7 | - file: markdown
8 | - file: notebooks
9 | - file: markdown-notebooks
10 | - file: mymarkdownfile
11 |
--------------------------------------------------------------------------------
/_build/html/.buildinfo:
--------------------------------------------------------------------------------
1 | # Sphinx build info version 1
2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3 | config: 1cc4948f5784523fccc176c0398ee50a
4 | tags: 645f666f9bcd5a90fca523b33c5a78b7
5 |
--------------------------------------------------------------------------------
/_build/html/_static/scripts/bootstrap.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v5.3.3 (https://getbootstrap.com/)
3 | * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5 | */
6 |
--------------------------------------------------------------------------------
/_build/html/_static/vendor/fontawesome/6.5.2/js/all.min.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | * Copyright 2024 Fonticons, Inc.
5 | */
6 |
--------------------------------------------------------------------------------
/_build/html/_static/check-solid.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/_build/html/_static/play-solid.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_build/html/_static/copy-button.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/_build/html/_static/documentation_options.js:
--------------------------------------------------------------------------------
1 | var DOCUMENTATION_OPTIONS = {
2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3 | VERSION: '',
4 | LANGUAGE: 'en',
5 | COLLAPSE_INDEX: false,
6 | BUILDER: 'html',
7 | FILE_SUFFIX: '.html',
8 | LINK_SUFFIX: '.html',
9 | HAS_SOURCE: true,
10 | SOURCELINK_SUFFIX: '',
11 | NAVIGATION_WITH_KEYS: false,
12 | SHOW_SEARCH_SUMMARY: true,
13 | ENABLE_SEARCH_SHORTCUTS: true,
14 | };
--------------------------------------------------------------------------------
/intro.md:
--------------------------------------------------------------------------------
1 | # Welcome to your Jupyter Book
2 |
3 | This is a small sample book to give you a feel for how book content is
4 | structured.
5 | It shows off a few of the major file types, as well as some sample content.
6 | It does not go in-depth into any particular topic - check out [the Jupyter Book documentation](https://jupyterbook.org) for more information.
7 |
8 | Check out the content pages bundled with this sample book to see more.
9 |
10 | ```{tableofcontents}
11 | ```
12 |
13 | # This is a heading
14 |
15 | This is a `Hello World` Book. It is meant to test the capability of Jupyter Notebook.
16 |
17 |
18 | :::{note}
19 | Here is a note!
20 | :::
21 |
22 | And here is a code block:
23 |
24 | ```
25 | e = mc^2
26 | ```
--------------------------------------------------------------------------------
/_build/html/_sources/intro.md:
--------------------------------------------------------------------------------
1 | # Welcome to your Jupyter Book
2 |
3 | This is a small sample book to give you a feel for how book content is
4 | structured.
5 | It shows off a few of the major file types, as well as some sample content.
6 | It does not go in-depth into any particular topic - check out [the Jupyter Book documentation](https://jupyterbook.org) for more information.
7 |
8 | Check out the content pages bundled with this sample book to see more.
9 |
10 | ```{tableofcontents}
11 | ```
12 |
13 | # This is a heading
14 |
15 | This is a `Hello World` Book. It is meant to test the capability of Jupyter Notebook.
16 |
17 |
18 | :::{note}
19 | Here is a note!
20 | :::
21 |
22 | And here is a code block:
23 |
24 | ```
25 | e = mc^2
26 | ```
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | # Book settings
2 | # Learn more at https://jupyterbook.org/customize/config.html
3 |
4 | title: Hello World
5 | author: Hello World Book !
6 | logo: logo.png
7 |
8 | # Force re-execution of notebooks on each build.
9 | # See https://jupyterbook.org/content/execute.html
10 | execute:
11 | execute_notebooks: force
12 |
13 | # Define the name of the latex output file for PDF builds
14 | latex:
15 | latex_documents:
16 | targetname: book.tex
17 |
18 | # Add a bibtex file so that we can create citations
19 | bibtex_bibfiles:
20 | - references.bib
21 |
22 | # Information about where the book exists on the web
23 | repository:
24 | url: https://github.com/abhimishra91/helloworld_book # Online location of your book
25 | path_to_book: docs # Optional path to your book, relative to the repository root
26 | branch: master # Which branch of the repository should be used when creating links (optional)
27 |
28 | # Add GitHub buttons to your book
29 | # See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
30 | html:
31 | use_issues_button: true
32 | use_repository_button: true
33 |
34 | # Theme for the website
35 | # sphinx:
36 | # config:
37 | # html_theme: quantecon_book_theme
38 |
--------------------------------------------------------------------------------
/markdown-notebooks.md:
--------------------------------------------------------------------------------
1 | ---
2 | jupytext:
3 | formats: md:myst
4 | text_representation:
5 | extension: .md
6 | format_name: myst
7 | format_version: 0.13
8 | jupytext_version: 1.11.5
9 | kernelspec:
10 | display_name: Python 3
11 | language: python
12 | name: python3
13 | ---
14 |
15 | # Notebooks with MyST Markdown
16 |
17 | Jupyter Book also lets you write text-based notebooks using MyST Markdown.
18 | See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions.
19 | This page shows off a notebook written in MyST Markdown.
20 |
21 | ## An example cell
22 |
23 | With MyST Markdown, you can define code cells with a directive like so:
24 |
25 | ```{code-cell}
26 | print(2 + 2)
27 | ```
28 |
29 | When your book is built, the contents of any `{code-cell}` blocks will be
30 | executed with your default Jupyter kernel, and their outputs will be displayed
31 | in-line with the rest of your content.
32 |
33 | ```{seealso}
34 | Jupyter Book uses [Jupytext](https://jupytext.readthedocs.io/en/latest/) to convert text-based files to notebooks, and can support [many other text-based notebook files](https://jupyterbook.org/file-types/jupytext.html).
35 | ```
36 |
37 | ## Create a notebook with MyST Markdown
38 |
39 | MyST Markdown notebooks are defined by two things:
40 |
41 | 1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed).
42 | See the YAML at the top of this page for example.
43 | 2. The presence of `{code-cell}` directives, which will be executed with your book.
44 |
45 | That's all that is needed to get started!
46 |
47 | ## Quickly add YAML metadata for MyST Notebooks
48 |
49 | If you have a markdown file and you'd like to quickly add YAML metadata to it, so that Jupyter Book will treat it as a MyST Markdown Notebook, run the following command:
50 |
51 | ```
52 | jupyter-book myst init path/to/markdownfile.md
53 | ```
54 |
--------------------------------------------------------------------------------
/_build/html/_sources/markdown-notebooks.md:
--------------------------------------------------------------------------------
1 | ---
2 | jupytext:
3 | formats: md:myst
4 | text_representation:
5 | extension: .md
6 | format_name: myst
7 | format_version: 0.13
8 | jupytext_version: 1.11.5
9 | kernelspec:
10 | display_name: Python 3
11 | language: python
12 | name: python3
13 | ---
14 |
15 | # Notebooks with MyST Markdown
16 |
17 | Jupyter Book also lets you write text-based notebooks using MyST Markdown.
18 | See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions.
19 | This page shows off a notebook written in MyST Markdown.
20 |
21 | ## An example cell
22 |
23 | With MyST Markdown, you can define code cells with a directive like so:
24 |
25 | ```{code-cell}
26 | print(2 + 2)
27 | ```
28 |
29 | When your book is built, the contents of any `{code-cell}` blocks will be
30 | executed with your default Jupyter kernel, and their outputs will be displayed
31 | in-line with the rest of your content.
32 |
33 | ```{seealso}
34 | Jupyter Book uses [Jupytext](https://jupytext.readthedocs.io/en/latest/) to convert text-based files to notebooks, and can support [many other text-based notebook files](https://jupyterbook.org/file-types/jupytext.html).
35 | ```
36 |
37 | ## Create a notebook with MyST Markdown
38 |
39 | MyST Markdown notebooks are defined by two things:
40 |
41 | 1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed).
42 | See the YAML at the top of this page for example.
43 | 2. The presence of `{code-cell}` directives, which will be executed with your book.
44 |
45 | That's all that is needed to get started!
46 |
47 | ## Quickly add YAML metadata for MyST Notebooks
48 |
49 | If you have a markdown file and you'd like to quickly add YAML metadata to it, so that Jupyter Book will treat it as a MyST Markdown Notebook, run the following command:
50 |
51 | ```
52 | jupyter-book myst init path/to/markdownfile.md
53 | ```
54 |
--------------------------------------------------------------------------------
/_build/html/_static/webpack-macros.html:
--------------------------------------------------------------------------------
1 |
5 | {# Load FontAwesome icons #}
6 | {% macro head_pre_icons() %}
7 |
8 |
9 |
10 |
11 | {% endmacro %}
12 |
13 | {% macro head_pre_assets() %}
14 |
15 |
16 |
17 |
18 | {% endmacro %}
19 |
20 | {% macro head_js_preload() %}
21 |
22 |
23 |
24 |
25 | {% endmacro %}
26 |
27 | {% macro body_post() %}
28 |
29 |
30 |
31 | {% endmacro %}
--------------------------------------------------------------------------------
/markdown.md:
--------------------------------------------------------------------------------
1 | # Markdown Files
2 |
3 | Whether you write your book's content in Jupyter Notebooks (`.ipynb`) or
4 | in regular markdown files (`.md`), you'll write in the same flavor of markdown
5 | called **MyST Markdown**.
6 | This is a simple file to help you get started and show off some syntax.
7 |
8 | ## What is MyST?
9 |
10 | MyST stands for "Markedly Structured Text". It
11 | is a slight variation on a flavor of markdown called "CommonMark" markdown,
12 | with small syntax extensions to allow you to write **roles** and **directives**
13 | in the Sphinx ecosystem.
14 |
15 | For more about MyST, see [the MyST Markdown Overview](https://jupyterbook.org/content/myst.html).
16 |
17 | ## Sample Roles and Directives
18 |
19 | Roles and directives are two of the most powerful tools in Jupyter Book. They
20 | are like functions, but written in a markup language. They both
21 | serve a similar purpose, but **roles are written in one line**, whereas
22 | **directives span many lines**. They both accept different kinds of inputs,
23 | and what they do with those inputs depends on the specific role or directive
24 | that is being called.
25 |
26 | Here is a "note" directive:
27 |
28 | ```{note}
29 | Here is a note
30 | ```
31 |
32 | It will be rendered in a special box when you build your book.
33 |
34 | Here is an inline directive to refer to a document: {doc}`markdown-notebooks`.
35 |
36 |
37 | ## Citations
38 |
39 | You can also cite references that are stored in a `bibtex` file. For example,
40 | the following syntax: `` {cite}`holdgraf_evidence_2014` `` will render like
41 | this: {cite}`holdgraf_evidence_2014`.
42 |
43 | Moreover, you can insert a bibliography into your page with this syntax:
44 | The `{bibliography}` directive must be used for all the `{cite}` roles to
45 | render properly.
46 | For example, if the references for your book are stored in `references.bib`,
47 | then the bibliography is inserted with:
48 |
49 | ```{bibliography}
50 | ```
51 |
52 | ## Learn more
53 |
54 | This is just a simple starter to get you started.
55 | You can learn a lot more at [jupyterbook.org](https://jupyterbook.org).
56 |
--------------------------------------------------------------------------------
/_build/html/_sources/markdown.md:
--------------------------------------------------------------------------------
1 | # Markdown Files
2 |
3 | Whether you write your book's content in Jupyter Notebooks (`.ipynb`) or
4 | in regular markdown files (`.md`), you'll write in the same flavor of markdown
5 | called **MyST Markdown**.
6 | This is a simple file to help you get started and show off some syntax.
7 |
8 | ## What is MyST?
9 |
10 | MyST stands for "Markedly Structured Text". It
11 | is a slight variation on a flavor of markdown called "CommonMark" markdown,
12 | with small syntax extensions to allow you to write **roles** and **directives**
13 | in the Sphinx ecosystem.
14 |
15 | For more about MyST, see [the MyST Markdown Overview](https://jupyterbook.org/content/myst.html).
16 |
17 | ## Sample Roles and Directives
18 |
19 | Roles and directives are two of the most powerful tools in Jupyter Book. They
20 | are like functions, but written in a markup language. They both
21 | serve a similar purpose, but **roles are written in one line**, whereas
22 | **directives span many lines**. They both accept different kinds of inputs,
23 | and what they do with those inputs depends on the specific role or directive
24 | that is being called.
25 |
26 | Here is a "note" directive:
27 |
28 | ```{note}
29 | Here is a note
30 | ```
31 |
32 | It will be rendered in a special box when you build your book.
33 |
34 | Here is an inline directive to refer to a document: {doc}`markdown-notebooks`.
35 |
36 |
37 | ## Citations
38 |
39 | You can also cite references that are stored in a `bibtex` file. For example,
40 | the following syntax: `` {cite}`holdgraf_evidence_2014` `` will render like
41 | this: {cite}`holdgraf_evidence_2014`.
42 |
43 | Moreover, you can insert a bibliography into your page with this syntax:
44 | The `{bibliography}` directive must be used for all the `{cite}` roles to
45 | render properly.
46 | For example, if the references for your book are stored in `references.bib`,
47 | then the bibliography is inserted with:
48 |
49 | ```{bibliography}
50 | ```
51 |
52 | ## Learn more
53 |
54 | This is just a simple starter to get you started.
55 | You can learn a lot more at [jupyterbook.org](https://jupyterbook.org).
56 |
--------------------------------------------------------------------------------
/_build/html/reports/notebooks.err.log:
--------------------------------------------------------------------------------
1 | Traceback (most recent call last):
2 | File "C:\Users\abhis\anaconda3\envs\app\lib\site-packages\jupyter_cache\executors\utils.py", line 58, in single_nb_execution
3 | executenb(
4 | File "C:\Users\abhis\anaconda3\envs\app\lib\site-packages\nbclient\client.py", line 1314, in execute
5 | return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute()
6 | File "C:\Users\abhis\anaconda3\envs\app\lib\site-packages\jupyter_core\utils\__init__.py", line 165, in wrapped
7 | return loop.run_until_complete(inner)
8 | File "C:\Users\abhis\anaconda3\envs\app\lib\asyncio\base_events.py", line 646, in run_until_complete
9 | return future.result()
10 | File "C:\Users\abhis\anaconda3\envs\app\lib\site-packages\nbclient\client.py", line 709, in async_execute
11 | await self.async_execute_cell(
12 | File "C:\Users\abhis\anaconda3\envs\app\lib\site-packages\nbclient\client.py", line 1062, in async_execute_cell
13 | await self._check_raise_for_error(cell, cell_index, exec_reply)
14 | File "C:\Users\abhis\anaconda3\envs\app\lib\site-packages\nbclient\client.py", line 918, in _check_raise_for_error
15 | raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
16 | nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
17 | ------------------
18 | from matplotlib import rcParams, cycler
19 | import matplotlib.pyplot as plt
20 | import numpy as np
21 | plt.ion()
22 | ------------------
23 |
24 |
25 | [1;31m---------------------------------------------------------------------------[0m
26 | [1;31mModuleNotFoundError[0m Traceback (most recent call last)
27 | Cell [1;32mIn[1], line 1[0m
28 | [1;32m----> 1[0m [38;5;28;01mfrom[39;00m [38;5;21;01mmatplotlib[39;00m [38;5;28;01mimport[39;00m rcParams, cycler
29 | [0;32m 2[0m [38;5;28;01mimport[39;00m [38;5;21;01mmatplotlib[39;00m[38;5;21;01m.[39;00m[38;5;21;01mpyplot[39;00m [38;5;28;01mas[39;00m [38;5;21;01mplt[39;00m
30 | [0;32m 3[0m [38;5;28;01mimport[39;00m [38;5;21;01mnumpy[39;00m [38;5;28;01mas[39;00m [38;5;21;01mnp[39;00m
31 |
32 | [1;31mModuleNotFoundError[0m: No module named 'matplotlib'
33 |
34 |
--------------------------------------------------------------------------------
/_build/html/_static/copybutton.css:
--------------------------------------------------------------------------------
1 | /* Copy buttons */
2 | button.copybtn {
3 | position: absolute;
4 | display: flex;
5 | top: .3em;
6 | right: .3em;
7 | width: 1.7em;
8 | height: 1.7em;
9 | opacity: 0;
10 | transition: opacity 0.3s, border .3s, background-color .3s;
11 | user-select: none;
12 | padding: 0;
13 | border: none;
14 | outline: none;
15 | border-radius: 0.4em;
16 | /* The colors that GitHub uses */
17 | border: #1b1f2426 1px solid;
18 | background-color: #f6f8fa;
19 | color: #57606a;
20 | }
21 |
22 | button.copybtn.success {
23 | border-color: #22863a;
24 | color: #22863a;
25 | }
26 |
27 | button.copybtn svg {
28 | stroke: currentColor;
29 | width: 1.5em;
30 | height: 1.5em;
31 | padding: 0.1em;
32 | }
33 |
34 | div.highlight {
35 | position: relative;
36 | }
37 |
38 | /* Show the copybutton */
39 | .highlight:hover button.copybtn, button.copybtn.success {
40 | opacity: 1;
41 | }
42 |
43 | .highlight button.copybtn:hover {
44 | background-color: rgb(235, 235, 235);
45 | }
46 |
47 | .highlight button.copybtn:active {
48 | background-color: rgb(187, 187, 187);
49 | }
50 |
51 | /**
52 | * A minimal CSS-only tooltip copied from:
53 | * https://codepen.io/mildrenben/pen/rVBrpK
54 | *
55 | * To use, write HTML like the following:
56 | *
57 | *
Short
58 | */
59 | .o-tooltip--left {
60 | position: relative;
61 | }
62 |
63 | .o-tooltip--left:after {
64 | opacity: 0;
65 | visibility: hidden;
66 | position: absolute;
67 | content: attr(data-tooltip);
68 | padding: .2em;
69 | font-size: .8em;
70 | left: -.2em;
71 | background: grey;
72 | color: white;
73 | white-space: nowrap;
74 | z-index: 2;
75 | border-radius: 2px;
76 | transform: translateX(-102%) translateY(0);
77 | transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
78 | }
79 |
80 | .o-tooltip--left:hover:after {
81 | display: block;
82 | opacity: 1;
83 | visibility: visible;
84 | transform: translateX(-100%) translateY(0);
85 | transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
86 | transition-delay: .5s;
87 | }
88 |
89 | /* By default the copy button shouldn't show up when printing a page */
90 | @media print {
91 | button.copybtn {
92 | display: none;
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/_build/html/_static/sphinx-thebe.css:
--------------------------------------------------------------------------------
1 | /* Thebelab Buttons */
2 | .thebelab-button {
3 | z-index: 999;
4 | display: inline-block;
5 | padding: 0.35em 1.2em;
6 | margin: 0px 1px;
7 | border-radius: 0.12em;
8 | box-sizing: border-box;
9 | text-decoration: none;
10 | font-family: "Roboto", sans-serif;
11 | font-weight: 300;
12 | text-align: center;
13 | transition: all 0.2s;
14 | background-color: #dddddd;
15 | border: 0.05em solid white;
16 | color: #000000;
17 | }
18 |
19 | .thebelab-button:hover {
20 | border: 0.05em solid black;
21 | background-color: #fcfcfc;
22 | }
23 |
24 | .thebe-launch-button {
25 | height: 2.2em;
26 | font-size: 0.8em;
27 | border: 1px black solid;
28 | }
29 |
30 | /* Thebelab Cell */
31 | .thebelab-cell pre {
32 | background: none;
33 | }
34 |
35 | .thebelab-cell .thebelab-input {
36 | padding-left: 1em;
37 | margin-bottom: 0.5em;
38 | margin-top: 0.5em;
39 | }
40 |
41 | .thebelab-cell .jp-OutputArea {
42 | margin-top: 0.5em;
43 | margin-left: 1em;
44 | }
45 |
46 | button.thebelab-button.thebelab-run-button {
47 | margin-left: 1.5em;
48 | margin-bottom: 0.5em;
49 | }
50 |
51 | /* Loading button */
52 | button.thebe-launch-button div.spinner {
53 | float: left;
54 | margin-right: 1em;
55 | }
56 |
57 | /* Remove the spinner when thebelab is ready */
58 | .thebe-launch-button.thebe-status-ready .spinner {
59 | display: none;
60 | }
61 |
62 | .thebe-launch-button span.status {
63 | font-family: monospace;
64 | font-weight: bold;
65 | }
66 |
67 | .thebe-launch-button.thebe-status-ready span.status {
68 | color: green;
69 | }
70 |
71 | .spinner {
72 | height: 2em;
73 | text-align: center;
74 | font-size: 0.7em;
75 | }
76 |
77 | .spinner > div {
78 | background-color: #f37726;
79 | height: 100%;
80 | width: 6px;
81 | display: inline-block;
82 |
83 | -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
84 | animation: sk-stretchdelay 1.2s infinite ease-in-out;
85 | }
86 |
87 | .spinner .rect2 {
88 | -webkit-animation-delay: -1.1s;
89 | animation-delay: -1.1s;
90 | }
91 |
92 | .spinner .rect3 {
93 | -webkit-animation-delay: -1s;
94 | animation-delay: -1s;
95 | }
96 |
97 | .spinner .rect4 {
98 | -webkit-animation-delay: -0.9s;
99 | animation-delay: -0.9s;
100 | }
101 |
102 | .spinner .rect5 {
103 | -webkit-animation-delay: -0.8s;
104 | animation-delay: -0.8s;
105 | }
106 |
107 | @-webkit-keyframes sk-stretchdelay {
108 | 0%,
109 | 40%,
110 | 100% {
111 | -webkit-transform: scaleY(0.4);
112 | }
113 | 20% {
114 | -webkit-transform: scaleY(1);
115 | }
116 | }
117 |
118 | @keyframes sk-stretchdelay {
119 | 0%,
120 | 40%,
121 | 100% {
122 | transform: scaleY(0.4);
123 | -webkit-transform: scaleY(0.4);
124 | }
125 | 20% {
126 | transform: scaleY(1);
127 | -webkit-transform: scaleY(1);
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/_build/html/_static/copybutton_funcs.js:
--------------------------------------------------------------------------------
1 | function escapeRegExp(string) {
2 | return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
3 | }
4 |
5 | /**
6 | * Removes excluded text from a Node.
7 | *
8 | * @param {Node} target Node to filter.
9 | * @param {string} exclude CSS selector of nodes to exclude.
10 | * @returns {DOMString} Text from `target` with text removed.
11 | */
12 | export function filterText(target, exclude) {
13 | const clone = target.cloneNode(true); // clone as to not modify the live DOM
14 | if (exclude) {
15 | // remove excluded nodes
16 | clone.querySelectorAll(exclude).forEach(node => node.remove());
17 | }
18 | return clone.innerText;
19 | }
20 |
21 | // Callback when a copy button is clicked. Will be passed the node that was clicked
22 | // should then grab the text and replace pieces of text that shouldn't be used in output
23 | export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {
24 | var regexp;
25 | var match;
26 |
27 | // Do we check for line continuation characters and "HERE-documents"?
28 | var useLineCont = !!lineContinuationChar
29 | var useHereDoc = !!hereDocDelim
30 |
31 | // create regexp to capture prompt and remaining line
32 | if (isRegexp) {
33 | regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)')
34 | } else {
35 | regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)')
36 | }
37 |
38 | const outputLines = [];
39 | var promptFound = false;
40 | var gotLineCont = false;
41 | var gotHereDoc = false;
42 | const lineGotPrompt = [];
43 | for (const line of textContent.split('\n')) {
44 | match = line.match(regexp)
45 | if (match || gotLineCont || gotHereDoc) {
46 | promptFound = regexp.test(line)
47 | lineGotPrompt.push(promptFound)
48 | if (removePrompts && promptFound) {
49 | outputLines.push(match[2])
50 | } else {
51 | outputLines.push(line)
52 | }
53 | gotLineCont = line.endsWith(lineContinuationChar) & useLineCont
54 | if (line.includes(hereDocDelim) & useHereDoc)
55 | gotHereDoc = !gotHereDoc
56 | } else if (!onlyCopyPromptLines) {
57 | outputLines.push(line)
58 | } else if (copyEmptyLines && line.trim() === '') {
59 | outputLines.push(line)
60 | }
61 | }
62 |
63 | // If no lines with the prompt were found then just use original lines
64 | if (lineGotPrompt.some(v => v === true)) {
65 | textContent = outputLines.join('\n');
66 | }
67 |
68 | // Remove a trailing newline to avoid auto-running when pasting
69 | if (textContent.endsWith("\n")) {
70 | textContent = textContent.slice(0, -1)
71 | }
72 | return textContent
73 | }
74 |
--------------------------------------------------------------------------------
/_build/html/_static/design-tabs.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | // Extra JS capability for selected tabs to be synced
4 | // The selection is stored in local storage so that it persists across page loads.
5 |
6 | /**
7 | * @type {Record}
8 | */
9 | let sd_id_to_elements = {};
10 | const storageKeyPrefix = "sphinx-design-tab-id-";
11 |
12 | /**
13 | * Create a key for a tab element.
14 | * @param {HTMLElement} el - The tab element.
15 | * @returns {[string, string, string] | null} - The key.
16 | *
17 | */
18 | function create_key(el) {
19 | let syncId = el.getAttribute("data-sync-id");
20 | let syncGroup = el.getAttribute("data-sync-group");
21 | if (!syncId || !syncGroup) return null;
22 | return [syncGroup, syncId, syncGroup + "--" + syncId];
23 | }
24 |
25 | /**
26 | * Initialize the tab selection.
27 | *
28 | */
29 | function ready() {
30 | // Find all tabs with sync data
31 |
32 | /** @type {string[]} */
33 | let groups = [];
34 |
35 | document.querySelectorAll(".sd-tab-label").forEach((label) => {
36 | if (label instanceof HTMLElement) {
37 | let data = create_key(label);
38 | if (data) {
39 | let [group, id, key] = data;
40 |
41 | // add click event listener
42 | // @ts-ignore
43 | label.onclick = onSDLabelClick;
44 |
45 | // store map of key to elements
46 | if (!sd_id_to_elements[key]) {
47 | sd_id_to_elements[key] = [];
48 | }
49 | sd_id_to_elements[key].push(label);
50 |
51 | if (groups.indexOf(group) === -1) {
52 | groups.push(group);
53 | // Check if a specific tab has been selected via URL parameter
54 | const tabParam = new URLSearchParams(window.location.search).get(
55 | group
56 | );
57 | if (tabParam) {
58 | console.log(
59 | "sphinx-design: Selecting tab id for group '" +
60 | group +
61 | "' from URL parameter: " +
62 | tabParam
63 | );
64 | window.sessionStorage.setItem(storageKeyPrefix + group, tabParam);
65 | }
66 | }
67 |
68 | // Check is a specific tab has been selected previously
69 | let previousId = window.sessionStorage.getItem(
70 | storageKeyPrefix + group
71 | );
72 | if (previousId === id) {
73 | // console.log(
74 | // "sphinx-design: Selecting tab from session storage: " + id
75 | // );
76 | // @ts-ignore
77 | label.previousElementSibling.checked = true;
78 | }
79 | }
80 | }
81 | });
82 | }
83 |
84 | /**
85 | * Activate other tabs with the same sync id.
86 | *
87 | * @this {HTMLElement} - The element that was clicked.
88 | */
89 | function onSDLabelClick() {
90 | let data = create_key(this);
91 | if (!data) return;
92 | let [group, id, key] = data;
93 | for (const label of sd_id_to_elements[key]) {
94 | if (label === this) continue;
95 | // @ts-ignore
96 | label.previousElementSibling.checked = true;
97 | }
98 | window.sessionStorage.setItem(storageKeyPrefix + group, id);
99 | }
100 |
101 | document.addEventListener("DOMContentLoaded", ready, false);
102 |
--------------------------------------------------------------------------------
/_build/html/_sphinx_design_static/design-tabs.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | // Extra JS capability for selected tabs to be synced
4 | // The selection is stored in local storage so that it persists across page loads.
5 |
6 | /**
7 | * @type {Record}
8 | */
9 | let sd_id_to_elements = {};
10 | const storageKeyPrefix = "sphinx-design-tab-id-";
11 |
12 | /**
13 | * Create a key for a tab element.
14 | * @param {HTMLElement} el - The tab element.
15 | * @returns {[string, string, string] | null} - The key.
16 | *
17 | */
18 | function create_key(el) {
19 | let syncId = el.getAttribute("data-sync-id");
20 | let syncGroup = el.getAttribute("data-sync-group");
21 | if (!syncId || !syncGroup) return null;
22 | return [syncGroup, syncId, syncGroup + "--" + syncId];
23 | }
24 |
25 | /**
26 | * Initialize the tab selection.
27 | *
28 | */
29 | function ready() {
30 | // Find all tabs with sync data
31 |
32 | /** @type {string[]} */
33 | let groups = [];
34 |
35 | document.querySelectorAll(".sd-tab-label").forEach((label) => {
36 | if (label instanceof HTMLElement) {
37 | let data = create_key(label);
38 | if (data) {
39 | let [group, id, key] = data;
40 |
41 | // add click event listener
42 | // @ts-ignore
43 | label.onclick = onSDLabelClick;
44 |
45 | // store map of key to elements
46 | if (!sd_id_to_elements[key]) {
47 | sd_id_to_elements[key] = [];
48 | }
49 | sd_id_to_elements[key].push(label);
50 |
51 | if (groups.indexOf(group) === -1) {
52 | groups.push(group);
53 | // Check if a specific tab has been selected via URL parameter
54 | const tabParam = new URLSearchParams(window.location.search).get(
55 | group
56 | );
57 | if (tabParam) {
58 | console.log(
59 | "sphinx-design: Selecting tab id for group '" +
60 | group +
61 | "' from URL parameter: " +
62 | tabParam
63 | );
64 | window.sessionStorage.setItem(storageKeyPrefix + group, tabParam);
65 | }
66 | }
67 |
68 | // Check is a specific tab has been selected previously
69 | let previousId = window.sessionStorage.getItem(
70 | storageKeyPrefix + group
71 | );
72 | if (previousId === id) {
73 | // console.log(
74 | // "sphinx-design: Selecting tab from session storage: " + id
75 | // );
76 | // @ts-ignore
77 | label.previousElementSibling.checked = true;
78 | }
79 | }
80 | }
81 | });
82 | }
83 |
84 | /**
85 | * Activate other tabs with the same sync id.
86 | *
87 | * @this {HTMLElement} - The element that was clicked.
88 | */
89 | function onSDLabelClick() {
90 | let data = create_key(this);
91 | if (!data) return;
92 | let [group, id, key] = data;
93 | for (const label of sd_id_to_elements[key]) {
94 | if (label === this) continue;
95 | // @ts-ignore
96 | label.previousElementSibling.checked = true;
97 | }
98 | window.sessionStorage.setItem(storageKeyPrefix + group, id);
99 | }
100 |
101 | document.addEventListener("DOMContentLoaded", ready, false);
102 |
--------------------------------------------------------------------------------
/_build/html/_sources/markdown-notebooks.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "id": "c5195d0b",
6 | "metadata": {},
7 | "source": [
8 | "# Notebooks with MyST Markdown\n",
9 | "\n",
10 | "Jupyter Book also lets you write text-based notebooks using MyST Markdown.\n",
11 | "See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions.\n",
12 | "This page shows off a notebook written in MyST Markdown.\n",
13 | "\n",
14 | "## An example cell\n",
15 | "\n",
16 | "With MyST Markdown, you can define code cells with a directive like so:"
17 | ]
18 | },
19 | {
20 | "cell_type": "code",
21 | "execution_count": 1,
22 | "id": "c5072892",
23 | "metadata": {},
24 | "outputs": [
25 | {
26 | "name": "stdout",
27 | "output_type": "stream",
28 | "text": [
29 | "4\n"
30 | ]
31 | }
32 | ],
33 | "source": [
34 | "print(2 + 2)"
35 | ]
36 | },
37 | {
38 | "cell_type": "markdown",
39 | "id": "7dad3340",
40 | "metadata": {},
41 | "source": [
42 | "When your book is built, the contents of any `{code-cell}` blocks will be\n",
43 | "executed with your default Jupyter kernel, and their outputs will be displayed\n",
44 | "in-line with the rest of your content.\n",
45 | "\n",
46 | "```{seealso}\n",
47 | "Jupyter Book uses [Jupytext](https://jupytext.readthedocs.io/en/latest/) to convert text-based files to notebooks, and can support [many other text-based notebook files](https://jupyterbook.org/file-types/jupytext.html).\n",
48 | "```\n",
49 | "\n",
50 | "## Create a notebook with MyST Markdown\n",
51 | "\n",
52 | "MyST Markdown notebooks are defined by two things:\n",
53 | "\n",
54 | "1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed).\n",
55 | " See the YAML at the top of this page for example.\n",
56 | "2. The presence of `{code-cell}` directives, which will be executed with your book.\n",
57 | "\n",
58 | "That's all that is needed to get started!\n",
59 | "\n",
60 | "## Quickly add YAML metadata for MyST Notebooks\n",
61 | "\n",
62 | "If you have a markdown file and you'd like to quickly add YAML metadata to it, so that Jupyter Book will treat it as a MyST Markdown Notebook, run the following command:\n",
63 | "\n",
64 | "```\n",
65 | "jupyter-book myst init path/to/markdownfile.md\n",
66 | "```"
67 | ]
68 | }
69 | ],
70 | "metadata": {
71 | "jupytext": {
72 | "formats": "md:myst",
73 | "text_representation": {
74 | "extension": ".md",
75 | "format_name": "myst",
76 | "format_version": 0.13,
77 | "jupytext_version": "1.11.5"
78 | }
79 | },
80 | "kernelspec": {
81 | "display_name": "Python 3",
82 | "language": "python",
83 | "name": "python3"
84 | },
85 | "language_info": {
86 | "codemirror_mode": {
87 | "name": "ipython",
88 | "version": 3
89 | },
90 | "file_extension": ".py",
91 | "mimetype": "text/x-python",
92 | "name": "python",
93 | "nbconvert_exporter": "python",
94 | "pygments_lexer": "ipython3",
95 | "version": "3.10.6"
96 | },
97 | "source_map": [
98 | 13,
99 | 25,
100 | 27
101 | ]
102 | },
103 | "nbformat": 4,
104 | "nbformat_minor": 5
105 | }
--------------------------------------------------------------------------------
/_build/jupyter_execute/markdown-notebooks.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "id": "c5195d0b",
6 | "metadata": {},
7 | "source": [
8 | "# Notebooks with MyST Markdown\n",
9 | "\n",
10 | "Jupyter Book also lets you write text-based notebooks using MyST Markdown.\n",
11 | "See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions.\n",
12 | "This page shows off a notebook written in MyST Markdown.\n",
13 | "\n",
14 | "## An example cell\n",
15 | "\n",
16 | "With MyST Markdown, you can define code cells with a directive like so:"
17 | ]
18 | },
19 | {
20 | "cell_type": "code",
21 | "execution_count": 1,
22 | "id": "c5072892",
23 | "metadata": {},
24 | "outputs": [
25 | {
26 | "name": "stdout",
27 | "output_type": "stream",
28 | "text": [
29 | "4\n"
30 | ]
31 | }
32 | ],
33 | "source": [
34 | "print(2 + 2)"
35 | ]
36 | },
37 | {
38 | "cell_type": "markdown",
39 | "id": "7dad3340",
40 | "metadata": {},
41 | "source": [
42 | "When your book is built, the contents of any `{code-cell}` blocks will be\n",
43 | "executed with your default Jupyter kernel, and their outputs will be displayed\n",
44 | "in-line with the rest of your content.\n",
45 | "\n",
46 | "```{seealso}\n",
47 | "Jupyter Book uses [Jupytext](https://jupytext.readthedocs.io/en/latest/) to convert text-based files to notebooks, and can support [many other text-based notebook files](https://jupyterbook.org/file-types/jupytext.html).\n",
48 | "```\n",
49 | "\n",
50 | "## Create a notebook with MyST Markdown\n",
51 | "\n",
52 | "MyST Markdown notebooks are defined by two things:\n",
53 | "\n",
54 | "1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed).\n",
55 | " See the YAML at the top of this page for example.\n",
56 | "2. The presence of `{code-cell}` directives, which will be executed with your book.\n",
57 | "\n",
58 | "That's all that is needed to get started!\n",
59 | "\n",
60 | "## Quickly add YAML metadata for MyST Notebooks\n",
61 | "\n",
62 | "If you have a markdown file and you'd like to quickly add YAML metadata to it, so that Jupyter Book will treat it as a MyST Markdown Notebook, run the following command:\n",
63 | "\n",
64 | "```\n",
65 | "jupyter-book myst init path/to/markdownfile.md\n",
66 | "```"
67 | ]
68 | }
69 | ],
70 | "metadata": {
71 | "jupytext": {
72 | "formats": "md:myst",
73 | "text_representation": {
74 | "extension": ".md",
75 | "format_name": "myst",
76 | "format_version": 0.13,
77 | "jupytext_version": "1.11.5"
78 | }
79 | },
80 | "kernelspec": {
81 | "display_name": "Python 3",
82 | "language": "python",
83 | "name": "python3"
84 | },
85 | "language_info": {
86 | "codemirror_mode": {
87 | "name": "ipython",
88 | "version": 3
89 | },
90 | "file_extension": ".py",
91 | "mimetype": "text/x-python",
92 | "name": "python",
93 | "nbconvert_exporter": "python",
94 | "pygments_lexer": "ipython3",
95 | "version": "3.10.6"
96 | },
97 | "source_map": [
98 | 13,
99 | 25,
100 | 27
101 | ]
102 | },
103 | "nbformat": 4,
104 | "nbformat_minor": 5
105 | }
--------------------------------------------------------------------------------
/notebooks.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Content with notebooks\n",
8 | "\n",
9 | "You can also create content with Jupyter Notebooks. This means that you can include\n",
10 | "code blocks and their outputs in your book.\n",
11 | "\n",
12 | "## Markdown + notebooks\n",
13 | "\n",
14 | "As it is markdown, you can embed images, HTML, etc into your posts!\n",
15 | "\n",
16 | "\n",
17 | "\n",
18 | "You can also $add_{math}$ and\n",
19 | "\n",
20 | "$$\n",
21 | "math^{blocks}\n",
22 | "$$\n",
23 | "\n",
24 | "or\n",
25 | "\n",
26 | "$$\n",
27 | "\\begin{aligned}\n",
28 | "\\mbox{mean} la_{tex} \\\\ \\\\\n",
29 | "math blocks\n",
30 | "\\end{aligned}\n",
31 | "$$\n",
32 | "\n",
33 | "But make sure you \\$Escape \\$your \\$dollar signs \\$you want to keep!\n",
34 | "\n",
35 | "## MyST markdown\n",
36 | "\n",
37 | "MyST markdown works in Jupyter Notebooks as well. For more information about MyST markdown, check\n",
38 | "out [the MyST guide in Jupyter Book](https://jupyterbook.org/content/myst.html),\n",
39 | "or see [the MyST markdown documentation](https://myst-parser.readthedocs.io/en/latest/).\n",
40 | "\n",
41 | "## Code blocks and outputs\n",
42 | "\n",
43 | "Jupyter Book will also embed your code blocks and output in your book.\n",
44 | "For example, here's some sample Matplotlib code:"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": null,
50 | "metadata": {},
51 | "outputs": [],
52 | "source": [
53 | "from matplotlib import rcParams, cycler\n",
54 | "import matplotlib.pyplot as plt\n",
55 | "import numpy as np\n",
56 | "plt.ion()"
57 | ]
58 | },
59 | {
60 | "cell_type": "code",
61 | "execution_count": null,
62 | "metadata": {},
63 | "outputs": [],
64 | "source": [
65 | "# Fixing random state for reproducibility\n",
66 | "np.random.seed(19680801)\n",
67 | "\n",
68 | "N = 10\n",
69 | "data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)]\n",
70 | "data = np.array(data).T\n",
71 | "cmap = plt.cm.coolwarm\n",
72 | "rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N)))\n",
73 | "\n",
74 | "\n",
75 | "from matplotlib.lines import Line2D\n",
76 | "custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4),\n",
77 | " Line2D([0], [0], color=cmap(.5), lw=4),\n",
78 | " Line2D([0], [0], color=cmap(1.), lw=4)]\n",
79 | "\n",
80 | "fig, ax = plt.subplots(figsize=(10, 5))\n",
81 | "lines = ax.plot(data)\n",
82 | "ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']);"
83 | ]
84 | },
85 | {
86 | "cell_type": "markdown",
87 | "metadata": {},
88 | "source": [
89 | "There is a lot more that you can do with outputs (such as including interactive outputs)\n",
90 | "with your book. For more information about this, see [the Jupyter Book documentation](https://jupyterbook.org)"
91 | ]
92 | }
93 | ],
94 | "metadata": {
95 | "kernelspec": {
96 | "display_name": "Python 3",
97 | "language": "python",
98 | "name": "python3"
99 | },
100 | "language_info": {
101 | "codemirror_mode": {
102 | "name": "ipython",
103 | "version": 3
104 | },
105 | "file_extension": ".py",
106 | "mimetype": "text/x-python",
107 | "name": "python",
108 | "nbconvert_exporter": "python",
109 | "pygments_lexer": "ipython3",
110 | "version": "3.8.0"
111 | },
112 | "widgets": {
113 | "application/vnd.jupyter.widget-state+json": {
114 | "state": {},
115 | "version_major": 2,
116 | "version_minor": 0
117 | }
118 | }
119 | },
120 | "nbformat": 4,
121 | "nbformat_minor": 4
122 | }
123 |
--------------------------------------------------------------------------------
/_build/html/_sources/notebooks.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Content with notebooks\n",
8 | "\n",
9 | "You can also create content with Jupyter Notebooks. This means that you can include\n",
10 | "code blocks and their outputs in your book.\n",
11 | "\n",
12 | "## Markdown + notebooks\n",
13 | "\n",
14 | "As it is markdown, you can embed images, HTML, etc into your posts!\n",
15 | "\n",
16 | "\n",
17 | "\n",
18 | "You can also $add_{math}$ and\n",
19 | "\n",
20 | "$$\n",
21 | "math^{blocks}\n",
22 | "$$\n",
23 | "\n",
24 | "or\n",
25 | "\n",
26 | "$$\n",
27 | "\\begin{aligned}\n",
28 | "\\mbox{mean} la_{tex} \\\\ \\\\\n",
29 | "math blocks\n",
30 | "\\end{aligned}\n",
31 | "$$\n",
32 | "\n",
33 | "But make sure you \\$Escape \\$your \\$dollar signs \\$you want to keep!\n",
34 | "\n",
35 | "## MyST markdown\n",
36 | "\n",
37 | "MyST markdown works in Jupyter Notebooks as well. For more information about MyST markdown, check\n",
38 | "out [the MyST guide in Jupyter Book](https://jupyterbook.org/content/myst.html),\n",
39 | "or see [the MyST markdown documentation](https://myst-parser.readthedocs.io/en/latest/).\n",
40 | "\n",
41 | "## Code blocks and outputs\n",
42 | "\n",
43 | "Jupyter Book will also embed your code blocks and output in your book.\n",
44 | "For example, here's some sample Matplotlib code:"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": null,
50 | "metadata": {},
51 | "outputs": [],
52 | "source": [
53 | "from matplotlib import rcParams, cycler\n",
54 | "import matplotlib.pyplot as plt\n",
55 | "import numpy as np\n",
56 | "plt.ion()"
57 | ]
58 | },
59 | {
60 | "cell_type": "code",
61 | "execution_count": null,
62 | "metadata": {},
63 | "outputs": [],
64 | "source": [
65 | "# Fixing random state for reproducibility\n",
66 | "np.random.seed(19680801)\n",
67 | "\n",
68 | "N = 10\n",
69 | "data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)]\n",
70 | "data = np.array(data).T\n",
71 | "cmap = plt.cm.coolwarm\n",
72 | "rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N)))\n",
73 | "\n",
74 | "\n",
75 | "from matplotlib.lines import Line2D\n",
76 | "custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4),\n",
77 | " Line2D([0], [0], color=cmap(.5), lw=4),\n",
78 | " Line2D([0], [0], color=cmap(1.), lw=4)]\n",
79 | "\n",
80 | "fig, ax = plt.subplots(figsize=(10, 5))\n",
81 | "lines = ax.plot(data)\n",
82 | "ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']);"
83 | ]
84 | },
85 | {
86 | "cell_type": "markdown",
87 | "metadata": {},
88 | "source": [
89 | "There is a lot more that you can do with outputs (such as including interactive outputs)\n",
90 | "with your book. For more information about this, see [the Jupyter Book documentation](https://jupyterbook.org)"
91 | ]
92 | }
93 | ],
94 | "metadata": {
95 | "kernelspec": {
96 | "display_name": "Python 3",
97 | "language": "python",
98 | "name": "python3"
99 | },
100 | "language_info": {
101 | "codemirror_mode": {
102 | "name": "ipython",
103 | "version": 3
104 | },
105 | "file_extension": ".py",
106 | "mimetype": "text/x-python",
107 | "name": "python",
108 | "nbconvert_exporter": "python",
109 | "pygments_lexer": "ipython3",
110 | "version": "3.8.0"
111 | },
112 | "widgets": {
113 | "application/vnd.jupyter.widget-state+json": {
114 | "state": {},
115 | "version_major": 2,
116 | "version_minor": 0
117 | }
118 | }
119 | },
120 | "nbformat": 4,
121 | "nbformat_minor": 4
122 | }
123 |
--------------------------------------------------------------------------------
/_build/html/_static/togglebutton.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Admonition-based toggles
3 | */
4 |
5 | /* Visibility of the target */
6 | .admonition.toggle .admonition-title ~ * {
7 | transition: opacity .3s, height .3s;
8 | }
9 |
10 | /* Toggle buttons inside admonitions so we see the title */
11 | .admonition.toggle {
12 | position: relative;
13 | }
14 |
15 | /* Titles should cut off earlier to avoid overlapping w/ button */
16 | .admonition.toggle .admonition-title {
17 | padding-right: 25%;
18 | cursor: pointer;
19 | }
20 |
21 | /* Hovering will cause a slight shift in color to make it feel interactive */
22 | .admonition.toggle .admonition-title:hover {
23 | box-shadow: inset 0 0 0px 20px rgb(0 0 0 / 1%);
24 | }
25 |
26 | /* Hovering will cause a slight shift in color to make it feel interactive */
27 | .admonition.toggle .admonition-title:active {
28 | box-shadow: inset 0 0 0px 20px rgb(0 0 0 / 3%);
29 | }
30 |
31 | /* Remove extra whitespace below the admonition title when hidden */
32 | .admonition.toggle-hidden {
33 | padding-bottom: 0;
34 | }
35 |
36 | .admonition.toggle-hidden .admonition-title {
37 | margin-bottom: 0;
38 | }
39 |
40 | /* hides all the content of a page until de-toggled */
41 | .admonition.toggle-hidden .admonition-title ~ * {
42 | height: 0;
43 | margin: 0;
44 | opacity: 0;
45 | visibility: hidden;
46 | }
47 |
48 | /* General button style and position*/
49 | button.toggle-button {
50 | /**
51 | * Background and shape. By default there's no background
52 | * but users can style as they wish
53 | */
54 | background: none;
55 | border: none;
56 | outline: none;
57 |
58 | /* Positioning just inside the admonition title */
59 | position: absolute;
60 | right: 0.5em;
61 | padding: 0px;
62 | border: none;
63 | outline: none;
64 | }
65 |
66 | /* Display the toggle hint on wide screens */
67 | @media (min-width: 768px) {
68 | button.toggle-button.toggle-button-hidden:before {
69 | content: attr(data-toggle-hint); /* This will be filled in by JS */
70 | font-size: .8em;
71 | align-self: center;
72 | }
73 | }
74 |
75 | /* Icon behavior */
76 | .tb-icon {
77 | transition: transform .2s ease-out;
78 | height: 1.5em;
79 | width: 1.5em;
80 | stroke: currentColor; /* So that we inherit the color of other text */
81 | }
82 |
83 | /* The icon should point right when closed, down when open. */
84 | /* Open */
85 | .admonition.toggle button .tb-icon {
86 | transform: rotate(90deg);
87 | }
88 |
89 | /* Closed */
90 | .admonition.toggle button.toggle-button-hidden .tb-icon {
91 | transform: rotate(0deg);
92 | }
93 |
94 | /* With details toggles, we don't rotate the icon so it points right */
95 | details.toggle-details .tb-icon {
96 | height: 1.4em;
97 | width: 1.4em;
98 | margin-top: 0.1em; /* To center the button vertically */
99 | }
100 |
101 |
102 | /**
103 | * Details-based toggles.
104 | * In this case, we wrap elements with `.toggle` in a details block.
105 | */
106 |
107 | /* Details blocks */
108 | details.toggle-details {
109 | margin: 1em 0;
110 | }
111 |
112 |
113 | details.toggle-details summary {
114 | display: flex;
115 | align-items: center;
116 | cursor: pointer;
117 | list-style: none;
118 | border-radius: .2em;
119 | border-left: 3px solid #1976d2;
120 | background-color: rgb(204 204 204 / 10%);
121 | padding: 0.2em 0.7em 0.3em 0.5em; /* Less padding on left because the SVG has left margin */
122 | font-size: 0.9em;
123 | }
124 |
125 | details.toggle-details summary:hover {
126 | background-color: rgb(204 204 204 / 20%);
127 | }
128 |
129 | details.toggle-details summary:active {
130 | background: rgb(204 204 204 / 28%);
131 | }
132 |
133 | .toggle-details__summary-text {
134 | margin-left: 0.2em;
135 | }
136 |
137 | details.toggle-details[open] summary {
138 | margin-bottom: .5em;
139 | }
140 |
141 | details.toggle-details[open] summary .tb-icon {
142 | transform: rotate(90deg);
143 | }
144 |
145 | details.toggle-details[open] summary ~ * {
146 | animation: toggle-fade-in .3s ease-out;
147 | }
148 |
149 | @keyframes toggle-fade-in {
150 | from {opacity: 0%;}
151 | to {opacity: 100%;}
152 | }
153 |
154 | /* Print rules - we hide all toggle button elements at print */
155 | @media print {
156 | /* Always hide the summary so the button doesn't show up */
157 | details.toggle-details summary {
158 | display: none;
159 | }
160 | }
--------------------------------------------------------------------------------
/_build/html/_static/sphinx-thebe.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Add attributes to Thebe blocks to initialize thebe properly
3 | */
4 | var configureThebe = () => {
5 | // Load thebe config in case we want to update it as some point
6 | console.log("[sphinx-thebe]: Loading thebe config...");
7 | thebe_config = document.querySelector("script[type=\"text/x-thebe-config\"]");
8 |
9 | // If we already detect a Thebe cell, don't re-run
10 | if (document.querySelectorAll("div.thebe-cell").length > 0) {
11 | return;
12 | }
13 |
14 | // Update thebe buttons with loading message
15 | document.querySelectorAll(".thebe-launch-button").forEach((button) => {
16 | button.innerHTML = `
17 |
18 |
19 |
20 |
21 |
22 |
23 | `;
24 | });
25 |
26 | // Set thebe event hooks
27 | var thebeStatus;
28 | thebelab.on("status", function (evt, data) {
29 | console.log("Status changed:", data.status, data.message);
30 |
31 | const button = document.querySelector(".thebe-launch-button ");
32 | button.classList.replace(
33 | `thebe-status-${thebeStatus}`,
34 | `thebe-status-${data.status}`
35 | )
36 | button.querySelector(".loading-text")
37 | .innerHTML = (
38 | `Launching from mybinder.org:
39 | ${data.status}`
40 | );
41 |
42 | // Now update our thebe status
43 | thebeStatus = data.status;
44 |
45 | // Find any cells with an initialization tag and ask thebe to run them when ready
46 | if (data.status === "ready") {
47 | var thebeInitCells = document.querySelectorAll(
48 | ".thebe-init, .tag_thebe-init"
49 | );
50 | thebeInitCells.forEach((cell) => {
51 | console.log("Initializing Thebe with cell: " + cell.id);
52 | cell.querySelector(".thebelab-run-button").click();
53 | });
54 | }
55 | });
56 | };
57 |
58 | /**
59 | * Update the page DOM to use Thebe elements
60 | */
61 | var modifyDOMForThebe = () => {
62 | // Find all code cells, replace with Thebe interactive code cells
63 | const codeCells = document.querySelectorAll(thebe_selector);
64 | codeCells.forEach((codeCell, index) => {
65 | const codeCellId = (index) => `codecell${index}`;
66 | codeCell.id = codeCellId(index);
67 | codeCellText = codeCell.querySelector(thebe_selector_input);
68 | codeCellOutput = codeCell.querySelector(thebe_selector_output);
69 |
70 | // Clean up the language to make it work w/ CodeMirror and add it to the cell
71 | dataLanguage = detectLanguage(kernelName);
72 |
73 | // Re-arrange the cell and add metadata
74 | if (codeCellText) {
75 | codeCellText.setAttribute("data-language", dataLanguage);
76 | codeCellText.setAttribute("data-executable", "true");
77 |
78 | // If we had an output, insert it just after the `pre` cell
79 | if (codeCellOutput) {
80 | codeCellOutput.setAttribute("data-output", "");
81 | codeCellText.insertAdjacentElement('afterend', codeCellOutput);
82 | }
83 | }
84 |
85 | // Remove sphinx-copybutton blocks, which are common in Sphinx
86 | codeCell.querySelectorAll("button.copybtn").forEach((el) => {
87 | el.remove();
88 | });
89 | });
90 | };
91 |
92 | var initThebe = () => {
93 | // Load thebe dynamically if it's not already loaded
94 | if (typeof thebelab === "undefined") {
95 | console.log("[sphinx-thebe]: Loading thebe from CDN...");
96 | document.querySelector(".thebe-launch-button ").innerText = "Loading thebe from CDN...";
97 |
98 | const script = document.createElement("script");
99 | script.src = `${THEBE_JS_URL}`;
100 | document.head.appendChild(script);
101 |
102 | // Runs once the script has finished loading
103 | script.addEventListener("load", () => {
104 | console.log("[sphinx-thebe]: Finished loading thebe from CDN...");
105 | configureThebe();
106 | modifyDOMForThebe();
107 | thebelab.bootstrap();
108 | });
109 | } else {
110 | console.log(
111 | "[sphinx-thebe]: thebe already loaded, not loading from CDN..."
112 | );
113 | configureThebe();
114 | modifyDOMForThebe();
115 | thebelab.bootstrap();
116 | }
117 | };
118 |
119 | // Helper function to munge the language name
120 | var detectLanguage = (language) => {
121 | if (language.indexOf("python") > -1) {
122 | language = "python";
123 | } else if (language === "ir") {
124 | language = "r";
125 | }
126 | return language;
127 | };
128 |
--------------------------------------------------------------------------------
/_build/html/_static/_sphinx_javascript_frameworks_compat.js:
--------------------------------------------------------------------------------
1 | /*
2 | * _sphinx_javascript_frameworks_compat.js
3 | * ~~~~~~~~~~
4 | *
5 | * Compatability shim for jQuery and underscores.js.
6 | *
7 | * WILL BE REMOVED IN Sphinx 6.0
8 | * xref RemovedInSphinx60Warning
9 | *
10 | */
11 |
12 | /**
13 | * select a different prefix for underscore
14 | */
15 | $u = _.noConflict();
16 |
17 |
18 | /**
19 | * small helper function to urldecode strings
20 | *
21 | * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
22 | */
23 | jQuery.urldecode = function(x) {
24 | if (!x) {
25 | return x
26 | }
27 | return decodeURIComponent(x.replace(/\+/g, ' '));
28 | };
29 |
30 | /**
31 | * small helper function to urlencode strings
32 | */
33 | jQuery.urlencode = encodeURIComponent;
34 |
35 | /**
36 | * This function returns the parsed url parameters of the
37 | * current request. Multiple values per key are supported,
38 | * it will always return arrays of strings for the value parts.
39 | */
40 | jQuery.getQueryParameters = function(s) {
41 | if (typeof s === 'undefined')
42 | s = document.location.search;
43 | var parts = s.substr(s.indexOf('?') + 1).split('&');
44 | var result = {};
45 | for (var i = 0; i < parts.length; i++) {
46 | var tmp = parts[i].split('=', 2);
47 | var key = jQuery.urldecode(tmp[0]);
48 | var value = jQuery.urldecode(tmp[1]);
49 | if (key in result)
50 | result[key].push(value);
51 | else
52 | result[key] = [value];
53 | }
54 | return result;
55 | };
56 |
57 | /**
58 | * highlight a given string on a jquery object by wrapping it in
59 | * span elements with the given class name.
60 | */
61 | jQuery.fn.highlightText = function(text, className) {
62 | function highlight(node, addItems) {
63 | if (node.nodeType === 3) {
64 | var val = node.nodeValue;
65 | var pos = val.toLowerCase().indexOf(text);
66 | if (pos >= 0 &&
67 | !jQuery(node.parentNode).hasClass(className) &&
68 | !jQuery(node.parentNode).hasClass("nohighlight")) {
69 | var span;
70 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
71 | if (isInSVG) {
72 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
73 | } else {
74 | span = document.createElement("span");
75 | span.className = className;
76 | }
77 | span.appendChild(document.createTextNode(val.substr(pos, text.length)));
78 | node.parentNode.insertBefore(span, node.parentNode.insertBefore(
79 | document.createTextNode(val.substr(pos + text.length)),
80 | node.nextSibling));
81 | node.nodeValue = val.substr(0, pos);
82 | if (isInSVG) {
83 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
84 | var bbox = node.parentElement.getBBox();
85 | rect.x.baseVal.value = bbox.x;
86 | rect.y.baseVal.value = bbox.y;
87 | rect.width.baseVal.value = bbox.width;
88 | rect.height.baseVal.value = bbox.height;
89 | rect.setAttribute('class', className);
90 | addItems.push({
91 | "parent": node.parentNode,
92 | "target": rect});
93 | }
94 | }
95 | }
96 | else if (!jQuery(node).is("button, select, textarea")) {
97 | jQuery.each(node.childNodes, function() {
98 | highlight(this, addItems);
99 | });
100 | }
101 | }
102 | var addItems = [];
103 | var result = this.each(function() {
104 | highlight(this, addItems);
105 | });
106 | for (var i = 0; i < addItems.length; ++i) {
107 | jQuery(addItems[i].parent).before(addItems[i].target);
108 | }
109 | return result;
110 | };
111 |
112 | /*
113 | * backward compatibility for jQuery.browser
114 | * This will be supported until firefox bug is fixed.
115 | */
116 | if (!jQuery.browser) {
117 | jQuery.uaMatch = function(ua) {
118 | ua = ua.toLowerCase();
119 |
120 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
121 | /(webkit)[ \/]([\w.]+)/.exec(ua) ||
122 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
123 | /(msie) ([\w.]+)/.exec(ua) ||
124 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
125 | [];
126 |
127 | return {
128 | browser: match[ 1 ] || "",
129 | version: match[ 2 ] || "0"
130 | };
131 | };
132 | jQuery.browser = {};
133 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
134 | }
135 |
--------------------------------------------------------------------------------
/_build/jupyter_execute/notebooks.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Content with notebooks\n",
8 | "\n",
9 | "You can also create content with Jupyter Notebooks. This means that you can include\n",
10 | "code blocks and their outputs in your book.\n",
11 | "\n",
12 | "## Markdown + notebooks\n",
13 | "\n",
14 | "As it is markdown, you can embed images, HTML, etc into your posts!\n",
15 | "\n",
16 | "\n",
17 | "\n",
18 | "You can also $add_{math}$ and\n",
19 | "\n",
20 | "$$\n",
21 | "math^{blocks}\n",
22 | "$$\n",
23 | "\n",
24 | "or\n",
25 | "\n",
26 | "$$\n",
27 | "\\begin{aligned}\n",
28 | "\\mbox{mean} la_{tex} \\\\ \\\\\n",
29 | "math blocks\n",
30 | "\\end{aligned}\n",
31 | "$$\n",
32 | "\n",
33 | "But make sure you \\$Escape \\$your \\$dollar signs \\$you want to keep!\n",
34 | "\n",
35 | "## MyST markdown\n",
36 | "\n",
37 | "MyST markdown works in Jupyter Notebooks as well. For more information about MyST markdown, check\n",
38 | "out [the MyST guide in Jupyter Book](https://jupyterbook.org/content/myst.html),\n",
39 | "or see [the MyST markdown documentation](https://myst-parser.readthedocs.io/en/latest/).\n",
40 | "\n",
41 | "## Code blocks and outputs\n",
42 | "\n",
43 | "Jupyter Book will also embed your code blocks and output in your book.\n",
44 | "For example, here's some sample Matplotlib code:"
45 | ]
46 | },
47 | {
48 | "cell_type": "code",
49 | "execution_count": 1,
50 | "metadata": {},
51 | "outputs": [
52 | {
53 | "ename": "ModuleNotFoundError",
54 | "evalue": "No module named 'matplotlib'",
55 | "output_type": "error",
56 | "traceback": [
57 | "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
58 | "\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
59 | "Cell \u001b[1;32mIn[1], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mmatplotlib\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m rcParams, cycler\n\u001b[0;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmatplotlib\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpyplot\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mplt\u001b[39;00m\n\u001b[0;32m 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n",
60 | "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'matplotlib'"
61 | ]
62 | }
63 | ],
64 | "source": [
65 | "from matplotlib import rcParams, cycler\n",
66 | "import matplotlib.pyplot as plt\n",
67 | "import numpy as np\n",
68 | "plt.ion()"
69 | ]
70 | },
71 | {
72 | "cell_type": "code",
73 | "execution_count": null,
74 | "metadata": {},
75 | "outputs": [],
76 | "source": [
77 | "# Fixing random state for reproducibility\n",
78 | "np.random.seed(19680801)\n",
79 | "\n",
80 | "N = 10\n",
81 | "data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)]\n",
82 | "data = np.array(data).T\n",
83 | "cmap = plt.cm.coolwarm\n",
84 | "rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N)))\n",
85 | "\n",
86 | "\n",
87 | "from matplotlib.lines import Line2D\n",
88 | "custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4),\n",
89 | " Line2D([0], [0], color=cmap(.5), lw=4),\n",
90 | " Line2D([0], [0], color=cmap(1.), lw=4)]\n",
91 | "\n",
92 | "fig, ax = plt.subplots(figsize=(10, 5))\n",
93 | "lines = ax.plot(data)\n",
94 | "ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']);"
95 | ]
96 | },
97 | {
98 | "cell_type": "markdown",
99 | "metadata": {},
100 | "source": [
101 | "There is a lot more that you can do with outputs (such as including interactive outputs)\n",
102 | "with your book. For more information about this, see [the Jupyter Book documentation](https://jupyterbook.org)"
103 | ]
104 | }
105 | ],
106 | "metadata": {
107 | "kernelspec": {
108 | "display_name": "Python 3",
109 | "language": "python",
110 | "name": "python3"
111 | },
112 | "language_info": {
113 | "codemirror_mode": {
114 | "name": "ipython",
115 | "version": 3
116 | },
117 | "file_extension": ".py",
118 | "mimetype": "text/x-python",
119 | "name": "python",
120 | "nbconvert_exporter": "python",
121 | "pygments_lexer": "ipython3",
122 | "version": "3.10.6"
123 | },
124 | "widgets": {
125 | "application/vnd.jupyter.widget-state+json": {
126 | "state": {},
127 | "version_major": 2,
128 | "version_minor": 0
129 | }
130 | }
131 | },
132 | "nbformat": 4,
133 | "nbformat_minor": 4
134 | }
--------------------------------------------------------------------------------
/_build/html/_static/doctools.js:
--------------------------------------------------------------------------------
1 | /*
2 | * doctools.js
3 | * ~~~~~~~~~~~
4 | *
5 | * Base JavaScript utilities for all Sphinx HTML documentation.
6 | *
7 | * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
8 | * :license: BSD, see LICENSE for details.
9 | *
10 | */
11 | "use strict";
12 |
13 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
14 | "TEXTAREA",
15 | "INPUT",
16 | "SELECT",
17 | "BUTTON",
18 | ]);
19 |
20 | const _ready = (callback) => {
21 | if (document.readyState !== "loading") {
22 | callback();
23 | } else {
24 | document.addEventListener("DOMContentLoaded", callback);
25 | }
26 | };
27 |
28 | /**
29 | * Small JavaScript module for the documentation.
30 | */
31 | const Documentation = {
32 | init: () => {
33 | Documentation.initDomainIndexTable();
34 | Documentation.initOnKeyListeners();
35 | },
36 |
37 | /**
38 | * i18n support
39 | */
40 | TRANSLATIONS: {},
41 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
42 | LOCALE: "unknown",
43 |
44 | // gettext and ngettext don't access this so that the functions
45 | // can safely bound to a different name (_ = Documentation.gettext)
46 | gettext: (string) => {
47 | const translated = Documentation.TRANSLATIONS[string];
48 | switch (typeof translated) {
49 | case "undefined":
50 | return string; // no translation
51 | case "string":
52 | return translated; // translation exists
53 | default:
54 | return translated[0]; // (singular, plural) translation tuple exists
55 | }
56 | },
57 |
58 | ngettext: (singular, plural, n) => {
59 | const translated = Documentation.TRANSLATIONS[singular];
60 | if (typeof translated !== "undefined")
61 | return translated[Documentation.PLURAL_EXPR(n)];
62 | return n === 1 ? singular : plural;
63 | },
64 |
65 | addTranslations: (catalog) => {
66 | Object.assign(Documentation.TRANSLATIONS, catalog.messages);
67 | Documentation.PLURAL_EXPR = new Function(
68 | "n",
69 | `return (${catalog.plural_expr})`
70 | );
71 | Documentation.LOCALE = catalog.locale;
72 | },
73 |
74 | /**
75 | * helper function to focus on search bar
76 | */
77 | focusSearchBar: () => {
78 | document.querySelectorAll("input[name=q]")[0]?.focus();
79 | },
80 |
81 | /**
82 | * Initialise the domain index toggle buttons
83 | */
84 | initDomainIndexTable: () => {
85 | const toggler = (el) => {
86 | const idNumber = el.id.substr(7);
87 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
88 | if (el.src.substr(-9) === "minus.png") {
89 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
90 | toggledRows.forEach((el) => (el.style.display = "none"));
91 | } else {
92 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
93 | toggledRows.forEach((el) => (el.style.display = ""));
94 | }
95 | };
96 |
97 | const togglerElements = document.querySelectorAll("img.toggler");
98 | togglerElements.forEach((el) =>
99 | el.addEventListener("click", (event) => toggler(event.currentTarget))
100 | );
101 | togglerElements.forEach((el) => (el.style.display = ""));
102 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
103 | },
104 |
105 | initOnKeyListeners: () => {
106 | // only install a listener if it is really needed
107 | if (
108 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
109 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
110 | )
111 | return;
112 |
113 | document.addEventListener("keydown", (event) => {
114 | // bail for input elements
115 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
116 | // bail with special keys
117 | if (event.altKey || event.ctrlKey || event.metaKey) return;
118 |
119 | if (!event.shiftKey) {
120 | switch (event.key) {
121 | case "ArrowLeft":
122 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
123 |
124 | const prevLink = document.querySelector('link[rel="prev"]');
125 | if (prevLink && prevLink.href) {
126 | window.location.href = prevLink.href;
127 | event.preventDefault();
128 | }
129 | break;
130 | case "ArrowRight":
131 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
132 |
133 | const nextLink = document.querySelector('link[rel="next"]');
134 | if (nextLink && nextLink.href) {
135 | window.location.href = nextLink.href;
136 | event.preventDefault();
137 | }
138 | break;
139 | }
140 | }
141 |
142 | // some keyboard layouts may need Shift to get /
143 | switch (event.key) {
144 | case "/":
145 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
146 | Documentation.focusSearchBar();
147 | event.preventDefault();
148 | }
149 | });
150 | },
151 | };
152 |
153 | // quick alias for translations
154 | const _ = Documentation.gettext;
155 |
156 | _ready(Documentation.init);
157 |
--------------------------------------------------------------------------------
/_build/html/_static/sphinx_highlight.js:
--------------------------------------------------------------------------------
1 | /* Highlighting utilities for Sphinx HTML documentation. */
2 | "use strict";
3 |
4 | const SPHINX_HIGHLIGHT_ENABLED = true
5 |
6 | /**
7 | * highlight a given string on a node by wrapping it in
8 | * span elements with the given class name.
9 | */
10 | const _highlight = (node, addItems, text, className) => {
11 | if (node.nodeType === Node.TEXT_NODE) {
12 | const val = node.nodeValue;
13 | const parent = node.parentNode;
14 | const pos = val.toLowerCase().indexOf(text);
15 | if (
16 | pos >= 0 &&
17 | !parent.classList.contains(className) &&
18 | !parent.classList.contains("nohighlight")
19 | ) {
20 | let span;
21 |
22 | const closestNode = parent.closest("body, svg, foreignObject");
23 | const isInSVG = closestNode && closestNode.matches("svg");
24 | if (isInSVG) {
25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
26 | } else {
27 | span = document.createElement("span");
28 | span.classList.add(className);
29 | }
30 |
31 | span.appendChild(document.createTextNode(val.substr(pos, text.length)));
32 | parent.insertBefore(
33 | span,
34 | parent.insertBefore(
35 | document.createTextNode(val.substr(pos + text.length)),
36 | node.nextSibling
37 | )
38 | );
39 | node.nodeValue = val.substr(0, pos);
40 |
41 | if (isInSVG) {
42 | const rect = document.createElementNS(
43 | "http://www.w3.org/2000/svg",
44 | "rect"
45 | );
46 | const bbox = parent.getBBox();
47 | rect.x.baseVal.value = bbox.x;
48 | rect.y.baseVal.value = bbox.y;
49 | rect.width.baseVal.value = bbox.width;
50 | rect.height.baseVal.value = bbox.height;
51 | rect.setAttribute("class", className);
52 | addItems.push({ parent: parent, target: rect });
53 | }
54 | }
55 | } else if (node.matches && !node.matches("button, select, textarea")) {
56 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
57 | }
58 | };
59 | const _highlightText = (thisNode, text, className) => {
60 | let addItems = [];
61 | _highlight(thisNode, addItems, text, className);
62 | addItems.forEach((obj) =>
63 | obj.parent.insertAdjacentElement("beforebegin", obj.target)
64 | );
65 | };
66 |
67 | /**
68 | * Small JavaScript module for the documentation.
69 | */
70 | const SphinxHighlight = {
71 |
72 | /**
73 | * highlight the search words provided in localstorage in the text
74 | */
75 | highlightSearchWords: () => {
76 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
77 |
78 | // get and clear terms from localstorage
79 | const url = new URL(window.location);
80 | const highlight =
81 | localStorage.getItem("sphinx_highlight_terms")
82 | || url.searchParams.get("highlight")
83 | || "";
84 | localStorage.removeItem("sphinx_highlight_terms")
85 | url.searchParams.delete("highlight");
86 | window.history.replaceState({}, "", url);
87 |
88 | // get individual terms from highlight string
89 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
90 | if (terms.length === 0) return; // nothing to do
91 |
92 | // There should never be more than one element matching "div.body"
93 | const divBody = document.querySelectorAll("div.body");
94 | const body = divBody.length ? divBody[0] : document.querySelector("body");
95 | window.setTimeout(() => {
96 | terms.forEach((term) => _highlightText(body, term, "highlighted"));
97 | }, 10);
98 |
99 | const searchBox = document.getElementById("searchbox");
100 | if (searchBox === null) return;
101 | searchBox.appendChild(
102 | document
103 | .createRange()
104 | .createContextualFragment(
105 | '