Returns public attributes of the inspected object.
497272
def public(self) -> 'PrettyDir':
        """"""
        return PrettyDir(
            self.obj, [pattr for pattr in self.pattrs if not pattr.name.startswith('_')]
        )
476621
def _get_classes_to_inspect(self):
        
        return tuple(filter(lambda c:
                      SerializableMixIn._get_version(c, require=False) or
                      (SerializableMixIn._get_serialize_fields(c) or
                       SerializableMixIn._get_interpolation_map(c)),
                      self.__class__.__mro__))
1220423
def inspect
      attributes = {
        input: input,
        output: output,
        prefix: prefix,
        active_color: active_color,
        error_color: error_color,
        enabled_color: enabled_color,
        help_color: help_color
      }
      "#<#{self.class}: #{attributes.each { |name, val| "@#{name}=#{val}" }}"
    end
381612
public Map<String, Object> getAttributes() {
        if (attributes == null) {
            return null;
        }
        Lock lock = lockForRead();
        try {
            return cloneData(attributes);
        } finally {
            lock.unlock();
        }
    }
1201363
def attributes(attrs):
    
    attrs = attrs or {}
    ident = attrs.get("id", "")
    classes = attrs.get("classes", [])
    keyvals = [[x, attrs[x]] for x in attrs if (x != "classes" and x != "id")]
    return [ident, classes, keyvals]
289504
def public_attributes(instance)
      definitions.values.each_with_object({}) do |item, obj|
        key = item.target
        next unless instance.respond_to? key
        val = instance.send(key)
        obj[key] = val unless null == val
      end
    end
786208
def show(x):
    """"""
    print("data attributes of %r" % (x,))
    names = dir(x)
    maxlen = max([0] + [len(n) for n in names])
    for k in names:
        v = getattr(x, k)
        if isinstance(v, types.MethodType):
            continue
        if k[:2] == '__' and k[-2:] == '__':
            continue
        if isinstance(v, str):
            if len(v) > 80 - maxlen - 5:
                v = repr(v[:80 - maxlen - 5]) + "..."
        elif isinstance(v, (int, type(None))):
            v = str(v)
        elif isinstance(v, (list, tuple, dict)):
            v = "%s (%d elements)" % (v, len(v))
        else:
            v = str(type(v))
        print("%*s : %s" % (maxlen, k, v))
    return x
820730
def attributes(self):
        """"""
        attributes = {
            'name': self.name,
            'camera_id': self.camera_id,
            'serial': self.serial,
            'temperature': self.temperature,
            'temperature_c': self.temperature_c,
            'temperature_calibrated': self.temperature_calibrated,
            'battery': self.battery,
            'thumbnail': self.thumbnail,
            'video': self.clip,
            'motion_enabled': self.motion_enabled,
            'motion_detected': self.motion_detected,
            'wifi_strength': self.wifi_strength,
            'network_id': self.sync.network_id,
            'sync_module': self.sync.name,
            'last_record': self.last_record
        }
        return attributes
444557
def get_stats(self, obj, stat_name):
        
        return [int(v) for v in self.get_attribute(obj, stat_name).split()]
373554
def public_copy(self):
        """"""
        d = dict(chain_code=self._chain_code, depth=self._depth,
                 parent_fingerprint=self._parent_fingerprint,
                 child_index=self._child_index, public_pair=self.public_pair())
        return self.__class__(**d)
594892
def _get_active_attributes_and_uniforms(self):
        
        # This match a name of the form "name[size]" (= array)
        regex = re.compile("""(?P<name>\w+)\s*(\[(?P<size>\d+)\])\s*""")
        # Get how many active attributes and uniforms there are
        cu = gl.glGetProgramParameter(self._handle, gl.GL_ACTIVE_UNIFORMS)
        ca = gl.glGetProgramParameter(self.handle, gl.GL_ACTIVE_ATTRIBUTES)
        # Get info on each one
        attributes = []
        uniforms = []
        for container, count, func in [(attributes, ca, gl.glGetActiveAttrib),
                                       (uniforms, cu, gl.glGetActiveUniform)]:
            for i in range(count):
                name, size, gtype = func(self._handle, i)
                m = regex.match(name)  # Check if xxx[0] instead of xx
                if m:
                    name = m.group('name')
                    for i in range(size):
                        container.append(('%s[%d]' % (name, i), gtype))
                else:
                    container.append((name, gtype))
        #return attributes, uniforms
        return set([v[0] for v in attributes] + [v[0] for v in uniforms])
