Extract information about the given event index.
    Example:
    http://127.0.0.1:8800/v1/calc/30/extract/event_info/0
438773
def extract_event_info(dstore, eidx):
    
    event = dstore['events'][int(eidx)]
    serial = int(event['eid'] // TWO32)
    ridx = list(dstore['ruptures']['serial']).index(serial)
    [getter] = getters.gen_rupture_getters(dstore, slice(ridx, ridx + 1))
    rupdict = getter.get_rupdict()
    rlzi = event['rlz']
    rlzs_assoc = dstore['csm_info'].get_rlzs_assoc()
    gsim = rlzs_assoc.gsim_by_trt[rlzi][rupdict['trt']]
    for key, val in rupdict.items():
        yield key, val
    yield 'rlzi', rlzi
    yield 'gsim', repr(gsim)
153977
function removeEvent (date, index) {
  date = this.toDate(date);
  if (!date) {
    return false;
  }
  var info = getDayInfo(this.dayInfo, date);
  if (!info) {
    return false;
  }
  var events = info.events;
  if (arguments.length === 1) {
    events.splice(0, events.length);
    return true;
  }
  if (events.length <= index) {
    return false;
  }
  events.splice(index,1);
  return true;
}
757382
def info(self, index=None, params=None):
        
        return self.transport.perform_request(
            "GET",
            _make_path(index, "_xpack", "migration", "deprecations"),
            params=params,
        )
958917
def read_events(self):
        
        buf_ = array.array('i', [0])
        # get event queue size
        if fcntl.ioctl(self._fd, termios.FIONREAD, buf_, 1) == -1:
            return
        queue_size = buf_[0]
        if queue_size < self._threshold:
            log.debug('(fd: %d) %d bytes available to read but threshold is '
                      'fixed to %d bytes', self._fd, queue_size,
                      self._threshold)
            return

        try:
            # Read content from file
            r = os.read(self._fd, queue_size)
        except Exception, msg:
            raise NotifierError(msg)
        log.debug('Event queue size: %d', queue_size)
        rsum = 0  # counter
        while rsum < queue_size:
            s_size = 16
            # Retrieve wd, mask, cookie and fname_len
            wd, mask, cookie, fname_len = struct.unpack('iIII',
                                                        r[rsum:rsum+s_size])
            # Retrieve name
            fname, = struct.unpack('%ds' % fname_len,
                                   r[rsum + s_size:rsum + s_size + fname_len])
            rawevent = _RawEvent(wd, mask, cookie, fname)
            if self._coalesce:
                # Only enqueue new (unique) events.
                raweventstr = str(rawevent)
                if raweventstr not in self._eventset:
                    self._eventset.add(raweventstr)
                    self._eventq.append(rawevent)
            else:
                self._eventq.append(rawevent)
            rsum += s_size + fname_len
1145141
def fileInfo(self, index):
        
        return self._fs_model_source.fileInfo(
            self._fs_model_proxy.mapToSource(index))
1140446
def ExamineEvent(self, mediator, event):
    
    pathspec = getattr(event, 'pathspec', None)
    if pathspec is None:
      return
    if self._paths_with_hashes.get(pathspec, None):
      # We've already processed an event with this pathspec and extracted the
      # hashes from it.
      return
    hash_attributes = {}
    for attribute_name, attribute_value in event.GetAttributes():
      if attribute_name.endswith('_hash'):
        hash_attributes[attribute_name] = attribute_value
    self._paths_with_hashes[pathspec] = hash_attributes
376136
def get_events(self, rlzs_by_gsim):
        
        all_eids, rlzs = [], []
        for rlz, eids in self.get_eids_by_rlz(rlzs_by_gsim).items():
            all_eids.extend(eids)
            rlzs.extend([rlz] * len(eids))
        return numpy.fromiter(zip(all_eids, rlzs), events_dt)
142431
def __analizar_evento(self, ret):
        ""
        evt = ret.get('evento')
        if evt:
            self.Eventos = [evt]
            self.Evento = "%(codigo)s: %(descripcion)s" % evt
847213
def get_event_from_name(self, event_name):
        
        return next((e for e in self.events if e.name == event_name), None)
1281780
def parsed_event_detail(self):
        
        attr = (
            "event_detail_information__event_detail"
            if self.premis_version == utils.PREMIS_3_0_VERSION
            else "event_detail"
        )
        return dict(
            [
                tuple([x.strip(' "') for x in kv.strip().split("=", 1)])
                for kv in getattr(self, attr).split(";")
            ]
        )
1315692
def _get_extent(self, index):
        
        extent = 0
        prev_item = get_item(self._items, index - 1)
        seen_dot = prev_item and unicode(prev_item) == '.'
        while index < len(self._items):
            item = get_item(self._items, index)
            index += 1

            if isinstance(item, (ListComprehension, IfExpression)):
                break

            if isinstance(item, Container):
                if prev_item and prev_item.is_name:
                    if seen_dot:
                        extent += 1
                    else:
                        extent += item.size

                    prev_item = item
                    continue
            elif (unicode(item) not in ['.', '=', ':', 'not'] and
                  not item.is_name and not item.is_string):
                break

            if unicode(item) == '.':
                seen_dot = True

            extent += item.size
            prev_item = item

        return extent
1243199
public XEvent get(int index) {
		try {
			XEvent event = events.get(index);
			return event;
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
	}
418656
def extract_noindex
      noindex_name, noindex_value = extract_noindex_attribute(:noindex)
      index_name, index_value = extract_noindex_attribute(:index)

      nofollow_name, nofollow_value = extract_noindex_attribute(:nofollow)
      follow_name, follow_value = extract_noindex_attribute(:follow)

      noindex_attributes = if noindex_name == follow_name && (noindex_value || follow_value)
                             # noindex has higher priority than index and follow has higher priority than nofollow
                             [
                               [noindex_name, noindex_value || index_value],
                               [follow_name, follow_value || nofollow_value],
                             ]
                           else
                             [
                               [index_name, index_value],
                               [follow_name, follow_value],
                               [noindex_name, noindex_value],
                               [nofollow_name, nofollow_value],
                             ]
                           end
      append_noarchive_attribute group_attributes_by_key noindex_attributes
    end
400274
def analysis_info(self, webid):
        
        response = self._post(self.apiurl + "/v2/analysis/info", data={'apikey': self.apikey, 'webid': webid})

        return self._raise_or_extract(response)
1324070
def decode_event(abi: ABI, log_: Dict) -> Dict:
    
    if isinstance(log_['topics'][0], str):
        log_['topics'][0] = decode_hex(log_['topics'][0])
    elif isinstance(log_['topics'][0], int):
        log_['topics'][0] = decode_hex(hex(log_['topics'][0]))
    event_id = log_['topics'][0]
    events = filter_by_type('event', abi)
    topic_to_event_abi = {
        event_abi_to_log_topic(event_abi): event_abi
        for event_abi in events
    }
    event_abi = topic_to_event_abi[event_id]
    return get_event_data(event_abi, log_)
1266858
def _get_domain_event_detail(event, detail):
    '''
    
    '''
    event_name = _get_libvirt_enum_string('VIR_DOMAIN_EVENT_', event)
    if event_name == 'unknown':
        return event_name, 'unknown'

    prefix = 'VIR_DOMAIN_EVENT_{0}_'.format(event_name.upper())
    detail_name = _get_libvirt_enum_string(prefix, detail)

    return event_name, detail_name
1064367
def GetEventTypeString(self, event_type):
    
    if 0 <= event_type < len(self._EVENT_TYPES):
      return self._EVENT_TYPES[event_type]
    return 'Unknown {0:d}'.format(event_type)