TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

See Which Friends Dont Follow You Back and Vice-versa In Less Than 15 Lines of..Perl

2 点作者 whackberry大约 16 年前
The idea was recently demonstrated in Ruby and was neatly done in 15 lines or less(Anything familiar about the title?). It used a Ruby gem that I couldn't afford, so I had to roll out some Perls of my own.

1 comment

scorpion032大约 16 年前
And in python it takes 8 lines:<p><pre><code> import wrapper ts = wrapper.Twitter() user = 'scorpion032' diff= set(ts.friends.ids(screen_name=user)) - set(ts.followers.ids(screen_name=user)) for i in diff: try: non_fol1 = ts.users.show(id=i) except: continue print "%s with %d followers and %d following" %(non_fol1['name'],non_fol1['followers_count'],non_fol1['friends_count'])</code></pre>
评论 #615309 未加载