随笔分类 - Python
摘要:安装 https://www.cnblogs.com/lxfnote/p/8615697.html pyenv安装python,先把本地升级成3版本的python,否则一堆错误,切记!!! rpm -qa | grep openssl rpm -e --nodeps <包名> virtualenv
阅读全文
摘要:一、使用redis缓存准测 1. 经常存取,且不会改变的数据可以用缓存来存储,比如首页数据,数据量虽然大,但它不会经常改变;2. 经常使用(这里的经常使用的意思是经常作dml操作),但数据量小,比如说购物车数量的改变,就可以使用缓存; 二、python中使用redis 安装:pip install
阅读全文
摘要:https://www.cnblogs.com/Mongol-J/p/12712492.html https://npm.taobao.org/mirrors/chromedriver 1、pip install selenium 2、pip install chromedriver 3、下载chr
阅读全文
摘要:class A(object): def __init__(self): # 系统定义方法 self.string='A string' self._string='A _string' self.__string='A __string' # 私有变量 def fun(self): return
阅读全文
摘要:参考文章:https://blog.csdn.net/yanghuan313/article/details/63262477 python编码:encode() 将Unicode字符按照编码规则(如UTF-8)编成字节序列。 >>> a = u"测试">>> a.encode("UTF-8")'\
阅读全文
摘要:参考: 1. 解释为什么及何时适合用这语法:https://blog.csdn.net/AlanGuoo/article/details/78855750 2. 代码写法示例:https://blog.csdn.net/huo_1214/article/details/79242516 # _nam
阅读全文
摘要:序号(后面举例用) 类型 举例 作用说明 1 前单下划线 _var ★★ 命名约定为私有属性、方法,但不会强制执行(报错),只是作为提示. 经常用于property语法中. 2 后单下划线 var_ ★ 避免与关键字冲突,又让变量名具有可读性. 举例:加入想用type = "ok" ,但type是关
阅读全文
摘要:官方文档:http://2.python-requests.org/zh_CN/latest/user/quickstart.html 参考:https://www.cnblogs.com/lanyinhao/p/9634742.html
阅读全文
摘要:pyzabbix github地址: https://github.com/lukecyca/pyzabbix zabbix官方接口: https://www.zabbix.com/documentation/4.0/zh/manual/api 1 from pyzabbix import Zabb
阅读全文
摘要:1. 如何更换pip源为国内源? 解决:https://blog.csdn.net/yuzaipiaofei/article/details/80891108 2.pyenv安装时出现 No module named virtualenvwrapper https://blog.csdn.net/m
阅读全文

浙公网安备 33010602011771号