예제 #1
0
 def collect_data_from_stock_dir(self, stock_code):
     folder = self.base_path + stock_code
     if not os.path.exists(folder):
         os.mkdir(folder)
     else:
         obj = util.deserialization_object(folder + '/metadata.json')
         if obj is not None:  # use this one as benchmark
             self.current_stock = obj
             self.stocks[stock_code] = self.current_stock
예제 #2
0
 def collect_data_from_stock_dir(self, stock_code):
     folder = self.base_path + stock_code
     if not os.path.exists(folder):
         os.mkdir(folder)
     else:
         obj = util.deserialization_object(folder + '/metadata.json')
         if obj is not None:     # use this one as benchmark
             self.current_stock = obj
             self.stocks[stock_code] = self.current_stock
예제 #3
0
 def deserialization_stock_data(self):
     obj = util.deserialization_object(self.base_path + 'stocks.json')
     if obj is not None:
         self.stocks = obj
예제 #4
0
 def deserialization_stock_data(self):
     obj = util.deserialization_object(self.base_path + 'stocks.json')
     if obj is not None:
         self.stocks = obj