Mark the occurrence of a given number of events.
180927
def mark(self, n=1):
        """"""
        self.tick_if_necessary()
        self.count += n
        self.m1_rate.update(n)
        self.m5_rate.update(n)
        self.m15_rate.update(n)
787268
def _mark_entities(self, c, markers):
        
        sent = c.get_parent().words
        positions = [
            [c[i].get_word_start(), c[i].get_word_end()]
            for i in range(self.cardinality)
        ]
        seq = mark_entities(sent, positions, markers=markers, style="insert")
        return [w for w in seq if w.strip()]
547127
def events_mark_seen(self, event):
        
        last_seen = event if isinstance(event, int) else event.id
        self.client.post('{}/seen'.format(Event.api_endpoint), model=Event(self.client, last_seen))
577104
def write_events(stream, events):
    '''
    
    '''
    for event in events:
        data = event.SerializeToString()
        len_field = struct.pack('<Q', len(data))
        len_crc = struct.pack('<I', masked_crc(len_field))
        data_crc = struct.pack('<I', masked_crc(data))
        stream.write(len_field)
        stream.write(len_crc)
        stream.write(data)
        stream.write(data_crc)
928959
def repeat(self, target, sender, **kwargs):
        ""
        if target.startswith("#"):
            self.message(target, kwargs["msg"])
        else:
            self.message(sender, kwargs["msg"])
411260
def MarkDone(self, responses):
    """"""
    client_id = responses.request.client_id
    self.AddResultsToCollection(responses, client_id)
    self.MarkClientDone(client_id)
864011
def mark(self, lineno, count=1):
        
        self.sourcelines[lineno] = self.sourcelines.get(lineno, 0) + count
309264
def _notify_add_at(self, index, length=1):
        """"""
        slice_ = self._slice_at(index, length)
        self._notify_add(slice_)
975397
def log_every_x_times(logger, counter, x, msg, *args, **kwargs):
    '''
    
    '''
    if counter==1 or counter % x == 0:
        #msg = msg + (' (counter %i)' % counter)
        logdebug(logger, msg, *args, **kwargs)
978413
def _make_event(self, event_type, code, value):
        """"""
        secs, msecs = convert_timeval(time.time())
        data = struct.pack(EVENT_FORMAT,
                           secs,
                           msecs,
                           event_type,
                           code,
                           value)
        self._write_device.write(data)
        self._write_device.flush()
894542
def OnReplaceFind(self, event):
        """"""

        event.text = event.GetFindString()
        event.flags = self._wxflag2flag(event.GetFlags())

        self.OnFind(event)
812731
def multi_occurrence(self):
        
        max = self.max
        if max is None:
            return False
        if max.isdigit():
            return int(max) > 1
        return max == "unbounded"
673406
def trigger(self, event, *args):
        """"""
        for handler in self._event_handlers[event]:
            handler(*args)
393734
def emulate_repeat(self, value, timeval):
        """"""
        repeat_event = self.create_event_object(
            "Repeat",
            2,
            value,
            timeval)
        return repeat_event
735813
public void mark(final long n) {
    tickIfNecessary();
    count.addAndGet(n);
    m1Thp.update(n);
    m5Thp.update(n);
    m15Thp.update(n);
  }
1110401
def p_event_statement(self, p):
        ''
        p[0] = EventStatement(p[1], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
887533
function() {
		/** All events from last tick */
		var pendingEvents = this._annotationChangedContext.events;
		var pendingLocations = this._annotationChangedContext.locations;
		var pendingModels = this._annotationChangedContext.textModels;
		/** All unique events from last tick */
		var handlingEvents = [];
		var handlingLocations = [];
		var handlingModels = [];
		// Cleanup
		this._annotationChangedContext.timeout = undefined;
		this._annotationChangedContext.events = [];
		this._annotationChangedContext.locations = [];
		// Remove duplicate events
		for (var i = 0; i < pendingEvents.length; i++) {
			var duplicate = false;
			for (var j = 0; j < i; j++) {
				if (pendingEvents[i].textModelChangedEvent === pendingEvents[j].textModelChangedEvent) {
					duplicate = true;
				}
				break;
			}
			if (!duplicate) {
				handlingEvents.push(pendingEvents[i]);
				handlingLocations.push(pendingLocations[i]);
				handlingModels.push(pendingModels[i]);
			}
		}

		// Handle
		for (i = 0; i < handlingEvents.length; i++) {
			var e = handlingEvents[i];
			for (j = 0; j < e.changed.length; j++) {
				var annotation = e.changed[j];
				var location = handlingLocations[i];
				var oldLine;
				var newLine = handlingModels[i].getLineAtOffset(annotation.start);
				if (annotation._oldStart > e.textModelChangedEvent.start) {
					oldLine = newLine - e.textModelChangedEvent.addedLineCount + e.textModelChangedEvent.removedLineCount;
				} else {
					oldLine = handlingModels[i].getLineAtOffset(annotation._oldStart);
				}
				var before = null;
				var after = null;
				if (annotation.type === AT.ANNOTATION_BOOKMARK) {
					before = new mBreakpoint.LineBookmark(location, oldLine, annotation.title);
					after = new mBreakpoint.LineBookmark(location, newLine, annotation.title);
				} else if (annotation.type === AT.ANNOTATION_BREAKPOINT) {
					before = new mBreakpoint.LineBreakpoint(location, oldLine, annotation.title, true);
					after = new mBreakpoint.LineBreakpoint(location, newLine, annotation.title, true);
				} else if (annotation.type === AT.ANNOTATION_CONDITIONAL_BREAKPOINT) {
					before = new mBreakpoint.LineConditionalBreakpoint(location, oldLine, annotation.title, annotation.title, true);
					after = new mBreakpoint.LineConditionalBreakpoint(location, newLine, annotation.title, annotation.title, true);
				}
				if (before && after) {
					this.debugService.updateBreakpoint(before, after, true);
				}
			}
		}
	}