<commit_before>#!/usr/bin/python
import os
import sys
import random

from manager import Manager
from environment import Environment

if len(sys.argv) != 2:
    print 'You must supply a filename to run with the codesters library e.g. "python run.py example1.py"'
    exit()

filename = sys.argv[1]

class App(object):

    def __init__(self):
        self.manager = Manager()
        self.canvas = Manager.canvas
        self.root = Manager.root
        self.canvas.pack()
        self.do()
        self.move_one()
        self.animate = None

    def do(self):
        global stage
        stage = Environment()
        print(os.path.dirname(os.path.abspath(__file__)))
        try:
            execfile(filename)
        except Exception:
            print('file not found')

        try:
            execfile(os.path.dirname(os.path.abspath(__file__)) + '/examples/' + filename)
        except Exception:
            print('file not found')


    def move_one(self):
        self.manager.run()<commit_msg>using a seperate file to run examples. example.py now runs a file frome the examples folder<commit_after>#!/usr/bin/python
import os
import sys
import random

from manager import Manager
from environment import Environment

if len(sys.argv) != 2:
    print 'You must supply a filename to run with the codesters library e.g. "python run.py example1.py"'
    exit()

filename = sys.argv[1]

class App(object):

    def __init__(self):
        self.manager = Manager()
        self.canvas = Manager.canvas
        self.root = Manager.root
        self.canvas.pack()
        self.do()
        self.move_one()
        self.animate = None

    def do(self):
        global stage
        stage = Environment()

        try:
            execfile(os.path.dirname(os.path.abspath(__file__)) + '/' + filename)
        except Exception:
            print('file not found')


    def move_one(self):
        self.manager.run()
{'fraction_non_alphanumeric': 0.10463300364393545, 'fraction_numerical': 0.0031233732431025507, 'mean_word_length': 2.2854700854700853, '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': '1950145', 'n_tokens_mistral': 567, 'n_tokens_neox': 546, 'n_words': 161}