예제 #1
0
def best_matches_freebet2(site, freebet, sport, nb_matches=2):
    #     all_odds = sb.ODDS[sport]
    all_odds = get_matches_with_best_trj(sport, 10)
    best_profit = float("-inf")
    combis = list(combinations(all_odds.items(), nb_matches))
    nb_combis = len(combis)
    best_combine = None
    best_bets = None
    choices = list(
        product(*[range(get_nb_outcomes(sport)) for _ in range(nb_matches)]))
    for combi in combis:
        if any([site not in x[1]["odds"] for x in combi]):
            continue
        matches = [x[0] for x in combi]
        for choice in choices:
            choice_list = list(choice)
            odd = 1
            for match, outcome in zip(combi, choice_list):
                odd *= match[1]["odds"][site][outcome]
            profit = best_combine_reduit(matches,
                                         choice_list,
                                         site,
                                         freebet,
                                         sport,
                                         odd - 1,
                                         output=False)
            if profit < best_profit:
                continue
            best_profit = profit
            best_matches = matches
            best_choice = choice_list
            best_odd = odd
    best_combine_reduit(best_matches,
                        best_choice,
                        site,
                        freebet,
                        sport,
                        best_odd - 1,
                        freebet=True)
예제 #2
0
def best_combine_booste(matches, combinaison_boostee, site_combinaison, mise, sport, cote_boostee):
    best_combine_reduit(matches, combinaison_boostee, site_combinaison, mise, sport, cote_boostee)