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

python 1073

#Python
python生成图片

import cv2.cv as cv saveImagePath = 'E:/ScreenTestImages/' colorRed = [0,0,255] colorGreen…

2015-01-04 907

#Python
快速激活码生成V2

# coding=utf-8 # config 为配置词典 # y 是长度 最终生产出来的验证码是 长度 = Y - title的长度 # x 是循环次数 生成数量 # title…

2015-01-04 557

#Python
Python实现登录人人网并抓取新鲜事的方法

from sgmllib import SGMLParser import sys,urllib2,urllib,cookielib class spider(SGMLParser…

2015-01-03 684

#Python
git 提交到 gerrit

#!/usr/bin/env python #coding:utf-8 ''' ''' import os import sys originName = "origin" ver…

2015-01-02 613

#Python
求a到b之间所有质数

def Prime(b): i = 2 while i < b: if 0 == (j%i): return False else: i = i + 1 return Tru…

2015-01-01 299

#Python
Python去除list中的重复元素的最简单办法

初学者经常会遇到如何移除list中重复元素的问题。 这个问题在其他语言中可能需要for循环什么的,而在python中不用这样,非常简单,只需要将list作为set的构造函数构造一个…

2015-01-01 850

#Python
Python汉字转拼音

使用字典和转换程序,将汉字转换为拼音,配置好之后,可以转换为汉字拼音首字符和汉字全拼.这个使用一个字典和转化程序就行.网上有一个署名为caocao的人做了一个python的汉字转拼…

2015-01-01 940

#Python
pygame tetromino 俄罗斯方块

import pygame,sys,time,random from pygame.locals import* FPS = 25 winx = 640 winy = 480 bo…

2014-12-31 869

#Python
pil 放缩图像功能

import Image import os if __name__ == "__main__": infile = raw_input('give me a file with …

2014-12-31 324

#Python
Python将byte数组转换为int

代码 import struct import ctypes def test_struct(buf, offset): return struct.unpack_from(&qu…

2014-12-31 763

#Python
python实现堆排序算法代码

#!/usr/bin/python import sys def left_child(node): return node * 2 + 1 def right_child(nod…

2014-12-30 949
1 77 78 79 80 81 90