Returns the numeric resource version of the resource
543262
public static long parseResourceVersion(HasMetadata obj) {
        ObjectMeta metadata = obj.getMetadata();
        if (metadata != null) {
            String resourceVersion = metadata.getResourceVersion();
            if (notEmpty(resourceVersion)) {
                try {
                    return Long.parseLong(resourceVersion);
                } catch (NumberFormatException e) {
                    // ignore
                }
            }
        }
        return 0;
    }
1310842
def version(which="num"):
    """"""
    if which in VERSIONS:
        return VERSIONS[which]
    else:
        raise CoconutException(
            "invalid version type " + ascii(which),
            extra="valid versions are " + ", ".join(VERSIONS),
        )
36599
public static void sortByNumberOfVersionsDesc(List<ClasspathResource> resources) {
        // sort by number of version occurrences
        Comparator<ClasspathResource> sortByNumberOfVersionsDesc = new Comparator<ClasspathResource>() {
            @Override
            public int compare(ClasspathResource resource1, ClasspathResource resource2) {
                return -1 * new Integer(resource1.getResourceFileVersions().size()).compareTo(resource2.getResourceFileVersions().size());
            }
        };
        Collections.sort(resources, sortByNumberOfVersionsDesc);
    }
217722
def getVersion(data):
    
    data = data.splitlines()
    return next((
        v
        for v, u in zip(data, data[1:])  # v = version, u = underline
        if len(v) == len(u) and allSame(u) and hasDigit(v) and "." in v
    ))
133913
def _get_version(name, results):
    '''
    
    '''
    for line in salt.utils.itertools.split(results, '\n'):
        if not line:
            continue
        try:
            pkgname, pkgver = line.rsplit('-', 1)
        except ValueError:
            continue
        if pkgname == name:
            return pkgver
    return None
724199
def get_lipd_version(L):
    
    version = 1.0
    _keys = ["LipdVersion", "LiPDVersion", "lipdVersion", "liPDVersion"]
    for _key in _keys:
        if _key in L:
            version = L[_key]
            # Cast the version number to a float
            try:
                version = float(version)
            except AttributeError:
                # If the casting failed, then something is wrong with the key so assume version is 1.0
                version = 1.0
            L.pop(_key)
    return L, version
428085
function convertVersionNumber (ver) {
    var hashVersion = {
        '18.0': '1.0.1',
        '18.1': '1.1',
        '26.0': '1.2',
        '28.0': '1.3',
        '30.0': '1.4',
        '32.0': '2.0'
    };
    var rver = ver;
    var sStr = ver.substring(0, 4);
    if (hashVersion[sStr]) {
        rver = hashVersion[sStr];
    }
    return (rver);

}
889
def get_pretty_version(self, diff_to_increase_ratio):
        
        version = self.get_version(diff_to_increase_ratio)
        build = self.get_last_commit_hash()
        return str(version) + " (" + build + ")"
1015047
def version(rest):
	""
	pkg = rest.strip() or 'pmxbot'
	if pkg.lower() == 'python':
		return sys.version.split()[0]
	return importlib_metadata.version(pkg)
1055639
def my_version():
    """"""
    if os.path.exists(resource_filename(__name__, 'version')):
        return resource_string(__name__, 'version')

    return open(os.path.join(os.path.dirname(__file__),
                             "..", "version")).read()
1200934
def version():
    '''
    
    '''
    _false_return = {'result': False,
                     'comment': 'OSQuery version unavailable.'}
    res = _osquery_cmd(table='osquery_info', attrs=['version'])
    if 'result' in res and res['result']:
        if 'data' in res and isinstance(res['data'], list):
            return res['data'][0].get('version', '') or _false_return
    return _false_return
944644
def get_version_data():
    """"""
    connect_str = str(settings.CFG["db"]["connect_string"])
    repo_url = path.template_path("../db/")
    return (connect_str, repo_url)
1101200
def version(self):
        

        resp = self.call('version')

        for key in ('rpc_version', 'store_version'):
            resp[key] = int(resp[key])

        return resp
1100022
def version(self):
        """"""
        url: str = get_url("/service/version.json")
        params = {"service": "remote"}
        r = self._request(url=url, params=params)
        return r.json()
996493
def _get_version():
    """"""
    with open("../waliki/__init__.py") as fh:
        for line in fh:
            if line.startswith("__version__ = "):
                return line.split("=")[-1].strip().strip("'").strip('"')
665724
def GetClientVersion(client_id, token=None):
  """"""
  if data_store.RelationalDBEnabled():
    sinfo = data_store.REL_DB.ReadClientStartupInfo(client_id=client_id)
    if sinfo is not None:
      return sinfo.client_info.client_version
    else:
      return config.CONFIG["Source.version_numeric"]
  else:
    with aff4.FACTORY.Open(client_id, token=token) as client:
      cinfo = client.Get(client.Schema.CLIENT_INFO)
      if cinfo is not None:
        return cinfo.client_version
      else:
        return config.CONFIG["Source.version_numeric"]
232209
def _load_resource(version, name)
      _version_module(version).const_get(name.camelcase.singularize).new
    rescue NameError
      nil
    end