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
9e123f30
Commit
9e123f30
authored
Aug 08, 2018
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a README.md and fix start.sh with a cat all files to a result
parent
18032158
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
3 deletions
+28
-3
.DS_Store
.DS_Store
+0
-0
README.md
eda/recommended_indexs/code/README.md
+23
-0
getTop100Question.py
eda/recommended_indexs/code/getTop100Question.py
+1
-1
start.sh
eda/recommended_indexs/code/start.sh
+4
-2
No files found.
.DS_Store
View file @
9e123f30
No preview for this file type
eda/recommended_indexs/code/README.md
0 → 100644
View file @
9e123f30
功能:
从data_feed_click和data_feed_exposure两个表中统计一些推荐指标
用法:
用法1(推荐):
./start.sh
用法2(分开运行):
python getRate.py
python getClickTimes2CountUid.py
python getTop100Diary.py
python getTop100Answer.py
python getTop100Question.py
输入输出:
输入:无
输出:
1rate_features_yesterday.txt
2click_times_to_count_uid_yesterday.txt
3top100_ctr_diary_yesterday.txt
4top100_ctr_answer_yesterday.txt
5top100_ctr_question_yesterday.csv
result_all_yesterday.txt
\ No newline at end of file
eda/recommended_indexs/code/getTop100Question.py
View file @
9e123f30
...
@@ -152,6 +152,6 @@ if __name__ == "__main__":
...
@@ -152,6 +152,6 @@ if __name__ == "__main__":
today
=
datetime
.
date
.
today
()
today
=
datetime
.
date
.
today
()
yesterday
=
today
-
datetime
.
timedelta
(
days
=
1
)
yesterday
=
today
-
datetime
.
timedelta
(
days
=
1
)
yesterday
=
yesterday
.
strftime
(
"
%
Y
%
m
%
d"
)
yesterday
=
yesterday
.
strftime
(
"
%
Y
%
m
%
d"
)
output_path
=
"/data2/models/eda/recommended_indexs/5top100_ctr_question_
%
s.
csv
"
%
yesterday
output_path
=
"/data2/models/eda/recommended_indexs/5top100_ctr_question_
%
s.
txt
"
%
yesterday
result2file
(
result_lst
,
output_path
)
result2file
(
result_lst
,
output_path
)
print
(
"已将top100点击率的question存入文件"
)
print
(
"已将top100点击率的question存入文件"
)
eda/recommended_indexs/code/start.sh
View file @
9e123f30
...
@@ -2,4 +2,6 @@ python getRate.py
...
@@ -2,4 +2,6 @@ python getRate.py
python getClickTimes2CountUid.py
python getClickTimes2CountUid.py
python getTop100Diary.py
python getTop100Diary.py
python getTop100Answer.py
python getTop100Answer.py
python getTop100Question.py
python getTop100Question.py
\ No newline at end of file
dt
=
$(
date
-d
last-day +%Y%m%d
)
cat
1rate_features_
$dt
.txt 2click_times_to_count_uid_
$dt
.txt 3top100_ctr_diary_
$dt
.txt 4top100_ctr_answer_
$dt
.txt 5top100_ctr_question_
$dt
.txt
>
result_all_
$dt
.txt
\ No newline at end of file
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