- 博客(43)
- 收藏
- 关注
原创 rdkit把v2000的rxn文件拆分成单个物质的方法
模块来读取Reaction文件,并拆分出反应物集合和产物集合。以下是一个简单的Python代码示例,展示如何读取一个v2000格式的rxn文件,并将其拆分成单个Reaction对象,然后拆分出Reactants和Products。在化学编程中,可以使用。
2025-01-06 09:43:13
160
原创 selenium获取cookie的方法
第二种方法返回一个包含多个字典的列表,每个字典代表一个cookie,包含以下键:'name'、'value'、'path'、'domain'、'secure'、'expiry'和'httpOnly'。如果您只想获取特定cookie的值,可以通过遍历cookie列表并检查'name'键来实现。第一种方法获取后是一个字符串,但是可能受到浏览器的安全策略限制,无法获取某些Cookie。
2024-10-10 11:10:08
1357
原创 selenium出现TypeError: WebDriver.__init__() got an unexpected keyword argument ‘executable_path‘报错解决方案
执行selenium自动化脚本出现报错:TypeError: WebDriver.__init__() got an unexpected keyword argument 'executable_path'查看了一下是因为selenium的版本太高导致的,电脑本地环境的selenium版本是4.11以上的版本。1,先卸载本地高版本的selenium。2,重新安装指定版本的selenium。
2024-10-10 10:54:04
792
原创 遇到scrapy出现scrapy报错twisted.internet.error.ReactorAlreadyInstalledError: reactor already installed错误的解
错误原因是因为scrapy版本太新,某些关联包调用不上,具体的解决方法回退版本,我这里是把版本退回到到scrapy==2.5.1之后代码可以正常运行,其他版本也可以尝试一下。
2023-12-08 15:38:44
553
原创 scrapy遇到的[scrapy.spidermiddlewares.offsite] DEBUG: Filtered offsite request to ‘XXX‘错误处理
[scrapy.spidermiddlewares.offsite] DEBUG: Filtered offsite request to 'XXX'错误处理方法
2023-12-08 15:35:37
974
1
原创 python提示ModuleNotFoundError: No module named ‘lxml‘错误的解决办法
ModuleNotFoundError: No module named 'lxml'
2023-11-11 14:21:11
484
转载 403forbidden404not found宝塔 nginx配置默认首页nginx demo
403forbidden404not found宝塔 nginx配置默认首页nginx demo
2022-06-24 09:56:57
628
转载 ModuleNotFoundError: No module named ‘django.utils.six‘
ModuleNotFoundError: No module named 'django.utils.six’
2022-06-24 09:53:22
2576
原创 nginx启动报错: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)
nginx启动报错: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)
2022-06-24 09:50:59
2147
原创 pip获取及安装当前项目运行环境
获取当前环境所用的库pip freeze >requirements.txt安装当前所用的库pip install -r requirements.txt
2022-01-04 11:26:16
900
原创 pip 清华源地址安装模块
1,pip install -i https://pypi.tuna.tsinghua.edu.cn/simplepandas2,pip installpandas -i https://pypi.tuna.tsinghua.edu.cn/simplepandas可以改成任意你想要的模块
2022-01-04 11:23:02
1016
原创 git的commint时出现的异常
下面这个问题是使用一个前端IDE,commit时报出的异常Run git config --global user.email "you@example.com" git config --global user.name "Your Name"to set your account's default identity.Omit --global to set the identity only in this repository.fatal: unable to auto-d
2021-06-28 22:06:54
507
原创 django-celery的执行命令与在后台运行的命令
django-celery的执行命令celery -A celery_test worker -l info后台运行的命令(celery——tasks为项目名称)celery multi start w1 -A celery_tasks -l info
2021-03-11 13:34:36
464
转载 selenium与chrome浏览器及驱动的版本匹配
selenium与chrome浏览器及驱动的版本匹配详情请查看此文章:selenium与chrome浏览器及驱动的版本匹配
2021-03-11 13:14:39
446
原创 使用nohup设置后台进程
有时候需要在Linux上设置一个后台进程,但是当你关闭terminal之时,它会被系统kill掉,那该如何来实现其后台进程能一直运行下去呢?使用方式:nohup demo.py &当在屏幕上敲击上述命令之后,屏幕上会出现如下信息:$ nohup: ignoring input and appending output to `nohup.out’敲击回车,就退出了nohup.out当前的界面,进入正常的命令行。...
2021-02-14 18:42:40
192
原创 Django使用过程中跨域及iframe使用问题
Django使用过程中跨域及iframe使用问题Django跨域问题解决方法,在settings.py中添加ALLOWED_HOSTS = ['*']Django发布应用后其他前端无法使用iframe调用页面出现的情况:Refused to display 'http://127.0.0.1:8000/polls/' in a frame because it set 'X-Frame-Options' to 'sameorigin'解决方法,在settings.py中添加X_FRAME_
2021-02-14 18:39:34
491
原创 Centos查看端口占用情况
Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令:lsof -i tcp:80列出所有端口netstat -ntlp结束进程:kill 进程代码
2021-02-10 23:00:39
1038
原创 Anaconda+python3环境下 安装RDkit
不创建虚拟环境的命令:conda install -c conda-forge rdkit创建虚拟环境的命令:conda create -c rdkit -n my-rdkit-env rdkit
2021-02-10 22:56:40
2319
1
原创 Centos7 安装 Anaconda3 及 常用的conda命令
参考地址:https://www.geek-share.com/detail/2773987341.html
2021-02-10 22:54:05
343
转载 opencv ImportError: libXext.so.6: cannot open shared object file: No such file or directory
在使用uwsgi的时候报错:uwsgi: error while loading shared libraries: libiconv.so.2: cannot open shared object file: no such file or directory解决办法:(需要安装anaconda)conda install -c conda-forge libiconv
2021-02-10 22:51:18
435
原创 anaconda下载地址
anaconda下载地址https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
2021-02-10 22:48:48
164
原创 ./configure: error: C compiler cc is not found
CentOS 执行./configure 编译命令 时出现checking for C compiler ... not found解决方法:执行以下命令yum -y install gcc gcc-c++ autoconf automake make
2021-02-10 22:45:12
876
转载 centos make: *** No rule to make target `build‘, needed by `default‘. Stop.
在新的服务器安装nginx,在make编译时报错:make: *** No rule to make target `build', needed by `default'. Stop.处理方法https://blog.youkuaiyun.com/cailongbiaoyuli/article/details/84348866
2021-02-10 22:41:31
5141
原创 django根据字符串长度截取字符串和取小数后面两位数
django根据字符串长度截取字符串和取小数后面两位数截取字符串 {{data|slice:"15"}}取小数后面两位数 {{data|floatformat:2}}
2021-02-03 00:12:44
1192
原创 Linux系统Python通过pyodbc连接SQLServer
bootstrap表格水平、垂直居中水平居中// An highlighted block<td class="text-center"></td>垂直居中// An highlighted blocktd{vertical-align: middle !important;}
2021-01-28 10:57:50
267
转载 DIV不确定高度内部元素水平垂直居中的方法归纳
DIV不确定高度内部元素水平垂直居中的方法归纳方法一:父标签 table-cell 法方法二:常规 position 及子元素偏移方法方法三:CSS3新属性 transform 的 translate 方法方法四:margin:auto 方法方法五:flex 布局方法方法一:父标签 table-cell 法看题目就知道是利用父标签的 display: table-cell,该属性指让标签元素以表格单元格的形式呈现,类似于td标签。目前IE8+以及其他现代浏览器都是支持此属性的。那么既然父标签已经是类似表
2020-12-14 13:58:02
1238
原创 Linux关机和重启命令
1,shutdown命令**重启命令**shutdown -r now:立即重启shutdown -r 08:30 定时重启(占用前台终端)shutdown -r 08:30 & 定时重启(后台运行)shutdown -c 取消重启shutdown -r +10 10分钟后重启**关机命令**shutdown -h now 立即关机shutdown -h 00:30 定时关机2,reboot命令reboot 重启命令3,halt和poweroff命令halt 关机命
2020-07-17 14:04:54
118
原创 Linux关闭防火墙命令
1:关闭防火墙命令systemctl stop firewalld.service2:开启防火墙命令systemctl start firewalld.service3:关闭开机自启动命令systemctl disable firewalld.service4:开启开机启动命令systemctl enable firewalld.service
2020-07-17 13:55:33
164
原创 Django2.0异常:Specifying a namespace in include() without providing an app_name is not supported.
Django2.0异常:Specifying a namespace in include() without providing an app_name is not supported.我的代码:urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^user/', include('apps.user.urls',...
2020-04-26 13:56:57
178
原创 将一个字符串形式的裂变转换为列表
将一个字符串形式的裂变转换为列表例如:a_str = "["1", "2", "a", "b"]"a_list = eval(a_str)print(a_list)输入结果:[“1”, “2”, “a”, “b”]
2020-04-26 13:37:30
606
原创 Django的迁移命令和反向生成命令
生成迁移命令python manage.py makemigrations执行迁移命令python manage.py migrate反向生成命令python manage.py inspectdb > app/models.py
2020-03-31 10:13:57
690
原创 Django链接sql server2012数据库
Django链接sql server2012数据库开发环境:python3.7.1、Django2.1.15、sql server2012开发工具:pycharm一般公司很少使用sql server,但奇葩的是在我们公司就遇到了,重要的是还要和django一起开发。django默认是不支持sql server的,请教了公司大佬和百度查了一些资料终于把这个事情搞定了一、下载第三方库下载py...
2020-03-31 10:07:49
671
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人