文章目录
本文档用于日程记录与编程相关的杂货;
待补充
- notepad++精美主题&字体 - longzhankunlun - 博客园 20190522
- Notepad++中查找替换“换行符”的方法 - 软件技术 - 亿速云 20201210
- notepad++替换回车换行符,如何操作?_秋9的博客-CSDN博客 20220309
程序员健康指南
“每在电脑前面工作20分钟,就看看20英尺(6米)远的物体,大概看20秒钟。”《程序员健康指南》
编程相关英语缩写
configuration在程序中常缩写为cfg
augmentation在程序中常缩写为aug
ann Annotations
thr threshold
pos positive
neg negative
ext extension
ETA 估计到达时间(Estimated Time of Arrival)
API 应用程序接口(Application Programming Interface)
Linux 文件处理
Linux查看文件和文件夹所占用的磁盘空间大小
Linux 查看磁盘空间 | 菜鸟教程
Linux下查看文件和文件夹大小 - 郭振斌 - 博客园 20101013
Linux 文件与目录管理, 磁盘管理
- 处理目录的常用命令
- Linux 文件内容查看
linux怎么把文件复制到另一个目录中_Linux 中 7 个常用的目录处理的命令_weixin_39820588的博客-CSDN博客 20201204
df [-ahikHTm] [目录或文件名]
命令。例如,将 /etc 底下的可用的磁盘容量以易读的容量格式显示
df -h ~/xxx_workdir/Pytorch_WorkSpace/OpenSourcePlatform/tmp_files
[root@www ~]# df -h /etc
Filesystem Size Used Avail Use% Mounted on
/dev/hdc2 9.5G 3.7G 5.4G 41% /
Linux下ls -l
命令的输出结果分析
20210901记:
Linux 统计文件夹下文件个数以及目录个数
*** Linux上统计文件夹下文件个数以及目录个数 - YongjieShi - 博客园 20171220
本篇博客涵盖以下内容:
- 统计文件夹下文件的个数:
ls -l | grep “^-” | wc -l
- 统计文件夹下目录的个数:
ls -l | grep “^d” | wc -l
- 统计文件夹下文件个数, 包括子文件:
ls -lR | grep "^-"| wc -l
- 统计文件夹下目录个数, 包括子目录:
ls -lR | grep "^d"| wc -l
Linux下输出目录树、文件树
- *** linux 输出目录树、文件树_周平的专栏-CSDN博客 20140401
- linux下如何将当前目录的文件名存到一个文本文件里_百度知道 20170925
- linux 下输出文件夹下的所有文件名_yaya4572的博客-CSDN博客 20180505
ls -1 > dir_data_filename_current.txt
find . > dir_data_filename_recursion.txt
- 递归显示文件夹及文件名称
find . -print 2>/dev/null | awk '!/\.$/ {for (i=1; i<NF; i++){printf("%4s","|")} print("--"$NF)}' FS='/' > dir_data_filetreename.txt
- 只递归显示文件夹名称
find . -type d -print 2>/dev/null | awk '!/\.$/ {for (i=1; i<NF; i++){printf("%4s","|")} print("--"$NF)}' FS='/' > dir_data_dirtreename.txt
find . -type d -print 2>/dev/null | awk '!/\.$/ {for (i=1; i<NF; i++){printf("%4s","|")} print("--"$NF)}' FS='/'
Linux查看当前路径下文件名中包含指定字符的文件
例如,可以使用
-
命令
find . -type f -name "epoch_based_runner.py"
-
命令
grep -rn "epoch_based_runner.py" .
参数解释:r 表示递归, n 表示查询结果显示行号
在使用linux时,经常需要进行文件查找。其中查找的命令主要有find和grep,这两个命令是有区别的:
- (1) find 是根据文件的属性进行查找,如文件名、文件大小、所有者、所属组、是否为空、访问时间、修改时间等;
- (2) grep 是根据文件的内容进行查找,会对文件的每一行按照给定的模式(patter)进行匹配查找;
- (3) which 查看可执行文件的位置 ,只有设置了环境变量的程序才可以用;
- (4) whereis 寻找特定文件,只能用于查找二进制文件、源代码文件和man手册页;
- (5) locate 配合数据库查看文件位置,详情:locate -h查看帮助信息;
(base) usrname@usrname-System-Product-Name:~$ cd ~/miniconda2/envs/cy_mmlab
(base) usrname@ursname-System-Product-Name:~/miniconda2/envs/cy_mmlab$ find . -type f -name "epoch_based_runner.py"
./lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py
(base) usrname@ursname-System-Product-Name:~/miniconda2/envs/cy_mmlab$ grep -rn "epoch_based_runner.py" .
Binary file ./lib/python3.8/site-packages/mmcv/runner/__pycache__/epoch_based_runner.cpython-38.pyc matches
./lib/python3.8/site-packages/mmcv_full-1.0.5.dist-info/RECORD:256:mmcv/runner/epoch_based_runner.py,sha256=5dZn1-rXDophm9IyCiOXgMqkusIxrELppWvYUNfQfgk,7093
(base) usrname@ursname-System-Product-Name:~/miniconda2/envs/cy_mmlab$ grep -rn "epoch_based_runner" .
Binary file ./lib/python3.8/site-packages/mmcv/runner/__pycache__/__init__.cpython-38.pyc matches
Binary file ./lib/python3.8/site-packages/mmcv/runner/__pycache__/epoch_based_runner.cpython-38.pyc matches
./lib/python3.8/site-packages/mmcv/runner/__init__.py:6:from .epoch_based_runner import EpochBasedRunner, Runner
./lib/python3.8/site-packages/mmcv_full-1.0.5.dist-info/RECORD:247:mmcv/runner/__pycache__/epoch_based_runner.cpython-38.pyc,,
./lib/python3.8/site-packages/mmcv_full-1.0.5.dist-info/RECORD:256:mmcv/runner/epoch_based_runner.py,sha256=5dZn1-rXDophm9IyCiOXgMqkusIxrELppWvYUNfQfgk,7093
(base) usrname@ursname-System-Product-Name:~/miniconda2/envs/cy_mmlab$
Linux下文件搜索、查找、查看命令_黄小小的博客-CSDN博客 20181012
本篇博客涵盖以下内容:
- 最强大的搜索命令:find 查找各种文件的命令
(1) 根据 文件或目录名称 搜索
(2) 根据 文件大小 搜索
(3) 根据 所有者和所属组 搜索
(4) 根据 时间属性 搜索
(5) 根据 文件类型或i节点 搜索
(6) 组合条件 搜索 - 在文件资料中查找文件:locate
- 略
ubuntu系统的文件清理
(base) usrname@usrname-System-Product-Name:/var/cache/apt/archives$ ls
cuda-cudart-10-1_10.1.243-1_amd64.deb exfat-utils_1.2.3-1_amd64.deb
cuda-driver-dev-10-1_10.1.243-1_amd64.deb lock
exfat-fuse_1.2.3-1_amd64.deb partial
(base) usrname@usrname-System-Product-Name:/var/cache/apt/archives$ sudo rm -rf ./exfat-*
(base) usrname@usrname-System-Product-Name:/var/cache/apt/archives$ sudo rm -rf ./cuda*
(base) usrname@usrname-System-Product-Name:/var/cache/apt/archives$ ls
lock partial
(base) usrname@usrname-System-Product-Name:/var/cache/apt/archives$
Ubuntu /boot 占满解决方案_SpeculateCat-CSDN博客 20180411
ubuntu升级“ /boot空间不足”解决方法_魔主_xk–CSDN博客-CSDN博客 20141030
ubunut系统清理系统根目录下缓存文件夹.cache超大导致磁盘不足_weixin_30367945的博客-CSDN博客 20160907
ubunut系统清理 删除无用缓存及垃圾文件_xihuanzhi1854的博客-CSDN博客 20190430
Linux 查看文本文件的开头,末尾,中间几行的内容
- linux查看文件的后几行 - Agoly - 博客园 20170327
head -n 10 tmp.txt # 显示文本文件的前10行
Linux下使用scp进行文件传输
- Linux使用scp进行文件传输_cn_陈阳的博客-CSDN博客 20210723
- 12个scp传输文件的命令栗子 - 尛鱼 - 博客园 20150110
- scp传输文件的命令 - 龙恩0707 - 博客园 20180113
通过 tar 打包文件
注: 不建议通过 zip 压缩解压的方式打包文件, 因为压缩和解压时会很耗时;
- Linux tar 命令 | 菜鸟教程
- Linux压缩打包命令——tar、zip、unzip_绮梦寒宵的博客-CSDN博客 20190816
- tar打包压缩命令 - dcz1001 - 博客园 20170501
- 打包 压缩 命令tar zip - 乌托邦眺望 - 博客园 20171010
- linux tar压缩排除某个文件夹_小单的博客专栏-CSDN博客 20141031
传输单个文件
-
两台服务器之间传输文件
scp serverxxx@10.10.8.116:remote_path/remote_file.py serverxxx@192.168.0.1:remote_path/
-
服务器文件传输到本地
sudo scp serverxxx@192.168.0.1:remote_path/remote_file.py . sudo scp serverxxx@192.168.0.1:remote_path/remote_file.py local_path/
-
本地文件传输到服务器
sudo scp local_path/local_file serverxxx@192.168.0.1:remote_path/
传输整个文件夹
scp -v -r serverxxx@10.10.8.116:/home/tools/utils ./tools/utils
scp -v -r -P 2057 serverxxx@10.10.8.116:/home/tools/utils ./tools/utils
Data transfer between Linux and Windows
To transfer data from Windows, use an SSH client like PuTTY. This needs the PSCP (secure copy client) tool downloading to your Windows system to run alongside PuTTY. Find both on the PuTTY homepage.
- Data transfer between Linux and Windows: Step-by-step guide 20210112
- How to Transfer and Share Files Between Windows and Linux 20210427
- putty、pscp、psftp 使用教程 - Coding十日谈 - 博客园 20200516
Linux手册or图书
Linux使用记录
#!
告诉系统其后路径所指定的程序即是解释此脚本文件的 Shell 程序。
使用man [命令]
来查看各个命令的使用文档,如:man cp
。
如何读懂Linux 命令
- Q:linux命令中的
<
和|
是什么意思?比如:$ .cat < /etc/motd | ./a.out
A:<
表示的是输入重定向的意思,就是把<
后面跟的文件取代键盘作为新的输入设备。
|
则表示一个管道的意思,可以理解为东西从管道的一边流向另外一边。
命令$ .cat < /etc/motd | ./a.out
的意思就是说从/etc/motd文件中读取内容,然后把cat
命令读取出来的内容作为后面一个命令a.out的输入参数来执行a.out命令。 - Q:linux命令
$()
代表什么意思
A:小括号()
里面是linux命令,比如cat $(pwd)>aaa
等价于cat 'pwd' >aaa
,其实是要执行里面的pwd
命令,然后用 pwd命令的输出 代替“$()”内容的。
而大括号{}
里面则是数组变量,比如,
则会输出hello。$A = (hello linux shell) $echo ${A[0]}
Linux下如何获取软链接文件的真实路径
- 通过内置命令
readlink path_to_link
查看, 查询该命令的手册man readlink
; ls -l
命令可以列出当前目录下的文件详细信息, 如创建者、创建时间、文件的读写权限列表等等;
删除软链接时切记注意
假定lnName是一个软链接,
rm -rf lnName/
这个最后带了斜杠的命令会删除软链接所链接的真实目录,而不是删除软链接其本身;
rm -rf lnName
这个最后不带斜杠的命令才会删除软链接其本身;
Linux export命令:查看或设置环境变量
-
export 命令可以设置或修改 shell 环境变量的值。
-
export 命令的语法格式如下:
export [可选参数] 环境变量[=变量值] -
可选参数及其说明如下表所示:
参数 说明
-f 代表环境变量为函数名称
-n 删除指定的环境变量
-p 列出所有的环境变量
Linux export命令:查看或设置环境变量 - 编程帮
软件包
- *** Ubuntu 系统 dpkg 命令使用详解 - 云+社区 - 腾讯云20190812
- *** dpkg命令_Linux dpkg 命令用法详解:Debian Linux系统上安装、创建和管理软件包
- Linux进阶之软件管理 - Wolf_Coder - 博客园20190719
- Ubuntu的软件安装管理—dpkg与apt-*详解 - 心田居士 - 博客园20190622
- linux下彻底删除软件及配置文件_Little Garden-CSDN博客_yum remove 删除配置文件20180601
可以使用pip intall xxxx.whl
命令对下载下来的.whl
库包文件进行安装
终端操作时,如果路径名中有空格,需用“\ ”代替;
Linux安装搜狗输入法_u010648921的专栏-CSDN博客 20180911
Linux终端Terminal分屏
Linux默认终端的快捷键
在Terminal的菜单栏"Preferences | Shortcuts"可以查询到一些快捷键命令,
- File
- Shift+Ctrl+T: New Terminal in New Tab
- Shift+Ctrl+N: New Terminal in New Window
- Shift+Ctrl+W: Close Terminal
- Shift+Ctrl+Q: Close All Terminals
- Edit
- Shift+Ctrl+C: Copy
- Shift+Ctrl+V: Paste
- View
- F11: Full Screen
- Find
- Shift+Ctrl+F: Find
- Shift+Ctrl+G: Find Next
- Shift+Ctrl+H: Find Previous
- Shift+Ctrl+J: Clear Find Highlight
- Tabs
- Ctrl+PageUp: Switch to Previous Terminal
- Ctrl+PageDown: Switch to Next Terminal
- Alt+数字: 在多个终端标签之间切换
- Help
- F1: Contents
Linux终端Terminal分屏, 通过安装Terminator实现
Terminator,是一款 Linux 系统下支持多窗口的自由开源的终端仿真器。它是一个让你和 shell 交互的程序,提供了你的默认终端应用不支持的多个特性,例如,在一个窗口创建多个终端,修改终端的字体、字体颜色、背景颜色特性等等。
- 打开新的终端窗口: Ctrl+Alt+T
- 垂直分屏: Ctrl+Shift+E
- 水平分屏: Ctrl+Shift+O
- 关闭窗口: Ctrl+Shift+W
- 在多个终端标签之间切换: Ctrl+Tab
- 多终端同步输入(就是所有终端执行相同的命令, 非常适合批量操作): win+G
- 关闭多终端同步输入: Win+Shift+G
- 放大单个窗口: Win+Shift+X
- 调整窗口大小: Ctrl+Shift+左方向键, Ctrl+Shift+右方向键
- Ubuntu Manpage: Terminator - Multiple GNOME terminals in one window
Linux终端Terminal分屏, 通过安装tmux实现
linux terminal分屏–tmux使用理论+实际操作_YunShuiShanFeng-CSDN博客 20180704
终端Terminal自动出现中断信号^C的原因
在终端输入命令的时候,或者某个任务正在运行的时候,随意拖动了一下终端窗口,或者随意在终端窗口上点击了一下,终端就自动弹出^C而终止掉了正在运行的任务,就是出现了按键Ctrl+C的效果。究其原因,这是由于电脑上使用了诸如有道词典的取词划译、金山词典的划词翻译等功能,有道词典/金山词霸会自动复制你划取的内容,也就是Ctrl+C然后刚好跟终端的终止命令一样。
解决Xshell 每次复制完就出现^C 的问题_佛系程序员-CSDN博客 20160611
Linux鼠标选定内容后自动弹出 ^C 的解决办法_kala111的博客-CSDN博客 20161008
ubuntu的终端里面,随意点击就出现ctrl+C的效果,出现^C_accumulate_zhang的博客-CSDN博客 20171102
在ubuntu上创建定时任务
Linux 定时任务 - 残星 - 博客园 20140823
Linux定时器详解 - 一只待宰的程序猿 - 博客园 20181227
crontab踩坑(二):Unit crond.service could not be found. - wqbin - 博客园 20191109
Linux Crontab 定时任务 - Rogn - 博客园 20190420
- 通过sleep在ubuntu上创建定时任务
Step1,创建.sh命令脚本
cd ~/xxx_workdir/xxx/Pytorch_WorkSpace/OpenSourcePlatform/tmp_files/
run_at_specified_time.sh命令脚本的内容为:
#!bin/bash
echo "current time is :"
date;
sleep 20s;
echo "after 20 seconds, print work directory:"
pwd
echo "run the first command"
./tools/dist_train.sh configs/retinanet/bl_21_retinanet_r50_fpn_1x_voc.py 2
#python tools/train.py configs/retinanet/v5v1_11_retinanet_r50_fpn_1x_voc.py
sleep 3h;
#echo "after 3 hours, run the second command"
./tools/dist_train.sh configs/retinanet/v5v2_11_retinanet_r50_fpn_1x_voc.py 2
#echo "finish running two commands"
# sleep 1 睡眠1秒
# sleep 1s 睡眠1秒
# sleep 1m 睡眠1分钟
# sleep 1h 睡眠1小时
Step2,run_at_specified_time.sh命令脚本
conda activate usr_mmlab
cd ~/xxx_workdir/xxx/Pytorch_WorkSpace/OpenSourcePlatform/mmdetection/
bash ../tmp_files/hello_world.sh # . ../tmp_files/hello_world.sh
sed -i 's/\r$//' filename.sh # 处理'line : $'\r': command not found'报错
- 通过crontab在ubuntu上创建定时任务
Step1,创建.sh命令脚本
cd ~/xxx_workdir/xxx/Pytorch_WorkSpace/OpenSourcePlatform/tmp_files/
run_at_specified_time.sh命令脚本的内容为:
#!bin/bash
source /home/xxx/miniconda2/bin/activate usr_mmlab
# source /home/xxx/miniconda2/bin/activate /home/xxx/miniconda2/envs/usr_mmlab
cd ~/xxx_workdir/xxx/Pytorch_WorkSpace/OpenSourcePlatform/mmdetection/
./tools/dist_train.sh configs/retinanet/bl_11_retinanet_r50_fpn_1x_voc.py 2
# python tools/train.py configs/retinanet/bl_11_retinanet_r50_fpn_1x_voc.py
Step2,通过crontab在终端设置定时任务
crontab -e # 创建crontab任务
00 05 6 12 * bash run_at_specified_time.sh
Step3,查看定时任务是否创建成功
crontab -l # 查看crontab任务
crontab -r # 删除crontab任务
- crontab相关的命令
service crond status # 查看 crond 服务的运行状态
sudo service cron start # 启动服务
crontab [-u username] [-l|-e|-r]
参数:
-u: 只有root才能进行这个任务,也即帮其他用户新建/删除crontab工作调度;
-e: 编辑crontab 的工作内容;
-l: 查阅crontab的工作内容;
-r: 删除所有的crontab的工作内容,若仅要删除一项,请用-e去编辑。
Linux中top命令参数详解
- Linux中top命令参数详解_yjclsx的博客-CSDN博客 20190731
- Htop的安装、学习和使用_嗨皮螃的博客-CSDN博客 20181016
- 【Linux】htop命令 安装、介绍(top命令增强版) - 品味·舍得 - 博客园 20200427
- htop使用详解 - yqsun - 博客园 20160415
Linux查看当前进程命令ps aux|grep xxx
linux命令ps aux|grep xxx详解 - RobertoJi - 博客园 20160603
终端键入命令ps aux | grep sogou
,可以查看sogou相关的进程
`ps aux`命令输出结果的格式:USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
格式说明:
USER: 行程拥有者
PID: pid
%CPU: 占用的 CPU 使用率
%MEM: 占用的记忆体使用率
VSZ: 占用的虚拟记忆体大小
RSS: 占用的记忆体大小
TTY: 终端的次要装置号码 (minor device number of tty)
STAT: 该行程的状态,linux的进程有5种状态:
D 不可中断 uninterruptible sleep (usually IO)
R 运行 runnable (on run queue)
S 中断 sleeping
T 停止 traced or stopped
Z 僵死 a defunct (”zombie”) process
注: 其它状态还包括W(无驻留页), <(高优先级进程), N(低优先级进程), L(内存锁页).
START: 行程开始时间
TIME: 执行的时间
COMMAND:所执行的指令
GNU Wget
GNU Wget is a free software package for retrieving files using HTTP, HTTPS, FTP and FTPS, the most widely used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.
Wget - GNU Project - Free Software Foundation
GNU Wget是一个在网络上进行下载的简单而强大的自由软件,其本身也是GNU计划的一部分。它的名字是"World Wide Web"和"Get"的结合,同时也隐含了软件的主要功能。目前它支持通过HTTP、HTTPS,以及FTP这三个最常见的TCP/IP协议协议下载。
wget的windows版安装步骤
- Step 1.下载Windows binaries of GNU Wget;
- Step 2.如果选择下载的是.zip文件, 需要解压到目录, 比如解压到D:\OtherProgramFiles\Portable\wget; 如果选择下载的是.exe文件, 需要创建一个文件夹用于包含.exe文件以便后续添加环境变量, 比如创建文件夹D:\OtherProgramFiles\Portable\wget; .zip版本相比于.exe版本可能只是多了一些协议什么的, 解压后可执行程序和.exe版本大体相同;
- Step 3.添加wget环境变量, 右键计算机 -> 属性 -> 高级系统设置 -> 高级 -> 环境变量 -> 在"usr的用户变量"或"系统变量"中选中Path都行 -> 编辑, 在最后添加";D:\OtherProgramFiles\Portable\wget";
- Step 4.运行cmd打开命令行窗口, 键入命令
wget -V
查看是否安装配置成功;
wget 命令参数详解
wget的问题记录
深度学习工作站
Geforce GPU 显存(GPU RAM) > 6 GB
远程控制ubuntu
远程控制软件
- Ubuntu16 安装向日葵远程控制软件_诗酒lp的博客-CSDN博客_ubuntu安装向日葵远程控制20191219
- 向日葵远程控制软件_app下载_视频监控软件_远程开机软件下载-Oray贝锐科技向日葵
企业用户 控制端 for Windows_V 5.0.0.29520(2020.05)
个人用户 向日葵 X for Windows_V 10.5.0.29613(2020.05)
ubuntu配置内网穿透实现远程访问
- 如何远程登录家里的Ubuntu电脑(命令行模式)? - 知乎用户的回答 - 知乎
- Ubuntu18.04.2LTS配置vnc+frp内网穿透实现桌面远程访问 - 简书 20190712
- How to access Jupyter session in Pycharm from a remote machine – IDEs Support (IntelliJ Platform) | JetBrains 20200630
ubuntu设定ssh服务
- 将自己的ubuntu电脑设置为一台可远程访问的服务器_s37-CSDN博客 20170818
- 不在一个局域网下,如何设置可以被远程登录的服务器[ubuntu]?【ssh登录】【不使用软件】_zdx1996的博客-CSDN博客20190327
IP地址, DNS, 域名;
- 第三集 互联网:IP地址和DNS_哔哩哔哩_bilibili 20180819
- 超直观的DNS科普,一个视频搞懂DNS是啥,是怎么运作的_哔哩哔哩_bilibili 20200501
- How to find your IP address in Linux | Opensource.com 20200207
- How to Check IP Address on Linux - (Command Line) -TecAdmin 20191213
- How To Find My Public IP Address from Linux Command Line - TecAdmin 20200723
Windows远程访问Linux, 非局域网, without public ip
- 让用户可以从任何其他设备实时远程控制校内或地区内的计算机; 从任何设备访问校内计算机; to access everything from everywhere; 适用于远程实验室和混合实验室的远程桌面软件
- 在家如何连接实验室linux服务器? - 知乎
- **Set-up of a personal GPU server for Machine Learning with Ubuntu 20.04 | by Gleb Lukicov | Towards Data Science 20200710
- How to Access my local server from Anywhere without public IP and i cannot port - Remote Support 20201213
- xxx
- ****How To Connect Everything From Everywhere with ZeroTier - Stephen Foskett, Pack Rat 20220114
ZeroTier One的使用
- zerotier/ZeroTierOne: A Smart Ethernet Switch for Earth
- 安装内网穿透工具【ZEROTIER ONE】 - 简书 20200702
- 内网穿透工具——ZeroTier One的使用 - 简书 20180109
- How to make Windows 10 pingable 20200803
20220317记: 两台机器互相ping一下, Window与Linux之间虽然能网络连接, 但延迟很长且不稳定, 尝试参考 Windows - Troubleshooting & FAQ | ZeroTier Documentation, 更改了"高级安全 Windows Defender 防火墙 | 入站规则"中的2个"文件和打印机共享(回显请求 - ICMPv4-In)“属性"作用域 | 远程 IP 地址 | 下列 IP 地址(H)”, 还是没啥改进效果;
机器之间网络连接延迟长, 原因未知, 待解决;
If a firewall between you and the Internet blocks ZeroTier’s UDP traffic, you will fall back to last-resort TCP tunneling to rootservers over port 443 (https impersonation). This will work almost anywhere but is very slow compared to UDP or direct peer to peer connectivity.
zerotier/ZeroTierOne: A Smart Ethernet Switch for Earth
问题记录
问题描述:
开始
原因分析:
开始
解决方案:
开始
xxx
问题描述:
开始
原因分析:
开始
解决方案:
开始
弹窗"Enter password to unlock your login keyring"
问题描述:
开始
原因分析:
开始
解决方案:
开始
- ubuntu16.04 打开chrome弹出“Enter password to unlock your login keyring”解决方法 - Laggage - 博客园 20190714
- 打开程序总是会提示 “Enter password to unlock your login keyring” - enumx - 博客园 20200213
installed packages have unmet dependencies
问题描述:
An error occurred. Please run the Package Manager from the right -click menu or apt- get in a terminal to see what is wrong. The error message was: 'Error:BrokenCount>0'. This usually means that your installed packages have unmet dependencies.
原因分析and解决方案:
package management - What does: Error Broken count >0 mean? - Ask Ubuntu 20130303
As the message says, you might have bad repositories. You can either remove them, or remove all repositories and only keep the default ones.
Run:
gksu software-properties-gtk
This will open the software sources dialog. Click on "Other Software" and remove all third party repositories.
After that, run this command and see if the problem has been solved:
sudo apt-get update && sudo apt-get install -f && sudo dpkg --configure -a
Linux 救援(rescue)模式
- 详解在 Ubuntu 中引导到救援模式或紧急模式-ubuntu进入救援模式 20220614
- 进入Linux救援(rescue)模式的四大法门_weixin_33963594的博客-CSDN博客 20130814
文本编辑器
vim文本编辑器
Linux Tutorial - Vi Cheat Sheet
命令模式下的常用命令:
yy
复制游标所在的那一行(常用)dd
删除游标所在的那一整行(常用)p
,P
p 为将已复制的数据在光标下一行贴上,P 则为贴在游标上一行! 举例来说,我目前光标在第 20 行,且已经复制了 10 行数据。则按下 p 后, 那 10 行数据会贴在原本的 20 行之后,亦即由 21 行开始贴。但如果是按下 P 呢? 那么原本的第 20 行会被推到变成 30 行。 (常用)
在这里插入代码片
nano文本编辑器
Main nano help text
The nano editor is designed to emulate the functionality and ease-of-use
of the UW Pico text editor. There are four main sections of the editor.
The top line shows the program version, the current filename being
edited, and whether or not the file has been modified. Next is the main
editor window showing the file being edited. The status line is the
third line from the bottom and shows important messages. The bottom two
lines show the most commonly used shortcuts in the editor.
The notation for shortcuts is as follows: Control-key sequences are
notated with a caret (^) symbol and can be entered either by using the
Control (Ctrl) key or pressing the Escape (Esc) key twice. Escape-key
sequences are notated with the Meta (M-) symbol and can be entered using
either the Esc, Alt, or Meta key depending on your keyboard setup. Also,
pressing Esc twice and then typing a three-digit decimal number from 000
to 255 will enter the character with the corresponding value. The
following keystrokes are available in the main editor window.
Alternative keys are shown in parentheses:
^G (F1) Display this help text
^X (F2) Close the current file buffer / Exit from nano
^O (F3) Write the current file to disk
^R (F5) Insert another file into the current one
^W (F6) Search for a string or a regular expression
^\ (M-R) Replace a string or a regular expression
^K (F9) Cut the current line and store it in the cutbuffer
^U (F10) Uncut from the cutbuffer into the current line
^J (F4) Justify the current paragraph
^T (F12) Invoke the spell checker, if available
Invoke the linter, if available
Invoke formatter, if available
^C (F11) Display the position of the cursor
^_ (M-G) Go to line and column number
^Y (F7) Go one screenful up
^V (F8) Go one screenful down
M-\ (M-|) Go to the first line of the file
M-/ (M-?) Go to the last line of the file
M-W (F16) Repeat the last search
M-] Go to the matching bracket
^^ (M-A) Mark text starting from the cursor position
M-^ (M-6) Copy the current line and store it in the cutbuffer
M-} Indent the current line
M-{ Unindent the current line
M-U Undo the last operation
M-E Redo the last undone operation
^B (Left) Go back one character
^F (Right) Go forward one character
M-Space Go back one word
^Space Go forward one word
^A (Home) Go to beginning of current line
^E (End) Go to end of current line
^P (Up) Go to previous line
^N (Down) Go to next line
M-( (M-9) Go to beginning of paragraph; then of previous paragraph
M-) (M-0) Go just beyond end of paragraph; then of next paragraph
M-- (M-_) Scroll up one line without scrolling the cursor
M-+ (M-=) Scroll down one line without scrolling the cursor
M-< (M-,) Switch to the previous file buffer
M-> (M-.) Switch to the next file buffer
M-V Insert the next keystroke verbatim
^I (Tab) Insert a tab at the cursor position
^M (Enter) Insert a newline at the cursor position
^D (Del) Delete the character under the cursor
^H (Bsp) Delete the character to the left of the cursor
Cut backward from cursor to word start
Cut forward from cursor to next word start
M-T Cut from the cursor position to the end of the file
M-J Justify the entire file
M-D Count the number of words, lines, and characters
^L Refresh (redraw) the current screen
^Z Suspend the editor (if suspension is enabled)
Save file without prompting
Search next occurrence backward
Search next occurrence forward
M-X Help mode enable/disable
M-C Constant cursor position display enable/disable
M-O Use of one more line for editing enable/disable
M-S Smooth scrolling enable/disable
M-$ Soft wrapping of overlong lines enable/disable
M-P Whitespace display enable/disable
M-Y Color syntax highlighting enable/disable
M-H Smart home key enable/disable
M-I Auto indent enable/disable
M-K Cut to end enable/disable
M-L Hard wrapping of overlong lines enable/disable
M-Q Conversion of typed tabs to spaces enable/disable
M-B Backup files enable/disable
M-F Reading file into separate buffer enable/disable
M-M Mouse support enable/disable
M-N No conversion from DOS/Mac format enable/disable
M-Z Suspension enable/disable
shell教程
- Bash For Loop Examples - nixCraft
- shell学习教程(超详细完整)_路人甲的博客-CSDN博客 20200923
- xxx
- Linux shell 下循环读取文件filename.txt的方式_風の住む街~的博客-CSDN博客 20200923
编写.sh脚本时可参考的.sh脚本
20231024记:
D:\WorkSpace\Server_WorkSpace\OpenSourcePlatform\mmdet_1213\sh_commands
\sh_train_yolofmbranch_4gpu_01.sh
\sh_train_yolofmbranch_8gpu_01.sh
D:\WorkSpace\Server_WorkSpace\OpenSourcePlatform\mmdet_1213\.dev_scripts
\train_benchmark.sh
D:\WorkSpace\Server_WorkSpace\OpenSourcePlatform\yolov5\data\scripts
\get_coco.sh
\sh_plot_curve.sh
D:\WorkSpace\Server_WorkSpace\OpenSourcePlatform\source_code_official\detectron2-0.3\projects\DensePose\dev
\run_inference_tests.sh
\run_instant_tests.sh
Execute Shell Commands with Python
*** How to Execute Shell Commands with Python - Parametric Thoughts 20190422
- Using the
os
Module
import os
os.system('ls -l')
stream = os.popen('echo Returned output')
output = stream.read()
- Using the
subprocess
Module
import subprocess
process = subprocess.Popen(['echo', 'More output'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
process = subprocess.run(['echo', 'Even more output'],
stdout=subprocess.PIPE,
universal_newlines=True)
-
some usability differences between
os.system()
,subprocess.run()
,subprocess.Popen()
*** Executing Shell Commands with Python 20210919 -
其它参考
*** python3中使用subprocess模块执行外部命令_Python热爱者的博客-CSDN博客 20201102
python os.popen() 方法_周小董-CSDN博客 20190718
subprocess — Subprocess management — Python 3.10.2 documentation
让程序在后台运行
- linux后台运行的几种方式 - 一寸HUI - 博客园 20190507
- linux如何后台运行服务_六指黑侠i的博客-CSDN博客 20190412
- nohup和&后台运行,进程查看及终止 - 狼人:-) - 博客园 20191231
shell相关问题记录
运行.sh脚本时报错’line : $‘\r’: command not found’
- 方案一:执行命令
dos2unix filename.sh
; - 方案二:For those who don’t have
dos2unix
installed (and don’t want to install it), Remove trailing\r
character that causes this error by running the following command:sed -i 's/\r$//' filename.sh
;
Explanation: Option-i
is for in-place editing, we delete the trailing\r
directly in the input file. Thus be careful to type the pattern correctly.
bash - ‘\r’: command not found - .bashrc / .bash_profile - Stack Overflow
关于$‘\r’: command not found错误的一点体会_Lnho的专栏-CSDN博客 20160505
Linux下日常办公
Linux下安装其它软件
-
xxx
-
The program ‘yum’ is currently not installed. You can install it by typing: - Shaw_喆宇 - 博客园 20180226
-
xxx
-
xxx
-
Linux 下图片裁剪工具
-
software recommendation - Is there a lightweight tool to crop images quickly? - Ask Ubuntu
-
xxx
Linux下硬盘挂载与格式化
Linux mount ntfs disk
20220927 11:30记:
- How to Mount and Access Windows NTFS Drives in Linux 20220527
- How to Mount NTFS Partition in Linux {Read-only & Read-and-Write}
- 『学了就忘』Linux基础命令 — 39、挂载U盘和挂载NTFS分区_brighteest - 格物博客-PC万里 20211114
- linux系统下如何挂载NTFS移动硬盘_Starヾ释怀的博客-CSDN博客 20220426
- Linux下挂载硬盘-ntfs格式 - 简书 20211130
Linux下判断硬盘是机械硬盘还是固态硬盘
- Linux下如何查看一块硬盘是不是固态硬盘(SSD)_Cinjosy的博客-CSDN博客 20190415
- linux安装识别硬盘比raid小,如何判断linux使用的是HDD还是SSD、HHD;磁盘阵列RAID_XY同学的博客-CSDN博客 20210504
JavaScript程序
[译]JavaScript程序中的await VS return VS return await - 夜里码码 - 博客园 20181221
如何写伪代码pseudo code
*** How to Write Pseudocode? A Beginner’s Guide with Examples 20210226
*** Pseudocode Standard
How to write a Pseudo Code? - GeeksforGeeks 20210202
*** Pseudocode 101: An Introduction to Writing Good Pseudocode | by Sara A. Metwalli | Towards Data Science 2020102
(包含递归的伪代码写法) Programming - Recursion
API documentation
API Documentation Guide | Simple API Documentation & APIs Document Tutorials
What is API documentation?
API docs, or API description documents, are the collection of references, tutorials, and examples that help developers use your API.
Your API’s documentation is the primary resource for explaining what is possible with your API and how to get started. It also serves as a place for developers to return with questions about syntax or functionality. The best API docs have these answers hence why it is so important to document your API.
Three Types of API Documentation
Your API documentation will have several types of content. Some is meant to show what’s possible to a developer considering an integration. Others will get those developers started quickly. And yet, good & simple API documentation should remain useful when that developer is deep into their work.
Your documentation must completely describe the API’s functionality, be accurate, educational, and inspire usage. It’s a big job that can roughly be broken down into three types:
- Reference and functionality
- Guides and tutorials
- Examples and use cases
We’ll discuss these in detail, but you can think of them as moving on a continuum of facts to context. A reference describes the endpoints of an API, it lays out all the pieces. Guides take some of those pieces and start to put them together, explaining why you’d use those parts. Finally, examples offer up a very specific solution, solving a common problem.
As you’ll see, the best API documentation nails all three of these types of content.
Best REST API Documentation
Now that we know what types of documentation to look for, let’s look at some examples of great REST API documentation. For many years, two names continue to come up when discussing API docs: Stripe and Twilio.
Stripe’s API reference, Twilio’s guides, Heroku’s examples;
One of the most important jobs of documentation is to help someone completely unfamiliar with your API. At the same time, you want it to remain useful for the developer who has already used your API. Of the three types of documentation, the reference most needs to remain relevant throughout a developer’s interaction with your API.
待补充
待补充
数学公式粗体
\textbf{}
或者
m
e
m
o
r
y
{\bf memory}
memory
数学公式粗斜体
\bm{}
摘录自“bookname_author”
此文系转载,原文链接:名称 20200505
高亮颜色说明:突出重点
个人觉得,:待核准个人观点是否有误
分割线
分割线
我是颜色为00ffff的字体
我是字号为2的字体
我是颜色为00ffff, 字号为2的字体
我是字体类型为微软雅黑, 颜色为00ffff, 字号为2的字体
分割线
分割线
问题描述:
原因分析:
解决方案: