Skip to content

Instantly share code, notes, and snippets.

@sorenmacbeth
Forked from ealdent/tunkrank.rb
Created May 27, 2010 23:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
class TwitterUser
def calculate_tunkrank(p=0.05)
self.followers.inject(0.0) do |sum, follower|
sum + ((1.0 + (p * follower.tunkrank_score)) / (1.0 + follower.num_friends))
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment