本文整理汇总了Python中users.Users.getFollowerAndStar方法的典型用法代码示例。如果您正苦于以下问题:Python Users.getFollowerAndStar方法的具体用法?Python Users.getFollowerAndStar怎么用?Python Users.getFollowerAndStar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类users.Users
的用法示例。
在下文中一共展示了Users.getFollowerAndStar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: updateUser
# 需要导入模块: from users import Users [as 别名]
# 或者: from users.Users import getFollowerAndStar [as 别名]
def updateUser():
conn = MySQLdb.connect(host='127.0.0.1',user='root',passwd='******',db='github')
cur = conn.cursor()
with open("/Users/dreamteam/Documents/study/sonar/results/oss developer evaluation/update_star_num.csv") as seed:
reader = csv.reader(seed)
next(reader,None)
mUsers = Users(conn,cur,1,'1','1',"2016-03-01 00:00:00")
for line in reader:
mUsers.getFollowerAndStar(str(line[1]))
示例2: run
# 需要导入模块: from users import Users [as 别名]
# 或者: from users.Users import getFollowerAndStar [as 别名]
def run(conn,cur,repo_id,repo_name,repo_fullname,deadline):
try:
# mIssues = Issues(conn,cur,repo_id,repo_fullname)
# mIssues.get_issues(1)
# mIssues.get_issue_comments(1)
# mCommits = Commits(conn,cur,repo_id,repo_fullname)
# mCommits.get_commits(1)
# mCommits.get_commit_comments(1)
mUsers = Users(conn,cur,repo_id,repo_name,repo_fullname,deadline)
# # starts from 0
# mUsers.updateUsers(0)
# mUsers.connectUser()
mUsers.getFollowerAndStar(0)
except MySQLdb.Error, e:
print "Mysql Error!", e;