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
1189a028
Commit
1189a028
authored
Jan 18, 2019
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计多天重复日记数量,增加过滤个人黑名单
parent
c5885ec2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
temp_count.scala
eda/feededa/src/main/scala/com/gmei/temp_count.scala
+2
-2
No files found.
eda/feededa/src/main/scala/com/gmei/temp_count.scala
View file @
1189a028
...
@@ -311,7 +311,7 @@ object Repeated_content_recommendation_moreday {
...
@@ -311,7 +311,7 @@ object Repeated_content_recommendation_moreday {
val
now
=
new
Date
()
val
now
=
new
Date
()
val
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
)
val
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
)
val
date
=
dateFormat
.
format
(
now
.
getTime
-
86400000L
*
15
)
val
date
=
dateFormat
.
format
(
now
.
getTime
-
86400000L
*
15
)
val
today
=
dateFormat
.
format
(
now
)
val
yesterday
=
dateFormat
.
format
(
now
.
getTime
-
86400000L
)
val
exp_diary
=
sc
.
sql
(
val
exp_diary
=
sc
.
sql
(
...
@@ -339,7 +339,7 @@ object Repeated_content_recommendation_moreday {
...
@@ -339,7 +339,7 @@ object Repeated_content_recommendation_moreday {
val
fenzi
=
count_imp
.
map
(
x
=>
x
.
_2
).
reduce
((
x
,
y
)
=>
x
+
y
)
val
fenzi
=
count_imp
.
map
(
x
=>
x
.
_2
).
reduce
((
x
,
y
)
=>
x
+
y
)
val
repeated_rate
=
fenmu
/
fenzi
.
toDouble
val
repeated_rate
=
fenmu
/
fenzi
.
toDouble
val
result
=
List
((
to
day
,
repeated_rate
))
val
result
=
List
((
yester
day
,
repeated_rate
))
val
df_result
=
sc
.
createDataFrame
(
result
)
val
df_result
=
sc
.
createDataFrame
(
result
)
GmeiConfig
.
writeToJDBCTable
(
df_result
,
table
=
"Repeated_content_recommendation_moreday"
,
SaveMode
.
Append
)
GmeiConfig
.
writeToJDBCTable
(
df_result
,
table
=
"Repeated_content_recommendation_moreday"
,
SaveMode
.
Append
)
...
...
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