Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/g/p/gps2gtfs-HEAD/core/src/GPSBusTrack.py   gps2gtfs(Download)
        for i in range(n):
          T_i = bbox[0] + i * float(oob_time)/n
          loc2 = self.getLocationAtTime(T_i);
          if not loc2: print "ERROR SOMETHING IS TERRIBLY WRONG"
          ret += gis.distance_meters(loc2[:2],loc1)**2
        for i in range(n):
          T_i = bbox[1] - i * float(oob_time)/n
          loc2 = self.getLocationAtTime(T_i);
          if not loc2: print "ERROR SOMETHING IS TERRIBLY WRONG 2"
          ret += gis.distance_meters(loc2[:2],loc1)**2
    for i,pt in enumerate(schedule.interpolation):
      stoptime = pt[2] #- offset_seconds
      myloc = self.getLocationAtTime(stoptime);
      if myloc is None: # then GTFS is out of bounds of GPS time window
        oob_count += 1