Skip to content

Commit 89a31cc

Browse files
committed
intiial commit
0 parents  commit 89a31cc

File tree

11,750 files changed

+1819070
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

11,750 files changed

+1819070
-0
lines changed

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: voila --port=$PORT --no-browser app.ipynb

SyntheticData.csv

+78
Large diffs are not rendered by default.

app.ipynb

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# This is markdown text in Jupyter\n",
8+
"\n",
9+
"## This page is a site hosted seperately from the lab website\n",
10+
"\n",
11+
"## Voila Web App\n",
12+
"\n",
13+
"## A website built out of a Jupyter notebook using Voila"
14+
]
15+
},
16+
{
17+
"cell_type": "code",
18+
"execution_count": 1,
19+
"metadata": {},
20+
"outputs": [
21+
{
22+
"data": {
23+
"application/vnd.jupyter.widget-view+json": {
24+
"model_id": "95da443e125942d69e69eff2051b27b9",
25+
"version_major": 2,
26+
"version_minor": 0
27+
},
28+
"text/plain": [
29+
"interactive(children=(FloatSlider(value=-1.0, description='a', max=0.0, min=-1.0), FloatSlider(value=0.55, des…"
30+
]
31+
},
32+
"metadata": {},
33+
"output_type": "display_data"
34+
}
35+
],
36+
"source": [
37+
"import numpy as np\n",
38+
"import matplotlib.pyplot as plt\n",
39+
"from ipywidgets import interactive\n",
40+
"%matplotlib inline\n",
41+
"\n",
42+
"import csv\n",
43+
"with open('SyntheticData.csv', newline='') as csvfile:\n",
44+
" spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')\n",
45+
"\n",
46+
"def plot_func(a, f):\n",
47+
" plt.figure(2)\n",
48+
" x = np.linspace(0, 2*np.pi, num=1000)\n",
49+
" y = a*np.sin(1/f*x)\n",
50+
" plt.plot(x,y)\n",
51+
" plt.ylim(-1.1, 1.1)\n",
52+
" plt.title('a sin(f)')\n",
53+
" plt.show()\n",
54+
"\n",
55+
"interactive_plot = interactive(plot_func, a=(-1,0,0.1), f=(0.1, 1))\n",
56+
"output = interactive_plot.children[-1]\n",
57+
"output.layout.height = '300px'\n",
58+
"interactive_plot"
59+
]
60+
},
61+
{
62+
"cell_type": "code",
63+
"execution_count": null,
64+
"metadata": {},
65+
"outputs": [],
66+
"source": []
67+
}
68+
],
69+
"metadata": {
70+
"kernelspec": {
71+
"display_name": "Python 3",
72+
"language": "python",
73+
"name": "python3"
74+
},
75+
"language_info": {
76+
"codemirror_mode": {
77+
"name": "ipython",
78+
"version": 3
79+
},
80+
"file_extension": ".py",
81+
"mimetype": "text/x-python",
82+
"name": "python",
83+
"nbconvert_exporter": "python",
84+
"pygments_lexer": "ipython3",
85+
"version": "3.8.5"
86+
}
87+
},
88+
"nbformat": 4,
89+
"nbformat_minor": 4
90+
}

