Given County, State return the SAME code for specified location. Return False if not found
338114
def lookup_samecode(self, local, state):
        """"""
        for location in self.samecodes:
            if state.lower() == self.samecodes[location]['state'].lower():
                if local.lower() == self.samecodes[location]['local'].lower():
                    return self.samecodes[location]
        return False
400738
def Matches(self, file_entry):
    
    if not self._file_scanner or not file_entry.IsFile():
      return None

    file_object = file_entry.GetFileObject()
    if not file_object:
      return False

    try:
      scan_state = pysigscan.scan_state()
      self._file_scanner.scan_file_object(scan_state, file_object)

    except IOError as exception:
      # TODO: replace location by display name.
      location = getattr(file_entry.path_spec, 'location', '')
      logging.error((
          '[skipping] unable to scan file: {0:s} for signatures '
          'with error: {1!s}').format(location, exception))
      return False

    finally:
      file_object.close()

    return scan_state.number_of_scan_results > 0
951867
function findStoresInRangeLocation(location, range, callback) {
  range = range || 3;

  geo.reverseGeocode(location, function(err, georesult) {
    if (err) return callback(err);
    findStoresInRange(georesult, range, callback);
  });
}
1164127
def matches(self, address, name=None):
        

        if self.controller:
            return address == 8

        return self.address == address
76776
def get_code(self):
        
        code = UNKNOWN
        for result in self._results:
            if code == UNKNOWN or (result.code < UNKNOWN
                                   and result.code > code):
                code = result.code
        return code
592444
function findInstance(state, stateKey, instanceKey, payload) {
    return state[stateKey].find(obj => obj[instanceKey] === payload[instanceKey]);
}
637817
def get(self, location_name):
        
        location_ref = location_helper(location_name, search_only=True)
        if location_ref:
            for location in self:
                if location.location_ref == location_ref:
                    return location
547539
def decide_k(airport_code):
    """"""

    if airport_code[:1].upper() == 'K':
        try: # if there's a match without the K that's likely what it is.
            return Airport.objects.get(location_identifier__iexact=airport_code[1:]).location_identifier
        except Airport.DoesNotExist:
            return airport_code
    else:
        return airport_code
317998
function isUsCounty(wofData) {
  return 'US' === wofData.properties['iso:country'] &&
    'county' === wofData.properties['wof:placetype'] &&
    !_.isUndefined(wofData.properties['qs:a2_alt']);
}
1288503
def postalCodeLookup(self, countryCode, postalCode):
        
        params = {"country": countryCode, "postalcode": postalCode}
        d = self._call("postalCodeLookupJSON", params)
        d.addCallback(operator.itemgetter("postalcodes"))
        return d
795676
function isUSAState (state, strict) {
    state = state && NODE_RATIFY.isString(state) ? _toTitleCase(state) : null;
    var topLevel = (US_STATE_CODE_TO_NAME[state] || US_STATE_NAME_TO_CODE[state]);

    if(strict) {
        return topLevel ? true : false;
    } else {
        return (US_INHABITED_TERRITORIES_CODE_TO_NAME[state] || US_INHABITED_TERRITORIES_NAME_TO_CODE[state] || topLevel) ? true : false;
    }
}
1062772
def _matches_location(price, location):
    """"""
    # the price has no location restriction
    if not price.get('locationGroupId'):
        return True

    # Check to see if any of the location groups match the location group
    # of this price object
    for group in location['location']['location']['priceGroups']:
        if group['id'] == price['locationGroupId']:
            return True

    return False
158768
def duplicate(self):
        """"""
        return Location(self.city, self.state, self.country,
                        self.latitude, self.longitude, self.time_zone, self.elevation,
                        self.station_id, self.source)
1065640
def ContainsAddressStr(self, address):
        
        for key, contract in self._contracts.items():
            if contract.Address == address:
                return True
        return False
238368
def get_fipscode(self, obj):
        """"""
        if obj.division.level.name == DivisionLevel.COUNTY:
            return obj.division.code
        return None
239033
public boolean hasCoding(String system, String code) {
    for (Coding c : getCoding()) {
      if (system.equals(c.getSystem()) && code.equals(c.getCode()))
        return true;
    }
    return false;
  }
248872
def getfeedscope(self, geocodes):
        """"""
        states = self._get_states_from_samecodes(geocodes)
        if len(states) >= 2:
            return 'US'
        else:
            return states[0]