Get disambiguator actions log.
543917
public String getAnnotations() {
    StringBuilder sb = new StringBuilder(40);
    sb.append("Disambiguator log: \n");
    for (AnalyzedTokenReadings element : tokens) {
      if (!element.isWhitespace() &&
              !"".equals(element.getHistoricalAnnotations())) {
        sb.append(element.getHistoricalAnnotations());
        sb.append('\n');
      }
    }
    return sb.toString();
  }
1054963
def extract_dms (archive, compression, cmd, verbosity, interactive, outdir):
    """"""
    check_archive_ext(archive)
    cmdlist = [cmd, '-d', outdir]
    if verbosity > 1:
        cmdlist.append('-v')
    cmdlist.extend(['u', archive])
    return cmdlist
407964
def logs(context, format):
    """"""
    fritz = context.obj
    fritz.login()

    messages = fritz.get_logs()
    if format == "plain":
        for msg in messages:
            merged = "{} {} {}".format(msg.date, msg.time, msg.message.encode("UTF-8"))
            click.echo(merged)

    if format == "json":
        entries = [msg._asdict() for msg in messages]
        click.echo(json.dumps({
            "entries": entries,
        }))
965213
def get_logs(self, stdout=True, stderr=True, timestamps=False, tail='all',
                 since=None):
        
        return self.inner().logs(
            stdout=stdout, stderr=stderr, timestamps=timestamps, tail=tail,
            since=since)
442582
def _get_subparsers(self):
    """"""

    subparsers = []
    for action in self._actions:
      if isinstance(action, argparse._SubParsersAction):
        for _, subparser in action.choices.items():
          subparsers.append(subparser)

    ret = subparsers
    for sp in subparsers:
      ret += sp._get_subparsers()
    return ret
1048018
def get_logs(self):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_template
        catalogs = self._get_provider_session('log_lookup_session').get_logs()
        cat_list = []
        for cat in catalogs:
            cat_list.append(Log(self._provider_manager, cat, self._runtime, self._proxy))
        return LogList(cat_list)
795646
def _sorted_actions(self):
        
        for a in filter(lambda _: not _.last and \
                        not self.is_action(_, 'parsers'), self._actions):
            yield a
        for a in filter(lambda _: _.last and \
                        not self.is_action(_, 'parsers'), self._actions):
            yield a
        for a in filter(lambda _: self.is_action(_, 'parsers'),
                        self._actions):
            yield a
1223358
def parse_logs(self, f):
        """"""
        data = {}
        for l in f.splitlines():
            # catch empty lines
            if len(l) == 0:
                continue
            s = l.split("\t")
            data_ = []
            # catch lines with descriptive content: "Of pairs used:"
            for i in s[1:]:
                if len(i) == 0:
                    continue
                try:
                    i.replace('(', '')
                    i.replace(')', '')
                    i.replace(',', '')

                    data_.append(float(i))
                except ValueError:
                    data_.append(i)
            if len(data_) == 0:
                continue
            if s[0].startswith('short range'):
                s[0] = 'short range'
            elif s[0].startswith('same fragment'):
                s[0] = 'same fragment'
            s[0] = s[0].capitalize()
            data[s[0]] = data_
        return data
247840
def _get_logs(job_id):
    """"""
    # Avoid SQLAlchemy "Unicode type received non-unicode bind param value"
    # warnings.
    job_id = unicode(job_id)

    results = ENGINE.execute(
        LOGS_TABLE.select().where(LOGS_TABLE.c.job_id == job_id)).fetchall()

    results = [dict(result) for result in results]

    for result in results:
        result.pop("job_id")

    return results
907992
def get_plugin_actions(self):
        """"""
        return [self.rich_text_action, self.plain_text_action,
                self.show_source_action, MENU_SEPARATOR,
                self.auto_import_action]
900523
def parse_band_log(self, message):
        """"""
        if "payload" in message and hasattr(message["payload"], "name"):
            record = message["payload"]
            for k in dir(record):
                if k.startswith("workflows_exc_"):
                    setattr(record, k[14:], getattr(record, k))
                    delattr(record, k)
            for k, v in self.get_status().items():
                setattr(record, "workflows_" + k, v)
            logging.getLogger(record.name).handle(record)
        else:
            self.log.warning(
                "Received broken record on log band\n" + "Message: %s\nRecord: %s",
                str(message),
                str(
                    hasattr(message.get("payload"), "__dict__")
                    and message["payload"].__dict__
                ),
            )
544486
def logprob(self, actions, action_logits):
        
        neg_log_prob = F.nll_loss(action_logits, actions, reduction='none')
        return -neg_log_prob
