def __init__(self, dbinfo, stock_info_table, combination_info_table, calendar_table): self.cal_client = ccalendar.CCalendar(dbinfo, calendar_table) self.comb_info_client = combination_info.CombinationInfo( dbinfo, combination_info_table) self.stock_info_client = cstock_info.CStockInfo( dbinfo, stock_info_table)
def __init__(self, dbinfo): self.mysql_client = CMySQL(dbinfo) self.cal_client = ccalendar.CCalendar(without_init=True) with open(ct.USER_FILE) as f: infos = json.load(f) self.trader = Trader(infos[0]["account"], infos[0]["passwd_encrypted"], infos[0]["secuids_sh"], infos[0]["secuids_sz"]) self.bnew_succeed_date = ""
def __init__(self, dbinfo, fpath = ct.USER_FILE): self.mysql_client = CMySQL(dbinfo) self.cal_client = ccalendar.CCalendar(without_init = True) with open(fpath) as f: infos = json.load(f) self.traders = list() for info in infos: self.traders.append(Trader(info["account"], info["passwd_encrypted"], info["secuids_sh"], info["secuids_sz"])) self.buy_succeed_date = ""
def __init__(self, name, code, dbinfo, stock_info_table, combination_info_table, calendar_info_table, delisted_info_table, halted_info_table): Combination.__init__(self, dbinfo, code, combination_info_table) self.stock_info_client = cs_info.CStockInfo(dbinfo, stock_info_table) self.calendar_info_client = ccal.CCalendar(dbinfo, calendar_info_table) self.cdelist_info_client = cdelist.CDelisted(dbinfo, delisted_info_table) self.chalt_info_client = chalted.CHalted(dbinfo, halted_info_table, stock_info_table, calendar_info_table)
def __init__(self, dbinfo): self.dbinfo = dbinfo self.sdir = '/data/docs/blog/hellobiek.github.io/source/_posts' self.doc = CDoc(self.sdir) self.stock_objs = dict() self.redis = create_redis_obj() self.mysql_client = CMySQL(self.dbinfo, iredis=self.redis) self.cal_client = ccalendar.CCalendar(without_init=True) self.animating = False self.emotion_table = ct.EMOTION_TABLE if not self.create_emotion(): raise Exception("create emotion table failed")
def __init__(self, dbinfo): self.sdir = '/data/docs/blog/hellobiek.github.io/source/_posts' self.doc = CDoc(self.sdir) self.redis = create_redis_obj() self.mysql_client = CMySQL(dbinfo) self.cal_client = ccalendar.CCalendar(without_init=True) self.trading_info = None self.animating = False self.emotion_table = ct.EMOTION_TABLE self.industry_table = ct.INDUSTRY_TABLE if not self.create_industry(): raise Exception("create industry table failed") if not self.create_emotion(): raise Exception("create emotion table failed")