Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for arbitrary filter functions #336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Techwolfy
Copy link

Description

Adds support for arbitrary filter functions, allowing fine-grained control of predictions.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I've been using a function similar to the below to make predictions for a few weeks, it worked perfectly.

def testFilter(outcomes, title):
    if "Will the streamer be victorious?" not in title:
        return None

    if outcomes[0][OutcomeKeys.ODDS_PERCENTAGE] < 35:
        return "A"
    else: #outcomes[1][OutcomeKeys.ODDS_PERCENTAGE] < 65:
        return "B"

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md)
  • My changes generate no new warnings
  • Any dependent changes have been updated in requirements.txt

@Tkd-Alex Tkd-Alex added the enhancement New feature or request label Nov 10, 2021
@Tkd-Alex
Copy link
Owner

Can you please update the README or provide a valid example where explain how the use should use this filter?

@Techwolfy
Copy link
Author

An example filter function is in the description above; it can be used to only interact with specific predictions where the real odds are known, and to always bet on the side in favor of the user.

@taurynamonsterxdd
Copy link

help me pls on heroku
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants