├── README.md └── algorithm.py /README.md: -------------------------------------------------------------------------------- 1 | # Coders Club Algorithm 2 | 3 | This algorithm is used to calculate developer points in codersclub.co. Feel free to PR this repo if you have a better solution for this and we will update the whole thing if it makes sense! 4 | -------------------------------------------------------------------------------- /algorithm.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | repoStarCount = 30 # how many star does your repo have on GitHub, 30 is example 4 | repoDaysCreated = 500 # days passed after your repo has been created on GitHub, 500 is example 5 | repoInsertedLines = 1000 # how many lines of code has been added by you on your repo on GitHub, 1000 is example 6 | 7 | repoSignificanceFactor = 3 ** math.log(repoStarCount+1,10) 8 | repoAgingFactor = math.e ** (-repoDaysCreated/1095) 9 | repoSlocFactor = 2 ** math.log(repoInsertedLines+1,1000) 10 | gitHubScore = repoSignificanceFactor * repoAgingFactor * repoSlocFactor 11 | 12 | stackOverFlowScore = 10 # stackoverflow score coming directly from StackOverFlow API 13 | 14 | totalScore = 0.8 * gitHubScore + 0.2 * stackOverFlowScore # 80% GitHub, 20% Stackoverflow coefficient 15 | --------------------------------------------------------------------------------