opendp 0.16.0

A library of differential privacy algorithms for the statistical analysis of sensitive private data.
Documentation
1
2
3
4
5
6
7
8
# type: ignore
def sample_bernoulli_exp(x) -> bool:
    while x > 1:
        if sample_bernoulli_exp1(1):  # |\label{line:B_i}|
            x -= 1
        else:
            return False
    return sample_bernoulli_exp1(x)  # |\label{line:C}|