12 2020 档案
摘要:import time #日期转时间戳 tss1 = '2020-12-28 00:00:00' timeArray = time.strptime(tss1, "%Y-%m-%d %H:%M:%S") # 转为时间数组 # 转为时间戳 timeStamp = int(time.mktime(tim
阅读全文
摘要:记录下,以备不时之需(网上找了好久,才找个这个比较满意的) import time def get_day_begin(ts=time.time(), N=0): """ N为0时获取时间戳ts当天的起始时间戳,N为负数时前数N天,N为正数是后数N天 24 时(小时)=86400 000 毫秒 ""
阅读全文
摘要:秒级 import time now = time.time() #返回float数据 # 获取当前时间戳 秒级级 print(int(now)) 毫秒级 import time now = time.time() #返回float数据 #毫秒级时间戳 print(int(round(now * 1
阅读全文
摘要:[转载]Postman导出的.json文件转成Jmeter的.jmx文件(借助第三方小工具) https://blog.csdn.net/RoninYang/article/details/107997794
阅读全文
摘要:转载来源:https://www.cnblogs.com/mumuli/p/5806963.html 并在此基础上做更详细的说明 python 调用java的接口,具体实现步骤: 前提下载好JPyte1包,命令: pip install JPype1 #官网地址的下载地址 提前创建好PythonDi
阅读全文
摘要:需求来源:某知乎球友提问 如何用python对excel实现读取指定日期的数据? 保留第一行表头,保留前2列,读取当天及往后3天(一共4天包含当天)的数据 直接上python3代码: #!/usr/bin/python3 # -*- coding: utf-8 -*- # @Time : 2020/
阅读全文
摘要:如何在python 中输出九九乘法表 ? python3 代码: 2个for循环 for i in range(1,10): for j in range(1,i+1): print(f'{j}*{i}={i*j}'.format(i,j,i*j),end=' ') print("") 输出结果:
阅读全文