Skip to content

Instantly share code, notes, and snippets.

@chris-lovejoy
Created November 21, 2020 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris-lovejoy/78a63284556b76116fde60f03a95c5aa to your computer and use it in GitHub Desktop.
Save chris-lovejoy/78a63284556b76116fde60f03a95c5aa to your computer and use it in GitHub Desktop.
Adding days since published into custom score
# Adding days since published into custom score
def custom_score(viewcount, ratio, days_since_published):
if ratio > 5:
ratio = 5
score = (viewcount * ratio) / days_since_published
return score
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment