def sample_length(self, prob_end):
        try:
            x = random.random()
            return int(ceil(log(1 - x) / log(1 - self.prob_end)))
        except ZeroDivisionError:
            return float("inf")
        except ValueError:
            return 1
Deflate Flask Response Decorator.
dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/match_generator.py/ProbEndRoundRobinMatches.sample_length--crossover with--dataset/ETHPy150Open mozillazg/bustard/tests/httpbin/filters.py/deflate