Return the probe's next sample.
341406
public final void sample()
  {
    long sum = _sum.getAndSet(0);
    int count = _count.getAndSet(0);

    if (count != 0)
      _value =sum / (double) count;
    else
      _value = 0;
  }
905723
def next(self):
        
        x, y = next(self.scan)
        xr = self.sx * x
        yr = self.sy * y
        return xr, yr
1131890
def sample(self):
        
        self._sampling = True

        try:
            if self.is_raw_perf_class and not self._previous_sample:
                self._current_sample = self._query()

            self._previous_sample = self._current_sample
            self._current_sample = self._query()
        except TimeoutException:
            self.logger.debug(u"Query timeout after {timeout}s".format(timeout=self._timeout_duration))
            raise
        else:
            self._sampling = False
514501
def next(self):
        """"""
        rv = self.current
        self.pos = (self.pos + 1) % len(self.items)
        return rv
644053
def next(self):
        """"""
        self._response['shouldEndSession'] = True
        self._response['action']['audio']['interface'] = 'next'
        self._response['action']['audio']['sources'] = []
        return self
928332
def sample(self, rvec0, nsteps, nskip=1):
        """
        rvec = np.zeros(shape=(nsteps + 1, self.dim))
        rvec[0, :] = rvec0[:]
        for t in range(nsteps):
            q = rvec[t, :]
            for s in range(nskip):
                q = self.step(q)
            rvec[t + 1, :] = q[:]
        return rvec
599734
def next(self):
        
        # do not acquire lock if NuMap is not finished.
        if self.finished:
            raise StopIteration
        # get per-tee lock
        self.piper.tee_locks[self.i].acquire()
        # get result or exception
        exception = True
        try:
            result = self.piper.tees[self.i].next()
            exception = False
        except StopIteration, result:
            self.finished = True
        except Exception, result:
            pass
        # release per-tee lock either self or next
        if self.s == self.stride or self.finished:
            self.s = 1
            self.piper.tee_locks[(self.i + 1) % len(self.piper.tees)].release()

        else:
            self.s += 1
            self.piper.tee_locks[self.i].release()
        if exception:
            raise result
        else:
            return result
774762
@Override
  public final void sample()
  {
    long count = _count.get();
    long lastCount = _lastCount.getAndSet(count);
    
    _value = count - lastCount;
  }
1146290
def sample(self, n_to_sample, **kwargs):
        
        n_to_sample = verify_positive(int(n_to_sample))

        n_remaining = self._max_iter - self.t_

        if n_remaining == 0:
            if (not self.replace) and (self._n_items == self._max_iter):
                raise Exception("All items have already been sampled")
            else:
                raise Exception("No more space available to continue sampling. "
                                "Consider re-initialising with a larger value "
                                "of max_iter.")

        if n_to_sample > n_remaining:
            warnings.warn("Space only remains for {} more iteration(s). "
                          "Setting n_to_sample = {}.".format(n_remaining, \
                          n_remaining))
            n_to_sample = n_remaining

        for _ in range(n_to_sample):
            self._iterate(**kwargs)
1033285
public final void sample()
  {
    long count = _count.get();
    long lastCount = _lastAvgCount.getAndSet(count);
    long time = _time.get();
    long lastTime = _lastAvgTime.getAndSet(time);

    if (count == lastCount)
      _value = 0;
    else
      _value = _scale * (time - lastTime) / (double) (count - lastCount);
  }
593245
def probes(self, fromtime, totime=None):
        """"""

        args = {'from': fromtime}
        if totime:
            args['to'] = totime

        response = self.pingdom.request('GET', 'summary.probes/%s' % self.id,
                                        args)

        return response.json()['probes']
104554
def next(self):
        """"""
        seg = Segment(segment_t=idaapi.get_next_seg(self.ea))

        if seg.ea <= self.ea:
            raise exceptions.NoMoreSegments("This is the last segment. No segments exist after it.")

        return seg
763641
def get_samples(self, sample_count):
        
        if self.amplitude.value <= 0:
            return None
        # Build samples by rolling the period cache through the buffer
        rolled_array = numpy.roll(self.wave_cache,
                                  -1 * self.last_played_sample)
        # Append remaining partial period
        full_count, remainder = divmod(sample_count, self.cache_length)
        final_subarray = rolled_array[:int(remainder)]
        return_array = numpy.concatenate((numpy.tile(rolled_array, full_count),
                                          final_subarray))
        # Keep track of where we left off to prevent popping between chunks
        self.last_played_sample = int(((self.last_played_sample + remainder) %
                                       self.cache_length))
        # Multiply output by amplitude
        return return_array * (self.amplitude.value *
                               self.amplitude_multiplier)
816003
def alert!
      t = time.round( 9 )
      t2 = next_time.round( 9 )
      if t >= t2 then # it's time to sample
        sample!
        @next_time += sampling
      end
    end
877561
def next(self):
        
        while True:
            self.cur_idx += 1
            if self.__datasource.populate_iteration(self):
                return self

        raise StopIteration
637192
def get_sample(self, dest_addr_long=None):
        
        frame = self._send_and_wait(
            command=b"IS", dest_addr_long=dest_addr_long)
        if "parameter" in frame:
            # @TODO: Is there always one value? Is it always a list?
            return frame["parameter"][0]
        return {}
470868
def next(self):
        
        x, y = next(self.scan)
        xs = int(round(x))
        ys = int(round(y))
        return xs, ys