![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
长安上吉
习惯用夏天来了向你打招呼
展开
-
跨板执行命令
import paramiko def remotescp(host_ip, host_port,host_username,host_password)原创 2021-09-23 16:48:39 · 58 阅读 · 0 评论 -
git简单用法
1、更新代码 git pull 2、本地建分支(切换到本地新建的分支) git checkout -B xxx 3、保存到缓存去 git stash 4、将缓存区的文件弄出来 git stash pop 5、撤销本地提交(在主干操作) git reset HEAD~ ...原创 2020-05-08 09:56:36 · 68 阅读 · 0 评论 -
Python 正则匹配(工作中经常会用到的匹配形式)
1、匹配一串字符中所有数字 ?P\d+ 2、匹配换行符 [\s\S] 3、匹配小数 (\d+.\d+)% 4、匹配数字和字母组合,这里info是Linux系统ifconfig -a的回显,这里的net是一个列表,里边是网络设备[“eth1”,“eth2”] net = re.findall(r"([A-Za-z0-9]+):\s.+", info) 5、加转义字符\去匹配 6、^(非)去匹配 ...原创 2020-05-08 09:46:02 · 332 阅读 · 0 评论