![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
问题解决
AllenGates
好好编程
展开
-
Seaborn子图报错“attributeerror: no attribute ‘fill_betweenx‘” (seaborn error on subplots)
seaborn, matplotlib多子图时如何选择子图的问题,用二维表示而非一维数据原创 2023-01-26 23:42:59 · 309 阅读 · 0 评论 -
Jupyter notebook折叠隐藏cell代码块 (hidden more than code cell in jupyter notebook)
jupyter notebook hidden cell codenotebook隐藏代码原创 2023-01-25 21:31:30 · 4742 阅读 · 1 评论 -
使用%run让Python代码更清爽(use %run to run other Python file in present code.)
%run命令在Python代码中执行其他Python文件。原创 2022-11-18 10:52:32 · 759 阅读 · 0 评论 -
make: Warning:错误的一种解决方法
将代码上传到一个Linux系统上进行编译时报错:make: Warning: File 'a.out' has modification time 2007 s in the futureg++ -c sampen_test.cpp -o test.og++ -c sampen.cpp -o sampen.omake: warning: Clock skew detected. Your build may be incomplete.这是因为代码是在笔记本上写的,而Linux系统没有联网。原创 2022-02-26 01:29:06 · 833 阅读 · 0 评论 -
如何在WSL2中使用perf分析代码性能
WSL2直接使用perf会报没有安装的错误:WARNING: perf not found for kernel 4.4.0-18362You may need to install the following packages for this specific kernel:linux-tools-4.4.0-18362-Microsoftlinux-cloud-tools-4.4.0-18362-MicrosoftYou may also want to install one of原创 2022-02-23 05:56:56 · 2722 阅读 · 4 评论 -
Win10下WSL安装anaconda
WSL 早已安装在 WSL 内安装 Anaconda这个帖子要sudo apt-get install build-essential我分别在科学上网前后操作后报Unable:在WSL中安装Anaconda3并建立独立环境这个帖子没说,于是忽略。安装成功原创 2021-08-09 16:18:38 · 843 阅读 · 0 评论 -
tmux鼠标控制-鼠标改变pane大小-其他鼠标控制方法同理
大家用tmux有没有难以改变pane大小的情况了,可以通过鼠标来控制,开启setw -g mouse-resize-pane on 即可我的版本是系统默认的tmux 1.8版本参考这2篇文章:新版Tmux开启鼠标模式的方法tmux 启用鼠标控制1 进入tmux session2 先按Ctrl + B, 松开以后,输入冒号,setw -g mouse-resize-pane on,即可开启鼠标改变pane大小(用鼠标点击分界线即可)setw -g mouse-resize-pane on原创 2021-07-16 17:23:31 · 1160 阅读 · 1 评论 -
Linux连续执行多条指令,中间用分号隔开即可
Linux连续执行多条指令,中间用分号隔开即可mkdir hello; cd hello原创 2021-07-03 16:19:21 · 1278 阅读 · 0 评论 -
FPGA异步复位同步释放
异步复位,同步释放:always @ (posedge clk, negedge rst_async_n) if (!rst_async_n) begin rst_s1 <= 1'b0; rst_s2 <= 1'b0; end else begin rst_s1 <= 1'b1; rst_s2 <= rst_s1; end assign rst_sync_n = rst_s2;原创 2021-06-30 22:43:17 · 185 阅读 · 0 评论 -
Linux命令行,循环执行shell命令
死循环有时候需要不断的执行命令,比如网络原因要不断的连不稳定的github,这时候可以用循环命令命令格式while true; do command; done;也可以while true ;do echo "hello"; sleep 1; done;参考这篇帖子原创 2021-06-30 15:52:24 · 388 阅读 · 0 评论 -
Debian\Ubuntu出现E: Failed to fetch问题解决
最近在在下载一个依赖包的时候,出现了网络源无法使用的问题,解决方法是update。当我尝试sudo apt-get install指令下载curl时,出现下图问题Failed to fetch一个网址。解决方法sudo apt-get update然后继续下载就可以了...原创 2021-06-30 14:20:48 · 7027 阅读 · 0 评论 -
Scala,浮点数字面量,不能把double给float
Scala浮点数字面量有float 和double默认是doubleval c:Float = -3.2这个语句会报错,因为-3.2是doubleval c:Float = -3.2f这个语句可以第三章 Scala基础——变量定义与基本类型原创 2021-06-18 11:17:52 · 258 阅读 · 0 评论 -
leetcode228 汇总区间
程序是一个状态机,为什么调试不对呢?画出状态之间的转移过程就能发现问题了。不要bug找到了就很开心,要想想为什么会有这个bug,哪些心态、编程习惯导致的bug。这一题把算法流程想出来以后,忽略了好几个变量的状态变化,导致出错,这种没有吧程序搞清楚就写的行为,不出错此时奇怪。char ** summaryRanges(int* nums, int numsSize, int* returnSize){ int low=0; int high; *returnSize = 0;原创 2021-06-16 19:56:12 · 101 阅读 · 0 评论 -
python将列表中的元素作为参数传入函数中
Lay = [7,12,2]net = Net(*Lay)解决问题!!!参考了这个链接:python将列表中的元素作为参数传入函数中原创 2021-06-10 15:53:22 · 3265 阅读 · 3 评论 -
[Labtools 27-3303] Incorrect bitstream assigned to device. Bitfile is incompatible for this device.
FPGA vivado中报错,无法烧录bit[Labtools 27-3303] Incorrect bitstream assigned to device. Bitfile is incompatible for this device.原因是板卡型号不对,在Setting中选择新的板卡型号,是否改变sys,可以选择否,重新生成Bit即可。...原创 2020-09-20 14:53:13 · 9574 阅读 · 0 评论 -
python的AttributeError错误
imdb_data_bunch.one_bach()//这个one_bach()不存在AttributeError Traceback (most recent call last) in ()----> 1 imdb_data_bunch.one_bach()/opt/conda/lib/python3.6/site-pac...原创 2020-02-26 04:44:24 · 5873 阅读 · 0 评论 -
windows下CMD命令行压缩
如何使用使用7z在命令行压缩?1.下载7z软件,7z真的很好用,自由软件,干净,方便,2.将_7z.exe_和_7z.dll_拷贝到系统某个环境变量目录下:3.即可在命令行下使用7z压缩和解压缩命令:参考这篇博文Windows下使用命令行解压和压缩zip7z a test.zip a.txt b.txt # 指定若干文件7z a test.zip f:/test/** # 压缩文...原创 2020-01-07 20:41:55 · 6470 阅读 · 0 评论 -
python求数组中前后元素的差(微分操作)的一种方法
x = [1,2,4,7,11]x0 = x[:] #千万不能用 x0 = x,[[Python] 正确复制列表的方法](https://www.cnblogs.com/ifantastic/p/3811145.html)del x0[-1]x1 = x[:]del x1[0]import numpy as npnp.array(x1)-np.array(x0)#Output :...原创 2020-01-07 15:46:45 · 6736 阅读 · 0 评论 -
ArtyA7的Hello Word创建Microblaze嵌入式系统硬件工程的问题解决
Xilinx问题解决-Arty A7[Timing 38-282] The design failed to meet the timing requirements.[Timing 38-469] The REFCLK pin of IDELAYCTRL Sytem_i/mig_7series_0/u_Sytem_mig_7series_0_0_mig/u_iod[Timing 38-282]...原创 2020-01-07 13:57:52 · 8024 阅读 · 0 评论 -
python程序如何打包成可执行exe——Windows10
#基本步骤1.下载安装pyinstaller我实在Anaconda Prompt下执行的(安装Anaconda后cmd就编程了 Amaconda Prompt)pip install pyinstaller2.打包程序pyinstaller -F xx.py生成的xx.exe文件会保存在dist目录下#参考链接如何将 Python 程序打包成 .exe 文件?PyInstal...原创 2019-12-27 07:51:10 · 240 阅读 · 0 评论 -
pyinstaller打包.py文件执行.exe后,FileNotFoundError: [Errno 2] No such file or directory: '.\\ecg_9k\\...
使用pyinstaller打包了.py文件,执行生成.exe报错,.py文件使用了相对路径,然而生成的.exe在dist目录下,因此执行出错,此时可以把相对路径改成绝对路径,重新打包。1 改成绝对路径import scipy.io as sciodata = scio.loadmat('D:\\ecg_9k\\matlab.mat') #data = scio.loadmat('.\\...原创 2019-12-27 01:41:51 · 2611 阅读 · 3 评论 -
Pyinstaller打包出现UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 解决方案
#解决方案在你打包的命令行中先输入chcp 65001 然后再输入打包命令。pyinstaller -F xxx.spec参考了CSDN上这篇方法原创 2019-12-27 01:14:28 · 1393 阅读 · 0 评论 -
pyinstaller 打包错误:RecursionError: maximum recursion depth exceeded
最近在用 pyinstaller 打包项目的时候遇到如下错误:RecursionError: maximum recursion depth exceeded解决方案:命令行下输入(我这里使用的收Anaconda Prompt)执行 pyinstaller,会生成 filename.spec文件:pyinstaller -F filename.py在 filename.spec...转载 2019-12-27 01:10:30 · 411 阅读 · 0 评论 -
如何在Windows中同级别目录python程序中中导入文件
ecg_9k文件夹下有code.py和code.py中需要处理的matlab.matimport scipy.io as sciodata = scio.loadmat('.\\ecg_9k\\matlab.mat') '''代码块'''scio.savemat('.\\ecg_9k\\rpeak9k.mat', {'r9k': r9k})经过测试,完成!!!...原创 2019-12-27 00:39:08 · 187 阅读 · 0 评论 -
python字典的灵活应用-生理信号简单resample重采样
python的dict字典字典dictc初始化使用 {},而非[]y = {}t = 0for i in ['a', 'b', 'c']: y[i] = [] for j in range(len(a)): y[i].append([a[j]]) #y[i] = [a[j]]# t = t + 1y这是一个重采样的生理信号...原创 2019-12-25 20:50:42 · 485 阅读 · 1 评论 -
Python程序中IndentationError:expected an indented block出错的一种情况及其解决——上一个语句加 pass
IndentationError:expected an indented blockCSDN解释Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的Python程序员,也可能陷入陷阱当中。最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分别的。在编译时会出现这样的错IndentationError:expected an in...原创 2019-12-25 20:36:03 · 425 阅读 · 0 评论 -
部分机电类的期刊-适合调平论文发表的期刊部分集锦
机械工程学报空间控制技术与应用仪器仪表学报-----------------------------------------------------------------------------------备选期刊------------------------------------------------------------------------...原创 2019-08-06 10:15:13 · 215 阅读 · 0 评论 -
:from torch._C import * ImportError: DLL load failed: 找不到指定的模块。
torch安装方法及问题解决方法参考这篇博文:Win10 安装 Anaconda 3.5 和 Pytorch 0.4.0 (步骤简单,讲解详细)Pytorch报错(Windows平台):from torch._C import * ImportError: DLL load failed: 找不到指定的模块。尝试再系统 path里添加环境变量 :C:\Users\CC_Never_Give...原创 2019-06-05 21:50:33 · 3091 阅读 · 1 评论 -
安川伺服使用调整
1开机报错,经过检查代码,显示是由于电源缺相导致,设置,断电生效。2由于采用位置模式,因此,此处需要使用设置。3可以在官网上下载SigmaWin+软件,对驱动器进行控制(用miniUSB线即可)4安装软件时,需要同时在官网下载USB驱动(不是SigmaWin+软件包里的Driver)...原创 2019-01-23 17:21:54 · 2142 阅读 · 0 评论 -
MatLab length 函数
欢迎使用Markdown编辑器写博客length(‘degree.txt’)的结果时10 length(degree) 的结果时20 内容:00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19原创 2018-08-27 22:33:45 · 1838 阅读 · 0 评论 -
Keil出现无法生成.hex文件,经检查,发现是MULTIPLE PUBLIC DEFINITIONS。
Keil出现无法生成.hex文件,经检查,发现是MULTIPLE PUBLIC DEFINITIONS。 实际并不应该出现这种问题。 回顾新建项目时在选择单片机型号STC12C5A60S2后,在CPU栏没有选择默认,而是选择了 Use Extended Linker(LX51) instead of BL51 和 Use Extended Assembler(AX51) instead of ...原创 2018-08-08 14:53:52 · 13434 阅读 · 0 评论