会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Tomorrow
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
10
11
12
13
14
15
16
17
18
···
73
下一页
2022年3月18日
python换行
摘要: 1.反斜杠. \ a = 1 b = 2 c = a +\ b print(c) longstring = 'this is a long long long long long long long \ string' print(longstring) 2.三引号 longstring1 = ''
阅读全文
posted @ 2022-03-18 13:34 Tomorrow1126
阅读(483)
评论(0)
推荐(0)
2022年3月17日
解压tar.gz文件
摘要: tar -zxvf xxxx.tar.gz
阅读全文
posted @ 2022-03-17 13:43 Tomorrow1126
阅读(43)
评论(0)
推荐(0)
pytorch数据集和数据处理部分dataset自定义、继承
摘要: https://blog.csdn.net/zhenaoxi1077/article/details/80953227 一、数据加载 在Pytorch 中,数据加载可以通过自己定义的数据集对象来实现。数据集对象被抽象为Dataset类,实现自己定义的数据集需要继承Dataset,并实现两个Pytho
阅读全文
posted @ 2022-03-17 10:31 Tomorrow1126
阅读(451)
评论(0)
推荐(1)
2022年3月16日
linux编写脚本执行.py文件
摘要: 链接:https://www.jianshu.com/p/b1a8264c2043 1.vim rt.sh # 直接写文件的名称.sh 就可以进入生成.sh文件并编辑 2.i进入编辑模式 esc结束编辑模式 :wq保存编辑 3. 编辑.sh脚本必须的,指定命令解释器,此句必须放在第一行 其中 #!
阅读全文
posted @ 2022-03-16 19:35 Tomorrow1126
阅读(315)
评论(0)
推荐(0)
python format格式化字符串、格式化数字
摘要: 数字格式化 https://www.runoob.com/python/att-string-format.html 下表展示了 str.format() 格式化数字的多种方法: >>> print("{:.2f}".format(3.1415926)) 3.14 '{:b}'.format(11)
阅读全文
posted @ 2022-03-16 19:12 Tomorrow1126
阅读(108)
评论(0)
推荐(0)
json学习笔记
摘要: 一、JSON 语法规则 JSON 语法是 JavaScript 对象表示语法的子集。 数据在名称/值对中 数据由逗号分隔 大括号 {} 保存对象 中括号 [] 保存数组,数组可以包含多个对象 二、JSON 对象 JSON 对象在大括号 {} 中书写: {key1 : value1, key2 : v
阅读全文
posted @ 2022-03-16 19:09 Tomorrow1126
阅读(36)
评论(0)
推荐(0)
python除法、地板除法、取余
摘要: Python中分为3种除法: 1./ 2.% 3.//地板除,-5//-2=2,-1//-5=0,2//3=0,3//2=1 https://blog.csdn.net/TeFuirnever/article/details/89046679
阅读全文
posted @ 2022-03-16 18:57 Tomorrow1126
阅读(308)
评论(0)
推荐(0)
python range函数
摘要: python2.x range() 函数可创建一个整数列表,一般用在 for 循环中。 注意:Python3 range() 返回的是一个可迭代对象(类型是对象),而不是列表类型, 所以打印的时候不会打印列表 加上list()可以返回一个列表 >>> print([range(10)]) [rang
阅读全文
posted @ 2022-03-16 18:53 Tomorrow1126
阅读(129)
评论(0)
推荐(0)
np.zeros np.randint np.multiply
摘要: 1.np.zeros()该函数返回一个ndarray。输出数组是具有指定形状, dtype, order并包含零的数组。 import numpy as np a=np.zeros(6,) a 输出 array([0., 0., 0., 0., 0., 0.]) 2. 函数功能:Return ran
阅读全文
posted @ 2022-03-16 17:44 Tomorrow1126
阅读(159)
评论(0)
推荐(0)
x.strip().split(' ')
摘要: split(' ')返回以空格分割后的字符串列表 strip()去除首尾的空格 eg. x=" frames/video_1 num_frames label_1 " tmp = x.strip().split(' ') print(tmp) # result:['frames/video_1',
阅读全文
posted @ 2022-03-16 16:01 Tomorrow1126
阅读(294)
评论(0)
推荐(0)
上一页
1
···
10
11
12
13
14
15
16
17
18
···
73
下一页
公告