March 23, 2020

[Note] Jupyter-auto complete, dark theme

Auto Complete

> conda install -c conda-forge jupyter_nbextensions_configurator
> conda install jupyter_contrib_nbextensions
> jupyter nbextensions_configurator enable --user
> jupyter nbextension enable hinterland/hinterland

Dark Theme

> conda install jupyterthemes
> jt -t monokai -f fira -fs 11 -nf ptsans -nfs 11 -N -kl -cursw 5 -cursc r -cellw 95% -T

or,

> conda install -c conda-forge jupyterthemes

Check below reference page for adding extensions and dark mode's graph set up.

e.g. C:\Users\<user name>\.ipython\profile_default\startup\00_startup.py:

import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from jupyterthemes import jtplot
jtplot.style(theme='monokai', context='notebook', ticks=True, grid=False)


For pyplot, use this in Jupyter notebook:

import matplotlib.pyplot as plt
plt.style.use('dark_background')


Reference

https://medium.com/@rbmsingh/making-jupyter-dark-mode-great-5adaedd814db


March 13, 2020

New tool - KITE for Python, Anaconda + Visual Studio Code


Kite - AI plugin for Python


https://kite.com/

Supports Atom, Sublime, JetBrains, Visual Studio Code, VIM, Spyder.

For VSC - https://help.kite.com/article/69-using-the-vs-code-plugin

After installing it, it runs as an application.  This may not work in work place network.


Visual Studio Code + Anaconda


Assuming Anaconda is already installed.
Install Python extension
Install Run Code extension, https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner

CTRL-SHIFT-P, and select "Preferences: Open Settings (JSON):




And edit it:





See all the environments:






Other useful VSC extensions

CSV - rainbow, https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv
CSV - table, https://marketplace.visualstudio.com/items?itemName=phplasma.csv-to-table
Rainbow bracket - https://marketplace.visualstudio.com/items?itemName=2gua.rainbow-brackets
Select line status - https://marketplace.visualstudio.com/items?itemName=tomoki1207.selectline-statusbar
Todo - https://marketplace.visualstudio.com/items?itemName=sandy081.todotasks

Ascii Art - https://marketplace.visualstudio.com/items?itemName=BitBelt.converttoasciiart
Insert Unicode - https://marketplace.visualstudio.com/items?itemName=brunnerh.insert-unicode
Unicode Substitution - https://marketplace.visualstudio.com/items?itemName=GlenBuktenica.unicode-substitutions
Emoji - https://marketplace.visualstudio.com/items?itemName=Perkovec.emoji
VS Code Speech - https://marketplace.visualstudio.com/items?itemName=bierner.speech
Translator - https://marketplace.visualstudio.com/items?itemName=yokawasa.vscode-translator-voice

Remote WSL - https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl
Remote SSH - https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh
SSH FS - https://marketplace.visualstudio.com/items?itemName=Kelvin.vscode-sshfs
Remote Dev - https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack

Anaconda Extension pack - https://marketplace.visualstudio.com/items?itemName=ms-python.anaconda-extension-pack
Magic Python - https://marketplace.visualstudio.com/items?itemName=magicstack.MagicPython
Python VS Code - https://marketplace.visualstudio.com/items?itemName=tht13.python

Jumpy - https://marketplace.visualstudio.com/items?itemName=wmaurer.vscode-jumpy
Cursor Move - https://marketplace.visualstudio.com/items?itemName=stringham.cursor-move

Jupyter Previewer - https://marketplace.visualstudio.com/items?itemName=jithurjacob.nbpreviewer
Clojure - https://marketplace.visualstudio.com/items?itemName=jamesnorton.continuum