the country the source is registered in
517843
def source_country
      # source can only be accessed via Customer
      cus = Stripe::Customer.retrieve self.indifferent_json[:customer]
      # TODO this is wrong, because there might be multiple sources and I 
      # just randomly select the first one - also some source types might NOT even
      # have a country information
      cus.sources.data[0].country
    end
37901
def origin(self):
        
        libfn = utils.get_lib_fn('getOrigin%s'%self._libsuffix)
        return libfn(self.pointer)
784192
function getCountryList() {
        var countries = grunt.option("countries");
        if (!countries) {
            grunt.fail.fatal("Country list not passed. Example usage: `grunt customBuild --countries=Canada,United States`");
        }

        // countries may contain commas in their names. Bit ugly, but simple. This swiches out those escaped commas
        // and replaces them later
        var commaReplaced = countries.replace(/\\,/g, '{COMMA}');
        var targetCountries = _.map(commaReplaced.split(","), function (country) {
            return country.replace(/\{COMMA\}/, ',').trim();
        });

        var countryData = [];
        var foundCountryNames = [];

        var formattedData = minifyJSON(countriesJSON);
        _.each(formattedData, function (countryInfo) {
            var countryName = countryInfo[0];
            if (_.contains(targetCountries, countryName)) {
                countryData.push(countryInfo);
                foundCountryNames.push(countryName);
            }
        });

        // if one or more of the countries wasn't found, they probably made a typo: throw a warning but continue
        if (targetCountries.length !== countryData.length) {
            grunt.log.error("The following countries weren't found (check the source/data.json file to ensure you entered the exact country string):");
            var missing = _.difference(targetCountries, foundCountryNames);
            _.each(missing, function (countryName) {
                grunt.log.error("--", countryName);
            });

            // all good! Let the user know what bundle is being created, just to remove any ambiguity
        } else {
            grunt.log.writeln("");
            grunt.log.writeln("Creating bundle with following countries:");
            _.each(targetCountries, function (country) {
                grunt.log.writeln("* " + country);
            });
        }

        config.template.customBuild.options.data.__DATA__ = "\nvar _data = " + JSON.stringify(countryData);
    }
1028870
function(_data){
                var _result = {};
                _data = _data||_o;
                _result.origin = _data.origin||'';
                _result.ref  = location.href;
                _result.self = _data.source;
                _result.data = JSON.stringify(_data.data);
                return _key+_u._$object2string(_result,'|',!0);
            }
233261
protected function checkUserCountry()
    {
        $isValid = true;

        $payPalPayment = $this->getPayment();

        $countries = $payPalPayment->getCountries();
        if ($countries) {
            $isValid = false;
            foreach ($countries as $countryId) {
                if ($countryId === $this->getShippingCountryId()) {
                    $isValid = true;
                    break;
                }
            }
        }

        return $isValid;
    }
642938
protected function getCountryInformation()
    {
        // Get the country for the lookup.
        $country = null;

        if (('get' === $this->get('countrymode')) && $this->get('country_get')) {
            $getValue = Input::get($this->get('country_get')) ?: Input::post($this->get('country_get'));
            $getValue = \trim($getValue);
            if (!empty($getValue)) {
                $country = $getValue;
            }
        } elseif ('preset' === $this->get('countrymode')) {
            $country = $this->get('country_preset');
        }

        return $country;
    }
1334750
def country_prefix(country)
      country = country.to_s.upcase
      Phonelib.phone_data[country] && \
        Phonelib.phone_data[country][Core::COUNTRY_CODE]
    end
609846
protected function validateEditCountry()
    {
        $this->setSubmitted('country');
        $this->setSubmittedBool('status');
        $this->setSubmitted('update', $this->data_country);

        $this->validateComponent('country');

        return !$this->hasErrors();
    }
1247691
private boolean isI18nSourceFileChanged(File sourceDirectory) {
    Scanner scanner = buildContext.newScanner(sourceDirectory);
    Scanner deleteScanner = buildContext.newDeleteScanner(sourceDirectory);
    return isI18nSourceFileChanged(scanner) || isI18nSourceFileChanged(deleteScanner);
  }
895454
function createMalaysiaPosEntity(html) {

    let $ = parser.load(html)
    let id = $('#trackingNo03').get(0).children[0].data.trim()
    let init = html.indexOf("var strTD")
    init = html.indexOf('"', init + 1)
    let fin = html.indexOf('"', init + 1)
    let strTD = html.substring(init, fin)

    $ = parser.load(strTD)
    let trs = $('#tbDetails tbody tr')
    let states = utils.tableParser(
        trs,
        {
            'date': {
                'idx': 0,
                'mandatory': true,
                'parser': elem => {
                    return moment.tz(elem, 'DD MMM YYYY HH:mm:ss', 'en', zone).format()
                }
            },
            'state': {'idx': 1, 'mandatory': true},
            'area': {'idx': 2}
        },
        elem => {
            // On Maintenance there is a row with a td colspan=4, we want to skip it
            if(elem.children[0].attribs && elem.children[0].attribs.colspan &&
                elem.children[0].attribs.colspan == 4) {
                return false
            }

            return true
        })

    return new MalaysiaInfo({
        id: id,
        state: states[0].state,
        states: states
    })
}
1092000
def getCountry(self, default=None):
        
        physical_address = self.getPhysicalAddress().get("country", default)
        postal_address = self.getPostalAddress().get("country", default)
        return physical_address or postal_address
200883
def match_country_name_to_its_code(country_name, city=''):
    
    if country_name:
        country_name = country_name.upper().replace('.', '').strip()

        if country_to_iso_code.get(country_name):
            return country_to_iso_code.get(country_name)
        elif country_name == 'KOREA':
            if city.upper() in south_korean_cities:
                return 'KR'
        else:
            for c_code, spellings in countries_alternative_spellings.items():
                for spelling in spellings:
                    if country_name == spelling:
                        return c_code

    return None
539341
def _data():
    
    global _DATA
    if _DATA is None:
        _DATA = {}
        with open(resource_filename(__name__, 'data.json'), 'r', encoding='utf-8') as f:
            _DATA['alpha3'] = {k: Currency(**v) for k, v in json.load(f).items()}

        _DATA['code_num'] = {d.code_num: d for d in _DATA['alpha3'].values() if d.code_num is not None}
        _DATA['symbol'] = defaultdict(list)
        for d in _DATA['alpha3'].values():
            for s in d.symbols:
                _DATA['symbol'][s] += [d]

        for s, d in _DATA['symbol'].items():
            _DATA['symbol'][s] = sorted(d, key=lambda d: 10000 if d.code_num is None else d.code_num)

        _DATA['name'] = {}
        for d in _DATA['alpha3'].values():
            if d.name in _DATA['name']:
                assert 'Duplicate name "{}"!'.format(d.name)
            _DATA['name'][d.name] = d

        _DATA['country'] = defaultdict(list)
        for d in _DATA['alpha3'].values():
            for cc in d.countries:
                _DATA['country'][cc] += [d]

        for s, d in _DATA['country'].items():
            _DATA['country'][s] = sorted(d, key=lambda d: (
                int(d.symbols == []),  # at least one symbol
                10000 if d.code_num is None else d.code_num,  # official first
                len(d.countries),  # the fewer countries the more specific
            ))

    return _DATA
1251080
public function getCountry()
    {
        if (! $this->country) {
            $this->country = $this->filterValidCountry($this->countries);
        }

        return $this->country;
    }
520169
def valid_for_country?(country)
      country = country.to_s.upcase
      tdata = analyze(sanitized, passed_country(country))
      tdata.find do |iso2, data|
        country == iso2 && data[:valid].any?
      end.is_a? Array
    end
37370
def country_can_dp?(country)
      Phonelib.phone_data[country] &&
        Phonelib.phone_data[country][Core::DOUBLE_COUNTRY_PREFIX_FLAG] &&
        !original_starts_with_plus?
    end
456480
def country_bank_code(self):
        """"""
        entry = registry.get('bic').get(self.compact)
        if entry:
            return entry.get('bank_code')