Skip to content

Instantly share code, notes, and snippets.

import torch
import torch.nn.functional as F
def to_float8(x, dtype=torch.float8_e4m3fn):
finfo = torch.finfo(dtype)
# Calculate the scale as dtype max divided by absmax
scale = finfo.max / x.abs().max().clamp(min=1e-12)
# scale and clamp the tensor to bring it to
# the representative range of float8 data type
# (as default cast is unsaturated)
01000011x10001000x000100000100x010000010010
ShellScript
https://www.shellscript.sh/
Acl
http://www.gsp.com/cgi-bin/mdroid.cgi?topic=extattrctl
http://www.onlamp.com/pub/a/bsd/2003/08/14/freebsd_acls.html
https://linux.die.net/man/1/setfacl
https://www.bing.com/search?q=ACLs+with+Samba+andWindows&src=IE-TopResult&FORM=IETR02&conversationid=
https://en.wikipedia.org/wiki/Chmod
@b1tg
b1tg / tmux_cheatsheet.markdown
Created January 22, 2018 07:04 — forked from henrik/tmux_cheatsheet.markdown
tmux cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: