摘要: itemgetter的使用 itemgetter函数用于获取对象的指定维的数据 阅读全文
posted @ 2016-07-09 09:49 4Thing 阅读(93) 评论(0) 推荐(0) 编辑
摘要: attrgetter的使用 attrgetter函数用于获取对象的指定属性值 阅读全文
posted @ 2016-07-09 09:49 4Thing 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 使用slice截取数组和字符串 阅读全文
posted @ 2016-07-09 09:46 4Thing 阅读(85) 评论(0) 推荐(0) 编辑
摘要: ``` python from collections import Counter words = [ 'look', 'into', 'my', 'eyes', 'look', 'into', 'my', 'eyes', 'the', 'eyes', 'the', 'eyes', 'the', 'eyes', 'not', 'around' 阅读全文
posted @ 2016-07-09 09:46 4Thing 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 列表和字典的去重 lambda在字典的去重中的使用 阅读全文
posted @ 2016-07-09 09:42 4Thing 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 并集、差集、合集操作 推导 阅读全文
posted @ 2016-07-09 09:36 4Thing 阅读(77) 评论(0) 推荐(0) 编辑
摘要: zip的使用 获取最大和最小值 使用lambda定义最大和最小值的计算规则 阅读全文
posted @ 2016-07-09 09:30 4Thing 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 参考 https://pypi.python.org/pypi/psutil/ "CPU Affinity (CPU亲合力)" "也看linux内存去哪儿了" "Real UID,Effective UID,Saved UID" "top显示的内存各项参数解析" "Android内存分析和调优(上) 阅读全文
posted @ 2016-07-09 00:39 4Thing 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 场景 没种仪表工厂都实现了生产仪表的接口,不同的工厂生产不同仪表 实现代码 仪表接口: 仪表A实现: 仪表B实现: 工厂接口: A工厂实现: B工厂实现: 相关调用 Out: 阅读全文
posted @ 2016-07-09 00:11 4Thing 阅读(119) 评论(0) 推荐(0) 编辑
摘要: OrderedDict的使用 阅读全文
posted @ 2016-07-08 23:28 4Thing 阅读(71) 评论(0) 推荐(0) 编辑