Search is not available for this dataset
id
int64
0
10.8M
vector
listlengths
1.54k
1.54k
ast_depth
int64
3
164
ast_data
stringlengths
297
510k
full_path
stringlengths
0
319
code
stringlengths
60
56.5k
13,901
[ -0.014153002761304379, 0.0466216579079628, 0.09271750599145889, 0.05367625132203102, -0.030277786776423454, 0.005718163680285215, 0.03209620714187622, -0.0028755133971571922, 0.024581531062722206, 0.04276572912931442, -0.00896612461656332, -0.03560159355401993, 0.02063797041773796, 0.02061...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_polygon_boundary_attachment(self): # Check the polygon is attached to the boundary even when no # intermediate point for one of the crossing segments would normally # exist. polygon = sgeom.Polygon([(-10, 30), (10, 60), (10, 50)]) projection = ccrs.Robinson(170.6) ...
13,902
[ -0.047588858753442764, 0.00516974413767457, 0.11667297035455704, 0.00874094944447279, -0.027780573815107346, 0.02163129858672619, 0.01348895113915205, -0.019196076318621635, 0.009761293418705463, 0.02474674955010414, 0.021331997588276863, -0.029086614027619362, -0.013121627271175385, 0.007...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestMisc(unittest.TestCase): def test_misc(self): projection = ccrs.TransverseMercator(central_longitude=-90) polygon = sgeom.Polygon([(-10, 30), (10, 60), (10, 50)]) multi_polygon = projection.project_geometry(polygon) def test_small(self): projection = ccrs.Mercator() ...
13,903
[ -0.0043675340712070465, 0.01757328025996685, 0.07318117469549179, 0.047317638993263245, -0.007929249666631222, 0.013924536295235157, 0.01302202045917511, -0.04705977812409401, 0.033109452575445175, 0.08473338186740875, 0.03579121455550194, -0.037106312811374664, -0.000288482871837914, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_out_of_bounds(self): # Check that a polygon that is completely out of the map boundary # doesn't produce an empty result. projection = ccrs.TransverseMercator(central_longitude=0) polys = [ # All valid ([(86, -1), (86, 1), (88, 1), (88, -1)], 1), ...
13,904
[ 0.004890273790806532, -0.004822308197617531, 0.02967176027595997, 0.013243547640740871, -0.017968762665987015, 0.02848074771463871, 0.02905036136507988, -0.026797793805599213, 0.0408051423728466, 0.04290236160159111, 0.047511063516139984, -0.023677857592701912, -0.020078927278518677, -0.04...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_former_infloop_case(self): # test a polygon which used to get stuck in an infinite loop # see https://github.com/SciTools/cartopy/issues/60 coords = [(260.625, 68.90383337092122), (360.0, 79.8556091996901), (360.0, 77.76848175458498), (0.0, 88.79068047337279), ...
13,905
[ -0.029763666912913322, -0.010572967119514942, 0.11375898867845535, 0.02207758091390133, -0.01795872114598751, 0.015666378661990166, 0.013423070311546326, -0.012289158068597317, 0.015053452923893929, 0.05251546576619148, 0.004109666217118502, -0.04444936662912369, 0.017149658873677254, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_small(self): projection = ccrs.Mercator() polygon = sgeom.Polygon([ (-179.7933201090486079, -16.0208822567412312), (-180.0000000000000000, -16.0671326636424396), (-179.9173693847652942, -16.5017831356493616), ]) multi_polygon = projection.proj...
13,906
[ -0.024139588698744774, 0.01267328392714262, 0.1006138026714325, 0.013119866140186787, -0.03186425566673279, -0.006909957155585289, 0.020385881885886192, -0.02212393283843994, 0.03543691709637642, 0.026601826772093773, 0.01550968550145626, -0.035412777215242386, 0.017199456691741943, -0.005...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_3pt_poly(self): projection = ccrs.OSGB() polygon = sgeom.Polygon([(-1000, -1000), (-1000, 200000), (200000, -1000)]) multi_polygon = projection.project_geometry(polygon, ccrs.OSGB()) self.assertEqual(len(multi_pol...
13,907
[ -0.008019051514565945, 0.002370834816247225, 0.05812948942184448, -0.016563035547733307, -0.0193534716963768, 0.01287468709051609, 0.04652569442987442, -0.042989298701286316, 0.0010757684940472245, 0.04586261883378029, 0.011541632004082203, -0.028539810329675674, -0.01252242922782898, 0.00...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_project_previous_infinite_loop(self): mstring1 = shapely.wkt.loads( 'MULTILINESTRING (' '(-179.9999990464349651 -80.2000000000000171, ' '-179.5000000001111005 -80.2000000000000171, ' '-179.5000000001111005 -79.9000000000000199, ' '-179.9999995...
13,908
[ -0.03677225112915039, -0.018887342885136604, 0.10464444011449814, 0.023948417976498604, -0.005632584448903799, 0.020085375756025314, 0.011081797070801258, -0.00015806306328158826, -0.007292103487998247, 0.03933946415781975, -0.0009993788553401828, -0.022285841405391693, 0.011748049408197403,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_self_intersecting_1(self): # Geometry comes from a matplotlib contourf (see #537) wkt = ('POLYGON ((366.22000122 -9.71489298, ' '366.73212393 -9.679999349999999, ' '366.77412634 -8.767753000000001, ' '366.17762962 -9.679999349999999, ' ...
13,909
[ -0.02966032736003399, -0.024587776511907578, 0.09759961813688278, 0.01859935000538826, -0.0008168038330040872, 0.031210273504257202, 0.01197685394436121, 0.0011485157301649451, -0.0026522274129092693, 0.03813806176185608, 0.00206806231290102, -0.01033297274261713, 0.019045546650886536, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_self_intersecting_2(self): # Geometry comes from a matplotlib contourf (see #509) wkt = ('POLYGON ((343 20, 345 23, 342 25, 343 22, ' '340 25, 341 25, 340 25, 343 20), (343 21, ' '343 22, 344 23, 343 21))') geom = shapely.wkt.loads(wkt) source = tar...
13,910
[ 0.006937858648598194, 0.010335508733987808, 0.06576710194349289, 0.0006630466668866575, -0.021906526759266853, 0.03207571804523468, 0.017784202471375465, -0.02097989432513714, -0.005111324600875378, 0.041840989142656326, -0.006171605549752712, -0.055645428597927094, -0.006266644690185785, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestQuality(unittest.TestCase): def setUp(self): projection = ccrs.RotatedPole(pole_longitude=177.5, pole_latitude=37.5) polygon = sgeom.Polygon([ (177.5, -57.38460319), (180.0, -57.445077), (175.0, -57.19913331), ...
13,911
[ -0.011560832150280476, 0.006430551875382662, 0.13090260326862335, 0.024524927139282227, -0.04801993817090988, 0.006453081499785185, 0.018551401793956757, -0.01758585311472416, -0.010563098825514317, 0.020019035786390305, -0.014187123626470566, -0.02737007662653923, -0.01808793842792511, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_tiny_point_between_boundary_points(self): # Geometry comes from #259. target = ccrs.Orthographic(0, -75) source = ccrs.PlateCarree() wkt = 'POLYGON ((132 -40, 133 -6, 125.3 1, 115 -6, 132 -40))' geom = shapely.wkt.loads(wkt) target = ccrs.Orthographic(central_la...
13,912
[ 0.0056136357598006725, 0.02474675513803959, 0.07832290977239609, 0.028875015676021576, -0.03742804005742073, 0.03626482933759689, 0.008461793884634972, -0.026708249002695084, 0.006682764273136854, 0.04290197789669037, -0.020139524713158607, -0.044863469898700714, 0.007053395267575979, 0.01...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_repeats(self): # Make sure we don't have repeated points at the boundary, because # they mess up the linear extrapolation to the boundary. # Make sure there aren't any repeated points. xy = np.array(self.multi_polygon[0].exterior.coords) same = (xy[1:] == xy[:-1]).all(a...
13,913
[ -0.002292337827384472, 0.0010291687212884426, 0.09378507733345032, 0.031916506588459015, -0.034250736236572266, 0.028750279918313026, 0.046499647200107574, -0.013820472173392773, -0.013335137628018856, 0.004472008906304836, -0.003059339476749301, -0.033580511808395386, 0.02727116458117962, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): projection = ccrs.RotatedPole(pole_longitude=177.5, pole_latitude=37.5) polygon = sgeom.Polygon([ (177.5, -57.38460319), (180.0, -57.445077), (175.0, -57.19913331), ]) self.multi_polygon = projecti...
13,914
[ -0.006107765715569258, -0.0016366441268473864, 0.06655685603618622, 0.039113420993089676, -0.008983752690255642, 0.014397723600268364, 0.02488173358142376, -0.015441381372511387, 0.033230990171432495, 0.0654657632112503, -0.016579916700720787, -0.04511445015668869, 0.0029352856799960136, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_symmetry(self): # Make sure the number of points added on the way towards the # boundary is similar to the number of points added on the way away # from the boundary. # Identify all the contiguous sets of non-boundary points. xy = np.array(self.multi_polygon[0].exterior...
13,915
[ -0.023210419341921806, 0.010911894962191582, 0.06600853055715561, 0.02317294292151928, -0.026258504018187523, 0.016889389604330063, 0.018051160499453545, -0.058912988752126694, 0.004950015340000391, 0.032129816710948944, 0.007170495111495256, -0.024409664794802666, 0.035802509635686874, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestWrap(PolygonTests): # Test that Plate Carree projection "does the right thing"(tm) with # source data tha extends outside the [-180, 180] range. def test_plate_carree_no_wrap(self): proj = ccrs.PlateCarree() poly = sgeom.box(0, 0, 10, 10) multi_polygon = proj.project_geomet...
13,916
[ -0.01176483929157257, 0.008205119520425797, 0.0818011611700058, 0.02255585417151451, -0.047796301543712616, -0.0008849948644638062, 0.030820192769169807, -0.0547446645796299, 0.01521269977092743, 0.02376655302941799, 0.008849948644638062, -0.037479039281606674, 0.028872545808553696, 0.0215...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_plate_carree_partial_wrap(self): proj = ccrs.PlateCarree() poly = sgeom.box(170, 0, 190, 10) multi_polygon = proj.project_geometry(poly, proj) # Check the structure self.assertEqual(len(multi_polygon), 2) # Check the rough shape polygon = multi_polygon[0]...
13,917
[ -0.004588766023516655, 0.024208704009652138, 0.0757770836353302, 0.01995616964995861, -0.04449790343642235, 0.0005339684430509806, 0.03745304420590401, -0.05569282919168472, 0.014807016588747501, 0.027359677478671074, 0.02046852372586727, -0.033584773540496826, 0.03317489102482796, 0.02456...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_plate_carree_no_wrap(self): proj = ccrs.PlateCarree() poly = sgeom.box(0, 0, 10, 10) multi_polygon = proj.project_geometry(poly, proj) # Check the structure self.assertEqual(len(multi_polygon), 1) # Check the rough shape polygon = multi_polygon[0] ...
13,918
[ -0.0571027547121048, 0.02704058773815632, 0.0889061763882637, 0.030958399176597595, -0.017489319667220116, 0.024377498775720596, 0.02801363915205002, -0.029447609558701515, 0.024275071918964386, 0.027808785438537598, 0.029037903994321823, -0.039587829262018204, 0.026682093739509583, -0.009...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestHoles(PolygonTests): def test_simple(self): proj = ccrs.PlateCarree() poly = sgeom.Polygon(ring(-40, -40, 40, 40, True), [ring(-20, -20, 20, 20, False)]) multi_polygon = proj.project_geometry(poly) # Check the structure self.assertEqual(...
13,919
[ -0.008731728419661522, 0.013438422232866287, 0.08070843666791916, 0.02130671590566635, -0.04778105765581131, 0.003273586742579937, 0.030356552451848984, -0.053805626928806305, 0.019099438562989235, 0.020904213190078735, 0.019099438562989235, -0.040094539523124695, 0.03207043930888176, 0.01...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_plate_carree_wrap(self): proj = ccrs.PlateCarree() poly = sgeom.box(200, 0, 220, 10) multi_polygon = proj.project_geometry(poly, proj) # Check the structure self.assertEqual(len(multi_polygon), 1) # Check the rough shape polygon = multi_polygon[0] ...
13,920
[ -0.025111164897680283, 0.013874146156013012, 0.09571602195501328, 0.033464230597019196, -0.03354217857122421, 0.004312936682254076, 0.028683627024292946, -0.03962185978889465, 0.02364320680499077, 0.030242521315813065, 0.02277282625436783, -0.045519668608903885, 0.020759256556630135, 0.001...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_simple(self): proj = ccrs.PlateCarree() poly = sgeom.Polygon(ring(-40, -40, 40, 40, True), [ring(-20, -20, 20, 20, False)]) multi_polygon = proj.project_geometry(poly) # Check the structure self.assertEqual(len(multi_polygon), 1) self...
13,921
[ -0.027527358382940292, 0.016585683450102806, 0.07142233848571777, 0.04097035527229309, -0.0270655769854784, -0.0005908569437451661, 0.03696824237704277, -0.03309440240263939, 0.03766091540455818, 0.020228631794452667, 0.022742779925465584, -0.04276617616415024, 0.022973671555519104, 0.0086...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_wrapped_poly_simple_hole(self): proj = ccrs.PlateCarree(-150) poly = sgeom.Polygon(ring(-40, -40, 40, 40, True), [ring(-20, -20, 20, 20, False)]) multi_polygon = proj.project_geometry(poly) # Check the structure self.assertEqual(len(multi_pol...
13,922
[ -0.033646732568740845, 0.013540465384721756, 0.051660601049661636, 0.04172772169113159, -0.031169524416327477, 0.002770323771983385, 0.04396442323923111, -0.02001006528735161, 0.03742267191410065, 0.009740476496517658, 0.04490239545702934, -0.021032214164733887, -0.0005103228031657636, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_inverted_poly_simple_hole(self): proj = ccrs.NorthPolarStereo() poly = sgeom.Polygon([(0, 0), (-90, 0), (-180, 0), (-270, 0)], [[(0, -30), (90, -30), (180, -30), (270, -30)]]) multi_polygon = proj.project_geometry(poly) # Check the structure ...
13,923
[ -0.02313956990838051, 0.020109692588448524, 0.07823987305164337, 0.04722517728805542, -0.0277674850076437, 0.0037713665515184402, 0.033111318945884705, -0.041548952460289, 0.03346927836537361, 0.020736124366521835, 0.016095425933599472, -0.040193818509578705, 0.024354077875614166, 0.004685...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_wrapped_poly_wrapped_hole(self): proj = ccrs.PlateCarree(-180) poly = sgeom.Polygon(ring(-40, -40, 40, 40, True), [ring(-20, -20, 20, 20, False)]) multi_polygon = proj.project_geometry(poly) # Check the structure self.assertEqual(len(multi_po...
13,924
[ -0.023115456104278564, 0.02229434810578823, 0.06165780499577522, 0.04329482838511467, -0.03217253461480141, 0.014008613303303719, 0.025653429329395294, -0.025217993184924126, 0.033715225756168365, 0.014444050379097462, 0.04220001399517059, -0.02398633025586605, -0.0049733067862689495, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_inverted_poly_removed_hole(self): proj = ccrs.NorthPolarStereo(globe=ccrs.Globe(ellipse='WGS84')) poly = sgeom.Polygon([(0, 0), (-90, 0), (-180, 0), (-270, 0)], [[(-135, -75), (-45, -75), (45, -75), (135, -75)]]) multi_polygon ...
13,925
[ -0.028270337730646133, 0.026405541226267815, 0.04443192109465599, 0.04572485014796257, -0.04027963802218437, 0.02271324023604393, 0.03247234970331192, -0.025759076699614525, 0.026156900450587273, 0.015813486650586128, 0.058877889066934586, -0.030334047973155975, 0.007397032342851162, -0.01...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_inverted_poly_clipped_hole(self): proj = ccrs.NorthPolarStereo() poly = sgeom.Polygon([(0, 0), (-90, 0), (-180, 0), (-270, 0)], [[(-135, -60), (-45, -60), (45, -60), (135, -60)]]) multi_polygon = proj.project_geometry(poly) ...
13,926
[ 0.03939329832792282, 0.0259828120470047, 0.021257713437080383, -0.03998000547289848, -0.009230184368789196, -0.016595473513007164, 0.009497346356511116, -0.008276782929897308, 0.01901564747095108, -0.008921114727854729, 0.061478689312934875, -0.031996577978134155, 0.007443866226822138, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ps", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "remote", "annotation": null, "type_comment": null}}, {"_type": "arg...
def repository_has_staged(ps, remote="origin", branch="master"): if not hasattr(ps, "__iter__"): ps = (ps,) changed = [] # repo = GitRepoManager() for p in ps: pp = repository_path(p) repo = Repo(pp) if repo.git.log("{}/{}..HEAD".format(remote, branch), "--oneline"): ...
13,927
[ -0.03129488229751587, 0.006419213488698006, 0.11324284225702286, 0.004424359183758497, -0.025624955072999, 0.020084775984287262, 0.01685408502817154, -0.022212618961930275, 0.02901134267449379, 0.02748033218085766, 0.004764944314956665, -0.05239168182015419, 0.013046021573245525, -0.027298...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_multiple_interiors(self): exterior = ring(0, 0, 12, 12, True) interiors = [ring(1, 1, 2, 2, False), ring(1, 8, 2, 9, False)] poly = sgeom.Polygon(exterior, interiors) target = ccrs.PlateCarree() source = ccrs.Geodetic() assert len(list(target.project_geometry(...
13,928
[ 0.0064240419305861, 0.01917695440351963, -0.012455503456294537, -0.030811607837677002, -0.005731078330427408, -0.025838924571871758, 0.010290363803505898, -0.016000622883439064, 0.00797651894390583, -0.01318118255585432, 0.01154543086886406, -0.03480879217386246, 0.02191312052309513, -0.05...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "obj", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "date", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def make_rsd_items(obj, date, tag): items = [ RSDItem( process="{} {}".format(k, tag), date=date, status=iso.get("reviewed", False) ) for k, iso in obj.items() ] return items
13,929
[ 0.02622104622423649, 0.020262638106942177, 0.045927297323942184, -0.0009408014011569321, 0.029660535976290703, -0.0058977119624614716, 0.019675901159644127, -0.017844878137111664, -0.021891336888074875, -0.001996674109250307, 0.039230406284332275, -0.008269947953522205, 0.015417004004120827,...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ps", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "host", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def push_repositories(ps, host=None, remote="origin", branch="master", quiet=True): for p in ps: pp = repository_path(p) repo = GitRepoManager() repo.open_repo(pp) if host is not None: remote = host.default_remote_name if repo.smart_pull(remote=remote, branch=b...
13,930
[ 0.011492160148918629, 0.01031347643584013, 0.01647750847041607, -0.03232959285378456, -0.0276629701256752, -0.01881081983447075, 0.01765619032084942, -0.017018739134073257, -0.03254608437418938, 0.009032560512423515, 0.042023658752441406, -0.02872137911617756, 0.03961818292737007, -0.02655...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "idn", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "repositories", "annotation": null, "type_comment": null}}, {"_type...
def find_interpreted_age_path(idn, repositories, prefixlen=3): prefix = idn[:prefixlen] suffix = "{}*.ia.json".format(idn[prefixlen:]) # ret = [] # for e in repositories: # pathname = os.path.join(paths.repository_dataset_dir, # e, prefix, 'ia', suffix) # ...
13,931
[ 0.028863700106739998, 0.04260242357850075, 0.005415038205683231, -0.020632842555642128, 0.00777290016412735, 0.014456604607403278, 0.040869612246751785, 0.0028869889210909605, 0.046810682862997055, 0.01251956820487976, 0.028962718322873116, -0.028492383658885956, -0.02420986071228981, 0.00...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "record", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def get_review_status(record): ms = 0 ritems = [] root = repository_path(record.repository_identifier) if os.path.isdir(root): repo = Repo(root) for m, func in ( ("blanks", is_blank_reviewed), ("intercepts", is_intercepts_reviewed), ("icfactors", is_ic...
13,932
[ -0.016356362029910088, -0.00011650656961137429, 0.01328887976706028, -0.006023514084517956, 0.020835520699620247, -0.018617169931530952, 0.0484003946185112, 0.008724807761609554, -0.010529208928346634, -0.06436403095722198, 0.0452161580324173, -0.017428386956453323, 0.016144078224897385, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "parent", "annotation":...
class GitSessionCTX(object): def __init__(self, parent, repository_identifier, message): self._parent = parent self._repository_id = repository_identifier self._message = message self._parent.get_repository(repository_identifier) def __enter__(self): pass def __exit...
13,933
[ 0.028656257316470146, -0.002954237163066864, 0.0338163860142231, -0.016419734805822372, -0.017071014270186424, -0.014941833913326263, 0.0022935650777071714, -0.02297009527683258, 0.002583196386694908, 0.008241179399192333, 0.034868452697992325, -0.06462687253952026, -0.008122195489704609, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ia", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}...
def make_interpreted_age_dict(ia): def ia_dict(keys): print(keys) return {attr: getattr(ia, attr) for attr in keys} # make general d = ia_dict(("name", "uuid")) # make analyses def analysis_factory(x): return dict( uuid=x.uuid, rundate=x.rundate.isof...
13,934
[ 0.06243046373128891, 0.045941196382045746, 0.045131031423807144, -0.03178711235523224, -0.000845164293423295, -0.005224381573498249, -0.008125491440296173, 0.00887608714401722, -0.014714050106704235, -0.02957107126712799, -0.04868146404623985, -0.07658454775810242, 0.025353441014885902, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "account.common.account.report"}}, "targets": [{"_type": "Name", "_fields": {"id": "_name", "ctx": {"_type": "Store", "_fields": {}}}}], "...
class AccountCommonAccountReport(models.TransientModel): _name = 'account.common.account.report' _description = 'Account Common Account Report' _inherit = "account.common.report" display_account = fields.Selection([('all','All'), ('movement','With movements'), ...
13,935
[ 0.029239093884825706, -0.002211813349276781, -0.003698718501254916, -0.026663141325116158, 0.0026585592422634363, -0.031990375369787216, -0.0023382508661597967, -0.035847559571266174, 0.04008237272500992, 0.021956292912364006, 0.0290233064442873, -0.03333904221653938, 0.006537661887705326, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "x", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},...
def analysis_factory(x): return dict( uuid=x.uuid, rundate=x.rundate.isoformat(), record_id=x.record_id, extract_value=x.extract_value, age=x.age, age_err=x.age_err, age_err_wo_j=x.age_err_wo_j, age_units=x.arar_cons...
13,936
[ -0.009334010072052479, 0.04139379784464836, 0.01750199683010578, -0.01624269224703312, -0.05097850412130356, 0.006972814444452524, -0.016394276171922684, 0.004838993307203054, 0.021886242553591728, 0.013898988254368305, -0.02290068194270134, 0.01164273452013731, 0.05606235936284065, -0.036...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "info", "annotation": null, "type_comment": null}}, {"_type": "arg...
def snapToVertex(self,info,active=False): p = Vector(info['x'],info['y'],info['z']) if active: if self.isEnabled("endpoint"): return [p,'endpoint',p] else: return [] elif self.isEnabled("passive"): return [p,'passive',p] ...
13,937
[ -0.0042458148673176765, 0.05479712039232254, 0.042018454521894455, -0.04133142903447151, -0.05776507034897804, 0.02585962414741516, 0.00508398562669754, -0.04941084235906601, -0.02489778958261013, 0.004534365609288216, 0.0043557388707995415, -0.01367866899818182, 0.052763525396585464, -0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def __init__(self): self.lastObj = [None,None] self.maxEdges = 0 self.radius = 0 self.constraintAxis = None self.basepoint = None self.affinity = None self.mask = None self.cursorMode = None if Draft.getParam("maxSnap",0): self.maxEdges...
13,938
[ 0.00730470847338438, 0.041428979486227036, 0.005603245925158262, 0.023113759234547615, -0.06551670283079147, 0.020512571558356285, -0.011432165279984474, -0.023826414719223976, -0.032164473086595535, 0.004596621263772249, 0.0025804031174629927, 0.006378257647156715, 0.028316138312220573, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "event_cb", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs"...
def move(event_cb): event = event_cb.getEvent() mousepos = event.getPosition() ctrl = event.wasCtrlDown() shift = event.wasShiftDown() self.pt = FreeCADGui.Snapper.snap(mousepos,lastpoint=last,active=ctrl,constrain=shift) if hasattr(FreeCAD,"DraftW...
13,939
[ 0.01598755456507206, 0.02370612695813179, 0.05214835703372955, -0.044135380536317825, -0.052634768187999725, -0.012953887693583965, 0.001080823945812881, -0.023821329697966576, -0.029312651604413986, -0.0048865084536373615, -0.016691571101546288, -0.008691392838954926, 0.03898966684937477, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setTrackers(self): v = Draft.get3DView() if v in self.trackers[0]: i = self.trackers[0].index(v) self.grid = self.trackers[1][i] self.tracker = self.trackers[2][i] self.extLine = self.trackers[3][i] self.radiusTracker = self.trackers[4][i] ...
13,940
[ 0.03686881437897682, 0.029088912531733513, -0.009632570669054985, 0.015019162558019161, -0.06635331362485886, 0.003688859287649393, -0.03299205005168915, -0.0059634908102452755, 0.008564482443034649, -0.025489062070846558, 0.0423806756734848, -0.030644893646240234, 0.022891366854310036, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def accept(): self.view.removeEventCallbackPivy(coin.SoMouseButtonEvent.getClassTypeId(),self.callbackClick) self.view.removeEventCallbackPivy(coin.SoLocation2Event.getClassTypeId(),self.callbackMove) obj = FreeCADGui.Snapper.lastSnappedObject FreeCADGui.Snapper.off() ...
13,941
[ -0.02463378570973873, -0.015381494536995888, 0.03850637376308441, -0.01025822851806879, 0.039910007268190384, -0.017440158873796463, -0.004243069794028997, 0.004374660551548004, 0.013650345616042614, 0.015018888749182224, 0.011264166794717312, -0.024914512410759926, 0.042272791266441345, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestInferredTuple(unittest.TestCase): def setUp(self): self.int = basics.InferredType.from_type(int) self.str = basics.InferredType.from_type(str) self.float = basics.InferredType.from_type(float) self.tuple = compound.InferredTuple(self.int, self.str, self.float) ...
13,942
[ -0.008756224997341633, 0.008069116622209549, 0.05539149045944214, -0.024172114208340645, 0.009038115851581097, -0.0323704294860363, -0.015821106731891632, 0.016044270247220993, -0.0015122252516448498, 0.03782031312584877, 0.007505335845053196, -0.012215256690979004, 0.04909593611955643, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestInferredList(unittest.TestCase): def setUp(self): self.int = basics.InferredType.from_type(int) self.str = basics.InferredType.from_type(str) self.float = basics.InferredType.from_type(float) def testCreation(self): lst = compound.InferredList(self.int,self.float) ...
13,943
[ 0.01695566065609455, 0.014399474486708641, 0.04063107445836067, -0.016587302088737488, 0.04545322433114052, 0.003100351896136999, 0.017078446224331856, 0.04172499105334282, -0.017402155324816704, 0.027146916836500168, -0.001936673535965383, -0.03696981444954872, 0.03004913590848446, -0.008...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestInferredDIct(unittest.TestCase): def setUp(self): self.int = basics.InferredType.from_type(int) self.str = basics.InferredType.from_type(str) self.float = basics.InferredType.from_type(float) self.dict = compound.InferredDict(keys = [self.int, self.float], values = [self.st...
13,944
[ -0.011883724480867386, -0.025471679866313934, -0.01695053093135357, -0.039826538413763046, 0.02988956682384014, -0.001932006562128663, -0.026900609955191612, 0.03728330135345459, 0.019008716568350792, 0.03521200641989708, 0.013161896727979183, -0.032406583428382874, 0.004965207539498806, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_index(self): api.nova.flavor_list(IsA(http.HttpRequest), None) \ .AndReturn(self.flavors.list()) self.mox.ReplayAll() res = self.client.get(INDEX_URL) self.assertTemplateUsed(res, 'admin/flavors/index.html') self.assertItemsEqual(res.context['table'].dat...
13,945
[ -0.013401216827332973, -0.012253892607986927, 0.011958190239965916, -0.04220259562134743, 0.009716768749058247, -0.0032231523655354977, -0.01063935924321413, -0.007830190472304821, 0.004435530863702297, 0.03922192007303238, 0.02371530421078205, -0.006682866252958775, 0.022863682359457016, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class FlavorsViewTests(test.BaseAdminViewTests): @test.create_stubs({api.nova: ('flavor_list',), }) def test_index(self): api.nova.flavor_list(IsA(http.HttpRequest), None) \ .AndReturn(self.flavors.list()) self.mox.ReplayAll() res = self.client.get(INDEX_URL) sel...
13,946
[ 0.0005639371811412275, 0.029483245685696602, -0.006480704993009567, -0.023264694958925247, 0.00838285032659769, -0.029312539845705032, -0.0013839323073625565, 0.007480550557374954, -0.01685105264186859, 0.031068366020917892, 0.02736162208020687, -0.018094763159751892, 0.022191690281033516, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "flavor", "annotation":...
class BaseFlavorWorkflowTests(test.BaseAdminViewTests): def _flavor_create_params(self, flavor, id=None): eph = getattr(flavor, 'OS-FLV-EXT-DATA:ephemeral') flavor_info = {"name": flavor.name, "vcpu": flavor.vcpus, "memory": flavor.ram, ...
13,947
[ 0.0009507149807177484, 0.06937507539987564, -0.04175397753715515, -0.005597363691776991, 0.022414248436689377, -0.02796822227537632, 0.010804213583469391, 0.03654712811112404, -0.020641440525650978, 0.01902979612350464, 0.05038246884942055, -0.026654111221432686, 0.017653699964284897, 0.01...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "flavor", "annotation": null, "type_comment": null}}, {"_type": "a...
def _get_workflow_fields(self, flavor, id=None, access=None): eph = getattr(flavor, 'OS-FLV-EXT-DATA:ephemeral') flavor_info = {"name": flavor.name, "vcpus": flavor.vcpus, "memory_mb": flavor.ram, "disk_gb": flavor.disk, ...
13,948
[ -0.0011625800980255008, 0.023014042526483536, 0.005213305354118347, -0.025461236014962196, 0.02432875707745552, -0.014253606088459492, -0.018926706165075302, 0.0027742465026676655, -0.004259810782968998, 0.05821198970079422, 0.02223302237689495, -0.01724751479923725, 0.004650320392102003, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class CreateFlavorWorkflowTests(BaseFlavorWorkflowTests): @test.create_stubs({api.keystone: ('tenant_list',), }) def test_workflow_get(self): projects = self.tenants.list() api.keystone.tenant_list(IsA(http.HttpRequest)).AndReturn([projects, ...
13,949
[ 0.0000068386716520763, 0.010405017994344234, 0.024164168164134026, -0.003600581083446741, 0.013103951700031757, -0.025678936392068863, -0.003868070198222995, 0.03657084330916405, -0.016542235389351845, 0.03508011996746063, -0.008439425379037857, -0.044264908879995346, 0.0011180435540154576, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_workflow_get(self): projects = self.tenants.list() api.keystone.tenant_list(IsA(http.HttpRequest)).AndReturn([projects, False]) self.mox.ReplayAll() url = reverse('horizon:admin:flavors:create') res = s...
13,950
[ -0.00704613933339715, 0.00633713323622942, 0.0030273927841335535, 0.0024611291009932756, 0.03285270184278488, -0.018296118825674057, 0.0059292977675795555, 0.03307858109474182, 0.0005070490879006684, 0.05591735616326332, 0.006788888946175575, -0.025072459131479263, -0.008759047836065292, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_create_flavor_with_projects_post(self): flavor = self.flavors.first() projects = self.tenants.list() # init api.keystone.tenant_list(IsA(http.HttpRequest)).AndReturn([projects, False]) api.nova.flavor_li...
13,951
[ -0.007457867730408907, 0.01051168143749237, -0.001179093960672617, -0.00045034289360046387, 0.03182528167963028, -0.025742894038558006, 0.0026389621198177338, 0.02546527422964573, 0.004833102226257324, 0.06501342356204987, 0.004587030038237572, -0.018247168511152267, -0.0013652251800522208, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_create_flavor_without_projects_post(self): flavor = self.flavors.first() projects = self.tenants.list() # init api.keystone.tenant_list(IsA(http.HttpRequest)).AndReturn([projects, False]) api.nova.flavor...
13,952
[ 0.0033427062444388866, 0.02565273828804493, 0.0029406952671706676, -0.0023693330585956573, 0.02983112260699272, 0.0019815664272755384, 0.008850574493408203, 0.02859026938676834, -0.0009939486626535654, 0.04808938875794411, 0.00942668505012989, -0.018587473779916763, 0.009103810414671898, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_create_existing_flavor_name_error(self): flavor = self.flavors.first() projects = self.tenants.list() # init api.keystone.tenant_list(IsA(http.HttpRequest)).AndReturn([projects, False]) # handle ...
13,953
[ 0.010607088916003704, 0.011047454550862312, -0.0038962860126048326, 0.002586355432868004, 0.028566382825374603, 0.0036090905778110027, 0.01683603972196579, 0.029868336394429207, -0.00931151770055294, 0.050852756947278976, 0.02123970538377762, -0.017116853967308998, 0.012821685522794724, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_create_existing_flavor_id_error(self): flavor = self.flavors.first() projects = self.tenants.list() # init api.keystone.tenant_list(IsA(http.HttpRequest)).AndReturn([projects, False]) # handle a...
13,954
[ 0.013878648169338703, 0.041326429694890976, 0.0007053071167320013, -0.009960189461708069, 0.04444634169340134, -0.02467452734708786, 0.009737338870763779, 0.018137574195861816, -0.02906963974237442, 0.05462319031357765, 0.013135812245309353, -0.0123682152479887, 0.02415454387664795, -0.002...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_create_flavor_missing_field_error(self): flavor = self.flavors.first() projects = self.tenants.list() # init api.keystone.tenant_list(IsA(http.HttpRequest)).AndReturn([projects, False]) api.nova.flavor_l...
13,955
[ -0.0011199357686564326, 0.016406090930104256, 0.010738982819020748, -0.00010937781917164102, 0.02772790566086769, -0.004609950352460146, 0.021713579073548317, 0.023139657452702522, -0.015364434570074081, 0.061457738280296326, 0.00561130465939641, -0.012909101322293282, -0.021564770489931107,...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_create_flavor_project_update_error(self): flavor = self.flavors.first() projects = self.tenants.list() # init api.keystone.tenant_list(IsA(http.HttpRequest)).AndReturn([projects, False]) api.nova.flavor_...
13,956
[ 0.000746135541703552, 0.019374625757336617, -0.010138812474906445, -0.01080942153930664, 0.0010905696544796228, 0.02616039291024208, 0.021419651806354523, 0.014514369890093803, -0.007907874882221222, 0.042600274085998535, 0.02234920859336853, -0.027063390240073204, -0.028072625398635864, 0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_flavor_get(self): flavor = self.flavors.list()[2] flavor_access = self.flavor_access.list() projects = self.tenants.list() # GET/init, set up expected behavior api.nova.flavor_get(IsA(http.HttpRequest), flavor.id) \ .MultipleTimes().AndReturn(flav...
13,957
[ -0.011322340928018093, 0.009855750948190689, -0.013084939680993557, -0.015123364515602589, 0.003289735410362482, 0.025241486728191376, 0.002240249188616872, -0.020357340574264526, -0.0007875351002439857, 0.0426521934568882, 0.025914235040545464, -0.029224153608083725, -0.032641708850860596, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class UpdateFlavorWorkflowTests(BaseFlavorWorkflowTests): @test.create_stubs({api.nova: ('flavor_get', 'flavor_access_list',), api.keystone: ('tenant_list',)}) def test_update_flavor_get(self): flavor = self.flavors.list()[2] flavor_acce...
13,958
[ -0.01630929671227932, 0.009912058711051941, -0.00406733900308609, -0.02873099036514759, 0.009093265049159527, 0.02630789577960968, 0.014751593582332134, 0.01164284162223339, -0.0012398394756019115, 0.05314834043383598, 0.019584471359848976, -0.02254011482000351, -0.03954172506928444, 0.015...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_flavor_without_extra_specs(self): # The first element has no extra specs flavor = self.flavors.first() projects = self.tenants.list() eph = getattr(flavor, 'OS-FLV-EXT-DATA:ephemeral') extra_specs = getattr(flavor, 'extra_specs') new_flavor = flavors.Flavo...
13,959
[ -0.005751370452344418, 0.0021009291522204876, -0.03388595208525658, -0.0032468903809785843, 0.020245317369699478, 0.024940062314271927, 0.009851571172475815, 0.03906126320362091, 0.0013693005312234163, 0.041131384670734406, 0.01564914919435978, -0.032333359122276306, -0.009980953298509121, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_flavor_get_flavor_error(self): flavor = self.flavors.first() api.nova.flavor_get(IsA(http.HttpRequest), flavor.id) \ .AndRaise(self.exceptions.nova) self.mox.ReplayAll() url = reverse('horizon:admin:flavors:update', args=[flavor.id]) res = self....
13,960
[ -0.008084497414529324, 0.009534177370369434, -0.0022368906065821648, -0.02861601859331131, 0.01202897634357214, 0.029317257925868034, 0.015548666007816792, 0.020659631118178368, -0.0010459612822160125, 0.05593743547797203, 0.015103647485375404, -0.018731219694018364, -0.04690222069621086, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_flavor_with_extra_specs(self): # The second element has extra specs flavor = self.flavors.list()[1] projects = self.tenants.list() eph = getattr(flavor, 'OS-FLV-EXT-DATA:ephemeral') extra_specs = getattr(flavor, 'extra_specs') new_flavor = flavors.Flavor(f...
13,961
[ -0.012537334114313126, 0.01814226061105728, -0.003156122984364629, -0.016412509605288506, 0.012973124161362648, 0.025584207847714424, 0.020931314677000046, 0.006141282618045807, -0.007039679680019617, 0.05814104899764061, 0.023975137621164322, -0.026898279786109924, -0.03290547430515289, 0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_flavor_update_flavor_error(self): # The first element has no extra specs flavor = self.flavors.first() projects = self.tenants.list() eph = getattr(flavor, 'OS-FLV-EXT-DATA:ephemeral') extra_specs = getattr(flavor, 'extra_specs') new_flavor = flavors.Flavo...
13,962
[ -0.020548248663544655, 0.01180806290358305, 0.008035226725041866, -0.00905350036919117, 0.012689261697232723, 0.01459526177495718, 0.01843337155878544, -0.004813956096768379, -0.010855062864720821, 0.05093981325626373, 0.019164439290761948, -0.027754494920372963, -0.037623919546604156, -0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_flavor_update_projects_error(self): # The first element has no extra specs flavor = self.flavors.first() projects = self.tenants.list() flavor_projects = [self.tenants.first()] eph = getattr(flavor, 'OS-FLV-EXT-DATA:ephemeral') extra_specs = getattr(flavor...
13,963
[ 0.010071180760860443, 0.015373535454273224, 0.0064748008735477924, -0.014530427753925323, -0.0017652559326961637, 0.01628251001238823, 0.012205296196043491, 0.00271704513579607, -0.010762792080640793, 0.03970508649945259, 0.017876509577035904, -0.01824536919593811, -0.04228710010647774, 0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_flavor_set_invalid_name(self): flavor = self.flavors.first() projects = self.tenants.list() eph = getattr(flavor, 'OS-FLV-EXT-DATA:ephemeral') invalid_flavor_name = "m1.tiny()" # init api.nova.flavor_get(IsA(http.HttpRequest), flavor.id) \ ...
13,964
[ -0.00811090413480997, -0.011986557394266129, -0.012779002077877522, -0.024332711473107338, -0.003492749761790037, 0.03401518613100052, 0.018006473779678345, -0.000014580003153241705, 0.0093228779733181, 0.03880980983376503, 0.005740229040384293, -0.03063231334090233, -0.029407020658254623, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_flavor_set_existing_name(self): flavor_a = self.flavors.list()[0] flavor_b = self.flavors.list()[1] projects = self.tenants.list() eph = getattr(flavor_a, 'OS-FLV-EXT-DATA:ephemeral') extra_specs = getattr(flavor_a, 'extra_specs') new_flavor = flavors.Flav...
13,965
[ -0.01140525657683611, 0.027476739138364792, -0.013169552199542522, -0.022906923666596413, -0.04739496484398842, -0.0066040582023561, -0.01733444817364216, -0.0375804640352726, -0.008315328508615494, 0.0025331624783575535, -0.01121243741363287, -0.00902875978499651, 0.011636639945209026, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "converters", "annotati...
class ModelConverterBase(object): def __init__(self, converters): self.converters = converters def convert(self, model, field, field_args): kwargs = { 'label': field.verbose_name, 'description': field.help_text, 'validators': [], 'filters': [], ...
13,966
[ 0.008229976519942284, 0.01576932705938816, -0.004541398491710424, -0.042672403156757355, -0.0670536458492279, -0.012944032438099384, -0.04976703226566315, -0.006780705880373716, -0.003442673245444894, 0.0465022474527359, -0.00859098695218563, -0.007214963901787996, 0.0027808218728750944, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "model", "annotation": null, "type_comment": null}}, {"_type": "ar...
def convert(self, model, field, field_args): kwargs = { 'label': field.verbose_name, 'description': field.help_text, 'validators': [], 'filters': [], 'default': field.default, } if field_args: kwargs.update(field_args) ...
13,967
[ 0.010272298008203506, 0.007205407600849867, -0.015349763445556164, -0.015084408223628998, -0.026310963556170464, -0.007771837990731001, 0.04400809854269028, 0.0004815937136299908, -0.005307098850607872, 0.01043559331446886, 0.0010831074323505163, -0.034251198172569275, -0.010767287574708462,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "extra_converters", "annotation": null, "type_comment": null}}, {"...
def __init__(self, extra_converters=None, simple_conversions=None): converters = {} if simple_conversions is None: simple_conversions = self.DEFAULT_SIMPLE_CONVERSIONS for field_type, django_fields in iteritems(simple_conversions): converter = self.make_simple_converter(f...
13,968
[ 0.014081424102187157, 0.01989530771970749, -0.03894316777586937, -0.02958182990550995, -0.0010820968309417367, 0.0221518836915493, -0.045840997248888016, 0.002117387019097805, 0.016190189868211746, 0.010514261201024055, -0.012800399214029312, -0.014643104746937752, 0.020654069259762764, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "model", "annotation": null, "type_comment": null}}, {"_type": "ar...
def conv_TimeField(self, model, field, kwargs): def time_only(obj): try: return obj.time() except AttributeError: return obj kwargs['filters'].append(time_only) return f.DateTimeField(format='%H:%M:%S', **kwargs)
13,969
[ -0.002652438124641776, 0.015710795298218727, -0.02682228945195675, 0.004144597798585892, 0.007348429411649704, -0.012512190267443657, -0.022097552195191383, 0.007651565130800009, 0.0027987794019281864, 0.03963761404156685, -0.003906792961061001, 0.0027987794019281864, -0.022599294781684875, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "model", "annotation": null, "type_comment": null}}, {"_type": "ar...
def conv_NullBooleanField(self, model, field, kwargs): def coerce_nullbool(value): d = {'None': None, None: None, 'True': True, 'False': False} if value in d: return d[value] else: return bool(int(value)) choices = ((None, 'Unknown'), ...
13,970
[ 0.03576287999749184, -0.009375469759106636, 0.005821864120662212, -0.007151315920054913, -0.003355132881551981, 0.0061495015397667885, -0.019103780388832092, -0.026009367778897285, 0.041761163622140884, 0.05600079149007797, 0.016709506511688232, -0.003528402652591467, -0.061142176389694214, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "headers", "annotation": null, "type_comment": null}}, {"_type": "...
def check_last_announcement(self, headers=None, inv=None): expect_headers = headers if headers != None else [] expect_inv = inv if inv != None else [] test_function = lambda: self.block_announced assert(wait_until(test_function, timeout=60)) with mininode_lock: self.b...
13,971
[ 0.010855235159397125, -0.02592920884490013, 0.04995875433087349, -0.014642232097685337, -0.024806680157780647, 0.019465411081910133, -0.0003706430725287646, -0.03666108846664429, -0.0008850717567838728, 0.007598664611577988, 0.03959693759679794, 0.00714225135743618, -0.05694064497947693, 0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class BaseNode(SingleNodeConnCB): def __init__(self): SingleNodeConnCB.__init__(self) self.last_inv = None self.last_headers = None self.last_block = None self.last_getdata = None self.block_announced = False self.last_getheaders = None self.disconnect...
13,972
[ 0.01824883185327053, -0.027491744607686996, 0.048268552869558334, -0.030441051349043846, -0.02006581425666809, 0.009269247762858868, -0.0059414030984044075, -0.00237985304556787, 0.007636595983058214, 0.003235678421333432, 0.07726128399372101, 0.04305460304021835, -0.061303433030843735, -0...
16
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class SendHeadersTest(BitcoinTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 2 def setup_network(self): self.nodes = [] self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [["-debug", "-logtimemicros=1"]]*2)...
13,973
[ 0.044755205512046814, -0.0149862514808774, 0.07068218290805817, -0.0014009855221956968, -0.052261050790548325, -0.003412616206333041, -0.006818871479481459, -0.016652803868055344, -0.01475725881755352, 0.02946363016963005, 0.030684921890497208, 0.04612915590405464, -0.03300028294324875, -0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "length", "annotation": null, "type_comment": null}}], "kwarg": nu...
def mine_reorg(self, length): self.nodes[0].generate(length) # make sure all invalidated blocks are node0's sync_blocks(self.nodes, wait=0.1) for x in self.p2p_connections: x.wait_for_block_announcement(int(self.nodes[0].getbestblockhash(), 16)) x.clear_last_announcement(...
13,974
[ 0.011288149282336235, 0.003745414549484849, 0.03413763642311096, -0.013364382088184357, 0.027034735307097435, 0.00714661180973053, -0.026007546111941338, 0.032979317009449005, 0.04996071755886078, 0.03485885635018349, 0.0340065062046051, 0.0037563422229140997, 0.003021464915946126, 0.00465...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "provider", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}...
def wrap(provider, *args, **kwargs): error = None result = authomatic.core.LoginResult(provider) try: func(provider, *args, **kwargs) except Exception as e: if provider.settings.report_errors: error = e provider._log(loggin...
13,975
[ 0.022832343354821205, -0.0223028976470232, 0.04291157051920891, -0.025056015700101852, -0.01635987125337124, 0.011158066801726818, -0.00040163416997529566, -0.0005410272860899568, 0.014758298173546791, 0.0016024003271013498, 0.08185230195522308, 0.0505620613694191, -0.06448648124933243, -0...
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def run_test(self): # Setup the p2p connections and start up the network thread. inv_node = InvNode() test_node = TestNode() self.p2p_connections = [inv_node, test_node] connections = [] connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], inv_node)) ...
13,976
[ -0.014515675604343414, -0.058866895735263824, 0.01810438558459282, 0.012816818431019783, 0.0173806119710207, -0.02378399483859539, 0.011077752336859703, 0.022436972707509995, -0.008348523639142513, 0.014334731735289097, -0.0173806119710207, -0.0570172518491745, 0.03321315348148346, -0.0282...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, *args, **kwargs): super(AuthenticationProvider, self).__init__(*args, **kwargs) # Lookup default identifier, if available in provider default_identifier = getattr(self, 'identifier', None) # Allow for custom name for the "id" querystring parameter. ...
13,977
[ 0.007455631159245968, 0.006800832226872444, 0.005231908056885004, 0.005757044069468975, 0.001722899149172008, 0.00440206378698349, 0.027332991361618042, 0.0072157541289925575, 0.006175207439810038, 0.015468813478946686, -0.0211739931255579, -0.06177152320742607, 0.0019173938781023026, 0.02...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "time", "annotation": n...
class TwoDRandomWalker(cx.GenericAgent): def update_time(self, time): self['t'] = time def __init__(self, name): cx.GenericAgent.__init__(self, name) def find_next(self): return Event(td=(choice([-1, 0, 1]), choice([-1, 0, 1])), ti=self['t'] + self['dt']) ...
13,978
[ -0.01926260255277157, -0.0037704803980886936, 0.009996549226343632, -0.040121059864759445, 0.03447938710451126, -0.0237130057066679, -0.016497958451509476, -0.04684161767363548, 0.05897907912731171, 0.016969971358776093, 0.01255328394472599, -0.010328082367777824, 0.02044263482093811, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class SampleTest(unittest.TestCase): def test_one(self): source_file_path = os.path.join(RESOURCE_PATH, '20140813.velpt.log') particle_data_handler = ParticleDataHandler() particle_data_handler = parse(None, source_file_path, particle_data_handler) log.debug("SAMPLES: %s", parti...
13,979
[ -0.017009710893034935, 0.014319978654384613, 0.004426060244441032, -0.04601587355136871, 0.01905542053282261, -0.006894804537296295, -0.0316958948969841, -0.05119329318404198, 0.06894804537296295, 0.02103799395263195, 0.03361532837152481, -0.006175017450004816, 0.02103799395263195, -0.0232...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_one(self): source_file_path = os.path.join(RESOURCE_PATH, '20140813.velpt.log') particle_data_handler = ParticleDataHandler() particle_data_handler = parse(None, source_file_path, particle_data_handler) log.debug("SAMPLES: %s", particle_data_handler._samples) log.deb...
13,980
[ 0.026760123670101166, -0.009754303842782974, 0.0015634960727766156, -0.05796433612704277, 0.012687165290117264, 0.014610549435019493, 0.0495540127158165, -0.0019144240068271756, 0.018982961773872375, 0.03751195967197418, -0.0006943893386051059, 0.006158412434160709, 0.012615486979484558, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testRunnerRegistersResult(self): class Test(unittest2.TestCase): def testFoo(self): pass originalRegisterResult = unittest2.runner.registerResult def cleanup(): unittest2.runner.registerResult = originalRegisterResult self.addCleanup(cleanup) ...
13,981
[ -0.006593118887394667, -0.025288352742791176, -0.020775100216269493, -0.02583041414618492, 0.008879205211997032, 0.035304706543684006, -0.0008292953134514391, 0.015814058482646942, 0.04779569432139397, 0.018972156569361687, 0.016426824033260345, -0.0030844483990222216, 0.012219954282045364, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testBufferAndFailfast(self): class Test(unittest2.TestCase): def testFoo(self): pass result = unittest2.TestResult() runner = unittest2.TextTestRunner(stream=StringIO(), failfast=True, buffer=True) # Use our resul...
13,982
[ 0.04646438732743263, 0.019282016903162003, 0.05738891288638115, -0.04536255821585655, -0.009101815521717072, -0.0007919400231912732, 0.0222006943076849, 0.002876185579225421, 0.004785339813679457, 0.018731102347373962, -0.024310579523444176, -0.005966289900243282, 0.004656401928514242, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_works_with_result_without_startTestRun_stopTestRun(self): class OldTextResult(OldTestResult): def __init__(self, *_): super(OldTextResult, self).__init__() separator2 = '' def printErrors(self): pass runner = unittest2.TextTes...
13,983
[ 0.042248018085956573, 0.025748278945684433, 0.03690731152892113, -0.05618595704436302, -0.03556128218770027, 0.0017653093673288822, -0.0020611106883734465, 0.004428877495229244, 0.02283911406993866, 0.02253517135977745, -0.020375007763504982, 0.010952787473797798, -0.007755963131785393, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_startTestRun_stopTestRun_called(self): class LoggingTextResult(LoggingResult): separator2 = '' def printErrors(self): pass class LoggingRunner(unittest2.TextTestRunner): def __init__(self, events): super(LoggingRunner, self)._...
13,984
[ 0.035164929926395416, -0.01007059682160616, 0.02362716943025589, -0.04892103746533394, 0.02868594229221344, 0.003785276785492897, -0.008709071204066277, -0.008802969008684158, 0.014366446062922478, -0.004149132873862982, -0.02106844075024128, -0.02347458526492119, 0.008022439666092396, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_oldresult(self): class Test(unittest2.TestCase): def testFoo(self): pass runner = unittest2.TextTestRunner(resultclass=OldTestResult, stream=StringIO()) # This will raise an exception if TextTestRunner can't handle ol...
13,985
[ 0.03274497017264366, 0.005833745468407869, -0.0279170423746109, -0.04689348116517067, 0.0026053485926240683, -0.006738982163369656, 0.0017168758204206824, -0.03030865453183651, 0.013008582405745983, 0.014930812641978264, 0.0013040712801739573, -0.04208790510892868, -0.00017863750690594316, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_resultclass(self): def MockResultClass(*args): return args STREAM = object() DESCRIPTIONS = object() VERBOSITY = object() runner = unittest2.TextTestRunner(STREAM, DESCRIPTIONS, VERBOSITY, resultclass=MockResultClass) ...
13,986
[ 0.047004252672195435, -0.0072747184894979, 0.06248999014496803, -0.005225909408181906, 0.04755130410194397, -0.0020474938210099936, -0.021734733134508133, 0.0017134775407612324, -0.023354843258857727, -0.028067894279956818, -0.006927551701664925, -0.05104400962591171, 0.013623659498989582, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "search_solr"}}, "targets": [{"_type": "Name", "_fields": {"id": "__tablename__", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comme...
class Solr(Base): __tablename__ = 'search_solr' __table_args__ = (UniqueConstraint('name', 'cluster_id'), {}) id = Column(Integer, Sequence('search_solr_seq'), primary_key=True) name = Column(String(200), nullable=False) is_active = Column(Boolean(), nullable=False, default=True) address = Colu...
13,987
[ 0.06897120177745819, 0.01944219134747982, 0.0600455142557621, -0.026157807558774948, 0.046849168837070465, 0.00874418206512928, -0.00044708498171530664, 0.01037770975381136, -0.03249974176287651, -0.036044392734766006, -0.000042039333493448794, -0.03869220241904259, 0.04740435630083084, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "search_es"}}, "targets": [{"_type": "Name", "_fields": {"id": "__tablename__", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment...
class ElasticSearch(Base): __tablename__ = 'search_es' __table_args__ = (UniqueConstraint('name', 'cluster_id'), {}) id = Column(Integer, Sequence('search_es_seq'), primary_key=True) name = Column(String(200), nullable=False) is_active = Column(Boolean(), nullable=False, default=True) hosts = C...
13,988
[ 0.030517639592289925, 0.03460034355521202, 0.03717769309878349, 0.005824695341289043, 0.04155690595507622, -0.030517639592289925, 0.014335079118609428, -0.008439107798039913, -0.022089935839176178, -0.024017244577407837, 0.02048194408416748, -0.016387835144996643, 0.03592323139309883, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "email_imap"}}, "targets": [{"_type": "Name", "_fields": {"id": "__tablename__", "ctx": {"_type": "Store", "_fields": {}}}}], "type_commen...
class IMAP(Base): __tablename__ = 'email_imap' __table_args__ = (UniqueConstraint('name', 'cluster_id'), {}) id = Column(Integer, Sequence('email_imap_seq'), primary_key=True) name = Column(String(200), nullable=False) is_active = Column(Boolean(), nullable=False) host = Column(String(400), nu...
13,989
[ 0.045879337936639786, 0.00502875167876482, 0.024844175204634666, -0.023431843146681786, 0.04836161434650421, 0.005874010268598795, 0.03162764012813568, -0.016231099143624306, -0.029530543833971024, -0.034409500658512115, -0.014797369949519634, 0.011566129513084888, 0.03601442277431488, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "email_smtp"}}, "targets": [{"_type": "Name", "_fields": {"id": "__tablename__", "ctx": {"_type": "Store", "_fields": {}}}}], "type_commen...
class SMTP(Base): __tablename__ = 'email_smtp' __table_args__ = (UniqueConstraint('name', 'cluster_id'), {}) id = Column(Integer, Sequence('email_smtp_seq'), primary_key=True) name = Column(String(200), nullable=False) is_active = Column(Boolean(), nullable=False) host = Column(String(400), nu...
13,990
[ 0.023116042837500572, 0.0006797539535909891, 0.08070626854896545, 0.0017783832736313343, -0.054415591061115265, -0.018812650814652443, 0.0039947484619915485, -0.04999461770057678, 0.012486896477639675, 0.06499770283699036, -0.017284121364355087, -0.00895952433347702, -0.00784252304583788, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "spec", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, spec, generator_flags): self.spec = spec self.vs_version = GetVSVersion(generator_flags) supported_fields = [ ('msvs_configuration_attributes', dict), ('msvs_settings', dict), ('msvs_system_include_dirs', list), ('msvs_disabled_warnings', list), ('...
13,991
[ -0.00165657012257725, 0.013871153816580772, 0.08178004622459412, -0.019396549090743065, -0.02539375238120556, -0.022961320355534554, 0.07385367155075073, -0.044916119426488876, 0.015181731432676315, 0.009834574535489082, 0.01799160987138748, 0.009378493763506413, -0.008859504945576191, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "settings", "annotation": null, "type_comment": null}}, {"_type": ...
def __init__( self, settings, config, gyp_to_build_path, gyp_to_unique_output, obj_ext): self.settings = settings self.config = config pch_source = self.settings.msvs_precompiled_source[self.config] self.pch_source = gyp_to_build_path(pch_source) filename, _ = os.path.splitext(pch_source) ...
13,992
[ -0.008650611154735088, 0.009141078218817711, 0.01963094063103199, 0.00027837834204547107, -0.04073328152298927, -0.003249343717470765, 0.03528909757733345, -0.05787510424852371, 0.0053890058770775795, 0.03467601537704468, 0.004147511441260576, -0.026705926284193993, -0.016430644318461418, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "default_variables", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "params", "annotation": null, "type_comment": null}}]...
def CalculateCommonVariables(default_variables, params): generator_flags = params.get('generator_flags', {}) # Set a variable so conditions can be based on msvs_version. msvs_version = gyp.msvs_emulation.GetVSVersion(generator_flags) default_variables['MSVS_VERSION'] = msvs_version.ShortName() # To determin...
13,993
[ 0.026816964149475098, 0.0036929238121956587, -0.013174179941415787, -0.005058799870312214, 0.026987366378307343, -0.0438358299434185, -0.04115200415253639, 0.00044164652354083955, 0.012631024233996868, -0.023408930748701096, 0.021481260657310486, -0.046562258154153824, -0.020799655467271805,...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "method", "annotation": null, "type_comment": null}}, {"_type": "a...
def _call(self, method, arguments): try: return super(AccountInvoiceAdapter, self)._call(method, arguments) except xmlrpclib.Fault as err: # this is the error in the Magento API # when the invoice does not exist if err.faultCode == 100: rai...
13,994
[ 0.0001143053887062706, -0.007315544877201319, -0.03543432429432869, -0.03687744960188866, -0.004071284085512161, -0.008420092053711414, -0.04424849897623062, -0.005844665225595236, -0.004332156851887703, -0.02215755358338356, -0.008991792798042297, -0.03283669427037239, -0.018238907679915428...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "magento_order", "annotation": null, "type_comment": null}}], "kwa...
def _get_existing_invoice(self, magento_order): invoices = self.backend_adapter.search_read( order_id=magento_order.magento_order_id) if not invoices: return if len(invoices) > 1: return return invoices[0]['increment_id']
13,995
[ 0.010528520680963993, 0.0056180269457399845, 0.008559043519198895, -0.050013113766908646, -0.007497742772102356, -0.03550339862704277, -0.011394456960260868, -0.041607193648815155, -0.010364837944507599, 0.009129294194281101, -0.0028644546400755644, -0.0014784281374886632, 0.0131580112501978...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "magento_id", "annotation": null, "type_comment": null}}, {"_type"...
def _export_invoice(self, magento_id, lines_info, mail_notification): if not lines_info: # invoice without any line for the sale order return return self.backend_adapter.create(magento_id, lines_info, _("I...
13,996
[ -0.020747752860188484, 0.0010722012957558036, 0.05813583359122276, -0.007015385199338198, -0.01769351400434971, -0.022526465356349945, 0.02558070421218872, -0.040044449269771576, -0.03800829127430916, 0.015540335327386856, -0.001892808242700994, 0.0361359603703022, -0.0017041125101968646, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare",...
def test_create(): assert(localRepo.baseurl == LOCALREPO_BASE) assert(localRepo.repos == REPOS) # invalid baseurl try: LocalRepository( '/invalid/local/repobase', REPOS ) pytest.fail('Constructing a LocalRepository with ' 'an invalid ba...
13,997
[ -0.010917800478637218, -0.004107777029275894, 0.04538806527853012, -0.044735170900821686, 0.0172895397990942, 0.024181174114346504, -0.008402958512306213, -0.06011439859867096, -0.012247764505445957, 0.005963682197034359, 0.03087935969233513, -0.0009128393139690161, 0.012550029903650284, 0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def test_ls(): packagenames = localRepo.ls(packagenamesonly=True) assert(len(packagenames) == 3) assert('ggplot2' in packagenames) assert('data.table' in packagenames) assert('plyr' in packagenames) filenames = localRepo.ls(packagenamesonly=False) assert(len(filenames) == 3) assert('libr...
13,998
[ 0.004287994932383299, -0.015989337116479874, 0.022965194657444954, -0.04631394147872925, 0.0015282162930816412, 0.010134170763194561, 0.047033101320266724, -0.010068248026072979, -0.01813483238220215, 0.007407354190945625, 0.04643380269408226, 0.023828187957406044, 0.0070837317034602165, -...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def test_upload_single(): uploadStatus = localRepo.upload_single(PACKAGEPATH, 'library') assert(uploadStatus == PackStatus.DEPLOYED) # test upload, overwrite existing uploadStatus = localRepo.upload_single( PACKAGEPATH, 'library', overwrite=True) assert(uploadStatus == PackStatus.DEPLOYED) ...
13,999
[ 0.003054205793887377, -0.031600553542375565, -0.0009413459338247776, -0.026286017149686813, 0.011985276825726032, 0.008291562087833881, 0.035591971129179, -0.0019488479010760784, 0.005598458461463451, 0.012448369525372982, 0.027939919382333755, 0.013782517053186893, -0.010072263889014721, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def test_download_single(): # test download success destfolder = tempfile.mkdtemp() downloadStatus = localRepo.download_single('ggplot2', destfolder) assert(downloadStatus == PackStatus.DOWNLOADED) assert(os.path.exists( os.path.join(destfolder, 'ggplot2_2.2.1.tar.gz') ...
14,000
[ -0.005195561330765486, -0.0347437746822834, -0.028637144714593887, 0.018307581543922424, -0.011930092237889767, -0.0040167104452848434, -0.01418314315378666, 0.004475323483347893, 0.018085969612002373, 0.0050108847208321095, 0.03843730315566063, 0.007048480678349733, -0.00566340796649456, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "item", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def is_valid_transaction(item): if item['transaction']['isBuyNow'] == False and item['itemInfo']['itBidCount'] == 0: print("All bids cancelled in", item['itemInfo']['itId']) return False if item['transaction']['isBuyNow'] == False and item['itemInfo']['itReservePrice'] == -1: print("Minimal price not reached i...