Report terminal identity.

        .. versionadded:: 0.5.0

        .. versionchanged:: 0.7.0

           If ``private`` keyword argument is set, the method does nothing.
           This behaviour is consistent with VT220 manual.
18541
def report_device_attributes(self, mode=0, **kwargs):
        
        # We only implement "primary" DA which is the only DA request
        # VT102 understood, see ``VT102ID`` in ``linux/drivers/tty/vt.c``.
        if mode == 0 and not kwargs.get("private"):
            self.write_process_input(ctrl.CSI + "?6c")
53093
@Override
  public void exitVersion_set(VersionParser.Version_setContext ctx)
  {
    Object o1 = stack.pop();
    if (strict && (o1 instanceof NamedVersion)) {
      String name = o1.toString();
      // FIXME: There needs to be a better way to identify illegal named versions. Perhaps insist it contains an alphanumeric?
      switch (name.trim()) {
        case "-":
        case "_":
          throw new InvalidRangeRuntimeException("Invalid named version: " + o1);
        default:
          break;
      }
    }
    if (stack.isEmpty()) {
      VersionSet set = new VersionSet((IVersion) o1);
      stack.push(set);
    }
    else {
      VersionSet set = (VersionSet) stack.peek();
      set.add((IVersion) o1);
    }
  }
633520
public void reportVersion(Version aVersion) {
    LOGGER.debug("+++ enter UnsortedWriterReportVisitor.reportVersion+++");

    String result = aVersion.getName() + " version : " + aVersion.getValue();
    writeStringToWriter(result);
  }
997766
def updateSolutionTerminal(self):
        '''
        
        '''
        AggShockConsumerType.updateSolutionTerminal(self)

        # Make replicated terminal period solution
        StateCount = self.MrkvArray.shape[0]
        self.solution_terminal.cFunc   = StateCount*[self.solution_terminal.cFunc]
        self.solution_terminal.vPfunc  = StateCount*[self.solution_terminal.vPfunc]
        self.solution_terminal.mNrmMin = StateCount*[self.solution_terminal.mNrmMin]
367825
private void checkOrMarkPrivateAccess(Expression source, FieldNode fn) {
        if (fn!=null && Modifier.isPrivate(fn.getModifiers()) &&
            (fn.getDeclaringClass() != typeCheckingContext.getEnclosingClassNode() || typeCheckingContext.getEnclosingClosure()!=null) &&
            fn.getDeclaringClass().getModule() == typeCheckingContext.getEnclosingClassNode().getModule()) {
            addPrivateFieldOrMethodAccess(source, fn.getDeclaringClass(), StaticTypesMarker.PV_FIELDS_ACCESS, fn);
        }
    }
78712
def private_config_content(self, private_config):
        

        try:
            private_config_path = os.path.join(self.working_dir, "private-config.cfg")

            if private_config is None:
                private_config = ''

            # We disallow erasing the private config file
            if len(private_config) == 0 and os.path.exists(private_config_path):
                return

            with open(private_config_path, 'w+', encoding='utf-8') as f:
                if len(private_config) == 0:
                    f.write('')
                else:
                    private_config = private_config.replace("%h", self._name)
                    f.write(private_config)
        except OSError as e:
            raise IOUError("Can't write private-config file '{}': {}".format(private_config_path, e))
163122
def version
      logger.info "Determining Vagrant version for #{description}"
      output = execute!("--version").stdout
      Derelict::Parser::Version.new(output).version
    end
558475
def initialize_key_source
      detect_key_source
      if args.require_key? && !self.key
        log :error, 'Unable to determine the key, which appears to be required with current args'
        raise Sym::Errors::NoPrivateKeyFound, 'Private key is required when ' + (self.action ? self.action.to_s + 'ypting' : provided_flags.join(', '))
      end
      log :debug, "initialize_key_source: detected key ends with [...#{(key ? key[-5..-1] : 'nil').bold.magenta}]"
      log :debug, "opts: #{self.provided_value_options.to_s.green.bold}"
      log :debug, "flags: #{self.provided_flags.to_s.green.bold}"
    end
