Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
1
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Jupyter Notebooks in Dyalog APLAdám Brudzewsky
2
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
What are notebooks?A notebook combines the functionality of
a word processor — handles formatted texta "shell" or "kernel" — executes statements in a programming language and includes output inlinea rendering engine — rendersHTML in addition to plain text
3
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
1½ Example notebookusing Python
global density of metal bands
4
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
1½ Example notebookusing Python
global density of metal bands
5
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
1½ Example notebookusing Dyalog APL
health care expenditure vs GDP per capita
6
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
1½ Example notebookusing Dyalog APL
health care expenditure vs GDP per capita
7
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Notebook benefitsA single document that combines explanations with executable code and its output — an ideal way to provide:
reproducible research resultsdocumentation of processesinstructionstutorials and training materials of all shapes and sizes
A digital learning environmentfor computational thinking
8
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
What is Jupyter notebook?First notebook: Mathematica 1.0 in '88Jupyter notebook is a part ofProject Jupyter, a nonprofit to
develop open-source software,standards, and services forinteractive computing across dozens of programming languages
beginning with Julia, Python, R, and now over 70 languages, including Dyalog APL
9
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
What is Jupyter notebook?First notebook: Mathematica 1.0 in '88Jupyter notebook is a part ofProject Jupyter, a nonprofit to
develop open-source software,standards, and services forinteractive computing across dozens of programming languages
beginning with Julia, Python, R, and now over 70 languages, including Dyalog APL
ONE OF THE MOST SIGNIFICANT ADVANCES
IN THE SCIENTIFIC COMPUTING ARENA
UNIVERSITY CORPORATION FOR ATMOSPHERIC
RESEARCH
10
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Ways to use Jupyter notebooksOn your own computer after installing a Jupyter notebook serverWith an online notebook server like cocalc.comSave notebook with output and use a notebook viewerExport to HTML, PDF, LATEX, etc.
11
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Local notebook server — Python
12
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — Python
13
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — Python
notebook serverlocalhost:8888
14
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — Python
notebook serverlocalhost:8888
Jupyter kernelfor Python
15
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — Pythoninterpreter
Python
notebook serverlocalhost:8888
Jupyter kernelfor Python
16
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — Pythoninterpreter
Python
notebook serverlocalhost:8888
Jupyter kernelfor Python
web browser
17
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — Pythoninterpreter
Python
notebook serverlocalhost:8888
Jupyter kernelfor Python
web browser
18
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — Pythoninterpreter
Python
notebook serverlocalhost:8888
Jupyter kernelfor Python
web browser
19
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — Pythoninterpreter
Python
notebook serverlocalhost:8888
Jupyter kernelfor Python
web browser
20
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — Pythoninterpreter
Python
notebook serverlocalhost:8888
Jupyter kernelfor Python
web browser
21
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — APL
notebook serverlocalhost:8888
22
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — APL
notebook serverlocalhost:8888
Jupyter kernelfor Dyalog APL
23
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — APL
notebook serverlocalhost:8888
interpreterDyalog APL
Jupyter kernelfor Dyalog APL
24
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — APL
notebook serverlocalhost:8888web browser
interpreterDyalog APL
Jupyter kernelfor Dyalog APL
25
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — APL
notebook serverlocalhost:8888web browser
interpreterDyalog APL
Jupyter kernelfor Dyalog APL
26
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
AnacondaPython platform
Local notebook server — APL
notebook serverlocalhost:8888web browser
interpreterDyalog APL
Jupyter kernelfor Dyalog APL
27
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Setting up local notebook serverInstall Dyalog Install Dyalog's Jupyter kernelInstall AnacondaLaunch Jupyter notebook server
28
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Setting up local notebook serverInstall Dyalog Install Dyalog's Jupyter kernelInstall AnacondaLaunch Jupyter notebook server
installation instructions
github.com/Dyalog/dyalog-jupyter-kernel/wiki
29
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Installing JupyterOpening a notebookModifying content
github.com/Dyalog/dyalog-jupyter-kernel/wiki
30
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Online notebook serversThere are online services for various programming languages
31
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Online notebook serversTryAPL's lessons are now Jupyter notebooks
32
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Online notebook serversTryAPL's lessons are now Jupyter notebooksMore lessons and
features on the way
33
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Online notebook serversTryAPL's lessons are now Jupyter notebooksMore lessons and
features on the way
→ TryAPL presentation at Dyalog '18 in Belfast
34
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Online notebook serversBenefit: nothing to install
you may need to sign up for an accountTo protect servers, host may place restrictions
or run in a sandbox with limited connectivityNotebooks can execute any code
all code is run on the host serversame privileges as local execution
35
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Static notebook viewersNotebooks are stored as .ipynb files
.ipynb files are in JSON formateach code cell may include output from the last execution
You can share an .ipynb fileanyone with a local notebook server can view it… but of course cannot execute anything new
Many online systems have viewersGitHub's file previewerProject Jupyter's nbviewer.jupyter.org
36
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Exported notebooksNotebooks can be exported to many standard
for example HTML, PDF, and LATEXSome formats require 3rd party plug-insExported notebooks are static
expressions cannot be re-executed
37
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Creating a new notebook documentGenerating rich output
38
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Ways to use notebooks — recapInstalling a Jupyter notebook server on your PCUse an online notebook server like cocalc.comStore the notebook with output, then open in a notebook viewerExport to HTML, PDF, LATEX, …
39
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Ask questions now!Wiki github.com/Dyalog/dyalog-jupyter-kernel/wikiEmail [email protected]
40
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Ask questions now!Wiki github.com/Dyalog/dyalog-jupyter-kernel/wikiEmail [email protected]
Thank youTechnology Partnership (tp.rs)
for the prototype APL kernel
41
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Ask questions now!Wiki github.com/Dyalog/dyalog-jupyter-kernel/wikiEmail [email protected]
Thank youWill Robertson (our summer intern)
for working on the kerneland creating many notebooks
42
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Ask questions now!Wiki github.com/Dyalog/dyalog-jupyter-kernel/wikiEmail [email protected]
Thank youWill Robertson (our summer intern)
for working on the kerneland creating many notebooks
Interested in an internship?Email [email protected]
43
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Ask questions now!Wiki github.com/Dyalog/dyalog-jupyter-kernel/wikiEmail [email protected]
Thank youGil Athoraya (of Optima Systems)
for implementing syntax colouring
44
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Ask questions now!Wiki github.com/Dyalog/dyalog-jupyter-kernel/wikiEmail [email protected]
Thank youfor watching
45
dyalog.tv @dyalogapl #dyalog
github.com/Dyalog/dyalog-jupyter-kernel/wiki
Webinars on Thursdays at 16:00 UTCComment and suggest to [email protected] or@Adám in chat.stackexchange.com/rooms/52405
No webinar in October due to Dyalog '18 in Belfast October 28th–November 1st
many sessions will be livestreamed
General APL Questionsstackoverflow.com