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
7c19f8a6
Commit
7c19f8a6
authored
Aug 15, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify delete py file
parent
154779c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
delete_temp_files.py
delete_temp_files.py
+3
-3
predictDiary.py
predictDiary.py
+1
-1
No files found.
delete_temp_
csv
.py
→
delete_temp_
files
.py
View file @
7c19f8a6
import
os
import
time
from
config
import
*
...
...
@@ -8,7 +6,9 @@ from config import *
# 定期删除特定文件夹内特征的文件
def
remove_files
(
fileDir
):
for
eachFile
in
os
.
listdir
(
fileDir
):
if
(
os
.
path
.
isfile
(
fileDir
+
"/"
+
eachFile
))
and
(
"DiaryTop3000.csv"
in
eachFile
):
condition_a
=
os
.
path
.
isfile
(
fileDir
+
"/"
+
eachFile
)
condition_b
=
(
"DiaryTop3000.csv"
in
eachFile
)
or
(
"output.txt"
in
eachFile
)
or
(
"feed"
in
eachFile
)
if
condition_a
and
condition_b
:
ft
=
os
.
stat
(
fileDir
+
"/"
+
eachFile
)
ltime
=
int
(
ft
.
st_mtime
)
# 删除5分钟前的文件
...
...
predictDiary.py
View file @
7c19f8a6
...
...
@@ -52,7 +52,7 @@ def predict(user_profile):
param
=
{
"log"
:
"/data2/models/result"
}
ffm_model
.
predict
(
param
,
DIRECTORY_PATH
+
"model.out"
,
DIRECTORY_PATH
+
"result/{0}_output.txt"
.
format
(
user_profile
[
'device_id'
]))
print
(
"预测结束"
)
print
(
"
该用户
预测结束"
)
predict_save_to_local
(
user_profile
,
instance
)
#TODO 没有提供生产环境的redis地址,所以这个函数先不运行
...
...
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