Python
文章平均质量分 58
、Jamson
微信:anything_studio
展开
-
Python异步请求:使用asyncio.Queue进行任务调度
是一个基于异步编程的FIFO队列实现。它是协程安全的,可以用于在不同的协程之间发送和接收数据,实现协程之间的通信和协作。原创 2023-08-01 09:51:35 · 921 阅读 · 0 评论 -
Python异步请求:处理并发任务的结果
在异步编程中,处理并发任务的结果可能会有所不同。原创 2023-08-01 09:50:30 · 485 阅读 · 0 评论 -
Python异步请求:异步编程的常见问题
本文第三部分进一步讨论了异步编程中的常见问题,包括异常处理、超时处理、并发限制和子进程管理。同时,提供了相关的示例代码以便更好地理解和应用异步编程技术。原创 2023-08-01 09:48:22 · 265 阅读 · 0 评论 -
Python异步请求:深入理解异步编程模型(第二部分)
本文第二部分详细介绍了异步编程模型的核心概念,包括异步函数与协程、事件循环以及异步任务。同时,通过示例代码展示了如何使用aiohttp库进行HTTP请求的异步操作。希望本文能够帮助读者更好地理解和应用Python中的异步任务请求技术。原创 2023-08-01 09:45:55 · 236 阅读 · 0 评论 -
Python异步请求:深入理解异步编程模型
在传统的同步编程模型中,代码会按照顺序依次执行,当遇到IO等待时,程序会阻塞等待IO操作完成后再继续执行后续代码。这种同步模型在处理大量IO密集型任务时效率较低。而异步编程模型则允许代码在IO等待过程中不被阻塞,可以继续执行其他任务,从而提高整体程序的性能和响应速度。异步编程模型通过将任务交给事件循环(Event Loop)来管理和调度,使用非阻塞的方式来处理IO操作。本文详细介绍了Python异步请求的概念、异步编程模型、asyncio库的用法以及异步任务请求的优势和适用场景。原创 2023-08-01 09:44:19 · 337 阅读 · 0 评论 -
Python系列之图片验证码识别
图片验证码已经成为现代网络应用中常见的一种身份验证形式。本文将介绍如何使用 Python 进行图片验证码的识别。我们将使用基于机器学习的方法,通过训练模型来自动识别验证码图片。原创 2023-06-29 14:19:59 · 4675 阅读 · 1 评论 -
Python工具系列之验证码自动生成
Python工具系列之验证码自动生成小程序爬虫接单、app爬虫接单、网页爬虫接单、接口定制、网站开发、小程序开发> 点击这里联系我们 <微信请扫描下方二维码代码仅供学习交流,请勿用于非法用途直接上代码# -*- coding:utf-8 -*-import randomimport osfrom PIL import Image, ImageDraw, ImageFont# 每个字母之间的间隙大小fontClearance = 2# 圆直径arcN = 0d原创 2021-04-07 16:49:28 · 235 阅读 · 0 评论 -
微信公众号开发之模板消息推送系统
微信公众号开发之模板消息推送系统小程序爬虫接单、app爬虫接单、网页爬虫接单、接口定制、网站开发、小程序开发、微信公众号开发> 点击这里联系我们 <微信请扫描下方二维码代码仅供学习交流,请勿用于非法用途一、准备数据库(sqlserver)create table notify_list( id INT NOT NULL identity(1,1), openid VARCHAR(40) not null, templateid VARCHAR(50) n原创 2020-07-02 20:22:07 · 832 阅读 · 0 评论 -
Python工具系列之给图片指定位置范围打上马赛克
今天带来的代码是关于图片处理的,近期接触的,不是很熟悉今天写了代码的唯一感触就是对图片数组的理解要深入了一点图片的每一个像素点由一个rgb数组标识,通过numpy库的数组工具可以对数组进行批处理(今天主要用到的是范围性质的值修改操作)主要提供两个方法:建议用第二种方法一:随机生成一个颜色rgb数组,将随机值赋值图片指定位置方法二:通过获取图片范围块的一个rgb颜色值(我方法里面使用的是...原创 2018-11-15 18:34:49 · 3445 阅读 · 2 评论 -
Python基于sklearn实现对酒数据集K-means聚类模型、K临近算法模型和SVM分类模型进行建模、评估与数据预测
Python基于sklearn实现对酒数据集K-means聚类模型、K临近算法模型和SVM分类模型进行建模、评估与数据预测一、下载数据集合数据集网上找一下,此demo只所逻辑参考,数据集标签差异影响不大,对此demo一样实用我用到的csv数据集结构大概如下:Class,Alcohol,Malic_acid,Ash,Alcalinity_of_ash,Magnesium,Total_ph...原创 2018-12-15 20:25:42 · 10841 阅读 · 10 评论 -
Python sklearn基于K-means算法对用户信用进行聚类划分
Python sklearn基于K-means算法对用户信用进行聚类划分Demo直接上代码,步骤已注释# -*- coding:utf-8 -*-import pandas as pdfrom sklearn.decomposition import PCAfrom sklearn.preprocessing import StandardScalerimport numpy as n...原创 2018-12-16 22:31:38 · 4576 阅读 · 5 评论