python
timertimer
这个作者很懒,什么都没留下…
展开
-
有效使用PyCharm
1、PyCharm忽略项目内的某些文件夹。选中要忽略的文件,右键忽略。原创 2022-08-26 22:04:59 · 199 阅读 · 0 评论 -
shutil库的使用
shutil原创 2022-06-29 16:12:31 · 326 阅读 · 0 评论 -
Excel使用
ex原创 2022-06-24 14:54:22 · 63 阅读 · 0 评论 -
pandas处理excel
读取原创 2022-06-24 14:48:56 · 191 阅读 · 0 评论 -
AttributeError: module ‘urllib‘ has no attribute ‘request‘
解决报错:原创 2022-06-24 11:38:01 · 142 阅读 · 0 评论 -
常用的numpy函数
numpy原创 2022-06-21 11:33:05 · 124 阅读 · 0 评论 -
urllib_glob
urllib.request.urlretrievefrom urllib.request import urlretrieve def cbk(a,b,c): '''''回调函数 @a:已经下载的数据块 @b:数据块的大小 @c:远程文件的大小 ''' per=100.0*a*b/c if per>100: per=100 print('%.2f%%' % per) url='h原创 2022-03-02 14:57:01 · 111 阅读 · 0 评论 -
crop face
使用关键点裁剪人脸x_min = min(pt2d[0,:])y_min = min(pt2d[1,:])x_max = max(pt2d[0,:])y_max = max(pt2d[1,:])center = np.array([x_max - (x_max - x_min) / 2.0, y_max - (y_max - y_min) / 2.0])old_size = (x_max - x_min + y_max - y_min) / 2size =原创 2022-02-14 16:45:40 · 1557 阅读 · 0 评论 -
python pytorch常用函数一览。
cv2cv2.resize()https://blog.csdn.net/wzhrsh/article/details/101630396cv2.resize(InputArray src, OutputArray dst, Size, fx, fy, interpolation)img = cv.imread('test.jpg')x, y = img.shape[0:2]cv.imshow('OriginalPicture', img)img_test1 = cv.resize(im原创 2022-02-08 10:59:20 · 114 阅读 · 0 评论 -
可视化网络
1.Graphviz 工具安装与测试:https://www.cnblogs.com/linfangnan/p/13210536.html原创 2022-02-07 14:58:13 · 290 阅读 · 0 评论 -
在conda虚拟环境中用pip安装包总是在base环境中的解决办法
进入虚拟环境后使用 python -m pip install ** 命令。PS: 使用pip show ***命令可以查看包的安装信息(版本和位置)。C:\Users\zhenqi.wei\Anaconda3\envs\py36\Scripts\pip.exe show>>>原创 2022-02-07 14:42:22 · 4379 阅读 · 1 评论 -
jupyter-notebook中没有虚拟环境的kernel
1、默认环境首先要在默认的环境下安装 nb_conda_kernels 包conda install nb_conda_kernels2、虚拟环境然后 需要在你需要切换的虚拟环境下安装 内核,命令如下conda install ipykernel原创 2022-01-26 17:45:58 · 1147 阅读 · 0 评论 -
@property装饰器
Python内置的@property装饰器可以把类的方法伪装成属性调用的方式。也就是本来是Foo.func()的调用方法,变成Foo.func的方式。class People: def __init__(self, name, age): self.__name = name self.__age = age @property def age(self): return self.__age @age.setter原创 2021-12-16 10:26:23 · 148 阅读 · 0 评论