<commit_before>from subprocess import run, PIPE
import argparse
import re
from enum import Enum, IntEnum
from os import listdir, makedirs
from os.path import exists

MAIN_FILE = None
PROGRAM_EXECUTABLE_NAME = None
PROGRAM_OUTPUT_FILENAME = None
SOLUTION_FILENAME = None
DIFF_COMMAND = None


# Declare the judgement return code enum
class Judgement(IntEnum):
    ACCEPTED = 0
    COMPILE_ERROR = 1
    RUNTIME_ERROR = 2
    WRONG_ANSWER = 3


# Declare the language enum
class Language(Enum):
    C = ("gcc *.c -o {}", "./{} < {} > {}")
    CPP = ("g++ *.cpp -std=c++11 -o {}", "./{} < {} > {}")
    JAVA = ("javac *.java", "java {} < {} > {}")
    PYTHON2 = (None, "python2 {} < {} > {}")
    PYTHON3 = (None, "python3 {} < {} > {}")
    
    # TODO: @Kellen, figure out the commands. Format is (COMPILE_COMMAND, RUN_COMMAND)
    C_SHARP = (None, None)
    D = (None, None)
    GO = (None, None)
    RUBY = (None, None)
    PASCAL = (None, None)
    JAVASCRIPT = (None, None)
    SCALA = (None, None)
    PHP = (None, None)
    HASKELL = (None, None)
    LISP = (None, None)
    LUA = (None, None)

    def __init__(self, compile_command, run_command):
        self.compile_command = compile_command
        self.run_command = run_command<commit_msg>Added a grading error field<commit_after>from subprocess import run, PIPE
import argparse
import re
from enum import Enum, IntEnum
from os import listdir, makedirs
from os.path import exists

MAIN_FILE = None
PROGRAM_EXECUTABLE_NAME = None
PROGRAM_OUTPUT_FILENAME = None
SOLUTION_FILENAME = None
DIFF_COMMAND = None


# Declare the judgement return code enum
class Judgement(IntEnum):
    ACCEPTED = 0
    COMPILE_ERROR = 1
    RUNTIME_ERROR = 2
    WRONG_ANSWER = 3
    GRADER_ERROR = 4


# Declare the language enum
class Language(Enum):
    C = ("gcc *.c -o {}", "./{} < {} > {}")
    CPP = ("g++ *.cpp -std=c++11 -o {}", "./{} < {} > {}")
    JAVA = ("javac *.java", "java {} < {} > {}")
    PYTHON2 = (None, "python2 {} < {} > {}")
    PYTHON3 = (None, "python3 {} < {} > {}")
    
    # TODO: @Kellen, figure out the commands. Format is (COMPILE_COMMAND, RUN_COMMAND)
    C_SHARP = (None, None)
    D = (None, None)
    GO = (None, None)
    RUBY = (None, None)
    PASCAL = (None, None)
    JAVASCRIPT = (None, None)
    SCALA = (None, None)
    PHP = (None, None)
    HASKELL = (None, None)
    LISP = (None, None)
    LUA = (None, None)

    def __init__(self, compile_command, run_command):
        self.compile_command = compile_command
        self.run_command = run_command
{'fraction_non_alphanumeric': 0.14465904611746158, 'fraction_numerical': 0.008277493102089082, 'mean_word_length': 3.0158227848101267, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '1611529', 'n_tokens_mistral': 949, 'n_tokens_neox': 899, 'n_words': 255}