Skip to content

Instantly share code, notes, and snippets.

View scaomath's full-sized avatar
is slow.

Shuhao Cao scaomath

is slow.
View GitHub Profile
scaomath / keybindings.json
Last active November 12, 2020 23:24
VS Code key bindings for shortcuts on Ubuntu Linux to mimic MacOS behavior
View keybindings.json
// On Ubuntu Linux mimic MacOS keybindings on Logitech MX Keys
// where the layout is slightly different to incorporate both MacOS and Linux into one keyboard
// after customized key mapping: ctrl is mapped to alt; alt is mapped to win; (meta is mapped to ctrl)
// in /etc/default/keyboard: XKBOPTIONS="altwin:ctrl_alt_win"
"key": "ctrl+left",
"command": "cursorHome",
"when": "textInputFocus"
scaomath / nninterface.h
Created November 21, 2020 20:47
To do: modify this interface for ROCm
View nninterface.h
#include "../core/global.h"
#include "../core/commontypes.h"
#include "../core/hash.h"
#include "../core/logger.h"
#include "../neuralnet/desc.h"
#include "../neuralnet/nninputs.h"
scaomath /
Last active June 1, 2021 14:21
Survive as a grad student in scientific computing
scaomath /
Last active June 17, 2021 19:49
Jekyll simple workflow to use custom a plugin on Github pages
scaomath /
Created April 14, 2021 03:58
Hard reset submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
scaomath /
Created July 6, 2021 21:23
Einstein sum reference

Einstein sum refs

Copied from torch's linear algebra test file.

Vector operations

torch.einsum('i->', x)                     # sum
torch.einsum('i,i->', x, x)                # dot
torch.einsum('i,i->i', x, x)               # vector element-wisem mul
torch.einsum('i,j->ij', x, y)              # outer
scaomath / settings.json
Last active May 9, 2023 14:56
My VS Code setting file
View settings.json
"[bibtex]": {
"editor.autoIndent": "none",
"editor.fontFamily": "Fira Code Medium",
"editor.fontLigatures": false,
"editor.formatOnPaste": false,
"editor.suggestSelection": "recentlyUsedByPrefix"
"[latex]": {
"editor.autoIndent": "none",