Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
264
venv/share/jupyter/nbconvert/templates/classic/base.html.j2
Normal file
264
venv/share/jupyter/nbconvert/templates/classic/base.html.j2
Normal file
|
@ -0,0 +1,264 @@
|
|||
{%- extends 'display_priority.j2' -%}
|
||||
{% from 'celltags.j2' import celltags %}
|
||||
|
||||
{% block codecell %}
|
||||
<div class="cell border-box-sizing code_cell rendered{{ celltags(cell) }}">
|
||||
{{ super() }}
|
||||
</div>
|
||||
{%- endblock codecell %}
|
||||
|
||||
{% block input_group -%}
|
||||
<div class="input">
|
||||
{{ super() }}
|
||||
</div>
|
||||
{% endblock input_group %}
|
||||
|
||||
{% block output_group %}
|
||||
<div class="output_wrapper">
|
||||
<div class="output">
|
||||
{{ super() }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock output_group %}
|
||||
|
||||
{% block in_prompt -%}
|
||||
<div class="prompt input_prompt">
|
||||
{%- if cell.execution_count is defined -%}
|
||||
In [{{ cell.execution_count|replace(None, " ") }}]:
|
||||
{%- else -%}
|
||||
In [ ]:
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endblock in_prompt %}
|
||||
|
||||
{% block empty_in_prompt -%}
|
||||
<div class="prompt input_prompt">
|
||||
</div>
|
||||
{%- endblock empty_in_prompt %}
|
||||
|
||||
{#
|
||||
output_prompt doesn't do anything in HTML,
|
||||
because there is a prompt div in each output area (see output block)
|
||||
#}
|
||||
{% block output_prompt %}
|
||||
{% endblock output_prompt %}
|
||||
|
||||
{% block input %}
|
||||
<div class="inner_cell">
|
||||
<div class="input_area">
|
||||
{{ cell.source | highlight_code(metadata=cell.metadata) }}
|
||||
</div>
|
||||
</div>
|
||||
{%- endblock input %}
|
||||
|
||||
{% block output_area_prompt %}
|
||||
{%- if output.output_type == 'execute_result' -%}
|
||||
<div class="prompt output_prompt">
|
||||
{%- if cell.execution_count is defined -%}
|
||||
Out[{{ cell.execution_count|replace(None, " ") }}]:
|
||||
{%- else -%}
|
||||
Out[ ]:
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
<div class="prompt">
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{% endblock output_area_prompt %}
|
||||
|
||||
{% block output %}
|
||||
<div class="output_area">
|
||||
{% if resources.global_content_filter.include_output_prompt %}
|
||||
{{ self.output_area_prompt() }}
|
||||
{% endif %}
|
||||
{{ super() }}
|
||||
</div>
|
||||
{% endblock output %}
|
||||
|
||||
{% block markdowncell scoped %}
|
||||
<div class="cell border-box-sizing text_cell rendered{{ celltags(cell) }}">
|
||||
{%- if resources.global_content_filter.include_input_prompt-%}
|
||||
{{ self.empty_in_prompt() }}
|
||||
{%- endif -%}
|
||||
<div class="inner_cell">
|
||||
<div class="text_cell_render border-box-sizing rendered_html">
|
||||
{{ cell.source | markdown2html | strip_files_prefix }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%- endblock markdowncell %}
|
||||
|
||||
{% block unknowncell scoped %}
|
||||
unknown type {{ cell.type }}
|
||||
{% endblock unknowncell %}
|
||||
|
||||
{% block execute_result -%}
|
||||
{%- set extra_class="output_execute_result" -%}
|
||||
{% block data_priority scoped %}
|
||||
{{ super() }}
|
||||
{% endblock data_priority %}
|
||||
{%- set extra_class="" -%}
|
||||
{%- endblock execute_result %}
|
||||
|
||||
{% block stream_stdout -%}
|
||||
<div class="output_subarea output_stream output_stdout output_text">
|
||||
<pre>
|
||||
{{- output.text | ansi2html -}}
|
||||
</pre>
|
||||
</div>
|
||||
{%- endblock stream_stdout %}
|
||||
|
||||
{% block stream_stderr -%}
|
||||
<div class="output_subarea output_stream output_stderr output_text">
|
||||
<pre>
|
||||
{{- output.text | ansi2html -}}
|
||||
</pre>
|
||||
</div>
|
||||
{%- endblock stream_stderr %}
|
||||
|
||||
{% block data_svg scoped -%}
|
||||
<div class="output_svg output_subarea {{ extra_class }}">
|
||||
{%- if output.svg_filename %}
|
||||
<img src="{{ output.svg_filename | posix_path }}">
|
||||
{%- else %}
|
||||
{{ output.data['image/svg+xml'] }}
|
||||
{%- endif %}
|
||||
</div>
|
||||
{%- endblock data_svg %}
|
||||
|
||||
{% block data_html scoped -%}
|
||||
<div class="output_html rendered_html output_subarea {{ extra_class }}">
|
||||
{{ output.data['text/html'] }}
|
||||
</div>
|
||||
{%- endblock data_html %}
|
||||
|
||||
{% block data_markdown scoped -%}
|
||||
<div class="output_markdown rendered_html output_subarea {{ extra_class }}">
|
||||
{{ output.data['text/markdown'] | markdown2html }}
|
||||
</div>
|
||||
{%- endblock data_markdown %}
|
||||
|
||||
{% block data_png scoped %}
|
||||
<div class="output_png output_subarea {{ extra_class }}">
|
||||
{%- if 'image/png' in output.metadata.get('filenames', {}) %}
|
||||
<img src="{{ output.metadata.filenames['image/png'] | posix_path }}"
|
||||
{%- else %}
|
||||
<img src="data:image/png;base64,{{ output.data['image/png'] }}"
|
||||
{%- endif %}
|
||||
{%- set width=output | get_metadata('width', 'image/png') -%}
|
||||
{%- if width is not none %}
|
||||
width={{ width }}
|
||||
{%- endif %}
|
||||
{%- set height=output | get_metadata('height', 'image/png') -%}
|
||||
{%- if height is not none %}
|
||||
height={{ height }}
|
||||
{%- endif %}
|
||||
{%- if output | get_metadata('unconfined', 'image/png') %}
|
||||
class="unconfined"
|
||||
{%- endif %}
|
||||
{%- set alttext=(output | get_metadata('alt', 'image/png')) or (cell | get_metadata('alt')) -%}
|
||||
{%- if alttext is not none %}
|
||||
alt="{{ alttext }}"
|
||||
{%- endif %}
|
||||
>
|
||||
</div>
|
||||
{%- endblock data_png %}
|
||||
|
||||
{% block data_jpg scoped %}
|
||||
<div class="output_jpeg output_subarea {{ extra_class }}">
|
||||
{%- if 'image/jpeg' in output.metadata.get('filenames', {}) %}
|
||||
<img src="{{ output.metadata.filenames['image/jpeg'] | posix_path }}"
|
||||
{%- else %}
|
||||
<img src="data:image/jpeg;base64,{{ output.data['image/jpeg'] }}"
|
||||
{%- endif %}
|
||||
{%- set width=output | get_metadata('width', 'image/jpeg') -%}
|
||||
{%- if width is not none %}
|
||||
width={{ width }}
|
||||
{%- endif %}
|
||||
{%- set height=output | get_metadata('height', 'image/jpeg') -%}
|
||||
{%- if height is not none %}
|
||||
height={{ height }}
|
||||
{%- endif %}
|
||||
{%- if output | get_metadata('unconfined', 'image/jpeg') %}
|
||||
class="unconfined"
|
||||
{%- endif %}
|
||||
{%- set alttext=(output | get_metadata('alt', 'image/jpeg')) or (cell | get_metadata('alt')) -%}
|
||||
{%- if alttext is not none %}
|
||||
alt="{{ alttext }}"
|
||||
{%- endif %}
|
||||
>
|
||||
</div>
|
||||
{%- endblock data_jpg %}
|
||||
|
||||
{% block data_latex scoped %}
|
||||
<div class="output_latex output_subarea {{ extra_class }}">
|
||||
{{ output.data['text/latex'] | e }}
|
||||
</div>
|
||||
{%- endblock data_latex %}
|
||||
|
||||
{% block error -%}
|
||||
<div class="output_subarea output_text output_error">
|
||||
<pre>
|
||||
{{- super() -}}
|
||||
</pre>
|
||||
</div>
|
||||
{%- endblock error %}
|
||||
|
||||
{%- block traceback_line %}
|
||||
{{ line | ansi2html }}
|
||||
{%- endblock traceback_line %}
|
||||
|
||||
{%- block data_text scoped %}
|
||||
<div class="output_text output_subarea {{ extra_class }}">
|
||||
<pre>
|
||||
{{- output.data['text/plain'] | ansi2html -}}
|
||||
</pre>
|
||||
</div>
|
||||
{%- endblock -%}
|
||||
|
||||
{%- block data_javascript scoped %}
|
||||
{% set div_id = uuid4() %}
|
||||
<div id="{{ div_id }}" class="output_subarea output_javascript {{ extra_class }}">
|
||||
<script type="text/javascript">
|
||||
var element = $('#{{ div_id }}');
|
||||
{{ output.data['application/javascript'] }}
|
||||
</script>
|
||||
</div>
|
||||
{%- endblock -%}
|
||||
|
||||
{%- block data_widget_state scoped %}
|
||||
{% set div_id = uuid4() %}
|
||||
{% set datatype_list = output.data | filter_data_type %}
|
||||
{% set datatype = datatype_list[0]%}
|
||||
<div id="{{ div_id }}" class="output_subarea output_widget_state {{ extra_class }}">
|
||||
<script type="text/javascript">
|
||||
var element = $('#{{ div_id }}');
|
||||
</script>
|
||||
<script type="{{ datatype }}">
|
||||
{{ output.data[datatype] | json_dumps }}
|
||||
</script>
|
||||
</div>
|
||||
{%- endblock data_widget_state -%}
|
||||
|
||||
{%- block data_widget_view scoped %}
|
||||
{% set div_id = uuid4() %}
|
||||
{% set datatype_list = output.data | filter_data_type %}
|
||||
{% set datatype = datatype_list[0]%}
|
||||
<div id="{{ div_id }}" class="output_subarea output_widget_view {{ extra_class }}">
|
||||
<script type="text/javascript">
|
||||
var element = $('#{{ div_id }}');
|
||||
</script>
|
||||
<script type="{{ datatype }}">
|
||||
{{ output.data[datatype] | json_dumps }}
|
||||
</script>
|
||||
</div>
|
||||
{%- endblock data_widget_view -%}
|
||||
|
||||
{%- block footer %}
|
||||
{% set mimetype = 'application/vnd.jupyter.widget-state+json'%}
|
||||
{% if mimetype in nb.metadata.get("widgets",{})%}
|
||||
<script type="{{ mimetype }}">
|
||||
{{ nb.metadata.widgets[mimetype] | json_dumps }}
|
||||
</script>
|
||||
{% endif %}
|
||||
{{ super() }}
|
||||
{%- endblock footer-%}
|
13
venv/share/jupyter/nbconvert/templates/classic/conf.json
Normal file
13
venv/share/jupyter/nbconvert/templates/classic/conf.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"base_template": "base",
|
||||
"mimetypes": {
|
||||
"text/html": true
|
||||
},
|
||||
"preprocessors": {
|
||||
"100-pygments": {
|
||||
"type": "nbconvert.preprocessors.CSSHTMLHeaderPreprocessor",
|
||||
"enabled": true,
|
||||
"style": "default"
|
||||
}
|
||||
}
|
||||
}
|
103
venv/share/jupyter/nbconvert/templates/classic/index.html.j2
Normal file
103
venv/share/jupyter/nbconvert/templates/classic/index.html.j2
Normal file
|
@ -0,0 +1,103 @@
|
|||
{%- extends 'base.html.j2' -%}
|
||||
{% from 'mathjax.html.j2' import mathjax %}
|
||||
{% from 'jupyter_widgets.html.j2' import jupyter_widgets %}
|
||||
|
||||
{%- block header -%}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{%- block html_head -%}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{% set nb_title = nb.metadata.get('title', '') or resources['metadata']['name'] %}
|
||||
<title>{{nb_title}}</title>
|
||||
|
||||
{%- block html_head_js -%}
|
||||
{%- block html_head_js_jquery -%}
|
||||
<script src="{{ resources.jquery_url }}"></script>
|
||||
{%- endblock html_head_js_jquery -%}
|
||||
{%- block html_head_js_requirejs -%}
|
||||
<script src="{{ resources.require_js_url }}"></script>
|
||||
{%- endblock html_head_js_requirejs -%}
|
||||
{%- endblock html_head_js -%}
|
||||
|
||||
{% block jupyter_widgets %}
|
||||
{%- if "widgets" in nb.metadata -%}
|
||||
{{ jupyter_widgets(resources.jupyter_widgets_base_url, resources.html_manager_semver_range) }}
|
||||
{%- endif -%}
|
||||
{% endblock jupyter_widgets %}
|
||||
|
||||
{% for css in resources.inlining.css -%}
|
||||
<style type="text/css">
|
||||
{{ css }}
|
||||
</style>
|
||||
{% endfor %}
|
||||
|
||||
{% block notebook_css %}
|
||||
{{ resources.include_css("static/style.css") }}
|
||||
<style type="text/css">
|
||||
/* Overrides of notebook CSS for static HTML export */
|
||||
body {
|
||||
overflow: visible;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
div#notebook {
|
||||
overflow: visible;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
{%- if resources.global_content_filter.no_prompt-%}
|
||||
div#notebook-container{
|
||||
padding: 6ex 12ex 8ex 12ex;
|
||||
}
|
||||
{%- endif -%}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
div.cell {
|
||||
display: block;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
div.output_wrapper {
|
||||
display: block;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
div.output {
|
||||
display: block;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% endblock notebook_css %}
|
||||
|
||||
{{ mathjax() }}
|
||||
|
||||
{%- block html_head_css -%}
|
||||
{%- endblock html_head_css -%}
|
||||
|
||||
{%- endblock html_head -%}
|
||||
</head>
|
||||
{%- endblock header -%}
|
||||
|
||||
{% block body_header %}
|
||||
<body>
|
||||
<div tabindex="-1" id="notebook" class="border-box-sizing">
|
||||
<div class="container" id="notebook-container">
|
||||
{% endblock body_header %}
|
||||
|
||||
{% block body_footer %}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock body_footer %}
|
||||
|
||||
{% block footer %}
|
||||
{% block footer_js %}
|
||||
{% endblock footer_js %}
|
||||
{{ super() }}
|
||||
</html>
|
||||
{% endblock footer %}
|
||||
|
12935
venv/share/jupyter/nbconvert/templates/classic/static/style.css
Normal file
12935
venv/share/jupyter/nbconvert/templates/classic/static/style.css
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue