python
GGJJLLDD
这个作者很懒,什么都没留下…
展开
-
algorithm to generate unique code of 64 bit
this is funning algorithm .if you have enough space,you can use the wayjust like 2^64 guy stand as a circlethis alway have a right order .from one guy to last guy ,this guy represent 0/1.thi原创 2013-03-07 16:45:13 · 1187 阅读 · 0 评论 -
ubuntu 下装pyqt4
ubuntu 下装pyqt4 2012-03-31 10:13:12| 分类:COMPUTER |字号 订阅sudo apt-get install python-qt4-devsudo apt-get install pyqt4-dev-toolssudo apt-get install qt4-dev-tools sudo apt转载 2013-02-28 14:11:03 · 1109 阅读 · 0 评论 -
python 学习笔记-python import: command not found
在eclipse下开发python不需要如下语句#!/usr/bin/python 但是,在终端执行会出现python import: command not found原创 2013-02-28 09:53:17 · 21796 阅读 · 1 评论 -
压缩文件缩略图 python 实现
可以支持zip,rar,7zip,tar.gz等等各式输入压缩文件名称,返回一个xml文件结构#!usr/bin/python#coding=utf-8import uuidimport osimport zipfileimport reimport sysimport officetoimageimport rarfileimport tarfile原创 2013-04-22 20:10:55 · 1318 阅读 · 0 评论 -
文件zip打包,流式下载python 代码
使用方法:输入地址:例如http://0.0.0.0:8000?abc,def#!usr/bin/python#coding=utf-8import uuidimport osimport zipfileimport reimport sysimport officetoimageimport rarfileimport tarfileimport原创 2013-04-22 20:14:09 · 2208 阅读 · 0 评论 -
BUG python2.7 httplib message_body
ERROR:File "/usr/lib/python2.7/httplib.py", line 809, in _send_output msg += message_bodyUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14060: ordinal not in range(128)S转载 2013-06-09 10:08:59 · 2641 阅读 · 0 评论 -
zip stream download
import zipfile_ownimport osimport timeimport zipfile_comimport zipfiledef gen_file(file_path): fs = open(file_path, 'r') while 1: trunk = fs.read(1024*8) left = len(trunk原创 2013-07-15 16:24:22 · 1116 阅读 · 0 评论 -
gevent pywsgi overflow
def _do_read(self, length=None, use_readline=False): if use_readline: reader = self.rfile.readline else: reader = self.rfile.read content_length = self.原创 2013-07-24 10:28:13 · 2277 阅读 · 0 评论 -
python note
1. python中有指针的概念吗?没有2.如何实现链表?自己定义类3.python中的list实现原理是什么?http://www.brpreiss.com/books/opus7/html/page82.html4.python类中cls和self的区别?http://stackoverflow.com/questions/7554738/python-原创 2014-03-03 21:16:13 · 1023 阅读 · 0 评论