Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_strategy_cvr
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
gm_strategy_cvr
Commits
7713bae7
Commit
7713bae7
authored
Jul 24, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update script
parent
183122d6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
ctcvr_offline.sh
ctcvr_offline.sh
+4
-1
main_portrait.py
src/main_portrait.py
+6
-3
No files found.
ctcvr_offline.sh
View file @
7713bae7
if
!
ps aux |
grep
src/main_portrait.py |
grep
-v
grep
then
# 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
src/main_portrait.py
View file @
7713bae7
import
datetime
import
random
import
sys
import
time
import
tensorflow
as
tf
...
...
@@ -12,7 +13,7 @@ from utils.portrait import (user_portrait_tag3_get_candidate_dict, user_portrait
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
:
round
=
0
all_count
=
0
...
...
@@ -26,7 +27,7 @@ def user_portrait_scan_info(device_dict, diary_dict, predict_fn):
key
=
str
(
key
,
"utf-8"
)
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"
)):
all_count
+=
1
print
(
str
(
all_count
)
+
": "
+
device_id
)
...
...
@@ -69,7 +70,9 @@ def main():
# print(len(res))
# 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__"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment