上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页
摘要: 一、依赖 首先检查python是否安装了wheel、setuptools包,没有则使用pip安装 pip install wheel --force-reinstall pip install setuptools --force-reinstall 二、准备文件 在create_package文件 阅读全文
posted @ 2022-09-29 18:54 eliwang 阅读(2267) 评论(0) 推荐(0) 编辑
摘要: 常见方法: 1、subprocess模块 subprocess.Popen() 方法【异步非阻塞】 示例1 import subprocess, os import time # 启动子进程(异步非阻塞) # process = subprocess.Popen("python test2.py") 阅读全文
posted @ 2022-09-21 12:37 eliwang 阅读(301) 评论(0) 推荐(0) 编辑
摘要: logger:日志器对象,可通过logging.getLogger()方法获取 handler:处理器对象,将日志信息输出到指定位置,可通过logger.addHandler()方法进行添加 formatter:格式器对象,输出格式化日志字符串 有时候同一个应用程序有不同的日志需求,比如将error 阅读全文
posted @ 2022-09-19 19:31 eliwang 阅读(1300) 评论(0) 推荐(0) 编辑
摘要: 一、表结构一致 允许插入重复数据 insert into 表1 select * from 表2; 不允许插入重复数据 insert into 表1 select * from 表2 where NOT EXISTS (select * from 表1 where 字段1 = 表2.字段1); 二、 阅读全文
posted @ 2022-06-22 12:21 eliwang 阅读(651) 评论(0) 推荐(0) 编辑
摘要: 只需要两步操作: 先执行: mr = db.runCommand({ "mapreduce" : "具体集合名", "map" : function() { for (var key in this) { emit(key, null); } }, "reduce" : function(key, 阅读全文
posted @ 2022-05-12 14:07 eliwang 阅读(1858) 评论(0) 推荐(0) 编辑
摘要: 代码: from selenium import webdriver # 导入webdriver def get_driver(): options = webdriver.ChromeOptions() # 设置谷歌浏览器的一些配置选项 options.add_argument('--window 阅读全文
posted @ 2022-05-12 13:48 eliwang 阅读(1123) 评论(0) 推荐(0) 编辑
摘要: 一、安装fitz(需要依赖PyMuPDF) pip install fitz pip install pymupdf 二、代码演示 import os import pytesseract import cv2 as cv import fitz from PIL import Image from 阅读全文
posted @ 2022-05-06 20:47 eliwang 阅读(16959) 评论(0) 推荐(0) 编辑
摘要: 1、需要使用到datetime模块中的 datetime,timedelta,timezone from datetime import datetime,timezone,timedelta # 导模块 2、datetme实例的replace()方法可以给实例添加时区信息tzinfo,并返回一个新 阅读全文
posted @ 2022-03-31 18:58 eliwang 阅读(2477) 评论(0) 推荐(0) 编辑
摘要: 使用连接查询来实现: update a inner join b on a.num = b.num set a.num_id = b.id; a表中的num字段和b中的num字段值相等,就将b表的id值写入a表的num_id字段 阅读全文
posted @ 2022-03-17 13:43 eliwang 阅读(1980) 评论(0) 推荐(0) 编辑
摘要: 一、出现这种问题的原因 游标连接单次最大超时时间为10分钟,单次从mongo服务端获取的数据为101条或者1~16M,如果在10分钟内,未处理完获取的所有数据,则会报异常 二、解决方案 1、设置 no_cursor_timeout=True,即游标连接永不超时,需要手动关闭游标(可以利用with上下 阅读全文
posted @ 2022-03-01 13:28 eliwang 阅读(1114) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页