Skip to content

Instantly share code, notes, and snippets.

@robdudley
Created March 1, 2013 09:54
Show Gist options
  • Save robdudley/5063630 to your computer and use it in GitHub Desktop.
Save robdudley/5063630 to your computer and use it in GitHub Desktop.
Soft capped twitter score calc
from math import *
def getTwitterScore(numTweets):
cappedScore = (round(log(numTweets * 10)) * 4) + 25
if (cappedScore > numTweets):
score = numTweets
else:
score = cappedScore
return score
for x in range(1, 150):
print(getTwitterScore(x), x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment