隐藏页面特效

06 2022 档案

摘要:循环读取文件常见写法 CHUNKSIZE=8192 def reader(s): while True: data = s.recv(CHUNKSIZE) if data == b'': break process_data(data) iter()写法 def reader(s): for chu 阅读全文 »
posted @ 2022-06-29 18:05 我在路上回头看 阅读(58) 评论(0) 推荐(0) 编辑
摘要:在编写脚本的时候会频繁用到标准输入(stdin)、标准输出(stdout)和标准错误(stderr)。脚本可以使用大于号将输出重定向 到文件中。命令产生的文本可能是正常输出,也可能是错误消息。默认情况下,正常输出(stdout)和错误信息(stderr)都会 显示在屏幕上。我们可以分别为其指定特定的 阅读全文 »
posted @ 2022-06-28 16:00 我在路上回头看 阅读(131) 评论(0) 推荐(0) 编辑
摘要:pgrep 运行的程序 [root@c1 ~]# pgrep matmul 2634730 阅读全文 »
posted @ 2022-06-28 15:17 我在路上回头看 阅读(22) 评论(0) 推荐(0) 编辑
摘要:from collections import MutableMapping class SortedDict(MutableMapping): def __init__(self): self.data = {} def __getitem__(self, key): return self.da 阅读全文 »
posted @ 2022-06-25 09:35 我在路上回头看 阅读(41) 评论(0) 推荐(0) 编辑
摘要:def populate_ranks(votes, ranks): names = list(votes.keys()) names.sort(key=votes.get, reverse=True) for i, name in enumerate(names, 1): ranks[name] = 阅读全文 »
posted @ 2022-06-25 09:23 我在路上回头看 阅读(27) 评论(0) 推荐(0) 编辑
摘要:http://t.zoukankan.com/carriezhangyan-p-9359708.html https://blog.csdn.net/weixin_28917223/article/details/113006958 http://nginx.org/en/docs/http/ngx 阅读全文 »
posted @ 2022-06-08 16:47 我在路上回头看 阅读(83) 评论(0) 推荐(0) 编辑
摘要:$args #请求中的参数值 $query_string #同 $args $arg_NAME #GET请求中NAME的值 $is_args #如果请求中有参数,值为"?",否则为空字符串 $uri #请求中的当前URI(不带请求参数,参数位于$args),可以不同于浏览器传递的$request_u 阅读全文 »
posted @ 2022-06-08 15:09 我在路上回头看 阅读(1080) 评论(0) 推荐(1) 编辑
摘要:from os import path print(path.relpath("/home/hpcadmin/lw/demo.py", start="/home/hpcadmin/lw")) # start可以指定路径 print(path.basename("/home/hpcadmin/lw/d 阅读全文 »
posted @ 2022-06-08 11:11 我在路上回头看 阅读(147) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示