TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

2 pointsby whackberryabout 16 years ago
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

scorpion032about 16 years ago
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 未加载