147241
def get_actions(self, commands):
        """"""
        actions = []
        for type, turn_based, verb in commands:
            if len(self.action_filter) != 0 and verb not in self.action_filter:
                continue
            if type == 'DiscreteMovement':
                if verb in {"move", "turn", "look",
                            "strafe", "jumpmove", "jumpstrafe"}:
                    actions.append(verb + " 1")
                    actions.append(verb + " -1")
                elif verb in {"jumpeast", "jumpnorth", "jumpsouth",
                              "jumpwest", "movenorth", "moveeast",
                              "movesouth", "movewest", "jumpuse",
                              "use", "attack", "jump"}:
                    actions.append(verb + " 1")
                else:
                    raise CommandHandlerException("Invalid discrete command")
            elif type == 'ContinuousMovement':
                #  Translate to discrete.
                if verb in {"move", "strafe", "pitch", "turn"}:
                    actions.append(verb + " 1")
                    actions.append(verb + " -1")
                elif verb in {"crouch", "jump", "attack", "use"}:
                    actions.append(verb + " 1")
                    actions.append(verb + " 0")
                else:
                    raise CommandHandlerException("Invalid continuous command")
            elif type == 'HumanLevel':
                if verb == 'moveMouse':
                    actions.append('mouseMove 0 0')
                elif verb in {'forward', 'back', 'left', 'right'}:
                    actions.append(verb + ' 1')
                    actions.append(verb + ' 0')
                else:
                    actions.append(verb)
            elif type == 'MissionQuit':
                if verb != 'quit':
                    raise CommandHandlerException("Invalid quit command")
                actions.append(verb)
            elif type == 'Chat':
                if verb != 'chat':
                    raise CommandHandlerException("Invalid chat command")
                actions.append(verb)
            elif type == 'SimpleCraft':
                if verb != 'craft':
                    raise CommandHandlerException("Invalid craft command")
                actions.append(verb)
            elif type == 'AbsoluteMovement' or 'Inventory':
                actions.append(verb)
        return actions
646188
private void logDescription(LoggingStrategy loggingStrategy, Rule rule) {
        String description = rule.getDescription();
        StringTokenizer tokenizer = new StringTokenizer(description, "\n");
        while (tokenizer.hasMoreTokens()) {
            loggingStrategy.log(tokenizer.nextToken().replaceAll("(\\r|\\n|\\t)", ""));
        }
    }
158565
private final ParserAction getAction(ParserActionSet actionSet) throws GrammarException {
	if (actionSet.getActionNumber() == 1) {
	    /*
	     * action is not ambiguous, therefore, the action is easily returned...
	     */
	    return actionSet.getAction();
	}
	if (!backtrackEnabled) {
	    /*
	     * Backtracking is disabled and action set is ambiguous. Throw exception due to
	     * illegal state...
	     */
	    logger.trace("Action set '" + actionSet + "' is ambiguous and back tracking is disabled!");
	    throw new GrammarException("Grammar is ambiguous!");
	}
	if ((!backtrackStack.isEmpty()) && (backtrackStack.peek().getStepCounter() == stepCounter)) {
	    /*
	     * We are currently at a step with stored backtracking information, so we just
	     * returned from a backtrack. Trying next alternative...
	     */
	    if (logger.isTraceEnabled()) {
		logger.trace("Action set '" + actionSet
			+ "' is ambiguous and back tracking was performed already. Trying new alternative...");
	    }
	    BacktrackLocation location = backtrackStack.pop();
	    int stepAhead = 1;
	    if (location.getLastAlternative() + stepAhead >= actionSet.getActionNumber()) {
		logger.trace("No alternative left. Abort.");
		return new ParserAction(ActionType.ERROR, -1);
	    }
	    addBacktrackLocation(location.getLastAlternative() + stepAhead);
	    return actionSet.getAction(location.getLastAlternative() + stepAhead);
	}
	/*
	 * We have a new ambiguous state. We store backtracking information and try
	 * first alternative...
	 */
	if (logger.isTraceEnabled()) {
	    logger.trace("Action set '" + actionSet + "' is ambiguous. Installing back tracking location in stack...");
	}
	addBacktrackLocation(0);
	return actionSet.getAction(0);
    }
1268289
def get_logs(self, log_stream_name, get_last=50):
        """"""
        response = self._log_client.get_log_events(
            logGroupName='/aws/batch/job',
            logStreamName=log_stream_name,
            startFromHead=False)
        events = response['events']
        return '\n'.join(e['message'] for e in events[-get_last:])
335079
def get_all_logger_names(include_root=False):
    
    # noinspection PyUnresolvedReferences
    rv = list(logging.Logger.manager.loggerDict.keys())
    if include_root:
        rv.insert(0, '')
    return rv