上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要: ``` # 对象类型 type(object) # 对象属性及方法 dir(object) # 对象属性和属性值的字典 vars(object) # 方法的参数名 function.__code__.co_varnames # 方法的参数个数 function.__code__.co_argcoun 阅读全文
posted @ 2021-10-20 17:02 太晓 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 1.修改npm的镜像源到淘宝 ``` npm config set registry https://registry.npm.taobao.org ``` 2.查看镜像源 ``` npm config get registry ``` 3.创建react项目 ``` npx create-reac 阅读全文
posted @ 2021-08-18 10:36 太晓 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 下载 国内镜像 https://registry.npmmirror.com/binary.html?path=git-for-windows/ 官网 https://git-scm.com/download/win 机器配置 每台电脑一次就行 生成密钥 ssh-keygen 生成后添加到网站htt 阅读全文
posted @ 2021-07-22 10:31 太晓 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 说明: 为信号连接槽函数, 在信号激发时实现对槽函数的调用. 作用: 一个信号可以绑定多个槽函数, 实现一对多的激发效果. 信号也可以连接其他的信号. 跨线程时, 必须使用信号进行参数传递. from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot 阅读全文
posted @ 2021-07-15 15:28 太晓 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 首页 | Tampermonkey https://www.tampermonkey.net/index.php?locale=zh_CN ``` // ==UserScript== // @name 提取淘宝SKU // @namespace http://tampermonkey.net/ // 阅读全文
posted @ 2021-06-11 14:41 太晓 阅读(304) 评论(0) 推荐(0) 编辑
摘要: // ==UserScript== // @name 提取天猫SKU // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author 丛兴龙 / 阅读全文
posted @ 2021-05-18 14:42 太晓 阅读(372) 评论(0) 推荐(0) 编辑
摘要: from PIL import Image path = './test.png' # 加载图片 im = Image.open(path) # 显示图片 im.show() # 图片大小 w, h = im.size x, y = 0, 0 box = (x*w, y*h, (x+1)*w, (y 阅读全文
posted @ 2021-05-14 16:25 太晓 阅读(485) 评论(0) 推荐(0) 编辑
摘要: path = './test/' # 创建路径 def mkdir(path): if not os.path.exists(path): os.makedirs(path) # 查文件列表 os.listdir(path) # 判断是否为文件夹 os.path.isdir(path) # 判断是否 阅读全文
posted @ 2021-05-14 15:04 太晓 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 生成值范围在[0,1]的张量 a = torch.rand(5, 2, 3) 元素总数 a.numel() # 30 获取张量的形状 a.size() a.shape 取值(不参与计算) a.data # 不安全 a.detach() # 推荐 平均值,最大值,最小值 a.detach().mean 阅读全文
posted @ 2021-05-02 15:34 太晓 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 图片保存工具 # 图片张数 N = 16 # 通道数 C = 3 # 高度 H = 64 # 宽度 W = 32 image = torch.rand(N,C,H,W) # 路径 path = './' save_image(image, path) 阅读全文
posted @ 2021-05-02 15:25 太晓 阅读(2059) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页