j1-template 2022.2.3 → 2022.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/modules/navigator/generator.html +1 -1
- data/assets/data/cookieconsent.html +4 -4
- data/assets/data/nbinteract.html +128 -0
- data/assets/data/quicklinks.html +15 -0
- data/assets/data/translator.html +15 -15
- data/assets/themes/j1/adapter/js/analytics.js +13 -13
- data/assets/themes/j1/adapter/js/cookieConsent.js +1 -1
- data/assets/themes/j1/adapter/js/mmenu.js +25 -3
- data/assets/themes/j1/adapter/js/navigator.js +2 -2
- data/assets/themes/j1/adapter/js/nbinteract.js +588 -146
- data/assets/themes/j1/core/css/themes/unodark/bootstrap.css +30 -40
- data/assets/themes/j1/core/css/themes/unodark/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +50 -66
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +15 -4
- data/assets/themes/j1/core/js/template.min.js +1 -1
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/carousel/css/theme/uno.css +5 -0
- data/assets/themes/j1/modules/carousel/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +1 -0
- data/assets/themes/j1/modules/justifiedGallery/css/justifiedGallery.css +6 -0
- data/assets/themes/j1/modules/justifiedGallery/css/justifiedGallery.min.css +1 -1
- data/assets/themes/j1/modules/mmenuLight/css/mmenu-light.css +2 -2
- data/assets/themes/j1/modules/mmenuLight/css/mmenu-light.min.css +1 -2
- data/assets/themes/j1/modules/nbInteract/css/theme/uno/nbinteract-core.css +33 -33
- data/assets/themes/j1/modules/nbInteract/css/theme/uno/nbinteract-core.min.css +1 -1
- data/assets/themes/j1/modules/nbInteract/js/nbinteract/nbinteract-core.js +1 -1
- data/assets/themes/j1/modules/nbInteract/js/nbinteract/nbinteract-core.js.map +1 -1
- data/assets/themes/j1/modules/nbInteract/js/nbinteract/nbinteract-core.min.js +1 -1
- data/assets/themes/j1/modules/nbInteract/js/requireJS/require.js +2068 -0
- data/assets/themes/j1/modules/nbInteract/js/requireJS/require.min.js +36 -0
- data/assets/themes/j1/modules/plotly/LICENSE +21 -0
- data/assets/themes/j1/modules/plotly/README.md +32 -0
- data/assets/themes/j1/modules/plotly/js/plotly.js +265345 -0
- data/assets/themes/j1/modules/plotly/js/plotly.min.js +65 -0
- data/assets/themes/j1/modules/requirejs/LICENSE +45 -0
- data/assets/themes/j1/modules/requirejs/README.md +79 -0
- data/assets/themes/j1/modules/requirejs/js/require.js +2068 -0
- data/assets/themes/j1/modules/requirejs/js/require.min.js +36 -0
- data/lib/j1/version.rb +3 -3
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/modules/analytics.yml +8 -23
- data/lib/starter_web/_data/modules/defaults/analytics.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +55 -42
- data/lib/starter_web/_data/modules/defaults/navigator.yml +4 -0
- data/lib/starter_web/_data/modules/defaults/nbinteract.yml +95 -1
- data/lib/starter_web/_data/modules/defaults/translator.yml +24 -12
- data/lib/starter_web/_data/modules/justifiedGallery.yml +14 -8
- data/lib/starter_web/_data/modules/navigator_menu.yml +6 -3
- data/lib/starter_web/_data/modules/nbinteract.yml +12 -48
- data/lib/starter_web/_data/resources.yml +56 -0
- data/lib/starter_web/_includes/attributes.asciidoc +11 -0
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/assets/images/pages/nbinteract/mandelbrot-menge-1920x1200.jpg +0 -0
- data/lib/starter_web/assets/images/pages/nbinteract/mandelbrot-menge.png +0 -0
- data/lib/starter_web/assets/images/pages/nbinteract/manual/nbi_bar.jpg +0 -0
- data/lib/starter_web/assets/images/pages/nbinteract/manual/nbi_hist.jpg +0 -0
- data/lib/starter_web/assets/images/pages/nbinteract/manual/nbi_line.jpg +0 -0
- data/lib/starter_web/assets/images/pages/nbinteract/manual/nbi_multiple_choice.jpg +0 -0
- data/lib/starter_web/assets/images/pages/nbinteract/manual/nbi_scatter.jpg +0 -0
- data/lib/starter_web/assets/images/pages/nbinteract/manual/nbi_scatter_drag.jpg +0 -0
- data/lib/starter_web/assets/images/pages/nbinteract/manual/nbi_short_answer.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/kick-it-old-school-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/nye-party-shop-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/stay-colorful-poster.jpg +0 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-wiki-series.adoc +1 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-wiki-series.adoc +1 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-wiki-series.adoc +1 -0
- data/lib/starter_web/package.json +1 -2
- data/lib/starter_web/pages/public/jupyter/docs/j1-nbinteract-doc.adoc +34 -20
- data/lib/starter_web/pages/public/jupyter/docs/nbi-widget-manual.adoc +154 -7
- data/lib/starter_web/pages/public/jupyter/docs/nbinteract-doc.adoc +24 -19
- data/lib/starter_web/pages/public/jupyter/examples/j1-circular-times-table.adoc +135 -0
- data/lib/starter_web/pages/public/jupyter/examples/j1-interactive-widgets.adoc +8 -5
- data/lib/starter_web/pages/public/jupyter/examples/j1-odes-in-python.adoc +15 -7
- data/lib/starter_web/pages/public/jupyter/examples/j1-testing-plotly.adoc +94 -0
- data/lib/starter_web/pages/public/jupyter/examples/j1_climate-change-forecast.adoc +8 -8
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-checkpoint.ipynb +12387 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_climate_change_forecast-checkpoint.ipynb +1058 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/{j1_ode_selected.ipynb → .ipynb_checkpoints/j1_docs_example_dynamic-checkpoint.ipynb} +1 -1
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-checkpoint.ipynb +26 -26
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/{j1_altair_interactive_test-checkpoint.ipynb → j1_ode_selected-checkpoint.ipynb} +99 -318
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_odes_in_python-checkpoint.ipynb +15227 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/factor_by_factor.mp4 +0 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_circular_times_table.ipynb +12387 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_climate_change_forecast.ipynb +2 -2
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_docs_example_dynamic.ipynb +1 -1
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_interactive_widgets.ipynb +26 -26
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/j1_odes_in_python.ipynb +15227 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/line_by_line.mp4 +0 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/point_by_point.mp4 +0 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_central_limit_theorem-checkpoint.ipynb +247 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_variability_of_the_sample_mean-checkpoint.ipynb +323 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_graphing-checkpoint.ipynb +387 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_layout-checkpoint.ipynb +384 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_interact-checkpoint.ipynb +254 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_monty_hall-checkpoint.ipynb +732 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/nbi_docs_examples_central_limit_theorem.ipynb +1 -2
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/nbi_docs_recipes_graphing.ipynb +18 -18
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/nbi_docs_tutorial_monty_hall.ipynb +25 -26
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_circular_times_table.html +746 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_climate_change_forecast.html +2 -2
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_docs_example_dynamic.html +186 -186
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_interactive_widgets.html +3 -3
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_odes_in_python.html +955 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_recipes_graphing.html +473 -473
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/nbi_docs_recipes_interactive_questions.html +242 -242
- data/lib/starter_web/pages/public/jupyter/services/binderhub.adoc +3 -3
- data/lib/starter_web/pages/public/jupyter/services/jupyterhub.adoc +6 -7
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +9 -15
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +1 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +117 -12
- data/lib/starter_web/pages/public/se/se-fake.adoc +47 -0
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +45 -22
- data/lib/starter_web/assets/videos/gallery/adriana-lima-poster.jpg +0 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/binder/binder-launches.ipynb +0 -385
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/Untitled-checkpoint.ipynb +0 -6
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/binder-launches-checkpoint.ipynb +0 -385
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/google_altair-checkpoint.ipynb +0 -33
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/binder-launches.ipynb +0 -411
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/binder-launches.html +0 -670
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/j1_ode_selected.html +0 -186
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/excel.py +0 -55
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/ggplot.py +0 -108
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/ggplot2.py +0 -108
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/husky.py +0 -121
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/latimes.py +0 -149
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/pcolor.py +0 -6
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/quartz.py +0 -55
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/spacy_base.py +0 -94
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/spacy_mono.py +0 -158
- data/lib/starter_web/pages/public/jupyter/notebooks/themes/altair/sunsentinel.py +0 -125
@@ -1,242 +1,242 @@
|
|
1
|
-
<div class="cell text_cell">
|
2
|
-
<button class="js-nbinteract-widget">
|
3
|
-
Loading widgets...
|
4
|
-
</button>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
10
|
-
<div class="text_cell_render border-box-sizing rendered_html">
|
11
|
-
<h3 id="Interactive-Questions">Interactive Questions<a class="anchor-link" href="#Interactive-Questions">¶</a></h3><p>nbinteract also provides built-in methods to easily create multiple choice and short answer questions.</p>
|
12
|
-
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
<div class="
|
20
|
-
cell border-box-sizing code_cell rendered">
|
21
|
-
<div class="input">
|
22
|
-
|
23
|
-
<div class="inner_cell">
|
24
|
-
<div class="input_area">
|
25
|
-
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">nbinteract</span> <span class="k">as</span> <span class="nn">nbi</span>
|
26
|
-
</pre></div>
|
27
|
-
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
|
32
|
-
</div>
|
33
|
-
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
34
|
-
<div class="text_cell_render border-box-sizing rendered_html">
|
35
|
-
<h4 id="nbinteract.multiple_choice">nbinteract.multiple_choice<a class="anchor-link" href="#nbinteract.multiple_choice">¶</a></h4><p><code>nbinteract.multiple_choice</code> takes a question, a list of possible answer choices, and the correct answer. Clicking the buttons shows whether the choice was correct.</p>
|
36
|
-
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<div class="
|
44
|
-
cell border-box-sizing code_cell rendered">
|
45
|
-
<div class="input">
|
46
|
-
|
47
|
-
<div class="inner_cell">
|
48
|
-
<div class="input_area">
|
49
|
-
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">multiple_choice</span><span class="p">(</span><span class="n">question</span><span class="o">=</span><span class="s2">"What is 10 + 2 * 5?"</span><span class="p">,</span>
|
50
|
-
<span class="n">choices</span><span class="o">=</span><span class="p">[</span><span class="s1">'12'</span><span class="p">,</span> <span class="s1">'60'</span><span class="p">,</span> <span class="s1">'20'</span><span class="p">],</span>
|
51
|
-
<span class="n">answers</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
|
52
|
-
</pre></div>
|
53
|
-
|
54
|
-
</div>
|
55
|
-
</div>
|
56
|
-
</div>
|
57
|
-
|
58
|
-
<div class="output_wrapper">
|
59
|
-
<div class="output">
|
60
|
-
|
61
|
-
|
62
|
-
<div class="output_area">
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
<div class="output_subarea output_widget_view ">
|
69
|
-
<button class="js-nbinteract-widget">
|
70
|
-
Loading widgets...
|
71
|
-
</button>
|
72
|
-
</div>
|
73
|
-
|
74
|
-
</div>
|
75
|
-
|
76
|
-
</div>
|
77
|
-
</div>
|
78
|
-
|
79
|
-
</div>
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
<div class="
|
84
|
-
cell border-box-sizing code_cell rendered">
|
85
|
-
<div class="input">
|
86
|
-
|
87
|
-
<div class="inner_cell">
|
88
|
-
<div class="input_area">
|
89
|
-
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">multiple_choice</span><span class="p">(</span><span class="n">question</span><span class="o">=</span><span class="s2">"Select all prime numbers."</span><span class="p">,</span>
|
90
|
-
<span class="n">choices</span><span class="o">=</span><span class="p">[</span><span class="s1">'12'</span><span class="p">,</span> <span class="s1">'3'</span><span class="p">,</span> <span class="s1">'31'</span><span class="p">],</span>
|
91
|
-
<span class="n">answers</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">])</span>
|
92
|
-
</pre></div>
|
93
|
-
|
94
|
-
</div>
|
95
|
-
</div>
|
96
|
-
</div>
|
97
|
-
|
98
|
-
<div class="output_wrapper">
|
99
|
-
<div class="output">
|
100
|
-
|
101
|
-
|
102
|
-
<div class="output_area">
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
<div class="output_subarea output_widget_view ">
|
109
|
-
<button class="js-nbinteract-widget">
|
110
|
-
Loading widgets...
|
111
|
-
</button>
|
112
|
-
</div>
|
113
|
-
|
114
|
-
</div>
|
115
|
-
|
116
|
-
</div>
|
117
|
-
</div>
|
118
|
-
|
119
|
-
</div>
|
120
|
-
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
121
|
-
<div class="text_cell_render border-box-sizing rendered_html">
|
122
|
-
<h4 id="nbinteract.short_answer">nbinteract.short_answer<a class="anchor-link" href="#nbinteract.short_answer">¶</a></h4><p><code>nbinteract.short_answer</code> takes a question and an answer. The answer can either be a string, a list of strings, or a function that returns <code>True</code> when called with the user's input. If the function errors, an error message will be displayed.</p>
|
123
|
-
|
124
|
-
</div>
|
125
|
-
</div>
|
126
|
-
</div>
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<div class="
|
131
|
-
cell border-box-sizing code_cell rendered">
|
132
|
-
<div class="input">
|
133
|
-
|
134
|
-
<div class="inner_cell">
|
135
|
-
<div class="input_area">
|
136
|
-
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">short_answer</span><span class="p">(</span><span class="s1">'What is 1+1?'</span><span class="p">,</span> <span class="n">answers</span><span class="o">=</span><span class="s1">'2'</span><span class="p">,</span> <span class="n">explanation</span><span class="o">=</span><span class="s1">'1+1 is 2'</span><span class="p">)</span>
|
137
|
-
</pre></div>
|
138
|
-
|
139
|
-
</div>
|
140
|
-
</div>
|
141
|
-
</div>
|
142
|
-
|
143
|
-
<div class="output_wrapper">
|
144
|
-
<div class="output">
|
145
|
-
|
146
|
-
|
147
|
-
<div class="output_area">
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
<div class="output_subarea output_widget_view ">
|
154
|
-
<button class="js-nbinteract-widget">
|
155
|
-
Loading widgets...
|
156
|
-
</button>
|
157
|
-
</div>
|
158
|
-
|
159
|
-
</div>
|
160
|
-
|
161
|
-
</div>
|
162
|
-
</div>
|
163
|
-
|
164
|
-
</div>
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
<div class="
|
169
|
-
cell border-box-sizing code_cell rendered">
|
170
|
-
<div class="input">
|
171
|
-
|
172
|
-
<div class="inner_cell">
|
173
|
-
<div class="input_area">
|
174
|
-
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">short_answer</span><span class="p">(</span><span class="s1">'Enter the first name of a member of the Beatles.'</span><span class="p">,</span>
|
175
|
-
<span class="p">[</span><span class="s1">'John'</span><span class="p">,</span> <span class="s1">'Paul'</span><span class="p">,</span> <span class="s1">'George'</span><span class="p">,</span> <span class="s1">'Ringo'</span><span class="p">])</span>
|
176
|
-
</pre></div>
|
177
|
-
|
178
|
-
</div>
|
179
|
-
</div>
|
180
|
-
</div>
|
181
|
-
|
182
|
-
<div class="output_wrapper">
|
183
|
-
<div class="output">
|
184
|
-
|
185
|
-
|
186
|
-
<div class="output_area">
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
<div class="output_subarea output_widget_view ">
|
193
|
-
<button class="js-nbinteract-widget">
|
194
|
-
Loading widgets...
|
195
|
-
</button>
|
196
|
-
</div>
|
197
|
-
|
198
|
-
</div>
|
199
|
-
|
200
|
-
</div>
|
201
|
-
</div>
|
202
|
-
|
203
|
-
</div>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
<div class="
|
208
|
-
cell border-box-sizing code_cell rendered">
|
209
|
-
<div class="input">
|
210
|
-
|
211
|
-
<div class="inner_cell">
|
212
|
-
<div class="input_area">
|
213
|
-
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">short_answer</span><span class="p">(</span><span class="s1">'Enter an even number.'</span><span class="p">,</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">int</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
|
214
|
-
</pre></div>
|
215
|
-
|
216
|
-
</div>
|
217
|
-
</div>
|
218
|
-
</div>
|
219
|
-
|
220
|
-
<div class="output_wrapper">
|
221
|
-
<div class="output">
|
222
|
-
|
223
|
-
|
224
|
-
<div class="output_area">
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
<div class="output_subarea output_widget_view ">
|
231
|
-
<button class="js-nbinteract-widget">
|
232
|
-
Loading widgets...
|
233
|
-
</button>
|
234
|
-
</div>
|
235
|
-
|
236
|
-
</div>
|
237
|
-
|
238
|
-
</div>
|
239
|
-
</div>
|
240
|
-
|
241
|
-
</div>
|
242
|
-
|
1
|
+
<div class="cell text_cell">
|
2
|
+
<button class="js-nbinteract-widget">
|
3
|
+
Loading widgets...
|
4
|
+
</button>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
10
|
+
<div class="text_cell_render border-box-sizing rendered_html">
|
11
|
+
<h3 id="Interactive-Questions">Interactive Questions<a class="anchor-link" href="#Interactive-Questions">¶</a></h3><p>nbinteract also provides built-in methods to easily create multiple choice and short answer questions.</p>
|
12
|
+
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
<div class="
|
20
|
+
cell border-box-sizing code_cell rendered">
|
21
|
+
<div class="input">
|
22
|
+
|
23
|
+
<div class="inner_cell">
|
24
|
+
<div class="input_area">
|
25
|
+
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">nbinteract</span> <span class="k">as</span> <span class="nn">nbi</span>
|
26
|
+
</pre></div>
|
27
|
+
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
</div>
|
33
|
+
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
34
|
+
<div class="text_cell_render border-box-sizing rendered_html">
|
35
|
+
<h4 id="nbinteract.multiple_choice">nbinteract.multiple_choice<a class="anchor-link" href="#nbinteract.multiple_choice">¶</a></h4><p><code>nbinteract.multiple_choice</code> takes a question, a list of possible answer choices, and the correct answer. Clicking the buttons shows whether the choice was correct.</p>
|
36
|
+
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
<div class="
|
44
|
+
cell border-box-sizing code_cell rendered">
|
45
|
+
<div class="input">
|
46
|
+
|
47
|
+
<div class="inner_cell">
|
48
|
+
<div class="input_area">
|
49
|
+
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">multiple_choice</span><span class="p">(</span><span class="n">question</span><span class="o">=</span><span class="s2">"What is 10 + 2 * 5?"</span><span class="p">,</span>
|
50
|
+
<span class="n">choices</span><span class="o">=</span><span class="p">[</span><span class="s1">'12'</span><span class="p">,</span> <span class="s1">'60'</span><span class="p">,</span> <span class="s1">'20'</span><span class="p">],</span>
|
51
|
+
<span class="n">answers</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
|
52
|
+
</pre></div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="output_wrapper">
|
59
|
+
<div class="output">
|
60
|
+
|
61
|
+
|
62
|
+
<div class="output_area">
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<div class="output_subarea output_widget_view ">
|
69
|
+
<button class="js-nbinteract-widget">
|
70
|
+
Loading widgets...
|
71
|
+
</button>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
</div>
|
75
|
+
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
<div class="
|
84
|
+
cell border-box-sizing code_cell rendered">
|
85
|
+
<div class="input">
|
86
|
+
|
87
|
+
<div class="inner_cell">
|
88
|
+
<div class="input_area">
|
89
|
+
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">multiple_choice</span><span class="p">(</span><span class="n">question</span><span class="o">=</span><span class="s2">"Select all prime numbers."</span><span class="p">,</span>
|
90
|
+
<span class="n">choices</span><span class="o">=</span><span class="p">[</span><span class="s1">'12'</span><span class="p">,</span> <span class="s1">'3'</span><span class="p">,</span> <span class="s1">'31'</span><span class="p">],</span>
|
91
|
+
<span class="n">answers</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">])</span>
|
92
|
+
</pre></div>
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
|
98
|
+
<div class="output_wrapper">
|
99
|
+
<div class="output">
|
100
|
+
|
101
|
+
|
102
|
+
<div class="output_area">
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<div class="output_subarea output_widget_view ">
|
109
|
+
<button class="js-nbinteract-widget">
|
110
|
+
Loading widgets...
|
111
|
+
</button>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
</div>
|
120
|
+
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
|
121
|
+
<div class="text_cell_render border-box-sizing rendered_html">
|
122
|
+
<h4 id="nbinteract.short_answer">nbinteract.short_answer<a class="anchor-link" href="#nbinteract.short_answer">¶</a></h4><p><code>nbinteract.short_answer</code> takes a question and an answer. The answer can either be a string, a list of strings, or a function that returns <code>True</code> when called with the user's input. If the function errors, an error message will be displayed.</p>
|
123
|
+
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
<div class="
|
131
|
+
cell border-box-sizing code_cell rendered">
|
132
|
+
<div class="input">
|
133
|
+
|
134
|
+
<div class="inner_cell">
|
135
|
+
<div class="input_area">
|
136
|
+
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">short_answer</span><span class="p">(</span><span class="s1">'What is 1+1?'</span><span class="p">,</span> <span class="n">answers</span><span class="o">=</span><span class="s1">'2'</span><span class="p">,</span> <span class="n">explanation</span><span class="o">=</span><span class="s1">'1+1 is 2'</span><span class="p">)</span>
|
137
|
+
</pre></div>
|
138
|
+
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
|
143
|
+
<div class="output_wrapper">
|
144
|
+
<div class="output">
|
145
|
+
|
146
|
+
|
147
|
+
<div class="output_area">
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<div class="output_subarea output_widget_view ">
|
154
|
+
<button class="js-nbinteract-widget">
|
155
|
+
Loading widgets...
|
156
|
+
</button>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
</div>
|
160
|
+
|
161
|
+
</div>
|
162
|
+
</div>
|
163
|
+
|
164
|
+
</div>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
<div class="
|
169
|
+
cell border-box-sizing code_cell rendered">
|
170
|
+
<div class="input">
|
171
|
+
|
172
|
+
<div class="inner_cell">
|
173
|
+
<div class="input_area">
|
174
|
+
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">short_answer</span><span class="p">(</span><span class="s1">'Enter the first name of a member of the Beatles.'</span><span class="p">,</span>
|
175
|
+
<span class="p">[</span><span class="s1">'John'</span><span class="p">,</span> <span class="s1">'Paul'</span><span class="p">,</span> <span class="s1">'George'</span><span class="p">,</span> <span class="s1">'Ringo'</span><span class="p">])</span>
|
176
|
+
</pre></div>
|
177
|
+
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div class="output_wrapper">
|
183
|
+
<div class="output">
|
184
|
+
|
185
|
+
|
186
|
+
<div class="output_area">
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
<div class="output_subarea output_widget_view ">
|
193
|
+
<button class="js-nbinteract-widget">
|
194
|
+
Loading widgets...
|
195
|
+
</button>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
</div>
|
199
|
+
|
200
|
+
</div>
|
201
|
+
</div>
|
202
|
+
|
203
|
+
</div>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
<div class="
|
208
|
+
cell border-box-sizing code_cell rendered">
|
209
|
+
<div class="input">
|
210
|
+
|
211
|
+
<div class="inner_cell">
|
212
|
+
<div class="input_area">
|
213
|
+
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">nbi</span><span class="o">.</span><span class="n">short_answer</span><span class="p">(</span><span class="s1">'Enter an even number.'</span><span class="p">,</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">int</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
|
214
|
+
</pre></div>
|
215
|
+
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div class="output_wrapper">
|
221
|
+
<div class="output">
|
222
|
+
|
223
|
+
|
224
|
+
<div class="output_area">
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<div class="output_subarea output_widget_view ">
|
231
|
+
<button class="js-nbinteract-widget">
|
232
|
+
Loading widgets...
|
233
|
+
</button>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
</div>
|
237
|
+
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
</div>
|
242
|
+
|
@@ -58,7 +58,7 @@ resource_options:
|
|
58
58
|
// :page--attr: <attr-value>
|
59
59
|
:badges-enabled: false
|
60
60
|
:binder-badge-enabled: false
|
61
|
-
:binder-app-launch--tree: https://mybinder.org/v2/gh/jekyll-one/
|
61
|
+
:binder-app-launch--tree: https://mybinder.org/v2/gh/jekyll-one/j1-binder-repo/main?urlpath=/tree
|
62
62
|
:jupyterlab-docs--getting-started: https://jupyterlab.readthedocs.io/en/latest/getting_started/starting.html
|
63
63
|
:jupyter-discourse--startup-time: https://discourse.jupyter.org/t/how-to-reduce-mybinder-org-repository-startup-time/4956
|
64
64
|
|
@@ -229,7 +229,7 @@ session opening the path `notebooks`:
|
|
229
229
|
|
230
230
|
[source, txt]
|
231
231
|
----
|
232
|
-
https://mybinder.org/v2/gh/jekyll-one/
|
232
|
+
https://mybinder.org/v2/gh/jekyll-one/j1-binder-repo/main?filepath=notebooks
|
233
233
|
----
|
234
234
|
|
235
235
|
The filepath notebooks above is how JupyterLab directs you to a specific file
|
@@ -252,7 +252,7 @@ like so:
|
|
252
252
|
.Example
|
253
253
|
[source, txt]
|
254
254
|
----
|
255
|
-
https://mybinder.org/v2/gh/jekyll-one/
|
255
|
+
https://mybinder.org/v2/gh/jekyll-one/j1-binder-repo/main?urlpath=/tree
|
256
256
|
----
|
257
257
|
|
258
258
|
|
@@ -58,13 +58,12 @@ resource_options:
|
|
58
58
|
|
59
59
|
// Set (local) page attributes here
|
60
60
|
// -----------------------------------------------------------------------------
|
61
|
-
// :page--attr:
|
62
|
-
:badges-enabled:
|
63
|
-
:binder-badge-enabled:
|
64
|
-
:binder--home:
|
65
|
-
:binder--docs:
|
66
|
-
:url-jupyter-server-api--swagger:
|
67
|
-
|
61
|
+
// :page--attr: <attr-value>
|
62
|
+
:badges-enabled: false
|
63
|
+
:binder-badge-enabled: false
|
64
|
+
:binder--home: https://mybinder.org/
|
65
|
+
:binder--docs: https://mybinder.readthedocs.io/en/latest/
|
66
|
+
:url-jupyter-server-api--swagger: https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/jupyter_server/master/jupyter_server/services/api/api.yaml#/
|
68
67
|
|
69
68
|
// Load Liquid procedures
|
70
69
|
// -----------------------------------------------------------------------------
|
@@ -230,4 +230,4 @@ Hopefully, you've enjoyed exploring the possibilities J1 offers for managing
|
|
230
230
|
and displaying digital image content. But much, much more can the J1 do for
|
231
231
|
your web.
|
232
232
|
|
233
|
-
Incredible? See the next example page link:{url-roundtrip--present-videos}[Present
|
233
|
+
Incredible? See the next example page link:{url-roundtrip--present-videos}[Present Videos].
|
@@ -197,13 +197,11 @@ right choice.
|
|
197
197
|
|
198
198
|
The community at link:{url-youtube--home}[YouTube, {browser-window--new}] is
|
199
199
|
large, with over 1 billion users that watch hundreds of millions of hours of
|
200
|
-
content every day. The
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
Germany and a real classic channel *Carpool Karaoke* from the frontman James
|
206
|
-
Corden of *The Late Late Show* at CBS, Los Angeles.
|
200
|
+
content every day. The number of channels on YouTube is enormous. For TV
|
201
|
+
Stations, it's a must to publish videos of their shows on YouTube. Find below
|
202
|
+
a current gallery from *The Voice Kids* (SAT.1) Germany and a real classic
|
203
|
+
channel *Carpool Karaoke* from the frontman James Corden of *The Late Late Show*
|
204
|
+
at CBS, Los Angeles.
|
207
205
|
|
208
206
|
.The Voice Kids, Germany 2021
|
209
207
|
gallery::jg_video_online_youtube_2[role="mb-5"]
|
@@ -225,9 +223,7 @@ Each membership has varied storage limits, but the free plan offers sufficient
|
|
225
223
|
space for private projects to present video content without advertising.
|
226
224
|
|
227
225
|
NOTE: A great plus using Vimeo is that *no advertising* is used on that
|
228
|
-
platform.
|
229
|
-
link:{url-alexa-scores--vimeo}[Alexa Internet, {browser-window--new}]
|
230
|
-
ranking from here.
|
226
|
+
platform.
|
231
227
|
|
232
228
|
.Vimeo Video Gallery - Fashion
|
233
229
|
gallery::jg_video_online_vimeo[role="mb-5"]
|
@@ -249,8 +245,7 @@ Dailymotion allows users to search videos by *tags*, topic *channels*, or
|
|
249
245
|
user-created *groups*. Users can upload videos of up to 2 gigabytes and a
|
250
246
|
length of 60 minutes. If a user is a MotionMaker or MotionPartner, a program
|
251
247
|
for particularly creative users or partners, they can upload videos of
|
252
|
-
unlimited length.
|
253
|
-
link:{url-alexa-scores--dailymotion}[Alexa Internet, {browser-window--new}].
|
248
|
+
unlimited length.
|
254
249
|
|
255
250
|
NOTE: Like YouTube, DailyMotion is a commercial platform using *advertising*
|
256
251
|
on all video content. On every video, an ad clip is presented of 15 to
|
@@ -267,9 +262,8 @@ Registered users can create a profile on VK and exchange information with
|
|
267
262
|
other users.
|
268
263
|
|
269
264
|
According to the operator, the platform has over 100 million active users,
|
270
|
-
but mainly in Russia, Ukraine, and other Russian spoken countries.
|
271
|
-
|
272
|
-
VK is among the most popular websites in Russia.
|
265
|
+
but mainly in Russia, Ukraine, and other Russian spoken countries. VK is
|
266
|
+
among the most popular websites in Russia.
|
273
267
|
|
274
268
|
NOTE: VK is accused of insufficient protection of personal data. The platform
|
275
269
|
is also openly criticized by neo-Nazi and neo-fascist Groups used without
|
@@ -252,4 +252,4 @@ J1 Template supports popular icons font sets like:
|
|
252
252
|
* Iconify
|
253
253
|
|
254
254
|
Would you like to learn more about icons? The next example page focus on what's
|
255
|
-
possible using link:{url-roundtrip--icon-fonts}[
|
255
|
+
possible using link:{url-roundtrip--icon-fonts}[Icon Fonts, {browser-window--new}].
|
@@ -549,4 +549,4 @@ manipulating font icons. Do you think these icon sets can fit your needs?
|
|
549
549
|
Using Iconify, for all topics, you will find a suitable icon. And it's simple.
|
550
550
|
|
551
551
|
To check more features of the template, go for the
|
552
|
-
link:{url-roundtrip--asciidoc-extensions}[Asciidoc
|
552
|
+
link:{url-roundtrip--asciidoc-extensions}[Asciidoc Extensions] made for J1!
|
@@ -749,5 +749,5 @@ The next preview is focussing on advanced Bootstrap Modals. The modals feature
|
|
749
749
|
is currently in beta status, but it is a great option to customize your
|
750
750
|
user dialogues using them!
|
751
751
|
|
752
|
-
Have a look for the link:{url-roundtrip--extended-modals}[BS
|
752
|
+
Have a look for the link:{url-roundtrip--extended-modals}[BS Modal Extensions]
|
753
753
|
feature of J1 Template.
|
@@ -87,7 +87,7 @@ needs some enhancement to display tables on low-resolution devices or smaller
|
|
87
87
|
|
88
88
|
The first version for improved responsive tables that scale better is available
|
89
89
|
for the J1 Template. Check out from here what the
|
90
|
-
link:{url-roundtrip--responsive-tables}[BS
|
90
|
+
link:{url-roundtrip--responsive-tables}[BS Table Extensions] can do!
|
91
91
|
|
92
92
|
// Include the modals HTML portion
|
93
93
|
// -----------------------------------------------------------------------------
|
@@ -419,4 +419,4 @@ An exciting feature may be the use of themes. But much, much more can the J1
|
|
419
419
|
do for your Web Site.
|
420
420
|
|
421
421
|
Check out what themes can do. Have a look at the
|
422
|
-
link:{url-roundtrip--themes}[BS
|
422
|
+
link:{url-roundtrip--themes}[BS Themes] feature!
|