随笔分类 - python
摘要:shell字符串切割,去除文件名后缀 去除文件名后缀
阅读全文
摘要:data = pd.read_csv('1.csv', index_col=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
阅读全文
摘要:QLabel setText 标红 加粗 self.winChooseCellType.lbChoosedCellType.setText("<h3><font color=red>{}</font> been choosed !</h3>".format(cellType)) 加粗,标红!!!
阅读全文
摘要:ImportError: DLL load failed while importing win32api: 找不到指定的程序。 牛逼了,我的兄弟;
阅读全文
摘要: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
阅读全文
摘要: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图片
阅读全文
摘要: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
阅读全文
摘要:import matplotlib.pyplot as plt #这里应该把trace plot 出来,同时,还应该把峰值给plot出来; plt.figure() plt.plot(sigAv, color='red', label='dis') plt.plot(peaks, sigAv[pea
阅读全文
摘要:python pycharm如何自动show出图片 踏破铁鞋无ni chu 啊 plt.interactive(True) scientific mode
阅读全文
摘要:这个答案好 l2.extend(0 for _ in range(abs(len(a1)-len(a2)))
阅读全文
摘要:count = 0 for name in algorithList: if not "." in name: # Name #是否有Demo #dataPath dfResult.loc[count] = [name, whetherDemo(name),rootPath + '/' + name
阅读全文
摘要: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
阅读全文
摘要:Failed building wheel for libtiff 请参考:https://blog.csdn.net/u013381011/article/details/78414203 来源于: https://github.com/pearu/pylibtiff tif = TIFF.ope
阅读全文
摘要:scipy是桥梁 Python 读Mat neuTracesDic = scio.loadmat(tracePath) neuTraces = neuTracesDic['trace'] Python写mat import numpy as np import h5py import scipy.i
阅读全文