SSH host keys have changed! See this Discourse post for details.

Verified Commit 36ff1ef9 authored by Lars Bilke's avatar Lars Bilke
Browse files

Added first Jupyter notebook.

parent 3c341b57
_out
.ipynb_checkpoints
# OGS Juypter notebook tips
## Git diff / merge tool
Install [nbdime](https://nbdime.readthedocs.io) and enable [git integration](https://nbdime.readthedocs.io/en/latest/vcs.html):
```bash
nbdime config-git --enable --global
```
This diff is collapsed.
{% extends 'base/display_priority.j2' %}
{% block in_prompt %}
{% endblock in_prompt %}
{% block output_prompt %}
{%- endblock output_prompt %}
{% block input %}
{% if 'jupyter' in cell.metadata and 'source_hidden' in cell.metadata.jupyter and cell.metadata.jupyter.source_hidden == True -%}
<details>
<summary>Click to toggle input cell</summary>
<div>
{% endif %}
<div class="jupyter-input">
```
{%- if 'magics_language' in cell.metadata -%}
{{ cell.metadata.magics_language}}
{%- elif 'name' in nb.metadata.get('language_info', {}) -%}
{{ nb.metadata.language_info.name }}
{%- endif %}
{{ cell.source}}
```
</div>
{% if 'jupyter' in cell.metadata and 'source_hidden' in cell.metadata.jupyter and cell.metadata.jupyter.source_hidden == True %}
</div>
</details>
{% endif %}
{% endblock input %}
{% block error %}
{{ super() }}
{% endblock error %}
{% block traceback_line %}
{{ line | indent | strip_ansi }}
{% endblock traceback_line %}
{% block execute_result %}
{% block data_priority scoped %}
{{ super() }}
{% endblock %}
{% endblock execute_result %}
{% block stream %}
{% if 'jupyter' in cell.metadata and 'outputs_hidden' in cell.metadata.jupyter and cell.metadata.jupyter.outputs_hidden == True -%}
<details>
<summary>Click to toggle output cell</summary>
<div>
{% endif %}
<div class="jupyter-output">
{{ output.text | indent }}
</div>
{% if 'jupyter' in cell.metadata and 'outputs_hidden' in cell.metadata.jupyter and cell.metadata.jupyter.outputs_hidden == True -%}
</div>
</details>
{% endif %}
{% endblock stream %}
{% block data_svg %}
{% if "filenames" in output.metadata %}
![svg]({{ output.metadata.filenames['image/svg+xml'] | path2url }})
{% else %}
![svg](data:image/svg;base64,{{ output.data['image/svg+xml'] }})
{% endif %}
{% endblock data_svg %}
{% block data_png %}
<div class="jupyter-output">
{% if "filenames" in output.metadata %}
![png]({{ output.metadata.filenames['image/png'] | path2url }})
{% else %}
![png](data:image/png;base64,{{ output.data['image/png'] }})
{% endif %}
</div>
{% endblock data_png %}
{% block data_jpg %}
{% if "filenames" in output.metadata %}
![jpeg]({{ output.metadata.filenames['image/jpeg'] | path2url }})
{% else %}
![jpeg](data:image/jpeg;base64,{{ output.data['image/jpeg'] }})
{% endif %}
{% endblock data_jpg %}
{% block data_latex %}
{{ output.data['text/latex'] }}
{% endblock data_latex %}
{% block data_html scoped %}
{{ output.data['text/html'] }}
{% endblock data_html %}
{% block data_markdown scoped %}
{{ output.data['text/markdown'] }}
{% endblock data_markdown %}
{% block data_text scoped %}
<div class="jupyter-output">
{{ output.data['text/plain'] | indent }}
</div>
{% endblock data_text %}
{% block markdowncell scoped %}
{{ cell.source }}
{% endblock markdowncell %}
{% block unknowncell scoped %}
unknown type {{ cell.type }}
{% endblock unknowncell %}
......@@ -14,3 +14,7 @@ data/bibliography.json
# generated css
static/css/all.css
# Generated by nb2hugo
content/docs/benchmarks/notebooks
static/docs/benchmarks/notebooks
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment