- 博客(6)
- 收藏
- 关注
原创 2021-04-21
批量移动当前目录下所有子文件夹下的所有图片(自己用) import os import shutil path='/home/student/liuran/project/File/data/Train/CP' new_path='/home/student/liuran/project/File/data/Train/CP' for root ,dirs,files in os.walk(path): for i in range(len(files)): if (files[i
2021-04-21 19:56:27
148
原创 2021-01-12
007 整数反转 给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。 class Solution: def reverse(self, x: int) -> int: s = str(x) if s[0]=='-': x = int('-'+s[1:][::-1]) else: x = int(s[::-1]) return x if -2**31<x
2021-01-12 19:09:55
165
原创 2021-01-11
组队学习leetcode精选50题 task01 2.给出两个非空的链表用来表示两个非负的整数。其中,它们各自的位数是按照逆序的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。 假设除了数字 0 之外,这两个数都不会以 0 开头。 题解思路: 1.使用 ***i***来保存两个链表的数字相加产生的进位(链表数字位数从小到大); 2.当前位的值为(l1.val + l2.val + i)%10; 3.进位值为(l1.val + l2.v
2021-01-11 20:18:27
160
原创 png转mnist格式数据 出现error:OverflowError: unsigned byte integer is greater than maximum
大神地址:https://github.com/gskielian/JPG-PNG-to-MNIST-NN-Format 一般在`Traceback (most recent call last): File “convert-images-to-mnist-format.py”, line 47, in header.append(int(‘0x’+hexval[2:][2:],16)) OverflowError: unsigned byte integer is greater than maxim
2020-12-03 14:26:41
989
1
原创 (opencv4.2.0) cv2.error: OpenCV(4.2.0)(-215:Assertion failed) !samples.empty() in function ‘train‘
@[TOC]((opencv4.2.0)cv2.error: OpenCV(4.2.0)(-215:Assertion failed)!samples.empty() in function ‘train’) 使用SVM进行训练时出现这种错误,看一下代码里的路径是否准确,目标文件夹下的数据是否为空。
2020-11-24 16:05:28
1014
原创 关于ffmpeg报错 module ‘ffmpeg‘ has no attribute “probe“**
关于ffmpeg报错 module ‘ffmpeg’ has notattribute "probe" 解决方案一:卸载所有ffmpeg,利用命令:sudo apt install ffmpeg。(这个我试过了,我的不行) 解决方案二:利用pip3命令,输入命令:pip3 install ffmpeg-probe(解决!!!) Tank ...
2020-06-18 10:12:10
8687
8
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人