首页 软件开发 代码片段 python ( Page 20 )

python 1073

#Python
删除空文件和空文件夹

#-*- coding:cp936 -*- """ os.walk() 函数声明:walk(top,topdown=True,onerror=None) 1>参数top表示需…

2015-09-30 568

#Python
开源软件批量下载

import requests import lxml import gevent from lxml import html import os from gevent impo…

2015-09-29 303

#Python
检查系统模块的代码是否可用

python -m test.regrtest -j3

2015-09-28 806

#Python
采用二分查找找出某个数字的下标

class Solution(object): def searchRange(self, nums, target): """ :type nums: List[int] :ty…

2015-09-27 755

#Python
Python发送邮件的例子,运维人员使用

# -*- coding: UTF-8 -*- ''' 发送txt文本邮件 ''' import smtplib from email.mime.text import MIMET…

2015-09-27 474

#Python
对当前目录下的所有APK包执行Monkey测试,并自动保存Crash日志

#!/usr/bin/env python #coding=utf-8 import os import time import random import re apks = […

2015-09-27 213

#Python
抓取糗事百科文字笑话

# -*- coding:utf-8 -*- #制作者:archingB import urllib import urllib2 import re readme="按下回车键开…

2015-09-27 810

#Python
AQQ批量网站工具集之调用浏览器打开URL列表

#! /usr/bin/env python #coding=utf-8 # AQQ批量网站工具集之调用浏览器打开URL列表 # http://www.oschina.net/c…

2015-09-25 814

#Python
一个简单的数学问题:200囚徒

n=1 a=range(1,201) x=len(a) while x>1: for i in a: if i%2**n!=0: a.remove(i) n+=1 x=len…

2015-09-25 287

#Python
python正则取一列数中连续最长的奇数个数.py

""" python正则取一列数中连续最长的奇数个数.py 题目来源http://www.oschina.net/code/snippet_2519674_52255 大费周折地使…

2015-09-25 355

#Python
简单插入排序

#-*- encoding= utf-8 -*- def insertsort(list): if list != None: if len(list) == 1: pass el…

2015-09-25 484

#Python
每隔一段时间访问百度

#coding: utf-8 import sys import urllib import urllib2 from BeautifulSoup import Beautiful…

2015-09-24 487
1 18 19 20 21 22 90