文章分类 -  python

1 2 3 4 5 下一页

def greeting(name: str) -> str: return 'Hello ' + name
摘要:https://docs.python.org/3/library/typing.html 阅读全文

posted @ 2022-07-21 17:14 cdekelon 阅读(12) 评论(0) 推荐(0) 编辑

math tan tg
摘要:https://pythonexamples.org/python-math-tan/ https://stackoverflow.com/questions/10057854/inverse-of-tan-in-python-tan-1 阅读全文

posted @ 2022-05-01 16:09 cdekelon 阅读(5) 评论(0) 推荐(0) 编辑

AttributeError: module 'copy' has no attribute 'deepcopy'
摘要:AttributeError: module 'copy' has no attribute 'deepcopy' solution: do not have copy.py See https://stackoverflow.com/questions/51256948/attributeerro 阅读全文

posted @ 2022-03-02 17:39 cdekelon 阅读(561) 评论(0) 推荐(0) 编辑

converting a float to bytearray or int
摘要:https://stackoverflow.com/questions/36893206/converting-a-float-to-bytearray/36894176>>> value = 3.5e-43 >>> ba = bytearray(struct.pack("f", value)) > 阅读全文

posted @ 2021-12-22 10:19 cdekelon 阅读(17) 评论(0) 推荐(0) 编辑

tqdm
摘要:https://blog.csdn.net/qq_33472765/article/details/82940843 阅读全文

posted @ 2021-08-31 15:29 cdekelon 阅读(16) 评论(0) 推荐(0) 编辑

sum(1 for _ in f) how to count the total number of lines in a text file using python
摘要:https://stackoverflow.com/questions/19001402/how-to-count-the-total-number-of-lines-in-a-text-file-using-pythonwith open('data.txt') as f: print sum(1 阅读全文

posted @ 2021-08-19 16:27 cdekelon 阅读(80) 评论(0) 推荐(0) 编辑

resampling filter (7). Use Image.NEAREST (0), Image.LANCZOS (1), Image.BILINEAR (2), Image.BICUBIC (3), Image.BOX (4) or Image.HAMMING (5)
摘要:https://zhuanlan.zhihu.com/p/27504020 7.滤波器(filters):将多个输入像素映射为一个输出像素的几何操作 PIL提供了4种不同的采样滤波器: ① NEAREST:最近滤波。从输入图像中选取最近的像素作为输出像素。 ② BILINEAR:双线性内插滤波。在输 阅读全文

posted @ 2021-07-29 01:03 cdekelon 阅读(395) 评论(0) 推荐(0) 编辑

import importlib
摘要:>>> import importlib>>> importlib.import_module()Traceback (most recent call last): File "<stdin>", line 1, in <module>TypeError: import_module() miss 阅读全文

posted @ 2021-07-25 23:54 cdekelon 阅读(46) 评论(0) 推荐(0) 编辑

wandb
摘要:https://pypi.org/project/wandb/ 阅读全文

posted @ 2021-07-25 23:54 cdekelon 阅读(81) 评论(0) 推荐(0) 编辑

os.system如何传参
摘要:https://njafei.github.io/2017/05/26/os-system%E5%A6%82%E4%BD%95%E4%BC%A0%E5%8F%82/ import os import glob def getjpg (): for i in glob.glob("result/777 阅读全文

posted @ 2021-06-07 19:09 cdekelon 阅读(375) 评论(0) 推荐(0) 编辑

draw Contours
摘要:import os import cv2 import numpy as np image_file = "./random_1/xQGp1j2BUgXxrXrpTbDORg.jpg" #bbox = [1456,1922,18,47] #start=(bbox[0],bbox[1]) #end = 阅读全文

posted @ 2021-05-22 21:41 cdekelon 阅读(62) 评论(0) 推荐(0) 编辑

read a json file and modify some content
摘要:# cat resize_json.py # Python program to read # json file #https://www.geeksforgeeks.org/read-json-file-using-python/ import json import shutil target 阅读全文

posted @ 2021-05-22 21:37 cdekelon 阅读(34) 评论(0) 推荐(0) 编辑

python List 除以一个数
摘要:https://www.geocalculate.com/5357.html 阅读全文

posted @ 2021-05-21 18:28 cdekelon 阅读(449) 评论(0) 推荐(0) 编辑

Monkey patch python
摘要:https://www.geeksforgeeks.org/monkey-patching-in-python-dynamic-behavior/ # Monkey patchkeras_preprocessing.image.iterator.load_img = load_and_crop_im 阅读全文

posted @ 2021-05-19 19:07 cdekelon 阅读(26) 评论(0) 推荐(0) 编辑

from dot utils import from .utils import
摘要:from dot utils import https://docs.python.org/3/tutorial/modules.html https://stackoverflow.com/questions/16981921/relative-imports-in-python-3 阅读全文

posted @ 2021-05-19 19:03 cdekelon 阅读(58) 评论(0) 推荐(0) 编辑

load json
摘要:# Python program to read # json file #https://www.geeksforgeeks.org/read-json-file-using-python/ import json # JSON string a = '{"name": "Bob", "langu 阅读全文

posted @ 2021-05-14 15:50 cdekelon 阅读(61) 评论(0) 推荐(0) 编辑

python 搜索路径
摘要:https://blog.csdn.net/liang19890820/article/details/76219560 阅读全文

posted @ 2021-03-17 17:24 cdekelon 阅读(23) 评论(0) 推荐(0) 编辑

PIL opencv AttributeError: 'JpegImageFile' object has no attribute 'shape'
摘要:https://www.cnblogs.com/xiximayou/p/13390166.html 阅读全文

posted @ 2021-03-09 16:37 cdekelon 阅读(840) 评论(0) 推荐(0) 编辑

Zero-center by mean pixel rgb-->bgr keras_applications/imagenet_utils.py
摘要:https://github.com/keras-team/keras-applications/blob/master/keras_applications/imagenet_utils.py https://www.tutorialfor.com/questions-30132.htm http 阅读全文

posted @ 2021-02-10 15:45 cdekelon 阅读(63) 评论(0) 推荐(0) 编辑

ANTIALIAS antialias BILINEAR bilinear NEAREST nearset
摘要:return np.asarray(image.resize((w, h), Image.NEAREST)).transpose([2, 0, 1]).astype(np.float32).ravel() return np.asarray(image.resize((w, h), Image.AN 阅读全文

posted @ 2021-02-10 15:41 cdekelon 阅读(119) 评论(0) 推荐(0) 编辑

1 2 3 4 5 下一页
< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

导航

统计

点击右上角即可分享
微信分享提示