安装 Linux

安装 Linux

  1. 在windows 下,使用universal USB installer 在移动硬盘的一个10G的小分区上,做一个启动盘(之前用U盘做可能是因为盘坏了,不行。)在 installer 里,选择Fat32, 同时会帮你格式化。
  2. 安装Ubuntu时,选择自定义安装,然后覆盖掉之前的安装,寻找ex4文件系统即可。

Vscode

启用了Remote Tunnel

anaconda

安装了miniforge(mambaforge) from github仓库脚本

zsh

apt 安装的 zsh

git

安装git from apt

安装curl

安装oh my zsh

关闭自动睡眠

1
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

安装 gcc

1
sudo apt install build-essential

安装p10k

备份 Linux

Using Timeshift

在Ubuntu上将磁盘重新格式化为ext4文件系统,可以按照以下步骤操作:

  1. 使用lsblk命令识别要格式化的磁盘设备名称,例如/dev/sdb。
  2. 卸载该磁盘已经挂载的任何分区,使用umount命令,例如umount /dev/sdb1。
  3. 使用fdisk命令进入交互模式,对该磁盘进行分区操作。删除旧分区并创建新分区。
  4. 创建一个类型为Linux的主分区,选择分区类型83。按w保存修改并退出。
  5. 使用mkfs.ext4命令格式化分区,例如mkfs.ext4 /dev/sdb1。
  6. 输入y确认格式化。这将会抹掉数据,请事先备份重要数据。
  7. 等待格式化完成。使用df -Th命令检查文件系统是否已成为ext4。
  8. 最后可以在/etc/fstab中添加挂载信息,并使用mount命令挂载分区到指定目录。

这个过程将完全抹掉磁盘数据并将其格式化为ext4文件系统。建议先做好数据备份,然后按步骤操作,完成磁盘到ext4的转换 formatting。

zsh 禁止输入文件夹名就打开文件夹

~/.zshrc中添加

1
setopt no_auto_pushd

zsh reveal conda environment

p10k choose the first style

install zsh conda completion

https://github.com/esc/conda-zsh-completion

teamviewer assignment

  • sudo passwd to set root password
  • su to log in with root
  • /path/to/teamviewer –allowRoot

cmake

  • sudo apt install cmake

opencv

  • sudo apt install libopencv-dev python3-opencv
  • Vulkan: sudo apt install libvulkan-dev

Lapack

  • sudo apt install liblapack-dev
  • in CMakeLists.txt add find_package(LAPACK REQUIRED)

Example script for Ubuntu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
sudo apt install zsh
sudo apt install git
sudo apt install curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

# and add ZSH_THEME="powerlevel10k/powerlevel10k" to ~/.zshrc

git clone https://github.com/esc/conda-zsh-completion ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/conda-zsh-completion

# And add lines in `.zshrc`

git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
plugins=(git zsh-autosuggestions gitignore conda-zsh-completion zsh-syntax-highlighting)

source $ZSH/oh-my-zsh.sh
autoload -U compinit && compinit

# conda-zsh-completion
zstyle ':completion::complete:*' use-cache 1
zstyle ":conda_zsh_completion:*" use-groups true
zstyle ":conda_zsh_completion:*" show-unnamed true
zstyle ":conda_zsh_completion:*" show-global-envs-first true
zstyle ':completion::complete:*' use-cache 1
zstyle ":conda_zsh_completion:*" use-groups true
zstyle ":conda_zsh_completion:*" show-unnamed true
zstyle ":conda_zsh_completion:*" show-global-envs-first true

# for gpg
export GPG_TTY=$(tty)
gpgconf --launch gpg-agent

帮助对冲

帮助对冲

策略

  1. 当前汇率0.93, 每万元, 交9300RMB
  2. 5日后, 若人民币上涨 比如到0.90, 我们退给她300RMB
  3. 若人民币下跌, 则不需补差价。

结果

上涨 下跌
无策略,8.1结算 收9000rmb, 付10000hkd 收9600rmb, 付10000hkd
有策略 收9000rmb, 付10000hkd 收9300rmb, 付10000hkd

自助签名macOS app

下载的Golden Dict++ 应用显示损坏,发现是code sign问题,于是应该

  1. 在 Key Chain 中申请证书:钥匙串助理 -> 证书助理 -> 从颁发机构请求证书
  2. 导出到磁盘之后,再导入钥匙串,选代码签名
  3. ![[Pasted image 20230712105909.png]]
  4. sudo codesign --force --deep --sign 吴子晗 /Applications/GoldenDict.app
  5. $$
    \ell_2 \text {-norm }
    $$
  6. 从终端打开obsidian可以commit with gpg
  7. obsidian git 中 环境变量添加 GPG_TTY=$(tty), PATH 添加 /opt/homebrew/bin/ 成功

scratch.sh

scratch.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
#SBATCH --partition=gpu_short
#SBATCH --nodes=1 # 1 computer nodes
#SBATCH --ntasks=1 # 1 task per node
#SBATCH --gres=gpu:1 # Using 1 GPU card
#SBATCH --mem=20GB # Request 20GB memory
#SBATCH --time=0-01:00:00 # Time limit day-hrs:min:sec
#SBATCH --output=gpujob_%j.log # Standard output
#SBATCH --error=gpujob_%j.err # Standard error log
module load cuda/11.6.0
OUTPUT=/home/zihanwu7/scratch/output.txt
cd /home/zihanwu7/scratch/own_transformer

python main.test.py >> $OUTPUT

date >> $OUTPUT

陆军学说

陆军学说

机动作战

携带燃油!

  1. 前分支

    • 左: 摩步组织度
    • 右: 坦克突破 突破战术卡
  2. 后分支

    • 左: 适役人口
    • 右: 机动防御战术卡 坦克突破

优势火力

右左

  1. 共有

    • 软攻
    • 弹性防御卡
  2. 前分支

    • 左: 火炮
    • 右: 支援连
  3. 后分支

    • 左: 硬攻 增援率 空优 战术撤退战术卡
    • 右: 软攻 增援率 突破 战术撤退战术卡

决战计划

  1. 共有

    • 指挥点数
    • 堑壕
  2. 分支

    • 左:
      • 摩步组织度
      • 计划上限
      • 协同性
      • 突破
      • 增援率
      • 指挥点数上限
      • 突破弹性防御
      • 压倒性火力战术卡
    • 右: 补给消耗 指挥点数 夜战攻击

人海突击

  1. 共有

    • 增援率
    • 最小训练程度
    • 伤亡战争支持度
    • 携行补给
    • 补给耗尽惩罚
  2. 分支

    • 左:

      • 补给消耗
      • 增援率
      • 突破
      • 摩步组织度
      • 移动组织度减少
      • 步兵战宽
    • 右:

      • 损耗
      • 敌占区
      • 高增援率
      • 适役人口
      • 非战斗不及耗尽惩罚
      • 组织度恢复
      • 游击战术卡

Applicant's Record

Applicant’s Record

Canada second step

  1. Application for Leave and for Judicial Review (correct number)
  2. Application for Leave and for Judicial Review (wrong number)
  3. Informal Request for changing the number of the case
  4. ORDER for leave to amend the application notice of application to correct the reference
  5. Rule 9 Response
  6. Affidavits
  7. Memorandum
  8. language statement

根据 Federal Courts Act, sections 18 and 18.1,

18.1 (4) (a) acted without jurisdiction, acted beyond its jurisdiction or refused to exercise its jurisdiction;

法定机构未行使其管辖权(即“不作为”) 因此,如果一个联邦委员会、委员会或其他法定机构“不作为”(即未行使其应有的管辖权或职责),这可以作为申请司法复核和获取救济的一个有效理由。

https://www.fct-cf.gc.ca/en/pages/representing-yourself/practice-guides/how-to-file-an-application-for-leave-and-for-judicial-review-immigration

  1. 宣誓提供的内容真实可信 -> 宣誓书A
  2. 把宣誓书A+Application for Leave 等制成 Recored A
  3. Record A 发给 IRCC 律师
  4. 做 proof of service (第二次宣誓), 和 Record A 一起发给法院

About proof of service:
https://www.legalline.ca/legal-answers/what-is-a-process-service-notice/

Practice guide:
https://www.fct-cf.gc.ca/en/pages/representing-yourself/practice-guides/how-to-file-an-application-for-leave-and-for-judicial-review-immigration

极限定理

极限定理

依概率收敛

$$
\begin{aligned}
\lim_{n \to \infty} P(|X_n - X| > \epsilon) &= 0 \
\lim_{n \to \infty} P(|X_n - X| \leq \epsilon) &= 1
\end{aligned}
$$

Chebyshev 不等式

If $g(x)$ 是定义在$[0, \infty)$上的非降非负函数,
$Eg(|Y|) < \infty$, then 对任何使$g(a) > 0$的$a > 0$, 有
$$
P(|Y| \geq a) \leq \frac{E(|Y|)}{g(a)}
$$

所有公式

所有公式

空战

机动 agility

速度 velocity

伤害 damage

$$
\begin{aligned}
% 伤害增加=(\frac{v_a}{v_d}-1)\times 0.6, \
% 伤害减免=(\frac{a_d}{a_a}-1)\times 0.3
r_a&=(\frac{v_a}{v_d}-1)\times 0.6, \
r_d&=(\frac{a_d}{a_a}-1)\times 0.3
\end{aligned}
$$

$v_a$为攻击方速度, $v_d$为防御方速度, $a_d$为防御方机动, $a_a$为攻击方机动, $r_a$为攻击方伤害增加, $r_d$为防御方伤害减免

只有速度高于对方时才会造成伤害增加, 机动高于对方时才会造成伤害减免.

最大机动比值为4, 最大速度比值为3.5

机动带来的最大伤害减免为0.9, 速度带来的最大伤害增加为1.5

$$
\begin{aligned}
% 攻击基础伤害 = 攻击方数量 \times 对空攻击 \times 0.2 \
d_b &= n_a \times d_a \times 0.2 \
d_{ab} &= 2.5% \times 0.01 \times v_a / 800 \
D &= 0.01 \times d_b \times (1 - r_d + d_{ab} + r_a) / d_d
\end{aligned}
$$

$d_b$为攻击方基础伤害, $n_a$为攻击方数量, $d_a$为攻击方对空攻击, $d_{ab}$为攻击方对空绝对速度加成, $d_d$为防御方对空防御, $D$为伤害.

防空减免

$$
aa_d = \frac{0.7y}{y+112}
$$

$y$为防空值, $aa_d$为防空减免

$25$ 点防空就可以抵消突破防御和速度debuff, $10.8$ 可以达到 $75%$ 的舔地机减免上限.

CFA The Time Value of Money in Finance

CFA The Time Value of Money in Finance

Outcome

  • Bond Pricing 债券定价
  • Value of a Stock 股票定价
  • Stock Valuation Models 股票估值模型
    • no growth model
    • constant growth model
    • non-constant growth model
  • Implied Return of a Bond 债券隐含收益率
  • Implied Return of a Stock 股票隐含收益率
  • Stock;s Required Return 股票的要求收益率
  • Cash Flow Additivity 现金流可加性
  • Application of Cash Flow Additivity 现金流可加性的应用
  • Real-World Applications of Cash Flow Additivity 现金流可加性的现实应用 (no-arbitrage) 无套利

TIME VALUE OF MONEY IN FIXED INCOME AND EQUITY 固定收益和股权的时间价值

Fixed-Income Instruments and the Time Value of Money 固定收益工具和时间价值

Cash flows from fixed-income instruments:

  • Discount(折现): 一次性支付, zero-coupon bond (零息债券), coupon bond (票息债券)
  • Perioidic payments(定期支付): 一段时间内的多次支付
  • Level payments(定额支付): 每期支付相同金额

固定收益工具是一种债务工具,例如债券或贷款,它们代表着发行人向投资者借款并承诺未来偿还的合同。固定收益工具的贴现率是一种利率,而债券或贷款的回报率通常被称为其到期收益率(YTM)。