Concepts & Short Keys & Tricks & Tips & Useful links

Table of Contents

1 Data Mining

1.1 Concepts

name description
likelihood function the probability of an event happens when the parameter is θ
MLE(max likelihood estimation) make the probability be max to achieve a estimated value of θ
Gaussian Process every point in some continuous input space is associated with a normally distributed random variable. Moreover, every finite collection of those random variables has a multivariate normal distribution
   

1.2 Model Selection

datamining_scikit_model_selection.png

2 Matplotlib

2.1 Useful Links

3 Emacs

3.1 Keys

short key command(M-x) description
M-` tmm-menubar show menubar in command line
C-c C-c   org-mode: evaluate current code
C-c C-z   org-mode: add note
C-c C-q   org-mode: add tags
C-c C-d   org-mode: add deadline
Shift-up   org-mode: make priority level up
Shift-down   org-mode: make priority level down
Shift-left   org-mode: move to previous day
Shift-right   org-mode: move to next day
  customize-face RET cursor change cursor color
C-M-s search-forward-regex  
C-M-r search-backward-regex  
C-x c-l downcase-region change the letters in region to be small case
C-x left previous-buffer change to previous buffer
M-. elpy-goto-defination elpy: go to defination
C-c p f helm-projectile-find-file projectile: list all files in this project

3.2 Tips&Tricks

  • After enter one row in table, enter TAB will auto format this table row
  • Org-mode: add loop: after the deadline, add +1d for every day, +1m for every month
  • Org-mode: in code section, use exports both/none/code/results to sepecify which one for exporting
  • Org-mode: force to republish unchanged files: M-: (org-publish "project name" t)
  • Org-mode: set size for inserted image: #+ATTRHTML: :width 70% :height 50%
  • Dot: let node a,b,c,d in the same level, using the sentence: {rank=same a b c d}

4 Docker

4.1 Shell Commands

  • delete <none> images: docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")

5 Shell

5.1 Code Snippets

  • judge if a command runs well or not
install_cairo=`rpm -qa cairo-devel`
if [ -n "$install_cairo"];then
    echo 'RUN FAILED'
else
    echo 'RUN SUCCESS'
fi

6 MySQL

7 R

7.1 Syntax

function usage description
require   load an package, it will continue even if the package does not exist.
library   load an package, it will throw exception if it does not exist.

8 Python

8.1 Data Generator

包含2个不同序列数据的序列: Xtrain

X = 0.3 * np.random.randn(100, 2) Xtrain = np.r[X + 2, X - 2]

9 Chrome

9.1 Tips:

  • Auto open debug window of every new tab: run shell cmd: open /Applications/Google\ Chrome.app –args –auto-open-devtools-for-tabs

10 HTTP

10.1 Headers

field description
Request Header: Accept specify the data type which could be accepted by client
Request/Response Header: Content-Type specify the data type in current request/response

11 SSD vs. Hard Pan

compare item SSD(Intel Enterprise Level) Hard Pan
speed(IOPS) 5w 200
delay(ms) 0.1 8

IOPS: the random read and write count in one second

Author: Marcnuth

Last Updated: 2017-06-09 Fri 14:01