Set IRAF environment variables.
338929
def set(*args, **kw):
    """"""

    if len(args) == 0:
        if len(kw) != 0:
            # normal case is only keyword,value pairs
            for keyword, value in kw.items():
                keyword = untranslateName(keyword)
                svalue = str(value)
                _varDict[keyword] = svalue
        else:
            # set with no arguments lists all variables (using same format
            # as IRAF)
            listVars(prefix="    ", equals="=")
    else:
        # The only other case allowed is the peculiar syntax
        # 'set @filename', which only gets used in the zzsetenv.def file,
        # where it reads extern.pkg.  That file also gets read (in full cl
        # mode) by clpackage.cl.  I get errors if I read this during
        # zzsetenv.def, so just ignore it here...
        #
        # Flag any other syntax as an error.
        if (len(args) != 1 or len(kw) != 0 or
                not isinstance(args[0], string_types) or args[0][:1] != '@'):
            raise SyntaxError("set requires name=value pairs")
257430
private void overrideFromEnvironmentVariables() {
        String  url = System.getenv("ACTIVEJDBC.URL");
        String  user = System.getenv("ACTIVEJDBC.USER");
        String  password = System.getenv("ACTIVEJDBC.PASSWORD");
        String  driver = System.getenv("ACTIVEJDBC.DRIVER");
        if(!blank(url) && !blank(user) && !blank(password) && !blank(driver)){
            connectionSpecMap.put(getEnvironment(), new ConnectionJdbcSpec(driver, url, user, password));
        }

        String  jndi = System.getenv("ACTIVEJDBC.JNDI");
        if(!blank(jndi)){
            connectionSpecMap.put(getEnvironment(), new ConnectionJndiSpec(jndi));
        }
    }
1161249
def set_env_or_defaults(self):
        
        option = namedtuple('Option', ['section', 'name', 'env_var',
                                       'default_value'])

        options = [option('auth', 'user', 'NAPPS_USER', None),
                   option('auth', 'token', 'NAPPS_TOKEN', None),
                   option('napps', 'api', 'NAPPS_API_URI',
                          'https://napps.kytos.io/api/'),
                   option('napps', 'repo', 'NAPPS_REPO_URI',
                          'https://napps.kytos.io/repo'),
                   option('kytos', 'api', 'KYTOS_API',
                          'http://localhost:8181/')]

        for option in options:
            if not self.config.has_option(option.section, option.name):
                env_value = os.environ.get(option.env_var,
                                           option.default_value)
                if env_value:
                    self.config.set(option.section, option.name, env_value)

        self.config.set('global', 'debug', str(self.debug))
319920
def setup_app(command, conf, vars):
    """"""
    load_environment(conf.global_conf, conf.local_conf)
    setup_schema(command, conf, vars)
    bootstrap.bootstrap(command, conf, vars)
1346481
public FunctionConfigurationEnvironment withVariables(java.util.Map<String, String> variables) {
        setVariables(variables);
        return this;
    }
560448
def update_environment_variables(self, filename):
        """"""
        self.env.update({'PIPELINE_BASH_FILE_ORIGINAL': filename})
        filename = os.path.join('/root/scripts', os.path.basename(filename))
        self.env.update({'PIPELINE_BASH_FILE': filename})

        # remove those keys for Docker since the paths inside Docker are different
        os_environ = os.environ.copy()
        for remove_variable in ['PATH', 'PYTHONPATH', 'JAVA_HOME', 'HOME']:
            os_environ.pop(remove_variable, None)

        self.env.update(os_environ)
1010115
private function setEnvironmentOption()
    {
        if (!array_key_exists('env', $this->options)) {
            $this->options = array_merge(
                $this->options,
                ['env' => App::environment()]
            );
        }
    }
74449
def setup_config(command, filename, section, vars):
    """"""
    conf = appconfig('config:' + filename)
    load_environment(conf.global_conf, conf.local_conf)
423771
def set_env_variables(stack, grid, platform = grid)
      ENV['STACK'] = stack
      ENV['GRID'] = grid
      ENV['PLATFORM'] = platform
    end
693171
def set_nvidia_environment_variables(environment, gpu_ids):
    

    if gpu_ids:
        nvidia_visible_devices = ""
        for gpu_id in gpu_ids:
            nvidia_visible_devices += "{},".format(gpu_id)
        environment["NVIDIA_VISIBLE_DEVICES"] = nvidia_visible_devices
1296832
def set_windows_env_var(key, value):
    

    if not isinstance(key, text_type):
        raise TypeError("%r not of type %r" % (key, text_type))

    if not isinstance(value, text_type):
        raise TypeError("%r not of type %r" % (value, text_type))

    status = winapi.SetEnvironmentVariableW(key, value)
    if status == 0:
        raise ctypes.WinError()
74604
def set_environment_variable(self, key, val):
        
        if self.get_environment_variable(key) in [None, val]:
            self.__dict__['environment_variables'][key] = val
        else:
            raise Contradiction("Could not set environment variable %s" % (key))
85332
public void setDomainEnvironment() {
        systemProperties = System.getProperties();
        if (System.getProperty(SET_DOMAIN_ENVIRONMENT) != null) {
            logger.debug("Setting System environment properties to Security Domain values");
            for (int i = 0; i < ENVNAMES.length; i++) {
                setOrClearSystemProperties(ENVNAMES[i], domainProperties);
            }
        }
    }
461984
private function setEnvironmentVariables(array $env)
    {
        foreach ($env as $name => $value) {
            putenv("$name=$value");

            $_ENV[$name] = $value;
            $_SERVER[$name] = $value;
        }
    }
513974
private function setEnvironmentOptions()
    {
        if (empty($this->environment)) {
            return;
        }

        if (is_object($this->client) && property_exists($this->client, 'environment')) {
            $this->client->environment = $this->environment;
        }
        $this->jsOptions['environment'] = $this->environment;
    }
1192542
private void setEnvironmentVariable(String line) {
        Matcher matcher = ENV_VAR_PATTERN.matcher(line);
        if (matcher.matches()) {
            String key = matcher.group("key");
            String value = matcher.group("value");
            log.debug("Env: %s=%s",key,value);
            env.put(key, value);
        }
    }
900748
public void setEnvironmentVariables(java.util.Collection<EnvironmentVariable> environmentVariables) {
        if (environmentVariables == null) {
            this.environmentVariables = null;
            return;
        }

        this.environmentVariables = new java.util.ArrayList<EnvironmentVariable>(environmentVariables);
    }