Created
March 1, 2013 09:54
-
-
Save robdudley/5063630 to your computer and use it in GitHub Desktop.
Soft capped twitter score calc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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