Skip to content

Productivity Tool

Hui Zhang edited this page Mar 10, 2022 · 5 revisions

生产效率工具

Pip Stats

代码统计与度量

Commit Number

git log --author='Hui Zhang' --since="2021-01-01" --no-merges | grep -e 'commit [a-zA-Z0-9]*' | wc -l

Code Line Number

git log --author="Hui Zhang" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "%s ++ %s -- %s total\n", add, subs, loc }' -

Linux 账号管理

userdel username
useradd -m -d /mnt/username username
passwd username

Model OP List

import sys
import os
import paddle
model = paddle.jit.load("conformer.jit")

prog = model.program()
ops = set()
for block in prog.blocks:
    for op in block.ops:
        ops.add(op.type)

for op in ops:
    print(op)