Get rate limiters configuration
        specified at application level

        :rtype: dict of configurations
487034
def get_configs(cls):
        
        import docido_sdk.config
        http_config = docido_sdk.config.get('http') or {}
        session_config = http_config.get('session') or {}
        rate_limits = session_config.get('rate_limit') or {}
        return rate_limits
793095
def _get_limits_networking(self):
        
        limits = {}
        limits['Security groups per VPC'] = AwsLimit(
            'Security groups per VPC',
            self,
            500,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::EC2::SecurityGroup',
            limit_subtype='AWS::EC2::VPC',
        )
        limits['Rules per VPC security group'] = AwsLimit(
            'Rules per VPC security group',
            self,
            50,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::EC2::SecurityGroup',
            limit_subtype='AWS::EC2::VPC',
        )
        limits['VPC Elastic IP addresses (EIPs)'] = AwsLimit(
            'VPC Elastic IP addresses (EIPs)',
            self,
            5,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::EC2::EIP',
            limit_subtype='AWS::EC2::VPC',
            ta_service_name='VPC'  # TA shows this as VPC not EC2
        )
        # the EC2 limits screen calls this 'EC2-Classic Elastic IPs'
        # but Trusted Advisor just calls it 'Elastic IP addresses (EIPs)'
        limits['Elastic IP addresses (EIPs)'] = AwsLimit(
            'Elastic IP addresses (EIPs)',
            self,
            5,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::EC2::EIP',
        )
        limits['VPC security groups per elastic network interface'] = AwsLimit(
            'VPC security groups per elastic network interface',
            self,
            5,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::EC2::SecurityGroup',
            limit_subtype='AWS::EC2::NetworkInterface',
        )
        return limits
1321789
def get_default_config(self):
        
        config = super(RedisCollector, self).get_default_config()
        config.update({
            'host': self._DEFAULT_HOST,
            'port': self._DEFAULT_PORT,
            'timeout': self._DEFAULT_SOCK_TIMEOUT,
            'db': self._DEFAULT_DB,
            'auth': None,
            'databases': self._DATABASE_COUNT,
            'path': 'redis',
            'instances': [],
        })
        return config
