Python使用技巧
文章平均质量分 64
大笨牛@
终身学习者
展开
-
【Python】字典
文章目录前言1. 字典方法1.1 clear1.2 copy1.3 fromkeys1.4 get1.5 items1.6 keys1.7 pop1.8 popitem1.9 setdefault1.10 update1.11 value2. 字典操作2.1 基础操作2.2 进阶操作前言1. 字典方法1.1 clear1.2 copy1.3 fromkeys1.4 get1.5 items1.6 keys1.7 pop1.8 popitem1.9 setdefault1.10 upd原创 2021-06-17 18:35:05 · 228 阅读 · 0 评论 -
Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work解决方法
前言在使用keras.utils.plot_model的时候,报了Failed to import pydot. You must install pydot and graphviz for pydotprint to work错误,百度了一圈终于解决了这个问题,特开一贴记录一下该问题的解决方法。解决方法Step1: 通过pip安装pydot-ng、graphvizpip install pydot-ngpip install graphviz注意,这里不推荐安装pydot。因为pydo原创 2021-04-26 17:46:22 · 1930 阅读 · 2 评论 -
【Python】使用urllib下载网络数据集
# -*- coding:utf-8 -*-import osimport sysimport tarfileimport urllibdef download_from_url(url,dir): file_name = url.split('/')[-1] file_path = os.path.join(dir,file_name) def print_progress(count, block_size, total_size): .转载 2021-04-06 19:47:01 · 459 阅读 · 0 评论