Create a new local variable environment and initialize the env
by array of values. Set them to $1, $2, etc...
500921
function createLocalEnv(args) {
    var vars = localVars();

    (args || []).forEach(function(val, key) {
        if(val !== undefined) {
            vars.set(parseInt(key, 10) + 1, val);
        }
    });

    return vars;
}
1322641
function set (dictionary) {
  for (var key in dictionary) {
    if (missing(key)) process.env[key] = dictionary[key]
  }
}
342187
def update(self, value):
        
        key = self.name

        # if it's a variable name (otherwise a constant)
        if isinstance(key, str):
            self.env.swapkey(self.local_name, key, new_value=value)

        self.value = value
483027
def set_standard_vars(cls, executor, context, variant, build_type,
                          install, build_path, install_path=None):
        
        vars = cls.get_standard_vars(context=context,
                                     variant=variant,
                                     build_type=build_type,
                                     install=install,
                                     build_path=build_path,
                                     install_path=install_path)

        for var, value in vars.iteritems():
            executor.env[var] = value
1352088
def set_env(envName, envValue):
    
    os.environ[envName] = os.environ[envName] + ':' + envValue
885202
def env(*_vars, **kwargs):
    
    for v in _vars:
        value = os.environ.get(v, None)
        if value:
            return value
    return kwargs.get('default', '')
597737
def add(self, key, value):
        
        if isinstance(value, list):
            # TODO: support env vars in list w/masked values
            for val in value:
                self._add_arg_python(key, val)
        elif isinstance(value, dict):
            err = 'Dictionary types are not currently supported for field.'
            print('{}{}{}'.format(c.Style.BRIGHT, c.Fore.RED, err))
        else:
            mask = False
            env_var = re.compile(r'^\$env\.(.*)$')
            envs_var = re.compile(r'^\$envs\.(.*)$')

            if env_var.match(str(value)):
                # read value from environment variable
                env_key = env_var.match(str(value)).groups()[0]
                value = os.environ.get(env_key, value)
            elif envs_var.match(str(value)):
                # read secure value from environment variable
                env_key = envs_var.match(str(value)).groups()[0]
                value = os.environ.get(env_key, value)
                mask = True
            self._add_arg(key, value, mask)
199438
def set_env_var(key: str, value: str):
        
        elib_run.run(f'appveyor SetVariable -Name {key} -Value {value}')
        AV.info('Env', f'set "{key}" -> "{value}"')
1351553
static function setEnvironment($data = []){
	
		if($data && is_array($data)){
			self::$env = $data;
			return;
		}
		
		// Check environment is set?
		if(count(self::$env ) == 0){
			self::$env = (require APP_PATH.'config' . DS . 'Environment.php');
		}
	}
55799
def init_app(self, app, env_file=None, verbose_mode=False):
        """"""
        if self.app is None:
            self.app = app
        self.verbose_mode = verbose_mode

        if env_file is None:
            env_file = os.path.join(os.getcwd(), ".env")
        if not os.path.exists(env_file):
            warnings.warn("can't read {0} - it doesn't exist".format(env_file))
        else:
            self.__import_vars(env_file)
783377
def add_env_var(self, key, value):
        
        self.manifest['env'][key] = value
        os.environ[key] = str(value)
557197
def set_env(self, key, value):
        
        os.environ[make_env_key(self.appname, key)] = str(value)  # must coerce to string
        self._registered_env_keys.add(key)
        self._clear_memoization()
934428
def SetEnvironmentVariable(self, environment_variable):
    
    name = environment_variable.name.upper()
    self._environment_variables[name] = environment_variable
360066
def initialize_values( initial_values, results_hash )
      h = {}
      if initial_values && !initial_values.empty?
        initial_values.each do |k,v|
          h[k.to_s] = v
        end
      end
      
      IR.find_values( results_hash ).each do |i|
        if !i.empty?
          i.each do |k,v|
            h[k.to_s] = v
          end           
        end
      end
      
      h
    end
620696
def set_setting(key, val, env=None):
    
    return settings.set(key, val, env=env)
949258
private static EnvVars inherit(@CheckForNull String[] env) {
        // convert String[] to Map first
        EnvVars m = new EnvVars();
        if(env!=null) {
            for (String e : env) {
                int index = e.indexOf('=');
                m.put(e.substring(0,index), e.substring(index+1));
            }
        }
        // then do the inheritance
        return inherit(m);
    }
737573
function setVars(origEnv, setVars) {
  var key;
  if (typeof setVars !== 'object')
    return;
  if (Array.isArray(setVars))
    return;
  for (key in setVars) {
    if (has(setVars, key)) {
      if (!has(origEnv, key)) {
        origEnv[key] = [
          !!has(process.env, key),
          process.env[key]
        ];
      }
      process.env[key] = setVars[key];
    }
  }
  return;
}