Commit 4995d8e5 authored by litaolemo's avatar litaolemo

update

parent 59109ca1
...@@ -837,12 +837,13 @@ for t in range(5, 6): ...@@ -837,12 +837,13 @@ for t in range(5, 6):
click_ctr = res.click_ctr click_ctr = res.click_ctr
pid = hashlib.md5((day_id + device_os_type + active_type + card_content_type + recommend_type).encode("utf8")).hexdigest() pid = hashlib.md5((day_id + device_os_type + active_type + card_content_type + recommend_type).encode("utf8")).hexdigest()
try: try:
card_click_diff = data_dict.get(pid) - card_click if data_dict.get(pid):
if card_click_diff: card_click_diff = data_dict.get(pid) - card_click
if card_click_diff and card_click_diff >= 0:
print("card_click_diff",card_click_diff) print("card_click_diff",card_click_diff)
# card_click += card_click_diff card_click += card_click_diff
# card_exposure += card_click_diff card_exposure += card_click_diff
# click_ctr = round(card_click/card_exposure,5) click_ctr = round(card_click/card_exposure,5)
except: except:
print("add error") print("add error")
instert_sql = """replace into recommend_strategy_d_fix( instert_sql = """replace into recommend_strategy_d_fix(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment