码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
Python网络爬虫
http://blog.csdn.net/pi9nc/article/details/9734437 一、网络爬虫的定义网络爬虫,即Web Spider,是一个很形象的名字。把互联网比喻成一个蜘蛛网,那么Spider就是在网上爬来爬去的蜘蛛。网络蜘蛛是通过网页的链接地址来寻找网页的。从网站某一个页面...
分类:编程语言   时间:2014-08-26 00:06:55    阅读次数:299
POJ--1094--Sorting It All Out【拓扑排序】
链接:http://poj.org/problem?id=1094 题意&思路:直接拓扑排序。多解输出一串英文,有环输出一段英文,唯一解输出一段英文及排序结果。 细节:题目描述不是很清楚,如果不看discuss我肯定要WA出翔。 discuss里总结了两点关键的: 1. 输入一条边时如果此时拓扑有解就输出这个解,即使后面的边成有向环也不管了,所以每次输入的时候都得进行拓扑排序。...
分类:其他好文   时间:2014-08-25 22:58:15    阅读次数:279
Python学习笔记(二)——NumPy
Python可以用List当数组用,但是由于List的元素可以是任意对象,因此保存一个List需要保存所有指针和元素。非常消耗内存。 本文学习博客:用Python做科学计算 整理笔记,以待备用。 首先是NumPy函数库导入 importnumpy as np 创建数组 array 使用array可以创建多维数组 a = np.array([[1, 2, 3, 4],[4, 5,...
分类:编程语言   时间:2014-08-25 22:55:55    阅读次数:401
CF-85D-Sum of Medians(线段树)
In one well-known algorithm of finding the k-th order statistics we should divide all elements into groups of five consecutive elements and find the median of each five. A median is called the middl...
分类:其他好文   时间:2014-08-25 22:50:55    阅读次数:297
Permutation Sequence
The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence ...
分类:其他好文   时间:2014-08-25 22:49:25    阅读次数:274
python-re之中文匹配
1 #coding=utf-8 2 import re 3 import chardet#检测网页编码形式的模块 4 5 p = re.compile(r'\d+') 6 print p.findall('one1two2three3four4') 7 8 a="rewfd2313...
分类:编程语言   时间:2014-08-25 22:37:14    阅读次数:259
iOS_21团购_定位并根据经纬度,解析出城市名
// // LocationTool.m // 帅哥_团购 // // Created by beyond on 14-8-22. // Copyright (c) 2014年 com.beyond. All rights reserved. // #import "LocationTool.h" #import #import "City.h" #import "MetaDataT...
分类:移动开发   时间:2014-08-25 21:13:54    阅读次数:219
python出现SyntaxError: Non-ASCII character '\xe6' in file 打印日期.py on line 1, but no encoding declared;
刚开始学习python,照着书上敲完代码执行的时候出现: #根据给定的年月日以数字的形式打印出来 months = [ 'January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'Oc...
分类:编程语言   时间:2014-08-25 21:13:04    阅读次数:268
python协程的实现(greenlet源码分析)
基本上读完了greenlet的源代码,代码不多,就2000行C语言的代码,其中有一部分栈寄存器的修改的代码是由汇编实现的。。。 一句话来说明greenlet的实现原理:通过栈的复制切换来实现不同协程之间的切换。。。 那么接下里来具体的来看看greenlet的代码到底是怎么实现的。。。...
分类:编程语言   时间:2014-08-25 21:12:16    阅读次数:623
python——从datetime模块探索python的数据架构
问题出现于我试图向自建网页中加入实时时间开始。我之前已经知道python中有有关事件和日期的模块datetime。以下导入datetime并作实验。>>> import datetime>>> type(datetime)可知datetime属于module(模块)类。此外,类似的时间相关模块还有t...
分类:编程语言   时间:2014-08-25 21:02:04    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!