Commit 7713bae7 authored by 赵威's avatar 赵威

update script

parent 183122d6
if ! ps aux | grep src/main_portrait.py | grep -v grep if ! ps aux | grep src/main_portrait.py | grep -v grep
then then
# workon tf1 # workon tf1
nohup /home/gmuser/.virtualenvs/tf1/bin/python3 /srv/apps/gm_strategy_cvr/src/main_portrait.py > ~/ctcvr.log & nohup /home/gmuser/.virtualenvs/tf1/bin/python3 /srv/apps/gm_strategy_cvr/src/main_portrait.py c > ~/ctcvr_c.log &
nohup /home/gmuser/.virtualenvs/tf1/bin/python3 /srv/apps/gm_strategy_cvr/src/main_portrait.py d > ~/ctcvr_d.log &
nohup /home/gmuser/.virtualenvs/tf1/bin/python3 /srv/apps/gm_strategy_cvr/src/main_portrait.py e > ~/ctcvr_e.log &
nohup /home/gmuser/.virtualenvs/tf1/bin/python3 /srv/apps/gm_strategy_cvr/src/main_portrait.py f > ~/ctcvr_f.log &
fi fi
import datetime import datetime
import random import random
import sys
import time import time
import tensorflow as tf import tensorflow as tf
...@@ -12,7 +13,7 @@ from utils.portrait import (user_portrait_tag3_get_candidate_dict, user_portrait ...@@ -12,7 +13,7 @@ from utils.portrait import (user_portrait_tag3_get_candidate_dict, user_portrait
user_portrait_tag3_write_ctcvr_data) user_portrait_tag3_write_ctcvr_data)
def user_portrait_scan_info(device_dict, diary_dict, predict_fn): def user_portrait_scan_info(device_dict, diary_dict, predict_fn, tail_number):
try: try:
round = 0 round = 0
all_count = 0 all_count = 0
...@@ -26,7 +27,7 @@ def user_portrait_scan_info(device_dict, diary_dict, predict_fn): ...@@ -26,7 +27,7 @@ def user_portrait_scan_info(device_dict, diary_dict, predict_fn):
key = str(key, "utf-8") key = str(key, "utf-8")
device_id = key.split(":")[-1] device_id = key.split(":")[-1]
if recommed_service_category_device_id_by_tail(device_id, ["c", "d", "e", "f"]): if recommed_service_category_device_id_by_tail(device_id, [tail_number]):
if (user_portrait_tag3_get_candidate_dict(device_id, "diary")): if (user_portrait_tag3_get_candidate_dict(device_id, "diary")):
all_count += 1 all_count += 1
print(str(all_count) + ": " + device_id) print(str(all_count) + ": " + device_id)
...@@ -69,7 +70,9 @@ def main(): ...@@ -69,7 +70,9 @@ def main():
# print(len(res)) # print(len(res))
# print(res[:10]) # print(res[:10])
user_portrait_scan_info(device_dict, diary_dict, predict_fn) tail_number = sys.argv[1]
# "c", "d", "e", "f"
user_portrait_scan_info(device_dict, diary_dict, predict_fn, tail_number)
if __name__ == "__main__": if __name__ == "__main__":
......
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