-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjupyter.txt
1698 lines (1272 loc) · 64.1 KB
/
jupyter.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Jupyter Notes
=============
Steven K. Baum
v0.1, 2014-07-14
:doctype: book
:toc:
:icons:
:numbered!:
[preface]
== Latest Setup (2021-02-12)
-----
conda create -n jlab
conda activate jlab
conda install -c conda-forge jupyterlab
conda install -c conda-forge -c plotly jupyter-dash
conda install nodejs
jupyter labextension install @jupyterlab/katex-extension
jupyter labextension install @jupyterlab/geojson-extension
pip install jupyterlab_latex
jupyter labextension install @jupyterlab/toc
jupyter labextension install @jupyter-widgets/jupyterlab-manager
conda install numpy
pip install perspective-python
# The previous command replaced pyarrow 1.01 with 0.17, so we'll upgrade it.
conda upgrade pyarrow
jupyter labextension install @finos/perspective-jupyterlab
# The next command would downgrade jupyterlab, so no go.
#conda install -c conda-forge jupyterlab jupyterlab-git
conda install -c conda-forge 'jupyterlab>=3.0.0,<4.0.0a0' jupyterlab-lsp
pip install 'python-language-server[all]'
pip install dask-labextension
conda install -c conda-forge jupyterlab-sos
conda install -c conda-forge sos-notebook
conda install jupyterlab-transient-display-data -c conda-forge
git clone https://github.com/jupyter/nbconvert.git
cd nbconvert
pip install -e .
conda install -c conda-forge voila
conda install -c conda-forge rise
conda install lfortran -c conda-forge
# This spun for a while and did nothing.
#conda install jupyter fortran_kernel -c conda-forge
pip install git+https://github.com/glue-viz/glue-jupyter.git
jupyter labextension install jupyter-threejs
-----
When running `jupyter lab` the first time, it wanted an unknown password.
This was solved by running:
-----
jupyter lab password
Enter password:
Verify password:
-----
Jupyter and Extensions
----------------------
Jupyter is the extension of the IPython Notebook package to other programming
languages. The language agnostic bits of IPython Notebook were extracted and became Jupyter, which
can be used with Python, Julia, etc.
Basic Package Sites
~~~~~~~~~~~~~~~~~~~
*Project Jupyter* - http://jupyter.org/[+http://jupyter.org/+]
*Project Jupyter Blog* - https://blog.jupyter.org/[+https://blog.jupyter.org/+]
The official site for the Jupyter package.
*Jupyter on Twitter* - https://twitter.com/ProjectJupyter[+https://twitter.com/ProjectJupyter+]
The Twitter feed for the Jupyter project.
*IPython Notebook* - http://ipython.org/notebook.html[+http://ipython.org/notebook.html+]
The official site for IPython Notebook, which spawned the Jupyter project and still (7/15) contains
most of the documentation about how to configure and use either.
* *The IPython Notebook* - http://ipython.org/ipython-doc/stable/notebook/index.html[+http://ipython.org/ipython-doc/stable/notebook/index.html+]
The present (7/15) bible of the IPython Notebook and Jupyter.
* *Markdown* - http://daringfireball.net/projects/markdown/syntax[+http://daringfireball.net/projects/markdown/syntax+]
The package used to render text.
* *MathJax* - http://www.mathjax.org/[+http://www.mathjax.org/+]
The package used to render equations.
Try Jupyter
~~~~~~~~~~~
https://try.jupyter.org/[+https://try.jupyter.org/+]
A freely available online Jupyter server that allows you to try using it with
various programming languages.
Extensions
~~~~~~~~~~
bookstore
^^^^^^^^^
https://bookstore.readthedocs.io/en/latest/[`https://bookstore.readthedocs.io/en/latest/`]
https://github.com/nteract/bookstore[`https://github.com/nteract/bookstore`]
"bookstore provides tooling and workflow recommendations for storing, scheduling, and publishing notebooks."
Elyra
^^^^^
https://github.com/elyra-ai/elyra[`https://github.com/elyra-ai/elyra`]
"Elyra is a set of AI-centric extensions to JupyterLab Notebooks."
fastpages
^^^^^^^^^
https://github.com/fastai/fastpages[`https://github.com/fastai/fastpages`]
"An easy to use blogging platform, with support for Jupyter notebooks, Word docs, and Markdown.
fastpages uses GitHub Actions to simplify the process of creating Jekyll blog posts on GitHub Pages from a variety of input formats."
glue-jupyter
^^^^^^^^^^^^
https://github.com/glue-viz/glue-jupyter[`https://github.com/glue-viz/glue-jupyter`]
"Glue is a Python library to explore relationships within and among datasets. The main interface until now has been based on Qt, but the glue-jupyter package aims to provide a way to use Glue in Jupyter notebooks and Jupyter lab instead."
glue
++++
http://docs.glueviz.org/en/stable/[`http://docs.glueviz.org/en/stable/`]
"Glue is a Python library to explore relationships within and among related datasets. Its main features include:
* Linked Statistical Graphics. With Glue, users can create scatter plots, histograms and images (2D and 3D) of their data. Glue is focused on the brushing and linking paradigm, where selections in any graph propagate to all others.
* Flexible linking across data. Glue uses the logical links that exist between different data sets to overlay visualizations of different data, and to propagate selections across data sets. These links are specified by the user, and are arbitrarily flexible.
* Full scripting capability. Glue is written in Python, and built on top of its standard scientific libraries (i.e., Numpy, Matplotlib, Scipy). Users can easily integrate their own python code for data input, cleaning, and analysis."
ipyannotator
^^^^^^^^^^^^
https://cfp.jupytercon.com/2020/schedule/presentation/237/ipyannotator-the-infinitely-hackable-annotation-framework/[`https://cfp.jupytercon.com/2020/schedule/presentation/237/ipyannotator-the-infinitely-hackable-annotation-framework/`]
https://github.com/palaimon/ipyannotator[`https://github.com/palaimon/ipyannotator`]
"An infinitely hackable annotation framework."
ipycanvas
^^^^^^^^^
https://github.com/martinRenou/ipycanvas[`https://github.com/martinRenou/ipycanvas`]
https://ipycanvas.readthedocs.io/en/latest/[`https://ipycanvas.readthedocs.io/en/latest/`]
"ipycanvas is a lightweight, fast and stable library exposing the browser's Canvas API to IPython. It allows you to draw simple primitives directly from Python like text, lines, polygons, arcs, images etc. This simple toolset allows you to draw literally anything."
ipycytoscape
^^^^^^^^^^^^
https://github.com/QuantStack/ipycytoscape[`https://github.com/QuantStack/ipycytoscape`]
"A widget enabling interactive graph visualization with cytoscape.js in JupyterLab and the Jupyter notebook."
cytoscape.js
++++++++++++
https://js.cytoscape.org/[`https://js.cytoscape.org/`]
"Graph theory (network) library for visualisation and analysis."
ipympl
^^^^^^
https://github.com/matplotlib/ipympl[`https://github.com/matplotlib/ipympl`]
"Leveraging the Jupyter interactive widgets framework, ipympl enables the interactive features of matplotlib in the Jupyter notebook and in JupyterLab."
ipyparallel
^^^^^^^^^^^
https://ipyparallel.readthedocs.io/en/latest/intro.html[`https://ipyparallel.readthedocs.io/en/latest/intro.html`]
"FUCK"
ipysheet
^^^^^^^^
https://ipysheet.readthedocs.io/en/latest/[`https://ipysheet.readthedocs.io/en/latest/`]
https://github.com/QuantStack/ipysheet[`https://github.com/QuantStack/ipysheet`]
"A spreadsheet for Jupyter notebooks."
ipython-sql
^^^^^^^^^^^
https://github.com/catherinedevlin/ipython-sql[`https://github.com/catherinedevlin/ipython-sql`]
"Connect to a database, using SQLAlchemy URL connect strings, then issue SQL commands within IPython or IPython Notebook."
ipywidgets
^^^^^^^^^^
https://ipywidgets.readthedocs.io/en/latest/[`https://ipywidgets.readthedocs.io/en/latest/`]
https://github.com/jupyter-widgets/ipywidgets[`https://github.com/jupyter-widgets/ipywidgets`]
"ipywidgets, also known as jupyter-widgets or simply widgets, are interactive HTML widgets for Jupyter notebooks and the IPython kernel.
Notebooks come alive when interactive widgets are used. Users gain control of their data and can visualize changes in the data.
Learning becomes an immersive, fun experience. Researchers can easily see how changing inputs to a model impact the results."
bqplot
++++++
https://github.com/bqplot/bqplot[`https://github.com/bqplot/bqplot`]
https://bqplot.readthedocs.io/en/latest/[`https://bqplot.readthedocs.io/en/latest/`]
"bqplot is a 2-D visualization system for Jupyter, based on the constructs of the Grammar of Graphics."
ipygany
+++++++
https://github.com/QuantStack/ipygany[`https://github.com/QuantStack/ipygany`]
https://ipygany.readthedocs.io/en/latest/[`https://ipygany.readthedocs.io/en/latest/`]
"Jupyter widgets for 3-D mesh analysis."
ipyleaflet
++++++++++
https://github.com/jupyter-widgets/ipyleaflet[`https://github.com/jupyter-widgets/ipyleaflet`]
https://ipyleaflet.readthedocs.io/en/latest/[`https://ipyleaflet.readthedocs.io/en/latest/`]
"A Jupyter / Leaflet bridge enabling interactive maps in the Jupyter notebook."
ipyvolume
+++++++++
https://github.com/maartenbreddels/ipyvolume[`https://github.com/maartenbreddels/ipyvolume`]
https://ipyvolume.readthedocs.io/en/latest/index.html[`https://ipyvolume.readthedocs.io/en/latest/index.html`]
"3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL."
ipywebrtc
+++++++++
https://github.com/maartenbreddels/ipywebrtc[`https://github.com/maartenbreddels/ipywebrtc`]
"WebRTC and MediaStream API exposed in the Jupyter notebook/lab."
pythreejs
+++++++++
https://github.com/jupyter-widgets/pythreejs[`https://github.com/jupyter-widgets/pythreejs`]
"A Python / ThreeJS bridge utilizing the Jupyter widget infrastructure."
jdaviz
^^^^^^
https://github.com/spacetelescope/jdaviz[`https://github.com/spacetelescope/jdaviz`]
https://jdaviz.readthedocs.io/en/latest/[`https://jdaviz.readthedocs.io/en/latest/`]
"jdaviz is a package of astronomical data analysis visualization tools based on the Jupyter platform. It is one tool that is a part of STScI's larger Data Analysis Tools Ecosystem. These GUI-based tools link data visualization and interactive analysis. They are designed to work within a Jupyter notebook cell, as a standalone desktop application, or as embedded windows within a website -- all with nearly-identical user interfaces."
itkwidgets
^^^^^^^^^^
https://github.com/InsightSoftwareConsortium/itkwidgets[`https://github.com/InsightSoftwareConsortium/itkwidgets`]
"Interactive Jupyter widgets to visualize images, point sets, and meshes."
Jupyter Book
^^^^^^^^^^^^
https://beta.jupyterbook.org/intro.html[`https://beta.jupyterbook.org/intro.html`]
https://github.com/firasm/jupyterbook_course_template[`https://github.com/firasm/jupyterbook_course_template`]
"Jupyter Book is an open source project for building beautiful, publication-quality books and documents from computational material."
Jupyter Dash
^^^^^^^^^^^^
https://github.com/plotly/jupyter-dash[`https://github.com/plotly/jupyter-dash`]
"This library makes it easy to develop Plotly Dash apps interactively from within Jupyter environments (e.g. classic Notebook, JupyterLab, Visual Studio Code notebooks, nteract, PyCharm notebooks, etc.)."
jupyterlab-hdf5
^^^^^^^^^^^^^^^
https://github.com/jupyterlab/jupyterlab-hdf5[`https://github.com/jupyterlab/jupyterlab-hdf5`]
"Open and explore HDF5 files in JupyterLab. Can handle very large (TB) sized files. New in release v0.5.0, jlab-hdf5 can now open datasets of any dimensionality, from 0 to 32. Any 0D, 1D, or 2D slab of any dataset can easily be selected and displayed using numpy-style index syntax."
jupyterlab-plotly
^^^^^^^^^^^^^^^^^
https://plotly.com/python/getting-started/[`https://plotly.com/python/getting-started/`]
"The plotly Python library is an interactive, open-source plotting library that supports over 40 unique chart types covering a wide range of statistical, financial, geographic, scientific, and 3-dimensional use-cases.
Built on top of the Plotly JavaScript library (plotly.js), plotly enables Python users to create beautiful interactive web-based visualizations that can be displayed in Jupyter notebooks, saved to standalone HTML files, or served as part of pure Python-built web applications using Dash. The plotly Python library is sometimes referred to as "plotly.py" to differentiate it from the JavaScript library.
Thanks to deep integration with the orca image export utility, plotly also provides great support for non-web contexts including desktop editors (e.g. QtConsole, Spyder, PyCharm) and static document publishing (e.g. exporting notebooks to PDF with high-quality vector images)."
jupyterlab-sos
^^^^^^^^^^^^^^
https://github.com/vatlab/jupyterlab-sos[`https://github.com/vatlab/jupyterlab-sos`]
"jupyterlab-sos is a JupyterLab extension for the SoS Polyglot Notebook that allows you to use multiple Jupyter kernels in one notebook. It is also a frontend to the SoS Workflow Engine that is designed for daily computational research with both exploratory interactive data analysis and batch data processing."
SoS Notebook
++++++++++++
https://github.com/vatlab/sos-notebook[`https://github.com/vatlab/sos-notebook`]
"SoS Notebook is a Jupyter kernel that allows the use of multiple kernels in one Jupyter notebook. Using language modules that understand datatypes of underlying languages (modules sos-bash, sos-r, sos-matlab, etc), SoS Notebook allows data exchange among live kernels of supported languages.
SoS Notebook also extends the Jupyter frontend and adds a console panel for the execution of scratch commands and display of intermediate results and progress information, and a number of shortcuts and magics to facilitate interactive data analysis. All these features have been ported to JupyterLab, either in the sos extension jupyterlab-sos or contributed to JupyterLab as core features."
jupyter-server-proxy
^^^^^^^^^^^^^^^^^^^^
https://github.com/jupyterhub/jupyter-server-proxy/[`https://github.com/jupyterhub/jupyter-server-proxy/`]
"Jupyter Server Proxy lets you run arbitrary external processes (such as RStudio, Shiny Server, Syncthing, PostgreSQL, Code Server, etc) alongside your notebook server and provide authenticated web access to them using a path like /rstudio next to others like /lab. Alongside the python package that provides the main functionality, the JupyterLab extension (@jupyterlab/server-proxy) provides buttons in the JupyterLab launcher window to get to RStudio for example."
Jupytext
^^^^^^^^
https://github.com/mwouts/jupytext[`https://github.com/mwouts/jupytext`]
"Jupytext is a plugin for Jupyter that can save Jupyter notebooks as either
* Markdown files (or MyST Markdown files, or R Markdown documents)
* Scripts in many languages."
katex-extension
^^^^^^^^^^^^^^^
https://github.com/jupyterlab/jupyter-renderers/tree/master/packages/katex-extension[`https://github.com/jupyterlab/jupyter-renderers/tree/master/packages/katex-extension`]
"A JupyterLab extension for rendering KaTeX math.
The default LaTeX renderer in JupyterLab uses MathJax, which, while powerful, can be slow to render complex equations. This extension substitutes the MathJax renderer with the KaTeX renderer. KaTeX is much faster, at the cost of being less full-featured than MathJax. If you want faster math processing and the subset of LaTeX provided by KaTeX is sufficient for your purposes, this may be the extension for you."
mathjax3-extension
^^^^^^^^^^^^^^^^^^
https://github.com/jupyterlab/jupyter-renderers/tree/master/packages/mathjax3-extension[`https://github.com/jupyterlab/jupyter-renderers/tree/master/packages/mathjax3-extension`]
"A JupyterLab extension for rendering math with MathJax 3.
The default LaTeX renderer in JupyterLab uses MathJax 2. This extension substitutes the MathJax 2 renderer with the MathJax 3 renderer."
MyST-NB
^^^^^^^
https://myst-nb.readthedocs.io/en/latest/[`https://myst-nb.readthedocs.io/en/latest/`]
"MyST-NB is a reference implementation of MyST Markdown Notebooks, and an open source tool for working with Jupyter Notebooks in the Sphinx ecosystem. It provides the following primary features:
* Parse ipynb files in Sphinx. Directly convert Jupyter Notebooks into Sphinx documents.
* Execute and Cache your notebook content. Save time building your documentation without needing to commit your notebook outputs directly into git.
* Write MyST Markdown. MyST Markdown allows you to write Sphinx roles and directives in markdown.
* Insert notebook outputs into your content. Generate outputs as you build your documentation, and insert them across pages.
* Write Jupyter Notebooks entirely with Markdown. You can define the structure of a notebook in pure-text making it more diff-able."
nbconvert
^^^^^^^^^
https://github.com/jupyter/nbconvert[`https://github.com/jupyter/nbconvert`]
"The nbconvert tool, jupyter nbconvert, converts notebooks to various other formats via Jinja templates. The nbconvert tool allows you to convert an .ipynb notebook file into various static formats including HTML, LaTeX,
PDF, Reveal JS, Markdown, ReStructured Text, or an executable script."
nbviewer
^^^^^^^^
http://nbviewer.ipython.org/[+http://nbviewer.ipython.org/+]
A web site that renders notebooks available on other websites.
nteract
^^^^^^^
https://github.com/nteract/nteract/tree/master/applications/jupyter-extension[`https://github.com/nteract/nteract/tree/master/applications/jupyter-extension`]
"nteract as an extension to the jupyter notebook server."
Perspective
^^^^^^^^^^^
https://github.com/finos/perspective[`https://github.com/finos/perspective`]
"Perspective is an interactive visualization component for large, real-time datasets. Originally developed for J.P. Morgan's trading business, Perspective makes it simple to build user-configurable analytics entirely in the browser, or in concert with Python and/or JupyterLab. Use it to create reports, dashboards, notebooks and applications, with static data or streaming updates via Apache Arrow."
pydeck
^^^^^^
https://github.com/visgl/deck.gl/tree/master/bindings/pydeck[`https://github.com/visgl/deck.gl/tree/master/bindings/pydeck`]
i"The pydeck library is a set of Python bindings for making spatial visualizations with deck.gl, optimized for a Jupyter environment."
deck.gl
+++++++
https://deck.gl/[`https://deck.gl/`]
"deck.gl is a WebGL-powered framework for visual exploratory data analysis of large datasets.
deck.gl allows complex visualizations to be constructed by composing existing layers, and makes it easy to package and share new visualizations as reusable layers.
By emulating 64 bit floating point computations in the GPU, deck.gl renders datasets with unparalleled accuracy and performance.
deck.gl is a great match with React, supporting efficient WebGL rendering under the Reactive programming paradigm. And when used with Mapbox GL it automatically coordinates with the Mapbox camera system to provide compelling 2D and 3D visualizations on top of your Mapbox based maps."
RISE
^^^^
https://github.com/damianavila/RISE[+https://github.com/damianavila/RISE+]
A Jupyter slideshow extension also know as +live_reveal+.
vaex-jupyter
^^^^^^^^^^^^
https://vaex.readthedocs.io/en/latest/tutorial_jupyter.html[`https://vaex.readthedocs.io/en/latest/tutorial_jupyter.html`]
"The vaex-jupyter package contains the building blocks to interactively define an N-dimensional grid, which is then used for visualizations."
Voila
^^^^^
https://github.com/voila-dashboards/voila[`https://github.com/voila-dashboards/voila`]
https://voila.readthedocs.io/en/stable/[`https://voila.readthedocs.io/en/stable/`]
"Voilà turns Jupyter notebooks into standalone web applications.
Unlike the usual HTML-converted notebooks, each user connecting to the Voilà tornado application gets a dedicated Jupyter kernel which can execute the callbacks to changes in Jupyter interactive widgets."
Examples
~~~~~~~~
*A Gallery of Interesting Notebooks* - https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks[+https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks+]
JupyterHub
----------
Installing your own Jupyter server.
https://github.com/jupyterhub/jupyterhub[+https://github.com/jupyterhub/jupyterhub+]
A multi-user server that manages and proxies multiple instances of the single-user
Jupyter notebook server.
Simple Test Configuration and Test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Install the required software.
-----
npm install -g configurable-http-proxy
pip3 install jupyterhub
pip3 install --upgrade notebook
-----
Start the server.
-----
jupyterhub
[I 2016-08-11 13:47:41.747 JupyterHub app:622] Loading cookie_secret from /home/baum/jupyterhub_cookie_secret
[W 2016-08-11 13:47:41.777 JupyterHub app:304]
Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.
Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.
[W 2016-08-11 13:47:41.781 JupyterHub app:757] No admin users, admin interface will be unavailable.
[W 2016-08-11 13:47:41.781 JupyterHub app:758] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2016-08-11 13:47:41.782 JupyterHub app:785] Not using whitelist. Any authenticated user will be allowed.
[I 2016-08-11 13:47:41.797 JupyterHub app:1231] Hub API listening on http://127.0.0.1:8081/hub/
[E 2016-08-11 13:47:41.801 JupyterHub app:963] Refusing to run JuptyterHub without SSL. If you are terminating SSL in another layer, pass --no-ssl to tell JupyterHub to allow the proxy to listen on HTTP.
-----
That didn't work, so try the suggested +--no-ssl+.
-----
jupyterhub --no-ssl
[I 2016-08-11 13:48:34.980 JupyterHub app:622] Loading cookie_secret from /home/baum/jupyterhub_cookie_secret
[W 2016-08-11 13:48:35.011 JupyterHub app:304]
Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.
Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.
[W 2016-08-11 13:48:35.015 JupyterHub app:757] No admin users, admin interface will be unavailable.
[W 2016-08-11 13:48:35.016 JupyterHub app:758] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2016-08-11 13:48:35.016 JupyterHub app:785] Not using whitelist. Any authenticated user will be allowed.
[I 2016-08-11 13:48:35.032 JupyterHub app:1231] Hub API listening on http://127.0.0.1:8081/hub/
[W 2016-08-11 13:48:35.035 JupyterHub app:959] Running JupyterHub without SSL. There better be SSL termination happening somewhere else...
[I 2016-08-11 13:48:35.035 JupyterHub app:968] Starting proxy @ http://*:8000/
13:48:35.164 - info: [ConfigProxy] Proxying http://*:8000 to http://127.0.0.1:8081
13:48:35.166 - info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes
[I 2016-08-11 13:48:35.241 JupyterHub app:1254] JupyterHub is now running at http://127.0.0.1:8000/
-----
Test this by sending the browser to:
+http://copano.tamu.edu:8000/+
and we have succeeded.
Security
~~~~~~~~
https://github.com/jupyterhub/jupyterhub/blob/master/docs/source/getting-started.md#security[+https://github.com/jupyterhub/jupyterhub/blob/master/docs/source/getting-started.md#security+]
The default JupyterHub configuration requires SSL encryption (HTTPS) to run.
Signed SSL Certificate
^^^^^^^^^^^^^^^^^^^^^^
A signed SSL certificate should be obtained and the location specified in the configuration file.
The configuration file is:
+/etc/jupyterhub/jupyterhub_config.py+
The locations of the SSL key and certificate are specified in the file as:
-----
c.JupyterHub.ssl_key = '/etc/pki/tls/private/copano.tamu.edu.key'
c.JupyterHub.ssl_cert = '/etc/pki/tls/certs/copano_tamu_edu_cert.cer'
-----
Cookie Secret
^^^^^^^^^^^^^
The cookie secret is an encryption key, used to encrypt the browser cookies used for authentication. If this value changes for the Hub, all single-user servers must also be restarted. Normally, this value is stored in a file, the location of which can be specified in a config file as follows:
-----
c.JupyterHub.cookie_secret_file = '/srv/jupyterhub/cookie_secret'
-----
This file should be a long random string encoded in MIME Base64.
This is done via the following:
-----
mkdir /srv/jupyterhub
openssl rand -base64 2048 > /srv/jupyterhub/cookie_secret
chmod 600 /srv/jupyterhub/cookie_secret
-----
The permissions of the +cookie_secret+ file need to be changed as shown or the server won't start.
Proxy Authentication Token
^^^^^^^^^^^^^^^^^^^^^^^^^^
The Hub authenticates its requests to the Proxy using a secret token that the Hub and Proxy agree upon.
This string should be a random string, and can be placed in the configuration file via:
-----
c.JupyterHub.proxy_auth_token = '0bc02bede919e99a26de1e2a7a5aadfaf6228de836ec39a05a6c6942831d8fe5'
-----
Such a string can be created via:
-----
openssl rand -hex 32
-----
Configuring Authentication
^^^^^^^^^^^^^^^^^^^^^^^^^^
The default authenticator used PAM to authenticate users with the username and password they already
have on the machine on which the server will run.
You can restrict which users are allowed to log in via:
-----
c.Authenticator.whitelist = {'larry', 'moe', 'curly'}
-----
JupyterHub admin users can take actions on the behalf of users such as stopping and restarting their
serverrs, and adding and removing users from the whitelist. A set of admin users
can be established via:
-----
c.Authenticator.admin_users = {'moe'}
-----
Logging in With Authentication Set
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now we start the server via:
-----
jupyterhub -f /etc/jupyterhub/jupyterhub_config.py
[I 2016-08-11 14:25:42.149 JupyterHub app:622] Loading cookie_secret from /srv/jupyterhub/cookie_secret
[I 2016-08-11 14:25:42.211 JupyterHub app:785] Not using whitelist. Any authenticated user will be allowed.
[I 2016-08-11 14:25:42.226 JupyterHub app:1231] Hub API listening on http://127.0.0.1:8081/hub/
[I 2016-08-11 14:25:42.230 JupyterHub app:968] Starting proxy @ http://*:8000/
14:25:42.366 - info: [ConfigProxy] Proxying https://*:8000 to http://127.0.0.1:8081
14:25:42.368 - info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes
[I 2016-08-11 14:25:42.437 JupyterHub app:1254] JupyterHub is now running at http://127.0.0.1:8000/
-----
And when we try to log in via the URL:
+https://copano.tamu.edu:8000/+
we get the following additional messages:
-----
I 2016-08-11 14:35:42.867 JupyterHub spawner:467] Spawning jupyterhub-singleuser --user=baum --port=57235 --cookie-name=jupyter-hub-token-baum --base-url=/user/baum --hub-host= --hub-prefix=/hub/ --hub-api-url=http://127.0.0.1:8081/hub/api --ip=127.0.0.1
[I 2016-08-11 14:35:43.571 baum notebookapp:1079] Serving notebooks from local directory: /home/baum
[I 2016-08-11 14:35:43.571 baum notebookapp:1079] 0 active kernels
[I 2016-08-11 14:35:43.571 baum notebookapp:1079] The Jupyter Notebook is running at: http://127.0.0.1:57235/user/baum/
[I 2016-08-11 14:35:43.571 baum notebookapp:1080] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 2016-08-11 14:35:43.639 baum log:47] 302 GET /user/baum (127.0.0.1) 1.43ms
[I 2016-08-11 14:35:43.641 JupyterHub base:306] User baum server took 0.865 seconds to start
[I 2016-08-11 14:35:43.641 JupyterHub orm:159] Adding user baum to proxy /user/baum => http://127.0.0.1:57235
[I 2016-08-11 14:35:43.659 JupyterHub log:100] 302 POST /hub/login?next= (@127.0.0.1) 992.52ms
[I 2016-08-11 14:35:43.660 JupyterHub login:86] User logged in: baum
[I 2016-08-11 14:35:43.678 baum log:47] 302 GET /user/baum (127.0.0.1) 0.71ms
[I 2016-08-11 14:35:43.678 JupyterHub log:100] 302 GET /hub/ ([email protected]) 7.59ms
[I 2016-08-11 14:35:43.718 JupyterHub log:100] 200 GET /hub/api/authorizations/cookie/jupyter-hub-token-baum/[secret] ([email protected]) 15.22ms
-----
Logging in as Admin
~~~~~~~~~~~~~~~~~~~
Users with administration privileges can log in to the admin page via:
+https://copano.tamu.edu:8000/admin+
Using sudo to Run JupyterHub Without root Privileges
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://github.com/jupyterhub/jupyterhub/wiki/Using-sudo-to-run-JupyterHub-without-root-privileges[+https://github.com/jupyterhub/jupyterhub/wiki/Using-sudo-to-run-JupyterHub-without-root-privileges+]
First create a user - preferably without a login shell or password - to run the hub:
-----
useradd jupyter
-----
Next, the +sudospawner+ package needs to be installed:
-----
pip3 install git+https://github.com/jupyter/sudospawner
-----
NOw give the new user sudo permission to only launch the +sudospawner+ script by
adding the following to +/etc/sudoers+ via the use of +visudo+:
-----
# comma-separated whitelist of users that can spawn single-user servers
Runas_Alias JUPYTER_USERS = baum
# the command(s) the Hub can run on behalf of the above users without needing a password
# the exact path may differ, depending on how sudospawner was installed
Cmnd_Alias JUPYTER_CMD = /usr/local/bin/sudospawner
# actually give the Hub user permission to run the above command on behalf
# of the above users without prompting for a password
jupyter ALL=(JUPYTER_USERS) NOPASSWD:JUPYTER_CMD
-----
If you don't want to keep editing the +/etc/sudoers+ file you can replace the
last line in the above with:
-----
jupyter ALL=(%jupyterhub) NOPASSWD:JUPYTER_CMD
-----
where you've created a +jupyterhub+ group via:
-----
groupadd jupyterhub
-----
and then just add users to the +jupyterhub+ group via:
-----
adduser -G jupyterhub newuser
-----
Test sudo Setup
~~~~~~~~~~~~~~~
Now test the sudo setup via the following command.
This should prompt for the +$USER+ password to switch to user +jupyter+, but
should not prompt for a password for the second switch.
Note that the string used for the +sudospawner+ command has to exactly
match that specified in the +/etc/sudoers+ file.
-----
sudo -u jupyter sudo -n -u $USER /usr/local/bin/sudospawner --help
Usage: /usr/local/bin/sudospawner [OPTIONS]
Options:
--help show this help information
...
-----
Make a Directory for JupyterHub and Start the Server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you've not already created the directory:
-----
/etc/jupyterhub
-----
into which you've placed the +jupyterhub_config.py+ file, create it now and
make the owner +jupyter+ via:
-----
mkdir /etc/jupyterhub
chown jupyter /etc/jupyterhub
-----
If you've created a +cookie_secret+ file in +/srv/jupyterhub+ or
specified a separate JupyterHub log file as +/var/log/jupyterhub+ you
also have to make +jupyter+ the owner of those via:
-----
chown -R jupyter /srv/jupyterhub
chown -R jupyter /var/log/jupyterhub
-----
Now start the JupyterHub server as user +jupyter+ via:
-----
cd /etc/jupyterhub
sudo -u jupyter /usr/local/bin/jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner
-----
Note that you have to use the full path for the +jupyterhub+ binary, e.g.
+/usr/local/bin/jupyterhub+ in this case.
Note also that if you don't run the command in the directory in which your
configuration file +jupyterhub_config.py+ is located, then you have to additionally specify the
location of the file in your command. If you run it in a different directory the command would be:
-----
sudo -u jupyter /usr/local/bin/jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner -f /etc/jupyterhub/jupyterhub_config.py
-----
Languages for Jupyter
---------------------
*IPython Kernels for Other Languages* - https://github.com/ipython/ipython/wiki/IPython%20kernels%20for%20other%20languages[+https://github.com/ipython/ipython/wiki/IPython%20kernels%20for%20other%20languages+]
*Creating Language Kernels for IPython* - http://andrew.gibiansky.com/blog/ipython/ipython-kernels/[+http://andrew.gibiansky.com/blog/ipython/ipython-kernels/+]
*Messaging in IPython* - http://ipython.org/ipython-doc/rel-1.1.0/development/messaging.html[+http://ipython.org/ipython-doc/rel-1.1.0/development/messaging.html+]
This document explains the basic communications design and messaging specification for how the various IPython objects interact over a network transport. The current implementation uses the ZeroMQ library for messaging within and between hosts.
Julia
~~~~~
https://github.com/JuliaLang/IJulia.jl[+https://github.com/JuliaLang/IJulia.jl+]
Installation
^^^^^^^^^^^^
After installing Julia, run:
-----
Pkg.add("IJulia")
at the Julia command line prompt.
-----
Updating
^^^^^^^^
To update the packages in Julia - including IJulia - run:
-----
Pkg.update()
-----
at the command-line prompt. If a new version of Julia is installed,
the initial installation procedure must be repeated.
Using
^^^^^
The IJulia notebook can be invoked either by entering the
following at the Julia command-line prompt:
-----
using IJulia
notebook()
-----
or by invoking Jupyter and choosing the Julia option
under the *New* menu.
R Language
~~~~~~~~~~
https://github.com/IRkernel/IRkernel[+https://github.com/IRkernel/IRkernel+]
Status
^^^^^^
This is currently (7/15) installed and working on the Jupyterhub installation
on +terrebonne+.
Installation
^^^^^^^^^^^^
Stable Snapshot Versions
++++++++++++++++++++++++
At the R command-line prompt:
-----
install.packages(c('rzmq','repr','IRkernel','IRdisplay'),
repos = c('http://irkernel.github.io/', getOption('repos')),
type = 'source')
IRkernel::installspec()
-----
Development Versions
++++++++++++++++++++
At the R command-line prompt:
-----
install.packages('devtools')
install.packages('RCurl')
library(devtools)
install_github('IRkernel/repr')
install_github('IRkernel/IRdisplay')
install_github('IRkernel/IRkernel')
IRkernel::installspec()
-----
These versions can be update by repeating the
+install_github('IRkernel/...')+ steps.
Using
-----
The +IRkernel+ can be invoked either from the dropdown
*New* menu on the Jupyterhub page, or by invoking
Jupyter via:
-----
ipython console --kernel=ir
ipython qtconsole --kernel=ir
-----
nbgrader
--------
https://nbgrader.readthedocs.io/en/latest/index.html[+https://nbgrader.readthedocs.io/en/latest/index.html+]
Installation
~~~~~~~~~~~~
Steps taken for copano.
Install +nbgrader+ and put in on the binary path.
-----
su
pip3 install nbgrader
ln -s /opt/anaconda3/bin/nbgrader /usr/bin/nbgrader
-----
Install the extensions systemwide and activate them.
-----
nbgrader extension install
nbgrader extension activate
-----
To avoid reinstalling the extension when +nbgrader+ is updated.
-----
nbgrader extension install --symlink
-----
+nbgrader extension install+ Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-----
sudo -i -u jupyter
nbgrader extension install --help-all
Install the nbgrader extensions
Options
-------
Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.
--overwrite
Force overwrite of existing files
--sys-prefix
Use sys.prefix as the prefix for installing nbextensions (for environments, packaging)
-s
Create symlink instead of copying files
--user
Apply the operation only for the given user
--debug
set log level to logging.DEBUG (maximize logging output)
--system
Apply the operation system-wide
--py
Install from a Python package
--symlink
Create symlink instead of copying files
--python
Install from a Python package
--prefix=<Unicode> (InstallNBExtensionApp.prefix)
Default: ''
Installation prefix
--nbextensions=<Unicode> (InstallNBExtensionApp.nbextensions_dir)
Default: ''
Full path to nbextensions dir (probably use prefix or user)
--destination=<Unicode> (InstallNBExtensionApp.destination)
Default: ''
Destination for the copy or symlink
Class parameters
----------------
Parameters are set from command-line arguments of the form:
`--Class.trait=value`. This line is evaluated in Python, so simple expressions
are allowed, e.g.:: `--C.a='range(3)'` For setting C.a=[0,1,2].
ExtensionInstallApp options
---------------------------
--ExtensionInstallApp.answer_yes=<Bool>
Default: False
Answer yes to any prompts.
--ExtensionInstallApp.assignment_id=<Unicode>
Default: ''
The assignment name. This MUST be specified, either by setting the config
option, passing an argument on the command line, or using the --assignment
option on the command line.
--ExtensionInstallApp.autograded_directory=<Unicode>
Default: 'autograded'
The name of the directory that contains assignment submissions after they
have been autograded. This corresponds to the `nbgrader_step` variable in
the `directory_structure` config option.
--ExtensionInstallApp.config_file=<Unicode>
Default: ''
Full path of a config file.
--ExtensionInstallApp.config_file_name=<Unicode>
Default: ''
Specify a config file to load.
--ExtensionInstallApp.course_directory=<Unicode>
Default: ''
The root directory for the course files (that includes the `source`,
`release`, `submitted`, `autograded`, etc. directories). Defaults to the
current working directory.
--ExtensionInstallApp.course_id=<Unicode>
Default: ''
A key that is unique per instructor and course. This MUST be specified,
either by setting the config option, or using the --course option on the
command line.
--ExtensionInstallApp.db_assignments=<List>
Default: []
A list of assignments that will be created in the database. Each item in the
list should be a dictionary with the following keys:
- name
- duedate (optional)
The values will be stored in the database. Please see the API documentation
on the `Assignment` database model for details on these fields.
--ExtensionInstallApp.db_students=<List>
Default: []
A list of student that will be created in the database. Each item in the