Supervisor-related commands
514834
def supervisor_command(parser_args):
    
    import logging
    from synergy.supervisor.supervisor_configurator import SupervisorConfigurator, set_box_id

    if parser_args.boxid:
        set_box_id(logging, parser_args.argument)
        return

    sc = SupervisorConfigurator()
    if parser_args.reset:
        sc.reset_db()

    elif parser_args.start:
        sc.mark_for_start(parser_args.argument)

    elif parser_args.stop:
        sc.mark_for_stop(parser_args.argument)

    elif parser_args.query:
        sc.query()
892840
def get_commands(self, mission_xml, role):
        """"""
        mission = etree.fromstring(mission_xml)
        return self.get_commands_from_xml(mission, role)
1136111
function commands(req, res /*, next */) {
  req.app.commands.forEach(function(command) {
    res.writeln(command);
  });
  res.end();
}
1317567
def __get_supervisor(self):
        
        options = supervisorctl.ClientOptions()
        options.realize(args=['-c', self.supervisord_conf_path])
        return supervisorctl.Controller(options).get_supervisor()
1310697
def commands(self) -> List[Mapping[str, Mapping[str, Any]]]:
        
        return self._commands
1152676
def commands(self):
        """"""
        if not getattr(self, "_commands", None):
            self._commands = []
            for command in self.orig_commands:
                if isinstance(command, Command):
                    command = [command]
                for instruction in command:
                    self._commands.append(instruction)
        return self._commands
804018
def control(self, key):
        """"""
        if not self.connection:
            raise exceptions.ConnectionClosed()

        payload = json.dumps({
            "method": "ms.remote.control",
            "params": {
                "Cmd": "Click",
                "DataOfCmd": key,
                "Option": "false",
                "TypeOfRemote": "SendRemoteKey"
            }
        })

        logging.info("Sending control command: %s", key)
        self.connection.send(payload)
        time.sleep(self._key_interval)
206953
def list_commands(self, ctx):
        """"""
        env = ctx.ensure_object(environment.Environment)
        env.load()

        return sorted(env.list_commands(*self.path))
454772
def complete_worker(self, text, line, begidx, endidx):
        '''  '''
        return  [i for i in PsiturkNetworkShell.worker_commands if \
                 i.startswith(text)]
922133
def _command(self, sock_info, command, slave_ok=False, value=1, check=True,
                 allowable_errors=None, read_preference=ReadPreference.PRIMARY,
                 codec_options=DEFAULT_CODEC_OPTIONS,
                 write_concern=None,
                 parse_write_concern_error=False, session=None, **kwargs):
        """"""
        if isinstance(command, string_type):
            command = SON([(command, value)])

        command.update(kwargs)
        with self.__client._tmp_session(session) as s:
            return sock_info.command(
                self.__name,
                command,
                slave_ok,
                read_preference,
                codec_options,
                check,
                allowable_errors,
                write_concern=write_concern,
                parse_write_concern_error=parse_write_concern_error,
                session=s,
                client=self.__client)
1342015
function _Overlay_findSiblings(commands) {
                    // Now make sure they're all in this container
                    var siblings = [];
                    var allCommands = this.element.querySelectorAll(".win-command");
                    var countAll, countIn;
                    for (countAll = 0; countAll < allCommands.length; countAll++) {
                        var found = false;
                        for (countIn = 0; countIn < commands.length; countIn++) {
                            if (commands[countIn] === allCommands[countAll]) {
                                commands.splice(countIn, 1);
                                found = true;
                                break;
                            }
                        }
                        if (!found) {
                            siblings.push(allCommands[countAll]);
                        }
                    }
                    return siblings;
                }
1151007
def _commands(ctx):
    """"""
    ctx = ctx.parent
    ctx.show_hidden_subcommands = False
    main = ctx.command

    for subcommand in main.list_commands(ctx):
        cmd = main.get_command(ctx, subcommand)
        if cmd is None:
            continue
        help = cmd.short_help or ""
        click.echo("{}:{}".format(subcommand, help))
379695
def get_corrected_commands(command):
    
    corrected_commands = (
        corrected for rule in get_rules()
        if rule.is_match(command)
        for corrected in rule.get_corrected_commands(command))
    return organize_commands(corrected_commands)
994585
async def commands(self):
        """"""
        _print_commands('Remote control', interface.RemoteControl)
        _print_commands('Metadata', interface.Metadata)
        _print_commands('Playing', interface.Playing)
        _print_commands('AirPlay', interface.AirPlay)
        _print_commands('Device', DeviceCommands)
        _print_commands('Global', self.__class__)

        return 0
1156334
def get_commands_from_file(self, mission_file, role):
        """"""
        doc = etree.parse(mission_file)
        mission = doc.getroot()
        return self.get_commands_from_xml(mission, role)
667427
def _build_command_chain(self, command):
        
        next = command
        for intercepter in reversed(self._intercepters):
            next = InterceptedCommand(intercepter, next)
        self._commands_by_name[next.get_name()] = next
1238015
def command(self, command):
        
        return self._conn.command('[con_id="{}"] {}'.format(self.id, command))