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
a8b447e7
Commit
a8b447e7
authored
Sep 01, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change test
parent
7539d39a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
rerank_esmm.py
rerank_esmm.py
+6
-12
No files found.
rerank_esmm.py
View file @
a8b447e7
...
...
@@ -156,18 +156,12 @@ def to_data_base(df):
if
old_number
>
0
:
db
=
pymysql
.
connect
(
host
=
'172.16.40.158'
,
port
=
4000
,
user
=
'root'
,
passwd
=
'3SYz54LS9#^9sBvC'
,
db
=
'jerry_test'
)
sql
=
"delete from esmm_resort_diary_queue where device_id in {} limit 2000"
.
format
(
tuple
(
old_uid
))
if
old_number
>
2000
:
cursor
=
db
.
cursor
()
for
i
in
range
(
int
(
old_number
/
2000
)
+
1
):
cursor
.
execute
(
sql
)
db
.
commit
()
cursor
.
close
()
else
:
cursor
=
db
.
cursor
()
cursor
.
execute
(
sql
)
db
.
commit
()
cursor
.
close
()
sql
=
"delete from esmm_resort_diary_queue where device_id in {}"
.
format
(
tuple
(
old_uid
))
cursor
=
db
.
cursor
()
cursor
.
execute
(
sql
)
db
.
commit
()
cursor
.
close
()
db
.
close
()
yconnect
=
create_engine
(
'mysql+pymysql://root:3SYz54LS9#^9sBvC@172.16.40.158:4000/jerry_test?charset=utf8'
)
...
...
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