data = [(0.1, 100), (0.13, 300), (0.2, 10)]
buckets = [((0, 0.14), 2), ((0.135, 0.19), 1), ((0.19, 0.21), 2), ((0.19, 
    0.24), 3)]

def foo(tpl):
    x, s = tpl
lst = []
for bucket in buckets:
    rnge, iid = bucket
if x > rnge[0] and x < rnge[1]:
    lst.append(iid)
return lst
data = [[dt, foo(dt)] for dt in data]
scores_dict = {}
for tpl in data:
    score = tpl[0][1]
for iid in tpl[1]:
    if iid in scores_dict:
        scores_dict[iid] += score
else:
    scores_dict[iid] = score
for key in scores_dict:
    pass
Dropping data in range buckets