Configure is used to add various ES ports you are working on.
    The user can add as many es ports as the one wants,
    but one will remain active at one point.
325818
def configure(name, host, port, auth, current):
    '''
    
    '''
    Config = ConfigParser.ConfigParser()
    if not os.path.exists(os.path.dirname(filename)):
        try:
            os.makedirs(os.path.dirname(filename))
        except Exception as e:
            click.echo(e)
            return
    section_name = None
    if(current.lower() == 'y'):
        section_name = 'Current'
        change_current()
    else:
        section_name = name.capitalize()
    cfgfile = open(filename,'a')
    Config.add_section(section_name)
    Config.set(section_name,'host',host)
    Config.set(section_name,'port',port)
    Config.set(section_name,'auth',auth)
    Config.set(section_name,'name',name.capitalize())
    Config.write(cfgfile)
    cfgfile.close()
1243370
function configuration(self, name) {
  if (!self.__configurations__[name]) {
    throw new Error('Unknown configuration: ' + name);
  }

  return self.__configurations__[name];
}
429897
function configure(config) {
  Object.keys(config).forEach(function(key) {
    openpgp.config[key] = config[key];
  });
}
442117
def configure(self, config):
        
        self.config = config
        self.update_monitors()

        # initialize thread pools
        for profile in ('worker', 'result'):
            for _ in range(config['threads'][profile]['number']):
                worker = threading.Thread(target=config['threads'][profile]['function'])
                worker.daemon = True
                worker.start()

        # send a heartbeat right away
        self.heartbeat()

        # setup interval jobs
        self.refresh_stopper = set_interval(config['interval']['refresh']*1000,
                                            self.update_monitors)
        self.heartbeat_stopper = set_interval(config['interval']['heartbeat']*1000,
                                              self.heartbeat)
        self.reporting_stopper = set_interval(config['interval']['reporting']*1000,
                                              self.reporting)

        return self
316342
protected function configure()
    {
        $this
            ->setName('detect')
            ->setDefinition(
                [
                    new InputArgument('path', InputArgument::OPTIONAL, 'path of the project', null),
                    new InputOption(
                        'config-file',
                        'c',
                        InputOption::VALUE_REQUIRED,
                        'File path of the configuration file'
                    ),
                    new InputOption(
                        'format',
                        'f',
                        InputOption::VALUE_REQUIRED,
                        sprintf('Output format (%s)', implode(', ', $this->formats)),
                        $this->formats[0]
                    ),
                ]
            )
            ->setDescription('Detect coupling rules')
            ->setHelp($this->loadHelpContent());
    }
688203
protected void doConfigure() {
        if (config != null) {
            for (UserBean user : config.getUsersToCreate()) {
                setUser(user.getEmail(), user.getLogin(), user.getPassword());
            }
            getManagers().getUserManager().setAuthRequired(!config.isAuthenticationDisabled());
        }
    }
973010
def set_config(**config):
    
    config.setdefault("debug", bool(strtobool(os.getenv("IOPIPE_DEBUG", "false"))))
    config.setdefault("enabled", bool(strtobool(os.getenv("IOPIPE_ENABLED", "true"))))
    config.setdefault("host", get_hostname())
    config.setdefault("install_method", os.getenv("IOPIPE_INSTALL_METHOD", "manual"))
    config.setdefault("network_timeout", os.getenv("IOPIPE_NETWORK_TIMEOUT", 5000))
    config.setdefault("path", get_collector_path())
    config.setdefault("plugins", [])
    config.setdefault("sync_http", False)
    config.setdefault("timeout_window", os.getenv("IOPIPE_TIMEOUT_WINDOW", 500))
    config.setdefault(
        "token", os.getenv("IOPIPE_TOKEN") or os.getenv("IOPIPE_CLIENTID") or ""
    )

    if "client_id" in config:
        config["token"] = config.pop("client_id")

    if "url" in config:
        url = config.pop("url")

        config["host"] = get_hostname(url)
        config["path"] = get_collector_path(url)

    if "." in str(config["network_timeout"]):
        warnings.warn(
            "IOpipe's 'network_timeout' is now in milliseconds, expressed as an integer"
        )

    try:
        config["debug"] = bool(config["debug"])
    except ValueError:
        config["debug"] = False

    try:
        config["network_timeout"] = int(config["network_timeout"]) / 1000.0
    except ValueError:
        config["network_timeout"] = 5.0

    if "." in str(config["timeout_window"]):
        warnings.warn(
            "IOpipe's 'timeout_window' is now in milliseconds, expressed as an integer"
        )

    try:
        config["timeout_window"] = int(config["timeout_window"]) / 1000.0
    except ValueError:
        config["timeout_window"] = 0.5

    return config
993690
def configure(service, key, auth, use_syslog):
    """"""
    add_key(service, key)
    create_key_file(service, key)
    hosts = get_ceph_nodes()
    with open('/etc/ceph/ceph.conf', 'w') as ceph_conf:
        ceph_conf.write(CEPH_CONF.format(auth=auth,
                                         keyring=_keyring_path(service),
                                         mon_hosts=",".join(map(str, hosts)),
                                         use_syslog=use_syslog))
    modprobe('rbd')
1180941
function config(options) {
    var current = config.current
    Object.assign(current, options)
    api._init(current)
}
158126
protected function configure()
    {
        $this->basePath = getcwd();
        $this->projectName = basename($this->basePath);
        $this->defaultName = $this->slug($this->projectName);

        $this
            ->setName('make')
            ->setDescription('Install Artestead into the current project')
            ->addOption('type', null, InputOption::VALUE_REQUIRED, 'Type of hosting: drupal, laravel, symfony, wordpress') // New
            ->addOption('name', null, InputOption::VALUE_OPTIONAL, 'The name of the virtual machine.', $this->defaultName)
            ->addOption('hostname', null, InputOption::VALUE_OPTIONAL, 'The hostname of the virtual machine.', str_replace('.local.local', '.local', "www.{$this->projectName}.local"))
            ->addOption('ip', null, InputOption::VALUE_OPTIONAL, 'The IP address of the virtual machine.')
            ->addOption('after', null, InputOption::VALUE_NONE, 'Determines if the after.sh file is created.')
            ->addOption('aliases', null, InputOption::VALUE_NONE, 'Determines if the aliases.sh file is created.')
            ->addOption('example', null, InputOption::VALUE_NONE, 'Determines if a Artestead example file is created.')
            ->addOption('json', null, InputOption::VALUE_NONE, 'Determines if the Artestead settings file will be in json format.');
    }
38760
def configure():
    
    import os
    from uwsgiconf.presets.nice import PythonSection

    FILE = os.path.abspath(__file__)
    port = 8000

    configurations = []

    for idx in range(2):

        alias = 'app_%s' % (idx + 1)

        section = PythonSection(
            # Automatically reload uWSGI if this file is changed.
            touch_reload=FILE,

            # To differentiate easily.
            process_prefix=alias,

            # Serve WSGI application (see above) from this very file.
            wsgi_module=FILE,

            # Custom WSGI callable for second app.
            wsgi_callable=alias,

            # One is just enough, no use in worker on every core
            # for this demo.
            workers=1,

        ).networking.register_socket(
            PythonSection.networking.sockets.http('127.0.0.1:%s' % port)
        )

        port += 1

        configurations.append(
            # We give alias for configuration to prevent clashes.
            section.as_configuration(alias=alias))

    return configurations
227780
def setConfiguration(self, configuration):
        
        """
        if isinstance(configuration, Configuration):
           configuration = configuration.value

        self.dev.set_configuration(configuration)
674585
def set_config(self, config, and_restart=False):
        
        assert isinstance(config, dict)
        self.post('config', data=config)
        if and_restart:
            self.restart()
254501
function setCliConfiguration() {
  return yargs
    .usage('usage: $0 [options] <aws-elasticsearch-cluster-endpoint>')
    .option('h', {
      alias: 'host',
      default: HOST || '127.0.0.1',
      demand: false,
      describe: 'Host IP Address',
      type: 'string',
    })
    .option('p', {
      alias: 'port',
      default: PORT || 9200,
      demand: false,
      describe: 'Host Port',
      type: 'number',
    })
    .option('r', {
      alias: 'region',
      default: REGION || 'us-west-2',
      demand: false,
      describe: 'AWS region',
      type: 'string',
    })
    .option('e', {
      alias: 'endpoint',
      default: ENDPOINT,
      demand: true,
      describe: 'AWS Elasticsearch Endpoint',
      type: 'string',
    })
    .option('c', {
      alias: 'profile',
      default: AWS_PROFILE || 'default',
      demand: false,
      describe: 'AWS Credentials Profile',
      type: 'string',
    })
    .option('d', {
      alias: 'debug',
      default: DEBUG || false,
      demand: false,
      describe: 'Provides debug logging',
      type: 'boolean',
    })
    .help()
    .version()
    .strict()
}
884041
function config (args, cb) {
  var action = args.shift()
  switch (action) {
    case "set": return set(args[0], args[1], cb)
    case "get": return get(args[0], cb)
    case "delete": case "rm": case "del": return del(args[0], cb)
    case "list": case "ls": return list(cb)
    case "edit": return edit(cb)
    default: return unknown(action, cb)
  }
}
295019
def configure(self, options, conf):
        
        self.conf = conf
        self.when = options.browser_closer_when
1005773
protected function configure()
    {
        $configureSettingGroup = $this->cliHelper->confirmAction('Would you like to change the settings?');
        if (!$configureSettingGroup) {
            return;
        }
        
        $this->configureSettings($this->configurationManager->getSettings());
    }