码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
python中的各种排序
#encoding=utf-8import randomfrom copy import copy def directInsertSort(seq): """ 直接插入排序 """ size = len(seq) for i in range(1,size): t...
分类:编程语言   时间:2014-07-16 18:11:59    阅读次数:255
python中将字典转换成定义它的json字符串
Python的字典和JSON在表现形式上非常相似#这是Python中的一个字典 dic = { 'str': 'this is a string', 'list': [1, 2, 'a', 'b'], 'sub_dic': { 'sub_str': 'this is sub str', 'sub_l...
分类:编程语言   时间:2014-07-16 18:09:52    阅读次数:301
[leetcode]Generate Parentheses
Generate ParenthesesGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a sol...
分类:其他好文   时间:2014-07-16 18:07:04    阅读次数:146
python 实现求和、计数、最大最小值、平均值、中位数、标准偏差、百分比。
import sys class Stats: def __init__(self, sequence): # sequence of numbers we will process # convert all items to floats for numeri...
分类:编程语言   时间:2014-07-16 18:06:48    阅读次数:257
替换NSString类中的stringWithFormat:方法
替换NSString类中的stringWithFormat:方法先给出源码:YXUseful.h//// YXUseful.h// NSString//// Copyright (c) 2014年 Y.X. All rights reserved.//#import NSString * St...
分类:其他好文   时间:2014-07-16 18:06:23    阅读次数:182
[leetcode]Restore IP Addresses
Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"255255...
分类:其他好文   时间:2014-07-16 18:03:41    阅读次数:157
python抓取网页
一 不需要登录的import urllib2content = urllib2.urlopen('http://XXXX').read() 二 使用代理import urllib2proxy_support = urllib2.ProxyHandler({'http':'http://XX.XX.....
分类:编程语言   时间:2014-07-16 17:58:39    阅读次数:226
[leetcode]Letter Combinations of a Phone Number
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ...
分类:其他好文   时间:2014-07-16 17:54:24    阅读次数:222
《Python基础教程》第20章学习笔记
详见https://github.com/captainwong/instant_markup...
分类:编程语言   时间:2014-07-16 09:34:59    阅读次数:297
Ansible@一个高效的配置管理工具--Ansible configure management--翻译(十一)
无书面授权,请勿转载 第五章 自定义模块 Using a module Now that we have written our very first module for Ansible, we should give it a go in a playbook. Ansible looks at several places for its modules: first it looks ...
分类:其他好文   时间:2014-07-16 09:14:31    阅读次数:376
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!