Skip to content

Instantly share code, notes, and snippets.

@kangeugine
Created August 2, 2018 15:37
Show Gist options
  • Select an option

  • Save kangeugine/87914cc4f866fc72fdec7e23abf84c6b to your computer and use it in GitHub Desktop.

Select an option

Save kangeugine/87914cc4f866fc72fdec7e23abf84c6b to your computer and use it in GitHub Desktop.

Revisions

  1. kangeugine created this gist Aug 2, 2018.
    12 changes: 12 additions & 0 deletions fantasy-football-constraints-3.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    def constraint_all(x):
    test = [constraint_cost(x) >= 0,
    constraint_unique(x) == 0,
    constraint_gk(x) == 0,
    constraint_def_3(x) >= 0,
    constraint_def_5(x) >= 0,
    constraint_mid_3(x) >= 0,
    constraint_mid_5(x) >= 0,
    constraint_str_1(x) >= 0,
    constraint_str_3(x) >= 0]
    return(all(test))
    # if constraint_all(x) is True, all tests are passed