Add Binder (#2)
* Add Binder * Build from source on Binder * Add support for notebook server extensions * Add notebook shim * Remove python from deps * Add templates to MANIFEST * Binder * Add matplotlib and numpy to Binderpull/6294/head
parent
d2b902359c
commit
deee0bd750
@ -0,0 +1,13 @@
|
||||
name: jupyterlab-classic
|
||||
channels:
|
||||
- conda-forge/label/jupyterlab_rc
|
||||
- conda-forge/label/jupyterlab_server_rc
|
||||
- conda-forge/label/jupyterlab_widgets_rc
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- ipywidgets=7
|
||||
- jupyterlab=3
|
||||
- jupyterlab_widgets=1
|
||||
- matplotlib
|
||||
- numpy
|
||||
- nodejs
|
||||
@ -0,0 +1,122 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# JupyterLab Classic"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"slideshow": {
|
||||
"slide_type": "fragment"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from ipywidgets import IntSlider\n",
|
||||
"slider = IntSlider()\n",
|
||||
"slider"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"slider"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from IPython.display import Latex\n",
|
||||
"Latex(r\"\"\"\\begin{eqnarray}\n",
|
||||
"\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\\n",
|
||||
"\\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\\n",
|
||||
"\\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\\n",
|
||||
"\\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \n",
|
||||
"\\end{eqnarray}\"\"\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"import numpy as np\n",
|
||||
"\n",
|
||||
"x = np.linspace(0, 10, 100)\n",
|
||||
"\n",
|
||||
"plt.plot(x, np.sin(x))\n",
|
||||
"plt.plot(x, np.cos(x))\n",
|
||||
"\n",
|
||||
"plt.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from IPython.display import HTML\n",
|
||||
"from IPython.display import display\n",
|
||||
"\n",
|
||||
"s = \"\"\"<table>\n",
|
||||
"<tr>\n",
|
||||
"<th>Header 1</th>\n",
|
||||
"<th>Header 2</th>\n",
|
||||
"</tr>\n",
|
||||
"<tr>\n",
|
||||
"<td>row 1, cell 1</td>\n",
|
||||
"<td>row 1, cell 2</td>\n",
|
||||
"</tr>\n",
|
||||
"<tr>\n",
|
||||
"<td>row 2, cell 1</td>\n",
|
||||
"<td>row 2, cell 2</td>\n",
|
||||
"</tr>\n",
|
||||
"</table>\"\"\"\n",
|
||||
"h = HTML(s)\n",
|
||||
"display(h)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.0"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
jlpm && jlpm run build
|
||||
python -m pip install -e .
|
||||
@ -0,0 +1,7 @@
|
||||
{
|
||||
"NotebookApp": {
|
||||
"nbserver_extensions": {
|
||||
"jupyterlab_classic": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue