Get Valgrind command as list.

        :return: list
960957
def __get_valgrind_params(self):
        
        valgrind = []
        if self.valgrind:
            valgrind.extend(['valgrind'])
            if self.valgrind == 'memcheck':
                valgrind.extend(['--tool=memcheck', '--leak-check=full'])
                if self.valgrind_track_origins:
                    valgrind.extend(['--track-origins=yes'])
                if self.valgrind_console:
                    # just dump the default output, which is text dumped to console
                    valgrind.extend([])
                elif self.valgrind_xml:
                    valgrind.extend([
                        '--xml=yes',
                        '--xml-file=' + LogManager.get_testcase_logfilename(
                            self.name + '_valgrind_mem.xml', prepend_tc_name=True)
                    ])
                else:
                    valgrind.extend([
                        '--log-file=' + LogManager.get_testcase_logfilename(
                            self.name + '_valgrind_mem.txt')
                    ])

            elif self.valgrind == 'callgrind':
                valgrind.extend([
                    '--tool=callgrind',
                    '--dump-instr=yes',
                    '--simulate-cache=yes',
                    '--collect-jumps=yes'])
                if self.valgrind_console:
                    # just dump the default output, which is text dumped to console
                    valgrind.extend([])
                elif self.valgrind_xml:
                    valgrind.extend([
                        '--xml=yes',
                        '--xml-file=' + LogManager.get_testcase_logfilename(
                            self.name + '_valgrind_calls.xml', prepend_tc_name=True)
                    ])
                else:
                    valgrind.extend([
                        '--callgrind-out-file=' + LogManager.get_testcase_logfilename(
                            self.name + '_valgrind_calls.data')
                    ])
            elif self.valgrind == 'massif':
                valgrind.extend(['--tool=massif'])
                valgrind.extend([
                    '--massif-out-file=' + LogManager.get_testcase_logfilename(
                        self.name + '_valgrind_massif.data')
                    ])
            # this allows one to specify misc params to valgrind,
            # eg. "--threshold=0.4" to get some more data from massif
            if self.valgrind_extra_params != '':
                valgrind.extend(self.valgrind_extra_params.split())

        return valgrind
570828
def list(self, argv):
        """"""

        def read(job):
            for key in sorted(job.content.keys()):
                # Ignore some fields that make the output hard to read and
                # that are available via other commands.
                if key in ["performance"]: continue
                print("%s: %s" % (key, job.content[key]))

        if len(argv) == 0:
            index = 0
            for job in self.service.jobs:
                print("@%d : %s" % (index, job.sid))
                index += 1
            return

        self.foreach(argv, read)
591438
def all_as_dict():
    '''
    
                    
    '''
    cmd = ['lxc-list']
    out = subprocess.check_output(cmd).splitlines()
    stopped = []
    running = []
    frozen = []
    current = None
    for c in out:
        c = c.strip()
        if c == 'RUNNING':
            current = running
            continue
        if c == 'STOPPED':
            current = stopped
            continue
        if c == 'FROZEN':
            current = frozen
            continue
        if not len(c):
            continue
        current.append(c)
    return {'Running': running,
            'Stopped': stopped,
            'Frozen': frozen}
930291
def list(self, sort=False):
        
        prs = self._processors.values()
        if sort:
            return sorted(prs, key=operator.methodcaller("cid"))

        return prs
1323310
def list_commands(self, ctx):
        """"""
        commands = super(PinaxGroup, self).list_commands(ctx)
        return [cmd for cmd in order_manually(commands)]
367928
def toc(self):
        
        if not self.activated:
            return []
        for exe in self.exes:
            for array in exe.arg_arrays:
                array.wait_to_read()
            for array in exe.aux_arrays:
                array.wait_to_read()
        for exe in self.exes:
            for name, array in zip(exe._symbol.list_arguments(), exe.arg_arrays):
                if self.re_prog.match(name):
                    self.queue.append((self.step, name, self.stat_func(array)))
            for name, array in zip(exe._symbol.list_auxiliary_states(), exe.aux_arrays):
                if self.re_prog.match(name):
                    self.queue.append((self.step, name, self.stat_func(array)))
        self.activated = False
        res = []
        if self.sort:
            self.queue.sort(key=lambda x: x[1])
        for n, k, v_list in self.queue:
            if isinstance(v_list, NDArray):
                v_list = [v_list]
            assert isinstance(v_list, list)
            s = ''
            for v in v_list:
                assert isinstance(v, NDArray)
                if v.shape == (1,):
                    s += str(v.asscalar()) + '\t'
                else:
                    s += str(v.asnumpy()) + '\t'
            res.append((n, k, s))
        self.queue = []
        return res
