I have shown a simple NodeJS example that calls the SteemIt Wechat API to get the daily ranking table e.g. @dailystats . The average scores for Reputation, Steem Power, Steem, Effective SP, Voting Power, SBD and Account values are calculated.
这年头不缺算法,就缺数据。这两天花了很多时间在整API上,整完之后自己用了一下还觉得真是挺方便的。今天就突然想看一看自己是否给大家拖后腿了,于是调用每日中文区微信群排行榜单的API,刷刷拿着 NodeJs 练手:
// @justyy
var request = require("request")
var url = "https://uploadbeta.com/api/steemit/wechat/?cached";
request({
url: url,
json: true
}, function (error, response, body) {
if (!error && response.statusCode === 200) {
var total = 0;
var total_rep = 0;
var total_sbd = 0;
var total_steem = 0;
var total_value = 0;
var total_esp = 0;
var total_vp = 0;
var total_sp = 0;
body.forEach(function(member) {
total ++;
total_rep += member['rep'];
total_sbd += member['sbd'];
total_steem += member['steem'];
total_value += member['value'];
total_esp += member['esp'];
total_vp += member['vp'];
total_sp += member['sp'];
});
console.log("Total Members = " + total);
console.log("Average Reputation = " + Math.round(total_rep / total * 100) / 100);
console.log("Average SBD = " + Math.round(total_sbd / total * 100) / 100);
console.log("Average Steem = " + Math.round(total_steem / total * 100) / 100);
console.log("Average Effective SP = " + Math.round(total_esp / total * 100) / 100);
console.log("Average SP = " + Math.round(total_sp / total * 100) / 100);
console.log("Average Voting Power = " + Math.round(total_vp / total * 100) / 100);
console.log("Average Account Value = " + Math.round(total_value / total * 100) / 100);
}
})
I use the NodeJs + sublime text 3 on windows to run the above Javascript code.
我是在WINDOWS 下用 sublime text 3 然后下载最新版的 NodeJS 来编写的。NodeJS 虽然是服务端的Javascript, 但是硬生生的被我拿来写些客户端的一些脚本。
需要使用 npm install request
来安装 request 包,代码很清楚 不需要我再过多的解释了。直接出结果:
你拖后腿了么?CN区一下子多了好多大鱼(包括代理SP),一下子把ESP平均指标给拉了上去。
最后,再广告一下:
- SteemIt 好友微信群排行榜
- SteemIt 好友微信群文章列表 RSS Feed
- SteemIt 编程 Geek 微信群,请联系 @justyy 让我拉你入群。
需要入群者 请联系 @tumutanzi 或者 @rivalhw 谢谢。
Originally published at https://steemit.com Thank you for reading my post, feel free to Follow, Upvote, Reply, ReSteem (repost) @justyy which motivates me to create more quality posts.
原文首发于 https://Steemit.com 首发。感谢阅读,如有可能,欢迎Follow, Upvote, Reply, ReSteem (repost) @justyy 激励我创作更多更好的内容。
// Later, it will be reposted to my blogs: justyy.com, helloacm.com and codingforspeed.com 稍后同步到我的中文博客和英文计算机博客。
近期热贴
- 过去7天收益排行榜
- 今天用了机器人给经理请了假
- CN 区优质内容点赞机器人上线了!
- 获取微信群成员关注和粉丝的API
- 高级定制文章列表 RSS/API/阅读器 v2.0
- 一不小心上了公司推 - 公司对我真是真爱啊
- 微信群好友文章列表(网页,JSON API, RSS Feed 2.0)永久免费给大家使用
- 微信公众号(justyyuk)机器人支持 STEEM 查询啦
- 聂小倩 (1)| #5电影
- SteemIt 好友微信群排行榜 - (实时更新版)
Recent Popular Posts
- Daily Top 30 Authors Pending Payout in the Last 7 days
- The Zenefit Bot on Slack
- A Good-Content-Upvote-Bot
- Two APIs to get the followers and following list in the Wechat Group
- The Advanced Wechat Group Posts Feed/API/Reader v2.0
- Wechat Group Sortable Rss Feed (API, RSS Feed and Web UI)
- Wechat bot now supports inquiry for SteemIt Accounts.
- Bruteforce Solution to Mathematics × Programming Competition #5
- SteemIt Daily Wechat Group Ranking
- Voting Weight for SP less than 500
- SteemSQL Tutorial: How to Get Authors Order By Potential Payout in Last 7 days?
Tags: cn cn-programming steemit-api nodejs
所謂的拉拉隊~
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
我也要学习nodejs,这个貌似很火
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
懂程序真好,对外行来说,天书啊!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
node.js 就是 JAVASCRIPT 的服务器版本。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
嗯js我也不怎么会,那玩艺兼容性太烦人了,我用jquery比较多
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
JQuery 就是 JS的一个库而已。。。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
问题是兼容性好呀。比js用着方便。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
jquery 也过时了, 现在是各种框架的天下,比如 react.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
jquery貌似在国内还行,再说这东西好用就行,赶什么时髦哈哈哈
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
steem没达到average 囧
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
应该看 SP,STEEM/SBD这个参考意义不大。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
妥妥的拖后腿了~
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
The Average, Median, STD of SteemIt Wechat Group 数据初步分析系列 STEEM中文微信群排行榜单 - 中位数,平均,和标准方差
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
就算不看effective sp, 只看sp平均也有1500,很不错👍
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hello I see you are just starting out on Steemit
Down below I have provided 1 links
Steam follower
Using these 1 applications they will help you a great deal to receive more followers
I hope this information is useful let me know what you think. Look forward to hearing from you good luck...
Steemfollower
https://steemfollower.com/?r=2438
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
超级厉害
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@sweetcoin 也沒被排進去~可能我太透明了哈哈
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
刚加上,2小时内更新缓存,美女你不在微信群里么?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
我一直都在的!我把圖片換的跟steemit一樣好了~ 還有我是男的哈哈,在群裡有暴照過阿
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
深感自惭形秽,从小到大几乎没有一件事是不拖后腿的。上学的时候拉低了班级平均分,工作以后拉低了人均收入,现在又给 steemit 拖后腿了……
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
哈哈哈,同行飘过
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
严重拖后腿 需要抱个大腿
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
我紧抱嫂子大腿。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@yellowbird 昨天刚加入微信群,目前还没看到上排名,求入排行榜! 这些排名有意思,写文章像升级打怪一样~~~
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
已经加到列表里,2小时内更新缓存
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
大大的拖后腿了
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
相信我也是拖後腿的朋友,我会努力的 XD
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
应该代表多数人的统计数据才更有说服力
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
是的,我会慢慢 学习改进。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
那我肯定是拖后腿的那撮……
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
不一定:看今天的更新 The Average, Median, STD of SteemIt Wechat Group 数据初步分析系列 STEEM中文微信群排行榜单 - 中位数,平均,和标准方差
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
拖后腿+1!
随着每天微信群人数的增加,每天微信群排名都在掉
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
晚上弄一个中位数的,那么如果人数增加,“平均”水平就在降低。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
分布上总是要有拖尾的,没有绿叶哪里衬托的了红花
我认了
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
哈哈,努努力, 争取早日脱贫。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
你要不要给拖尾的大部分人写个 脱贫指南?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
我自己还在贫困线上挣扎……
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
这话说的,你觉得大伙儿信吗
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
我还在底层蹦跶= =
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
加油,搞不好哪天就飞黄腾达了
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
好驚悚的標題,嚇死妹子了
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
哈哈,妹子别怕,有哥在。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
还未入群,申请入群!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
需要入群者 请联系 @tumutanzi 或者 @rivalhw 谢谢。
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
拖后腿了....需要加油了
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit