├── .readthedocs.yml ├── .gitignore ├── README.md ├── docs ├── Makefile ├── _build │ ├── .buildinfo │ ├── .doctrees │ │ ├── environment.pickle │ │ ├── files │ │ │ ├── code-runner.doctree │ │ │ ├── extensions.doctree │ │ │ ├── fonts.doctree │ │ │ ├── installation.doctree │ │ │ ├── keybindings.doctree │ │ │ ├── linting.doctree │ │ │ ├── references.doctree │ │ │ ├── settings.doctree │ │ │ ├── themes.doctree │ │ │ ├── toc.doctree │ │ │ └── venv.doctree │ │ └── index.doctree │ ├── _sources │ │ ├── files │ │ │ ├── code-runner.md.txt │ │ │ ├── extensions.md.txt │ │ │ ├── fonts.md.txt │ │ │ ├── installation.md.txt │ │ │ ├── keybindings.md.txt │ │ │ ├── linting.md.txt │ │ │ ├── references.md.txt │ │ │ ├── settings.md.txt │ │ │ ├── themes.md.txt │ │ │ ├── toc.md.txt │ │ │ └── venv.md.txt │ │ └── index.rst.txt │ ├── _static │ │ ├── alabaster.css │ │ ├── basic.css │ │ ├── custom.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── jquery-3.4.1.js │ │ ├── jquery.js │ │ ├── language_data.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── underscore-1.3.1.js │ │ └── underscore.js │ ├── files │ │ ├── code-runner.html │ │ ├── extensions.html │ │ ├── fonts.html │ │ ├── installation.html │ │ ├── keybindings.html │ │ ├── linting.html │ │ ├── references.html │ │ ├── settings.html │ │ ├── themes.html │ │ ├── toc.html │ │ └── venv.html │ ├── genindex.html │ ├── index.html │ ├── objects.inv │ ├── search.html │ └── searchindex.js ├── _static │ └── custom.css ├── conf.py ├── files │ ├── code-runner.md │ ├── debugging.md │ ├── extensions.md │ ├── fonts.md │ ├── installation.md │ ├── keymaps.md │ ├── linting.md │ ├── settings.md │ ├── testing.md │ ├── themes.md │ └── venv.md ├── index.rst ├── make.bat └── requirements.txt ├── ext └── logo.png └── requirements.txt / .readthedocs.yml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Build documentation in the docs/ directory with Sphinx 9 | sphinx: 10 | configuration: docs/conf.py 11 | 12 | # Build documentation with MkDocs 13 | #mkdocs: 14 | # configuration: mkdocs.yml 15 | 16 | # Optionally build your docs in additional formats such as PDF and ePub 17 | formats: all 18 | 19 | # Optionally set the version of Python and requirements required to build your docs 20 | python: 21 | version: 3.7 22 | install: 23 | - requirements: docs/requirements.txt 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/python 3 | # Edit at https://www.gitignore.io/?templates=python 4 | 5 | ### Python ### 6 | # Byte-compiled / optimized / DLL files 7 | __pycache__/ 8 | *.py[cod] 9 | *$py.class 10 | 11 | # C extensions 12 | *.so 13 | 14 | # Distribution / packaging 15 | .vscode/ 16 | venv/ 17 | .Python 18 | develop-eggs/ 19 | dist/ 20 | downloads/ 21 | eggs/ 22 | .eggs/ 23 | lib/ 24 | lib64/ 25 | parts/ 26 | sdist/ 27 | var/ 28 | wheels/ 29 | pip-wheel-metadata/ 30 | share/python-wheels/ 31 | *.egg-info/ 32 | .installed.cfg 33 | *.egg 34 | MANIFEST 35 | 36 | # PyInstaller 37 | # Usually these files are written by a python script from a template 38 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 39 | *.manifest 40 | *.spec 41 | 42 | # Installer logs 43 | pip-log.txt 44 | pip-delete-this-directory.txt 45 | 46 | # Unit test / coverage reports 47 | htmlcov/ 48 | .tox/ 49 | .nox/ 50 | .coverage 51 | .coverage.* 52 | .cache 53 | nosetests.xml 54 | coverage.xml 55 | *.cover 56 | .hypothesis/ 57 | .pytest_cache/ 58 | 59 | # Translations 60 | *.mo 61 | *.pot 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | #docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # pipenv 76 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 77 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 78 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 79 | # install all needed dependencies. 80 | #Pipfile.lock 81 | 82 | # celery beat schedule file 83 | celerybeat-schedule 84 | 85 | # SageMath parsed files 86 | *.sage.py 87 | 88 | # Spyder project settings 89 | .spyderproject 90 | .spyproject 91 | 92 | # Rope project settings 93 | .ropeproject 94 | 95 | # Mr Developer 96 | .mr.developer.cfg 97 | .project 98 | .pydevproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | .dmypy.json 106 | dmypy.json 107 | 108 | # Pyre type checker 109 | .pyre/ 110 | 111 | # End of https://www.gitignore.io/api/python 112 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # How to Python in VS Code 🦄 4 | 5 | ## An Opinionated Guide 6 | 7 | Read the free guide at [py-vscode.readthedocs.io](https://py-vscode.readthedocs.io/en/latest/index.html) 8 | 9 | 10 |
11 | 12 | 13 | **This is an ongoing work. I need contributors. Specially, if you are doing python in VS Code on MacOS/Windows, please consider contributing.** 14 | 15 | ## Contribution Guidelines 16 | * This guideline has been made with [Sphinx](http://www.sphinx-doc.org/en/master/) and served with [Read The Docs](https://readthedocs.org/) ❤️ 17 | 18 | * The pages are written in `markdown.md` format and are located in `docs/files/` folder. If you want to make an edit (You're awesome 👍) 19 | 20 | * Clone the repo 21 | * Make your changes to the files in `docs/files/` 22 | * And send me a pull request 23 | 24 | * If you want to extend/add new pages to the guideline (Whoa, I owe you one 🔥) 25 | * Clone the repo 26 | * Make add new `newfile.md` in `docs/files` folder 27 | * Write your contents in markdown format 28 | * Add the new section in `docs/index.rst` file 29 | * And send me a pull request 30 | 31 | * If you want to build the website locally after making an edit (Please Breed 🔱) 32 | 33 | * Make a python environment, activate it and install the requirements via: 34 | ```python 35 | pip install -r requirements.txt 36 | ``` 37 | * Make your changes according to the above guildelines 38 | * From the root directory, run: 39 | ```python 40 | sphinx-build -b html docs/ docs/_build 41 | ``` 42 | * Navigate to `docs/_build/files` to find your newly built html pages. Open them in your browser for inspection. 43 | * If you are satisfied with your edits, send me a pull request. 44 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/_build/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: df76a27ba9bdfc5c3ce37c4fb0f30ae8 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/_build/.doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/code-runner.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/code-runner.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/extensions.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/extensions.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/fonts.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/fonts.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/installation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/installation.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/keybindings.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/keybindings.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/linting.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/linting.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/references.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/references.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/settings.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/settings.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/themes.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/themes.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/toc.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/toc.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/files/venv.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/files/venv.doctree -------------------------------------------------------------------------------- /docs/_build/.doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/.doctrees/index.doctree -------------------------------------------------------------------------------- /docs/_build/_sources/files/code-runner.md.txt: -------------------------------------------------------------------------------- 1 | # Running Python Scripts with Code Runner 🏃 2 | 3 | ## Installing Code Runner Extension 4 | Click the extension icon on the left most stripe and type `code runner` in the search bar. Click and install. 5 | 6 | ![Imgur](https://i.imgur.com/x2ZCGHk.png) 7 | 8 | ## Setting up Code Runner 9 | -------------------------------------------------------------------------------- /docs/_build/_sources/files/extensions.md.txt: -------------------------------------------------------------------------------- 1 | # Extensions 2 | -------------------------------------------------------------------------------- /docs/_build/_sources/files/fonts.md.txt: -------------------------------------------------------------------------------- 1 | # Fonts 2 | 3 | ## List of Awesome Fonts 4 | ## Installing Fonts on Ubuntu 5 | -------------------------------------------------------------------------------- /docs/_build/_sources/files/installation.md.txt: -------------------------------------------------------------------------------- 1 | # Setting up VS Code on Your Machine ⚙️ 2 | 3 | ## Installing VS Code 4 | Installing VS code is easy across all operating systems. 5 | * Just go to the link [here](https://code.visualstudio.com/Download) and select the distribution that corresponds to your OS. 6 | * Download the file and install 7 | 8 | ## Running VS Code 9 | * After you've completed the installation, open terminal and `cd` to your project folder. Then type: 10 | ``` 11 | $ code . 12 | ``` 13 | This will open your project in VS Code. Familiarize yourself with the GUI if you're using this for the first time. The left most stripe gives you multiple options and hovering over the icons will show you their corresponding functionalites. If you're using any third party extensions, their icons may also appear. Clicking on each of them will bring up extra actions in the succeeding column. 14 | 15 | The default icons are (from top to bottom): 16 | * Explorer 17 | * Search 18 | * Source Control (Git) 19 | * Debug 20 | * Extensions 21 | 22 | ![Imgur](https://i.imgur.com/1YVbAN4.png) 23 | 24 | ## Using the Integrated Terminal 25 | If you aren't migrating from any other terminal and haven't set up your preferred `keybindings` then you can open the integrated terminal by pressing `ctrl + ~` on your keyboard. This terminal is an exact replica of your `bash`/`zsh` terminal and can perform almost anything that you'd normally do in those. From now an on, unless explicitly mentioned otherwise, we'll be using the integrated terminal for the versatility and convenience it provides. 26 | 27 | ![Imgur](https://i.imgur.com/9Sa0ZZm.png) 28 | -------------------------------------------------------------------------------- /docs/_build/_sources/files/keybindings.md.txt: -------------------------------------------------------------------------------- 1 | # Shortcuts & Keybindings 2 | -------------------------------------------------------------------------------- /docs/_build/_sources/files/linting.md.txt: -------------------------------------------------------------------------------- 1 | # Linting 2 | 3 | ## Linting with Flake8 4 | 5 | ## Linting with Black 6 | -------------------------------------------------------------------------------- /docs/_build/_sources/files/references.md.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/_sources/files/references.md.txt -------------------------------------------------------------------------------- /docs/_build/_sources/files/settings.md.txt: -------------------------------------------------------------------------------- 1 | # Settings 2 | 3 | ## Syncing Your Settings & Extensions 4 | 5 | ## Shut up & Let Me Replicate Your Settings 6 | 7 | ### Replicating My Settings with a Single Click 8 | 9 | ### Customizing the Settings According to Your Need 10 | -------------------------------------------------------------------------------- /docs/_build/_sources/files/themes.md.txt: -------------------------------------------------------------------------------- 1 | # Themes 2 | 3 | ## Awesome Dark Themes 4 | 5 | ## Awesome Light Themes 6 | -------------------------------------------------------------------------------- /docs/_build/_sources/files/toc.md.txt: -------------------------------------------------------------------------------- 1 | ## Table of Contents 🚀🚀 2 | 3 | * Installation 4 | * Setting up virutal environment 5 | * Setting up conda environment 6 | * Why I prefer native virtual environment over conda 7 | environment 8 | * Selecting your environemt from command palette 9 | * Running python scripts with code runner 10 | * Linting with flake8 and black 11 | * Shortcuts and keybindings 12 | * Themes 13 | * Awesome Dark Themes 14 | * Awesome Light Themes 15 | * Fonts 16 | * Installing fonts on ubuntu 17 | * Awesome Coding Fonts 18 | * Extensions 19 | * Settings 20 | * Syncing your settings and extensions 21 | * Shut up and just let me replicate your settings 22 | * Replicating my settings with a single click 23 | * Customizing the settings according to your need 24 | -------------------------------------------------------------------------------- /docs/_build/_sources/files/venv.md.txt: -------------------------------------------------------------------------------- 1 | # Setting up Environments 🌲 2 | 3 | ## Why Environments are Necessary 4 | 5 | The main purpose of using environments is to create a segregation between the dependencies of different python projects. It eliminates (at least tries to) dependency conflicts since each project has it's own set of dependencies, isolated from one another. 6 | 7 | Suppose you are working on two projects, `Project_1` and `Project_2`, both of which have a dependency on the same library, let's say the awesome `Requests` library. Dependency conflict will arise, if for some reason, the two projects need different versions of `Request` library. For example, maybe `Project_1` needs `v1.0.0`, while `Project_2` requires the newer `v2.0.0`. 8 | 9 | This can easily be avoided by using individual environment for each project where all the dependencies of the corresponding project will reside. There are multiple ways you can create environment. We'll mainly focus on creating python3 based `conda environment` and native `virtual environment`. 10 | 11 | 12 | ## Conda Environment 13 | 14 | ### Installing Anaconda Distribution 15 | Install anaconda on your machine. I personally prefer miniconda over the full fledged anaconda. The installation guide can be found here: 16 | * [Linux](https://docs.anaconda.com/anaconda/install/linux/) 17 | * [MacOS](https://docs.anaconda.com/anaconda/install/mac-os/) 18 | 19 | ### Creating Conda Environment 20 | After installing anaconda, to create a python3 environment with a specific version of python, type the following command. This will create an environemnt named `myenv` with python 3.7: 21 | 22 | ```bash 23 | $ conda create -n myenv python=3.7 24 | ``` 25 | 26 | ### Activating Conda Environment 27 | After creating the conda environment, type the folling command to activate the `myenv` environment: 28 | ```bash 29 | $ conda activate myenv 30 | ``` 31 | 32 | ### Deactivating Conda Environment 33 | To deactivate, simply type: 34 | ```bash 35 | $ conda deactivate 36 | ``` 37 | 38 | 39 | ## Virtual Environment 40 | 41 | ### Installing python3-venv 42 | To create virtual environment, first you need to install `python3-venv`. Run: 43 | 44 | ``` 45 | $ sudo apt update 46 | $ sudo apt-get install python3-venv 47 | ``` 48 | 49 | ### Creating Virtual Environments 50 | Create a virtual environment named `myenv` via running: 51 | ```bash 52 | $ python3 -m venv myenv 53 | ``` 54 | You should see a folder named `myenv` in your current directory. This is the folder where all your project-specific dependencies are going to reside. 55 | 56 | ### Activating Virtual Environments 57 | To activate `myenv`, run: 58 | ```bash 59 | $ source myenv/bin/activate 60 | ``` 61 | 62 | ### Deactivating Virtual Environment 63 | To deactivate, simply type: 64 | ```bash 65 | $ deactivate 66 | ``` 67 | 68 | ## Selecting & Switching Between the Environments in VS Code 69 | 70 | * Press `ctrl+shift+P` to open VS Code's `command palette`. You should be seeing something like this: 71 | 72 | ![Imgur](https://i.imgur.com/7uYz5Pe.png) 73 | 74 | 75 | * Type `interpreter` in the search box. And select the `Python: Select Interpreter` option. You should see a list of all the available (both conda and virtual environments are shown) python environments. You should also see your recently created `myenv` environment there. Toggle and select your environment and you are good to go. 76 | 77 | ![Imgur](https://i.imgur.com/qF0aJYC.png) 78 | -------------------------------------------------------------------------------- /docs/_build/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. py-vscode documentation master file, created by 2 | sphinx-quickstart on Sat Sep 28 16:12:43 2019. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 7 | 8 | Introduction 9 | ********************* 10 | 11 | Although I've been tinkering with python for my Data Science projects since 2016, I only started coding professionally at the end of 2018. It wasn't easy to get accustomed to the workflow by any means and the rigor of a production and test driven environment was something completely different from what I was used to 😓. I had only been using all the tools and packages integrated into the amazing Anaconda Distribution which means Spyder as the IDE and the trusted old Jupyter Notebook for experimentation. I still use jupyter notebook, however, I've picked up **VS Code** as my primary editor not only due to the fact that everyone at my workplace uses that but also in my opinion it's one of the best language agnostic code editor, period 😁. So this post is an assortment of all the tools and practices that I've picked up throughout my development journey🔥. 12 | 13 | Here I'm using Linux as my primary development OS and almost all of the instructions apply to MacOS also. And About windows, 🤷‍. 14 | 15 | *********************** 16 | Table of Contents 🚀🚀 17 | *********************** 18 | 19 | .. toctree:: 20 | :maxdepth: 3 21 | 22 | files/installation 23 | files/venv 24 | files/code-runner 25 | files/linting 26 | files/keybindings 27 | files/themes 28 | files/fonts 29 | files/extensions 30 | files/settings 31 | 32 | ******************** 33 | Indices and Tables 34 | ******************** 35 | 36 | * :ref:`genindex` 37 | * :ref:`modindex` 38 | * :ref:`search` 39 | -------------------------------------------------------------------------------- /docs/_build/_static/alabaster.css: -------------------------------------------------------------------------------- 1 | @import url("basic.css"); 2 | 3 | /* -- page layout ----------------------------------------------------------- */ 4 | 5 | body { 6 | font-family: Arial; 7 | font-size: 19px; 8 | background-color: #fff; 9 | color: #000; 10 | margin: 0; 11 | padding: 0; 12 | } 13 | 14 | 15 | div.document { 16 | width: 940px; 17 | margin: 30px auto 0 auto; 18 | } 19 | 20 | div.documentwrapper { 21 | float: left; 22 | width: 100%; 23 | } 24 | 25 | div.bodywrapper { 26 | margin: 0 0 0 220px; 27 | } 28 | 29 | div.sphinxsidebar { 30 | width: 220px; 31 | font-size: 14px; 32 | line-height: 1.5; 33 | } 34 | 35 | hr { 36 | border: 1px solid #B1B4B6; 37 | } 38 | 39 | div.body { 40 | background-color: #fff; 41 | color: #3E4349; 42 | padding: 0 30px 0 30px; 43 | } 44 | 45 | div.body > .section { 46 | text-align: left; 47 | } 48 | 49 | div.footer { 50 | width: 940px; 51 | margin: 20px auto 30px auto; 52 | font-size: 14px; 53 | color: #888; 54 | text-align: right; 55 | } 56 | 57 | div.footer a { 58 | color: #888; 59 | } 60 | 61 | p.caption { 62 | font-family: inherit; 63 | font-size: inherit; 64 | } 65 | 66 | 67 | div.relations { 68 | display: none; 69 | } 70 | 71 | 72 | div.sphinxsidebar a { 73 | color: #444; 74 | text-decoration: none; 75 | border-bottom: 1px dotted #999; 76 | } 77 | 78 | div.sphinxsidebar a:hover { 79 | border-bottom: 1px solid #999; 80 | } 81 | 82 | div.sphinxsidebarwrapper { 83 | padding: 18px 10px; 84 | } 85 | 86 | div.sphinxsidebarwrapper p.logo { 87 | padding: 0; 88 | margin: -10px 0 0 0px; 89 | text-align: center; 90 | } 91 | 92 | div.sphinxsidebarwrapper h1.logo { 93 | margin-top: -10px; 94 | text-align: center; 95 | margin-bottom: 5px; 96 | text-align: left; 97 | } 98 | 99 | div.sphinxsidebarwrapper h1.logo-name { 100 | margin-top: 0px; 101 | } 102 | 103 | div.sphinxsidebarwrapper p.blurb { 104 | margin-top: 0; 105 | font-style: normal; 106 | } 107 | 108 | div.sphinxsidebar h3, 109 | div.sphinxsidebar h4 { 110 | font-family: Arial; 111 | color: #444; 112 | font-size: 24px; 113 | font-weight: normal; 114 | margin: 0 0 5px 0; 115 | padding: 0; 116 | } 117 | 118 | div.sphinxsidebar h4 { 119 | font-size: 20px; 120 | } 121 | 122 | div.sphinxsidebar h3 a { 123 | color: #444; 124 | } 125 | 126 | div.sphinxsidebar p.logo a, 127 | div.sphinxsidebar h3 a, 128 | div.sphinxsidebar p.logo a:hover, 129 | div.sphinxsidebar h3 a:hover { 130 | border: none; 131 | } 132 | 133 | div.sphinxsidebar p { 134 | color: #555; 135 | margin: 10px 0; 136 | } 137 | 138 | div.sphinxsidebar ul { 139 | margin: 10px 0; 140 | padding: 0; 141 | color: #000; 142 | } 143 | 144 | div.sphinxsidebar ul li.toctree-l1 > a { 145 | font-size: 120%; 146 | } 147 | 148 | div.sphinxsidebar ul li.toctree-l2 > a { 149 | font-size: 110%; 150 | } 151 | 152 | div.sphinxsidebar input { 153 | border: 1px solid #CCC; 154 | font-family: Arial; 155 | font-size: 1em; 156 | } 157 | 158 | div.sphinxsidebar hr { 159 | border: none; 160 | height: 1px; 161 | color: #AAA; 162 | background: #AAA; 163 | 164 | text-align: left; 165 | margin-left: 0; 166 | width: 50%; 167 | } 168 | 169 | div.sphinxsidebar .badge { 170 | border-bottom: none; 171 | } 172 | 173 | div.sphinxsidebar .badge:hover { 174 | border-bottom: none; 175 | } 176 | 177 | /* To address an issue with donation coming after search */ 178 | div.sphinxsidebar h3.donation { 179 | margin-top: 10px; 180 | } 181 | 182 | /* -- body styles ----------------------------------------------------------- */ 183 | 184 | a { 185 | color: #004B6B; 186 | text-decoration: underline; 187 | } 188 | 189 | a:hover { 190 | color: #6D4100; 191 | text-decoration: underline; 192 | } 193 | 194 | div.body h1, 195 | div.body h2, 196 | div.body h3, 197 | div.body h4, 198 | div.body h5, 199 | div.body h6 { 200 | font-family: Arial; 201 | font-weight: normal; 202 | margin: 30px 0px 10px 0px; 203 | padding: 0; 204 | } 205 | 206 | div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } 207 | div.body h2 { font-size: 180%; } 208 | div.body h3 { font-size: 150%; } 209 | div.body h4 { font-size: 130%; } 210 | div.body h5 { font-size: 100%; } 211 | div.body h6 { font-size: 100%; } 212 | 213 | a.headerlink { 214 | color: #DDD; 215 | padding: 0 4px; 216 | text-decoration: none; 217 | } 218 | 219 | a.headerlink:hover { 220 | color: #444; 221 | background: #EAEAEA; 222 | } 223 | 224 | div.body p, div.body dd, div.body li { 225 | line-height: 1.4em; 226 | } 227 | 228 | div.admonition { 229 | margin: 20px 0px; 230 | padding: 10px 30px; 231 | background-color: #EEE; 232 | border: 1px solid #CCC; 233 | } 234 | 235 | div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { 236 | background-color: #FBFBFB; 237 | border-bottom: 1px solid #fafafa; 238 | } 239 | 240 | div.admonition p.admonition-title { 241 | font-family: Arial; 242 | font-weight: normal; 243 | font-size: 24px; 244 | margin: 0 0 10px 0; 245 | padding: 0; 246 | line-height: 1; 247 | } 248 | 249 | div.admonition p.last { 250 | margin-bottom: 0; 251 | } 252 | 253 | div.highlight { 254 | background-color: #fff; 255 | } 256 | 257 | dt:target, .highlight { 258 | background: #FAF3E8; 259 | } 260 | 261 | div.warning { 262 | background-color: #FCC; 263 | border: 1px solid #FAA; 264 | } 265 | 266 | div.danger { 267 | background-color: #FCC; 268 | border: 1px solid #FAA; 269 | -moz-box-shadow: 2px 2px 4px #D52C2C; 270 | -webkit-box-shadow: 2px 2px 4px #D52C2C; 271 | box-shadow: 2px 2px 4px #D52C2C; 272 | } 273 | 274 | div.error { 275 | background-color: #FCC; 276 | border: 1px solid #FAA; 277 | -moz-box-shadow: 2px 2px 4px #D52C2C; 278 | -webkit-box-shadow: 2px 2px 4px #D52C2C; 279 | box-shadow: 2px 2px 4px #D52C2C; 280 | } 281 | 282 | div.caution { 283 | background-color: #FCC; 284 | border: 1px solid #FAA; 285 | } 286 | 287 | div.attention { 288 | background-color: #FCC; 289 | border: 1px solid #FAA; 290 | } 291 | 292 | div.important { 293 | background-color: #EEE; 294 | border: 1px solid #CCC; 295 | } 296 | 297 | div.note { 298 | background-color: #EEE; 299 | border: 1px solid #CCC; 300 | } 301 | 302 | div.tip { 303 | background-color: #EEE; 304 | border: 1px solid #CCC; 305 | } 306 | 307 | div.hint { 308 | background-color: #EEE; 309 | border: 1px solid #CCC; 310 | } 311 | 312 | div.seealso { 313 | background-color: #EEE; 314 | border: 1px solid #CCC; 315 | } 316 | 317 | div.topic { 318 | background-color: #EEE; 319 | } 320 | 321 | p.admonition-title { 322 | display: inline; 323 | } 324 | 325 | p.admonition-title:after { 326 | content: ":"; 327 | } 328 | 329 | pre, tt, code { 330 | font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 331 | font-size: 0.9em; 332 | } 333 | 334 | .hll { 335 | background-color: #FFC; 336 | margin: 0 -12px; 337 | padding: 0 12px; 338 | display: block; 339 | } 340 | 341 | img.screenshot { 342 | } 343 | 344 | tt.descname, tt.descclassname, code.descname, code.descclassname { 345 | font-size: 0.95em; 346 | } 347 | 348 | tt.descname, code.descname { 349 | padding-right: 0.08em; 350 | } 351 | 352 | img.screenshot { 353 | -moz-box-shadow: 2px 2px 4px #EEE; 354 | -webkit-box-shadow: 2px 2px 4px #EEE; 355 | box-shadow: 2px 2px 4px #EEE; 356 | } 357 | 358 | table.docutils { 359 | border: 1px solid #888; 360 | -moz-box-shadow: 2px 2px 4px #EEE; 361 | -webkit-box-shadow: 2px 2px 4px #EEE; 362 | box-shadow: 2px 2px 4px #EEE; 363 | } 364 | 365 | table.docutils td, table.docutils th { 366 | border: 1px solid #888; 367 | padding: 0.25em 0.7em; 368 | } 369 | 370 | table.field-list, table.footnote { 371 | border: none; 372 | -moz-box-shadow: none; 373 | -webkit-box-shadow: none; 374 | box-shadow: none; 375 | } 376 | 377 | table.footnote { 378 | margin: 15px 0; 379 | width: 100%; 380 | border: 1px solid #EEE; 381 | background: #FDFDFD; 382 | font-size: 0.9em; 383 | } 384 | 385 | table.footnote + table.footnote { 386 | margin-top: -15px; 387 | border-top: none; 388 | } 389 | 390 | table.field-list th { 391 | padding: 0 0.8em 0 0; 392 | } 393 | 394 | table.field-list td { 395 | padding: 0; 396 | } 397 | 398 | table.field-list p { 399 | margin-bottom: 0.8em; 400 | } 401 | 402 | /* Cloned from 403 | * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 404 | */ 405 | .field-name { 406 | -moz-hyphens: manual; 407 | -ms-hyphens: manual; 408 | -webkit-hyphens: manual; 409 | hyphens: manual; 410 | } 411 | 412 | table.footnote td.label { 413 | width: .1px; 414 | padding: 0.3em 0 0.3em 0.5em; 415 | } 416 | 417 | table.footnote td { 418 | padding: 0.3em 0.5em; 419 | } 420 | 421 | dl { 422 | margin: 0; 423 | padding: 0; 424 | } 425 | 426 | dl dd { 427 | margin-left: 30px; 428 | } 429 | 430 | blockquote { 431 | margin: 0 0 0 30px; 432 | padding: 0; 433 | } 434 | 435 | ul, ol { 436 | /* Matches the 30px from the narrow-screen "li > ul" selector below */ 437 | margin: 10px 0 10px 30px; 438 | padding: 0; 439 | } 440 | 441 | pre { 442 | background: #EEE; 443 | padding: 7px 30px; 444 | margin: 15px 0px; 445 | line-height: 1.3em; 446 | } 447 | 448 | div.viewcode-block:target { 449 | background: #ffd; 450 | } 451 | 452 | dl pre, blockquote pre, li pre { 453 | margin-left: 0; 454 | padding-left: 30px; 455 | } 456 | 457 | tt, code { 458 | background-color: #ecf0f3; 459 | color: #222; 460 | /* padding: 1px 2px; */ 461 | } 462 | 463 | tt.xref, code.xref, a tt { 464 | background-color: #FBFBFB; 465 | border-bottom: 1px solid #fff; 466 | } 467 | 468 | a.reference { 469 | text-decoration: none; 470 | border-bottom: 1px dotted #004B6B; 471 | } 472 | 473 | /* Don't put an underline on images */ 474 | a.image-reference, a.image-reference:hover { 475 | border-bottom: none; 476 | } 477 | 478 | a.reference:hover { 479 | border-bottom: 1px solid #6D4100; 480 | } 481 | 482 | a.footnote-reference { 483 | text-decoration: none; 484 | font-size: 0.7em; 485 | vertical-align: top; 486 | border-bottom: 1px dotted #004B6B; 487 | } 488 | 489 | a.footnote-reference:hover { 490 | border-bottom: 1px solid #6D4100; 491 | } 492 | 493 | a:hover tt, a:hover code { 494 | background: #EEE; 495 | } 496 | 497 | 498 | @media screen and (max-width: 870px) { 499 | 500 | div.sphinxsidebar { 501 | display: none; 502 | } 503 | 504 | div.document { 505 | width: 100%; 506 | 507 | } 508 | 509 | div.documentwrapper { 510 | margin-left: 0; 511 | margin-top: 0; 512 | margin-right: 0; 513 | margin-bottom: 0; 514 | } 515 | 516 | div.bodywrapper { 517 | margin-top: 0; 518 | margin-right: 0; 519 | margin-bottom: 0; 520 | margin-left: 0; 521 | } 522 | 523 | ul { 524 | margin-left: 0; 525 | } 526 | 527 | li > ul { 528 | /* Matches the 30px from the "ul, ol" selector above */ 529 | margin-left: 30px; 530 | } 531 | 532 | .document { 533 | width: auto; 534 | } 535 | 536 | .footer { 537 | width: auto; 538 | } 539 | 540 | .bodywrapper { 541 | margin: 0; 542 | } 543 | 544 | .footer { 545 | width: auto; 546 | } 547 | 548 | .github { 549 | display: none; 550 | } 551 | 552 | 553 | 554 | } 555 | 556 | 557 | 558 | @media screen and (max-width: 875px) { 559 | 560 | body { 561 | margin: 0; 562 | padding: 20px 30px; 563 | } 564 | 565 | div.documentwrapper { 566 | float: none; 567 | background: #fff; 568 | } 569 | 570 | div.sphinxsidebar { 571 | display: block; 572 | float: none; 573 | width: 102.5%; 574 | margin: 50px -30px -20px -30px; 575 | padding: 10px 20px; 576 | background: #333; 577 | color: #FFF; 578 | } 579 | 580 | div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, 581 | div.sphinxsidebar h3 a { 582 | color: #fff; 583 | } 584 | 585 | div.sphinxsidebar a { 586 | color: #AAA; 587 | } 588 | 589 | div.sphinxsidebar p.logo { 590 | display: none; 591 | } 592 | 593 | div.document { 594 | width: 100%; 595 | margin: 0; 596 | } 597 | 598 | div.footer { 599 | display: none; 600 | } 601 | 602 | div.bodywrapper { 603 | margin: 0; 604 | } 605 | 606 | div.body { 607 | min-height: 0; 608 | padding: 0; 609 | } 610 | 611 | .rtd_doc_footer { 612 | display: none; 613 | } 614 | 615 | .document { 616 | width: auto; 617 | } 618 | 619 | .footer { 620 | width: auto; 621 | } 622 | 623 | .footer { 624 | width: auto; 625 | } 626 | 627 | .github { 628 | display: none; 629 | } 630 | } 631 | 632 | 633 | /* misc. */ 634 | 635 | .revsys-inline { 636 | display: none!important; 637 | } 638 | 639 | /* Make nested-list/multi-paragraph items look better in Releases changelog 640 | * pages. Without this, docutils' magical list fuckery causes inconsistent 641 | * formatting between different release sub-lists. 642 | */ 643 | div#changelog > div.section > ul > li > p:only-child { 644 | margin-bottom: 0; 645 | } 646 | 647 | /* Hide fugly table cell borders in ..bibliography:: directive output */ 648 | table.docutils.citation, table.docutils.citation td, table.docutils.citation th { 649 | border: none; 650 | /* Below needed in some edge cases; if not applied, bottom shadows appear */ 651 | -moz-box-shadow: none; 652 | -webkit-box-shadow: none; 653 | box-shadow: none; 654 | } 655 | 656 | 657 | /* relbar */ 658 | 659 | .related { 660 | line-height: 30px; 661 | width: 100%; 662 | font-size: 0.9rem; 663 | } 664 | 665 | .related.top { 666 | border-bottom: 1px solid #EEE; 667 | margin-bottom: 20px; 668 | } 669 | 670 | .related.bottom { 671 | border-top: 1px solid #EEE; 672 | } 673 | 674 | .related ul { 675 | padding: 0; 676 | margin: 0; 677 | list-style: none; 678 | } 679 | 680 | .related li { 681 | display: inline; 682 | } 683 | 684 | nav#rellinks { 685 | float: right; 686 | } 687 | 688 | nav#rellinks li+li:before { 689 | content: "|"; 690 | } 691 | 692 | nav#breadcrumbs li+li:before { 693 | content: "\00BB"; 694 | } 695 | 696 | /* Hide certain items when printing */ 697 | @media print { 698 | div.related { 699 | display: none; 700 | } 701 | } -------------------------------------------------------------------------------- /docs/_build/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | /* -- relbar ---------------------------------------------------------------- */ 19 | 20 | div.related { 21 | width: 100%; 22 | font-size: 90%; 23 | } 24 | 25 | div.related h3 { 26 | display: none; 27 | } 28 | 29 | div.related ul { 30 | margin: 0; 31 | padding: 0 0 0 10px; 32 | list-style: none; 33 | } 34 | 35 | div.related li { 36 | display: inline; 37 | } 38 | 39 | div.related li.right { 40 | float: right; 41 | margin-right: 5px; 42 | } 43 | 44 | /* -- sidebar --------------------------------------------------------------- */ 45 | 46 | div.sphinxsidebarwrapper { 47 | padding: 10px 5px 0 10px; 48 | } 49 | 50 | div.sphinxsidebar { 51 | float: left; 52 | width: 230px; 53 | margin-left: -100%; 54 | font-size: 90%; 55 | word-wrap: break-word; 56 | overflow-wrap : break-word; 57 | } 58 | 59 | div.sphinxsidebar ul { 60 | list-style: none; 61 | } 62 | 63 | div.sphinxsidebar ul ul, 64 | div.sphinxsidebar ul.want-points { 65 | margin-left: 20px; 66 | list-style: square; 67 | } 68 | 69 | div.sphinxsidebar ul ul { 70 | margin-top: 0; 71 | margin-bottom: 0; 72 | } 73 | 74 | div.sphinxsidebar form { 75 | margin-top: 10px; 76 | } 77 | 78 | div.sphinxsidebar input { 79 | border: 1px solid #98dbcc; 80 | font-family: sans-serif; 81 | font-size: 1em; 82 | } 83 | 84 | div.sphinxsidebar #searchbox form.search { 85 | overflow: hidden; 86 | } 87 | 88 | div.sphinxsidebar #searchbox input[type="text"] { 89 | float: left; 90 | width: 80%; 91 | padding: 0.25em; 92 | box-sizing: border-box; 93 | } 94 | 95 | div.sphinxsidebar #searchbox input[type="submit"] { 96 | float: left; 97 | width: 20%; 98 | border-left: none; 99 | padding: 0.25em; 100 | box-sizing: border-box; 101 | } 102 | 103 | 104 | img { 105 | border: 0; 106 | max-width: 100%; 107 | } 108 | 109 | /* -- search page ----------------------------------------------------------- */ 110 | 111 | ul.search { 112 | margin: 10px 0 0 20px; 113 | padding: 0; 114 | } 115 | 116 | ul.search li { 117 | padding: 5px 0 5px 20px; 118 | background-image: url(file.png); 119 | background-repeat: no-repeat; 120 | background-position: 0 7px; 121 | } 122 | 123 | ul.search li a { 124 | font-weight: bold; 125 | } 126 | 127 | ul.search li div.context { 128 | color: #888; 129 | margin: 2px 0 0 30px; 130 | text-align: left; 131 | } 132 | 133 | ul.keywordmatches li.goodmatch a { 134 | font-weight: bold; 135 | } 136 | 137 | /* -- index page ------------------------------------------------------------ */ 138 | 139 | table.contentstable { 140 | width: 90%; 141 | margin-left: auto; 142 | margin-right: auto; 143 | } 144 | 145 | table.contentstable p.biglink { 146 | line-height: 150%; 147 | } 148 | 149 | a.biglink { 150 | font-size: 1.3em; 151 | } 152 | 153 | span.linkdescr { 154 | font-style: italic; 155 | padding-top: 5px; 156 | font-size: 90%; 157 | } 158 | 159 | /* -- general index --------------------------------------------------------- */ 160 | 161 | table.indextable { 162 | width: 100%; 163 | } 164 | 165 | table.indextable td { 166 | text-align: left; 167 | vertical-align: top; 168 | } 169 | 170 | table.indextable ul { 171 | margin-top: 0; 172 | margin-bottom: 0; 173 | list-style-type: none; 174 | } 175 | 176 | table.indextable > tbody > tr > td > ul { 177 | padding-left: 0em; 178 | } 179 | 180 | table.indextable tr.pcap { 181 | height: 10px; 182 | } 183 | 184 | table.indextable tr.cap { 185 | margin-top: 10px; 186 | background-color: #f2f2f2; 187 | } 188 | 189 | img.toggler { 190 | margin-right: 3px; 191 | margin-top: 3px; 192 | cursor: pointer; 193 | } 194 | 195 | div.modindex-jumpbox { 196 | border-top: 1px solid #ddd; 197 | border-bottom: 1px solid #ddd; 198 | margin: 1em 0 1em 0; 199 | padding: 0.4em; 200 | } 201 | 202 | div.genindex-jumpbox { 203 | border-top: 1px solid #ddd; 204 | border-bottom: 1px solid #ddd; 205 | margin: 1em 0 1em 0; 206 | padding: 0.4em; 207 | } 208 | 209 | /* -- domain module index --------------------------------------------------- */ 210 | 211 | table.modindextable td { 212 | padding: 2px; 213 | border-collapse: collapse; 214 | } 215 | 216 | /* -- general body styles --------------------------------------------------- */ 217 | 218 | div.body { 219 | min-width: 450px; 220 | max-width: 800px; 221 | } 222 | 223 | div.body p, div.body dd, div.body li, div.body blockquote { 224 | -moz-hyphens: auto; 225 | -ms-hyphens: auto; 226 | -webkit-hyphens: auto; 227 | hyphens: auto; 228 | } 229 | 230 | a.headerlink { 231 | visibility: hidden; 232 | } 233 | 234 | a.brackets:before, 235 | span.brackets > a:before{ 236 | content: "["; 237 | } 238 | 239 | a.brackets:after, 240 | span.brackets > a:after { 241 | content: "]"; 242 | } 243 | 244 | h1:hover > a.headerlink, 245 | h2:hover > a.headerlink, 246 | h3:hover > a.headerlink, 247 | h4:hover > a.headerlink, 248 | h5:hover > a.headerlink, 249 | h6:hover > a.headerlink, 250 | dt:hover > a.headerlink, 251 | caption:hover > a.headerlink, 252 | p.caption:hover > a.headerlink, 253 | div.code-block-caption:hover > a.headerlink { 254 | visibility: visible; 255 | } 256 | 257 | div.body p.caption { 258 | text-align: inherit; 259 | } 260 | 261 | div.body td { 262 | text-align: left; 263 | } 264 | 265 | .first { 266 | margin-top: 0 !important; 267 | } 268 | 269 | p.rubric { 270 | margin-top: 30px; 271 | font-weight: bold; 272 | } 273 | 274 | img.align-left, .figure.align-left, object.align-left { 275 | clear: left; 276 | float: left; 277 | margin-right: 1em; 278 | } 279 | 280 | img.align-right, .figure.align-right, object.align-right { 281 | clear: right; 282 | float: right; 283 | margin-left: 1em; 284 | } 285 | 286 | img.align-center, .figure.align-center, object.align-center { 287 | display: block; 288 | margin-left: auto; 289 | margin-right: auto; 290 | } 291 | 292 | img.align-default, .figure.align-default { 293 | display: block; 294 | margin-left: auto; 295 | margin-right: auto; 296 | } 297 | 298 | .align-left { 299 | text-align: left; 300 | } 301 | 302 | .align-center { 303 | text-align: center; 304 | } 305 | 306 | .align-default { 307 | text-align: center; 308 | } 309 | 310 | .align-right { 311 | text-align: right; 312 | } 313 | 314 | /* -- sidebars -------------------------------------------------------------- */ 315 | 316 | div.sidebar { 317 | margin: 0 0 0.5em 1em; 318 | border: 1px solid #ddb; 319 | padding: 7px 7px 0 7px; 320 | background-color: #ffe; 321 | width: 40%; 322 | float: right; 323 | } 324 | 325 | p.sidebar-title { 326 | font-weight: bold; 327 | } 328 | 329 | /* -- topics ---------------------------------------------------------------- */ 330 | 331 | div.topic { 332 | border: 1px solid #ccc; 333 | padding: 7px 7px 0 7px; 334 | margin: 10px 0 10px 0; 335 | } 336 | 337 | p.topic-title { 338 | font-size: 1.1em; 339 | font-weight: bold; 340 | margin-top: 10px; 341 | } 342 | 343 | /* -- admonitions ----------------------------------------------------------- */ 344 | 345 | div.admonition { 346 | margin-top: 10px; 347 | margin-bottom: 10px; 348 | padding: 7px; 349 | } 350 | 351 | div.admonition dt { 352 | font-weight: bold; 353 | } 354 | 355 | div.admonition dl { 356 | margin-bottom: 0; 357 | } 358 | 359 | p.admonition-title { 360 | margin: 0px 10px 5px 0px; 361 | font-weight: bold; 362 | } 363 | 364 | div.body p.centered { 365 | text-align: center; 366 | margin-top: 25px; 367 | } 368 | 369 | /* -- tables ---------------------------------------------------------------- */ 370 | 371 | table.docutils { 372 | border: 0; 373 | border-collapse: collapse; 374 | } 375 | 376 | table.align-center { 377 | margin-left: auto; 378 | margin-right: auto; 379 | } 380 | 381 | table.align-default { 382 | margin-left: auto; 383 | margin-right: auto; 384 | } 385 | 386 | table caption span.caption-number { 387 | font-style: italic; 388 | } 389 | 390 | table caption span.caption-text { 391 | } 392 | 393 | table.docutils td, table.docutils th { 394 | padding: 1px 8px 1px 5px; 395 | border-top: 0; 396 | border-left: 0; 397 | border-right: 0; 398 | border-bottom: 1px solid #aaa; 399 | } 400 | 401 | table.footnote td, table.footnote th { 402 | border: 0 !important; 403 | } 404 | 405 | th { 406 | text-align: left; 407 | padding-right: 5px; 408 | } 409 | 410 | table.citation { 411 | border-left: solid 1px gray; 412 | margin-left: 1px; 413 | } 414 | 415 | table.citation td { 416 | border-bottom: none; 417 | } 418 | 419 | th > p:first-child, 420 | td > p:first-child { 421 | margin-top: 0px; 422 | } 423 | 424 | th > p:last-child, 425 | td > p:last-child { 426 | margin-bottom: 0px; 427 | } 428 | 429 | /* -- figures --------------------------------------------------------------- */ 430 | 431 | div.figure { 432 | margin: 0.5em; 433 | padding: 0.5em; 434 | } 435 | 436 | div.figure p.caption { 437 | padding: 0.3em; 438 | } 439 | 440 | div.figure p.caption span.caption-number { 441 | font-style: italic; 442 | } 443 | 444 | div.figure p.caption span.caption-text { 445 | } 446 | 447 | /* -- field list styles ----------------------------------------------------- */ 448 | 449 | table.field-list td, table.field-list th { 450 | border: 0 !important; 451 | } 452 | 453 | .field-list ul { 454 | margin: 0; 455 | padding-left: 1em; 456 | } 457 | 458 | .field-list p { 459 | margin: 0; 460 | } 461 | 462 | .field-name { 463 | -moz-hyphens: manual; 464 | -ms-hyphens: manual; 465 | -webkit-hyphens: manual; 466 | hyphens: manual; 467 | } 468 | 469 | /* -- hlist styles ---------------------------------------------------------- */ 470 | 471 | table.hlist td { 472 | vertical-align: top; 473 | } 474 | 475 | 476 | /* -- other body styles ----------------------------------------------------- */ 477 | 478 | ol.arabic { 479 | list-style: decimal; 480 | } 481 | 482 | ol.loweralpha { 483 | list-style: lower-alpha; 484 | } 485 | 486 | ol.upperalpha { 487 | list-style: upper-alpha; 488 | } 489 | 490 | ol.lowerroman { 491 | list-style: lower-roman; 492 | } 493 | 494 | ol.upperroman { 495 | list-style: upper-roman; 496 | } 497 | 498 | li > p:first-child { 499 | margin-top: 0px; 500 | } 501 | 502 | li > p:last-child { 503 | margin-bottom: 0px; 504 | } 505 | 506 | dl.footnote > dt, 507 | dl.citation > dt { 508 | float: left; 509 | } 510 | 511 | dl.footnote > dd, 512 | dl.citation > dd { 513 | margin-bottom: 0em; 514 | } 515 | 516 | dl.footnote > dd:after, 517 | dl.citation > dd:after { 518 | content: ""; 519 | clear: both; 520 | } 521 | 522 | dl.field-list { 523 | display: grid; 524 | grid-template-columns: fit-content(30%) auto; 525 | } 526 | 527 | dl.field-list > dt { 528 | font-weight: bold; 529 | word-break: break-word; 530 | padding-left: 0.5em; 531 | padding-right: 5px; 532 | } 533 | 534 | dl.field-list > dt:after { 535 | content: ":"; 536 | } 537 | 538 | dl.field-list > dd { 539 | padding-left: 0.5em; 540 | margin-top: 0em; 541 | margin-left: 0em; 542 | margin-bottom: 0em; 543 | } 544 | 545 | dl { 546 | margin-bottom: 15px; 547 | } 548 | 549 | dd > p:first-child { 550 | margin-top: 0px; 551 | } 552 | 553 | dd ul, dd table { 554 | margin-bottom: 10px; 555 | } 556 | 557 | dd { 558 | margin-top: 3px; 559 | margin-bottom: 10px; 560 | margin-left: 30px; 561 | } 562 | 563 | dt:target, span.highlighted { 564 | background-color: #fbe54e; 565 | } 566 | 567 | rect.highlighted { 568 | fill: #fbe54e; 569 | } 570 | 571 | dl.glossary dt { 572 | font-weight: bold; 573 | font-size: 1.1em; 574 | } 575 | 576 | .optional { 577 | font-size: 1.3em; 578 | } 579 | 580 | .sig-paren { 581 | font-size: larger; 582 | } 583 | 584 | .versionmodified { 585 | font-style: italic; 586 | } 587 | 588 | .system-message { 589 | background-color: #fda; 590 | padding: 5px; 591 | border: 3px solid red; 592 | } 593 | 594 | .footnote:target { 595 | background-color: #ffa; 596 | } 597 | 598 | .line-block { 599 | display: block; 600 | margin-top: 1em; 601 | margin-bottom: 1em; 602 | } 603 | 604 | .line-block .line-block { 605 | margin-top: 0; 606 | margin-bottom: 0; 607 | margin-left: 1.5em; 608 | } 609 | 610 | .guilabel, .menuselection { 611 | font-family: sans-serif; 612 | } 613 | 614 | .accelerator { 615 | text-decoration: underline; 616 | } 617 | 618 | .classifier { 619 | font-style: oblique; 620 | } 621 | 622 | .classifier:before { 623 | font-style: normal; 624 | margin: 0.5em; 625 | content: ":"; 626 | } 627 | 628 | abbr, acronym { 629 | border-bottom: dotted 1px; 630 | cursor: help; 631 | } 632 | 633 | /* -- code displays --------------------------------------------------------- */ 634 | 635 | pre { 636 | overflow: auto; 637 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 638 | } 639 | 640 | span.pre { 641 | -moz-hyphens: none; 642 | -ms-hyphens: none; 643 | -webkit-hyphens: none; 644 | hyphens: none; 645 | } 646 | 647 | td.linenos pre { 648 | padding: 5px 0px; 649 | border: 0; 650 | background-color: transparent; 651 | color: #aaa; 652 | } 653 | 654 | table.highlighttable { 655 | margin-left: 0.5em; 656 | } 657 | 658 | table.highlighttable td { 659 | padding: 0 0.5em 0 0.5em; 660 | } 661 | 662 | div.code-block-caption { 663 | padding: 2px 5px; 664 | font-size: small; 665 | } 666 | 667 | div.code-block-caption code { 668 | background-color: transparent; 669 | } 670 | 671 | div.code-block-caption + div > div.highlight > pre { 672 | margin-top: 0; 673 | } 674 | 675 | div.code-block-caption span.caption-number { 676 | padding: 0.1em 0.3em; 677 | font-style: italic; 678 | } 679 | 680 | div.code-block-caption span.caption-text { 681 | } 682 | 683 | div.literal-block-wrapper { 684 | padding: 1em 1em 0; 685 | } 686 | 687 | div.literal-block-wrapper div.highlight { 688 | margin: 0; 689 | } 690 | 691 | code.descname { 692 | background-color: transparent; 693 | font-weight: bold; 694 | font-size: 1.2em; 695 | } 696 | 697 | code.descclassname { 698 | background-color: transparent; 699 | } 700 | 701 | code.xref, a code { 702 | background-color: transparent; 703 | font-weight: bold; 704 | } 705 | 706 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { 707 | background-color: transparent; 708 | } 709 | 710 | .viewcode-link { 711 | float: right; 712 | } 713 | 714 | .viewcode-back { 715 | float: right; 716 | font-family: sans-serif; 717 | } 718 | 719 | div.viewcode-block:target { 720 | margin: -1px -10px; 721 | padding: 0 10px; 722 | } 723 | 724 | /* -- math display ---------------------------------------------------------- */ 725 | 726 | img.math { 727 | vertical-align: middle; 728 | } 729 | 730 | div.body div.math p { 731 | text-align: center; 732 | } 733 | 734 | span.eqno { 735 | float: right; 736 | } 737 | 738 | span.eqno a.headerlink { 739 | position: relative; 740 | left: 0px; 741 | z-index: 1; 742 | } 743 | 744 | div.math:hover a.headerlink { 745 | visibility: visible; 746 | } 747 | 748 | /* -- printout stylesheet --------------------------------------------------- */ 749 | 750 | @media print { 751 | div.document, 752 | div.documentwrapper, 753 | div.bodywrapper { 754 | margin: 0 !important; 755 | width: 100%; 756 | } 757 | 758 | div.sphinxsidebar, 759 | div.related, 760 | div.footer, 761 | #top-link { 762 | display: none; 763 | } 764 | } -------------------------------------------------------------------------------- /docs/_build/_static/custom.css: -------------------------------------------------------------------------------- 1 | 2 | /* h1 { 3 | font-weight: bold; 4 | color: #000; 5 | font-size: 30px; 6 | } 7 | 8 | h2 { 9 | font-weight: bold; 10 | color: #000; 11 | font-size: 24px; 12 | } */ 13 | -------------------------------------------------------------------------------- /docs/_build/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s === 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node, addItems) { 70 | if (node.nodeType === 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && 74 | !jQuery(node.parentNode).hasClass(className) && 75 | !jQuery(node.parentNode).hasClass("nohighlight")) { 76 | var span; 77 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 78 | if (isInSVG) { 79 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 80 | } else { 81 | span = document.createElement("span"); 82 | span.className = className; 83 | } 84 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 85 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 86 | document.createTextNode(val.substr(pos + text.length)), 87 | node.nextSibling)); 88 | node.nodeValue = val.substr(0, pos); 89 | if (isInSVG) { 90 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 91 | var bbox = node.parentElement.getBBox(); 92 | rect.x.baseVal.value = bbox.x; 93 | rect.y.baseVal.value = bbox.y; 94 | rect.width.baseVal.value = bbox.width; 95 | rect.height.baseVal.value = bbox.height; 96 | rect.setAttribute('class', className); 97 | addItems.push({ 98 | "parent": node.parentNode, 99 | "target": rect}); 100 | } 101 | } 102 | } 103 | else if (!jQuery(node).is("button, select, textarea")) { 104 | jQuery.each(node.childNodes, function() { 105 | highlight(this, addItems); 106 | }); 107 | } 108 | } 109 | var addItems = []; 110 | var result = this.each(function() { 111 | highlight(this, addItems); 112 | }); 113 | for (var i = 0; i < addItems.length; ++i) { 114 | jQuery(addItems[i].parent).before(addItems[i].target); 115 | } 116 | return result; 117 | }; 118 | 119 | /* 120 | * backward compatibility for jQuery.browser 121 | * This will be supported until firefox bug is fixed. 122 | */ 123 | if (!jQuery.browser) { 124 | jQuery.uaMatch = function(ua) { 125 | ua = ua.toLowerCase(); 126 | 127 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 128 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 129 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 130 | /(msie) ([\w.]+)/.exec(ua) || 131 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 132 | []; 133 | 134 | return { 135 | browser: match[ 1 ] || "", 136 | version: match[ 2 ] || "0" 137 | }; 138 | }; 139 | jQuery.browser = {}; 140 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 141 | } 142 | 143 | /** 144 | * Small JavaScript module for the documentation. 145 | */ 146 | var Documentation = { 147 | 148 | init : function() { 149 | this.fixFirefoxAnchorBug(); 150 | this.highlightSearchWords(); 151 | this.initIndexTable(); 152 | if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { 153 | this.initOnKeyListeners(); 154 | } 155 | }, 156 | 157 | /** 158 | * i18n support 159 | */ 160 | TRANSLATIONS : {}, 161 | PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, 162 | LOCALE : 'unknown', 163 | 164 | // gettext and ngettext don't access this so that the functions 165 | // can safely bound to a different name (_ = Documentation.gettext) 166 | gettext : function(string) { 167 | var translated = Documentation.TRANSLATIONS[string]; 168 | if (typeof translated === 'undefined') 169 | return string; 170 | return (typeof translated === 'string') ? translated : translated[0]; 171 | }, 172 | 173 | ngettext : function(singular, plural, n) { 174 | var translated = Documentation.TRANSLATIONS[singular]; 175 | if (typeof translated === 'undefined') 176 | return (n == 1) ? singular : plural; 177 | return translated[Documentation.PLURALEXPR(n)]; 178 | }, 179 | 180 | addTranslations : function(catalog) { 181 | for (var key in catalog.messages) 182 | this.TRANSLATIONS[key] = catalog.messages[key]; 183 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 184 | this.LOCALE = catalog.locale; 185 | }, 186 | 187 | /** 188 | * add context elements like header anchor links 189 | */ 190 | addContextElements : function() { 191 | $('div[id] > :header:first').each(function() { 192 | $('\u00B6'). 193 | attr('href', '#' + this.id). 194 | attr('title', _('Permalink to this headline')). 195 | appendTo(this); 196 | }); 197 | $('dt[id]').each(function() { 198 | $('\u00B6'). 199 | attr('href', '#' + this.id). 200 | attr('title', _('Permalink to this definition')). 201 | appendTo(this); 202 | }); 203 | }, 204 | 205 | /** 206 | * workaround a firefox stupidity 207 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 208 | */ 209 | fixFirefoxAnchorBug : function() { 210 | if (document.location.hash && $.browser.mozilla) 211 | window.setTimeout(function() { 212 | document.location.href += ''; 213 | }, 10); 214 | }, 215 | 216 | /** 217 | * highlight the search words provided in the url in the text 218 | */ 219 | highlightSearchWords : function() { 220 | var params = $.getQueryParameters(); 221 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 222 | if (terms.length) { 223 | var body = $('div.body'); 224 | if (!body.length) { 225 | body = $('body'); 226 | } 227 | window.setTimeout(function() { 228 | $.each(terms, function() { 229 | body.highlightText(this.toLowerCase(), 'highlighted'); 230 | }); 231 | }, 10); 232 | $('') 234 | .appendTo($('#searchbox')); 235 | } 236 | }, 237 | 238 | /** 239 | * init the domain index toggle buttons 240 | */ 241 | initIndexTable : function() { 242 | var togglers = $('img.toggler').click(function() { 243 | var src = $(this).attr('src'); 244 | var idnum = $(this).attr('id').substr(7); 245 | $('tr.cg-' + idnum).toggle(); 246 | if (src.substr(-9) === 'minus.png') 247 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 248 | else 249 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 250 | }).css('display', ''); 251 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 252 | togglers.click(); 253 | } 254 | }, 255 | 256 | /** 257 | * helper function to hide the search marks again 258 | */ 259 | hideSearchWords : function() { 260 | $('#searchbox .highlight-link').fadeOut(300); 261 | $('span.highlighted').removeClass('highlighted'); 262 | }, 263 | 264 | /** 265 | * make the url absolute 266 | */ 267 | makeURL : function(relativeURL) { 268 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 269 | }, 270 | 271 | /** 272 | * get the current relative url 273 | */ 274 | getCurrentURL : function() { 275 | var path = document.location.pathname; 276 | var parts = path.split(/\//); 277 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 278 | if (this === '..') 279 | parts.pop(); 280 | }); 281 | var url = parts.join('/'); 282 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 283 | }, 284 | 285 | initOnKeyListeners: function() { 286 | $(document).keyup(function(event) { 287 | var activeElementType = document.activeElement.tagName; 288 | // don't navigate when in search box or textarea 289 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { 290 | switch (event.keyCode) { 291 | case 37: // left 292 | var prevHref = $('link[rel="prev"]').prop('href'); 293 | if (prevHref) { 294 | window.location.href = prevHref; 295 | return false; 296 | } 297 | case 39: // right 298 | var nextHref = $('link[rel="next"]').prop('href'); 299 | if (nextHref) { 300 | window.location.href = nextHref; 301 | return false; 302 | } 303 | } 304 | } 305 | }); 306 | } 307 | }; 308 | 309 | // quick alias for translations 310 | _ = Documentation.gettext; 311 | 312 | $(document).ready(function() { 313 | Documentation.init(); 314 | }); 315 | -------------------------------------------------------------------------------- /docs/_build/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'python', 5 | COLLAPSE_INDEX: false, 6 | FILE_SUFFIX: '.html', 7 | HAS_SOURCE: true, 8 | SOURCELINK_SUFFIX: '.txt', 9 | NAVIGATION_WITH_KEYS: false 10 | }; -------------------------------------------------------------------------------- /docs/_build/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/_static/file.png -------------------------------------------------------------------------------- /docs/_build/_static/language_data.js: -------------------------------------------------------------------------------- 1 | /* 2 | * language_data.js 3 | * ~~~~~~~~~~~~~~~~ 4 | * 5 | * This script contains the language-specific data used by searchtools.js, 6 | * namely the list of stopwords, stemmer, scorer and splitter. 7 | * 8 | * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. 9 | * :license: BSD, see LICENSE for details. 10 | * 11 | */ 12 | 13 | var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]; 14 | 15 | 16 | /* Non-minified version JS is _stemmer.js if file is provided */ 17 | /** 18 | * Porter Stemmer 19 | */ 20 | var Stemmer = function() { 21 | 22 | var step2list = { 23 | ational: 'ate', 24 | tional: 'tion', 25 | enci: 'ence', 26 | anci: 'ance', 27 | izer: 'ize', 28 | bli: 'ble', 29 | alli: 'al', 30 | entli: 'ent', 31 | eli: 'e', 32 | ousli: 'ous', 33 | ization: 'ize', 34 | ation: 'ate', 35 | ator: 'ate', 36 | alism: 'al', 37 | iveness: 'ive', 38 | fulness: 'ful', 39 | ousness: 'ous', 40 | aliti: 'al', 41 | iviti: 'ive', 42 | biliti: 'ble', 43 | logi: 'log' 44 | }; 45 | 46 | var step3list = { 47 | icate: 'ic', 48 | ative: '', 49 | alize: 'al', 50 | iciti: 'ic', 51 | ical: 'ic', 52 | ful: '', 53 | ness: '' 54 | }; 55 | 56 | var c = "[^aeiou]"; // consonant 57 | var v = "[aeiouy]"; // vowel 58 | var C = c + "[^aeiouy]*"; // consonant sequence 59 | var V = v + "[aeiou]*"; // vowel sequence 60 | 61 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 62 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 63 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 64 | var s_v = "^(" + C + ")?" + v; // vowel in stem 65 | 66 | this.stemWord = function (w) { 67 | var stem; 68 | var suffix; 69 | var firstch; 70 | var origword = w; 71 | 72 | if (w.length < 3) 73 | return w; 74 | 75 | var re; 76 | var re2; 77 | var re3; 78 | var re4; 79 | 80 | firstch = w.substr(0,1); 81 | if (firstch == "y") 82 | w = firstch.toUpperCase() + w.substr(1); 83 | 84 | // Step 1a 85 | re = /^(.+?)(ss|i)es$/; 86 | re2 = /^(.+?)([^s])s$/; 87 | 88 | if (re.test(w)) 89 | w = w.replace(re,"$1$2"); 90 | else if (re2.test(w)) 91 | w = w.replace(re2,"$1$2"); 92 | 93 | // Step 1b 94 | re = /^(.+?)eed$/; 95 | re2 = /^(.+?)(ed|ing)$/; 96 | if (re.test(w)) { 97 | var fp = re.exec(w); 98 | re = new RegExp(mgr0); 99 | if (re.test(fp[1])) { 100 | re = /.$/; 101 | w = w.replace(re,""); 102 | } 103 | } 104 | else if (re2.test(w)) { 105 | var fp = re2.exec(w); 106 | stem = fp[1]; 107 | re2 = new RegExp(s_v); 108 | if (re2.test(stem)) { 109 | w = stem; 110 | re2 = /(at|bl|iz)$/; 111 | re3 = new RegExp("([^aeiouylsz])\\1$"); 112 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 113 | if (re2.test(w)) 114 | w = w + "e"; 115 | else if (re3.test(w)) { 116 | re = /.$/; 117 | w = w.replace(re,""); 118 | } 119 | else if (re4.test(w)) 120 | w = w + "e"; 121 | } 122 | } 123 | 124 | // Step 1c 125 | re = /^(.+?)y$/; 126 | if (re.test(w)) { 127 | var fp = re.exec(w); 128 | stem = fp[1]; 129 | re = new RegExp(s_v); 130 | if (re.test(stem)) 131 | w = stem + "i"; 132 | } 133 | 134 | // Step 2 135 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 136 | if (re.test(w)) { 137 | var fp = re.exec(w); 138 | stem = fp[1]; 139 | suffix = fp[2]; 140 | re = new RegExp(mgr0); 141 | if (re.test(stem)) 142 | w = stem + step2list[suffix]; 143 | } 144 | 145 | // Step 3 146 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 147 | if (re.test(w)) { 148 | var fp = re.exec(w); 149 | stem = fp[1]; 150 | suffix = fp[2]; 151 | re = new RegExp(mgr0); 152 | if (re.test(stem)) 153 | w = stem + step3list[suffix]; 154 | } 155 | 156 | // Step 4 157 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 158 | re2 = /^(.+?)(s|t)(ion)$/; 159 | if (re.test(w)) { 160 | var fp = re.exec(w); 161 | stem = fp[1]; 162 | re = new RegExp(mgr1); 163 | if (re.test(stem)) 164 | w = stem; 165 | } 166 | else if (re2.test(w)) { 167 | var fp = re2.exec(w); 168 | stem = fp[1] + fp[2]; 169 | re2 = new RegExp(mgr1); 170 | if (re2.test(stem)) 171 | w = stem; 172 | } 173 | 174 | // Step 5 175 | re = /^(.+?)e$/; 176 | if (re.test(w)) { 177 | var fp = re.exec(w); 178 | stem = fp[1]; 179 | re = new RegExp(mgr1); 180 | re2 = new RegExp(meq1); 181 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 182 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 183 | w = stem; 184 | } 185 | re = /ll$/; 186 | re2 = new RegExp(mgr1); 187 | if (re.test(w) && re2.test(w)) { 188 | re = /.$/; 189 | w = w.replace(re,""); 190 | } 191 | 192 | // and turn initial Y back to y 193 | if (firstch == "y") 194 | w = firstch.toLowerCase() + w.substr(1); 195 | return w; 196 | } 197 | } 198 | 199 | 200 | 201 | 202 | 203 | var splitChars = (function() { 204 | var result = {}; 205 | var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, 206 | 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, 207 | 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, 208 | 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, 209 | 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, 210 | 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 211 | 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, 212 | 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, 213 | 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, 214 | 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; 215 | var i, j, start, end; 216 | for (i = 0; i < singles.length; i++) { 217 | result[singles[i]] = true; 218 | } 219 | var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], 220 | [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], 221 | [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], 222 | [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], 223 | [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], 224 | [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], 225 | [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], 226 | [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], 227 | [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], 228 | [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], 229 | [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], 230 | [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], 231 | [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], 232 | [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], 233 | [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], 234 | [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], 235 | [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], 236 | [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], 237 | [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], 238 | [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], 239 | [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], 240 | [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], 241 | [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], 242 | [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], 243 | [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], 244 | [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], 245 | [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], 246 | [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], 247 | [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], 248 | [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], 249 | [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], 250 | [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], 251 | [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], 252 | [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], 253 | [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], 254 | [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], 255 | [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], 256 | [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], 257 | [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], 258 | [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], 259 | [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], 260 | [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], 261 | [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], 262 | [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], 263 | [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], 264 | [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], 265 | [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], 266 | [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], 267 | [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; 268 | for (i = 0; i < ranges.length; i++) { 269 | start = ranges[i][0]; 270 | end = ranges[i][1]; 271 | for (j = start; j <= end; j++) { 272 | result[j] = true; 273 | } 274 | } 275 | return result; 276 | })(); 277 | 278 | function splitQuery(query) { 279 | var result = []; 280 | var start = -1; 281 | for (var i = 0; i < query.length; i++) { 282 | if (splitChars[query.charCodeAt(i)]) { 283 | if (start !== -1) { 284 | result.push(query.slice(start, i)); 285 | start = -1; 286 | } 287 | } else if (start === -1) { 288 | start = i; 289 | } 290 | } 291 | if (start !== -1) { 292 | result.push(query.slice(start)); 293 | } 294 | return result; 295 | } 296 | 297 | 298 | -------------------------------------------------------------------------------- /docs/_build/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/_static/minus.png -------------------------------------------------------------------------------- /docs/_build/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/_static/plus.png -------------------------------------------------------------------------------- /docs/_build/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #f8f8f8; } 3 | .highlight .c { color: #8f5902; font-style: italic } /* Comment */ 4 | .highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ 5 | .highlight .g { color: #000000 } /* Generic */ 6 | .highlight .k { color: #004461; font-weight: bold } /* Keyword */ 7 | .highlight .l { color: #000000 } /* Literal */ 8 | .highlight .n { color: #000000 } /* Name */ 9 | .highlight .o { color: #582800 } /* Operator */ 10 | .highlight .x { color: #000000 } /* Other */ 11 | .highlight .p { color: #000000; font-weight: bold } /* Punctuation */ 12 | .highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #8f5902 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ 18 | .highlight .gd { color: #a40000 } /* Generic.Deleted */ 19 | .highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ 20 | .highlight .gr { color: #ef2929 } /* Generic.Error */ 21 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 22 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 23 | .highlight .go { color: #888888 } /* Generic.Output */ 24 | .highlight .gp { color: #745334 } /* Generic.Prompt */ 25 | .highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ 26 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 27 | .highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ 28 | .highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */ 29 | .highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */ 30 | .highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */ 31 | .highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */ 32 | .highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */ 33 | .highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */ 34 | .highlight .ld { color: #000000 } /* Literal.Date */ 35 | .highlight .m { color: #990000 } /* Literal.Number */ 36 | .highlight .s { color: #4e9a06 } /* Literal.String */ 37 | .highlight .na { color: #c4a000 } /* Name.Attribute */ 38 | .highlight .nb { color: #004461 } /* Name.Builtin */ 39 | .highlight .nc { color: #000000 } /* Name.Class */ 40 | .highlight .no { color: #000000 } /* Name.Constant */ 41 | .highlight .nd { color: #888888 } /* Name.Decorator */ 42 | .highlight .ni { color: #ce5c00 } /* Name.Entity */ 43 | .highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ 44 | .highlight .nf { color: #000000 } /* Name.Function */ 45 | .highlight .nl { color: #f57900 } /* Name.Label */ 46 | .highlight .nn { color: #000000 } /* Name.Namespace */ 47 | .highlight .nx { color: #000000 } /* Name.Other */ 48 | .highlight .py { color: #000000 } /* Name.Property */ 49 | .highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */ 50 | .highlight .nv { color: #000000 } /* Name.Variable */ 51 | .highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */ 52 | .highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ 53 | .highlight .mb { color: #990000 } /* Literal.Number.Bin */ 54 | .highlight .mf { color: #990000 } /* Literal.Number.Float */ 55 | .highlight .mh { color: #990000 } /* Literal.Number.Hex */ 56 | .highlight .mi { color: #990000 } /* Literal.Number.Integer */ 57 | .highlight .mo { color: #990000 } /* Literal.Number.Oct */ 58 | .highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ 59 | .highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ 60 | .highlight .sc { color: #4e9a06 } /* Literal.String.Char */ 61 | .highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ 62 | .highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ 63 | .highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ 64 | .highlight .se { color: #4e9a06 } /* Literal.String.Escape */ 65 | .highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ 66 | .highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ 67 | .highlight .sx { color: #4e9a06 } /* Literal.String.Other */ 68 | .highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ 69 | .highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ 70 | .highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ 71 | .highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ 72 | .highlight .fm { color: #000000 } /* Name.Function.Magic */ 73 | .highlight .vc { color: #000000 } /* Name.Variable.Class */ 74 | .highlight .vg { color: #000000 } /* Name.Variable.Global */ 75 | .highlight .vi { color: #000000 } /* Name.Variable.Instance */ 76 | .highlight .vm { color: #000000 } /* Name.Variable.Magic */ 77 | .highlight .il { color: #990000 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_build/_static/underscore.js: -------------------------------------------------------------------------------- 1 | // Underscore.js 1.3.1 2 | // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. 3 | // Underscore is freely distributable under the MIT license. 4 | // Portions of Underscore are inspired or borrowed from Prototype, 5 | // Oliver Steele's Functional, and John Resig's Micro-Templating. 6 | // For all details and documentation: 7 | // http://documentcloud.github.com/underscore 8 | (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== 9 | c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c, 10 | h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each= 11 | b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a== 12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= 13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= 14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= 15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, 17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; 24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, 25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; 26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; 27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), 28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ 29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= 30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= 31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); 32 | -------------------------------------------------------------------------------- /docs/_build/files/code-runner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Running Python Scripts with Code Runner 🏃 — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 35 |
36 |

Running Python Scripts with Code Runner 🏃

37 |
38 |

Installing Code Runner Extension

39 |

Click the extension icon on the left most stripe and type code runner in the search bar. Click and install.

40 |

Imgur

41 |
42 |
43 |

Setting up Code Runner

44 |
45 |
46 | 47 | 48 |
49 | 50 |
51 |
52 | 109 |
110 |
111 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/_build/files/extensions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Extensions — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 35 |
36 |

Extensions

37 |
38 | 39 | 40 |
41 | 42 |
43 |
44 | 97 |
98 |
99 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /docs/_build/files/fonts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Fonts — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 35 |
36 |

Fonts

37 |
38 |

List of Awesome Fonts

39 |
40 |
41 |

Installing Fonts on Ubuntu

42 |
43 |
44 | 45 | 46 |
47 | 48 |
49 |
50 | 107 |
108 |
109 | 120 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/_build/files/installation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Setting up VS Code on Your Machine ⚙️ — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 35 |
36 |

Setting up VS Code on Your Machine ⚙️

37 |
38 |

Installing VS Code

39 |

Installing VS code is easy across all operating systems.

40 |
    41 |
  • Just go to the link here and select the distribution that corresponds to your OS.

  • 42 |
  • Download the file and install

  • 43 |
44 |
45 |
46 |

