上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 82 下一页
摘要: 装饰器,timer or log 打印日志以及方法运行时间 对于异步方法: from functools import wraps import traceback import time def async_time_fun(func): @wraps(func) async def log(*a 阅读全文
posted @ 2019-11-17 16:15 lshan 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 目的: 将如下改写成 "key":"value" 形式 方案:使用正则: Find What : ^(.*)=(.*)$ replace With "\1" : "\2" 阅读全文
posted @ 2019-11-16 19:32 lshan 阅读(201) 评论(0) 推荐(0) 编辑
摘要: def json_path_value(jsondict,path): try: num=1 pahts = path.split(".") mydict={} for p in pahts: if num==1: mydict = jsondict[p+""] num=num+1 else: my 阅读全文
posted @ 2019-11-15 12:00 lshan 阅读(1840) 评论(0) 推荐(0) 编辑
摘要: 如果是 pymongo==4.x pls pip3 install pymongo==4.5.0 client = pymongo.MongoClient(host="192.168.12.153", port=27017, username="root", password="root", aut 阅读全文
posted @ 2019-11-14 11:01 lshan 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 场景: 利用ngnix 代理mysql /ftp (所有的流式应用) config: cat /etc/nginx/nginx.conf #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/erro 阅读全文
posted @ 2019-11-13 23:31 lshan 阅读(1495) 评论(0) 推荐(0) 编辑
摘要: nginx1.9之后直接使用Stream配置就可以了,当然需要先安装stream模块 1.nginx 增加tcp ./configure --with-stream --with-pcre=../pcre-8.38 ./configure --with-stream --without-http_r 阅读全文
posted @ 2019-11-13 15:29 lshan 阅读(4033) 评论(0) 推荐(0) 编辑
摘要: 方式1: 每次指定 目前用 pip 安装软件时有时候软件包的源位于境外,所以导致安装速度很慢,建议使用国内的一些镜像源进行安装: 阿里云:https://mirrors.aliyun.com/pypi/simple/豆瓣网:http://pypi.douban.com/simple/清华大学:htt 阅读全文
posted @ 2019-11-06 22:26 lshan 阅读(140) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-11-06 12:26 lshan 阅读(0) 评论(0) 推荐(0) 编辑
摘要: package com.sea.comon.utils; import java.text.MessageFormat; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.annotation.Configuration; import org.springfr 阅读全文
posted @ 2019-11-04 12:13 lshan 阅读(9157) 评论(2) 推荐(0) 编辑
摘要: 自定转换器: 使用: 在自定名字上添加 eg: XXXX.DO 阅读全文
posted @ 2019-11-04 11:28 lshan 阅读(3967) 评论(0) 推荐(0) 编辑
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 82 下一页