10 2022 档案
摘要:1.双y轴绘制 关键函数:twinx() # -*- coding: utf-8 -*- import numpy as np import matplotlib.pyplot as plt from matplotlib import rc rc('mathtext', default='regu
阅读全文
摘要:####UI文件 # -*- coding: utf-8 -*- from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, QMetaObject, QObject, QPoint, QRect, QSize,
阅读全文
摘要:import matplotlib.pyplot as plt from scipy.optimize import curve_fit import numpy as np def func(x, a, b, c): # 拟合的方程 return a * np.exp(-b * x) + c de
阅读全文
摘要:1.数据 x = np.random.uniform(-5, 5 ,size=100) X = x.reshape(-1, 1) y = x**2 + x +2 + np.random.normal(0, 1, size = 100) 2. 拟合 ploy = PolynomialFeatures(
阅读全文
摘要:使用sklearn.preprocessing.PolynomialFeatures来进行特征的构造。 它是使用多项式的方法来进行的,如果有a,b两个特征, 那么它的2次多项式为()。 那么它的3次多项式为($1,a,b,a^2,ab, b^2, a^3, a^
阅读全文
摘要:QFileDialog有四项功能 1.打开文件夹 getExistingDirectory() def openfolder(self): self.folder = QFileDialog.getExistingDirectory(self) print(self.folder) 2.打开特定文件
阅读全文
摘要:在Qt Designer中先建立UI,转成py文件,文件名为:plot_ui.py # -*- coding: utf-8 -*- ################################################################################ ##
阅读全文
摘要:from PySide6.QtWidgets import QApplication, QMainWindow,QWidget import pyqtgraph as pg import sys from PySide6 import QtCore,QtWidgets import numpy as
阅读全文
摘要:示例1 from PySide6.QtWidgets import QWidget,QApplication from PySide6 import QtWidgets ,QtCore import pyqtgraph as pg import sys import numpy as np clas
阅读全文
摘要:一、Event创建语法 CREATE Event [IF NOT EXISTS] event_name -- 创建使用create event ON SCHEDULE schedule -- on schedule 什么时候来执行,执行频率 [ON COMPLETION [NOT] PRESERVE
阅读全文
摘要:同一表内UPDATE数据 mysql> select * from test1; + + + + + + + | id | a | b | c | d | e | + + + + + + + | 1 | 34 | 6 | 10 | 0 | 2 | | 2 | 22 | 5 | 22 | 0 | 5
阅读全文
摘要:DELETE A FROM Table_name A JOIN (SELECT id FROM table_name ORDER BY id DESC LIMIT 10,1) B WHERE A.id<=B.id
阅读全文