合集-python

摘要:django model 分表管理 阅读全文
posted @ 2023-07-07 08:59 冀未然
摘要:从中国期货监控中心爬取每日交易数据 阅读全文
posted @ 2023-07-11 14:15 冀未然
摘要:通过百度云 获得 图片验证码 阅读全文
posted @ 2023-07-11 14:23 冀未然
摘要:利用python进行图片验证码识别 阅读全文
posted @ 2023-07-11 14:30 冀未然
摘要:python获取网页中表格数据 阅读全文
posted @ 2023-07-11 14:37 冀未然
摘要:python打印 阅读全文
posted @ 2023-07-11 14:39 冀未然
摘要:爬取售汇汇率 阅读全文
posted @ 2023-07-11 15:03 冀未然
摘要:原生数据库查询 阅读全文
posted @ 2023-07-11 15:06 冀未然
摘要:python 常用快捷键 阅读全文
posted @ 2023-07-12 10:45 冀未然
摘要:python常用国内镜像源 阅读全文
posted @ 2023-07-12 10:46 冀未然
摘要:PyInstaller打包exe 阅读全文
posted @ 2023-07-12 10:57 冀未然
摘要:爬取哔哩哔哩视频 阅读全文
posted @ 2023-07-12 12:02 冀未然
摘要:PYTHON 函数 阅读全文
posted @ 2023-07-12 16:45 冀未然
摘要:PyQt,PySide2中嵌入Matplotlib图像 阅读全文
posted @ 2023-07-12 15:19 冀未然
摘要:pandas实用手册 阅读全文
posted @ 2023-07-12 15:52 冀未然
该文被密码保护。
posted @ 2023-07-12 16:26 冀未然
摘要:pyside中显示pyecharts图形 阅读全文
posted @ 2023-07-12 16:30 冀未然
摘要:python实现12306自动购票脚本 阅读全文
posted @ 2023-07-13 16:41 冀未然
摘要:pandasTrans 阅读全文
posted @ 2023-07-13 16:54 冀未然
摘要:Python如何实现自动生成报表并以邮件发送 阅读全文
posted @ 2023-07-14 15:31 冀未然
摘要: **多个word 文档 转化成 PDF 文件, 最后合并成一个PDF文件** ``` import os from win32com import client from PyPDF2 import PdfMerger # 使用PdfMerger def wordToPdf(folder): # 阅读全文
posted @ 2023-09-05 14:02 冀未然
摘要:# python 打印功能测试程序 from CDHTMLTable import HTMLTable from PySide2.QtCore import QRect, QPoint, QSize, Qt from PySide2.QtGui import QImage, QIcon, QPixm 阅读全文
posted @ 2023-09-22 10:25 冀未然
摘要:` from CDHTMLTable import HTMLTable from PySide2.QtCore import QRect, QPoint, QSize, Qt from PySide2.QtGui import QImage, QIcon, QPixmap, QPainter, QT 阅读全文
posted @ 2023-11-09 08:37 冀未然
摘要:## 随机生成验证码 from PIL import Image, ImageDraw, ImageFont import random ## 随机颜色1(背景颜色): def rndColor(): return (random.randint(170, 250), random.randint( 阅读全文
posted @ 2023-11-10 09:35 冀未然
摘要:""" 查询 某年所有非工作日期 """ import holidays import datetime import requests import json import pandas as pd pd.set_option('display.width', None) pd.set_optio 阅读全文
posted @ 2023-11-13 16:53 冀未然
摘要:map()函数会根据提供的对指定的可迭代对象的每个元素进行运算,并将返回运算结果的迭代器。 先去将几个例子,这样比较通俗易懂。 eg 1:输入数据型 a=map(int,input().split()) 输入:12 13 结果为: 分析:map(int,input().split()) 将输入的值( 阅读全文
posted @ 2023-11-14 16:39 冀未然
摘要:""" python 读取pdf中的表格 社保信息 数据 """ import pandas as pd import pdfplumber pd.set_option('display.width', None) pd.set_option('display.max_rows', None) pd 阅读全文
posted @ 2023-11-15 16:52 冀未然
摘要:""" python 读取 社保年度对账单 pdf 数据 """ import pandas as pd import pdfplumber pd.set_option('display.width', None) pd.set_option('display.max_rows', None) pd 阅读全文
posted @ 2023-11-16 09:30 冀未然
摘要:前言 本文对使用python读取pdf、word、excel、ppt、csv、txt等常用文件,并提取所有文本的方法进行分享和使用总结。 可以读取不同文件的库和方法当然不止下面分享的这些,本文的代码主要目标都是:方便提取文件中所有文本的实现方式。 这些库的更多使用方法,请到官方文档中查阅。 读取PD 阅读全文
posted @ 2023-11-16 10:27 冀未然
摘要:__author__ = 'Administrator' # _*_ coding: UTF-8 _*_ # @Create by gengyu # @Create Time :2021/12/4 # @File_name : exists # wn.run/https:// import os,s 阅读全文
posted @ 2023-11-17 15:03 冀未然
摘要:python 数据类型判断 #encoding=utf-8 l = [1,2,"s",[1,23],{1:2},(1,2),set([1,2]),"b",-2] d = {"int":0,"str":0,"list":0,"tuple":0,"set":0,"dict":0,"complex":0} 阅读全文
posted @ 2023-11-17 15:11 冀未然
摘要:#!/usr/bin/env python # -*- coding:utf-8 -*- # @Time:2022/3/29 10:06 # @Author: # @File:PngToJpg.py # @Sofeware :PyCharm from PIL import Image lena = 阅读全文
posted @ 2023-11-20 08:50 冀未然
摘要:多张图片 合并 到 一个word文档 import aspose.words as aw # Create a document doc = aw.Document() builder = aw.DocumentBuilder(doc) # Insert image for i in range(5 阅读全文
posted @ 2023-12-19 11:31 冀未然
摘要:Python生成随机验证码,需要使用PIL模块. 安装: pip3 install pillow 基本使用 1. 创建图片 from PIL import Image img = Image.new(mode='RGB', size=(120, 30), color=(255, 255, 255)) 阅读全文
posted @ 2024-01-23 10:37 冀未然
摘要:python获取ie选项中设置的代理 import winreg def getproxy(): xpath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings" try: key = winreg.OpenKey(winre 阅读全文
posted @ 2024-01-24 16:45 冀未然
该文被密码保护。
posted @ 2024-03-04 09:48 冀未然
摘要:Django model select的各种用法详解 摘自: https://www.cnblogs.com/skbarcode/p/12584387.html 基本操作 # 获取所有数据,对应SQL:select * from User User.objects.all() # 匹配,对应SQL: 阅读全文
posted @ 2024-03-15 09:53 冀未然
摘要:过滤和排序 并不是所有的接口都需要写,查询所有才需要过滤(根据条件过滤),排序(按某个规则排序,也可倒序)。 导入模块: """ OrderingFilter : 排序 SearchFilter : 过滤 """ from rest_framework.filters import Ordering 阅读全文
posted @ 2024-03-25 13:16 冀未然
摘要:from faker import Faker #创建对象,默认生成的数据为为英文,使用zh_CN指定为中文 fake = Faker('zh_CN') print(fake.name())#随机生成姓名 print(fake.address())#随机生成地址 print(fake.phone_n 阅读全文
posted @ 2024-03-25 15:20 冀未然
摘要:python @property的介绍与使用 python的@property是python的一种装饰器,是用来修饰方法的。 作用: 我们可以使用@property装饰器来创建只读属性,@property装饰器会将方法转换为相同名称的只读属性,可以与所定义的属性配合使用,这样可以防止属性被修改。 举 阅读全文
posted @ 2024-03-26 10:19 冀未然
摘要:gevent模块 示例代码: 特点: 可以识别所有阻塞 from gevent import monkey monkey.patch_all() import gevent import requests from lxml import etree import time # 发送请求 def g 阅读全文
posted @ 2024-03-26 10:52 冀未然
摘要:PIL 概念: PIL(python Imaging Library),已经是Python平台事实上的图像处理标准库了。PIL功能非常强大,但API却非常简单易用。PIL中所涉及的基本概念有如下几个: 通道(bands)、模式(mode)、尺寸(size)、坐标系统(coordinate syste 阅读全文
posted @ 2024-03-26 14:37 冀未然
摘要:Python 生成测试数据 - faker 模块 摘自:http://notes.zhengxinonly.com/posts/2023-09-04.html Faker 是一个生成数据的 Python 库,Faker 数据通常用于生成测试数据。 初始化操作 首先需要安装 faker 模块 pip 阅读全文
posted @ 2024-04-15 10:21 冀未然
摘要:Python 超好用的几种 f-string 方式,你都会吗 ? f-string 是 Python 3.6 版本引入的一种字符串格式化方法,它允许我们将变量、表达式直接插入到字符串中。本文将介绍 f-string 的大部分使用方式,快来检查一下你是否全部都掌握了。 基本用法 f-string 是 阅读全文
posted @ 2024-04-15 10:25 冀未然
摘要:flask 实现简易视频播放网站案例 本视频主要实现两个目的,上传视频、播放视频。 使用技术: flask、flask-sqlalchemy、layui 视频地址: https://www.bilibili.com/video/BV1QV411N7qy/ 搭建项目 直接新建一个 flask 项目,然 阅读全文
posted @ 2024-04-15 10:37 冀未然
摘要:Flask-SQLAlchemy Flask-SQLAlchemy 是 flask 的一个拓展插件,专门添加对 SQLAlchemy 的支持(ORM,关系对象模型)。使用它可以在 flask 中使用对象直接与 SQLAlchemy 进行交互,大大简化了 SQLAlchemy 与 flask 结合使用 阅读全文
posted @ 2024-04-15 11:01 冀未然
摘要:Python对Sql Server数据库增删改查 # 如果电脑上没有安装mssql模块,则要安装mssql模块 安装模块的执行命令为 pip install pymssql import pymssql def ExecuteNonQuery(sqlStr,paras): try: connect  阅读全文
posted @ 2024-04-15 14:23 冀未然
摘要:Python中调用C#的dll库 1、创建C#的dll库。dll名称为MyCsharpDLL.dll,下面是dll里面的代码 using System; namespace MyCsharpDLL { public class Test { public void Print() { Console 阅读全文
posted @ 2024-04-15 14:29 冀未然
摘要:jwt揭秘 摘自: https://www.cnblogs.com/wupeiqi/p/11854573.html 武沛齐 博客 JSON Web Tokens,是一种开发的行业标准 RFC 7519 ,用于安全的表示双方之间的声明。目前,jwt广泛应用在系统的用户认证方面,特别是现在前后端分离项目 阅读全文
posted @ 2024-05-15 14:42 冀未然
摘要:生成 1 万条随机的学生数据 批量插入的优势 批量插入数据有以下几个优点: 减少网络交互:批量插入一次性传输多条记录,减少客户端与数据库之间的网络通信次数。 提高事务效率:批量插入可以减少事务的提交次数,从而降低事务管理的开销。 提高插入性能:批量插入可以有效地降低数据库的锁定资源时间,使插入操作更 阅读全文
posted @ 2025-01-10 16:40 冀未然