Twitch-Channel-Points-Miner-v2
Twitch-Channel-Points-Miner-v2 copied to clipboard
Add support for arbitrary filter functions
Description
Adds support for arbitrary filter functions, allowing fine-grained control of predictions.
Type of change
- [x] 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:
- [x] My code follows the style guidelines of this project
- [x] 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)
- [x] My changes generate no new warnings
- [x] Any dependent changes have been updated in requirements.txt
Can you please update the README or provide a valid example where explain how the use should use this filter?
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.
help me pls on heroku