Retrieves all symbols belonging to a company
765967
def get_symbols(self, name):
        
        url = "http://autoc.finance.yahoo.com/autoc?query={0}&callback=YAHOO.Finance.SymbolSuggest.ssCallback".format(name)

        response = requests.get(url)

        json_data = re.match("YAHOO\.Finance\.SymbolSuggest.ssCallback\((.*)\)", response.text)
        try:
            json_data = json_data.groups()[0]
        except (Exception,) as e:
            print(e)
            json_data = '{"results": "Webservice seems to be down"}'

        return type('response', (requests.Response,),{
            'text' : json_data,
            'content': json_data.encode(),
            'status_code': response.status_code,
            'reason': response.reason,
            'encoding': response.encoding,
            'apparent_encoding': response.apparent_encoding,
            'cookies': response.cookies,
            'headers': response.headers,
            'json': lambda : json.loads(json_data),
            'url': response.url
        })
545809
def bound_symbols(self):
        """"""
        try:
            lhs_syms = self.lhs.bound_symbols
        except AttributeError:
            lhs_syms = set()
        try:
            rhs_syms = self.rhs.bound_symbols
        except AttributeError:
            rhs_syms = set()
        return lhs_syms | rhs_syms
164273
def _get_acronyms(acronyms):
    """"""
    acronyms_str = {}
    if acronyms:
        for acronym, expansions in iteritems(acronyms):
            expansions_str = ", ".join(["%s (%d)" % expansion
                                        for expansion in expansions])
            acronyms_str[acronym] = expansions_str

    return [{'acronym': str(key), 'expansion': value.encode('utf8')}
            for key, value in acronyms_str.iteritems()]
299249
public function getCharacterCorporations()
    {

        // TODO : rewrite the method according to the new ACL mechanic

        $user = auth()->user();

        $corporations = ApiKeyInfoCharacters::join(
            'eve_api_keys',
            'eve_api_keys.key_id', '=',
            'account_api_key_info_characters.keyID')
            ->distinct();

        // If the user us a super user, return all
        if (! $user->hasSuperUser()) {

            $corporations = $corporations->orWhere(function ($query) use ($user) {

                // If the user has any affiliations and can
                // list those characters, add them
                if ($user->has('character.list', false))
                    $query = $query->whereIn('characterID',
                        array_keys($user->getAffiliationMap()['char']));

                // Add any characters from owner API keys
                $query->orWhere('eve_api_keys.user_id', $user->id);
            });
        }

        return $corporations->orderBy('corporationName')
            ->pluck('corporationName');
    }
802771
def get_all(self):
        
        self.optional_params = {}
        self.endpoints = self._ENDPOINTS[:10]
        json_data = self.fetch(fmt_p=no_pandas)
        self.endpoints = self._ENDPOINTS[10:20]
        json_data_2 = self.fetch(fmt_p=no_pandas)
        for symbol in self.symbols:
            if symbol not in json_data:
                raise IEXSymbolError(symbol)
            json_data[symbol].update(json_data_2[symbol])
        return json_data[self.symbols[0]] if self.n_symbols == 1 else json_data
70332
def _extract_symbols(self, symbols, default=None):
        """"""
        to_ret = {}
        for symbol in symbols:
            symbolInfo = self.elf.symbol_decoder.get_symbol_for_name(symbol)
            if symbolInfo is None:
                if default is not None:
                    to_ret[symbol] = default
                    continue
                raise FlashAlgoException("Missing symbol %s" % symbol)
            to_ret[symbol] = symbolInfo.address
        return to_ret
542924
public static List<CPInstance> findByUuid_C(String uuid, long companyId) {
		return getPersistence().findByUuid_C(uuid, companyId);
	}
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()
284987
def imprints(self, key, value):
    """"""
    return {
        'place': value.get('a'),
        'publisher': value.get('b'),
        'date': normalize_date_aggressively(value.get('c')),
    }
1250443
def symbol_to_id(self, symbol):
        """"""

        if symbol not in self.symbols_to_ids:
            m = 'Could not look up Entrez ID for Geneways symbol ' + symbol
            raise Exception(m)
        return self.symbols_to_ids[symbol]
863074
def id_to_symbol(self, entrez_id):
        """"""

        entrez_id = str(entrez_id)
        if entrez_id not in self.ids_to_symbols:
            m = 'Could not look up symbol for Entrez ID ' + entrez_id
            raise Exception(m)
        return self.ids_to_symbols[entrez_id]
513096
async function getSymbols() {
  const info = await generateInfo();
  return info.symbols.filter(symbol => symbol.kind != 'member');
}
104160
def query_symbols query
      result = []
      source_map_hash.values.each do |s|
        result.concat s.query_symbols(query)
      end
      result
    end
1164108
def _symbols2assets(self, symbols):
        '''
        
        '''

        assets = {a.symbol: a for a in self.get_equities()}
        return [assets[symbol] for symbol in symbols if symbol in assets]
57460
def company_category(self, symbol=''):
        '''
        
        '''
        market = get_stock_market(symbol)

        with self.client.connect(*self.bestip):
            data = self.client.get_company_info_category(int(market), symbol)
            return self.client.to_df(data)
638995
def get_industry(symbol):
    '''
    
    '''
    url = 'http://finance.yahoo.com/q/pr?s=%s+Profile' % symbol
    soup = BeautifulSoup(urlopen(url).read())
    try:
        industry = soup.find('td', text='Industry:').\
            find_next_sibling().string.encode('utf-8')
    except:
        industry = ''
    return industry
333036
public static List<CommerceCurrency> findByUuid_C(String uuid,
		long companyId) {
		return getPersistence().findByUuid_C(uuid, companyId);
	}