Running VS Code

47 |
    48 |
  • After you've completed the installation, open terminal and cd to your project folder. Then type:

  • 49 |
50 |
$ code .
 51 | 
52 |
53 |

This will open your project in VS Code. Familiarize yourself with the GUI if you're using this for the first time. The left most stripe gives you multiple options and hovering over the icons will show you their corresponding functionalites. If you're using any third party extensions, their icons may also appear. Clicking on each of them will bring up extra actions in the succeeding column.

54 |

The default icons are (from top to bottom):

55 |
    56 |
  • Explorer

  • 57 |
  • Search

  • 58 |
  • Source Control (Git)

  • 59 |
  • Debug

  • 60 |
  • Extensions

  • 61 |
62 |

Imgur

63 |
64 |
65 |

Using the Integrated Terminal

66 |

If you aren't migrating from any other terminal and haven't set up your preferred keybindings then you can open the integrated terminal by pressing ctrl + ~ on your keyboard. This terminal is an exact replica of your bash/zsh terminal and can perform almost anything that you'd normally do in those. From now an on, unless explicitly mentioned otherwise, we'll be using the integrated terminal for the versatility and convenience it provides.

67 |

Imgur

68 |
69 |
70 | 71 | 72 |
73 | 74 |
75 |
76 | 134 |
135 |
136 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /docs/_build/files/keybindings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Shortcuts & Keybindings — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 35 |
36 |

