会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小鲨鱼2018
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
111
112
113
114
115
116
117
118
119
···
403
下一页
2023年6月15日
linux 中shell 终端关闭和开启回显功能
摘要: 001、关闭、开启回显功能 [root@PC1 test2]# seq 3 1 2 3 [root@PC1 test2]# stty -echo ## 关闭回显功能,关闭后在终端输入内容将不再显示 [root@PC1 test2]# 1 2 3, [root@PC1 test2]# [root@PC
阅读全文
posted @ 2023-06-15 00:12 小鲨鱼2018
阅读(2391)
评论(0)
推荐(0)
2023年6月12日
python 中格式化字符串
摘要: 001、format >>> "{0} love {1}.{2}".format("I", "FishC", "com") ## 位置参数 'I love FishC.com' >>> "{a} love {b}.{c}".format(a = "I", b = "FishC", c = "com"
阅读全文
posted @ 2023-06-12 23:34 小鲨鱼2018
阅读(14)
评论(0)
推荐(0)
python 中使用zip实现矩阵转置
摘要: 001、 [root@PC1 test04]# ls a.txt test.py [root@PC1 test04]# cat a.txt ## 测试数据 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
阅读全文
posted @ 2023-06-12 21:57 小鲨鱼2018
阅读(61)
评论(0)
推荐(0)
python中zip的用法
摘要: 001、 >>> a = [1, 2, 3] >>> b = [4, 5, 6] >>> c = [7, 8, 9, 10, 11] ## 测试列表 >>> list(zip(a,b)) [(1, 4), (2, 5), (3, 6)] >>> list(zip(a,c)) ## 返回列表元祖 [(
阅读全文
posted @ 2023-06-12 21:20 小鲨鱼2018
阅读(31)
评论(0)
推荐(0)
shell中中括号实现变量运算
摘要: 001、 [root@PC1 test03]# a=100 [root@PC1 test03]# echo $a 100 [root@PC1 test03]# echo $a+500 100+500 [root@PC1 test03]# echo $[a+500] ## 中括号可以实现变量运算 60
阅读全文
posted @ 2023-06-12 15:03 小鲨鱼2018
阅读(27)
评论(0)
推荐(0)
python中将多个连续的空格压缩为一个空格
摘要: 001、 >>> import re >>> str1 = "ab cd" >>> str1 ## 测试字符串 'ab cd' >>> re.sub(r"\s+", " ", str1) ## 将多个连续的空格压缩为空格 'ab cd' 002、 >>> str2 = "sdaaaaakyh" >>
阅读全文
posted @ 2023-06-12 14:52 小鲨鱼2018
阅读(110)
评论(0)
推荐(0)
ModuleNotFoundError: No module named 'pandas'
摘要: 01、 002、解决方法 [root@PC1 test2]# conda install pandas
阅读全文
posted @ 2023-06-12 13:01 小鲨鱼2018
阅读(210)
评论(0)
推荐(0)
linux 中sed命令实现单词的精确匹配替换
摘要: 001、 [root@PC1 test03]# ls a.txt [root@PC1 test03]# cat a.txt ## 测试数据 bookbookbookbook jjjj name=jack uuuuuuu 127.0.0.1 bookbook77 xxxxx.com eeebookbo
阅读全文
posted @ 2023-06-12 10:46 小鲨鱼2018
阅读(1105)
评论(0)
推荐(1)
linux 中sed命令实现删除文件的任意列
摘要: 001、删除文件的第一列 [root@PC1 test03]# ls a.txt [root@PC1 test03]# cat a.txt ## 测试数据 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 [root@PC1 te
阅读全文
posted @ 2023-06-12 10:25 小鲨鱼2018
阅读(2300)
评论(0)
推荐(0)
python 中 translate函数
摘要: 使用translate()方法进行字符串转换,通常需要先创建一个转换表。转换表可以使用Python内置的str.maketrans()方法创建,也可以手动创建一个字典来实现。 001、生成转换表 >>> table = str.maketrans("135", "QMT") ## 将1转换为Q,3转
阅读全文
posted @ 2023-06-12 01:22 小鲨鱼2018
阅读(565)
评论(0)
推荐(0)
上一页
1
···
111
112
113
114
115
116
117
118
119
···
403
下一页
公告