![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
ScapeCn
乐观开朗
展开
-
找不到或无法加载主类 org.antlr.v4.gui.TestRig
找不到或无法加载主类 org.antlr.v4.gui.TestRig原创 2022-10-24 00:58:10 · 1529 阅读 · 0 评论 -
docker uwsgi libpcre.so.1 报告缺失
uwsgi: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 遇到时,先确认是否安装,如果已安装仍出现该现象,可以 which uwsgi 查看路径,直接绝对路径进行调用启动。 ...原创 2021-10-09 09:27:54 · 261 阅读 · 0 评论 -
2021-10-08
redis 缓存淘汰策略LRU算法实现 Lru,就是将缓存中近期不经常使用的记录进行淘汰清理。 import collections class LRUCache(): def __init__(self, capacity): self.capacity = capacity self.dc = collections.OrderedDict() def get(self, key) ->原创 2021-10-08 10:40:04 · 49 阅读 · 0 评论 -
使用ConcurrentLogHandler解决多进程日志问题时,提示 KeyError: ‘formatters‘
使用python做项目的同学都知道,在项目中,多线程情景下写日志,使用logging模块是不好的,因为它不是线程安全的。幸运的是有大牛在logging的基础上加强了一下,就是这个ConcurrentLogHandler模块,目前更新到0.9.1版本。 初次使用时,根据https://pypi.org/project/ConcurrentLogHandler/0.9.1/ 里提供的案例,迅速写了一个...原创 2018-12-07 16:06:56 · 7094 阅读 · 2 评论