Define all the possible config params
184303
def general_params(cls):
        

        optional_bool_none = {
            "optional": True,
            "default": None,
            "type": bool
        }
        optional_string_none = {
            "optional": True,
            "default": None,
            "type": str
        }
        optional_int_none = {
            "optional": True,
            "default": None,
            "type": int
        }
        optional_empty_list = {
            "optional": True,
            "default": [],
            "type": list
        }
        no_optional_empty_string = {
            "optional": False,
            "default": "",
            "type": str
        }
        no_optional_true = {
            "optional": False,
            "default": True,
            "type": bool
        }
        optional_false = {
            "optional": True,
            "default": False,
            "type": bool
        }

        params = {}

        # GENERAL CONFIG
        params_general = {
            "general": {
                "sleep": optional_int_none,  # we are not using it
                "min_update_delay": {
                    "optional": True,
                    "default": 60,
                    "type": int
                },
                "kibana": {
                    "optional": True,
                    "default": "5",
                    "type": str
                },
                "update": {
                    "optional": False,
                    "default": False,
                    "type": bool
                },
                "short_name": {
                    "optional": False,
                    "default": "Short name",
                    "type": str
                },
                "debug": {
                    "optional": False,
                    "default": True,
                    "type": bool
                },
                "from_date": optional_string_none,  # per data source param now
                "logs_dir": {
                    "optional": False,
                    "default": "logs",
                    "type": str
                },
                "bulk_size": {
                    "optional": True,
                    "default": 1000,
                    "type": int
                },
                "scroll_size": {
                    "optional": True,
                    "default": 100,
                    "type": int
                }

            }
        }
        params_projects = {
            "projects": {
                "projects_file": {
                    "optional": True,
                    "default": "projects.json",
                    "type": str
                },
                "projects_url": {
                    "optional": True,
                    "default": None,
                    "type": str
                },
                "load_eclipse": {
                    "optional": True,
                    "default": False,
                    "type": bool
                }
            }
        }

        params_phases = {
            "phases": {
                "collection": no_optional_true,
                "enrichment": no_optional_true,
                "identities": no_optional_true,
                "panels": no_optional_true,
                "track_items": optional_false,
                "report": optional_false
            }
        }

        general_config_params = [params_general, params_projects, params_phases]

        for section_params in general_config_params:
            params.update(section_params)

        # Config provided by tasks
        params_collection = {
            "es_collection": {
                "password": optional_string_none,
                "user": optional_string_none,
                "url": {
                    "optional": False,
                    "default": "http://172.17.0.1:9200",
                    "type": str
                },
                "arthur": optional_false,
                "arthur_url": optional_string_none,
                "redis_url": optional_string_none
            }
        }

        params_enrichment = {
            "es_enrichment": {
                "url": {
                    "optional": False,
                    "default": "http://172.17.0.1:9200",
                    "type": str
                },
                "studies": optional_bool_none,
                "autorefresh": {
                    "optional": True,
                    "default": True,
                    "type": bool
                },
                "user": optional_string_none,
                "password": optional_string_none
            }
        }

        params_panels = {
            "panels": {
                "kibiter_time_from": {
                    "optional": True,
                    "default": "now-90d",
                    "type": str
                },
                "kibiter_default_index": {
                    "optional": True,
                    "default": "git",
                    "type": str
                }
            }
        }

        params_report = {
            "report": {
                "start_date": {
                    "optional": False,
                    "default": "1970-01-01",
                    "type": str
                },
                "end_date": {
                    "optional": False,
                    "default": "2100-01-01",
                    "type": str
                },
                "interval": {
                    "optional": False,
                    "default": "quarter",
                    "type": str
                },
                "config_file": {
                    "optional": False,
                    "default": "report.cfg",
                    "type": str
                },
                "data_dir": {
                    "optional": False,
                    "default": "report_data",
                    "type": str
                },
                "filters": optional_empty_list,
                "offset": optional_string_none
            }
        }

        params_sortinghat = {
            "sortinghat": {
                "affiliate": {
                    "optional": False,
                    "default": "True",
                    "type": bool
                },
                "unaffiliated_group": {
                    "optional": False,
                    "default": "Unknown",
                    "type": str
                },
                "unify_method": {  # not used
                    "optional": True,
                    "default": "fast-matching",
                    "type": str
                },
                "matching": {
                    "optional": False,
                    "default": ["email"],
                    "type": list
                },
                "sleep_for": {
                    "optional": False,
                    "default": 3600,
                    "type": int
                },
                "database": {
                    "optional": False,
                    "default": "sortinghat_db",
                    "type": str
                },
                "host": {
                    "optional": False,
                    "default": "mariadb",
                    "type": str
                },
                "user": {
                    "optional": False,
                    "default": "root",
                    "type": str
                },
                "password": no_optional_empty_string,
                "autoprofile": {
                    "optional": False,
                    "default": ["customer", "git", "github"],
                    "type": list
                },
                "load_orgs": {
                    "optional": True,
                    "default": False,
                    "type": bool,
                    "deprecated": "Orgs are loaded if defined always"
                },
                "identities_format": {
                    "optional": True,
                    "default": "sortinghat",
                    "type": str,
                    "doc": "Format of the identities data to be loaded"
                },
                "github_api_token": {
                    "optional": True,
                    "default": None,
                    "type": str,
                    "deprecated": "Use identities_api_token"
                },
                "strict_mapping": {
                    "optional": True,
                    "default": True,
                    "type": bool,
                    "doc": "rigorous check of values in identities matching " + \
                           "(i.e, well formed email addresses)"
                },
                "reset_on_load": {
                    "optional": True,
                    "default": False,
                    "type": bool,
                    "doc": "Unmerge and remove affiliations for all identities on load"
                },
                "orgs_file": optional_string_none,
                "identities_file": optional_empty_list,
                "identities_export_url": optional_string_none,
                "identities_api_token": optional_string_none,
                "bots_names": optional_empty_list,
                "no_bots_names": optional_empty_list  # to clean bots in SH
            }
        }

        params_track_items = {
            "track_items": {
                "project": {
                    "optional": False,
                    "default": "TrackProject",
                    "type": str
                },
                "upstream_raw_es_url": no_optional_empty_string,
                "raw_index_gerrit": no_optional_empty_string,
                "raw_index_git": no_optional_empty_string
            }
        }

        params_enrich_onion = {
            "enrich_onion": {
                "in_index": {
                    "optional": False,
                    "default": None,
                    "type": str
                },
                "out_index": {
                    "optional": False,
                    "default": None,
                    "type": str
                },
                "contribs_field": {
                    "optional": True,
                    "default": "hash",
                    "type": str
                },
                "no_incremental": {
                    "optional": True,
                    "default": True,
                    "type": bool
                }
            }
        }

        params_enrich_areas_of_code = {
            "enrich_areas_of_code": {
                "in_index": {
                    "optional": False,
                    "default": None,
                    "type": str
                },
                "out_index": {
                    "optional": False,
                    "default": None,
                    "type": str
                },
                "no_incremental": {
                    "optional": True,
                    "default": True,
                    "type": bool
                }
            }
        }

        params_enrich_demography = {
            "enrich_demography": {
                "no_incremental": {
                    "optional": True,
                    "default": True,
                    "type": bool
                }
            }
        }

        tasks_config_params = [params_collection, params_enrichment, params_panels,
                               params_report, params_sortinghat, params_track_items,
                               params_enrich_areas_of_code, params_enrich_demography,
                               params_enrich_onion]

        for section_params in tasks_config_params:
            params.update(section_params)

        return params
