<commit_before>import sys
from datetime import datetime
from django.core.management.base import NoArgsCommand

from django.contrib.auth.models import User

from pytask.taskapp.events import task as taskEvents
from pytask.taskapp.events import user as userEvents


def seed_db():
    """ a method to seed the database with random data """
    
    defaultMentor = userEvents.createSuUser("admin", "<EMAIL>", "123456", datetime.now(), "M")
    mentor_profile = defaultMentor.get_profile()
    userEvents.updateProfile(mentor_profile, {'rights':"AD"})
    
    for i in range(1,10):
        
        username = 'user'+str(i)
        email = username+'<EMAIL>'
        password = '<PASSWORD>'
        dob = datetime.now()
        gender = "M"
        userEvents.createUser(username,email,password,dob,gender)

    for i in range(1,6):
        
        title = "Task "+str(i)
        desc = "I am "+title
        created_by = defaultMentor
        credits = 20
        <commit_msg>seed_db now creates 20 tasks.<commit_after>import sys
from datetime import datetime
from django.core.management.base import NoArgsCommand

from django.contrib.auth.models import User

from pytask.taskapp.events import task as taskEvents
from pytask.taskapp.events import user as userEvents


def seed_db():
    """ a method to seed the database with random data """
    
    defaultMentor = userEvents.createSuUser("admin", "<EMAIL>", "123456", datetime.now(), "M")
    mentor_profile = defaultMentor.get_profile()
    userEvents.updateProfile(mentor_profile, {'rights':"AD"})
    
    for i in range(1,10):
        
        username = 'user'+str(i)
        email = username+'@<EMAIL>'
        password = '<PASSWORD>'
        dob = datetime.now()
        gender = "M"
        userEvents.createUser(username,email,password,dob,gender)

    for i in range(1,21):
        
        title = "Task "+str(i)
        desc = "I am "+title
        created_by = defaultMentor
        credits = 20
        
{'fraction_non_alphanumeric': 0.1116751269035533, 'fraction_numerical': 0.014720812182741117, 'mean_word_length': 2.87992125984252, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5549254', 'n_tokens_mistral': 609, 'n_tokens_neox': 587, 'n_words': 158}