上一页 1 2 3 4 5 6 ··· 40 下一页
摘要: package.json是用来识别项目并且处理项目的依赖关系的 { "name": "名",//包名字 "version": "1.0.0", //版本 "description": "描述", "main": "index.js",//入口文件 "scripts": {//指定运行脚本命令的 np 阅读全文
posted @ 2023-06-08 15:19 慕尘 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 需要使用python-docx (1)安装 python -m pip install python-docx (2)新建空白文档 from docx import Document document = Document() document.save('../data/123.docx') (3 阅读全文
posted @ 2022-10-20 13:28 慕尘 阅读(628) 评论(0) 推荐(0) 编辑
摘要: 1.读取docx 需要使用python-docx (1)安装python-docx python -m pip install python-docx (2)读取docx import docx document = docx.Document("D:/资料/me/AA.docx") #获取所有段落 阅读全文
posted @ 2022-10-20 11:52 慕尘 阅读(7083) 评论(0) 推荐(0) 编辑
摘要: 先安装 pillow 介绍 pip install pillow 将多张图片合成PDF from PIL import Image import os # 防止字符串乱码 os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8' def pic 阅读全文
posted @ 2022-09-20 14:16 慕尘 阅读(674) 评论(0) 推荐(0) 编辑
摘要: python中 os.listdir()方法用于返回指定的文件夹包含的文件或文件夹的名字的列表 import os path = "../data/materials/test/" path_list = os.listdir(path) print(path_list) 输出 ['1.jpg', 阅读全文
posted @ 2022-09-20 14:05 慕尘 阅读(455) 评论(0) 推荐(0) 编辑
摘要: 在使用mysql-connector进行数据插入时,出现 'MySQLConverter' object has no attribute '_navigablestring_to_mysql' 具体位置 ins_sql = "INSERT INTO {} (name,radical,stroke_ 阅读全文
posted @ 2022-09-17 01:09 慕尘 阅读(75) 评论(0) 推荐(0) 编辑
摘要: Tesseract-OCR已经安装 $ tesseract -v tesseract v5.2.0.20220708 leptonica-1.78.0 libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.5.3) : libpng 1.6.34 : libtiff 阅读全文
posted @ 2022-09-16 12:25 慕尘 阅读(865) 评论(0) 推荐(0) 编辑
摘要: 分片下载文件 import os os.makedirs('../data/materials/mp3/', exist_ok=True) File_PATH = '../data/materials/' def chunkDownload(url,dType): import requests r 阅读全文
posted @ 2022-09-16 12:00 慕尘 阅读(230) 评论(0) 推荐(0) 编辑
摘要: mysql-connector是一个Python模块 1.安装 python -m pip install mysql-connector 测试是否安装成功 import mysql.connector test数据库结构 2.建立数据库连接 db.py import mysql.connector 阅读全文
posted @ 2022-09-16 11:49 慕尘 阅读(1398) 评论(0) 推荐(0) 编辑
摘要: fork:github网站的操作,将开源项目复制一份到自己的仓库中 那fork的项目在原仓库更新后,如何同步呢? 1.查看远程仓库 $ git remote -v origin https://code.xxx.com/beibei/yyy.git (fetch) origin https://co 阅读全文
posted @ 2022-08-06 23:21 慕尘 阅读(968) 评论(0) 推荐(1) 编辑
摘要: 查找文本文件中重复的汉字,找到在所在行号 文本文件格式 大 小 多 少 前 后 左 …… text.py import os import re list = [] same=0 total=0 index = [] with open("1.txt", "r", encoding="utf-8") 阅读全文
posted @ 2022-04-15 16:44 慕尘 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 今天使用 idea 出现 Low Memory The IDE is running low on memory and this might affect performance. Please consider increasing available heap. 原因: IDE内存不足 解决方 阅读全文
posted @ 2021-11-30 21:22 慕尘 阅读(4950) 评论(0) 推荐(0) 编辑
摘要: XMind是基于Python实现,提供了对XMind思维导图进行创建、解析、更新的一站式解决方案 安装 xmind 模块 pip3 install xmind 示例: 创建文件 xmindTest.py (1)创建空白的xmind import xmind #加载包 # 1、如果指定的XMind文件 阅读全文
posted @ 2021-11-28 16:55 慕尘 阅读(3122) 评论(0) 推荐(0) 编辑
摘要: removebg是一个利用AI智能抠图的网站 提供了API 接口,可以直接调用并实现抠图,每月有50张免费 使用前需要去官网 https://www.remove.bg/ 注册并获取API KEY 安装removebg库 pip install removebg 安装pillow pip insta 阅读全文
posted @ 2021-07-12 00:49 慕尘 阅读(6448) 评论(0) 推荐(0) 编辑
摘要: PIL——Python Imaging Library是一个非常好用的图像处理库 在Python3中用Pillow代替PIL 安装 pip install pillow eg: 原图 in.jpg 显示图片 from PIL import Image old_image = "D:\\python\ 阅读全文
posted @ 2021-07-11 23:44 慕尘 阅读(303) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 40 下一页