j1-template 2022.2.2 → 2022.3.1
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/blocks/footer/boxes/contacts_box.proc +46 -18
- data/_includes/themes/j1/blocks/footer/boxes/links_box.proc +1 -0
- data/assets/data/fab.html +2 -2
- data/assets/data/footer.html +2 -2
- 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/nbinteract.js +366 -120
- 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 +85 -216
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +2 -2
- data/assets/themes/j1/core/js/template.js +1 -1
- 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/README.md +169 -0
- data/assets/themes/j1/modules/nbInteract/css/nbinteract-core.css +4 -0
- data/assets/themes/j1/modules/nbInteract/css/nbinteract-core.min.css +4 -0
- 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/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 +1 -1
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/blocks/defaults/footer.yml +25 -17
- data/lib/starter_web/_data/blocks/footer.yml +78 -65
- 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 +4 -1
- 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 +52 -18
- data/lib/starter_web/_includes/attributes.asciidoc +25 -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/images/pages/nbinteract/nbi-textbook-example.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/_includes/documents/j1_docs_example_static.asciidoc +232 -232
- data/lib/starter_web/pages/public/jupyter/docs/j1-nbinteract-doc.adoc +165 -149
- data/lib/starter_web/pages/public/jupyter/docs/nbi-widget-manual.adoc +156 -11
- data/lib/starter_web/pages/public/jupyter/docs/nbinteract-doc.adoc +11 -6
- data/lib/starter_web/pages/public/jupyter/examples/j1-circular-times-table.adoc +136 -0
- data/lib/starter_web/pages/public/jupyter/examples/j1-interactive-widgets.adoc +9 -5
- data/lib/starter_web/pages/public/jupyter/examples/j1-odes-in-python.adoc +16 -7
- data/lib/starter_web/pages/public/jupyter/examples/j1-testing-plotly.adoc +95 -0
- data/lib/starter_web/pages/public/jupyter/examples/j1_climate-change-forecast.adoc +4 -4
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/{algebra_with_sympy-checkpoint.ipynb → j1_circular_times_table-checkpoint.ipynb} +5190 -7291
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_climate_change_forecast-checkpoint.ipynb +2 -2
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.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 +170 -15
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_ode_selected-checkpoint.ipynb +1 -1
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_odes_in_python-checkpoint.ipynb +520 -111
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/factor_by_factor.mp4 +0 -0
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/{.ipynb_checkpoints/j1_algebra_with_sympy-checkpoint.ipynb → j1_circular_times_table.ipynb} +5178 -7308
- 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 +170 -15
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/{j1_ode_selected.ipynb → j1_odes_in_python.ipynb} +783 -34
- 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_recipes_interactive_questions-checkpoint.ipynb +185 -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_recipes_interactive_questions.ipynb +19 -22
- 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_interactive_widgets.html +217 -0
- 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_interactive_questions.html +1 -2
- data/lib/starter_web/pages/public/jupyter/{apis/binderhub-api.adoc → services/binderhub.adoc} +25 -28
- data/lib/starter_web/pages/public/jupyter/{apis/jupyterhub-api.adoc → services/jupyterhub.adoc} +8 -9
- 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 +12 -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 +41 -41
- data/lib/starter_web/_data/_resources.yml +0 -1668
- data/lib/starter_web/assets/images/pages/nbinteract/binderhub-architecture.png +0 -0
- 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/climate-change-forecast-checkpoint.ipynb +0 -916
- 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/.ipynb_checkpoints/ipympl_test_plots-checkpoint.ipynb +0 -14517
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_interactive-checkpoint.ipynb +0 -16493
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_interactive_test-checkpoint.ipynb +0 -14697
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_visualization-checkpoint.ipynb +0 -15358
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_altair_visualization_full-checkpoint.ipynb +0 -2576
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_climate_change_forecast.ipynb +0 -1060
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_docs_hist-checkpoint.ipynb +0 -98
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive-checkpoint.ipynb +0 -560
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_ipympl_test_plots-checkpoint.ipynb +0 -14511
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_pandas_creating_reading_and_writing-checkpoint.ipynb +0 -328
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_recipes_layout-checkpoint.ipynb +0 -341
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/nbi_docs_recipes_graphing-checkpoint.ipynb +0 -98
- data/lib/starter_web/pages/public/jupyter/notebooks/j1/binder-launches.ipynb +0 -411
- data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_correlation-checkpoint.ipynb +0 -651
- data/lib/starter_web/pages/public/jupyter/notebooks/textbooks/binder-launches.html +0 -546
- 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,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: J1 NBI
|
3
|
-
tagline:
|
3
|
+
tagline: jupyter notebook integration
|
4
4
|
date: 2022-04-17 00:00:00
|
5
5
|
description: >
|
6
6
|
The package nbinteract aims to enable authors and educators to create and
|
@@ -60,11 +60,12 @@ resource_options:
|
|
60
60
|
|
61
61
|
// Set (local) page attributes here
|
62
62
|
// -----------------------------------------------------------------------------
|
63
|
-
// :page--attr:
|
64
|
-
:binder-badges-enabled:
|
65
|
-
:binder--home:
|
66
|
-
:binder--docs:
|
67
|
-
:
|
63
|
+
// :page--attr: <attr-value>
|
64
|
+
:binder-badges-enabled: true
|
65
|
+
:binder--home: https://mybinder.org/
|
66
|
+
:binder--docs: https://mybinder.readthedocs.io/en/latest/
|
67
|
+
:github-repo--binderhub: https://github.com/jupyterhub/binderhub
|
68
|
+
:binder-app-launch--tree: https://mybinder.org/v2/gh/jekyll-one/j1-binder-repo/main?urlpath=/tree
|
68
69
|
|
69
70
|
// Load Liquid procedures
|
70
71
|
// -----------------------------------------------------------------------------
|
@@ -94,6 +95,142 @@ endif::[]
|
|
94
95
|
|
95
96
|
// info: https://en.wikipedia.org/wiki/Galileo_Galilei
|
96
97
|
|
98
|
+
CAUTION: Each interactive element presented on this page uses *time-consuming*
|
99
|
+
operations that take a while to finish. The images and the interactive
|
100
|
+
elements are built through a backend in the cloud. Please be patient
|
101
|
+
to see the results.
|
102
|
+
|
103
|
+
The Jupyter Project is a non-profit organization founded in 2014 by
|
104
|
+
_Fernando Perez_. The Jupyter project supports interactive scientific
|
105
|
+
Data evaluations and scientific calculations. The main applications provided
|
106
|
+
by the Jupyter Project are:
|
107
|
+
|
108
|
+
* Jupyter Notebook (JN)
|
109
|
+
* JupyterHub (JH)
|
110
|
+
|
111
|
+
NOTE: The name _Jupyter_ refers to the three main programming languages
|
112
|
+
_Julia_, _Python_ and _R_ supported by the Jupyter Notebook App. The
|
113
|
+
name _Jupyter_ is a homage to the notebook entries by _Galileo Galilei_
|
114
|
+
on the discovery of the moons of Jupiter, where he made his observations
|
115
|
+
and the measurement data together.
|
116
|
+
|
117
|
+
Jupyter Notebook (JN) is an open source web application that allows data
|
118
|
+
scientists to create and share documents that include live code, equations,
|
119
|
+
and other multimedia resources. JN combines two components:
|
120
|
+
|
121
|
+
Web application::
|
122
|
+
a browser-based tool for interactive authoring of documents which combine
|
123
|
+
explanatory text, mathematics, computations and their rich media output.
|
124
|
+
|
125
|
+
Notebook documents::
|
126
|
+
a representation of all content visible in the web application, including
|
127
|
+
inputs and outputs of the computations, explanatory text, mathematics,
|
128
|
+
images, and rich media representations of objects.
|
129
|
+
|
130
|
+
== Jupyter Basics
|
131
|
+
|
132
|
+
To understand this documentation better, below you find a brief description
|
133
|
+
of JupyterHub (JH) and the three base components of Jupyter Notebook (JN).
|
134
|
+
|
135
|
+
=== Jupyter Notebook App
|
136
|
+
|
137
|
+
The Jupyter Notebook *App* is a server-client application that allows editing
|
138
|
+
and running notebook documents via a web browser. The Notebook App can be
|
139
|
+
executed on a local desktop requiring no internet access or can be installed
|
140
|
+
on a remote server and accessed through the internet.
|
141
|
+
|
142
|
+
=== Notebook documents
|
143
|
+
|
144
|
+
Notebook documents (or *notebooks* for short) are documents created by the
|
145
|
+
Notebook App, and both computer code (e.g., Python) and rich text may contain
|
146
|
+
elements (paragraphs, equations, figures, links, etc.). Notebook documents are
|
147
|
+
human-readable documents, alongside code descriptions and results (figures,
|
148
|
+
tables, etc.).
|
149
|
+
|
150
|
+
=== Kernels
|
151
|
+
|
152
|
+
Generally, a notebook *kernel* is a *calculating machine* that lives in the
|
153
|
+
Jupyter Notebook App to process a Notebook document and executes its
|
154
|
+
code. The *Ipython* kernel, used for the NBI integration, runs _Python_
|
155
|
+
code, and produces the results.
|
156
|
+
|
157
|
+
=== JupyterHub
|
158
|
+
|
159
|
+
_JupyterHub_ (JH) brings the power of notebooks to *groups* of users. It
|
160
|
+
gives users access to computational environments and resources without
|
161
|
+
burdening the users with installation and maintenance tasks. Users can get
|
162
|
+
their work done in their own workspaces on shared resources which can be
|
163
|
+
managed efficiently by system administrators without having the Jupyter
|
164
|
+
Notebook App (JN) locally installed on their systems.
|
165
|
+
|
166
|
+
JupyterHub runs in the cloud or on hardware hosted on your own and makes
|
167
|
+
it possible to serve a pre-configured data science environment to any user.
|
168
|
+
It is customizable and scalable and is suitable for small and large teams,
|
169
|
+
academic courses, and large-scale infrastructure (for example like the
|
170
|
+
Binder service).
|
171
|
+
|
172
|
+
== Binder
|
173
|
+
|
174
|
+
Binder allows you to create custom computing environments that can be
|
175
|
+
shared and used by many remote users. A Binder service is powered by
|
176
|
+
link:{github-repo--binderhub}[BinderHub Repo on Github, {browser-window--new}],
|
177
|
+
an open-source tool that runs on Kubernetes, a portable, extensible,
|
178
|
+
open-source platform for managing containerized services. One such deployment
|
179
|
+
lives at link:{binder--home}[Binder Home, {browser-window--new}], and is free
|
180
|
+
to use.
|
181
|
+
|
182
|
+
== The Package nbInteract (NBI)
|
183
|
+
|
184
|
+
As a web technology, _Jupyter Notebook_ provides a platform for authoring
|
185
|
+
interactive scientific documents. For example, the popular `ipywidgets`
|
186
|
+
Python library allows users to create web-based user interfaces to interact
|
187
|
+
with arbitrary Python functions. Users can create these interfaces using
|
188
|
+
Python directly in the notebook instead of HTML and JavaScript, significantly
|
189
|
+
lowering the time needed to create these interfaces.
|
190
|
+
|
191
|
+
This ease of use encourages instructors and researchers to create interactive
|
192
|
+
explanations of their work. Unfortunately, it isn't easy to *share* these
|
193
|
+
interactive notebooks with the public. Sharing the notebook file itself
|
194
|
+
retains full interactivity but requires *viewers* to have Jupyter, Python,
|
195
|
+
and all other packages used in the notebook installed on their machines.
|
196
|
+
|
197
|
+
The freely available Binder service circumvents this by hosting notebook
|
198
|
+
servers pre-packaged with the necessary software. However, both of these
|
199
|
+
options still require readers to have prior familiarity with the Jupyter
|
200
|
+
environment, making them less suitable for use with non-technical people.
|
201
|
+
|
202
|
+
Authors can convert a Jupyter notebook to a static HTML document and host
|
203
|
+
the document as a publicly-accessible web page. However, this method does
|
204
|
+
not preserve the interactive elements of the notebook. The resulting web
|
205
|
+
page only contains text and images.
|
206
|
+
|
207
|
+
.NBI textbook (excerpt)
|
208
|
+
lightbox::nbi-textbook--excerpt[ 800, {data-nbi-textbook--excerpt}, role="mt-3 mb-4" ]
|
209
|
+
// image::pages/nbinteract/nbi-textbook-example.jpg["NBI textbook (excerpt)", 800]
|
210
|
+
|
211
|
+
The Python package `nbinteract` allows authors to convert Jupyter notebooks
|
212
|
+
into *interactive*, standalone HTML pages: the textbooks. The interactive
|
213
|
+
elements can use arbitrary Python code to generate output, including Python
|
214
|
+
libraries that use C extensions (e.g., _NumPy_ and _Pandas_) and libraries
|
215
|
+
that create images (e.g., _Matplotlib_).
|
216
|
+
|
217
|
+
Anyone with a modern web browser can use the resulting web pages even if
|
218
|
+
the viewer does *not* have Python or Jupyter installed on their computer.
|
219
|
+
To make this possible, NBI uses the freely available cloud service _Binder_.
|
220
|
+
Two communication libraries are used to interact with the _BinderHub_ and the
|
221
|
+
_JupyterHub_ services
|
222
|
+
|
223
|
+
You can find an overview of these services and their communication interfaces
|
224
|
+
at:
|
225
|
+
|
226
|
+
* link:{url-j1--binderhub}[BinderHub, {browser-window--new}]
|
227
|
+
* link:{url-j1--jupyterhub}[JupyterHub, {browser-window--new}]
|
228
|
+
|
229
|
+
TIP: The `nbinteract` package also includes additional methods for interactive
|
230
|
+
plots (widgets) designed for very fast interaction prototyping in the notebook
|
231
|
+
and smooth interaction on static HTML web pages.
|
232
|
+
|
233
|
+
== J1 NBI Integration
|
97
234
|
|
98
235
|
The integration of NBI consists of the following components:
|
99
236
|
|
@@ -121,18 +258,17 @@ NOTE: Recent library updates are more than a year ago, and the current
|
|
121
258
|
version of the Jupyter Notebook *JupyterLab* application, unfortunately,
|
122
259
|
*not* supported (yet).
|
123
260
|
|
124
|
-
|
261
|
+
=== Notebooks vs. Textbooks
|
125
262
|
|
126
|
-
Jupyter
|
127
|
-
format and can only be run using the *App* of Jupyter Notebook. On the
|
263
|
+
Jupyter Notebook documents with the extension `.ipynb` are (data) files in
|
264
|
+
JSON format and can only be run using the *App* of Jupyter Notebook. On the
|
128
265
|
other hand, Textbooks are HTML exports with the extension `.html` from
|
129
266
|
Jupyter Notebooks to be viewed in a web browser.
|
130
267
|
|
131
268
|
For integrating textbooks in webpages, the notebooks with the extension
|
132
|
-
`.ipynb` are to be *exported* to HTML (text) files using the
|
133
|
-
|
134
|
-
|
135
|
-
`~/pages/public/jupyter/notebooks/textbooks`.
|
269
|
+
`.ipynb` are to be *exported* to HTML (text) files using the (Python)
|
270
|
+
program nbinteract. Textbooks that have already been exported can be found
|
271
|
+
for the *Starter Web* in the folder `~/pages/public/jupyter/notebooks/textbooks`.
|
136
272
|
|
137
273
|
== J1 NBI Configuration
|
138
274
|
|
@@ -230,7 +366,7 @@ time being.
|
|
230
366
|
#
|
231
367
|
defaults:
|
232
368
|
|
233
|
-
spec: jekyll-one/
|
369
|
+
spec: jekyll-one/j1-binder-repo/main
|
234
370
|
baseUrl: 'https://mybinder.org'
|
235
371
|
provider: gh
|
236
372
|
|
@@ -319,7 +455,7 @@ settings:
|
|
319
455
|
The use of J1 NBI requires a valid Binder configuration. The binder
|
320
456
|
configuration is to be provided via a public Git repo. An example of such a
|
321
457
|
Git repo you find on Github at
|
322
|
-
|
458
|
+
link:{url-j1--gh-binder-repo}[J1 Binder Repo, {browser-window--new}].
|
323
459
|
The configuration settings are described in the <<Default settings>> section.
|
324
460
|
|
325
461
|
=== Textbook configuration
|
@@ -336,7 +472,7 @@ For integrating textbooks (nbinteract HTML notebook) into web pages, the
|
|
336
472
|
resource of J1 NBI Module is required. The `ID` of the module of the J1 NBI
|
337
473
|
integration is: `nbinteract`.
|
338
474
|
|
339
|
-
.Example Frontmatter
|
475
|
+
.Example of a Frontmatter for a page using Textbooks
|
340
476
|
[source, yaml, role="noclip"]
|
341
477
|
----
|
342
478
|
title: J1 NbInteract
|
@@ -359,10 +495,10 @@ regenerate: true
|
|
359
495
|
|
360
496
|
resources: [ nbinteract, rouge ] <2>
|
361
497
|
----
|
362
|
-
<1> Binder's services require
|
363
|
-
Difficulties with the rules of privacy should be
|
364
|
-
and responded to in a suitable form if the cookie
|
365
|
-
visitor do not allow this.
|
498
|
+
<1> Binder's services require *Personalization* accepted in the users
|
499
|
+
*cookie* settings. Difficulties with the rules of privacy should be
|
500
|
+
explicitly pointed out and responded to in a suitable form if the cookie
|
501
|
+
settings of the visitor do not allow this.
|
366
502
|
<2> If highlighting the source code parts is desired in a textbook, the
|
367
503
|
`rouge` module must included as well.
|
368
504
|
|
@@ -379,13 +515,13 @@ textbook::<notebook-id>[]
|
|
379
515
|
Einbinden des Textbooks mit der ID `j1_docs_example_dynamic` in eine Webseite.
|
380
516
|
|
381
517
|
.Example
|
382
|
-
[source, conf
|
518
|
+
[source, conf]
|
383
519
|
----
|
384
520
|
textbook::j1_docs_example_dynamic[]
|
385
521
|
----
|
386
522
|
|
387
523
|
|
388
|
-
== Textbook
|
524
|
+
== NBI Textbook examples
|
389
525
|
|
390
526
|
For the J1 template, textbooks are typically integrated as *dynamic* HTML
|
391
527
|
pages. In addition to the dynamic pages, textbooks can also be integrated as
|
@@ -399,8 +535,8 @@ Jinja templates. The tool allows you to convert an .ipynb notebook file into
|
|
399
535
|
various *static* formats. For more details, refer to
|
400
536
|
link:{url-nbconvert--doc}[nbconvert - usage, {browser-window--new}].
|
401
537
|
|
402
|
-
.Generate a static
|
403
|
-
[source,
|
538
|
+
.Generate a static textbook
|
539
|
+
[source, sh]
|
404
540
|
----
|
405
541
|
jupyter nbconvert --execute --to html <full_path_to>/<notebook.ipynb>
|
406
542
|
----
|
@@ -409,12 +545,12 @@ Below you find an static HTML output (Textbook) generated via `nbconvert`.
|
|
409
545
|
|
410
546
|
include::{documentdir}/j1_docs_example_static.asciidoc[]
|
411
547
|
|
412
|
-
===
|
548
|
+
=== Interactive Textbook
|
413
549
|
|
414
|
-
*
|
550
|
+
*Interactive* Textbooks are generated using `nbinteract`:
|
415
551
|
|
416
|
-
.Generate
|
417
|
-
[source,
|
552
|
+
.Generate an interactive textbook
|
553
|
+
[source, sh]
|
418
554
|
----
|
419
555
|
nbinteract <full_path_to>/<notebook.ipynb> -t plain -s fake/fake
|
420
556
|
----
|
@@ -425,124 +561,4 @@ textbook::j1_docs_example_dynamic[]
|
|
425
561
|
|
426
562
|
Compare both textbook versions, dynamic versus static, in terms of
|
427
563
|
*interactivity*. Again, compare the _Evaluation_ section at section
|
428
|
-
<<
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
/////
|
436
|
-
== Backgrounds
|
437
|
-
|
438
|
-
lorem:sentences[5]
|
439
|
-
|
440
|
-
=== Jupyter
|
441
|
-
|
442
|
-
Das Jupyter Projekt ist eine Non-Profit-Organisation, gegründet im Jahr 2014
|
443
|
-
von *Fernando Pérez*. Das Projekt Jupyter unterstützt interaktive wissenschaftliche
|
444
|
-
Datenauswertungen und wissenschaftliche Berechnungen.
|
445
|
-
|
446
|
-
Der Name Jupyter bezieht sich auf die drei wesentlichen Programmiersprachen
|
447
|
-
Julia, Python und R die von der Anwendung <<Jupyter Notebook App>> unterstützt
|
448
|
-
werden. Die Bezeichnung *Jupyter* ist eine Hommage an die *Notizbucheinträge*
|
449
|
-
von Galileo Galilei zur Entdeckung der Jupitermonde, bei denen er seine
|
450
|
-
Beobachtungen und die Messdaten zusammen aufgeschrieben hatte.
|
451
|
-
|
452
|
-
==== Jupyter Notebook App
|
453
|
-
|
454
|
-
Die App *Jupyter Notebook* ist eine Server-Client-Anwendung, mit der
|
455
|
-
Notebook-Dokumente über einen Webbrowser bearbeitet und ausgeführt werden
|
456
|
-
können. Jupyter Notebook kann auf einem lokalen Desktop ausgeführt
|
457
|
-
werden der keinen Internetzugang erfordert. Alternativ kann die Anwendung auf
|
458
|
-
einem Remote-Server installiert und über das Internet aufgerufen werden, die
|
459
|
-
dann *keine* Installation erforderlich macht.
|
460
|
-
|
461
|
-
==== Notebook documents
|
462
|
-
|
463
|
-
Notebook-Dokumente (oder kurz: *notebooks*) sind Dokumente, die von der Notebook
|
464
|
-
App erstellt wurden und sowohl Computercode (z. B. Python) als auch Rich-Text
|
465
|
-
Elemente (Absätze, Gleichungen, Abbildungen, Links usw.) enthalten können.
|
466
|
-
Notebook Dokumente sind menschenlesbare Dokumente, die neben Code Beschreibungen
|
467
|
-
und deren Ergebnisse (Abbildungen, Tabellen usw.) enthalten.
|
468
|
-
|
469
|
-
==== Kernels
|
470
|
-
|
471
|
-
Ein Notebook Kernel ist ganz allgemein eine *Rechenmaschine*, die den in einem
|
472
|
-
Notebook-Dokument enthaltenen Code ausführt. Der *Ipython* Kernel, der für die
|
473
|
-
NBI Integration verwendet wird, führt Python-Code aus erzeugt die Ergebnisse.
|
474
|
-
|
475
|
-
=== nbinteract
|
476
|
-
|
477
|
-
Der Name der Library `nbinteract` deutet zwei generelle Funktionen für
|
478
|
-
Jupyter Notebooks an:
|
479
|
-
|
480
|
-
`nb`, textbook::
|
481
|
-
Verarbeitung von Notebooks
|
482
|
-
// (als HTML Darstellung)
|
483
|
-
|
484
|
-
`interact`::
|
485
|
-
Ausführen von Notebooks in Zusammenarbeit mit einem (remoten) Verarbeitungs
|
486
|
-
System und Darstellung der Ergebnisse
|
487
|
-
|
488
|
-
|
489
|
-
==== Requirements
|
490
|
-
|
491
|
-
Für die Entwicklung eigener Jupyter Notebooks ist eine *lokale*
|
492
|
-
Installation der Programmiersprache *Python* erforderlich. Zur Entwicklung
|
493
|
-
von Notebooks wird zusätzlich das Paket *Jupyter* sowie die Installation der
|
494
|
-
Python Library *nbinteract* erwartet.
|
495
|
-
|
496
|
-
==== Widgets
|
497
|
-
|
498
|
-
Ein Widget ist ein Element einer grafischen Benutzeroberfläche (GUI), das
|
499
|
-
Informationen anzeigt oder einem Benutzer eine bestimmte Möglichkeit bietet,
|
500
|
-
mit dem Betriebssystem oder einer Anwendung zu interagieren.
|
501
|
-
|
502
|
-
Zu den Widgets gehören Symbole, Pulldown-Menüs, Schaltflächen, Auswahlfelder,
|
503
|
-
Fortschrittsanzeigen, Ein-Aus-Häkchen, Bildlaufleisten, Fenster, Fensterränder
|
504
|
-
(mit denen Sie die Größe des Fensters ändern können), Umschaltflächen,
|
505
|
-
Formulare und viele andere Geräte zum Anzeigen von Informationen und zum
|
506
|
-
Einladen, Akzeptieren und Reagieren auf Benutzeraktionen.
|
507
|
-
|
508
|
-
|
509
|
-
==== BinderHub
|
510
|
-
|
511
|
-
// UserGuide: https://mybinder.readthedocs.io/en/latest/about/about.html
|
512
|
-
|
513
|
-
Mit Binder (myBinder) können Sie benutzerdefinierte (virtuelle) Computerumgebungen
|
514
|
-
erstellen, die von vielen Benutzern remote aus einer Cloud gemeinsam genutzt
|
515
|
-
werden können.
|
516
|
-
|
517
|
-
// erzeugt Docker Container
|
518
|
-
// installiert Python Software
|
519
|
-
// installiert Jupyter Lab als Notebook App
|
520
|
-
|
521
|
-
.Binderhub Architecture
|
522
|
-
lightbox::binderhub--architecture[ 800, {data-binderhub--architecture}, role="mt-3 mb-4" ]
|
523
|
-
|
524
|
-
////
|
525
|
-
Ein Binder-Dienst wird von BinderHub
|
526
|
-
unterstützt, einem Open-Source-Tool, das auf Kubernetes ausgeführt wird,
|
527
|
-
einer tragbaren, erweiterbaren Open-Source-Plattform zum Verwalten von
|
528
|
-
containerisierten Diensten. Eine solche Bereitstellung befindet sich auf
|
529
|
-
mybinder.org und kann kostenlos verwendet werden.
|
530
|
-
////
|
531
|
-
|
532
|
-
==== JupyterHub
|
533
|
-
|
534
|
-
JupyterHub bringt die Leistung von Notebooks für Benutzergruppen. Es gibt
|
535
|
-
Benutzern Zugriff auf Rechenumgebungen und Ressourcen, ohne die Benutzer mit
|
536
|
-
Installations- und Wartungsaufgaben zu belasten. Benutzer, einschließlich
|
537
|
-
Studenten, Forscher und Datenwissenschaftler, können ihre Arbeit in ihren
|
538
|
-
eigenen Arbeitsbereichen auf gemeinsam genutzten Ressourcen erledigen, die
|
539
|
-
von Systemadministratoren effizient verwaltet werden können.
|
540
|
-
|
541
|
-
.JupyterLab Architecture
|
542
|
-
lightbox::jupyterlab--architecture[ 800, {data-jupyterlab--architecture}, role="mt-3 mb-4" ]
|
543
|
-
|
544
|
-
JupyterHub läuft in der Cloud oder auf Ihrer eigenen Hardware und ermöglicht
|
545
|
-
es, jedem Benutzer weltweit eine vorkonfigurierte Data-Science-Umgebung
|
546
|
-
bereitzustellen. Es ist anpassbar und skalierbar und eignet sich für kleine
|
547
|
-
und große Teams, akademische Kurse und große Infrastrukturen.
|
548
|
-
/////
|
564
|
+
<<Interactive Textbook>> with the static conterpart at <<Static Textbook>>.
|
@@ -31,14 +31,12 @@ keywords: >
|
|
31
31
|
categories: [ Software, Python ]
|
32
32
|
tags: [ Binder, API ]
|
33
33
|
|
34
|
-
scrollbar:
|
34
|
+
scrollbar: false
|
35
35
|
|
36
36
|
permalink: /pages/public/jupyter/docs/nbi-widgets/
|
37
37
|
regenerate: false
|
38
38
|
|
39
|
-
resources: [
|
40
|
-
animate, clipboard, lightbox, rouge
|
41
|
-
]
|
39
|
+
resources: [ animate, clipboard, lightbox, rouge ]
|
42
40
|
resource_options:
|
43
41
|
- attic:
|
44
42
|
padding_top: 400
|
@@ -55,12 +53,12 @@ resource_options:
|
|
55
53
|
|
56
54
|
// Set (local) page attributes here
|
57
55
|
// -----------------------------------------------------------------------------
|
58
|
-
// :page--attr:
|
59
|
-
:badges-enabled:
|
60
|
-
:binder-badge-enabled:
|
61
|
-
:binder--home:
|
62
|
-
:binder--docs:
|
63
|
-
:binder-app-launch--tree:
|
56
|
+
// :page--attr: <attr-value>
|
57
|
+
:badges-enabled: false
|
58
|
+
:binder-badge-enabled: false
|
59
|
+
:binder--home: https://mybinder.org/
|
60
|
+
:binder--docs: https://mybinder.readthedocs.io/en/latest/
|
61
|
+
:binder-app-launch--tree: https://mybinder.org/v2/gh/jekyll-one/j1-binder-repo/main?urlpath=/tree
|
64
62
|
|
65
63
|
// Load Liquid procedures
|
66
64
|
// -----------------------------------------------------------------------------
|
@@ -105,6 +103,25 @@ hist_function (Array | (*args -> Array int | Array float)):
|
|
105
103
|
histogram.
|
106
104
|
----
|
107
105
|
|
106
|
+
.Example
|
107
|
+
[source, python, role="noclip"]
|
108
|
+
----
|
109
|
+
import nbinteract as nbi
|
110
|
+
import numpy as np
|
111
|
+
|
112
|
+
def hist_response_function(mean, sd, size=1000):
|
113
|
+
'''
|
114
|
+
Returns 1000 values picked at random from the normal
|
115
|
+
distribution with the mean and SD given.
|
116
|
+
'''
|
117
|
+
return np.random.normal(loc=mean, scale=sd, size=1000)
|
118
|
+
|
119
|
+
nbi.hist(hist_response_function, mean=(0, 10), sd=(0, 2.0, 0.2))
|
120
|
+
----
|
121
|
+
|
122
|
+
.Rendered Histogram
|
123
|
+
lightbox::nbi-widget--hist[800, {data-nbi-widget--hist}, role="mt-3 mb-4"]
|
124
|
+
|
108
125
|
=== Options
|
109
126
|
|
110
127
|
[source, python, role="noclip"]
|
@@ -149,6 +166,28 @@ y_fn (Array | (Array, *args -> Array int | Array float)):
|
|
149
166
|
y-axis.
|
150
167
|
----
|
151
168
|
|
169
|
+
.Example
|
170
|
+
[source, python, role="noclip"]
|
171
|
+
----
|
172
|
+
import nbinteract as nbi
|
173
|
+
import numpy as np
|
174
|
+
|
175
|
+
def categories(n):
|
176
|
+
return np.arange(n)
|
177
|
+
|
178
|
+
def heights(xs, offset):
|
179
|
+
return xs + offset
|
180
|
+
|
181
|
+
opts = {
|
182
|
+
'ylim': (0, 20),
|
183
|
+
}
|
184
|
+
|
185
|
+
nbi.bar(categories, heights, n=(0, 10), offset=(1, 10), options=opts)
|
186
|
+
----
|
187
|
+
|
188
|
+
.Rendered Barchart
|
189
|
+
lightbox::nbi-widget--bar[800, {data-nbi-widget--bar}, role="mt-3 mb-4"]
|
190
|
+
|
152
191
|
=== Options
|
153
192
|
|
154
193
|
[source, python, role="noclip"]
|
@@ -170,7 +209,7 @@ interact_params (dict): Keyword arguments in the same format as
|
|
170
209
|
----
|
171
210
|
|
172
211
|
|
173
|
-
== Scatter plot
|
212
|
+
== Interactive Scatter plot
|
174
213
|
|
175
214
|
The widget `nbinteract.scatter_drag` generates an interactive scatter plot
|
176
215
|
with the best fit line plotted over the points. The points can be dragged by
|
@@ -182,6 +221,23 @@ x_points (Array Number): x-values of points to plot
|
|
182
221
|
y_points (Array Number): y-values of points to plot
|
183
222
|
----
|
184
223
|
|
224
|
+
.Example
|
225
|
+
[source, python, role="noclip"]
|
226
|
+
----
|
227
|
+
import nbinteract as nbi
|
228
|
+
import numpy as np
|
229
|
+
|
230
|
+
x_coords = np.arange(10)
|
231
|
+
y_coords = np.arange(10) + np.random.rand(10)
|
232
|
+
|
233
|
+
opts = {'xlim': (0, 9), 'ylim': (0, 11), 'animation_duration': 250}
|
234
|
+
|
235
|
+
nbi.scatter_drag(x_coords, y_coords, options=opts)
|
236
|
+
----
|
237
|
+
|
238
|
+
.Rendered interactive Scatter Plot
|
239
|
+
lightbox::nbi-widget--scatter-drag[800, {data-nbi-widget--scatter-drag}, role="mt-3 mb-4"]
|
240
|
+
|
185
241
|
=== Options
|
186
242
|
|
187
243
|
[source, python, role="noclip"]
|
@@ -223,6 +279,21 @@ y_fn (Array | (Array, *args -> Array int | Array float)):
|
|
223
279
|
scatter plot.
|
224
280
|
----
|
225
281
|
|
282
|
+
.Example
|
283
|
+
[source, python, role="noclip"]
|
284
|
+
----
|
285
|
+
import nbinteract as nbi
|
286
|
+
import numpy as np
|
287
|
+
|
288
|
+
def x_values(n): return np.random.choice(100, n)
|
289
|
+
def y_values(xs): return np.random.choice(100, len(xs))
|
290
|
+
|
291
|
+
nbi.scatter(x_values, y_values, n=(0,200))
|
292
|
+
----
|
293
|
+
|
294
|
+
.Rendered Scatter Plot
|
295
|
+
lightbox::nbi-widget--scatter[800, {data-nbi-widget--scatter}, role="mt-3 mb-4"]
|
296
|
+
|
226
297
|
=== Options
|
227
298
|
|
228
299
|
[source, python, role="noclip"]
|
@@ -277,6 +348,8 @@ opts = {
|
|
277
348
|
nbi.line(x_values, y_values, max=(10, 50), sd=(1, 10), options=opts)
|
278
349
|
----
|
279
350
|
|
351
|
+
.Rendered Line Plot
|
352
|
+
lightbox::nbi-widget--line[800, {data-nbi-widget--line}, role="mt-3 mb-4"]
|
280
353
|
|
281
354
|
[source, python, role="noclip"]
|
282
355
|
----
|
@@ -318,3 +391,75 @@ interact_params (dict): Keyword arguments in the same format as
|
|
318
391
|
parameter names, prefix the corresponding kwargs with `x__` and
|
319
392
|
`y__`.
|
320
393
|
----
|
394
|
+
|
395
|
+
== Multiple Choice
|
396
|
+
|
397
|
+
Generates a multiple choice question that allows the user to select an
|
398
|
+
answer choice and shows whether choice was correct.
|
399
|
+
|
400
|
+
[source, python, role="noclip"]
|
401
|
+
----
|
402
|
+
nbinteract.multiple_choice(question, choices, answers)
|
403
|
+
----
|
404
|
+
|
405
|
+
.Example
|
406
|
+
[source, python, role="noclip"]
|
407
|
+
----
|
408
|
+
import nbinteract as nbi
|
409
|
+
|
410
|
+
nbi.multiple_choice(question="Select all prime numbers.",
|
411
|
+
choices=['12', '3', '31'],
|
412
|
+
answers=[1, 2])
|
413
|
+
----
|
414
|
+
|
415
|
+
.Rendered Multiple Choice
|
416
|
+
lightbox::nbi-widget--multiple-choice[800, {data-nbi-widget--multiple-choice}, role="mt-3 mb-4"]
|
417
|
+
|
418
|
+
=== Options
|
419
|
+
|
420
|
+
[source, python, role="noclip"]
|
421
|
+
----
|
422
|
+
question (str): Question text displayed above choices.
|
423
|
+
|
424
|
+
choices (list str): Answer choices that user can select.
|
425
|
+
|
426
|
+
answers (int | iterable int): Either an integer or iterable of
|
427
|
+
integers. Each integer in answers corresponds to the index of the
|
428
|
+
correct choice in `choices`.
|
429
|
+
----
|
430
|
+
|
431
|
+
== Short Answer
|
432
|
+
|
433
|
+
Generates a short answer question that allows user to input an answer in
|
434
|
+
a textbox and a submit button to check the answer.
|
435
|
+
|
436
|
+
[source, python, role="noclip"]
|
437
|
+
----
|
438
|
+
nbinteract.short_answer(question, answers, explanation=None)
|
439
|
+
----
|
440
|
+
|
441
|
+
.Example
|
442
|
+
[source, python, role="noclip"]
|
443
|
+
----
|
444
|
+
import nbinteract as nbi
|
445
|
+
|
446
|
+
nbi.short_answer('What is 1+1?', answers='2', explanation='1+1 is 2')
|
447
|
+
----
|
448
|
+
|
449
|
+
.Rendered Short Answer
|
450
|
+
lightbox::nbi-widget--short-answer[800, {data-nbi-widget--short-answer}, role="mt-3 mb-4"]
|
451
|
+
|
452
|
+
=== Options
|
453
|
+
|
454
|
+
[source, python, role="noclip"]
|
455
|
+
----
|
456
|
+
question (str): The question being asked.
|
457
|
+
|
458
|
+
answers (str | list str | func): If a string, only that string will be
|
459
|
+
marked correct. If a list of string, any string in the list will be
|
460
|
+
marked correct. If a function, any input that causes the function
|
461
|
+
to return True will be marked correct.
|
462
|
+
|
463
|
+
explanation (str): The explanation to the question is displayed when
|
464
|
+
the user inputs the correct answer.
|
465
|
+
----
|
@@ -60,12 +60,12 @@ resource_options:
|
|
60
60
|
|
61
61
|
// Set (local) page attributes here
|
62
62
|
// -----------------------------------------------------------------------------
|
63
|
-
// :page--attr:
|
64
|
-
:badges-enabled:
|
65
|
-
:binder-badge-enabled:
|
66
|
-
:binder--home:
|
67
|
-
:binder--docs:
|
68
|
-
:binder-app-launch--tree:
|
63
|
+
// :page--attr: <attr-value>
|
64
|
+
:badges-enabled: true
|
65
|
+
:binder-badge-enabled: false
|
66
|
+
:binder--home: https://mybinder.org/
|
67
|
+
:binder--docs: https://mybinder.readthedocs.io/en/latest/
|
68
|
+
:binder-app-launch--tree: https://mybinder.org/v2/gh/jekyll-one/j1-binder-repo/main?urlpath=/tree
|
69
69
|
|
70
70
|
// Load Liquid procedures
|
71
71
|
// -----------------------------------------------------------------------------
|
@@ -123,6 +123,11 @@ In addition, `nbinteract` provides a Python package. Once imported, the package
|
|
123
123
|
provides helper methods that allow users to create simple interactive
|
124
124
|
visualizations with single function calls.
|
125
125
|
|
126
|
+
CAUTION: Each interactive element presented on this page uses *time-consuming*
|
127
|
+
operations that take a while to finish. The images and the interactive
|
128
|
+
elements are built through a backend in the cloud. Please be patient
|
129
|
+
to see the results.
|
130
|
+
|
126
131
|
== Getting Started
|
127
132
|
|
128
133
|
The following pages will show you how to use `nbinteract` and its related
|