예제 #1
0
 def find_impares_histogram_for_games(self):
   impares_histogram = {}
   for jogo in self.numpy_histjogos:
     n_impares = jogos_functions.get_n_impares(jogo)
     if impares_histogram.has_key(n_impares):
       impares_histogram[n_impares] += 1
     else:
       impares_histogram[n_impares] = 1
   return impares_histogram
예제 #2
0
def filter_within_n_impares(jogo, in_between):
  '''
  Metric 4: remainders (n_impares, remainder_n, column/line_pattern, column/line_drawing etc.)
  Submetric: n_impares (0 to N_DEZENAS_SORTEADAS) within a min-max range
  '''
  n_impares = jogos_functions.get_n_impares(jogo) 
  if n_impares < in_between[0] or n_impares > in_between[1]:
    return False
  return True
예제 #3
0
  def report(self):

    print 'Reporting impares_histogram'     
    print self.impares_histogram
    print 'Concurso After', self.concurso.nDoConc, self.concurso.get_dezenas()
    n_impares = jogos_functions.get_n_impares(self.concurso.get_dezenas())
    print 'n_impares', n_impares

    print 'Reporting sum_histogram'         
    print self.sum_histogram         
    print 'Concurso After', self.concurso.nDoConc, self.concurso.get_dezenas()
    print 'Soma', sum(self.concurso.get_dezenas())
    
    print 'Reporting line_pattern_dict'     
    print self.line_pattern_dict     
    print 'Concurso After', self.concurso.nDoConc, self.concurso.get_dezenas()
    line_pattern = jogos_functions.get_line_pattern(self.concurso.get_dezenas())
    print 'line_pattern', line_pattern

    print 'column_pattern_dict'   
    print self.column_pattern_dict   
    print 'Concurso After', self.concurso.nDoConc, self.concurso.get_dezenas()
    column_pattern = jogos_functions.get_column_pattern(self.concurso.get_dezenas())
    print 'column_pattern', column_pattern