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
21,501
[ 0.048329781740903854, 0.006694018375128508, -0.01666346751153469, -0.05886613577604294, -0.016079388558864594, 0.045993462204933167, -0.0009004571475088596, -0.0015446634497493505, 0.01810649037361145, -0.016457321122288704, 0.0012483284808695316, -0.02372969500720501, -0.0035588815808296204...
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 TestSpeedups(TestCase): def test_scanstring(self): if not encoder.c_encode_basestring_ascii: raise SkipTest("no C extension speedups available to test") self.assertEquals(decoder.scanstring.__module__, "simplejson._speedups") self.assert_(decoder.scanstring is decoder.c_sca...
21,502
[ 0.026658855378627777, 0.002874868456274271, 0.0168052576482296, -0.042836081236600876, 0.00864084716886282, 0.01424981839954853, 0.0351264514029026, 0.040627140551805496, 0.025251198559999466, 0.024514885619282722, 0.038418203592300415, 0.008819511160254478, 0.054920271039009094, 0.0054817...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "command", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "timeout", "annotation": null, "type_comment": null}}], "kwarg"...
def iter_command(command, timeout=None): p = popen2.Popen3(command, capturestderr=True) set_nonblocking(p.fromchild) set_nonblocking(p.childerr) fromchild_read = "" childerr_read = "" was_timeout = False while 1: ro, rw, re = select.select([p.fromchild], [], [p.childerr], timeout) ...
21,503
[ 0.0229566041380167, -0.012705463916063309, 0.08086872845888138, 0.02260952815413475, 0.016126642003655434, 0.023911062628030777, 0.009271889925003052, 0.0069601149298250675, -0.006749390158802271, 0.044549696147441864, 0.0009637559414841235, -0.0466073602437973, -0.010994874872267246, -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 SklAdaBoostTest(unittest.TestCase): def setUp(self): self.iris = Table("iris") self.housing = Table("housing") def test_adaboost(self): learn = SklAdaBoostLearner() results = CrossValidation(self.iris, [learn], k=10) ca = CA(results) self.assertGreater(ca, ...
21,504
[ 0.015085572376847267, -0.0089585455134511, 0.10726460814476013, 0.014014829881489277, 0.002577217761427164, 0.02417498640716076, 0.011813859455287457, 0.02624508924782276, 0.0001254776434507221, 0.04221104830503464, -0.010380254127085209, -0.02352064475417137, -0.046803344041109085, -0.030...
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_adaboost_reg_base_estimator(self): np.random.seed(0) stump_estimator = TreeRegressionLearner(max_depth=1) tree_estimator = TreeRegressionLearner() stump = SklAdaBoostRegressionLearner(base_estimator=stump_estimator) tree = SklAdaBoostRegressionLearner(base_estimator=tree...
21,505
[ 0.02176978625357151, -0.02054939791560173, 0.11143764108419418, 0.015680164098739624, 0.006416293326765299, 0.00025617406936362386, 0.010496587492525578, 0.03079327754676342, -0.010206898674368858, 0.04329302906990051, 0.005735217127948999, -0.033160094171762466, -0.050541408360004425, -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_adaboost_base_estimator(self): np.random.seed(0) stump_estimator = TreeLearner(max_depth=1) tree_estimator = TreeLearner() stump = SklAdaBoostLearner(base_estimator=stump_estimator) tree = SklAdaBoostLearner(base_estimator=tree_estimator) results = CrossValidatio...
21,506
[ 0.021795552223920822, -0.03933162987232208, 0.06780285388231277, -0.034648701548576355, 0.012118327431380749, 0.015219522640109062, -0.002346135675907135, 0.01292787678539753, 0.03233214467763901, -0.015194613486528397, 0.029691770672798157, 0.0003746110596694052, -0.003898290218785405, -0...
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 testGetLastPlace(self): self.testSavePlace() # The place saved in the previous step has no exit_ts set, so it is the # last place new_place = esdp.get_last_place(self.testUserId) new_place.exit_ts = 6 esdp.save_place(new_place) # Now that I have set the ...
21,507
[ -0.010473371483385563, -0.05965520814061165, 0.08276404440402985, -0.034105297178030014, 0.010014217346906662, 0.024829212576150894, -0.004850182216614485, 0.012693586759269238, 0.02459673024713993, 0.002677916781976819, 0.024178260937333107, -0.020563146099448204, 0.028060730546712875, -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 TestTripQueries(unittest.TestCase): def setUp(self): self.testUserId = uuid.uuid4() edb.get_place_db().remove() def testCreateNew(self): new_place = esdp.create_new_place(self.testUserId) self.assertIsNotNone(new_place.get_id()) self.assertEqual(new_place.user_id, ...
21,508
[ 0.05146973580121994, 0.018734896555542946, 0.00747993728145957, -0.04286268353462219, -0.031278759241104126, 0.007070077583193779, 0.06156522408127785, 0.028474455699324608, -0.03514006733894348, 0.009232626296579838, 0.03419091925024986, 0.01602766662836075, 0.008391335606575012, -0.06169...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "instance_id", "annotation": null, "type_comment": null}}, {"_t...
def create_image(context, instance_id, name=None, description=None, no_reboot=False, block_device_mapping=None): instance = ec2utils.get_db_item(context, instance_id) if not instance_api._is_ebs_instance(context, instance['os_id']): msg = _('Instance does not have a volume attached at ...
21,509
[ 0.06098614260554314, 0.01900549978017807, 0.00804462656378746, -0.024594048038125038, -0.03980731964111328, 0.03370870277285576, 0.07801790535449982, 0.03674692288041115, -0.03359781950712204, 0.0026875485200434923, 0.01750856637954712, 0.017087208107113838, -0.015867484733462334, -0.08422...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "image", "annotation": null, "type_comment": null}}, {"_type": ...
def delayed_create(context, image, name, os_instance): try: os_instance.stop() # wait instance for really stopped start_time = time.time() while os_instance.status != 'SHUTOFF': time.sleep(1) os_instance.get() # NOT...
21,510
[ 0.04238522797822952, 0.010421114973723888, 0.0010179518721997738, -0.0176661629229784, -0.034134238958358765, 0.016366349533200264, 0.056739691644907, -0.004594558849930763, -0.017236659303307533, 0.0015286939451470971, -0.004727365914732218, -0.023758333176374435, 0.033094387501478195, -0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}, {"_type": "...
def register_image(context, name=None, image_location=None, description=None, architecture=None, root_device_name=None, block_device_mapping=None, virtualization_type=None, kernel_id=None, ramdisk_id=None, sriov_net_support=None): if not im...
21,511
[ 0.06260622292757034, 0.014554589986801147, -0.011682122945785522, 0.000812829181086272, -0.035419560968875885, 0.04844744876027107, 0.052699603140354156, 0.03406248986721039, 0.015640247613191605, 0.039762191474437714, 0.08305276930332184, -0.013423698022961617, 0.0187954381108284, -0.0284...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "image_id", "annotation": null, "type_comment": null}}], "kwarg...
def deregister_image(context, image_id): os_image = ec2utils.get_os_image(context, image_id) if not os_image: image = db_api.get_item_by_id(context, image_id) if image.get('state') != 'failed': # TODO(ft): figure out corresponding AWS error raise exception.IncorrectState(...
21,512
[ 0.05465609207749367, 0.0009695077314972878, 0.04442596063017845, -0.0008636890561319888, 0.005168720614165068, -0.020484110340476036, 0.01126745343208313, 0.014033643528819084, -0.012221312150359154, 0.04096822068095207, -0.0032043682876974344, -0.04907602071762085, 0.015428661368787289, -...
11
{"_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 get_db_items(self): # TODO(ft): we can't get all images from DB per one request due # different kinds. It's need to refactor DB API and ec2utils functions # to work with kind smarter if self.ids: local_images = db_api.get_items_by_ids(self.context, self.ids) else:...
21,513
[ 0.022032639011740685, 0.025110822170972824, -0.0009898721473291516, -0.019286541268229485, -0.02241581492125988, 0.008251063525676727, 0.042098306119441986, -0.005677395965903997, -0.0027141657192260027, 0.029606757685542107, 0.024459421634674072, -0.040488965809345245, 0.032033540308475494,...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "ami"}}, "targets": [{"_type": "Name", "_fields": {"id": "KIND", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_t...
class ImageDescriber(common.TaggableItemsDescriber): KIND = 'ami' FILTER_MAP = {'architecture': 'architecture', 'block-device-mapping.device-name': ['blockDeviceMapping', 'deviceName'], 'block-device-mapping.snapshot-id'...
21,514
[ 0.016659025102853775, 0.019502703100442886, 0.04229690507054329, -0.010686182416975498, -0.025525925680994987, 0.008878096006810665, 0.07711516320705414, 0.019289987161755562, -0.03658716008067131, 0.026667874306440353, 0.014050454832613468, 0.008150382898747921, -0.02574983797967434, -0.0...
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": "image", "annotation": null, "type_comment": null}}, {"_type": "ar...
def auto_update_db(self, image, os_image): if not image: kind = _get_os_image_kind(os_image) if self.context.project_id == os_image.owner: if os_image.properties.get('ec2_id') in self.pending_images: # NOTE(ft): the image is being creating, Glance had ...
21,515
[ 0.017814122140407562, 0.04216596856713295, 0.01840204745531082, -0.012452248483896255, -0.021847287192940712, -0.0037186245899647474, 0.02116529457271099, 0.018296221271157265, 0.0005930691841058433, 0.020306924358010292, 0.008025174029171467, -0.06100308150053024, 0.021917838603258133, -0...
11
{"_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 get_os_items(self): os_images = list(clients.glance(self.context).images.list()) self.ec2_created_os_images = { os_image.properties['ec2_id']: os_image for os_image in os_images if (os_image.properties.get('ec2_id') and self.context.project_id == o...
21,516
[ 0.04576994478702545, 0.014929777942597866, -0.018325138837099075, -0.02520166151225567, -0.0385134331882, -0.0007105587865225971, 0.04179847612977028, 0.016351662576198578, 0.013654986396431923, 0.009095151908695698, 0.03780249133706093, -0.04907950013875961, 0.06594598293304443, -0.037410...
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": "item", "annotation": null, "type_comment": null}}], "kwarg": null...
def handle_unpaired_item(self, item): if item['os_id']: return super(ImageDescriber, self).handle_unpaired_item(item) if 'is_public' not in item: return None # NOTE(ft): process creating images, ignoring ids mapping # NOTE(ft): the image is being creating, Glanc...
21,517
[ 0.03562585636973381, 0.002698664553463459, -0.02514493092894554, -0.019788270816206932, -0.007285522762686014, -0.008122137747704983, -0.003404558403417468, -0.046594809740781784, 0.009063329547643661, 0.00017039132944773883, 0.042946238070726395, -0.014919634908437729, 0.019532637670636177,...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "image_id", "annotation": null, "type_comment": null}}, {"_type...
def describe_image_attribute(context, image_id, attribute): def _block_device_mapping_attribute(os_image, image, result): properties = ec2utils.deserialize_os_image_properties(os_image) mappings = _format_mappings(context, properties) if mappings: result['blockDeviceMapping'] = m...
21,518
[ 0.022333435714244843, 0.012876511551439762, -0.017829015851020813, -0.016343263909220695, -0.0068450686521828175, 0.01669701561331749, 0.015152305364608765, 0.03594103083014488, 0.001721584820188582, -0.017534224316477776, 0.044431038200855255, -0.004681295715272427, 0.020305268466472626, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "image_id", "annotation": null, "type_comment": null}}, {"_type...
def reset_image_attribute(context, image_id, attribute): if attribute != 'launchPermission': raise exception.InvalidRequest() os_image = ec2utils.get_os_image(context, image_id) _check_owner(context, os_image) os_image.update(is_public=False) return True
21,519
[ 0.0257034320384264, 0.017116041854023933, -0.015165964141488075, -0.008980928920209408, 0.010743048042058945, 0.03211754187941551, 0.02889874018728733, 0.017444970086216927, 0.01097799651324749, -0.0027283465024083853, 0.06212054193019867, -0.01074892096221447, 0.026925167068839073, -0.009...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "image_id", "annotation": null, "type_comment": null}}, {"_type...
def modify_image_attribute(context, image_id, attribute=None, user_group=None, operation_type=None, description=None, launch_permission=None, product_code=None, user_id=None, value=None): os_image = ec2utils.get_os_image(context, image...
21,520
[ 0.028041057288646698, 0.026736248284578323, 0.06686524301767349, -0.011835590936243534, -0.048154789954423904, 0.008912082761526108, 0.018144212663173676, -0.014032837934792042, -0.013885123655200005, 0.012100244872272015, 0.014155932702124119, -0.015620764344930649, -0.012728029862046242, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "os_image_properties", "annotation": null, "type_comment": null...
def _format_mappings(context, os_image_properties, root_device_name=None, snapshot_ids=None, project_id=None): formatted_mappings = [] bdms = ec2utils.get_os_image_mappings(os_image_properties) ephemeral_numbers = _ephemeral_free_number_generator(bdms) for bdm in bdms: # NOT...
21,521
[ 0.03383207693696022, -0.0032949030864983797, 0.0002066823362838477, -0.035249754786491394, -0.017300494015216827, -0.003141721710562706, 0.033063165843486786, -0.0003195034805685282, -0.011677833274006844, 0.0259987972676754, 0.046663276851177216, -0.027728848159313202, 0.034913357347249985,...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "image", "annotation": null, "type_comment": null}}, {"_type": ...
def _format_image(context, image, os_image, images_dict, ids_dict, snapshot_ids=None): ec2_image = {'imageId': image['id'], 'imageOwnerId': os_image.owner, 'imageType': IMAGE_TYPES[ ec2utils.get_ec2_id_kind(image['id'])], ...
21,522
[ 0.025931335985660553, 0.023384077474474907, 0.06625287234783173, -0.0025276413653045893, -0.04594723880290985, -0.017794596031308174, 0.04044226184487343, 0.008927478455007076, -0.008040162734687328, -0.0031569108832627535, 0.019424358382821083, -0.0011566788889467716, -0.022708028554916382,...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "bdm", "annotation": null, "type_comment": null}}, {"_type": "a...
def _format_volume_mapping(context, bdm, snapshot_ids=None, project_id=None): ebs = {'deleteOnTermination': bdm['delete_on_termination']} # TODO(ft): set default volumeSize from the source if bdm.get('volume_size') is not None: ebs['volumeSize'] = bdm['volume_size'] if bdm.get('source_type') == ...
21,523
[ 0.0199879202991724, -0.004618973471224308, 0.09178262203931808, 0.018489157781004906, -0.009078786708414555, -0.010086803697049618, 0.016804708167910576, 0.04429970309138298, -0.004900820553302765, -0.0027040725108236074, 0.012567056342959404, -0.004446549341082573, -0.015690583735704422, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "bdms", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _ephemeral_free_number_generator(bdms): named_ephemeral_nums = set( int(bdm['virtual_name'][EPHEMERAL_PREFIX_LEN:]) for bdm in bdms if (bdm.get('destination_type') == 'local' and bdm.get('source_type') == 'blank' and bdm.get('guest_format') != 'swap' and ...
21,524
[ 0.043480969965457916, -0.00861436314880848, -0.002949783345684409, -0.010759660042822361, -0.020866883918642998, 0.03717777505517006, 0.08103472739458084, 0.02366461604833603, 0.0045145233161747456, 0.007127030752599239, 0.02123180590569973, -0.01454157568514347, 0.019738944247364998, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "image_key", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs...
def set_dependent_image_id(image_key): try: image_key_path = ('machine_configuration/%(image_key)s' % {'image_key': image_key}) image_id = manifest.find(image_key_path).text except Exception: return if image_id == 'true': ...
21,525
[ 0.04168779402971268, 0.012369264848530293, 0.025630595162510872, -0.04138318449258804, -0.027284182608127594, 0.02671848237514496, 0.06061701104044914, 0.026065750047564507, -0.013696485199034214, 0.022715061902999878, 0.04482090473175049, -0.03281064331531525, 0.018798671662807465, -0.038...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "manifest", "annotation": null, "type_comment": null}}], "kwarg...
def _s3_parse_manifest(context, manifest): manifest = etree.fromstring(manifest) try: arch = manifest.find('machine_configuration/architecture').text except Exception: arch = 'x86_64' properties = {'architecture': arch} mappings = [] try: block_device_mapping = manifes...
21,526
[ 0.03567972034215927, 0.03383845090866089, 0.01523139514029026, -0.039096299558877945, -0.008761377073824406, 0.019906174391508102, 0.035966143012046814, 0.04537707939743996, -0.027557674795389175, -0.01845361851155758, 0.04611358419060707, 0.0017696651630103588, -0.005211817100644112, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "encrypted_filename", "annotation": null, "type_comment": null}...
def _s3_decrypt_image(context, encrypted_filename, encrypted_key, encrypted_iv, decrypted_filename): encrypted_key = binascii.a2b_hex(encrypted_key) encrypted_iv = binascii.a2b_hex(encrypted_iv) cert_client = clients.nova_cert(context) try: key = cert_client.decrypt_text(ba...
21,527
[ 0.01193141657859087, 0.00035765222855843604, 0.03941016271710396, -0.049937233328819275, 0.05334305018186569, 0.015989646315574646, 0.0456467904150486, 0.05630655214190483, -0.02148539572954178, -0.044098690152168274, 0.011787664145231247, -0.027688847854733467, -0.0020222035236656666, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def _s3_conn(context): # NOTE(vish): access and secret keys for s3 server are not # checked in nova-objectstore ec2_creds = clients.keystone(context).ec2.list(context.user_id) access = ec2_creds[0].access if CONF.s3_affix_tenant: access = '%s:%s' % (access, context.project_id) ...
21,528
[ 0.03131086379289627, -0.009580641053617, 0.03184278681874275, -0.07229303568601608, 0.046712424606084824, 0.0399908646941185, 0.004146574065089226, -0.022244011983275414, 0.015582897700369358, 0.00927236769348383, 0.012717772275209427, -0.04364178329706192, 0.01882278546690941, 0.002094442...
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 Tests(unittest.TestCase): def test_write_json(self): tempDirectory = tempfile.TemporaryDirectory().name os.makedirs(tempDirectory) Config.writeConfig([{"one": 1, "two": 2}, {"three": 3, "four": 4}], os.path.join(tempDirectory, "test.json")) self.assertEqual(Config.findConfi...
21,529
[ 0.046153903007507324, -0.05005423352122307, 0.035590510815382004, -0.06553366780281067, 0.04485379531979561, 0.0143215237185359, 0.00334930676035583, -0.037154704332351685, -0.00012212336878292263, 0.002617994789034128, 0.029333731159567833, -0.003737816121429205, 0.03873921558260918, -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_write_json(self): tempDirectory = tempfile.TemporaryDirectory().name os.makedirs(tempDirectory) Config.writeConfig([{"one": 1, "two": 2}, {"three": 3, "four": 4}], os.path.join(tempDirectory, "test.json")) self.assertEqual(Config.findConfig(os.path.join(tempDirectory, "test.j...
21,530
[ 0.02904323674738407, -0.02125908061861992, 0.03764035925269127, -0.042111676186323166, 0.03674609586596489, 0.006834001746028662, 0.01459275372326374, -0.058940090239048004, -0.02849448472261429, -0.0047228289768099785, 0.007530104368925095, -0.023372793570160866, 0.027620544657111168, -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_write_yaml(self): tempDirectory = tempfile.TemporaryDirectory().name os.makedirs(tempDirectory) Config.writeConfig([{"one": 1, "two": 2}, {"three": 3, "four": 4}], os.path.join(tempDirectory, "test.yaml")) self.assertEqual(Config.findConfig(os.path.join(tempDirectory, "test.y...
21,531
[ 0.05569786950945854, -0.03141821548342705, 0.021682843565940857, -0.0559970922768116, 0.06595687568187714, 0.04522513225674629, -0.0008936558733694255, -0.024771232157945633, -0.0003142489294987172, 0.006983606610447168, 0.027592459693551064, -0.018102876842021942, 0.03419669717550278, -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_write_and_read_json(self): tempDirectory = tempfile.TemporaryDirectory().name os.makedirs(tempDirectory) Config.writeConfig([{"one": 10 - 9, "two": 5 - 3}, {"three": 1 + 1 + 1, "four": 2 * 2}], os.path.join(tempDirectory, "test.json")) data = Config.loadConfig(os.path.join(tem...
21,532
[ 0.04946189373731613, 0.0007646926096640527, 0.022492555901408195, -0.03218499943614006, 0.05289553850889206, 0.03390182554721832, 0.009502289816737175, -0.04568053409457207, -0.02686067670583725, -0.007611611392349005, 0.011496195569634438, -0.043702930212020874, 0.0205910112708807, -0.028...
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_write_and_read_yaml(self): tempDirectory = tempfile.TemporaryDirectory().name os.makedirs(tempDirectory) Config.writeConfig([{"one": 10 - 9, "two": 5 - 3}, {"three": 1 + 1 + 1, "four": 2 * 2}], os.path.join(tempDirectory, "test.yaml")) data = Config.loadConfig(os.path.join(tem...
21,533
[ -0.022890496999025345, -0.012891091406345367, 0.06784529238939285, -0.06108992546796799, 0.006943693850189447, 0.00047802439075894654, 0.017447320744395256, -0.02188205160200596, 0.015163131058216095, 0.05452895537018776, -0.0033108601346611977, -0.06803969293832779, 0.02208860032260418, 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_matching_types(self): self.assertTrue(Config.matchesType(42, "int")) self.assertTrue(Config.matchesType(11.0, "float")) self.assertTrue(Config.matchesType(11.1, "float")) self.assertTrue(Config.matchesType("hello", "string")) self.assertTrue(Config.matchesType(False, "b...
21,534
[ 0.0312768779695034, -0.03156232461333275, 0.07621445506811142, -0.009654237888753414, -0.014659762382507324, -0.045141465961933136, 0.03156232461333275, 0.025017423555254936, -0.01719820499420166, 0.027362171560525894, -0.020317737013101578, 0.02438536286354065, 0.00848696194589138, -0.043...
7
{"_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 install(self, spec, prefix): set_executable('./autogen.sh') autogen = Executable('./autogen.sh') configure_args = [ '--prefix={0}'.format(prefix), '--disable-dependency-tracking' ] autogen(*configure_args) make() make('install')
21,535
[ 0.033160727471113205, 0.007979616522789001, 0.0010132972383871675, -0.04505092650651932, 0.024807164445519447, 0.004557064734399319, 0.002858464838936925, -0.022842366248369217, -0.017809946089982986, 0.02872408553957939, 0.00014755794836673886, -0.0065789055079221725, -0.01869727484881878, ...
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_parse_log_entries_from_changelog(self): changelog_file = StringIO(self._example_changelog) parsed_entries = list(ChangeLog.parse_entries_from_file(changelog_file)) self.assertEqual(len(parsed_entries), 9) self.assertEqual(parsed_entries[0].date_line(), u"2009-08-17 Tor Arne Ves...
21,536
[ 0.009424833580851555, 0.008481177501380444, 0.041286397725343704, -0.0037101490888744593, -0.0030771377496421337, 0.017782926559448242, 0.025132888928055763, -0.047171056270599365, -0.016516903415322304, 0.01458270289003849, 0.048671528697013855, 0.05106290429830551, -0.030806545168161392, ...
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_parse_bug_id_from_changelog(self): commit_text = ''' 2011-03-23 Ojan Vafai <ojan@chromium.org> Add failing result for WebKit2. All tests that require focus fail on WebKit2. See https://bugs.webkit.org/show_bug.cgi?id=56988. * platform/mac-wk2/fast/css/pseudo-any-expected.txt...
21,537
[ 0.011936736293137074, 0.04089963436126709, 0.002473706379532814, -0.019068073481321335, -0.005999073851853609, 0.001218621851876378, -0.0257925633341074, 0.005611417815089226, 0.024856047704815865, -0.006471169646829367, 0.035434067249298096, -0.02215396985411644, -0.025224512442946434, 0....
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_parse_reviewer_text(self): self._assert_parse_reviewer_text_and_list(' reviewed by Ryosuke Niwa, Oliver Hunt, and Dimitri Glazkov', 'Ryosuke Niwa, Oliver Hunt, and Dimitri Glazkov', ['Ryosuke Niwa', 'Oliver Hunt', 'Dimitri Glazkov']) self._assert_parse_reviewer_text_and_list('R...
21,538
[ 0.026391617953777313, 0.0341072715818882, 0.022827599197626114, -0.07214901596307755, -0.001995977945625782, 0.014805365353822708, 0.005090542137622833, -0.05636002868413925, -0.0066553885117173195, 0.007402682676911354, 0.01564846746623516, -0.024258317425847054, -0.009369919076561928, 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_parse_log_entries_from_annotated_file(self): # Note that there are trailing spaces on some of the lines intentionally. changelog_file = StringIO(u"100000 ossy@webkit.org 2011-11-11 Csaba Osztrogon\u00e1c <ossy@webkit.org>\n" u"100000 ossy@webkit.org\n" u"100000 ossy@we...
21,539
[ 0.056353963911533356, -0.0033336891792714596, 0.014278685674071312, -0.00854466948658228, 0.02527475357055664, -0.04012402147054672, -0.04722462221980095, -0.018258685246109962, -0.002456680638715625, 0.005815024487674236, 0.03065655753016472, -0.027557088062167168, 0.019118081778287888, 0...
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_parse_authors(self): self._assert_parse_authors(u'Aaron Colwell <acolwell@chromium.org>', [(u'Aaron Colwell', u'acolwell@chromium.org')]) self._assert_parse_authors('Eric Seidel <eric@webkit.org>, Ryosuke Niwa <rniwa@webkit.org>', [('Eric Seidel', 'eric@webkit.org'), ('Ryosuke Ni...
21,540
[ 0.03854561224579811, 0.01258909609168768, 0.0201129037886858, -0.012224642559885979, -0.036840710788965225, 0.01590006612241268, -0.006566344294697046, 0.019099846482276917, 0.017493778839707375, 0.04259784519672394, 0.015739459544420242, -0.028464453294873238, -0.02115066908299923, 0.0051...
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_fuzzy_reviewer_match_initial(self): self._assert_fuzzy_reviewer_match('Reviewed by Alejandro G. Castro.', ['Alejandro G. Castro'], ['Alejandro G. Castro']) self._assert_fuzzy_reviewer_match('Reviewed by G. Alejandro G. Castro and others.', ['G. Alejandro G. Castro', 'oth...
21,541
[ 0.026069337502121925, 0.011841260828077793, 0.011005875654518604, 0.012908698059618473, -0.009679866023361683, 0.01751657947897911, -0.021043764427304268, 0.01179485023021698, 0.04741808399558067, 0.02112332358956337, 0.05781399458646774, -0.047524165362119675, -0.026984283700585365, 0.022...
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_has_valid_reviewer(self): self._assert_has_valid_reviewer("Reviewed by Eric Seidel.", True) self._assert_has_valid_reviewer("Reviewed by Eric Seidel", True) # Not picky about the '.' self._assert_has_valid_reviewer("Reviewed by Eric.", False) self._assert_has_valid_reviewer("Re...
21,542
[ 0.02603929117321968, 0.017702795565128326, 0.020706385374069214, -0.024678481742739677, 0.014466273598372936, 0.00725765572860837, -0.014883098192512989, -0.0086552444845438, -0.003782072337344289, 0.028049858286976814, 0.0289570651948452, 0.014429494738578796, 0.0007102878880687058, 0.023...
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_is_touched_files_text_clean(self): tests = [ ('''2013-01-30 Timothy Loh <timloh@chromium.com> Make ChangeLogEntry detect annotations by prepare-ChangeLog (Added/Removed/Copied from/Renamed from) as clean. https://bugs.webkit.org/show_bug.cgi?id=108433 * Scripts/webki...
21,543
[ 0.06728629022836685, 0.013910622335970402, 0.006763312499970198, -0.04385004937648773, 0.035600293427705765, 0.021119868382811546, -0.014889197424054146, -0.006366928108036518, -0.01637563854455948, 0.03515436127781868, 0.01881588250398636, -0.006893376354128122, -0.024253783747553825, 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_latest_entry_parse(self): changelog_contents = u"%s\n%s" % (self._example_entry, self._example_changelog) changelog_file = StringIO(changelog_contents) latest_entry = ChangeLog.parse_latest_entry_from_file(changelog_file) self.assertEqual(latest_entry.contents(), self._example_e...
21,544
[ 0.018406003713607788, 0.009250196628272533, 0.025916730985045433, -0.01786663383245468, 0.003974483348429203, -0.0021473669912666082, 0.015115845948457718, -0.030798031017184258, 0.029179921373724937, 0.03891554847359657, 0.030744094401597977, -0.03735137730836868, -0.011407677084207535, 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_set_reviewer(self): fs = MockFileSystem() changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_bugurl, self._example_changelog) reviewer_name = 'Test Reviewer' fs.write_text_file(self._changelog_path, changelog_contents) ChangeLog(self._changelog_path, fs)...
21,545
[ 0.04737594723701477, 0.026843873783946037, -0.0019474906148388982, -0.04962125048041344, -0.02791663073003292, -0.0002071839990094304, 0.002281168010085821, -0.023850133642554283, -0.011588270775973797, 0.03130953758955002, 0.03310578316450119, 0.00569434417411685, -0.04503084719181061, 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_delete_entries(self): fs = MockFileSystem() fs.write_text_file(self._changelog_path, self._example_changelog) ChangeLog(self._changelog_path, fs).delete_entries(8) actual_contents = fs.read_text_file(self._changelog_path) expected_contents = """2011-10-11 Antti Koivisto...
21,546
[ -0.008260181173682213, -0.005165101494640112, 0.0015956414863467216, -0.021124834194779396, -0.004282688722014427, -0.0132162906229496, 0.016321321949362755, -0.0530509352684021, 0.03248341381549835, 0.043895069509744644, 0.017157291993498802, -0.031050320714712143, -0.015206695534288883, ...
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_set_short_description_and_bug_url(self): fs = MockFileSystem() changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_bugurl, self._example_changelog) fs.write_text_file(self._changelog_path, changelog_contents) short_description = "A short description" bug_...
21,547
[ -0.03234907612204552, -0.01897767186164856, 0.06768213212490082, -0.03969600051641464, 0.005871888250112534, 0.030020665377378464, 0.01051175408065319, 0.026674987748265266, 0.033479370176792145, 0.012433256953954697, -0.000059517155023058876, -0.031060537323355675, 0.0777643695473671, -0....
8
{"_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_traverse_kwargs(): provider1 = providers.Object("bar") provider2 = providers.Object("baz") provider = providers.Callable(dict, foo="foo", bar=provider1, baz=provider2) all_providers = list(provider.traverse()) assert len(all_providers) == 2 assert provider1 in all_providers assert...
21,548
[ -0.034776534885168076, -0.021080845966935158, 0.08080228418111801, -0.03566824272274971, -0.0010960553772747517, 0.025265004485845566, -0.0006430572248063982, 0.012392427772283554, 0.04184159263968468, 0.019617533311247826, -0.0027994425036013126, -0.03411347046494484, 0.09154848754405975, ...
8
{"_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_traverse_args(): provider1 = providers.Object("bar") provider2 = providers.Object("baz") provider = providers.Callable(list, "foo", provider1, provider2) all_providers = list(provider.traverse()) assert len(all_providers) == 2 assert provider1 in all_providers assert provider2 in ...
21,549
[ -0.038367170840501785, -0.026803800836205482, 0.07876640558242798, -0.036818940192461014, 0.0077653611078858376, -0.0038826805539429188, 0.016740279272198677, 0.005352293141186237, 0.04475363716483116, -0.008684624917805195, 0.00451769819483161, -0.01563958264887333, 0.05878450721502304, -...
8
{"_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_traverse_provides(): provider1 = providers.Callable(list) provider2 = providers.Object("bar") provider3 = providers.Object("baz") provider = providers.Callable(provider1, provider2) provider.override(provider3) all_providers = list(provider.traverse()) assert len(all_providers) =...
21,550
[ -0.012493648566305637, -0.0201701819896698, 0.06796164810657501, -0.030041705816984177, 0.00540738832205534, 0.02052612602710724, 0.022341443225741386, -0.0025257221423089504, 0.020787153393030167, -0.018402324989438057, 0.01082070916891098, -0.02292281948029995, 0.061934325844049454, -0.0...
8
{"_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_traverse_overridden(): provider1 = providers.Object("bar") provider2 = providers.Object("baz") provider = providers.Callable(dict, "foo") provider.override(provider1) provider.override(provider2) all_providers = list(provider.traverse()) assert len(all_providers) == 2 assert ...
21,551
[ 0.021711625158786774, 0.01602359488606453, 0.04755747318267822, 0.03401719033718109, -0.03407268226146698, -0.0012347185984253883, 0.041120290756225586, -0.017258314415812492, 0.0020567080937325954, 0.031159302219748497, 0.002628979505971074, 0.015524158254265785, -0.007415248081088066, 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 __init__(self): self.verbosity = 0 self.color = True self.warnings = [] self.warnings_unique = set() self.info_stderr = False self.rows = 0 self.columns = 0 self.truncate = 0 self.redact = False self.sensitive = set() if os.isa...
21,552
[ 0.03436486795544624, -0.029182182624936104, -0.005395047832280397, -0.0316767543554306, -0.008596593514084816, -0.024343574419617653, 0.021709222346544266, -0.056213874369859695, -0.03539710491895676, 0.01223630178719759, 0.009919146075844765, -0.02161244861781597, -0.004209589213132858, 0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"op": {"_type": "Mult", "_fields": {}}, "left": {"_type": "Constant", "_fields": {"kind": null, "value": 34}}, "right": {"_type": "Constant", "_fields": {"kind": nu...
class StreamInfo(FieldSet): static_size = 34*8 def createFields(self): yield UInt16(self, "min_block_size", "The minimum block size (in samples) used in the stream") yield UInt16(self, "max_block_size", "The maximum block size (in samples) used in the stream") yield UInt24(self, "min_fra...
21,553
[ 0.03852269425988197, -0.004166844766587019, 0.0025925454683601856, -0.026258232071995735, 0.0021374633070081472, -0.027919283136725426, 0.04851174354553223, -0.025416331365704536, -0.0256893802434206, 0.024142101407051086, 0.012116558849811554, -0.009807017631828785, -0.021536756306886673, ...
9
{"_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": "kw", "annotation": null, "type_comment": null}}, "varar...
def __init__(self, *args, **kw): FieldSet.__init__(self, *args, **kw) self._size = 32 + self["metadata_length"].value * 8 try: key = self["block_type"].value self._name, self._description, self.handler = self.BLOCK_TYPES[key] except KeyError: self.hand...
21,554
[ 0.03663120046257973, -0.02072584070265293, 0.002890621544793248, -0.01784910261631012, -0.013961618766188622, -0.04793822392821312, -0.013295193202793598, -0.030588939785957336, -0.013894976116716862, 0.0005393883329816163, 0.01900424063205719, -0.006586507428437471, -0.03438756614923477, ...
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 createFields(self): yield UInt16(self, "min_block_size", "The minimum block size (in samples) used in the stream") yield UInt16(self, "max_block_size", "The maximum block size (in samples) used in the stream") yield UInt24(self, "min_frame_size", "The minimum frame size (in bytes) used in th...
21,555
[ 0.07736525684595108, 0.03403359651565552, 0.006834524683654308, -0.026359353214502335, 0.004699083045125008, -0.0397503525018692, 0.01587122306227684, -0.03825999051332474, -0.012245421297848225, 0.035679664462804794, 0.026248132809996605, 0.003219845239073038, -0.014625548385083675, -0.05...
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 createFields(self): yield Bit(self, "last_metadata_block", "True if this is the last metadata block") yield Enum(Bits(self, "block_type", 7, "Metadata block header type"), self.BLOCK_TYPE_DESC) yield UInt24(self, "metadata_length", "Length of following metadata in bytes (doesn't include this...
21,556
[ 0.022300157696008682, -0.02477014809846878, 0.01984187215566635, -0.04216544330120087, 0.01918632909655571, -0.003930329345166683, -0.0016769015928730369, -0.04289122298359871, -0.01062330324202776, 0.004541974514722824, 0.04410865902900696, -0.017922068014740944, 0.02028670534491539, 0.00...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Constant", "_fields":...
class Frame(FieldSet): SAMPLE_RATES = { 0: "get from STREAMINFO metadata block", 1: "88.2kHz", 2: "176.4kHz", 3: "192kHz", 4: "8kHz", 5: "16kHz", 6: "22.05kHz", 7: "24kHz", 8: "32kHz", 9: "44.1kHz", 10: "48kHz", 11: "96k...
21,557
[ 0.04928602650761604, -0.020749442279338837, 0.0011587648186832666, -0.02362995222210884, -0.000025197794457199052, -0.043329715728759766, 0.008025151677429676, -0.03339439630508423, -0.021249869838356972, 0.010563907213509083, 0.038740430027246475, 0.0054253689013421535, 0.004976814612746239...
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 createFields(self): yield Bits(self, "sync", 14, "Sync code: 11111111111110") yield Bit(self, "reserved[]") yield Bit(self, "blocking_strategy") yield Bits(self, "block_size", 4) yield Enum(Bits(self, "sample_rate", 4), self.SAMPLE_RATES) yield Bits(self, "channel_ass...
21,558
[ 0.04287359490990639, 0.007776648737490177, 0.009460077621042728, -0.050015415996313095, 0.021187400445342064, -0.015111184678971767, 0.028952712193131447, 0.016244806349277496, 0.01766183413565159, 0.05282679945230484, 0.03570910170674324, 0.044437993317842484, -0.04579833894968033, 0.0392...
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": "teststr", "annotation": null, "type_comment": null}}, {"_type": "...
def validate_output(self, teststr, expected_out, r, w, e=None): w.write(teststr) w.close() got = r.read() self.assertEqual(expected_out, got.strip(), "wrote %r read %r" % (teststr, got)) if e is not None: got = e.read() self.asser...
21,559
[ -0.006502332631498575, 0.023698857054114342, 0.030278204008936882, -0.045505326241254807, 0.045989423990249634, -0.010364123620092869, 0.03131241723895073, 0.01589825749397278, 0.04244669899344444, 0.009648977778851986, 0.0018373765051364899, 0.016558393836021423, 0.047177668660879135, 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_os_popen3(self): # same test as test_popen3(), but using the os.popen*() API if os.name == 'posix': w, r, e = os.popen3([self.cmd]) self.validate_output(self.teststr, self.expected, r, w, e) w, r, e = os.popen3(["echo", self.teststr]) got = r.rea...
21,560
[ -0.0011219397420063615, 0.02547006867825985, 0.02309342287480831, -0.04791149124503136, 0.04029781371355057, 0.004918920341879129, 0.03369368240237236, 0.01938122883439064, 0.04246413707733154, 0.026626843959093094, 0.013649937696754932, 0.006109871901571751, 0.04946788027882576, 0.0401716...
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_os_popen2(self): # same test as test_popen2(), but using the os.popen*() API if os.name == 'posix': w, r = os.popen2([self.cmd]) self.validate_output(self.teststr, self.expected, r, w) w, r = os.popen2(["echo", self.teststr]) got = r.read() ...
21,561
[ 0.026094211265444756, 0.016041705384850502, 0.03179397061467171, 0.011087813414633274, 0.012635208666324615, 0.007859434001147747, -0.0023600566200912, -0.045998841524124146, -0.011566503904759884, -0.004500249400734901, -0.029901472851634026, -0.04265913739800453, -0.06536911427974701, 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}}, {"_type": "arg", "_fields": {"arg": "raw_messages", "annota...
class ParserWhatsapp: def __init__(self, raw_messages): self.raw_messages = raw_messages def parse(self): list_of_messages = [] set_of_senders = set() for l in self.raw_messages: msg_date, sep, msg = l.partition(": ") raw_date, sep, time = msg_date.parti...
21,562
[ 0.014404065907001495, 0.046297162771224976, 0.02120913751423359, -0.002699344651773572, 0.04876967519521713, -0.0037512951530516148, 0.02495192550122738, 0.020188376307487488, 0.030191829428076744, 0.0211184024810791, 0.034501709043979645, 0.014767003245651722, 0.03724642097949982, 0.01541...
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_os_popen4(self): if os.name == 'posix': w, r = os.popen4([self.cmd]) self.validate_output(self.teststr, self.expected, r, w) w, r = os.popen4(["echo", self.teststr]) got = r.read() self.assertEqual(got, self.teststr + "\n") w, r = os...
21,563
[ -0.007844251580536366, -0.0011975287925451994, 0.02779722586274147, -0.014200521633028984, -0.022147206589579582, -0.016594231128692627, -0.0039329081773757935, -0.0018222385551780462, 0.0029732680413872004, 0.012626280076801777, -0.015623808838427067, -0.01587180607020855, -0.00161198026034...
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 update_pipeline(self): # Do nothing if there is no input. inputs = self.inputs if len(inputs) == 0: return inp = inputs[0].outputs[0] if inp.is_a('vtkImageData') or inp.is_a('vtkRectilinearGrid'): error('Transformation not supported for '\ ...
21,564
[ 0.014656621031463146, -0.004948648624122143, 0.05592351406812668, -0.03238903358578682, 0.03746875375509262, 0.018140189349651337, -0.0246762502938509, -0.03849402070045471, 0.0027655926533043385, -0.01985284686088562, -0.03353080898523331, 0.005901095923036337, -0.030804535374045372, 0.01...
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 parse(self): list_of_messages = [] set_of_senders = set() for l in self.raw_messages: msg_date, sep, msg = l.partition(": ") raw_date, sep, time = msg_date.partition(" ") sender, sep, content = msg.partition(": ") raw_date = raw_date.replace(",...
21,565
[ 0.03308126702904701, 0.026578696444630623, -0.007315394002944231, 0.0017990071792155504, 0.02771550975739956, 0.015756232663989067, 0.02521451935172081, 0.029511675238609314, -0.0021812606137245893, 0.03496837988495827, 0.012152534909546375, -0.015665287151932716, -0.021656295284628868, 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 update_data(self): # Do nothing if there is no input. if len(self.inputs) == 0: return self.filter.update() # Propagate the data_changed event. self.data_changed = True
21,566
[ 0.017673684284090996, 0.04900750517845154, -0.01700475998222828, -0.002479127375409007, -0.04055793583393097, 0.003227266250178218, 0.028024407103657722, 0.007510728668421507, -0.029338784515857697, 0.041825372725725174, 0.00738750584423542, -0.021710701286792755, -0.014704599045217037, -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": "obj", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def _on_interaction_event(self, obj, event): tfm = self._transform self.widget.get_transform(tfm) f = self.filter f.transform = tfm f.update() self.render() recorder = self.recorder if recorder is not None: state = {} state['element...
21,567
[ 0.016793467104434967, 0.03628426417708397, -0.01650817319750786, -0.026091471314430237, -0.0024849793408066034, 0.017584510147571564, 0.0340019091963768, 0.022979168221354485, -0.000606655899900943, 0.037762608379125595, 0.023796148598194122, -0.01744186319410801, 0.016858305782079697, 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}}, {"_type": "arg", "_fields": {"arg": "old", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def _filter_changed(self, old, new): if old is not None: old.on_trait_change(self.render, remove=True) new.on_trait_change(self.render) transform = self.transform if transform is not None: new.transform = transform if len(self.inputs) > 0: self...
21,568
[ 0.04620904102921486, 0.039363257586956024, -0.020688362419605255, -0.019593538716435432, -0.0212546493858099, 0.03216511756181717, 0.033146683126688004, -0.012558992952108383, 0.02821369096636772, 0.0309318695217371, 0.004404456354677677, -0.02680426463484764, 0.005848489236086607, 0.01395...
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": "old", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def _widget_changed(self, old, new): if old is not None: old.on_trait_change(self.render, remove=True) old.remove_observer(self._observer_id) self.widgets.remove(old) new.on_trait_change(self.render) self._observer_id = new.add_observer(self.update_mode_, ...
21,569
[ 0.026260273531079292, 0.0034814756363630295, 0.04047038033604622, -0.027124248445034027, 0.030420992523431778, 0.025805551558732986, -0.03183063492178917, 0.0017222646856680512, 0.04449468106031418, 0.025032520294189453, 0.01970089040696621, -0.0623425729572773, 0.039038002490997314, -0.00...
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 _common_args(self): return { 'name': self.module.params.get('name'), 'account': self.get_account(key='name'), 'domainid': self.get_domain(key='id'), 'projectid': self.get_project(key='id'), 'cidrlist': ','.join(self.module.params.get('cidrs')) if s...
21,570
[ -0.01004182081669569, -0.020010611042380333, 0.011052088811993599, -0.01016354002058506, -0.0025926155503839254, 0.006116381846368313, -0.028579631820321083, -0.010619986802339554, 0.04255297780036926, 0.038804031908512115, -0.016772884875535965, -0.04384319856762886, 0.012890046462416649, ...
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}}, {"_type": "arg", "_fields": {"arg": "module", "annotation":...
class AnsibleCloudStackVpnCustomerGateway(AnsibleCloudStack): def __init__(self, module): super(AnsibleCloudStackVpnCustomerGateway, self).__init__(module) self.returns = { 'dpd': 'dpd', 'esplifetime': 'esp_lifetime', 'esppolicy': 'esp_policy', 'gatew...
21,571
[ -0.026379581540822983, 0.0011020629899576306, 0.005648156628012657, -0.0013118516653776169, 0.005290440283715725, -0.033135853707790375, -0.0023022962268441916, 0.021075693890452385, 0.03221062943339348, 0.06696024537086487, -0.00709516042843461, -0.03918207064270973, 0.021947123110294342, ...
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 present_vpn_customer_gateway(self): vpn_customer_gateway = self.get_vpn_customer_gateway() required_params = [ 'cidrs', 'esp_policy', 'gateway', 'ike_policy', 'ipsec_psk', ] self.module.fail_on_missing_params(required_params...
21,572
[ -0.02340904250741005, -0.010120178572833538, 0.0045878831297159195, 0.001486288383603096, 0.005780010484158993, -0.049914516508579254, -0.024833401665091515, 0.01944560557603836, 0.03166620060801506, 0.02361547015607357, -0.008659694343805313, -0.023842543363571167, -0.0014424221590161324, ...
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 get_vpn_customer_gateway(self): args = { 'account': self.get_account(key='name'), 'domainid': self.get_domain(key='id'), 'projectid': self.get_project(key='id'), 'fetch_list': True, } vpn_customer_gateway = self.module.params.get('name') ...
21,573
[ 0.002497316338121891, 0.0071261730045080185, -0.020219512283802032, 0.01181957870721817, 0.004002017434686422, 0.0010779628064483404, 0.008130263537168503, 0.010723685845732689, 0.0284817423671484, 0.03300301730632782, -0.012978585436940193, -0.0160654466599226, 0.00025066398666240275, 0.0...
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": "vpn_customer_gateway", "annotation": null, "type_comment": null}}...
def _update_vpn_customer_gateway(self, vpn_customer_gateway): args = self._common_args() args.update({'id': vpn_customer_gateway['id']}) if self.has_changed(args, vpn_customer_gateway, skip_diff_for_keys=['ipsecpsk']): self.result['changed'] = True if not self.module.chec...
21,574
[ -0.00007931095751700923, 0.009431387297809124, -0.01686101220548153, 0.019698677584528923, 0.005961297079920769, -0.013143450021743774, -0.004800933878868818, 0.015233203768730164, 0.059261009097099304, 0.022657327353954315, -0.01984165981411934, -0.0005471854819916189, 0.028992580249905586,...
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": "vpn_customer_gateway", "annotation": null, "type_comment": null}}...
def _create_vpn_customer_gateway(self, vpn_customer_gateway): self.result['changed'] = True args = self._common_args() if not self.module.check_mode: res = self.query_api('createVpnCustomerGateway', **args) poll_async = self.module.params.get('poll_async') if ...
21,575
[ -0.009373175911605358, -0.03165481984615326, 0.014524933882057667, -0.006541453767567873, -0.013803920708596706, -0.0026136741507798433, -0.016769379377365112, 0.00005087797035230324, 0.023432940244674683, 0.04602857306599617, -0.00479706609621644, -0.021862991154193878, -0.00185631914064288...
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": "vpn_customer_gateway", "annotation": null, "type_comment": null}}...
def get_result(self, vpn_customer_gateway): super(AnsibleCloudStackVpnCustomerGateway, self).get_result(vpn_customer_gateway) if vpn_customer_gateway: if 'cidrlist' in vpn_customer_gateway: self.result['cidrs'] = vpn_customer_gateway['cidrlist'].split(',') or [vpn_customer_ga...
21,576
[ -0.03263906389474869, 0.025922810658812523, -0.02577785588800907, 0.013867374509572983, -0.004206718876957893, 0.01149977371096611, -0.016971830278635025, 0.021320484578609467, 0.0518939383327961, 0.04254433140158653, -0.0016156458295881748, -0.00506738992407918, 0.03737426549196243, 0.013...
11
{"_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 absent_vpn_customer_gateway(self): vpn_customer_gateway = self.get_vpn_customer_gateway() if vpn_customer_gateway: self.result['changed'] = True args = { 'id': vpn_customer_gateway['id'] } if not self.module.check_mode: ...
21,577
[ -0.012776099145412445, 0.013735751621425152, 0.01425604522228241, 0.00911670085042715, -0.015319756232202053, 0.02319353260099888, -0.01786341518163681, -0.004607488866895437, 0.06983496248722076, 0.07788217067718506, 0.018661197274923325, -0.09286662936210632, 0.047913260757923126, 0.0209...
10
{"_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 main(): argument_spec = cs_argument_spec() argument_spec.update(dict( name=dict(required=True), state=dict(choices=['present', 'absent'], default='present'), domain=dict(), account=dict(), project=dict(), cidrs=dict(type='list', aliases=['cidr']), esp_...
21,578
[ 0.02697371505200863, 0.015465536154806614, 0.0027860708069056273, 0.017580676823854446, 0.043758369982242584, 0.01432836428284645, -0.00698223477229476, 0.006413648836314678, -0.004085289780050516, -0.002942431950941682, 0.008130778558552265, 0.009103059768676758, -0.0005195453413762152, -...
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): Task.__init__(self) # call our superconstructor self.sockets = self.get_sockets() # ... the sockets to listen to events on # Note! We can't start our event loop until the core is up. Therefore, # we'll add an event handler. core.addListener(pox.core.GoingUpEvent, sel...
21,579
[ 0.04557804390788078, -0.019159244373440742, 0.07239599525928497, -0.03315447270870209, -0.0007682875148020685, 0.015741514042019844, -0.012604436837136745, 0.009093157015740871, -0.021641463041305542, -0.011269776150584221, 0.02482219785451889, -0.020506378263235092, 0.02814013883471489, 0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "r1"}}, {"_type": "Constant", "_fields": {"kind": null, "v...
class BigtableOpsTest(test.TestCase): COMMON_ROW_KEYS = ["r1", "r2", "r3"] COMMON_VALUES = ["v1", "v2", "v3"] def setUp(self): self._client = gen_bigtable_test_ops.bigtable_test_client() table = gen_bigtable_ops.bigtable_table(self._client, "testtable") self._table = bigtable.BigtableTable("testtable...
21,580
[ 0.07116325944662094, 0.02243189699947834, 0.0069984570145606995, -0.04712294414639473, 0.03661298006772995, 0.003229112597182393, 0.017238304018974304, 0.03165267035365105, -0.019190505146980286, -0.022812513634562492, 0.0027379929088056087, -0.013444404117763042, -0.026495913043618202, 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": "read_ds", "annotation": null, "type_comment": null}}], "kwarg": n...
def runReadKeyTest(self, read_ds): itr = read_ds.make_initializable_iterator() n = itr.get_next() expected = list(self.COMMON_ROW_KEYS) expected.reverse() with self.cached_session() as sess: self._writeCommonValues(sess) sess.run(itr.initializer) for i in range(3): output =...
21,581
[ 0.05982435494661331, 0.014625905081629753, 0.037469711154699326, -0.05366092920303345, 0.02292940765619278, -0.019456366077065468, 0.012632574886083603, 0.00009147878154180944, -0.021682048216462135, -0.02971651218831539, 0.01008282508701086, -0.026023348793387413, -0.006129794754087925, 0...
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": "read_ds", "annotation": null, "type_comment": null}}], "kwarg": n...
def runScanTest(self, read_ds): itr = read_ds.make_initializable_iterator() n = itr.get_next() expected_keys = list(self.COMMON_ROW_KEYS) expected_keys.reverse() expected_values = list(self.COMMON_VALUES) expected_values.reverse() with self.cached_session() as sess: self._writeCommonVa...
21,582
[ 0.056751273572444916, -0.011680759489536285, 0.0819852352142334, -0.03139164671301842, 0.015670690685510635, 0.005884363315999508, 0.0057932548224925995, 0.0353124625980854, -0.010474354960024357, -0.0005462592816911638, 0.026515763252973557, -0.04805510863661766, 0.027370300143957138, 0.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 testLookup(self): ds = self._table.keys_by_prefix_dataset("r") ds = ds.apply(self._table.lookup_columns(cf1="c1")) itr = ds.make_initializable_iterator() n = itr.get_next() expected_keys = list(self.COMMON_ROW_KEYS) expected_values = list(self.COMMON_VALUES) expected_tuples = zip(expecte...
21,583
[ 0.06094101443886757, -0.033676620572805405, 0.047321245074272156, -0.060145698487758636, 0.0012613199651241302, -0.008586917072534561, 0.01138294581323862, 0.037379804998636246, 0.02111312933266163, -0.011501001194119453, 0.01723596826195717, -0.05368376523256302, -0.005253428593277931, -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": "ds", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def runSampleKeyPairsTest(self, ds, expected_key_pairs): itr = ds.make_initializable_iterator() n = itr.get_next() with self.cached_session() as sess: self._writeCommonValues(sess) sess.run(itr.initializer) for i, elems in enumerate(expected_key_pairs): output = sess.run(n) ...
21,584
[ 0.09181420505046844, -0.008042532950639725, 0.07076926529407501, -0.026519639417529106, 0.02893051505088806, -0.019073547795414925, 0.008080202154815197, 0.017390957102179527, -0.009988812729716301, -0.042466580867767334, 0.013297488912940025, -0.049623869359493256, -0.00016048965335357934, ...
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 testSampleKeys(self): ds = self._table.sample_keys() itr = ds.make_initializable_iterator() n = itr.get_next() expected_key = self.COMMON_ROW_KEYS[0] with self.cached_session() as sess: self._writeCommonValues(sess) sess.run(itr.initializer) output = sess.run(n) self.asse...
21,585
[ 0.06465622037649155, 0.005771595984697342, 0.06924719363451004, -0.030749963596463203, -0.00590908620506525, -0.004109758883714676, 0.0015766529832035303, -0.0014578435802832246, -0.03383452445268631, -0.016702059656381607, 0.026804594323039055, 0.00013067165855318308, 0.031802061945199966, ...
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 testParallelScanRange(self): ds = self._table.parallel_scan_range(start="r1", end="r4", cf1="c1") itr = ds.make_initializable_iterator() n = itr.get_next() with self.cached_session() as sess: self._writeCommonValues(sess) sess.run(itr.initializer) expected_values = list(zip(self.CO...
21,586
[ 0.07283120602369308, -0.010307570919394493, 0.06124664470553398, -0.01923428103327751, 0.0037271003238856792, 0.010796370916068554, 0.024195602163672447, 0.04193904250860214, -0.013637521304190159, -0.015739360824227333, 0.008700640872120857, 0.013710840605199337, 0.041450243443250656, -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 testParallelScanPrefix(self): ds = self._table.parallel_scan_prefix(prefix="r", cf1="c1") itr = ds.make_initializable_iterator() n = itr.get_next() with self.cached_session() as sess: self._writeCommonValues(sess) sess.run(itr.initializer) expected_values = list(zip(self.COMMON_ROW...
21,587
[ 0.006031343713402748, -0.04452734440565109, -0.020689859986305237, -0.020689859986305237, 0.02445165254175663, -0.009922687895596027, 0.004198429640382528, 0.015757305547595024, -0.01316627487540245, 0.05278025567531586, 0.02733057551085949, -0.015786094591021538, 0.03928770497441292, 0.01...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "seq", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def flatten(seq): l = [] for elt in seq: t = type(elt) if t is tuple or t is list: for elt2 in flatten(elt): l.append(elt2) else: l.append(elt) return l
21,588
[ -0.010243983939290047, -0.01864519529044628, -0.039053041487932205, 0.009643079712986946, -0.013448805548250675, 0.016676519066095352, -0.017958447337150574, 0.015280132181942463, -0.005986149422824383, 0.007399704772979021, 0.004850154276937246, -0.040334973484277725, 0.029942192137241364, ...
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 TestPluginPiczel(unittest.TestCase): def test_can_handle_url(self): should_match = [ 'https://piczel.tv/watch/example', ] for url in should_match: self.assertTrue(Piczel.can_handle_url(url)) def test_can_handle_url_negative(self): should_not_match =...
21,589
[ 0.006719093769788742, 0.02533375471830368, -0.004418741445988417, -0.04282404109835625, 0.03474157303571701, 0.012210608460009098, -0.03487193584442139, -0.01558916736394167, -0.04089033231139183, 0.030982790514826775, -0.03198223561048508, -0.011298072524368763, 0.013362143188714981, 0.00...
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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class And(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelist)...
21,590
[ 0.011685114353895187, -0.01164270006120205, 0.023327814415097237, -0.04542561620473862, -0.0013002605410292745, 0.0014394321478903294, -0.030326157808303833, -0.018800096586346626, -0.039487626403570175, 0.04186282306909561, -0.007947362028062344, -0.03509775549173355, -0.010492214001715183,...
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}}, {"_type": "arg", "_fields": {"arg": "leftright", "annotatio...
class Add(Node): def __init__(self, leftright, lineno=None): self.left = leftright[0] self.right = leftright[1] self.lineno = lineno def getChildren(self): return self.left, self.right def getChildNodes(self): return self.left, self.right def __repr__(self): ...
21,591
[ 0.017525825649499893, 0.03977375850081444, 0.007406188640743494, -0.050322145223617554, 0.01895890384912491, -0.01097126118838787, -0.03784732520580292, -0.04708009958267212, -0.01228687260299921, 0.03540404886007309, -0.020298007875680923, -0.042311009019613266, 0.024738196283578873, 0.00...
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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class AssAttr(Node): def __init__(self, expr, attrname, flags, lineno=None): self.expr = expr self.attrname = attrname self.flags = flags self.lineno = lineno def getChildren(self): return self.expr, self.attrname, self.flags def getChildNodes(self): return ...
21,592
[ -0.011788155883550644, 0.011234921403229237, 0.03825831040740013, -0.0447269007563591, 0.020618634298443794, -0.021469764411449432, -0.07549526542425156, -0.02612970396876335, -0.013139325194060802, 0.039449892938137054, -0.033747319132089615, -0.005532347597181797, 0.03974778950214386, -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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class AssList(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodel...
21,593
[ -0.024558354169130325, -0.004220967181026936, 0.04360360652208328, -0.029444964602589607, 0.039949093014001846, -0.030593527480959892, -0.05479687079787254, -0.033767737448215485, 0.00013263938308227807, 0.00529904942959547, -0.04293535277247429, -0.01274904329329729, 0.06461185961961746, ...
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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class AssTuple(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(node...
21,594
[ 0.03429603949189186, 0.016813267022371292, 0.017234407365322113, -0.022050539031624794, 0.010506941936910152, -0.017191214486956596, -0.0641430988907814, -0.06595724821090698, 0.004689249210059643, 0.014167633838951588, -0.029587892815470695, -0.01631653495132923, 0.04496495798230171, 0.00...
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}}, {"_type": "arg", "_fields": {"arg": "name", "annotation": n...
class AssName(Node): def __init__(self, name, flags, lineno=None): self.name = name self.flags = flags self.lineno = lineno def getChildren(self): return self.name, self.flags def getChildNodes(self): return () def __repr__(self): return "AssName(%s, %s...
21,595
[ -0.004751686938107014, 0.033623144030570984, -0.004792438820004463, -0.05520541965961456, 0.05403175950050354, -0.02445121854543686, -0.008595962077379227, -0.00013558540376834571, -0.03136276453733444, 0.0525972880423069, 0.0011498865205794573, 0.0021313312463462353, 0.02599436230957508, ...
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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Assign(Node): def __init__(self, nodes, expr, lineno=None): self.nodes = nodes self.expr = expr self.lineno = lineno def getChildren(self): children = [] children.extend(flatten(self.nodes)) children.append(self.expr) return tuple(children) def...
21,596
[ -0.010835262015461922, 0.017992595210671425, 0.00348462862893939, -0.032996874302625656, 0.019016563892364502, -0.022610902786254883, 0.0015960329910740256, -0.023676667362451553, -0.004916095174849033, 0.07134345918893814, 0.016070041805505753, 0.01824336312711239, 0.00624829949811101, -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}}, {"_type": "arg", "_fields": {"arg": "test", "annotation": n...
class Assert(Node): def __init__(self, test, fail, lineno=None): self.test = test self.fail = fail self.lineno = lineno def getChildren(self): children = [] children.append(self.test) children.append(self.fail) return tuple(children) def getChildNode...
21,597
[ -0.006310102995485067, 0.012895997613668442, 0.005741973407566547, -0.04549451917409897, -0.012333383783698082, -0.019459828734397888, -0.03362446650862694, -0.00006687937275273725, -0.04792148247361183, 0.02146758884191513, -0.02221774123609066, 0.01660263165831566, 0.03527921438217163, -...
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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Bitand(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodeli...
21,598
[ 0.025256799533963203, 0.04995472729206085, -0.011983545497059822, -0.0393146276473999, 0.017077894881367683, -0.013799885287880898, 0.02152739092707634, -0.02094702236354351, -0.022935323417186737, 0.04266786947846413, 0.00870016124099493, 0.022290470078587532, 0.0179914403706789, -0.01822...
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}}, {"_type": "arg", "_fields": {"arg": "node", "annotation": n...
class AugAssign(Node): def __init__(self, node, op, expr, lineno=None): self.node = node self.op = op self.expr = expr self.lineno = lineno def getChildren(self): return self.node, self.op, self.expr def getChildNodes(self): return self.node, self.expr ...
21,599
[ -0.010286981239914894, 0.024812927469611168, -0.007316495291888714, -0.03596697002649307, 0.020188601687550545, -0.015371597371995449, -0.012738301418721676, -0.0009138928726315498, -0.043674178421497345, 0.0089061064645648, -0.02149454690515995, 0.013583953492343426, 0.03956366702914238, ...
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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Bitxor(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodeli...
21,600
[ 0.000004982501195627265, 0.03603833541274071, 0.01597610116004944, -0.05640200152993202, -0.0027478113770484924, -0.03163960203528404, -0.041955407708883286, 0.00929985474795103, -0.04925685375928879, 0.017673073336482048, -0.037020791321992874, 0.0031371659133583307, 0.007831750437617302, ...
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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Bitor(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelis...