def filter_in_those_not_having_tilrwpatterns(jogo_as_dezenas, tilstats_reused_for_excluding_wpatterns, history_nDoConc_range=None): ''' ''' # volante_caract = VolanteCharacteristics(n_dezenas_no_sorteio = len(jogo_as_dezenas)) n_slots = tilstats_reused_for_excluding_wpatterns.n_slots tilr = TilR.get_tilr_from_pool(n_slots, history_nDoConc_range) # , volante_caract wpattern = tilr.get_game_tilrpattern_as_str(jogo_as_dezenas) if wpattern in tilstats_reused_for_excluding_wpatterns.get_wpatterns(): return False return True
def report(): wpatterndict = Dict2(); desc_stair_dict = Dict2() reader = ConcursosHistoryPickledStorage(read_as_id=RCH.READ_CONCHIST_AS_TIMEONWARDS_ORDERED_INTS) jogos_as_dezenas = reader.get_games_up_to() start_index = start_nDoConc - 1 patternDistance = PatternDistanceAnalyzer() for i, jogo_as_dezenas in enumerate(jogos_as_dezenas[start_index:]): passing_nDoConc = start_nDoConc + i the_one_just_before = passing_nDoConc - 1 tilr = TilR.get_tilr_from_pool(n_slots=5, history_nDoConc_range = (1, the_one_just_before)) wpattern = tilr.get_game_tilrpattern_as_str(jogo_as_dezenas) #print wpattern, 'concurso', passing_nDoConc, jogo_as_dezenas desc_stair_str = tilr.get_game_tilrpattern_as_desc_stair(jogo_as_dezenas) print str(passing_nDoConc).zfill(4), wpattern, desc_stair_str wpatterndict.add1_or_set1_to_key(wpattern) patternDistance.add_pattern(wpattern) desc_stair_dict.add1_or_set1_to_key(desc_stair_str) for wpattern in wpatterndict.keys(): print wpattern, ':', wpatterndict[wpattern] for wpattern in desc_stair_dict.keys(): print wpattern, ':', desc_stair_dict[wpattern] patternDistance.mount_distances_histogram() patternDistance.summarize()