![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python编程
文章平均质量分 80
zl_1628563296@qq.com
这个作者很懒,什么都没留下…
展开
-
conda环境常用命令
anaconda常规命令的使用原创 2022-07-19 19:10:19 · 2748 阅读 · 0 评论 -
pycharm下django案例的环境搭建运行
本次以github上的一个基于django框架的博客网站为模型来对django项目进行迁移搭建,使用环境:windows10Pycharm2017django框架mysql数据库谷歌浏览器(浏览器随意)一、环境搭建pycharm安装:转自:https://mp.weixin.qq.com/s/wgOBKJQOjDMw62jvo4NnLQPyCharm 201...原创 2020-05-28 17:43:25 · 262 阅读 · 0 评论 -
pip安装网址
pip --default-timeout=100 install 类库名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com原创 2020-04-28 09:14:32 · 641 阅读 · 0 评论 -
django-compressor安装失败
解决方案先安装 rcssmin插件pip install wheelpip install rcssmin --install-option="--without-c-extensions"pip install rjsmin --install-option="--without-c-extensions"安装完成就可以pip install django-comp...原创 2020-04-26 10:01:53 · 363 阅读 · 0 评论 -
关于Ubuntu中Could not get lock /var/lib/dpkg/lock解决方案
1:我遇到的问题:在开机运行apt install vim 命令的时候,如下报错:2:参考博客:在Ubuntu中,有时候运用sudo apt-get install 安装软件时,会出现一下的情况E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Un...原创 2020-04-07 16:56:20 · 125 阅读 · 0 评论 -
compilation terminated. error: command 'gcc' failed with exit status 1
报错信息:usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory ...原创 2020-04-07 16:09:12 · 2101 阅读 · 0 评论 -
gif爬虫
本人使用python版本为3.6.5python3中内置urllib模块python2中内置urllib2模块#coding:utf-8import urllib.requestimport re# 将正则表达式编译成Pattern对象rex=r'src="(https://.*?\.gif)"';pages = ('1','2');x=1;#输入您要爬的网址pa...原创 2020-03-26 14:25:26 · 136 阅读 · 0 评论 -
Django models常用数据类型的设计
2.3 数据类型附录表1. 整数类型类型 字节大小 有符号范围(Signed) 无符号范围(Unsigned) TINYINT 1 -128 ~ 127 0 ~ 255 SMALLINT 2 -32768 ~ 32767 0 ~ 65535 MEDIUMINT 3 -8388608 ~ 8388607 0 ...原创 2019-03-07 21:31:38 · 285 阅读 · 0 评论 -
django xadmin 错误:related Field has invalid lookup: icontains
错误提示:relatedFieldhasinvalidlookup:icontains问题:设置查询某表的字段为‘外键字段名’分析:设置某表的查询字段应该是相关联的明确一个字段,而不是一张表解决方法:将查询字段设为 '外键字段名__关联表的具体字段名'具体实例如下:models.pyfrom django.db import modelsclass Me...原创 2019-03-08 21:13:06 · 142 阅读 · 0 评论 -
摘要算法
摘要算法又称哈希算法、散列算法。原理及作用:它可以把任意长度的数据转换为一个长度固定且唯一(不同数据的加密结果重复概率极低,有兴趣请阅读https://blog.csdn.net/skyMountain/article/details/532819)的数据串(通常用16进制的字符串表示),从而到达验证数据是否被人篡改的作用。(简单来说就是验证数据的完整性)分类:消息摘要算法分为三类...原创 2018-12-07 16:13:39 · 463 阅读 · 0 评论 -
python2 和 python3中range()函数的区别
python2中range函数返回的是一个列表对象而在python3中返回是一个可迭代对象例如range(10)在python2中range函数返回的是一个列表对象而在python3中返回是一个可迭代对象python2中若想要获取可迭代对象使用xrange()函数...原创 2018-08-21 19:14:34 · 1477 阅读 · 0 评论 -
filter和map函数
python内置函数map和filter都用到了迭代器,获得的返回值均为迭代对象#使用filter和lambda输出[1,2,3,4,5]中大于4的值ret = filter(lambda x: x>4,[1,2,3,4,5])while True: try: print(type(ret)) rets = next(ret) ...原创 2018-11-23 22:14:05 · 212 阅读 · 0 评论