How to use eg method in hypothesis

Best Python code snippet using hypothesis

Run299065DoubleEG_cff.py

Source:Run299065DoubleEG_cff.py Github

copy

Full Screen

1readFiles=[2 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/023A0510-2A69-E711-84FF-02163E01A45A.root',3 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/02FCA3E8-2C69-E711-8453-02163E013816.root',4 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/04319214-2269-E711-B3C9-02163E01A6C1.root',5 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/043A584F-2C69-E711-A536-02163E011F68.root',6 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/06848283-2269-E711-92AD-02163E014126.root',7 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/0C0E5A79-3369-E711-A1A7-02163E013940.root',8 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/0CA4272A-2469-E711-857A-02163E01A6C0.root',9 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/0CBD4BC9-2469-E711-806E-02163E01A737.root',10 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/0E0E4D75-3369-E711-AD00-02163E01A57E.root',11 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/0E1146FA-2A69-E711-89B5-02163E01A1F4.root',12 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/0E3F4255-2869-E711-8339-02163E0144F7.root',13 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/123AB4E5-2669-E711-8B48-02163E013816.root',14 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/14FFEE17-2F69-E711-967D-02163E011BAB.root',15 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/16C307A0-2269-E711-95EA-02163E01A382.root',16 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/1823E00E-2969-E711-819E-02163E01A778.root',17 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/18F9BE4C-2C69-E711-AFAF-02163E01A54A.root',18 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/18FC1F73-2E69-E711-8424-02163E01A3B2.root',19 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/1A4EB720-2769-E711-8959-02163E01A778.root',20 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/1CF68D14-2B69-E711-9D37-02163E01A57E.root',21 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/1EDBFB28-2B69-E711-8B55-02163E01A6B4.root',22 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/221DBBB7-2369-E711-90A0-02163E019DE5.root',23 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/2430632D-2369-E711-A0FE-02163E011DD8.root',24 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/244D5B76-3369-E711-B08C-02163E01A3FB.root',25 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/24EBA275-2669-E711-8FB5-02163E014491.root',26 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/26C5427A-2869-E711-9251-02163E013940.root',27 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/28A6EF8C-2669-E711-92AB-02163E01A70A.root',28 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/2A95FDD4-2569-E711-AA67-02163E01A5E2.root',29 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/2CDD5221-2B69-E711-AF0B-02163E01A6D4.root',30 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/2CF9BD73-3369-E711-9820-02163E019B95.root',31 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/2E572480-3369-E711-8CC7-02163E01A4EE.root',32 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/3018B3CF-2869-E711-B588-02163E019E5B.root',33 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/32497E71-2969-E711-B04B-02163E01419D.root',34 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/329C2A71-2569-E711-9B69-02163E01A625.root',35 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/3412550C-2E69-E711-A289-02163E013960.root',36 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/3494250E-2A69-E711-B154-02163E01A5E2.root',37 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/380E27BD-2369-E711-8F60-02163E01A40D.root',38 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/382A02C7-2769-E711-93D5-02163E019C1F.root',39 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/38DE84B8-2269-E711-A8B8-02163E013683.root',40 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/38E3FA72-3369-E711-B1B0-02163E01A3C0.root',41 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/3A37C5FA-2B69-E711-91F1-02163E019D9F.root',42 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/3C7B5920-2769-E711-BFB8-02163E01A3D6.root',43 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/3CA5B45C-2469-E711-97EE-02163E01A3FB.root',44 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/3EFF8340-2E69-E711-A253-02163E019CE6.root',45 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/428372AF-2A69-E711-A913-02163E013960.root',46 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/448D7BA7-2269-E711-B908-02163E014736.root',47 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/46376A6F-3369-E711-B7DE-02163E019CBC.root',48 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/465E3AEE-2B69-E711-9810-02163E01A3B2.root',49 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/46BFA1F2-2769-E711-9AC8-02163E013683.root',50 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/4866FA85-3369-E711-ACB6-02163E0135EF.root',51 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/48A7436A-2E69-E711-825B-02163E01A408.root',52 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/48DF3E7D-3369-E711-8BFF-02163E01240B.root',53 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/4A7A9BB6-2D69-E711-9C73-02163E019E5B.root',54 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/4ADAD129-2469-E711-B8D7-02163E01A1D9.root',55 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/4C9F32F5-2169-E711-8933-02163E01A1CE.root',56 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/4E5F14D2-2869-E711-9082-02163E01A3B2.root',57 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/50EC587C-2869-E711-8D80-02163E01A21E.root',58 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/52800275-2C69-E711-98DA-02163E01A50A.root',59 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/5283B6FF-2669-E711-AAFF-02163E019C43.root',60 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/528C20B3-2D69-E711-92AC-02163E01A5AB.root',61 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/5488AFAB-3469-E711-9154-02163E0138F7.root',62 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/563AA90F-2869-E711-B16D-02163E014772.root',63 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/568294E2-3569-E711-B2B6-02163E011DF9.root',64 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/56A6F6C8-2369-E711-8D7B-02163E01A35D.root',65 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/56DB2977-2B69-E711-8F29-02163E01A5AC.root',66 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/582DA012-2A69-E711-A191-02163E01A6D1.root',67 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/58974CE3-2969-E711-9451-02163E011C1F.root',68 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/5A5F367D-2C69-E711-A205-02163E0138F7.root',69 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/5E0F6089-3369-E711-8754-02163E01A302.root',70 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/623355B8-2369-E711-857B-02163E01A1B7.root',71 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/627B4686-2B69-E711-9EB7-02163E01A212.root',72 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/62E0968F-2669-E711-AA7F-02163E01A793.root',73 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/666C8DC8-3469-E711-A824-02163E01A45A.root',74 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/685AE582-2D69-E711-AE9C-02163E019C1F.root',75 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/68647C18-2E69-E711-BCA5-02163E01A5AC.root',76 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/6ACD67A7-2A69-E711-8AB6-02163E01A456.root',77 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/6ACE1A82-2869-E711-A3AF-02163E0135FC.root',78 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/6C9AF672-3369-E711-9741-02163E01A3C0.root',79 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/6CF8A074-3369-E711-B1E1-02163E013940.root',80 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/6E819B9D-2569-E711-AD8E-02163E019DCA.root',81 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/701614AD-3369-E711-B7AA-02163E01244B.root',82 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/76AA2CEE-2B69-E711-8451-02163E01A6F2.root',83 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/7A6A3E1B-2969-E711-83B5-02163E013623.root',84 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/7CC6F141-2D69-E711-A921-02163E01A532.root',85 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/7E713D75-3369-E711-B8B2-02163E019BD7.root',86 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/8254E365-2969-E711-A4C8-02163E011E55.root',87 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/84632671-3369-E711-B806-02163E01A456.root',88 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/88BDC573-3369-E711-9957-02163E01A3EF.root',89 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/88D94C80-3369-E711-B3D2-02163E014172.root',90 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/8A76FCD5-2569-E711-86F1-02163E019C9A.root',91 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/8AE878A5-2669-E711-993D-02163E0141D8.root',92 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/90609E72-3369-E711-A118-02163E019E5B.root',93 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/90625875-3369-E711-807C-02163E01A50A.root',94 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/920C67C4-2969-E711-AAC5-02163E0118ED.root',95 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/92EEB75D-2669-E711-A614-02163E019C43.root',96 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/9447EDB5-2469-E711-9278-02163E011807.root',97 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/949E6428-2569-E711-86C9-02163E01A252.root',98 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/96AB2E78-3369-E711-A19C-02163E01A212.root',99 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/9A089BF8-2169-E711-99D2-02163E01A409.root',100 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/9AF8CC15-2969-E711-BF07-02163E019E36.root',101 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/9CE045F5-2269-E711-8AE1-02163E014106.root',102 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/9E431A28-2569-E711-A949-02163E01A5AB.root',103 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/A05EC073-2569-E711-86D3-02163E019CA1.root',104 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/A0A61875-2E69-E711-9648-02163E01A505.root',105 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/A4310F77-3369-E711-8AC4-02163E01A678.root',106 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/A661D079-3369-E711-9D3C-02163E01373E.root',107 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/A83B07D6-2869-E711-9B57-02163E011A9D.root',108 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/A8959F2D-2569-E711-B962-02163E01A689.root',109 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/AA4708B9-2C69-E711-8935-02163E01A426.root',110 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/AA96EE72-3369-E711-B2A1-02163E019C9A.root',111 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/B0EB7A13-2E69-E711-9144-02163E0144F7.root',112 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/B60D7041-2E69-E711-9258-02163E01A3A5.root',113 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/B856DB7B-3369-E711-9993-02163E014106.root',114 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/BA0FB495-2169-E711-BA90-02163E019E8E.root',115 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/BA5B0B12-2A69-E711-AC60-02163E01A678.root',116 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/BE927427-2569-E711-8B16-02163E01A58F.root',117 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/C0562480-3369-E711-B1D0-02163E01A4EE.root',118 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/C0956271-3369-E711-9D9E-02163E01A456.root',119 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/C0BB131D-3869-E711-AD51-02163E019E36.root',120 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/C0ED1EE9-2969-E711-8CD4-02163E013816.root',121 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/C4EA44EF-2469-E711-AC2B-02163E01A508.root',122 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/C6875261-2469-E711-8E9E-02163E019BD7.root',123 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/C8C68682-3369-E711-A7B7-02163E014491.root',124 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/CA58DB7B-3369-E711-B946-02163E014106.root',125 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/CAA1FA72-3369-E711-B136-02163E019C9A.root',126 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/CEC95041-2E69-E711-AE59-02163E01A408.root',127 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/CEDAA709-2669-E711-8A3D-02163E011E55.root',128 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/D0407E8B-3369-E711-8D5A-02163E01240B.root',129 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/D281F680-2D69-E711-ABB0-02163E0144D8.root',130 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/D4745973-3369-E711-AB49-02163E019BEF.root',131 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/D496A96F-3369-E711-AED2-02163E019CBC.root',132 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/D6FBEDEF-2A69-E711-930C-02163E014407.root',133 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/DAC868F7-2769-E711-A4A3-02163E019C9A.root',134 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/DC140C1D-3469-E711-B743-02163E019D9F.root',135 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/DC5632F3-2769-E711-BBA4-02163E013595.root',136 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/E07679A9-2969-E711-9202-02163E01A74B.root',137 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/E0792370-3369-E711-97D7-02163E01A3DB.root',138 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/E26C8741-2C69-E711-8C1D-02163E01A45A.root',139 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/E2AFF714-2369-E711-810C-02163E014106.root',140 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/E47CD159-2669-E711-8FD5-02163E01A3A5.root',141 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/E4C82AEA-2269-E711-9D7A-02163E019BA5.root',142 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/E69FDDA2-2969-E711-A2D6-02163E019CAF.root',143 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/E80EA6EC-2369-E711-8B69-02163E011C32.root',144 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/E8F951A7-2769-E711-88BA-02163E01A4EE.root',145 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/EE42C573-2569-E711-9413-02163E019CAC.root',146 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/EE963464-2669-E711-A574-02163E014485.root',147 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/F2EA03FC-2A69-E711-A39A-02163E01A408.root',148 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/F6A164E3-2769-E711-8E21-02163E01A45F.root',149 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/FA063A6E-2269-E711-B65D-02163E0123FD.root',150 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/FA72A6B7-2369-E711-90EB-02163E01A300.root',151 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/FAA0B233-2269-E711-A1CF-02163E011EE8.root',152 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/FAEC2C7C-3669-E711-9BD1-02163E019DE0.root',153 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/FCBBC88E-2569-E711-87FD-02163E019CA9.root',154 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/FE61CB08-2469-E711-9D1A-02163E01A1F4.root',155 '/store/data/Run2017B/DoubleEG/RAW/v1/000/299/065/00000/FE7A6F20-2769-E711-8828-02163E019C78.root'...

Full Screen

Full Screen

conditional_dump1.py

Source:conditional_dump1.py Github

copy

Full Screen

1#!/usr/bin/env python32# -*- coding: utf-8 -*-3"""4Created on Mon Sep 7 09:32:53 20205scripts for dumping VTD assignments to a file when certain conditions are met6eg_gt... dumps to a file when the efficiency gap > hi_eg. This dumps out a map that's apportioned favorably7for dems'8eg_zero dumps to a file when the abs value of efficiency gap < zero_eg, that is, a fair map9eg_lt dumps to a file when efficiency gap < lo_eg, that is favorable to republicans10 11eg_gt_x does the same thing but for partitions returned by chain_xtended, which has a little diff structure12@author: dpg13"""14from gerrychain.metrics import mean_median, efficiency_gap15import district_list as dl16def eg_gt_x(part,hi_eg, state, my_apportionment,my_electionproxy, i1):17 if efficiency_gap(part.state[my_electionproxy]) > hi_eg:18 eg_val = round(efficiency_gap(part.state[my_electionproxy]),3)19 fname = 'redist_data/example_districts/' + state + '_' + my_apportionment + '_' + \20 my_electionproxy +'_gt_' + str(i1)+ '_' + str(eg_val)21 dl.part_dump(part.state, fname) #dump out the district assignment data + GEOID10 tags etc. to file22 return23 24 25 26 27def eg_zero_x(part,zero_eg, state, my_apportionment,my_electionproxy, i1):28 if abs(efficiency_gap(part.state[my_electionproxy])) < zero_eg:29 eg_val = round(efficiency_gap(part.state[my_electionproxy]),3)30 fname = 'redist_data/example_districts/' + state + '_' + my_apportionment + '_' + \31 my_electionproxy +'_eq_' + str(i1)+ '_' + str(eg_val)32 dl.part_dump(part.state, fname) #dump out the district assignment data + GEOID10 tags etc. to file33 return34 35 36def eg_lt_x(part,lo_eg, state, my_apportionment, my_electionproxy,i1):37 if efficiency_gap(part.state[my_electionproxy]) < lo_eg:38 eg_val = round(efficiency_gap(part.state[my_electionproxy]),3)39 fname = 'redist_data/example_districts/' + state + '_' + my_apportionment + '_' + \40 my_electionproxy +'_lt_' + str(i1)+ '_' + str(eg_val)41 dl.part_dump(part.state, fname) #dump out the district assignment data + GEOID10 tags etc. to file42 return43 44def eg_gt(part,hi_eg, state, my_apportionment,my_electionproxy, i1):45 if efficiency_gap(part[my_electionproxy]) > hi_eg:46 eg_val = round(efficiency_gap(part[my_electionproxy]),3)47 fname = 'redist_data/example_districts/' + state + '_' + my_apportionment + '_' + \48 my_electionproxy +'_gt_' + str(i1)+ '_' + str(eg_val)49 dl.part_dump(part, fname) #dump out the district assignment data + GEOID10 tags etc. to file50 return51 52 53 54 55def eg_zero(part,zero_eg, state, my_apportionment,my_electionproxy, i1):56 if abs(efficiency_gap(part[my_electionproxy])) < zero_eg:57 eg_val = round(efficiency_gap(part[my_electionproxy]),3)58 fname = 'redist_data/example_districts/' + state + '_' + my_apportionment + '_' + \59 my_electionproxy +'_eq_' + str(i1)+ '_' + str(eg_val)60 dl.part_dump(part, fname) #dump out the district assignment data + GEOID10 tags etc. to file61 return62 63 64def eg_lt(part,lo_eg, state, my_apportionment, my_electionproxy,i1):65 if efficiency_gap(part[my_electionproxy]) < lo_eg:66 eg_val = round(efficiency_gap(part[my_electionproxy]),3)67 fname = 'redist_data/example_districts/' + state + '_' + my_apportionment + '_' + \68 my_electionproxy +'_lt_' + str(i1)+ '_' + str(eg_val)69 dl.part_dump(part, fname) #dump out the district assignment data + GEOID10 tags etc. to file70 return...

Full Screen

Full Screen

airspace_particularities.py

Source:airspace_particularities.py Github

copy

Full Screen

1#NAS airports origin/destination2dict_airport_nas_icao ={"GMMH":"GC", "GMML":"GC", "GMMA":"GC","LXGB":"LE","GABS":"GO","GAKA":"GO","GAKD":"GO",3 "GANK":"GO","GANR":"GO","GASO":"GO","GAYE":"GO","DIDL":"GO","DIGA":"GO","DIGL":"GO",4 "DIKO":"GO","DIMN":"GO","DIOD":"GO","DISG":"GO","DISP":"GO","DISS":"GO","DITB":"GO",5 "DITM":"GO","DIYO":"GO","DIBI":"GO","DIBK":"GO","DIAP":"GO","GAGM":"DR","GAGO":"DR",6 "GAMB":"DR","GATB":"DR","EGJJ":"LF","EGJA":"LF","EGJB":"LF","ENVH":"EG","ENLE":"EG",7 "ENXK":"EG","ENWV":"EG","ENXA":"EG","ENXB":"EG","ENXC":"EG","ENXD":"EG","ENXE":"EG",8 "ENXF":"EG","ENXG":"EG","ENXH":"EG","ENXI":"EG","ENXJ":"EG","ENXK":"EG","ENXL":"EG",9 "ENXM":"EG","ENXR":"EG","ENXS":"EG","ENXT":"EG","ENXV":"EG","ENXZ":"EG","ENSL":"EG",10 "EHFE":"EG","ENWG":"EG","EHFD":"EG","EHFZ":"EG","EHJA":"EG","EHJM":"EG","EHAK":"EG",11 "EKAR":"EG","EKSI":"EG","ENDP":"EG","ENLA":"EG","ENXP":"EG","GEML":"GM","BKPR":"LY",12 "VHHH":"Z","FHAW":"S","LICD":"LM","WSSS":"V","WMKK":"V","WIII":"V","WMSA":"V",13 "WBSB":"V","EKFA":"BI","EKKU":"BI","EKKV":"BI","EKMS":"BI","EKSR":"BI","EKSY":"BI",14 "EKTB":"BI","EKSO":"BI","EKVG":"BI","EKRN":"ES","GEHM":"GM", "EHJF":"EG", "EHKF":"EG",15 "EHDT":"EG","EHFB":"EG","GECE":"LE","OASN":"UT"}16dict_airport_nas_2_letter = {"DB":"DG","DX":"DG","ET":"ED","GQ":"GO","GG":"GO","GB":"GO","GF":"GL","GU":"GL",17"EL":"EB","TX":"K","DF":"DR","HD":"HA","UA":"UA","PA":"K","OI":"OI","OJ":"OJ","OL":"OL","OM":"OM","OR":"OR","OS":"OS",18"UB":"UB","UC":"UC","UD":"UD","UG":"UG","UK":"UK","UM":"UM","UT":"UT"}19dict_airport_nas_1_letter = {"R":"Z","F":"F","O":"O","U":"U","Z":"Z","C":"C","K":"K","M":"M","N":"N",20 "S":"S","T":"T","V":"V","Y":"Y"}21ECAC_countries = ['LO','EB','LB','LD','LC','LK','EK','EE','EF','LF','LG','LH','EI','LI',22 'EV','EY','EL','LM','EH','EP','LP','LR','LZ','LJ','LE','ES','EG','LA',23 'LQ','LW','LU','EN','LS','LT','UB','BI','ED','ET','ET','UK','LF','LI',24 'LY','LY','GC','UD','GE']25def get_nas_airport(airport_icao):26 return dict_airport_nas_icao.get(airport_icao,27 dict_airport_nas_2_letter.get(airport_icao[:2],28 dict_airport_nas_1_letter.get(airport_icao[:1],29 airport_icao[:2])))30def is_ECAC(icao):31 if len(icao)==4:32 icao = get_nas_airport(icao)33 return icao in ECAC_countries34def is_ATFM_AREA(icao):35 additional_countries = ['GM', 'DA', 'DT', 'HE', 'LL', 'OL', 'UM']36 if icao in ['UMKK']:37 pouet = False38 else:39 if len(icao)==4:40 icao = get_nas_airport(icao)41 pouet = (is_ECAC(icao) or icao in additional_countries) and not icao in ['UB'] 42 ...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run hypothesis automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful