Problem 35
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.
There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13,...
分类:
其他好文 时间:
2014-08-22 17:52:39
阅读次数:
185
http://www.crifan.com/python_auto_handle_cookie_and_save_to_from_cookie_file/#!/usr/bin/python# -*- coding: utf-8 -*-"""Function: 【整理】Python中Cookie的.....
分类:
编程语言 时间:
2014-08-22 17:45:29
阅读次数:
238
前段时间项目中碰到从windows机器上传多媒体文件至linux服务器的需求(人工审核并触发同步),调研了几种上传机制或实现方案:
1) http方式上传至WebServer
用PHP或Python脚本上传给WebServer,但由于多媒体文件动辄几百兆,PHP由于最长执行时间的限制首先被排除,另外由于用脚本上传需要增加失败重试等控制逻辑,Python虽然可以实现这些功能,但考虑到开发成本及服...
分类:
系统相关 时间:
2014-08-22 16:26:39
阅读次数:
283
Problem 32
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit
number, 15234, is 1 through 5 pandigital.
The produ...
分类:
其他好文 时间:
2014-08-22 16:23:19
阅读次数:
178
先看看python类的类变量和成员变量。见下面代码:
class TestClass(object):
val1 = 100
def __init__(self):
self.val2 = 200
def fcn(self,val = 400):
val3 = 300
self.val4 = val...
分类:
编程语言 时间:
2014-08-22 16:19:09
阅读次数:
193
Problem 33
The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that49/98 = 4/8, which is correct, is obtained by cance...
分类:
其他好文 时间:
2014-08-22 16:17:19
阅读次数:
172
背景:pip安装一直不成功,很多模块用pip安装都不行,只好到github下载zip安装c:\Document and settings\> python e:\scrapy-0.24\setup.py install结果失败,提示[err2] no such file or directory: ...
分类:
其他好文 时间:
2014-08-22 15:56:18
阅读次数:
235
在Python2.3之前Python自带反编译的工具,高版本的貌似这个反编译的已经不能用了。 据说是在Python2.7上最好用的反编译工具uncompyle 代码地址 http://github.com/gstarnberger/uncompyle 编译Python 把Python文件编译为pyc...
分类:
编程语言 时间:
2014-08-22 15:46:08
阅读次数:
219
使用 libtorrent 的python绑定库实现一个dht网络爬虫,抓取dht网络中的磁力链接。 dht 网络简介 p2p网络 在P2P网络中,通过种子文件下载资源时,要知道资源在P2P网络中哪些计算机中,这些传输资源的计算机称作pee...
分类:
编程语言 时间:
2014-08-22 14:40:39
阅读次数:
222
Python学习1.列表[]1.1)列表是处理一组有序项目的数据结构,即你可以在一个列表中存储一个序列的项目。1.2)列表时可变数据类型1.3)列表的组成:用[]标示列表,包含多个用逗号隔开的数字或者字符串举例:list[1,2,3]list1[‘aaa’,123,’”qwsx”]空列表list[]注意:在定义时..
分类:
编程语言 时间:
2014-08-22 14:36:59
阅读次数:
215