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
e81a83ab
Commit
e81a83ab
authored
Oct 12, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change
parent
80a52b52
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
meigou.py
local/meigou.py
+1
-1
make_data.py
make_data.py
+25
-1
No files found.
local/meigou.py
View file @
e81a83ab
...
@@ -282,7 +282,7 @@ if __name__ == '__main__':
...
@@ -282,7 +282,7 @@ if __name__ == '__main__':
spark
=
SparkSession
.
builder
.
config
(
conf
=
sparkConf
)
.
enableHiveSupport
()
.
getOrCreate
()
spark
=
SparkSession
.
builder
.
config
(
conf
=
sparkConf
)
.
enableHiveSupport
()
.
getOrCreate
()
for
os
in
[
"ios"
,
"android"
]:
for
os
in
[
"ios"
,
"android"
]:
all_list
=
[]
all_list
=
[]
for
i
in
range
(
1
,
27
):
for
i
in
range
(
1
,
3
):
date_str
=
(
datetime
.
date
.
today
()
-
datetime
.
timedelta
(
days
=
i
))
.
strftime
(
"
%
Y
%
m
%
d"
)
date_str
=
(
datetime
.
date
.
today
()
-
datetime
.
timedelta
(
days
=
i
))
.
strftime
(
"
%
Y
%
m
%
d"
)
tmp_list
=
[
date_str
]
tmp_list
=
[
date_str
]
tmp_list
.
extend
(
os_all_click
(
i
,
os
))
tmp_list
.
extend
(
os_all_click
(
i
,
os
))
...
...
make_data.py
View file @
e81a83ab
import
redis
import
redis
import
json
import
datetime
def
make_queue
():
native
=
"58,59,60,61,62,63,64,65"
r
.
hset
(
key
,
"native_queue"
,
native
)
nearby
=
'88,89,90,91,92,93,94,95'
r
.
hset
(
key
,
"nearby_queue"
,
nearby
)
nation
=
'128,129,130,131,132,133,134,135,136,137,138,139'
r
.
hset
(
key
,
"nation_queue"
,
nation
)
megacity
=
'150,151,152,153,154,155,156,157,158,159'
r
.
hset
(
key
,
"megacity_queue"
,
megacity
)
def
user_portr
():
key
=
'user_portrait_recommend_diary_queue:device_id:
%
s:
%
s'
%
\
(
device_id
,
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
))
r
.
hset
(
key
,
"cursor"
,
"0"
)
r
.
hset
(
key
,
"len_cursor"
,
"0"
)
r
.
hset
(
key
,
"cpc_queue"
,
json
.
dumps
([
58
,
59
,
60
,
61
,
62
,
63
,
64
,
65
]))
r
.
hset
(
key
,
"diary_queue"
,
json
.
dumps
([
88
,
89
,
90
,
91
,
92
,
93
,
94
,
95
]))
print
(
r
.
hgetall
(
key
))
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
topic_key
()
device_id
=
"860445048868273"
user_portr
()
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