自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(31)
  • 收藏
  • 关注

原创 LangChain-ChatGLM本地搭建|报错合集(win10)

找不到model_config.py文件。

2024-06-17 16:22:17 506

原创 用 Python 做假设检验

【代码】用 Python 做假设检验。

2024-05-28 14:17:32 311

原创 Power BI

入门教程:

2024-05-28 14:08:17 161

原创 Cannot uninstall ‘llvmlite‘

【代码】Cannot uninstall ‘llvmlite‘

2024-01-04 15:29:31 480

原创 TypeError: ‘dict‘ object is not callable in Python

TypeError: 'dict' object is not callable in Python。

2023-11-09 14:03:19 597

原创 classification_report ValueError: Mix type of y not allowed, got types {‘continuous-multioutput‘, ‘m

classification_report ValueError: Mix type of y not allowed, got types {'continuous-multioutput', 'm。

2023-11-08 16:02:11 186

原创 [python] 将多维数组转为一维数组

使用 ’flatten‘ 函数

2023-06-05 15:17:38 239

原创 TypeError: doc2bow expects an array of unicode tokens on input, not a single string

【代码】TypeError: doc2bow expects an array of unicode tokens on input, not a single string。

2023-05-17 11:39:07 321

原创 [ELK] “reason“=>“no such index and [action.auto_create_index]

[ELK] "reason"=>"no such index and [action.auto_create_index]

2022-11-15 11:12:08 901

原创 ELK 安装配置教程 (macOS)

ELK 安装部署流程(macOS)

2022-11-01 16:57:29 637

原创 EXCEL,筛选合并单元格后的全部内容

步骤:取消合并,填充空白,再合并

2022-08-19 17:28:33 799

原创 dataframe中,使用字典映射匹配部分字符串

dataframe中,使用字典映射匹配部分字符串

2022-06-09 17:11:21 491

原创 AttributeError: ‘Rectangle‘ object has no property ‘normed‘报错解决方案

错误:python运行代码绘图:plt.hist(data[col], normed=True, alpha=0.5)报错:AttributeError: 'Rectangle' object has no property 'normed'解决方案:normed库已更新无法使用,替换为density即可:plt.hist(data[col], density=True, alpha=0.5)...

2022-04-20 10:31:49 3248

原创 eps值计算

eps是最小的正 64 位浮点数,使得 1 + eps ≠ 1。该值为 2⁻⁵² ≈ 2.22e-16。import numpy as npepsilon = np.finfo(np.float64).eps

2022-03-02 15:26:10 873

原创 在Anaconda中更新numpy

1. 进入Anaconda环境2. 输入指令:conda update numpy

2022-02-22 15:36:48 6134

原创 ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accurately

在Ubuntu安装transformers的时候,出现错误: Attempting uninstall: pyyaml Found existing installation: PyYAML 3.12ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would ...

2022-02-22 15:12:09 963

原创 FileNotFoundError: [Errno 2] “dot“ not found in path

问题:安装了‘pydot’,且‘import pydot’,出现如上错误。解决:运行‘dot -V‘,查看结果,若‘zsh: command not found: dot’,则需要安装‘graphviz‘。brew install graphviz

2022-02-10 09:25:12 757

原创 Paillier_Encryption 实现中英文字符串加解密

IntroductionPaillier算法原理:Code代码参考:Python实现Paillier加密解密算法 - B3ale上述代码实现了英文和数字字符串的加解密,实现中文字符串加解密需要解决中文的转码问题:中文---->encode(utf-8)---->encrypt---->decrypt---->decode(utf9)---->中文需要安装gmpy2和libnumpip install gmpy2pip install l

2022-01-27 14:26:38 1270

原创 [python] utf-8编码,双斜杠‘\\‘转单斜杠‘\‘

在编译中文过程, 会使用utf-8进行转码得到byte,例如'测试!'.encode('utf8'):b'\xe6\xb5\x8b\xe8\xaf\x95\xef\xbc\x81'在Python3中,有时会得到String,而不是byte:\\xe6\\xb5\\x8b\\xe8\\xaf\\x95\\xef\\xbc\\x81如果将String重新encode再decode,并不能得到原文:string.encode('utf8').decode('unicode_escape

2022-01-25 16:00:45 4841 1

原创 python爬虫 获取乱码 ‘Accept-Encoding‘: “br“

问题:浏览器支持的编码类型。一般有gzip,deflate,br 等等。python的requests里,有response.text 和 response.content,一般解码byte和str类型。所以如果遇到br类型就会解码得到一堆乱码。br是brotli,一种新的数据格式。在网页右键‘检查’,‘Network’里面,可以查看网页的压缩模式:content-encoding:brcontent-type:text/html; charset=utf-8解决方案:在pyt

2021-10-06 16:17:39 1764

原创 SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated \UX

错误:用pythob指定文件路径的时候,可能发生‘SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape’的错误。错误的原因是在路径等字符串中使用“\”,将该字符串视为转义序列。 在 Windows 环境中,“\”和字符的组合表示转义序列。 Python 提供的转义序列包括 \\(反斜杠)和 \n(行间距)。一般来说,路径是

2021-10-06 15:57:31 2363 2

原创 Win10,Anaconda (conda 4.7.12, python3.7.5),tensorflow安装

Win10操作系统,conda 4.7.12,python3.7.51.使用管理员权限,打开cmd,进入Anaconda路径D:\Anaconda3\2.Create a virtual environment$ conda create -n venv pip python=3.7 #select your python wersion$...

2019-12-13 18:22:31 2036

原创 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not avail

Problem:win10, python3.7.5, 使用pip在Anaconda中,install“TensorFlow”出现以下错误:pip is configured with locations that require TLS/SSL, however the ssl module in Python is not availableSolution:对于...

2019-12-13 17:59:54 353

原创 'conda' is not recognized as an internal or external command, operable program or batch file.

Question:Win10,Anaconda 4.7.12,执行 ‘conda --version’ 或 ‘conda list’ 命令出现错误'conda' is not recognized as an internal or external commandAnswer:Variable value should beC:\Users\Anaconda3...

2019-12-12 21:06:33 1723

原创 no module name 'gurobipy'

错误:成功安装gurobipy和license后,在Jupyter运行program时,出现以下错误:ModuleNotFoundError Traceback (most recent call last)<ipython-input-3-24a618edc02b> in <module>----> 1 fr...

2019-10-30 19:05:02 7510 7

原创 线上MATLAB,线上函数绘制平台

网址:https://octave-online.net/在网页中输入函数定义,即可输出函数图像,语法与MATLAB一样。例:x=linspace(-5,5);y=3*x.^2+3*x;plot(x,y);

2019-10-16 18:43:56 3414

原创 【跨域问题】Access to XMLHttpRequest at‘http://localhost:跨域问题解决

错误: Access to XMLHttpRequest at ‘http://localhost:3000/framework/create’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control ...

2019-09-03 17:53:45 157227 17

原创 MongoDB4.0.1安装教程 (Win10)

以前的MongoDB安装过程较为繁琐,最新版的MongoDB安装过程简单,不需要创建设置目录了。官网下载https://www.mongodb.com/在MongoDB官网中,下载MongoDB4.0.1版本1.点击Try Free2.选择 ‘Server’,选择版本为 ‘4.0.1’,选择系统 ‘Win64’,选择 ‘ZIP’,点击下载3.下载成功后,解压到指定目录,路径中不要有...

2019-09-03 17:44:56 253

原创 关于安装MATLAB中需要弹出DVD1并插入DVD2进行安装的问题

我在安装MATLAB的过程中也遇到了类似问题,在安装78%时跳出这个弹窗,着实令人费解有两种解决方式:1.将解压后的dvd2文件所有内容拷贝到dvd1中,再进行安装,虽暴力但亲测有效2.打开硬盘管理,弹出dvd1,装载dvd2选择dvd2,右键点击最下面这块,选择‘更改驱动器号和路径’,将dvd2路径更改与之前装载的dvd路径一致,再点确认继续安装。...

2019-03-05 18:39:54 6266

原创 OD入门 在不修改程序的情况下,取得合法验证

这是一个比较简单的程序 源程序如下:#include &lt;stdio.h&gt;#define PASSWORD "1921512"int verify_password (char *password){ int authenticated; char buffer[32]; authenticated=strcmp(password,PASSWORD); strcpy(...

2018-06-29 23:59:01 1357

转载 电梯模拟系统

模拟九层电梯系统。有七个状态:正在开门(Opening)、已开门(opened)、正在关门(closing)、已关门(closed)、等待(waiting)、移动(moving)、减速(Decelerate)。对于每个乘客有一个最长容忍时间,超过这个候电梯时间,他就会放弃。模拟始终从0开始,时间单位为0.1s。人和电梯各种动作均要消耗一定时间单位(简记为t),比如:有人进出时,电梯每隔40t测试...

2018-06-13 21:50:42 4350 3

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除