Search zipcode information by house of units.
769704
def by_housing_units(self,
                         lower=-1,
                         upper=2 ** 31,
                         zipcode_type=ZipcodeType.Standard,
                         sort_by=SimpleZipcode.housing_units.name,
                         ascending=False,
                         returns=DEFAULT_LIMIT):
        
        return self.query(
            housing_units_lower=lower,
            housing_units_upper=upper,
            sort_by=sort_by, zipcode_type=zipcode_type,
            ascending=ascending, returns=returns,
        )
272179
def getHouses(date, pos, hsys):
    
    houses, angles = eph.getHouses(date.jd, pos.lat, pos.lon, hsys)
    hList = [House.fromDict(house) for house in houses]
    aList = [GenericObject.fromDict(angle) for angle in angles]
    return (HouseList(hList), GenericList(aList))
35493
public Iterable<DUser> queryByZipCode(java.lang.String zipCode) {
    return queryByField(null, DUserMapper.Field.ZIPCODE.getFieldName(), zipCode);
  }
682569
private void query(String zipcode) {
                        /* Setup YQL query statement using dynamic zipcode. The statement searches geo.places
                        for the zipcode and returns XML which includes the WOEID. For more info about YQL go
                        to: http://developer.yahoo.com/yql/ */
        String qry = URLEncoder.encode("SELECT woeid FROM geo.places WHERE text=" + zipcode + " LIMIT 1");

        // Generate request URI using the query statement
        URL url;
        try {
            // get URL content
            url = new URL("http://query.yahooapis.com/v1/public/yql?q=" + qry);
            URLConnection conn = url.openConnection();

            InputStream content = conn.getInputStream();
            parseResponse(content);

        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
69047
def getHouses(jd, lat, lon, hsys):
    
    houses, angles = swe.sweHouses(jd, lat, lon, hsys)
    for house in houses:
        _signInfo(house)
    for angle in angles:
        _signInfo(angle)
    return (houses, angles)
1167691
def get_families(self):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_template
        catalogs = self._get_provider_session('family_lookup_session').get_families()
        cat_list = []
        for cat in catalogs:
            cat_list.append(Family(self._provider_manager, cat, self._runtime, self._proxy))
        return FamilyList(cat_list)
1139361
public function find($zipcode)
    {
        $this->setZipCode($zipcode)
            ->buildXMLBody()
            ->sendWebServiceRequest()
            ->parseXMLFromResponse();

        if ($this->hasErrorMessage()) {
            return $this->fetchErrorMessage();
        }

        return $this->fetchZipCodeAddress();
    }
910474
def get_by_details(self, name, type, clazz):
        """"""
        entry = DNSEntry(name, type, clazz)
        return self.get(entry)
519322
def search(opts={})
      iso_country_code = opts[:iso_country_code] || 'US'
      resource = opts.delete(:resource)

      params = {
        :AreaCode => opts[:area_code],
        :InPostalCode => opts[:postal_code],
        :InRegion => opts[:in_region],
        :Contains => opts[:contains],
        :NearLatLong => opts[:near_lat_long],
        :NearNumber => opts[:near_number],
        :InLata => opts[:in_lata],
        :InRateCenter => opts[:in_rate_center],
        :Distance => opts[:distance],
        :Page => opts[:page],
        :PageSize => opts[:page_size]
      }.reject {|k,v| v == nil} unless opts.empty?
      
      Twilio.get("/AvailablePhoneNumbers/#{iso_country_code}/#{resource}", :query => params)
    end
1300233
@Override
  public final List<WarehouseEntry> retrieveEntriesForOwner(
    final Map<String, Object> pAddParam,
      final Integer pOwnerTypeCode, final Long pOwnerId) throws Exception {
    String tblNm = WarehouseEntry.class.getSimpleName().toUpperCase();
    String where = " where SOURCEOWNERTYPE=" + pOwnerTypeCode
        + " and " + tblNm + ".IDDATABASEBIRTH=" + getSrvOrm().getIdDatabase()
          + " and SOURCEOWNERID=" + pOwnerId;
    return getSrvOrm()
      .retrieveListWithConditions(pAddParam, WarehouseEntry.class, where);
  }
1287419
def x10_housecode(self):
        """"""
        housecode = None
        if self.is_x10:
            housecode = insteonplm.utils.byte_to_housecode(self.addr[1])
        return housecode
192113
def getSearch(self):
        """"""
        return Search(self.getColumns(), Sitools2Abstract.getBaseUrl(self) + self.getUri())
917771
def _querystring(self):
        """"""

        kw = {"studyoid": self.studyoid}
        if self.location_oid is not None:
            kw["locationoid"] = self.location_oid
        return kw
704345
function(array, property, searchTerm) {
    for (var i = 0, len = array.length; i < len; ++i) {
      var value = array[i][property];
      if (value === searchTerm || value.indexOf(searchTerm) !== -1) {
        return i
      };
    }
    return -1;
  }
824203
def by_prefix(self,
                  prefix,
                  zipcode_type=ZipcodeType.Standard,
                  sort_by=SimpleZipcode.zipcode.name,
                  ascending=True,
                  returns=DEFAULT_LIMIT):
        
        return self.query(
            prefix=prefix,
            sort_by=sort_by, zipcode_type=zipcode_type,
            ascending=ascending, returns=returns,
        )
476940
def where_am_i():
    
    locations = {'Work':0, 'Home':0}
    for ssid in scan_for_ssids():
        #print('checking scanned_ssid ', ssid)
        for l in logged_ssids:
            #print('checking logged_ssid ', l)
            if l['name'] == ssid:
                locations[l['location']] += 1
                #print('MATCH')
    print('Where Am I: SSIDS Matching Home = ', locations['Home'], ' SSIDs matching Work = ', locations['Work'])
    
    return max(locations.keys(), key=lambda k: locations[k])
513293
def find_studies(self, query_dict=None, exact=False, verbose=False, **kwargs):
        """"""
        if self.use_v1:
            uri = '{p}/singlePropertySearchForStudies'.format(p=self.query_prefix)
        else:
            uri = '{p}/find_studies'.format(p=self.query_prefix)
        return self._do_query(uri,
                              query_dict=query_dict,
                              exact=exact,
                              verbose=verbose,
                              valid_keys=self.study_search_term_set,
                              kwargs=kwargs)