593382
protected void buildConfigParams(final Map<String, String> params){
        params.put(WepayField.APP_ID, wepay.getAppId());
        params.put(WepayField.MCH_ID, wepay.getMchId());
    }
844464
def map_parameters(cls, params):
        """"""

        d = {}
        for k, v in six.iteritems(params):
            d[cls.FIELD_MAP.get(k.lower(), k)] = v
        return d
354323
async function fetchParams(conf) {
  await util.wait(100)  
  return { 
    Parameters: [ 
      {
        Name: "VARIABLE_A",
        Type: "String",
        Value: "value-a"
      },
      {
        Name: "VARIABLE_B",
        Type: "String",
        Value: "value-b"
      }
    ]
  }
}
157287
def get_connection_params(self):
        """"""
        from django.conf import settings
        settings_dict = self.settings_dict
        options = settings_dict.get('OPTIONS', {})
        autocommit = options.get('autocommit', False)
        conn_params = {
            'server': settings_dict['HOST'],
            'database': settings_dict['NAME'],
            'user': settings_dict['USER'],
            'port': settings_dict.get('PORT', '1433'),
            'password': settings_dict['PASSWORD'],
            'timeout': self.command_timeout,
            'autocommit': autocommit,
            'use_mars': options.get('use_mars', False),
            'load_balancer': options.get('load_balancer', None),
            'failover_partner': options.get('failover_partner', None),
            'use_tz': utc if getattr(settings, 'USE_TZ', False) else None,
         }

        for opt in _SUPPORTED_OPTIONS:
            if opt in options:
                conn_params[opt] = options[opt]

        self.tzinfo_factory = utc_tzinfo_factory if settings.USE_TZ else None

        return conn_params
