Open zhf opened 11 years ago
@zhf 全部数据的版本现在能用了~~地址在这里~~正在研究如何通过url的请求参数来设置是一天还是一周还是全时间~~目测不太好办。。
PS:被 @hit9 成功刷榜了~~
现在的结果是:
➜ voidmain@MBP ~ curl -X GET "http://61.167.60.58:5984/secreek-event-dump/_design/secreek-event-dump/_view/status"
{"rows":[
{"key":null,"value":{"zhf":179,"wangxiaomo":3,"void-main":184,"ultragtx":119,"tonyzhu":6,"tonyseek":1,"takanoter":1,"secreek":10,"KJlmfe":23,"hit9":331,"DeathKing":2,"cliffwoo":28}}
]}
过去的数据源格式权且叫做 Hackatus for Hackathon 吧。这里的数据源今后称为 Hackatus for Leaderboard,同样要符合 Panic 的协议。
统计个人活跃程度的 Leaderboard。
字段:
8
,需要最近1小时 4
个 events (commits*push) 以上;一周内有 events 最少算 2
,一个月内有 events 最少算 1
。显示每个人的 Score。算法见上面的定义。
@zhf , I've implemented the hackatus for leaderboard, and made some modifications to hackatus for hackathon.
type=explore
to explore, this take a parameter called period
as well. Period can be day
, week
or month
, any other values will be treated as day
PushEvent
into consideration while calculating hotness, similar to Github contributePlease test them, and post some screenshots, thanks!
:)
Hotness table (Chrome)
Last Hackathon (Chrome)
Explore Github (Chrome) fancy ,libgit2 这几个是placeholder ?
@cliffwoo 谢谢老师~~
这些得放到那个Panic的应用里面~~不然没有css所以看着比较奇怪~~
至于explore那个,看来是他们页面改版了。。之前的正则出问题了。。
整体效果完全符合期待, hotness 的跨度看起来很完美,赞数学家。
马上要去 review 耿彪的项目,晚上回来聊。
PS: 今晚发两个外包做 Badges。
API for user contribution to our organization
INPUT
secreek
as organization nameOUTPUT
Github API
http://developer.github.com/v3/activity/events/ http://developer.github.com/v3/activity/events/types/
How to calculate the scores
+2
per CommitCommentEvent+10
per CreateEvent+5
per DeleteEvent+3
per DownloadEvent+1
per FollowEvent+3
per ForkEvent+5
per ForkApplyEvent+5
per GistEvent+3
per GollumEvent+1
per IssueCommentEvent+3
per IssuesEvent+10
per MemberEvent+10
per PublicEvent+5
per PullRequestEvent+2
per PullRequestReviewCommentEvent+3
per Commit per PushEvent+0
per TeamAddEvent+1
perWatchEvent