|
@@ -36,7 +36,7 @@ if __name__=="__main__":
|
|
|
item_info = data_dict[kid]
|
|
|
total_info = []
|
|
|
for i in range(len(item_info)):
|
|
|
- total_info.append(0.001*float(item_info[i])+float(d_item_info[i]))
|
|
|
+ total_info.append(0.6*float(item_info[i])+0.4*float(d_item_info[i]))
|
|
|
info_dict[kid] = total_info
|
|
|
else:
|
|
|
total_info = []
|
|
@@ -63,7 +63,7 @@ if __name__=="__main__":
|
|
|
item_info = info_dict[kid]
|
|
|
total_info = []
|
|
|
for i in range(len(item_info)):
|
|
|
- total_info.append(0.1*float(item_info[i])+0.3*float(d_item_info[i]))
|
|
|
+ total_info.append(0.7*float(item_info[i])+0.3*float(d_item_info[i]))
|
|
|
day3_dict[kid] = total_info
|
|
|
else:
|
|
|
total_info = []
|
|
@@ -73,8 +73,9 @@ if __name__=="__main__":
|
|
|
print("info3:", len(day3_dict))
|
|
|
f3 = open("./data/merge_3_days_score_"+nowdate, 'w')
|
|
|
res_dict = {}
|
|
|
+ res_dict2 = {}
|
|
|
for k, v in day3_dict.items():
|
|
|
- score = v[2]+0.1*v[3]
|
|
|
+ score = v[0]
|
|
|
new_arr = []
|
|
|
new_arr.append(score)
|
|
|
for i in range(4):
|
|
@@ -82,10 +83,15 @@ if __name__=="__main__":
|
|
|
#print(v)
|
|
|
#print(new_arr)
|
|
|
total_item_info = json.dumps(new_arr)
|
|
|
- kid2 = "kp_3:"+k
|
|
|
+ kid2 = "kp_3:"+k
|
|
|
+ kid3 = "kp_4:"+k
|
|
|
f3.write(kid2+"\t"+total_item_info+"\n")
|
|
|
res_dict[kid2] = total_item_info
|
|
|
+ res_dict2[kid3] = total_item_info
|
|
|
if len(res_dict)>0:
|
|
|
redis_helper = RedisHelper()
|
|
|
redis_helper.update_batch_setnx_key(res_dict, 60*60*24*15)
|
|
|
+ if len(res_dict2)>0:
|
|
|
+ redis_helper = RedisHelper()
|
|
|
+ redis_helper.update_batch_setnx_key(res_dict2, 60*60*24*15)
|
|
|
f2.close()
|