Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cybertron
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
cybertron
Commits
fecd87b1
Commit
fecd87b1
authored
Dec 08, 2018
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try except
parent
c4d39acd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
7 deletions
+23
-7
workspace.xml
.idea/workspace.xml
+0
-0
auto_follow_new.py
auto_follow_new.py
+8
-4
auto_pick.py
auto_pick.py
+5
-3
dd.py
dd.py
+10
-0
No files found.
.idea/workspace.xml
View file @
fecd87b1
This diff is collapsed.
Click to expand it.
auto_follow_new.py
View file @
fecd87b1
...
@@ -140,13 +140,17 @@ def get_commnet_id(numtime):
...
@@ -140,13 +140,17 @@ def get_commnet_id(numtime):
user_id
=
[]
user_id
=
[]
for
i
in
data_id
:
for
i
in
data_id
:
user_id
.
append
(
i
)
if
i
[
0
]
is
not
None
:
user_id
.
append
(
i
)
for
i
in
data1_id
:
for
i
in
data1_id
:
user_id
.
append
(
i
)
if
i
[
0
]
is
not
None
:
user_id
.
append
(
i
)
for
i
in
data2_id
:
for
i
in
data2_id
:
user_id
.
append
(
i
)
if
i
[
0
]
is
not
None
:
user_id
.
append
(
i
)
for
i
in
data3_id
:
for
i
in
data3_id
:
user_id
.
append
(
i
)
if
i
[
0
]
is
not
None
:
user_id
.
append
(
i
)
print
(
"Database version :
%
s "
%
user_id
)
print
(
"Database version :
%
s "
%
user_id
)
...
...
auto_pick.py
View file @
fecd87b1
...
@@ -140,15 +140,17 @@ def time_conv(numtime):
...
@@ -140,15 +140,17 @@ def time_conv(numtime):
return
None
return
None
def
get_data
(
numtime
):
def
get_data
(
numtime
):
try
:
try
:
db
=
pymysql
.
connect
(
host
=
"rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com"
,
user
=
'work'
,
passwd
=
'Gengmei123'
,
db
=
"alpha"
,
port
=
3306
)
db
=
pymysql
.
connect
(
host
=
"rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com"
,
user
=
'work'
,
passwd
=
'Gengmei123'
,
db
=
"alpha"
,
port
=
3306
)
cursor
=
db
.
cursor
()
cursor
=
db
.
cursor
()
cursor
.
execute
(
"SELECT distinct(user_id) FROM topic WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
cursor
.
execute
(
"SELECT distinct(user_id) FROM topic
WHERE create_time LIKE '
%%%%%
s
%%%%
'"
%
numtime
)
data
=
cursor
.
fetchall
()
data
=
cursor
.
fetchall
()
user_id
=
list
(
data
)
user_id
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
data
)
logging
.
info
(
"Database version :
%
s "
%
data
)
db
.
close
()
db
.
close
()
return
user_id
return
user_id
except
:
except
:
logging
.
error
(
"catch exception,get_data:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,get_data:
%
s"
%
traceback
.
format_exc
())
return
None
return
None
...
@@ -194,9 +196,9 @@ if __name__ == "__main__":
...
@@ -194,9 +196,9 @@ if __name__ == "__main__":
#topic
#topic
for
i
in
time_list
:
for
i
in
range
(
len
(
time_list
))
:
numtime
=
time_conv
(
i
)
numtime
=
time_conv
(
time_list
[
i
]
)
user_id
=
get_data
(
numtime
)
user_id
=
get_data
(
numtime
)
...
...
dd.py
0 → 100644
View file @
fecd87b1
x
=
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
695
,),
(
696
,),
(
695
,),
(
698
,),
(
699
,),
(
700
,),
(
695
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
709
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
678
,),
(
None
,),
(
709
,),
(
709
,),
(
709
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
732
,),
(
730
,),
(
729
,),
(
None
,),
(
173
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,),
(
None
,)
for
i
in
x
:
if
i
[
0
]
is
not
None
:
print
(
i
[
0
])
\ No newline at end of file
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