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
00713715
Commit
00713715
authored
Aug 09, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify function fetch_user_profile return
parent
b20353fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
predictDiary.py
predictDiary.py
+2
-2
userProfile.py
userProfile.py
+1
-1
No files found.
predictDiary.py
View file @
00713715
...
...
@@ -80,9 +80,9 @@ def predict_save_to_redis(user_profile, instance):
add_data_to_redis
(
device_id
,
cid_list
)
def
router
(
device_id
):
user_profile
,
is
_exist
=
fetch_user_profile
(
device_id
)
user_profile
,
not
_exist
=
fetch_user_profile
(
device_id
)
if
is
_exist
:
if
not
_exist
:
print
(
'Sorry, we don
\'
t have you.'
)
else
:
predict
(
user_profile
)
...
...
userProfile.py
View file @
00713715
...
...
@@ -33,4 +33,4 @@ def fetch_user_profile(device_id):
user_profile_dict
=
{}
for
i
in
user_profile
.
columns
:
user_profile_dict
[
i
]
=
user_profile
.
loc
[
0
,
i
]
return
user_profile_dict
,
not
user_profile
.
empty
return
user_profile_dict
,
user_profile
.
empty
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