摘要: 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 阅读(7627) 评论(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 阅读(200) 评论(0) 推荐(0)
摘要: Logger日志 # -*- coding: utf-8 -*- """ @Time : 2021/7/20 11:34 @Author : Little Duo @File : LoggerUtil.py """ import time import os import sys from logu 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(16) 评论(0) 推荐(0)
摘要: NAVICAT导出的SQL文件,分割为多个批量加载语句的SQL文件 # -*- coding: utf-8 -*- """ @Time : 2021/7/15 16:04 @Author : Little Duo @File : tools.py """ from tqdm import tqdm 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(94) 评论(0) 推荐(0)
摘要: oracle连接池 # -*- coding: utf-8 -*- """ @Time : 2021/7/20 11:34 @Author : Little Duo @File : OracleUtil.py """ import os import cx_Oracle from dbutils.p 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(204) 评论(0) 推荐(0)
摘要: 多线程执行SQL文件 # -*- coding: utf-8 -*- """ @Time : 2021/7/15 16:04 @Author : Little Duo @File : 多线程执行SQL文件.py """ # -*- coding: utf-8 -*- import queue imp 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(61) 评论(0) 推荐(0)
摘要: Python 获取windows桌面路径 # -*- coding: utf-8 -*- """ @Time : 2021/7/20 11:34 @Author : Little Duo @File : Tools.py """ import winreg def winDesktopPath(): 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(25) 评论(0) 推荐(0)
摘要: 去掉selenium驱动chrome driver时的cmd命令提示窗 打开python的安装目录 \Lib\site-packages\selenium\webdriver\common\service.py 找到约第76行: 把原来的 stdin=PIPE) 修改为 stdin=PIPE,cre 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(347) 评论(0) 推荐(0)
摘要: 时间戳与字符串之间的相互转换 # -*- coding: utf-8 -*- """ @Time : 2021/7/20 11:34 @Author : Little Duo @File : Tools.py """ import time from datetime import datetime 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(241) 评论(0) 推荐(0)
摘要: 提取多个列表的共同元素 # -*- coding: utf-8 -*- """ @Time : 2021/7/20 11:34 @Author : Little Duo @File : Tools.py """ def extraSameElemByMultipleLists(lst, *lsts) 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(13) 评论(0) 推荐(0)
摘要: 邮件发送 # -*- coding: utf-8 -*- """ @Time : 2021/9/6 10:10 @Author : Little Duo @File : MailSend.py """ import smtplib from email.mime.text import MIMETe 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(16) 评论(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 阅读(1016) 评论(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 阅读(192) 评论(0) 推荐(0)
摘要: 生成固定长度的字符串 # -*- coding: utf-8 -*- """ @Time : 2021/7/20 11:34 @Author : Little Duo @File : Tools.py """ def gererateFixedLengthString(number, length= 阅读全文
posted @ 2023-02-28 14:34 LittleDuo 阅读(15) 评论(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 阅读(28) 评论(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 阅读(346) 评论(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 阅读(27) 评论(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 阅读(82) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*- """ @Time : 2021/9/9 15:00 @Author : Little Duo @File : IDCardTools.py http://www.mca.gov.cn/article/sj/xzqh/1980/ """ import 阅读全文
posted @ 2023-02-28 14:31 LittleDuo 阅读(71) 评论(0) 推荐(0)
摘要: ORACLE解锁表 SELECT * FROM V$SESSION T1, V$LOCKED_OBJECT T2 WHERE T1.SID = T2.SESSION_ID; SELECT S.PROCESS, S.SID, S.SERIAL#, B.OBJECT_NAME, B.SUBOBJECT_ 阅读全文
posted @ 2023-02-28 13:24 LittleDuo 阅读(11) 评论(0) 推荐(0)
摘要: Oracle闪回功能之数据恢复 一、闪回 1.启用行移动功能 alter table table_name enable row movement ; 2.查询指定时间快照(默认是1440分钟,即24小时内的数据) select * from table_name as of timestamp t 阅读全文
posted @ 2023-02-28 13:24 LittleDuo 阅读(797) 评论(0) 推荐(0)
摘要: CentOS7 安装Oracle12c数据库 基本环境搭建 1、创建用户和组 添加oinstall、dba 组,创建oracle用户,设置oracle用户密码 [root@localhost ~]# groupadd oinstall [root@localhost ~]# groupadd dba 阅读全文
posted @ 2023-02-28 13:24 LittleDuo 阅读(870) 评论(0) 推荐(0)
摘要: ORA-02021:不允许对远程数据库进行DDL操作 解决方案 1、创建名称为 LZZG 的 DATABASE LINK,计划在对应的DBLINK下面创建表AC01备份表,执行以下SQL报错,提示 ORA-02021:不允许对远程数据库进行DDL操作 CREATE TABLE AC01_BAK@LZ 阅读全文
posted @ 2023-02-28 13:24 LittleDuo 阅读(183) 评论(0) 推荐(0)
摘要: 一、Oracle数据泵 1.创建目录 create directory [directory_name] as [os path]; create directory backup as 'c:\oracle\backup'; --windows create directory backup as 阅读全文
posted @ 2023-02-28 13:24 LittleDuo 阅读(4449) 评论(0) 推荐(0)
摘要: from hashlib import md5 def encrypt_md5(s): # 创建md5对象 new_md5 = md5() # 这里必须用encode()函数对字符串进行编码,不然会报 TypeError: Unicode-objects must be encoded before 阅读全文
posted @ 2023-02-28 00:42 LittleDuo 阅读(63) 评论(0) 推荐(0)
摘要: for i in range(1, 10): for j in range(1, i+1): # print(f'{i}×{j}={i*j}', end='\t') print('%d×%d=%d' % (j, i, i*j), end='\t') print() 输出结果 1×1=1 1×2=2 阅读全文
posted @ 2023-02-28 00:40 LittleDuo 阅读(29) 评论(0) 推荐(0)
摘要: # -*- encoding: utf-8 -*- """ @Author: Little duo @Time: 2023/2/27 21:51 @Contact: 1049041957@qq.com @License: (C)Copyright 2021-2022, Little duo """ 阅读全文
posted @ 2023-02-28 00:38 LittleDuo 阅读(44) 评论(0) 推荐(0)