<commit_before>from query_designer.models import Query

# Create your tests here.

def trim_year(full_date):
    year = full_date.__str__()
    year = year.split("-")
    return int(year[0])

def get_data(markers, ship, minyear, maxyear):
    q = Query.objects.get(pk=2)
    q.document['limit'] = markers
    #import pdb;pdb.set_trace()
    result = q.execute()['results']
    length = len(result) - 1
    data = []
    for index in range(0, length):
        d = result[index]
        entry_year = trim_year(d[2])
        if ship != "all":
            ship = int(ship)
            if d[1] != ship:
                continue
        if entry_year >= minyear or entry_year <= maxyear:
            data.append([float(d[3]), float(d[4]), int(d[1]), str(d[2]), float(d[0])])
    return data<commit_msg>fixed errors in map course time visualization<commit_after>from query_designer.models import Query

# Create your tests here.

def trim_year(full_date):
    year = full_date.__str__()
    year = year.split("-")
    return int(year[0])

def get_data(markers, ship, minyear, maxyear):
    q = Query.objects.get(pk=75)
    q.document['limit'] = markers
    #import pdb;pdb.set_trace()
    result = q.execute()[0]['results']
    length = len(result) - 1
    data = []
    for index in range(0, length):
        d = result[index]
        entry_year = trim_year(d[4])
        if ship != "all":
            ship = int(ship)
            if d[1] != ship:
                continue
        if entry_year >= minyear or entry_year <= maxyear:
            data.append([float(d[2]), float(d[3]), int(d[1]), str(d[4]), float(d[0])])
    return data
{'fraction_non_alphanumeric': 0.14987714987714987, 'fraction_numerical': 0.014742014742014743, 'mean_word_length': 2.596026490066225, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, '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': '71639', 'n_tokens_mistral': 550, 'n_tokens_neox': 543, 'n_words': 133}