Skip to content

Instantly share code, notes, and snippets.

@ealdent
Created February 5, 2009 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ealdent/58548 to your computer and use it in GitHub Desktop.
Save ealdent/58548 to your computer and use it in GitHub Desktop.
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