88221
def __init_config_params(self, config):
        """"""
        if self.version >= (2, 4):
            params = config.get('setParameter', {})
            # Set enableTestCommands by default but allow enableTestCommands:0.
            params.setdefault('enableTestCommands', 1)
            # Reduce transactionLifetimeLimitSeconds for faster driver testing.
            if self.version >= (4, 1) and not self.is_mongos:
                params.setdefault('transactionLifetimeLimitSeconds', 3)
            # Increase transaction lock timeout to reduce the chance that tests
            # fail with LockTimeout: "Unable to acquire lock {...} within 5ms".
            if self.version >= (4, 0) and not self.is_mongos:
                params.setdefault('maxTransactionLockRequestTimeoutMillis', 25)
            config['setParameter'] = params

        compressors = config.get('networkMessageCompressors')
        if compressors is None:
            if self.version >= (4, 1, 7):
                # SERVER-38168 added zstd support in 4.1.7.
                config['networkMessageCompressors'] = 'zstd,zlib,snappy,noop'
            elif self.version >= (3, 5, 9):
                # SERVER-27310 added zlib support in 3.5.9.
                config['networkMessageCompressors'] = 'zlib,snappy,noop'
            elif self.version >= (3, 4):
                config['networkMessageCompressors'] = 'snappy,noop'
934882
def parametrize(params):
    
    returned = str(params[0])
    returned += "".join("[" + str(p) + "]" for p in params[1:])
    return returned
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)
1357427
def expand_parameters(self, para):
        '''
        
        '''
        if len(para) == 1:
            for key, values in para.items():
                return list(map(lambda v: {key: v}, values))

        key = list(para)[0]
        values = para.pop(key)
        rest_para = self.expand_parameters(para)
        ret_para = list()
        for val in values:
            for config in rest_para:
                config[key] = val
                ret_para.append(copy.deepcopy(config))
        return ret_para
691176
def set_config_parameter(self, param, value):
        '''

        '''
        with self._mutex:
            if self._obj.set_configuration(param, value) != RTC.RTC_OK:
                raise exceptions.FailedToSetConfigurationError(param, value)
            # Force a reparse of the configuration
            self._configuration = None
315249
def __load_configuration(self):
        
        handler_to_enable = filter(lambda h: h.keys is not None, handlers)
        for handler in handler_to_enable:
            if handler.name in self.kwargs:
                for k in handler.keys:
                    self.kwargs.update({k: True})

        self.config = self.configuration_class(self.app.config, **self.kwargs)
389700
def params(self, dict):
        """"""
        self._configuration.update(dict)
        self._measurements.update()
39718
def setup_config(command, filename, section, vars):
    """"""
    confuri = "config:" + filename
    if ":" in section:
        confuri += "#" + section.rsplit(":", 1)[-1]
    conf = appconfig(confuri)

    load_environment(conf.global_conf, conf.local_conf)
328486
def global_config(cls, key, *args):
        '''  '''
        if args:
            cls.settings[key] = args[0]
        else:
            return cls.settings[key]
1078688
def build_params(options)
        params = {}
        params[:t] = options[:title] if options[:title]
        params[:i] = options[:id] if options[:id]
        params[:y] = options[:year] if options[:year]
        params[:plot] = options[:plot] if options[:plot]
        params[:season] = options[:season] if options[:season]
        params[:episode] = options[:episode] if options[:episode]
        params[:type] = options[:type] if options[:type]
        params[:tomatoes] = options[:tomatoes] if options[:tomatoes]
        params
      end
1061192
def config():
    ''''''
    if hasattr(current_app, 'settings_file'):
        log.info('Loaded configuration from %s', current_app.settings_file)

    log.info(white('Current configuration'))
    for key in sorted(current_app.config):
        if key.startswith('__') or not key.isupper():
            continue
        echo('{0}: {1}'.format(white(key), current_app.config[key]))
1105783
def _get_instance_params(cls, instance):
        
        url = instance.get("url")
        if url is None:
            raise ConfigurationError("You must specify a url for your instance in `conf.yaml`")
        username = instance.get("username")
        password = instance.get("password")
        ssl_params = None
        if url.startswith("ldaps"):
            ssl_params = {
                "key": instance.get("ssl_key"),
                "cert": instance.get("ssl_cert"),
                "ca_certs": instance.get("ssl_ca_certs"),
                "verify": is_affirmative(instance.get("ssl_verify", True)),
            }
        custom_queries = instance.get("custom_queries", [])
        tags = list(instance.get("tags", []))
        tags.append("url:{}".format(url))

        return url, username, password, ssl_params, custom_queries, tags