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
1a8494e6
Commit
1a8494e6
authored
5 years ago
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
c6a571aa
gyz
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
predict.py
eda/esmm/Model_pipline/predict.py
+2
-2
No files found.
eda/esmm/Model_pipline/predict.py
View file @
1a8494e6
...
...
@@ -213,8 +213,8 @@ def update_or_insert(df2,queue_name):
cur
=
con
.
cursor
()
try
:
for
i
in
range
(
0
,
device_count
):
query
=
"""INSERT INTO esmm_device_diary_queue_test (device_id, city_id, time,
%
s) VALUES(
%
s,
%
s,
%
s,
%
s
)
\
ON DUPLICATE KEY UPDATE device_id=
%
s, city_id=
%
s, time=
%
s,
%
s=
%
s
"""
%
(
queue_name
,
df2
.
device_id
[
i
],
df2
.
city_id
[
i
],
df2
.
time
[
i
],
df2
[
queue_name
][
i
],
df2
.
device_id
[
i
],
df2
.
city_id
[
i
],
df2
.
time
[
i
],
queue_name
,
df2
[
queue_name
][
i
])
query
=
"""INSERT INTO esmm_device_diary_queue_test (device_id, city_id, time,
%
s) VALUES(
'
%
s', '
%
s', '
%
s', '
%
s'
)
\
ON DUPLICATE KEY UPDATE device_id=
'
%
s', city_id='
%
s', time='
%
s',
%
s='
%
s'
"""
%
(
queue_name
,
df2
.
device_id
[
i
],
df2
.
city_id
[
i
],
df2
.
time
[
i
],
df2
[
queue_name
][
i
],
df2
.
device_id
[
i
],
df2
.
city_id
[
i
],
df2
.
time
[
i
],
queue_name
,
df2
[
queue_name
][
i
])
print
(
query
)
cur
.
execute
(
query
)
con
.
commit
()
...
...
This diff is collapsed.
Click to expand it.
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