Returns formatting data for all MeasureUnits except for currency ones.
963780
private static MeasureFormatData loadLocaleData(ULocale locale) {
        ICUResourceBundle resource =
                (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_UNIT_BASE_NAME, locale);
        MeasureFormatData cacheData = new MeasureFormatData();
        UnitDataSink sink = new UnitDataSink(cacheData);
        resource.getAllItemsWithFallback("", sink);
        return cacheData;
    }
252635
def get_flags():
    
    flags = unitdata.kv().getrange('reactive.states.', strip=True) or {}
    return sorted(flags.keys())
334254
def units(self):
        
        self._units, value = self.get_attr_string(self._units, 'units')
        return value
77169
static String humanReadableUnits(long bytes, DecimalFormat df) {
    if (bytes / ONE_GB > 0) {
      return df.format((float) bytes / ONE_GB) + " GB";
    } else if (bytes / ONE_MB > 0) {
      return df.format((float) bytes / ONE_MB) + " MB";
    } else if (bytes / ONE_KB > 0) {
      return df.format((float) bytes / ONE_KB) + " KB";
    } else {
      return bytes + " bytes";
    }
  }
338676
public static String formatCurrency(ITemplate template, Object data, String currencyCode) {
        return formatCurrency(template, data, currencyCode, null);
    }
1043649
def measurements(self):
        
        if 'measurements' in self._values:
            return self._values['measurements']
        self._values['measurements'] = copy.deepcopy(self._defaults['measurements'])
        return self._values['measurements']
54522
def get(self, request, *args, **kwargs):
        ''''''
        measurements = Measurement.objects.all()    
        return data_csv(self.request, measurements)
1108612
List<Measurement> getMeasurements() {
    return stream()
        .filter(m -> !m.hasExpired())
        .flatMap(m -> StreamSupport.stream(m.measure().spliterator(), false))
        .collect(Collectors.toList());
  }
491896
public int getDefaultFractionDigits(CurrencyUsage Usage) {
        CurrencyMetaInfo info = CurrencyMetaInfo.getInstance();
        CurrencyDigits digits = info.currencyDigits(subType, Usage);
        return digits.fractionDigits;
    }
949071
def format_units(v, step=None, system="si", units=None):
    
    if v is None:
        return 0, ''

    for prefix, size in UnitSystems[system]:
        if condition(v, size, step):
            v2 = v / size
            if v2 - math.floor(v2) < 0.00000000001 and v > 1:
                v2 = float(math.floor(v2))
            if units:
                prefix = "%s%s" % (prefix, units)
            return v2, prefix

    if v - math.floor(v) < 0.00000000001 and v > 1:
        v = float(math.floor(v))
    if units:
        prefix = units
    else:
        prefix = ''
    return v, prefix
922231
public static Collection<String> getFormatProviderNames() {
        Collection<String> providers = Optional.ofNullable(getMonetaryFormatsSpi()).orElseThrow(
                () -> new MonetaryException(
                        "No MonetaryFormatsSingletonSpi loaded, query functionality is not available."))
                .getProviderNames();
        if (Objects.isNull(providers)) {
            Logger.getLogger(MonetaryFormats.class.getName()).warning(
                    "No supported rate/conversion providers returned by SPI: " +
                            getMonetaryFormatsSpi().getClass().getName());
            return Collections.emptySet();
        }
        return providers;
    }
178049
public static CurrencyUnit removeCurrencyUnit(Locale locale) {
        Objects.requireNonNull(locale);
        return ConfigurableCurrencyUnitProvider.CURRENCY_UNITS_BY_LOCALE.remove(locale);
    }
33577
public Collection<String> getCurrencyCodes() {
        Collection<String> result = get(KEY_QUERY_CURRENCY_CODES, Collection.class);
        if (result == null) {
            return Collections.emptySet();
        }
        return result;
    }
1264122
public function format($measurement = null)
    {
        // Get the value
        $value = $this->getValue();

        // Do we have a negative value?
        $negative = $value < 0;

        // Switch to negative format
        $format = $negative ? 'negative' : 'format';

        // Get the measurement format
        $measurement = $measurement ?: $this->getMeasurement("{$this->to}.{$format}");

        // Value Regex
        $valRegex = '/([0-9].*|)[0-9]/';

        // Match decimal and thousand separators
        preg_match_all('/[,.!]/', $measurement, $separators);

        if ($thousand = array_get($separators, '0.0', null)) {
            if ($thousand == '!') {
                $thousand = '';
            }
        }

        $decimal = array_get($separators, '0.1', null);

        // Match format for decimals count
        preg_match($valRegex, $measurement, $valFormat);

        $valFormat = array_get($valFormat, 0, 0);

        // Count decimals length
        $decimals = $decimal ? strlen(substr(strrchr($valFormat, $decimal), 1)) : 0;

        // Strip negative sign
        if ($negative) {
            $value *= -1;
        }

        // Format the value
        $value = number_format($value, $decimals, $decimal, $thousand);

        // Return the formatted measurement
        return preg_replace($valRegex, $value, $measurement);
    }
91833
def extract_units(tokens, start, result):
    """"""
    for e in result:
        for child in e.iter():
            if 'cm−1' in child.text:
                return [E('units', 'cm−1')]
    return []
248832
def _check_valid_udunits(self, ds, variable_name):
        '''
        
        '''
        variable = ds.variables[variable_name]

        units = getattr(variable, 'units', None)
        standard_name = getattr(variable, 'standard_name', None)
        standard_name, standard_name_modifier = self._split_standard_name(standard_name)
        std_name_units_dimensionless = cfutil.is_dimensionless_standard_name(self._std_names._root,
                                                               standard_name)

        # If the variable is supposed to be dimensionless, it automatically passes
        should_be_dimensionless = (variable.dtype.char == 'S' or
                                   std_name_units_dimensionless)

        valid_udunits = TestCtx(BaseCheck.HIGH, self.section_titles["3.1"])
        are_udunits = (units is not None and util.units_known(units))
        valid_udunits.assert_true(should_be_dimensionless or are_udunits,
                                  'units for {}, "{}" are not recognized by UDUNITS'.format(variable_name, units))
        return valid_udunits.to_result()
1297249
def unit(self, unit):
        
        allowed_values = ["cm", "inch", "foot"]  # noqa: E501
        if unit is not None and unit not in allowed_values:
            raise ValueError(
                "Invalid value for `unit` ({0}), must be one of {1}"  # noqa: E501
                .format(unit, allowed_values)
            )

        self._unit = unit