示例#1
0
 def find_line_pattern_histogram_games(self):
   line_pattern_histogram = {}
   for jogo in self.numpy_histjogos:
     line_pattern = jogos_functions.get_line_pattern(jogo)
     if line_pattern_histogram.has_key(line_pattern):
       line_pattern_histogram[line_pattern] += 1
     else:
       line_pattern_histogram[line_pattern] = 1
   return line_pattern_histogram
示例#2
0
def filter_in_within_line_patterns(jogo, line_patterns):
  '''
  Metric 4: remainders (n_impares, remainder_n, column/line_pattern, column/line_drawing etc.)
  Submetric: line_pattern (eg. 012210 which means 1 dozen in line 2, 2 in line 3, 3 in line 4 and 1 in line 5)
             As a line_drawing, 012210 becomes 2211
  '''
  line_pattern = jogos_functions.get_line_pattern(jogo)
  if line_pattern in line_patterns:
    return True
  return False
示例#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