<commit_before>"""This file provides abstraction over the source of data used in the server"""

import random
import json
import datetime


class DataSource:
    """This class abstracts the underlying system that stores the computed
    features about the developers"""
    def __init__(self):
        pass


class RandomData(DataSource):
    def __init__(self, seed=None):
        r = random.Random(seed)
        print(r.random())

        self.scores = {}
        self.features = ['Python', 'Cookies', 'Chocolate',
                         'Superpowers', 'Doge']
        self.developers = ['Robin', 'Kevin', 'Laurent', 'Xuan',
                           'Frederik', 'Daniel', 'Clément']

        for developer in self.developers:
            scores = {}
            for feature in self.features:
                scores[feature] = r.random()
            self.scores[developer] = scores


class JsonData(DataSource):
    def __init__(self, dev_file, repo_file):
<commit_msg>comments the print of the random value in data.py RandomData class<commit_after>"""This file provides abstraction over the source of data used in the server"""

import random
import json
import datetime


class DataSource:
    """This class abstracts the underlying system that stores the computed
    features about the developers"""
    def __init__(self):
        pass


class RandomData(DataSource):
    def __init__(self, seed=None):
        r = random.Random(seed)
        #print(r.random())

        self.scores = {}
        self.features = ['Python', 'Cookies', 'Chocolate',
                         'Superpowers', 'Doge']
        self.developers = ['Robin', 'Kevin', 'Laurent', 'Xuan',
                           'Frederik', 'Daniel', 'Clément']

        for developer in self.developers:
            scores = {}
            for feature in self.features:
                scores[feature] = r.random()
            self.scores[developer] = scores


class JsonData(DataSource):
    def __init__(self, dev_file, repo_file):

{'fraction_non_alphanumeric': 0.10789210789210789, 'fraction_numerical': 0.0, 'mean_word_length': 2.4180887372013653, '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': '465200', 'n_tokens_mistral': 551, 'n_tokens_neox': 514, 'n_words': 170}