/
local-search.xml
86 lines (41 loc) · 17 KB
/
local-search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>My_workflow</title>
<link href="/Tools/My-workflow/"/>
<url>/Tools/My-workflow/</url>
<content type="html"><![CDATA[<h1 id="My-personal-workflow-with-Nvim-Tmux"><a href="#My-personal-workflow-with-Nvim-Tmux" class="headerlink" title="My personal workflow with Nvim + Tmux"></a>My personal workflow with Nvim + Tmux</h1><span id="more"></span><p><strong><em>Experience is everything!</em></strong><br>These settings can make you focus on your workflow and improve coding efficiency.<br>Code can be found in my <a href="https://github.com/yingxiaowoxx/">github respository</a></p><p><img src="https://raw.githubusercontent.com/yingxiaowoxx/Blog-img/master/img/93d1e7654df592a51374330b508c1106.png" alt="My work flow"></p><h2 id="iTerm2-Oh-My-Zsh"><a href="#iTerm2-Oh-My-Zsh" class="headerlink" title="iTerm2 + Oh My Zsh"></a>iTerm2 + Oh My Zsh</h2><p>It is a pretty nice combination to make your terminal so much better!</p><h3 id="Requirement"><a href="#Requirement" class="headerlink" title="Requirement"></a>Requirement</h3><blockquote><p><strong><em>HOMEBREW</em></strong></p></blockquote><p>First of all, you need <a href="https://brew.sh/">homebrew</a> to manage your packages on mac.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">/bin/bash -c <span class="hljs-string">"<span class="hljs-subst">$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)</span>"</span><br></code></pre></td></tr></table></figure><p>Then add homebrew to your system path:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">'eval "$(/opt/homebrew/bin/brew shellenv)"'</span> >> /Users/[username]/.zprofile<br><span class="hljs-built_in">eval</span> <span class="hljs-string">"<span class="hljs-subst">$(/opt/homebrew/bin/brew shellenv)</span>"</span><br></code></pre></td></tr></table></figure><blockquote><p><strong><em>Packages</em></strong></p></blockquote><ul><li><a href="https://iterm2.com/">iTerm2</a></li><li><a href="https://ohmyz.sh/">Oh My Zsh</a></li><li><a href="https://git-scm.com/">Git</a></li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">brew install --cask iterm2<br></code></pre></td></tr></table></figure><figure class="highlight mipsasm"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs mipsasm"><span class="hljs-keyword">brew </span><span class="hljs-keyword">install </span>git<br></code></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">sh -c <span class="hljs-string">"<span class="hljs-subst">$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)</span>"</span><br></code></pre></td></tr></table></figure><p>You can find your favourite theme in the official <a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Themes">document</a>.<br>My “<a href="https://github.com/romkatv/powerlevel10k">PowerLevel10K</a>“ theme look like this:<br><img src="https://raw.githubusercontent.com/yingxiaowoxx/Blog-img/master/img/20230324153531.png" alt="Oh my zsh"></p><h2 id="Neovim"><a href="#Neovim" class="headerlink" title="Neovim"></a>Neovim</h2><h3 id="Requirement-1"><a href="#Requirement-1" class="headerlink" title="Requirement"></a>Requirement</h3><blockquote><p><strong><em>Packages</em></strong></p></blockquote><ul><li><a href="https://neovim.io/">Neovim</a></li><li><a href="https://www.nerdfonts.com/">Nerd Font</a></li><li><a href="https://github.com/BurntSushi/ripgrep">Ripgrep</a></li><li>XCode Command Line Tools</li></ul><p>You also need to install iTerm2, Neovim, Ripgrep and Node with homebrew.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">brew install --cask iTerm2<br></code></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">brew install neovim<br></code></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">brew install ripgrep<br></code></pre></td></tr></table></figure><blockquote><p><strong><em>XCode Command Line Tools</em></strong></p></blockquote><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">xcode-select --install<br></code></pre></td></tr></table></figure><h3 id="Actions"><a href="#Actions" class="headerlink" title="Actions"></a>Actions</h3><p>Create a directory named “nvim”:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">mkdir</span> ~/.config/nvim<br></code></pre></td></tr></table></figure><p>And then just clone my respository.<br>The folder structure looks like this:</p><figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><code class="hljs stylus">.<br>├── init<span class="hljs-selector-class">.lua</span><br>├── lua<br>│ └── xx<br>│ ├── core<br>│ │ ├── colorscheme<span class="hljs-selector-class">.lua</span><br>│ │ ├── keymaps<span class="hljs-selector-class">.lua</span><br>│ │ └── options<span class="hljs-selector-class">.lua</span><br>│ ├── plugins<br>│ │ ├── autopair<span class="hljs-selector-class">.lua</span><br>│ │ ├── comment<span class="hljs-selector-class">.lua</span><br>│ │ ├── gitsigns<span class="hljs-selector-class">.lua</span><br>│ │ ├── lsp<br>│ │ │ ├── lspconfig<span class="hljs-selector-class">.lua</span><br>│ │ │ ├── lspsaga<span class="hljs-selector-class">.lua</span><br>│ │ │ ├── mason<span class="hljs-selector-class">.lua</span><br>│ │ │ └── null-la<span class="hljs-selector-class">.lua</span><br>│ │ ├── lualine<span class="hljs-selector-class">.lua</span><br>│ │ ├── nvim-cmp<span class="hljs-selector-class">.lua</span><br>│ │ ├── nvim-tree<span class="hljs-selector-class">.lua</span><br>│ │ ├── telescope<span class="hljs-selector-class">.lua</span><br>│ │ └── treesitter<span class="hljs-selector-class">.lua</span><br>│ └── plugins-setup<span class="hljs-selector-class">.lua</span><br>└── plugin<br> └── packer_compiled.lua<br></code></pre></td></tr></table></figure><p>It will be look like this:<br><img src="https://raw.githubusercontent.com/yingxiaowoxx/Blog-img/master/img/20230324150528.png" alt="Neovim"></p><h2 id="Tmux"><a href="#Tmux" class="headerlink" title="Tmux"></a>Tmux</h2><h3 id="Requirement-2"><a href="#Requirement-2" class="headerlink" title="Requirement"></a>Requirement</h3><p>Please ensure you have installed <a href="https://github.com/tmux/tmux/wiki">tmux</a> first.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">brew install tmux<br></code></pre></td></tr></table></figure><h3 id="Actions-1"><a href="#Actions-1" class="headerlink" title="Actions"></a>Actions</h3><p>You just need create a “.tmux.conf” file in your home directory.</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">nvim ~/.tmux.conf<br></code></pre></td></tr></table></figure><p>And then copy <a href="https://github.com/yingxiaowoxx/Neovim/blob/master/.tmux.conf">my config</a> into your <strong>“.tmux.conf”</strong> file.<br>It will be look like this:<br><img src="https://raw.githubusercontent.com/yingxiaowoxx/Blog-img/master/img/20230324144855.png" alt="Tmux"></p><h1 id="Congratulations"><a href="#Congratulations" class="headerlink" title="Congratulations!"></a>Congratulations!</h1><p>Reference: @<a href="https://github.com/josean-dev/dev-environment-files">josean</a> @<a href="https://github.com/bryant-video/neovim-tutorial">bryant</a></p>]]></content>
<categories>
<category>Tools</category>
</categories>
<tags>
<tag>Vim</tag>
<tag>Mac</tag>
</tags>
</entry>
<entry>
<title>Probability_Theory</title>
<link href="/Mathematics/Probability-Theory/"/>
<url>/Mathematics/Probability-Theory/</url>
<content type="html"><![CDATA[<p><em>This blog just works as a formula stack.</em></p><span id="more"></span><h2 id="Formula"><a href="#Formula" class="headerlink" title="Formula"></a>Formula</h2><h3 id="Law-of-Total-Probability"><a href="#Law-of-Total-Probability" class="headerlink" title="Law of Total Probability"></a>Law of Total Probability</h3><p><strong>IF</strong>: {${A_{i}:i=1,2,3…,n}$} is a finite or countably infinite partition of a sample space.</p><p><strong>THEN</strong> for any event $B$:<br>$$ P(B)=\sum*{i=1}^n P(A*{i})P(B|A_{i}) $$</p><h3 id="Bayes’-Theorem"><a href="#Bayes’-Theorem" class="headerlink" title="Bayes’ Theorem"></a>Bayes’ Theorem</h3><p><strong>IF</strong>:{${A_{i}:i=1,2,3,…,n}$} is a finite or countably infinite partition of a sample space (happens firstly), and $B$ is a fixed event(happens secondly).</p><p><strong>THEN</strong> for any event $A_{k}(k\in{1,2,3,…,n})$:</p><p>$$<br>P(A_{k}|B)=\frac{P(A_{k})P(B|A_{k})}{\sum_{i=1}^nP(A_{i})P(B|A_{i})}<br>$$</p><h3 id="Binomial-Distribution-X-sim-B-n-p"><a href="#Binomial-Distribution-X-sim-B-n-p" class="headerlink" title="Binomial Distribution $X \sim B(n, p)$"></a>Binomial Distribution $X \sim B(n, p)$</h3><p><strong>IF</strong> the random variable $X$ follows the binomial distribution with and $p ∈ [0,1]$, we write $X \sim B(n, p)$.</p><p><strong>THEN</strong>The probability of getting exactly <em>k successes in n independent Bernoulli trials</em> is given by the probability mass function :</p><p>$$<br>P\left(X=k\right)=C_{n}^kp^k(1-p)^k<br>$$</p><h3 id="Poisson-Distribution-X-sim-P-lambda"><a href="#Poisson-Distribution-X-sim-P-lambda" class="headerlink" title="Poisson Distribution $X \sim P(\lambda)$"></a>Poisson Distribution $X \sim P(\lambda)$</h3><p><strong>IF</strong> a discrete random variable X is said to have a Poisson distribution, with parameter $\lambda>0$, we write $X \sim P(\lambda)$ or $X \sim \pi(\lambda)$.</p><p><strong>THEN</strong> it has a probability mass function given by :</p><p>$$<br>P\left(X=k\right)=\frac{\lambda^k}{k!}e^{-\lambda}<br>$$</p><h3 id="Continuous-Uniform-Distribution-X-sim-U-a-b"><a href="#Continuous-Uniform-Distribution-X-sim-U-a-b" class="headerlink" title="Continuous Uniform Distribution $X \sim U(a,b)$"></a>Continuous Uniform Distribution $X \sim U(a,b)$</h3><p><strong>IF</strong> the <em>probability density function</em> of the continuous uniform distribution $x$ is :</p><p>$$<br>f(x) = \begin{cases}<br>\frac{1}{b-a},& a<x<b\\<br>0,& else \\<br>\end{cases}<br>$$</p><p><strong>THEN</strong> we write $X \sim U(a,b)$, and the <em>cumulative distribution function</em> is :</p><p>$$<br>F(x) = \begin{cases}<br>0,& x<a\\<br>\frac{x-a}{b-a},& a \leq x < b \\<br>1,& x \geq b<br>\end{cases}<br>$$</p><h3 id="Exponential-distribution-X-sim-E-lambda"><a href="#Exponential-distribution-X-sim-E-lambda" class="headerlink" title="Exponential distribution $X \sim E(\lambda)$"></a>Exponential distribution $X \sim E(\lambda)$</h3><p><strong>IF</strong> the <em>probability density function</em> of the continuous uniform distribution $x$ and the <em>rate parameter</em> $\lambda > 0$ is :</p><p>$$<br>f(x;\lambda) = \begin{cases}<br>\lambda e^{-\lambda x},& x\geq 0 \\<br>0,& x<0 \\<br>\end{cases}<br>$$</p><p><strong>THEN</strong> we write $X \sim E(\lambda)$, and the <em>cumulative distribution function</em> is given by :</p><p>$$<br>F(x)=\begin{cases}<br>1-e^{-\lambda x},&x \geq 0\\<br>0,&x<0\\<br>\end{cases}<br>$$</p><h3 id="Normal-Distribution-X-sim-N-mu-sigma-2"><a href="#Normal-Distribution-X-sim-N-mu-sigma-2" class="headerlink" title="Normal Distribution $X \sim N(\mu,\sigma^2)$"></a>Normal Distribution $X \sim N(\mu,\sigma^2)$</h3><p><em>Normal distribution</em>, also called <em>Gaussian distribution</em>.</p><p><strong>IF</strong> there is <em>a real-valued random variable X</em>, and the general form of its <em>probability density function</em> is:</p><p>$$<br>f(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}}<br>$$</p><p><strong>THEN</strong> We write $X \sim N(\mu,\sigma^2)$. The parameter $\mu$ is the <em>mean or expectation</em> of the distribution (and also its median and mode), while the parameter $\sigma$ is its <em>standard deviation</em>. The <em>variance</em> of the distribution is $\sigma^2$.</p><h3 id="Standard-Normal-Distribution-X-sim-N-0-1"><a href="#Standard-Normal-Distribution-X-sim-N-0-1" class="headerlink" title="Standard Normal Distribution $X \sim N(0,1)$"></a>Standard Normal Distribution $X \sim N(0,1)$</h3><p><strong>IF</strong> $X \sim N(\mu,\sigma^2)$.</p><p><strong>THEN</strong> when $\mu=0,\sigma=1$, we write $X \sim N(0,1)$. It is described by this <em>probability density function</em>:</p><p>$$<br>\varphi(x) = \frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}}<br>$$</p><p>and the <em>cumulative distribution function</em> is given by :</p><p>$$<br>\phi(x) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^x e^{-\frac{t^2}{2}} dt<br>$$</p><p><i><font color="gray">To Be Continued…</font></i></p>]]></content>
<categories>
<category>Mathematics</category>
</categories>
<tags>
<tag>Math</tag>
<tag>Probability Theory</tag>
</tags>
</entry>
<entry>
<title>Hello_world</title>
<link href="/Hello-world/Hello_world/"/>
<url>/Hello-world/Hello_world/</url>
<content type="html"><![CDATA[<h3 id="Hello!"><a href="#Hello!" class="headerlink" title="Hello!"></a>Hello!</h3><p>这是一次建立博客的尝试,本博客采用<a href="https://hexo.io/" title="hexo">hexo</a>博客框架,并且部署于<a href="https://github.com/" title="Github">Github</a>的服务器中,本博客仅作为本人的笔记站及交流学习使用,未经许可,不得转载。</p><h2 id=""><a href="#" class="headerlink" title=""></a><span id="more"></span></h2><h3 id="Notes"><a href="#Notes" class="headerlink" title="Notes"></a>Notes</h3><p>在日常的使用过程之中,使用<code>$ hexo new post "post_name" </code>新建一页博客,通过编辑之后,使用<code>$ hexo s</code>进行本地查看和管理。</p><p>在本地的调试完成之后,通过<code>$ hexo g</code>生成静态文件至 public 文件夹,使用<code>$ hexo d</code>将生成的静态文件 push 到对应的<a href="%22https://github.com/yingxiaowoxx/yingxiaowoxx.github.io%22" title="yingxiaowoxx.github.io">Github</a>仓库中,最后使用<code>$ hexo clean</code>清除本地缓存。</p><p>使用过程之中,<em>Markdown</em>的官方语法通过查询<a href="https://www.markdownguide.org/basic-syntax/" title="Markdown Guide">Markdown 官方网站</a>实现。</p>]]></content>
<categories>
<category>Hello_world</category>
</categories>
<tags>
<tag>Hello_world</tag>
</tags>
</entry>
</search>