コード例 #1
0
ファイル: data.py プロジェクト: guenp/squidpy
 def __init__(self, title='', folder='data', stamp = create_stamp(), *args, **kwargs):
     super(Data, self).__init__(*args, **kwargs)
     self.title = title
     self.stamp = stamp
     self.folder = folder
     filename = '%s_%s.dat' %(self.stamp, self.title)
     if not os.path.exists(self.folder):
         os.mkdir(self.folder)
     self.filename = os.path.join(self.folder,filename)
     self.len = 0
コード例 #2
0
ファイル: data.py プロジェクト: guenp/squidpy
 def __init__(self, pipe=None, output=None, title='Untitled', folder='data', stamp=None, save_data=True):
     super(DataCollector, self).__init__()
     self.pipe = pipe
     if stamp is None:
         stamp = create_stamp()
     self.title = title
     self.folder = folder
     self.daemon = True
     self.output = output
     self.save_data = save_data
     if self.output.keys() == []:
         self.output['title'] = title
         self.output['folder'] = folder
         self.output['stamp'] = stamp
         self.output['data'] = pd.DataFrame()