- 博客(823)
- 资源 (36)
- 收藏
- 关注
转载 github action 下载docker镜像
fork 到自己的仓库中: https://github.com/wukongdaily/DockerTarBuilder。Run workflow,输入镜像名,点击 Run workflow。工作流完成后,下载文件。
2024-09-26 15:50:53 24
原创 docker-compose.yml entrypoint 和command 关系
entrypoint定义了容器启动时的主命令或脚本。command定义了传递给entrypoint的参数。如果同时定义了entrypoint和commandcommand的值会作为参数传递给entrypoint。理解这两者的关系和作用,可以帮助你更好地控制容器的启动行为。
2024-09-25 17:15:43 222
原创 yaml 中的列表,块格式、流格式
块格式:使用表示列表项,适用于多行列表项。流格式:使用[]表示列表项,适用于单行列表项。你可以根据需要选择合适的格式,并且可以在这两种格式之间进行转化。
2024-09-25 17:13:10 126
原创 gevent + flask 接口会卡住
对于 CPU 密集型任务,gevent和Flask的组合可能会遇到性能瓶颈。解决方案包括使用多进程、异步任务队列(如 Celery)或切换到更适合处理并发请求的异步框架(如 FastAPI)。通过这些方法,你可以更好地处理 CPU 密集型任务,避免性能瓶颈。
2024-09-20 13:24:34 777
原创 docker-squash镜像压缩
更适合在保留镜像层结构和元数据的情况下减小镜像大小。更适合在需要将容器文件系统打包成一个单一文件的情况下使用。根据你的需求选择合适的工具和方法。
2024-09-19 10:06:20 444
原创 docker-compose 部署 flink [支持pyflink]
privileged: true 这行配置启用了 taskmanager 容器的特权模式,使得容器内的进程可以获得几乎与主机上相同的权限。
2024-09-12 16:48:26 814
原创 transformers pipeline aggregation_strategy处理非BIO输出格式的模型
输出结果但是如果想使用simple聚合策略,会发现聚合失败原因就是simple聚合策略只支持BI聚合,不支持BIE聚合。
2024-08-13 18:07:07 319
转载 【题库】网络工程师
Windows操作系统在vista以后增加了一个功能,该功能对管理员组的用户起到一定限制,进而保护计算机安全,当我们需要运行一些重要的程序,只有管理员权限才能运行的程序时,该功能都会弹出一个对话框,对用户进行询问,当用户点击了同意按钮,程序才会以管理员或system权限运行,该功能是( )。这不仅是个人职业发展的需要,也是对社会负责的体现。在ACL 3002中配置规则,只允许该网段主机被动响应TCP握手的报文通过,并拒绝该网段的其他TCP报文通过,实现10.20.30.0/24网段地址的单向访问控制。
2024-08-12 23:03:49 381
原创 python 装饰器记录函数用时
nonlocal关键字只会影响直接上层函数的变量,而不会跨越多个层次。如果你需要修改更外层函数的变量,你需要在每一层都使用nonlocal声明。
2024-08-05 18:59:47 403
原创 docker 本地部署大模型(ollama)
此处由于挂载目录使用了相对路径,所以本地文件夹位于 /var/lib/docker/volumes/ollama而非运行命令的相对路径测试 api。
2024-07-08 12:23:33 1377
原创 python singledispatch 根据传入参数的类型自动选择相应的实现
装饰器提供了一种在 Python 中实现函数重载的方式。虽然 Python 本身不支持传统的函数重载(即在同一个作用域中定义多个同名函数),但。在上述示例中,process 函数根据传入参数的类型(int、str、list)选择不同的处理逻辑,这就是一种函数重载的形式。装饰器允许你定义一个函数,并根据传入参数的类型自动选择相应的实现。这在处理不同类型的输入时非常有用。允许你根据参数类型来选择不同的函数实现,从而实现类似重载的效果。下面是一个简单的示例,展示了如何使用。
2024-07-08 10:08:56 272
原创 python 判断 〇 是否在\u4e00-\u9fff范围内
在Unicode编码中,\u4e00-\u9fff范围代表了中日韩统一表意文字(CJK Unified Ideographs),这个范围包含了大部分的汉字。要判断一个字符是否在这个范围内,可以使用编程语言中的字符编码函数。函数获取该字符的Unicode编码,然后检查这个编码是否在\u4e00-\u9fff范围内。,并不在\u4e00-\u9fff范围内。以下是一个使用Python语言的示例代码,用于判断字符。实际上是一个中日韩兼容表意文字,其Unicode编码是。如果你需要判断的是其他字符,只需将。
2024-06-03 14:44:36 566 1
转载 BERT+CRF 设置不同的学习率
参考文献https://blog.csdn.net/qq_41554005/article/details/119898464https://kexue.fm/archives/7196https://arxiv.org/pdf/2301.02459https://blog.csdn.net/weixin_40959890/article/details/128973262
2024-05-30 16:59:51 124
原创 ner pipeline 超长文本处理
在使用transformer模型做NER识别时,通常会用上pipeline因此非常有必要对超长文本分批处理,每次处理部分,最后合并结果。
2024-05-20 20:44:21 281 1
原创 spacy NER 位置信息不考虑空格!!!
令人震惊和愤怒的是三次结果输出的位置是一样的!spacy居然先把空格过滤了再输出位置。虽然输出的实体位置不是真实的位置,但displacy渲染结果都是对的。
2024-05-14 18:37:06 179
原创 spacy.prefer_gpu 失败
参考:https://github.com/explosion/spaCy/discussions/10441。参考:https://spacy.io/usage。检查正确的spacy cuda版本。检查一下脚本是否正常执行。
2024-05-11 15:34:33 227
原创 使用规则进行命名实体识别(NER)
基于规则的NER方法是一种古老但依然有其价值的方法。它在特定场景下,如领域文本处理、实时应用等,具有不可替代的优势。然而,随着深度学习技术的发展,基于规则的NER方法正逐渐被基于模型的方法所取代。未来,如何将规则的方法与模型的方法相结合,发挥各自的优势,是一个值得探索的方向。
2024-05-10 11:10:47 1202
原创 BERT tokenizer 增加全角标点符号
bert 的词表,哪怕是 bert-base-chinese,对中文全角标点的支持不是很好。文件里把这些标点加上。直接替换 [unused] token 即可。因此在微调bert时,需要在。
2024-04-22 19:03:57 380
2024年3月杭州及周边小区挂牌价格
2024-03-22
利用 SIFT 实现图像拼接 python 代码
2021-01-01
python 使用摄像头监测心率
2020-10-14
知网爬虫.ipynb
2020-09-10
Python 图片中扭曲矩形的复原
2020-09-06
explore_data.ipynb
2020-05-20
Introduction to symmetry analysis (2002) [Brian J. Cantwell]
2020-01-07
Feedback Control in Systems Biology
2019-09-18
ICML 2019年 会议文章目录 (含论文下载链接)
2019-06-04
《应用非线性控制》【Slotine & Weiping Li 著】MIT经典教材
2019-01-05
Handbook of Matrices
2018-09-22
算法设计(英文文字版)by Jon_Kleinberg & Eva_Tardos
2018-09-19
icml 2018年 会议文章目录(含文章下载链接)
2018-09-17
link prediction in social networks: law of power distribution
2018-01-23
《Combinatorial Optimization》Cook, Cunningham, Pulleyblank, Schrijver
2017-11-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人