retrieves a description of what events for this character should look like
519362
function( key ) {
			//check if it is described directly
			if ( S.key.browser[key] ) {
				return S.key.browser[key];
			}
			for ( var kind in S.key.kinds ) {
				if ( h.inArray(key, S.key.kinds[kind]) > -1 ) {
					return S.key.browser[kind]
				}
			}
			return S.key.browser.character
		}
803134
def process_string_tensor_event(event):
  """"""
  string_arr = tensor_util.make_ndarray(event.tensor_proto)
  html = text_array_to_html(string_arr)
  return {
      'wall_time': event.wall_time,
      'step': event.step,
      'text': html,
  }
386361
def _event(self, event):
    """"""
    result = dict(
        pid=event.device_id,
        tid=event.resource_id,
        name=event.name,
        ts=event.timestamp_ps / 1000000.0)
    if event.duration_ps:
      result['ph'] = _TYPE_COMPLETE
      result['dur'] = event.duration_ps / 1000000.0
    else:
      result['ph'] = _TYPE_INSTANT
      result['s'] = _SCOPE_THREAD
    for key in dict(event.args):
      if 'args' not in result:
        result['args'] = {}
      result['args'][key] = event.args[key]
    return result
546394
def characters(self):
        
        chars = 0
        for fragment in self.fragments:
            chars += fragment.characters
        return chars
42637
def get_user_events(self, id, **data):
        
        
        return self.get("/users/{0}/events/".format(id), data=data)
1211208
def _details(self, nohtml=False):
        """"""
        text = ""
        inst = self.timemachine

        # If deleted or created, show every field, otherwise only
        # the modified
        if self.action_type in ("dl","cr",):
            fields = inst.fields + inst.foreignkeys
        else: fields = [i.key for i in self.modification_commits.all()]

        for field in fields:
            if not nohtml:
                text += "<strong>%s</strong>: " % field
            else:
                text += "%s: " % field

            # If modified, show what it was like one step earlier
            if self.action_type == "md":
                if not nohtml:
                    text += "%s &#8594; " % \
                            inst.at_previous_action._field_value_html(field)
                else:
                    text += "%s -> " % \
                            inst.at_previous_action._field_value_text(field)

            if not nohtml:
                text += "%s<br/>" % inst._field_value_html(field)
            else:
                text += "%s\n" % inst._field_value_text(field)

        return text
1366211
function (char) {
                if (this._handleEntities(char)) {
                    return;
                }
                if ("*" === char) {
                    return this._parseItalic;
                } else if ("`" === char) {
                    this._toggleTag("code");
                    return this._parseMonospace;
                } else if ("[" === char) {
                    return this._startLink(0);
                } else if ("!" === char) {
                    return this._parseImage;
                } else if ("-" === char) {
                    this._escapeCount = 1;
                    this._escapeChar = "-";
                    return this._parseEscape;
                } else if ("\n" === char) {
                    return null;
                } else {
                    this._output(char);
                }
            }
1130037
def pp_event(seq):
    """"""

    if isinstance(seq, Event):
        return str(seq)

    # Get the original sequence back if seq is a pretty name already
    rev_curses = dict((v, k) for k, v in CURSES_NAMES.items())
    rev_curtsies = dict((v, k) for k, v in CURTSIES_NAMES.items())
    if seq in rev_curses:
        seq = rev_curses[seq]
    elif seq in rev_curtsies:
        seq = rev_curtsies[seq]

    pretty = curtsies_name(seq)
    if pretty != seq:
        return pretty
    return repr(seq).lstrip('u')[1:-1]
1095134
def encryption_details(self):
        
        event_type = self.findtext("event_type")
        if event_type != "encryption":
            raise AttributeError(
                'PREMIS events of type "{}" have no encryption'
                " details".format(event_type)
            )
        parsed_encryption_event_detail = self.parsed_event_detail
        encryption_program = _get_event_detail_attr(
            "program", parsed_encryption_event_detail
        )
        encryption_program_version = _get_event_detail_attr(
            "version", parsed_encryption_event_detail
        )
        encryption_key = _get_event_detail_attr("key", parsed_encryption_event_detail)
        return encryption_program, encryption_program_version, encryption_key
752829
private String getPatternFromEventType(Event event) {
        switch (event.getType()) {
            case MESSAGE:
                return event.getMessage().getText();
            case QUICK_REPLY:
                return event.getMessage().getQuickReply().getPayload();
            case POSTBACK:
                return event.getPostback().getPayload();
            default:
                return event.getMessage().getText();
        }
    }
1181170
def describe(id, version = nil)
      wf_event_id?(id)
      wf_version?(version) if version
      fragments = [id]
      fragments += ['history', version] if version
      api.get(fragments.uri_concat)
    end
1342038
def _pretty_print_event(event, colored):
        
        event.timestamp = colored.yellow(event.timestamp)
        event.log_stream_name = colored.cyan(event.log_stream_name)

        return ' '.join([event.log_stream_name, event.timestamp, event.message])
762047
def _description(self):
        """"""

        inst = self.timemachine.presently

        if self.action_type == "dl":
            return "Deleted %s" % inst.content_type.name
        elif self.action_type == "cr":
            return "Created %s" % inst._object_type_html()
        else:
            return "Modified %s" % inst._object_type_html()
1351480
def description(self):
        """"""
        return (
            self.name,
            self.type_code,
            None,  # TODO: display_length; should this be self.length?
            self.get_column_length(),  # 'internal_size'
            self.get_column_length(),  # 'precision'  # TODO: why!?!?
            self.scale,
            self.flags % 2 == 0)
1274459
function _characterFromEvent(e) {

        // for keypress events we should return the character as is
        if (e.type == 'keypress') {
            var character = String.fromCharCode(e.which);

            // if the shift key is not pressed then it is safe to assume
            // that we want the character to be lowercase.  this means if
            // you accidentally have caps lock on then your key bindings
            // will continue to work
            //
            // the only side effect that might not be desired is if you
            // bind something like 'A' cause you want to trigger an
            // event when capital A is pressed caps lock will no longer
            // trigger the event.  shift+a will though.
            if (!e.shiftKey) {
                character = character.toLowerCase();
            }

            return character;
        }

        // for non keypress events the special maps are needed
        if (_MAP[e.which]) {
            return _MAP[e.which];
        }

        if (_KEYCODE_MAP[e.which]) {
            return _KEYCODE_MAP[e.which];
        }

        // if it is not in the special map

        // with keydown and keyup events the character seems to always
        // come in as an uppercase character whether you are pressing shift
        // or not.  we should make sure it is always lowercase for comparisons
        return String.fromCharCode(e.which).toLowerCase();
    }
51880
def characters(self, numberOfCharacters):
        """"""
        return self.code[self.index:self.index + numberOfCharacters]
50743
def find(self, item, description='', event_type=''):
        
        # TODO: should be refactored, dumb logic
        if ': ' in item:
            splited = item.split(': ', 1)
            if splited[0] in self.TYPES:
                description = item.split(': ')[1]
                event_type = item.split(': ')[0]
            else:
                description = item
        else:
            if not description:
                description = item

        if event_type:
            found = [x['time'] for x in self.log if re.search(description, x['description'])
                     and x['eventTypeText'] == event_type]
        else:
            found = [x['time'] for x in self.log if re.search(description, x['description'])]

        if len(found):
            return found
        raise exceptions.NotFoundError("Item '{}' is not found with (description='{}', event_type='{}')".
                                       format(item, description, event_type))