随笔分类 -  python 

摘要:shell字符串切割,去除文件名后缀 去除文件名后缀 阅读全文
posted @ 2022-08-30 09:41 bH1pJ 阅读(123) 评论(0) 推荐(0) 编辑
摘要:data = pd.read_csv('1.csv', index_col=0) 阅读全文
posted @ 2022-08-28 15:02 bH1pJ 阅读(101) 评论(0) 推荐(0) 编辑
摘要:matplot的plot对象如何转换成numpy矩阵? fig, ax = plt.subplots() nx.draw(self.g1, ax=ax,node_size=20) fig.canvas.draw() data = np.frombuffer(fig.canvas.tostring_r 阅读全文
posted @ 2022-08-20 16:54 bH1pJ 阅读(30) 评论(0) 推荐(0) 编辑
摘要:QLabel setText 标红 加粗 self.winChooseCellType.lbChoosedCellType.setText("<h3><font color=red>{}</font> been choosed !</h3>".format(cellType)) 加粗,标红!!! 阅读全文
posted @ 2022-08-18 15:28 bH1pJ 阅读(55) 评论(0) 推荐(0) 编辑
摘要:ImportError: DLL load failed while importing win32api: 找不到指定的程序。 牛逼了,我的兄弟; 阅读全文
posted @ 2022-07-17 13:22 bH1pJ 阅读(77) 评论(0) 推荐(0) 编辑
摘要:c = np.array([2,2,2,2]).reshape(2,2) 通过reshape来实现1维到n维的转变 还有一种方法是:创建一个1000*1000*3的RGB图片 somaBackground = np.zeros((1000, 1000, 3), dtype=int) 读取图片 imp 阅读全文
posted @ 2021-07-02 12:46 bH1pJ 阅读(36) 评论(0) 推荐(0) 编辑
摘要:a = np.array([1,2,3,4,4,5,2,1]) 是np.array而不是arange() 还可以加参数dtype = float 例如a = np.array([1,2,3,4,4,5,2,1],dtype = float) 还有一种方法是:创建一个1000*1000*3的RGB图片 阅读全文
posted @ 2021-06-18 09:04 bH1pJ 阅读(19) 评论(0) 推荐(0) 编辑
摘要:https://www.runoob.com/python/att-string-format.html {:0>2d} 宽度为2,前边补0 保留小数点后两位 {:.2f} "{:s}, Time:{:.2f}min, Size:{:.2f}Gb".format(id, idTime/1000/60 阅读全文
posted @ 2021-06-18 09:02 bH1pJ 阅读(26) 评论(0) 推荐(0) 编辑
摘要:import matplotlib.pyplot as plt #这里应该把trace plot 出来,同时,还应该把峰值给plot出来; plt.figure() plt.plot(sigAv, color='red', label='dis') plt.plot(peaks, sigAv[pea 阅读全文
posted @ 2021-06-16 18:27 bH1pJ 阅读(23) 评论(0) 推荐(0) 编辑
摘要:python pycharm如何自动show出图片 踏破铁鞋无ni chu 啊 plt.interactive(True) scientific mode 阅读全文
posted @ 2021-06-16 14:13 bH1pJ 阅读(35) 评论(0) 推荐(0) 编辑
摘要:这个答案好 l2.extend(0 for _ in range(abs(len(a1)-len(a2))) 阅读全文
posted @ 2021-06-01 11:32 bH1pJ 阅读(143) 评论(0) 推荐(0) 编辑
摘要:240的确在下边 阅读全文
posted @ 2021-05-27 11:31 bH1pJ 阅读(26) 评论(0) 推荐(0) 编辑
摘要:count = 0 for name in algorithList: if not "." in name: # Name #是否有Demo #dataPath dfResult.loc[count] = [name, whetherDemo(name),rootPath + '/' + name 阅读全文
posted @ 2021-05-22 22:20 bH1pJ 阅读(24) 评论(0) 推荐(0) 编辑
摘要:Qt setFocus 参考资料: https://doc.qt.io/qt-6/qwidget.html#setFocus void QWidget::setFocus(Qt::FocusReason reason) Gives the keyboard input focus to this w 阅读全文
posted @ 2020-06-29 21:34 bH1pJ 阅读(101) 评论(0) 推荐(0) 编辑
摘要:Failed building wheel for libtiff 请参考:https://blog.csdn.net/u013381011/article/details/78414203 来源于: https://github.com/pearu/pylibtiff tif = TIFF.ope 阅读全文
posted @ 2020-05-27 23:10 bH1pJ 阅读(23) 评论(0) 推荐(0) 编辑
摘要:scipy是桥梁 Python 读Mat neuTracesDic = scio.loadmat(tracePath) neuTraces = neuTracesDic['trace'] Python写mat import numpy as np import h5py import scipy.i 阅读全文
posted @ 2019-12-21 13:30 bH1pJ 阅读(20) 评论(0) 推荐(0) 编辑

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