上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 59 下一页

2023年2月27日

ubuntu中更新安装node.js

摘要: sudo apt update #下载Ubuntu下的nodejs sudo apt install nodejs #安装新版的node 和npm sudo apt-get install curl curl -sL https://deb.nodesource.com/setup_18.x | s 阅读全文

posted @ 2023-02-27 14:50 星河赵 阅读(143) 评论(0) 推荐(0)

2023年2月24日

Ubuntu20.04如何更换国内源

摘要: 1.打开终端。 2.输入以下命令备份原来的源。 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 3.再输入以下命令打开sources.list配置文件更换源。 sudo vim /etc/apt/sources.list 配置内容如下 阅读全文

posted @ 2023-02-24 10:27 星河赵 阅读(15649) 评论(0) 推荐(1)

2023年2月23日

docker 操作笔记

摘要: 1.Docker 创建ubuntu系统更换 apt-get源 创建Dockerfile并且更新apt源 在Dockerfile中添加如下两句代码: RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.li 阅读全文

posted @ 2023-02-23 18:05 星河赵 阅读(139) 评论(0) 推荐(0)

2023年2月11日

Python 使用grequests发送并发请求

摘要: Python requests 并发请求 requests是Python发送接口请求非常好用的一个三方库,由K神编写,简单,方便上手快。但是requests发送请求是串行的,即阻塞的。发送完一条请求才能发送另一条请求。为了提升测试效率,一般我们需要并行发送请求。这里可以使用多线程,或者协程,geve 阅读全文

posted @ 2023-02-11 21:21 星河赵 阅读(252) 评论(0) 推荐(0)

2023年2月6日

Python requests.Session 协程 下载文件

摘要: Python requests.Session 协程 下载文件 # coding: utf-8 from gevent import monkey monkey.patch_all() from gevent.pool import Pool import gevent import request 阅读全文

posted @ 2023-02-06 18:21 星河赵 阅读(231) 评论(0) 推荐(0)

2023年2月2日

Python 根据经纬度坐标计算位置

摘要: 高德API 经纬度地址查询:https://lbs.amap.com/tools/picker 示例代码 from math import radians, cos, sin, asin, sqrt # 公式计算两点间距离(m) def geodistance(lng1, lat1, lng2, l 阅读全文

posted @ 2023-02-02 15:47 星河赵 阅读(394) 评论(0) 推荐(0)

2023年1月31日

Python cjson序列化与反序列化

摘要: cJSON cJSON是一个使用C语言编写的JSON数据解析器,具有超轻便,可移植,单文件的特点,使用MIT开源协议。 cJSON项目托管在Github上,仓库地址如下: https://github.com/DaveGamble/cJSON CJSON比JSON速度更快,完善字符格式,推荐使用 C 阅读全文

posted @ 2023-01-31 21:06 星河赵 阅读(132) 评论(0) 推荐(0)

2022年12月22日

python字典转为对象,用"."方式访问对象属性

摘要: python字典转为对象,用"."方式访问对象属性 params = { "name": "login", "params": { "transaction_id": "cc258bdb3dd4d6bba2", "platformType": "第三方平台", "uid": 9 } } class 阅读全文

posted @ 2022-12-22 15:30 星河赵 阅读(265) 评论(0) 推荐(0)

2022年12月14日

crontab执行shell脚本

摘要: shell 脚本如下 #!/bin/sh source /etc/profile #需要导入环境变量,否则非原生命令执行不成功 procs=`ps -ef | grep python | grep aiphoto_data_maintain/bin/aiphoto_data | awk '{prin 阅读全文

posted @ 2022-12-14 13:10 星河赵 阅读(1013) 评论(0) 推荐(0)

2022年11月25日

Locust 压测测试介绍和使用

摘要: 背景:随着公司对项目质量越来越看重,性能测试已经慢慢日常化,不同之前性能测试在高峰之前做,所以需要一个可以随时对某些场景接口进行压测的实现方法。 目前市场使用的压测工具,LoadRunner,Jmeter等,这些个人觉得不太轻量化,而且要专门写脚本。 我要介绍的是Locust压测,不仅快速可便捷的去 阅读全文

posted @ 2022-11-25 18:56 星河赵 阅读(2636) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 59 下一页

导航