
python
文章平均质量分 68
比特C
这个作者很懒,什么都没留下…
展开
-
解决linux(Ubuntu)下Pydev无法安装的问题
环境:Ubuntu12.04-amd64原创 2014-05-14 21:57:06 · 2272 阅读 · 1 评论 -
python学习笔记:泊松分布和负指数分布随机数的python实现
泊松分布def poisson(L): """ poisson distribution return a integer random number, L is the mean value """ p = 1.0 k = 0 e = math.exp(-L) while p >= e: u = random.r原创 2014-04-28 14:36:49 · 14792 阅读 · 1 评论 -
有向图找环的python实现
def findcircle(G): """ color = 0 hasn't been visited color = -1 be visited once color = 1 has been dfs, all children of the spot has been visited """ def dfs(G,i,color,is_DAG):原创 2014-06-17 20:35:04 · 5109 阅读 · 0 评论