@kidultff · 2020年9月4日 Python利用非阻塞式UDP服务实现进程间通讯 前段时间有个需求,项目上有两个不同的进程,一个是API接口进程,一个是内部服务的进程。两个进程共用一个白名单数据库,内部服务进程要处理大量的数据(数亿级),每次处理一行数据都要检测一下是否在白名单内,因此要做一个白名单缓存来加速运行 ...
@kidultff · 2020年9月1日 解决使用pyinstaller打包moviepy项目后无法启动(xxx has no attribute xxx) 使用moviepy写了一个项目,准备打包成exe文件,使用了pyinstaller。打包后运行,却是这样的场景:初步观察错误类型应该是moviepy中少编译了一个库,pyinstaller根据import链字节码生成执行文件,如果项目中调用了,按理说应该是会编译进来的。阅读 ...
@kidultff · 2020年8月31日 解决moviepy报错This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect 方法:编辑/etc/ImageMagick-6/policy.xml注释掉这一行:
@kidultff · 2020年8月24日 Python使用管道实现进程间通讯 Server进程创建管道:import os # 定义管道名称 pipe_file = "/tmp/notify.pipe" # 如果之前就存在了,删掉它 if os.path.exists(pipe_file): os.remove(pipe_file) & ...
@kidultff · 2020年8月12日 Python使用infi.clickhouse_orm操作clickhouse数据库 clickhouse是yandex公司开发的一款数据库软件,其特点是允许分析及时更新的数据,性能较高。clickhouse_orm是一个Python库,可以用来操作clickhouse数据库。0、安装直接使用pip install infi.clickhouse_orm即可安装clickhouse_orm。1、快速上手cl ...