<commit_before># pylint: disable=C0103
# pylint: disable=C0111
# pylint: disable=C0301
import os
import re
import json
import sys
import logging

from pprint import pformat
from subprocess import Popen, PIPE
from time import sleep
from datetime import datetime

from lib.events import EventList
from lib.slurm import Slurm
from JobStatus import JobStatus
from lib.util import (print_debug,
                      print_message,
                      cmd_exists,
                      print_line)


class Timeseries(object):
    """
    A wrapper around ncclimo, used to compute the climotologies from raw output data
    """

    def __init__(self, config, event_list):
        self.event_list = event_list
        self.config = {}
        self._status = JobStatus.INVALID
        self._type = 'timeseries'
        self.filemanager = config['filemanager']
        self.year_set = config.get('year_set', 0)
        self.start_year = config['start_year']
        self.end_year = config['end_year']
        self.job_id = 0
        self.depends_on = []
        self.start_time = None
        self.end_time = None
        self.output_path = None
        self.inputs = {
            'account': '',
            'ui': '',
            'year_set': '',
            'annual_mode': '',
            'start_year': '',
            'end_year': '',
            'native_output_directory': '',
            'regrid_output_directory': '',
            'var_list': '',
            'caseId': '',
            'run_scripts_path': '',
            'regrid_map_path': '',
            'file_list': '',
        }
        self.slurm_args = {
            'num_cores': '-n 16',  # 16 cores
            'run_time': '-t 0-05:00',  # 5 hours run time
            'num_machines': '-N 1',  # run on one machine
            'oversubscribe': '--oversubscribe'
        }
        self.prevalidate(config)

    def prevalidate(self, config):
        """
        Prerun validation for inputs
        """
        if self.status == JobStatus.VALID:
            return 0
        invalid = False<commit_msg>Increases max time for timeseries<commit_after># pylint: disable=C0103
# pylint: disable=C0111
# pylint: disable=C0301
import os
import re
import json
import sys
import logging

from pprint import pformat
from subprocess import Popen, PIPE
from time import sleep
from datetime import datetime

from lib.events import EventList
from lib.slurm import Slurm
from JobStatus import JobStatus
from lib.util import (print_debug,
                      print_message,
                      cmd_exists,
                      print_line)


class Timeseries(object):
    """
    A wrapper around ncclimo, used to compute the climotologies from raw output data
    """

    def __init__(self, config, event_list):
        self.event_list = event_list
        self.config = {}
        self._status = JobStatus.INVALID
        self._type = 'timeseries'
        self.filemanager = config['filemanager']
        self.year_set = config.get('year_set', 0)
        self.start_year = config['start_year']
        self.end_year = config['end_year']
        self.job_id = 0
        self.depends_on = []
        self.start_time = None
        self.end_time = None
        self.output_path = None
        self.inputs = {
            'account': '',
            'ui': '',
            'year_set': '',
            'annual_mode': '',
            'start_year': '',
            'end_year': '',
            'native_output_directory': '',
            'regrid_output_directory': '',
            'var_list': '',
            'caseId': '',
            'run_scripts_path': '',
            'regrid_map_path': '',
            'file_list': '',
        }
        self.slurm_args = {
            'num_cores': '-n 16',  # 16 cores
            'run_time': '-t 0-12:00',  # 12 hours run time
            'num_machines': '-N 1',  # run on one machine
            'oversubscribe': '--oversubscribe'
        }
        self.prevalidate(config)

    def prevalidate(self, config):
        """
        Prerun validation for inputs
        """
        if self.status == JobStatus.VALID:
            return 0
        invalid = False
{'fraction_non_alphanumeric': 0.10887974836680378, 'fraction_numerical': 0.012823614807645777, 'mean_word_length': 1.8768267223382047, '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': '4288826', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1166, 'n_words': 299}