摘要: 一、安装Anaconda 首先需要下载Anaconda的安装包,可以在官网上下载:https://www.anaconda.com/products/individual 根据自己的操作系统选择合适的版本,一般选择Python 3.x版本的即可。 安装过程中可以选择是否将Anaconda添加到环境变 阅读全文
posted @ 2023-03-01 01:31 LittleDuo 阅读(174) 评论(0) 推荐(0)
摘要: 一、查看视频文件信息 ffprobe input.mp4 二、截取视频 将名为 input.mp4 的视频文件,无损截取从第 10 秒开始、持续 20 秒的部分,并保存为名为 output.mp4 的新文件 ffmpeg -i input.mp4 -ss 00:00:10 -t 00:00:20 - 阅读全文
posted @ 2023-03-01 00:17 LittleDuo 阅读(545) 评论(0) 推荐(0)
摘要: 1.报错日志 (base) C:\Users\Admin>conda create -n faceswap python=3.7 Collecting package metadata (current_repodata.json): failed UnavailableInvalidChannel 阅读全文
posted @ 2023-02-28 20:12 LittleDuo 阅读(7570) 评论(0) 推荐(0)
摘要: import re string = 'var url = "https://cdn77-vid.xnxx-cdn.com/2a261b121c8e862b-1/hls.m3u8dasda"' regular_one = re.compile(r'[a-zA-Z]+://[^\s]*.m3u8') 阅读全文
posted @ 2023-02-28 14:35 LittleDuo 阅读(162) 评论(0) 推荐(0)
摘要: 递归转换dict对象key的大小写 # -*- coding: utf-8 -*- """ @Time : 2021/7/20 11:34 @Author : Little Duo @File : Tools.py """ def changeDictKey(old_dict, keycase='l 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(24) 评论(0) 推荐(0)
摘要: BeautifulSoup判断标签属性是否存在 方法一 python代码 from bs4 import BeautifulSoup with open('hote.html', encoding='utf8', mode='r') as f: html = f.read() soup = Beau 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(1005) 评论(0) 推荐(1)
摘要: Crypt密码加密 from passlib.context import CryptContext crypt_context = CryptContext(schemes=['bcrypt'], deprecated='auto') def get_password_hash(password: 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(184) 评论(0) 推荐(0)
摘要: 自动生成数据 日期类 年月日 fake.date(pattern='%Y-%m-%d') 日期类 随机年份 fake.year() 日期类 随机年份 fake.year() 日期类 随机月份 fake.month() 日期类 随机几号 fake.day_of_month() 日期类 随机星期数 fa 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(333) 评论(0) 推荐(0)
摘要: 将一个列表切分成多个小列表 # -*- coding: utf-8 -*- """ @Time : 2021/7/20 11:34 @Author : Little Duo @File : Tools.py """ def splitList(oldList, sonListLen): """ 将一 阅读全文
posted @ 2023-02-28 14:33 LittleDuo 阅读(24) 评论(0) 推荐(0)
摘要: 读取yaml文件 # -*- coding: utf-8 -*- """ @Time : 2021/7/20 11:34 @Author : Little Duo @File : Tools.py """ import yaml def readYmlFile(yamlFilePath): """ 阅读全文
posted @ 2023-02-28 14:32 LittleDuo 阅读(79) 评论(0) 推荐(0)