Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
d934e2c4
Commit
d934e2c4
authored
Aug 27, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete prints
parent
1e784e5a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
diaryQueueUpdate.py
diaryQueueUpdate.py
+2
-1
userProfile.py
userProfile.py
+1
-0
No files found.
diaryQueueUpdate.py
View file @
d934e2c4
...
@@ -229,13 +229,14 @@ if __name__ == "__main__":
...
@@ -229,13 +229,14 @@ if __name__ == "__main__":
total_video_id
=
get_video_id
()
total_video_id
=
get_video_id
()
device_city_list
=
get_active_users
()
device_city_list
=
get_active_users
()
total_number
+=
len
(
device_city_list
)
total_number
+=
len
(
device_city_list
)
print
(
"累计预测用户总数:{}"
.
format
(
total_number
))
if
device_city_list
!=
[]:
if
device_city_list
!=
[]:
for
device_city
in
device_city_list
:
for
device_city
in
device_city_list
:
start
=
time
.
time
()
start
=
time
.
time
()
multi_proecess_update
(
device_city
[
0
],
device_city
[
1
],
data_set_cid
,
total_video_id
)
multi_proecess_update
(
device_city
[
0
],
device_city
[
1
],
data_set_cid
,
total_video_id
)
end
=
time
.
time
()
end
=
time
.
time
()
print
(
"更新该用户队列耗时{}秒"
.
format
((
end
-
start
)))
print
(
"更新该用户队列耗时{}秒"
.
format
((
end
-
start
)))
print
(
"累计预测用户总数:{}"
.
format
(
total_number
))
...
...
userProfile.py
View file @
d934e2c4
...
@@ -28,6 +28,7 @@ def get_active_users():
...
@@ -28,6 +28,7 @@ def get_active_users():
df
=
df
.
loc
[
df
[
"device_id"
]
.
isin
(
old_device_id_list
)]
df
=
df
.
loc
[
df
[
"device_id"
]
.
isin
(
old_device_id_list
)]
if
df
.
empty
:
if
df
.
empty
:
print
(
"该列表是新用户,不需要预测"
)
print
(
"该列表是新用户,不需要预测"
)
time
.
sleep
(
56
)
return
[]
return
[]
else
:
else
:
# TODO 正式上线后注释下面的只预测尾号是6的代码
# TODO 正式上线后注释下面的只预测尾号是6的代码
...
...
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