This function returns a dict containing default settings
500081
def get_settings():
    
    s = getattr(settings, 'CLAMAV_UPLOAD', {})
    s = {
            'CONTENT_TYPE_CHECK_ENABLED': s.get('CONTENT_TYPE_CHECK_ENABLED', False),
            # LAST_HANDLER is not a user configurable option; we return
            # it with the settings dict simply because it's convenient.
            'LAST_HANDLER': getattr(settings, 'FILE_UPLOAD_HANDLERS')[-1]
        }
    return s
555045
def get_default():
    

    if not is_configured():
        raise JutException('No configurations available, please run `jut config add`')

    for configuration in _CONFIG.sections():
        if _CONFIG.has_option(configuration, 'default'):
            return dict(_CONFIG.items(configuration))
1221784
def defaults():
        """"""
        return dict((str(k), str(v)) for k, v in cma_default_options.items())
869856
def _settings(self) -> Settings:
        
        if self.__dict__['__settings'] is None:
            self.__dict__['__settings'] = Settings()
            for file_path in self._get_files():
                if file_path:
                    # noinspection PyProtectedMember
                    self.__dict__['__settings']._load(file_path)
        return self.__dict__['__settings']
990382
def clean(self, settings):
        
        return {k: v for k, v in settings.items() if k in DEFAULT_SETTINGS}
1272840
def available_settings(self):
        """"""
        available = {}
        if not self.status_data:
            return available

        for (key, val) in self.status_data.get('avail', {}).items():
            available[key] = []
            for subval in val:
                try:
                    subval = float(subval)
                except ValueError:
                    subval = subval

                if val in ('on', 'off'):
                    subval = (subval == 'on')

                available[key].append(subval)

        return available
902733
def get_default_config(self):
        
        config = super(DatadogHandler, self).get_default_config()

        config.update({
            'api_key': '',
            'queue_size': '',
        })

        return config
130720
def _load_defaults(self, default='settings.py'):
        '''
        
        '''
        if default[-3:] == '.py':
            default = default[:-3]

        self.my_settings = {}
        try:
            settings = importlib.import_module(default)
            self.my_settings = self._convert_to_dict(settings)
        except ImportError:
            log.warning("No default settings found")
437365
def get_default_config(self):
        
        config = super(SlabInfoCollector, self).get_default_config()
        config.update({
            'path':     'slabinfo'
        })
        return config
1356239
def values(self, with_defaults=True):
        
        return dict(((k, str(v)) for k, v in self._inputs.items() if not v.is_empty(with_defaults)))
367430
def get_config(self):
        
        # Fill this dict with config data
        return {
            'hash_name': self.hash_name,
            'dim': self.dim,
            'projection_count': self.projection_count,
            'normals': self.normals,
            'tree_root': self.tree_root,
            'minimum_result_size': self.minimum_result_size
        }
690491
def defaults(self_):
        
        self = self_.self
        d = {}
        for param_name,param in self.param.objects('existing').items():
            if param.constant:
                pass
            elif param.instantiate:
                self.param._instantiate_param(param,dict_=d,key=param_name)
            else:
                d[param_name]=param.default
        return d
845714
def defaults(current: dict, *args: AnyMapping) -> dict:
    
    """
    for data in args:
        for key, value in data.items():
            current.setdefault(key, value)
    return current
81191
def settings(self):
        
        if not self._settings:
            data = self.query(Settings.key)
            self._settings = Settings(self, data)
        return self._settings
1150912
def config(self):
        

        return dict((optname, getattr(self, optname))
                    for optname, _ in CFG_OPTIONS if hasattr(self, optname))
4437
def get_setting(key, *default):
    """"""
    if default:
        return get_settings().get(key, default[0])
    else:
        return get_settings()[key]
492593
def defaults(self):
        
        defaults = ConfigParser.defaults(self).copy()
        for key, val in iteritems(defaults):
            defaults[key] = self.get('DEFAULT', key) or val
        return defaults