Shortcuts & Keybindings

37 |
38 | 39 | 40 |
41 | 42 |
43 |
44 | 97 |
98 |
99 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /docs/_build/files/linting.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Linting — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 35 |
36 |

Linting

37 |
38 |

Linting with Flake8

39 |
40 |
41 |

Linting with Black

42 |
43 |
44 | 45 | 46 |
47 | 48 |
49 |
50 | 107 |
108 |
109 | 120 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/_build/files/references.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <no title> — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 |
29 | 30 | 31 |
32 | 33 | 34 | 35 |
36 | 37 |
38 |
39 | 90 |
91 |
92 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /docs/_build/files/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Settings — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |
30 | 31 | 32 |
33 | 34 |
35 |

Settings

36 |
37 |

Syncing Your Settings & Extensions

38 |
39 |
40 |

Shut up & Let Me Replicate Your Settings

41 |
42 |

Replicating My Settings with a Single Click

43 |
44 |
45 |

Customizing the Settings According to Your Need

46 |
47 |
48 |
49 | 50 | 51 |
52 | 53 |
54 |
55 | 115 |
116 |
117 | 128 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /docs/_build/files/themes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Themes — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 35 |
36 |

Themes

37 |
38 |

Awesome Dark Themes

39 |
40 |
41 |

