<commit_before>#! usr/bin/python

import argparse
import time
import numpy as np
import matplotlib.pyplot as plt

size = 50

def main(result_file):
    if result_file == None:
        raise ValueError('Result file was not added.')

    data = np.genfromtxt(result_file ,delimiter=",")

    idx = 0;
    plt.figure(1)
    plt.ion()
    plt.xlim(-size, size)
    plt.ylim(-size, size)
    plt.axis('equal')
    nbr_bodies_start = 0
    nbr_bodies_end = 0
    while idx < len(data):
        mass = []
        x = []
        y = []
        time = data[idx, 0]
        while data[idx,0] == time:
            mass.append(data[idx,1])
            x.append(data[idx,2])
            y.append(data[idx,3])
            if time==0:
                nbr_bodies_start = len(x)
            idx+=1
            if idx==len(data):
                nbr_bodies_end = len(x)
                break

        plt.clf()
        plt.plot(x,y, 'bo')
        plt.axis('equal')
        plt.xlim(-size, size)
        plt.ylim(-size, size)
        plt.title(time)
        plt.pause(0.001)

    print "Number bodies at the beginning of the simulation: %s"%nbr_bodies_start
    print "Number bodies at the end of the simulation: %s"%nbr_bodies_end
    print "Percentage of bodies lost: %s %%"%((float(nbr_bodies_start)-float(nbr_bodies_end))/float(nbr_bodies_start)*100)

if __name__ == "__main__":
    argParser = argparse.ArgumentParser()
    argParser.add_argument('-f', '--file', help='Result file. ')
    parsed = argParser.parse_args()
    main(parsed.file)
<commit_msg>TEST: Check if I'm recognized again in Github<commit_after>#! usr/bin/python

import argparse
import time
import numpy as np
import matplotlib.pyplot as plt

size = 30

def main(result_file):
    if result_file == None:
        raise ValueError('Result file was not added.')

    data = np.genfromtxt(result_file ,delimiter=",")

    idx = 0;
    plt.figure(1)
    plt.ion()
    plt.xlim(-size, size)
    plt.ylim(-size, size)
    plt.axis('equal')
    nbr_bodies_start = 0
    nbr_bodies_end = 0
    while idx < len(data):
        mass = []
        x = []
        y = []
        time = data[idx, 0]
        while data[idx,0] == time:
            mass.append(data[idx,1])
            x.append(data[idx,2])
            y.append(data[idx,3])
            if time==0:
                nbr_bodies_start = len(x)
            idx+=1
            if idx==len(data):
                nbr_bodies_end = len(x)
                break

        plt.clf()
        plt.plot(x,y, 'bo')
        plt.axis('equal')
        plt.xlim(-size, size)
        plt.ylim(-size, size)
        plt.title(time)
        plt.pause(0.001)

    print "Number bodies at the beginning of the simulation: %s"%nbr_bodies_start
    print "Number bodies at the end of the simulation: %s"%nbr_bodies_end
    print "Percentage of bodies lost: %s %%"%((float(nbr_bodies_start)-float(nbr_bodies_end))/float(nbr_bodies_start)*100)

if __name__ == "__main__":
    argParser = argparse.ArgumentParser()
    argParser.add_argument('-f', '--file', help='Result file. ')
    parsed = argParser.parse_args()
    main(parsed.file)

{'fraction_non_alphanumeric': 0.13230571612074501, 'fraction_numerical': 0.012845215157353885, 'mean_word_length': 2.238045738045738, 'pattern_counts': {'":': 2, '<': 5, '<?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': '64388', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1074, 'n_words': 241}