Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env python
try:
import pyaux
pyaux.use_exc_ipdb()
pyaux.use_exc_log()
except:
pass
import datetime
import matplotlib.pyplot as plt
import IPython
import logging
logging.basicConfig()
from pybacktest.testers import SimpleBacktester
from pybacktest.opt import Optimizer
from examples.ma_strategy import MACrossoverStrategy as strategy
from pybacktest.data.pandas_bars import pandas_bars_wrap
from pybacktest.data.quotes import get_daily_quotes_yahoo
def main():
try:
import pyaux.runlib
pyaux.runlib.init_logging(level=1)
pyaux.use_exc_ipdb()
except Exception:
pass
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(21)
res = do_scrap_wrongies()
return
for turl in to_check:
try:
stuff = do_horrible_thing_func(turl, base_url=url)
except GetError:
continue ## ... will be logged anyway.
if stuff:
data, resp = stuff[:2]
res.append((turl, data, dict(resp=resp)))
_log.debug("dhts: %r images found", len(res))
return to_check, res
if __name__ == '__main__':
pyaux.runlib.init_logging(level=1)
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(21)
pyaux.use_exc_ipdb()
cres = do_horrible_things(sys.argv[1])
import IPython
IPython.embed(banner1="`cres`.")