支持MSNP15的MSN登录程序PYTHON版代码

Pandas入门教程(二十二):股票数据分析实战——yfinance 获取数据、技术指标与收益率分析 把 Pandas 用在真实场景,才能体会它的价值。本文以茅台股票为例,用 yfinance 获取历史行情,完成缺失值处理与列筛选,绘制收盘价曲线,计算 SMA 移动平均线与 RSI 相对强弱指数,并通过日收益率、累计收益率和波动率完成完整的量化分析流程。 阅读详情

#需要安装pycrypto见 http://blog.youkuaiyun.com/itclock/archive/2008/12/12/3502973.aspx

from socket import socket, ssl, AF_INET, SOCK_STREAM
from sys import exit, stdin, stdout, argv
from os import popen3

import getpass,md5,thread,time,re
import xml.sax.saxutils as xmlmodule
import struct
from base64 import standard_b64encode, standard_b64decode
from Crypto.Hash import HMAC, SHA
from Crypto.Cipher import DES3
from Crypto.Util import randpool

import httplib, urllib

CRYPT_MODE_CBC = 1
CALC_3DES      = 0x6603
CALG_SHA1      = 0x8004

class sendMsg(object):
    def loginmsn(self,passport,password):
        self._passport = passport
        self._password = password

        sock = socket(AF_INET, SOCK_STREAM)
        sock.connect(("messenger.hotmail.com", 1863))
        sock.send('VER 0 MSNP15 CVR0/r/n')
        data = sock.recv(1024)
        print data
        sock.send('CVR 1 0x0407 win 6.0 i386 MSNMSGR 8.5 MSMSGS ' + passport + '/r/n')
        data = sock.recv(1024)
        print data
        sock.send('USR 2 SSO I ' + passport + '/r/n')
        data = sock.recv(1024)
        print data

        server = data.split(" ")[3]
        ip = server.split(":")[0]
        port = server.split(":")[1]

        sock.close()
        sock = socket(AF_INET, SOCK_STREAM)
        sock.connect((ip, int(port)))
        sock.send('VER 3 MSNP15 CVR0/r/n')
        data = sock.recv(1024)
        print data
        sock.send('CVR 4 0x0407 win 6.0 i386 MSNMSGR 8.5 MSMSGS ' + passport + '/r/n')
        data = sock.recv(1024)
        print data + 'ok'
        sock.send('USR 5 SSO I ' + passport + '/r/n')
        data = sock.recv(4096)
        data2 = sock.recv(4096)
        data3 = sock.recv(4096)
        print data + data2 + data3
        data = data + data2 + data3
        usrdata = data.split("USR ")[1]
        policy = usrdata.split(" ")[3]
        nonce = usrdata.split(" ")[4]
        print policy
        print nonce

        xml = "<?xml version=/"1.0/" encoding=/"UTF-8/"?>"
        xml += "<Envelope xmlns=/"http://schemas.xmlsoap.org/soap/envelope//" xmlns:wsse=/"http://schemas.xmlsoap.org/ws/2003/06/secext/" xmlns:saml=/"urn:oasis:names:tc:SAML:1.0:assertion/" xmlns:wsp=/"http://schemas.xmlsoap.org/ws/2002/12/policy/" xmlns:wsu=/"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd/" xmlns:wsa=/"http://schemas.xmlsoap.org/ws/2004/03/addressing/" xmlns:wssc=/"http://schemas.xmlsoap.org/ws/2004/04/sc/" xmlns:wst=/"http://schemas.xmlsoap.org/ws/2004/04/trust/"><Header>"
        xml += "<ps:AuthInfo xmlns:ps=/"http://schemas.microsoft.com/Passport/SoapServices/PPCRL/" Id=/"PPAuthInfo/">"
        xml += "<ps:HostingApp>{7108E71A-9926-4FCB-BCC9-9A9D3F32E423}</ps:HostingApp>"
        xml += "<ps:BinaryVersion>4</ps:BinaryVersion>"
        xml += "<ps:UIVersion>1</ps:UIVersion>"
        xml += "<ps:Cookies></ps:Cookies>"
        xml += "<ps:RequestParams>AQAAAAIAAABsYwQAAAAxMDMz</ps:RequestParams>"
        xml += "</ps:AuthInfo>"
        xml += "<wsse:Security><wsse:UsernameToken Id=/"user/">"
        xml += "<wsse:Username>" + passport + "</wsse:Username>"
        xml += "<wsse:Password>" + password + "</wsse:Password>"
        xml += "</wsse:UsernameToken></wsse:Security></Header><Body>"
        xml += "<ps:RequestMultipleSecurityTokens xmlns:ps=/"http://schemas.microsoft.com/Passport/SoapServices/PPCRL/" Id=/"RSTS/">"
        xml += "<wst:RequestSecurityToken Id=/"RST0/">"
        xml += "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"
        xml += "<wsp:AppliesTo><wsa:EndpointReference><wsa:Address>http://Passport.NET/tb"
        xml += "</wsa:Address></wsa:EndpointReference></wsp:AppliesTo></wst:RequestSecurityToken>"
        xml += "<wst:RequestSecurityToken Id=/"RST1/">"
        xml += "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType><wsp:AppliesTo><wsa:EndpointReference>"
        xml += "<wsa:Address>messengerclear.live.com</wsa:Address></wsa:EndpointReference></wsp:AppliesTo>"
        xml += "<wsse:PolicyReference URI=/"" + policy + "/"></wsse:PolicyReference></wst:RequestSecurityToken>"
        xml += "<wst:RequestSecurityToken Id=/"RST2/">"
        xml += "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"
        xml += "<wsp:AppliesTo>"
        xml += "<wsa:EndpointReference>"
        xml += "<wsa:Address>contacts.msn.com</wsa:Address>"
        xml += "</wsa:EndpointReference>"
        xml += "</wsp:AppliesTo>"
        xml += "<wsse:PolicyReference URI=/"MBI/">"
        xml += "</wsse:PolicyReference>"
        xml += "</wst:RequestSecurityToken>"
        xml += "</ps:RequestMultipleSecurityTokens></Body></Envelope>"

        headers = {"Content-type": "application/x-www-form-urlencoded",
                   "Accept": "text/plain","Content-Length":str(len(xml))}
        conn = httplib.HTTPSConnection("login.live.com:443")
        conn.request("POST", "/RST.srf", xml, headers)
        response = conn.getresponse()
        respdata = response.read()
        conn.close()
        print respdata
        #output = open('./out.xml','w')
        #output.write(respdata)
        secret = respdata.split("<wst:BinarySecret>")[2]
        secret = secret.split("</wst:BinarySecret>")[0]

        ticket = respdata.split("<wsse:BinarySecurityToken Id=/"Compact1/">")[1]
        ticket = ticket.split("</wsse:BinarySecurityToken>")[0]
        ticket = xmlmodule.unescape(ticket)

        print secret
        print ticket
        login_code = self.generateLoginBLOB(secret, nonce)

        senddata = "USR 6 SSO S " + ticket + " " + login_code + "/r/n"
        sock.send(senddata)
        data = sock.recv(1024)
        print data
       
    def derive_key(self,key, magic):
        hash1 = HMAC.new(key, magic, SHA).digest()
       
        hash2 = HMAC.new(key, hash1 + magic, SHA).digest()
        hash3 = HMAC.new(key, hash1, SHA).digest()
       
        hash4 = HMAC.new(key, hash3 + magic, SHA).digest()
       
        return hash2 + hash4[0:4]
    def generateLoginBLOB(self,key, nonce):
        #
        # Read key and generate two derived keys
        #
        nonce = nonce.replace("/r/n","")
        print key
        print '0'+(nonce)+'0'
        print len(nonce)
        key1 = standard_b64decode(key)
        key2 = self.derive_key(key1, "WS-SecureConversationSESSION KEY HASH")
        key3 = self.derive_key(key1, "WS-SecureConversationSESSION KEY ENCRYPTION")
       
        #
        # Create a HMAC-SHA-1 hash of nonce using key2
        #
       
        hash = HMAC.new(key2, nonce, SHA).digest()
       
        #
        # Encrypt nonce with DES3 using key3
        #
       
        # IV: 8 bytes of random data
        iv = randpool.KeyboardRandomPool().get_bytes(8)
        obj = DES3.new(key3, DES3.MODE_CBC, iv)
       
        # XXX: win32's Crypt API seems to pad the input with 0x08 bytes to align on 72/36/18/9 boundary
        ciph = obj.encrypt(nonce + "/x08/x08/x08/x08/x08/x08/x08/x08")

        #
        # Generate the blob
        #

        blob = struct.pack("<LLLLLLL", 28, CRYPT_MODE_CBC, CALC_3DES, CALG_SHA1,
                           len(iv), len(hash), len(ciph))
        blob += iv + hash + ciph
       
        return standard_b64encode(blob)
   
