随笔分类 -  python

摘要:一、numpy的基本使用 import numpy as np处理规整的多维数组,矢量运算能力优秀 参考https://www.cnblogs.com/smallpi/p/4550361.html https://blog.csdn.net/cxmscb/article/details/545834 阅读全文
posted @ 2022-01-21 12:20 shines87 阅读(148) 评论(0) 推荐(0)
摘要:先装python/anaconda环境,再弄pycharm编辑器 一、先说windows下 参考 ①点击 www.python.org/downloads/windows/ ctrl+F搜索到3.7.9 然后点击Download Windows x86-64 executable installer 阅读全文
posted @ 2022-01-20 16:45 shines87 阅读(125) 评论(0) 推荐(0)
摘要:一、import re 两种使用re.findall、re.compile(pattern[,flags]) 二、multiprocessing 参见(1),参见(2) 进程的意义 mul 进程间不共享全局变量 临界资源互斥访问锁 Lock 两进程间管道通信(默认全双工) Pipe 多进程间通信 Q 阅读全文
posted @ 2021-12-16 16:52 shines87 阅读(67) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/qq_40962368/article/details/80444144 pip install opencv-python ;import cv2 一、图像的读取、复制、显示、保存 ①cv2.imread(filename='f_path',flags= 阅读全文
posted @ 2021-11-23 16:21 shines87 阅读(710) 评论(0) 推荐(0)
摘要:一、模块 1、依赖路径:程序导入模块的搜索路径包括它的内置模块和sys.path路径列表,包括: ①程序所在目录 ②环境变量PYTHONPATH所设置的路径 ③标准库路径 导入过程:模块第一次导入时编译成.pyc字节码,再次导入时检查.pyc和.py文件的mtime来决定是否重新编译。 模块属性:d 阅读全文
posted @ 2021-09-02 13:33 shines87 阅读(14) 评论(0) 推荐(0)
摘要:1、折线图 import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2 * np.pi, 100) y1, y2 = np.sin(x), np.cos(x) plt.plot(x, y1, c='r', ls='- 阅读全文
posted @ 2020-03-04 21:52 shines87 阅读(449) 评论(0) 推荐(0)
摘要:一、文件处理 ①打开文件 open(file, mode='r', buffering=-1, encoding=None) t和+:默认模式为'r',读取文本; 'w+'、'w+b'打开文件并清空,不存在则创建,a+也是不存在则创建; 'r+' 与 'r+b' 仅打开文件但不清空。 mode: 文 阅读全文
posted @ 2020-03-03 19:02 shines87 阅读(395) 评论(0) 推荐(0)
摘要:一、argparse库 # exam.pyimport argparse # 命令行输入参数处理 parser = argparse.ArgumentParser() parser.add_argument('file',help='src file path') parser.add_argume 阅读全文
posted @ 2020-03-03 10:17 shines87 阅读(697) 评论(0) 推荐(0)
摘要:一、pandas 可处理 对excel的处理依赖于xlrd 总数 长边平均 短边平均 长边标准差 短边标准差 长边最大值 长边最小值 短边最大值 短边最小值 8072 97.17 79.97 77.71 67.84 767.76 7.27 600.61 5.13 412 108.94 101.65 阅读全文
posted @ 2020-03-03 10:10 shines87 阅读(219) 评论(0) 推荐(0)