From 94ad243db3f0c12e28b7514c3480d836b6c37967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=B9=B2?= Date: Wed, 25 Apr 2018 17:01:00 +0800 Subject: [PATCH] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20Pr?= =?UTF-8?q?iceSystem/feature/region=5Ffeature.py=20=09=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=20=20=20=20=20PriceSystem/fix/price=5Ffix.py=20=09?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20PriceSystem/rent=5Fpr?= =?UTF-8?q?ice/=5F=5Fpycache=5F=5F/district=5Fmap0413.cpython-36.pyc=20=09?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20PriceSystem/rent=5Fpr?= =?UTF-8?q?ice/district=5Fmap0413.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PriceSystem/feature/region_feature.py | 4 ++-- PriceSystem/fix/price_fix.py | 3 ++- .../district_map0413.cpython-36.pyc | Bin 17771 -> 17590 bytes PriceSystem/rent_price/district_map0413.py | 12 +++++++++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/PriceSystem/feature/region_feature.py b/PriceSystem/feature/region_feature.py index d21c501..621fa7c 100644 --- a/PriceSystem/feature/region_feature.py +++ b/PriceSystem/feature/region_feature.py @@ -312,7 +312,7 @@ def return_operate(ppu,mm): if ppu==None: return 0 else: - return round(10000*(mm-ppu)/ppu,2) + return int(10000*(mm-ppu)/ppu,2) ''' def before_month_lastday(ti): @@ -402,7 +402,7 @@ def save_region_feature(ct,rl,timd,timm): {"city":ct,"region":rl,"weekend":timme}, - {"city":ct,"region":rl,"district_name":None,"make_up":markup,'ratio':region_feature[0], + {"city":ct,"region":rl,"district_name":None,"markup":markup,'ratio':region_feature[0], "avg_price":region_feature[1], "c_date":date,"weekend":timme,"cat":'region'},True ) diff --git a/PriceSystem/fix/price_fix.py b/PriceSystem/fix/price_fix.py index 7bab91c..0c413ae 100644 --- a/PriceSystem/fix/price_fix.py +++ b/PriceSystem/fix/price_fix.py @@ -113,7 +113,8 @@ estype='普通住宅' ''' ct='上海' -rl='崇明' +rl='崇明' /home/luogan/Downloads/矩阵微分(变分)法.pdf +/home/luogan/Downloads/向量和矩阵的微分.pdf lk='上海经济建设小区' estype='普通住宅' ''' diff --git a/PriceSystem/rent_price/__pycache__/district_map0413.cpython-36.pyc b/PriceSystem/rent_price/__pycache__/district_map0413.cpython-36.pyc index 141cbc53a7f9e75c1d05e2ade74300d3323b3d77..dceea7609868fcca571f50af742340223a3f352b 100644 GIT binary patch delta 290 zcmaFe#kj4Lk<*x$m+P+mgQ%2^oY6*n;tUK7+(66>#KnD^i;N^0>r2?P*t0mA8EQpK zI8zi-6l)k#lxi4Llxz4?WF;9=RBD83M4Gu68A`Zngqj&kxU-ojFcx){@PK%=LLH2? zVl`q}yfq9pj1V0)f+?zVSdjQ4KodlPqG~DXb2w5onwc3HQW%06G&TK-Bp4Vr^O+cP zF;3a+WVe!e@?xhLCHCCJ?9}+uf+Af;28LT~$?++PC8UFp5t;Cn`C4qO(7v-Q;J^-i!{Dja-a`nYozcc=(t&m{=HDm;{)37>hh6 QSGu$_dQ4_?&15VA0D|R64gdfE delta 420 zcmYk2yGsK>5XNWrE@yH{j0w3s6oaosPZ2Q+Rz{Q9h@yoSqJkW5Fu9<}7S=XeSqT;*;{V{DT3E~vzMc8L9p>%?KTpv&5e%x@)a&}!t#2dSo&W&9 zC`nZ9vSnqH*rYwQ_YfKy(;R5T>^9m*`x(#yhBVDWv^xnj!y+u|s0g-~MI5w!Rp}h9 zGh204BXW$5IE$Np1`K~4EKCQlq*$GXBSBn z=ycH~ppzF5HSE$jzsPF|WqZpNAL0fzMGOO~M8$eHzn_l(_4s>!Go|brR`p=t8g*l4 zT%_ITkie=Q;HAPOzb<4j!5_6Ge=962vp<7;qPTzs-YjM{+3QhAD$q{6L`Io(kN{fq O{GoV+^L%lxg7t48d}N{k diff --git a/PriceSystem/rent_price/district_map0413.py b/PriceSystem/rent_price/district_map0413.py index 730170f..30d7f45 100644 --- a/PriceSystem/rent_price/district_map0413.py +++ b/PriceSystem/rent_price/district_map0413.py @@ -897,7 +897,7 @@ def save_to_mongo(ct,rl,lk,timd,timm): if ppu==None: return 0 else: - return round(10000*(mm-ppu)/ppu,2) + return int(10000*(mm-ppu)/ppu,2) ''' def month_lastday(ti): from dateutil.parser import parse @@ -997,7 +997,13 @@ def save_to_mongo(ct,rl,lk,timd,timm): make_up=return_operate(mmup,mm) #print('d_time=',time.time()-d) ###print('p=',p) - date=datetime.datetime.now() + + def c_date(): + date1=datetime.datetime.now() + + pacific = pytz.timezone('Asia/Shanghai') + return pacific.localize(date1) + date=c_date() #weekend=20161231 print("######################## ","ct=",ct,"rl=",rl,"lk=",p[0],"mm=",mm,make_up) """ @@ -1020,7 +1026,7 @@ def save_to_mongo(ct,rl,lk,timd,timm): {"city":ct,"region":rl,"district_name":p[0],"weekend":timme}, - {"city":ct,"region":rl,"district_name":p[0],"make_up":make_up, + {"city":ct,"region":rl,"district_name":p[0],"markup":make_up, "avg_price":mm, "c_date":date,"weekend":timme,"cat":'district'},True )