Returns information about the symbol, in a dictionary

        Parameters
        ----------
        symbol: str
            the symbol for the given item in the DB

        Returns
        -------
        dictionary
348055
def get_info(self, symbol):
        
        sym = self._get_symbol_info(symbol)
        if not sym:
            raise NoDataFoundException("Symbol does not exist.")
        ret = {}
        ret['chunk_count'] = sym[CHUNK_COUNT]
        ret['len'] = sym[LEN]
        ret['appended_rows'] = sym[APPEND_COUNT]
        ret['metadata'] = sym[METADATA] if METADATA in sym else None
        ret['chunker'] = sym[CHUNKER]
        ret['chunk_size'] = sym[CHUNK_SIZE] if CHUNK_SIZE in sym else 0
        ret['serializer'] = sym[SERIALIZER]
        return ret
909702
def get_symbol_map(self):
        
        # todo: make sure we return a list of strings!
        sm = _libxdo.xdo_get_symbol_map()

        # Return value is like:
        # ['alt', 'Alt_L', ..., None, None, None, ...]
        # We want to return only values up to the first None.
        # todo: any better solution than this?
        i = 0
        ret = []
        while True:
            c = sm[i]
            if c is None:
                return ret
            ret.append(c)
            i += 1
551270
def indices_from_symbol(self, symbol: str) -> tuple:
        
        return tuple((i for i, specie in enumerate(self.species)
                      if specie.symbol == symbol))
76293
def pop(self, symbol):
        
        last_metadata = self.find_one({'symbol': symbol}, sort=[('start_time', pymongo.DESCENDING)])
        if last_metadata is None:
            raise NoDataFoundException('No metadata found for symbol {}'.format(symbol))

        self.find_one_and_delete({'symbol': symbol}, sort=[('start_time', pymongo.DESCENDING)])
        mongo_retry(self.find_one_and_update)({'symbol': symbol}, {'$unset': {'end_time': ''}},
                                              sort=[('start_time', pymongo.DESCENDING)])

        return last_metadata
58950
def get_options_info(self, symbol, items=None, expiration=''):
        
        response = self.select('yahoo.finance.options',items).where(['symbol','=',symbol],[] if not expiration else ['expiration','=',expiration])
        return response
726433
def jsonify(symbol):
    
    try:
        # all symbols have a toJson method, try it
        return json.dumps(symbol.toJson(), indent='  ')
    except AttributeError:
        pass
    return json.dumps(symbol, indent='  ')
1169865
def group_symbol(self):
        
        s_mapping = {symdata.index: symdata.symbol for symdata in self._symboldata_list}
        return s_mapping[self.group_num]
1318616
def _lookup_unconflicted_symbol(self, symbol):
        
        try:
            uppered = symbol.upper()
        except AttributeError:
            # The mapping fails because symbol was a non-string
            return numpy.nan

        try:
            return self.finder.lookup_symbol(
                uppered,
                as_of_date=None,
                country_code=self.country_code,
            )
        except MultipleSymbolsFound:
            # Fill conflicted entries with zeros to mark that they need to be
            # resolved by date.
            return 0
        except SymbolNotFound:
            # Fill not found entries with nans.
            return numpy.nan
482904
def __parse_gc_symbol(self, gc_symbol: str):
        
        result = {
            "namespace": None,
            "mnemonic": None
        }

        parts = gc_symbol.split(':')
        if len(parts) > 1:
            result["namespace"] = parts[0]
            result["mnemonic"] = parts[1]
        else:
            result["mnemonic"] = gc_symbol

        return result
425047
public static String getDescription(String symbol)
    {
        CharInfo info = (CharInfo) fSymbolMap.get(symbol);
        return (info != null) ? info.fDescription : null;
    }
132619
def get_stock(self, symbol: str) -> Commodity:
        """"""

        # Check if we have the exchange name (namespace).
        if ":" in symbol:
            # We have a namespace
            symbol_parts = symbol.split(":")
            exchange = symbol_parts[0]
            symbol = symbol_parts[1]
            security = self.book.get(Commodity, namespace=exchange, mnemonic=symbol)
        else:
            #with database.Database().open_book() as book:
            security = self.book.get(Commodity, mnemonic=symbol)

        return security
53398
def descriptor_for_symbol(self, symbol):
        
        if isinstance(symbol, basestring):
            symbol = sympy.Symbol(symbol)

        try:
            return self._descriptions_dict[symbol]
        except KeyError:
            raise KeyError("Symbol {0!r} not found in left-hand-side of the equations".format(symbol))
492983
def is_SYMBOL(token, *symbols):
    
    from symbols.symbol_ import Symbol
    assert all(isinstance(x, Symbol) for x in symbols)
    for sym in symbols:
        if sym.token != token:
            return False

    return True
535715
def get(self, name, **kwargs):
        
        name = self._prefix + name
        if name not in self._params:
            self._params[name] = symbol.Variable(name, **kwargs)
        return self._params[name]
928182
def symbol_for_ticker(self, ticker, field, provider, providers):
        ''''''
        provider = provider or settings.default_provider
        if provider:
            provider = providers.get(provider, None)
        return self.symboldata(ticker, field, provider)
271736
def get_by_symbol(self, symbol: str) -> Commodity:
        
        # handle namespace. Accept GnuCash and Yahoo-style symbols.
        full_symbol = self.__parse_gc_symbol(symbol)

        query = (
            self.query
            .filter(Commodity.mnemonic == full_symbol["mnemonic"])
        )
        if full_symbol["namespace"]:
            query = query.filter(Commodity.namespace == full_symbol["namespace"])

        return query.first()
871366
def as_dict(self):
        
        return {"@module": self.__class__.__module__,
                "@class": self.__class__.__name__,
                "element": self.symbol}