码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
(校赛) URAL 1993 This cheeseburger you don't need
Master Yoda is the oldest member of the Jedi Council. He conducts preparatory classes of little Younglings up to the moment they get a mentor. All Younglings adore master Yoda and they hope to grow...
分类:其他好文   时间:2014-07-29 14:59:48    阅读次数:266
python3.x的异常处理
以前的python2.x的时候: try:         fp=urllib.request.urlopen(blogurl)     except Exception, e:         print (e)         print('download exception %s' % blogurl)         return 0   现在python3.x的时候: ...
分类:编程语言   时间:2014-07-29 14:58:28    阅读次数:279
POJ1579:Function Run Fun(记忆化)
Description We all love recursion! Don't we?  Consider a three-parameter recursive function w(a, b, c):  if a 1  if a > 20 or b > 20 or c > 20, then w(a, b, c) returns:  w(20, 20, 20)  ...
分类:其他好文   时间:2014-07-29 14:54:08    阅读次数:278
HDU 3033 I love sneakers! (DP 01背包+完全背包)
Problem Description After months of hard working, Iserlohn finally wins awesome amount of scholarship. As a great zealot of sneakers, he decides to spend all his money on them in a sneaker store. ...
分类:其他好文   时间:2014-07-29 14:42:05    阅读次数:273
关于Hadoop-Streaming中碰到的问题
Hadoop在分布式计算方面很强大,而Python在文本处理也是相当方便,那么有这两者的结合吗?有,答案就是Hadoop-Streaming。Hadoop-Streaming可以将Hadoop与主流语言结合起来,使用方便,效果很好。个人觉得Pig在处理数据集时很不方便,特别是在计算百分比等运算时,而Hadoop-Streaming是可以替代Pig的。 1.Streaming固定的代码,该代码可以...
分类:其他好文   时间:2014-07-29 14:39:08    阅读次数:340
【美妙的Python之五】标准变量类型-列表,元组与元字典
美妙的Python之列表,元组,元字典        简而言之: Python 是能你无限惊喜的语言,与众不同。        1.列表:         Python的List列表类似于C里面的数组,但拥有更强大的功能,最突出的特点是List列表可以存储混合数据。         List列表可以通过下表[ ]访问,切片[:]进行截取。         如下图示例:        Python同...
分类:编程语言   时间:2014-07-29 14:37:08    阅读次数:222
【leetcode】Pascal's Triangle II (python)
其实每一行的结果是二项式展开的系数,但是考虑到当给定的参数过大的时候,在求组合的过程中会出现溢出(中间过程要用到乘法),但是这样的算法的时间复杂度是O(N),所以在参数不太大的时候,还是不错的。 这里用迭代的方法来求,当然复杂度就高了,是O(N^2),这里主要说下迭代时候的技巧,即在一个列表(数组)里进行迭代,实现如此的操作,要求在求下一行的时候,要从后往前进行,若是从前向后,就把后面要用的变量...
分类:编程语言   时间:2014-07-29 14:35:28    阅读次数:452
iOS_14_tableViewController_xib创建和封装自定义cell
最终效果图: Girl.h // // Girl.h // 12_tableView的增删改 // // Created by beyond on 14-7-27. // Copyright (c) 2014年 com.beyond. All rights reserved. // #import @interface Girl : NSObject // UI控...
分类:移动开发   时间:2014-07-29 14:25:18    阅读次数:258
编写webpy程序,iep 报错,ulipad 运行正确
在web.py编程中,使用模板文件时,iep下会报错。ulipad不会报错。用python 运行不报错。在寻找答案。初步估计是iep的python运行环境有问题。如图:
分类:Web程序   时间:2014-07-29 14:02:58    阅读次数:220
python模块之os和os.path模块
1.os模块os.listdir(dirname) 列出dirname下的目录和文件os.getcwd()函数得到当前工作目录,即当前Python脚本工作的目录路径。os.getenv()和os.putenv()函数分别用来读取和设置环境变量。os.curdir:返回但前目录(’.')os.chd....
分类:编程语言   时间:2014-07-29 13:39:58    阅读次数:303
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!