<commit_before>import subprocess

from dmoj.executors.mono_executor import MonoExecutor


class Executor(MonoExecutor):
    ext = '.vb'
    name = 'MONOVB'
    command = 'mono-vbnc'

    test_program = '''\
Imports System

Public Module modmain
   Sub Main()
     Console.WriteLine(Console.ReadLine())
   End Sub
End Module
'''

    def get_compile_args(self):
        return [self.get_command(), '/nologo', '/quiet', '/optimize+', '/out:%s' % self.get_compiled_file(), self._code]

    def get_compile_popen_kwargs(self):
        return {'stdout': subprocess.PIPE, 'stderr': subprocess.STDOUT}

    def get_compile_output(self, process):
        return process.communicate()[0]

    @classmethod
    def get_find_first_mapping(cls):
        res = super(Executor, cls).get_find_first_mapping()
        res['mono-vbnc'] = ['mono-vbnc', 'vbnc']
        return res<commit_msg>Versioning for Mono VB; #197<commit_after>import subprocess

from dmoj.executors.mono_executor import MonoExecutor


class Executor(MonoExecutor):
    ext = '.vb'
    name = 'MONOVB'
    command = 'mono-vbnc'

    test_program = '''\
Imports System

Public Module modmain
   Sub Main()
     Console.WriteLine(Console.ReadLine())
   End Sub
End Module
'''

    def get_compile_args(self):
        return [self.get_command(), '/nologo', '/quiet', '/optimize+', '/out:%s' % self.get_compiled_file(), self._code]

    def get_compile_popen_kwargs(self):
        return {'stdout': subprocess.PIPE, 'stderr': subprocess.STDOUT}

    def get_compile_output(self, process):
        return process.communicate()[0]

    @classmethod
    def get_version_flags(cls, command):
        return ['/help']

    @classmethod
    def get_find_first_mapping(cls):
        res = super(Executor, cls).get_find_first_mapping()
        res['mono-vbnc'] = ['mono-vbnc', 'vbnc']
        return res

{'fraction_non_alphanumeric': 0.13217768147345613, 'fraction_numerical': 0.0027085590465872156, 'mean_word_length': 3.4613526570048307, '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': '2325471', 'n_tokens_mistral': 626, 'n_tokens_neox': 597, 'n_words': 129}