Docker

January 18, 2018

Namespaces CGROUP IPC NET NS (MNT) PID USER UTS PID $ ps axul | sort -n -k 2 | head -n 10 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND UID PPID CPU PRI NI WCHAN root 1 0.0 0.1 4372056 12232 ?? Ss 15Jan18 54:02.49 /sbin/launchd 0 0 0 37 0 - root 38 0.0 0.0 4351128 1756 ?? Ss 15Jan18 0:49.25 /usr/sbin/syslog 0 1 0 4 0 - root 39 0. ... Read more

Mac Command Line Tools

January 3, 2018

oh my zsh alias gr='grep -Rnif /dev/stdin . <<<' alias tri='tree -I "*.pyc|__pycache__"' alias youtube-dl='/usr/local/Cellar/youtube-dl/2018.01.14/bin/youtube-dl' alias y2mp3='youtube-dl --extract-audio --audio-format mp3 --audio-quality 0' # alias for git alias gs="git status" alias gsv="git status -v" alias gaa="git add -A" alias gcm="git commit -m" alias gk="git checkout" alias gd='git diff' alias gdc='git diff --cached' alias tri="tree -I '*.pyc|__pycache__|__init__.py'" <!-- export JAVA_HOME=$(/usr/libexec/java_home) --> export ANSIBLE_SSH_CONTROL_PATH='/tmp/asb-%%h-%%p-%%r' # agnoster prompt modified ZSH_THEME_GIT_PROMPT_DIRTY='±' function _git_prompt_info() { ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)" echo "${ref/refs\/heads\// }$(parse_git_dirty)" } function _git_info() { if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then local BG_COLOR=green if [[ -n $(parse_git_dirty) ]]; then BG_COLOR=yellow FG_COLOR=black fi if [[ ! ... Read more

Go

December 14, 2017

Doumentation Go has well balanced the documentation and code by integrating a powerful eco-system within the tool sets. godoc -http=:8888 offline documentation site godoc fmt Fprintf or godoc builtin append quick terminal check comments prefix as document stub, but no specific requirements for parameters and return value, as go document tool will dynamically parse it from the source code Basics Static Types (Built In) builtin pkg bool string int int8 ... Read more

Elixir Part I - Playbook

November 30, 2017

https://joearms.github.io/published/2013-05-31-a-week-with-elixir.html Pattern Matching equal sign = is not an assignment, is a match operator ^ pin operator forces using existing values Immutable iex(13)> l1 = [1,2,3] [1, 2, 3] iex(14)> l2 = [ l1 | 'a'] [[1, 2, 3], 97] iex(16)> l2 = [ 'a'| l1] ['a', 1, 2, 3] Basics Value Types iex(23)> 0o3407 1799 iex(24)> 0b111100 60 iex(25)> 0x33ff 13311 iex(28)> :var@2 :var@2 iex(29)> 1..100 1..100 iex> Regex. ... Read more

Ski Resort Clusterring near Montreal

November 18, 2017

Rational My 3rd ski season in montérégie is coming, and this post uses a very basic machine-learning-unsupervised-clusterring algorithm to show an interesting analysis about how to choose your next ski journey. Algorithm Quote from wiki page k-means clustering is a method of vector quantization, originally from signal processing, that is popular for cluster analysis in data mining. k-means clustering aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster. ... Read more

換胎 tips

November 7, 2017

自己換胎的好處 省錢 看天氣看心情不需排隊等候,熟練后一套胎大約一小時左右可以完成,實際時間比去店里換要少得多 自己換必須買輪轂,減少扒胎的次數, ... Read more

ML Week4 - Neural Network

October 24, 2017

ML AI
Brain auditory cortex somatosensory cortex NN Model Neuro.IO Dentrite => Axon input layer > hidden layer (intermediate layer) > output layer all hidden layer nodes are called “activation units” $$a_i^{(j)} = \text{“activation” of unit $i$ in layer $j$}$$ $$\Theta^{(j)} = \text{matrix of weights controlling function mapping from layer $j$ to layer $j+1$}$$ Forward Propagation using trained parameters $\theta_{n}$ we can predict the output by calculate the output layer value

Continuous Delivery

October 14, 2017

Release Pipeline Everything starts from a commit, typically for a feature development. This should automatically trigger a build job on our CI server; the unit tests is also included in the job. a. If any automation test needed for the feature, the automation cases can be implemented by tester in parallel. If everything is OK, we can deploy everything in stage, this step is currently manual. Note: the deploying steps ... Read more

詞集

October 13, 2017

tags: [english] stutter demystify vs elaborate make (a difficult or esoteric subject) clearer and easier to understand. develop or present (a theory, policy, or system) in detail -ent resilient (of a person or animal) able to withstand or recover quickly from difficult conditions (of a substance or object) able to recoil or spring back into shape after bending, stretching, or being compressed. transient lasting only for a short time; impermanent. ... Read more

ML Week2

October 8, 2017

ML AI
Multivariate Linear Regression Hypothesis $$ h_\theta(x) = \begin{bmatrix}\theta_0 \hspace{2em} \theta_1 \hspace{2em} … \hspace{2em} \theta_n \end{bmatrix} \begin{bmatrix}x_0 \newline x_1 \newline \vdots \newline x_n\end{bmatrix} = \theta^T x $$ Gradient Descent Practices Scaling or normalize the range (e.g. mean normalization) learning rate $\alpha$ Ploynomial Regression typical equations: $\theta_0x_0 + \theta_1x_1 + \theta_2x_2^2$ $\theta_0x_0 + \theta_1x_1 + \theta_2x_2^2 + \theta_3x_3^3$ $\theta_0x_0 + \theta_1x_1 + \theta_2 \sqrt{x_2}$ Normal Equation if n > 1000, hard to solve the inverse of $(X^TX)^{-1}$ ... Read more

© 2018 | 朱曉清 | powered by Hugo