58968908de
修改: PriceSystem/fangjia/__init__.py 修改: PriceSystem/feature/region_feature.py 修改: PriceSystem/rent_price/district_map0413.py 修改: PriceSystem/rent_test.py
86 lines
1.2 KiB
Python
86 lines
1.2 KiB
Python
import datetime
|
|
import fangjia
|
|
import pytz
|
|
#fangjia.send_dingding_msg("测试")
|
|
|
|
import time
|
|
|
|
import rent_price.district_map0413 as rentPrice
|
|
|
|
def get_weekend(tt):
|
|
|
|
from dateutil.parser import parse
|
|
bb=parse(tt)
|
|
pacific = pytz.timezone('Asia/Shanghai')
|
|
return pacific.localize(bb)
|
|
|
|
weekend = get_weekend('20180515')
|
|
|
|
ct='上海'
|
|
|
|
rl='闵行'
|
|
lk='上海康城'#上海闵行闵浦新苑一村普陀曹杨一村上海北京东城左安漪园
|
|
#黄浦伯爵居静安泰安里长宁新泾北苑上海奉贤海岸景苑闵行陇兴别墅阳江雅苑养生城二期
|
|
|
|
timm=20180430
|
|
timd=20170531
|
|
a=time.time()
|
|
rentPrice.save_to_mongo(ct,rl,lk,timd,timm)
|
|
|
|
print(time.time()-a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'''
|
|
s = time.time()
|
|
|
|
ct='上海'
|
|
rl='浦东'
|
|
lk='滨江一品苑'
|
|
|
|
|
|
|
|
#for i in range(0, 100):深圳福田世纪豪庭
|
|
|
|
rentPrice.out_put_price(ct, rl, lk, weekend)
|
|
e = time.time()
|
|
|
|
print(e - s)
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
###
|
|
import pandas as pd
|
|
|
|
a=pd.read_excel('小区调查.xlsx')
|
|
|
|
for i in a.index:
|
|
ct=a['城市'][i]
|
|
rl=a['区域'][i]
|
|
lk=a['小区名'][i]
|
|
sellPrice.out_put_price(ct, rl, lk, weekend)
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
@fangjia.cache(1000)
|
|
def sum1(a, b):
|
|
print(111)
|
|
return a + b
|
|
|
|
|
|
print(sum1(1,2))
|
|
'''
|