Awesome Light Themes

42 |
43 |
44 | 45 | 46 |
47 | 48 |
49 |
50 | 107 |
108 |
109 | 120 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/_build/files/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Table of Contents 🚀🚀 — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 |
29 | 30 | 31 |
32 | 33 |
34 |

Table of Contents 🚀🚀

35 |
    36 |
  • Installation

  • 37 |
  • Setting up virutal environment

    38 |
      39 |
    • Setting up conda environment

    • 40 |
    • Why I prefer native virtual environment over conda 41 | environment

    • 42 |
    • Selecting your environemt from command palette

    • 43 |
    44 |
  • 45 |
  • Running python scripts with code runner

  • 46 |
  • Linting with flake8 and black

  • 47 |
  • Shortcuts and keybindings

  • 48 |
  • Themes

    49 |
      50 |
    • Awesome Dark Themes

    • 51 |
    • Awesome Light Themes

    • 52 |
    53 |
  • 54 |
  • Fonts

    55 |
      56 |
    • Installing fonts on ubuntu

    • 57 |
    • Awesome Coding Fonts

    • 58 |
    59 |
  • 60 |
  • Extensions

  • 61 |
  • Settings

  • 62 |
  • Syncing your settings and extensions

  • 63 |
  • Shut up and just let me replicate your settings

    64 |
      65 |
    • Replicating my settings with a single click

    • 66 |
    • Customizing the settings according to your need

    • 67 |
    68 |
  • 69 |
