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
13fb2d85
Commit
13fb2d85
authored
Nov 02, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计指标中过滤黑名单
parent
39f42f20
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
ctr-56.py
ctr-56.py
+12
-2
No files found.
ctr-56.py
View file @
13fb2d85
...
@@ -18,10 +18,20 @@ def get_data():
...
@@ -18,10 +18,20 @@ def get_data():
sql
=
"select distinct device_id from ffm_diary_queue_temp where device_id regexp '[5|6]$'"
sql
=
"select distinct device_id from ffm_diary_queue_temp where device_id regexp '[5|6]$'"
cursor
.
execute
(
sql
)
cursor
.
execute
(
sql
)
result
=
cursor
.
fetchall
()
result
=
cursor
.
fetchall
()
device
=
tuple
(
pd
.
DataFrame
(
list
(
result
))[
0
]
.
values
.
tolist
()
)
device
=
pd
.
DataFrame
(
list
(
result
))[
0
]
.
values
.
tolist
(
)
cursor
.
close
()
cursor
.
close
()
print
(
device
[
0
:
2
]
)
conn2db
.
close
(
)
conn2db
=
pymysql
.
connect
(
host
=
'10.66.157.22'
,
port
=
4000
,
user
=
'root'
,
passwd
=
'3SYz54LS9#^9sBvC'
,
db
=
'jerry_prod'
)
cursor
=
conn2db
.
cursor
()
sql
=
"select distinct device_id from blacklist"
cursor
.
execute
(
sql
)
result
=
cursor
.
fetchall
()
black
=
pd
.
DataFrame
(
list
(
result
))[
0
]
.
values
.
tolist
()
cursor
.
close
()
conn2db
.
close
()
device
=
tuple
(
set
(
device
)
-
set
(
black
))
return
device
return
device
...
...
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