11 2020 档案

摘要:class DFAFilter(): def __init__(self): self.keyword_chains = {} self.delimit = '\x00' def add(self, keyword): keyword = keyword.lower() chars = keywor 阅读全文
posted @ 2020-11-12 09:40 关不上门 阅读(174) 评论(0) 推荐(0)
摘要:import time import uuid import redis from threading import Thread redis_client = redis.Redis(host='localhost', port=6379) # 获取一个锁 def acquicre_lock(lo 阅读全文
posted @ 2020-11-11 15:20 关不上门 阅读(89) 评论(0) 推荐(0)
摘要:import difflib def string_similar(s1, s2): return difflib.SequenceMatcher(None, s1, s2).quick_ratio() print(string_similar('多少钱?', '钱还剩下多少'])) print(s 阅读全文
posted @ 2020-11-09 14:17 关不上门 阅读(258) 评论(0) 推荐(0)