2021年12月6日

git常用命令

摘要: https://learngitbranching.js.org/ 学习git git diffgit diff --cached 查看已经暂存起来的变化 git log 比如你想看到每次提交的简略统计信息,可以使用 --stat 选项 /file_version_info.txt | 8 ++-- 阅读全文

posted @ 2021-12-06 14:01 HHMLXL 阅读(47) 评论(0) 推荐(0)

2021年6月23日

子序列和最大

摘要: def demo(nums): dp=[nums[0]] for i in nums[1:]: dp.append(max(i,dp[-1]+i)) return max(dp) print(demo([-2,1,-3,4,-1,2,1,-5,4])) 阅读全文

posted @ 2021-06-23 09:41 HHMLXL 阅读(43) 评论(0) 推荐(0)

2021年6月22日

python grpc

摘要: grpc 远程过程调用 优势:采用protobuf二进制消息,效率高;序列化后消息体积小;节省网络流量;序列化和反序列化直接对应程序中数据类;劣势:protobuf二进制可读性差 使用protobuf数据传输,protobuf是一种数据交换格式,由三部分构成proto 文件 :使用的proto语法的 阅读全文

posted @ 2021-06-22 15:30 HHMLXL 阅读(256) 评论(0) 推荐(0)

2021年6月17日

python 单例模式

摘要: # __new__ class Demo: def __new__(cls, *args, **kwargs): if not hasattr(cls,'_instance'): cls._instance=super().__new__(cls) return cls._instance a=De 阅读全文

posted @ 2021-06-17 15:31 HHMLXL 阅读(46) 评论(0) 推荐(0)

2021年6月16日

sanic 类视图

摘要: from sanic import Sanic from sanic.response import json from sanic.websocket import WebSocketProtocol # app = Sanic("websocket_example") from sanic im 阅读全文

posted @ 2021-06-16 12:20 HHMLXL 阅读(51) 评论(0) 推荐(0)

sanic websocket

摘要: from sanic import Sanic from sanic.response import json from sanic.websocket import WebSocketProtocol app = Sanic("websocket_example") @app.websocket( 阅读全文

posted @ 2021-06-16 11:57 HHMLXL 阅读(113) 评论(0) 推荐(0)

sanic版本

摘要: # 版本,Blueprint('/',version=1) # http://127.0.0.1:8000/v1 # 在蓝图中也可添加 from sanic import Sanic from sanic.response import json app=Sanic("app") @app.post 阅读全文

posted @ 2021-06-16 11:13 HHMLXL 阅读(85) 评论(0) 推荐(0)

sanic蓝图

摘要: '''蓝图层次结构化路由,将应用程序逻辑划分为多个组或职责区域,类似于django多个app的url.py和setting.py的url.py例如:不同模块负责不同功能,路由前缀不同/api/t/?name="aw"/api/s/?name="sw"注册蓝图t=Blueprint('t',url_p 阅读全文

posted @ 2021-06-16 10:42 HHMLXL 阅读(114) 评论(0) 推荐(0)

sanic 路由

摘要: from sanic import Sanic from sanic.response import json,file app=Sanic("app") # @app.route('/',methods=['POST']) async def test(request): name=request 阅读全文

posted @ 2021-06-16 10:26 HHMLXL 阅读(60) 评论(0) 推荐(0)

sanic请求响应

摘要: # pip install sanic from sanic import Sanic from sanic.response import json,file app=Sanic("app") ''' 请求 get 获取参数 request.args.get("") post 获取参数 reque 阅读全文

posted @ 2021-06-16 10:00 HHMLXL 阅读(230) 评论(0) 推荐(0)

导航