sendmsn = sendMsg()
sendmsn.loginmsn("123456@example.com","123456")
 

VM与欧姆龙PLC通讯设置实战:Fins TCP/UDP协议详解 本文详细解析了VM(VisionMaster)与欧姆龙PLC通过Fins TCP/UDP协议进行通讯的实战设置。内容涵盖网络配置、协议选择(TCP可靠性与UDP实时性)、VM端地址映射与数据点添加、以及数据接收解析流程,并提供了常见错误排查与高级调试技巧,帮助视觉与自动化工程师快速实现稳定可靠的工业通讯集成。 阅读详情

相关推荐

HRNet 【demo 复现过程】

Deep High-Resolution Representation Learning for Human Pose Estimation

qq_45257495的博客 5556

MSN Messenger 协议分析一

MSN Messenger 协议分析一 2007年11月21日 星期三 作者: 熊传波 <!--google_ad_client = "pub-4075792327756511";google_ad_width = 200;google_ad_height = 200;google_ad_format = "200x200_as";google_ad_type =

jiljil的专栏 1338

别再只用固定线了!聊聊Android车机‘快速倒车’与‘正常倒车’的UI与数据流核心差异(附动态轨迹线实现原理)

本文深度解析Android车机中快速倒车与正常倒车的核心差异,探讨从内核级视频流水线到动态轨迹线的技术实现。快速倒车通过内核直接操作FrameBuffer实现2秒内响应,而正常倒车则支持多传感器数据融合与动态UI元素。文章还分享了动态轨迹线的算法实现与性能优化技巧,帮助开发者打造极致的倒车体验。

