def quotes_by_symbols(symbols, force_retrieve = False):
  
  # load or prime quotes for each symbol
  existing_quotes = dict([ (q.symbol, q) for q in Quote.objects.filter(symbol__in = symbols) ])
  quotes = { }
  symbols_to_retrieve = []
  for symbol in symbols:
    quote = existing_quotes.get(symbol, None)
    exists = True
    if quote == None:
      quote = Quote(symbol = symbol, last_trade = datetime.now())
      exists = False
            
    quotes[symbol] = quote
    if symbol == CASH_SYMBOL and not exists:
      quote.name = 'US Dollars'
      quote.price = 1.0
      quote.cash_equivalent = True
      quote.changed = True
      
    elif not exists or force_retrieve:
      quote.price = 0.0
      quote.changed = True
      symbols_to_retrieve.append(symbol)
      
    else:
      quote.changed = False
  
  # retrieve fresh prices from yahoo
  if len(symbols_to_retrieve) > 0:
    csv_url = ('http://download.finance.yahoo.com/d/quotes.csv?s=%s&f=sl1d1t1n&e=.csv' % (','.join(symbols_to_retrieve)))
    csv_columns = 'symbol,price,date,time,name'
    for row in _yql_csv_to_json(csv_url, csv_columns):
      price = row['price']
      tradeDate = row['date']
      tradeTime = row['time']
      
      quote = quotes.get(row['symbol'])
      quote.cash_equivalent = price.endswith('%')
      quote.price = (1.0 if quote.cash_equivalent else float(price))
      quote.name = row['name']
    
      if tradeDate != 'N/A' and tradeTime != 'N/A':
        month, day, year = [int(f) for f in tradeDate.split('/')]
        time = datetime.strptime(tradeTime, '%I:%M%p')
        quote.last_trade = datetime(year, month, day, time.hour, time.minute, time.second)
        
  # save all changes
  for quote in quotes.values():
    if quote.changed:
      quote.save()
    
    if not quote.cash_equivalent and quote.price > 0.0 and quote.pricehistory_set.count() == 0:
      refresh_price_history(quote)
    
  return quotes.values()
Enable the xmpp stub.
dataset/ETHPy150Open fxdemolisher/frano/frano/quotes/models.py/quotes_by_symbols--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/ext/testbed/__init__.py/Testbed.init_xmpp_stub