python
depakin
Change Your World
展开
-
禅道文档恢复导出
需求目的因产品运营无备份,需要从禅道上找到之前的产品运营文档。看了下禅道的文件上传,module/file/model.php保存到upload目录,company->id (默认为1),按月分目录。savePath = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . date('Ym/', $this->now);保存的文件名生成规则为:sessio原创 2021-06-29 13:26:11 · 1019 阅读 · 0 评论 -
Python使用 Google Protocol Buffers (protobuf)
最新在用Python写游戏服务器,想更换掉老旧的protobuf2,看了下proto3的语法,来测试下:服务器环境 与 protoc 版本:# cat /etc/redhat-release CentOS Linux release 7.8.2003 (Core)# protoc --version libprotoc 3.11.4一、安装 Python 的protobuf包:1.1 默认安装最新版本# pip install protobuf1.2 查看protob原创 2020-08-18 17:41:45 · 4666 阅读 · 0 评论 -
【rabbitmq-Python】-发布Publish 与订阅Subscribe
发布/订阅,使用扇型交换机(fanout)https://pika.readthedocs.io/en/stable/pip install pika发布端(Publish)# coding=utf8'''发布/订阅Publishhttps://github.com/rabbitmq/rabbitmq-tutorialshttps://www.rabbitmq.com/tutorials/tutorial-three-python.html'''import pikaimp..原创 2020-08-13 19:02:10 · 1679 阅读 · 0 评论 -
python 3.7 crash after install readline
pip install readline 安装了readline模块之后,python控制台崩溃:执行结果,如下:>>> 1+1 *** Error in `python': free(): invalid pointer: 0x00007f13bf7a7af0 ***======= Backtrace: ========= /usr/lib64/libc.so.6(+0x81679)[0x7f13be21a679] /usr/local/lib/libpython.原创 2020-05-22 22:03:40 · 10314 阅读 · 0 评论 -
Django 每个App配置独立域名
环境:Python 3.8.1 + Django 2.2.12为整合流程规范,部署了综合型的项目,包含了 task (需求系统),doc (文档系统),sso (单点登录系统),大致的目录结构:CellMiddle -- 项目根目录├─task --- 需求系统│ ├─migrations│ ├─static│ └─templates├─logs --- 日志目录├─doc --- 文档系统│ ├─data│ ├─migrations│ ├─static.原创 2020-05-22 22:01:03 · 10543 阅读 · 0 评论 -
Python版本Google广告admob服务端回调验证SSV
Google的激励广告的 Google 回调的服务器端验证 ( SSV ) server side verifiy。Python版本的基于第三方包 ecdsa 开箱即用。Google公钥的地址:https://www.gstatic.com/admob/reward/verifier-keys.json注意:AdMob 密钥服务器提供的公钥会不定期轮换。为确保可以继续按预期验证 SSV 回调,请勿使公钥的缓存时间超过 24 小时。 Google 预计您的服务器会针对 SSV 回调返回原创 2020-05-22 21:51:38 · 10875 阅读 · 1 评论