Projects the specified metadata attributes to new region fields

        :param attributes: a list of metadata attributes
        :return: a new GDataframe with additional region fields
196256
def project_meta(self, attributes):
        
        if not isinstance(attributes, list):
            raise TypeError('attributes must be a list')
        meta_to_project = self.meta[attributes].applymap(lambda l: ", ".join(l))
        new_regs = self.regs.merge(meta_to_project, left_index=True, right_index=True)
        return GDataframe(regs=new_regs, meta=self.meta)
149813
def make_attributes(s, gff3=True, keep_attr_order=True):
    
    if gff3:
        """
        hack: temporarily replace the '+' sign in the attributes column
        with the string 'PlusSign' to prevent urlparse.parse_qsl() from
        replacing the '+' sign with a space
        """
        s = s.replace('+', 'PlusSign')
        d = parse_qs(s, keep_attr_order=keep_attr_order)
        for key in d:
            d[key][0] = unquote(d[key][0].replace('PlusSign', '+').replace('"', ''))
    else:
        attributes = s.split(";")
        d = DefaultOrderedDict(list) if keep_attr_order else defaultdict(list)
        for a in attributes:
            a = a.strip()
            if ' ' not in a:
                continue
            key, val = a.split(' ', 1)
            val = unquote(val.replace('"', '').replace('=', ' ').strip())
            d[key].append(val)

    for key, val in d.items():
        d[key] = list(flatten([v.split(",") for v in val]))

    return d
1308858
def attribute(attr)
      return super unless self.class.metadata_column_fields.include?(attr.to_sym)

      options = self.class.metadata_column_fields[attr.to_sym] || {}
      default = options.include?(:default) ? options[:default] : nil
      _metadata_hash.include?(attr) ? HasMetadataColumn.metadata_typecast(_metadata_hash[attr], options[:type]) : default
    end
620828
private static List<AttributesColumn> createColumns() {

		List<AttributesColumn> columns = new ArrayList<>();
		int index = 0;

		columns.add(AttributesColumn.createPrimaryKeyColumn(index++, COLUMN_ID));
		columns.add(AttributesColumn.createColumn(index++, COLUMN_NAME,
				GeoPackageDataType.TEXT, false, null));
		columns.add(AttributesColumn.createColumn(index++, COLUMN_DESCRIPTION,
				GeoPackageDataType.TEXT, false, null));
		columns.add(AttributesColumn.createColumn(index++, COLUMN_COLOR,
				GeoPackageDataType.TEXT, false, null));
		columns.add(AttributesColumn.createColumn(index++, COLUMN_OPACITY,
				GeoPackageDataType.REAL, false, null));
		columns.add(AttributesColumn.createColumn(index++, COLUMN_WIDTH,
				GeoPackageDataType.REAL, false, null));
		columns.add(AttributesColumn.createColumn(index++, COLUMN_FILL_COLOR,
				GeoPackageDataType.TEXT, false, null));
		columns.add(AttributesColumn.createColumn(index++, COLUMN_FILL_OPACITY,
				GeoPackageDataType.REAL, false, null));

		return columns;
	}
493268
def _add_missing_schema_attributes(self):
        '''
        
        '''
        for attr in [attr for attr in dir(self) if not attr.startswith('__')]:
            attr_val = getattr(self, attr)
            if isinstance(getattr(self, attr), SchemaItem) and \
               attr not in self._attributes:

                self._attributes.append(attr)
832493
def add_attribute(attr,**kwargs):
    
    log.debug("Adding attribute: %s", attr.name)

    try:
        attr_i = db.DBSession.query(Attr).filter(Attr.name == attr.name,
                                                 Attr.dimension_id == attr.dimension_id).one()
        log.info("Attr already exists")
    except NoResultFound:
        attr_i = Attr(name = attr.name, dimension_id = attr.dimension_id)
        attr_i.description = attr.description
        db.DBSession.add(attr_i)
        db.DBSession.flush()
        log.info("New attr added")
    return JSONObject(attr_i)
374285
def assign_attributes(new_attributes = {}, options = {})
      return if new_attributes.blank?

      attributes = new_attributes.stringify_keys
      multi_parameter_attributes = []
      nested_parameter_attributes = []

      attributes.each do |k, v|
        if k.include?("(")
          multi_parameter_attributes << [ k, v ]
        elsif respond_to?("#{k}=")
          if v.is_a?(Hash)
            nested_parameter_attributes << [ k, v ]
          else
            send("#{k}=", v)
          end
        else
          raise UnknownAttributeError, "unknown attribute: #{k}"
        end
      end

      # assign any deferred nested attributes after the base attributes have been set
      nested_parameter_attributes.each do |k,v|
        send("#{k}=", v)
      end

      assign_multiparameter_attributes(multi_parameter_attributes)
    end