426139
def get_mutect_version(mutect_jar):
    
    cl = ["java", "-Xms128m", "-Xmx256m"] + get_default_jvm_opts() + ["-jar", mutect_jar, "-h"]
    with closing(subprocess.Popen(cl, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout) as stdout:
        if "SomaticIndelDetector" in stdout.read().strip():
            mutect_type = "-appistry"
        else:
            mutect_type = ""
    version = os.path.basename(mutect_jar).lower()
    for to_remove in [".jar", "-standalone", "mutect"]:
        version = version.replace(to_remove, "")
    if version.startswith(("-", ".")):
        version = version[1:]
    if not version:
        raise ValueError("Unable to determine MuTect version from jar file. "
                         "Need to have version contained in jar (ie. muTect-1.1.5.jar): %s" % mutect_jar)
    _check_for_bad_version(version, "MuTect")
    return version + mutect_type
382255
def _api_version(profile=None, **connection_args):
    '''
    
    '''
    global _TENANT_ID
    global _OS_IDENTITY_API_VERSION
    try:
        if float(__salt__['keystone.api_version'](profile=profile, **connection_args).strip('v')) >= 3:
            _TENANT_ID = 'project_id'
            _OS_IDENTITY_API_VERSION = 3
    except KeyError:
        pass
761752
def show_version_info(self, version):
        

        if version in self.versions:
            stdout = self.repo.show(version, '--summary').stdout
            logger.info(stdout)
        else:
            logger.info('Version {0} not found'.format(version))
336116
def nick=(nick)
      success = Utils.call_executable_returning_status(
        '-i', id, '--nick', nick, '--update'
      )
      unless success
        raise Error, "Unable to set nickname for interface (#{id}). " \
                    'Please make sure the vnstat daemon is not running while ' \
                    'performing this operation.'
      end
      @nick = nick
    end
86846
def _is_private_ip(ip):
	
	networks = [
		"0.0.0.0/8",
		"10.0.0.0/8",
		"100.64.0.0/10",
		"127.0.0.0/8",
		"169.254.0.0/16",
		"172.16.0.0/12",
		"192.0.0.0/24",
		"192.0.2.0/24",
		"192.88.99.0/24",
		"192.168.0.0/16",
		"198.18.0.0/15",
		"198.51.100.0/24",
		"203.0.113.0/24",
		"240.0.0.0/4",
		"255.255.255.255/32",
		"224.0.0.0/4",
	]

	for network in networks:
		try:
			ipaddr = struct.unpack(">I", socket.inet_aton(ip))[0]

			netaddr, bits = network.split("/")

			network_low = struct.unpack(">I", socket.inet_aton(netaddr))[0]
			network_high = network_low | 1 << (32 - int(bits)) - 1

			if ipaddr <= network_high and ipaddr >= network_low:
				return True
		except Exception:
			continue

	return False
781915
def auth(profile=None, **connection_args):
    '''
    
    '''
    __utils__['versions.warn_until'](
        'Neon',
        (
            'The keystone module has been deprecated and will be removed in {version}.  '
            'Please update to using the keystoneng module'
        ),
    )
    kwargs = _get_kwargs(profile=profile, **connection_args)

    disc = discover.Discover(auth_url=kwargs['auth_url'])
    v2_auth_url = disc.url_for('v2.0')
    v3_auth_url = disc.url_for('v3.0')
    if v3_auth_url:
        global _OS_IDENTITY_API_VERSION
        global _TENANTS
        _OS_IDENTITY_API_VERSION = 3
        _TENANTS = 'projects'
        kwargs['auth_url'] = v3_auth_url
    else:
        kwargs['auth_url'] = v2_auth_url
        kwargs.pop('user_domain_name')
        kwargs.pop('project_domain_name')
    auth = generic.Password(**kwargs)
    sess = session.Session(auth=auth)
    ks_cl = disc.create_client(session=sess)
    return ks_cl
176191
def do_version(self, args):
        
        Console.ok("cmd3: {:}".format(str(cmd3.__version__)))
        Console.ok("cloudmesh_base: {:}".format(str(cloudmesh_base.__version__)))

        python_version, pip_version = get_python()

        Console.ok("python: {:}".format(str(python_version)))
        Console.ok("pip: {:}".format(str(pip_version)))


        check_python()
462384
def is_anonymous(self):
        
        if self.kind == CursorKind.FIELD_DECL:
            return self.type.get_declaration().is_anonymous()
        return conf.lib.clang_Cursor_isAnonymous(self)
491366
def version_keyword(dist, attr, value):
    
    if value == "PBR":
        from pbr.util import setup_cfg_to_setup_kwargs

        path = "setup.cfg"
        parser = ConfigParser()
        if not os.path.exists(path):
            raise ValueError("file '%s' does not exist" % os.path.abspath(path))
        parser.read(path)
        config = {}
        for section in parser.sections():
            config[section] = dict(parser.items(section))
        attrs = setup_cfg_to_setup_kwargs(config)
        version = str(Version(attrs["name"]))
        os.environ["PBR_VERSION"] = version
    else:
        version = str(Version(dist.metadata.get_name()))
    dist.metadata.version = version