Ejemplo n.º 1
0
        row[cnames.index("PROP_ServAgua")]))  # db.IntegerProperty()
    prop.gas_natural = int(tryint(row[cnames.index(
        "PROP_ServGasNatural")]))  #db.IntegerProperty(indexed=False)
    prop.gas_envasado = int(tryint(row[cnames.index(
        "PROP_ServGasGarrafa")]))  #db.IntegerProperty(indexed=False)
    prop.luz = int(tryint(
        row[cnames.index("PROP_ServLuz")]))  #db.IntegerProperty(indexed=False)
    prop.cloacas = int(tryint(row[cnames.index(
        "PROP_ServCloacas")]))  #db.IntegerProperty(indexed=False)
    prop.telefono = int(tryint(row[cnames.index(
        "PROP_ServTelefono")]))  #db.IntegerProperty(indexed=False)
    prop.tv_cable = int(tryint(row[cnames.index(
        "PROP_ServCable")]))  #db.IntegerProperty(indexed=False)
    prop.internet = 0  #db.IntegerProperty(indexed=False)
    prop.vigilancia = 0  #db.IntegerProperty(indexed=False)
    prop.monitoreo = 0  #db.IntegerProperty(indexed=False)
    prop.patio = int(tryint(row[cnames.index("PROP_Patio")]))

    antiguedad = int(tryint(row[cnames.index("PROP_Antiguedad")]))

    #0, 1961, 1991, 2001, 2006, 2011, 9999999999
    if (antiguedad) == 0:
        prop.year_built = 0
    elif (antiguedad) < 5:
        prop.year_built = 1
    elif (antiguedad) < 10:
        prop.year_built = 5
    elif (antiguedad) < 20:
        prop.year_built = 10
    elif (antiguedad) <= 50:
        prop.year_built = 50
Ejemplo n.º 2
0
 prop.terrace                 = int(random.randint(0, 1)) # db.IntegerProperty()
 
 # AMENITIES FIELDS GROUP 3 & YEAR BUILT
 prop.washer_dryer            = int(random.randint(0, 1)) # db.IntegerProperty()
 prop.sum	                   = int(random.randint(0, 1)) # db.IntegerProperty()
 
 prop.agua_corriente          = int(random.randint(0, 1)) # db.IntegerProperty()
 prop.gas_natural             = int(random.randint(0, 1)) #db.IntegerProperty(indexed=False)
 prop.gas_envasado            = int(random.randint(0, 1)) #db.IntegerProperty(indexed=False)
 prop.luz                     = int(random.randint(0, 1)) #db.IntegerProperty(indexed=False)
 prop.cloacas                 = int(random.randint(0, 1)) #db.IntegerProperty(indexed=False)
 prop.telefono                = int(random.randint(0, 1)) #db.IntegerProperty(indexed=False)
 prop.tv_cable                = int(random.randint(0, 1)) #db.IntegerProperty(indexed=False)
 prop.internet                = int(random.randint(0, 1)) #db.IntegerProperty(indexed=False)
 prop.vigilancia              = int(random.randint(0, 1)) #db.IntegerProperty(indexed=False)
 prop.monitoreo               = int(random.randint(0, 1)) #db.IntegerProperty(indexed=False)
 
 prop.year_built	             = int(random.randint(1950, 2011)) # db.IntegerProperty()
 
 # PUBLISHER	
 prop.realestate              = str(int(random.randint(1, 10))) # db.ReferenceProperty(RealEstate)
   
 # PROPERTY TYPES
 prop.prop_type_id	                  = str(alphabet[int(random.randint(1, 11))]) # db.StringProperty()
 #prop.prop_type_id	                  = str(alphabet[4]) # db.StringProperty()
 # PROPERTY STATE & OPERATION & OWNER
 prop.prop_state_id	                = int(random.randint(1, 7)) # db.IntegerProperty()
 prop.prop_operation_state_id	      = int(random.randint(1, 4)) # db.IntegerProperty()
 prop.prop_owner_id	                = int(random.randint(1, 2)) # db.IntegerProperty()
 prop.prop_operation_id	            = int(random.randint(1, 2)) # db.IntegerProperty()