- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 Spark Notes
aggregate(zeroValue, seqOp, combOp) zeroValue: 提供的初始值,seqOp 对其进行多次计算应当不改变计算结果,e.g. 0+…+0+x=x, 1*1*…*1*x=x listRDD = sc.parallelize([1,2,3,4], 2) # local_result: zeroValue seqOp = (lambda local_res...
2018-08-10 11:40:25
1238
原创 Git Notes
git add file git commit -m “comments” git diff :查看工作目录和暂存区区别 git diff HEAD:查看工作目录和本地仓库区别 git diff –cached:查看暂存区和本地仓库区别 git log git log –graph:分支合并图 版本回退: git reset –hard commit_id 回到上一个版本:git re...
2018-08-09 10:38:31
258
原创 Python Notes
Python 函数参数传递的方式是 Call-by-Object,或者 Call by Object Reference。当传递 int,str,tuple 等不可变变量时,类似于传值,当传递 list 等可变变量时,类似与传引用。 def test(list_): print id(list_) list_.append(3) print id(list_) ...
2018-08-08 20:48:58
338
转载 Iterator and Iterable
An iterable is an object that has an __iter__ method which returns an iterator, or which defines a __getitem__ method that can take sequential indexes starting from zero (and raises an IndexError wh...
2018-08-08 20:25:47
144
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人