961055
def c_self_relocs(self):
        """"""
        relocs = []
        if not callable(self.opts.hash_func):
            relocs = [
                reloc_ptr(
                    self.opts.prefix + name, self.opts.reloc_delta,
                    'char *'
                )
                for name, dummy_args in self.funcs
            ]
        if self.name != 'kernel32':
            relocs = [
                reloc_ptr(
                    self.opts.prefix + self.name,
                    self.opts.reloc_delta, 'char *'
                )
            ] + relocs
        return relocs
1310697
def commands(self) -> List[Mapping[str, Mapping[str, Any]]]:
        
        return self._commands
645955
def go_stdlib(self):
    
    out = self._go_dist.create_go_cmd('list', args=['std']).check_output()
    return frozenset(out.decode('utf-8').strip().split())
259754
def _make_cmd_list(cmd_list):
    
    cmd = ''
    for i in cmd_list:
        cmd = cmd + '"' + i + '",'
    cmd = cmd[:-1]
    return cmd
495096
def get_commands(self):
        
        commands = []
        for name, value in inspect.getmembers(self):
            if not inspect.isgeneratorfunction(value):
                continue
            if name.startswith('_') or name == 'run':
                continue
            doc = inspect.getdoc(value)
            commands.append((name, doc))
        return commands
917880
def get_cached(self):
        '''
        
        '''
        msg = self.serial.dumps('minions')
        self.creq_out.send(msg)
        min_list = self.serial.loads(self.creq_out.recv())
        return min_list
1364945
def get_commands(self):
        
        commands = OrderedDict()
        for cmd in sorted(self.registry.keys()):
            commands[cmd] = self.registry[cmd]
        return commands
1324158
def instruction_addresses(self):
        
        if self._instruction_addresses is None:
            if self.statements is None:
                self._instruction_addresses = [ ]
            else:
                self._instruction_addresses = [ (s.addr + s.delta) for s in self.statements if type(s) is stmt.IMark ]
        return self._instruction_addresses
271855
def list_lzh (archive, compression, cmd, verbosity, interactive):
    """"""
    cmdlist = [cmd]
    if verbosity > 1:
        cmdlist.append('v')
    else:
        cmdlist.append('l')
    cmdlist.append(archive)
    return cmdlist
1308358
def get_cmd_tuple_list(self):
    

    # pattern to find DAGman macros
    pat = re.compile(r'\$\((.+)\)')
    argpat = re.compile(r'\d+')

    # first parse the options and replace macros with values
    options = self.job().get_opts()
    macros = self.get_opts()

    cmd_list = []

    for k in options:
      val = options[k]
      m = pat.match(val)
      if m:
        key = m.group(1)
        value = macros[key]

        cmd_list.append(("--%s" % k, str(value)))
      else:
        cmd_list.append(("--%s" % k, str(val)))

    # second parse the short options and replace macros with values
    options = self.job().get_short_opts()

    for k in options:
      val = options[k]
      m = pat.match(val)
      if m:
        key = m.group(1)
        value = macros[key]

        cmd_list.append(("-%s" % k, str(value)))
      else:
        cmd_list.append(("-%s" % k, str(val)))

    # lastly parse the arguments and replace macros with values
    args = self.job().get_args()
    macros = self.get_args()

    for a in args:
      m = pat.match(a)
      if m:
        arg_index = int(argpat.findall(a)[0])
        try:
          cmd_list.append(("%s" % macros[arg_index], ""))
        except IndexError:
          cmd_list.append("")
      else:
        cmd_list.append(("%s" % a, ""))

    return cmd_list
244338
def pack_commands(self, commands):
        ""
        output = []
        pieces = []
        buffer_length = 0

        for cmd in commands:
            for chunk in self.pack_command(*cmd):
                pieces.append(chunk)
                buffer_length += len(chunk)

            if buffer_length > 6000:
                output.append(SYM_EMPTY.join(pieces))
                buffer_length = 0
                pieces = []

        if pieces:
            output.append(SYM_EMPTY.join(pieces))
        return output