requirements.txt

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
alabaster==0.7.12
2+
anyio==2.0.2
3+
argon2-cffi==20.1.0
4+
asgiref==3.2.10
5+
astroid==2.4.2
6+
async-generator==1.10
7+
attrs==20.3.0
8+
Babel==2.8.0
9+
backcall==0.2.0
10+
beautifulsoup4==4.9.3
11+
bleach==3.2.1
12+
bootstrap-py==1.0.2
13+
certifi==2020.6.20
14+
cffi==1.14.3
15+
chardet==3.0.4
16+
colorama==0.4.3
17+
cycler==0.10.0
18+
decorator==4.4.2
19+
defusedxml==0.6.0
20+
dj-database-url==0.5.0
21+
Django==3.1.1
22+
django-allauth==0.42.0
23+
django-bootstrap==0.2.4
24+
django-bootstrap4==2.3.1
25+
django-filter==2.4.0
26+
django-heroku==0.3.1
27+
docutils==0.16
28+
entrypoints==0.3
29+
gitdb==4.0.5
30+
GitPython==3.1.11
31+
gunicorn==20.0.4
32+
idna==2.10
33+
imagesize==1.2.0
34+
ipykernel==5.3.4
35+
ipython==7.19.0
36+
ipython-genutils==0.2.0
37+
ipywidgets==7.6.2
38+
isort==5.5.1
39+
jedi==0.17.2
40+
Jinja2==2.11.2
41+
jsonschema==3.2.0
42+
jupyter==1.0.0
43+
jupyter-client==6.1.7
44+
jupyter-console==6.2.0
45+
jupyter-core==4.6.3
46+
jupyter-server==1.1.3
47+
jupyterlab-pygments==0.1.2
48+
jupyterlab-widgets==1.0.0
49+
kiwisolver==1.3.1
50+
lazy-object-proxy==1.4.3
51+
leaflet==0.0.3
52+
MarkupSafe==1.1.1
53+
matplotlib==3.3.3
54+
mccabe==0.6.1
55+
mistune==0.8.4
56+
nbclient==0.5.1
57+
nbconvert==6.0.7
58+
nbformat==5.0.8
59+
nest-asyncio==1.4.2
60+
notebook==6.1.5
61+
numpy==1.19.4
62+
oauthlib==3.1.0
63+
packaging==20.4
64+
pandocfilters==1.4.3
65+
parso==0.7.1
66+
pguard==0.4.0
67+
pickleshare==0.7.5
68+
Pillow==8.0.0
69+
prometheus-client==0.8.0
70+
prompt-toolkit==3.0.8
71+
psycopg2==2.8.6
72+
pycparser==2.20
73+
Pygments==2.7.2
74+
pylint==2.6.0
75+
pyparsing==2.4.7
76+
pyrsistent==0.17.3
77+
python-dateutil==2.8.1
78+
python3-openid==3.2.0
79+
pytz==2020.1
80+
# pywin32==228
81+
pywinpty==0.5.7
82+
pyzmq==19.0.2
83+
qtconsole==5.0.1
84+
QtPy==1.9.0
85+
requests==2.24.0
86+
requests-oauthlib==1.3.0
87+
Send2Trash==1.5.0
88+
six==1.15.0
89+
smmap==3.0.4
90+
sniffio==1.2.0
91+
snowballstemmer==2.0.0
92+
soupsieve==2.0.1
93+
Sphinx==3.3.0
94+
sphinxcontrib-applehelp==1.0.2
95+
sphinxcontrib-devhelp==1.0.2
96+
sphinxcontrib-htmlhelp==1.0.3
97+
sphinxcontrib-jsmath==1.0.1
98+
sphinxcontrib-qthelp==1.0.3
99+
sphinxcontrib-serializinghtml==1.1.4
100+
sqlparse==0.3.1
101+
terminado==0.9.1
102+
testpath==0.4.4
103+
toml==0.10.1
104+
tornado==6.1
105+
traitlets==5.0.5
106+
urllib3==1.25.10
107+
viola==0.3.8
108+
voila==0.2.4
109+
wcwidth==0.2.5
110+
webencodings==0.5.1
111+
whitenoise==5.2.0
112+
widgetsnbextension==3.5.1
113+
wrapt==1.12.1
114+
xlrd==1.2.0

runtime.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.8.5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Voila Web App\n",
8+
"\n",
9+
"## A website built out of a Jupyter notebook using Voila"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": 3,
15+
"metadata": {
16+
"scrolled": true
17+
},
18+
"outputs": [
19+
{
20+
"ename": "ModuleNotFoundError",
21+
"evalue": "No module named 'numpy'",
22+
"output_type": "error",
23+
"traceback": [
24+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
25+
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
26+
"\u001b[1;32m<ipython-input-3-66ae8f38ccaf>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpyplot\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mipywidgets\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0minteractive\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mget_ipython\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'matplotlib'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'inline'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
27+
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'numpy'"
28+
]
29+
}
30+
],
31+
"source": [
32+
"import numpy as np\n",
33+
"import matplotlib.pyplot as plt\n",
34+
"from ipywidgets import interactive\n",
35+
"%matplotlib inline\n",
36+
"\n",
37+
"def plot_func(a, f):\n",
38+
" plt.figure(2)\n",
39+
" x = np.linspace(0, 2*np.pi, num=1000)\n",
40+
" y = a*np.sin(1/f*x)\n",
41+
" plt.plot(x,y)\n",
42+
" plt.ylim(-1.1, 1.1)\n",
43+
" plt.title('a sin(f)')\n",
44+
" plt.show()\n",
45+
"\n",
46+
"interactive_plot = interactive(plot_func, a=(-1,0,0.1), f=(0.1, 1))\n",
47+
"output = interactive_plot.children[-1]\n",
48+
"output.layout.height = '300px'\n",
49+
"interactive_plot"
50+
]
51+
},
52+
{
53+
"cell_type": "code",
54+
"execution_count": null,
55+
"metadata": {},
56+
"outputs": [],
57+
"source": []
58+
}
59+
],
60+
"metadata": {
61+
"kernelspec": {
62+
"display_name": "Python 3",
63+
"language": "python",
64+
"name": "python3"
65+
},
66+
"language_info": {
67+
"codemirror_mode": {
68+
"name": "ipython",
69+
"version": 3
70+
},
71+
"file_extension": ".py",
72+
"mimetype": "text/x-python",
73+
"name": "python",
74+
"nbconvert_exporter": "python",
75+
"pygments_lexer": "ipython3",
76+
"version": "3.8.5"
77+
}
78+
},
79+
"nbformat": 4,
80+
"nbformat_minor": 4
81+
}

0 commit comments

Comments
 (0)