is there a way to know which players are out?
See original GitHub issueTitle.
I try to wait 30 minutes or so before lock so that I can know exactly who is out. It worked for 2 or 3 days, but now it has been just putting any player even when they are out. Is there a way to make it only put players that are actually playing?
For a showdown on Draftkings, I tried the below code and it still had them in almost every lineup. I will update if I get it working, but am very curious as to why it will not remove the players from the optimizer, it just runs and puts them in basically every lineup.
from pydfs_lineup_optimizer import Site, Sport, get_optimizer, CSVLineupExporter
optimizer = get_optimizer(Site.DRAFTKINGS_CAPTAIN_MODE, Sport.BASKETBALL)
optimizer.load_players_from_csv("DKSalaries.csv")
#Declare players that are out
geo = optimizer.get_player_by_name('Paul George')
harrell = optimizer.get_player_by_name('Harrell')
craw = optimizer.get_player_by_name('Crawford')
bev = optimizer.get_player_by_name('Beverley')
din = optimizer.get_player_by_name('Dinwiddie')
jor = optimizer.get_player_by_name('DeAndre Jordan')
irving = optimizer.get_player_by_name('Irving')
prin = optimizer.get_player_by_name('Prince')
chan = optimizer.get_player_by_name('Chandler')
durant = optimizer.get_player_by_name('Durant')
beasley = optimizer.get_player_by_name('Beasley')
optimizer.remove_player(geo)
optimizer.remove_player(harrell)
optimizer.remove_player(craw)
optimizer.remove_player(bev)
optimizer.remove_player(din)
optimizer.remove_player(jor)
optimizer.remove_player(irving)
optimizer.remove_player(prin)
optimizer.remove_player(chan)
optimizer.remove_player(durant)
optimizer.remove_player(beasley)
geo.max_exposure = 0
harrell.max_exposure = 0
craw.max_exposure = 0
bev.max_exposure = 0
din.max_exposure = 0
jor.max_exposure = 0
irving.max_exposure = 0
prin.max_exposure = 0
chan.max_exposure = 0
durant.max_exposure = 0
beasley.max_exposure = 0
leonard = optimizer.get_player_by_name('Leonard')
levert = optimizer.get_player_by_name('LeVert')
leonard.min_exposure = 0.8
levert.min_exposure = 0.8
lineups = optimizer.optimize(n=20, max_exposure=0.4)
for lineup in lineups:
print(lineup)
optimizer.export('results.csv')
Edit: Also is it normal that Draftkings works perfectly with the exported csv, but with Fanduel I have to edit the lines since it is a different format?
Issue Analytics
- State:
- Created 3 years ago
- Comments:15
Top Results From Across the Web
Injury report: when pro teams have to reveal player's status
With the practice report, all players who have reportable injuries must be listed here, even if the player takes all the reps in...
Read more >How to decipher the NFL injury report - CBSSports.com
PROBABLE: The NFL says that players who have a virtual certainty of playing should be listed here. It's rare to see a player...
Read more >Official Latest NFL Injury Report for Players - NFL.com
Get the current Official National Football League player injury report on your favorite team week by week.
Read more >NBA Injuries | ESPN
Joe Harris, SF, Dec 23, Out, Harris (knee) has been ruled out for Friday's game against the Bucks, Kristian Winfield of the New...
Read more >How to find out what game someone is playing on Roblox ...
It's quite annoying to do, but possible. You can either guess the game and go to the 'Servers' list, and scroll down to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
got it working. TYVM!
no problem, glad i could help you.