Exemplo n.º 1
0
 def update(self, indicators):
     self._cache = dict()
     logger.info('Generated {0!s}'.format(self))
     with csv_file_writer(self.fname) as writer:
         for site, indicator in indicators:
             writer.writerow([site, indicator])
             self._cache[site] = indicator
Exemplo n.º 2
0
    def produce_features_see5(self):
        root, _ = os.path.splitext(self.args.config)
        data_f = '.'.join([root, 'data'])
        with csv_file_writer(data_f) as writer:
            writer.writerows(self._iter_rows())

        names_f = '.'.join([root, 'names'])
        with open(names_f, 'w') as fp:
            fp.write(self.names)