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
59f7ecf2
Commit
59f7ecf2
authored
May 18, 2020
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
4967508e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
check_in_key.py
check_in_key.py
+14
-0
near_city.py
near_city.py
+9
-0
No files found.
check_in_key.py
0 → 100644
View file @
59f7ecf2
import
redis
import
json
tag_key
=
"meigou_check_in_tag_ids"
T1
=
[
85
,
86
,
87
,
5057
,
88
,
89
,
101
,
102
,
777
,
780
,
95
,
890
,
2923
,
844
,
258
,
912
,
914
,
1324
,
2108
,
2935
,
5063
,
185
,
915
,
916
,
2936
,
2937
,
2938
,
5064
,
188
,
775
,
824
,
1703
,
2939
,
3041
,
3049
,
5067
,
5068
,
180
,
187
,
246
,
821
,
825
,
1966
,
2072
,
5065
,
2060
,
2778
,
2941
,
5066
,
835
,
828
,
830
,
831
,
832
,
833
,
834
,
918
,
919
,
5069
,
36
,
171
,
181
,
2065
,
2066
,
2067
,
2068
,
2948
,
6160
,
2450
,
917
,
2455
,
5070
,
2459
,
2460
,
822
,
872
,
873
,
926
,
928
,
2063
,
2866
,
5072
,
199
,
200
,
201
,
202
,
203
,
204
,
205
,
206
,
207
,
243
,
244
,
787
,
930
,
931
,
1801
,
2352
,
5073
,
97
,
99
,
115
,
121
,
123
,
137
,
141
,
152
,
197
,
776
,
804
,
868
,
885
,
954
,
5074
,
117
,
237
,
842
,
5077
,
778
,
782
,
783
,
784
,
785
,
788
,
789
,
2946
,
3043
,
2059
,
4437
,
98
,
114
,
120
,
125
,
135
,
136
,
140
,
153
,
793
,
805
,
886
,
1890
,
15
,
17
,
19
,
975
,
72
,
34
,
35
,
41
,
47
,
1387
,
1992
,
2942
,
2663
,
154
,
155
,
157
,
852
,
61
,
79
,
1055
,
2033
,
3042
,
3044
,
6147
,
2112
]
r
=
redis
.
StrictRedis
.
from_url
(
'redis://:ReDis!GmTx*0aN6@172.16.40.133:6379'
)
r
.
set
(
tag_key
,
json
.
dumps
(
T1
))
near_city.py
View file @
59f7ecf2
...
...
@@ -22,6 +22,15 @@ def get_city():
df
.
to_csv
(
'/tmp/city.csv'
,
index
=
False
)
def
write_city
():
a
=
[[
1
,
'2'
,
'3'
],
[
'4'
,
'5'
,
'6'
]]
b
=
pd
.
DataFrame
(
a
)
from
sqlalchemy
import
create_engine
yconnect
=
create_engine
(
'mysql+pymysql://root:3SYz54LS9#^9sBvC@10.66.157.22:4000/jerry_test?charset=utf8'
)
pd
.
io
.
sql
.
to_sql
(
df
,
table
,
yconnect
,
schema
=
'jerry_test'
,
if_exists
=
'append'
,
index
=
False
)
if
__name__
==
"__main__"
:
get_city
()
...
...
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