Set the value of multiple attributes.
        :param attributes_dict dict: a dictionary containing key-value pairs as attribute names and values to be set
        :returns: the resource itself
480629
def set_attributes(self, **attributes_dict):
        
        for attr_name, attr_value in attributes_dict.items():
            self.set_attr(attr_name, attr_value)
        return self
1116448
def _broadcast_and_set_attrs(self, local_dict):
        
        del local_dict['self']
        self.remove_axis = False
        max_length = 0
        for key in local_dict:
            try:
                length = len(local_dict[key])
                if length > max_length:
                    max_length = length

            except TypeError:
                pass

        if max_length == 0:
            self.remove_axis = True
            for key in local_dict:
                setattr(self, key, np.array([local_dict[key]]))

        # check for bad length arrays
        else:
            for key in local_dict:
                try:
                    if len(local_dict[key]) < max_length and len(local_dict[key]) > 1:
                        raise ValueError("Casting parameters not correct."
                                         + " Need all at a maximum shape and the rest being"
                                         + "len-1 arrays or scalars")
                except TypeError:
                    pass

            # broadcast arrays
            for key in local_dict:
                try:
                    if len(local_dict[key]) == max_length:
                        setattr(self, key, local_dict[key])
                    elif len(local_dict[key]) == 1:
                        setattr(self, key, np.full((max_length,), local_dict[key][0]))
                except TypeError:
                    setattr(self, key, np.full((max_length,), local_dict[key]))
        return
701076
def set_attributes(self, session_key, attributes):
        
        session = self._lookup_required_session(session_key)
        session.set_attributes(attributes)
        self.session_handler.on_change(session)
952156
def _set_attributes(self, kwds):
    
    cls = self.__class__
    for name, value in kwds.iteritems():
      prop = getattr(cls, name)  # Raises AttributeError for unknown properties.
      if not isinstance(prop, Property):
        raise TypeError('Cannot set non-property %s' % name)
      prop._set_value(self, value)
384269
def attributes
      attrs = Hash.new
      attribute_list.each do |attribute|
        value = self.send(attribute)
        attrs[attribute] = value unless value.nil?
      end
      attrs
    end
514716
def setAttributesJson(self, attributesJson):
        
        try:
            self._attributes = json.loads(attributesJson)
        except:
            raise exceptions.InvalidJsonException(attributesJson)
        return self
961719
def set(self, attr_dict):
    
    for key in attr_dict:
      if key == self._id_attribute:
        setattr(self, self._id_attribute, attr_dict[key])
      else:
        setattr(self, u"_" + key, attr_dict[key])
    return self
756576
def set_attributes(self, **kwargs):
        
        if not self.Meta.related_resources:
            # Just do what the normal BaseResource does
            super(HypermediaResource, self).set_attributes(**kwargs)
            return

        # Extract all the values that are URLs
        url_values = {}
        for k, v in kwargs.items():
            try:
                if isinstance(v, list):
                    [self._parse_url_and_validate(i) for i in v]
                else:
                    self._parse_url_and_validate(v)
                url_values[k] = v
            except BadURLException:
                # This is a badly formed URL or not a URL at all, so skip
                pass
        # Assign the valid method values and then remove them from the kwargs
        assigned_values = self.match_urls_to_resources(url_values)
        for k in assigned_values.keys():
            kwargs.pop(k, None)
        # Assign the rest as attributes.
        for field, value in kwargs.items():
            if field in self.Meta.attributes:
                setattr(self, field, value)
1004257
def __setAttributeDefaults(self):
        
        for k,v in self.__class__.attributes.items():
            if v is not None and self.attributes.has_key(k) is False:
                if isinstance(v, types.FunctionType):
                    self.attributes[k] = v(self)
                else:
                    self.attributes[k] = v
967508
def set_attributes(node, overwrite=True, **attributes):
    
    aset = node.attrs
    for k, v in attributes.items():
        if not overwrite and k in aset:
            pass
        elif v is None:
            if k in aset:
                del aset[k]
        else:
            aset[k] = v
452502
def attributes=(attributes = {})
      attributes.each do |name, value|
        begin
          send("#{name}=", value)
        rescue NoMethodError => e
          puts "Unable to assign #{name}. No such method."
        end
      end
    end
103813
def copy_from_dict(self, attributes):
    
    for attribute_name, attribute_value in attributes.items():
      # Not using startswith to improve performance.
      if attribute_name[0] == '_':
        continue
      setattr(self, attribute_name, attribute_value)
748419
def setattrs(obj, **kwargs):
    
    for key, value in kwargs.items():
        setattr(obj, key, value)
    return obj
244867
def set_attrs(self):
        
        self.attrs.table_type = str(self.table_type)
        self.attrs.index_cols = self.index_cols()
        self.attrs.values_cols = self.values_cols()
        self.attrs.non_index_axes = self.non_index_axes
        self.attrs.data_columns = self.data_columns
        self.attrs.nan_rep = self.nan_rep
        self.attrs.encoding = self.encoding
        self.attrs.errors = self.errors
        self.attrs.levels = self.levels
        self.attrs.metadata = self.metadata
        self.set_info()
177425
def set_attr_value(self, key, attr, value):
        
        idx = self._keys[key]
        self._attrs[attr][idx].set(value)
423565
def set_dict(self, new_dict):
        
        for key, value in new_dict.items():
            if isinstance(value, dict):
                self[str(key)] = Vividict(value)
            else:
                self[str(key)] = value
1361623
def extend(self, **attributes):
        
        for key, value in attributes.iteritems():
            if not hasattr(self, key):
                setattr(self, key, value)