Skip to content

Instantly share code, notes, and snippets.

@ratpik
Created June 26, 2012 11:43
Show Gist options
  • Save ratpik/2995323 to your computer and use it in GitHub Desktop.
Save ratpik/2995323 to your computer and use it in GitHub Desktop.
Ranking system
def calculate_score(votes, item_hour_age, gravity=1.8):
return (votes - 1) / pow((item_hour_age+2), gravity)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment