stanley-king 2 rokov pred
rodič
commit
988d316275
2 zmenil súbory, kde vykonal 7 pridanie a 16 odobranie
  1. 6 9
      plot/refill/ChannelReader.py
  2. 1 7
      plot/refill/algorithm.py

+ 6 - 9
plot/refill/ChannelReader.py

@@ -73,19 +73,16 @@ class ChannelReader(DataReadStream):
                     r[name] = ls
             return r
 
-        stime = lambda t: time.strftime('%d-%H:%M:%S', time.localtime(t))
-
+        # stime = lambda t: time.strftime('%d-%H:%M:%S', time.localtime(t))
         all = defaultdict(set)
         for day in days:
-            logger.debug("day = %s", stime(day))
+            # logger.debug("day = %s", stime(day))
             tuples = self.tuple_path(day, chnames, card_types, spec)
             all = merge(tuples,all)
-            logger.debug('tuples')
-            logger.debug(tuples)
-            logger.debug('all')
-            logger.debug(all)
-
-
+            # logger.debug('tuples')
+            # logger.debug(tuples)
+            # logger.debug('all')
+            # logger.debug(all)
         return all
 
     def init_data(self, days):

+ 1 - 7
plot/refill/algorithm.py

@@ -16,13 +16,7 @@ def calc_chratios(data, pos_map, start, end):
     y = succ / commit
     y = y.ravel()
 
-    sums = np.sum(all, axis=1)
-    succs = sums[0]
-    fails = sums[1]
-
-    return int(succs), int(succs + fails), y
-
-    # return int(view[0, -1]), int(view[0, -1] + view[1, -1]), y
+    return int(view[0, -1]), int(view[0, -1] + view[1, -1]), y
 
 def calc_cov_chratios(data, pos_map, start, end, window, left_len,right_len):
     view = data[[pos_map.succ_count, pos_map.fail_count, pos_map.commit_count], :]