Created
February 11, 2013 22:39
-
-
Save bpowers/4758276 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if age_max[0] != '[': | |
if age_min == 'NULL': | |
age_min = 13 | |
if age_max == 'NULL': | |
age_max = 65 | |
tages = range(int(age_min),int(age_max)+1) | |
delta = len(tages) | |
if not gender in gender_dict: | |
continue | |
gdot = gender_dict[gender] | |
if len(adtype) >= 3: | |
continue | |
if int(adtype) not in ad_types: | |
continue | |
adtype_int = int(adtype) | |
for i in tages: | |
for key in keys: | |
to_write_out[(int(i),int(gdot),int(adtype_int))][key] +=(stats_dict[tups][key]/delta) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment