set store configuration settings
439606
public void setStoreLocation(String location, Job job) throws IOException
    {
        conf = HadoopCompat.getConfiguration(job);
        
        // don't combine mappers to a single mapper per node
        conf.setBoolean("pig.noSplitCombination", true);
        setLocationFromUri(location);

        if (username != null && password != null)
            ConfigHelper.setOutputKeyspaceUserNameAndPassword(conf, username, password);
        if (splitSize > 0)
            ConfigHelper.setInputSplitSize(conf, splitSize);
        if (partitionerClass!= null)
            ConfigHelper.setOutputPartitioner(conf, partitionerClass);
        if (rpcPort != null)
        {
            ConfigHelper.setOutputRpcPort(conf, rpcPort);
            ConfigHelper.setInputRpcPort(conf, rpcPort);
        }
        if (initHostAddress != null)
        {
            ConfigHelper.setOutputInitialAddress(conf, initHostAddress);
            ConfigHelper.setInputInitialAddress(conf, initHostAddress);
        }

        ConfigHelper.setOutputColumnFamily(conf, keyspace, column_family);
        setConnectionInformation();

        if (ConfigHelper.getOutputRpcPort(conf) == 0)
            throw new IOException("PIG_OUTPUT_RPC_PORT or PIG_RPC_PORT environment variable not set");
        if (ConfigHelper.getOutputInitialAddress(conf) == null)
            throw new IOException("PIG_OUTPUT_INITIAL_ADDRESS or PIG_INITIAL_ADDRESS environment variable not set");
        if (ConfigHelper.getOutputPartitioner(conf) == null)
            throw new IOException("PIG_OUTPUT_PARTITIONER or PIG_PARTITIONER environment variable not set");

        // we have to do this again here for the check in writeColumnsFromTuple
        if (System.getenv(PIG_USE_SECONDARY) != null)
            usePartitionFilter = Boolean.parseBoolean(System.getenv(PIG_USE_SECONDARY));

        initSchema(storeSignature);
    }
532651
protected function configure()
    {
        parent::configure();
        $this
            ->addOption(
                'oldstore',
                null,
                InputOption::VALUE_OPTIONAL,
                'Environment Location Storage to Migrate',
                self::BASH_VAGRANT_TRANSIENT_STORE
            );
    }
722457
def set_config(self, data=None, **kwargs):
        """"""
        config = self.bot.config['server_config']
        for opt in data.split(' '):
            if '=' in opt:
                opt, value = opt.split('=', 1)
            else:
                value = True
            if opt.isupper():
                config[opt] = value
686862
protected function configure()
    {
        $this->setName(self::COMMAND_NAME);
        $this->setDescription('Import "core_config_data" settings for an environment');
        $this->addArgument('folder', InputArgument::REQUIRED, 'Import folder name');
        $this->addArgument('environment', InputArgument::REQUIRED, 'Environment name. SubEnvs separated by slash e.g.: development/osx/developer01');
        $this->addOption('base', null, InputOption::VALUE_OPTIONAL, 'Base folder name', 'base');
        $this->addOption('format', 'm', InputOption::VALUE_OPTIONAL, 'Format: yaml, json (Default: yaml)', 'yaml');

        parent::configure();
    }
673698
protected function configureApp ()
    {
        $this->envData['APP_ENV']   = $this->choice ("Choose environment. [local|production]", ['local', 'production'], 0);
        $this->envData['APP_KEY']   = "";
        $this->envData['APP_DEBUG'] = $this->confirm ("Enable debugging?", 'yes') ? "true" : "false";
        $this->envData['APP_URL']   = http_validate($this->ask ("Your application url", "http://localhost") . "\n");
        $this->info('By default application presumes the page is http://');
        //TODO implement the letsEncrypt
    }
677355
private function setConfigValues()
    {
        if (isset($this->config['min_cache_file_size']) && is_numeric($this->config['min_cache_file_size'])) {
            $this->setMinCacheFileSize($this->config['min_cache_file_size']);
        }

        //Enable Log
        if (isset($this->config['enable_log']) && $this->isBool($this->config['enable_log'])) {
            $this->setEnableLog($this->config['enable_log']);
        }

        //Cache Expiration Time
        if (isset($this->config['cache_expiration_in_seconds'])) {
            $this->setCacheExpirationInSeconds($this->config['cache_expiration_in_seconds']);
        }

        // Path to store cache files
        if (isset($this->config['cache_path'])) {
            $this->setCachePath($this->config['cache_path']);
        }

        // Log file path
        if (isset($this->config['log_file_path']) && !empty($this->config['log_file_path'])) {
            $this->setLogFilePath($this->config['log_file_path']);
        }

        // Use $_SESSION while caching or not
        if (isset($this->config['use_session']) && $this->isBool($this->config['use_session'])) {
            $this->setUseSession($this->config['use_session']);
        }

        // Session exclude key
        if (isset($this->config['session_exclude_keys']) && is_array($this->config['session_exclude_keys'])) {
            $this->setSessionExcludeKeys($this->config['session_exclude_keys']);
        }

        // File Locking
        if (isset($this->config['file_lock']) && !empty($this->config['file_lock'])) {
            $this->setFileLock($this->config['file_lock']);
        }

        // Send HTTP headers
        if (isset($this->config['send_headers']) && $this->isBool($this->config['send_headers'])) {
            $this->setSendHeaders($this->config['send_headers']);
        }

        // Forward Last-Modified and ETag headers to cache item
        if (isset($this->config['forward_headers']) && $this->isBool($this->config['forward_headers'])) {
            $this->setForwardHeaders($this->config['forward_headers']);
        }

        // Enable Dry run mode
        if (isset($this->config['dry_run_mode']) && $this->isBool($this->config['dry_run_mode'])) {
            $this->setDryRunMode($this->config['dry_run_mode']);
        }
    }
227780
def setConfiguration(self, configuration):
        
        """
        if isinstance(configuration, Configuration):
           configuration = configuration.value

        self.dev.set_configuration(configuration)
616492
function setupConfig(options) {
    if (options.resetConfig) {
        // Reset your environment variables for resetting node-config module. node-config is a singleton.
        // For testing it's necessary to reset and this is a workaround from node-config support.
        global.NODE_CONFIG = null;
        delete require.cache[require.resolve('config')];
        config = require('config');
        delete options.resetConfig;
    }

    var customConfigFile, customConfig,
        defaultConfig       = require('../config/default.js');

    options = options || {};

    if (options.config) {
        customConfigFile    = options.config.charAt(0) === '/' || options.config.charAt(0) === '\\' ? options.config : path.join(process.cwd(), options.config); // Absolute or relative
        customConfig        = require(customConfigFile);
    }

    delete options.config;

    // Combine configs and override lower priority configs.
    config.util.extendDeep(config, defaultConfig, customConfig || {}, { "sequelize-pg-generator": options });
}
113700
protected function setSettings()
    {
        if (empty($this->params['shopgate_settings']) || !is_array($this->params['shopgate_settings'])) {
            throw new ShopgateLibraryException(
                ShopgateLibraryException::PLUGIN_API_NO_SHOPGATE_SETTINGS,
                'Request: ' . var_export($this->params, true)
            );
        }
        // settings that may never be changed:
        $shopgateSettingsBlacklist = array(
            'shop_number',
            'customer_number',
            'apikey',
            'plugin_name',
            'export_folder_path',
            'log_folder_path',
            'cache_folder_path',
            'items_csv_filename',
            'categories_csv_filename',
            'reviews_csv_filename',
            'access_log_filename',
            'error_log_filename',
            'request_log_filename',
            'debug_log_filename',
            'redirect_keyword_cache_filename',
            'redirect_skip_keyword_cache_filename',
        );

        // filter the new settings
        $shopgateSettingsNew = array();
        $shopgateSettingsOld = $this->config->toArray();
        foreach ($this->params['shopgate_settings'] as $setting) {
            if (!isset($setting['name'])) {
                throw new ShopgateLibraryException(
                    ShopgateLibraryException::PLUGIN_API_NO_SHOPGATE_SETTINGS,
                    'Wrong format: ' . var_export($setting, true)
                );
            }

            if (in_array($setting['name'], $shopgateSettingsBlacklist)) {
                continue;
            }

            if (!in_array($setting['name'], array_keys($shopgateSettingsOld))) {
                continue;
            }

            $shopgateSettingsNew[$setting['name']] = isset($setting['value'])
                ? $setting['value']
                : null;
        }

        $this->config->load($shopgateSettingsNew);
        $this->config->save(array_keys($shopgateSettingsNew), true);

        $diff = array();
        foreach ($shopgateSettingsNew as $setting => $value) {
            $diff[] = array('name' => $setting, 'old' => $shopgateSettingsOld[$setting], 'new' => $value);
        }

        // set data and return response
        if (empty($this->response)) {
            $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id);
        }
        $this->responseData['shopgate_settings'] = $diff;
    }
692636
protected function seTitleEditStore()
    {
        if (isset($this->data_store['store_id'])) {
            $title = $this->text('Edit %name', array('%name' => $this->data_store['name']));
        } else {
            $title = $this->text('Add store');
        }

        $this->setTitle($title);
    }
154234
def configure(self, settings_module=None, **kwargs):
        
        default_settings.reload()
        environment_var = self._kwargs.get(
            "ENVVAR_FOR_DYNACONF", default_settings.ENVVAR_FOR_DYNACONF
        )
        settings_module = settings_module or os.environ.get(environment_var)
        compat_kwargs(kwargs)
        kwargs.update(self._kwargs)
        self._wrapped = Settings(settings_module=settings_module, **kwargs)
        self.logger.debug("Lazy Settings configured ...")
186674
def configure_settings():
    
    if not settings.configured:
        # Determine the database settings depending on if a test_db var is set in CI mode or not
        test_db = os.environ.get('DB', None)
        if test_db is None:
            db_config = {
                'ENGINE': 'django.db.backends.postgresql_psycopg2',
                'NAME': 'ambition',
                'USER': 'ambition',
                'PASSWORD': 'ambition',
                'HOST': 'db'
            }
        elif test_db == 'postgres':
            db_config = {
                'ENGINE': 'django.db.backends.postgresql_psycopg2',
                'USER': 'postgres',
                'NAME': 'manager_utils',
                }
        elif test_db == 'sqlite':
            db_config = {
                'ENGINE': 'django.db.backends.sqlite3',
                'NAME': 'manager_utils',
                }
        else:
            raise RuntimeError('Unsupported test DB {0}'.format(test_db))

        settings.configure(
            TEST_RUNNER='django_nose.NoseTestSuiteRunner',
            NOSE_ARGS=['--nocapture', '--nologcapture', '--verbosity=1'],
            MIDDLEWARE_CLASSES={},
            DATABASES={
                'default': db_config,
            },
            INSTALLED_APPS=(
                'django.contrib.auth',
                'django.contrib.contenttypes',
                'django.contrib.sessions',
                'django.contrib.admin',
                'manager_utils',
                'manager_utils.tests',
            ),
            ROOT_URLCONF='manager_utils.urls',
            DEBUG=False,
        )
936808
def configurationStore(self):
        """"""
        url = self._url + "/configstore"

        return ConfigurationStore(url=url,
                                  securityHandler=self._securityHandler,
                                  proxy_url=self._proxy_url,
                                  proxy_port=self._proxy_port)
37611
def apply_settings(settings):
    
    for key, value in settings.items():
        ConfigManager.SETTINGS[key] = value
28639
def resource_configuration
      {
        "persistent_disk"=>settings.provider.resources.persistent_disk,
        "cloud_properties"=>{
          "ram"=>settings.provider.resources.ram,
          "disk"=>settings.provider.resources.disk,
          "cpu"=>settings.provider.resources.cpu
        }
      }
    end
656748
def configure(self, conf={}):
        
        if not conf: return
        if isinstance(conf, Configuration):
            conf = dict(conf.options())
        for key, value in conf.items():
            opt = self.get(key, None)
            if isinstance(opt, Configuration):
                opt.configure(value)
            else:
                setattr(self, key, value)
1104486
public function configure()
    {
        // environment
        $this->setEnv($this->getEnvFromEnvironmentVariables());

        // application root dir.
        $this->config('directory.root', dirname(dirname(__DIR__)));
        
        // application dir.
        $this->addAppPathUsePsr4(__DIR__, __NAMESPACE__, 'Samurai\\', self::PRIORITY_LOW);

        // set directory names.
        $this->config('directory.config.samurai', 'Config/Samurai');
        $this->config('directory.config.routing', 'Config/App');
        $this->config('directory.config.database', 'Config/Database');
        $this->config('directory.config.renderer', 'Config/Renderer');
        $this->config('directory.controller', 'Controller');
        $this->config('directory.model', 'Model');
        $this->config('directory.filter', 'Filter');
        $this->config('directory.layout', 'View/Layout');
        $this->config('directory.template', 'View');
        $this->config('directory.database.data', 'Database');
        $this->config('directory.database.migration', 'Database/Migration');
        $this->config('directory.database.seed', 'Database/Seed');
        $this->config('directory.database.schema', 'Database/Schema');
        $this->config('directory.locale', 'Locale');
        $this->config('directory.task', 'Task');
        $this->config('directory.spec', 'Spec');
        $this->config('directory.skeleton', 'Skeleton');
        $this->config('directory.log', 'Log');
        $this->config('directory.temp', 'Temp');

        // controllers
        $this->config('controller.namespaces', ['Samurai\Samurai']);
        
        // main dicon
        $this->config('container.dicon.', 'Config/Samurai/samurai.dicon');

        // set encodings.
        $this->config('encoding.input', 'UTF-8');
        $this->config('encoding.output', 'UTF-8');
        $this->config('encoding.internal', 'UTF-8');
        $this->config('encoding.text.html', 'UTF-8');

        // set caches.
        $this->config('cache.yaml.enable', true);
        $this->config('cache.yaml.expire', 60 * 60 * 24);    // 1 day
        
        // timezone.
        $this->config('locale', 'ja');
        $this->setTimezone('Asia/Tokyo');
        
        // autoload by samurai
        $loader = new Loader($this);
        $loader->register();
        $this->loader = $loader;
    }