Qun Gu 馃憢

Welcome to my blog

What emacs is doing on my windows

Quick Start emacs server daemon in the background, and emacsclient can fired up very fast. LaTeX editing auctex + sumatraPDF reftex + helm-bibtex + zotero + better bibtex Reference Citation Reference and Note Management zotero + Zotero Connector + helm-bibtex + org-roam-bibtex Zettelkasten org-roam-ui Get Things Done org-agenda + org-capture + org-refile + org-roam-capture Blog with Hugo easy-hugo + ox-hugo Dired dired Remote Editing tramp Git magit Directory Management treemacs

March 13, 2023 路 1 min 路 70 words 路 Me

RNN and LSTM (Recap)

Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) network are useful tools for modeling sequential data. RNN Starting from input. It is time-dependent. Hence, denoted by $$ \boldsymbol{x}_t $$ where $\boldsymbol{x}_{t}\in\mathbb R^{n}$, $t=1,2,\ldots, T$. Formulation 1 On output, one fashion is a single output $\boldsymbol{y} \in \mathbb R^{m}$ (at the final time step $T$), that is to say: $$ f(\{\boldsymbol{x}_{t}\}) = \boldsymbol{y} $$ This can be useful in sentiment analysis....

March 2, 2023 路 4 min 路 819 words 路 Me

Logistic Regression (Recap)

Overview Logistic regression is frequently used in classification and predictive anlaytics1. Put it simply, the model estimates the probability (distribution) of (a) certain event(s). Input and Output Input is nothing but the features, just as in the case of linear regression. Denote the input as $\boldsymbol{x}$. Output can (usually) be a vector. We use $\boldsymbol{p}$ to indicate that it is related with probability distribution. For $K$-class classification, the model need to generate $K$ class probabilities, $\{p_k\}_{k=1}^{K}$....

February 22, 2023 路 5 min 路 901 words 路 Me

Resize Windows in Emacs

Enable repeat mode by M-x repeat-mode Resize using C-x } (enlarge window horizontally) keep pressing } can repeat C-x { (shrink window horizontally) keep pressing { can repeat C-x ^ (enlarge window) keep pressing ^ can repeat C-x v (shrink window vertically) keep pressing v can repeat C-x + (balance windows) Reference

February 21, 2023 路 1 min 路 52 words 路 Me

LeetCode 31 Strange Phenomenon

I know my code is not optimal but at least is shall work. However, I got this: Any one has any idea why is that? The tricky part is, nums is the output. There is no need to return anything!!!

February 20, 2023 路 1 min 路 40 words 路 Me

Enabling Remote Editing: Emacs' Tramp + plink on Windows

I am using plink to connect to my server. To visit my remote server, I only need to use C-x C-f /plink:SESSNAME:/path/to/your/file/on/server/ Below is a screenshot of how to open a remote file/folder. The Tricky Part The tricky part is that, when using plink, the second field is session name saved on PuTTy (see here). Therefore, one need to open PuTTy and save a session there. I was thinking that I set a hostname at ....

February 20, 2023 路 1 min 路 85 words 路 Me

Linear Regression (Recap)

Linear regression (or Linear Models for Regression), is probably the simplest model in machine learning. Yet it can be still be powerful enough for some industrial level applications. And usually, it provides a great intuition towards models whose nonlinearity is not very strong. 2D line fitting Line fitting is its simplest form. Given a training data set1 $\left\{x^{(i)}, y^{(i)}\right\}_{i=1}^N$, where $x^{(i)}$ and $y^{(i)}$ are all real number, curve fitting requires us to build a model $$ y \approx w_0 + w_1 x = \begin{bmatrix} 1 & x \end{bmatrix} \begin{bmatrix} w_0\\ w_1 \end{bmatrix} \equiv \boldsymbol{x}^\top \boldsymbol{w}, $$ where we need to find the unknown parameters $\boldsymbol{w} = \begin{bmatrix} w_0 & w_1 \end{bmatrix}^\top$....

February 16, 2023 路 6 min 路 1174 words 路 Me

Hello Hugo

By using this awesome emacs packages: emacs-easy-hugo: https://github.com/masasam/emacs-easy-hugo ox-hugo: https://ox-hugo.scripter.co/ I am now able to use emacs to write blog posts without the burden of the heavy-weighted wordpress, although my current workflow still has room to improve. One thing I notice is that Hugo does accept .org file as blog post (and it has less pain than .md file, in terms of mathemtical equation typing). With that, it seems that ox-hugo is not very useful in my case....

February 16, 2023 路 2 min 路 376 words 路 Me