![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
ksx_120999
江湖问路不问心,问心问得几路行。
展开
-
加密算法AES和RC4的效率
网上有很多算法的理论说明,我也就不重复了,直接看结果。测试环境:window10测试语言:python3.8拿了一个2M左右的文件进行加解密测试。最终的测试效率如下:算法 10000次 1000次 1次 RC4-加密 53.3s 5.33s 5.98ms RC4-解密 53.1s 5.32s 5.98ms AEs-CBC-加密 1min1s 6.26s 6.95ms AEs-CBC-解密 53.9s原创 2021-10-28 10:59:06 · 2204 阅读 · 0 评论 -
wxpython 下调用时间模块-time/datetime 报错 ValueError: unknown locale: zh-CN
1.关键词 :ValueError: unknown locale: zh-CN网上一堆说明是语言环境问题。设置了一轮下去,还是不行。2.关键词:wxpython ValueError: unknown locale: zh-CN翻墙搜到了下面的链接:https://github.com/pyinstaller/pyinstaller/issues/4874下面说的版本号的对应关系PyInstaller==3.4 wxPython==4.0.4 goodPyInstal...原创 2021-04-28 16:41:40 · 608 阅读 · 0 评论 -
RabbitMQ(3.8.5) 局域网访问失败
网上有很多安装和新增管理员账号的可参考如下链接:安装:https://www.cnblogs.com/saryli/p/9729591.html新增管理员账号:https://www.cnblogs.com/autohome7390/p/5996615.html不知道是不是因为我装了最新版的rabbitmq(3.8.5),不存在文中所述的rabbitmq.config.example 文件。后面想到我既然已经通过web设置了,这个不是应该会自动保存吗,要不我还要在网页上设置个毛线。..原创 2020-08-07 11:18:53 · 1261 阅读 · 0 评论 -
chrome打开html外联CSS失败
说出来你们可能不信,只是一个文件名的问题。加了个Style就可以直接在网页上打开该css的文件路径。如图:原创 2020-07-24 10:38:49 · 191 阅读 · 0 评论 -
java 调用cmd,cmd调用python(BrokenPipeError)
During handling of the above exception, another exception occurred:Traceback (most recent call last):File "E:\test.py", line 161, in <module>_test_string()File "E:\test.py", line 40, in _te...原创 2019-12-23 09:59:47 · 548 阅读 · 1 评论 -
logging 模块和sqlalchemy模块可能导致日志无法写入到文件
代码里面的log和logging的效果是一样的,只是多了一层封装。问题1:不注释掉会出现log无法写入到log文件内,连创建log文件都无法执行。注释掉后就正常执行log模块。当时后面的逻辑无法执行。分析:两个模块都存在,且可以正常执行。 屏蔽掉 import purchase_sales,把mysql_logic新建了一个my_check.py文件同样包含一个...原创 2019-05-08 21:00:14 · 1338 阅读 · 0 评论 -
ImportError: cannot import name sample_tools
之前接入google_adsense广告时,没注意,后面换电脑重新运行时,就报错ImportError: cannot import name sample_tools过了好久都快忘记了,执行下面指令即可。pipinstall google-api-python-clientpipinstall oauth2client...原创 2019-05-27 15:40:03 · 1133 阅读 · 3 评论 -
vscode 忽略pep8的指定报错码
文件-首选项-设置原创 2019-05-28 17:01:20 · 1880 阅读 · 0 评论 -
pymongo.errors.OperationFailure: command SON
>>> p_connect_client.database.authenticate(DATABASE_ACCOUNT, DATABASE_PASSWROD)Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\si...原创 2019-07-17 13:48:08 · 699 阅读 · 0 评论 -
raise InvalidSchema("No connection adapters were found for '%s'" % url)
url路径多了个双引号导致的。一直找不到问题,期间有两个双引号被我忽略掉了。后来print了一些源码,然后一步一步去找发现。多了个双引号,因为是读取配置表的,配置表有没有显示。...原创 2019-09-23 10:45:22 · 12488 阅读 · 1 评论 -
mysql安装时的一些问题总结,自勉~~
1.下载地址: https://dev.mysql.com/downloads/file/?id=4858122.安装: 端口号 : 3308 密码 : 111111pip install PyMySQL进入到 C:\Program Files\MySQL\MySQL Server 8.0\bin 执行数据库操作或者设置 C:\Program Files\My...原创 2019-05-06 11:14:10 · 781 阅读 · 0 评论 -
pip - window the ssl module in Python is not available.
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.win7安装时会报上面的错误, 这时候直接使用anaconda进行安装。这时候注意,一定要把“Add Anacoda to the system PATH environment ...原创 2019-03-28 23:19:36 · 741 阅读 · 0 评论 -
windows下安装 bs4(BeautifulSoup4.3.2)模块
# 下载路径http://www.crummy.com/software/BeautifulSoup/bs4/download/4.3/beautifulsoup4-4.3.2.tar.gz# 安装方式在 bs4路径下打开 cmd,执行 python setup.py installhttps://www.cnblogs.com/yangwujun/p/6600300.html...转载 2018-03-08 18:12:52 · 3176 阅读 · 0 评论 -
Python下安装matplotlib
只要在python3.5/3.6下,直接使用pip install matplotlib就可以直接安装matplotlib及其所需要的所有第三方库。在控制台输入:pip install matplotlib会自动安装,安装成功后显示:在python环境下执行,import:说明安装成功。...原创 2018-04-10 07:56:48 · 190 阅读 · 0 评论 -
安装第三方库 出现 E: 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用) E: 无法锁定管理目录(/var/lib/dpkg/),
转载路径:https://blog.csdn.net/ccf19881030/article/details/8671046安装第三方库 出现 E: 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用) E: 无法锁定管理目录(/var/lib/dpkg/),root@KSX:/home/ksx# sudo apt-get install python3-pi...转载 2018-04-17 22:15:40 · 718 阅读 · 0 评论 -
执行 scrapy爬虫 You do not have a working installation of the service_identity module:
在执行 scrapy crawl domz时,警告::0: UserWarning: You do not have a working installation of the service_identity module: 'cannot import name 'opentype''. Please install it from <https://pypi.python.org/p...原创 2018-04-19 23:27:30 · 2233 阅读 · 0 评论 -
【转】CrawlSpider源码分析
转载1:https://blog.csdn.net/zq602316498/article/details/37988683转载2:https://www.jianshu.com/p/ff9125650697class CrawlSpider(Spider): rules = () def __init__(self, *a, **kw): super(CrawlS...转载 2018-04-20 22:20:07 · 158 阅读 · 0 评论 -
ImportError: Install xlrd >= 0.9.0 for Excel support. Current version 0.8.0-Cannot uninstall 'xlrd'.
原来电脑已经有个 0.8.0的xlrd,这时候要安装0.9.0以上的,直接pip install xlrd,默认安装最新版,这时候提示Cannot uninstall 'xlrd'. It is a distutils installed project and thus we cannotaccurately determine which files belong to it wh...原创 2018-09-18 09:31:08 · 4007 阅读 · 0 评论 -
texturePacker 指令 .pvr.ccz 转 .png, 报错 : Not all sprites could be packed into the texture!
1、首先 texturePacker 3.0.9 的破解版下载,破解版的 texturePacker 下载路径在:https://blog.csdn.net/u013654125/article/details/80676715 的博客说明前面2、输入转换指令D:/TexturePacker_3.0.9/bin/TexturePacker.exe temp.pvr.ccz --s...原创 2018-11-09 17:27:09 · 2036 阅读 · 0 评论 -
安装mongoDB win7 错误1053服务没有及时响应启动或控制请求
使用命令mongod --bind_ip 0.0.0.0 --logpath E:\mongodb_4.0.3\data\logs\mongo.log --logappend --dbpath E:\mongodb_4.0.3\data\db --port 27017 --serviceName "MongoDB" --serviceDisplayName "MongoDB" --instal...原创 2018-11-09 07:55:45 · 1539 阅读 · 0 评论 -
ValueError: You are trying to merge on object and float64 columns. If you wish to proceed you should
两个列表的其中一列值分别是左表:lk ['' '' '' '' '' '' '' '' '' '' '' '' '' ''], 类型是 <type 'str'>右表:rk [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.], 类型是 <type 'numpy.float64'>,--------类型...原创 2019-01-07 16:05:56 · 13055 阅读 · 0 评论 -
python 使用多进程无法正常退出
https://segmentfault.com/q/1010000006686575# !/usr/bin/python# -*- coding: utf-8 -*-import multiprocessingimport randomimport timeclass UseQueue(object): def __init__(self): self.init_va...转载 2019-03-08 11:48:16 · 7539 阅读 · 3 评论 -
QQ邮箱接收MIMEText的内容为空
#!/usr/bin/python#-*- coding: utf-8 -*-from smtplib import SMTP_SSLfrom email.header import Headerfrom email.mime.text import MIMETextFrom = "*****@xxx.com"To = "*****1@xxx.com"smtp原创 2017-03-20 15:59:59 · 1524 阅读 · 0 评论