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 阅读全文
posted @ 2022-10-21 09:07 华小电 阅读(194) 评论(0) 推荐(0) 编辑
摘要:####UI文件 # -*- coding: utf-8 -*- from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, QMetaObject, QObject, QPoint, QRect, QSize, 阅读全文
posted @ 2022-10-20 21:22 华小电 阅读(567) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2022-10-17 10:35 华小电 阅读(517) 评论(0) 推荐(0) 编辑
摘要: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( 阅读全文
posted @ 2022-10-17 10:16 华小电 阅读(135) 评论(0) 推荐(0) 编辑
摘要:使用sklearn.preprocessing.PolynomialFeatures来进行特征的构造。 它是使用多项式的方法来进行的,如果有a,b两个特征, 那么它的2次多项式为(1,a,b,a2,ab,b2)。 那么它的3次多项式为($1,a,b,a^2,ab, b^2, a^3, a^ 阅读全文
posted @ 2022-10-16 22:52 华小电 阅读(82) 评论(0) 推荐(0) 编辑
摘要:QFileDialog有四项功能 1.打开文件夹 getExistingDirectory() def openfolder(self): self.folder = QFileDialog.getExistingDirectory(self) print(self.folder) 2.打开特定文件 阅读全文
posted @ 2022-10-12 13:42 华小电 阅读(896) 评论(0) 推荐(0) 编辑
摘要:在Qt Designer中先建立UI,转成py文件,文件名为:plot_ui.py # -*- coding: utf-8 -*- ################################################################################ ## 阅读全文
posted @ 2022-10-10 10:17 华小电 阅读(261) 评论(0) 推荐(0) 编辑
摘要:from PySide6.QtWidgets import QApplication, QMainWindow,QWidget import pyqtgraph as pg import sys from PySide6 import QtCore,QtWidgets import numpy as 阅读全文
posted @ 2022-10-09 18:21 华小电 阅读(187) 评论(0) 推荐(0) 编辑
摘要:示例1 from PySide6.QtWidgets import QWidget,QApplication from PySide6 import QtWidgets ,QtCore import pyqtgraph as pg import sys import numpy as np clas 阅读全文
posted @ 2022-10-09 17:06 华小电 阅读(121) 评论(0) 推荐(0) 编辑
摘要:一、Event创建语法 CREATE Event [IF NOT EXISTS] event_name -- 创建使用create event ON SCHEDULE schedule -- on schedule 什么时候来执行,执行频率 [ON COMPLETION [NOT] PRESERVE 阅读全文
posted @ 2022-10-02 10:07 华小电 阅读(499) 评论(0) 推荐(0) 编辑
摘要:同一表内UPDATE数据 mysql> select * from test1; + + + + + + + | id | a | b | c | d | e | + + + + + + + | 1 | 34 | 6 | 10 | 0 | 2 | | 2 | 22 | 5 | 22 | 0 | 5 阅读全文
posted @ 2022-10-02 09:57 华小电 阅读(23) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2022-10-02 09:52 华小电 阅读(288) 评论(0) 推荐(0) 编辑

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