├── .gitmodules ├── docs ├── source │ ├── _static │ │ ├── .gitkeep │ │ └── images │ │ │ ├── new-notebook.gif │ │ │ ├── cell-toolbar-41.png │ │ │ ├── dashboard-sort.png │ │ │ ├── find-replace-41.png │ │ │ ├── multi-select-41.png │ │ │ ├── shortcut-editor.png │ │ │ ├── blank-notebook-ui.png │ │ │ ├── cell-tags-toolbar.png │ │ │ ├── command-palette-41.png │ │ │ ├── table-style-after.png │ │ │ ├── table-style-before.png │ │ │ ├── jupyter-file-editor.png │ │ │ ├── jupyter-notebook-edit.png │ │ │ ├── jupyter-verification.png │ │ │ ├── jupyter-notebook-dashboard.png │ │ │ └── jupyter-notebook-default.png │ ├── examples │ │ ├── Notebook │ │ │ ├── nbpackage │ │ │ │ ├── __init__.py │ │ │ │ ├── nbs │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── other.ipynb │ │ │ │ └── mynotebook.ipynb │ │ │ ├── images │ │ │ │ ├── edit_mode.png │ │ │ │ ├── command_mode.png │ │ │ │ ├── menubar_toolbar.png │ │ │ │ ├── nbconvert_arch.png │ │ │ │ ├── dashboard_files_tab.png │ │ │ │ ├── dashboard_running_tab.png │ │ │ │ ├── dashboard_files_tab_new.png │ │ │ │ ├── dashboard_files_tab_run.png │ │ │ │ └── dashboard_files_tab_btns.png │ │ │ └── examples_index.rst │ │ ├── images │ │ │ ├── animation.m4v │ │ │ ├── ipython_logo.png │ │ │ ├── jupyter_logo.png │ │ │ ├── FrontendKernel.png │ │ │ └── FrontendKernel.graffle │ │ │ │ └── image1.png │ │ └── utils │ │ │ ├── list_pyfiles.ipy │ │ │ └── list_subdirs.ipy │ ├── contributing.rst │ ├── development_faq.rst │ ├── extending │ │ └── index.rst │ ├── template.tpl │ ├── spelling_wordlist.txt │ ├── index.rst │ ├── ui_components.rst │ ├── development_release.rst │ └── links.txt ├── doc-requirements.txt ├── resources │ ├── ipynb.icns │ ├── running_code.png │ ├── notebook_basics.png │ ├── running_code_med.png │ ├── ipynb.iconset │ │ ├── icon_16x16.png │ │ ├── icon_24x24.png │ │ ├── icon_32x32.png │ │ ├── icon_48x48.png │ │ ├── icon_64x64.png │ │ ├── icon_1024x1024.png │ │ ├── icon_128x128.png │ │ ├── icon_16x16@2x.png │ │ ├── icon_24x24@2x.png │ │ ├── icon_256x256.png │ │ ├── icon_32x32@2x.png │ │ ├── icon_512x512.png │ │ ├── icon_64x64@2x.png │ │ ├── icon_128x128@2x.png │ │ ├── icon_256x256@2x.png │ │ └── icon_512x512@2x.png │ ├── Info.plist.example │ └── generate_icons.sh ├── environment.yml ├── jsdoc_config.json ├── jsdoc_plugin.js └── autogen_config.py ├── notebook ├── base │ └── __init__.py ├── bundler │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── resources │ │ │ ├── subdir │ │ │ ├── subsubdir │ │ │ │ └── .gitkeep │ │ │ └── test_file.txt │ │ │ ├── another_subdir │ │ │ └── test_file.txt │ │ │ └── empty.ipynb │ ├── __main__.py │ ├── tarball_bundler.py │ └── zip_bundler.py ├── edit │ ├── __init__.py │ └── handlers.py ├── files │ └── __init__.py ├── tests │ ├── __init__.py │ ├── selenium │ │ ├── __init__.py │ │ ├── test_find_and_replace.py │ │ ├── test_prompt_numbers.py │ │ ├── test_markdown.py │ │ ├── test_save_as_notebook.py │ │ ├── quick_selenium.py │ │ ├── test_dualmode_insertcell.py │ │ └── test_deletecell.py │ ├── mockextension │ │ └── index.js │ ├── test_hist.sqlite │ ├── _testdata │ │ └── black_square_22.png │ ├── test_i18n.py │ ├── notebook │ │ ├── inject_js.js │ │ ├── safe_append_output.js │ │ ├── clipboard_multiselect.js │ │ ├── interrupt.js │ │ ├── merge_cells_api.js │ │ ├── kernel_menu.js │ │ ├── shutdown.js │ │ ├── buffering.js │ │ ├── dualmode_arrows.js │ │ ├── dualmode_markdown.js │ │ └── move_multiselection.js │ ├── README.md │ ├── test_serialize.py │ ├── test_paths.py │ ├── base │ │ ├── misc.js │ │ ├── highlight.js │ │ └── security.js │ └── test_config_manager.py ├── tree │ ├── __init__.py │ └── tests │ │ ├── __init__.py │ │ └── test_tree_handler.py ├── view │ ├── __init__.py │ └── handlers.py ├── auth │ ├── tests │ │ ├── __init__.py │ │ └── test_security.py │ ├── __init__.py │ ├── logout.py │ └── __main__.py ├── kernelspecs │ ├── __init__.py │ └── handlers.py ├── nbconvert │ ├── __init__.py │ └── tests │ │ └── __init__.py ├── notebook │ ├── __init__.py │ └── handlers.py ├── services │ ├── __init__.py │ ├── api │ │ ├── __init__.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_api.py │ │ └── handlers.py │ ├── contents │ │ ├── __init__.py │ │ └── tests │ │ │ └── __init__.py │ ├── kernels │ │ ├── __init__.py │ │ └── tests │ │ │ └── __init__.py │ ├── sessions │ │ ├── __init__.py │ │ └── tests │ │ │ └── __init__.py │ ├── config │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_config_api.py │ │ ├── __init__.py │ │ ├── handlers.py │ │ └── manager.py │ ├── kernelspecs │ │ ├── __init__.py │ │ └── tests │ │ │ └── __init__.py │ ├── nbconvert │ │ ├── __init__.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_nbconvert_api.py │ │ └── handlers.py │ ├── security │ │ ├── __init__.py │ │ └── handlers.py │ └── shutdown.py ├── static │ ├── robots.txt │ ├── auth │ │ ├── less │ │ │ ├── logout.less │ │ │ ├── style.less │ │ │ └── login.less │ │ ├── css │ │ │ └── override.css │ │ └── js │ │ │ ├── main.js │ │ │ ├── logoutmain.js │ │ │ ├── loginmain.js │ │ │ └── loginwidget.js │ ├── favicon.ico │ ├── base │ │ ├── images │ │ │ ├── logo.png │ │ │ ├── favicon.ico │ │ │ ├── favicon-file.ico │ │ │ ├── favicon-busy-1.ico │ │ │ ├── favicon-busy-2.ico │ │ │ ├── favicon-busy-3.ico │ │ │ ├── favicon-notebook.ico │ │ │ └── favicon-terminal.ico │ │ ├── less │ │ │ ├── style.less │ │ │ ├── mixins.less │ │ │ ├── error.less │ │ │ └── variables.less │ │ └── js │ │ │ ├── i18n.js │ │ │ ├── promises.js │ │ │ ├── events.js │ │ │ └── page.js │ ├── tree │ │ ├── less │ │ │ ├── style.less │ │ │ └── altuploadform.less │ │ └── js │ │ │ └── shutdownbutton.js │ ├── edit │ │ ├── less │ │ │ ├── style.less │ │ │ ├── menubar.less │ │ │ └── edit.less │ │ └── js │ │ │ └── notificationarea.js │ ├── notebook │ │ ├── less │ │ │ ├── highlight-refs.less │ │ │ ├── kernelselector.less │ │ │ ├── quickhelp.less │ │ │ ├── style_noapp.less │ │ │ ├── modal.less │ │ │ ├── notificationwidget.less │ │ │ ├── style.less │ │ │ ├── completer.less │ │ │ ├── searchandreplace.less │ │ │ ├── variables.less │ │ │ ├── commandpalette.less │ │ │ ├── tagbar.less │ │ │ ├── toolbar.less │ │ │ ├── savewidget.less │ │ │ ├── notificationarea.less │ │ │ ├── pager.less │ │ │ ├── celltoolbar.less │ │ │ ├── codecell.less │ │ │ ├── ansicolors.less │ │ │ └── textcell.less │ │ ├── css │ │ │ └── override.css │ │ └── js │ │ │ ├── promises.js │ │ │ ├── codemirror-ipython.js │ │ │ ├── celltoolbarpresets │ │ │ ├── attachments.js │ │ │ ├── default.js │ │ │ └── slideshow.js │ │ │ ├── about.js │ │ │ └── codemirror-ipythongfm.js │ ├── terminal │ │ ├── css │ │ │ └── override.css │ │ ├── less │ │ │ └── terminal.less │ │ └── js │ │ │ ├── terminado.js │ │ │ └── main.js │ ├── style │ │ ├── ipython.less │ │ └── style.less │ ├── custom │ │ └── custom.css │ └── bidi │ │ ├── bidi.js │ │ └── numericshaping.js ├── i18n │ ├── babel_notebook.cfg │ ├── babel_nbui.cfg │ ├── nbjs.json │ └── babel_nbjs.cfg ├── __main__.py ├── templates │ ├── 404.html │ ├── view.html │ ├── error.html │ ├── terminal.html │ └── logout.html ├── transutils.py ├── _version.py ├── __init__.py ├── _tz.py ├── terminal │ ├── api_handlers.py │ ├── handlers.py │ └── __init__.py ├── metrics.py └── log.py ├── git-hooks ├── post-merge ├── install-hooks.sh ├── README.md └── post-checkout ├── .babelrc ├── .bowerrc ├── .eslintignore ├── readthedocs.yml ├── docs-translations └── ko-KR │ ├── resources │ ├── dashboard.GIF │ ├── edit_mode.GIF │ ├── file_editor.GIF │ ├── Notebook_Editor.GIF │ └── running_code_med.png │ ├── Installation.md │ ├── UIComponents.md │ └── HowtoRun.md ├── codecov.yml ├── .eslintrc.json ├── MANIFEST.in ├── package.json ├── setup.cfg ├── .gitignore ├── appveyor.yml ├── bower.json └── tools └── build-main.js /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/_static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/base/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/bundler/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/edit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/files/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/tree/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/view/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /git-hooks/post-merge: -------------------------------------------------------------------------------- 1 | post-checkout -------------------------------------------------------------------------------- /notebook/auth/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/kernelspecs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/nbconvert/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/notebook/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/tree/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/bundler/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/nbconvert/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/contents/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/kernels/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/sessions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/tests/selenium/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/api/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/config/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/kernels/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/kernelspecs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/nbconvert/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/contents/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/kernelspecs/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/nbconvert/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/services/sessions/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"], 3 | } 4 | -------------------------------------------------------------------------------- /docs/source/examples/Notebook/nbpackage/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/source/examples/Notebook/nbpackage/nbs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /notebook/auth/__init__.py: -------------------------------------------------------------------------------- 1 | from .security import passwd 2 | -------------------------------------------------------------------------------- /notebook/bundler/tests/resources/subdir/subsubdir/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "notebook/static/components" 3 | } -------------------------------------------------------------------------------- /notebook/static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /notebook/tests/mockextension/index.js: -------------------------------------------------------------------------------- 1 | console.log('z'); 2 | -------------------------------------------------------------------------------- /docs/doc-requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx>=1.3.6 2 | sphinx-rtd-theme 3 | nbsphinx 4 | -------------------------------------------------------------------------------- /notebook/bundler/tests/resources/subdir/test_file.txt: -------------------------------------------------------------------------------- 1 | Used to test globbing. -------------------------------------------------------------------------------- /notebook/services/config/__init__.py: -------------------------------------------------------------------------------- 1 | from .manager import ConfigManager 2 | -------------------------------------------------------------------------------- /notebook/bundler/tests/resources/another_subdir/test_file.txt: -------------------------------------------------------------------------------- 1 | Used to test globbing. -------------------------------------------------------------------------------- /notebook/static/auth/less/logout.less: -------------------------------------------------------------------------------- 1 | // Custom styles for logout.html 2 | 3 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | *.min.js 2 | *components* 3 | *node_modules* 4 | *built* 5 | *build* 6 | -------------------------------------------------------------------------------- /readthedocs.yml: -------------------------------------------------------------------------------- 1 | conda: 2 | file: docs/environment.yml 3 | python: 4 | version: 3 5 | -------------------------------------------------------------------------------- /docs/source/contributing.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: sh 2 | 3 | .. include:: ../../CONTRIBUTING.rst 4 | -------------------------------------------------------------------------------- /docs/resources/ipynb.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.icns -------------------------------------------------------------------------------- /notebook/i18n/babel_notebook.cfg: -------------------------------------------------------------------------------- 1 | [python: notebook/*.py] 2 | [python: notebook/services/contents/*.py] 3 | -------------------------------------------------------------------------------- /notebook/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/static/favicon.ico -------------------------------------------------------------------------------- /docs/resources/running_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/running_code.png -------------------------------------------------------------------------------- /notebook/tests/test_hist.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/tests/test_hist.sqlite -------------------------------------------------------------------------------- /docs/resources/notebook_basics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/notebook_basics.png -------------------------------------------------------------------------------- /docs/resources/running_code_med.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/running_code_med.png -------------------------------------------------------------------------------- /notebook/static/base/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/static/base/images/logo.png -------------------------------------------------------------------------------- /notebook/static/auth/less/style.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * 3 | * IPython auth 4 | * 5 | */ 6 | @import "login.less"; 7 | @import "logout.less"; -------------------------------------------------------------------------------- /notebook/static/base/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/static/base/images/favicon.ico -------------------------------------------------------------------------------- /docs/source/examples/images/animation.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/images/animation.m4v -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_16x16.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_24x24.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_32x32.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_48x48.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_64x64.png -------------------------------------------------------------------------------- /docs/source/_static/images/new-notebook.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/new-notebook.gif -------------------------------------------------------------------------------- /docs/source/examples/images/ipython_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/images/ipython_logo.png -------------------------------------------------------------------------------- /docs/source/examples/images/jupyter_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/images/jupyter_logo.png -------------------------------------------------------------------------------- /notebook/bundler/tests/resources/empty.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat_minor": 0, 3 | "cells": [], 4 | "nbformat": 4, 5 | "metadata": {} 6 | } -------------------------------------------------------------------------------- /notebook/static/base/images/favicon-file.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/static/base/images/favicon-file.ico -------------------------------------------------------------------------------- /notebook/static/tree/less/style.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * 3 | * IPython tree view 4 | * 5 | */ 6 | @import "altuploadform.less"; 7 | @import "tree.less"; -------------------------------------------------------------------------------- /notebook/tests/_testdata/black_square_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/tests/_testdata/black_square_22.png -------------------------------------------------------------------------------- /docs-translations/ko-KR/resources/dashboard.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs-translations/ko-KR/resources/dashboard.GIF -------------------------------------------------------------------------------- /docs-translations/ko-KR/resources/edit_mode.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs-translations/ko-KR/resources/edit_mode.GIF -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_1024x1024.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_128x128.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_24x24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_24x24@2x.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_256x256.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_512x512.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_64x64@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_64x64@2x.png -------------------------------------------------------------------------------- /docs/source/_static/images/cell-toolbar-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/cell-toolbar-41.png -------------------------------------------------------------------------------- /docs/source/_static/images/dashboard-sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/dashboard-sort.png -------------------------------------------------------------------------------- /docs/source/_static/images/find-replace-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/find-replace-41.png -------------------------------------------------------------------------------- /docs/source/_static/images/multi-select-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/multi-select-41.png -------------------------------------------------------------------------------- /docs/source/_static/images/shortcut-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/shortcut-editor.png -------------------------------------------------------------------------------- /docs/source/examples/images/FrontendKernel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/images/FrontendKernel.png -------------------------------------------------------------------------------- /notebook/i18n/babel_nbui.cfg: -------------------------------------------------------------------------------- 1 | [jinja2: notebook/templates/**.html] 2 | encoding = utf-8 3 | [extractors] 4 | jinja2 = jinja2.ext:babel_extract 5 | -------------------------------------------------------------------------------- /notebook/static/base/images/favicon-busy-1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/static/base/images/favicon-busy-1.ico -------------------------------------------------------------------------------- /notebook/static/base/images/favicon-busy-2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/static/base/images/favicon-busy-2.ico -------------------------------------------------------------------------------- /notebook/static/base/images/favicon-busy-3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/static/base/images/favicon-busy-3.ico -------------------------------------------------------------------------------- /docs-translations/ko-KR/resources/file_editor.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs-translations/ko-KR/resources/file_editor.GIF -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /docs/resources/ipynb.iconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/resources/ipynb.iconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /docs/source/_static/images/blank-notebook-ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/blank-notebook-ui.png -------------------------------------------------------------------------------- /docs/source/_static/images/cell-tags-toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/cell-tags-toolbar.png -------------------------------------------------------------------------------- /docs/source/_static/images/command-palette-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/command-palette-41.png -------------------------------------------------------------------------------- /docs/source/_static/images/table-style-after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/table-style-after.png -------------------------------------------------------------------------------- /docs/source/_static/images/table-style-before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/table-style-before.png -------------------------------------------------------------------------------- /notebook/static/base/images/favicon-notebook.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/static/base/images/favicon-notebook.ico -------------------------------------------------------------------------------- /notebook/static/base/images/favicon-terminal.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/notebook/static/base/images/favicon-terminal.ico -------------------------------------------------------------------------------- /notebook/static/edit/less/style.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * 3 | * IPython text editor webapp 4 | * 5 | */ 6 | @import "menubar.less"; 7 | @import "edit.less"; 8 | -------------------------------------------------------------------------------- /docs/source/_static/images/jupyter-file-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/jupyter-file-editor.png -------------------------------------------------------------------------------- /docs/source/_static/images/jupyter-notebook-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/jupyter-notebook-edit.png -------------------------------------------------------------------------------- /docs/source/_static/images/jupyter-verification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/jupyter-verification.png -------------------------------------------------------------------------------- /docs/source/examples/Notebook/images/edit_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/Notebook/images/edit_mode.png -------------------------------------------------------------------------------- /docs-translations/ko-KR/resources/Notebook_Editor.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs-translations/ko-KR/resources/Notebook_Editor.GIF -------------------------------------------------------------------------------- /docs-translations/ko-KR/resources/running_code_med.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs-translations/ko-KR/resources/running_code_med.png -------------------------------------------------------------------------------- /docs/source/examples/Notebook/images/command_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/Notebook/images/command_mode.png -------------------------------------------------------------------------------- /docs/source/_static/images/jupyter-notebook-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/jupyter-notebook-dashboard.png -------------------------------------------------------------------------------- /docs/source/_static/images/jupyter-notebook-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/_static/images/jupyter-notebook-default.png -------------------------------------------------------------------------------- /docs/source/examples/Notebook/images/menubar_toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/Notebook/images/menubar_toolbar.png -------------------------------------------------------------------------------- /docs/source/examples/Notebook/images/nbconvert_arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/Notebook/images/nbconvert_arch.png -------------------------------------------------------------------------------- /docs/source/examples/Notebook/images/dashboard_files_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/Notebook/images/dashboard_files_tab.png -------------------------------------------------------------------------------- /docs/source/examples/Notebook/images/dashboard_running_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/Notebook/images/dashboard_running_tab.png -------------------------------------------------------------------------------- /docs/source/examples/images/FrontendKernel.graffle/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/images/FrontendKernel.graffle/image1.png -------------------------------------------------------------------------------- /docs/source/examples/Notebook/images/dashboard_files_tab_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/Notebook/images/dashboard_files_tab_new.png -------------------------------------------------------------------------------- /docs/source/examples/Notebook/images/dashboard_files_tab_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/Notebook/images/dashboard_files_tab_run.png -------------------------------------------------------------------------------- /notebook/__main__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | if __name__ == '__main__': 4 | from notebook import notebookapp as app 5 | app.launch_new_instance() 6 | -------------------------------------------------------------------------------- /docs/source/examples/Notebook/images/dashboard_files_tab_btns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0101011/notebook/master/docs/source/examples/Notebook/images/dashboard_files_tab_btns.png -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: auto 6 | threshold: 10 7 | patch: 8 | default: 9 | target: 0% 10 | -------------------------------------------------------------------------------- /notebook/templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "error.html" %} 2 | {% block error_detail %} 3 |
{% trans %}You are requesting a page that does not exist!{% endtrans %}
4 | {% endblock %} 5 | 6 | -------------------------------------------------------------------------------- /notebook/static/base/less/style.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * 3 | * IPython base 4 | * 5 | */ 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "flexbox.less"; 9 | @import "error.less"; 10 | -------------------------------------------------------------------------------- /notebook/bundler/__main__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Jupyter Development Team. 2 | # Distributed under the terms of the Modified BSD License. 3 | 4 | from .bundlerextensions import main 5 | 6 | if __name__ == '__main__': 7 | main() -------------------------------------------------------------------------------- /docs/source/examples/utils/list_pyfiles.ipy: -------------------------------------------------------------------------------- 1 | # A simple IPython script that provides Notebook links to .py files in the cwd 2 | 3 | from IPython.display import FileLink, display 4 | files =!ls *.py 5 | for f in files: 6 | display(FileLink(f)) -------------------------------------------------------------------------------- /notebook/i18n/nbjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "domain": "nbjs", 3 | "supported_languages": [ 4 | "zh-CN" 5 | ], 6 | "locale_data": { 7 | "nbjs": { 8 | "": { 9 | "domain": "nbjs" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /docs/source/examples/utils/list_subdirs.ipy: -------------------------------------------------------------------------------- 1 | # A simple IPython script that lists files in all subdirs 2 | 3 | from IPython.display import FileLinks, display 4 | dirs =!ls -d */ 5 | for d in dirs: 6 | if d != '__pycache__/': 7 | display(FileLinks(d)) -------------------------------------------------------------------------------- /docs/environment.yml: -------------------------------------------------------------------------------- 1 | name: notebook_docs 2 | dependencies: 3 | - python=3.5 4 | - sphinx_rtd_theme 5 | - jinja2 6 | - tornado 7 | - nbformat 8 | - jupyter_client 9 | - ipykernel 10 | - sphinx 11 | - pip: 12 | - nbsphinx 13 | - Send2Trash 14 | - prometheus_client 15 | -------------------------------------------------------------------------------- /docs/source/development_faq.rst: -------------------------------------------------------------------------------- 1 | .. _development_faq: 2 | 3 | Developer FAQ 4 | ============= 5 | 6 | 1. How do I install a prerelease version such as a beta or release candidate? 7 | 8 | .. code-block:: bash 9 | 10 | python -m pip install notebook --pre --upgrade 11 | -------------------------------------------------------------------------------- /notebook/static/notebook/less/highlight-refs.less: -------------------------------------------------------------------------------- 1 | /* load the codemirror defaults as LESS so that highlight.less 2 | can load default theme declarations by reference without pulling in the 3 | nasty positioning 4 | */ 5 | @import (less) "../../components/codemirror/lib/codemirror.css"; 6 | -------------------------------------------------------------------------------- /git-hooks/install-hooks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DOTGIT=`git rev-parse --git-dir` 4 | TOPLEVEL=`git rev-parse --show-toplevel` 5 | TO=${DOTGIT}/hooks 6 | FROM=${TOPLEVEL}/git-hooks 7 | 8 | ln -s ${FROM}/post-checkout ${TO}/post-checkout 9 | ln -s ${FROM}/post-merge ${TO}/post-merge 10 | -------------------------------------------------------------------------------- /notebook/services/security/__init__.py: -------------------------------------------------------------------------------- 1 | # URI for the CSP Report. Included here to prevent a cyclic dependency. 2 | # csp_report_uri is needed both by the BaseHandler (for setting the report-uri) 3 | # and by the CSPReportHandler (which depends on the BaseHandler). 4 | csp_report_uri = r"/api/security/csp-report" 5 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 6, 4 | "sourceType": "module" 5 | }, 6 | "rules": { 7 | "semi": 1, 8 | "no-cond-assign": 2, 9 | "no-debugger": 2, 10 | "comma-dangle": 0, 11 | "no-unreachable" : 2 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /notebook/static/notebook/less/kernelselector.less: -------------------------------------------------------------------------------- 1 | #kernel_logo_widget { 2 | .current_kernel_logo { 3 | display: none; 4 | .navbar-vertical-align(32px); 5 | width: 32px; 6 | height: 32px; 7 | } 8 | } 9 | 10 | [dir="rtl"] #kernel_logo_widget { 11 | .pull-left(); 12 | } 13 | -------------------------------------------------------------------------------- /git-hooks/README.md: -------------------------------------------------------------------------------- 1 | git hooks for Jupyter 2 | 3 | add these to your `.git/hooks` 4 | 5 | For now, we just have `post-checkout` and `post-merge`, 6 | both of which attempt to rebuild javascript and css sourcemaps, 7 | so make sure that you have a fully synced repo whenever you checkout or pull. 8 | 9 | To use these hooks, run `./install-hooks.sh`. 10 | -------------------------------------------------------------------------------- /notebook/static/notebook/less/quickhelp.less: -------------------------------------------------------------------------------- 1 | .quickhelp { 2 | .hbox(); 3 | line-height: 1.8em; 4 | } 5 | .shortcut_key { 6 | display: inline-block; 7 | width: 21ex; 8 | text-align: right; 9 | font-family: @font-family-monospace; 10 | } 11 | 12 | .shortcut_descr { 13 | display: inline-block; 14 | .box-flex1(); 15 | } 16 | -------------------------------------------------------------------------------- /notebook/static/notebook/less/style_noapp.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * 3 | * IPython notebook 4 | * 5 | */ 6 | @import "variables.less"; 7 | @import "ansicolors.less"; 8 | @import "cell.less"; 9 | @import "codecell.less"; 10 | @import "codemirror.less"; 11 | @import "highlight.less"; 12 | @import "outputarea.less"; 13 | @import "renderedhtml.less"; 14 | @import "textcell.less"; 15 | -------------------------------------------------------------------------------- /notebook/static/terminal/css/override.css: -------------------------------------------------------------------------------- 1 | /*This file contains any manual css for this page that needs to override the global styles. 2 | This is only required when different pages style the same element differently. This is just 3 | a hack to deal with our current css styles and no new styling should be added in this file.*/ 4 | 5 | body { 6 | overflow: hidden; 7 | } 8 | -------------------------------------------------------------------------------- /notebook/tests/test_i18n.py: -------------------------------------------------------------------------------- 1 | import nose.tools as nt 2 | 3 | from notebook import i18n 4 | 5 | def test_parse_accept_lang_header(): 6 | palh = i18n.parse_accept_lang_header 7 | nt.assert_equal(palh(''), []) 8 | nt.assert_equal(palh('zh-CN,en-GB;q=0.7,en;q=0.3'), 9 | ['en', 'en_GB', 'zh_CN']) 10 | nt.assert_equal(palh('nl,fr;q=0'), ['nl']) 11 | -------------------------------------------------------------------------------- /notebook/static/notebook/css/override.css: -------------------------------------------------------------------------------- 1 | /*This file contains any manual css for this page that needs to override the global styles. 2 | This is only required when different pages style the same element differently. This is just 3 | a hack to deal with our current css styles and no new styling should be added in this file.*/ 4 | 5 | #ipython-main-app { 6 | position: relative; 7 | } 8 | -------------------------------------------------------------------------------- /notebook/static/notebook/less/modal.less: -------------------------------------------------------------------------------- 1 | .modal .modal-body { 2 | 3 | .rename-message { 4 | 5 | } 6 | .move-path { 7 | display: flex; 8 | flex-direction: row; 9 | justify-content: space; 10 | align-items: center; 11 | 12 | .server-root { 13 | padding-right: 20px; 14 | } 15 | .path-input { 16 | flex: 1; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /notebook/static/auth/css/override.css: -------------------------------------------------------------------------------- 1 | /*This file contains any manual css for this page that needs to override the global styles. 2 | This is only required when different pages style the same element differently. This is just 3 | a hack to deal with our current css styles and no new styling should be added in this file.*/ 4 | 5 | #ipython-main-app { 6 | padding-top: 50px; 7 | text-align: center; 8 | } -------------------------------------------------------------------------------- /notebook/static/base/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixin CSS classes 2 | 3 | .border-box-sizing { 4 | box-sizing: border-box; 5 | -moz-box-sizing: border-box; 6 | -webkit-box-sizing: border-box; 7 | } 8 | 9 | .corner-all { 10 | border-radius: @border-radius-base; 11 | } 12 | 13 | .border-radius(@radius) { 14 | border-radius: @radius; 15 | } 16 | 17 | .no-padding { 18 | padding: 0px; 19 | } 20 | -------------------------------------------------------------------------------- /notebook/i18n/babel_nbjs.cfg: -------------------------------------------------------------------------------- 1 | [javascript: notebook/static/base/js/*.js] 2 | extract_messages = $._, i18n.msg._ 3 | 4 | [javascript: notebook/static/notebook/js/*.js] 5 | extract_messages = $._, i18n.msg._ 6 | 7 | [javascript: notebook/static/notebook/js/celltoolbarpresets/*.js] 8 | extract_messages = $._, i18n.msg._ 9 | 10 | [javascript: notebook/static/tree/js/*.js] 11 | extract_messages = $._, i18n.msg._ 12 | -------------------------------------------------------------------------------- /notebook/static/auth/js/main.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Jupyter Development Team. 2 | // Distributed under the terms of the Modified BSD License. 3 | 4 | define(['./loginmain', './logoutmain', 'bidi/bidi'], function (login_main, logout_main, bidi) { 5 | if(bidi.isMirroringEnabled()){ 6 | $("body").attr("dir","rtl"); 7 | } 8 | return { 9 | login_main: login_main, 10 | logout_main: logout_main 11 | }; 12 | }); 13 | -------------------------------------------------------------------------------- /notebook/static/style/ipython.less: -------------------------------------------------------------------------------- 1 | // minimal imports from bootstrap - only variables and mixins 2 | @import "../components/bootstrap/less/variables.less"; 3 | @import "../components/bootstrap/less/mixins.less"; 4 | 5 | // minimal imports from font-awesome 6 | @import "../components/font-awesome/less/variables.less"; 7 | 8 | // base 9 | @import "../base/less/style.less"; 10 | 11 | // notebook 12 | @import "../notebook/less/style_noapp.less"; 13 | -------------------------------------------------------------------------------- /notebook/static/auth/js/logoutmain.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Jupyter Development Team. 2 | // Distributed under the terms of the Modified BSD License. 3 | 4 | define(['base/js/namespace', 'base/js/page'], function(IPython, page) { 5 | function logout_main() { 6 | var page_instance = new page.Page('div#header', 'div#site'); 7 | page_instance.show(); 8 | 9 | IPython.page = page_instance; 10 | } 11 | return logout_main; 12 | }); 13 | -------------------------------------------------------------------------------- /notebook/services/shutdown.py: -------------------------------------------------------------------------------- 1 | """HTTP handler to shut down the notebook server. 2 | """ 3 | from tornado import web, ioloop 4 | from notebook.base.handlers import IPythonHandler 5 | 6 | class ShutdownHandler(IPythonHandler): 7 | @web.authenticated 8 | def post(self): 9 | self.log.info("Shutting down on /api/shutdown request.") 10 | ioloop.IOLoop.current().stop() 11 | 12 | 13 | default_handlers = [ 14 | (r"/api/shutdown", ShutdownHandler), 15 | ] 16 | -------------------------------------------------------------------------------- /notebook/static/base/less/error.less: -------------------------------------------------------------------------------- 1 | div.error { 2 | margin: 2em; 3 | text-align: center; 4 | } 5 | 6 | div.error > h1 { 7 | font-size: 500%; 8 | line-height: normal; 9 | } 10 | 11 | div.error > p { 12 | font-size: 200%; 13 | line-height: normal; 14 | } 15 | 16 | div.traceback-wrapper { 17 | text-align: left; 18 | max-width: 800px; 19 | margin: auto; 20 | pre.traceback { 21 | max-height: 600px; 22 | overflow: auto; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /notebook/static/custom/custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | Placeholder for custom user CSS 3 | 4 | mainly to be overridden in profile/static/custom/custom.css 5 | 6 | This will always be an empty file in IPython 7 | */ 8 | 9 | /*for the error , connecting & renaming window*/ 10 | 11 | [dir="rtl"] .modal-footer { 12 | text-align : left !important; 13 | } 14 | 15 | [dir="rtl"] .close { 16 | float : left; 17 | } 18 | 19 | [dir="rtl"] .fa-step-forward::before { 20 | content: "\f048"; 21 | } 22 | -------------------------------------------------------------------------------- /docs/jsdoc_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "markdown": { 3 | "parser": "gfm" 4 | }, 5 | "plugins": [ 6 | "plugins/markdown" , 7 | "jsdoc_plugin.js" 8 | ], 9 | "source": { 10 | "include": [ 11 | "../notebook/static/notebook/js/notebook.js" 12 | ] 13 | }, 14 | "tags": { 15 | "allowUnknownTags": true 16 | }, 17 | "templates": { 18 | "cleverLinks": false, 19 | "monospaceLinks": false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /notebook/static/auth/less/login.less: -------------------------------------------------------------------------------- 1 | // Custom styles for login.html 2 | .center-nav { 3 | display: inline-block; 4 | // pull the lower margin back 5 | margin-bottom: -4px; 6 | } 7 | 8 | [dir="rtl"] .center-nav { 9 | form.pull-left { 10 | .pull-right(); 11 | } 12 | .navbar-text { 13 | float: right; 14 | } 15 | } 16 | 17 | [dir="rtl"] .navbar-inner { 18 | text-align: right; 19 | } 20 | 21 | [dir="rtl"] div.text-left { 22 | .text-right(); 23 | } 24 | -------------------------------------------------------------------------------- /notebook/transutils.py: -------------------------------------------------------------------------------- 1 | """Translation related utilities. When imported, injects _ to builtins""" 2 | 3 | # Copyright (c) Jupyter Development Team. 4 | # Distributed under the terms of the Modified BSD License. 5 | 6 | import os 7 | import gettext 8 | 9 | 10 | # Set up message catalog access 11 | base_dir = os.path.realpath(os.path.join(__file__, '..', '..')) 12 | trans = gettext.translation('notebook', localedir=os.path.join(base_dir, 'notebook/i18n'), fallback=True) 13 | _ = trans.gettext 14 | -------------------------------------------------------------------------------- /notebook/static/auth/js/loginmain.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Jupyter Development Team. 2 | // Distributed under the terms of the Modified BSD License. 3 | 4 | define(['jquery', 'base/js/namespace', 'base/js/page'], function($, IPython, page) { 5 | function login_main() { 6 | var page_instance = new page.Page('div#header', 'div#site'); 7 | page_instance.show(); 8 | $('input#password_input').focus(); 9 | IPython.page = page_instance; 10 | } 11 | return login_main; 12 | }); 13 | -------------------------------------------------------------------------------- /notebook/static/base/js/i18n.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Jupyter Development Team. 2 | // Distributed under the terms of the Modified BSD License. 3 | 4 | // Module to handle i18n ( Internationalization ) and translated UI 5 | 6 | define([ 7 | 'jed' 8 | ], function(Jed) { 9 | "use strict"; 10 | 11 | var i18n = new Jed(document.nbjs_translations); 12 | i18n._ = i18n.gettext; 13 | i18n.msg = i18n; // Just a place holder until the init promise resolves. 14 | 15 | return i18n; 16 | }); 17 | -------------------------------------------------------------------------------- /docs/jsdoc_plugin.js: -------------------------------------------------------------------------------- 1 | exports.handlers = { 2 | newDoclet: function(e) { 3 | // e.doclet will refer to the newly created doclet 4 | // you can read and modify properties of that doclet if you wish 5 | if (typeof e.doclet.name === 'string') { 6 | if (e.doclet.name[0] == '_') { 7 | console.log('Private method "' + e.doclet.longname + '" not documented.'); 8 | e.doclet.memberof = '{% trans %}The error was:{% endtrans %}
24 |{{message}}
26 | Bar
', 22 | 'Baz
', 23 | 'x = 1',
24 | 'x = 1'
25 | ]
26 | nb.append(*cell_text, cell_type="markdown")
27 | nb.run_all()
28 | rendered_contents = get_rendered_contents(nb)
29 | assert rendered_contents == expected_contents
30 |
--------------------------------------------------------------------------------
/docs/autogen_config.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import os
4 | from notebook.notebookapp import NotebookApp
5 |
6 | header = """\
7 | .. _config:
8 |
9 |
10 | Config file and command line options
11 | ====================================
12 |
13 | The notebook server can be run with a variety of command line arguments.
14 | A list of available options can be found below in the :ref:`options section
15 | Python <%- pyver %>')({ 24 | pyver: sys_info.sys_version }); 25 | var kinfo = $('').attr('id', '#about-kinfo').text(i18n.msg._('Waiting for kernel to be available...')); 26 | var body = $(''); 27 | body.append($('').text(i18n.msg._('Server Information:'))); 28 | body.append($('').html(text)); 29 | body.append($('').text(i18n.msg._('Current Kernel Information:'))); 30 | body.append(kinfo); 31 | } else { 32 | var text = i18n.msg._('Could not access sys_info variable for version information.'); 33 | var body = $(''); 34 | body.append($('').text(i18n.msg._('Cannot find sys_info!'))); 35 | body.append($('').html(text)); 36 | } 37 | dialog.modal({ 38 | title: i18n.msg._('About Jupyter Notebook'), 39 | body: body, 40 | buttons: { 'OK': {} } 41 | }); 42 | try { 43 | IPython.notebook.session.kernel.kernel_info(function (data) { 44 | kinfo.html($('').text(data.content.banner)); 45 | }); 46 | } catch (e) { 47 | kinfo.html($('').text(i18n.msg._('unable to contact kernel'))); 48 | } 49 | }); 50 | }); 51 | -------------------------------------------------------------------------------- /notebook/static/notebook/js/codemirror-ipythongfm.js: -------------------------------------------------------------------------------- 1 | // IPython GFM (GitHub Flavored Markdown) mode is just a slightly altered GFM 2 | // Mode with support for latex. 3 | // 4 | // Latex support was supported by Codemirror GFM as of 5 | // https://github.com/codemirror/CodeMirror/pull/567 6 | // But was later removed in 7 | // https://github.com/codemirror/CodeMirror/commit/d9c9f1b1ffe984aee41307f3e927f80d1f23590c 8 | 9 | 10 | (function(mod) { 11 | if (typeof exports == "object" && typeof module == "object"){ // CommonJS 12 | mod(requirejs("codemirror/lib/codemirror") 13 | ,requirejs("codemirror/addon/mode/multiplex") 14 | ,requirejs("codemirror/mode/gfm/gfm") 15 | ,requirejs("codemirror/mode/stex/stex") 16 | ); 17 | } else if (typeof define == "function" && define.amd){ // AMD 18 | define(["codemirror/lib/codemirror" 19 | ,"codemirror/addon/mode/multiplex" 20 | ,"codemirror/mode/python/python" 21 | ,"codemirror/mode/stex/stex" 22 | ], mod); 23 | } else {// Plain browser env 24 | mod(CodeMirror); 25 | } 26 | })( function(CodeMirror){ 27 | "use strict"; 28 | 29 | CodeMirror.defineMode("ipythongfm", function(config, parserConfig) { 30 | 31 | var gfm_mode = CodeMirror.getMode(config, "gfm"); 32 | var tex_mode = CodeMirror.getMode(config, "stex"); 33 | 34 | return CodeMirror.multiplexingMode( 35 | gfm_mode, 36 | // By defining the $$ delimiter before the $ delimiter we don't run 37 | // into the problem that $$ is interpreted as two consecutive $. 38 | { 39 | open: "$$", close: "$$", 40 | mode: tex_mode, 41 | delimStyle: "delimit" 42 | }, 43 | { 44 | open: "$", close: "$", 45 | mode: tex_mode, 46 | delimStyle: "delimit" 47 | }, 48 | { 49 | open: "\\(", close: "\\)", 50 | mode: tex_mode, 51 | delimStyle: "delimit" 52 | }, 53 | { 54 | open: "\\[", close: "\\]", 55 | mode: tex_mode, 56 | delimStyle: "delimit" 57 | } 58 | // .. more multiplexed styles can follow here 59 | ); 60 | }, 'gfm'); 61 | 62 | CodeMirror.defineMIME("text/x-ipythongfm", "ipythongfm"); 63 | }) 64 | -------------------------------------------------------------------------------- /notebook/services/config/tests/test_config_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | """Test the config webservice API.""" 3 | 4 | import json 5 | 6 | import requests 7 | 8 | from notebook.utils import url_path_join 9 | from notebook.tests.launchnotebook import NotebookTestBase 10 | 11 | 12 | class ConfigAPI(object): 13 | """Wrapper for notebook API calls.""" 14 | def __init__(self, request): 15 | self.request = request 16 | 17 | def _req(self, verb, section, body=None): 18 | response = self.request(verb, 19 | url_path_join('api/config', section), 20 | data=body, 21 | ) 22 | response.raise_for_status() 23 | return response 24 | 25 | def get(self, section): 26 | return self._req('GET', section) 27 | 28 | def set(self, section, values): 29 | return self._req('PUT', section, json.dumps(values)) 30 | 31 | def modify(self, section, values): 32 | return self._req('PATCH', section, json.dumps(values)) 33 | 34 | class APITest(NotebookTestBase): 35 | """Test the config web service API""" 36 | def setUp(self): 37 | self.config_api = ConfigAPI(self.request) 38 | 39 | def test_create_retrieve_config(self): 40 | sample = {'foo': 'bar', 'baz': 73} 41 | r = self.config_api.set('example', sample) 42 | self.assertEqual(r.status_code, 204) 43 | 44 | r = self.config_api.get('example') 45 | self.assertEqual(r.status_code, 200) 46 | self.assertEqual(r.json(), sample) 47 | 48 | def test_modify(self): 49 | sample = {'foo': 'bar', 'baz': 73, 50 | 'sub': {'a': 6, 'b': 7}, 'sub2': {'c': 8}} 51 | self.config_api.set('example', sample) 52 | 53 | r = self.config_api.modify('example', {'foo': None, # should delete foo 54 | 'baz': 75, 55 | 'wib': [1,2,3], 56 | 'sub': {'a': 8, 'b': None, 'd': 9}, 57 | 'sub2': {'c': None} # should delete sub2 58 | }) 59 | self.assertEqual(r.status_code, 200) 60 | self.assertEqual(r.json(), {'baz': 75, 'wib': [1,2,3], 61 | 'sub': {'a': 8, 'd': 9}}) 62 | 63 | def test_get_unknown(self): 64 | # We should get an empty config dictionary instead of a 404 65 | r = self.config_api.get('nonexistant') 66 | self.assertEqual(r.status_code, 200) 67 | self.assertEqual(r.json(), {}) 68 | 69 | -------------------------------------------------------------------------------- /notebook/notebook/handlers.py: -------------------------------------------------------------------------------- 1 | """Tornado handlers for the live notebook view.""" 2 | 3 | # Copyright (c) Jupyter Development Team. 4 | # Distributed under the terms of the Modified BSD License. 5 | 6 | from collections import namedtuple 7 | import os 8 | from tornado import web 9 | HTTPError = web.HTTPError 10 | 11 | from ..base.handlers import ( 12 | IPythonHandler, FilesRedirectHandler, path_regex, 13 | ) 14 | from ..utils import url_escape 15 | from ..transutils import _ 16 | 17 | 18 | def get_custom_frontend_exporters(): 19 | from nbconvert.exporters.base import get_export_names, get_exporter 20 | 21 | ExporterInfo = namedtuple('ExporterInfo', ['name', 'display']) 22 | 23 | for name in sorted(get_export_names()): 24 | exporter = get_exporter(name)() 25 | ux_name = getattr(exporter, 'export_from_notebook', None) 26 | if ux_name is not None: 27 | display = _('{} ({})'.format(ux_name, exporter.file_extension)) 28 | yield ExporterInfo(name, display) 29 | 30 | 31 | class NotebookHandler(IPythonHandler): 32 | 33 | @web.authenticated 34 | def get(self, path): 35 | """get renders the notebook template if a name is given, or 36 | redirects to the '/files/' handler if the name is not given.""" 37 | path = path.strip('/') 38 | cm = self.contents_manager 39 | 40 | # will raise 404 on not found 41 | try: 42 | model = cm.get(path, content=False) 43 | except web.HTTPError as e: 44 | if e.status_code == 404 and 'files' in path.split('/'): 45 | # 404, but '/files/' in URL, let FilesRedirect take care of it 46 | return FilesRedirectHandler.redirect_to_files(self, path) 47 | else: 48 | raise 49 | if model['type'] != 'notebook': 50 | # not a notebook, redirect to files 51 | return FilesRedirectHandler.redirect_to_files(self, path) 52 | name = path.rsplit('/', 1)[-1] 53 | self.write(self.render_template('notebook.html', 54 | notebook_path=path, 55 | notebook_name=name, 56 | kill_kernel=False, 57 | mathjax_url=self.mathjax_url, 58 | mathjax_config=self.mathjax_config, 59 | get_custom_frontend_exporters=get_custom_frontend_exporters 60 | ) 61 | ) 62 | 63 | 64 | #----------------------------------------------------------------------------- 65 | # URL to handler mappings 66 | #----------------------------------------------------------------------------- 67 | 68 | 69 | default_handlers = [ 70 | (r"/notebooks%s" % path_regex, NotebookHandler), 71 | ] 72 | 73 | -------------------------------------------------------------------------------- /notebook/tests/base/security.js: -------------------------------------------------------------------------------- 1 | safe_tests = [ 2 | "
Hi there
", 3 | '