码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
LeetCode: Combinations [077]
【题目】 Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example, S = "ADOBECODEBANC" T = "ABC" Minimum window is "BANC". Note: If there is no such window in S that covers ...
分类:其他好文   时间:2014-06-05 11:14:26    阅读次数:255
python无私有成员变量
python解释器将__init__函数里的__z变量转成 _classname__z了,明白规则后外部依然可以通过实力对象来访问。 In [1]: class aa: ...: def __init__(self): ...: self.x = 10 ...: self.y = 11 ...: self.__z =...
分类:编程语言   时间:2014-06-05 10:25:10    阅读次数:346
LeetCode: Minimum Window Substring [076]
【题目】 Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example, S = "ADOBECODEBANC" T = "ABC" Minimum window is "BANC". Note: If there is no such window in S that covers ...
分类:Windows程序   时间:2014-06-05 10:03:07    阅读次数:473
Python中strip方法的妙用
【开胃小菜】 当提到python中strip方法,想必凡接触过python的同行都知道它主要用来切除空格。有以下两种方法来实现。 方法一:用内置函数 # if __name__ == '__main__':     str = ' Hello world '     print '[%s]' %str.strip() # 方法二:调用string模块中方法 # import s...
分类:编程语言   时间:2014-06-05 09:27:48    阅读次数:330
神经网络python 实现
感知器学习算法步骤如下: 1.对权系数w置初值 对权系数w=(W1 .W2 ,…,Wn ,Wn+1 )的各个分量置一个较小的零随机值,但Wn+1 = —g。并记为Wl (0),W2 (0),…,Wn (0),同时有Wn+1(0)=-θ 。这里Wi (t)为t时刻从第i个 输入上的权系数,i=1,2,…,n。Wn+1 (t)为t时刻时的阀值。 图1-10 感知器的分类例...
分类:编程语言   时间:2014-06-05 08:55:11    阅读次数:448
CentOs 中显示乱码问题
vi /etc/sysconfig/i18n LANG="en_US.UTF-8"SUPPORTED="en_US.UTF-8:en_US:en"SYSFONT="latarcyrheb-sun16"source /etc/sysconfig/i18n以及export LC_ALL=zh_CN.UT...
分类:其他好文   时间:2014-05-31 14:02:03    阅读次数:266
selenium_webdriver(python)的第一个脚本
首先要感谢一下“虫师”的教程(“http://fnng.cnblogs.com”),讲解的很细致,让我这个第一次接触selenium的菜鸟成功的完成环境的搭建(当然是连带场外支援)和教程中的第一个脚本。 1.环境搭建的波折经历 firstly,python的安装,包括python.org、setu....
分类:编程语言   时间:2014-05-31 06:22:26    阅读次数:323
Aizu 1335 Equal Sum Sets
DescriptionLet us consider sets of positive integers less than or equal ton. Note that all elements of a set are different. Also note that the order o...
分类:其他好文   时间:2014-05-31 05:12:49    阅读次数:246
Python的包管理工具Pip (zz )
Python的包管理工具Pip 接触了Ruby,发现它有个包管理工具RubyGem很好用,并且有很完备的文档系统http://rdoc.info发现Python下也有同样的工具,包括easy_install和Pip。不过,我没有细看easy_install的方法,这就简单的介绍一下Pip的安装与使....
分类:编程语言   时间:2014-05-31 03:06:10    阅读次数:257
python 学习笔记
1.操作符 与Java和C中十分类似, +(加), -(减), *(乘), /(除), %(求余), **(指数运算), = (赋值).以及减便运算,如 +=, -=, *=和/= 等.赋值运算与其他语言一致.逻辑操作> = != ==与其他语言一样.不一样的有not逻辑非,and逻辑与和or逻辑或...
分类:编程语言   时间:2014-05-31 01:44:52    阅读次数:356
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!