python学习记录
我的学习及爬坑记录
暴走的测试工程师
这个作者很懒,什么都没留下…
展开
-
linux系统中安装python
2)下载python3:代码如下:wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz结果如图:3.安装python(1)设定安装位置(根据需要进行设置,我安装在/usr/local/python3目录下)a.创建python3目录代码如下:mkdir -p /usr/local/python3b.解压下载好的Python-3.x.x.tgz包tar -zxvf Python-3.7.转载 2021-11-06 13:55:30 · 516 阅读 · 0 评论 -
python可以做接口压测???看完这篇文章教你学会用Thread模块进行接口多线程压测!!!
开源系统源码学习学习 :看这里更多python学习资料:看这里""" Thread 线程模块进行接口压测"""import threading,timeclass My_Thread: def __init__(self): # 添加总启动的线程列表 self.all_thread = [] # 这里用 requests 中的elapsed.total_seconds()方法统计接口请求时间 self.requests_time = [] # 添...原创 2021-04-19 18:08:10 · 651 阅读 · 2 评论 -
代码很乱,看不懂???python 几个骚操作,让你的代码更洁简,更优美!!!
开源系统源码学习学习 :看这里更多python学习资料:看这里# -*- coding: utf-8 -*-# @Author : Mr.Deng# @Time : 2019/12/12 11:06# 1 列表转化字符串list_a = ["name","age","tall"]print(" ".join(list_a))# 2 查找列表出现最多次数的字符串list_b = [1,2,3,4,2,2,2,1,2,3,4,5,6,6]print(...原创 2021-04-19 18:02:02 · 238 阅读 · 0 评论 -
python中md5加密
# -*- coding: utf-8 -*-# @Author : Mr.Deng# @Time : 2020/3/11 16:31import hashlibprint(hashlib.md5("637195397351230111".encode("utf-8")).hexdigest())原创 2020-05-08 15:23:31 · 133 阅读 · 0 评论 -
python链接mysql数据库并执行sql语句
优秀开源电商系统学习地址:http://github.crmeb.net/u/fei原创 2020-05-08 15:18:54 · 284 阅读 · 1 评论 -
python中 load/loads/dump/dumps 的区别
优秀开源电商系统学习地址:http://github.crmeb.net/u/fei原创 2020-05-08 15:20:10 · 153 阅读 · 0 评论 -
python中yaml文件的读写
# -*- coding: utf-8 -*-# @Author : Mr.Deng# @Time : 2020/3/10 9:21"""yaml是一个专门用来写配置文件的语言。1. yaml文件规则区分大小写;使用缩进表示层级关系;使用空格键缩进,而非Tab键缩进缩进的空格数目不固定,只需要相同层级的元素左侧对齐;文件中的字符串不需要使用引号标注,但若字符串包...原创 2020-05-08 15:22:15 · 852 阅读 · 0 评论