Create a property dict
772362
def _property_create_dict(header, data):
    '''
    
    '''
    prop = dict(zip(header, _merge_last(data, len(header))))
    prop['name'] = _property_normalize_name(prop['property'])
    prop['type'] = _property_detect_type(prop['name'], prop['values'])
    prop['edit'] = from_bool(prop['edit'])
    if 'inherit' in prop:
        prop['inherit'] = from_bool(prop['inherit'])
    del prop['property']
    return prop
614230
def create_properties(self):  # pylint: disable=no-self-use
        
        properties = {}
        properties["product"] = "eventhub.python"
        properties["version"] = __version__
        properties["framework"] = "Python {}.{}.{}".format(*sys.version_info[0:3])
        properties["platform"] = sys.platform
        return properties
1215282
def _transform_to_dict(result):
        
        result_dict = {}
        property_list = result.item
        for item in property_list:
            result_dict[item.key[0]] = item.value[0]
        return result_dict
339511
def get_property(self, key):
        """"""
        _key = DJANGO_CONF[key]
        return getattr(self, _key, CONF_SPEC[_key])
1324272
def to_dict(self):
        """"""
        make = lambda pair: (pair[0], pair[1].to_dict())
        return dict(
            variables=dict(make(v) for v in self.variables.items()),
            properties=dict(make(p) for p in self.properties.items()),
            roles=dict(make(r) for r in self.roles.items()),
            predicates=dict(make(p) for p in self.predicates.items())
        )
136106
def get_properties(obj):
        
        properties = {}
        
        for property_name in dir(obj):

            property = getattr(obj, property_name)

            if PropertyReflector._is_property(property, property_name):
                properties[property_name] = property

        return properties
1024568
def as_dict(self):
        
        out = {}
        for prop in self:
            propval = getattr(self, prop)

            if hasattr(propval, 'for_json'):
                out[prop] = propval.for_json()
            elif isinstance(propval, list):
                out[prop] = [getattr(x, 'for_json', lambda:x)() for x in propval]
            elif isinstance(propval, (ProtocolBase, LiteralValue)):
                out[prop] = propval.as_dict()
            elif propval is not None:
                out[prop] = propval

        return out
164422
def _make_object_dict(self, obj):
        
        data = {}
        for attr in dir(obj):
            if attr[0] is not '_' and attr is not 'status':
                datum = getattr(obj, attr)
                if not isinstance(datum, types.MethodType):
                    data.update(self._handle_object(attr,datum))
        return data
49395
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'voices' in _dict:
            args['voices'] = [
                Voice._from_dict(x) for x in (_dict.get('voices'))
            ]
        else:
            raise ValueError(
                'Required property \'voices\' not present in Voices JSON')
        return cls(**args)
1356472
def as_dict(self):
        
        result = {}
        for key in self._valid_properties:
            val = getattr(self, key)
            if isinstance(val, datetime):
                val = val.isoformat()
            # Parse custom classes
            elif val and not Model._is_builtin(val):
                val = val.as_dict()
            # Parse lists of objects
            elif isinstance(val, list):
                # We only want to call as_dict in the case where the item
                # isn't a builtin type.
                for i in range(len(val)):
                    if Model._is_builtin(val[i]):
                        continue
                    val[i] = val[i].as_dict()
            # If it's a boolean, add it regardless of the value
            elif isinstance(val, bool):
                result[key] = val

            # Add it if it's not None
            if val:
                result[key] = val
        return result
16554
def as_dictionary(self):
        """"""
        values = {
            'id': self._id,
            'type': self._type
        }

        if self._owner:
            values['owner'] = self._owner
        return values
776707
def properties(self):
        """"""
        properties = {'id': self._id}
        if self._name is not None:
            properties['name'] = self._name

        return properties
1299202
def define_property(obj, name, fget=None, fset=None, fdel=None, doc=None):
    """"""
    if hasattr(fget, '__get__'):  # can pass a property declaration too
        prop = fget
    else:
        prop = property(fget, fset, fdel, doc)
    cls = obj.__class__
    obj.__class__ = type(cls.__name__, (cls, ), {
        '__doc__': cls.__doc__,
        name: prop
    })
834559
def from_dict(cls, d):
        """"""
        return cls(
            d['rargname'],
            d['value'],
            list(d.get('properties', {}).items()),
            d.get('optional', False)
        )
755463
function createPropertyNS(attr) {
	var name, value;

	return {
		name: attr.name
		, value: attr.value
		, ns: namespaceMap[attr.name] || ''
	};
}
131207
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'word' in _dict:
            args['word'] = _dict.get('word')
        else:
            raise ValueError(
                'Required property \'word\' not present in Word JSON')
        if 'sounds_like' in _dict:
            args['sounds_like'] = _dict.get('sounds_like')
        else:
            raise ValueError(
                'Required property \'sounds_like\' not present in Word JSON')
        if 'display_as' in _dict:
            args['display_as'] = _dict.get('display_as')
        else:
            raise ValueError(
                'Required property \'display_as\' not present in Word JSON')
        if 'count' in _dict:
            args['count'] = _dict.get('count')
        else:
            raise ValueError(
                'Required property \'count\' not present in Word JSON')
        if 'source' in _dict:
            args['source'] = _dict.get('source')
        else:
            raise ValueError(
                'Required property \'source\' not present in Word JSON')
        if 'error' in _dict:
            args['error'] = [
                WordError._from_dict(x) for x in (_dict.get('error'))
            ]
        return cls(**args)
353736
def to_dict(self):
        """"""
        dictionary = {}
        for key, value in iteritems(self.__dict__):
            property_name = key[1:]
            if hasattr(self, property_name):
                dictionary.update({property_name: getattr(self, property_name, None)})
        return dictionary