-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add header links to github/colab/binder
Add ablog with tags, authors, and categories Modify example notebooks
- Loading branch information
1 parent
22af744
commit b59c2d7
Showing
12 changed files
with
627 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% if pagename in ablog %} | ||
|
||
<!-- Generate correct links and render github/binder/colab badges --> | ||
{% set gh_basepath = github_user + '/' + github_repo + '/blob/' + github_version + '/' %} | ||
{% set encoded_base = github_user + '%252F' + github_repo %} | ||
{% set gh_binder = github_user + '/' + github_repo + '/' + github_version %} | ||
{% set doc_path_aux = doc_path | trim('/') %} | ||
{% set file_path = doc_path_aux + '/' + pagename + ".ipynb" %} | ||
{% set encoded_path = file_path | replace("/", "%252F") %} | ||
|
||
|
||
<div class="sd-text-right"> | ||
<p> | ||
<a href="{{ github_url + '/' + gh_basepath + file_path }}", role="button" target="_blank"> | ||
<img src="{{ pathto('_static/github.svg', 1) }}" alt="View On GitHub"></a> | ||
|
||
<a href="{{ 'https://mybinder.org/v2/gh/' + sandbox_repo + '?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252F' + encoded_base + '%26urlpath%3Dtree%252F' + github_repo + '%252F' + encoded_path + '%26branch%3D' + github_version }}" target="_blank"> | ||
<img src="{{ pathto('_static/binder.svg', 1) }}" alt="Open In Binder"></a> | ||
|
||
<a href="{{ 'https://colab.research.google.com/github/' + gh_basepath + file_path }}" target="_blank"> | ||
<img src="{{ pathto('_static/colab.svg', 1) }}" alt="Open In Colab"/></a> | ||
</p> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- continuation of examples/page_footer.md --> | ||
{% if pagename in ablog %} | ||
{% set post = ablog[pagename] %} | ||
{% for coll in post.author %} | ||
{% if coll|length %} | ||
{{ coll }} | ||
{% if loop.index < post.author | length %},{% endif %} | ||
{% else %} | ||
{{ coll }} | ||
{% if loop.index < post.author | length %},{% endif %} | ||
{% endif %} | ||
{% endfor %}. "{{ title.split(' — ')[0] }}". In: <i>Pytensor Examples</i>. Ed. by Pytensor Team. <!-- DOI: <a href={{ doi_url }}>{{ doi_code }}</a> --> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
orphan: true | ||
--- | ||
|
||
# Recent updates | ||
|
||
<!-- auto generated by ablog so it's empty --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ dependencies: | |
- myst-nb | ||
- matplotlib | ||
- watermark | ||
- ablog | ||
- pip | ||
- pip: | ||
- -e .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## License notice | ||
All the notebooks in this example gallery are provided under the | ||
[MIT License](https://github.com/pymc-devs/pytensor/blob/main/LICENSE) | ||
which allows modification, and redistribution for any | ||
use provided the copyright and license notices are preserved. | ||
|
||
## Citing PyMC examples | ||
|
||
To cite this notebook, use the DOI provided by Zenodo for the pytensor repository. | ||
|
||
:::{important} | ||
Many notebooks are adapted from other sources: blogs, books... In such cases you should | ||
cite the original source as well. | ||
|
||
Also remember to cite the relevant libraries used by your code. | ||
::: | ||
|
||
Here is an example citation template in bibtex: | ||
|
||
{{ citation_code }} | ||
|
||
which once rendered could look like: | ||
|
||
<!-- continues in _templates/page.html!!! --> | ||
<!-- I wanted to get some kind of automatation to the process, | ||
and html templates have access to many variables that are not available | ||
from jinja-myst --> |
Oops, something went wrong.