Get a named version.
198472
@Override
  public void exitNamed_version(VersionParser.Named_versionContext ctx)
  {
    IVersion version = null;
    try {
      version = new NamedVersion(ctx.getText());
    }
    catch (InvalidRangeException e) {
      throw new InvalidRangeRuntimeException(e.getMessage(), e);
    }
    stack.push(version);
  }
593164
def get_network_by_name_version(self, name: str, version: str) -> Optional[Network]:
        """"""
        name_version_filter = and_(Network.name == name, Network.version == version)
        network = self.session.query(Network).filter(name_version_filter).one_or_none()
        return network
859477
def get_version(module):
    
    version_names = ["__version__", "get_version", "version"]
    version_names.extend([name.upper() for name in version_names])
    for name in version_names:
        try:
            version = getattr(module, name)
        except AttributeError:
            continue
        if callable(version):
            version = version()
        try:
            version = ".".join([str(i) for i in version.__iter__()])
        except AttributeError:
            pass
        return version
742631
def get_version(filename):
    """"""
    with open(filename) as in_fh:
        for line in in_fh:
            if line.startswith('__version__'):
                return line.split('=')[1].strip()[1:-1]
    raise ValueError("Cannot extract version from %s" % filename)
252478
def versions_request(self):
        """"""
        ret = self.handle_api_exceptions('GET', '', api_ver='')
        return [str_dict(x) for x in ret.json()]
845398
def get_version(name, dirs=None, config=None):
    
    if dirs:
        p = _get_program_file(dirs)
    else:
        p = tz.get_in(["resources", "program_versions"], config)
    if p:
        with open(p) as in_handle:
            for line in in_handle:
                prog, version = line.rstrip().split(",")
                if prog == name and version:
                    return version
        raise KeyError("Version information not found for %s in %s" % (name, p))
598278
def get_release_info(self, name, version):  # type: (str, str) -> dict
        
        if self._disable_cache:
            return self._get_release_info(name, version)

        cached = self._cache.remember_forever(
            "{}:{}".format(name, version), lambda: self._get_release_info(name, version)
        )

        cache_version = cached.get("_cache_version", "0.0.0")
        if parse_constraint(cache_version) != self.CACHE_VERSION:
            # The cache must be updated
            self._log(
                "The cache for {} {} is outdated. Refreshing.".format(name, version),
                level="debug",
            )
            cached = self._get_release_info(name, version)

            self._cache.forever("{}:{}".format(name, version), cached)

        return cached
1044886
def _get_version():
    """"""

    with open(join(dirname(__file__), '{{project.package}}/VERSION'), 'rb') as f:
        version = f.read().decode('ascii').strip()
    return version
65232
def named(self, name):
        ''''''
        name = self.serialize(name)
        return self.get_by('name', name)
101904
def get_version() :
    ""
    major = ct.c_int()
    minor = ct.c_int()
    micro = ct.c_int()
    dbus.dbus_get_version(ct.byref(major), ct.byref(minor), ct.byref(micro))
    return \
        (major.value, minor.value, micro.value)
479729
def get_version(self, version_id=None):
        
        return ObjectVersion.get(bucket=self.obj.bucket, key=self.obj.key,
                                 version_id=version_id)
1318547
def versions(name)
      name = name.respond_to?(:name) ? name.name : name
      (_cookbooks[name] && _cookbooks[name].keys.sort) || []
    end
1173743
def version(hostname, timeout=20, username=None, password=None):
    '''
    
    '''
    return __version(__connect(hostname, timeout, username, password))
538986
def version():
    """"""
    namespace = {}
    with open(os.path.join('mrcfile', 'version.py')) as f:
        exec(f.read(), namespace)
    return namespace['__version__']
719305
def GetVersion():
  """"""

  with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file:
    exec(version_file.read(), globals())
    return __version__
872209
def fincre(oldname):
    """"""
    x=re.search('_(?P<version>[0-9][0-9][0-9])_syn',oldname)
    version=x.group('version')
    newversion="%03d"%(int(version)+1)
    ans=oldname.replace(version,newversion)
    return ans
17036
def get(cls, object_version, key):
        """"""
        return cls.query.filter_by(
            version_id=as_object_version_id(object_version),
            key=key,
        ).one_or_none()