def __init__(self, nrows, rng, userandom, datadir,
              docompress=0, complib='zlib', kind="medium", optlevel=6):
     DB.__init__(self, nrows, rng, userandom)
     self.tprof = []
     # Specific part for pytables
     self.docompress = docompress
     self.complib = complib
     # Complete the filename
     self.filename = "pro-" + self.filename
     self.filename += '-' + 'O%s' % optlevel
     self.filename += '-' + kind
     if docompress:
         self.filename += '-' + complib + str(docompress)
     self.datadir = datadir
     path = Path(self.datadir)
     if not path.is_dir():
         if not path.is_absolute():
             dir_path = Path('.') / self.datadir
         else:
             dir_path = Path(self.datadir)
         dir_path.mkdir(parents=True, exist_ok=True)
         self.datadir = dir_path
         print(f"Created {self.datadir}.")
     self.filename = self.datadir / f'{self.filename}.h5'
     # The chosen filters
     self.filters = tb.Filters(complevel=self.docompress,
                               complib=self.complib,
                               shuffle=1)
     print("Processing database:", self.filename)
 def __init__(self, nrows, rng, userandom, datadir,
              docompress=0, complib='zlib', kind="medium", optlevel=6):
     DB.__init__(self, nrows, rng, userandom)
     self.tprof = []
     # Specific part for pytables
     self.docompress = docompress
     self.complib = complib
     # Complete the filename
     self.filename = "pro-" + self.filename
     self.filename += '-' + 'O%s' % optlevel
     self.filename += '-' + kind
     if docompress:
         self.filename += '-' + complib + str(docompress)
     self.datadir = datadir
     if not os.path.isdir(self.datadir):
         if not os.path.isabs(self.datadir):
             dir_path = os.path.join(os.getcwd(), self.datadir)
         else:
             dir_path = self.datadir
         os.makedirs(dir_path)
         self.datadir = dir_path
         print("Created {}.".format(self.datadir))
     self.filename = self.datadir + '/' + self.filename + '.h5'
     # The chosen filters
     self.filters = tables.Filters(complevel=self.docompress,
                                   complib=self.complib,
                                   shuffle=1)
     print("Processing database:", self.filename)
 def __init__(self,
              nrows,
              rng,
              userandom,
              datadir,
              docompress=0,
              complib='zlib',
              kind="medium",
              optlevel=6):
     DB.__init__(self, nrows, rng, userandom)
     self.tprof = []
     # Specific part for pytables
     self.docompress = docompress
     self.complib = complib
     # Complete the filename
     self.filename = "pro-" + self.filename
     self.filename += '-' + 'O%s' % optlevel
     self.filename += '-' + kind
     if docompress:
         self.filename += '-' + complib + str(docompress)
     self.filename = datadir + '/' + self.filename + '.h5'
     # The chosen filters
     self.filters = tables.Filters(complevel=self.docompress,
                                   complib=self.complib,
                                   shuffle=1)
     print("Processing database:", self.filename)
Exemple #4
0
 def __init__(self, nrows, rng, userandom, datadir,
              docompress=0, complib='zlib', kind="medium", optlevel=6):
     DB.__init__(self, nrows, rng, userandom)
     self.tprof = []
     # Specific part for pytables
     self.docompress = docompress
     self.complib = complib
     # Complete the filename
     self.filename = "pro-" + self.filename
     self.filename += '-' + 'O%s' % optlevel
     self.filename += '-' + kind
     if docompress:
         self.filename += '-' + complib + str(docompress)
     self.filename = datadir + '/' + self.filename + '.h5'
     # The chosen filters
     self.filters = tables.Filters(complevel=self.docompress,
                                   complib=self.complib,
                                   shuffle=1)
     print("Processing database:", self.filename)
 def __init__(self, nrows, rng, userandom):
     DB.__init__(self, nrows, rng, userandom)
     self.port = PORT
 def __init__(self, nrows, rng, userandom):
     DB.__init__(self, nrows, rng, userandom)
     self.port = PORT