![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
E.K.江湖念书人
这个作者很懒,什么都没留下…
展开
-
Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when
Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper_CUDA__index_select)原创 2023-04-26 14:37:49 · 278 阅读 · 0 评论 -
TypeError: TextEncodeInput must be Union[TextInputSequence, Tuple[InputSequence, InputSequence]]
当我训练数据是报这个错误经过检查发现训练数据得list里存在none,删除错误 数据就好。原创 2023-04-18 10:35:19 · 670 阅读 · 0 评论 -
IndentationError: expected an indented block
IndentationError: expected an indented block原创 2023-04-12 10:47:52 · 156 阅读 · 0 评论 -
提取字符串中单个字符的所有索引下标
提取字符串中某个索引的所有下标原创 2023-04-04 14:48:36 · 126 阅读 · 0 评论 -
UnicodeEncodeError: ‘gbk‘ codec can‘t encode character ‘\u2022‘ in position 178: illegal multibyte s
with open(file, "w", encoding="gbk",errors='ignore') as f: json.dump(data, f, ensure_ascii=False, indent=4)原创 2023-03-17 10:52:12 · 770 阅读 · 0 评论 -
国内省份城市名单
城市省份名单原创 2023-02-28 10:37:00 · 174 阅读 · 0 评论 -
国家名单列表
国家名单原创 2023-02-28 10:29:13 · 270 阅读 · 0 评论 -
列表删除元素的方法
列变输出元素原创 2023-02-24 23:09:02 · 8192 阅读 · 0 评论 -
字符串反转
简单的字符串反转原创 2023-02-24 10:10:22 · 30 阅读 · 0 评论 -
scan 查询设置size 错误时报错
TypeError: elasticsearch.client.Elasticsearch.search() got multiple values for keyword argument 'size'原创 2023-02-23 18:15:25 · 65 阅读 · 0 评论 -
对dataframe的某个字段进行排名并计算分值
dataframe 中某个字段排名并计算分值原创 2023-02-22 10:22:49 · 184 阅读 · 0 评论 -
二分法的简单代码
二分法简单代码原创 2023-02-19 17:32:09 · 33 阅读 · 0 评论