265610
def get_properties(obj):
    
    if hasattr(obj, 'keys'):
        return obj.keys()
    elif hasattr(obj, '__dict__'):
        return obj.__dict__.keys()

    return []
367679
def get_obj_attrs(obj):
    
    pr = {}
    if obj is not None:
        if isinstance(obj, numpy.core.records.record):
            for name in obj.dtype.names:
                pr[name] = getattr(obj, name)
        elif hasattr(obj, '__dict__') and obj.__dict__:
            pr = obj.__dict__
        elif hasattr(obj, '__slots__'):
            for slot in obj.__slots__:
                if hasattr(obj, slot):
                    pr[slot] = getattr(obj, slot)
        elif isinstance(obj, dict):
            pr = obj.copy()
        else:
            for name in dir(obj):
                try:
                    value = getattr(obj, name)
                    if not name.startswith('__') and not inspect.ismethod(value):
                        pr[name] = value
                except:
                    continue

    return pr
1142013
def get_attributes(self):
        
        items = {}
        items['form_method'] = self.form_method.strip()
        items['form_tag'] = self.form_tag
        items['form_style'] = self.form_style.strip()
        
        if self.form_action:
            items['form_action'] = self.form_action.strip()
        if self.form_id:
            items['id'] = self.form_id.strip()
        if self.form_class:
            items['class'] = self.form_class.strip()
        if self.inputs:
            items['inputs'] = self.inputs
        if self.form_error_title:
            items['form_error_title'] = self.form_error_title.strip()
        if self.formset_error_title:
            items['formset_error_title'] = self.formset_error_title.strip()
        return items
820784
def get_object_params(self):
        
        return {name: value for (name, value) in six.iteritems(self.params)
                if (name not in self.additional_argument_spec and
                    name not in self.login_argument_spec and
                    (value is not None or name in self.specified_params))}
533956
def getmembers(object, predicate=None):
    """"""
    if inspect.isclass(object):
        mro = (object,) + inspect.getmro(object)
    else:
        mro = ()
    results = []
    processed = set()
    names = dir(object)
    # :dd any DynamicClassAttributes to the list of names if object is a class;
    # this may result in duplicate entries if, for example, a virtual
    # attribute with the same name as a DynamicClassAttribute exists
    try:
        for base in object.__bases__:
            for k, v in base.__dict__.items():
                if isinstance(v, types.DynamicClassAttribute):
                    names.append(k)
    except AttributeError:
        pass
    for key in names:
        # First try to get the value via getattr.  Some descriptors don't
        # like calling their __get__ (see bug #1785), so fall back to
        # looking in the __dict__.
        try:
            value = getattr(object, key)
            # handle the duplicate key
            if key in processed:
                raise AttributeError
        except AttributeError:
            for base in mro:
                if key in base.__dict__:
                    value = base.__dict__[key]
                    break
            else:
                # could be a (currently) missing slot member, or a buggy
                # __dir__; discard and move on
                continue
        except Exception as e:
            value = (RAISES_EXCEPTION, e)
        if not predicate or predicate(value):
            results.append((key, value))
        processed.add(key)
    results.sort(key=lambda pair: pair[0])
    return results
804441
function getAttributes(obj) {
    let attrString = '';
    let attrArray = Object.keys(obj);
    for (let tag of attrArray) {
        if (tag != ATTR && ATTRTAG.test(tag)) {
            attrString += ` ${tag.replace('_', '')}="${obj[tag]}"`;
        }
    }
    if (ATTR in obj) {
        attrString += ' ' + obj[ATTR];
    }
    return attrString;
}