- pgrep 进程名 通过进程名称查看PID
- ps -ef|grep 名称 通过管道符查看PID
- top 动态显示进程
- ps -u 用户名 指定用户查看进程
- kill -9 PID 杀死PID进程
- killall -9 名称 杀死名称进程
- lsof -i:22 查看22端口占用进程
- netstat -lup|grep 22 查看22端口占用进程
- netstat -tunlp | grep 8127
- netstat -ano |findstr "端口号" 占用端口号的进程ID
- tasklist |findstr "进程id号" ID号的进程名字
- taskkill /f /t /im "进程id或者进程名称" 终止进程
- nvidia-smi 查看显卡参数
- git branch -a 查看分支信息
- git checkout 分支 切换到某个分支
- git status
- git add
- git commit -m
- git push
- nohup python test.py &
- nohup python -u test.py > nohup.out 2>&1 &
- python -m pdb test.py
- import pdb
- pdb.set_trace()
- b断点 c继续 n下一行 s下一条 l显示代码
- conda info -e 查看环境
- conda list 查看当前环境安装的包
- conda install
- conda remove -n tf2 --all
- conda config --add channels https://
- conda config --remove-key channels
- rm `ls |grep -v test1 |grep test2` 删除不含有test1,含有test2的文件
- lsof -i:8127 |awk 'nR==2{print$2}' |xargs kill -9 显示8127端口占用,把第二行第二列的PID 送给kill -9
- ls |wc -l 统计行数,也就是个数
- pip list --format=freeze > requirements.txt
- pip download -r requirements.txt -d "/home/" -i https://pypi.tuna.tsinghua.edu.cn/simple/
- source activate
- source deactivate
- pip install numpy -i https://
- pip freeze > requirements.txt
- pip instatll -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
- pip install torch==1.8.0+cu101 torchvision==0.9.0+cu101 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
- 阿里云 http://mirrors.aliyun.com/pypi/simple/
- 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
- 豆瓣(douban) http://pypi.douban.com/simple/
- 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
- 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
- from PIL import ImageFile
- ImageFile.LOAD_TRUNCATED_IMAGES= True
- np.set_printoptions(suppress=True)
- np.set_printoptions(threshold=np.inf)
- cmd代码tab补全
- 直接pip install readline
- pip3 install pyreadline 正常安装使用
posted @
2021-11-24 09:42
天涯有蔷薇
阅读(
83)
评论()
收藏
举报