├── config.png
├── custom
└── custom.css
├── jupyter_notebook_config.py
├── nbconfig
└── notebook.json
├── .gitignore
├── README.md
└── Notebook.ipynb
/config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GokuMohandas/jupyter-config/HEAD/config.png
--------------------------------------------------------------------------------
/custom/custom.css:
--------------------------------------------------------------------------------
1 | .container {
2 | width:833px !important;
3 | margin: 0 auto !important;
4 | padding: 10px !important;
5 | }
6 |
7 | div#menubar-container {
8 | width:1000px !important;
9 | padding: 10px !important;
10 | }
11 |
12 | div#maintoolbar-container{
13 | width:1200px !important;
14 | padding: 10px !important;
15 | }
--------------------------------------------------------------------------------
/jupyter_notebook_config.py:
--------------------------------------------------------------------------------
1 | # Configuration file for Jupyter Notebooks
2 | # __author__: Goku Mohandas
3 | #
4 |
5 | import os
6 | from IPython.lib import passwd
7 |
8 | c = get_config()
9 |
10 | # Don't open browser at launch
11 | c.NotebookApp.open_browser = True
12 |
13 | # Port to open Jupyter Notebook
14 | c.NotebookApp.port = 8888
15 |
16 | # # Notebook directory
17 | # c.NotebookApp.notebook_dir = "%s/notebooks"%(os.environ['CODE_PATH'])
18 |
19 | # c.NotebookApp.password = passwd('password')
20 | c.NotebookApp.token = ''
--------------------------------------------------------------------------------
/nbconfig/notebook.json:
--------------------------------------------------------------------------------
1 | {
2 | "load_extensions": {
3 | "code_font_size/code_font_size": false,
4 | "dragdrop/main": true,
5 | "spellchecker/main": true,
6 | "codefolding/main": true,
7 | "collapsible_headings/main": false,
8 | "toggle_all_line_numbers/main": true,
9 | "autosavetime/main": true,
10 | "toc2/main": true,
11 | "ruler/main": true,
12 | "jupyter-js-widgets/extension": true,
13 | "nbextensions_configurator/config_menu/main": true
14 | },
15 | "toc2": {
16 | "threshold": "5"
17 | },
18 | "autosavetime_starting_interval": "1",
19 | "stored_keymap": "sublime",
20 | "Cell": {
21 | "cm_config": {
22 | "lineNumbers": true
23 | }
24 | },
25 | "spellchecker": {
26 | "add_toolbar_button": false
27 | },
28 | "autosavetime_show_selector": false,
29 | "autosavetime_set_starting_interval": true
30 | }
31 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Mac files
2 | *.DS_Store
3 |
4 | # Byte-compiled / optimized / DLL files
5 | __pycache__/
6 | *.py[cod]
7 | *$py.class
8 |
9 | # C extensions
10 | *.so
11 |
12 | # Data
13 | *.rdb
14 | *.pem
15 | *.m4v
16 | *.key
17 | *.mov
18 | *.pages
19 |
20 | # Distribution / packaging
21 | .Python
22 | venv/
23 | build/
24 | develop-eggs/
25 | dist/
26 | downloads/
27 | eggs/
28 | .eggs/
29 | lib/
30 | lib64/
31 | parts/
32 | sdist/
33 | var/
34 | *.egg-info/
35 | .installed.cfg
36 | *.egg
37 | *.pyc
38 |
39 | # PyInstaller
40 | *.manifest
41 | *.spec
42 |
43 | # Installer logs
44 | pip-log.txt
45 | pip-delete-this-directory.txt
46 |
47 | # Unit test / coverage reports
48 | htmlcov/
49 | .tox/
50 | .coverage
51 | .coverage.*
52 | .cache
53 | nosetests.xml
54 | coverage.xml
55 | *,cover
56 | .hypothesis/
57 |
58 | # Translations
59 | *.mo
60 | *.pot
61 |
62 | # Django stuff:
63 | *.log
64 | local_settings.py
65 |
66 | # Flask instance folder
67 | instance/
68 | .webassets-cache
69 |
70 | # Scrapy stuff:
71 | .scrapy
72 |
73 | # Sphinx documentation
74 | docs/_build/
75 |
76 | # PyBuilder
77 | target/
78 |
79 | # IPython Notebook
80 | .ipynb_checkpoints
81 |
82 | # pyenv
83 | .python-version
84 |
85 | # celery beat schedule file
86 | celerybeat-schedule
87 |
88 | # dotenv
89 | .env
90 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Jupyter Configuration
2 | Configuration files for a customized Jupyter notebook feature set. Features include:
3 | 1. Table of contents
4 | 2. Line numbers
5 | 3. Automatic saves
6 | 4. CSS styling
7 | 5. Password and token protection (inside jupyter_notebook_config.py)
8 |
9 |
10 | ## Getting started
11 | 1. Create a virtual environment
12 | ```bash
13 | python3 -m pip install --upgrade pip
14 | python3 -m pip install virtualenv
15 | virtualenv -p python3.6 venv
16 | source venv/bin/activate
17 | ```
18 | 2. Install necessary packages
19 | ```bash
20 | python3 -m pip install jupyter
21 | python3 -m pip install ipykernel
22 | python3 -m pip install jupyter_contrib_nbextensions
23 | ```
24 |
25 | 3. Create a kernel for this proejct
26 | ```bash
27 | ipython kernel install --user --name=jupyter_config
28 | ```
29 |
30 | 4. Create the configuration files
31 | ```bash
32 | jupyter notebook --generate-config -y
33 | jupyter contrib nbextension install --user
34 | rm -rf ~/.jupyter/jupyter_notebook_config.json
35 | rm -rf ~/.jupyter/jupyter_nbconvert_config.json
36 | cp jupyter_notebook_config.py ~/.jupyter/
37 | mkdir ~/.jupyter/custom
38 | cp custom/custom.css ~/.jupyter/custom/
39 | mkdir ~/.jupyter/nbconfig
40 | cp nbconfig/notebook.json ~/.jupyter/nbconfig/
41 | ```
42 |
43 | 5. Run Jupyter
44 | ```bash
45 | jupyter notebook
46 | ```
47 |
48 | 6. Create a notebook by pressing `New` → `jupyter_config`
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/Notebook.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {
6 | "toc": true
7 | },
8 | "source": [
9 | "