摘要: import time t1=time.time()def factorial(n): if n==1 or n==2: return 1 else: return factorial(n-1)+factorial(n... 阅读全文
posted @ 2018-06-26 10:27 luoganttcc 阅读(502) 评论(0) 推荐(0) 编辑
摘要: def jiec(n): if n==0: return 1 else: return n*jiec(n-1)ss=jiec(10)print(ss)3628800 阅读全文
posted @ 2018-06-26 10:05 luoganttcc 阅读(269) 评论(0) 推荐(0) 编辑
摘要: c=[]def dcc(dic): for key in dic.keys(): print (key) c.append(key) vv=dic[key] #判断下一级是... 阅读全文
posted @ 2018-06-26 10:03 luoganttcc 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 写在之前…从这篇文章开始,我的下一个算法职业生涯方向将专注于推荐算法…看了那么多书和代码,还是peter 的那本>最为经典,说实话很多中国人写的书确实不怎么样…那么,开始吧.本文代码从赵志勇的那本书上修改而来,估计赵志勇的那篇文章也是从>那本书修改而来,反正... 阅读全文
posted @ 2018-06-24 16:23 luoganttcc 阅读(220) 评论(0) 推荐(0) 编辑
摘要: def PowerSetsRecursive(items): """Use recursive call to return all subsets of items, include empty set""" if len(items)... 阅读全文
posted @ 2018-06-23 21:48 luoganttcc 阅读(332) 评论(0) 推荐(0) 编辑
摘要: kk=5def factorial(n): result = 1 for i in range(2, n+1): result *= i return resultprint(factorial(kk))def factori... 阅读全文
posted @ 2018-06-23 21:44 luoganttcc 阅读(88) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Sat Jun 23 16:59:07 2018@author: luogan"""def PowerSetsBinary(items): ... 阅读全文
posted @ 2018-06-23 17:12 luoganttcc 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 文章链接 阅读全文
posted @ 2018-06-23 16:32 luoganttcc 阅读(75) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python3# -*- coding: utf-8 -*-"""Created on Wed Jun 20 21:02:58 2018@author: luogan"""#coding=UTF-8from numpy impo... 阅读全文
posted @ 2018-06-20 21:11 luoganttcc 阅读(163) 评论(0) 推荐(0) 编辑
摘要: import pandas as pdimport pymysqlfrom sqlalchemy import create_engine#engine = create_engine("mysql+pymysql://user:password@host:... 阅读全文
posted @ 2018-06-19 22:36 luoganttcc 阅读(559) 评论(0) 推荐(0) 编辑