Skip to content

Instantly share code, notes, and snippets.

View eriktaubeneck's full-sized avatar

Erik Taubeneck eriktaubeneck

View GitHub Profile

H1

2024-09-16T16:48:23.460431Z  INFO stall_detector{role=H1}: ipa_core::helpers::gateway::stall_detection::gateway: close time.busy=17.4µs time.idle=30.0s
2024-09-16T16:50:45.581347Z  INFO stall_detector{role=H1}: ipa_core::helpers::gateway::stall_detection::gateway: new
2024-09-16T16:50:45.826906Z  INFO oprf_ipa_query{sz=474}: ipa_core::query::runner::oprf_ipa: new
2024-09-16T16:50:45.826941Z  INFO oprf_ipa_query{sz=474}: ipa_core::query::runner::oprf_ipa: New query: IpaQueryConfig { per_user_credit_cap: 8, max_breakdown_key: 256, attribution_window_seconds: None, with_dp: 1, epsilon: 5.0, plaintext_match_keys: false }
2024-09-16T16:51:45.583600Z  WARN stall_detector{role=H1}: ipa_core::helpers::gateway::stall_detection::gateway: Helper is stalled sn=8 state=
{
"gate=/ipa_prf/padding_dp/padding_dp_pass3/send_num_fake_records", from=H2. Waiting to receive records ["0"].
"gate=/ipa_prf/padding_dp/padding_dp_pass3/send_num_fake_records", from=H3. Waiting to receive records ["0"].
function not_inc(x)
Float64(x) == Float64(x+1)
end
function perc_inc(e, n)
s = 0
for i in 0:n
s += Int(not_inc(2^e + i))
end
1-s/n

Keybase proof

I hereby claim:

  • I am eriktaubeneck on github.
  • I am eriktaubeneck (https://keybase.io/eriktaubeneck) on keybase.
  • I have a public key ASAEGjN0gO7Q39BQMbPYwFgzNgoY1ffGxzWyK9WmGmLWpgo

To claim this, I am signing this object:

select m.month, coalesce(s.signup_count, 0), coalesce(p.purchase_count, 0)
from (
select extract(month from ts) as month
from signups
union all
select extract(month from ts) as month
from purchases
group by month
) as m
left outer join (
@eriktaubeneck
eriktaubeneck / example.py
Created September 11, 2014 20:23
flask signup id example
from flask import Flask, render_template, redirect, url_for
app = Flask(__name__)
@app.route('index')
def index():
return render_template('index.html')
@app.route('signup/<signup_id>')
def signup(signup_id=None):
import os
from flask import Flask, render_template, request
import stripe
stripe_keys = {
'secret_key': os.environ['SECRET_KEY'],
'publishable_key': os.environ['PUBLISHABLE_KEY']
}
stripe.api_key = stripe_keys['secret_key']
@eriktaubeneck
eriktaubeneck / all_but_last_n.py
Last active December 30, 2015 09:19
"all but last n" function for generators
from itertools import tee, imap, izip, islice
from operator import itemgetter
def all_but_last_n(it,n):
it1, it2 = tee(it,2)
return imap(itemgetter(0),izip(it1,islice(it2,n,None)))
assert [0,1,2] == list(all_but_last_n(xrange(5),2))
@eriktaubeneck
eriktaubeneck / percentile_at
Created November 1, 2013 17:04
Function for finding the percentile of a value `v` among a list of values `l`.
def percentile_at(l,v):
n = len(l)
x = len({i for i in l if i <= v})
return int(round(100*x/float(n)))
@eriktaubeneck
eriktaubeneck / bday.jl
Created September 6, 2013 18:06
Simulation for determining the probability of `same_dbday` people having the same birthday out of a group of sized `people`. Assumes all days are equally likely and ignores leap years, but it's a 23 line Julia script so whatever. Happy Birthday @alexandrinaw and @alisaex!
using Distributions
people = 88
same_bday = 3
days = 365
trials = 1000000
success = 0
for i = 1:trials
bday_d = Distributions.DiscreteUniform(1,days)