70 |
71 | 72 | 73 |
74 | 75 |
76 |
77 | 128 |
129 |
130 | 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /docs/_build/files/venv.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Setting up Environments 🌲 — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 35 |
36 |

Setting up Environments 🌲

37 |
38 |

Why Environments are Necessary

39 |

The main purpose of using environments is to create a segregation between the dependencies of different python projects. It eliminates (at least tries to) dependency conflicts since each project has it's own set of dependencies, isolated from one another.

40 |

Suppose you are working on two projects, Project_1 and Project_2, both of which have a dependency on the same library, let's say the awesome Requests library. Dependency conflict will arise, if for some reason, the two projects need different versions of Request library. For example, maybe Project_1 needs v1.0.0, while Project_2 requires the newer v2.0.0.

41 |

This can easily be avoided by using individual environment for each project where all the dependencies of the corresponding project will reside. There are multiple ways you can create environment. We'll mainly focus on creating python3 based conda environment and native virtual environment.

42 |
43 |
44 |

Conda Environment

45 |
46 |

Installing Anaconda Distribution

47 |

Install anaconda on your machine. I personally prefer miniconda over the full fledged anaconda. The installation guide can be found here:

48 | 52 |
53 |
54 |

Creating Conda Environment

55 |

After installing anaconda, to create a python3 environment with a specific version of python, type the following command. This will create an environemnt named myenv with python 3.7:

56 |
$ conda create -n myenv python=3.7
 57 | 
58 |
59 |
60 |
61 |

Activating Conda Environment

62 |

After creating the conda environment, type the folling command to activate the myenv environment:

63 |
$ conda activate myenv
 64 | 
65 |
66 |
67 |
68 |

Deactivating Conda Environment

69 |

To deactivate, simply type:

70 |
$ conda deactivate
 71 | 
72 |
73 |
74 |
75 |
76 |

Virtual Environment

77 |
78 |

Installing python3-venv

79 |

To create virtual environment, first you need to install python3-venv. Run:

80 |
$ sudo apt update
 81 | $ sudo apt-get install python3-venv
 82 | 
83 |
84 |
85 |
86 |

Creating Virtual Environments

87 |

Create a virtual environment named myenv via running:

88 |
$ python3 -m venv myenv
 89 | 
90 |
91 |

You should see a folder named myenv in your current directory. This is the folder where all your project-specific dependencies are going to reside.

92 |
93 |
94 |

Activating Virtual Environments

95 |

To activate myenv, run:

96 |
$ source myenv/bin/activate
 97 | 
98 |
99 |
100 |
101 |

Deactivating Virtual Environment

102 |

To deactivate, simply type:

103 |
$ deactivate
104 | 
105 |
106 |
107 |
108 |
109 |

Selecting & Switching Between the Environments in VS Code

110 |
    111 |
  • Press ctrl+shift+P to open VS Code's command palette. You should be seeing something like this:

    112 |

    Imgur

    113 |
  • 114 |
  • Type interpreter in the search box. And select the Python: Select Interpreter option. You should see a list of all the available (both conda and virtual environments are shown) python environments. You should also see your recently created myenv environment there. Toggle and select your environment and you are good to go.

    115 |

    Imgur

    116 |
  • 117 |
118 |
119 |
120 | 121 | 122 |
123 | 124 |
125 |
126 | 197 |
198 |
199 | 210 | 211 | 212 | 213 | 214 | 215 | -------------------------------------------------------------------------------- /docs/_build/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Index — How to Python in VS Code 🦄 documentation 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |
30 | 31 | 32 |
33 | 34 | 35 |

Index

36 | 37 |
38 | 39 |
40 | 41 | 42 |
43 | 44 |
45 |
46 | 97 |
98 |
99 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /docs/_build/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Introduction — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |
30 | 31 | 32 |
33 | 34 |
35 |

Introduction

36 |

Although I've been tinkering with python for my Data Science projects since 2016, I only started coding professionally at the end of 2018. It wasn't easy to get accustomed to the workflow by any means and the rigor of a production and test driven environment was something completely different from what I was used to 😓. I had only been using all the tools and packages integrated into the amazing Anaconda Distribution which means Spyder as the IDE and the trusted old Jupyter Notebook for experimentation. I still use jupyter notebook, however, I've picked up VS Code as my primary editor not only due to the fact that everyone at my workplace uses that but also in my opinion it's one of the best language agnostic code editor, period 😁. So this post is an assortment of all the tools and practices that I've picked up throughout my development journey🔥.

37 |

Here I'm using Linux as my primary development OS and almost all of the instructions apply to MacOS also. And About windows, 🤷‍.

38 | 101 |
102 |

Indices and Tables

103 | 108 |
109 |
110 | 111 | 112 |
113 | 114 |
115 |
116 | 168 |
169 |
170 | 181 | 182 | 183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /docs/_build/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/docs/_build/objects.inv -------------------------------------------------------------------------------- /docs/_build/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Search — How to Python in VS Code 🦄 documentation 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |
34 | 35 | 36 |
37 | 38 |

Search

39 |
40 | 41 |

42 | Please activate JavaScript to enable the search 43 | functionality. 44 |

45 |
46 |

47 | From here you can search these documents. Enter your search 48 | words into the box below and click "search". Note that the search 49 | function will automatically search for all of the words. Pages 50 | containing fewer words won't appear in the result list. 51 |

52 |
53 | 54 | 55 | 56 |
57 | 58 |
59 | 60 |
61 | 62 |
63 | 64 |
65 |
66 | 107 |
108 |
109 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /docs/_build/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({docnames:["files/code-runner","files/extensions","files/fonts","files/installation","files/keybindings","files/linting","files/references","files/settings","files/themes","files/toc","files/venv","index"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["files/code-runner.md","files/extensions.md","files/fonts.md","files/installation.md","files/keybindings.md","files/linting.md","files/references.md","files/settings.md","files/themes.md","files/toc.md","files/venv.md","index.rst"],objects:{},objnames:{},objtypes:{},terms:{"default":3,"switch":11,"while":10,And:[10,11],For:10,IDE:11,The:[3,10],Then:3,There:10,Using:11,about:11,accord:[9,11],accustom:11,across:3,action:3,activ:11,after:[3,10],agnost:11,all:[3,10,11],almost:[3,11],also:[3,10,11],although:11,amaz:11,anaconda:11,ani:[3,11],anoth:10,anyth:3,appear:3,appli:11,apt:10,aren:3,aris:10,assort:11,avail:10,avoid:10,awesom:[9,10,11],bar:0,base:10,bash:3,been:11,best:11,between:11,bin:10,black:[9,11],both:10,bottom:3,box:10,bring:3,can:[3,10],click:[0,3,9,11],code:[9,11],column:3,command:[9,10],complet:[3,11],conda:[9,11],conflict:10,control:3,conveni:3,correspond:[3,10],creat:11,ctrl:[3,10],current:10,custom:[9,11],dark:[9,11],data:11,deactiv:11,debug:3,depend:10,develop:11,differ:[10,11],directori:10,distribut:[3,11],download:3,driven:11,due:11,each:[3,10],easi:[3,11],easili:10,editor:11,elimin:10,end:11,environ:[9,11],environemnt:10,environemt:9,everyon:11,exact:3,exampl:10,experiment:11,explicitli:3,explor:3,extens:[3,9,11],extra:3,fact:11,familiar:3,file:3,fire:[],first:[3,10],flake8:[9,11],fledg:10,focu:10,folder:[3,10],foll:10,follow:10,font:[9,11],found:10,from:[3,9,10,11],full:10,functionalit:3,get:[10,11],git:3,give:3,going:10,good:10,gui:3,guid:10,had:11,has:10,have:10,haven:3,here:[3,10,11],hover:3,howev:11,icon:[0,3],index:11,individu:10,instal:[9,11],instruct:11,integr:11,interpret:10,isol:10,journei:11,jupyt:11,just:[3,9],keybind:[3,9,11],keyboard:3,languag:11,least:10,left:[0,3],let:[9,10,11],librari:10,light:[9,11],like:10,link:3,lint:[9,11],linux:[10,11],list:[10,11],machin:[10,11],maco:[10,11],mai:3,main:10,mainli:10,mayb:10,mean:11,mention:3,migrat:3,miniconda:10,modul:11,most:[0,3],multipl:[3,10],myenv:10,name:10,nativ:[9,10],necessari:11,need:[9,10,11],newer:10,normal:3,notebook:11,now:3,old:11,one:[10,11],onli:11,open:[3,10],oper:3,opinion:11,option:[3,10],other:3,otherwis:3,over:[3,9,10],own:10,packag:11,page:11,palett:[9,10],parti:3,perform:3,period:11,person:10,pick:11,post:11,practic:11,prefer:[3,9,10],press:[3,10],primari:11,product:11,profession:11,project:[3,10,11],project_1:10,project_2:10,provid:3,purpos:10,python3:11,python:[9,10,11],reason:10,recent:10,replic:[9,11],replica:3,request:10,requir:10,resid:10,rigor:11,run:[9,10,11],runner:[9,11],sai:10,same:10,scienc:11,script:[9,11],search:[0,3,10,11],see:10,segreg:10,select:[3,9,11],set:[9,11],shift:10,shortcut:[9,11],should:10,show:3,shown:10,shut:[9,11],simpli:10,sinc:[10,11],singl:[9,11],some:10,someth:[10,11],sourc:[3,10],specif:10,spyder:11,start:11,still:11,stripe:[0,3],succeed:3,sudo:10,suppos:10,sync:[9,11],system:3,termin:11,test:11,them:3,theme:[9,11],thi:[3,10,11],third:3,those:3,throughout:11,time:3,tinker:11,toggl:10,tool:11,top:3,tri:10,trust:11,two:10,type:[0,3,10],ubuntu:[9,11],unless:3,updat:10,use:11,used:11,uses:11,using:[3,10,11],venv:11,versatil:3,version:10,via:10,virtual:[9,11],virut:9,wai:10,wasn:11,what:11,where:10,which:[10,11],why:[9,11],window:11,work:10,workflow:11,workplac:11,you:[3,10],your:[9,10,11],yourself:3,zsh:3},titles:["Running Python Scripts with Code Runner \ud83c\udfc3","Extensions","Fonts","Setting up VS Code on Your Machine \u2699\ufe0f","Shortcuts & Keybindings","Linting","<no title>","Settings","Themes","Table of Contents \ud83d\ude80\ud83d\ude80","Setting up Environments \ud83c\udf32","Introduction"],titleterms:{"switch":10,Using:3,accord:7,activ:10,anaconda:10,awesom:[2,8],between:10,black:5,click:7,code:[0,3,10],conda:10,content:[9,11],creat:10,custom:7,dark:8,deactiv:10,distribut:10,environ:10,extens:[0,1,7],flake8:5,font:2,indic:11,instal:[0,2,3,10],integr:3,introduct:11,keybind:4,let:7,light:8,lint:5,list:2,machin:3,nativ:[],necessari:10,need:7,over:[],prefer:[],python3:10,python:0,replic:7,run:[0,3],runner:0,script:0,select:10,set:[0,3,7,10],shortcut:4,shut:7,singl:7,sync:7,tabl:[9,11],termin:3,theme:8,ubuntu:2,venv:10,virtual:10,why:10,your:[3,7]}}) -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | 2 | /* h1 { 3 | font-weight: bold; 4 | color: #000; 5 | font-size: 30px; 6 | } 7 | 8 | h2 { 9 | font-weight: bold; 10 | color: #000; 11 | font-size: 24px; 12 | } */ 13 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | # import os 14 | # import sys 15 | # sys.path.insert(0, os.path.abspath('.')) 16 | 17 | 18 | # -- Project information ----------------------------------------------------- 19 | 20 | project = 'How to Python in VS Code 🦄' 21 | copyright = '2019, Redowan Delowar' 22 | author = 'Redowan Delowar' 23 | 24 | 25 | # -- General configuration --------------------------------------------------- 26 | 27 | # Add any Sphinx extension module names here, as strings. They can be 28 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 29 | # ones. 30 | extensions = ['recommonmark' 31 | ] 32 | # source_parsers = { 33 | # '.md': 'recommonmark.parser.CommonMarkParser', 34 | # } 35 | 36 | source_suffix = ['.rst', '.md'] 37 | 38 | # Add any paths that contain templates here, relative to this directory. 39 | templates_path = ['_templates'] 40 | 41 | # The language for content autogenerated by Sphinx. Refer to documentation 42 | # for a list of supported languages. 43 | # 44 | # This is also used if you do content translation via gettext catalogs. 45 | # Usually you set "language" from the command line for these cases. 46 | language = 'python' 47 | 48 | # List of patterns, relative to source directory, that match files and 49 | # directories to ignore when looking for source files. 50 | # This pattern also affects html_static_path and html_extra_path. 51 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 52 | 53 | 54 | # -- Options for HTML output ------------------------------------------------- 55 | 56 | # The theme to use for HTML and HTML Help pages. See the documentation for 57 | # a list of builtin themes. 58 | # 59 | html_theme = 'alabaster' 60 | html_theme_options = { 61 | # 'caption_font_size': '24px', 62 | # 'caption_font_family': 'Arial', 63 | #'code_font_size': Font size of code block text, 64 | # 'code_font_family': Font family of code block text. Defaults to 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace. 65 | 'font_family': 'Arial', 66 | 'font_size': '19px', 67 | # 'head_font_family': Font family of headings. Defaults to 'Garamond', 'Georgia', serif. 68 | } 69 | 70 | 71 | # Add any paths that contain custom static files (such as style sheets) here, 72 | # relative to this directory. They are copied after the builtin static files, 73 | # so a file named "default.css" will overwrite the builtin "default.css". 74 | html_static_path = ['_static'] 75 | -------------------------------------------------------------------------------- /docs/files/code-runner.md: -------------------------------------------------------------------------------- 1 | # Running Python Scripts with Code Runner 🏃 2 | 3 | ## Installing Code Runner Extension 4 | 5 | Click the extension icon on the left most stripe and type `code runner` in the search bar. You should see the extension popping up in the first row. Click and install. 6 | 7 | ![Imgur](https://imgur.com/UitPn9B.png) 8 | 9 | ## Setting up Code Runner 10 | 11 | By default, code runner uses its own panel for showing the results after you run your python script. However, it's better to set it up in a way that it will show the results in the integrated terminal. 12 | 13 | * Press `ctrl+,` to open up the settings panel 14 | * On the search bar type `code runner terminal` 15 | * You should be able to see an option named `Code-runner: Run In Terminal` 16 | * Check off the option and you are good to go 🍰 17 | 18 | ![Imgur](https://imgur.com/1a7P3Mc.png) 19 | 20 | ## Running Python Scripts 21 | 22 | * Create and select your python environment (See the instructions [here.](https://py-vscode.readthedocs.io/en/latest/files/venv.html)) 23 | * Create a new file via `ctrl+N` 24 | * Press `ctrl+s` to save the file and give it a name with `.py` extension 25 | * Write down your python code in the file 26 | * Press `ctrl+alt+N` to run the code via Code Runner 27 | * You should see your results in the integrated terminal 🛬 28 | * To run only a selected lines of codes, select the lines you want to run and press `ctrl+alt+N`. 29 | 30 | ![Imgur](https://imgur.com/oD19vWb.png) 31 | -------------------------------------------------------------------------------- /docs/files/debugging.md: -------------------------------------------------------------------------------- 1 | # Debugging 2 | 3 | VS Code makes python debugging a breeze. The simplest python debugging workflow usually consists of the following steps: 4 | 5 | * Setting breakpoints at the points of interest 6 | * Inspecting the variables 7 | * Stepping through code 8 | 9 | Let's dive in to see how these can be achieved in VS Code. 10 | 11 | ## Debugging via PDB (Python Debugger) 12 | 13 | From python 3.7 you can just write `breakpoint()` in places where you want to stop your script for inspecting. You can add multiple breakpoints to cater your specific debugging needs. Adding necessary breakpoints and running the script (Ctrl+Atl+N) will open up the native Pdb (python debugger) in the integrated terminal. To inspect variables, just type the name of the variable in the Pdb prompt. 14 | 15 | ![Imgur](https://i.imgur.com/DEyLFS6.png) 16 | 17 | Your script will stop at the first breakpoint. You can either comment and uncomment your breakpoints or you can use Pdb specific commands for moving around and doing granular debugging. Here is a list of a few commands that can be used to inspect code in the Pdb prompt: 18 | 19 | * `l` : The list(l) command will show you the code line that the Python interpreter is currently on. If you want to navigate to different lines of your code, the `l` command takes line number as an argument. For example, writing something like `l 10` will take you to near the 10th line of your code. 20 | 21 | ![Imgur](https://i.imgur.com/FQMsAvQ.png) 22 | 23 | * `u` & `d` : Up(p) and down(d) are the two commands needed to navigate through the call stack. This commands can show you who is calling the current function or why the interpreter is going this way. 24 | 25 | * `s` & `n` : Step(s) and Next(n) help you continue the execution line by line. However, `n` command can't go outside of a function but `s` command can go deeper. 26 | 27 | * `b` : Break(b) command can help you to add new breakpoints without changing the source code. 28 | 29 | * `pp` : Pretty prints the value of an expression 30 | 31 | * `q` : Quits(q) or exits the program. 32 | 33 | * `r` : Continues the execution until the function returns. 34 | 35 | ## Using VS Code's Built in Debugger 36 | 37 | ### Adding Breakpoints to Your Script 38 | Instead of peppering your code with multiple `breakpoint()` functions, you can use VS Code's built in breakpoint feature. Navigate to the line number of your script where you want to place a breakpoint and hover over the line number. You should be able to see a red dot appear. Click to place a breakpoint and click again to remove a breakpoint. 39 | 40 | ![Imgur](https://i.imgur.com/ryh8b7f.png) 41 | 42 | ### Running Script in Debugging Mode 43 | 44 | To run your script in debugging mode, 45 | * Click the debug icon on the left most stripe and at the top bar, look for a green icon with `DEBUG` written beside it. 46 | 47 | ![Imgur](https://i.imgur.com/Aj7bDpA.png) 48 | 49 | * Click on the `Add Configuaration` beside the `DEBUG` button and select `Python: Current File option. 50 | 51 | ![Imgur](https://i.imgur.com/2AMGs7B.png) 52 | 53 | * Click on the green `DEBUG` button to run the script in debugging mode. Alternatively, you can just press `F5` to run the current script in debugging mode. 54 | 55 | * When you run your script in debugging mode, it stops at the first breakpoint. VS Code highlights the active breakpoint. 56 | 57 | ![Imgur](https://i.imgur.com/z5EWV5M.png) 58 | 59 | * The left panel of debugging model has Four panels 60 | * Variables: While running your script in debugging mode, you can click the dropdown on the variable panel and inspect the variables and their corresponding values. 61 | 62 | ![Imgur](https://i.imgur.com/0m1jWvZ.png) 63 | 64 | * Watch: 65 | * Callstack: 66 | * Breakpoints: 67 | 68 | * Using the debug toolbar for inspecting code line by line (mention that the debug toolbar is also draggable) 69 | * Using the `DEBUG CONSOLE` for evaluating variables and more experimentation 70 | -------------------------------------------------------------------------------- /docs/files/extensions.md: -------------------------------------------------------------------------------- 1 | # Extensions 🤖 2 | 3 | You've already seen extensions like `themes`, `keymaps`, `code runner` etc in action. These modules can take your coding experience beyond what the builtins can offer. Here is an inexhaustive list of a few awesome extensions that will help you to make your python workflow more optimized. 4 | 5 | 1. **[Code Runner:](https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner)** Runs code snippet or code file of many popular languages like C, C++, Java, JavaScript, PHP, **Python**, Perl, Ruby, Go, Lua, Groovy, PowerShell etc. 6 | 7 | 2. **[Better TOML:](https://marketplace.visualstudio.com/items?itemName=bungcip.better-toml)** Syntax highlighting for `.toml` files 8 | 9 | 3. **[docs-yaml:](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)** YAML schema validation and auto-completion 10 | 11 | 4. **[DotENV:](https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv)** Support for dotenv file syntax 12 | 5. **[Githistory:](https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory)** View git log, file history, compare branches or commits 13 | 6. **[hide-gitignored:](https://marketplace.visualstudio.com/items?itemName=npxms.hide-gitignored)** Hide files from the file Explorer that are ignored by your workspace's `.gitignore` files 14 | 15 | 7. **[Pytest IntelliSense:](https://marketplace.visualstudio.com/items?itemName=Cameron.vscode-pytest)** Provides autocompletion for pytest 16 | 17 | 8. **[pytest-snippets:](https://marketplace.visualstudio.com/items?itemName=jairhenrique.pytest-snippets)** Snippet and templates for pytest 18 | 19 | 9. **[Rainbow Brackets:](https://marketplace.visualstudio.com/items?itemName=2gua.rainbow-brackets)** Provide rainbow colors for the round brackets, the square brackets and the squiggly brackets. This is particularly useful for Lisp or Clojure programmers, and of course, JavaScript, and other programmers. The isolated right bracket will be highlighted in red. 20 | 21 | 10. **[Rainbow CSV:](https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv)** Highlight CSV and TSV files in different colors, Run SQL-like queries 22 | 23 | 11. **[Rainbow End:](https://marketplace.visualstudio.com/items?itemName=jduponchelle.rainbow-end)** This extension allows to identify keyword / end with colours. 24 | 25 | 12. **[Indent-rainbow:](https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow)** This extension colorizes the indentation in front of your text alternating four different colors on each step. Some may find it helpful in writing code for Nim or Python. 26 | 27 | 13. **[reStructuredText:](https://marketplace.visualstudio.com/items?itemName=lextudio.restructuredtext)** reStructuredText language support (RST/ReST linter, preview, IntelliSense and more) 28 | 29 | 14. **[Docker:](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker)** Adds syntax highlighting, commands, hover tips, and linting for Dockerfile and docker-compose files. 30 | 31 | 15. **[Bookmarks:](https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks)** Mark lines and jump to them 32 | 33 | 16. **[TODO Highlight:](https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight)** Highlight TODO, FIXME and other annotations within your code. 34 | 35 | 17. **[autoDocstring](https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring)** Generates python docstrings 36 | -------------------------------------------------------------------------------- /docs/files/fonts.md: -------------------------------------------------------------------------------- 1 | # Fonts 🕹️ 2 | 3 | Monospace fonts are better optimized for code readability and alignment. Here is a list of awesome coding fonts that I've used in the past. But I always come back to `Fira Code`. 4 | ## List of Awesome Fonts 5 | 6 | ### Free Fonts 7 | 8 | 1. [Fira Code](https://github.com/tonsky/FiraCode) 9 | 2. [Hack](https://github.com/source-foundry/Hack) 10 | 3. [Monoid](https://github.com/larsenwork/monoid) 11 | 4. [Hasklig](https://github.com/i-tu/Hasklig) 12 | 5. [Input Mono](https://github.com/powerline/fonts/tree/master/InputMono) 13 | 6. [Office Code Pro](https://github.com/nathco/Office-Code-Pro) 14 | 7. [Inconsolata](https://github.com/googlefonts/Inconsolata) 15 | 8. [DejaVu Sans Mono](https://github.com/dejavu-fonts/dejavu-fonts) 16 | 9. [Droid Sans Mono](https://github.com/chrissimpkins/codeface/tree/master/fonts/droid-sans-mono) 17 | 10. [Source Code Pro](https://github.com/adobe-fonts/source-code-pro) 18 | 19 | ### Paid Fonts 20 | 21 | 1. [Operator Mono](https://www.typography.com/fonts/operator/styles/) 22 | 2. [Dank Mono](https://dank.sh/) 23 | 3. [PragmataPro](https://www.fsd.it/shop/fonts/pragmatapro/) 24 | 25 | ## Installing Fonts 26 | 27 | ### On Ubuntu 28 | 29 | Even on same OS, installation procedure can vary between different fonts. On ubuntu, `open type` fonts generally live in `/usr/share/fonts/opentype/` folder. 30 | 31 | * To install `Fira Code` you can simply type: 32 | ```bash 33 | $ sudo apt install fonts-firacode 34 | ``` 35 | 36 | * However, this often downloads older version of the font. Recently they released a sleeker version 2.0 of the font. To install that, download the font from [here.](https://github.com/tonsky/FiraCode/releases/download/2/FiraCode_2.zip). Unzip the font folder and go to `otf` folder. Then simply run: 37 | 38 | ```bash 39 | $ sudo cp -a . /usr/share/fonts/opentype/firacode 40 | ``` 41 | -------------------------------------------------------------------------------- /docs/files/installation.md: -------------------------------------------------------------------------------- 1 | # Setting up VS Code on Your Machine 🐶 2 | 3 | ## Installing VS Code 4 | 5 | Installing VS code is easy across all operating systems. 6 | * Just go to the link [here](https://code.visualstudio.com/Download) and select the distribution that corresponds to your OS. 7 | * Download the file and install 8 | 9 | ## Running VS Code 10 | 11 | * After you've completed the installation, open terminal and `cd` to your project folder. Then type: 12 | ``` 13 | $ code . 14 | ``` 15 | This will open your project in VS Code. Familiarize yourself with the GUI if you're using this for the first time. The left most stripe gives you multiple options and hovering over the icons will show you their corresponding functionalites. If you're using any third party extensions, their icons may also appear. Clicking on each of them will bring up extra actions in the succeeding column. 16 | 17 | The default icons are (from top to bottom): 18 | * Explorer 19 | * Search 20 | * Source Control (Git) 21 | * Debug 22 | * Extensions 23 | 24 | ![img](https://i.imgur.com/3QVRiqp.png) 25 | 26 | ## Using the Integrated Terminal 27 | 28 | If you aren't migrating from any other terminal and haven't set up your preferred `keybindings` then you can open the integrated terminal by pressing `ctrl + ~` on your keyboard. This terminal is an exact replica of your `bash`/`zsh` terminal and can perform almost anything that you'd normally do in those. From now an on, unless explicitly mentioned otherwise, we'll be using the integrated terminal for the versatility and convenience it provides. 29 | 30 | ![Imgur](https://imgur.com/0YGaq3z.png) 31 | -------------------------------------------------------------------------------- /docs/files/keymaps.md: -------------------------------------------------------------------------------- 1 | # Shortcuts and Keymaps 💻 2 | 3 | VS Code is loaded with customization options and shortcuts. Default shortcuts can vary between different operating systems. However, you can always change those according to your likings. You can even adopt other editors' keybindings into VS Code. 4 | 5 | ## Changing the Default Keymaps 6 | 7 | * Open the command palette by pressing `ctrl+shift+p`. 8 | * Type `Keyboard shortcuts`. 9 | * Select `Preferences: Open Keyboard Shortcuts`. This will show you a list of all the keyboard shortcuts available to you. 10 | * You can hover over a keybinding and a pencil icon should pop up. 11 | * Click on the pencil icon to add your preferred key combination and press `enter`. 12 | 13 | ![Imgur](https://imgur.com/pFE90m8.png) 14 | 15 | ### Adopting Keymaps from Other Editors 16 | 17 | If you are migrating from any other editors and you want to use you previous keymaps, you can do that too. 18 | * Go to the extension panel. 19 | * Type ` keymaps`. 20 | * Select and install. This should replace the default keymap with your desired one. 21 | 22 | ## A Few Important Shortcuts (On Linux) 23 | 24 | Although the abundance of shorcuts can be a plus,it can be intimidating for someone who's just starting out. Here's a short list of a few important shortcuts that appear more frequently. 25 | 26 | * `ctrl+~` : Opens the integrated terminal 27 | * `ctrl+N` : Opens a new empty file 28 | * `ctrl+Shift+P` : Opens the command palette 29 | * `ctrl+,` : Opens settings 30 | * `ctrl+B` : Toggles between shrinked and extended side panel 31 | * `F11` : Full screen mode 32 | * `ctrl+alt+N` : Running python code 33 | * `F5` : Running python code in debugging mode 34 | -------------------------------------------------------------------------------- /docs/files/linting.md: -------------------------------------------------------------------------------- 1 | # Linting & Formatting 🎀 2 | 3 | Linters perform static analysis of source codes and check for symantic discrepancies. When you lint your code, it's passed through a basic quality checking tool that provides instructions on how eliminate basic syntactic inconsistencies. 4 | 5 | Formatters are similar tools that tries to restructure your code spacing, line length, argument positioning etc to ensure that your code looks consistent across different files or projects. 6 | 7 | Python offers you a plethora of linters and formatters to choose from. Flake8, pyflakes, pycodestyle, pylint are some of the more widely used linters and black, yapf are two newer members in the code formatting space. 8 | However, not to bombard you with a deluge of information, we are taking an opinionated route that gets the job done without a hitch. Let's talk about `Flake8` and `Black`. 9 | 10 | 11 | ## Flake8 12 | 13 | Flake8 is a Python linting library that basically wraps three other linters, **PyFlakes**, **pycodestyle** and **Ned Batchelder's McCabe** Script. It's one of the better linters out there that has very low false positive rate. 14 | It checks your code base against [PEP8](https://www.python.org/dev/peps/pep-0008/) programming style, programming errors (like “library imported but unused” and “Undefined name”) and [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity). 15 | 16 | ![Imgur](https://imgur.com/wmhZevQ.png) 17 | 18 | For more details on the nitty gritties of flake8, check out their github project [here.](https://github.com/PyCQA/flake8) 19 | 20 | 21 | ## Black 22 | 23 | Black is known as the uncompromised Python code formatter. Unlike flake8 or pycodestyle, it doesn't nag you when there are style inconsistencies. It just fixes them for you. Black does not have a lot of options to tinker with and has a lot of opinion on how your code should look and feel. You might not always agree with the decisions that black takes for you but if you can get along with the style that black imposes on you, it can take care of the unnecessary hassles of formatting your codes to keep it conistent across multiple projects or organization. 24 | 25 | 26 | ![Imgur](https://imgur.com/b272FI5.png) 27 | *Before formatting with black* 28 | 29 | 30 | ![Imgur](https://imgur.com/MqoKcqQ.png) 31 | *After formatting with black* 32 | 33 | ## Setting Up Linters in VS Code 34 | 35 | Luckily VS Code comes with both `flake8` and `black` formatter lurking in the settings. To set them up: 36 | 37 | * Press `ctrl+,` to fire up the settings panel 38 | * Search for `flake8` in the search panel 39 | * Enable the option `Python>Linting:Flake8 Enabled` 40 | * Search for black and select `black` from the dropdown called `Python>Formatting:Provider` 41 | 42 | Doing the above will set `flake8` and `black` to lint and format your script on a project basis. You have to install `flake8` and `black` in your environment via `pip install flake8` and `pip install black` respectively. If you want to set them up globally and don't want to worry about formatting ever again, you have set up their global paths. To do so: 43 | 44 | * Deactivate your environment 45 | * Install `flake8` and `black` globally via `pip3 install flake8` and `pip3 install black` 46 | * On the terminal write `whereis flake8` and `whereis black` 47 | * You should see their global paths 48 | ![Imgur](https://i.imgur.com/mCyXVlj.png) 49 | 50 | * Now go to the `settings` and search for `flake8` and paste your `flake8` path in `Python › Linting: Flake8 Path` option 51 | ![Imgur](https://i.imgur.com/YGceReL.png) 52 | * Copy `black` path and paste them in `Python › Formatting: Black Path` option 53 | ![Imgur](https://i.imgur.com/Q8tX7Ro.png) 54 | -------------------------------------------------------------------------------- /docs/files/settings.md: -------------------------------------------------------------------------------- 1 | # Settings ⚙️ 2 | 3 | All your settings and preferences are kept in `settings.json` file. You can directly manipulate that file to set your preference locally or globally. Locally the settings file can be found in `.vscode/settings.json` folder in your current project location. To see the global `settings.json`, head over to `$HOME/.config/Code/User/settings.json` and open it in VS Code. If you haven't changed any of the default settings, the file should be empty or almost empty. 4 | 5 | 6 | ## Syncing Your Settings & Extensions 7 | 8 | You don't want to set up VS Code from scratch every time you change your machine or do a fresh installation of your OS. In such scenarios, `Settings Sync` comes to rescue. You can set it up once, sync your settings and restore the settings with a few click. This will restore all of your settings, extensions, themes and other preferences. To do so, 9 | 10 | * Search and install `Settings Sync` from the extension panel 11 | * Login with your github credentials 12 | * Press `ctrl+Shift+P` to open the command prompt and select `Sync: Update/Upload Settings` option to upload your settings and save to a github gist 13 | * If you are restoring the settings to a freshly installed VS Code, just select `Sync:Download Settings` and you should see your VS Code getting restored 14 | 15 | 16 | ## Shut up & Let Me Replicate Your Settings 17 | 18 | If you don't want to go through the hassle of manually installing all these extensions and like my settings. You can replicate my settings with the help of `Settings Sync` too. To do so: 19 | 20 | * Go to the settings panel and search `setting sync` 21 | 22 | * Find `Sync:Gist` option and replace it with `eec019bccd9c49388eaf9eeaf08c19ec` (This is the gist id of my settings) 23 | * Then go to command prompt and select `Sync:Download Settings` option 24 | * It will take some time to restore all the settings and you should see a setup similar to the following screenshots: 25 | 26 | ![Imgur](https://i.imgur.com/esscMKH.png) 27 | ![Imgur](https://i.imgur.com/TtYbXeI.png) 28 | 29 | 30 | 31 | 32 | **P.S.:** This settings is a modified version of [Kenneth Reitz's](https://www.kennethreitz.org/) VS Code settings. Special thanks to him open sourcing that on twitter. 33 | 34 | ## Customizing the Settings According to Your Need 35 | 36 | After you've synced the above settings, you can easily change the themes, font sizes according to your liking. However, if you want to sync the settings via `Settings Sync`, you have to change back the github gist id and replace that with your own id. To do so: 37 | 38 | * Go go to [https://gist.github.com](https://gist.github.com) and find the gist name `cloudSettings` 39 | * Check you url bar which should show something like this: 40 | ``` 41 | git.github.com//gist_id 42 | ``` 43 | * Copy your own gist id and replace that in `Sync:Gist` (In settings) 44 | 45 | Now you can customize the workspace with your heart's content and sync accordingly. 46 | 47 | **A few Points to Note:** 48 | If you have replicated my settings, you have to: 49 | 50 | * Replace my github credentials with yours in the `settings.json` file 51 | * Change and add your own `Flake8` and `Black` path for them to work (See it [here.](https://py-vscode.readthedocs.io/en/latest/files/linting.html#setting-up-linters-in-vs-code)) 52 | -------------------------------------------------------------------------------- /docs/files/testing.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/files/themes.md: -------------------------------------------------------------------------------- 1 | # Themes 🐙 2 | 3 | Here is a list of some awesome vs code themes that I have encountered over the year. Currently I'm using Cobalt2. You can use [this](https://vscodethemes.com/) website for searching and watching previews of the themes. 4 | 5 | ## Awesome Dark Themes 6 | 7 | 1. [Cobalt2](https://github.com/wesbos/cobalt2-vscode) 8 | 2. [Panda Syntax](https://github.com/tinkertrain/panda-syntax-vscode) 9 | 3. [Dracula](https://github.com/dracula/visual-studio-code) 10 | 4. [Darcula](https://github.com/rokoroku/vscode-theme-darcula) 11 | 5. [TruBoo](https://github.com/ajtruex/TruBoo.git) 12 | 6. [Night Owl](https://github.com/sdras/night-owl-vscode-theme) 13 | 7. [Ayu Mirage](https://github.com/jsenjoy/vscode-ayu) 14 | 8. [Noctis](https://github.com/liviuschera/noctis) 15 | 9. [Shades of Purple](https://github.com/ahmadawais/shades-of-purple-vscode) 16 | 10. [Noctis](https://github.com/liviuschera/noctis) 17 | 18 | 19 | ## Awesome Light Themes 20 | 21 | 1. [Winter is Coming](https://github.com/johnpapa/vscode-winteriscoming.git) 22 | 2. [Github Plus](https://github.com/thenikso/github-plus-theme) 23 | 3. [Min Light](https://github.com/misolori/min-theme.git) 24 | 4. [Braver Solerized](https://github.com/braver/vscode-solarized.git) 25 | 5. [Boxy Theme Kit](https://github.com/trongthanh/vscode-boxythemekit) 26 | 27 | ## Installing Themes 28 | 29 | Installing procedure for a theme is same as installing any other extension. 30 | 31 | * From the left most stripe select extension icon 32 | * Type your desired extension name 33 | * Press install 34 | 35 | ![Imgur](https://imgur.com/xQgXe3S.png) 36 | -------------------------------------------------------------------------------- /docs/files/venv.md: -------------------------------------------------------------------------------- 1 | # Setting up Environments 🌲 2 | 3 | ## Why Environments are Necessary 4 | 5 | The main purpose of using environments is to create a segregation between the dependencies of different python projects. It eliminates (at least tries to) dependency conflicts since each project has it's own set of dependencies, isolated from one another. 6 | 7 | Suppose you are working on two projects, `Project_1` and `Project_2`, both of which have a dependency on the same library, let's say the awesome `Requests` library. Dependency conflict will arise, if for some reason, the two projects need different versions of `Request` library. For example, maybe `Project_1` needs `v1.0.0`, while `Project_2` requires the newer `v2.0.0`. 8 | 9 | This can easily be avoided by using individual environment for each project where all the dependencies of the corresponding project will reside. There are multiple ways you can create environment. We'll mainly focus on creating python3 based `conda environment` and native `virtual environment`. 10 | 11 | 12 | ## Conda Environment 13 | 14 | ### Installing Anaconda Distribution 15 | Install anaconda on your machine. I personally prefer miniconda over the full fledged anaconda. The installation guide can be found here: 16 | * [Linux](https://docs.anaconda.com/anaconda/install/linux/) 17 | * [MacOS](https://docs.anaconda.com/anaconda/install/mac-os/) 18 | 19 | ### Creating Conda Environment 20 | After installing anaconda, to create a python3 environment with a specific version of python, type the following command. This will create an environemnt named `myenv` with python 3.7: 21 | 22 | ```bash 23 | $ conda create -n myenv python=3.7 24 | ``` 25 | 26 | ### Activating Conda Environment 27 | After creating the conda environment, type the folling command to activate the `myenv` environment: 28 | ```bash 29 | $ conda activate myenv 30 | ``` 31 | 32 | ### Deactivating Conda Environment 33 | To deactivate, simply type: 34 | ```bash 35 | $ conda deactivate 36 | ``` 37 | 38 | 39 | ## Virtual Environment 40 | 41 | ### Installing python3-venv 42 | To create virtual environment, first you need to install `python3-venv`. Run: 43 | 44 | ``` 45 | $ sudo apt update 46 | $ sudo apt-get install python3-venv 47 | ``` 48 | 49 | ### Creating Virtual Environments 50 | Create a virtual environment named `myenv` via running: 51 | ```bash 52 | $ python3 -m venv myenv 53 | ``` 54 | You should see a folder named `myenv` in your current directory. This is the folder where all your project-specific dependencies are going to reside. 55 | 56 | ### Activating Virtual Environments 57 | To activate `myenv`, run: 58 | ```bash 59 | $ source myenv/bin/activate 60 | ``` 61 | 62 | ### Deactivating Virtual Environment 63 | To deactivate, simply type: 64 | ```bash 65 | $ deactivate 66 | ``` 67 | 68 | ## Selecting & Switching Between the Environments in VS Code 69 | 70 | * Press `ctrl+shift+P` to open VS Code's `command palette`. You should be seeing something like this: 71 | 72 | ![Imgur](https://imgur.com/ZVtW5Sw.png) 73 | 74 | 75 | * Type `interpreter` in the search box. And select the `Python: Select Interpreter` option. You should see a list of all the available (both conda and virtual environments are shown) python environments. You should also see your recently created `myenv` environment there. Toggle and select your environment and you are good to go. 76 | 77 | ![Imgur](https://imgur.com/PW47gQS.png) 78 | 79 | ## Installing Third Party Packages 80 | To install third party packages/libraries/moduels from `pip` or `conda`, 81 | * Activate your respective environments 82 | * Depending on the package manager you want to use, type either: 83 | 84 | ```bash 85 | $ pip install 86 | ``` 87 | or 88 | ```bash 89 | conda install 90 | ``` 91 | ![Imgur](https://imgur.com/Hv5aRxh.png) 92 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. py-vscode documentation master file, created by 2 | sphinx-quickstart on Sat Sep 28 16:12:43 2019. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 7 | 8 | Introduction 9 | ********************* 10 | 11 | Although I've been tinkering with python for my Data Science projects since 2016, I only started coding professionally at the end of 2018. It wasn't easy to get accustomed to the workflow by any means and the rigor of a production and test driven environment was something completely different from what I was used to 😓. I had only been using all the tools and packages integrated into the amazing Anaconda Distribution which means Spyder as the IDE and the trusted old Jupyter Notebook for experimentation. I still use jupyter notebook, however, I've picked up **VS Code** as my primary editor not only due to the fact that everyone at my workplace uses that but also in my opinion it's one of the best language agnostic code editor, period 😁. So this post is an assortment of all the tools and practices that I've picked up throughout my development journey🔥. 12 | 13 | Here I'm using Linux as my primary development OS and many of the instructions apply directly to MacOS also. However, if you are doing python in VS Code on MacOS or Windows, I encourage you contribute and extend this guideline. Now let's jump in 🦘. 14 | 15 | *********************** 16 | Table of Contents 🚀🚀 17 | *********************** 18 | 19 | .. toctree:: 20 | :maxdepth: 3 21 | 22 | files/installation 23 | files/venv 24 | files/code-runner 25 | files/linting 26 | files/keymaps 27 | files/themes 28 | files/fonts 29 | files/extensions 30 | files/settings 31 | 32 | ******************** 33 | Indices and Tables 34 | ******************** 35 | 36 | * :ref:`genindex` 37 | * :ref:`modindex` 38 | * :ref:`search` 39 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | 2 | alabaster==0.7.12 3 | Babel==2.7.0 4 | Sphinx==2.2.0 5 | recommonmark==0.6.0 6 | -------------------------------------------------------------------------------- /ext/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rednafi/py-vscode/553051c9eddbd8df44dff7ab0b70a5c430c7dbcd/ext/logo.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | 2 | alabaster==0.7.12 3 | Babel==2.7.0 4 | Sphinx==2.2.0 5 | recommonmark==0.6.0 6 | --------------------------------------------------------------------------------