腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
返回腾讯云官网
艳艳代码杂货店
专栏作者
举报
125
文章
171009
阅读量
22
订阅数
订阅专栏
申请加入专栏
全部文章
编程算法
python
java
php
http
mysql
数据库
sql
网站
html
linux
正则表达式
javascript
c#
bash
react
css
json
云数据库 SQL Server
api
bash 指令
腾讯云测试服务
爬虫
shell
面向对象编程
脚本
c++
node.js
jquery
单片机
oracle
nginx
html5
url
备份
ios
servlet
jsp
xml
android
云数据库 Redis
access
打包
ide
日志服务
数据加密服务
游戏
缓存
网络安全
windows
功能测试
class
email
python3
测试
函数
连接
负载均衡
c 语言
ruby
webview
嵌入式
sqlite
web.py
git
github
tomcat
unix
负载均衡缓存
apache
神经网络
命令行工具
数据库一体机 TData
压力测试
ssh
sql server
hashmap
grep
udp
大数据
数据结构
kafka
sdk
性能测试
app测试
负载测试
beautifulsoup
cmd
db
image
int
ip
max
min
null
queue
server
sh
sql语句
table
varchar
wmi
word
wsgi
表格
布局
程序
代理
登录
动画
队列
多线程
二进制
服务器
监控
框架
模型
排序
数据
系统
压缩
搜索文章
搜索
搜索
关闭
python在windows下操作word的方法
python
windows
word
import win32com from win32com.client import Dispatch, constants w = win32com.client.Dispatch('Word.Application') 或者使用下面的方法,使用启动独立的进程: w = win32com.client.DispatchEx('Word.Application') 后台运行,不显示,不警告 w.Visible = 0 w.DisplayAlerts = 0 打开新的文件 doc = w.Documents
艳艳代码杂货店
2021-11-02
548
0
python十进制转二进制,可指定位数
python
二进制
python十进制转二进制,可指定位数 # convert a decimal (denary, base 10) integer to a binary string (base 2) tested with Python24 vegaseat 6/1/2005 def Denary2Binary(n): '''convert denary integer n to binary string bStr''' bStr = '' if n < 0: raise Valu
艳艳代码杂货店
2021-11-02
853
0
python显示生日是星期几
python
# find the day of the week of a given date Python will trap impossible dates like (1900, 2, 29) tested with Python24 vegaseat 01aug2005 from datetime import date a typical birthday year, month, day or change it to your own birthday... birthday = da
艳艳代码杂货店
2021-11-02
1.3K
0
Python实现的hash加密小工具
python
[Python]代码 #!/usr/bin/env python #-*-encoding = utf-8-*- # hasher.py #@By:dengyongkai import sys import hashlib import linecache def alglist(): print """ (1)MD5 (4)SHA256 (2)SHA1 (5)SHA384 (3)SHA224 (6)SHA512 """ class hasher
艳艳代码杂货店
2021-11-02
537
0
python连接Oracle数据库的代码
python
数据库
oracle
连接
python连接Oracle数据库的代码,需要引用cx_Oracle库 #coding=UTF-8 import cx_Oracle def hello(): '''Hello cx_Oracle示例: 1)打印数据库版本信息. 2)查询表数据.''' conn = cx_Oracle.connect("obs61","obs61","tx8i.hp") cur = conn.cursor() t
艳艳代码杂货店
2021-11-02
1.1K
0
Python3.4 PIL的使用
python3
from PIL import Image, ImageFilter, ImageDraw, ImageFont, ImageEnhance, ImageFilter image1 = Image.open('C:/Users/hengli/Desktop/1.jpg') image2 = Image.open('C:/Users/hengli/Desktop/2.jpg') def 图片大小(image): w, h = image.size #获得图片的大小(分辨率) r
艳艳代码杂货店
2021-11-02
457
0
python实现爬虫下载美女图片
python
[Python]代码 #-*- coding:utf-8 -*- http://www.aichengxu.com import urllib2 import re import requests from lxml import etree 这些是要导入的库,代码并没有使用正则,使用的是xpath,正则困难的童鞋可以尝试使用下 推荐各位先使用基本库来写,这样可以学习到更多 links=[] #遍历url的地址 k=1 print u'请输入最后的页数:' endPage=int
艳艳代码杂货店
2021-11-02
379
0
Python操作MySQL数据库实例
python
sql
数据库
云数据库 SQL Server
用python连接mysql的时候,需要用的安装版本,源码版本容易有错误提示。下边是打包了32与64版本。 MySQL-python-1.2.3.win32-py2.7.exe MySQL-python-1.2.3.win-amd64-py2.7.exe
艳艳代码杂货店
2021-11-02
2.1K
0
python写的用WMI检测windows系统信息、硬盘信息、网卡信息
python
windows
wmi
系统
python写的用WMI检测windows系统信息、硬盘信息、网卡信息 #!/usr/bin/env python -- coding: utf-8 -- import wmi import sys,time,platform def get_system_info(os): """ 获取操作系统版本。 """ print print "Operating system:" if os == "Windows": c = wmi.WMI
艳艳代码杂货店
2021-11-02
1.1K
0
bottle---Python的轻量级http server
python
http
server
url
wsgi
相比于Django而言,bottle显得非常轻量级。短短几行代码即可快速搭建一个简易的http server。提供了 Python Web开发中需要的基本支持:URL路由,Request/Response对象封装,模板支持,与WSGI服务器集成支持。使用方法确实非常简便。
艳艳代码杂货店
2021-11-02
525
0
python udp 服务器
python
udp
服务器
import socket, traceback host = '' port = 51423 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind((host, port)) while 1: try: message, address = s.recvfrom(8192) print 'G
艳艳代码杂货店
2021-11-01
1.5K
0
一个简单的python读写文件脚本
python
脚本
#!/usr/bin/env python 'makeFile.py -- create a file' import os ls = os.linesep # get filename while True: fname = raw_input('Input an unused file name >') if os.path.exists(fname): print "ERROR: '%s' already exists" %fname
艳艳代码杂货店
2021-11-01
424
0
python爬虫下载百度贴吧图片
php
http
爬虫
html
xml
在爬取之前需要在浏览器先登录百度贴吧的帐号,各位也可以在代码中使用post提交或者加入cookie
艳艳代码杂货店
2021-11-01
847
0
用Python多线程抓取并验证代理
html
http
网络安全
爬虫
jquery
最后,为了提高效率,最好是使用多线程。(PS,有个地方要注意,urlopen这个函数,设定了一个全局对象opener,所以如果你使用了多个线程, 每个线程使用一个代理,那么,不能使用urlopen这个函数,而应该使用opener.open)
艳艳代码杂货店
2021-11-01
449
0
python多线程多队列(BeautifulSoup网络爬虫)
beautifulsoup
queue
程序
队列
框架
程序中设置两个队列分别为queue负责存放网址,out_queue负责存放网页的源代码。
艳艳代码杂货店
2021-11-01
402
0
Python3.4 远程操控电脑(开关机)
python3
import poplib import sys import smtplib from email.mime.text import MIMEText import os from email.header import decode_header import email import time def checkemail(): try: p = poplib.POP3('pop
艳艳代码杂货店
2021-11-01
672
0
通过python自动连接ssh服务器
python
ssh
连接
#!/usr/bin/python -- coding:utf-8 -- import sys, time, os try: import pexpect except ImportError: print """ You must install pexpect module """ sys.exit(1) addr_map = { 'v3' :('root@192.168.1.162', 'sina@2009'), 'dev':('test
艳艳代码杂货店
2021-11-01
1.5K
0
python爬取千万淘宝商品的脚本
json
爬虫
分享之前爬虫爬到的1000万条淘宝商品信息。平衡涵盖各种分类,包括商品名、卖家id、地区、价格等信息,json格式。
艳艳代码杂货店
2021-11-01
367
0
python编写简单抽奖系统
python
#!/usr/bin/env python coding=utf-8 from Tkinter import * import time import random class App: def init(self,master): frame = Frame(master) frame.pack() v = StringVar() self.e = Entry(frame,textvariable=v,bd='5')
艳艳代码杂货店
2021-11-01
855
0
python 判断文件、文件夹是否存在
python
>>> import os >>> os.path.exists('d:/assist') True >>> os.path.exists('d:/assist/getTeacherList.py') True >>> os.path.isfile('d:/assist') False >>> os.path.isfile('d:/assist/getTeacherList.py') True >>> os.makedirs('d:/assist/set') >>> os.path.exists('d:/
艳艳代码杂货店
2021-11-01
2.3K
0
点击加载更多
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
立即发文
Python精品学习库
代码在线跑,知识轻松学
立即查看
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
立即体验
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
立即查看
领券
问题归档
专栏文章
快讯文章归档
关键词归档
开发者手册归档
开发者手册 Section 归档