自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 遇到scrapy出现scrapy报错twisted.internet.error.ReactorAlreadyInstalledError: reactor already installed错误的解

错误原因是因为scrapy版本太新,某些关联包调用不上,具体的解决方法回退版本,我这里是把版本退回到到scrapy==2.5.1之后代码可以正常运行,其他版本也可以尝试一下。

2023-12-08 15:38:44 398

原创 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 506

原创 selenium刷新页面的各种方法

selenium刷新页面的各种方法

2023-11-11 15:23:34 3315

原创 Selenium浏览器自动化怎么上传文件

Selenium浏览器自动化怎么上传文件

2023-11-11 15:16:33 108

原创 python提示ModuleNotFoundError: No module named ‘lxml‘错误的解决办法

ModuleNotFoundError: No module named 'lxml'

2023-11-11 14:21:11 314

原创 sql server查询10-20条数据

sql server查询10-20条数据及查询中间数据得详解

2022-11-28 22:17:22 2484

转载 403forbidden404not found宝塔 nginx配置默认首页nginx demo

403forbidden404not found宝塔 nginx配置默认首页nginx demo

2022-06-24 09:56:57 517

转载 ModuleNotFoundError: No module named ‘django.utils.six‘

​ModuleNotFoundError: No module named 'django.utils.six’​

2022-06-24 09:53:22 1844

原创 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 2021

原创 Python中requirements.txt生成与导入方法

Python中requirements.txt生成与导入方法

2022-06-24 08:42:28 415

原创 用Rdkit把化学结构式的Smiles转换为InchI

用Rdkit把化学结构式的Smiles转换为InchI和InchI Key

2022-06-06 10:44:31 1161

原创 pip获取及安装当前项目运行环境

获取当前环境所用的库pip freeze >requirements.txt安装当前所用的库pip install -r requirements.txt

2022-01-04 11:26:16 752

原创 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 855

原创 git的commint时出现的异常

下面这个问题是使用一个前端IDE,commit时报出的异常Run git config --global user.email "[email protected]" 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 312

转载 git上传本地文件上gitee

如何将代码上传到Gitee

2021-06-28 22:01:18 61

原创 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 382

转载 selenium与chrome浏览器及驱动的版本匹配

selenium与chrome浏览器及驱动的版本匹配详情请查看此文章:selenium与chrome浏览器及驱动的版本匹配

2021-03-11 13:14:39 293

原创 使用nohup设置后台进程

有时候需要在Linux上设置一个后台进程,但是当你关闭terminal之时,它会被系统kill掉,那该如何来实现其后台进程能一直运行下去呢?使用方式:nohup demo.py &当在屏幕上敲击上述命令之后,屏幕上会出现如下信息:$ nohup: ignoring input and appending output to `nohup.out’敲击回车,就退出了nohup.out当前的界面,进入正常的命令行。...

2021-02-14 18:42:40 155

原创 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 424

原创 Centos查看端口占用情况

Centos查看端口占用情况命令,比如查看80端口占用情况使用如下命令:lsof -i tcp:80列出所有端口netstat -ntlp结束进程:kill 进程代码

2021-02-10 23:00:39 981

原创 nginx下载地址

nginx下载地址http://nginx.org/en/download.html

2021-02-10 22:58:15 516

原创 Anaconda+python3环境下 安装RDkit

不创建虚拟环境的命令:conda install -c conda-forge rdkit创建虚拟环境的命令:conda create -c rdkit -n my-rdkit-env rdkit

2021-02-10 22:56:40 2134 1

原创 Centos7 安装 Anaconda3 及 常用的conda命令

参考地址:https://www.geek-share.com/detail/2773987341.html

2021-02-10 22:54:05 298

转载 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 334

原创 anaconda下载地址

anaconda下载地址https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

2021-02-10 22:48:48 127

原创 ./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 724

转载 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.csdn.net/cailongbiaoyuli/article/details/84348866

2021-02-10 22:41:31 3023

原创 django根据字符串长度截取字符串和取小数后面两位数

django根据字符串长度截取字符串和取小数后面两位数截取字符串 {{data|slice:"15"}}取小数后面两位数 {{data|floatformat:2}}

2021-02-03 00:12:44 1129

原创 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 193

转载 DIV不确定高度内部元素水平垂直居中的方法归纳

DIV不确定高度内部元素水平垂直居中的方法归纳方法一:父标签 table-cell 法方法二:常规 position 及子元素偏移方法方法三:CSS3新属性 transform 的 translate 方法方法四:margin:auto 方法方法五:flex 布局方法方法一:父标签 table-cell 法看题目就知道是利用父标签的 display: table-cell,该属性指让标签元素以表格单元格的形式呈现,类似于td标签。目前IE8+以及其他现代浏览器都是支持此属性的。那么既然父标签已经是类似表

2020-12-14 13:58:02 1001

原创 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 78

原创 Linux关闭防火墙命令

1:关闭防火墙命令systemctl stop firewalld.service2:开启防火墙命令systemctl start firewalld.service3:关闭开机自启动命令systemctl disable firewalld.service4:开启开机启动命令systemctl enable firewalld.service

2020-07-17 13:55:33 128

原创 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 115

转载 怎样用jquery编码和解码url

怎样用jquery编码和解码url

2020-04-26 13:47:06 237

原创 将一个字符串形式的裂变转换为列表

将一个字符串形式的裂变转换为列表例如:a_str = "["1", "2", "a", "b"]"a_list = eval(a_str)print(a_list)输入结果:[“1”, “2”, “a”, “b”]

2020-04-26 13:37:30 547

原创 Django的迁移命令和反向生成命令

生成迁移命令python manage.py makemigrations执行迁移命令python manage.py migrate反向生成命令python manage.py inspectdb > app/models.py

2020-03-31 10:13:57 651

原创 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 605

转载 win10+apache+Django环境部署

Django项目我一般都是部署到Linux上的,今天也来尝试一下在window上部署环境:操作系统:win10python版本: python3.6django版本: django2.2Apache版本:2.4.41[https://www.apachehaus.com/cgi-bin/download.plx]mod_wsgi版本:4.7.1[https://www.lfd.uci...

2020-03-11 10:13:49 828

原创 numpy中ndarray的矩阵运算

数组是编程中的概念,矩阵、矢量是数学概念。在计算机编程中,矩阵可以用数组形式定义,矢量可以用结构定义!矢量运算:相同大小的数组间运算应用在元素上示例代码(1):# 矢量与矢量运算arr = np.array([[1, 2, 3], [4, 5, 6]])print("元素相乘:")print(arr * arr)print("矩阵相加:")pr...

2019-10-09 21:17:10 600

原创 Django开发过程中遇到的问题和解决方案

1.django向数据库中添加中文时报错解决方案:创建数据库的时候设置编码格式2.django的信号使用无法触发信号里的内容解决方案:在django 1.7后,使用信号时候需要在应用配置类中的ready() 方法中连接。所以我们需要配置先ready()需要在以下两个地方写入配置需要在项目的app.py,init.py两个文件中写入配置3.django-admin.py:未找...

2019-09-26 13:23:12 781

空空如也

空空如也

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

TA关注的人

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