python
乐清sss
立志成为大师的萌妹子!
展开
-
Hugging Face Model Hub 预训练模型清华镜像使用
今天遇到一个错误:OSError: Couldn’t reach server at ‘https://s3.amazonaws.com/models.huggingface.co/bert/roberta-large-config.json’ to download configuration file or configuration file is not a valid JSON file. Please check network or file content here: /users/yqs原创 2021-06-04 15:17:16 · 7725 阅读 · 5 评论 -
使用matplotlib画直方图和概率密度图
害,折腾了我好久1. 直方图和概率密度图叠加#python 画概率密度图#-*- coding: utf-8 -*-import matplotlib.pyplot as pltimport numpy as npimport seaborn as sns# 1)准备数据lengths = []with open("D:/length_analysis.tsv","r") as f: for l in f: if int(l.split('\t')[2])>原创 2020-10-07 16:49:07 · 12751 阅读 · 0 评论 -
spacy en_core_web_sm/md/lg三种model有什么区别
sm/md/lg表示模型的大小(small, medium, large)差别在于准确率和加载时间The en_core_web_lg (788 MB) compared to en_core_web_sm (10 MB):LAS: 90.07% vs 89.66%POS: 96.98% vs 96.78%UAS: 91.83% vs 91.53%NER F-score: 86.62% vs 85.86%NER precision: 87.03% vs 86.33%NER recall: 8原创 2020-06-30 17:50:09 · 2230 阅读 · 0 评论 -
Matplotlib画图内置样式
内置样式# 全部内置样式from matplotlib import styleprint(plt.style.available)‘bmh’, ‘classic’, ‘dark_background’, ‘fast’, ‘fivethirtyeight’, ‘ggplot’, ‘grayscale’, ‘seaborn-bright’, ‘seaborn-muted’, ‘seabo...原创 2020-03-17 22:18:02 · 1541 阅读 · 6 评论 -
Python知识补全
1. os.mkdir()与os.makedirs()的区别及用法path_01 = 'Test\\path_01\\path_02\\path_03'os.mkdir()创建路径中的最后一级目录,即:只创建path_03目录,而如果之前的目录不存在并且也需要创建的话,就会报错。os.makedirs()创建多层目录,即:Test,path_01,path_02,path_03如果都不存在的...原创 2019-12-15 22:59:34 · 152 阅读 · 0 评论 -
ModuleNotFoundError: No module named ''
很弱智的问题,记录一下,当使用 pycharm 执行报这个错误时,包目录下添加__init__.py文件即可,但是在命令行执行时还是报错,因为没有把调用模块的路径加入到程序中,这使需要手动sys.path.append(路径)import sys,osx = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))# sys.pa...原创 2019-12-10 10:57:26 · 952 阅读 · 0 评论 -
mysql commit报错
记录一下,折腾了半个小时,终于没bug了还没真正运行数据就报db.commit出错,那肯定是insert或其他改变数据库的语句有语法错误在使用dict数据出入数据库时,使用d.get[‘key’]的形式,避免d[‘key’]...原创 2019-11-18 20:29:18 · 624 阅读 · 0 评论