2022年7月8日

pandas

摘要: import numpy as np import pandas as pd def main(): # 创建 # Serier 仅有index轴,DataFrame index与columns 行与列 index = pd.date_range('1/1/2022', periods=8) a = 阅读全文

posted @ 2022-07-08 14:25 HHMLXL 阅读(20) 评论(0) 推荐(0)

2022年7月6日

numpy

摘要: import sys import numpy as np import pandas as pd def main(): np.set_printoptions(threshold=sys.maxsize) # 数组太大无法打印,会跳过中心部分打印角点,禁用此行为打印全部 # 创建 print(n 阅读全文

posted @ 2022-07-06 15:35 HHMLXL 阅读(12) 评论(0) 推荐(0)

2022年6月6日

ERROR command failed npm install --loglevel error --legacy-peer-deps 解决办法

摘要: C:Usersowner.vuerc 修改内容“useTaobaoRegistry”: false c://user/admin .vurec 阅读全文

posted @ 2022-06-06 10:36 HHMLXL 阅读(1204) 评论(0) 推荐(0)

2022年5月24日

es6

摘要: 1.let const 用法 2.解构赋值->对数组或对象进行变量赋值 let [a, b]= [1, 2] 3.原始数据类型 Symbol ,表示独一无二的值,最大的用法是用来定义对象的唯一属性名 4.map set Map 对象保存键值对。任何值(对象或者原始值) 都可以作为一个键或一个值 Se 阅读全文

posted @ 2022-05-24 13:25 HHMLXL 阅读(21) 评论(0) 推荐(0)

2022年1月24日

编码 中文转unicode

摘要: print("未知功能".encode('unicode-escape').decode()) 阅读全文

posted @ 2022-01-24 11:28 HHMLXL 阅读(32) 评论(0) 推荐(0)

2022年1月6日

linux

摘要: 1.查看物理CPU个数 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l 2.查看每个物理CPU中core的个数(即核数) cat /proc/cpuinfo| grep "cpu cores"| uniq 3.查看逻辑CPU的个数 c 阅读全文

posted @ 2022-01-06 13:19 HHMLXL 阅读(25) 评论(0) 推荐(0)

2021年12月20日

python 编译反编译

摘要: def test(): print(1+1) if __name__ == '__main__': test() ''' pip install uncompyle6 编译 python -m py_compile test.py 生成test.pyc文件 反编译 uncompyle6 test.p 阅读全文

posted @ 2021-12-20 14:53 HHMLXL 阅读(201) 评论(0) 推荐(0)

python 代码逐行耗时分析

摘要: @profile def test(): print(1+1) if __name__ == '__main__': test() ''' pip install line_profiler kernprof -l -v test.py -l 逐行分析 -v 输出 Wrote profile res 阅读全文

posted @ 2021-12-20 14:43 HHMLXL 阅读(166) 评论(0) 推荐(0)

2021年12月10日

三剑客 grep sed awk

摘要: 1.grep tail -1000 xxx.log|grep "key word"grep "key word" xxx.log grep 常用参数-i 忽略大小写-c 统计行数-v 显示不包含匹配文本的所有行-d或-r 对目录进行查询-o 只显示匹配的部分,配合正则使用-E 正则匹配 阅读全文

posted @ 2021-12-10 16:26 HHMLXL 阅读(27) 评论(0) 推荐(0)

2021年12月7日

docker 容器内部时间修改

摘要: 修改某一进程调用的系统时间 对于容器内部来讲,修改容器内部时间是没有权限的,网上其他教程修改容器内时间会同宿主机时间修改, 影响其他容器,所以不可取, 1.libfaketime c库,github下载地址:https://github.com/wolfcw/libfaketime make&mak 阅读全文

posted @ 2021-12-07 16:55 HHMLXL 阅读(592) 评论(0) 推荐(0)

导航