diff --git a/.travis.yml b/.travis.yml
index 1e0247f472..8658042ecf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -54,7 +54,6 @@ script:
make -C docs/ linkcheck || EXIT_STATUS=$?;
fi
- pytest --nbval --current-env docs || EXIT_STATUS=$?
exit $EXIT_STATUS
fi
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 13dcfd81db..49a54f2926 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -74,8 +74,8 @@ If you want coverage statistics as well, you can run::
Building the Documentation
--------------------------
-To build the documentation you'll need `Sphinx `_,
-`pandoc `_ and a few other packages.
+To build the documentation you'll need `Sphinx `_,
+`pandoc `_ and a few other packages.
To install (and activate) a `conda environment`_ named ``server_docs``
containing all the necessary packages (except pandoc), use::
@@ -85,7 +85,7 @@ containing all the necessary packages (except pandoc), use::
activate notebook_docs # Windows
.. _conda environment:
- https://conda.io/docs/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file
+ https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file
If you want to install the necessary packages with ``pip`` instead::
diff --git a/docs-translations/ko-KR/HowtoRun.md b/docs-translations/ko-KR/HowtoRun.md
deleted file mode 100644
index eb070dea53..0000000000
--- a/docs-translations/ko-KR/HowtoRun.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# Notebook 실행하기
-
- ## 첫 걸음
- 1. 다음 명령어를 통해 Notebook 서버를 시작하세요 :
-
- $ jupyter notebook
-
- 2. 브라우저에 Notebook이 실행된 것을 확인할 수 있습니다.
-
-
-# Notebook 서버 시작하기
-
- Notebook을 컴퓨터에 설치하였으면 Notebook 서버를 시작할 수 있습니다. 다음 명령어를 이용하여 Notebook서버를 시작할 수 있습니다.
-
- $ jupyter notebook
-
- 이 명령어를 실행하면, 터미널에 웹 응용프로그램의 주소와 서버에 대한 정보가 출력됩니다.
-
- $ jupyter notebook
- $ [I 08:58:24.417 NotebookApp] Serving notebooks from local directory: /Users/catherline
- $ [I 08:58:24.417 NotebookApp] 0 active kernels
- $ [I 08:58:24.417 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
- $ [I 08:58:24.417 NotebookApp] Use Control-C to stop this server and shut down all kernels
-
- 기본 브라우저를 통해 이 주소가 열립니다.
-
- Notebook이 브라우저에 열리면, Notebook의 목록을 보여주는 Notebook Dashboard를 볼 수 있습니다. 대체로 가장 상위의 디렉토리를 열어줄 것입니다.
-
- **Notebook Dashboard**
-
-![Notebook Dashboard example](resources/dashboard.GIF "Notebook Dashboard")
-
-# Notebook 서버의 명령어 소개
-
- ## 커스텀 IP 나 포트를 이용하여 시작하려면 어떻게 해야할까?
-
- 기본값으로, Notebook 서버는 포트 8888로 시작됩니다. 만약 포트8888이 사용할 수 없다면, Notebook 서버는 다른 가능한 포트를 찾습니다. 또한 임의로 포트를 설정해주는 것도 가능합니다. 예를 들어 포트 9999로 실행하면 :
-
- $ jupyter notebook --port 9999
-
-
- ## 브라우저를 열지않고 Notebook를 열기
-
- 브라우저를 열지 않고 Notebook 서버를 시작하려면 :
-
- $ jupyter notebook --no-browser
-
-
- ## Notebook 서버 옵션 도움말 보기
-
- Notebook 서버는 --help 옵션을 통해 도움말 메시지를 제공합니다 :
-
- $ jupyter notebook --help
-
-
-
-
diff --git a/docs-translations/ko-KR/Installation.md b/docs-translations/ko-KR/Installation.md
deleted file mode 100644
index d5375d3b5e..0000000000
--- a/docs-translations/ko-KR/Installation.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Jupyter Notebook 설치하기
-
-## 필요한 것 : Python
-
-Jupyter Notebook 을 설치하기 위해선 Jupyter가 많은 프로그래밍 언어들로 동작되기 때문에, Python이 필요합니다. (Python 3.3이상, Python 2.7)
-
-Python과 Jupyter를 설치할 때 Anaconda를 이용하는 것을 추천합니다. 밑에서 이를 이용하여 설치할 것입니다.
-
-## Anaconda 와 conda 를 이용하여 Jupyter 설치하기
-
-새로운 이용자들은 Anaconda를 설치하는 것을 강력하게 추천합니다. Anaconda는 Python과 Jupyter를 쉽게 설치하게 해주고, 과학적인 계산과 데이터를 위한 자주 사용되는 패키지들의 설치에도 유용합니다.
-
-설치 순서 :
-
- 1. Anaconda를 다운받으세요. Anaconda의 가장 최신의 Python 3버전을 다운 받는 것을 추천합니다.
- 2. 다운 받은 Anaconda 의 다운로드 페이지에 있는 설명을 읽고 설치해주세요.
- 3. 축하합니다. Jupyter Notebook 을 설치하셨습니다. Jupyter Notebook을 실행하려면 :
-
- $ jupyter notebook
-
-## 숙련된 Python 이용자 : pip을 통해 설치하기
-
- Python 이용자라면, Anaconda 대신에 Python의 패키지 매니저 pip을 이용하여 설치하세요.
-
- 첫째로, 가장 최신의 pip인지를 확인하세요; 구 버전은 독립성에 문제가 있을 수 있습니다.
-
- $ pip install --upgrade pip
-
- 이제 다음을 이용하여 Jupyter Notebook를 설치하세요 :
-
- $ pip install jupyter
-
- (축하합니다. Jupyter Notebook를 설치하셨습니다.)
diff --git a/docs-translations/ko-KR/README.md b/docs-translations/ko-KR/README.md
deleted file mode 100644
index 3e6f9aa69b..0000000000
--- a/docs-translations/ko-KR/README.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Jupyter Notebook
-
-[![Google Group](https://img.shields.io/badge/-Google%20Group-lightgrey.svg)](https://groups.google.com/forum/#!forum/jupyter)
-[![Build Status](https://travis-ci.org/jupyter/notebook.svg?branch=master)](https://travis-ci.org/jupyter/notebook)
-[![Documentation Status](https://readthedocs.org/projects/jupyter-notebook/badge/?version=latest)](http://jupyter-notebook.readthedocs.io/en/latest/?badge=latest)
-
-English 버전 링크 : [[English Version](http://github.com/jupyter/notebook/)]
-
-Jupyter notebook 은 상호 교환을 위한 웹 기반 환경입니다.
-
-![Jupyter notebook example](resources/running_code_med.png "Jupyter notebook example")
-
-### Jupyter notebook, 사용자의 언어에 독립적인 IPython notebook의 진화
-Jupyter notebook은 Jupyter 프로젝트를 위한 사용자 언어에 독립적인 HTML 응용 프로그램입니다.
-2015년에 Jupyter notebook은 IPython 코드 기반의 The Big Split™ 의 일부분으로 시작되었습니다.
-IPython 3는 *IPython notebook* 과 같은 사용자 언어에 독립적인 코드와 *IPython kernel for Python* 과 같은 특정언어 기반의 코드의 기능을 가지고 출시되었습니다.
-컴퓨터에는 많은 언어가 사용되기 때문에, Jupyter 프로젝트는 사용자 언어에 독립적인 **Jupyter notebook** 을 이 저장소와 개인의 독립적인 저장소에 있는 특정언어 중심의 커널의 도움으로 지속적으로 개발할 것입니다.
-[[The Big Split™ announcement](https://blog.jupyter.org/2015/04/15/the-big-split/)]
-[[Jupyter Ascending blog post](http://blog.jupyter.org/2015/08/12/first-release-of-jupyter/)]
-
-## 설치
-설치법 문서는 다음 주소에서 찾을 수 있습니다.
-You can find the installation documentation for the
-[Jupyter platform, on ReadTheDocs](https://jupyter.readthedocs.io/en/latest/install.html).
-조금 더 심화된 Jupyter notebook의 사용은 다음 주소에서 볼 수 있습니다.
-[here](https://jupyter-notebook.readthedocs.io/en/latest/).
-
-설치를 위해서는
-[pip installed](https://pip.readthedocs.io/en/stable/installing/) 가 있는지 확인한 후 다음을 실행해주세요:
-
- $ pip install notebook
-
-## 활용 - Jupyter notebook 실행하기
-
-### 로컬에서 실행할 때
-
-이와 같이 실행하세요:
-
- $ jupyter notebook
-
-## 개발 설치
-
-[`CONTRIBUTING.rst`](CONTRIBUTING.rst) 을 통해 설치법을 확인하세요.
-
-## 기여하기
-
-이 프로젝트에 기여를 하고 싶다면, [`CONTRIBUTING.rst`](CONTRIBUTING.rst) 을 참고해주세요.
-
-## 자료
-- [Project Jupyter website](https://jupyter.org)
-- [Online Demo at try.jupyter.org](https://try.jupyter.org)
-- [Documentation for Jupyter notebook](https://jupyter-notebook.readthedocs.io/en/latest/) [[PDF](https://media.readthedocs.org/pdf/jupyter-notebook/latest/jupyter-notebook.pdf)]
-- [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html) [[PDF](https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf)]
-- [Issues](https://github.com/jupyter/notebook/issues)
-- [Technical support - Jupyter Google Group](https://groups.google.com/forum/#!forum/jupyter)
diff --git a/docs-translations/ko-KR/UIComponents.md b/docs-translations/ko-KR/UIComponents.md
deleted file mode 100644
index c582c7ead5..0000000000
--- a/docs-translations/ko-KR/UIComponents.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# UI 기능
-
-버그 리포트나 Jupyter Mailing list에 메일을 보내려고 할 때, 개발자나 사용자들이 버그를 진단하거나 해결해줄 경우 다른 UI를 사용하면 시간이 단축된다.
-이번 장에서는 Notebook과 Notebook의 다른 모드의 UI 요소를 알려줄 것이다.
-
- ## Notebook Dashboard
-
-jupyter notebook 명령어를 실행하면 가장 먼저 Notebook Dashboard가 나타난다.
-
-![Notebook Dashboard example](resources/dashboard.GIF "Notebook Dashboard")
-
-
-
- ## Notebook 편집기
-
-편집을 위해 Notebook을 선택했다면, Notebook은 Notebook편집기를 열어준다.
-
-![Notebook Editor example](resources/Notebook_Editor.GIF "Notebook Editor")
- ## Notebook 의 사용자 도움 인터페이스
-
-만약 Notebook 편집기의 특정 요소를 더 배우고 싶다면, 도움 메뉴 - 사용자 인터페이스 를 선택함으로써 사용사 인터페이스 도움말을 볼 수 있습니다.
-
- ## 편집 모드와 Notebook편집기
-
-셀이 편집모드에 있다면, 셀 모드 지시자는 셀의 상태를 반영합니다. 이 상태는 오른쪽 위의 작은 연필모양으로 선택가능합니다. 셀이 명령 모드에 있다면, 그 위치에 아이콘이 없습니다.
-
-![Edit Mode example](resources/edit_mode.GIF "Edit Mode")
-
- ## 파일 편집기
-
-이제 Notebook Dashboard 안의 Notebook 파일이 아닌 표시된 파일을 선택하여 열어야한다고 한다면, 파일은 파일 편집기로 열립니다.
-
-![File Editor example](resources/file_editor.GIF "File Editor")
-
-
-
-
-
diff --git a/docs-translations/ko-KR/resources/Notebook_Editor.GIF b/docs-translations/ko-KR/resources/Notebook_Editor.GIF
deleted file mode 100644
index 50e433d41f..0000000000
Binary files a/docs-translations/ko-KR/resources/Notebook_Editor.GIF and /dev/null differ
diff --git a/docs-translations/ko-KR/resources/dashboard.GIF b/docs-translations/ko-KR/resources/dashboard.GIF
deleted file mode 100644
index e34f1d971b..0000000000
Binary files a/docs-translations/ko-KR/resources/dashboard.GIF and /dev/null differ
diff --git a/docs-translations/ko-KR/resources/edit_mode.GIF b/docs-translations/ko-KR/resources/edit_mode.GIF
deleted file mode 100644
index 6dd34d0171..0000000000
Binary files a/docs-translations/ko-KR/resources/edit_mode.GIF and /dev/null differ
diff --git a/docs-translations/ko-KR/resources/file_editor.GIF b/docs-translations/ko-KR/resources/file_editor.GIF
deleted file mode 100644
index 69595f37fa..0000000000
Binary files a/docs-translations/ko-KR/resources/file_editor.GIF and /dev/null differ
diff --git a/docs-translations/ko-KR/resources/running_code_med.png b/docs-translations/ko-KR/resources/running_code_med.png
deleted file mode 100644
index 6f80194745..0000000000
Binary files a/docs-translations/ko-KR/resources/running_code_med.png and /dev/null differ
diff --git a/docs/doc-requirements.txt b/docs/doc-requirements.txt
index be3f353637..a99918f253 100644
--- a/docs/doc-requirements.txt
+++ b/docs/doc-requirements.txt
@@ -1,4 +1,3 @@
sphinx>=1.3.6
sphinx-rtd-theme
-nbsphinx
sphinxcontrib_github_alt
diff --git a/docs/environment.yml b/docs/environment.yml
index ca73057e88..23f013f6be 100644
--- a/docs/environment.yml
+++ b/docs/environment.yml
@@ -9,7 +9,6 @@ dependencies:
- ipykernel
- sphinx
- pip:
- - nbsphinx
- Send2Trash
- prometheus_client
- sphinxcontrib_github_alt
diff --git a/docs/jsdoc_config.json b/docs/jsdoc_config.json
deleted file mode 100644
index 4da2e3d8b1..0000000000
--- a/docs/jsdoc_config.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "markdown": {
- "parser": "gfm"
- },
- "plugins": [
- "plugins/markdown" ,
- "jsdoc_plugin.js"
- ],
- "source": {
- "include": [
- "../notebook/static/notebook/js/notebook.js"
- ]
- },
- "tags": {
- "allowUnknownTags": true
- },
- "templates": {
- "cleverLinks": false,
- "monospaceLinks": false
- }
-}
diff --git a/docs/jsdoc_plugin.js b/docs/jsdoc_plugin.js
deleted file mode 100644
index 3fa3035020..0000000000
--- a/docs/jsdoc_plugin.js
+++ /dev/null
@@ -1,12 +0,0 @@
-exports.handlers = {
- newDoclet: function(e) {
- // e.doclet will refer to the newly created doclet
- // you can read and modify properties of that doclet if you wish
- if (typeof e.doclet.name === 'string') {
- if (e.doclet.name[0] == '_') {
- console.log('Private method "' + e.doclet.longname + '" not documented.');
- e.doclet.memberof = '';
- }
- }
- }
-};
\ No newline at end of file
diff --git a/docs/resources/Info.plist.example b/docs/resources/Info.plist.example
deleted file mode 100644
index bfdd89bf0b..0000000000
--- a/docs/resources/Info.plist.example
+++ /dev/null
@@ -1,20 +0,0 @@
- # Add this into the info.plist file of an application
- # and the icns icon in Contents/Resources
- # then move the application twice :
- # https://superuser.com/questions/178316/how-to-set-an-icon-for-a-file-type-on-mac
-
- CFBundleDocumentTypes
-
-
- CFBundleTypeExtensions
-
- ipynb
-
- CFBundleTypeIconFile
- ipynb_mac_icon
- CFBundleTypeName
- IPython notebook file
- CFBundleTypeRole
- None
-
-
diff --git a/docs/resources/generate_icons.sh b/docs/resources/generate_icons.sh
deleted file mode 100755
index a72b2d867f..0000000000
--- a/docs/resources/generate_icons.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-INKSCAPE=inkscape
-
-${INKSCAPE} -z -C --file=ipynb_icon_16x16.svg --export-png=ipynb_icon_16x16_uncrush.png
-${INKSCAPE} -z -C --file=ipynb_icon_24x24.svg --export-png=ipynb_icon_24x24_uncrush.png
-${INKSCAPE} -z -C --file=ipynb_icon_32x32.svg --export-png=ipynb_icon_32x32_uncrush.png
-${INKSCAPE} -z -C --file=ipynb_icon_512x512.svg --export-png=ipynb_icon_64x64_uncrush.png -w 64 -h 64
-${INKSCAPE} -z -C --file=ipynb_icon_512x512.svg --export-png=ipynb_icon_128x128_uncrush.png -w 128 -h 128
-${INKSCAPE} -z -C --file=ipynb_icon_512x512.svg --export-png=ipynb_icon_256x256_uncrush.png -w 256 -h 256
-${INKSCAPE} -z -C --file=ipynb_icon_512x512.svg --export-png=ipynb_icon_512x512_uncrush.png -w 512 -h 512
-
-
-for file in `ls *_uncrush.png`; do
- pngcrush -brute -l 9 -reduce -rem alla -rem text -rem time -rem gAMA -rem cHRM -rem iCCP -rem sRGB $file `basename $file _uncrush.png`.png
- rm $file
-done
diff --git a/docs/resources/icon_16x16.svg b/docs/resources/icon_16x16.svg
deleted file mode 100644
index 29145e80d0..0000000000
--- a/docs/resources/icon_16x16.svg
+++ /dev/null
@@ -1,149 +0,0 @@
-
-
-
-
diff --git a/docs/resources/icon_24x24.svg b/docs/resources/icon_24x24.svg
deleted file mode 100644
index c50ef1f07d..0000000000
--- a/docs/resources/icon_24x24.svg
+++ /dev/null
@@ -1,167 +0,0 @@
-
-
-
-
diff --git a/docs/resources/icon_32x32.svg b/docs/resources/icon_32x32.svg
deleted file mode 100644
index 7a19362269..0000000000
--- a/docs/resources/icon_32x32.svg
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-
-
diff --git a/docs/resources/icon_512x512.svg b/docs/resources/icon_512x512.svg
deleted file mode 100644
index f7f0281664..0000000000
--- a/docs/resources/icon_512x512.svg
+++ /dev/null
@@ -1,226 +0,0 @@
-
-
-
-
diff --git a/docs/resources/ipynb.icns b/docs/resources/ipynb.icns
deleted file mode 100644
index 7f3898c650..0000000000
Binary files a/docs/resources/ipynb.icns and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_1024x1024.png b/docs/resources/ipynb.iconset/icon_1024x1024.png
deleted file mode 100644
index b2c8f07dce..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_1024x1024.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_128x128.png b/docs/resources/ipynb.iconset/icon_128x128.png
deleted file mode 100644
index 5e50eee511..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_128x128.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_128x128@2x.png b/docs/resources/ipynb.iconset/icon_128x128@2x.png
deleted file mode 100644
index 3acf85895d..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_128x128@2x.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_16x16.png b/docs/resources/ipynb.iconset/icon_16x16.png
deleted file mode 100644
index d2a5c7a4b9..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_16x16.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_16x16@2x.png b/docs/resources/ipynb.iconset/icon_16x16@2x.png
deleted file mode 100644
index 46b7e1cb0f..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_16x16@2x.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_24x24.png b/docs/resources/ipynb.iconset/icon_24x24.png
deleted file mode 100644
index caaa7853b6..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_24x24.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_24x24@2x.png b/docs/resources/ipynb.iconset/icon_24x24@2x.png
deleted file mode 100644
index d35831ddaa..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_24x24@2x.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_256x256.png b/docs/resources/ipynb.iconset/icon_256x256.png
deleted file mode 100644
index 3acf85895d..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_256x256.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_256x256@2x.png b/docs/resources/ipynb.iconset/icon_256x256@2x.png
deleted file mode 100644
index 6b65de3e5d..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_256x256@2x.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_32x32.png b/docs/resources/ipynb.iconset/icon_32x32.png
deleted file mode 100644
index a4dfcfd754..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_32x32.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_32x32@2x.png b/docs/resources/ipynb.iconset/icon_32x32@2x.png
deleted file mode 100644
index cefed98e6a..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_32x32@2x.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_48x48.png b/docs/resources/ipynb.iconset/icon_48x48.png
deleted file mode 100644
index 0f57dd0a2d..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_48x48.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_512x512.png b/docs/resources/ipynb.iconset/icon_512x512.png
deleted file mode 100644
index 6b65de3e5d..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_512x512.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_512x512@2x.png b/docs/resources/ipynb.iconset/icon_512x512@2x.png
deleted file mode 100644
index 83e165003a..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_512x512@2x.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_64x64.png b/docs/resources/ipynb.iconset/icon_64x64.png
deleted file mode 100644
index e21b4575aa..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_64x64.png and /dev/null differ
diff --git a/docs/resources/ipynb.iconset/icon_64x64@2x.png b/docs/resources/ipynb.iconset/icon_64x64@2x.png
deleted file mode 100644
index 5e50eee511..0000000000
Binary files a/docs/resources/ipynb.iconset/icon_64x64@2x.png and /dev/null differ
diff --git a/docs/resources/notebook_basics.png b/docs/resources/notebook_basics.png
deleted file mode 100644
index d75ce11fea..0000000000
Binary files a/docs/resources/notebook_basics.png and /dev/null differ
diff --git a/docs/resources/running_code.png b/docs/resources/running_code.png
deleted file mode 100644
index c74ee403fd..0000000000
Binary files a/docs/resources/running_code.png and /dev/null differ
diff --git a/docs/resources/running_code_med.png b/docs/resources/running_code_med.png
deleted file mode 100644
index 6f80194745..0000000000
Binary files a/docs/resources/running_code_med.png and /dev/null differ
diff --git a/docs/source/_static/images/blank-notebook-ui.png b/docs/source/_static/images/blank-notebook-ui.png
deleted file mode 100644
index f497626368..0000000000
Binary files a/docs/source/_static/images/blank-notebook-ui.png and /dev/null differ
diff --git a/docs/source/_static/images/blank-notebook-ui.svg b/docs/source/_static/images/blank-notebook-ui.svg
deleted file mode 100644
index 10f5ab4fd0..0000000000
--- a/docs/source/_static/images/blank-notebook-ui.svg
+++ /dev/null
@@ -1,397 +0,0 @@
-
-
-
-
diff --git a/docs/source/_static/images/cell-tags-toolbar.png b/docs/source/_static/images/cell-tags-toolbar.png
deleted file mode 100644
index cab448f9ec..0000000000
Binary files a/docs/source/_static/images/cell-tags-toolbar.png and /dev/null differ
diff --git a/docs/source/_static/images/cell-toolbar-41.png b/docs/source/_static/images/cell-toolbar-41.png
deleted file mode 100644
index 8a93e64c4a..0000000000
Binary files a/docs/source/_static/images/cell-toolbar-41.png and /dev/null differ
diff --git a/docs/source/_static/images/command-palette-41.png b/docs/source/_static/images/command-palette-41.png
deleted file mode 100644
index 272f11fa17..0000000000
Binary files a/docs/source/_static/images/command-palette-41.png and /dev/null differ
diff --git a/docs/source/_static/images/dashboard-sort.png b/docs/source/_static/images/dashboard-sort.png
deleted file mode 100644
index 020cc04164..0000000000
Binary files a/docs/source/_static/images/dashboard-sort.png and /dev/null differ
diff --git a/docs/source/_static/images/find-replace-41.png b/docs/source/_static/images/find-replace-41.png
deleted file mode 100644
index 73e57a68e2..0000000000
Binary files a/docs/source/_static/images/find-replace-41.png and /dev/null differ
diff --git a/docs/source/_static/images/jupyter-file-editor.png b/docs/source/_static/images/jupyter-file-editor.png
deleted file mode 100644
index 1447ed8abe..0000000000
Binary files a/docs/source/_static/images/jupyter-file-editor.png and /dev/null differ
diff --git a/docs/source/_static/images/jupyter-notebook-dashboard.png b/docs/source/_static/images/jupyter-notebook-dashboard.png
deleted file mode 100644
index 812545ceb8..0000000000
Binary files a/docs/source/_static/images/jupyter-notebook-dashboard.png and /dev/null differ
diff --git a/docs/source/_static/images/jupyter-notebook-default.png b/docs/source/_static/images/jupyter-notebook-default.png
deleted file mode 100644
index aa904475f9..0000000000
Binary files a/docs/source/_static/images/jupyter-notebook-default.png and /dev/null differ
diff --git a/docs/source/_static/images/jupyter-notebook-edit.png b/docs/source/_static/images/jupyter-notebook-edit.png
deleted file mode 100644
index 81e0fcaf11..0000000000
Binary files a/docs/source/_static/images/jupyter-notebook-edit.png and /dev/null differ
diff --git a/docs/source/_static/images/jupyter-verification.png b/docs/source/_static/images/jupyter-verification.png
deleted file mode 100644
index da816450e5..0000000000
Binary files a/docs/source/_static/images/jupyter-verification.png and /dev/null differ
diff --git a/docs/source/_static/images/multi-select-41.png b/docs/source/_static/images/multi-select-41.png
deleted file mode 100644
index 3c8cd51a0c..0000000000
Binary files a/docs/source/_static/images/multi-select-41.png and /dev/null differ
diff --git a/docs/source/_static/images/new-notebook.gif b/docs/source/_static/images/new-notebook.gif
deleted file mode 100644
index 2db70c14f8..0000000000
Binary files a/docs/source/_static/images/new-notebook.gif and /dev/null differ
diff --git a/docs/source/_static/images/shortcut-editor.png b/docs/source/_static/images/shortcut-editor.png
deleted file mode 100644
index efe5fce681..0000000000
Binary files a/docs/source/_static/images/shortcut-editor.png and /dev/null differ
diff --git a/docs/source/_static/images/table-style-after.png b/docs/source/_static/images/table-style-after.png
deleted file mode 100644
index dadbed4531..0000000000
Binary files a/docs/source/_static/images/table-style-after.png and /dev/null differ
diff --git a/docs/source/_static/images/table-style-before.png b/docs/source/_static/images/table-style-before.png
deleted file mode 100644
index 1f4d976b24..0000000000
Binary files a/docs/source/_static/images/table-style-before.png and /dev/null differ
diff --git a/docs/source/comms.rst b/docs/source/comms.rst
deleted file mode 100644
index 1a0a5a3250..0000000000
--- a/docs/source/comms.rst
+++ /dev/null
@@ -1,98 +0,0 @@
-Comms
-=====
-
-*Comms* allow custom messages between the frontend and the kernel. They are used,
-for instance, in `ipywidgets `__ to
-update widget state.
-
-A comm consists of a pair of objects, in the kernel and the frontend, with an
-automatically assigned unique ID. When one side sends a message, a callback on
-the other side is triggered with that message data. Either side, the frontend
-or kernel, can open or close the comm.
-
-.. seealso::
-
- `Custom Messages `__
- The messaging specification section on comms
-
-Opening a comm from the kernel
-------------------------------
-
-First, the function to accept the comm must be available on the frontend. This
-can either be specified in a `requirejs` module, or registered in a registry, for
-example when an :doc:`extension ` is loaded.
-This example shows a frontend comm target registered in a registry:
-
-.. code-block:: javascript
-
- Jupyter.notebook.kernel.comm_manager.register_target('my_comm_target',
- function(comm, msg) {
- // comm is the frontend comm instance
- // msg is the comm_open message, which can carry data
-
- // Register handlers for later messages:
- comm.on_msg(function(msg) {...});
- comm.on_close(function(msg) {...});
- comm.send({'foo': 0});
- });
-
-Now that the frontend comm is registered, you can open the comm from the kernel:
-
-.. code-block:: python
-
- from ipykernel.comm import Comm
-
- # Use comm to send a message from the kernel
- my_comm = Comm(target_name='my_comm_target', data={'foo': 1})
- my_comm.send({'foo': 2})
-
- # Add a callback for received messages.
- @my_comm.on_msg
- def _recv(msg):
- # Use msg['content']['data'] for the data in the message
-
-
-This example uses the IPython kernel; it's up to each language kernel what API,
-if any, it offers for using comms.
-
-Opening a comm from the frontend
---------------------------------
-
-This is very similar to above, but in reverse. First, a comm target must be
-registered in the kernel. For instance, this may be done by code displaying
-output: it will register a target in the kernel, and then display output
-containing Javascript to connect to it.
-
-.. code-block:: python
-
- def target_func(comm, msg):
- # comm is the kernel Comm instance
- # msg is the comm_open message
-
- # Register handler for later messages
- @comm.on_msg
- def _recv(msg):
- # Use msg['content']['data'] for the data in the message
-
- # Send data to the frontend
- comm.send({'foo': 5})
-
- get_ipython().kernel.comm_manager.register_target('my_comm_target', target_func)
-
-This example uses the IPython kernel again; this example will be different in
-other kernels that support comms. Refer to the specific language kernel's
-documentation for comms support.
-
-And then open the comm from the frontend:
-
-.. code-block:: javascript
-
- comm = Jupyter.notebook.kernel.comm_manager.new_comm('my_comm_target',
- {'foo': 6})
- // Send data
- comm.send({'foo': 7})
-
- // Register a handler
- comm.on_msg(function(msg) {
- console.log(msg.content.data.foo);
- });
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 04c6b1a9b7..d0f5478647 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -69,7 +69,6 @@
'sphinx.ext.autosummary',
'sphinx.ext.mathjax',
'IPython.sphinxext.ipython_console_highlighting',
- 'nbsphinx',
'sphinxcontrib_github_alt',
]
@@ -140,7 +139,8 @@
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = 'default'
+#highlight_language = 'python3'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
diff --git a/docs/source/config_overview.rst b/docs/source/config_overview.rst
index e9364d7af9..ee49b766cd 100644
--- a/docs/source/config_overview.rst
+++ b/docs/source/config_overview.rst
@@ -30,11 +30,10 @@ and editing settings is similar for all the Jupyter applications.
.. _configure_server:
-Jupyter server
---------------
+Server-specific configuration
+-----------------------------
-The Jupyter server runs the language kernel and communicates with the
-front-end client (i.e. JupyterLab).
+The Jupyter server runs the language kernel and communicates with Jupyter Server frontends.
- Configuring the Jupyter server
@@ -56,10 +55,9 @@ front-end client (i.e. JupyterLab).
Server extensions
-----------------
-- `Distributing Jupyter Extensions as Python Packages `_
- `Extending the Server `_
-:ref:`Security in Jupyter: ` Since security
+Since security
policies vary from organization to organization, we encourage you to
consult with your security team on settings that would be best for your use
cases. Our documentation offers some responsible security practices, and we
diff --git a/docs/source/development_faq.rst b/docs/source/development_faq.rst
deleted file mode 100644
index 562d7fde8d..0000000000
--- a/docs/source/development_faq.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-.. _development_faq:
-
-Developer FAQ
-=============
-
-1. How do I install a prerelease version such as a beta or release candidate?
-
-.. code-block:: bash
-
- python -m pip install notebook --pre --upgrade
diff --git a/docs/source/development_release.rst b/docs/source/development_release.rst
deleted file mode 100644
index 4350ace10f..0000000000
--- a/docs/source/development_release.rst
+++ /dev/null
@@ -1,67 +0,0 @@
-.. _notebook_release:
-
-Making a Notebook release
-=========================
-
-This document guides a contributor through creating a release of the Jupyter
-notebook.
-
-Check installed tools
----------------------
-
-Review ``CONTRIBUTING.rst``. Make sure all the tools needed to generate the
-minified JavaScript and CSS files are properly installed.
-
-Clean the repository
---------------------
-
-You can remove all non-tracked files with:
-
-.. code:: bash
-
- git clean -xfdi
-
-This would ask you for confirmation before removing all untracked files. Make
-sure the ``dist/`` folder is clean and avoid stale build from
-previous attempts.
-
-Create the release
-------------------
-
-#. Update version number in ``notebook/_version.py``.
-
-#. Run this command:
-
- .. code:: bash
-
- python setup.py jsversion
-
- It will modify (at least) ``notebook/static/base/js/namespace.js`` which
- makes the notebook version available from within JavaScript.
-
-#. Commit and tag the release with the current version number:
-
- .. code:: bash
-
- git commit -am "release $VERSION"
- git tag $VERSION
-
-#. You are now ready to build the ``sdist`` and ``wheel``:
-
- .. code:: bash
-
- python setup.py sdist
- python setup.py bdist_wheel
-
-#. You can now test the ``wheel`` and the ``sdist`` locally before uploading
- to PyPI. Make sure to use `twine `_ to
- upload the archives over SSL.
-
- .. code:: bash
-
- twine upload dist/*
-
-#. If all went well, change the ``notebook/_version.py`` back adding the
- ``.dev`` suffix.
-
-#. Push directly on master, not forgetting to push ``--tags`` too.
diff --git a/docs/source/examples/Notebook/Connecting with the Qt Console.ipynb b/docs/source/examples/Notebook/Connecting with the Qt Console.ipynb
deleted file mode 100644
index 4794200413..0000000000
--- a/docs/source/examples/Notebook/Connecting with the Qt Console.ipynb
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Connecting to an existing IPython kernel using the Qt Console"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## The Frontend/Kernel Model"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The traditional IPython (`ipython`) consists of a single process that combines a terminal based UI with the process that runs the users code.\n",
- "\n",
- "While this traditional application still exists, the modern Jupyter consists of two processes:\n",
- "\n",
- "* Kernel: this is the process that runs the users code.\n",
- "* Frontend: this is the process that provides the user interface where the user types code and sees results.\n",
- "\n",
- "Jupyter currently has 3 frontends:\n",
- "\n",
- "* Terminal Console (`jupyter console`)\n",
- "* Qt Console (`jupyter qtconsole`)\n",
- "* Notebook (`jupyter notebook`)\n",
- "\n",
- "The Kernel and Frontend communicate over a ZeroMQ/JSON based messaging protocol, which allows multiple Frontends (even of different types) to communicate with a single Kernel. This opens the door for all sorts of interesting things, such as connecting a Console or Qt Console to a Notebook's Kernel. For example, you may want to connect a Qt console to your Notebook's Kernel and use it as a help\n",
- "browser, calling `??` on objects in the Qt console (whose pager is more flexible than the\n",
- "one in the notebook). \n",
- "\n",
- "This Notebook describes how you would connect another Frontend to an IPython Kernel that is associated with a Notebook.\n",
- "The commands currently given here are specific to the IPython kernel."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Manual connection"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "To connect another Frontend to a Kernel manually, you first need to find out the connection information for the Kernel using the `%connect_info` magic:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "%connect_info"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You can see that this magic displays everything you need to connect to this Notebook's Kernel."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Automatic connection using a new Qt Console"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You can also start a new Qt Console connected to your current Kernel by using the `%qtconsole` magic. This will detect the necessary connection\n",
- "information and start the Qt Console for you automatically."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "a = 10"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "%qtconsole"
- ]
- }
- ],
- "metadata": {
- "nbsphinx": {
- "execute": "never"
- },
- "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.5.2"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 1
-}
diff --git a/docs/source/examples/Notebook/Custom Keyboard Shortcuts.ipynb b/docs/source/examples/Notebook/Custom Keyboard Shortcuts.ipynb
deleted file mode 100644
index 64576268d2..0000000000
--- a/docs/source/examples/Notebook/Custom Keyboard Shortcuts.ipynb
+++ /dev/null
@@ -1,157 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Keyboard Shortcut Customization"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Starting with Jupyter Notebook 5.0, you can customize the `command` mode shortcuts from within the Notebook Application itself. \n",
- "\n",
- "Head to the **`Help`** menu and select the **`Edit keyboard Shortcuts`** item.\n",
- "A dialog will guide you through the process of adding custom keyboard shortcuts.\n",
- "\n",
- "Keyboard shortcut set from within the Notebook Application will be persisted to your configuration file. \n",
- "A single action may have several shortcuts attached to it."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Keyboard Shortcut Customization (Pre Notebook 5.0)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Starting with IPython 2.0 keyboard shortcuts in command and edit mode are fully customizable. These customizations are made using the Jupyter JavaScript API. Here is an example that makes the `r` key available for running a cell:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "%%javascript\n",
- "\n",
- "Jupyter.keyboard_manager.command_shortcuts.add_shortcut('r', {\n",
- " help : 'run cell',\n",
- " help_index : 'zz',\n",
- " handler : function (event) {\n",
- " IPython.notebook.execute_cell();\n",
- " return false;\n",
- " }}\n",
- ");"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "\"By default the keypress `r`, while in command mode, changes the type of the selected cell to `raw`. This shortcut is overridden by the code in the previous cell, and thus the action no longer be available via the keypress `r`.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "There are a couple of points to mention about this API:\n",
- "\n",
- "* The `help_index` field is used to sort the shortcuts in the Keyboard Shortcuts help dialog. It defaults to `zz`.\n",
- "* When a handler returns `false` it indicates that the event should stop propagating and the default action should not be performed. For further details about the `event` object or event handling, see the jQuery docs.\n",
- "* If you don't need a `help` or `help_index` field, you can simply pass a function as the second argument to `add_shortcut`."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "%%javascript\n",
- "\n",
- "Jupyter.keyboard_manager.command_shortcuts.add_shortcut('r', function (event) {\n",
- " IPython.notebook.execute_cell();\n",
- " return false;\n",
- "});"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Likewise, to remove a shortcut, use `remove_shortcut`:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "%%javascript\n",
- "\n",
- "Jupyter.keyboard_manager.command_shortcuts.remove_shortcut('r');"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "If you want your keyboard shortcuts to be active for all of your notebooks, put the above API calls into your `custom.js` file."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "Of course we provide name for majority of existing action so that you do not have to re-write everything, here is for example how to bind `r` back to it's initial behavior:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "%%javascript\n",
- "\n",
- "Jupyter.keyboard_manager.command_shortcuts.add_shortcut('r', 'jupyter-notebook:change-cell-to-raw');"
- ]
- }
- ],
- "metadata": {
- "nbsphinx": {
- "execute": "never"
- },
- "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.5.2"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 1
-}
diff --git a/docs/source/examples/Notebook/Distributing Jupyter Extensions as Python Packages.ipynb b/docs/source/examples/Notebook/Distributing Jupyter Extensions as Python Packages.ipynb
deleted file mode 100644
index 8dc8ca5f32..0000000000
--- a/docs/source/examples/Notebook/Distributing Jupyter Extensions as Python Packages.ipynb
+++ /dev/null
@@ -1,510 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Distributing Jupyter Extensions as Python Packages"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Overview\n",
- "### How can the notebook be extended?\n",
- "The Jupyter client and server application are both deeply customizable. Their behavior can be extended by creating, respectively:\n",
- "\n",
- "- nbextension: a notebook extension\n",
- " - a single JS file, or directory of JavaScript, Cascading StyleSheets, etc. that contain at\n",
- " minimum a JavaScript module packaged as an\n",
- " [AMD modules](https://en.wikipedia.org/wiki/Asynchronous_module_definition)\n",
- " that exports a function `load_ipython_extension`\n",
- "- server extension: an importable Python module\n",
- " - that implements `load_jupyter_server_extension`\n",
- "- bundler extension: an importable Python module with generated File -> Download as / Deploy as menu item trigger\n",
- " - that implements `bundle`"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Why create a Python package for Jupyter extensions?\n",
- "Since it is rare to have a server extension that does not have any frontend components (an nbextension), for convenience and consistency, all these client and server extensions with their assets can be packaged and versioned together as a Python package with a few simple commands, or as of Notebook 5.3, handled automatically by your package manager of choice. This makes installing the package of extensions easier and less error-prone for the user."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Installation of Jupyter Extensions\n",
- "### Install a Python package containing Jupyter Extensions\n",
- "There are several ways that you may get a Python package containing Jupyter Extensions. Commonly, you will use a package manager for your system:\n",
- "```shell\n",
- "pip install helpful_package\n",
- "# or\n",
- "conda install helpful_package\n",
- "# or\n",
- "apt-get install helpful_package\n",
- "\n",
- "# where 'helpful_package' is a Python package containing one or more Jupyter Extensions\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Automatic installation and Enabling\n",
- "> New in Notebook 5.3\n",
- "\n",
- "The absolute simplest case requires no user interaction at all! Configured correctly, after installing with their package manager of choice, both server and frontend extensions can be enabled by default in the environment where they were installed, i.e. `--sys-prefix`. See the `setup.py` in the example below."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Enable a Server Extension\n",
- "\n",
- "The simplest case would be to enable a server extension which has no frontend components. \n",
- "\n",
- "A `pip` user that wants their configuration stored in their home directory would type the following command:\n",
- "```shell\n",
- "jupyter serverextension enable --py helpful_package\n",
- "```\n",
- "\n",
- "Alternatively, a `virtualenv` or `conda` user can pass `--sys-prefix` which keeps their environment isolated and reproducible. For example:\n",
- "```shell\n",
- "# Make sure that your virtualenv or conda environment is activated\n",
- "[source] activate my-environment\n",
- "\n",
- "jupyter serverextension enable --py helpful_package --sys-prefix\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Install the nbextension assets"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "If a package also has an nbextension with frontend assets that must be available (but not neccessarily enabled by default), install these assets with the following command:\n",
- "```shell\n",
- "jupyter nbextension install --py helpful_package # or --sys-prefix if using virtualenv or conda\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Enable nbextension assets\n",
- "If a package has assets that should be loaded every time a Jupyter app (e.g. lab, notebook, dashboard, terminal) is loaded in the browser, the following command can be used to enable the nbextension:\n",
- "```shell\n",
- "jupyter nbextension enable --py helpful_package # or --sys-prefix if using virtualenv or conda\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Did it work? Check by listing Jupyter Extensions.\n",
- "After running one or more extension installation steps, you can list what is presently known about nbextensions, server extensions, or bundler extensions. The following commands will list which extensions are available, whether they are enabled, and other extension details:\n",
- "\n",
- "```shell\n",
- "jupyter nbextension list\n",
- "jupyter serverextension list\n",
- "jupyter bundlerextension list\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Additional resources on creating and distributing packages \n",
- "\n",
- "> Of course, in addition to the files listed, there are number of other files one needs to build a proper package. Here are some good resources:\n",
- "- [The Hitchhiker's Guide to Packaging](https://the-hitchhikers-guide-to-packaging.readthedocs.io/en/latest/quickstart.html)\n",
- "- [Repository Structure and Python](https://www.kennethreitz.org/essays/repository-structure-and-python) by Kenneth Reitz\n",
- "\n",
- "> How you distribute them, too, is important:\n",
- "- [Packaging and Distributing Projects](https://python-packaging-user-guide.readthedocs.io/tutorials/distributing-packages/)\n",
- "- [conda: Building packages](https://conda.io/docs/building/build.html)\n",
- "\n",
- "> Here are some tools to get you started:\n",
- "- [generator-nbextension](https://github.com/Anaconda-Platform/generator-nbextension)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example - Server extension"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Creating a Python package with a server extension\n",
- "\n",
- "Here is an example of a python module which contains a server extension directly on itself. It has this directory structure:\n",
- "```\n",
- "- setup.py\n",
- "- MANIFEST.in\n",
- "- my_module/\n",
- " - __init__.py\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Defining the server extension\n",
- "This example shows that the server extension and its `load_jupyter_server_extension` function are defined in the `__init__.py` file.\n",
- "\n",
- "#### `my_module/__init__.py`\n",
- "\n",
- "```python\n",
- "def _jupyter_server_extension_paths():\n",
- " return [{\n",
- " \"module\": \"my_module\"\n",
- " }]\n",
- "\n",
- "\n",
- "def load_jupyter_server_extension(nbapp):\n",
- " nbapp.log.info(\"my module enabled!\")\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Install and enable the server extension\n",
- "Which a user can install with:\n",
- "```\n",
- "jupyter serverextension enable --py my_module [--sys-prefix]\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example - Server extension and nbextension"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Creating a Python package with a server extension and nbextension\n",
- "Here is another server extension, with a front-end module. It assumes this directory structure:\n",
- "\n",
- "```\n",
- "- setup.py\n",
- "- MANIFEST.in\n",
- "- my_fancy_module/\n",
- " - __init__.py\n",
- " - static/\n",
- " index.js\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "collapsed": true
- },
- "source": [
- "### Defining the server extension and nbextension\n",
- "This example again shows that the server extension and its `load_jupyter_server_extension` function are defined in the `__init__.py` file. This time, there is also a function `_jupyter_nbextension_path` for the nbextension.\n",
- "\n",
- "#### `my_fancy_module/__init__.py`\n",
- "\n",
- "```python\n",
- "def _jupyter_server_extension_paths():\n",
- " return [{\n",
- " \"module\": \"my_fancy_module\"\n",
- " }]\n",
- "\n",
- "# Jupyter Extension points\n",
- "def _jupyter_nbextension_paths():\n",
- " return [dict(\n",
- " section=\"notebook\",\n",
- " # the path is relative to the `my_fancy_module` directory\n",
- " src=\"static\",\n",
- " # directory in the `nbextension/` namespace\n",
- " dest=\"my_fancy_module\",\n",
- " # _also_ in the `nbextension/` namespace\n",
- " require=\"my_fancy_module/index\")]\n",
- "\n",
- "def load_jupyter_server_extension(nbapp):\n",
- " nbapp.log.info(\"my module enabled!\")\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Install and enable the server extension and nbextension\n",
- "\n",
- "The user can install and enable the extensions with the following set of commands:\n",
- "```\n",
- "jupyter nbextension install --py my_fancy_module [--sys-prefix|--user]\n",
- "jupyter nbextension enable --py my_fancy_module [--sys-prefix|--system]\n",
- "jupyter serverextension enable --py my_fancy_module [--sys-prefix|--system]\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Automatically enabling a server extension and nbextension\n",
- "> New in Notebook 5.3\n",
- "\n",
- "Server extensions and nbextensions can be installed and enabled without any user intervention or post-install scripts beyond ` install `"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "In addition to the `my_fancy_module` file tree, assume:\n",
- "- `jupyter-config/`\n",
- " - `jupyter_notebook_config.d/`\n",
- " - `my_fancy_module.json`\n",
- " - `serverconfig/`\n",
- " - `notebook.d/`\n",
- " - `my_fancy_module.json`"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### `jupyter-config/jupyter_notebook_config.d/my_fancy_module.json`\n",
- "```json\n",
- "{\n",
- " \"ServerApp\": {\n",
- " \"jpserver_extensions\": {\n",
- " \"my_fancy_module\": true\n",
- " }\n",
- " }\n",
- "}\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### `jupyter-config/serverconfig/notebook.d/my_fancy_module.json`\n",
- "```json\n",
- "{\n",
- " \"load_extensions\": {\n",
- " \"my_fancy_module/index\": true\n",
- " }\n",
- "}\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Put all of them in place via:\n",
- "\n",
- "#### `setup.py`\n",
- "```python\n",
- "import setuptools\n",
- "\n",
- "setuptools.setup(\n",
- " name=\"MyFancyModule\",\n",
- " ...\n",
- " include_package_data=True,\n",
- " data_files=[\n",
- " # like `jupyter nbextension install --sys-prefix`\n",
- " (\"share/jupyter/nbextensions/my_fancy_module\", [\n",
- " \"my_fancy_module/static/index.js\",\n",
- " ]),\n",
- " # like `jupyter nbextension enable --sys-prefix`\n",
- " (\"etc/jupyter/serverconfig/notebook.d\", [\n",
- " \"jupyter-config/serverconfig/notebook.d/my_fancy_module.json\"\n",
- " ]),\n",
- " # like `jupyter serverextension enable --sys-prefix`\n",
- " (\"etc/jupyter/jupyter_notebook_config.d\", [\n",
- " \"jupyter-config/jupyter_notebook_config.d/my_fancy_module.json\"\n",
- " ])\n",
- " ],\n",
- " ...\n",
- " zip_safe=False\n",
- ")\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "and last, but not least:\n",
- "\n",
- "#### `MANIFEST.in`\n",
- "```config\n",
- "recursive-include jupyter-config *.json\n",
- "recursive-include my_fancy_module/static *.js\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "As most package managers will only modify their environment, the eventual configuration will be as if the user had typed:\n",
- "```\n",
- "jupyter nbextension install --py my_fancy_module --sys-prefix\n",
- "jupyter nbextension enable --py my_fancy_module --sys-prefix\n",
- "jupyter serverextension enable --py my_fancy_module --sys-prefix\n",
- "```\n",
- "\n",
- "If a user manually `disable`s an extension, that configuration will override the bundled package configuration."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### When automagical install fails\n",
- "Note this can still fail in certain situations with `pip`, requiring manual use of `install` and `enable` commands.\n",
- "\n",
- "Non-python-specific package managers (e.g. `conda`, `apt`) may choose not to implement the above behavior at the `setup.py` level, having more ways to put data files in various places at build time."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Example - Bundler extension"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Creating a Python package with a bundlerextension\n",
- "\n",
- "Here is a bundler extension that adds a *Download as -> Notebook Tarball (tar.gz)* option to the notebook *File* menu. It assumes this directory structure:\n",
- "\n",
- "```\n",
- "- setup.py\n",
- "- MANIFEST.in\n",
- "- my_tarball_bundler/\n",
- " - __init__.py\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Defining the bundler extension\n",
- "\n",
- "This example shows that the bundler extension and its `bundle` function are defined in the `__init__.py` file.\n",
- "\n",
- "#### `my_tarball_bundler/__init__.py`\n",
- "\n",
- "```python\n",
- "import tarfile\n",
- "import io\n",
- "import os\n",
- "import nbformat\n",
- "\n",
- "def _jupyter_bundlerextension_paths():\n",
- " \"\"\"Declare bundler extensions provided by this package.\"\"\"\n",
- " return [{\n",
- " # unique bundler name\n",
- " \"name\": \"tarball_bundler\",\n",
- " # module containing bundle function\n",
- " \"module_name\": \"my_tarball_bundler\",\n",
- " # human-redable menu item label\n",
- " \"label\" : \"Notebook Tarball (tar.gz)\",\n",
- " # group under 'deploy' or 'download' menu\n",
- " \"group\" : \"download\",\n",
- " }]\n",
- "\n",
- "\n",
- "def bundle(handler, model):\n",
- " \"\"\"Create a compressed tarball containing the notebook document.\n",
- " \n",
- " Parameters\n",
- " ----------\n",
- " handler : tornado.web.RequestHandler\n",
- " Handler that serviced the bundle request\n",
- " model : dict\n",
- " Notebook model from the configured ContentManager\n",
- " \"\"\"\n",
- " notebook_filename = model['name']\n",
- " notebook_content = nbformat.writes(model['content']).encode('utf-8')\n",
- " notebook_name = os.path.splitext(notebook_filename)[0]\n",
- " tar_filename = '{}.tar.gz'.format(notebook_name)\n",
- " \n",
- " info = tarfile.TarInfo(notebook_filename)\n",
- " info.size = len(notebook_content)\n",
- "\n",
- " with io.BytesIO() as tar_buffer:\n",
- " with tarfile.open(tar_filename, \"w:gz\", fileobj=tar_buffer) as tar:\n",
- " tar.addfile(info, io.BytesIO(notebook_content))\n",
- " \n",
- " # Set headers to trigger browser download\n",
- " handler.set_header('Content-Disposition',\n",
- " 'attachment; filename=\"{}\"'.format(tar_filename))\n",
- " handler.set_header('Content-Type', 'application/gzip')\n",
- " \n",
- " # Return the buffer value as the response\n",
- " handler.finish(tar_buffer.getvalue())\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "See [Extending the Notebook](../../extending/index.rst) for more documentation about writing nbextensions, server extensions, and bundler extensions."
- ]
- }
- ],
- "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.6.5"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 1
-}
diff --git a/docs/source/examples/Notebook/Importing Notebooks.ipynb b/docs/source/examples/Notebook/Importing Notebooks.ipynb
deleted file mode 100644
index c878f0d065..0000000000
--- a/docs/source/examples/Notebook/Importing Notebooks.ipynb
+++ /dev/null
@@ -1,537 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Importing Jupyter Notebooks as Modules"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "It is a common problem that people want to import code from Jupyter Notebooks.\n",
- "This is made difficult by the fact that Notebooks are not plain Python files,\n",
- "and thus cannot be imported by the regular Python machinery.\n",
- "\n",
- "Fortunately, Python provides some fairly sophisticated [hooks](https://www.python.org/dev/peps/pep-0302/) into the import machinery,\n",
- "so we can actually make Jupyter notebooks importable without much difficulty,\n",
- "and only using public APIs."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "import io, os, sys, types"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "from IPython import get_ipython\n",
- "from nbformat import read\n",
- "from IPython.core.interactiveshell import InteractiveShell"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Import hooks typically take the form of two objects:\n",
- "\n",
- "1. a Module **Loader**, which takes a module name (e.g. `'IPython.display'`), and returns a Module\n",
- "2. a Module **Finder**, which figures out whether a module might exist, and tells Python what **Loader** to use"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "def find_notebook(fullname, path=None):\n",
- " \"\"\"find a notebook, given its fully qualified name and an optional path\n",
- " \n",
- " This turns \"foo.bar\" into \"foo/bar.ipynb\"\n",
- " and tries turning \"Foo_Bar\" into \"Foo Bar\" if Foo_Bar\n",
- " does not exist.\n",
- " \"\"\"\n",
- " name = fullname.rsplit('.', 1)[-1]\n",
- " if not path:\n",
- " path = ['']\n",
- " for d in path:\n",
- " nb_path = os.path.join(d, name + \".ipynb\")\n",
- " if os.path.isfile(nb_path):\n",
- " return nb_path\n",
- " # let import Notebook_Name find \"Notebook Name.ipynb\"\n",
- " nb_path = nb_path.replace(\"_\", \" \")\n",
- " if os.path.isfile(nb_path):\n",
- " return nb_path\n",
- " "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Notebook Loader"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Here we have our Notebook Loader.\n",
- "It's actually quite simple - once we figure out the filename of the module,\n",
- "all it does is:\n",
- "\n",
- "1. load the notebook document into memory\n",
- "2. create an empty Module\n",
- "3. execute every cell in the Module namespace\n",
- "\n",
- "Since IPython cells can have extended syntax,\n",
- "the IPython transform is applied to turn each of these cells into their pure-Python counterparts before executing them.\n",
- "If all of your notebook cells are pure-Python,\n",
- "this step is unnecessary."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "class NotebookLoader(object):\n",
- " \"\"\"Module Loader for Jupyter Notebooks\"\"\"\n",
- " def __init__(self, path=None):\n",
- " self.shell = InteractiveShell.instance()\n",
- " self.path = path\n",
- " \n",
- " def load_module(self, fullname):\n",
- " \"\"\"import a notebook as a module\"\"\"\n",
- " path = find_notebook(fullname, self.path)\n",
- " \n",
- " print (\"importing Jupyter notebook from %s\" % path)\n",
- " \n",
- " # load the notebook object\n",
- " with io.open(path, 'r', encoding='utf-8') as f:\n",
- " nb = read(f, 4)\n",
- " \n",
- " \n",
- " # create the module and add it to sys.modules\n",
- " # if name in sys.modules:\n",
- " # return sys.modules[name]\n",
- " mod = types.ModuleType(fullname)\n",
- " mod.__file__ = path\n",
- " mod.__loader__ = self\n",
- " mod.__dict__['get_ipython'] = get_ipython\n",
- " sys.modules[fullname] = mod\n",
- " \n",
- " # extra work to ensure that magics that would affect the user_ns\n",
- " # actually affect the notebook module's ns\n",
- " save_user_ns = self.shell.user_ns\n",
- " self.shell.user_ns = mod.__dict__\n",
- " \n",
- " try:\n",
- " for cell in nb.cells:\n",
- " if cell.cell_type == 'code':\n",
- " # transform the input to executable Python\n",
- " code = self.shell.input_transformer_manager.transform_cell(cell.source)\n",
- " # run the code in themodule\n",
- " exec(code, mod.__dict__)\n",
- " finally:\n",
- " self.shell.user_ns = save_user_ns\n",
- " return mod\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## The Module Finder"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The finder is a simple object that tells you whether a name can be imported,\n",
- "and returns the appropriate loader.\n",
- "All this one does is check, when you do:\n",
- "\n",
- "```python\n",
- "import mynotebook\n",
- "```\n",
- "\n",
- "it checks whether `mynotebook.ipynb` exists.\n",
- "If a notebook is found, then it returns a NotebookLoader.\n",
- "\n",
- "Any extra logic is just for resolving paths within packages."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "class NotebookFinder(object):\n",
- " \"\"\"Module finder that locates Jupyter Notebooks\"\"\"\n",
- " def __init__(self):\n",
- " self.loaders = {}\n",
- " \n",
- " def find_module(self, fullname, path=None):\n",
- " nb_path = find_notebook(fullname, path)\n",
- " if not nb_path:\n",
- " return\n",
- " \n",
- " key = path\n",
- " if path:\n",
- " # lists aren't hashable\n",
- " key = os.path.sep.join(path)\n",
- " \n",
- " if key not in self.loaders:\n",
- " self.loaders[key] = NotebookLoader(path)\n",
- " return self.loaders[key]\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Register the hook"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Now we register the `NotebookFinder` with `sys.meta_path`"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "sys.meta_path.append(NotebookFinder())"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "After this point, my notebooks should be importable.\n",
- "\n",
- "Let's look at what we have in the CWD:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "ls nbpackage"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "So I should be able to `import nbpackage.mynotebook`."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "import nbpackage.mynotebook"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Aside: displaying notebooks"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Here is some simple code to display the contents of a notebook\n",
- "with syntax highlighting, etc."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "from pygments import highlight\n",
- "from pygments.lexers import PythonLexer\n",
- "from pygments.formatters import HtmlFormatter\n",
- "\n",
- "from IPython.display import display, HTML\n",
- "\n",
- "formatter = HtmlFormatter()\n",
- "lexer = PythonLexer()\n",
- "\n",
- "# publish the CSS for pygments highlighting\n",
- "display(HTML(\"\"\"\n",
- "\n",
- "\"\"\" % formatter.get_style_defs()\n",
- "))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "def show_notebook(fname):\n",
- " \"\"\"display a short summary of the cells of a notebook\"\"\"\n",
- " with io.open(fname, 'r', encoding='utf-8') as f:\n",
- " nb = read(f, 4)\n",
- " html = []\n",
- " for cell in nb.cells:\n",
- " html.append(\"
\" % cell.source)\n",
- " display(HTML('\\n'.join(html)))\n",
- "\n",
- "show_notebook(os.path.join(\"nbpackage\", \"mynotebook.ipynb\"))"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "So my notebook has some code cells,\n",
- "one of which contains some IPython syntax.\n",
- "\n",
- "Let's see what happens when we import it"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "from nbpackage import mynotebook"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Hooray, it imported! Does it work?"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "mynotebook.foo()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Hooray again!\n",
- "\n",
- "Even the function that contains IPython syntax works:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "mynotebook.has_ip_syntax()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Notebooks in packages"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We also have a notebook inside the `nb` package,\n",
- "so let's make sure that works as well."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "ls nbpackage/nbs"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Note that the `__init__.py` is necessary for `nb` to be considered a package,\n",
- "just like usual."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "show_notebook(os.path.join(\"nbpackage\", \"nbs\", \"other.ipynb\"))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "from nbpackage.nbs import other\n",
- "other.bar(5)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "So now we have importable notebooks, from both the local directory and inside packages.\n",
- "\n",
- "I can even put a notebook inside IPython, to further demonstrate that this is working properly:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "import shutil\n",
- "from IPython.paths import get_ipython_package_dir\n",
- "\n",
- "utils = os.path.join(get_ipython_package_dir(), 'utils')\n",
- "shutil.copy(os.path.join(\"nbpackage\", \"mynotebook.ipynb\"),\n",
- " os.path.join(utils, \"inside_ipython.ipynb\")\n",
- ")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "and import the notebook from `IPython.utils`"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "from IPython.utils import inside_ipython\n",
- "inside_ipython.whatsmyname()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "This approach can even import functions and classes that are defined in a notebook using the `%%cython` magic."
- ]
- }
- ],
- "metadata": {
- "gist_id": "6011986",
- "nbsphinx": {
- "execute": "never"
- },
- "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.5.1+"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/docs/source/examples/Notebook/JavaScript Notebook Extensions.ipynb b/docs/source/examples/Notebook/JavaScript Notebook Extensions.ipynb
deleted file mode 100644
index 8d44100b6b..0000000000
--- a/docs/source/examples/Notebook/JavaScript Notebook Extensions.ipynb
+++ /dev/null
@@ -1,603 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Embracing web standards"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "One of the main reasons why we developed the current notebook web application \n",
- "was to embrace the web technology. \n",
- "\n",
- "By being a pure web application using HTML, JavaScript, and CSS, the Notebook can get \n",
- "all the web technology improvement for free. Thus, as browser support for different \n",
- "media extend, the notebook web app should be able to be compatible without modification. \n",
- "\n",
- "This is also true with performance of the User Interface as the speed of JavaScript VM increases. "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The other advantage of using only web technology is that the code of the interface is fully accessible to the end user and is modifiable live.\n",
- "Even if this task is not always easy, we strive to keep our code as accessible and reusable as possible.\n",
- "This should allow us - with minimum effort - development of small extensions that customize the behavior of the web interface. "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Tampering with the Notebook application"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The first tool that is available to you and that you should be aware of are browser \"developers tool\". The exact naming can change across browser and might require the installation of extensions. But basically they can allow you to inspect/modify the DOM, and interact with the JavaScript code that runs the frontend.\n",
- "\n",
- " - In Chrome and Safari, Developer tools are in the menu `View > Developer > JavaScript Console` \n",
- " - In Firefox you might need to install [Firebug](http://getfirebug.com/)\n",
- " \n",
- "Those will be your best friends to debug and try different approaches for your extensions."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Injecting JS"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### Using magics"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The above tools can be tedious for editing edit long JavaScript files. Therefore we provide the `%%javascript` magic. This allows you to quickly inject JavaScript into the notebook. Still the JavaScript injected this way will not survive reloading. Hence, it is a good tool for testing and refining a script.\n",
- "\n",
- "You might see here and there people modifying css and injecting js into the notebook by reading file(s) and publishing them into the notebook.\n",
- "Not only does this often break the flow of the notebook and make the re-execution of the notebook broken, but it also means that you need to execute those cells in the entire notebook every time you need to update the code.\n",
- "\n",
- "This can still be useful in some cases, like the `%autosave` magic that allows you to control the time between each save. But this can be replaced by a JavaScript dropdown menu to select the save interval."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "## you can inspect the autosave code to see what it does.\n",
- "%autosave??"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### custom.js"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "To inject JavaScript we provide an entry point: `custom.js` that allows the user to execute and load other resources into the notebook.\n",
- "JavaScript code in `custom.js` will be executed when the notebook app starts and can then be used to customize almost anything in the UI and in the behavior of the notebook.\n",
- "\n",
- "`custom.js` can be found in the `~/.jupyter/custom/custom.js`. You can share your custom.js with others."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "##### Back to theory"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "from jupyter_core.paths import jupyter_config_dir\n",
- "jupyter_dir = jupyter_config_dir()\n",
- "jupyter_dir"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "and custom js is in "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "import os.path\n",
- "custom_js_path = os.path.join(jupyter_dir, 'custom', 'custom.js')"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "# my custom js\n",
- "if os.path.isfile(custom_js_path):\n",
- " with open(custom_js_path) as f:\n",
- " print(f.read())\n",
- "else:\n",
- " print(\"You don't have a custom.js file\") "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Note that `custom.js` is meant to be modified by user. When writing a script, you can define it in a separate file and add a line of configuration into `custom.js` that will fetch and execute the file."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "**Warning** : even if modification of `custom.js` takes effect immediately after browser refresh (except if browser cache is aggressive), *creating* a file in `static/` directory needs a **server restart**."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Exercise :"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- " - Create a `custom.js` in the right location with the following content:\n",
- "```javascript\n",
- "alert(\"hello world from custom.js\")\n",
- "```\n",
- "\n",
- " - Restart your server and open any notebook.\n",
- " - Be greeted by custom.js"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Have a look at [default custom.js](https://github.com/jupyter/notebook/blob/4.0.x/notebook/static/custom/custom.js), to see it's content and for more explanation."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### For the quick ones : "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We've seen above that you can change the autosave rate by using a magic. This is typically something I don't want to type every time, and that I don't like to embed into my workflow and documents. (readers don't care what my autosave time is). Let's build an extension that allows us to do it. "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "foo": true
- },
- "source": [
- "Create a dropdown element in the toolbar (DOM `Jupyter.toolbar.element`), you will need \n",
- "\n",
- "- `Jupyter.notebook.set_autosave_interval(milliseconds)`\n",
- "- know that 1 min = 60 sec, and 1 sec = 1000 ms"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "```javascript\n",
- "\n",
- "var label = jQuery('').text('AutoScroll Limit:');\n",
- "var select = jQuery('')\n",
- " //.append(jQuery('').attr('value', '2').text('2min (default)'))\n",
- " .append(jQuery('').attr('value', undefined).text('disabled'))\n",
- "\n",
- " // TODO:\n",
- " //the_toolbar_element.append(label)\n",
- " //the_toolbar_element.append(select);\n",
- " \n",
- "select.change(function() {\n",
- " var val = jQuery(this).val() // val will be the value in [2]\n",
- " // TODO\n",
- " // this will be called when dropdown changes\n",
- "\n",
- "});\n",
- "\n",
- "var time_m = [1,5,10,15,30];\n",
- "for (var i=0; i < time_m.length; i++) {\n",
- " var ts = time_m[i];\n",
- " //[2] ____ this will be `val` on [1] \n",
- " // | \n",
- " // v \n",
- " select.append($('').attr('value', ts).text(thr+'min'));\n",
- " // this will fill up the dropdown `select` with\n",
- " // 1 min\n",
- " // 5 min\n",
- " // 10 min\n",
- " // 10 min\n",
- " // ...\n",
- "}\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### A non-interactive example first"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "I like my cython to be nicely highlighted\n",
- "\n",
- "```javascript\n",
- "Jupyter.config.cell_magic_highlight['magic_text/x-cython'] = {}\n",
- "Jupyter.config.cell_magic_highlight['magic_text/x-cython'].reg = [/^%%cython/]\n",
- "```\n",
- "\n",
- "`text/x-cython` is the name of CodeMirror mode name, `magic_` prefix will just patch the mode so that the first line that contains a magic does not screw up the highlighting. `reg`is a list or regular expression that will trigger the change of mode."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### Get more documentation"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Sadly, you will have to read the js source file (but there are lots of comments) and/or build the JavaScript documentation using yuidoc.\n",
- "If you have `node` and `yui-doc` installed:"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "```bash\n",
- "$ cd ~/jupyter/notebook/notebook/static/notebook/js/\n",
- "$ yuidoc . --server\n",
- "warn: (yuidoc): Failed to extract port, setting to the default :3000\n",
- "info: (yuidoc): Starting YUIDoc@0.3.45 using YUI@3.9.1 with NodeJS@0.10.15\n",
- "info: (yuidoc): Scanning for yuidoc.json file.\n",
- "info: (yuidoc): Starting YUIDoc with the following options:\n",
- "info: (yuidoc):\n",
- "{ port: 3000,\n",
- " nocode: false,\n",
- " paths: [ '.' ],\n",
- " server: true,\n",
- " outdir: './out' }\n",
- "info: (yuidoc): Scanning for yuidoc.json file.\n",
- "info: (server): Starting server: http://127.0.0.1:3000\n",
- "```\n",
- "\n",
- "and browse http://127.0.0.1:3000 to get documentation"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "foo": true
- },
- "source": [
- "#### Some convenience methods"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "By browsing the documentation you will see that we have some convenience methods that allows us to avoid re-inventing the UI every time :\n",
- "```javascript\n",
- "Jupyter.toolbar.add_buttons_group([\n",
- " {\n",
- " 'label' : 'run qtconsole',\n",
- " 'icon' : 'fa-terminal', // select your icon from \n",
- " // http://fontawesome.io/icons/\n",
- " 'callback': function(){Jupyter.notebook.kernel.execute('%qtconsole')}\n",
- " }\n",
- " // add more button here if needed.\n",
- " ]);\n",
- "```\n",
- "with a [lot of icons] you can select from. \n",
- "\n",
- "[lot of icons]: http://fontawesome.io/icons/"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "foo": true
- },
- "source": [
- "## Cell Metadata"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "foo": true
- },
- "source": [
- "The most requested feature is generally to be able to distinguish an individual cell in the notebook, or run a specific action with them.\n",
- "To do so, you can either use `Jupyter.notebook.get_selected_cell()`, or rely on `CellToolbar`. This allows you to register a set of actions and graphical elements that will be attached to individual cells."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Cell Toolbar"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You can see some example of what can be done by toggling the `Cell Toolbar` selector in the toolbar on top of the notebook. It provides two default `presets` that are `Default` and `slideshow`. Default allows the user to edit the metadata attached to each cell manually."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "First we define a function that takes at first parameter an element on the DOM in which to inject UI element. The second element is the cell this element wis registered with. Then we will need to register that function and give it a name.\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### Register a callback"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "%%javascript\n",
- "var CellToolbar = Jupyter.CellToolbar\n",
- "var toggle = function(div, cell) {\n",
- " var button_container = $(div)\n",
- "\n",
- " // let's create a button that shows the current value of the metadata\n",
- " var button = $('').addClass('btn btn-mini').text(String(cell.metadata.foo));\n",
- "\n",
- " // On click, change the metadata value and update the button label\n",
- " button.click(function(){\n",
- " var v = cell.metadata.foo;\n",
- " cell.metadata.foo = !v;\n",
- " button.text(String(!v));\n",
- " })\n",
- "\n",
- " // add the button to the DOM div.\n",
- " button_container.append(button);\n",
- "}\n",
- "\n",
- " // now we register the callback under the name foo to give the\n",
- " // user the ability to use it later\n",
- " CellToolbar.register_callback('tuto.foo', toggle);"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### Registering a preset"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "This function can now be part of many `preset` of the CellToolBar."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false,
- "foo": true,
- "slideshow": {
- "slide_type": "subslide"
- }
- },
- "outputs": [],
- "source": [
- "%%javascript\n",
- "Jupyter.CellToolbar.register_preset('Tutorial 1',['tuto.foo','default.rawedit'])\n",
- "Jupyter.CellToolbar.register_preset('Tutorial 2',['slideshow.select','tuto.foo'])"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You should now have access to two presets :\n",
- "\n",
- " - Tutorial 1\n",
- " - Tutorial 2\n",
- " \n",
- "And check that the buttons you defined share state when you toggle preset. \n",
- "Also check that the metadata of the cell is modified when you click the button, and that when saved on reloaded the metadata is still available."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### Exercise:"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Try to wrap the all code in a file, put this file in `{jupyter_dir}/custom/.js`, and add \n",
- "\n",
- "```\n",
- "require(['custom/']);\n",
- "```\n",
- "\n",
- "in `custom.js` to have this script automatically loaded in all your notebooks.\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "`require` is provided by a [JavaScript library](http://requirejs.org/) that allow you to express dependency. For simple extension like the previous one we directly mute the global namespace, but for more complex extension you could pass a callback to `require([...], )` call, to allow the user to pass configuration information to your plugin.\n",
- "\n",
- "In Python language, \n",
- "\n",
- "```javascript\n",
- "require(['a/b', 'c/d'], function( e, f){\n",
- " e.something()\n",
- " f.something()\n",
- "})\n",
- "```\n",
- "\n",
- "could be read as\n",
- "```python\n",
- "import a.b as e\n",
- "import c.d as f\n",
- "e.something()\n",
- "f.something()\n",
- "```\n",
- "\n",
- "\n",
- "See for example @damianavila [\"ZenMode\" plugin](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/b29c698394239a6931fa4911440550df214812cb/src/jupyter_contrib_nbextensions/nbextensions/zenmode/main.js#L32) :\n",
- "\n",
- "```javascript\n",
- "\n",
- "// read that as\n",
- "// import custom.zenmode.main as zenmode\n",
- "require(['custom/zenmode/main'],function(zenmode){\n",
- " zenmode.background('images/back12.jpg');\n",
- "})\n",
- "```\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### For the quickest"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Try to use [the following](https://github.com/ipython/ipython/blob/1.x/IPython/html/static/notebook/js/celltoolbar.js#L367) to bind a dropdown list to `cell.metadata.difficulty.select`. \n",
- "\n",
- "It should be able to take the 4 following values :\n",
- "\n",
- " - ``\n",
- " - `Easy`\n",
- " - `Medium`\n",
- " - `Hard`\n",
- " \n",
- "We will use it to customize the output of the converted notebook depending on the tag on each cell"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "# %load soln/celldiff.js"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": true
- },
- "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.5.2"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 1
-}
diff --git a/docs/source/examples/Notebook/Notebook Basics.ipynb b/docs/source/examples/Notebook/Notebook Basics.ipynb
deleted file mode 100644
index aa8419b1df..0000000000
--- a/docs/source/examples/Notebook/Notebook Basics.ipynb
+++ /dev/null
@@ -1,254 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Notebook Basics"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## The Notebook dashboard"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "When you first start the notebook server, your browser will open to the notebook dashboard. The dashboard serves as a home page for the notebook. Its main purpose is to display the notebooks and files in the current directory. For example, here is a screenshot of the dashboard page for the `examples` directory in the Jupyter repository:\n",
- "\n",
- "![Jupyter dashboard showing files tab](images/dashboard_files_tab.png)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The top of the notebook list displays clickable breadcrumbs of the current directory. By clicking on these breadcrumbs or on sub-directories in the notebook list, you can navigate your file system.\n",
- "\n",
- "To create a new notebook, click on the \"New\" button at the top of the list and select a kernel from the dropdown (as seen below). Which kernels are listed depend on what's installed on the server. Some of the kernels in the screenshot below may not exist as an option to you.\n",
- "\n",
- "![Jupyter \"New\" menu](images/dashboard_files_tab_new.png)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Notebooks and files can be uploaded to the current directory by dragging a notebook file onto the notebook list or by the \"click here\" text above the list.\n",
- "\n",
- "The notebook list shows green \"Running\" text and a green notebook icon next to running notebooks (as seen below). Notebooks remain running until you explicitly shut them down; closing the notebook's page is not sufficient.\n",
- "\n",
- "\n",
- "![Jupyter dashboard showing one notebook with a running kernel](images/dashboard_files_tab_run.png)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "To shutdown, delete, duplicate, or rename a notebook check the checkbox next to it and an array of controls will appear at the top of the notebook list (as seen below). You can also use the same operations on directories and files when applicable.\n",
- "\n",
- "![Buttons: Duplicate, rename, shutdown, delete, new, refresh](images/dashboard_files_tab_btns.png)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "To see all of your running notebooks along with their directories, click on the \"Running\" tab:\n",
- "\n",
- "![Jupyter dashboard running tab](images/dashboard_running_tab.png)\n",
- "\n",
- "This view provides a convenient way to track notebooks that you start as you navigate the file system in a long running notebook server."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Overview of the Notebook UI"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "If you create a new notebook or open an existing one, you will be taken to the notebook user interface (UI). This UI allows you to run code and author notebook documents interactively. The notebook UI has the following main areas:\n",
- "\n",
- "* Menu\n",
- "* Toolbar\n",
- "* Notebook area and cells\n",
- "\n",
- "The notebook has an interactive tour of these elements that can be started in the \"Help:User Interface Tour\" menu item."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Modal editor"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Starting with IPython 2.0, the Jupyter Notebook has a modal user interface. This means that the keyboard does different things depending on which mode the Notebook is in. There are two modes: edit mode and command mode."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Edit mode"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Edit mode is indicated by a green cell border and a prompt showing in the editor area:\n",
- "\n",
- "![Jupyter cell with green border](images/edit_mode.png)\n",
- "\n",
- "When a cell is in edit mode, you can type into the cell, like a normal text editor."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "
\n",
- "Enter edit mode by pressing `Enter` or using the mouse to click on a cell's editor area.\n",
- "
"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Command mode"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Command mode is indicated by a grey cell border with a blue left margin:\n",
- "\n",
- "![Jupyter cell with blue & grey border](images/command_mode.png)\n",
- "\n",
- "When you are in command mode, you are able to edit the notebook as a whole, but not type into individual cells. Most importantly, in command mode, the keyboard is mapped to a set of shortcuts that let you perform notebook and cell actions efficiently. For example, if you are in command mode and you press `c`, you will copy the current cell - no modifier is needed."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "
\n",
- "Don't try to type into a cell in command mode; unexpected things will happen!\n",
- "
\n",
- "Enter command mode by pressing `Esc` or using the mouse to click *outside* a cell's editor area.\n",
- "
"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Mouse navigation"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "All navigation and actions in the Notebook are available using the mouse through the menubar and toolbar, which are both above the main Notebook area:\n",
- "\n",
- "![Jupyter notebook menus and toolbar](images/menubar_toolbar.png)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The first idea of mouse based navigation is that **cells can be selected by clicking on them.** The currently selected cell gets a grey or green border depending on whether the notebook is in edit or command mode. If you click inside a cell's editor area, you will enter edit mode. If you click on the prompt or output area of a cell you will enter command mode.\n",
- "\n",
- "If you are running this notebook in a live session (not on http://nbviewer.jupyter.org) try selecting different cells and going between edit and command mode. Try typing into a cell."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The second idea of mouse based navigation is that **cell actions usually apply to the currently selected cell**. Thus if you want to run the code in a cell, you would select it and click the button in the toolbar or the \"Cell:Run\" menu item. Similarly, to copy a cell you would select it and click the button in the toolbar or the \"Edit:Copy\" menu item. With this simple pattern, you should be able to do most everything you need with the mouse.\n",
- "\n",
- "Markdown cells have one other state that can be modified with the mouse. These cells can either be rendered or unrendered. When they are rendered, you will see a nice formatted representation of the cell's contents. When they are unrendered, you will see the raw text source of the cell. To render the selected cell with the mouse, click the button in the toolbar or the \"Cell:Run\" menu item. To unrender the selected cell, double click on the cell."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Keyboard Navigation"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The modal user interface of the Jupyter Notebook has been optimized for efficient keyboard usage. This is made possible by having two different sets of keyboard shortcuts: one set that is active in edit mode and another in command mode.\n",
- "\n",
- "The most important keyboard shortcuts are `Enter`, which enters edit mode, and `Esc`, which enters command mode.\n",
- "\n",
- "In edit mode, most of the keyboard is dedicated to typing into the cell's editor. Thus, in edit mode there are relatively few shortcuts. In command mode, the entire keyboard is available for shortcuts, so there are many more. The `Help`->`Keyboard Shortcuts` dialog lists the available shortcuts."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "We recommend learning the command mode shortcuts in the following rough order:\n",
- "\n",
- "1. Basic navigation: `enter`, `shift-enter`, `up/k`, `down/j`\n",
- "2. Saving the notebook: `s`\n",
- "2. Change Cell types: `y`, `m`, `1-6`, `t`\n",
- "3. Cell creation: `a`, `b`\n",
- "4. Cell editing: `x`, `c`, `v`, `d`, `z`\n",
- "5. Kernel operations: `i`, `0` (press twice)"
- ]
- }
- ],
- "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.5.2"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 1
-}
diff --git a/docs/source/examples/Notebook/Running Code.ipynb b/docs/source/examples/Notebook/Running Code.ipynb
deleted file mode 100644
index f0ffca9390..0000000000
--- a/docs/source/examples/Notebook/Running Code.ipynb
+++ /dev/null
@@ -1,886 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Running Code"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "First and foremost, the Jupyter Notebook is an interactive environment for writing and running code. The notebook is capable of running code in a wide range of languages. However, each notebook is associated with a single kernel. This notebook is associated with the IPython kernel, therefore runs Python code."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Code cells allow you to enter and run code"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Run a code cell using `Shift-Enter` or pressing the button in the toolbar above:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "a = 10"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "10\n"
- ]
- }
- ],
- "source": [
- "print(a)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "There are two other keyboard shortcuts for running code:\n",
- "\n",
- "* `Alt-Enter` runs the current cell and inserts a new one below.\n",
- "* `Ctrl-Enter` run the current cell and enters command mode."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Managing the Kernel"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Code is run in a separate process called the Kernel. The Kernel can be interrupted or restarted. Try running the following cell and then hit the button in the toolbar above."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "import time\n",
- "time.sleep(10)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "If the Kernel dies you will be prompted to restart it. Here we call the low-level system libc.time routine with the wrong argument via\n",
- "ctypes to segfault the Python interpreter:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "import sys\n",
- "from ctypes import CDLL\n",
- "# This will crash a Linux or Mac system\n",
- "# equivalent calls can be made on Windows\n",
- "\n",
- "# Uncomment these lines if you would like to see the segfault\n",
- "\n",
- "# dll = 'dylib' if sys.platform == 'darwin' else 'so.6'\n",
- "# libc = CDLL(\"libc.%s\" % dll) \n",
- "# libc.time(-1) # BOOM!!"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Cell menu"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The \"Cell\" menu has a number of menu items for running code in different ways. These includes:\n",
- "\n",
- "* Run and Select Below\n",
- "* Run and Insert Below\n",
- "* Run All\n",
- "* Run All Above\n",
- "* Run All Below"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Restarting the kernels"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The kernel maintains the state of a notebook's computations. You can reset this state by restarting the kernel. This is done by clicking on the in the toolbar above."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## sys.stdout and sys.stderr"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The stdout and stderr streams are displayed as text in the output area."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "hi, stdout\n"
- ]
- }
- ],
- "source": [
- "print(\"hi, stdout\")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "hi, stderr\n"
- ]
- }
- ],
- "source": [
- "from __future__ import print_function\n",
- "print('hi, stderr', file=sys.stderr)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Output is asynchronous"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "All output is displayed asynchronously as it is generated in the Kernel. If you execute the next cell, you will see the output one piece at a time, not all at the end."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "0\n",
- "1\n",
- "2\n",
- "3\n",
- "4\n",
- "5\n",
- "6\n",
- "7\n"
- ]
- }
- ],
- "source": [
- "import time, sys\n",
- "for i in range(8):\n",
- " print(i)\n",
- " time.sleep(0.5)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Large outputs"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "To better handle large outputs, the output area can be collapsed. Run the following cell and then single- or double- click on the active area to the left of the output:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "0\n",
- "1\n",
- "2\n",
- "3\n",
- "4\n",
- "5\n",
- "6\n",
- "7\n",
- "8\n",
- "9\n",
- "10\n",
- "11\n",
- "12\n",
- "13\n",
- "14\n",
- "15\n",
- "16\n",
- "17\n",
- "18\n",
- "19\n",
- "20\n",
- "21\n",
- "22\n",
- "23\n",
- "24\n",
- "25\n",
- "26\n",
- "27\n",
- "28\n",
- "29\n",
- "30\n",
- "31\n",
- "32\n",
- "33\n",
- "34\n",
- "35\n",
- "36\n",
- "37\n",
- "38\n",
- "39\n",
- "40\n",
- "41\n",
- "42\n",
- "43\n",
- "44\n",
- "45\n",
- "46\n",
- "47\n",
- "48\n",
- "49\n"
- ]
- }
- ],
- "source": [
- "for i in range(50):\n",
- " print(i)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Beyond a certain point, output will scroll automatically:"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {
- "collapsed": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "0\n",
- "1\n",
- "3\n",
- "7\n",
- "15\n",
- "31\n",
- "63\n",
- "127\n",
- "255\n",
- "511\n",
- "1023\n",
- "2047\n",
- "4095\n",
- "8191\n",
- "16383\n",
- "32767\n",
- "65535\n",
- "131071\n",
- "262143\n",
- "524287\n",
- "1048575\n",
- "2097151\n",
- "4194303\n",
- "8388607\n",
- "16777215\n",
- "33554431\n",
- "67108863\n",
- "134217727\n",
- "268435455\n",
- "536870911\n",
- "1073741823\n",
- "2147483647\n",
- "4294967295\n",
- "8589934591\n",
- "17179869183\n",
- "34359738367\n",
- "68719476735\n",
- "137438953471\n",
- "274877906943\n",
- "549755813887\n",
- "1099511627775\n",
- "2199023255551\n",
- "4398046511103\n",
- "8796093022207\n",
- "17592186044415\n",
- "35184372088831\n",
- "70368744177663\n",
- "140737488355327\n",
- "281474976710655\n",
- "562949953421311\n",
- "1125899906842623\n",
- "2251799813685247\n",
- "4503599627370495\n",
- "9007199254740991\n",
- "18014398509481983\n",
- "36028797018963967\n",
- "72057594037927935\n",
- "144115188075855871\n",
- "288230376151711743\n",
- "576460752303423487\n",
- "1152921504606846975\n",
- "2305843009213693951\n",
- "4611686018427387903\n",
- "9223372036854775807\n",
- "18446744073709551615\n",
- "36893488147419103231\n",
- "73786976294838206463\n",
- "147573952589676412927\n",
- "295147905179352825855\n",
- "590295810358705651711\n",
- "1180591620717411303423\n",
- "2361183241434822606847\n",
- "4722366482869645213695\n",
- "9444732965739290427391\n",
- "18889465931478580854783\n",
- "37778931862957161709567\n",
- "75557863725914323419135\n",
- "151115727451828646838271\n",
- "302231454903657293676543\n",
- "604462909807314587353087\n",
- "1208925819614629174706175\n",
- "2417851639229258349412351\n",
- "4835703278458516698824703\n",
- "9671406556917033397649407\n",
- "19342813113834066795298815\n",
- "38685626227668133590597631\n",
- "77371252455336267181195263\n",
- "154742504910672534362390527\n",
- "309485009821345068724781055\n",
- "618970019642690137449562111\n",
- "1237940039285380274899124223\n",
- "2475880078570760549798248447\n",
- "4951760157141521099596496895\n",
- "9903520314283042199192993791\n",
- "19807040628566084398385987583\n",
- "39614081257132168796771975167\n",
- "79228162514264337593543950335\n",
- "158456325028528675187087900671\n",
- "316912650057057350374175801343\n",
- "633825300114114700748351602687\n",
- "1267650600228229401496703205375\n",
- "2535301200456458802993406410751\n",
- "5070602400912917605986812821503\n",
- "10141204801825835211973625643007\n",
- "20282409603651670423947251286015\n",
- "40564819207303340847894502572031\n",
- "81129638414606681695789005144063\n",
- "162259276829213363391578010288127\n",
- "324518553658426726783156020576255\n",
- "649037107316853453566312041152511\n",
- "1298074214633706907132624082305023\n",
- "2596148429267413814265248164610047\n",
- "5192296858534827628530496329220095\n",
- "10384593717069655257060992658440191\n",
- "20769187434139310514121985316880383\n",
- "41538374868278621028243970633760767\n",
- "83076749736557242056487941267521535\n",
- "166153499473114484112975882535043071\n",
- "332306998946228968225951765070086143\n",
- "664613997892457936451903530140172287\n",
- "1329227995784915872903807060280344575\n",
- "2658455991569831745807614120560689151\n",
- "5316911983139663491615228241121378303\n",
- "10633823966279326983230456482242756607\n",
- "21267647932558653966460912964485513215\n",
- "42535295865117307932921825928971026431\n",
- "85070591730234615865843651857942052863\n",
- "170141183460469231731687303715884105727\n",
- "340282366920938463463374607431768211455\n",
- "680564733841876926926749214863536422911\n",
- "1361129467683753853853498429727072845823\n",
- "2722258935367507707706996859454145691647\n",
- "5444517870735015415413993718908291383295\n",
- "10889035741470030830827987437816582766591\n",
- "21778071482940061661655974875633165533183\n",
- "43556142965880123323311949751266331066367\n",
- "87112285931760246646623899502532662132735\n",
- "174224571863520493293247799005065324265471\n",
- "348449143727040986586495598010130648530943\n",
- "696898287454081973172991196020261297061887\n",
- "1393796574908163946345982392040522594123775\n",
- "2787593149816327892691964784081045188247551\n",
- "5575186299632655785383929568162090376495103\n",
- "11150372599265311570767859136324180752990207\n",
- "22300745198530623141535718272648361505980415\n",
- "44601490397061246283071436545296723011960831\n",
- "89202980794122492566142873090593446023921663\n",
- "178405961588244985132285746181186892047843327\n",
- "356811923176489970264571492362373784095686655\n",
- "713623846352979940529142984724747568191373311\n",
- "1427247692705959881058285969449495136382746623\n",
- "2854495385411919762116571938898990272765493247\n",
- "5708990770823839524233143877797980545530986495\n",
- "11417981541647679048466287755595961091061972991\n",
- "22835963083295358096932575511191922182123945983\n",
- "45671926166590716193865151022383844364247891967\n",
- "91343852333181432387730302044767688728495783935\n",
- "182687704666362864775460604089535377456991567871\n",
- "365375409332725729550921208179070754913983135743\n",
- "730750818665451459101842416358141509827966271487\n",
- "1461501637330902918203684832716283019655932542975\n",
- "2923003274661805836407369665432566039311865085951\n",
- "5846006549323611672814739330865132078623730171903\n",
- "11692013098647223345629478661730264157247460343807\n",
- "23384026197294446691258957323460528314494920687615\n",
- "46768052394588893382517914646921056628989841375231\n",
- "93536104789177786765035829293842113257979682750463\n",
- "187072209578355573530071658587684226515959365500927\n",
- "374144419156711147060143317175368453031918731001855\n",
- "748288838313422294120286634350736906063837462003711\n",
- "1496577676626844588240573268701473812127674924007423\n",
- "2993155353253689176481146537402947624255349848014847\n",
- "5986310706507378352962293074805895248510699696029695\n",
- "11972621413014756705924586149611790497021399392059391\n",
- "23945242826029513411849172299223580994042798784118783\n",
- "47890485652059026823698344598447161988085597568237567\n",
- "95780971304118053647396689196894323976171195136475135\n",
- "191561942608236107294793378393788647952342390272950271\n",
- "383123885216472214589586756787577295904684780545900543\n",
- "766247770432944429179173513575154591809369561091801087\n",
- "1532495540865888858358347027150309183618739122183602175\n",
- "3064991081731777716716694054300618367237478244367204351\n",
- "6129982163463555433433388108601236734474956488734408703\n",
- "12259964326927110866866776217202473468949912977468817407\n",
- "24519928653854221733733552434404946937899825954937634815\n",
- "49039857307708443467467104868809893875799651909875269631\n",
- "98079714615416886934934209737619787751599303819750539263\n",
- "196159429230833773869868419475239575503198607639501078527\n",
- "392318858461667547739736838950479151006397215279002157055\n",
- "784637716923335095479473677900958302012794430558004314111\n",
- "1569275433846670190958947355801916604025588861116008628223\n",
- "3138550867693340381917894711603833208051177722232017256447\n",
- "6277101735386680763835789423207666416102355444464034512895\n",
- "12554203470773361527671578846415332832204710888928069025791\n",
- "25108406941546723055343157692830665664409421777856138051583\n",
- "50216813883093446110686315385661331328818843555712276103167\n",
- "100433627766186892221372630771322662657637687111424552206335\n",
- "200867255532373784442745261542645325315275374222849104412671\n",
- "401734511064747568885490523085290650630550748445698208825343\n",
- "803469022129495137770981046170581301261101496891396417650687\n",
- "1606938044258990275541962092341162602522202993782792835301375\n",
- "3213876088517980551083924184682325205044405987565585670602751\n",
- "6427752177035961102167848369364650410088811975131171341205503\n",
- "12855504354071922204335696738729300820177623950262342682411007\n",
- "25711008708143844408671393477458601640355247900524685364822015\n",
- "51422017416287688817342786954917203280710495801049370729644031\n",
- "102844034832575377634685573909834406561420991602098741459288063\n",
- "205688069665150755269371147819668813122841983204197482918576127\n",
- "411376139330301510538742295639337626245683966408394965837152255\n",
- "822752278660603021077484591278675252491367932816789931674304511\n",
- "1645504557321206042154969182557350504982735865633579863348609023\n",
- "3291009114642412084309938365114701009965471731267159726697218047\n",
- "6582018229284824168619876730229402019930943462534319453394436095\n",
- "13164036458569648337239753460458804039861886925068638906788872191\n",
- "26328072917139296674479506920917608079723773850137277813577744383\n",
- "52656145834278593348959013841835216159447547700274555627155488767\n",
- "105312291668557186697918027683670432318895095400549111254310977535\n",
- "210624583337114373395836055367340864637790190801098222508621955071\n",
- "421249166674228746791672110734681729275580381602196445017243910143\n",
- "842498333348457493583344221469363458551160763204392890034487820287\n",
- "1684996666696914987166688442938726917102321526408785780068975640575\n",
- "3369993333393829974333376885877453834204643052817571560137951281151\n",
- "6739986666787659948666753771754907668409286105635143120275902562303\n",
- "13479973333575319897333507543509815336818572211270286240551805124607\n",
- "26959946667150639794667015087019630673637144422540572481103610249215\n",
- "53919893334301279589334030174039261347274288845081144962207220498431\n",
- "107839786668602559178668060348078522694548577690162289924414440996863\n",
- "215679573337205118357336120696157045389097155380324579848828881993727\n",
- "431359146674410236714672241392314090778194310760649159697657763987455\n",
- "862718293348820473429344482784628181556388621521298319395315527974911\n",
- "1725436586697640946858688965569256363112777243042596638790631055949823\n",
- "3450873173395281893717377931138512726225554486085193277581262111899647\n",
- "6901746346790563787434755862277025452451108972170386555162524223799295\n",
- "13803492693581127574869511724554050904902217944340773110325048447598591\n",
- "27606985387162255149739023449108101809804435888681546220650096895197183\n",
- "55213970774324510299478046898216203619608871777363092441300193790394367\n",
- "110427941548649020598956093796432407239217743554726184882600387580788735\n",
- "220855883097298041197912187592864814478435487109452369765200775161577471\n",
- "441711766194596082395824375185729628956870974218904739530401550323154943\n",
- "883423532389192164791648750371459257913741948437809479060803100646309887\n",
- "1766847064778384329583297500742918515827483896875618958121606201292619775\n",
- "3533694129556768659166595001485837031654967793751237916243212402585239551\n",
- "7067388259113537318333190002971674063309935587502475832486424805170479103\n",
- "14134776518227074636666380005943348126619871175004951664972849610340958207\n",
- "28269553036454149273332760011886696253239742350009903329945699220681916415\n",
- "56539106072908298546665520023773392506479484700019806659891398441363832831\n",
- "113078212145816597093331040047546785012958969400039613319782796882727665663\n",
- "226156424291633194186662080095093570025917938800079226639565593765455331327\n",
- "452312848583266388373324160190187140051835877600158453279131187530910662655\n",
- "904625697166532776746648320380374280103671755200316906558262375061821325311\n",
- "1809251394333065553493296640760748560207343510400633813116524750123642650623\n",
- "3618502788666131106986593281521497120414687020801267626233049500247285301247\n",
- "7237005577332262213973186563042994240829374041602535252466099000494570602495\n",
- "14474011154664524427946373126085988481658748083205070504932198000989141204991\n",
- "28948022309329048855892746252171976963317496166410141009864396001978282409983\n",
- "57896044618658097711785492504343953926634992332820282019728792003956564819967\n",
- "115792089237316195423570985008687907853269984665640564039457584007913129639935\n",
- "231584178474632390847141970017375815706539969331281128078915168015826259279871\n",
- "463168356949264781694283940034751631413079938662562256157830336031652518559743\n",
- "926336713898529563388567880069503262826159877325124512315660672063305037119487\n",
- "1852673427797059126777135760139006525652319754650249024631321344126610074238975\n",
- "3705346855594118253554271520278013051304639509300498049262642688253220148477951\n",
- "7410693711188236507108543040556026102609279018600996098525285376506440296955903\n",
- "14821387422376473014217086081112052205218558037201992197050570753012880593911807\n",
- "29642774844752946028434172162224104410437116074403984394101141506025761187823615\n",
- "59285549689505892056868344324448208820874232148807968788202283012051522375647231\n",
- "118571099379011784113736688648896417641748464297615937576404566024103044751294463\n",
- "237142198758023568227473377297792835283496928595231875152809132048206089502588927\n",
- "474284397516047136454946754595585670566993857190463750305618264096412179005177855\n",
- "948568795032094272909893509191171341133987714380927500611236528192824358010355711\n",
- "1897137590064188545819787018382342682267975428761855001222473056385648716020711423\n",
- "3794275180128377091639574036764685364535950857523710002444946112771297432041422847\n",
- "7588550360256754183279148073529370729071901715047420004889892225542594864082845695\n",
- "15177100720513508366558296147058741458143803430094840009779784451085189728165691391\n",
- "30354201441027016733116592294117482916287606860189680019559568902170379456331382783\n",
- "60708402882054033466233184588234965832575213720379360039119137804340758912662765567\n",
- "121416805764108066932466369176469931665150427440758720078238275608681517825325531135\n",
- "242833611528216133864932738352939863330300854881517440156476551217363035650651062271\n",
- "485667223056432267729865476705879726660601709763034880312953102434726071301302124543\n",
- "971334446112864535459730953411759453321203419526069760625906204869452142602604249087\n",
- "1942668892225729070919461906823518906642406839052139521251812409738904285205208498175\n",
- "3885337784451458141838923813647037813284813678104279042503624819477808570410416996351\n",
- "7770675568902916283677847627294075626569627356208558085007249638955617140820833992703\n",
- "15541351137805832567355695254588151253139254712417116170014499277911234281641667985407\n",
- "31082702275611665134711390509176302506278509424834232340028998555822468563283335970815\n",
- "62165404551223330269422781018352605012557018849668464680057997111644937126566671941631\n",
- "124330809102446660538845562036705210025114037699336929360115994223289874253133343883263\n",
- "248661618204893321077691124073410420050228075398673858720231988446579748506266687766527\n",
- "497323236409786642155382248146820840100456150797347717440463976893159497012533375533055\n",
- "994646472819573284310764496293641680200912301594695434880927953786318994025066751066111\n",
- "1989292945639146568621528992587283360401824603189390869761855907572637988050133502132223\n",
- "3978585891278293137243057985174566720803649206378781739523711815145275976100267004264447\n",
- "7957171782556586274486115970349133441607298412757563479047423630290551952200534008528895\n",
- "15914343565113172548972231940698266883214596825515126958094847260581103904401068017057791\n",
- "31828687130226345097944463881396533766429193651030253916189694521162207808802136034115583\n",
- "63657374260452690195888927762793067532858387302060507832379389042324415617604272068231167\n",
- "127314748520905380391777855525586135065716774604121015664758778084648831235208544136462335\n",
- "254629497041810760783555711051172270131433549208242031329517556169297662470417088272924671\n",
- "509258994083621521567111422102344540262867098416484062659035112338595324940834176545849343\n",
- "1018517988167243043134222844204689080525734196832968125318070224677190649881668353091698687\n",
- "2037035976334486086268445688409378161051468393665936250636140449354381299763336706183397375\n",
- "4074071952668972172536891376818756322102936787331872501272280898708762599526673412366794751\n",
- "8148143905337944345073782753637512644205873574663745002544561797417525199053346824733589503\n",
- "16296287810675888690147565507275025288411747149327490005089123594835050398106693649467179007\n",
- "32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358015\n",
- "65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716031\n",
- "130370302485407109521180524058200202307293977194619920040712988758680403184853549195737432063\n",
- "260740604970814219042361048116400404614587954389239840081425977517360806369707098391474864127\n",
- "521481209941628438084722096232800809229175908778479680162851955034721612739414196782949728255\n",
- "1042962419883256876169444192465601618458351817556959360325703910069443225478828393565899456511\n",
- "2085924839766513752338888384931203236916703635113918720651407820138886450957656787131798913023\n",
- "4171849679533027504677776769862406473833407270227837441302815640277772901915313574263597826047\n",
- "8343699359066055009355553539724812947666814540455674882605631280555545803830627148527195652095\n",
- "16687398718132110018711107079449625895333629080911349765211262561111091607661254297054391304191\n",
- "33374797436264220037422214158899251790667258161822699530422525122222183215322508594108782608383\n",
- "66749594872528440074844428317798503581334516323645399060845050244444366430645017188217565216767\n",
- "133499189745056880149688856635597007162669032647290798121690100488888732861290034376435130433535\n",
- "266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867071\n",
- "533996758980227520598755426542388028650676130589163192486760401955554931445160137505740521734143\n",
- "1067993517960455041197510853084776057301352261178326384973520803911109862890320275011481043468287\n",
- "2135987035920910082395021706169552114602704522356652769947041607822219725780640550022962086936575\n",
- "4271974071841820164790043412339104229205409044713305539894083215644439451561281100045924173873151\n",
- "8543948143683640329580086824678208458410818089426611079788166431288878903122562200091848347746303\n",
- "17087896287367280659160173649356416916821636178853222159576332862577757806245124400183696695492607\n",
- "34175792574734561318320347298712833833643272357706444319152665725155515612490248800367393390985215\n",
- "68351585149469122636640694597425667667286544715412888638305331450311031224980497600734786781970431\n",
- "136703170298938245273281389194851335334573089430825777276610662900622062449960995201469573563940863\n",
- "273406340597876490546562778389702670669146178861651554553221325801244124899921990402939147127881727\n",
- "546812681195752981093125556779405341338292357723303109106442651602488249799843980805878294255763455\n",
- "1093625362391505962186251113558810682676584715446606218212885303204976499599687961611756588511526911\n",
- "2187250724783011924372502227117621365353169430893212436425770606409952999199375923223513177023053823\n",
- "4374501449566023848745004454235242730706338861786424872851541212819905998398751846447026354046107647\n",
- "8749002899132047697490008908470485461412677723572849745703082425639811996797503692894052708092215295\n",
- "17498005798264095394980017816940970922825355447145699491406164851279623993595007385788105416184430591\n",
- "34996011596528190789960035633881941845650710894291398982812329702559247987190014771576210832368861183\n",
- "69992023193056381579920071267763883691301421788582797965624659405118495974380029543152421664737722367\n",
- "139984046386112763159840142535527767382602843577165595931249318810236991948760059086304843329475444735\n",
- "279968092772225526319680285071055534765205687154331191862498637620473983897520118172609686658950889471\n",
- "559936185544451052639360570142111069530411374308662383724997275240947967795040236345219373317901778943\n",
- "1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557887\n",
- "2239744742177804210557442280568444278121645497234649534899989100963791871180160945380877493271607115775\n",
- "4479489484355608421114884561136888556243290994469299069799978201927583742360321890761754986543214231551\n",
- "8958978968711216842229769122273777112486581988938598139599956403855167484720643781523509973086428463103\n",
- "17917957937422433684459538244547554224973163977877196279199912807710334969441287563047019946172856926207\n",
- "35835915874844867368919076489095108449946327955754392558399825615420669938882575126094039892345713852415\n",
- "71671831749689734737838152978190216899892655911508785116799651230841339877765150252188079784691427704831\n",
- "143343663499379469475676305956380433799785311823017570233599302461682679755530300504376159569382855409663\n",
- "286687326998758938951352611912760867599570623646035140467198604923365359511060601008752319138765710819327\n",
- "573374653997517877902705223825521735199141247292070280934397209846730719022121202017504638277531421638655\n",
- "1146749307995035755805410447651043470398282494584140561868794419693461438044242404035009276555062843277311\n",
- "2293498615990071511610820895302086940796564989168281123737588839386922876088484808070018553110125686554623\n",
- "4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109247\n",
- "9173994463960286046443283581208347763186259956673124494950355357547691504353939232280074212440502746218495\n",
- "18347988927920572092886567162416695526372519913346248989900710715095383008707878464560148424881005492436991\n",
- "36695977855841144185773134324833391052745039826692497979801421430190766017415756929120296849762010984873983\n",
- "73391955711682288371546268649666782105490079653384995959602842860381532034831513858240593699524021969747967\n",
- "146783911423364576743092537299333564210980159306769991919205685720763064069663027716481187399048043939495935\n",
- "293567822846729153486185074598667128421960318613539983838411371441526128139326055432962374798096087878991871\n",
- "587135645693458306972370149197334256843920637227079967676822742883052256278652110865924749596192175757983743\n",
- "1174271291386916613944740298394668513687841274454159935353645485766104512557304221731849499192384351515967487\n",
- "2348542582773833227889480596789337027375682548908319870707290971532209025114608443463698998384768703031934975\n",
- "4697085165547666455778961193578674054751365097816639741414581943064418050229216886927397996769537406063869951\n",
- "9394170331095332911557922387157348109502730195633279482829163886128836100458433773854795993539074812127739903\n",
- "18788340662190665823115844774314696219005460391266558965658327772257672200916867547709591987078149624255479807\n",
- "37576681324381331646231689548629392438010920782533117931316655544515344401833735095419183974156299248510959615\n",
- "75153362648762663292463379097258784876021841565066235862633311089030688803667470190838367948312598497021919231\n",
- "150306725297525326584926758194517569752043683130132471725266622178061377607334940381676735896625196994043838463\n",
- "300613450595050653169853516389035139504087366260264943450533244356122755214669880763353471793250393988087676927\n",
- "601226901190101306339707032778070279008174732520529886901066488712245510429339761526706943586500787976175353855\n",
- "1202453802380202612679414065556140558016349465041059773802132977424491020858679523053413887173001575952350707711\n",
- "2404907604760405225358828131112281116032698930082119547604265954848982041717359046106827774346003151904701415423\n",
- "4809815209520810450717656262224562232065397860164239095208531909697964083434718092213655548692006303809402830847\n",
- "9619630419041620901435312524449124464130795720328478190417063819395928166869436184427311097384012607618805661695\n",
- "19239260838083241802870625048898248928261591440656956380834127638791856333738872368854622194768025215237611323391\n",
- "38478521676166483605741250097796497856523182881313912761668255277583712667477744737709244389536050430475222646783\n",
- "76957043352332967211482500195592995713046365762627825523336510555167425334955489475418488779072100860950445293567\n",
- "153914086704665934422965000391185991426092731525255651046673021110334850669910978950836977558144201721900890587135\n",
- "307828173409331868845930000782371982852185463050511302093346042220669701339821957901673955116288403443801781174271\n",
- "615656346818663737691860001564743965704370926101022604186692084441339402679643915803347910232576806887603562348543\n",
- "1231312693637327475383720003129487931408741852202045208373384168882678805359287831606695820465153613775207124697087\n",
- "2462625387274654950767440006258975862817483704404090416746768337765357610718575663213391640930307227550414249394175\n",
- "4925250774549309901534880012517951725634967408808180833493536675530715221437151326426783281860614455100828498788351\n",
- "9850501549098619803069760025035903451269934817616361666987073351061430442874302652853566563721228910201656997576703\n",
- "19701003098197239606139520050071806902539869635232723333974146702122860885748605305707133127442457820403313995153407\n",
- "39402006196394479212279040100143613805079739270465446667948293404245721771497210611414266254884915640806627990306815\n",
- "78804012392788958424558080200287227610159478540930893335896586808491443542994421222828532509769831281613255980613631\n",
- "157608024785577916849116160400574455220318957081861786671793173616982887085988842445657065019539662563226511961227263\n",
- "315216049571155833698232320801148910440637914163723573343586347233965774171977684891314130039079325126453023922454527\n",
- "630432099142311667396464641602297820881275828327447146687172694467931548343955369782628260078158650252906047844909055\n",
- "1260864198284623334792929283204595641762551656654894293374345388935863096687910739565256520156317300505812095689818111\n",
- "2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636223\n",
- "5043456793138493339171717132818382567050206626619577173497381555743452386751642958261026080625269202023248382759272447\n",
- "10086913586276986678343434265636765134100413253239154346994763111486904773503285916522052161250538404046496765518544895\n",
- "20173827172553973356686868531273530268200826506478308693989526222973809547006571833044104322501076808092993531037089791\n",
- "40347654345107946713373737062547060536401653012956617387979052445947619094013143666088208645002153616185987062074179583\n",
- "80695308690215893426747474125094121072803306025913234775958104891895238188026287332176417290004307232371974124148359167\n",
- "161390617380431786853494948250188242145606612051826469551916209783790476376052574664352834580008614464743948248296718335\n",
- "322781234760863573706989896500376484291213224103652939103832419567580952752105149328705669160017228929487896496593436671\n",
- "645562469521727147413979793000752968582426448207305878207664839135161905504210298657411338320034457858975792993186873343\n",
- "1291124939043454294827959586001505937164852896414611756415329678270323811008420597314822676640068915717951585986373746687\n",
- "2582249878086908589655919172003011874329705792829223512830659356540647622016841194629645353280137831435903171972747493375\n",
- "5164499756173817179311838344006023748659411585658447025661318713081295244033682389259290706560275662871806343945494986751\n",
- "10328999512347634358623676688012047497318823171316894051322637426162590488067364778518581413120551325743612687890989973503\n",
- "20657999024695268717247353376024094994637646342633788102645274852325180976134729557037162826241102651487225375781979947007\n",
- "41315998049390537434494706752048189989275292685267576205290549704650361952269459114074325652482205302974450751563959894015\n",
- "82631996098781074868989413504096379978550585370535152410581099409300723904538918228148651304964410605948901503127919788031\n",
- "165263992197562149737978827008192759957101170741070304821162198818601447809077836456297302609928821211897803006255839576063\n",
- "330527984395124299475957654016385519914202341482140609642324397637202895618155672912594605219857642423795606012511679152127\n",
- "661055968790248598951915308032771039828404682964281219284648795274405791236311345825189210439715284847591212025023358304255\n",
- "1322111937580497197903830616065542079656809365928562438569297590548811582472622691650378420879430569695182424050046716608511\n",
- "2644223875160994395807661232131084159313618731857124877138595181097623164945245383300756841758861139390364848100093433217023\n",
- "5288447750321988791615322464262168318627237463714249754277190362195246329890490766601513683517722278780729696200186866434047\n",
- "10576895500643977583230644928524336637254474927428499508554380724390492659780981533203027367035444557561459392400373732868095\n",
- "21153791001287955166461289857048673274508949854856999017108761448780985319561963066406054734070889115122918784800747465736191\n",
- "42307582002575910332922579714097346549017899709713998034217522897561970639123926132812109468141778230245837569601494931472383\n",
- "84615164005151820665845159428194693098035799419427996068435045795123941278247852265624218936283556460491675139202989862944767\n",
- "169230328010303641331690318856389386196071598838855992136870091590247882556495704531248437872567112920983350278405979725889535\n",
- "338460656020607282663380637712778772392143197677711984273740183180495765112991409062496875745134225841966700556811959451779071\n",
- "676921312041214565326761275425557544784286395355423968547480366360991530225982818124993751490268451683933401113623918903558143\n",
- "1353842624082429130653522550851115089568572790710847937094960732721983060451965636249987502980536903367866802227247837807116287\n",
- "2707685248164858261307045101702230179137145581421695874189921465443966120903931272499975005961073806735733604454495675614232575\n",
- "5415370496329716522614090203404460358274291162843391748379842930887932241807862544999950011922147613471467208908991351228465151\n",
- "10830740992659433045228180406808920716548582325686783496759685861775864483615725089999900023844295226942934417817982702456930303\n",
- "21661481985318866090456360813617841433097164651373566993519371723551728967231450179999800047688590453885868835635965404913860607\n",
- "43322963970637732180912721627235682866194329302747133987038743447103457934462900359999600095377180907771737671271930809827721215\n",
- "86645927941275464361825443254471365732388658605494267974077486894206915868925800719999200190754361815543475342543861619655442431\n",
- "173291855882550928723650886508942731464777317210988535948154973788413831737851601439998400381508723631086950685087723239310884863\n",
- "346583711765101857447301773017885462929554634421977071896309947576827663475703202879996800763017447262173901370175446478621769727\n",
- "693167423530203714894603546035770925859109268843954143792619895153655326951406405759993601526034894524347802740350892957243539455\n",
- "1386334847060407429789207092071541851718218537687908287585239790307310653902812811519987203052069789048695605480701785914487078911\n",
- "2772669694120814859578414184143083703436437075375816575170479580614621307805625623039974406104139578097391210961403571828974157823\n",
- "5545339388241629719156828368286167406872874150751633150340959161229242615611251246079948812208279156194782421922807143657948315647\n",
- "11090678776483259438313656736572334813745748301503266300681918322458485231222502492159897624416558312389564843845614287315896631295\n",
- "22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262591\n",
- "44362715105933037753254626946289339254982993206013065202727673289833940924890009968639590497666233249558259375382457149263586525183\n",
- "88725430211866075506509253892578678509965986412026130405455346579667881849780019937279180995332466499116518750764914298527173050367\n",
- "177450860423732151013018507785157357019931972824052260810910693159335763699560039874558361990664932998233037501529828597054346100735\n",
- "354901720847464302026037015570314714039863945648104521621821386318671527399120079749116723981329865996466075003059657194108692201471\n",
- "709803441694928604052074031140629428079727891296209043243642772637343054798240159498233447962659731992932150006119314388217384402943\n",
- "1419606883389857208104148062281258856159455782592418086487285545274686109596480318996466895925319463985864300012238628776434768805887\n",
- "2839213766779714416208296124562517712318911565184836172974571090549372219192960637992933791850638927971728600024477257552869537611775\n",
- "5678427533559428832416592249125035424637823130369672345949142181098744438385921275985867583701277855943457200048954515105739075223551\n",
- "11356855067118857664833184498250070849275646260739344691898284362197488876771842551971735167402555711886914400097909030211478150447103\n",
- "22713710134237715329666368996500141698551292521478689383796568724394977753543685103943470334805111423773828800195818060422956300894207\n",
- "45427420268475430659332737993000283397102585042957378767593137448789955507087370207886940669610222847547657600391636120845912601788415\n",
- "90854840536950861318665475986000566794205170085914757535186274897579911014174740415773881339220445695095315200783272241691825203576831\n",
- "181709681073901722637330951972001133588410340171829515070372549795159822028349480831547762678440891390190630401566544483383650407153663\n",
- "363419362147803445274661903944002267176820680343659030140745099590319644056698961663095525356881782780381260803133088966767300814307327\n",
- "726838724295606890549323807888004534353641360687318060281490199180639288113397923326191050713763565560762521606266177933534601628614655\n",
- "1453677448591213781098647615776009068707282721374636120562980398361278576226795846652382101427527131121525043212532355867069203257229311\n",
- "2907354897182427562197295231552018137414565442749272241125960796722557152453591693304764202855054262243050086425064711734138406514458623\n",
- "5814709794364855124394590463104036274829130885498544482251921593445114304907183386609528405710108524486100172850129423468276813028917247\n",
- "11629419588729710248789180926208072549658261770997088964503843186890228609814366773219056811420217048972200345700258846936553626057834495\n",
- "23258839177459420497578361852416145099316523541994177929007686373780457219628733546438113622840434097944400691400517693873107252115668991\n",
- "46517678354918840995156723704832290198633047083988355858015372747560914439257467092876227245680868195888801382801035387746214504231337983\n",
- "93035356709837681990313447409664580397266094167976711716030745495121828878514934185752454491361736391777602765602070775492429008462675967\n",
- "186070713419675363980626894819329160794532188335953423432061490990243657757029868371504908982723472783555205531204141550984858016925351935\n",
- "372141426839350727961253789638658321589064376671906846864122981980487315514059736743009817965446945567110411062408283101969716033850703871\n",
- "744282853678701455922507579277316643178128753343813693728245963960974631028119473486019635930893891134220822124816566203939432067701407743\n",
- "1488565707357402911845015158554633286356257506687627387456491927921949262056238946972039271861787782268441644249633132407878864135402815487\n",
- "2977131414714805823690030317109266572712515013375254774912983855843898524112477893944078543723575564536883288499266264815757728270805630975\n",
- "5954262829429611647380060634218533145425030026750509549825967711687797048224955787888157087447151129073766576998532529631515456541611261951\n",
- "11908525658859223294760121268437066290850060053501019099651935423375594096449911575776314174894302258147533153997065059263030913083222523903\n",
- "23817051317718446589520242536874132581700120107002038199303870846751188192899823151552628349788604516295066307994130118526061826166445047807\n",
- "47634102635436893179040485073748265163400240214004076398607741693502376385799646303105256699577209032590132615988260237052123652332890095615\n",
- "95268205270873786358080970147496530326800480428008152797215483387004752771599292606210513399154418065180265231976520474104247304665780191231\n",
- "190536410541747572716161940294993060653600960856016305594430966774009505543198585212421026798308836130360530463953040948208494609331560382463\n",
- "381072821083495145432323880589986121307201921712032611188861933548019011086397170424842053596617672260721060927906081896416989218663120764927\n",
- "762145642166990290864647761179972242614403843424065222377723867096038022172794340849684107193235344521442121855812163792833978437326241529855\n",
- "1524291284333980581729295522359944485228807686848130444755447734192076044345588681699368214386470689042884243711624327585667956874652483059711\n",
- "3048582568667961163458591044719888970457615373696260889510895468384152088691177363398736428772941378085768487423248655171335913749304966119423\n",
- "6097165137335922326917182089439777940915230747392521779021790936768304177382354726797472857545882756171536974846497310342671827498609932238847\n",
- "12194330274671844653834364178879555881830461494785043558043581873536608354764709453594945715091765512343073949692994620685343654997219864477695\n",
- "24388660549343689307668728357759111763660922989570087116087163747073216709529418907189891430183531024686147899385989241370687309994439728955391\n",
- "48777321098687378615337456715518223527321845979140174232174327494146433419058837814379782860367062049372295798771978482741374619988879457910783\n",
- "97554642197374757230674913431036447054643691958280348464348654988292866838117675628759565720734124098744591597543956965482749239977758915821567\n",
- "195109284394749514461349826862072894109287383916560696928697309976585733676235351257519131441468248197489183195087913930965498479955517831643135\n",
- "390218568789499028922699653724145788218574767833121393857394619953171467352470702515038262882936496394978366390175827861930996959911035663286271\n",
- "780437137578998057845399307448291576437149535666242787714789239906342934704941405030076525765872992789956732780351655723861993919822071326572543\n",
- "1560874275157996115690798614896583152874299071332485575429578479812685869409882810060153051531745985579913465560703311447723987839644142653145087\n",
- "3121748550315992231381597229793166305748598142664971150859156959625371738819765620120306103063491971159826931121406622895447975679288285306290175\n",
- "6243497100631984462763194459586332611497196285329942301718313919250743477639531240240612206126983942319653862242813245790895951358576570612580351\n",
- "12486994201263968925526388919172665222994392570659884603436627838501486955279062480481224412253967884639307724485626491581791902717153141225160703\n",
- "24973988402527937851052777838345330445988785141319769206873255677002973910558124960962448824507935769278615448971252983163583805434306282450321407\n",
- "49947976805055875702105555676690660891977570282639538413746511354005947821116249921924897649015871538557230897942505966327167610868612564900642815\n",
- "99895953610111751404211111353381321783955140565279076827493022708011895642232499843849795298031743077114461795885011932654335221737225129801285631\n",
- "199791907220223502808422222706762643567910281130558153654986045416023791284464999687699590596063486154228923591770023865308670443474450259602571263\n",
- "399583814440447005616844445413525287135820562261116307309972090832047582568929999375399181192126972308457847183540047730617340886948900519205142527\n",
- "799167628880894011233688890827050574271641124522232614619944181664095165137859998750798362384253944616915694367080095461234681773897801038410285055\n",
- "1598335257761788022467377781654101148543282249044465229239888363328190330275719997501596724768507889233831388734160190922469363547795602076820570111\n",
- "3196670515523576044934755563308202297086564498088930458479776726656380660551439995003193449537015778467662777468320381844938727095591204153641140223\n",
- "6393341031047152089869511126616404594173128996177860916959553453312761321102879990006386899074031556935325554936640763689877454191182408307282280447\n",
- "12786682062094304179739022253232809188346257992355721833919106906625522642205759980012773798148063113870651109873281527379754908382364816614564560895\n",
- "25573364124188608359478044506465618376692515984711443667838213813251045284411519960025547596296126227741302219746563054759509816764729633229129121791\n",
- "51146728248377216718956089012931236753385031969422887335676427626502090568823039920051095192592252455482604439493126109519019633529459266458258243583\n",
- "102293456496754433437912178025862473506770063938845774671352855253004181137646079840102190385184504910965208878986252219038039267058918532916516487167\n",
- "204586912993508866875824356051724947013540127877691549342705710506008362275292159680204380770369009821930417757972504438076078534117837065833032974335\n",
- "409173825987017733751648712103449894027080255755383098685411421012016724550584319360408761540738019643860835515945008876152157068235674131666065948671\n",
- "818347651974035467503297424206899788054160511510766197370822842024033449101168638720817523081476039287721671031890017752304314136471348263332131897343\n",
- "1636695303948070935006594848413799576108321023021532394741645684048066898202337277441635046162952078575443342063780035504608628272942696526664263794687\n"
- ]
- }
- ],
- "source": [
- "for i in range(500):\n",
- " print(2**i - 1)"
- ]
- }
- ],
- "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.5.1"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/docs/source/examples/Notebook/Typesetting Equations.ipynb b/docs/source/examples/Notebook/Typesetting Equations.ipynb
deleted file mode 100644
index 4d8f5f9fc7..0000000000
--- a/docs/source/examples/Notebook/Typesetting Equations.ipynb
+++ /dev/null
@@ -1,280 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The Markdown parser included in the Jupyter Notebook is MathJax-aware. This means that you can freely mix in mathematical expressions using the [MathJax subset of Tex and LaTeX](http://docs.mathjax.org/en/latest/tex.html#tex-support). [Some examples from the MathJax site](https://www.mathjax.org/demos/tex-samples/) are reproduced below, as well as the Markdown+TeX source."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Motivating Examples\n",
- "\n",
- "## The Lorenz Equations\n",
- "### Source\n",
- "```\n",
- "\\begin{align}\n",
- "\\dot{x} & = \\sigma(y-x) \\\\\n",
- "\\dot{y} & = \\rho x - y - xz \\\\\n",
- "\\dot{z} & = -\\beta z + xy\n",
- "\\end{align}\n",
- "```\n",
- "### Display\n",
- "\n",
- "$\\begin{align}\n",
- "\\dot{x} & = \\sigma(y-x) \\\\\n",
- "\\dot{y} & = \\rho x - y - xz \\\\\n",
- "\\dot{z} & = -\\beta z + xy\n",
- "\\end{align}$"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## The Cauchy-Schwarz Inequality\n",
- "### Source\n",
- "```\n",
- "\\begin{equation*}\n",
- "\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)\n",
- "\\end{equation*}\n",
- "```\n",
- "### Display\n",
- "\n",
- "$\\begin{equation*}\n",
- "\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)\n",
- "\\end{equation*}$"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## A Cross Product Formula\n",
- "### Source\n",
- "```\n",
- "\\begin{equation*}\n",
- "\\mathbf{V}_1 \\times \\mathbf{V}_2 = \\begin{vmatrix}\n",
- "\\mathbf{i} & \\mathbf{j} & \\mathbf{k} \\\\\n",
- "\\frac{\\partial X}{\\partial u} & \\frac{\\partial Y}{\\partial u} & 0 \\\\\n",
- "\\frac{\\partial X}{\\partial v} & \\frac{\\partial Y}{\\partial v} & 0\n",
- "\\end{vmatrix} \n",
- "\\end{equation*}\n",
- "```\n",
- "### Display\n",
- "\n",
- "$\\begin{equation*}\n",
- "\\mathbf{V}_1 \\times \\mathbf{V}_2 = \\begin{vmatrix}\n",
- "\\mathbf{i} & \\mathbf{j} & \\mathbf{k} \\\\\n",
- "\\frac{\\partial X}{\\partial u} & \\frac{\\partial Y}{\\partial u} & 0 \\\\\n",
- "\\frac{\\partial X}{\\partial v} & \\frac{\\partial Y}{\\partial v} & 0\n",
- "\\end{vmatrix} \n",
- "\\end{equation*}$"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## The probability of getting \\(k\\) heads when flipping \\(n\\) coins is\n",
- "### Source\n",
- "```\n",
- "\\begin{equation*}\n",
- "P(E) = {n \\choose k} p^k (1-p)^{ n-k} \n",
- "\\end{equation*}\n",
- "```\n",
- "### Display\n",
- "\n",
- "$\\begin{equation*}\n",
- "P(E) = {n \\choose k} p^k (1-p)^{ n-k} \n",
- "\\end{equation*}$"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## An Identity of Ramanujan\n",
- "### Source\n",
- "```\n",
- "\\begin{equation*}\n",
- "\\frac{1}{\\Bigl(\\sqrt{\\phi \\sqrt{5}}-\\phi\\Bigr) e^{\\frac25 \\pi}} =\n",
- "1+\\frac{e^{-2\\pi}} {1+\\frac{e^{-4\\pi}} {1+\\frac{e^{-6\\pi}}\n",
- "{1+\\frac{e^{-8\\pi}} {1+\\ldots} } } } \n",
- "\\end{equation*}\n",
- "```\n",
- "### Display\n",
- "$\\begin{equation*}\n",
- "\\frac{1}{\\Bigl(\\sqrt{\\phi \\sqrt{5}}-\\phi\\Bigr) e^{\\frac25 \\pi}} =\n",
- "1+\\frac{e^{-2\\pi}} {1+\\frac{e^{-4\\pi}} {1+\\frac{e^{-6\\pi}}\n",
- "{1+\\frac{e^{-8\\pi}} {1+\\ldots} } } } \n",
- "\\end{equation*}$"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## A Rogers-Ramanujan Identity\n",
- "### Source\n",
- "```\n",
- "\\begin{equation*}\n",
- "1 + \\frac{q^2}{(1-q)}+\\frac{q^6}{(1-q)(1-q^2)}+\\cdots =\n",
- "\\prod_{j=0}^{\\infty}\\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},\n",
- "\\quad\\quad \\text{for $|q|<1$}. \n",
- "\\end{equation*}\n",
- "```\n",
- "### Display\n",
- "\n",
- "$$\\begin{equation*}\n",
- "1 + \\frac{q^2}{(1-q)}+\\frac{q^6}{(1-q)(1-q^2)}+\\cdots =\n",
- "\\prod_{j=0}^{\\infty}\\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},\n",
- "\\quad\\quad \\text{for $|q|<1$}. \n",
- "\\end{equation*}$$"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Maxwell's Equations\n",
- "### Source\n",
- "```\n",
- "\\begin{align}\n",
- "\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\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{align}\n",
- "```\n",
- "### Display\n",
- "\n",
- "$\\begin{align}\n",
- "\\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\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{align}$"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Equation Numbering and References\n",
- "\n",
- "Equation numbering and referencing will be available in a future version of the Jupyter notebook."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Inline Typesetting (Mixing Markdown and TeX)\n",
- "\n",
- "While display equations look good for a page of samples, the ability to mix math and *formatted* **text** in a paragraph is also important.\n",
- "\n",
- "### Source\n",
- "```\n",
- "This expression $\\sqrt{3x-1}+(1+x)^2$ is an example of a TeX inline equation in a [Markdown-formatted](https://daringfireball.net/projects/markdown/) sentence. \n",
- "```\n",
- "\n",
- "### Display\n",
- "This expression $\\sqrt{3x-1}+(1+x)^2$ is an example of a TeX inline equation in a [Markdown-formatted](https://daringfireball.net/projects/markdown/) sentence. "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Other Syntax\n",
- "\n",
- "You will notice in other places on the web that `$$` are needed explicitly to begin and end MathJax typesetting. This is **not** required if you will be using TeX environments, but the Jupyter notebook will accept this syntax on legacy notebooks. \n",
- "\n",
- "## Source\n",
- "\n",
- "```\n",
- "$$\n",
- "\\begin{array}{c}\n",
- "y_1 \\\\\\\n",
- "y_2 \\mathtt{t}_i \\\\\\\n",
- "z_{3,4}\n",
- "\\end{array}\n",
- "$$\n",
- "```\n",
- "\n",
- "```\n",
- "$$\n",
- "\\begin{array}{c}\n",
- "y_1 \\cr\n",
- "y_2 \\mathtt{t}_i \\cr\n",
- "y_{3}\n",
- "\\end{array}\n",
- "$$\n",
- "```\n",
- "\n",
- "```\n",
- "$$\\begin{eqnarray} \n",
- "x' &=& &x \\sin\\phi &+& z \\cos\\phi \\\\\n",
- "z' &=& - &x \\cos\\phi &+& z \\sin\\phi \\\\\n",
- "\\end{eqnarray}$$\n",
- "```\n",
- "\n",
- "```\n",
- "$$\n",
- "x=4\n",
- "$$\n",
- "```\n",
- "\n",
- "## Display\n",
- "\n",
- "$$\n",
- "\\begin{array}{c}\n",
- "y_1 \\\\\\\n",
- "y_2 \\mathtt{t}_i \\\\\\\n",
- "z_{3,4}\n",
- "\\end{array}\n",
- "$$\n",
- "\n",
- "$$\n",
- "\\begin{array}{c}\n",
- "y_1 \\cr\n",
- "y_2 \\mathtt{t}_i \\cr\n",
- "y_{3}\n",
- "\\end{array}\n",
- "$$\n",
- "\n",
- "$$\\begin{eqnarray} \n",
- "x' &=& &x \\sin\\phi &+& z \\cos\\phi \\\\\n",
- "z' &=& - &x \\cos\\phi &+& z \\sin\\phi \\\\\n",
- "\\end{eqnarray}$$\n",
- "\n",
- "$$\n",
- "x=4\n",
- "$$"
- ]
- }
- ],
- "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.5.1"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/docs/source/examples/Notebook/What is the Jupyter Notebook.ipynb b/docs/source/examples/Notebook/What is the Jupyter Notebook.ipynb
deleted file mode 100644
index 0b64a1571f..0000000000
--- a/docs/source/examples/Notebook/What is the Jupyter Notebook.ipynb
+++ /dev/null
@@ -1,181 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {
- "slideshow": {
- "slide_type": "slide"
- }
- },
- "source": [
- "# What is the Jupyter Notebook?"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Introduction"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The Jupyter Notebook is an **interactive computing environment** that enables users to author notebook documents that include: \n",
- "- Live code\n",
- "- Interactive widgets\n",
- "- Plots\n",
- "- Narrative text\n",
- "- Equations\n",
- "- Images\n",
- "- Video\n",
- "\n",
- "These documents provide a **complete and self-contained record of a computation** that can be converted to various formats and shared with others using email, [Dropbox](https://www.dropbox.com/), version control systems (like git/[GitHub](https://github.com)) or [nbviewer.jupyter.org](http://nbviewer.jupyter.org)."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "slideshow": {
- "slide_type": "slide"
- }
- },
- "source": [
- "### Components"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The Jupyter Notebook combines three components:\n",
- "\n",
- "* **The notebook web application**: An interactive web application for writing and running code interactively and authoring notebook documents.\n",
- "* **Kernels**: Separate processes started by the notebook web application that runs users' code in a given language and returns output back to the notebook web application. The kernel also handles things like computations for interactive widgets, tab completion and introspection. \n",
- "* **Notebook documents**: Self-contained documents that contain a representation of all content visible in the notebook web application, including inputs and outputs of the computations, narrative\n",
- "text, equations, images, and rich media representations of objects. Each notebook document has its own kernel."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "slideshow": {
- "slide_type": "slide"
- }
- },
- "source": [
- "## Notebook web application"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "The notebook web application enables users to:\n",
- "\n",
- "* **Edit code in the browser**, with automatic syntax highlighting, indentation, and tab completion/introspection.\n",
- "* **Run code from the browser**, with the results of computations attached to the code which generated them.\n",
- "* See the results of computations with **rich media representations**, such as HTML, LaTeX, PNG, SVG, PDF, etc.\n",
- "* Create and use **interactive JavaScript widgets**, which bind interactive user interface controls and visualizations to reactive kernel side computations.\n",
- "* Author **narrative text** using the [Markdown](https://daringfireball.net/projects/markdown/) markup language.\n",
- "* Include mathematical equations using **LaTeX syntax in Markdown**, which are rendered in-browser by [MathJax](https://www.mathjax.org/)."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "slideshow": {
- "slide_type": "slide"
- }
- },
- "source": [
- "## Kernels"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Through Jupyter's kernel and messaging architecture, the Notebook allows code to be run in a range of different programming languages. For each notebook document that a user opens, the web application starts a kernel that runs the code for that notebook. Each kernel is capable of running code in a single programming language and there are kernels available in the following languages:\n",
- "\n",
- "* Python(https://github.com/ipython/ipython)\n",
- "* Julia (https://github.com/JuliaLang/IJulia.jl)\n",
- "* R (https://github.com/IRkernel/IRkernel)\n",
- "* Ruby (https://github.com/minrk/iruby)\n",
- "* Haskell (https://github.com/gibiansky/IHaskell)\n",
- "* Scala (https://github.com/Bridgewater/scala-notebook)\n",
- "* node.js (https://gist.github.com/Carreau/4279371)\n",
- "* Go (https://github.com/takluyver/igo)\n",
- "\n",
- "The default kernel runs Python code. The notebook provides a simple way for users to pick which of these kernels is used for a given notebook. \n",
- "\n",
- "Each of these kernels communicate with the notebook web application and web browser using a JSON over ZeroMQ/WebSockets message protocol that is described [here](https://jupyter-client.readthedocs.io/en/latest/messaging.html#messaging). Most users don't need to know about these details, but it helps to understand that \"kernels run code.\""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "slideshow": {
- "slide_type": "slide"
- }
- },
- "source": [
- "## Notebook documents"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Notebook documents contain the **inputs and outputs** of an interactive session as well as **narrative text** that accompanies the code but is not meant for execution. **Rich output** generated by running code, including HTML, images, video, and plots, is embeddeed in the notebook, which makes it a complete and self-contained record of a computation. "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "When you run the notebook web application on your computer, notebook documents are just **files on your local filesystem with a `.ipynb` extension**. This allows you to use familiar workflows for organizing your notebooks into folders and sharing them with others."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Notebooks consist of a **linear sequence of cells**. There are four basic cell types:\n",
- "\n",
- "* **Code cells:** Input and output of live code that is run in the kernel\n",
- "* **Markdown cells:** Narrative text with embedded LaTeX equations\n",
- "* **Heading cells:** 6 levels of hierarchical organization and formatting\n",
- "* **Raw cells:** Unformatted text that is included, without modification, when notebooks are converted to different formats using nbconvert\n",
- "\n",
- "Internally, notebook documents are **[JSON](https://en.wikipedia.org/wiki/JSON) data** with **binary values [base64](http://en.wikipedia.org/wiki/Base64)** encoded. This allows them to be **read and manipulated programmatically** by any programming language. Because JSON is a text format, notebook documents are version control friendly.\n",
- "\n",
- "**Notebooks can be exported** to different static formats including HTML, reStructeredText, LaTeX, PDF, and slide shows ([reveal.js](http://lab.hakim.se/reveal-js/)) using Jupyter's `nbconvert` utility.\n",
- "\n",
- "Furthermore, any notebook document available from a **public URL on or GitHub can be shared** via [nbviewer](http://nbviewer.jupyter.org). This service loads the notebook document from the URL and renders it as a static web page. The resulting web page may thus be shared with others **without their needing to install the Jupyter Notebook**."
- ]
- }
- ],
- "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.4.0"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/docs/source/examples/Notebook/Working With Markdown Cells.ipynb b/docs/source/examples/Notebook/Working With Markdown Cells.ipynb
deleted file mode 100644
index 6e5c6221ac..0000000000
--- a/docs/source/examples/Notebook/Working With Markdown Cells.ipynb
+++ /dev/null
@@ -1,326 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# Markdown Cells"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Text can be added to Jupyter Notebooks using Markdown cells. You can change the cell type to Markdown by using the `Cell` menu, the toolbar, or the key shortcut `m`. Markdown is a popular markup language that is a superset of HTML. Its specification can be found here:\n",
- "\n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Markdown basics"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You can make text *italic* or **bold**."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You can build nested itemized or enumerated lists:\n",
- "\n",
- "* One\n",
- " - Sublist\n",
- " - This\n",
- " - Sublist\n",
- " - That\n",
- " - The other thing\n",
- "* Two\n",
- " - Sublist\n",
- "* Three\n",
- " - Sublist\n",
- "\n",
- "Now another list:\n",
- "\n",
- "1. Here we go\n",
- " 1. Sublist\n",
- " 2. Sublist\n",
- "2. There we go\n",
- "3. Now this"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You can add horizontal rules:\n",
- "\n",
- "---"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Here is a blockquote:\n",
- "\n",
- "> Beautiful is better than ugly.\n",
- "> Explicit is better than implicit.\n",
- "> Simple is better than complex.\n",
- "> Complex is better than complicated.\n",
- "> Flat is better than nested.\n",
- "> Sparse is better than dense.\n",
- "> Readability counts.\n",
- "> Special cases aren't special enough to break the rules.\n",
- "> Although practicality beats purity.\n",
- "> Errors should never pass silently.\n",
- "> Unless explicitly silenced.\n",
- "> In the face of ambiguity, refuse the temptation to guess.\n",
- "> There should be one-- and preferably only one --obvious way to do it.\n",
- "> Although that way may not be obvious at first unless you're Dutch.\n",
- "> Now is better than never.\n",
- "> Although never is often better than *right* now.\n",
- "> If the implementation is hard to explain, it's a bad idea.\n",
- "> If the implementation is easy to explain, it may be a good idea.\n",
- "> Namespaces are one honking great idea -- let's do more of those!"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "And shorthand for links:\n",
- "\n",
- "[Jupyter's website](http://jupyter.org)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Headings"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You can add headings by starting a line with one (or multiple) `#` followed by a space, as in the following example:\n",
- "\n",
- "```\n",
- "# Heading 1\n",
- "# Heading 2\n",
- "## Heading 2.1\n",
- "## Heading 2.2\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Embedded code"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You can embed code meant for illustration instead of execution in Python:\n",
- "\n",
- " def f(x):\n",
- " \"\"\"a docstring\"\"\"\n",
- " return x**2\n",
- "\n",
- "or other languages:\n",
- "\n",
- " if (i=0; i\n",
- "
\n",
- "
Header 1
\n",
- "
Header 2
\n",
- "
\n",
- "
\n",
- "
row 1, cell 1
\n",
- "
row 1, cell 2
\n",
- "
\n",
- "
\n",
- "
row 2, cell 1
\n",
- "
row 2, cell 2
\n",
- "
\n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Local files"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "If you have local files in your Notebook directory, you can refer to these files in Markdown cells directly:\n",
- "\n",
- " [subdirectory/]\n",
- "\n",
- "For example, in the images folder, we have the Python logo:\n",
- "\n",
- " \n",
- "\n",
- "\n",
- "\n",
- "and a video with the HTML5 video tag:\n",
- "\n",
- " \n",
- "\n",
- "\n",
- "\n",
- "These do not embed the data into the notebook file, and require that the files exist when you are viewing the notebook."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Security of local files"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Note that this means that the Jupyter notebook server also acts as a generic file server\n",
- "for files inside the same tree as your notebooks. Access is not granted outside the\n",
- "notebook folder so you have strict control over what files are visible, but for this\n",
- "reason it is highly recommended that you do not run the notebook server with a notebook\n",
- "directory at a high level in your filesystem (e.g. your home directory).\n",
- "\n",
- "When you run the notebook in a password-protected manner, local file access is restricted\n",
- "to authenticated users unless read-only views are active."
- ]
- }
- ],
- "metadata": {
- "anaconda-cloud": {},
- "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.6.0"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 1
-}
diff --git a/docs/source/examples/Notebook/examples_index.rst b/docs/source/examples/Notebook/examples_index.rst
deleted file mode 100644
index aa7da3ffee..0000000000
--- a/docs/source/examples/Notebook/examples_index.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-=================
-Notebook Examples
-=================
-
-The pages in this section are all converted notebook files. You can also
-`view these notebooks on nbviewer`__.
-
-__ http://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/
- docs/source/examples/Notebook/
-
-.. toctree::
- :maxdepth: 2
-
- What is the Jupyter Notebook
- Notebook Basics
- Running Code
- Working With Markdown Cells
- Custom Keyboard Shortcuts
- JavaScript Notebook Extensions
- Importing Notebooks
- Connecting with the Qt Console
- Typesetting Equations
diff --git a/docs/source/examples/Notebook/images/command_mode.png b/docs/source/examples/Notebook/images/command_mode.png
deleted file mode 100644
index 4482de3e05..0000000000
Binary files a/docs/source/examples/Notebook/images/command_mode.png and /dev/null differ
diff --git a/docs/source/examples/Notebook/images/dashboard_files_tab.png b/docs/source/examples/Notebook/images/dashboard_files_tab.png
deleted file mode 100644
index 1809d7cb67..0000000000
Binary files a/docs/source/examples/Notebook/images/dashboard_files_tab.png and /dev/null differ
diff --git a/docs/source/examples/Notebook/images/dashboard_files_tab_btns.png b/docs/source/examples/Notebook/images/dashboard_files_tab_btns.png
deleted file mode 100644
index b76af88e3c..0000000000
Binary files a/docs/source/examples/Notebook/images/dashboard_files_tab_btns.png and /dev/null differ
diff --git a/docs/source/examples/Notebook/images/dashboard_files_tab_new.png b/docs/source/examples/Notebook/images/dashboard_files_tab_new.png
deleted file mode 100644
index d0d02f894d..0000000000
Binary files a/docs/source/examples/Notebook/images/dashboard_files_tab_new.png and /dev/null differ
diff --git a/docs/source/examples/Notebook/images/dashboard_files_tab_run.png b/docs/source/examples/Notebook/images/dashboard_files_tab_run.png
deleted file mode 100644
index 65c7259f67..0000000000
Binary files a/docs/source/examples/Notebook/images/dashboard_files_tab_run.png and /dev/null differ
diff --git a/docs/source/examples/Notebook/images/dashboard_running_tab.png b/docs/source/examples/Notebook/images/dashboard_running_tab.png
deleted file mode 100644
index 54f2bd27c8..0000000000
Binary files a/docs/source/examples/Notebook/images/dashboard_running_tab.png and /dev/null differ
diff --git a/docs/source/examples/Notebook/images/edit_mode.png b/docs/source/examples/Notebook/images/edit_mode.png
deleted file mode 100644
index 9d52aaaa99..0000000000
Binary files a/docs/source/examples/Notebook/images/edit_mode.png and /dev/null differ
diff --git a/docs/source/examples/Notebook/images/menubar_toolbar.png b/docs/source/examples/Notebook/images/menubar_toolbar.png
deleted file mode 100644
index c22d960883..0000000000
Binary files a/docs/source/examples/Notebook/images/menubar_toolbar.png and /dev/null differ
diff --git a/docs/source/examples/Notebook/images/nbconvert_arch.png b/docs/source/examples/Notebook/images/nbconvert_arch.png
deleted file mode 100644
index 27cd69b79d..0000000000
Binary files a/docs/source/examples/Notebook/images/nbconvert_arch.png and /dev/null differ
diff --git a/docs/source/examples/Notebook/nbpackage/__init__.py b/docs/source/examples/Notebook/nbpackage/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/docs/source/examples/Notebook/nbpackage/mynotebook.ipynb b/docs/source/examples/Notebook/nbpackage/mynotebook.ipynb
deleted file mode 100644
index 191e181af9..0000000000
--- a/docs/source/examples/Notebook/nbpackage/mynotebook.ipynb
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# My Notebook"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "def foo():\n",
- " return \"foo\""
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "def has_ip_syntax():\n",
- " listing = !ls\n",
- " return listing"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "def whatsmyname():\n",
- " return __name__"
- ]
- }
- ],
- "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.5.1+"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/docs/source/examples/Notebook/nbpackage/nbs/__init__.py b/docs/source/examples/Notebook/nbpackage/nbs/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/docs/source/examples/Notebook/nbpackage/nbs/other.ipynb b/docs/source/examples/Notebook/nbpackage/nbs/other.ipynb
deleted file mode 100644
index 43825b8960..0000000000
--- a/docs/source/examples/Notebook/nbpackage/nbs/other.ipynb
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "### Other notebook\n",
- "\n",
- "This notebook just defines `bar`"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "def bar(x):\n",
- " return \"bar\" * x"
- ]
- }
- ],
- "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.5.1"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/docs/source/examples/images/FrontendKernel.graffle/data.plist b/docs/source/examples/images/FrontendKernel.graffle/data.plist
deleted file mode 100644
index 6179209c40..0000000000
--- a/docs/source/examples/images/FrontendKernel.graffle/data.plist
+++ /dev/null
@@ -1,461 +0,0 @@
-
-
-
-
- ActiveLayerIndex
- 0
- ApplicationVersion
-
- com.omnigroup.OmniGraffle
- 139.18.0.187838
-
- AutoAdjust
-
- BackgroundGraphic
-
- Bounds
- {{0, 0}, {576, 733}}
- Class
- SolidGraphic
- ID
- 2
- Style
-
- shadow
-
- Draws
- NO
-
- stroke
-
- Draws
- NO
-
-
-
- BaseZoom
- 0
- CanvasOrigin
- {0, 0}
- ColumnAlign
- 1
- ColumnSpacing
- 36
- CreationDate
- 2014-05-27 21:39:30 +0000
- Creator
- bgranger
- DisplayScale
- 1 0/72 in = 1.0000 in
- GraphDocumentVersion
- 8
- GraphicsList
-
-
- Class
- LineGraphic
- ControlPoints
-
- {0, 0}
- {-7, 8}
- {6.9999849080788863, -8.0000033519149838}
- {0, 0}
-
- ID
- 29
- Points
-
- {164, 341.5}
- {186.5, 338}
- {196, 327.5}
-
- Style
-
- stroke
-
- Bezier
-
- HeadArrow
- 0
- Legacy
-
- LineType
- 1
- TailArrow
- 0
-
-
-
-
- Bounds
- {{107.64779663085938, 305.5}, {69.088050842285156, 84.499992370605469}}
- Class
- ShapedGraphic
- ID
- 9
- ImageID
- 1
- Shape
- Rectangle
- Style
-
- fill
-
- Draws
- NO
-
- shadow
-
- Draws
- NO
-
- stroke
-
- Draws
- NO
-
-
-
-
- Class
- LineGraphic
- Head
-
- ID
- 6
- Position
- 0.53676468133926392
-
- ID
- 8
- Points
-
- {288.09285678056523, 276}
- {288.49999833106995, 304.50001973116196}
-
- Style
-
- stroke
-
- HeadArrow
- FilledArrow
- Legacy
-
- LineType
- 1
- TailArrow
- 0
-
-
- Tail
-
- ID
- 7
-
-
-
- Bounds
- {{207, 263}, {162, 13}}
- Class
- ShapedGraphic
- FitText
- YES
- Flow
- Resize
- ID
- 7
- Shape
- Rectangle
- Style
-
- fill
-
- Draws
- NO
-
- shadow
-
- Draws
- NO
-
- stroke
-
- Draws
- NO
-
-
- Text
-
- Pad
- 0
- Text
- {\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs20 \cf0 Interactive Computing Protocol}
- VerticalPad
- 0
-
- Wrap
- NO
-
-
- Class
- LineGraphic
- Head
-
- ID
- 1
-
- ID
- 6
- Points
-
- {252, 304.50001973116196}
- {320, 304.50001973116196}
-
- Style
-
- stroke
-
- HeadArrow
- FilledArrow
- Legacy
-
- LineType
- 1
- Pattern
- 1
- TailArrow
- FilledArrow
-
-
- Tail
-
- ID
- 5
-
-
-
- Bounds
- {{186.5, 286.5}, {65, 36}}
- Class
- ShapedGraphic
- ID
- 5
- Shape
- Rectangle
- Style
-
- shadow
-
- Draws
- NO
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs20 \cf0 Frontend}
-
-
-
- Bounds
- {{320.5, 286.5}, {65, 36}}
- Class
- ShapedGraphic
- ID
- 1
- Shape
- Rectangle
- Style
-
- shadow
-
- Draws
- NO
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 xkcd-Regular;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs20 \cf0 Kernel}
-
-
-
- GridInfo
-
- GuidesLocked
- NO
- GuidesVisible
- YES
- HPages
- 1
- ImageCounter
- 2
- ImageLinkBack
-
-
-
- ImageList
-
- image1.png
-
- KeepToScale
-
- Layers
-
-
- Lock
- NO
- Name
- Layer 1
- Print
- YES
- View
- YES
-
-
- LayoutInfo
-
- Animate
- NO
- circoMinDist
- 18
- circoSeparation
- 0.0
- layoutEngine
- dot
- neatoSeparation
- 0.0
- twopiSeparation
- 0.0
-
- LinksVisible
- NO
- MagnetsVisible
- NO
- MasterSheets
-
- ModificationDate
- 2014-05-27 22:28:18 +0000
- Modifier
- bgranger
- NotesVisible
- NO
- Orientation
- 2
- OriginVisible
- NO
- PageBreaks
- YES
- PrintInfo
-
- NSBottomMargin
-
- float
- 41
-
- NSHorizonalPagination
-
- coded
- BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG
-
- NSLeftMargin
-
- float
- 18
-
- NSPaperSize
-
- size
- {612, 792}
-
- NSPrintReverseOrientation
-
- int
- 0
-
- NSRightMargin
-
- float
- 18
-
- NSTopMargin
-
- float
- 18
-
-
- PrintOnePage
-
- ReadOnly
- NO
- RowAlign
- 1
- RowSpacing
- 36
- SheetTitle
- Canvas 1
- SmartAlignmentGuidesActive
- YES
- SmartDistanceGuidesActive
- YES
- UniqueID
- 1
- UseEntirePage
-
- VPages
- 1
- WindowInfo
-
- CurrentSheet
- 0
- ExpandedCanvases
-
-
- name
- Canvas 1
-
-
- Frame
- {{277, 7}, {832, 871}}
- ListView
-
- OutlineWidth
- 142
- RightSidebar
-
- ShowRuler
-
- Sidebar
-
- SidebarWidth
- 120
- VisibleRegion
- {{96.5, 197.5}, {348.5, 366}}
- Zoom
- 2
- ZoomValues
-
-
- Canvas 1
- 2
- 1
-
-
-
-
-
diff --git a/docs/source/examples/images/FrontendKernel.graffle/image1.png b/docs/source/examples/images/FrontendKernel.graffle/image1.png
deleted file mode 100644
index c01e3497f5..0000000000
Binary files a/docs/source/examples/images/FrontendKernel.graffle/image1.png and /dev/null differ
diff --git a/docs/source/examples/images/FrontendKernel.png b/docs/source/examples/images/FrontendKernel.png
deleted file mode 100644
index 62aa890274..0000000000
Binary files a/docs/source/examples/images/FrontendKernel.png and /dev/null differ
diff --git a/docs/source/examples/images/animation.m4v b/docs/source/examples/images/animation.m4v
deleted file mode 100644
index 13ecf88c5d..0000000000
Binary files a/docs/source/examples/images/animation.m4v and /dev/null differ
diff --git a/docs/source/examples/images/ipython_logo.png b/docs/source/examples/images/ipython_logo.png
deleted file mode 100644
index e9bdce3941..0000000000
Binary files a/docs/source/examples/images/ipython_logo.png and /dev/null differ
diff --git a/docs/source/examples/images/jupyter_logo.png b/docs/source/examples/images/jupyter_logo.png
deleted file mode 100644
index 3f3f57ff39..0000000000
Binary files a/docs/source/examples/images/jupyter_logo.png and /dev/null differ
diff --git a/docs/source/examples/images/python_logo.svg b/docs/source/examples/images/python_logo.svg
deleted file mode 100644
index 116eaac311..0000000000
--- a/docs/source/examples/images/python_logo.svg
+++ /dev/null
@@ -1,269 +0,0 @@
-
-
-
diff --git a/docs/source/examples/utils/list_pyfiles.ipy b/docs/source/examples/utils/list_pyfiles.ipy
deleted file mode 100644
index 71a9e5d75c..0000000000
--- a/docs/source/examples/utils/list_pyfiles.ipy
+++ /dev/null
@@ -1,6 +0,0 @@
-# A simple IPython script that provides Notebook links to .py files in the cwd
-
-from IPython.display import FileLink, display
-files =!ls *.py
-for f in files:
- display(FileLink(f))
\ No newline at end of file
diff --git a/docs/source/examples/utils/list_subdirs.ipy b/docs/source/examples/utils/list_subdirs.ipy
deleted file mode 100644
index a1bbb74ca9..0000000000
--- a/docs/source/examples/utils/list_subdirs.ipy
+++ /dev/null
@@ -1,7 +0,0 @@
-# A simple IPython script that lists files in all subdirs
-
-from IPython.display import FileLinks, display
-dirs =!ls -d */
-for d in dirs:
- if d != '__pycache__/':
- display(FileLinks(d))
\ No newline at end of file
diff --git a/docs/source/extending/bundler_extensions.rst b/docs/source/extending/bundler_extensions.rst
index b969709057..7b3b1fd074 100644
--- a/docs/source/extending/bundler_extensions.rst
+++ b/docs/source/extending/bundler_extensions.rst
@@ -13,7 +13,7 @@ Here are some examples of what you can implement using bundler extensions:
blog site
* Create a snapshot of the current notebook environment and bundle that
definition plus notebook into a zip download
-* Deploy a notebook as a standalone, interactive `dashboard `_
+* Deploy a notebook as a standalone, interactive `dashboard `_
To implement a bundler extension, you must do all of the following:
diff --git a/docs/source/extending/contents.rst b/docs/source/extending/contents.rst
index 61575dd92d..cd0f7f7aaf 100644
--- a/docs/source/extending/contents.rst
+++ b/docs/source/extending/contents.rst
@@ -3,7 +3,7 @@
Contents API
============
-.. currentmodule:: notebook.services.contents
+.. currentmodule:: jupyter_server.services.contents
The Jupyter Notebook web application provides a graphical interface for
creating, opening, renaming, and deleting files in a virtual filesystem.
@@ -22,7 +22,7 @@ We refer to this interface as the **Contents API**.
Data Model
----------
-.. currentmodule:: notebook.services.contents.manager
+.. currentmodule:: jupyter_server.services.contents.manager
Filesystem Entities
~~~~~~~~~~~~~~~~~~~
@@ -197,13 +197,13 @@ ContentsManager.
Customizing Checkpoints
-----------------------
-.. currentmodule:: notebook.services.contents.checkpoints
+.. currentmodule:: jupyter_server.services.contents.checkpoints
Customized Checkpoint definitions allows behavior to be
altered and extended.
The ``Checkpoints`` and ``GenericCheckpointsMixin`` classes
-(from :mod:`notebook.services.contents.checkpoints`)
+(from :mod:`jupyter_server.services.contents.checkpoints`)
have reusable code and are intended to be used together,
but require the following methods to be implemented.
@@ -250,9 +250,9 @@ for a more complete example.
Testing
-------
-.. currentmodule:: notebook.services.contents.tests
+.. currentmodule:: jupyter_server.services.contents.tests
-:mod:`notebook.services.contents.tests` includes several test suites written
+:mod:`jupyter_server.services.contents.tests` includes several test suites written
against the abstract Contents API. This means that an excellent way to test a
new ContentsManager subclass is to subclass our tests to make them use your
ContentsManager.
diff --git a/docs/source/extending/frontend_extensions.rst b/docs/source/extending/frontend_extensions.rst
deleted file mode 100644
index e40a556ba9..0000000000
--- a/docs/source/extending/frontend_extensions.rst
+++ /dev/null
@@ -1,280 +0,0 @@
-Custom front-end extensions
-===========================
-
-This describes the basic steps to write a JavaScript extension for the Jupyter
-notebook front-end. This allows you to customize the behaviour of the various
-pages like the dashboard, the notebook, or the text editor.
-
-The structure of a front-end extension
---------------------------------------
-
-.. note::
-
- The notebook front-end and Javascript API are not stable, and are subject
- to a lot of changes. Any extension written for the current notebook is
- almost guaranteed to break in the next release.
-
-.. _AMD module: https://en.wikipedia.org/wiki/Asynchronous_module_definition
-
-A front-end extension is a JavaScript file that defines an `AMD module`_
-which exposes at least a function called ``load_ipython_extension``, which
-takes no arguments. We will not get into the details of what each of these
-terms consists of yet, but here is the minimal code needed for a working
-extension:
-
-.. code:: javascript
-
- // file my_extension/main.js
-
- define(function(){
-
- function load_ipython_extension(){
- console.info('this is my first extension');
- }
-
- return {
- load_ipython_extension: load_ipython_extension
- };
- });
-
-.. note::
-
- Although for historical reasons the function is called
- ``load_ipython_extension``, it does apply to the Jupyter notebook in
- general, and will work regardless of the kernel in use.
-
-If you are familiar with JavaScript, you can use this template to require any
-Jupyter module and modify its configuration, or do anything else in client-side
-Javascript. Your extension will be loaded at the right time during the notebook
-page initialisation for you to set up a listener for the various events that
-the page can trigger.
-
-You might want access to the current instances of the various Jupyter notebook
-components on the page, as opposed to the classes defined in the modules. The
-current instances are exposed by a module named ``base/js/namespace``. If you
-plan on accessing instances on the page, you should ``require`` this module
-rather than accessing the global variable ``Jupyter``, which will be removed in
-future. The following example demonstrates how to access the current notebook
-instance:
-
-.. code:: javascript
-
- // file my_extension/main.js
-
- define([
- 'base/js/namespace'
- ], function(
- Jupyter
- ) {
- function load_ipython_extension() {
- console.log(
- 'This is the current notebook application instance:',
- Jupyter.notebook
- );
- }
-
- return {
- load_ipython_extension: load_ipython_extension
- };
- });
-
-
-Modifying key bindings
-----------------------
-
-One of the abilities of extensions is to modify key bindings, although once
-again this is an API which is not guaranteed to be stable. However, custom key
-bindings are frequently requested, and are helpful to increase accessibility,
-so in the following we show how to access them.
-
-Here is an example of an extension that will unbind the shortcut ``0,0`` in
-command mode, which normally restarts the kernel, and bind ``0,0,0`` in its
-place:
-
-.. code:: javascript
-
- // file my_extension/main.js
-
- define([
- 'base/js/namespace'
- ], function(
- Jupyter
- ) {
-
- function load_ipython_extension() {
- Jupyter.keyboard_manager.command_shortcuts.remove_shortcut('0,0');
- Jupyter.keyboard_manager.command_shortcuts.add_shortcut('0,0,0', 'jupyter-notebook:restart-kernel');
- }
-
- return {
- load_ipython_extension: load_ipython_extension
- };
- });
-
-.. note::
-
- The standard keybindings might not work correctly on non-US keyboards.
- Unfortunately, this is a limitation of browser implementations and the
- status of keyboard event handling on the web in general. We appreciate your
- feedback if you have issues binding keys, or have any ideas to help improve
- the situation.
-
-You can see that I have used the **action name**
-``jupyter-notebook:restart-kernel`` to bind the new shortcut. There is no API
-yet to access the list of all available *actions*, though the following in the
-JavaScript console of your browser on a notebook page should give you an idea
-of what is available:
-
-.. code:: javascript
-
- Object.keys(require('base/js/namespace').actions._actions);
-
-In this example, we changed a keyboard shortcut in **command mode**; you
-can also customize keyboard shortcuts in **edit mode**.
-However, most of the keyboard shortcuts in edit mode are handled by CodeMirror,
-which supports custom key bindings via a completely different API.
-
-
-Defining and registering your own actions
------------------------------------------
-
-As part of your front-end extension, you may wish to define actions, which can
-be attached to toolbar buttons, or called from the command palette. Here is an
-example of an extension that defines an (not very useful!) action to show an
-alert, and adds a toolabr button using the full action name:
-
-.. code:: javascript
-
- // file my_extension/main.js
-
- define([
- 'base/js/namespace'
- ], function(
- Jupyter
- ) {
- function load_ipython_extension() {
-
- var handler = function () {
- alert('this is an alert from my_extension!');
- };
-
- var action = {
- icon: 'fa-comment-o', // a font-awesome class used on buttons, etc
- help : 'Show an alert',
- help_index : 'zz',
- handler : handler
- };
- var prefix = 'my_extension';
- var action_name = 'show-alert';
-
- var full_action_name = Jupyter.actions.register(action, action_name, prefix); // returns 'my_extension:show-alert'
- Jupyter.toolbar.add_buttons_group([full_action_name]);
- }
-
- return {
- load_ipython_extension: load_ipython_extension
- };
- });
-
-Every action needs a name, which, when joined with its prefix to make the full
-action name, should be unique. Built-in actions, like the
-``jupyter-notebook:restart-kernel`` we bound in the earlier
-`Modifying key bindings`_ example, use the prefix ``jupyter-notebook``. For
-actions defined in an extension, it makes sense to use the extension name as
-the prefix. For the action name, the following guidelines should be considered:
-
-.. adapted from notebook/static/notebook/js/actions.js
-
-* First pick a noun and a verb for the action. For example, if the action is
- "restart kernel," the verb is "restart" and the noun is "kernel".
-* Omit terms like "selected" and "active" by default, so "delete-cell", rather
- than "delete-selected-cell". Only provide a scope like "-all-" if it is other
- than the default "selected" or "active" scope.
-* If an action has a secondary action, separate the secondary action with
- "-and-", so "restart-kernel-and-clear-output".
-* Use above/below or previous/next to indicate spatial and sequential
- relationships.
-* Don't ever use before/after as they have a temporal connotation that is
- confusing when used in a spatial context.
-* For dialogs, use a verb that indicates what the dialog will accomplish, such
- as "confirm-restart-kernel".
-
-
-Installing and enabling extensions
-----------------------------------
-
-You can install your nbextension with the command::
-
- jupyter nbextension install path/to/my_extension/ [--user|--sys-prefix]
-
-The default installation is system-wide. You can use ``--user`` to do a
-per-user installation, or ``--sys-prefix`` to install to Python's prefix (e.g.
-in a virtual or conda environment). Where my_extension is the directory
-containing the Javascript files. This will copy it to a Jupyter data directory
-(the exact location is platform dependent - see :ref:`jupyter_path`).
-
-For development, you can use the ``--symlink`` flag to symlink your extension
-rather than copying it, so there's no need to reinstall after changes.
-
-To use your extension, you'll also need to **enable** it, which tells the
-notebook interface to load it. You can do that with another command::
-
- jupyter nbextension enable my_extension/main [--sys-prefix][--section='common']
-
-The argument refers to the Javascript module containing your
-``load_ipython_extension`` function, which is ``my_extension/main.js`` in this
-example. The ``--section='common'`` argument will affect all pages, by default
-it will be loaded on the notebook view only.
-There is a corresponding ``disable`` command to stop using an
-extension without uninstalling it.
-
-.. versionchanged:: 4.2
-
- Added ``--sys-prefix`` argument
-
-
-Kernel Specific extensions
---------------------------
-
-.. warning::
-
- This feature serves as a stopgap for kernel developers who need specific
- JavaScript injected onto the page. The availability and API are subject to
- change at anytime.
-
-
-It is possible to load some JavaScript on the page on a per kernel basis. Be
-aware that doing so will make the browser page reload without warning as
-soon as the user switches the kernel without notice.
-
-If you, a kernel developer, need a particular piece of JavaScript to be loaded
-on a "per kernel" basis, such as:
-
-* if you are developing a CodeMirror mode for your language
-* if you need to enable some specific debugging options
-
-your ``kernelspecs`` are allowed to contain a ``kernel.js`` file that defines
-an AMD module. The AMD module should define an `onload` function that will be
-called when the kernelspec loads, such as:
-
-* when you load a notebook that uses your kernelspec
-* change the active kernelspec of a notebook to your kernelspec.
-
-Note that adding a `kernel.js` to your kernelspec will add an unexpected side
-effect to changing a kernel in the notebook. As it is impossible to "unload"
-JavaScript, any attempt to change the kernelspec again will save the current
-notebook and reload the page without confirmations.
-
-Here is an example of ``kernel.js``:
-
-.. code:: javascript
-
- define(function(){
- return {onload: function(){
- console.info('Kernel specific javascript loaded');
-
- // do more things here, like define a codemirror mode
-
- }}
-
- });
diff --git a/docs/source/extending/handlers.rst b/docs/source/extending/handlers.rst
index f3bf87f270..1287ef7e27 100644
--- a/docs/source/extending/handlers.rst
+++ b/docs/source/extending/handlers.rst
@@ -124,4 +124,4 @@ following:
References:
-1. `Peter Parente's Mindtrove `__
+1. `Peter Parente's Mindtrove `__
diff --git a/docs/source/extending/index.rst b/docs/source/extending/index.rst
index 4298132e4d..552890d079 100644
--- a/docs/source/extending/index.rst
+++ b/docs/source/extending/index.rst
@@ -12,6 +12,4 @@ override the notebook's defaults with your own custom behavior.
contents
savehooks
handlers
- frontend_extensions
- keymaps
bundler_extensions
diff --git a/docs/source/extending/keymaps.rst b/docs/source/extending/keymaps.rst
deleted file mode 100644
index 861d344bf8..0000000000
--- a/docs/source/extending/keymaps.rst
+++ /dev/null
@@ -1,90 +0,0 @@
-Customize keymaps
-=================
-
-.. note::
-
- Declarative Custom Keymaps is a provisional feature with unstable API
- which is not guaranteed to be kept in future versions of the notebook,
- and can be removed or changed without warnings.
-
-The notebook shortcuts that are defined by jupyter both in edit mode and command
-mode are configurable in the frontend configuration file
-``~/.jupyter/serverconfig/notebook.json``. The modification of Keyboard shortcut
-suffer of several limitations, mainly that your Browser and OS might prevent
-certain shortcut to work correctly. If this is the case, there are
-unfortunately not much than can be done. The second issue can arise with
-keyboard that have a layout different than US English. Again even if we are
-aware of the issue, there is not much we can do about that.
-
-Shortcut are also limited by the underlying library that handle code and text
-edition: CodeMirror. If some Keyboard shortcuts are conflicting, the method
-describe below might not work to create new keyboard shortcuts, especially in
-the ``edit`` mode of the notebook.
-
-
-The 4 sections of interest in ``~/.jupyter/serverconfig/notebook.json`` are the
-following:
-
- - ``keys.command.unbind``
- - ``keys.edit.unbind``
- - ``keys.command.bind``
- - ``keys.edit.bind``
-
-The first two section describe which default keyboard shortcut not to register
-at notebook startup time. These are mostly useful if you need to ``unbind`` a
-default keyboard shortcut before binding it to a new ``command``.
-
-These two first sections apply respectively to the ``command`` and ``edit``
-mode of the notebook. They take a list of shortcut to ``unbind``.
-
-For example, to unbind the shortcut to split a cell at the position of the
-cursor (``Ctrl-Shift-Minus``)use the following:
-
-.. code:: javascript
-
- // file ~/.jupyter/serverconfig/notebook.json
-
- {
- "keys": {
- "edit": {
- "unbind": [
- "Ctrl-Shift-Minus"
- ]
- },
- },
- }
-
-
-
-
-The last two section describe which new keyboard shortcut to register
-at notebook startup time, and which actions they trigger.
-
-These two last sections apply respectively to the ``command`` and ``edit``
-mode of the notebook. They take a dictionary with shortcuts as ``keys`` and
-``commands`` name as value.
-
-For example, to bind the shortcut ``G,G,G`` (Press G three time in a row) in
-command mode, to the command that restart the kernel and run all cells, use the
-following:
-
-
-.. code:: javascript
-
- // file ~/.jupyter/serverconfig/notebook.json
-
- {
- "keys": {
- "command": {
- "bind": {
- "G,G,G":"jupyter-notebook:restart-kernel-and-run-all-cells"
- }
- }
- },
- }
-
-
-
-
-The name of the available ``commands`` can be find by hovering the right end of
-a row in the command palette.
diff --git a/docs/source/frontend_config.rst b/docs/source/frontend_config.rst
deleted file mode 100644
index be3699ffd2..0000000000
--- a/docs/source/frontend_config.rst
+++ /dev/null
@@ -1,79 +0,0 @@
-.. _frontend_config:
-
-Configuring the notebook frontend
-=================================
-
-.. note::
-
- The ability to configure the notebook frontend UI and preferences is
- still a work in progress.
-
-This document is a rough explanation on how you can persist some configuration
-options for the notebook JavaScript.
-
-There is no exhaustive list of all the configuration options as most options
-are passed down to other libraries, which means that non valid
-configuration can be ignored without any error messages.
-
-
-How front end configuration works
----------------------------------
-The frontend configuration system works as follows:
-
- - get a handle of a configurable JavaScript object.
- - access its configuration attribute.
- - update its configuration attribute with a JSON patch.
-
-
-Example - Changing the notebook's default indentation
------------------------------------------------------
-This example explains how to change the default setting ``indentUnit``
-for CodeMirror Code Cells::
-
- var cell = Jupyter.notebook.get_selected_cell();
- var config = cell.config;
- var patch = {
- CodeCell:{
- cm_config:{indentUnit:2}
- }
- }
- config.update(patch)
-
-You can enter the previous snippet in your browser's JavaScript console once.
-Then reload the notebook page in your browser. Now, the preferred indent unit
-should be equal to two spaces. The custom setting persists and you do not need
-to reissue the patch on new notebooks.
-
-``indentUnit``, used in this example, is one of the many `CodeMirror options
-`_ which are available
-for configuration.
-
-
-Example - Restoring the notebook's default indentation
-------------------------------------------------------
-If you want to restore a notebook frontend preference to its default value,
-you will enter a JSON patch with a ``null`` value for the preference setting.
-
-For example, let's restore the indent setting ``indentUnit`` to its default of
-four spaces. Enter the following code snippet in your JavaScript console::
-
- var cell = Jupyter.notebook.get_selected_cell();
- var config = cell.config;
- var patch = {
- CodeCell:{
- cm_config:{indentUnit: null} // only change here.
- }
- }
- config.update(patch)
-
-Reload the notebook in your browser and the default indent should again be two
-spaces.
-
-Persisting configuration settings
----------------------------------
-Under the hood, Jupyter will persist the preferred configuration settings in
-``~/.jupyter/nbconfig/.json``, with ````
-taking various value depending on the page where the configuration is issued.
-```` can take various values like ``notebook``, ``tree``, and
-``editor``. A ``common`` section contains configuration settings shared by all
-pages.
diff --git a/docs/source/frontends.rst b/docs/source/frontends.rst
new file mode 100644
index 0000000000..42e1703e8b
--- /dev/null
+++ b/docs/source/frontends.rst
@@ -0,0 +1,133 @@
+Creating a Jupyter Server Frontend
+==================================
+
+Jupyter Server does not come with a frontend out-of-the-box; instead, a frontend is installed separately and loaded as a server extension. This page demonstrates the best way to write a Jupyter Server frontend from scratch.
+
+.. note:: This documentation is written for experienced developers.
+
+
+.. _frontend:
+
+Writing a frontend application
+------------------------------
+
+Jupyter Server provides two key classes for writing a server frontend:
+
+ - ``ExtensionApp``
+ - ``ExtensionHandler``
+
+The ExtensionApp:
+
+ - can have traits.
+ - is configurable (from file or CLI)
+ - creates a namespace for the frontend's static files under ``/static//``.
+ - loads itself as a server extension beside other Jupyter frontends and extensions.
+ - provides a command-line interface to launch the frontend extension directly (starting a server along the way).
+
+To create a new Jupyter frontend application, subclass the ``ExtensionApp`` like the example below:
+
+.. code-block:: python
+
+ from jupyter_server.extension import ExtensionApp
+
+
+ class MyFrontend(ExtensionApp):
+
+ # -------------- Required traits --------------
+ name = 'myfrontend'
+ default_url = 'myfrontend'
+ load_other_extensions = True
+
+ # --- ExtensionApp traits you can configure ---
+ static_paths = [...]
+ template_paths = [...]
+ settings = {...}
+ handlers = [...]
+
+ # ----------- add custom traits below ---------
+ ...
+
+ def initialize_settings(self):
+ ...
+ # Update the self.settings trait to pass extra
+ # settings to the underlying Tornado Web Application.
+ self.settings.update({'':...})
+
+ def initialize_handlers(self):
+ ...
+ # Extend the self.handlers trait
+ self.handlers.extend(...)
+
+ def initialize_templates(self):
+ ...
+ # Change the jinja templating environment
+ self.settings.update({'myfrontend_jinja2_env': ...})
+
+The ``ExtensionApp`` uses the following methods and properties to connect your frontend to the Jupyter server. Overwrite these pieces to add your custom settings, handlers and templates:
+
+Methods
+
+* ``initialize_setting()``: adds custom settings to the Tornado Web Application.
+* ``initialize_handlers()``: appends handlers to the Tornado Web Application.
+* ``initialize_templates()``: initialize the templating engine (e.g. jinja2) for your frontend.
+
+Properties
+
+* ``name``: the name of the extension
+* ``default_url``: the url that your extension will serve its homepage.
+* ``load_other_extensions``: should your extension expose other server extensions when launched directly?
+
+
+Writing frontend handlers
+-------------------------
+
+To write handlers for an ``ExtensionApp``, use the ``ExtensionHandler`` class. This class routes Tornado's ``static_url`` attribute to the ``/static//`` namespace where your frontend's static files will be served.
+
+.. code-block:: python
+
+ from jupyter_server.extension import ExtensionHandler
+
+ class MyFrontendHandler(ExtensionHandler):
+
+ urls = ['/myfrontend/hello']
+
+ def get(self):
+ ...
+
+ def post(self):
+ ...
+
+ExtensionHandler comes with the following properties:
+
+* ``config``: the ExtensionApp's config object.
+* ``server_config``: the ServerApp's config object.
+* ``extension_name``: the name of the extension to which this handler is linked.
+* ``static_url()``: a method for getting the url to static files (prefixed with ``/static/``).
+
+Launching the application
+-------------------------
+
+To launch the application, simply call the ``ExtensionApp``'s ``launch_instance`` method.
+
+.. code-block:: python
+
+ main = MyFrontend.launch_instance
+ main()
+
+
+To make your frontend executable from anywhere on your system, added this method as an entry-point in your application's ``setup.py``:
+
+.. code-block:: python
+
+ from setuptools import setup
+
+
+ setup(
+ name='myfrontend',
+ ...
+ entry_points={
+ 'console_scripts': [
+ 'jupyter-myfrontend = myfrontend.app:main'
+ ]
+ }
+ )
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 8cebec57e7..69549c0fbf 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -2,42 +2,43 @@
Jupyter Server (Developer Preview)
==================================
-* `Installation `_
-* `Starting the Notebook `_
+Jupyter Server is a fork of the `Jupyter Notebook`_'s Tornado_ Server. It provides all the core services, APIs and `REST endpoints`_ from the classic Notebook Server without the Jupyter Notebook (Javascript) frontend. In fact, the Jupyter Server provides no frontend out-of-the-box; rather, it exposes `hooks `_ for Jupyter frontend creators to register their frontends with the Server.
+
+Before the Jupyter Server project, the `Jupyter Notebook`_ was the only first-class frontend to the Tornado Server. As a consequence, other Jupyter frontends had to include Jupyter Notebook (and all of its Javascript code) as a dependency. The Jupyter Server project views all frontends—including the `Jupyter Notebook`_—as equal and separate .
+
+.. _Tornado: https://www.tornadoweb.org/en/stable/
+.. _Jupyter Notebook: https://github.com/jupyter/notebook
+.. _REST endpoints: http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/notebook/master/notebook/services/api/api.yaml
+
+Installation
+------------
+
+To install the latest release of ``jupyter_server``, use *pip*:
+
+.. code-block:: bash
+
+ pip install jupyter_server
+
.. toctree::
:maxdepth: 1
- :caption: User Documentation
+ :caption: Table of Contents
- notebook
- ui_components
- examples/Notebook/examples_index.rst
- troubleshooting
+ frontends
changelog
- comms
.. toctree::
:maxdepth: 1
:caption: Configuration
config_overview
- config
+ config.rst
public_server
security
- frontend_config
- examples/Notebook/Distributing Jupyter Extensions as Python Packages
extending/index.rst
.. toctree::
:maxdepth: 1
:caption: Contributor Documentation
- contributing
- development_release
- development_faq
-
-.. toctree::
- :hidden:
-
- examples/Notebook/nbpackage/mynotebook.ipynb
- examples/Notebook/nbpackage/nbs/other.ipynb
+ contributing
\ No newline at end of file
diff --git a/docs/source/ipython_security.asc b/docs/source/ipython_security.asc
deleted file mode 100644
index 95436812a4..0000000000
--- a/docs/source/ipython_security.asc
+++ /dev/null
@@ -1,52 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v2.0.22 (GNU/Linux)
-
-mQINBFMx2LoBEAC9xU8JiKI1VlCJ4PT9zqhU5nChQZ06/bj1BBftiMJG07fdGVO0
-ibOn4TrCoRYaeRlet0UpHzxT4zDa5h3/usJaJNTSRwtWePw2o7Lik8J+F3LionRf
-8Jz81WpJ+81Klg4UWKErXjBHsu/50aoQm6ZNYG4S2nwOmMVEC4nc44IAA0bb+6kW
-saFKKzEDsASGyuvyutdyUHiCfvvh5GOC2h9mXYvl4FaMW7K+d2UgCYERcXDNy7C1
-Bw+uepQ9ELKdG4ZpvonO6BNr1BWLln3wk93AQfD5qhfsYRJIyj0hJlaRLtBU3i6c
-xs+gQNF4mPmybpPSGuOyUr4FYC7NfoG7IUMLj+DYa6d8LcMJO+9px4IbdhQvzGtC
-qz5av1TX7/+gnS4L8C9i1g8xgI+MtvogngPmPY4repOlK6y3l/WtxUPkGkyYkn3s
-RzYyE/GJgTwuxFXzMQs91s+/iELFQq/QwmEJf+g/QYfSAuM+lVGajEDNBYVAQkxf
-gau4s8Gm0GzTZmINilk+7TxpXtKbFc/Yr4A/fMIHmaQ7KmJB84zKwONsQdVv7Jjj
-0dpwu8EIQdHxX3k7/Q+KKubEivgoSkVwuoQTG15X9xrOsDZNwfOVQh+JKazPvJtd
-SNfep96r9t/8gnXv9JI95CGCQ8lNhXBUSBM3BDPTbudc4b6lFUyMXN0mKQARAQAB
-tCxJUHl0aG9uIFNlY3VyaXR5IFRlYW0gPHNlY3VyaXR5QGlweXRob24ub3JnPokC
-OAQTAQIAIgUCUzHYugIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEwJc
-LcmZYkjuXg//R/t6nMNQmf9W1h52IVfUbRAVmvZ5d063hQHKV2dssxtnA2dRm/x5
-JZu8Wz7ZrEZpyqwRJO14sxN1/lC3v+zs9XzYXr2lBTZuKCPIBypYVGIynCuWJBQJ
-rWnfG4+u1RHahnjqlTWTY1C/le6v7SjAvCb6GbdA6k4ZL2EJjQlRaHDmzw3rV/+l
-LLx6/tYzIsotuflm/bFumyOMmpQQpJjnCkWIVjnRICZvuAn97jLgtTI0+0Rzf4Zb
-k2BwmHwDRqWCTTcRI9QvTl8AzjW+dNImN22TpGOBPfYj8BCZ9twrpKUbf+jNqJ1K
-THQzFtpdJ6SzqiFVm74xW4TKqCLkbCQ/HtVjTGMGGz/y7KTtaLpGutQ6XE8SSy6P
-EffSb5u+kKlQOWaH7Mc3B0yAojz6T3j5RSI8ts6pFi6pZhDg9hBfPK2dT0v/7Mkv
-E1Z7q2IdjZnhhtGWjDAMtDDn2NbY2wuGoa5jAWAR0WvIbEZ3kOxuLE5/ZOG1FyYm
-noJRliBz7038nT92EoD5g1pdzuxgXtGCpYyyjRZwaLmmi4CvA+oThKmnqWNY5lyY
-ricdNHDiyEXK0YafJL1oZgM86MSb0jKJMp5U11nUkUGzkroFfpGDmzBwAzEPgeiF
-40+qgsKB9lqwb3G7PxvfSi3XwxfXgpm1cTyEaPSzsVzve3d1xeqb7Yq5Ag0EUzHY
-ugEQALQ5FtLdNoxTxMsgvrRr1ejLiUeRNUfXtN1TYttOfvAhfBVnszjtkpIW8DCB
-JF/bA7ETiH8OYYn/Fm6MPI5H64IHEncpzxjf57jgpXd9CA9U2OMk/P1nve5zYchP
-QmP2fJxeAWr0aRH0Mse5JS5nCkh8Xv4nAjsBYeLTJEVOb1gPQFXOiFcVp3gaKAzX
-GWOZ/mtG/uaNsabH/3TkcQQEgJefd11DWgMB7575GU+eME7c6hn3FPITA5TC5HUX
-azvjv/PsWGTTVAJluJ3fUDvhpbGwYOh1uV0rB68lPpqVIro18IIJhNDnccM/xqko
-4fpJdokdg4L1wih+B04OEXnwgjWG8OIphR/oL/+M37VV2U7Om/GE6LGefaYccC9c
-tIaacRQJmZpG/8RsimFIY2wJ07z8xYBITmhMmOt0bLBv0mU0ym5KH9Dnru1m9QDO
-AHwcKrDgL85f9MCn+YYw0d1lYxjOXjf+moaeW3izXCJ5brM+MqVtixY6aos3YO29
-J7SzQ4aEDv3h/oKdDfZny21jcVPQxGDui8sqaZCi8usCcyqWsKvFHcr6vkwaufcm
-3Knr2HKVotOUF5CDZybopIz1sJvY/5Dx9yfRmtivJtglrxoDKsLi1rQTlEQcFhCS
-ACjf7txLtv03vWHxmp4YKQFkkOlbyhIcvfPVLTvqGerdT2FHABEBAAGJAh8EGAEC
-AAkFAlMx2LoCGwwACgkQEwJcLcmZYkgK0BAAny0YUugpZldiHzYNf8I6p2OpiDWv
-ZHaguTTPg2LJSKaTd+5UHZwRFIWjcSiFu+qTGLNtZAdcr0D5f991CPvyDSLYgOwb
-Jm2p3GM2KxfECWzFbB/n/PjbZ5iky3+5sPlOdBR4TkfG4fcu5GwUgCkVe5u3USAk
-C6W5lpeaspDz39HAPRSIOFEX70+xV+6FZ17B7nixFGN+giTpGYOEdGFxtUNmHmf+
-waJoPECyImDwJvmlMTeP9jfahlB6Pzaxt6TBZYHetI/JR9FU69EmA+XfCSGt5S+0
-Eoc330gpsSzo2VlxwRCVNrcuKmG7PsFFANok05ssFq1/Djv5rJ++3lYb88b8HSP2
-3pQJPrM7cQNU8iPku9yLXkY5qsoZOH+3yAia554Dgc8WBhp6fWh58R0dIONQxbbo
-apNdwvlI8hKFB7TiUL6PNShE1yL+XD201iNkGAJXbLMIC1ImGLirUfU267A3Cop5
-hoGs179HGBcyj/sKA3uUIFdNtP+NndaP3v4iYhCitdVCvBJMm6K3tW88qkyRGzOk
-4PW422oyWKwbAPeMk5PubvEFuFAIoBAFn1zecrcOg85RzRnEeXaiemmmH8GOe1Xu
-Kh+7h8XXyG6RPFy8tCcLOTk+miTqX+4VWy+kVqoS2cQ5IV8WsJ3S7aeIy0H89Z8n
-5vmLc+Ibz+eT+rM=
-=XVDe
------END PGP PUBLIC KEY BLOCK-----
diff --git a/docs/source/links.txt b/docs/source/links.txt
deleted file mode 100644
index 0306b047fb..0000000000
--- a/docs/source/links.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-.. This (-*- rst -*-) format file contains commonly used link targets
- and name substitutions. It may be included in many files,
- therefore it should only contain link targets and name
- substitutions. Try grepping for "^\.\. _" to find plausible
- candidates for this list.
-
- NOTE: this file must have an extension *opposite* to that of the main reST
- files in the manuals, so that we can include it with ".. include::"
- directives, but without triggering warnings from Sphinx for not being listed
- in any toctree. Since IPython uses .txt for the main files, this one will
- use .rst.
-
- NOTE: reST targets are
- __not_case_sensitive__, so only one target definition is needed for
- ipython, IPython, etc.
-
- NOTE: Some of these were taken from the nipy links compendium.
-
-.. Main Jupyter notebook links
-
-.. _Notebook Basics: notebook_p2_
-.. _notebook_p2: https://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Notebook%20Basics.ipynb
-
-.. _Running Code in the Jupyter Notebook: notebook_p1_
-.. _notebook_p1: https://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Running%20Code.ipynb
-
-.. Other python projects
-.. _matplotlib: https://matplotlib.org
-.. _nbviewer: https://nbviewer.jupyter.org
-.. _nbconvert: https://nbconvert.readthedocs.io/en/latest/
-
-.. Other tools and projects
-.. _Markdown: https://daringfireball.net/projects/markdown/syntax
-
-.. _Rich Output: notebook_p5_
-.. _notebook_p5: https://nbviewer.jupyter.org/github/ipython/ipython/blob/master/examples/IPython%20Kernel/Rich%20Output.ipynb
-
-.. _Plotting with Matplotlib: notebook_p3_
-.. _notebook_p3: https://nbviewer.jupyter.org/github/ipython/ipython/blob/master/examples/IPython%20Kernel/Plotting%20in%20the%20Notebook.ipynb
-
-.. _Working with Markdown Cells: https://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Working%20With%20Markdown%20Cells.ipynb
diff --git a/docs/source/notebook.rst b/docs/source/notebook.rst
deleted file mode 100644
index fdfa1182d8..0000000000
--- a/docs/source/notebook.rst
+++ /dev/null
@@ -1,419 +0,0 @@
-.. _htmlnotebook:
-
-The Jupyter Notebook
-====================
-
-Introduction
-------------
-
-The notebook extends the console-based approach to interactive computing in
-a qualitatively new direction, providing a web-based application suitable for
-capturing the whole computation process: developing, documenting, and
-executing code, as well as communicating the results. The Jupyter notebook
-combines two components:
-
-**A web application**: a browser-based tool for interactive authoring of
-documents which combine explanatory text, mathematics, computations and their
-rich media output.
-
-**Notebook documents**: a representation of all content visible in the web
-application, including inputs and outputs of the computations, explanatory
-text, mathematics, images, and rich media representations of objects.
-
-.. seealso::
-
- See the :ref:`installation guide ` on how to install the
- notebook and its dependencies.
-
-
-Main features of the web application
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-* In-browser editing for code, with automatic syntax highlighting,
- indentation, and tab completion/introspection.
-
-* The ability to execute code from the browser, with the results of
- computations attached to the code which generated them.
-
-* Displaying the result of computation using rich media representations, such
- as HTML, LaTeX, PNG, SVG, etc. For example, publication-quality figures
- rendered by the matplotlib_ library, can be included inline.
-
-* In-browser editing for rich text using the Markdown_ markup language, which
- can provide commentary for the code, is not limited to plain text.
-
-* The ability to easily include mathematical notation within markdown cells
- using LaTeX, and rendered natively by MathJax_.
-
-
-
-.. _MathJax: https://www.mathjax.org/
-
-
-Notebook documents
-~~~~~~~~~~~~~~~~~~
-Notebook documents contains the inputs and outputs of a interactive session as
-well as additional text that accompanies the code but is not meant for
-execution. In this way, notebook files can serve as a complete computational
-record of a session, interleaving executable code with explanatory text,
-mathematics, and rich representations of resulting objects. These documents
-are internally JSON_ files and are saved with the ``.ipynb`` extension. Since
-JSON is a plain text format, they can be version-controlled and shared with
-colleagues.
-
-.. _JSON: https://en.wikipedia.org/wiki/JSON
-
-Notebooks may be exported to a range of static formats, including HTML (for
-example, for blog posts), reStructuredText, LaTeX, PDF, and slide shows, via
-the nbconvert_ command.
-
-Furthermore, any ``.ipynb`` notebook document available from a public
-URL can be shared via the `Jupyter Notebook Viewer `_ (nbviewer_).
-This service loads the notebook document from the URL and renders it as a
-static web page. The results may thus be shared with a colleague, or as a
-public blog post, without other users needing to install the Jupyter notebook
-themselves. In effect, nbviewer_ is simply nbconvert_ as
-a web service, so you can do your own static conversions with nbconvert,
-without relying on nbviewer.
-
-
-
-.. seealso::
-
- :ref:`Details on the notebook JSON file format `
-
-
-Notebooks and privacy
-~~~~~~~~~~~~~~~~~~~~~
-
-Because you use Jupyter in a web browser, some people are understandably
-concerned about using it with sensitive data.
-However, if you followed the standard
-`install instructions `_,
-Jupyter is actually running on your own computer.
-If the URL in the address bar starts with ``http://localhost:`` or
-``http://127.0.0.1:``, it's your computer acting as the server.
-Jupyter doesn't send your data anywhere else—and as it's open source,
-other people can check that we're being honest about this.
-
-You can also use Jupyter remotely:
-your company or university might run the server for you, for instance.
-If you want to work with sensitive data in those cases,
-talk to your IT or data protection staff about it.
-
-We aim to ensure that other pages in your browser or other users on the same
-computer can't access your notebook server. See :ref:`server_security` for
-more about this.
-
-
-Starting the notebook server
-----------------------------
-
-You can start running a notebook server from the command line using the
-following command::
-
- jupyter notebook
-
-This will print some information about the notebook server in your console,
-and open a web browser to the URL of the web application (by default,
-``http://127.0.0.1:8888``).
-
-The landing page of the Jupyter notebook web application, the **dashboard**,
-shows the notebooks currently available in the notebook directory (by default,
-the directory from which the notebook server was started).
-
-You can create new notebooks from the dashboard with the ``New Notebook``
-button, or open existing ones by clicking on their name. You can also drag
-and drop ``.ipynb`` notebooks and standard ``.py`` Python source code files
-into the notebook list area.
-
-When starting a notebook server from the command line, you can also open a
-particular notebook directly, bypassing the dashboard, with ``jupyter notebook
-my_notebook.ipynb``. The ``.ipynb`` extension is assumed if no extension is
-given.
-
-When you are inside an open notebook, the `File | Open...` menu option will
-open the dashboard in a new browser tab, to allow you to open another notebook
-from the notebook directory or to create a new notebook.
-
-
-.. note::
-
- You can start more than one notebook server at the same time, if you want
- to work on notebooks in different directories. By default the first
- notebook server starts on port 8888, and later notebook servers search for
- ports near that one. You can also manually specify the port with the
- ``--port`` option.
-
-Creating a new notebook document
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-A new notebook may be created at any time, either from the dashboard, or using
-the :menuselection:`File --> New` menu option from within an active notebook.
-The new notebook is created within the same directory and will open in a new
-browser tab. It will also be reflected as a new entry in the notebook list on
-the dashboard.
-
-.. image:: _static/images/new-notebook.gif
-
-
-Opening notebooks
-~~~~~~~~~~~~~~~~~
-An open notebook has **exactly one** interactive session connected to a
-kernel, which will execute code sent by the user
-and communicate back results. This kernel remains active if the web browser
-window is closed, and reopening the same notebook from the dashboard will
-reconnect the web application to the same kernel. In the dashboard, notebooks
-with an active kernel have a ``Shutdown`` button next to them, whereas
-notebooks without an active kernel have a ``Delete`` button in its place.
-
-Other clients may connect to the same kernel.
-When each kernel is started, the notebook server prints to the terminal a
-message like this::
-
- [NotebookApp] Kernel started: 87f7d2c0-13e3-43df-8bb8-1bd37aaf3373
-
-This long string is the kernel's ID which is sufficient for getting the
-information necessary to connect to the kernel. If the notebook uses the IPython
-kernel, you can also see this
-connection data by running the ``%connect_info`` :ref:`magic
-`, which will print the same ID information along with other
-details.
-
-You can then, for example, manually start a Qt console connected to the *same*
-kernel from the command line, by passing a portion of the ID::
-
- $ jupyter qtconsole --existing 87f7d2c0
-
-Without an ID, ``--existing`` will connect to the most recently
-started kernel.
-
-With the IPython kernel, you can also run the ``%qtconsole``
-:ref:`magic ` in the notebook to open a Qt console connected
-to the same kernel.
-
-.. seealso::
-
- :ref:`ipythonzmq`
-
-Notebook user interface
------------------------
-
-When you create a new notebook document, you will be presented with the
-**notebook name**, a **menu bar**, a **toolbar** and an empty **code cell**.
-
-.. image:: ./_static/images/blank-notebook-ui.png
-
-**Notebook name**: The name displayed at the top of the page,
-next to the Jupyter logo, reflects the name of the ``.ipynb`` file.
-Clicking on the notebook name brings up a dialog which allows you to rename it.
-Thus, renaming a notebook
-from "Untitled0" to "My first notebook" in the browser, renames the
-``Untitled0.ipynb`` file to ``My first notebook.ipynb``.
-
-**Menu bar**: The menu bar presents different options that may be used to
-manipulate the way the notebook functions.
-
-**Toolbar**: The tool bar gives a quick way of performing the most-used
-operations within the notebook, by clicking on an icon.
-
-**Code cell**: the default type of cell; read on for an explanation of cells.
-
-
-Structure of a notebook document
---------------------------------
-
-The notebook consists of a sequence of cells. A cell is a multiline text input
-field, and its contents can be executed by using :kbd:`Shift-Enter`, or by
-clicking either the "Play" button the toolbar, or :guilabel:`Cell`, :guilabel:`Run` in the menu bar.
-The execution behavior of a cell is determined by the cell's type. There are three
-types of cells: **code cells**, **markdown cells**, and **raw cells**. Every
-cell starts off being a **code cell**, but its type can be changed by using a
-drop-down on the toolbar (which will be "Code", initially), or via
-:ref:`keyboard shortcuts `.
-
-For more information on the different things you can do in a notebook,
-see the `collection of examples
-`_.
-
-Code cells
-~~~~~~~~~~
-A *code cell* allows you to edit and write new code, with full syntax
-highlighting and tab completion. The programming language you use depends
-on the *kernel*, and the default kernel (IPython) runs Python code.
-
-When a code cell is executed, code that it contains is sent to the kernel
-associated with the notebook. The results that are returned from this
-computation are then displayed in the notebook as the cell's *output*. The
-output is not limited to text, with many other possible forms of output are
-also possible, including ``matplotlib`` figures and HTML tables (as used, for
-example, in the ``pandas`` data analysis package). This is known as IPython's
-*rich display* capability.
-
-.. seealso::
-
- `Rich Output`_ example notebook
-
-Markdown cells
-~~~~~~~~~~~~~~
-You can document the computational process in a literate way, alternating
-descriptive text with code, using *rich text*. In IPython this is accomplished
-by marking up text with the Markdown language. The corresponding cells are
-called *Markdown cells*. The Markdown language provides a simple way to
-perform this text markup, that is, to specify which parts of the text should
-be emphasized (italics), bold, form lists, etc.
-
-If you want to provide structure for your document, you can use markdown
-headings. Markdown headings consist of 1 to 6 hash # signs ``#`` followed by a
-space and the title of your section. The markdown heading will be converted
-to a clickable link for a section of the notebook. It is also used as a hint
-when exporting to other document formats, like PDF.
-
-When a Markdown cell is executed, the Markdown code is converted into
-the corresponding formatted rich text. Markdown allows arbitrary HTML code for
-formatting.
-
-Within Markdown cells, you can also include *mathematics* in a straightforward
-way, using standard LaTeX notation: ``$...$`` for inline mathematics and
-``$$...$$`` for displayed mathematics. When the Markdown cell is executed,
-the LaTeX portions are automatically rendered in the HTML output as equations
-with high quality typography. This is made possible by MathJax_, which
-supports a `large subset `_ of LaTeX functionality
-
-.. _mathjax_tex: https://docs.mathjax.org/en/latest/tex.html
-
-Standard mathematics environments defined by LaTeX and AMS-LaTeX (the
-``amsmath`` package) also work, such as
-``\begin{equation}...\end{equation}``, and ``\begin{align}...\end{align}``.
-New LaTeX macros may be defined using standard methods,
-such as ``\newcommand``, by placing them anywhere *between math delimiters* in
-a Markdown cell. These definitions are then available throughout the rest of
-the IPython session.
-
-.. seealso::
-
- `Working with Markdown Cells`_ example notebook
-
-Raw cells
-~~~~~~~~~
-
-*Raw* cells provide a place in which you can write *output* directly.
-Raw cells are not evaluated by the notebook.
-When passed through nbconvert_, raw cells arrive in the
-destination format unmodified. For example, you can type full LaTeX
-into a raw cell, which will only be rendered by LaTeX after conversion by
-nbconvert.
-
-
-Basic workflow
---------------
-
-The normal workflow in a notebook is, then, quite similar to a standard
-IPython session, with the difference that you can edit cells in-place multiple
-times until you obtain the desired results, rather than having to
-rerun separate scripts with the ``%run`` magic command.
-
-
-Typically, you will work on a computational problem in pieces, organizing
-related ideas into cells and moving forward once previous parts work
-correctly. This is much more convenient for interactive exploration than
-breaking up a computation into scripts that must be executed together, as was
-previously necessary, especially if parts of them take a long time to run.
-
-To interrupt a calculation which is taking too long, use the :guilabel:`Kernel`,
-:guilabel:`Interrupt` menu option, or the :kbd:`i,i` keyboard shortcut.
-Similarly, to restart the whole computational process,
-use the :guilabel:`Kernel`, :guilabel:`Restart` menu option or :kbd:`0,0`
-shortcut.
-
-A notebook may be downloaded as a ``.ipynb`` file or converted to a number of
-other formats using the menu option :guilabel:`File`, :guilabel:`Download as`.
-
-.. seealso::
-
- `Running Code in the Jupyter Notebook`_ example notebook
-
- `Notebook Basics`_ example notebook
-
-.. _keyboard-shortcuts:
-
-Keyboard shortcuts
-~~~~~~~~~~~~~~~~~~
-All actions in the notebook can be performed with the mouse, but keyboard
-shortcuts are also available for the most common ones. The essential shortcuts
-to remember are the following:
-
-* :kbd:`Shift-Enter`: run cell
- Execute the current cell, show any output, and jump to the next cell below.
- If :kbd:`Shift-Enter` is invoked on the last cell, it makes a new cell below.
- This is equivalent to clicking the :guilabel:`Cell`, :guilabel:`Run` menu
- item, or the Play button in the toolbar.
-
-* :kbd:`Esc`: Command mode
- In command mode, you can navigate around the notebook using keyboard shortcuts.
-
-* :kbd:`Enter`: Edit mode
- In edit mode, you can edit text in cells.
-
-For the full list of available shortcuts, click :guilabel:`Help`,
-:guilabel:`Keyboard Shortcuts` in the notebook menus.
-
-Plotting
---------
-One major feature of the Jupyter notebook is the ability to display plots that
-are the output of running code cells. The IPython kernel is designed to work
-seamlessly with the matplotlib_ plotting library to provide this functionality.
-Specific plotting library integration is a feature of the kernel.
-
-Installing kernels
-------------------
-
-For information on how to install a Python kernel, refer to the
-`IPython install page `__.
-
-The Jupyter wiki has a long list of `Kernels for other languages
-`_.
-They usually come with instructions on how to make the kernel available
-in the notebook.
-
-
-.. _signing_notebooks:
-
-Trusting Notebooks
-------------------
-
-To prevent untrusted code from executing on users' behalf when notebooks open,
-we store a signature of each trusted notebook.
-The notebook server verifies this signature when a notebook is opened.
-If no matching signature is found,
-Javascript and HTML output will not be displayed
-until they are regenerated by re-executing the cells.
-
-Any notebook that you have fully executed yourself will be
-considered trusted, and its HTML and Javascript output will be displayed on
-load.
-
-If you need to see HTML or Javascript output without re-executing,
-and you are sure the notebook is not malicious, you can tell Jupyter to trust it
-at the command-line with::
-
- $ jupyter trust mynotebook.ipynb
-
-See :ref:`notebook_security` for more details about the trust mechanism.
-
-Browser Compatibility
----------------------
-
-The Jupyter Notebook aims to support the latest versions of these browsers:
-
-* Chrome
-* Safari
-* Firefox
-
-Up to date versions of Opera and Edge may also work, but if they don't, please
-use one of the supported browsers.
-
-Using Safari with HTTPS and an untrusted certificate is known to not work
-(websockets will fail).
-
-.. include:: links.txt
diff --git a/docs/source/public_server.rst b/docs/source/public_server.rst
index 6ad8358c07..32623da2fd 100644
--- a/docs/source/public_server.rst
+++ b/docs/source/public_server.rst
@@ -4,7 +4,7 @@ Running a Jupyter server
========================
-The :doc:`jupyter server ` web application is based on a
+The Jupyter Server's web application is based on a
server-client structure. The notebook server uses a :ref:`two-process kernel
architecture ` based on ZeroMQ_, as well as Tornado_ for
serving HTTP requests.
@@ -36,9 +36,9 @@ This document describes how you can
-.. _ZeroMQ: http://zeromq.org
+.. _ZeroMQ: https://zeromq.org/
-.. _Tornado: http://www.tornadoweb.org
+.. _Tornado: with Found to http://www.tornadoweb.org/en/stable/
.. _JupyterHub: https://jupyterhub.readthedocs.io/en/latest/
@@ -181,7 +181,7 @@ compliant self-signed certificate that will not raise warnings, it is possible
certificate and follow the steps in :ref:`using-lets-encrypt` to set up a
public server.
-.. _OWASP: https://www.owasp.org
+.. _OWASP: https://www.owasp.org/index.php/Main_Page
.. _tutorial: https://arstechnica.com/information-technology/2009/12/how-to-get-set-with-a-secure-sertificate-for-free/
.. _notebook_public_server:
diff --git a/docs/source/security.rst b/docs/source/security.rst
index f90f9d6da5..e5727421b9 100644
--- a/docs/source/security.rst
+++ b/docs/source/security.rst
@@ -1,21 +1,19 @@
-
.. _server_security:
-Security in the Jupyter notebook server
-=======================================
+Security in the Jupyter Server
+==============================
-Since access to the Jupyter notebook server means access to running arbitrary code,
-it is important to restrict access to the notebook server.
-For this reason, notebook 4.3 introduces token-based authentication that is **on by default**.
+Since access to the Jupyter Server means access to running arbitrary code,
+it is important to restrict access to the server.
+For this reason, Jupyter Server uses a token-based authentication that is **on by default**.
.. note::
- If you enable a password for your notebook server,
- token authentication is not enabled by default,
- and the behavior of the notebook server is unchanged from versions earlier than 4.3.
+ If you enable a password for your server,
+ token authentication is not enabled by default.
-When token authentication is enabled, the notebook uses a token to authenticate requests.
-This token can be provided to login to the notebook server in three ways:
+When token authentication is enabled, the server uses a token to authenticate requests.
+This token can be provided to login to the server in three ways:
- in the ``Authorization`` header, e.g.::
@@ -23,29 +21,28 @@ This token can be provided to login to the notebook server in three ways:
- In a URL parameter, e.g.::
- https://my-notebook/tree/?token=abcdef...
+ https://my-server/tree/?token=abcdef...
- In the password field of the login form that will be shown to you if you are not logged in.
-When you start a notebook server with token authentication enabled (default),
+When you start a Jupyter server with token authentication enabled (default),
a token is generated to use for authentication.
This token is logged to the terminal, so that you can copy/paste the URL into your browser::
- [I 11:59:16.597 NotebookApp] The Jupyter Notebook is running at:
+ [I 11:59:16.597 ServerApp] The Jupyter Server is running at:
http://localhost:8888/?token=c8de56fa4deed24899803e93c227592aef6538f93025fe01
-If the notebook server is going to open your browser automatically
-(the default, unless ``--no-browser`` has been passed),
+If the Jupyter server is going to open your browser automatically,
an *additional* token is generated for launching the browser.
This additional token can be used only once,
and is used to set a cookie for your browser once it connects.
After your browser has made its first request with this one-time-token,
the token is discarded and a cookie is set in your browser.
-At any later time, you can see the tokens and URLs for all of your running servers with :command:`jupyter notebook list`::
+At any later time, you can see the tokens and URLs for all of your running servers with :command:`jupyter server list`::
- $ jupyter notebook list
+ $ jupyter server list
Currently running servers:
http://localhost:8888/?token=abc... :: /home/you/notebooks
https://0.0.0.0:9999/?token=123... :: /tmp/public
@@ -57,19 +54,19 @@ If a server has no token (e.g. it has a password or has authentication disabled)
the URL will not include the token argument.
Once you have visited this URL,
a cookie will be set in your browser and you won't need to use the token again,
-unless you switch browsers, clear your cookies, or start a notebook server on a new port.
+unless you switch browsers, clear your cookies, or start a Jupyter server on a new port.
Alternatives to token authentication
------------------------------------
If a generated token doesn't work well for you,
-you can set a password for your notebook.
-:command:`jupyter notebook password` will prompt you for a password,
-and store the hashed password in your :file:`jupyter_notebook_config.json`.
+you can set a password for your server.
+:command:`jupyter server password` will prompt you for a password,
+and store the hashed password in your :file:`jupyter_server_config.json`.
.. versionadded:: 5.0
- :command:`jupyter notebook password` command is added.
+ :command:`jupyter server password` command is added.
It is possible disable authentication altogether by setting the token and password to empty strings,
@@ -77,151 +74,6 @@ but this is **NOT RECOMMENDED**, unless authentication or access restrictions ar
.. sourcecode:: python
- c.NotebookApp.token = ''
- c.NotebookApp.password = ''
-
-
-.. _notebook_security:
-
-Security in notebook documents
-==============================
-
-As Jupyter notebooks become more popular for sharing and collaboration,
-the potential for malicious people to attempt to exploit the notebook
-for their nefarious purposes increases. IPython 2.0 introduced a
-security model to prevent execution of untrusted code without explicit
-user input.
-
-The problem
------------
-
-The whole point of Jupyter is arbitrary code execution. We have no
-desire to limit what can be done with a notebook, which would negatively
-impact its utility.
-
-Unlike other programs, a Jupyter notebook document includes output.
-Unlike other documents, that output exists in a context that can execute
-code (via Javascript).
-
-The security problem we need to solve is that no code should execute
-just because a user has **opened** a notebook that **they did not
-write**. Like any other program, once a user decides to execute code in
-a notebook, it is considered trusted, and should be allowed to do
-anything.
-
-Our security model
-------------------
-
-- Untrusted HTML is always sanitized
-- Untrusted Javascript is never executed
-- HTML and Javascript in Markdown cells are never trusted
-- **Outputs** generated by the user are trusted
-- Any other HTML or Javascript (in Markdown cells, output generated by
- others) is never trusted
-- The central question of trust is "Did the current user do this?"
-
-The details of trust
---------------------
-
-When a notebook is executed and saved, a signature is computed from a
-digest of the notebook's contents plus a secret key. This is stored in a
-database, writable only by the current user. By default, this is located at::
-
- ~/.local/share/jupyter/nbsignatures.db # Linux
- ~/Library/Jupyter/nbsignatures.db # OS X
- %APPDATA%/jupyter/nbsignatures.db # Windows
-
-Each signature represents a series of outputs which were produced by code the
-current user executed, and are therefore trusted.
-
-When you open a notebook, the server computes its signature, and checks if it's
-in the database. If a match is found, HTML and Javascript
-output in the notebook will be trusted at load, otherwise it will be
-untrusted.
-
-Any output generated during an interactive session is trusted.
-
-Updating trust
-**************
-
-A notebook's trust is updated when the notebook is saved. If there are
-any untrusted outputs still in the notebook, the notebook will not be
-trusted, and no signature will be stored. If all untrusted outputs have
-been removed (either via ``Clear Output`` or re-execution), then the
-notebook will become trusted.
-
-While trust is updated per output, this is only for the duration of a
-single session. A newly loaded notebook file is either trusted or not in its
-entirety.
-
-Explicit trust
-**************
-
-Sometimes re-executing a notebook to generate trusted output is not an
-option, either because dependencies are unavailable, or it would take a
-long time. Users can explicitly trust a notebook in two ways:
-
-- At the command-line, with::
-
- jupyter trust /path/to/notebook.ipynb
-
-- After loading the untrusted notebook, with ``File / Trust Notebook``
-
-These two methods simply load the notebook, compute a new signature, and add
-that signature to the user's database.
-
-Reporting security issues
--------------------------
-
-If you find a security vulnerability in Jupyter, either a failure of the
-code to properly implement the model described here, or a failure of the
-model itself, please report it to security@ipython.org.
-
-If you prefer to encrypt your security reports,
-you can use :download:`this PGP public key `.
-
-Affected use cases
-------------------
-
-Some use cases that work in Jupyter 1.0 became less convenient in
-2.0 as a result of the security changes. We do our best to minimize
-these annoyances, but security is always at odds with convenience.
-
-Javascript and CSS in Markdown cells
-************************************
-
-While never officially supported, it had become common practice to put
-hidden Javascript or CSS styling in Markdown cells, so that they would
-not be visible on the page. Since Markdown cells are now sanitized (by
-`Google Caja `__), all Javascript
-(including click event handlers, etc.) and CSS will be stripped.
-
-We plan to provide a mechanism for notebook themes, but in the meantime
-styling the notebook can only be done via either ``custom.css`` or CSS
-in HTML output. The latter only have an effect if the notebook is
-trusted, because otherwise the output will be sanitized just like
-Markdown.
-
-Collaboration
-*************
-
-When collaborating on a notebook, people probably want to see the
-outputs produced by their colleagues' most recent executions. Since each
-collaborator's key will differ, this will result in each share starting
-in an untrusted state. There are three basic approaches to this:
-
-- re-run notebooks when you get them (not always viable)
-- explicitly trust notebooks via ``jupyter trust`` or the notebook menu
- (annoying, but easy)
-- share a notebook signatures database, and use configuration dedicated to the
- collaboration while working on the project.
-
-To share a signatures database among users, you can configure:
-
-.. code-block:: python
-
- c.NotebookNotary.data_dir = "/path/to/signature_dir"
+ c.ServerApp.token = ''
+ c.ServerApp.password = ''
-to specify a non-default path to the SQLite database (of notebook hashes,
-essentially). We are aware that SQLite doesn't work well on NFS and we are
-`working out better ways to do this `_.
diff --git a/docs/source/spelling_wordlist.txt b/docs/source/spelling_wordlist.txt
deleted file mode 100644
index e9db8e9cc4..0000000000
--- a/docs/source/spelling_wordlist.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-AMS
-API
-api
-args
-async
-auth
-autodetect
-Broullón
-changelog
-config
-coroutines
-css
-CSS
-dockerfile
-Dockerfile
-drop-down
-filenames
-filesystem
-front-end
-front end
-frontend
-github
-GitHub
-IFrame
-iframe
-ip
-IP
-IPython
-javascript
-JavaScript
-jinja
-jinja2
-Jinja
-js
-jupyter
-Jupyter
-Kamens
-keepalive
-LaTeX
-localhost
-login
-logout
-mathjax
-MathJax
-matplotlib
-menubar
-metadata
-minify
-minified
-multiline
-natively
-nbviewer
-pre
-prerelease
-Quantopian
-repo
-reStructuredText
-subclasses
-subdirectory
-subprocesses
-startup
-symlink
-uncomment
-unencrypted
-unicode
-Unicode
-untracked
-untrusted
-URL
-url
-username
-webserver
-websockets
-workflow
diff --git a/docs/source/template.tpl b/docs/source/template.tpl
deleted file mode 100644
index 411ef7c68d..0000000000
--- a/docs/source/template.tpl
+++ /dev/null
@@ -1,20 +0,0 @@
-{%- extends 'rst.tpl' -%}
-
-{% macro notebooklink() -%}
-
-`View the original notebook on nbviewer `__
-
-
-{%- endmacro %}
-
-{%- block header %}
-{{ notebooklink() }}
-{% endblock header -%}
-
-{%- block footer %}
-{{ notebooklink() }}
-{% endblock footer -%}
-
-{% block markdowncell scoped %}
-{{ cell.source | markdown2rst | replace(".ipynb>", ".html>") }}
-{% endblock markdowncell %}
diff --git a/docs/source/troubleshooting.rst b/docs/source/troubleshooting.rst
deleted file mode 100644
index 306234d7b7..0000000000
--- a/docs/source/troubleshooting.rst
+++ /dev/null
@@ -1,87 +0,0 @@
-What to do when things go wrong
-===============================
-
-First, have a look at the common problems listed below. If you can figure it out
-from these notes, it will be quicker than asking for help.
-
-Check that you have the latest version of any packages that look relevant.
-Unfortunately it's not always easy to figure out what packages are relevant,
-but if there was a bug that's already been fixed,
-it's easy to upgrade and get on with what you wanted to do.
-
-Jupyter fails to start
-----------------------
-
-* Have you `installed it `__? ;-)
-* If you're using a menu shortcut or Anaconda launcher to start it, try
- opening a terminal or command prompt and running the command ``jupyter notebook``.
-* If it can't find ``jupyter``,
- you may need to configure your ``PATH`` environment variable.
- If you don't know what that means, and don't want to find out,
- just (re)install Anaconda with the default settings,
- and it should set up PATH correctly.
-* If Jupyter gives an error that it can't find ``notebook``,
- check with pip or conda that the ``notebook`` package is installed.
-* Try running ``jupyter-notebook`` (with a hyphen). This should normally be the
- same as ``jupyter notebook`` (with a space), but if there's any difference,
- the version with the hyphen is the 'real' launcher, and the other one wraps
- that.
-
-Jupyter doesn't load or doesn't work in the browser
----------------------------------------------------
-
-* Try in another browser (e.g. if you normally use Firefox, try with Chrome).
- This helps pin down where the problem is.
-* Try disabling any browser extensions and/or any Jupyter extensions you have
- installed.
-* Some internet security software can interfere with Jupyter.
- If you have security software, try turning it off temporarily,
- and look in the settings for a more long-term solution.
-* In the address bar, try changing between ``localhost`` and ``127.0.0.1``.
- They should be the same, but in some cases it makes a difference.
-
-Jupyter can't start a kernel
-----------------------------
-
-Files called *kernel specs* tell Jupyter how to start different kinds of kernel.
-To see where these are on your system, run ``jupyter kernelspec list``::
-
- $ jupyter kernelspec list
- Available kernels:
- python3 /home/takluyver/.local/lib/python3.6/site-packages/ipykernel/resources
- bash /home/takluyver/.local/share/jupyter/kernels/bash
- ir /home/takluyver/.local/share/jupyter/kernels/ir
-
-There's a special fallback for the Python kernel:
-if it doesn't find a real kernelspec, but it can import the ``ipykernel`` package,
-it provides a kernel which will run in the same Python environment as the notebook server.
-A path ending in ``ipykernel/resources``, like in the example above,
-is this default kernel.
-The default often does what you want,
-so if the ``python3`` kernelspec points somewhere else
-and you can't start a Python kernel,
-try deleting or renaming that kernelspec folder to expose the default.
-
-If your problem is with another kernel, not the Python one we maintain,
-you may need to look for support about that kernel.
-
-Asking for help
----------------
-
-As with any problem, try searching to see if someone has already found an answer.
-If you can't find an existing answer, you can ask questions at:
-
-* The `jupyter-notebook tag on Stackoverflow `_
-* The `jupyter/help repository on Github `_
-* Or in an issue on another repository, if it's clear which component is
- responsible.
-
-Don't forget to provide details. What error messages do you see?
-What platform are you on? How did you install Jupyter?
-What have you tried already?
-The ``jupyter troubleshoot`` command collects a lot of information
-about your installation, which can be useful.
-
-Remember that it's not anyone's job to help you.
-We want Jupyter to work for you,
-but we can't always help everyone individually.
diff --git a/docs/source/ui_components.rst b/docs/source/ui_components.rst
deleted file mode 100644
index b5fc506dfe..0000000000
--- a/docs/source/ui_components.rst
+++ /dev/null
@@ -1,50 +0,0 @@
-User interface components
-=========================
-
-When opening bug reports or sending emails to the Jupyter mailing list, it is
-useful to know the names of different UI components so that other developers
-and users have an easier time helping you diagnose your problems. This section
-will familiarize you with the names of UI elements within the Notebook and the
-different Notebook modes.
-
-Notebook Dashboard
--------------------
-
-When you launch ``jupyter notebook`` the first page that you encounter is the
-Notebook Dashboard.
-
-.. image:: ./_static/images/jupyter-notebook-dashboard.png
-
-Notebook Editor
----------------
-
-Once you've selected a Notebook to edit, the Notebook will open in the Notebook
-Editor.
-
-.. image:: ./_static/images/jupyter-notebook-default.png
-
-Interactive User Interface Tour of the Notebook
------------------------------------------------
-
-If you would like to learn more about the specific elements within the Notebook
-Editor, you can go through the user interface tour by selecting *Help* in the
-menubar then selecting *User Interface Tour*.
-
-Edit Mode and Notebook Editor
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-When a cell is in edit mode, the Cell Mode Indicator will change to reflect
-the cell's state. This state is indicated by a small pencil icon on the
-top right of the interface. When the cell is in command mode, there is no
-icon in that location.
-
-.. image:: ./_static/images/jupyter-notebook-edit.png
-
-File Editor
------------
-
-Now let's say that you've chosen to open a Markdown file instead of a Notebook
-file whilst in the Notebook Dashboard. If so, the file will be opened in the
-File Editor.
-
-.. image:: ./_static/images/jupyter-file-editor.png
diff --git a/jupyter_server/extension/__init__.py b/jupyter_server/extension/__init__.py
index e69de29bb2..988374916a 100644
--- a/jupyter_server/extension/__init__.py
+++ b/jupyter_server/extension/__init__.py
@@ -0,0 +1,2 @@
+from .application import ExtensionApp
+from .handler import ExtensionHandler
\ No newline at end of file