weixin_42550597的博客 253

MSN 问题解决(其中一个问题困扰了很久)

 MSN CAN NOT LOGIN. ERROR CODE: 81000314 OR 80072745MSN 遇到错误码 81000314 或 80072745 无法登入? MSN CAN NOT LOGIN. ERROR CODE: 81000314 OR 80072745 MSN 遇到错误码 81000314 或 80072745 无法登入? 可能是 MSN 的 SERVER 正在改 IP,

kofterry的专栏 1326

手把手教你构建轻量级CLIP模型:从理论到实践

本文手把手教你从零构建一个轻量级CLIP模型,深入解析其核心原理——对比学习,并提供完整的代码实践。通过精简的模型架构、数据准备和训练循环实现,帮助读者彻底理解多模态模型如何让图像与文本在共享空间中对齐,为学习更复杂的AI模型打下坚实基础。

weixin_29100927的博客 325

深度学习之Pytorch---本人踩过的坑(报错总结)第十篇

深度学习之Pytorch安装时遇到的问题—本人踩过的坑(报错总结) 报错一:pip install torchvision 出现“由于目标计算机积极拒绝,无法连接”的问题 解决方案:找到自己浏览器的工具或选项,我的是火狐,具体解决方案如下图 然后找到桌面左下角,点击搜索internet,然后点击internet选项 最后回到Anaconda Prompt命令行输入pip install...

qq_41570307的博客 1914

不要以为装了防火墙,我就治不了你!!(特洛纳)

不要以为装了防火墙,我就治不了你!!文章来源:cpu88s blog原文题目为:不要以为装了防火墙。我就治不了你!!--如何使tcp包和udp包穿透防火墙 通过本文的httptunnel 技术同时逃过了防火墙的屏蔽以及系统的追踪试验,我们可以看到网络安全仅仅依靠某种或某几种手段是不可靠的,同时对安全系统的盲目性依赖往往会造成巨大的安全隐患。希望通过本文能引起管理员对网络安全防护系统的思考。什么是

FreeXploiT 2526

【 史上最全】测绘、遥感RS、地信GIS国家级比赛竞赛整理

目录Esri Esri

weixin_43910227的博客 9148

MSNP9协议分析报告

1. 连 接MSN Messenger协议建立在TCP/IP之上。除了文件传输和语音聊天是直接的"点对点"通信之外,其它所有的情形全部通过服务器进行。在逻辑上,一共有三种类型的服务器,各司其职:派遣服务器(Dispatch Server, DS) - 客户端最初连接的服务器。负责给客户端分配合适的通知服务器。域名是messenger.hotmail.com,标准服务端口是1863。完成

南京程序员俱乐部 2117

无人机频谱侦测与智能识别技术实战解析

本文深入解析无人机频谱侦测与智能识别技术实战应用,涵盖无线电侦测、信号处理和定位技术等核心内容。通过频谱分析、特征提取和机器学习算法优化,实现高精度无人机识别与定位,并分享复杂环境下的应对策略和系统集成经验。

weixin_28419039的博客 488

用 ABAP 驾驭 OAuth 2.0:从 Authorization Code 到 SAML Bearer 的全栈落地指南

ABAP平台OAuth 2.0客户端开发实践 本文为SAP开发者详细解析ABAP平台内置OAuth 2.0客户端的使用方法,涵盖四种授权流的最佳实践: 授权流选择: Authorization Code:适用于用户交互场景 SAML 2.0 Bearer:适合已有SAML体系的企业 Client Credentials:系统间通信 Password Credentials:过渡方案(不推荐) 配置流程: 通过SE80定义Client Profile 使用SOAUTH2_CLIENT/OA2C_CONFIG配

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 309

MSN 协议分析

MSN 协议分析一、概要介绍 msn messenger通常使用端口1863进行通信(在实际中用sniff跟踪发现msn通信都是用1863端口进行通信的)。在msn messenger工作中,本机客户端与三种服务器通过协议进行通信和数据交换。(dispatch服务器、notification服务器tchboard服务器)。在本机客户端和各服务器之间主要通过两种形式的进行通信

笔者从事电信媒体开发多年,愿意将多年的开发经验分享给同行 5484

零基础入门篇③ PyCharm使用指南(个性化设置、开发必备插件、常用快捷键)

Python从入门到精通👉零基础入门篇③

hacker707的博客 4373

支持msnp15协议python可发送离线消息脚本

 from socket import socket, AF_INET, SOCK_STREAMfrom sys import exit, stdin, stdout, argvfrom os import popen3import ssl as sslmodimport getpass,md5,thread,time,reimport structfrom base64 import

itclock的专栏 2007

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

联网时浏览器跳出MSN中国网页

联网时浏览器跳出MSN中国网页 问题描述 联网时浏览器跳出MSN中国网页 原因 在网上查找到的问题原因:导致该现象的是一个名为“Windows 网络连接状态指示器(NCSI)执行的活动测试”的功能。当介入网络,系统检测到你需要二次认证的时候自动弹出浏览器让你登陆。你的状态是已经登陆的了,于是跳转到MSN中国网站。 操作 运行 -> regedit 打开注册表编辑器,修改计算机\HKEY_L...

Mr_Bobcp的博客 3万+

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

AI全栈实战 | 3.9-01 爬虫入门:requests 加 BeautifulSoup 三分钟跑通,但 90% 的人栽在这 4 个“礼貌“问题上

⚠️:本文内容仅用于。请遵守目标站点的服务条款与相关法律法规,不得对目标服务造成负担,不得采集、传播个人隐私数据。技术是中性的,边界在你手里。爬虫的入门技术(requests 发请求 + BeautifulSoup 解析)三分钟就能学会。真正区分"会用爬虫"和"会做爬虫的人"的,是这篇我们跑通"请求→解析→存储"的最小闭环,然后重点把"合规与礼貌"这根弦给你绷上。

源码获取 | 运行部署 | 定制二开修改,如果回复不及时请耐心等待,请见谅。 387

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

从一段视频到可漫游的 4D 有声场景:思路拆解与最小复现手记

