parseProcessedSubmits.py
def loadProcessedSubmits(filePath: str):
    '''
    load processed submits given the id of problem
    :param problem_id
    :return: list of ProcessedSubmits
    '''

    submits = []

    with open(filePath) as src:
        user_id = 0
        for line in src.readlines():
            if len(line) > 0:
                if re.match("user", line):
                    user_id = line.split(' ')[1]
                else:
                    submits.append(ProcessedSubmit.parseFromStr(line))
                    submits[-1].metadata['user_id'] = user_id

    return submits

    load processed submits given the id of problem
    :param problem_id
    :return: list of ProcessedSubmits
    
load processed submits given the id of problem
:param problem_id
:return: list of ProcessedSubmits
load processed submits given the id of problem : param problem_id : return : list of ProcessedSubmits
def loadProcessedSubmits(filePath: str):
    submits = []
    with open(filePath) as src:
        user_id = 0
        for line in src.readlines():
            if len(line) > 0:
                if re.match("user", line):
                    user_id = line.split(' ')[1]
                else:
                    submits.append(ProcessedSubmit.parseFromStr(line))
                    submits[-1].metadata['user_id'] = user_id
    return submits
def loadProcessedSubmits ( filePath : str ) : submits = [ ] with open ( filePath ) as src : user_id = 0 for line in src . readlines ( ) : if len ( line ) > 0 : if re . match ( "user" , line ) : user_id = line . split ( ' ' ) [ 1 ] else : submits . append ( ProcessedSubmit . parseFromStr ( line ) ) submits [ - 1 ] . metadata [ 'user_id' ] = user_id return submits
load processed submits given the id of problem
:param problem_id
:return: list of ProcessedSubmits
load processed submits given the id of problem : param problem_id : return : list of ProcessedSubmits
'''
    load processed submits given the id of problem
    :param problem_id
    :return: list of ProcessedSubmits
    '''
filePath
str