Skip to content

Instantly share code, notes, and snippets.

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