只需一段手机视频,你就能生成可"走进去"的 4D 有声场景:转头时狗叫声方向随之变化,走近时声音更清晰。本文拆解 Video-to-4DAVScene 的核心思路,手把手带你用几十行 Python 搭出最小管线,把视频中的运动物体变成带空间位置的声源,并附上三个真实踩坑的排障经验,代码可直接跑。🎧

helloagent的博客 218

Python+Agent入门笔记(二):列表推导式、模块和异常,这些写 Agent 前得会

接上一篇《Python+Agent入门笔记(一)》。基础语法跑通之后,这篇聊几块日常写脚本绕不开的东西。还是按 JS/Go 开发者的视角写,尽量记录我实际卡过的地方。

qq_41241612的博客 430

详解Python条件语句

在 Python 中,if...else 是一种条件语句,可以根据给定的条件执行不同的操作。这个语句通常用于控制程序的流程。

2601_96798737的博客 205

微调数据集构建:清洗、标注、格式转换完整流程

摘要解决微调数据直接抓取导致的噪声污染、模式崩溃与Token错位问题。适用于需为大模型SFT阶段构建高质量训练集的数据与算法工程师。读完可获得包含启发式清洗、MinHash去重及ChatML格式对齐的完整可运行数据流水线。关键词数据清洗、MinHash去重、数据标注、ChatML、SFT数据集、数据配比背景与问题大模型微调效果的上限由数据质量决定,直接使用未经处理的原始语料极易引发模型复读、幻觉与指令遵循能力退化。

2402_85729970的博客 485

Python3 协程:异步编程的核心机制与实战

协程是解决I/O密集型任务等待瓶颈的高效机制,相比线程更轻量、无锁开销。从yield到async/await的演进,使异步编程语义清晰、易于理解。通过async/await可实现并发执行多个任务(如gather、create_task),显著提升网络请求、爬虫等场景性能。关键在于使用异步库(如aiohttp)替代同步库,避免阻塞事件循环。合理控制超时与并发数,才能发挥协程最大优势。

Lxn2zh的博客 159

python如何控制浏览器

Python 可以通过 Selenium、Playwright 等工具实现浏览器自动化,从打开网页到执行复杂交互操作均可脚本化完成。Selenium生态成熟

2601_96797912的博客 75

二进制木马免杀-Python 分离免杀与 Web 挂马

二进制木马免杀-Python 分离免杀与 Web 挂马

2503_94637398的博客 267

torch.compile 差异仅 1e-6,边界样本预测为何翻转

torch.compile 加速后输出与 eager 不一致,部分预测翻转。逐层对比与 graph break 分析定位到动态分支翻转根因。容差回归仅适用于无分支翻转场景,零容忍场景应禁用编译。

昨日种种,皆成今我。今日种种,皆成新我。 158

Python 100讲课程导航:第08篇《Python input 与类型转换:构建可靠的交互程序》

本文详解Python中input()的返回类型为字符串,强调必须通过int()、float()等函数进行类型转换。重点讲解了输入验证的重要性,结合try-except处理ValueError等异常,实现可靠的交互程序。通过购物预算计算器实战,演示如何防范非法输入、处理边界值,并推荐使用Decimal避免浮点精度问题,提升程序健壮性。

铭渊老黄 132

【Python】国家中小学智慧教育平台电子教材批量下载与 PDF 合成实战

成果:两本语文电子课本(一年级上册 118 页 / 23MB、三年级上册 130 页 / 30.3MB),合计 248 页、约 54MB,单本下载加合成 40~60 秒,PDF 页数校验全部通过。经验教训SPA 站点的数据接口优先从 bundle 里挖,比抓页面稳得多;资源链接要按 private/public 分组看待,只取平台公开部分;页数、目录名这类“可推断”的信息,永远用实际响应验证一次;受限环境里“能不能跑浏览器”要在方案定稿前确认。后续计划:这版 PDF 是图片版,没有文字层;

木头大左的博客 122
上一篇: Python Cryptography Toolkit 扩展包安装
下一篇: Qt 4.x Open Source (MinGW) for Windows安装
itclock
博客等级 码龄25年 19粉丝 89原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值