<commit_before><commit_msg>added collect<commit_after>import json
import ast

def collectData(request):
    array = request.POST.items()[0][0]
    #array is a string
    #array = [s.replace('{', '') for s in array]
    #array = [s.replace('}', '') for s in array]
    splitted = eval(array)

    print splitted['ExcitementShortTerm']
    #json.loads(splitted)
    #excitementShortTerm = request.POST['ExcitementShortTerm']
    #print excitementShortTerm
{'fraction_non_alphanumeric': 0.141280353200883, 'fraction_numerical': 0.004415011037527594, 'mean_word_length': 4.341176470588235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1857367', 'n_tokens_mistral': 144, 'n_tokens_neox': 144, 'n_words': 34}