Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Calculating ratio while removing edge cases (of low views or low subscribers)
# Calculating ratio while removing edge cases (of low views or low subscribers)
def custom_score(viewcount, ratio, days_since_published):
ratio = min(ratio, 5)
score = (viewcount * ratio)
return score
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment