Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
90 lines (73 sloc) 3.29 KB
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<title>Thebe Lab examples</title>
<link rel="stylesheet" type="text/css" href="index.css" />
<!-- Configure and load Thebe !-->
<script type="text/x-thebe-config">
{
bootstrap: true,
binderOptions: {
repo: "binder-examples/requirements",
},
kernelOptions: {
name: "python3",
},
}
</script>
<script type="text/javascript" src="https://unpkg.com/thebelab@^0.3.0"></script>
<!-- or to use a local build: -->
<!-- <script type="text/javascript" src="../lib/index.js"></script> -->
</head>
<body>
<h1>Thebe Lab</h1>
<p>
<a href="https://github.com/minrk/thebelab">Thebe Lab</a>
is an experiment attempting to rebuild
<a href="https://github.com/oreillymedia/thebe">Thebe</a>
with javascript APIs provided by
<a href="https://github.com/jupyterlab/jupyterlab">JupyterLab</a>.
This should make Thebe a smaller, more sustainable project.
</p>
<h2><a href="demo.html">Step by step demo</a></h2>
<h2>A minimal example</h2>
This page illustrates a minimal setup to get Thebe Lab running, using
<a href="http://mybinder.org">mybinder</a> as <em>kernel</em> (i.e.
computation backend) provider. See the
<a href="https://github.com/minrk/thebelab/blob/master/examples/index.html">
source file</a> for details.
<p>This is a cell:</p>
<pre data-executable="true" data-language="python">print("Hello!")</pre>
<p>Press <tt>Shift-Enter</tt> to execute this cell. Launching the
computation backend may take a few seconds, and you may need to
re-execute it.</p>
<p>
This is another cell, with plotting.
Shift-Enter again!
</p>
<pre data-executable="true" data-language="python">%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0,10)
plt.plot(x, np.sin(x))
plt.plot(x, np.cos(x))</pre>
<h2>More examples</h2>
<ul>
<li><a href="widgets.html">Making use of Jupyter interactive widgets</a>;
<li><a href="status_field.html">Status field and styling</a>;
<li><a href="activate_button.html">Activate/Status button</a>;
<li><a href="prompts.html">Alternative computational environments; code cells with prompts and outputs</a>;
<li><a href="local.html">Using a local Jupyter server as kernel provider</a>;
<li><a href="http://sage-package.readthedocs.io/en/latest/sage_package/sphinx-demo.html">ThebeLab in use for SageMath documentation</a>
<a href="http://sage-package.readthedocs.io/en/latest/sage_package/thebe.html">(about)</a>;
Showcases a fancy activate button, and fetching thebe and running computations locally when possible.
Relevant files:
<ul><li><a href="https://github.com/sagemath/sage-package/blob/master/sage_package/themes/sage/thebe.html">thebe.html</a></li>
<li><a href="https://github.com/sagemath/sage-package/tree/master/sage_package/themes/sage/static/thebe_status_field.js">thebe_status_field.js</a></li>
<li><a href="https://github.com/sagemath/sage-package/tree/master/sage_package/themes/sage/static/thebe_status_field.js">thebe_status_field.js</a></li>
</ul>
</li>
<li><a href="https://sebasguts.github.io/thebelab_test_gap/chap42">ThebeLab in use for GAP documentation</a>.</li>
</ul>
</body>
</html>