Commit ec91c0cf authored by 张彦钊's avatar 张彦钊

add

parent b6954548
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import json import json
import requests import requests
url="http://127.0.0.1:4050/v1/once" # url="http://127.0.0.1:4050/v1/once"
# url="http://doris.paas.test/v1/once" url="http://doris.paas.test/v1/once"
# 如果在生产环境doris 01上执行,把url改成"http://127.0.0.1:4050/v1/once" # 如果在生产环境doris 01上执行,把url改成"http://127.0.0.1:4050/v1/once"
header_dict={'Content-Type': 'application/x-www-form-urlencoded'} header_dict={'Content-Type': 'application/x-www-form-urlencoded'}
param_dict={} param_dict={}
param_dict["method"]="doris/search/bangdan" param_dict["method"]="doris/search/bangdan"
param_detail = {"device_id":"1","size":10,"user_city_tag_id":352,"offset":0,"is_officer":False,"unit_ids":[]} param_detail = {"device_id":"1","size":20,"user_city_tag_id":328,"offset":0,"is_officer":False,"unit_ids":[]}
param_dict["params"]=json.dumps(param_detail) param_dict["params"]=json.dumps(param_detail)
......
...@@ -55,6 +55,8 @@ def get_data(): ...@@ -55,6 +55,8 @@ def get_data():
def get_ctr(): def get_ctr():
pass pass
if __name__ == "__main__": if __name__ == "__main__":
DIRECTORY_PATH = "/home/gmuser/" DIRECTORY_PATH = "/home/gmuser/"
df = pd.DataFrame(list(get_data())) df = pd.DataFrame(list(get_data()))
......
...@@ -73,7 +73,7 @@ def hospital(): ...@@ -73,7 +73,7 @@ def hospital():
data = data.drop_duplicates() data = data.drop_duplicates()
print(data.shape) print(data.shape)
data.to_csv('/tmp/311_hospital.csv',index=False) data.to_csv('/tmp/41_hospital.csv',index=False)
def new_doctor(): def new_doctor():
...@@ -139,12 +139,12 @@ def new_doctor(): ...@@ -139,12 +139,12 @@ def new_doctor():
data = data.drop_duplicates() data = data.drop_duplicates()
print(data.shape) print(data.shape)
data.to_csv('/tmp/311_doctor.csv',index=False) data.to_csv('/tmp/41_doctor.csv',index=False)
print("doctor end") print("doctor end")
if __name__ == "__main__": if __name__ == "__main__":
date_str = "20200310" date_str = "20200331"
new_doctor() new_doctor()
hospital() hospital()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment