Module Import alias alias Assign NameStore ListLoad Str Str Str Str FunctionDef arguments args NameParam NameParam defaults Num ListLoad Str Str Str Str body Expr Str Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return CompareEq Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpBitOr NameLoad NameLoad ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad While CompareLt Call NameLoad NameLoad NameLoad body Assign NameStore Dict For NameStore NameLoad body If UnaryOpNot CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Num For NameStore NameLoad body If Call NameLoad NameLoad body For NameStore NameLoad body If UnaryOpNot CompareIn NameLoad NameLoad body AugAssignAdd SubscriptStore NameLoad Index NameLoad Num Break Assign NameStore ListComp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Num For TupleStore NameStore NameStore NameLoad body If CompareEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Call NameLoad Str body Expr Str If UnaryOpNot CompareIn NameLoad TupleLoad Str Str Str body Raise Call NameLoad Str Assign NameStore Dict Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num For NameStore NameLoad body If Call NameLoad NameLoad body If CompareNotEq Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad body Raise NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If UnaryOpNot CompareIn NameLoad NameLoad body If CompareEq NameLoad Str body Assign NameStore BinOpMult NameLoad BinOpSub NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore BinOpDiv Num BinOpAdd NameLoad Num orelse If CompareEq NameLoad Str body Assign NameStore BinOpPow NameLoad BinOpSub BinOpSub NameLoad NameLoad Num Assign SubscriptStore NameLoad Index NameLoad BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num NameLoad Assign NameStore ListComp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore Dict Assign NameStore Call NameLoad Call NameLoad Lambda arguments args NameParam NameParam defaults BinOpBitAnd NameLoad NameLoad ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad GeneratorExp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For NameStore Call NameLoad NameLoad body For NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Num For NameStore NameLoad body If Call NameLoad NameLoad body For NameStore Call NameLoad Num BinOpSub NameLoad Num body For NameStore Call NameLoad BinOpAdd NameLoad Num NameLoad body Assign NameStore TupleLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index NameLoad AugAssignAdd SubscriptStore NameLoad Index NameLoad Num For NameStore Call NameLoad NameLoad body For NameStore Call NameLoad NameLoad body If CompareNotEq NameLoad NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad IfExp CompareGt SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad Num For NameStore Call NameLoad NameLoad body For NameStore Call NameLoad NameLoad body If CompareNotEq NameLoad NameLoad body For NameStore Call NameLoad NameLoad body If BoolOpAnd CompareNotEq NameLoad NameLoad CompareNotEq NameLoad NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam NameParam defaults Call NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad Return ListComp TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults Num body Assign NameStore Num Assign NameStore Num Assign NameStore Num For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword Str Assign NameStore Call NameLoad NameLoad If CompareNotEq SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num body AugAssignAdd NameStore Num If CompareNotEq SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num body AugAssignAdd NameStore Num If CompareNotEq SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num body AugAssignAdd NameStore Num Print NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num body Expr Call AttributeLoad NameLoad attr Str Assert CompareEq Call NameLoad NameLoad ListLoad TupleLoad Num Str TupleLoad Num Str TupleLoad Num Str TupleLoad Num Str TupleLoad Num Str decorator_list If CompareEq NameLoad Str body Expr Call NameLoad Expr Call NameLoad Assign NameStore Call NameLoad Num Print Call NameLoad NameLoad keyword Str Print Call NameLoad NameLoad Print Call NameLoad NameLoad
N/A N/A random copy N/A __all__ N/A makeup_votes iro borda schulze makeup_votes N/A N/A nvotes candidates N/A 100 N/A A B C D N/A N/A  generate random votes for testing  N/A votes N/A N/A k N/A range nvotes N/A N/A vote N/A N/A copy copy candidates N/A N/A N/A random shuffle vote N/A N/A N/A votes append vote N/A votes N/A is_valid N/A N/A vote N/A N/A N/A  check no repeated candidate names in vote  N/A N/A N/A len vote N/A len N/A set vote N/A iro N/A N/A votes N/A N/A N/A  instant run-off voting  N/A winners N/A N/A losers N/A set N/A allowed_options N/A reduce N/A N/A N/A a b N/A N/A a b N/A N/A set vote N/A vote votes N/A n N/A len allowed_options N/A N/A N/A len winners n N/A N/A options N/A N/A item allowed_options N/A N/A N/A N/A item losers N/A N/A N/A options N/A item 0 N/A vote votes N/A N/A N/A is_valid vote N/A N/A item vote N/A N/A N/A N/A item losers N/A N/A N/A options N/A item 1 N/A N/A options_list N/A N/A v k N/A N/A k v N/A N/A options items N/A N/A N/A options_list sort N/A minv N/A N/A options_list N/A 0 N/A 0 N/A N/A v k options_list N/A N/A N/A v minv N/A N/A N/A N/A losers add k N/A N/A N/A winners append N/A v k N/A winners N/A borda N/A N/A votes ignored mode N/A N/A set linear N/A N/A  borda voting when mode="linear"  N/A N/A N/A mode N/A linear fractional exponential N/A N/A N/A RuntimeError mode not supported N/A winners N/A N/A n N/A len N/A votes N/A 0 N/A vote votes N/A N/A N/A is_valid vote N/A N/A N/A N/A len vote N/A len N/A set vote N/A N/A InvalidVote N/A N/A k item N/A enumerate vote N/A N/A N/A N/A item ignored N/A N/A N/A mode linear N/A N/A delta N/A linear N/A n k N/A N/A N/A mode fractional N/A N/A delta N/A 1.0 N/A k 1 N/A N/A N/A mode exponential N/A N/A delta N/A n N/A N/A n k 1 N/A N/A winners N/A item N/A N/A N/A winners get item 0 delta N/A winners N/A N/A v k N/A N/A k v N/A N/A winners items N/A N/A N/A winners sort N/A winners N/A schulze N/A N/A votes N/A N/A N/A  schulze voting algorithm  N/A d N/A N/A p N/A N/A candidates N/A list N/A reduce N/A N/A N/A a b N/A N/A a b N/A N/A set vote N/A vote votes N/A map_candid N/A dict N/A N/A k i N/A N/A i k N/A enumerate candidates N/A n N/A len candidates N/A i N/A range n N/A N/A j N/A range n N/A N/A N/A d N/A N/A i j N/A p N/A N/A i j 0 N/A vote votes N/A N/A N/A is_valid vote N/A N/A i N/A range 0 N/A n 1 N/A N/A j N/A range N/A i 1 n N/A N/A key N/A N/A map_candid N/A N/A vote N/A i N/A map_candid N/A N/A vote N/A j N/A N/A d N/A key 1 N/A i N/A range n N/A N/A j N/A range n N/A N/A N/A i j N/A N/A N/A p N/A N/A i j N/A N/A N/A d N/A N/A i j N/A d N/A N/A j i N/A d N/A N/A i j 0 N/A i N/A range n N/A N/A j N/A range n N/A N/A N/A i j N/A N/A k N/A range n N/A N/A N/A N/A k i N/A k j N/A N/A N/A p N/A N/A j k N/A max N/A p N/A N/A j k N/A min N/A p N/A N/A j i N/A p N/A N/A i k N/A winners N/A range n N/A N/A N/A winners sort N/A N/A N/A i j N/A N/A cmp N/A p N/A N/A i j N/A p N/A N/A j i N/A N/A N/A i N/A candidates N/A k N/A N/A i k N/A enumerate winners N/A test N/A N/A nsamples N/A 10 N/A N/A diff_iro_borda 0 N/A diff_iro_schulze 0 N/A diff_borda_schulze 0 N/A k N/A range nsamples N/A N/A votes N/A makeup_votes 10 N/A a N/A iro votes N/A b N/A borda votes mode exponential N/A c N/A schulze votes N/A N/A N/A N/A a N/A -1 N/A 1 N/A N/A b N/A -1 N/A 1 N/A N/A diff_iro_borda 1 N/A N/A N/A N/A a N/A -1 N/A 1 N/A N/A c N/A -1 N/A 1 N/A N/A diff_iro_schulze 1 N/A N/A N/A N/A b N/A -1 N/A 1 N/A N/A c N/A -1 N/A 1 N/A N/A diff_borda_schulze 1 N/A diff_iro_borda diff_iro_schulze diff_borda_schulze N/A test_schulze N/A N/A N/A N/A N/A votes N/A N/A i N/A range 5 N/A N/A N/A N/A votes append ACBED N/A i N/A range 5 N/A N/A N/A N/A votes append ADECB N/A i N/A range 8 N/A N/A N/A N/A votes append BEDAC N/A i N/A range 3 N/A N/A N/A N/A votes append CABED N/A i N/A range 7 N/A N/A N/A N/A votes append CAEBD N/A i N/A range 2 N/A N/A N/A N/A votes append CBADE N/A i N/A range 7 N/A N/A N/A N/A votes append DCEBA N/A i N/A range 8 N/A N/A N/A N/A votes append EBADC N/A N/A N/A schulze votes N/A N/A 0 D N/A 1 B N/A 2 C N/A 3 A N/A 4 E N/A N/A N/A __name__ __main__ N/A N/A N/A test N/A N/A test_schulze N/A votes N/A makeup_votes 10 N/A N/A borda votes mode exponential N/A N/A iro votes N/A N/A schulze votes