<commit_before>import os
import re
from collections import deque

from dmoj.judgeenv import env
from dmoj.result import Result
from .base_executor import CompiledExecutor

GCC_ENV = env.runtime.gcc_env or {}
GCC_COMPILE = os.environ.copy()
IS_ARM = hasattr(os, 'uname') and os.uname()[4].startswith('arm')

if os.name == 'nt':
    GCC_COMPILE.update((k.encode('mbcs'), v.encode('mbcs')) for k, v in
                       list((env.runtime.gcc_compile or GCC_ENV).items()) or [])
    GCC_ENV = dict((k.encode('mbcs'), v.encode('mbcs')) for k, v in list(GCC_ENV.items()))
else:
    GCC_COMPILE.update(env.runtime.gcc_compile or {})

recppexc = re.compile(r"terminate called after throwing an instance of \'([A-Za-z0-9_:]+)\'\r?$", re.M)


class GCCExecutor(CompiledExecutor):
    defines = []
    flags = []
    name = 'GCC'
    has_color = False

    def create_files(self, problem_id, main_source, **kwargs):
        aux_sources = kwargs.get('aux_sources', {})
        fds = kwargs.get('fds', None)
        writable = kwargs.get('writable', (1, 2))
        aux_sources[problem_id + self.ext] = main_source

        sources = []
        for name, source in aux_sources.items():
            if '.' not in name:
                name += self.ext
            with open(self._file(name), 'wb') as fo:
                fo.write(source)
            sources.append(name)<commit_msg>Apparently the code overrides iteritems -_-<commit_after>import os
import re
from collections import deque

from dmoj.judgeenv import env
from dmoj.result import Result
from .base_executor import CompiledExecutor

GCC_ENV = env.runtime.gcc_env or {}
GCC_COMPILE = os.environ.copy()
IS_ARM = hasattr(os, 'uname') and os.uname()[4].startswith('arm')

if os.name == 'nt':
    GCC_COMPILE.update((k.encode('mbcs'), v.encode('mbcs')) for k, v in
                       (env.runtime.gcc_compile or GCC_ENV).iteritems())
    GCC_ENV = dict((k.encode('mbcs'), v.encode('mbcs')) for k, v in list(GCC_ENV.items()))
else:
    GCC_COMPILE.update(env.runtime.gcc_compile or {})

recppexc = re.compile(r"terminate called after throwing an instance of \'([A-Za-z0-9_:]+)\'\r?$", re.M)


class GCCExecutor(CompiledExecutor):
    defines = []
    flags = []
    name = 'GCC'
    has_color = False

    def create_files(self, problem_id, main_source, **kwargs):
        aux_sources = kwargs.get('aux_sources', {})
        fds = kwargs.get('fds', None)
        writable = kwargs.get('writable', (1, 2))
        aux_sources[problem_id + self.ext] = main_source

        sources = []
        for name, source in aux_sources.items():
            if '.' not in name:
                name += self.ext
            with open(self._file(name), 'wb') as fo:
                fo.write(source)
            sources.append(name)
{'fraction_non_alphanumeric': 0.14523121387283236, 'fraction_numerical': 0.0036127167630057803, 'mean_word_length': 2.9110169491525424, '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': '792724', 'n_tokens_mistral': 949, 'n_tokens_neox': 920, 'n_words': 219}