随笔分类 - Python
python 语言,类库
摘要:Locust压测 注意本地启动locus命令的时候: locust -f abtest.py --web-host=locus_service_ip --host=target_http_address locus_service_ip是启动locust服务的ip地址,而host配置locust压测
阅读全文
摘要:python性能分析装饰器,官方文档 line profile分析 # line profile import time from functools import wraps from line_profiler import LineProfiler # 查询接口中每行代码执行的时间 def f
阅读全文
摘要:坐标轴截断图 import matplotlib.pyplot as plt from brokenaxes import brokenaxes import numpy as np fig = plt.figure(figsize=(5,2)) bax = brokenaxes(xlims=((0
阅读全文
摘要:手动安装文件夹 格式xxx.tar.gz 安装步骤,解压:找到setup.py,执行python setup.py install 格式xxx.whl 安装步骤,执行pip install xxx.whl
阅读全文
摘要:reference: https://zhuanlan.zhihu.com/p/24311810 https://www.cnblogs.com/pdev/p/5267720.html
阅读全文
摘要:apply函数 import pandas as pd import datetime as dt def get_interval_days(arrLike, start, end): # 【arrLike为一行即axis=1时的row】 start_date = dt.datetime.strp
阅读全文
摘要:geopandas 常用方法 # 读入文件,寻找地理位置坐标集 import geopandas as gpd fp = "./data/TM_WORLD_BORDERS-0.3.shp" # 地理坐标文件地址 data = gpd.read_file(fp) # 读取文件 # data.plot(
阅读全文

浙公网安备 33010602011771号