03 2021 档案

摘要:time:求时间戳(原始时间戳、10位时间戳、13位时间戳) 1 import time 2 3 timestamp = time.time() 4 print(timestamp, type(timestamp)) 5 # 1615699550.5230458 <class 'float'> 6 阅读全文
posted @ 2021-03-14 13:01 琥珀主yang 阅读(108) 评论(0) 推荐(0)
摘要:matplotlib绘图时,title、xlabel、ylabel、label中文乱码。执行下面4步解决中文乱码的问题。(无论是本地,还是Linux服务器,Mac,还是Windows都是这个步骤) 1、下载字体SimHei.tff 2、将下载的字体拷贝matplotlib字体路径tff下 查看配置路 阅读全文
posted @ 2021-03-11 12:49 琥珀主yang 阅读(367) 评论(0) 推荐(0)
摘要:plot.py文件路径:/Users/yangfengjuan/jupyter/plot.py 获取plot.py文件的绝对路径 1 currentpath = os.path.dirname(os.path.realpath(__file__)) 2 运行结果:/Users/yangfengjua 阅读全文
posted @ 2021-03-04 15:08 琥珀主yang 阅读(275) 评论(0) 推荐(0)
摘要:压力测试的时候,需要知道每个时间段的qps,sql如下 按照秒统计: 1 SELECT 2 DATE_FORMAT( create_datetime, '%s' ) tim, 3 count(*) count 4 FROM 5 chat_message 6 WHERE 7 create_dateti 阅读全文
posted @ 2021-03-02 18:57 琥珀主yang 阅读(2086) 评论(0) 推荐(0)