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
dd9467a8
Commit
dd9467a8
authored
Sep 02, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
把获取用户活跃表的顺序放在最前面
parent
ffd31e2c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
diaryUpdateOnlineOffline.py
diaryUpdateOnlineOffline.py
+4
-4
No files found.
diaryUpdateOnlineOffline.py
View file @
dd9467a8
...
@@ -301,11 +301,8 @@ if __name__ == "__main__":
...
@@ -301,11 +301,8 @@ if __name__ == "__main__":
cache_device_city_list
=
[]
cache_device_city_list
=
[]
differ
=
0
differ
=
0
while
True
:
while
True
:
data_set_cid
=
pd
.
read_csv
(
path
+
"data_set_cid.csv"
)[
"cid"
]
.
values
.
tolist
()
total_video_id
=
get_video_id
(
cache_video_id
)
cache_video_id
=
total_video_id
start
=
time
.
time
()
start
=
time
.
time
()
device_city_list
=
get_active_users
(
flag
,
path
,
differ
)
device_city_list
=
get_active_users
(
flag
,
path
,
differ
)
# 过滤掉5分钟内预测过的用户
# 过滤掉5分钟内预测过的用户
device_city_list
=
list
(
set
(
tuple
(
device_city_list
))
-
set
(
tuple
(
cache_device_city_list
)))
device_city_list
=
list
(
set
(
tuple
(
device_city_list
))
-
set
(
tuple
(
cache_device_city_list
)))
print
(
"device_city_list"
)
print
(
"device_city_list"
)
...
@@ -313,6 +310,9 @@ if __name__ == "__main__":
...
@@ -313,6 +310,9 @@ if __name__ == "__main__":
if
datetime
.
now
()
.
minute
%
5
==
0
:
if
datetime
.
now
()
.
minute
%
5
==
0
:
cache_device_city_list
=
[]
cache_device_city_list
=
[]
if
device_city_list
!=
[]:
if
device_city_list
!=
[]:
data_set_cid
=
pd
.
read_csv
(
path
+
"data_set_cid.csv"
)[
"cid"
]
.
values
.
tolist
()
total_video_id
=
get_video_id
(
cache_video_id
)
cache_video_id
=
total_video_id
cache_device_city_list
.
extend
(
device_city_list
)
cache_device_city_list
.
extend
(
device_city_list
)
for
device_city
in
device_city_list
:
for
device_city
in
device_city_list
:
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
)
...
...
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