- 博客(59)
- 资源 (3)
- 收藏
- 关注
原创 加密算法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
2476
原创 win10系统下go build(构建) so文件
在 mingw-w64 的下载地址https://sourceforge.net/projects/mingw-w64/files/下载MinGW-W64-install.exe安装包。
2021-06-29 15:00:25
1607
原创 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
692
原创 fatal: ambiguous argument ‘origin/master..HEAD‘: unknown revision or path not in the working tree.
执行命令git difforigin/master..HEAD 异常信息如下:fatal: ambiguous argument 'origin/master..HEAD': unknown revision or path not in the working tree.Use '--' to separate paths from revisions, like this:'git <command> [<revision>...] -- [<file>..
2021-03-19 09:56:59
13423
转载 python代码取消或禁用控制台/终端的快速编辑模式
明明简书上面就有,就是没找到,还去研究了好久的C语言库。感觉研究方向是没有问题的,就是找不到方法。果然还是对位运算不够了解,同时也不知道每一位对应的信息。import ctypeskernel32 = ctypes.windll.kernel32kernel32.SetConsoleMode(kernel32.GetStdHandle(-10), (0x4|0x80|0x20|0x2|0x10|0x1|0x00|0x100))...
2021-03-02 15:35:29
1774
翻译 pywintypes.error: (6, ‘GetConsoleScreenBufferInfo‘, ‘句柄无效。‘)
https://stackoverflow.com/questions/53256389/c-winapi-getconsolescreenbufferinfo-always-fails-by-invalid-handle-returnsSTD_INPUT_HANDLE is usually connected to the terminal keyboard. (STD_INPUT_HANDLE 通常被用于连接终端键盘的句柄。)STD_OUTPUT_HANDLE and STD_ERROR_.
2021-03-01 18:00:32
1079
原创 django下载文件异常 - ValueError: read of closed file
# 下载缓慢def django_download_slowly(s_path, s_name): with open(s_path, "rb") as p_file: p_response = FileResponse(p_file.read()) p_response["Content-Type"] = "application/octet-stream" p_response["Content-Disposition"] = f"attach.
2020-09-01 13:39:50
3365
2
转载 最新版的sweetalert路径
个人建议不要下载最新版的,下载前一个版本即可。就是操作比较麻烦,需要复制链接,然后去链接里面复制代码。到本地指定文件路径:https://www.bootcdn.cn/limonte-sweetalert2/
2020-08-27 18:15:19
311
原创 运行celery flower 报错 raise NotImplementedError NotImplementedError
运行celery -A celery_app.celery_monitor flower -l info时报错如下图:总共装了两台电脑(win10-python3.8-celery4.4.6),第一台(这里称为A)是可以正常运行的,第二台(这里称为B)就不行了。可是安装步骤是一样的啊。这时候就只能从报错的包入手,报错包名有 celery,tornado和flower。1.先从celery 包开始替换1.1 备份B电脑的 C:\Python38\Lib\site-packages 目录..
2020-08-10 21:09:47
1516
1
原创 django 调用运行 celery时报错 RecursionError: maximum recursion depth exceeded while calling a Python object
File "C:\Python38\lib\site-packages\redis\connection.py", line 567, in connect self.on_connect() File "C:\Python38\lib\site-packages\redis\connection.py", line 663, in on_connect self.send_command('SELECT', self.db) File "C:\Python38\lib\sit...
2020-08-08 18:11:30
2146
1
原创 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
1371
原创 chrome打开html外联CSS失败
说出来你们可能不信,只是一个文件名的问题。加了个Style就可以直接在网页上打开该css的文件路径。如图:
2020-07-24 10:38:49
243
原创 svn的wc.db Error: database is locked
一个同事不知道,怎么更新的。出现svn清楚失败。这时候常规操作是:使用sqlite3进行删除。这时候提示Error: database is locked;发现.svn下有个wc.db-journal,果断删除。然后再次执行delete from work_queue;就OK了。...
2020-03-27 21:10:01
909
原创 Flask - UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd4 in position 0
运行flask时,提示File "C:\Python38\lib\socket.py", line 757, in getfqdn hostname, aliases, ipaddrs = gethostbyaddr(name)UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd4 in position 0: invalid...
2020-02-28 16:33:10
1222
原创 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
655
1
原创 firefox 下载文件时处理此文件的方法
首先selenium的浏览器驱动要加载自己的firefox的配置路径,而不是使用默认配置路径信息。使用selenium下载文件时,一直会跳出保存信息,如下图:handlers.json内容 "application/zip":{"action":0,"ask":true,"extensions":["zip"]}后面添加,"text/csv":{"actio...
2019-11-04 09:42:40
2670
原创 raise InvalidSchema("No connection adapters were found for '%s'" % url)
url路径多了个双引号导致的。一直找不到问题,期间有两个双引号被我忽略掉了。后来print了一些源码,然后一步一步去找发现。多了个双引号,因为是读取配置表的,配置表有没有显示。...
2019-09-23 10:45:22
12701
1
转载 jupyter notebook 设置缩进为tab制表符
转自:https://stackoverflow.com/questions/40861769/in-jupyter-notebook-how-to-change-auto-indent-to-tab-instead-of-4-spaces默认缩进是4个空格,想要设置成tabs。输入如下指令运行:%%javascript// apply setting to all current C...
2019-08-09 18:34:52
8138
原创 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
768
原创 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
1223
3
原创 学习git简单的本地分支与合并指令
git branch(创建分支)和git checkout (在分支之间进行切换)分支每提交一次,它就指向最新的提交2.git tag - 让一个引用指定固定的commit做标记git tag 新名称 当前hash值创建 INITIAL_COMMIT 名称的tag,同时会弹出文本,输入说明信息3.git show 名称 - 显示名称对应的commit信...
2019-05-24 16:19:25
285
转载 window下搭建gitlab环境 ---- 简单理解:window下的gitlab就是Bonobo Git Server
转载:https://www.cnblogs.com/dudu/archive/2011/06/24/git_on_windows.html#-------------------------------------------------------------------------------------------------------------------------#---...
2019-05-10 15:35:46
1581
原创 sqlalchemy.exc.InvalidRequestError: Could not reflect: requested table(s) not available in Engine
pandas的DataFrame数据,使用df.to_sql接口时,from sqlalchemy import create_engine# 使用SQLAlcheymy的ORM框架,链接数据库engine = create_engine( "mysql+pymysql://%s:%s@%s:%s/%s?charset=utf8" % ("user", "...
2019-05-10 10:17:15
8221
2
原创 Mysql 修改表结构
1.添加列alter table 表名 add 列名 类型;alter table tb3 add region float;alter table tb3 add width float;2.删除列alter table 表名drop 列名;alter table tb3 drop width;3.修改列只改类型 ------- modifya...
2019-05-09 22:41:37
1957
原创 logging 模块和sqlalchemy模块可能导致日志无法写入到文件
代码里面的log和logging的效果是一样的,只是多了一层封装。问题1:不注释掉会出现log无法写入到log文件内,连创建log文件都无法执行。注释掉后就正常执行log模块。当时后面的逻辑无法执行。分析:两个模块都存在,且可以正常执行。 屏蔽掉 import purchase_sales,把mysql_logic新建了一个my_check.py文件同样包含一个...
2019-05-08 21:00:14
1420
原创 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
871
原创 win10系统设置虚拟化-Inter Virtualization Technology
0.高级选项里面一直找不到网上说是的UEFI固件设置,其他的也感觉答非所问。1.按小键盘的del进入bios界面,然后选中最下面的Advanced Mode ,如下图2.跳转到高级,进入CPU设置3.下拉到最下面就可以找到-Inter Virtualization Technology ,开启即可。...
2019-04-26 10:12:41
9408
原创 pandas 屏蔽 SettingWithCopyWarning A value is trying to be set on a copy of a slice from a DataFrame
http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html添加如下一行代码:# 不提示警告pd.set_option('mode.chained_assignment', None)# !/usr/bin/env python # -*- coding:utf-8 -*-import p...
2019-04-11 18:33:44
2164
原创 chromedriver 的镜像路径和对应的部分chrome版本浏览器下载路径
chromedriver下载路径:http://npm.taobao.org/mirrors/chromedriver/notes.txt文件有说明对应的chrom版本。 chrome历史版本版本下载路径:https://www.chromedownloads.net/chrome64win/...
2019-04-02 11:41:38
770
原创 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
780
转载 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
7733
3
原创 pyqt4 初学 - QWidget: Must construct a QApplication before a QPaintDevice
dialog = simpleUI()dialog.show()QWidget: Must construct a QApplication before a QPaintDevicepMainWindow = qg.QApplication( sys.argv )dialog = simpleUI()sys.exit( dialog.exec_() )
2019-01-21 09:49:55
1080
原创 C:\Python27\lib\site-packages\pandas\core\series.py:1828: RuntimeWarning: invalid value encountered
C:\Python27\lib\site-packages\pandas\core\series.py:1828: RuntimeWarning: invalid value encountered in rint result = com._values_from_object(self).round(decimals)使用 pandas 对表进行指定小数位操作时DataFram...
2019-01-10 18:19:44
1928
原创 pandas ValueError: cannot reindex from a duplicate axis
对表格进行操作时,会出现报错:ValueError: cannot reindex from a duplicate axis说明 文件表格里面的列名有重复的,对其中一个进行重命名或者删除,即可。
2019-01-08 10:30:45
22820
原创 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
13368
原创 texturePacker 指令 .pvr.ccz 转 .png, 报错 : Not all sprites could be packed into the texture!
1、首先 texturePacker 3.0.9 的破解版下载,破解版的 texturePacker 下载路径在:https://blog.youkuaiyun.com/u013654125/article/details/80676715 的博客说明前面2、输入转换指令D:/TexturePacker_3.0.9/bin/TexturePacker.exe temp.pvr.ccz --s...
2018-11-09 17:27:09
2194
原创 安装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
1600
原创 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
4061
zeromq-4.1.2.zip
2018-03-24
zeromq-4.1.3.zip
2018-03-24
zeromq-4.1.4.zip
2018-03-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人