Return a dict of metadata for symbol with ID j.
768570
def get_sid_info(self,j):
        ''''''
        h = self.gdx_handle
        r, name, dims, stype = gdxcc.gdxSymbolInfo(h, j)
        assert r, '%d is not a valid symbol number' % j
        r, records, userinfo, description = gdxcc.gdxSymbolInfoX(h, j)
        assert r, '%d is not a valid symbol number' % j
        return {'name':name, 'stype':stype, 'desc':description, 'dim':dims}
435618
def dictify_device_meta(device_object):
    
    try:
        if  isinstance(device_object['info']['description']['meta'], str) or \
            isinstance(device_object['info']['description']['meta'], unicode):
            device_object['info']['description']['meta'] =\
                json.loads(device_object['info']['description']['meta'])
    except ValueError as err:
        print("dictify: {0}".format(err))
    return device_object
1296298
def get_metadata(self, obj, prefix=None):
        
        uri = "/%s/%s" % (self.uri_base, utils.get_name(obj))
        resp, resp_body = self.api.method_head(uri)
        ret = {}
        # Add the metadata prefix, if needed.
        if prefix is None:
            prefix = OBJECT_META_PREFIX
        low_prefix = prefix.lower()
        for hkey, hval in list(resp.headers.items()):
            lowkey = hkey.lower()
            if lowkey.startswith(low_prefix):
                cleaned = hkey.replace(low_prefix, "").replace("-", "_")
                ret[cleaned] = hval
        return ret
1161246
def dict(self):
        
        metadata = {}
        properties = {}
        for name, prop in list(self.properties.items()):
            properties[name] = prop.dict
        metadata['properties'] = properties
        return metadata
920363
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'id') and self.id is not None:
            _dict['id'] = self.id
        return _dict
1179903
def load_metadata(fileobj):
        
        with gzip.GzipFile(fileobj=fileobj, mode='r') as z:
            return json.loads(z.readline())
931628
def iddofobject(data, commdct, key):
    """"""
    dtls = data.dtls
    i = dtls.index(key)
    return commdct[i]
76939
def individual_dict(self, ind_ids):
        """"""
        ind_dict = {ind.ind_id: ind for ind in self.individuals(ind_ids=ind_ids)}
        return ind_dict
868061
def to_dict(self):
        
        return {
            'type': self.__class__.__name__,
            'element_id': self.element_id,
            'style_class': self.style_class,
            'icon': self.icon,
            'attributes': self.attributes
        }
905856
def _return_metadata():
    
    app = current_app
    retdict = {"auth": app.config["AUTH"]["type"]}
    for fld in ["name", "repository", "version", "description",
                "api_version"]:
        retdict[fld] = app.config[fld.upper()]
    return jsonify(retdict)
696095
def to_dict(self):
        
        ui_info = {}
        if self._description:
            ui_info["description"] = self._description
        if self._display_name:
            ui_info["display_name"] = self._display_name
        if self._logos:
            ui_info["logo"] = self._logos
        return {"service": {"idp": {"ui_info": ui_info}}} if ui_info else {}
653670
def json(self):
        """"""
        return {
            "id": self.ID,
            "steps": self.steps,
            "graph_source": self.source,
            "errored": self.errored
        }
896696
def get_metadata(self, refresh=True):
        
        if refresh or not self._metadata:
            ident = self._id or self.get_full_name()
            if not ident:
                raise ConuException(
                    "This image does not have a valid identifier.")
            self._metadata = dict()
        return self._metadata
767167
def element_attribs_to_dict(self, element):
        
        return {self.ns+':'+key: val for (key, val) in element.attrib.items()
                if key != add_ns('id')}
512503
def get_branding_metadata(self):
        
        metadata = dict(self._branding_metadata)
        metadata.update({'existing_id_values': self.my_osid_object_form._my_map['brandingIds']})
        return Metadata(**metadata)
651797
def metadata():
    """"""
    with open(os.path.join(charm_dir(), 'metadata.yaml')) as md:
        return yaml.safe_load(md)
44208
def get_ladder_metadata(session, url):
    """"""
    parsed = make_scrape_request(session, url)
    tag = parsed.find('a', href=re.compile(LADDER_ID_REGEX))
    return {
        'id': int(tag['href'].split('/')[-1]),
        'slug': url.split('/')[-1],
        'url': url
    }