# python_common_code_collection
**Repository Path**: mjhapp/python_common_code_collection
## Basic Information
- **Project Name**: python_common_code_collection
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-03-13
- **Last Updated**: 2024-03-13
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# python_common_code_collection
收集经常用到的一些python代码
| 编号 | 文件名 | 作用 |
| ---- | ---- | ---- |
| 1 | src/远程连接服务器并执行指令.py | 用于远程连接服务器,并执行相关指令 |
| 2 | src/构建前缀树.py | 构建前缀树以查询 |
| 3 | src/读取docx、pdf文件.py | 读取docx、pdf文件 |
| 4 | src/models/transformers.py | transformers模型 |
| 5 | src/base64转图片并压缩.py | base64转图片并压缩 |
| 6 | src/生成公司logo.py | 生成公司logo |
| 7 | src/elasticsearch/python操作elasticsearch.py | python操作elasticsearch |
| 8 | src/装饰器封装try-except.py | 装饰器封装try-except |
| 9 | src/判断字符是否是中文、英文、数字.py | 判断字符是否是中文、英文、数字 |
| 10 | src/多进程多线程 | 多进程多线程 |
| 11 | src/打印运行时间装饰器 | 打印函数的运行时间|
| 12 | src/通用注意力.py | 通用的注意力|
| 13 | src/tokenization/ | 转换命名实体识别标签|
| 14 | src/中文分句.py | 对中文文本进行分句|
| 15 | src/根据地址获取经纬度.py | 根据地址获取经纬度|
| 16 | src/根据地址获取省-市-区-街道.py | 根据地址获取省-市-区-街道|
| 17 | src/获取天气信息.py | 获取天气信息|
| 18 | src/判断是否是工作日.py | 判断是否是工作日|
| 19 | src/多进程分词.py | 多进程分词|
| 20 | 隐马尔可夫模型 | 隐马尔可夫模型|
| 21 | 条件随机场 | 条件随机场|
| 22 | src/打印类的属性 | 打印类的属性|
| 23 | src/SpatialDropout1D | SpatialDropout1D |
| 24 | src/设计模式 | 设计模式 |
| 25 | src/基于前缀树+字典的实体识别 | 实体识别 |
| 26 | src/python操作mysql | python操作mysql |
| 27 | src/baidu_uie.py | 百度UIE信息抽取 |
| 28 | src/加载词向量.py | 加载词向量 |
| 29 | [src/词汇增强.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E8%AF%8D%E6%B1%87%E5%A2%9E%E5%BC%BA.py) | 词汇增强 |
| 30 | [src/文本相似度](https://github.com/taishan1994/python_common_code_collection/tree/main/src/%E6%96%87%E6%9C%AC%E7%9B%B8%E4%BC%BC%E5%BA%A6) | 文本相似度 |
| 31 | [src/模型部署](https://github.com/taishan1994/python_common_code_collection/tree/main/src/%E6%A8%A1%E5%9E%8B%E9%83%A8%E7%BD%B2) | 模型部署 |
| 32 | [src/python常用库小例子](https://github.com/taishan1994/python_common_code_collection/blob/main/src/Python%E5%B8%B8%E7%94%A8%E5%BA%93%E5%B0%8F%E4%BE%8B%E5%AD%90.md) | python常用库小例子 |
| 33 | [src/中英文混合实体识别数据预处理.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E4%B8%AD%E8%8B%B1%E6%B7%B7%E5%90%88%E5%AE%9E%E4%BD%93%E8%AF%86%E5%88%AB%E6%95%B0%E6%8D%AE%E9%A2%84%E5%A4%84%E7%90%86.py) | 中英文混合实体识别数据预处理 |
| 34 | [src/lcs.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/lcs.py) | 最长公共子串和最长公共子序列 |
| 35 | [src/中文分句3.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E4%B8%AD%E6%96%87%E5%88%86%E5%8F%A53.py) | 中文分句3 |
| 36 | [src/提取qq、微信、支付宝.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E6%8F%90%E5%8F%96qq%E3%80%81%E5%BE%AE%E4%BF%A1%E3%80%81%E6%94%AF%E4%BB%98%E5%AE%9D.py) | 提取qq、微信、支付宝 |
| 37 | [src/提取车牌号.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E6%8F%90%E5%8F%96%E8%BD%A6%E7%89%8C%E5%8F%B7.py) | 提取车牌号 |
| 38 | [src/loguru打印日志.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/loguru%E6%89%93%E5%8D%B0%E6%97%A5%E5%BF%97.py) | loguru打印日志 |
| 39 | [src/test_flask/](https://github.com/taishan1994/python_common_code_collection/tree/main/src/test_flask) | gunicorn+gevent+flask部署 |
| 40 | [src/计算词向量间的相似度/](https://github.com/taishan1994/python_common_code_collection/tree/main/src/%E8%AE%A1%E7%AE%97%E8%AF%8D%E5%90%91%E9%87%8F%E9%97%B4%E7%9A%84%E7%9B%B8%E4%BC%BC%E5%BA%A6) | 计算词向量间的相似度 |
| 41 | [src/BM25/](https://github.com/taishan1994/python_common_code_collection/tree/main/src/BM25) | 使用BM25进行检索 |
| 42 | [src/losses/](https://github.com/taishan1994/python_common_code_collection/tree/main/src/losses) | 常用损失函数,目前包含focal_loss |
| 43 | [src/mask/](https://github.com/taishan1994/python_common_code_collection/tree/main/src/mask) | 常用mask的代码 |
| 44 | [src/xixiNLP/](https://github.com/taishan1994/python_common_code_collection/tree/main/src/xixiNLP) | 一个python项目的基本架构 |
| 45 | [src/test_pypi/](https://github.com/taishan1994/python_common_code_collection/tree/main/src/test_pypi/xixiNLP) | 打包自己的python库发布到pypi |
| 46 | [src/test_fastapi/](https://github.com/taishan1994/python_common_code_collection/tree/main/src/test_fastapi) | fastapi接口 |
| 47 | [src/interface/](https://github.com/taishan1994/python_common_code_collection/tree/main/src/interface) | wrk接口性能测试和service_steamer加速GPU推理 |
| 48 | [src/英文实体识别标签重整.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E8%8B%B1%E6%96%87%E5%AE%9E%E4%BD%93%E8%AF%86%E5%88%AB%E6%A0%87%E7%AD%BE%E9%87%8D%E6%95%B4.py) | 英文实体识别标签重整 |
| 49 | [src/使用拼音嵌入.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E4%BD%BF%E7%94%A8%E6%8B%BC%E9%9F%B3%E5%B5%8C%E5%85%A5.py) | 使用拼音嵌入 |
| 50 | [src/使用字形嵌入.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E4%BD%BF%E7%94%A8%E5%AD%97%E5%BD%A2%E5%B5%8C%E5%85%A5.py) | 使用字形嵌入 |
| 51 | [src/根据字体生成汉字.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E6%A0%B9%E6%8D%AE%E5%AD%97%E4%BD%93%E7%94%9F%E6%88%90%E6%B1%89%E5%AD%97.py) | 根据字体生成汉字 |
| 52 | [src/捕获具体的异常信息.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E6%8D%95%E8%8E%B7%E5%85%B7%E4%BD%93%E7%9A%84%E5%BC%82%E5%B8%B8%E4%BF%A1%E6%81%AF.py) | 捕获具体的类型信息 |
| 53 | [src/logging记录日志.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/logging%E8%AE%B0%E5%BD%95%E6%97%A5%E5%BF%97.py) | logging记录日志 |
| 54 | [src/doccano.split.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/doccano_split.py) | doccano标注好的数据分句 |
| 55 | [src/play_with_vector](https://github.com/taishan1994/python_common_code_collection/tree/main/src/play_with_vector) | 玩转词向量 |
| 56 | [src/segment.py](https://github.com/taishan1994/python_common_code_collection/blob/main/src/segment.py) | 玩转分词 |
| 57 | [chinese2digits.py](https://github.com/Wall-ee/chinese2digits/blob/master/Python/chinese2digits/chinese2digits.py) | 金额标准化为阿拉伯数字 |
| 58 | [gradio基本实例](https://github.com/taishan1994/python_common_code_collection/blob/main/src/gradio%E5%9F%BA%E6%9C%AC%E5%AE%9E%E4%BE%8B.md) | gradio基本实例 |
| 59 | [huggingface基本模块](https://github.com/taishan1994/python_common_code_collection/blob/main/src/huggingface) | huggingface基本模块 |
| 60 | [stanza公司名实体识别](https://github.com/taishan1994/python_common_code_collection/blob/main/src/stanza%E8%BF%9B%E8%A1%8C%E5%85%AC%E5%8F%B8%E5%90%8D%E5%AE%9E%E4%BD%93%E8%AF%86%E5%88%AB.md) | stanza公司名实体识别 |
| 70 | [sql相关](https://github.com/taishan1994/python_common_code_collection/blob/main/src/sql.md) | sql相关 |
| 71 | [自定义argparse](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E8%87%AA%E5%AE%9A%E4%B9%89argparse.md) | 自定义argparse |
| 72 | [生成手机号、MEI、IMSI、MAC](https://github.com/taishan1994/python_common_code_collection/blob/main/src/%E7%94%9F%E6%88%90%E6%89%8B%E6%9C%BA%E5%8F%B7%E3%80%81IMEI%E3%80%81IMSI%E3%80%81MAC.py) | 生成手机号、MEI、IMSI、MAC |
| 73 | [数据加载](https://github.com/taishan1994/python_common_code_collection/tree/main/src/data_loader) | 数据加载 |