Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
7
venv/share/jupyter/nbconvert/templates/base/celltags.j2
Normal file
7
venv/share/jupyter/nbconvert/templates/base/celltags.j2
Normal file
|
@ -0,0 +1,7 @@
|
|||
{%- macro celltags(cell) -%}
|
||||
{% if cell.metadata.tags | length > 0 -%}
|
||||
{% for tag in cell.metadata.tags -%}
|
||||
{{ ' celltag_' ~ tag -}}
|
||||
{%- endfor -%}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
|
@ -0,0 +1,46 @@
|
|||
{%- extends 'base/null.j2' -%}
|
||||
|
||||
{#display data priority#}
|
||||
|
||||
|
||||
{%- block data_priority scoped -%}
|
||||
{%- for type in output.data | filter_data_type -%}
|
||||
{%- if type == 'application/pdf' -%}
|
||||
{%- block data_pdf -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'image/svg+xml' -%}
|
||||
{%- block data_svg -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'image/png' -%}
|
||||
{%- block data_png -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'text/html' -%}
|
||||
{%- block data_html -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'text/markdown' -%}
|
||||
{%- block data_markdown -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'image/jpeg' -%}
|
||||
{%- block data_jpg -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'text/plain' -%}
|
||||
{%- block data_text -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'text/latex' -%}
|
||||
{%- block data_latex -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'application/javascript' -%}
|
||||
{%- block data_javascript -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'application/vnd.jupyter.widget-state+json' -%}
|
||||
{%- block data_widget_state -%}
|
||||
{%- endblock -%}
|
||||
{%- elif type == 'application/vnd.jupyter.widget-view+json' -%}
|
||||
{%- block data_widget_view -%}
|
||||
{%- endblock -%}
|
||||
{%- else -%}
|
||||
{%- block data_other -%}
|
||||
{%- endblock -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endblock data_priority -%}
|
|
@ -0,0 +1,28 @@
|
|||
{%- macro jupyter_widgets(widgets_cdn_url, html_manager_semver_range) -%}
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
function addWidgetsRenderer() {
|
||||
var mimeElement = document.querySelector('script[type="application/vnd.jupyter.widget-view+json"]');
|
||||
var scriptElement = document.createElement('script');
|
||||
var widgetRendererSrc = '{{ widgets_cdn_url }}@jupyter-widgets/html-manager@{{ html_manager_semver_range }}/dist/embed-amd.js';
|
||||
var widgetState;
|
||||
|
||||
// Fallback for older version:
|
||||
try {
|
||||
widgetState = mimeElement && JSON.parse(mimeElement.innerHTML);
|
||||
|
||||
if (widgetState && (widgetState.version_major < 2 || !widgetState.version_major)) {
|
||||
widgetRendererSrc = '{{ widgets_cdn_url }}jupyter-js-widgets@*/dist/embed.js';
|
||||
}
|
||||
} catch(e) {}
|
||||
|
||||
scriptElement.src = widgetRendererSrc;
|
||||
document.body.appendChild(scriptElement);
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', addWidgetsRenderer);
|
||||
}());
|
||||
</script>
|
||||
|
||||
{%- endmacro %}
|
42
venv/share/jupyter/nbconvert/templates/base/mathjax.html.j2
Normal file
42
venv/share/jupyter/nbconvert/templates/base/mathjax.html.j2
Normal file
|
@ -0,0 +1,42 @@
|
|||
|
||||
{%- macro mathjax(url="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-MML-AM_CHTML-full,Safe") -%}
|
||||
<!-- Load mathjax -->
|
||||
<script src="{{url}}"> </script>
|
||||
<!-- MathJax configuration -->
|
||||
<script type="text/x-mathjax-config">
|
||||
init_mathjax = function() {
|
||||
if (window.MathJax) {
|
||||
// MathJax loaded
|
||||
MathJax.Hub.Config({
|
||||
TeX: {
|
||||
equationNumbers: {
|
||||
autoNumber: "AMS",
|
||||
useLabelIds: true
|
||||
}
|
||||
},
|
||||
tex2jax: {
|
||||
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
||||
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
|
||||
processEscapes: true,
|
||||
processEnvironments: true
|
||||
},
|
||||
displayAlign: 'center',
|
||||
CommonHTML: {
|
||||
linebreaks: {
|
||||
automatic: true
|
||||
}
|
||||
},
|
||||
"HTML-CSS": {
|
||||
linebreaks: {
|
||||
automatic: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
|
||||
}
|
||||
}
|
||||
init_mathjax();
|
||||
</script>
|
||||
<!-- End of mathjax configuration -->
|
||||
{%- endmacro %}
|
108
venv/share/jupyter/nbconvert/templates/base/null.j2
Normal file
108
venv/share/jupyter/nbconvert/templates/base/null.j2
Normal file
|
@ -0,0 +1,108 @@
|
|||
{#
|
||||
|
||||
DO NOT USE THIS AS A BASE,
|
||||
IF YOU ARE COPY AND PASTING THIS FILE
|
||||
YOU ARE PROBABLY DOING THINGS INCORRECTLY.
|
||||
|
||||
Null template, does nothing except defining a basic structure
|
||||
To layout the different blocks of a notebook.
|
||||
|
||||
Subtemplates can override blocks to define their custom representation.
|
||||
|
||||
If one of the block you do overwrite is not a leaf block, consider
|
||||
calling super.
|
||||
|
||||
{%- block nonLeafBlock -%}
|
||||
#add stuff at beginning
|
||||
{{ super() }}
|
||||
#add stuff at end
|
||||
{%- endblock nonLeafBlock -%}
|
||||
|
||||
consider calling super even if it is a leaf block, we might insert more blocks later.
|
||||
|
||||
#}
|
||||
{%- block header -%}
|
||||
{%- endblock header -%}
|
||||
{%- block body -%}
|
||||
{%- block body_header -%}
|
||||
{%- endblock body_header -%}
|
||||
{%- block body_loop -%}
|
||||
{%- for cell in nb.cells -%}
|
||||
{%- block any_cell scoped -%}
|
||||
{%- if cell.cell_type == 'code'-%}
|
||||
{%- if resources.global_content_filter.include_code -%}
|
||||
{%- block codecell scoped -%}
|
||||
{%- if resources.global_content_filter.include_input and not cell.get("transient",{}).get("remove_source", false) -%}
|
||||
{%- block input_group -%}
|
||||
{%- if resources.global_content_filter.include_input_prompt -%}
|
||||
{%- block in_prompt -%}{%- endblock in_prompt -%}
|
||||
{%- endif -%}
|
||||
{%- block input -%}{%- endblock input -%}
|
||||
{%- endblock input_group -%}
|
||||
{%- endif -%}
|
||||
{%- if cell.outputs and resources.global_content_filter.include_output -%}
|
||||
{%- block output_group -%}
|
||||
{%- if resources.global_content_filter.include_output_prompt -%}
|
||||
{%- block output_prompt -%}{%- endblock output_prompt -%}
|
||||
{%- endif -%}
|
||||
{%- block outputs scoped -%}
|
||||
{%- for output in cell.outputs -%}
|
||||
{%- block output scoped -%}
|
||||
{%- if output.output_type == 'execute_result' -%}
|
||||
{%- block execute_result scoped -%}{%- endblock execute_result -%}
|
||||
{%- elif output.output_type == 'stream' -%}
|
||||
{%- block stream scoped -%}
|
||||
{%- if output.name == 'stdout' -%}
|
||||
{%- block stream_stdout scoped -%}
|
||||
{%- endblock stream_stdout -%}
|
||||
{%- elif output.name == 'stderr' -%}
|
||||
{%- block stream_stderr scoped -%}
|
||||
{%- endblock stream_stderr -%}
|
||||
{%- endif -%}
|
||||
{%- endblock stream -%}
|
||||
{%- elif output.output_type == 'display_data' -%}
|
||||
{%- block display_data scoped -%}
|
||||
{%- block data_priority scoped -%}
|
||||
{%- endblock data_priority -%}
|
||||
{%- endblock display_data -%}
|
||||
{%- elif output.output_type == 'error' -%}
|
||||
{%- block error scoped -%}
|
||||
{%- for line in output.traceback -%}
|
||||
{%- block traceback_line scoped -%}{%- endblock traceback_line -%}
|
||||
{%- endfor -%}
|
||||
{%- endblock error -%}
|
||||
{%- endif -%}
|
||||
{%- endblock output -%}
|
||||
{%- endfor -%}
|
||||
{%- endblock outputs -%}
|
||||
{%- endblock output_group -%}
|
||||
{%- endif -%}
|
||||
{%- endblock codecell -%}
|
||||
{%- endif -%}
|
||||
{%- elif cell.cell_type in ['markdown'] -%}
|
||||
{%- if resources.global_content_filter.include_markdown and not cell.get("transient",{}).get("remove_source", false) -%}
|
||||
{%- block markdowncell scoped-%} {%- endblock markdowncell -%}
|
||||
{%- endif -%}
|
||||
{%- elif cell.cell_type in ['raw'] -%}
|
||||
{%- if resources.global_content_filter.include_raw and not cell.get("transient",{}).get("remove_source", false) -%}
|
||||
{%- block rawcell scoped -%}
|
||||
{%- if cell.metadata.get('raw_mimetype', '').lower() in resources.get('raw_mimetypes', ['']) -%}
|
||||
{{ cell.source }}
|
||||
{%- endif -%}
|
||||
{%- endblock rawcell -%}
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
{%- if resources.global_content_filter.include_unknown and not cell.get("transient",{}).get("remove_source", false) -%}
|
||||
{%- block unknowncell scoped-%}
|
||||
{%- endblock unknowncell -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endblock any_cell -%}
|
||||
{%- endfor -%}
|
||||
{%- endblock body_loop -%}
|
||||
{%- block body_footer -%}
|
||||
{%- endblock body_footer -%}
|
||||
{%- endblock body -%}
|
||||
|
||||
{%- block footer -%}
|
||||
{%- endblock footer -%}
|
Loading…
Add table
Add a link
Reference in a new issue