Unset environment variables for an app
428101
function unset(appName, variableNames, callback) {
    if (!util.isArray(variableNames)) {
      return callback(new Error('To unset a variable pass an array of names'));
    }

    var keyValues = {};
    variableNames.forEach(function onUnsetResponse(variableName) {
      keyValues[variableName] = null;
    });

    set(appName, keyValues, callback);
  }
735541
function cleanUpPreviousConfig(location, app, callback) {
  var confRegex = new RegExp(app + ".*\\.conf");
  var removeConfig = function(fileName, rmCallback) {
    if (confRegex.test(fileName)) {
      return fs.unlink(location + '/' + fileName, rmCallback);
    } else {
      return rmCallback(null);
    }
  };

  fs.readdir(location, function(err, files) {
    async.forEach(files, removeConfig, callback);
  });
}
383039
def remove_defaults(self, *args):
        '''
        
        '''
        for arg in args:
            if arg not in self.defaults:
                raise KeyError('{0}'.format(arg))
        return self.discard_defaults(*args)
1211374
function(app) {
  if (process.env.POMELO_LOGGER !== 'off') {
    var env = app.get(Constants.RESERVED.ENV);
    var originPath = path.join(app.getBase(), Constants.FILEPATH.LOG);
    var presentPath = path.join(app.getBase(), Constants.FILEPATH.CONFIG_DIR, env, path.basename(Constants.FILEPATH.LOG));
    if(fs.existsSync(originPath)) {
      log.configure(app, originPath);
    } else if(fs.existsSync(presentPath)) {
      log.configure(app, presentPath);
    } else {
      logger.error('logger file path configuration is error.');
    }
  }
}
1343625
def make_app(env, commandadapter=None):
    
    mconfig = import_module('app.config.%s' % env, pass_errors=True)
    if mconfig is None and paths.app_exists():
        print(colored('Configuration for "%s" environment is not found' % env, 'red'))
        return None
    mstart = import_module('app.start')
    mroutes = import_module('app.routes')
    mcontrollers = import_module('app.controllers')
    before = mstart.before

    return Glim(commandadapter, mconfig, mroutes, mcontrollers, env, before)
764083
def _remove_vars(self):
        
        for name in ("hosts", "group_vars", "host_vars"):
            d = os.path.join(self.inventory_directory, name)
            if os.path.islink(d) or os.path.isfile(d):
                os.unlink(d)
            elif os.path.isdir(d):
                shutil.rmtree(d)
1368962
def _set_environment_variables(self):
        """"""
        cmd = []

        # special case for driver JVM properties.
        self._set_launcher_property("driver-memory", "spark.driver.memory")
        self._set_launcher_property("driver-library-path", "spark.driver.extraLibraryPath")
        self._set_launcher_property("driver-class-path", "spark.driver.extraClassPath")
        self._set_launcher_property("driver-java-options", "spark.driver.extraJavaOptions")
        self._set_launcher_property("executor-memory", "spark.executor.memory")
        self._set_launcher_property("executor-cores", "spark.executor.cores")

        for key, val in self._spark_launcher_args.items():
            if val is None:
                continue
            val = list(as_iterable(val))
            if len(val):
                if key in self._boolean_args:
                    cmd.append("--{key}".format(key=key))
                else:
                    sep = self._spark_launcher_arg_sep.get(key, ',')
                    cmd.append('--{key} {val}'.format(key=key, val=sep.join(str(x) for x in val)))

        cmd += ['pyspark-shell']
        cmd_line = ' '.join(x for x in cmd if x)
        os.environ["PYSPARK_SUBMIT_ARGS"] = cmd_line
        log.info("spark-submit arguments: %s", cmd_line)
328622
public App withEnvironmentVariables(java.util.Map<String, String> environmentVariables) {
        setEnvironmentVariables(environmentVariables);
        return this;
    }
335597
def init_app(self, app):
        
        app.scoped_session = self

        @app.teardown_appcontext
        def remove_scoped_session(*args, **kwargs):
            # pylint: disable=missing-docstring,unused-argument,unused-variable
            app.scoped_session.remove()
299096
public function unset(string $var):DotEnv{
		$var = strtoupper($var);

		if($this->global === true){
			unset($_ENV[$var]);
			putenv($var);
		}

		unset($this->_ENV[$var]);

		return $this;
	}
350427
function Env(data, parent, path) {
	Context.call(this, data, parent, path);
	delete this.env;
}
833242
def remove_environment(project_root, environment_name)
      # Check if the environment exist
      return error(_('wizard.environment.name_not_exist')%{environment: environment_name}) unless Bebox::Environment.environment_exists?(project_root, environment_name)
      # Confirm deletion
      return warn(_('wizard.no_changes')) unless confirm_action?(_('wizard.environment.confirm_deletion'))
      # Environment deletion
      environment = Bebox::Environment.new(environment_name, project_root)
      output = environment.remove
      ok _('wizard.environment.deletion_success')
      return output
    end
878108
def environment_variable(key, value):
    

    if key not in os.environ:
        previous = None
    else:
        previous = os.environ[key]

    os.environ[key] = value

    yield

    if previous is None:
        del os.environ[key]
    else:
        os.environ[key] = previous
1147445
function unsetLocalVariables()
    {
        foreach ( $this->CurrentLocalVariablesNames as $ns => $vars )
        {
            foreach ( $vars as $var => $val )
                $this->unsetLocalVariable( $var, $ns );
        }
    }
1225593
def stop_app(self, package_name, clear=False):
        '''
        
        '''
        if clear:
            self.adb_shell(['pm', 'clear', package_name])
        else:
            self.adb_shell(['am', 'force-stop', package_name])
        return self
307584
def clean_conf_folder(self, locale):
        """"""
        dirname = self.configuration.get_messages_dir(locale)
        dirname.removedirs_p()
868553
function destroy(appName, callback) {
    commons.del(format('/%s/apps/%s/', deis.version, appName), callback);
  }