1017506
def get_settings(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.get_settings(index=self._name, **kwargs)
1157722
def get_config(self):
        
        config = super(SequentialMemory, self).get_config()
        config['limit'] = self.limit
        return config
68644
def get_settings_from_client(client):
    
    settings = {
        'username': '',
        'api_key': '',
        'timeout': '',
        'endpoint_url': '',
    }
    try:
        settings['username'] = client.auth.username
        settings['api_key'] = client.auth.api_key
    except AttributeError:
        pass

    transport = _resolve_transport(client.transport)
    try:
        settings['timeout'] = transport.timeout
        settings['endpoint_url'] = transport.endpoint_url
    except AttributeError:
        pass

    return settings
286581
def rate_limit_info():
    
    import json
    import time

    r = requests.get(gh_url + "/rate_limit", auth=login.auth())
    out = json.loads(r.text)
    mins = (out["resources"]["core"]["reset"]-time.time())/60
    return out["resources"]["core"]["remaining"], mins
1086812
def get_default_config(self):
        
        config = super(CPUCollector, self).get_default_config()
        config.update({
            'path':     'cpu',
            'percore':  'True',
            'xenfix':   None,
            'simple':   'False',
            'normalize': 'False',
        })
        return config
1150790
def get_config(self):
        
        # Create a dummy report object if necessary
        channels = [sect.rsplit('_')[0] for sect in self.config.sections(suffix='_channel')]
        channels.sort()
        disabled_apps = [app for app in self._config_apps.keys() if app not in self._apps]
        return u''.join([
            u"\n--- %s configuration ---" % __package__,
            u"\nConfiguration file: %s" % self.config.cfgfile,
            u"\nConfiguration directory: %s" % self.confdir,
            u"\nConfigured applications: %s" % ', '.join(self._config_apps.keys()),
            u"\nDisabled applications: %s" % ', '.join(disabled_apps) if disabled_apps else '',
            u"\nFilter fields: %s" % ', '.join(self.config.options('fields')),
            u"\nOutput channels: %s" % ', '.join(channels) if channels else u'No channels defined',
            u"\nReports: %s\n" % ', '.join(
                [section[:-7] for section in self.config.sections(suffix='_report')]
            ),
            ''
        ])
477647
def print_rate_limit_info(opts, rate_info, atexit=False):
    """"""
    if not rate_info:
        return

    show_info = (
        opts.always_show_rate_limit
        or atexit
        or rate_info.interval > opts.rate_limit_warning
    )

    if not show_info:
        return

    click.echo(err=True)
    click.secho(
        "Throttling (rate limited) for: %(throttle)s seconds ... "
        % {"throttle": click.style(six.text_type(rate_info.interval), reverse=True)},
        err=True,
        reset=False,
    )
887882
def get_config(self):
        
        self.update_network_description()
        result = dict(self.__dict__)
        result['_network'] = None
        result['network_weights'] = None
        result['network_weights_loader'] = None
        result['prediction_cache'] = None
        return result
40185
def get_limits(self):
        
        self.connect()
        region_name = self.conn._client_config.region_name
        if self.limits != {}:
            return self.limits
        limits = {}

        limits['Tables Per Region'] = AwsLimit(
            'Tables Per Region',
            self,
            256,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::DynamoDB::Table',
        )

        limits['Account Max Write Capacity Units'] = AwsLimit(
            'Account Max Write Capacity Units',
            self,
            80000 if region_name == 'us-east-1' else 20000,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::DynamoDB::Table', )

        limits['Table Max Write Capacity Units'] = AwsLimit(
            'Table Max Write Capacity Units',
            self,
            40000 if region_name == 'us-east-1' else 10000,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::DynamoDB::Table',
        )

        limits['Account Max Read Capacity Units'] = AwsLimit(
            'Account Max Read Capacity Units',
            self,
            80000 if region_name == 'us-east-1' else 20000,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::DynamoDB::Table',
        )

        limits['Table Max Read Capacity Units'] = AwsLimit(
            'Table Max Read Capacity Units',
            self,
            40000 if region_name == 'us-east-1' else 10000,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::DynamoDB::Table',
        )

        limits['Global Secondary Indexes'] = AwsLimit(
            'Global Secondary Indexes',
            self,
            20,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::DynamoDB::Table',
        )

        limits['Local Secondary Indexes'] = AwsLimit(
            'Local Secondary Indexes',
            self,
            5,
            self.warning_threshold,
            self.critical_threshold,
            limit_type='AWS::DynamoDB::Table',
        )

        self.limits = limits
        return limits
873939
def get_ethernet_settings(self):
        
        uri = "{}/ethernetSettings".format(self.data["uri"])
        return self._helper.do_get(uri)
782573
def get_rate_limits(response):
    """"""
    periods = response.headers['X-RateLimit-Period']
    if not periods:
        return []

    rate_limits = []

    periods = periods.split(',')
    limits = response.headers['X-RateLimit-Limit'].split(',')
    remaining = response.headers['X-RateLimit-Remaining'].split(',')
    reset = response.headers['X-RateLimit-Reset'].split(',')

    for idx, period in enumerate(periods):
        rate_limit = {}
        limit_period = get_readable_time_string(period)
        rate_limit["period"] = limit_period
        rate_limit["period_seconds"] = period
        rate_limit["request_limit"] = limits[idx]
        rate_limit["requests_remaining"] = remaining[idx]

        reset_datetime = get_datetime_from_timestamp(reset[idx])
        rate_limit["reset"] = reset_datetime

        right_now = datetime.now()
        if (reset_datetime is not None) and (right_now < reset_datetime):
            # add 1 second because of rounding
            seconds_remaining = (reset_datetime - right_now).seconds + 1
        else:
            seconds_remaining = 0

        rate_limit["reset_in_seconds"] = seconds_remaining

        rate_limit["time_to_reset"] = get_readable_time_string(seconds_remaining)
        rate_limits.append(rate_limit)

    return rate_limits
1360432
def get_configuration(self):
        
        mapping = {}
        settings = self.get_settings()
        for record in self.context.getAnalyses():
            uid = record.get("service_uid")
            setting = settings.get(uid, {})
            config = {
                "partition": record.get("partition"),
                "hidden": setting.get("hidden", False),
            }
            mapping[uid] = config
        return mapping
407178
def get_configuration():
    
    root = getLogger()
    name_levels = [('', logging.getLevelName(root.level))]
    name_levels.extend(
        (name, logging.getLevelName(logger.level))
        for name, logger
        in root.manager.loggerDict.items()
        if hasattr(logger, 'level')
    )

    config_string = ','.join('%s:%s' % x for x in name_levels)

    return dict(config_string=config_string, log_json=SLogger.manager.log_json)
1062119
def _get_config(**api_opts):
    '''
    
    '''
    config = {
        'api_sslverify': True,
        'api_url': 'https://INFOBLOX/wapi/v1.2.1',
        'api_user': '',
        'api_key': '',
    }
    if '__salt__' in globals():
        config_key = '{0}.config'.format(__virtualname__)
        config.update(__salt__['config.get'](config_key, {}))
    # pylint: disable=C0201
    for k in set(config.keys()) & set(api_opts.keys()):
        config[k] = api_opts[k]
    return config