Set instance variables based on an options dict
355238
def set_options(self, **options):
        
        self.interactive = False
        self.verbosity = options['verbosity']
        self.symlink = ""
        self.clear = False
        ignore_patterns = []
        self.ignore_patterns = list(set(ignore_patterns))
        self.page_themes_updated = 0
        self.skins_updated = 0
622707
def set_dict(self, incomming):
        
        for key, val in incomming.items():
            if val and key in self._property_names:
                setattr(self, key, val)
1004715
def set_defaults(defaults, kwargs):
    
    for key, value in defaults.items():
        if key not in kwargs and value is not None:
            kwargs[key] = value
        elif isinstance(value, list) and isinstance(kwargs[key], list):
            kwargs[key] = list(value) + kwargs[key]
        elif isinstance(value, dict) and isinstance(kwargs[key], dict):
            set_defaults(value, kwargs[key])
        elif key in kwargs and value is None:
            kwargs[key] = None
289372
def initialize_options(self):
        """"""
        self.dep_groups = ''
        self.dep_quote = False
        self.dep_conda = False
105571
def options(self):
        
        keys = self.__class__.__dict__.copy()
        keys.update(self.__dict__)
        keys = sorted(keys.keys())

        for opt in keys:
            val = self.get(opt)
            if val is not None:
                yield opt, val
421131
def set_params(self,**kwargs):
        
        for key,value in list(kwargs.items()):
            setattr(self,key,value)
559411
def set(self, instance, value, **kw):  # noqa
        
        ref = []
        # The value is an UID
        if api.is_uid(value):
            ref.append(value)

        # The value is a dictionary, get the UIDs.
        if u.is_dict(value):
            ref = ref.append(value.get("uid"))

        # The value is already an object
        if api.is_at_content(value):
            ref.append(value)

        # The value is a list
        if u.is_list(value):
            for item in value:
                # uid
                if api.is_uid(item):
                    ref.append(item)
                # dict (catalog query)
                elif u.is_dict(item):
                    # If there is UID of objects, just use it.
                    uid = item.get('uid', None)
                    if uid:
                        ref.append(uid)

        # Handle non multi valued fields
        if not self.multi_valued:
            if len(ref) > 1:
                raise ValueError("Multiple values given for single valued "
                                 "field {}".format(repr(self.field)))
            else:
                ref = ref[0]

        return self._set(instance, ref, **kw)
589027
function setOptions(object, options) {
      options = object.options = _.assign({}, cloneDeep(object.constructor.options), cloneDeep(options));

      _.forOwn(options, function(value, key) {
        if (value != null) {
          // Add event listeners.
          if (/^on[A-Z]/.test(key)) {
            _.each(key.split(' '), function(key) {
              object.on(key.slice(2).toLowerCase(), value);
            });
          } else if (!_.has(object, key)) {
            object[key] = cloneDeep(value);
          }
        }
      });
    }
635002
def set_options(self, **kwargs):
        
        p = Unskin(self.options)
        p.update(kwargs)
561831
def _setVal(self, name, val, defVal = None):
        """"""
        if val == defVal:
            return
        if not hasattr(self, "vals"):
            self.vals = {}
        self.vals[name] = val
1166172
def set_var(var, set_='""'):
    ''''''
    if isinstance(set_, str):
        to_set = json.dumps(set_)
    elif isinstance(set_, dict) or isinstance(set_, list):
        try:
            to_set = json.dumps(set_)
        except ValueError:
            raise Exception('var not jsonable')
    else:
        raise Exception('var must be jsonable list or dict')

    os.environ['NBCONVERT_' + var] = to_set
613360
def deep_update_dict(default, options):
    
    for key in options.keys():
        default_setting = default.get(key)
        new_setting = options.get(key)
        if isinstance(default_setting, dict):
            deep_update_dict(default_setting, new_setting)
        else:
            default[key] = new_setting
921965
def set(self, option, value):
        
        if self.config is None:
            self.config = {}
        self.config[option] = value
272438
def var_set(session, **kwargs):
        
        if not kwargs:
            for name, value in session.variables.items():
                session.write_line("{0}={1}".format(name, value))
        else:
            for name, value in kwargs.items():
                name = name.strip()
                session.set(name, value)
                session.write_line("{0}={1}", name, value)
681797
def initialize_options(cls):
        
        cls.CONFIG_OPTIONS = cls.CFG.get(cls.CONFIG_PATH, return_type=dict)
143852
def _init_options(self, kwargs):
        
        self.options = self.task_config.options
        if self.options is None:
            self.options = {}
        if kwargs:
            self.options.update(kwargs)

        # Handle dynamic lookup of project_config values via $project_config.attr
        for option, value in list(self.options.items()):
            try:
                if value.startswith("$project_config."):
                    attr = value.replace("$project_config.", "", 1)
                    self.options[option] = getattr(self.project_config, attr, None)
            except AttributeError:
                pass
882515
def set_options(opts = {})
      @wsdl           = opts[:wsdl]           || Settings.session.wsdl
      @endpoint       = opts[:endpoint]       || Settings.session.endpoint
      @soap_log       = opts[:soap_log]       || Settings.session.soap_log
      @soap_logger    = opts[:soap_logger]    || Settings.session.soap_logger
      @soap_log_level = opts[:soap_log_level] || Settings.session.soap_log_level
      @username       = opts[:username]       || Settings.session.username
      @password       = opts[:password]       || Settings.session.password
      @auth_cookie    = opts[:auth_cookie]    || nil
    end