WeiNote

yyrcd

gpu

os

pl

2022

Aug 01

2022-08-01 ·
%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '30px', 'fontFamily': 'times'}}}%%
graph TD
    A(x) -- Neural Network --> B(u)
    B -- "autograd.grad()" --> C(u__x)
    C -- "autograd.grad()" --> D(u__x__x)
    B .-> E(loss)
    C .-> E(loss)
    D .-> E(loss)
    E --> F{{loss.backward}}
%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '40px', 'fontFamily': 'times'}}}%%
graph LR
    subgraph "2nd order derivative"
        C(u__x) --- Ss(scale) --> D(scaled u__x) -- "autograd.grad()" ---> E(scaled u__x__x) --- Su(unscale) --> F(u__x__x)
        Scaler(deriv_scaler) -.- Ss
        Scaler -.- Su
        style Ss fill:#f4ddff
        style Su fill:#f4ddff
        style Scaler fill:#76b900 
    end
    E --> G{{INFs/NaNs<br/> detected?}} -- "Yes" --> H{{Skip this iteration,<br/> update deriv_scaler}}
    G -- "No" --> K{{Continue}}
    %% G -- "No" --> I{{loss.backward}}

2021

2021

Aug 24

2021-08-24 ·

快捷键 | Shortcuts

iTerm

  • Cmd + Option + left Navigate split panes

VS Code

  • Cmd + P Quick File Navigation
  • Cmd + B 隐藏/打开 侧边栏
  • Ctrl + Up 代码向上移动一行
  • Cmd + Shift + . 上方的 Navigation Bar (Breadcrumbs) (有 dropdown)
  • Cmd + Shift + ; 上方的 Navigation Bar (Breadcrumbs) (无 dropdown)

Terminal

  • Ctrl + W 删除上一个单词
  • Ctrl + U 可以删除光标之前的内容
  • Ctrl + K 可以删除光标之后的内容

Mac

  • Option + ↑: Show all windows
  • Ctrl + Cmd + X: Open folder in Terminal
  • Option + Cmd + H: Hide all

Chrome

  • Crtl + Shift + Del: Delete current suggestion from 地址栏

2021

Jul 13

2021-07-13 ·

M1 Cinebench 性能跑分

Cinebench R23 单核 Cinebench R23 多核
2020 Mac mini (Apple Sillicon, M1, 16G RAM) 1488 7583
2017 13" Macbook Pro (Intel, 2.3GHz dual-core i5, 16G RAM) 860 2215
Hackintosh (Intel, 3.41GHz dual-Core Core i5, 24G RAM) 894 3104

2021

Jul 11

2021-07-11 ·

Rectangular extra centering command

Add an extra centering command with custom size (ctrl + option + N)

defaults write com.knollsoft.Rectangle specified -dict-add keyCode -float 45 modifierFlags -float 786721
defaults write com.knollsoft.Rectangle specifiedHeight -float 800
defaults write com.knollsoft.Rectangle specifiedWidth -float 1330
defaults write com.knollsoft.Rectangle specifiedHeight -float 950
defaults write com.knollsoft.Rectangle specifiedWidth -float 1550
defaults write com.knollsoft.Rectangle specifiedHeight -float 800
defaults write com.knollsoft.Rectangle specifiedWidth -float 1152

Then quit rectangular and restart.

Ref: Rectangle/README.md at master · rxhanson/Rectangle

2021

Jun 26

2021-06-26 ·

Helloworld! This account will be used to share useful wikis, and will be public accessable.

2021

Apr 21

2021-04-21 ·

Disable lghub

  • kill background update process
    • ps -A | grep hub
    • kill the process of /Applications/lghub.app/Contents/Frameworks/lghub_updater.app/Contents/MacOS/lghub_updater
  • disable auto start when restart computer
    • change RunAtLoad to be false for /Library/LaunchAgents/com.logi.ghub.plist
    • change RunAtLoad to be false, KeepAlive to be false, Disabled to be true for /Library/LaunchDaemons/com.logi.ghub.updater.plist

2021

Feb 13

2021-02-13 ·

蛋白质

快肌纤维的肌肉 慢肌肉纤维的肌肉
时间 在短期时间的活动时用到 持续性动作时用到(慢步、站立和飞行)
特点 没有足够的肌红蛋白能源 储存大量氧气的肌红蛋白
消耗 消耗的是糖原 肌红蛋白,能够支撑长期的能量消耗
颜色 糖元的颜色发白 肌红蛋白的颜色为红
结论 快肌纤维多是白肉 慢肌肉纤维多是红肉

2020

2020

Sep 23

2020

Jun 02

2019

2019

Sep 09

2019-09-09 ·

VSCode Shortcuts

Code > Preferences > Keyboard Shortcuts > keybindings.json (see image above)

[
    {
        "key": "ctrl+shift+tab",
        "command": "workbench.action.previousEditor"
    },
    {
        "key": "ctrl+tab",
        "command": "workbench.action.nextEditor"
    },
    {
        "key": "ctrl+,",
        "command": "workbench.action.decreaseViewSize"
    },
    {
        "key": "ctrl+.",
        "command": "workbench.action.increaseViewSize"
    }
]

For github1s

// Place your key bindings in this file to override the defaults
[
    {
        "key": "alt+shift+tab",
        "command": "workbench.action.previousEditor"
    },
    {
        "key": "alt+tab",
        "command": "workbench.action.nextEditor"
    },
    {
        "key": "ctrl+,",
        "command": "workbench.action.decreaseViewSize"
    },
    {
        "key": "ctrl+.",
        "command": "workbench.action.increaseViewSize"
    },
    {
        "key": "ctrl+w",
        "command": "workbench.action.closeActiveEditor"
    },
    {
        "key": "cmd+w",
        "command": "-workbench.action.closeActiveEditor"
    }
]