摘要:
title: 斯坦福机器学习 线性回归 photos: http://7xrw7v.com1.z0.glb.clouddn.com/bb2cf32cadac65e934ab587c5f456329.png tags: 斯坦福机器学习 date: 2016 09 05 16:34:34 摘要: 单变量 阅读全文
摘要:
```
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by xuehz on 2017/2/23 from collections import OrderedDict import collections print('Regular dictionary:')
d = {}
d['a'] = 'A'
d['b'] = '... 阅读全文
摘要:
```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by xuehz on 2017/2/22 from collections import deque '''
双端队列
>>> q = deque()
>>> q.append(1)
>>> q.append(2)
>>> q.append(3)
>>> q
d... 阅读全文
摘要:
```python #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by xuehz on 2017/2/24 """
怎样从一个集合中获得最大或者最小的N个元素列表?
"""
# heapq模块有两个函数:nlargest() 和 nsmallest() 可以完美解决这个问题。 import heapq
nums = [1, ... 阅读全文