1241297
private void fillMetaData() {
        metaDataBuffer.putInt(MONITOR_VERSION_OFFSET, MONITOR_VERSION);
        metaDataBuffer.putInt(GW_DATA_REFERENCE_OFFSET, GW_DATA_OFFSET);
        metaDataBuffer.putInt(SERVICE_DATA_REFERENCE_OFFSET, serviceDataOffset);
        metaDataBuffer.putStringUtf8(GW_ID_OFFSET, gatewayId, ByteOrder.nativeOrder());
        metaDataBuffer.putInt(gwCountersLblBuffersReferenceOffset, 0);
        metaDataBuffer.putInt(gwCountersLblBuffersLengthOffset, GATEWAY_COUNTER_LABELS_BUFFER_LENGTH);
        metaDataBuffer.putInt(gwCountersValueBuffersReferenceOffset, 0);
        metaDataBuffer.putInt(gwCountersValueBuffersLengthOffset, GATEWAY_COUNTER_VALUES_BUFFER_LENGTH);
        metaDataBuffer.putInt(noOfServicesOffset, 0);
    }
42367
public AttributeNode<AttributeMetadata, AttributeId> addChild(AttributeId attribute) {
      AttributeNode<AttributeMetadata, AttributeId> child;
      if (children == null) {
         children = new HashMap<>();
         child = new AttributeNode<>(attribute, this);
         children.put(attribute, child);
         rebuildChildrenArray();
      } else {
         child = children.get(attribute);
         if (child == null) {
            child = new AttributeNode<>(attribute, this);
            children.put(attribute, child);
            rebuildChildrenArray();
         }
      }
      return child;
   }
459950
public final void setLink(Attributes attributes) {
        lineValues[GpxMetadata.LINELINK_HREF] = attributes.getValue(GPXTags.HREF);
    }
633130
def set_gae_attributes(span):
    """"""
    for env_var, attribute_key in GAE_ATTRIBUTES.items():
        attribute_value = os.environ.get(env_var)

        if attribute_value is not None:
            pair = {attribute_key: attribute_value}
            pair_attrs = Attributes(pair)\
                .format_attributes_json()\
                .get('attributeMap')

            _update_attr_map(span, pair_attrs)
1329407
def from_description(cls, description, attrs):
        
        hash_key = None
        range_key = None
        index_type = description["Projection"]["ProjectionType"]
        includes = description["Projection"].get("NonKeyAttributes")
        for data in description["KeySchema"]:
            name = data["AttributeName"]
            if name not in attrs:
                continue
            key_type = data["KeyType"]
            if key_type == "HASH":
                hash_key = TableField(name, attrs[name].data_type, key_type)
            elif key_type == "RANGE":
                range_key = TableField(name, attrs[name].data_type, key_type)
        throughput = description["ProvisionedThroughput"]
        return cls(
            description["IndexName"],
            index_type,
            description["IndexStatus"],
            hash_key,
            range_key,
            throughput["ReadCapacityUnits"],
            throughput["WriteCapacityUnits"],
            description.get("IndexSizeBytes", 0),
            includes,
            description,
        )
1160801
@Trivial
    private void addAttributes(Attributes sourceAttrs, Attributes descAttrs) {
        for (NamingEnumeration<?> neu = sourceAttrs.getAll(); neu.hasMoreElements();) {
            descAttrs.put((Attribute) neu.nextElement());
        }
    }
971944
protected void updateAppAttributes(Map<String, Object> attributes) {

        m_rootLayout.setMainHeightFull(Boolean.TRUE.equals(attributes.get(ATTR_MAIN_HEIGHT_FULL)));

        Object infoComponentObj = attributes.get(ATTR_INFO_COMPONENT);
        if (m_infoComponent != null) {
            m_infoLayout.removeComponent(m_infoComponent);
        }
        if (infoComponentObj instanceof Component) {
            m_infoComponent = (Component)infoComponentObj;
            m_infoLayout.addComponent(m_infoComponent);
        }
    }
1087138
def create_attributes(klass, attributes, previous_object=None):
        

        result = {}

        if previous_object is not None:
            result = {k: v for k, v in previous_object.to_json().items() if k != 'sys'}

        result.update(attributes)

        return result
1361623
def extend(self, **attributes):
        
        for key, value in attributes.iteritems():
            if not hasattr(self, key):
                setattr(self, key, value)
800172
def _GetInstanceAndProjectAttributes(self, metadata_dict):
    
    metadata_dict = metadata_dict or {}

    try:
      instance_data = metadata_dict['instance']['attributes']
    except KeyError:
      instance_data = {}
      self.logger.warning('Instance attributes were not found.')

    try:
      project_data = metadata_dict['project']['attributes']
    except KeyError:
      project_data = {}
      self.logger.warning('Project attributes were not found.')

    return instance_data, project_data