1 Windows system

New laptop;

Change permission;

  • Refer to britec does not really work.
  • Method 1: add Everyone
  • Method 2: add a specifc user (Stewart Li) or a brand new laptop user
  • Method 3: edit group policy (gpedit.msc) which does not exit on windows 10
  • Method 4: whitespace
  • My users folder is under my control now, but still cannot install R packages

Windows user name and R library path;

library(devtools)
find_rtools()

Sys.setenv(PATH = paste(Sys.getenv("PATH"), "C:/Rtools/bin/",
                        "C:/Rtools/mingw_64/bin", sep = ";"))
                        
Sys.setenv(BINPREF = "C:/Rtools/mingw_64/bin/")

Sys.getenv()[grep("LIB|PATH", names(Sys.getenv()))]

.fixdevtools <- function() { httr::set_config( httr::config( ssl_verifypeer = 0L ) ) }
.fixdevtools()

write("TMP = C:/tmp", file=file.path(Sys.getenv('R_USER'), '.Renviron'))

.libPaths()

Windows hotkeys (version 1809 or above);

  • Refer to TechGumbo
  • Windows powershell: properties, run as administrator,
  • User name: $env:username
  • Windows version: Windows key + R + winver
  • Cloud clipboard: Windows key + V
  • Snip: Windows key + Shift + S
  • Microsoft virtual windows: Ctrl + windows key + arrow, windows key + Tab, windows key + F2 = PrtScr,
  • Charmap, Realiability, Calibrate display color, Services

2 General tools

3 Python envionment

Ubuntu installation;

  • Activate developer mode on windows system
  • Select linux on Turn on and off windows features
  • Download ubuntu 18.4 from Microsoft store
  • sudo apt update
  • sudo apt upgrade
  • VIM, Tmux and Python are included

Linux command line;

  • bin folder contains all scripts and functions
  • etc folder contains all configuration
  • var folder contains caches
  • Write scripts inside of .bashrc file,
  • set | less (entire environment), ls /etc/bash*, ls /etc/bash*,

  • sudo -s (don’t do it)
  • Ctrl+h (., show all folders)
  • su cindy (login as another person)
  • chmod 755 hello (permission deny)
  • sudo shutdown -h (-r) now, sudo shutdown -h 15, sudo shutdown -c,
  • man nodejs, man man,
  • ping www.goolge.com -c 3
  • nano, Ctrl+x,
  • less, more, cat, |,
  • htop, sudo reboot, killall, clear, Ctrl+l, q, exit, ctrl+c,
  • mkdir, rm -r mydir, cd ., .., ~, ./, pwd, cd &&,
  • which, touch, cp, mv, ls -lart, ls -alh, ls -la, ls -a, ls -l, ll, ls, \ls, grep.

3.1 Tmux (Ctrl + b)

Tmux configuration;

Open;

  • Tmux other softwares

Learning materials;

Hotkeys;

  • c, w, p, n, f, ,, &,
  • %, ", o,
  • exit, tmux ls,

3.2 VIM (3 modes)

.vimrc configuration;

  • Download Vundle
  • Configure basics - set format and filetype
  • Add Plugins - :PluginInstall, search
  • Create .vim/bundle folder
  • Finally, I decided to use amix

Open;

  • vim foo.py, index.html, main.js,

Learning materials;

Hotkeys;

  • leaderkey, ,
  • normal!, qq, ., register, ctrl + [ = Esc, ctrl + j,
  • G, gg, H, M, L,
  • /, ?, $, %s, :, {, w, wq, q, q!, ZQ,
  • A, a, I, i, x, c, ci(, d, dd, dj, dw, ds, dp, p, f, zz, ZZ, w, W, r, u,
  • v, sp, vslipt,

3.3 Emmet-vim (Ctrl + y)

emmet-vim installation;

Useless emmet-vim stuffs in my folder;

  • Failure of (1st) emmet-vim inside of bundle
  • Vundle and emmet-vim download are inside of my_configs.vim (in vim_runtime)

visualstudio;

3.4 Python

what python can do list;

  • Web developments: Flask vs Django
  • Game development: Blender
  • Desktop applications: Electron
  • Office automation/Scripting: R
  • Machine learning: R

Activate work envionment;

  • I don’t know what is the effct on my machine???
  • mkdir pyenv
  • sudo apt-get install python3-venv
  • cd pyenv
  • work

Install pip and python3 libraries;

Python packages;

  • numpy, scipy, pandas,
  • scikit-learn, tensorflow
  • matplotlib, seaborn

3.5 node.js

Download softwares;

Install electron;

  • Global (useless on Ubuntu): ./home/stroot/node_modules
  • npm install -g electron
  • npm install electron
  • mkdir stapp (../app)
  • cd stapp
  • npm init
  • package.json
  • npm install electron –save

Learning material;

3.6 nomnoml.js

  • Better use equivalent Rversion
  • npm install nomnoml
  • npm uninstall nomnoml

4 R environment

4.1 R

4.2 RStudio

Basic workflow;

  • R -> RMD -> Shiny -> PPT, PDF, Word, Excel and others
  • RStduio server pro
  • RStduio connect (security issue)
  • RStduio package manager (docker like)

4.3 R packages

When you install those most important R packages, such as tidyverse and tidymodel, you have all other important dependency packages too.

Must have;

5 Summary