<commit_before>#!/usr/bin/python
"""
filename: SketchSystem.py

Description:
   This is the root program that loads everything necessary to run the Sketch application.
   Within the main function, it either runs WebMain to output drawing strings to a web server
   or StandaloneMain to load a Tkinter interface on the local machine.

   Initialization of all the observers should occur in Initialize, since multiple initializations
   of the same observer may lead to multiple instances of that observer modifying board objects.

Todo:
   Consolidate all interface code into the SketchGUI module so that the interface can be swapped
   out by just changing that file.
"""

import sys


from Observers import CircleObserver
from Observers import RaceTrackObserver
from Observers import LineObserver
from Observers import ArrowObserver
from Observers import DiGraphObserver
from Observers import TextObserver
from Observers import DebugObserver
from Observers import TemplateObserver
from Observers import TuringMachineObserver
from Observers import TestAnimObserver
from Observers import RubineObserver
from Bin import BinObserver, EqualsObserver, PlusObserver, MinusObserver, DivideObserver, MultObserver, ExpressionObserver, EquationObserver, DirectedLine
from Observers import NumberObserver
import SketchSystem
import DataManager

globtest = False

def initialize(Board):
    " This function calls the board and board observer initialization code. Interface code should import this function"

    Board.Reset()
    #d = DebugObserver.DebugObserver()
   # d.trackAnnotation(DataManager.DataManager.)

    if SketchSystem.globtest:
        pass
    else:
        #TestAnimObserver.TestMarker()
        #TestAnimObserver.TestAnimator(fps = 1 / 3.0)
        #RaceTrackObserver.SplitStrokeMarker()
        #RaceTrackObserver.SplitStrokeVisualizer()
        #RaceTrackObserver.RaceTrackMarker()
        #RaceTrackObserver.RaceTrackVisualizer()
        #CircleObserver.CircleMarker()
        #CircleObserver.CircleVisualizer()
        #ArrowObserver.ArrowMarker()
        #ArrowObserver.ArrowVisualizer()
        LineObserver.LineMarker()
        LineObserver.LineVisualizer()
        #TextObserver.TextCollector()
        #TextObserver.TextVisualizer()
        #DiGraphObserver.DiGraphMarker()
        #DiGraphObserver.DiGraphVisualizer()
        #DiGraphObserver.DiGraphExporter()
        #TuringMachineObserver.TuringMachineCollector()
        #TuringMachineObserver.TuringMachineAnimator()
        #TuringMachineObserver.TuringMachineExporter()
        
        #TemplateObserver.TemplateMarker()
        #TemplateObserver.TemplateVisualizer()

        RubineObserver.RubineMarker("rubine.dat", debug=False)
        #Rubine.RubineVisualizer()

        DirectedLine.DirectedLineMarker()

        NumberObserver.NumCollector()
        NumberObserver.NumVisualizer()

        #BinObserver.BinCollector()
        #BinObserver.BinVisualizer()
        EqualsObserver.EqualsMarker()
        EqualsObserver.EqualsVisualizer()
        PlusObserver.PlusMarker()
        PlusObserver.PlusVisualizer()
        MinusObserver.MinusMarker()
        MinusObserver.MinusVisualizer()
        DivideObserver.DivideMarker()
        DivideObserver.DivideVisualizer()
        MultObserver.MultMarker()
        MultObserver.MultVisualizer()
        ExpressionObserver.ExpressionObserver()
        ExpressionObserver.ExpressionVisualizer()
        #EquationObserver.EquationObserver()
        #EquationObserver.EquationVisualizer()
        
        #
        #d.trackAnnotation(TestAnimObserver.TestAnnotation)
        #d.trackAnnotation(MSAxesObserver.LabelMenuAnnotation)
        #d.trackAnnotation(MSAxesObserver.LegendAnnotation)
        #d.trackAnnotation(LineObserver.LineAnnotation)
        #d.trackAnnotation(ArrowObserver.ArrowAnnotation)
        #d.trackAnnotation(MSAxesObserver.AxesAnnotation)
        #d.trackAnnotation(TemplateObserver.TemplateAnnotation)
        #d.trackAnnotation(CircleObserver.CircleAnnotation)
        #d.trackAnnotation(RaceTrackObserver.RaceTrackAnnotation)
        #d.trackAnnotation(RaceTrackObserver.SplitStrokeAnnotation)
        
        #d.trackAnnotation(TuringMachineObserver.TuringMachineAnnotation)
        #d.trackAnnotation(DiGraphObserver.DiGraphAnnotation)
        #d.trackAnnotation(TextObserver.TextAnnotation)
        #d.trackAnnotation(BarAnnotation)
    

def standAloneMain():
    "Sets up the SketchGUI interface on the local machine"
    from SketchFramework import SketchGUI as GUI
    #GUI.LoadApp()
    GUI.run()

if __name__ == '__main__':
   

    # to aviod loading all the obsevers when using the data manager,
    # pass the command line arg, "Test"
    if (len(sys.argv) > 1):
        if sys.argv[1] == "test":
            SketchSystem.globtest = True

    standAloneMain()
 <commit_msg> changed a letter to lower case<commit_after>#!/usr/bin/python
