0%

This post saves the content of sublime-build file for reference.

1
2
3
4
5
{
"cmd": ["C:/software/Anaconda3/envs/py_torch/python.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}

Remarks:

  • Only the path in cmd needs user modification.
  • The above configuration uses the Python in a virtual environment named py_torch.

LaTeX codes for inserting tables.

Basic

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
\usepackage{booktabs}

\begin{table}[t]
\centering
\caption{exmp}
\label{tb:exmp}
\begin{tabular}{ccc}
\toprule
& data1 & data2 \\
\midrule
alg1 & & \\
alg2 & & \\
\bottomrule
\end{tabular}
\end{table}
Read more »

Commonly used math commands.

Statements

Numbered

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
% the counter of post restarts at every new section.
\newtheorem{post}{Postulate}[section]

% assp created, its counter will reset every time using a new post
\newtheorem{assp}{Assumption}[post]

% dfnt created, it uses the same counter as post.
\newtheorem{dfnt}[post]{Definition}

% set the styling for the numbered environment defined right below it.
% Theorem styles: definition, plain, remark.
\theoremstyle{definition}
\newtheorem{thrm}{Theorem}

% others
\newtheorem{prop}{Proposition}
\newtheorem{lema}{Lemma}
Read more »

LaTeX codes for inserting figures

Basic

1
2
3
4
5
6
7
8
\usepackage{graphicx} % required by \includegraphics

\begin{figure}[t]
\centering
\includegraphics[width=0.8\linewidth]{exmp.pdf}
\caption{description of exmp}
\label{fig:exmp}
\end{figure}
Read more »