First we define the model.


In [ ]:
from textblob.classifiers import NaiveBayesClassifier

def model_training():
    
def model_evaluate():

Now we've got to use some training data.


In [ ]:

Then we use that model to get our analysis output, based on the user input.


In [ ]:
from github import Github
from random import randint


g = Github("chunkzer", "fhd4password")
input_string = "facebook/react" #Replaced with user given string
repo = g.get_repo(input_string, False)
root_dir = repo.get_git_tree(sha="master", recursive=True)


fileHash = {}

for file in root_dir.tree:
    fileHash[file.path] = [0,0,0,0]
    
for key in magicHash:
    commits = repo.get_commits(path=key)
    for commit in commits:
        fileHash[key][randint(0,3)]+= 1 #Replace with model results.

print g.rate_limiting