"""
filename: SketchSystem.py

Description:
   This is the root program that loads everything necessary to run the Sketch application.
   Within the main function, it either runs WebMain to output drawing strings to a web server
   or StandaloneMain to load a Tkinter interface on the local machine.

   Initialization of all the observers should occur in Initialize, since multiple initializations
   of the same observer may lead to multiple instances of that observer modifying board objects.

Todo:
   Consolidate all interface code into the SketchGUI module so that the interface can be swapped
   out by just changing that file.
"""

import sys


from Observers import CircleObserver
from Observers import RaceTrackObserver
from Observers import LineObserver
from Observers import ArrowObserver
from Observers import DiGraphObserver
from Observers import TextObserver
from Observers import DebugObserver
from Observers import TemplateObserver
from Observers import TuringMachineObserver
from Observers import TestAnimObserver
from Observers import RubineObserver
from Bin import BinObserver, EqualsObserver, PlusObserver, MinusObserver, DivideObserver, MultObserver, ExpressionObserver, EquationObserver, DirectedLine
from Observers import NumberObserver
import SketchSystem
import DataManager

globtest = False

def initialize(Board):
    " This function calls the board and board observer initialization code. Interface code should import this function"

    Board.Reset()
    #d = DebugObserver.DebugObserver()
   # d.trackAnnotation(DataManager.DataManager.)

    if SketchSystem.globtest:
        pass
    else:
        #TestAnimObserver.TestMarker()
        #TestAnimObserver.TestAnimator(fps = 1 / 3.0)
        #RaceTrackObserver.SplitStrokeMarker()
        #RaceTrackObserver.SplitStrokeVisualizer()
        #RaceTrackObserver.RaceTrackMarker()
        #RaceTrackObserver.RaceTrackVisualizer()
        #CircleObserver.CircleMarker()
        #CircleObserver.CircleVisualizer()
        #ArrowObserver.ArrowMarker()
        #ArrowObserver.ArrowVisualizer()
        LineObserver.LineMarker()
        LineObserver.LineVisualizer()
        #TextObserver.TextCollector()
        #TextObserver.TextVisualizer()
        #DiGraphObserver.DiGraphMarker()
        #DiGraphObserver.DiGraphVisualizer()
        #DiGraphObserver.DiGraphExporter()
        #TuringMachineObserver.TuringMachineCollector()
        #TuringMachineObserver.TuringMachineAnimator()
        #TuringMachineObserver.TuringMachineExporter()
        
        #TemplateObserver.TemplateMarker()
        #TemplateObserver.TemplateVisualizer()

        RubineObserver.RubineMarker("rubine.dat", debug=False)
        #Rubine.RubineVisualizer()

        DirectedLine.DirectedLineMarker()

        NumberObserver.NumCollector()
        NumberObserver.NumVisualizer()

        #BinObserver.BinCollector()
        #BinObserver.BinVisualizer()
        EqualsObserver.EqualsMarker()
        EqualsObserver.EqualsVisualizer()
        PlusObserver.PlusMarker()
        PlusObserver.PlusVisualizer()
        MinusObserver.MinusMarker()
        MinusObserver.MinusVisualizer()
        DivideObserver.DivideMarker()
        DivideObserver.DivideVisualizer()
        MultObserver.MultMarker()
        MultObserver.MultVisualizer()
        ExpressionObserver.ExpressionObserver()
        ExpressionObserver.ExpressionVisualizer()
        #EquationObserver.EquationObserver()
        #EquationObserver.EquationVisualizer()
        
        #
        #d.trackAnnotation(TestAnimObserver.TestAnnotation)
        #d.trackAnnotation(MSAxesObserver.LabelMenuAnnotation)
        #d.trackAnnotation(MSAxesObserver.LegendAnnotation)
        #d.trackAnnotation(LineObserver.LineAnnotation)
        #d.trackAnnotation(ArrowObserver.ArrowAnnotation)
        #d.trackAnnotation(MSAxesObserver.AxesAnnotation)
        #d.trackAnnotation(TemplateObserver.TemplateAnnotation)
        #d.trackAnnotation(CircleObserver.CircleAnnotation)
        #d.trackAnnotation(RaceTrackObserver.RaceTrackAnnotation)
        #d.trackAnnotation(RaceTrackObserver.SplitStrokeAnnotation)
        
        #d.trackAnnotation(TuringMachineObserver.TuringMachineAnnotation)
        #d.trackAnnotation(DiGraphObserver.DiGraphAnnotation)
        #d.trackAnnotation(TextObserver.TextAnnotation)
        #d.trackAnnotation(BarAnnotation)
    

def standAloneMain():
    "Sets up the SketchGUI interface on the local machine"
    from SketchFramework import SketchGUI as GUI
    #GUI.LoadApp()
    GUI.run()

if __name__ == '__main__':
   

    # to aviod loading all the obsevers when using the data manager,
    # pass the command line arg, "test"
    if (len(sys.argv) > 1):
        if sys.argv[1] == "test":
            SketchSystem.globtest = True

    standAloneMain()
 
{'fraction_non_alphanumeric': 0.06816773393926874, 'fraction_numerical': 0.001032844453625284, 'mean_word_length': 3.698204754973314, 'pattern_counts': {'":': 2, '<': 3, '<?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': '4473101', 'n_tokens_mistral': 2499, 'n_tokens_neox': 2457, 'n_words': 598}