The easiest restapi for Django

pip install djangorestframework In your setting file, add the “rest_framework”: Create two files in your app: api : define the url api: define the function In url.py:  In views.py: You can also use decorators, it will be simpler:

Install bokeh

Install nodejs conda install -c conda-forge nodejs install jupyter lab conda install -c conda-forge jupyterlab install jupyter lab: jupyter labextension install jupyter labextension list install bokeh plugin for jupyter jupyter labextension install jupyterlab_bokeh

the useful plugins for new linux installation

install virtualenvironment: Install open terminal here: sudo apt-get install nautilus-open-terminal nautilus -q install notebook extenstion pip install jupyter_contrib_nbextensions jupyter contrib nbextension install –user

Jupyter Magic Memory

%: line magic, %%cell magic Repeat Command: %recall Write cell content into a file: %%writefile file.py To autoreload your pyfile: %load_ext autoreload %autoreload 2 from yourfile import yourFunction Use R in jupyter %load_ext rpy2.ipythonR magic in cell %%Rcode in…

R important things

R has no block comment, but you can still do the following things: In RStudio: Ctrl+Shift+C if(false){xxx} block   python to R df.tail() -> tail(df) dropna(df) ->na.omit(df) / df[complete.cases(df),] df.describe() -> summary(df), library(psych): describe(df) df.shape -> dim(df)