

def Sample(self, value):
    if (self.i < self.max_size):
        self.data.append(value)
        self.last_update = LOW_RESOLUTION_TIME_SOURCE.now
    else:
        j = random.random()
        if (j < self.p):
            self.data.append(value)
            self.last_update = LOW_RESOLUTION_TIME_SOURCE.now
    self.i += 1

dataset/ETHPy150Open steveniemitz/scales/scales/varz.py _SampleSet.Sample/original