摘要: 使用 open() 报错 File "E:\python3\di1gexiangmu20231219\ex20.py", line 10, in print_all print(f.read()) ^^^^^^^^ UnicodeDecodeError: 'gbk' codec can't deco 阅读全文
posted @ 2024-01-11 15:15 中年二班 阅读(40) 评论(0) 推荐(0) 编辑
摘要: What’s the difference between argv and input() ? The difference has to do with where the user is required to give input. If they give your script inpu 阅读全文
posted @ 2023-12-27 17:10 中年二班 阅读(5) 评论(0) 推荐(0) 编辑
摘要: from sys import argv # 从Python的标准库之一sys模块库中引入argv模块到自己的脚本中 # read the WYSS section for how to run this script, first, second, third = argv # 解包argv,并依 阅读全文
posted @ 2023-12-27 15:36 中年二班 阅读(25) 评论(0) 推荐(0) 编辑
摘要: round(0.4)=0round(0.5)=0round(0.6)=1round(1.5)=2round(2.5)=2 这种方法叫 “四舍 六入 五成双” ,是为了避免在大量数据统计时舍入误差引起整体的偏移. 阅读全文
posted @ 2023-12-25 14:27 中年二班 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 移动 test.txt 文件到指定目录中 源目录一定要用 ~ ,否则报错,原因未知。 ~ 代表 C:\Users\lenovo lenovo 是计算机名称 PS C:\Users\lenovo\test> mv ~\test\test.txt c:\Users\lenovo PS C:\Users\ 阅读全文
posted @ 2023-12-20 16:39 中年二班 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 检索机器学习入门,书籍推荐 《统计学习方法》李航 著 《机器学习》西瓜书 周志华 著 《Elements of Statistical Learning》(ESL), 《Machine Learning:A Probabilistic Perspective》(MLAPP) 这两本书可以是被奉为机器 阅读全文
posted @ 2023-12-19 14:30 中年二班 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 写了一个遍历函数调用前面定义的 print()函数 报错信息:"void (*)(ElemType c)" 类型的实参与 "Status (*)(ElemType)" 类型的形参不兼容 ListTraverseBack(L, print); void print(ElemType c) { prin 阅读全文
posted @ 2020-09-22 21:43 中年二班 阅读(720) 评论(0) 推荐(0) 编辑
摘要: 撒 function [sys,x0,str,ts] = SecondOrderSystem(t,x,u,flag,zeta,wn) switch flag case 0 [sys,x0,str,ts] = mdlInitializeSizes; % initialize block case 1 阅读全文
posted @ 2020-06-29 11:25 中年二班 阅读(1452) 评论(0) 推荐(0) 编辑
摘要: (1) STM32的复位时间至少要大于2个机器周期才生效,复位时间与RC值有关。 (2) 复位按键打开时,RES被拉R2拉高,合上按键,由于电容两端电压不能突变,电容会开始放电,放完后RES电位降到GND。 阅读全文
posted @ 2020-05-22 20:45 中年二班 阅读(2132) 评论(0) 推荐(0) 编辑
摘要: Answer1: 你所做的配置IO, 只是把你想要的写在一结构体, 而最终库函数根据这结构体配置寄存器 在输出口的配置时, 结构体里的上下拉字段, 是不会被库函数所理会的,而因为结构体要共用于输入输出的配置, 必须有上下拉这一字段, 你却为了这一没意义的字段费心, 没这必要 Answer2: GPI 阅读全文
posted @ 2020-05-22 17:07 中年二班 阅读(4274) 评论(0) 推荐(0) 编辑