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
16,701
[ 0.04534200206398964, 0.03137527033686638, 0.008529683575034142, -0.03386932983994484, -0.024479195475578308, -0.0018331337487325072, 0.03127550706267357, 0.03501659631729126, 0.024953065440058708, -0.008934968151152134, 0.029255319386720657, -0.004517365247011185, 0.024566486477851868, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vm", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def access_prologue(args, vm, outs, escape = True): token = None eof = '\'EOI\'' if escape else 'EOI' if args.namespaces: scriptname = '.%s.initscript' % vm['name'] outs += 'cat > %(script)s << %(eof)s\n' % {'script': scriptname, 'eof': eof} outs += '#!/bin/bash\n' token = sc...
16,702
[ -0.0030360498931258917, -0.0058572920970618725, 0.027955258265137672, -0.022461021319031715, 0.001813763752579689, 0.056297775357961655, 0.021117717027664185, 0.008126388303935528, 0.004607777111232281, 0.09855741262435913, 0.017233025282621384, -0.022182678803801537, -0.029480090364813805, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "graph", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "node", "annotation": null, "type_comment": null}}, {"_type": "ar...
def graph_node_depth(graph, node, ub): frontier = FrontierSet() marked = set() frontier.add(node) marked.add(node) level = 0 while not frontier.empty(): new_frontier = FrontierSet() level += 1 if level == ub: return level # not worth going on while no...
16,703
[ 0.0485590323805809, 0.02144872024655342, -0.0005671798717230558, -0.07482010871171951, 0.005966446362435818, 0.0501704104244709, -0.006456391420215368, -0.0081712007522583, 0.02027285285294056, 0.04246193543076515, 0.037148747593164444, -0.06698098033666611, -0.023321401327848434, -0.01671...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "iam", "annotation": null, "type_comment": null}}, {"_type": "ar...
def delete_oldest_non_default_version(module, iam, policy): try: versions = [v for v in iam.list_policy_versions(PolicyArn=policy['Arn'])['Versions'] if not v['IsDefaultVersion']] except botocore.exceptions.ClientError as e: module.fail_json(msg="Couldn't list policy versions...
16,704
[ 0.027913173660635948, 0.022326191887259483, -0.0033913201186805964, -0.009847871959209442, 0.003483711974695325, 0.020652269944548607, -0.02110879495739937, 0.032913196831941605, 0.048174139112234116, 0.01992400549352169, 0.02400011196732521, -0.05721765756607056, -0.010423962026834488, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "iam", "annotation": null, "type_comment": null}}, {"_type": "ar...
def get_policy_by_name(module, iam, name): try: response = list_policies_with_backoff(iam) except botocore.exceptions.ClientError as e: module.fail_json(msg="Couldn't list policies: %s" % str(e), exception=traceback.format_exc(), **camel_dict_to_...
16,705
[ 0.015315143391489983, 0.0018968296935781837, 0.004301642067730427, -0.007992624305188656, 0.021519018337130547, 0.03452121838927269, 0.02946300618350506, -0.005252758972346783, 0.04277864098548889, 0.007360347546637058, -0.0013746611075475812, -0.04344874620437622, -0.009846220724284649, -...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "iam", "annotation": null, "type_comment": null}}, {"_type": "ar...
def set_if_default(module, iam, policy, policy_version, is_default): if is_default and not policy_version['IsDefaultVersion']: try: iam.set_default_policy_version(PolicyArn=policy['Arn'], VersionId=policy_version['VersionId']) except botocore.exceptions.ClientError as e: modu...
16,706
[ 0.04281337559223175, 0.009946429170668125, 0.00024091635714285076, -0.057996541261672974, 0.015710199251770973, 0.03651135414838791, 0.02107028104364872, -0.013759040273725986, 0.02850487269461155, 0.05880391597747803, 0.024557700380682945, -0.03790183737874031, -0.0035154514480382204, -0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "iam", "annotation": null, "type_comment": null}}, {"_type": "ar...
def get_or_create_policy_version(module, iam, policy, policy_document): try: versions = iam.list_policy_versions(PolicyArn=policy['Arn'])['Versions'] except botocore.exceptions.ClientError as e: module.fail_json(msg="Couldn't list policy versions: %s" % str(e), exception...
16,707
[ 0.025246478617191315, 0.05295158550143242, 0.04354960843920708, 0.018109625205397606, -0.02731810137629509, 0.05017424747347832, -0.01660712994635105, 0.046987134963274, 0.04118203744292259, 0.046258650720119476, 0.029890555888414383, -0.0688416138291359, 0.000854402082040906, -0.053907718...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "iam", "annotation": null, "type_comment": null}}, {"_type": "ar...
def detach_all_entities(module, iam, policy, **kwargs): try: entities = iam.list_entities_for_policy(PolicyArn=policy['Arn'], **kwargs) except botocore.exceptions.ClientError as e: module.fail_json(msg="Couldn't detach list entities for policy %s: %s" % (policy['PolicyName'], str(e)), ...
16,708
[ 0.04319005087018013, 0.004295659251511097, -0.00025972395087592304, -0.04510442167520523, 0.0021916034165769815, 0.054162658751010895, 0.0027314790058881044, -0.004715886898338795, 0.03583607077598572, 0.053042054176330566, 0.032217442989349365, -0.07872262597084045, -0.005690581165254116, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "iam", "annotation": null, "type_comment": null}}, {"_type": "ar...
def set_if_only(module, iam, policy, policy_version, is_only): if is_only: try: versions = [v for v in iam.list_policy_versions(PolicyArn=policy['Arn'])[ 'Versions'] if not v['IsDefaultVersion']] except botocore.exceptions.ClientError as e: module.fail_json(ms...
16,709
[ 0.04007510468363762, 0.0002443371922709048, 0.02654610201716423, -0.022816484794020653, -0.004345126450061798, 0.08058898895978928, -0.0054847318679094315, 0.014674704521894455, 0.042195867747068405, 0.05572487413883209, 0.04261027276515961, -0.07166716456413269, 0.021195441484451294, -0.0...
16
{"_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 = ec2_argument_spec() argument_spec.update(dict( policy_name=dict(required=True), policy_description=dict(default=''), policy=dict(type='json'), make_default=dict(type='bool', default=True), only_version=dict(type='bool', default=False), ...
16,710
[ -0.009122418239712715, 0.03386683389544487, 0.05047814920544624, -0.03365976735949516, 0.0015702523523941636, 0.004095310345292091, 0.012964647263288498, -0.033682774752378464, 0.026113353669643402, 0.03669673949480057, 0.022501198574900627, -0.0346490852534771, 0.015150346793234348, -0.03...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "port", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}], "kwarg": null...
def Main(port, args): parser = optparse.OptionParser() _, args = parser.parse_args(args) project = web_components_project.WebComponentsProject() server = tvcm.DevServer( port=port, project=project) def IsTestModuleResourcePartOfTelemetry(module_resource): return module_resource.absolute_path.start...
16,711
[ 0.006748152896761894, 0.004749815911054611, 0.017844446003437042, -0.018386708572506905, -0.020244458690285683, 0.005643544718623161, -0.039263807237148285, 0.010433528572320938, -0.01947123371064663, 0.020224375650286674, -0.006748152896761894, -0.0008949838229455054, 0.02620934322476387, ...
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): warnings.warn( """This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServiceCreateJobOperator`.""", DeprecationWarning, stacklevel=2 ) super().__init__...
16,712
[ 0.05405525490641594, 0.01847393997013569, 0.046893440186977386, -0.015690196305513382, -0.054510779678821564, 0.017132682725787163, -0.022181382402777672, 0.0012866909382864833, 0.03945324942469597, 0.016057144850492477, 0.0711120143532753, -0.10608597099781036, 0.020220108330249786, -0.02...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "apps", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "schema_editor", "annotation": null, "type_comment": null}}], "kwa...
def forward(apps, schema_editor): Benefit = apps.get_model('sponsorship', 'Benefit') BenefitLevel = apps.get_model('sponsorship', 'BenefitLevel') SponsorBenefit = apps.get_model('sponsorship', 'SponsorBenefit') db_alias = schema_editor.connection.alias names = [b['name'] for b in OBSOLETE_BENEFITS]...
16,713
[ 0.006798910908401012, 0.01170895341783762, 0.008088622242212296, -0.024006908759474754, -0.02341790683567524, 0.021021276712417603, -0.040539585053920746, 0.015293740667402744, -0.016938883811235428, 0.019701100885868073, -0.0009736304054968059, -0.010343077592551708, 0.014440703205764294, ...
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): warnings.warn( """This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServiceDeleteJobOperator`.""", DeprecationWarning, stacklevel=2 ) super().__init__...
16,714
[ 0.0012493549147620797, -0.0005321679636836052, 0.011932769790291786, -0.017741475254297256, -0.023092402145266533, 0.0127364257350564, -0.03566605970263481, 0.009460763074457645, -0.02115955762565136, 0.02050849422812462, -0.006953152362257242, -0.00345368729904294, 0.019481034949421883, -...
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): warnings.warn( """This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServiceUpdateJobOperator`.""", DeprecationWarning, stacklevel=2 ) super().__init__...
16,715
[ 0.009407603181898594, 0.0178072489798069, 0.008618545718491077, -0.019802801311016083, -0.020932935178279877, 0.017491625621914864, -0.05876697599887848, 0.01911046728491783, -0.016005143523216248, 0.009224338456988335, -0.011433699168264866, -0.008252015337347984, 0.016992738470435143, -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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, *args, **kwargs): warnings.warn( """This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServiceCancelOperationOperator`. """, DeprecationWarning, stacklevel=2 ) ...
16,716
[ 0.009304862469434738, 0.009528341703116894, 0.017136793583631516, -0.018792573362588882, -0.022754250094294548, 0.012210093438625336, -0.05847029387950897, 0.015734970569610596, -0.01919889822602272, 0.01052384078502655, -0.009878798387944698, -0.006678981706500053, 0.022185394540429115, -...
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): warnings.warn( """This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServiceGetOperationOperator`.""", DeprecationWarning, stacklevel=2 ) super().__ini...
16,717
[ 0.005017552524805069, 0.02941981516778469, 0.014802682213485241, -0.020451616495847702, -0.025956235826015472, 0.01658601313829422, -0.05558221787214279, 0.025605754926800728, -0.025729453191161156, 0.005937566049396992, -0.011297868564724922, -0.0000695405833539553, 0.02383273094892502, -...
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): warnings.warn( """This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServiceResumeOperationOperator`. """, DeprecationWarning, stacklevel=2 ) ...
16,718
[ 0.011263644322752953, 0.007358366157859564, 0.00586305558681488, -0.029166260734200478, -0.027501380071043968, 0.026740876957774162, -0.048918746411800385, 0.015631388872861862, -0.00412109587341547, 0.004195604473352432, 0.0048250737600028515, -0.011736388318240643, 0.030337844043970108, ...
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): warnings.warn( """This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServicePauseOperationOperator`. """, DeprecationWarning, stacklevel=2 ) ...
16,719
[ 0.0082438625395298, 0.017173834145069122, 0.025185476988554, -0.02229326218366623, -0.03588877618312836, 0.01801827736198902, -0.047964293509721756, 0.008439140394330025, -0.019221605733036995, 0.012064961716532707, -0.00640720222145319, -0.009737469255924225, 0.015537728555500507, -0.0103...
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): warnings.warn( """This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServiceGCSToGCSOperator`. """, DeprecationWarning, stacklevel=2 ) supe...
16,720
[ -0.0018556753639131784, 0.009550096467137337, 0.01682341657578945, -0.032616619020700455, -0.02493121102452278, 0.004908976145088673, -0.06477993726730347, 0.015298698097467422, -0.019615299999713898, 0.023303471505641937, -0.01305282860994339, -0.0005270195542834699, 0.022520506754517555, ...
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): warnings.warn( """This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServiceListOperationsOperator`. """, DeprecationWarning, stacklevel=2 ) ...
16,721
[ -0.004808180499821901, -0.04084453359246254, -0.008979481644928455, -0.016800999641418457, 0.026212085038423538, -0.04471844807267189, -0.009316343814134598, 0.052424170076847076, -0.039770785719156265, 0.024969905614852905, 0.0028370108921080828, -0.011569108814001083, 0.018969548866152763,...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "LinkedInOAuth2Provider", "ctx": {"_type": "Load", "_fields"...
class LinkedInOAuth2Adapter(OAuth2Adapter): provider_id = LinkedInOAuth2Provider.id access_token_url = "https://www.linkedin.com/oauth/v2/accessToken" authorize_url = "https://www.linkedin.com/oauth/v2/authorization" profile_url = "https://api.linkedin.com/v2/me" email_url = "https://api.linkedin.co...
16,722
[ 0.017077909782528877, 0.002714528003707528, 0.03547195717692375, -0.013607135973870754, -0.029995135962963104, 0.0014474829658865929, -0.03173583000898361, 0.010184124112129211, -0.019805705174803734, 0.029804084450006485, -0.004147416912019253, -0.00974364299327135, 0.0036724405363202095, ...
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): warnings.warn( """"This class is deprecated. Please use `airflow.providers.google.cloud.operators.data_transfer .CloudDataTransferServiceS3ToGCSOperator`. """, DeprecationWarning, stacklevel=2 ) supe...
16,723
[ -0.004007212817668915, -0.017603570595383644, 0.03472064062952995, -0.0166561771184206, -0.010389306582510471, -0.014735788106918335, 0.007003020029515028, 0.011579948477447033, 0.0279096607118845, -0.013621962629258633, 0.05873831361532211, -0.025003470480442047, -0.0033254744485020638, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "application/json"}}, "targets": [{"_type": "Name", "_fields": {"id": "content_type", "ctx": {"_type": "Store", "_fields": {}}}}], "type_c...
class ExtendedAvailabilityZoneTestV21(test.TestCase): content_type = 'application/json' prefix = 'OS-EXT-AZ:' base_url = '/v2/fake/servers/' def setUp(self): super(ExtendedAvailabilityZoneTestV21, self).setUp() availability_zones.reset_cache() fakes.stub_out_nw_api(self.stubs) ...
16,724
[ -0.019632715731859207, -0.007075391709804535, 0.0014683748595416546, 0.002346680499613285, 0.011475077830255032, -0.07957503944635391, 0.02477746643126011, 0.043311621993780136, 0.01700051873922348, 0.0017416557529941201, -0.03648095950484276, 0.0034425233025103807, 0.0307379812002182, -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": "token", "annotation": null, "type_comment": null}}], "kwarg": nul...
def get_user_info(self, token): fields = self.get_provider().get_profile_fields() headers = {} headers.update(self.get_provider().get_settings().get("HEADERS", {})) headers["Authorization"] = " ".join(["Bearer", token.token]) info = {} if app_settings.QUERY_EMAIL: ...
16,725
[ -0.014494918286800385, -0.005400689784437418, 0.022618165239691734, 0.004648654721677303, 0.011010807007551193, -0.05569500848650932, -0.013860289007425308, 0.023176638409495354, 0.03492996096611023, -0.016144951805472374, 0.04089546948671341, -0.015916485339403152, 0.008999033831059933, -...
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_show_no_host_az(self): self.stubs.Set(compute.api.API, 'get', fake_compute_get_az) self.stubs.Set(availability_zones, 'get_host_availability_zone', fake_get_no_host_availability_zone) url = self.base_url + UUID3 res = self._make_request(url) self...
16,726
[ 0.005397412925958633, -0.025922145694494247, 0.0682033970952034, -0.025024093687534332, -0.04172300547361374, 0.002820065012201667, 0.03973272815346718, 0.013373691588640213, 0.00451453123241663, -0.01763336919248104, 0.055436499416828156, 0.01504843682050705, -0.034417230635881424, -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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): super(ExtendedAvailabilityZoneTestV21, self).setUp() availability_zones.reset_cache() fakes.stub_out_nw_api(self.stubs) self.stubs.Set(compute.api.API, 'get', fake_compute_get) self.stubs.Set(compute.api.API, 'get_all', fake_compute_get_all) self.stubs.Se...
16,727
[ -0.00970483385026455, -0.013327721506357193, 0.03351327404379845, -0.007302089594304562, 0.020223096013069153, -0.05851683020591736, -0.013052406720817089, 0.030960358679294586, 0.03839384764432907, -0.010449434630572796, 0.036817047744989395, -0.026980813592672348, -0.007001746445894241, ...
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_show_empty_host_az(self): self.stubs.Set(compute.api.API, 'get', fake_compute_get_empty) self.stubs.Set(availability_zones, 'get_host_availability_zone', fake_get_no_host_availability_zone) url = self.base_url + UUID3 res = self._make_request(url) ...
16,728
[ 0.005027794744819403, -0.03409688174724579, -0.031464844942092896, -0.0061553847044706345, 0.04589320719242096, -0.03407295420765877, -0.02665538899600506, 0.022743219509720802, 0.016498105600476265, -0.03014882281422615, 0.024741176515817642, -0.04058127477765083, -0.005288008134812117, -...
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_no_instance_passthrough_404(self): def fake_compute_get(*args, **kwargs): raise exception.InstanceNotFound(instance_id='fake') self.stubs.Set(compute.api.API, 'get', fake_compute_get) url = self.base_url + '70f6db34-de8d-4fbd-aafb-4065bdfa6115' res = self._make_req...
16,729
[ 0.014295998960733414, 0.026976915076375008, 0.06687448918819427, -0.029248123988509178, -0.015191864222288132, 0.016163436695933342, 0.019191715866327286, 0.0014494729693979025, 0.007949231192469597, 0.0580420084297657, -0.0020929821766912937, -0.03285682201385498, -0.012106805108487606, 0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "settings", "annotation": null, "type_comment": null}}, {"_type": "...
def from_settings(cls, settings, crawler=None): mwlist = cls._get_mwlist_from_settings(settings) middlewares = [] for clspath in mwlist: try: mwcls = load_object(clspath) if crawler and hasattr(mwcls, 'from_crawler'): mw = mwcls.fro...
16,730
[ 0.033721912652254105, 0.017438074573874474, 0.06803225725889206, -0.020685790106654167, -0.003406139323487878, 0.015265388414263725, 0.03084762766957283, -0.019644711166620255, 0.0221002995967865, -0.006331345532089472, 0.023695865646004677, -0.03329189866781235, 0.010874750092625618, 0.00...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "application/xml"}}, "targets": [{"_type": "Name", "_fields": {"id": "content_type", "ctx": {"_type": "Store", "_fields": {}}}}], "type_co...
class ExtendedAvailabilityZoneXmlTestV2(ExtendedAvailabilityZoneTestV2): content_type = 'application/xml' prefix = '{%s}' % extended_availability_zone.\ Extended_availability_zone.namespace def _get_server(self, body): return etree.XML(body) def _get_servers(self, body)...
16,731
[ 0.03111512027680874, -0.0046172477304935455, 0.044376883655786514, -0.01660926640033722, 0.03080730326473713, 0.03555280715227127, -0.00856114737689495, 0.05951119586825371, -0.03996484726667404, -0.01930266059935093, 0.0651031956076622, -0.030909908935427666, 0.028139561414718628, -0.0124...
15
{"_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 upgrade(): patreon_users = alembic.op.create_table("patreon_users", sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True), sqlalchemy.Column("patreon_id", sqlalchemy.Text, unique=True), sqlalchemy.Column("full_name", sqlalchemy.Text, nullable=False), sqlalchemy.Column("access_token", sqlalchemy....
16,732
[ 0.01939450390636921, 0.008017987944185734, 0.009624240919947624, -0.01724398508667946, -0.047284889966249466, 0.04648840054869652, -0.014296975918114185, -0.03061172366142273, 0.025899164378643036, 0.004755702335387468, -0.013752708211541176, -0.024996476247906685, 0.009849912486970425, -0...
12
{"_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": "system", "annotation":...
class LangevinThermostatOnRadiusLocal(ExtensionLocal, integrator_LangevinThermostatOnRadius): def __init__(self, system, dampingmass): if not (pmi._PMIComm and pmi._PMIComm.isActive()) or pmi._MPIcomm.rank in pmi._PMIComm.getMPIcpugroup(): cxxinit(self, integrator_LangevinThermostatOnRadius, sy...
16,733
[ 0.029077522456645966, 0.022716009989380836, 0.033842217177152634, -0.011010310612618923, 0.028150338679552078, 0.04015222191810608, -0.00032636558171361685, 0.03479515761137009, -0.014873577281832695, -0.029515359550714493, 0.03219389170408249, -0.047724224627017975, 0.03497544303536415, 0...
12
{"_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 downgrade(): alembic.op.add_column("users", sqlalchemy.Column("patreon_access_token", sqlalchemy.Text)) alembic.op.add_column("users", sqlalchemy.Column("patreon_refresh_token", sqlalchemy.Text)) alembic.op.add_column("users", sqlalchemy.Column("patreon_token_expires", sqlalchemy.DateTime(timezone=True))) conn...
16,734
[ -0.016350209712982178, -0.010735406540334225, 0.041774604469537735, -0.03660636767745018, 0.007133121136575937, 0.024043023586273193, -0.014980745501816273, 0.01454013492912054, 0.005007474683225155, -0.006174496375024319, 0.0023831650614738464, 0.03722560405731201, 0.03434377536177635, -0...
12
{"_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 HiddenFileTest(unittest.TestCase): def setUp(self): pass def test_osx_hidden(self): if not sys.platform == 'darwin': self.skipTest('sys.platform is not darwin') return with tempfile.NamedTemporaryFile(delete=False) as f: try: co...
16,735
[ -0.008098836988210678, 0.013606046326458454, 0.012224660255014896, -0.022578947246074677, 0.010195366106927395, 0.031099535524845123, 0.004391708876937628, 0.0053971875458955765, -0.00929685402661562, 0.0047676172107458115, 0.02116088569164276, 0.05227264389395714, 0.030537201091647148, 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_windows_hidden(self): if not sys.platform == 'win32': self.skipTest('sys.platform is not windows') return # FILE_ATTRIBUTE_HIDDEN = 2 (0x2) from GetFileAttributes documentation. hidden_mask = 2 with tempfile.NamedTemporaryFile() as f: # Hide...
16,736
[ 0.01715284399688244, 0.016095394268631935, 0.015087125822901726, -0.02818230912089348, 0.005837500561028719, 0.047044288367033005, -0.023706583306193352, 0.011970103718340397, -0.004300507251173258, -0.011232347227633, 0.007660374511033297, 0.036469776183366776, 0.019464483484625816, -0.00...
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 test_osx_hidden(self): if not sys.platform == 'darwin': self.skipTest('sys.platform is not darwin') return with tempfile.NamedTemporaryFile(delete=False) as f: try: command = ["chflags", "hidden", f.name] subprocess.Popen(command)....
16,737
[ -0.004049421288073063, 0.009638994000852108, 0.02704400010406971, -0.03534515202045441, 0.0031814551912248135, 0.055602047592401505, -0.016236841678619385, 0.016745874658226967, -0.006747948005795479, -0.010206760838627815, -0.0070677250623703, 0.03116847202181816, 0.02981105074286461, -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_other_hidden(self): if sys.platform == 'darwin' or sys.platform == 'win32': self.skipTest('sys.platform is known') return with tempfile.NamedTemporaryFile(prefix='.tmp') as f: fn = util.bytestring_path(f.name) self.assertTrue(hidden.is_hidden(fn)...
16,738
[ 0.006490142550319433, 0.023458875715732574, -0.05806565657258034, -0.030130062252283096, -0.024446386843919754, 0.041256021708250046, -0.015690455213189125, -0.03131507709622383, -0.02068287320435047, -0.0056233275681734085, 0.01088456716388464, -0.022427475079894066, 0.026882247999310493, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "arrow_type", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyarg...
def get_logical_type(arrow_type): logical_type_map = get_logical_type_map() try: return logical_type_map[arrow_type.id] except KeyError: if isinstance(arrow_type, pa.lib.DictionaryType): return 'categorical' elif isinstance(arrow_type, pa.lib.ListType): retur...
16,739
[ -0.0034308619797229767, 0.0035441936925053596, 0.010581066831946373, -0.01934882439672947, -0.019441550597548485, -0.01265194732695818, -0.009004725143313408, -0.01681431382894516, -0.024500269442796707, 0.011868927627801895, 0.012404678389430046, 0.0206160806119442, 0.026251761242747307, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "column", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def get_extension_dtype_info(column): dtype = column.dtype if str(dtype) == 'category': cats = getattr(column, 'cat', column) assert cats is not None metadata = { 'num_categories': len(cats.categories), 'ordered': cats.ordered, } physical_dtype = s...
16,740
[ -0.007413202431052923, -0.003127015195786953, -0.0012737145880237222, -0.021992195397615433, 0.0004444256192073226, 0.013598507270216942, 0.014606483280658722, -0.0037409639917314053, -0.02902969717979431, -0.01586187072098255, 0.011170202866196632, 0.006675547454506159, 0.03231019899249077,...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "pandas_collection", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "pos...
def get_logical_type_from_numpy(pandas_collection): try: return _numpy_logical_type_map[pandas_collection.dtype.type] except KeyError: if hasattr(pandas_collection.dtype, 'tz'): return 'datetimetz' # See https://github.com/pandas-dev/pandas/issues/24739 if str(pandas_...
16,741
[ 0.04337962716817856, 0.015778277069330215, 0.04622907191514969, -0.02689962089061737, 0.013545501045882702, -0.014098378829658031, -0.03478876128792763, -0.03098241053521633, 0.006852492690086365, 0.022115103900432587, 0.039743393659591675, -0.009143744595348835, 0.02855825424194336, -0.00...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "df", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "schema", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _get_columns_to_convert(df, schema, preserve_index, columns): columns = _resolve_columns_of_interest(df, schema, columns) column_names = [] type = None index_levels = _get_index_level_values(df.index) if preserve_index else [] columns_to_convert = [] convert_types = [] if not df.colu...
16,742
[ -0.000265249254880473, 0.011198190972208977, 0.026079636067152023, -0.05193937569856644, 0.004576580598950386, -0.0007792555843479931, 0.01300683431327343, 0.0214508306235075, -0.03406185284256935, -0.012567042373120785, 0.033072322607040405, 0.009191642515361309, 0.029334094375371933, -0....
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "level", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def _get_simple_index_descriptor(level): string_dtype, extra_metadata = get_extension_dtype_info(level) pandas_type = get_logical_type_from_numpy(level) if pandas_type == 'unicode': assert not extra_metadata extra_metadata = {'encoding': 'UTF-8'} return { 'name': level.name, ...
16,743
[ 0.020456822589039803, -0.0029662896413356066, -0.0025155546609312296, -0.03750921040773392, -0.002581024542450905, -0.007136217784136534, -0.02195759303867817, 0.006048410665243864, 0.023005111142992973, 0.030680198222398758, 0.04427779093384743, 0.017697013914585114, 0.0596279613673687, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "df", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "preserve_index", "annotation": null, "type_comment": null}}, {"_typ...
def dataframe_to_types(df, preserve_index, columns=None): (all_names, column_names, index_descriptors, index_columns, columns_to_convert, _) = _get_columns_to_convert(df, None, preserve_index, columns) types = [] # If pandas knows type, skip conversion for c in columns_to_conve...
16,744
[ 0.041663721203804016, 0.013797333464026451, 0.0583694651722908, -0.025239761918783188, 0.04440104961395264, 0.006868476048111916, -0.035887155681848526, -0.010486376471817493, -0.0335523784160614, 0.05253252014517784, 0.009485037997364998, -0.05446474999189377, 0.030372248962521553, 0.0431...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "df", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "schema", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _resolve_columns_of_interest(df, schema, columns): if schema is not None and columns is not None: raise ValueError('Schema and columns arguments are mutually ' 'exclusive, pass only one of them') elif schema is not None: columns = schema.names elif columns is not...
16,745
[ 0.03320573642849922, -0.010590306483209133, 0.006607960909605026, -0.03125360608100891, 0.004748556762933731, 0.0007601107354275882, -0.010678152553737164, -0.00989730004221201, 0.008784586563706398, -0.005739262793213129, 0.053917836397886276, 0.018623322248458862, 0.04689016938209534, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "block_table", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "all_columns", "annotation": null, "type_comment": null}}, ...
def _deserialize_column_index(block_table, all_columns, column_indexes): column_strings = [x.name for x in block_table.itercolumns()] if all_columns: columns_name_dict = { c.get('field_name', _column_name_to_strings(c['name'])): c['name'] for c in all_columns } co...
16,746
[ -0.005358648486435413, -0.0017968891188502312, 0.03467240184545517, -0.04409870505332947, 0.007090219762176275, -0.0032838373444974422, 0.010891478508710861, -0.002010773867368698, 0.015225529670715332, -0.016147667542099953, 0.005983653478324413, 0.0161988977342844, 0.022069845348596573, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "values", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dtype", "annotation": null, "type_comment": null}}, {"_type": "...
def get_datetimetz_type(values, dtype, type_): if values.dtype.type != np.datetime64: return values, type_ if _pandas_api.is_datetimetz(dtype) and type_ is None: # If no user type passed, construct a tz-aware timestamp type tz = dtype.tz unit = dtype.unit type_ = pa.time...
16,747
[ 0.047990597784519196, 0.027614125981926918, 0.0306777935475111, -0.0379360131919384, 0.010661150328814983, 0.008306855335831642, -0.016109954565763474, -0.007803098298609257, -0.02897118777036667, 0.00028513051802292466, 0.038696788251399994, -0.012521968223154545, 0.05901157483458519, -0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "table", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "index_descriptors", "annotation": null, "type_comment": null}}, ...
def _reconstruct_index(table, index_descriptors, all_columns): # 0. 'field_name' is the name of the column in the arrow Table # 1. 'name' is the user-facing name of the column, that is, it came from # pandas # 2. 'field_name' and 'name' differ for index columns # 3. We fall back on c['name'] for ...
16,748
[ 0.058342598378658295, 0.05164754390716553, -0.0026509910821914673, -0.037238627672195435, 0.026509910821914673, 0.026364367455244064, -0.006003715097904205, -0.009923024103045464, -0.050566356629133224, -0.008228468708693981, 0.04220793768763542, 0.005338368471711874, 0.02015792950987816, ...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "table", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "result_table", "annotation": null, "type_comment": null}}, {"_ty...
def _extract_index_level(table, result_table, descr, field_name_to_metadata): field_name = descr['field_name'] logical_name = field_name_to_metadata[field_name]['name'] index_name = _backwards_compatible_index_name(field_name, logical_name) i = table.schema.get_field_index(field...
16,749
[ 0.07912606745958328, 0.008138869889080524, 0.003586155129596591, -0.05478634312748909, -0.02873317524790764, 0.026514481753110886, -0.016607247292995453, -0.041913531720638275, -0.005887225270271301, -0.026316776871681213, 0.027151532471179962, -0.01294969953596592, 0.04224303737282753, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "index_descriptors", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "all_columns", "annotation": null, "type_comment": nu...
def _get_serialized_index_names(index_descriptors, all_columns): serialized_index_names = [] for descr in index_descriptors: if not isinstance(descr, dict): # version < 0.13.0 serialized_index_names.append(descr) elif descr['kind'] != 'serialized': continue ...
16,750
[ -0.011156666092574596, 0.005648097023367882, 0.043153248727321625, -0.04547499492764473, -0.008226576261222363, 0.0130263427272439, 0.0046546570956707, 0.016028987243771553, -0.026387551799416542, 0.027369830757379532, 0.047640472650527954, -0.011709197424352169, 0.046345651149749756, 0.00...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "index", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def _flatten_single_level_multiindex(index): pd = _pandas_api.pd if isinstance(index, pd.MultiIndex) and index.nlevels == 1: levels, = index.levels labels, = _get_multiindex_codes(index) # Cheaply check that we do not somehow have duplicate column names if not index.is_unique: ...
16,751
[ 0.0041726380586624146, -0.03279108926653862, -0.010478398762643337, 0.020525634288787842, 0.013558945618569851, 0.05986359715461731, 0.0220120120793581, -0.013139128684997559, 0.009871366433799267, 0.00710284523665905, 0.029954491183161736, -0.05645967647433281, 0.02332819439470768, 0.0205...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "publisher"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}},...
class FacebookSubscriberEventProcessor: logger = logging.getLogger("publisher") subscriber_event_outcome_messages = { SubscriberEventOutcome.subscription_created: "You are now subscribed!", SubscriberEventOutcome.resubscribed: "Thanks for resubscribing!", SubscriberEventOutcome.already_s...
16,752
[ 0.02296062745153904, 0.010368319228291512, 0.03459538519382477, -0.0466625839471817, 0.0011615451658144593, 0.03865210711956024, 0.0031815399415791035, -0.02924133650958538, -0.0181110966950655, -0.0065020788460969925, 0.03418353572487831, -0.03286561742424965, 0.019315756857395172, 0.0095...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "table", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pandas_metadata", "annotation": null, "type_comment": null}}], "...
def _add_any_metadata(table, pandas_metadata): modified_columns = {} schema = table.schema index_columns = pandas_metadata['index_columns'] n_index_levels = len(index_columns) n_columns = len(pandas_metadata['columns']) - n_index_levels # Add time zones for i, col_meta in enumerate(pandas...
16,753
[ 0.010723022744059563, -0.009685310535132885, -0.019500335678458214, 0.02948831208050251, -0.010895974934101105, 0.056901201605796814, 0.023391755297780037, -0.018419386819005013, 0.047864459455013275, -0.006718103773891926, 0.022851280868053436, -0.046783510595560074, 0.02518613263964653, ...
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": "subscriber_id", "annotation": null, "type_comment": null}}, {"_ty...
def subscription_message(self, subscriber_id, subscriber_event_message_text): if self.is_subscriber(subscriber_event_message_text): outcome = self.subscriber.process(user_id=subscriber_id) return SubscriptionMessage(platform=self.platform, platform_identifier=subscriber_id, ...
16,754
[ 0.03790844976902008, -0.020919600501656532, -0.012291931547224522, 0.03177914023399353, 0.0367758609354496, 0.06133751571178436, 0.045747749507427216, -0.004666381515562534, 0.01033765822649002, -0.002143037738278508, 0.034599509090185165, -0.010171101428568363, -0.00006336985825328156, 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": "subscriber_event_message", "annotation": null, "type_comment": nu...
def process(self, subscriber_event_message): FacebookSubscriberEventProcessor.logger.info("Processing message: {}".format(subscriber_event_message)) subscriber_id = self.subscriber_id(subscriber_event_message) subscriber_event_message_text = self.subscriber_event_message_text(subscriber_event_m...
16,755
[ 0.03328923508524895, -0.009497016668319702, -0.030203435570001602, 0.013956231996417046, -0.00006259812653297558, 0.026883862912654877, 0.023926638066768646, -0.003112099366262555, 0.01880701631307602, 0.0004273657687008381, 0.026322808116674423, -0.022757774218916893, 0.017930367961525917, ...
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": "user_id", "annotation": null, "type_comment": null}}], "kwarg": n...
def process(self, user_id): subscription, created = self.subscriptions.get_or_create(platform=self.platform_name, platform_identifier=user_id) if created: return SubscriberEventOutcome.subscription_created if subscrip...
16,756
[ 0.006518203765153885, -0.0007213220233097672, -0.010721531696617603, 0.007764249574393034, -0.006390830036252737, 0.03218674659729004, 0.017433565109968185, -0.022816482931375504, 0.016049068421125412, 0.010372638702392578, 0.03309497609734535, -0.042841821908950806, 0.008666940033435822, ...
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": "subscriptions", "annot...
class Subscriber: def __init__(self, subscriptions, platform_name): self.subscriptions = subscriptions self.platform_name = platform_name def process(self, user_id): subscription, created = self.subscriptions.get_or_create(platform=self.platform_name, ...
16,757
[ 0.0012154346331954002, -0.0011850488372147083, -0.023111045360565186, 0.022541867569088936, -0.0031482724007219076, 0.03284638002514839, 0.018711764365434647, -0.002693225396797061, 0.04055401682853699, -0.011472517624497414, 0.027083441615104675, -0.058293431997299194, 0.008851922117173672,...
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": "user_id", "annotation": null, "type_comment": null}}], "kwarg": n...
def process(self, user_id): if not self.subscription_exists(user_id=user_id): return SubscriberEventOutcome.subscription_does_not_exist if self.unsubscribed(user_id=user_id): return SubscriberEventOutcome.already_unsubscribed self.unsubscribe(user_id=user_id) r...
16,758
[ -0.011285162530839443, 0.006694687530398369, -0.012008117511868477, 0.001705999136902392, -0.014447358436882496, 0.03590092062950134, -0.007223679218441248, 0.0006197288166731596, 0.048338111490011215, -0.0008596119587309659, 0.040626585483551025, -0.06644139438867569, 0.003082847688347101, ...
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": "subscriptions", "annot...
class Unsubscriber: def __init__(self, subscriptions, platform_name): self.subscriptions = subscriptions self.platform_name = platform_name def process(self, user_id): if not self.subscription_exists(user_id=user_id): return SubscriberEventOutcome.subscription_does_not_exist...
16,759
[ 0.0012746636057272553, -0.0424601212143898, 0.00624124426394701, -0.06850625574588776, -0.040150366723537445, -0.010559743270277977, -0.01942403055727482, -0.025702131912112236, -0.02233579196035862, 0.015701398253440857, 0.0338599793612957, -0.00884585827589035, 0.010608887299895287, 0.01...
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_toposorted_single_before_after(): a = Info(1, None, None) b = Info(2, 1, None) c = Info(3, None, 1) infos = [a, b, c] assert toposorted(infos) == [b, a, c] a = Info(1, None, None) b = Info(2, None, 1) c = Info(3, 1, None) infos = [a, b, c] assert toposorted(infos) ==...
16,760
[ -0.005697556771337986, -0.03152449429035187, 0.017599783837795258, -0.07039913535118103, -0.049828268587589264, -0.008734265342354774, -0.013256514444947243, -0.017110569402575493, -0.017766831442713737, 0.01400823425501585, 0.026584621518850327, -0.0021611936390399933, 0.01665715128183365, ...
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_toposorted_multi_before_after(): a = Info(1, None, None) b = Info(2, [1], None) c = Info(3, None, [1, 2]) infos = [a, b, c] assert toposorted(infos) == [b, a, c]
16,761
[ 0.007144181989133358, 0.009858241304755211, 0.03553834930062294, -0.007308486383408308, 0.020580599084496498, 0.006006224546581507, 0.017878711223602295, 0.029672088101506233, 0.011805548332631588, 0.06357956677675247, 0.00205988553352654, -0.0471491701900959, -0.01324168685823679, -0.0029...
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": "r", "annotation": null, "type_comment": null}}, {"_type": "arg", ...
def __init__(self, r, r_min, r_max, c, r_0=0.0, s=1.0, reduced=False): n = r.shape[0] # trim negative r limits if r_max <= 0: # both func and abel must be zero everywhere self.func = np.zeros(n) self.abel = np.zeros(n) return if r_min < 0:...
16,762
[ 0.012223669327795506, 0.02094070054590702, 0.011325325816869736, -0.0169136431068182, 0.014472627080976963, -0.0023465356789529324, 0.01862359419465065, -0.005513971671462059, 0.02248957008123398, 0.03856062889099121, 0.0034106082748621702, -0.09887976199388504, -0.025822734460234642, 0.00...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "k", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},...
def a(k): odd_k = k % 2 # max. x power K = k - odd_k # (k - 1 for odd k) # generate coefficients for all x^m r^{k - m} terms # (only even indices are actually used; # for odd k, C[K] is also used for x^{k+1} ln(r + y)) C = [0] * (K + ...
16,763
[ 0.005328051745891571, -0.009004349820315838, 0.03301212564110756, 0.002550754463300109, 0.007272303104400635, -0.007473037112504244, 0.019270455464720726, 0.0034669614396989346, 0.018203698098659515, 0.06652895361185074, -0.006664365995675325, -0.04693732410669327, 0.010839631780982018, -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": "r", "annotation": null, "type_comment": null}}, {"_type": "arg", ...
def __init__(self, r, ranges): self.p = [] for rng in ranges: self.p.append(Polynomial(r, *rng)) func = self.p[0].func for p in self.p[1:]: func += p.func self.func = func abel = self.p[0].abel for p in self.p[1:]: abel += p.a...
16,764
[ -0.06820136308670044, 0.007882659323513508, 0.04883084446191788, -0.018002208322286606, -0.004244737792760134, 0.012112523429095745, -0.010143346153199673, 0.010744213126599789, -0.019430011510849, 0.0772441104054451, 0.004598713479936123, -0.05444686487317085, 0.01069067046046257, 0.00015...
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": "term", "annotation": n...
class LookupModule(LookupBase): def _check_list_of_one_list(self, term): # make sure term is not a list of one (list of one..) item # return the final non list item if so if isinstance(term,list) and len(term) == 1: term = term[0] if isinstance(term,list): ...
16,765
[ 0.005591098219156265, 0.03164667263627052, 0.018809713423252106, -0.0034822484012693167, 0.011232340708374977, -0.022743260487914085, 0.006190044805407524, 0.025072189047932625, 0.025339625775814056, 0.06378364562988281, 0.004928078036755323, -0.031334664672613144, 0.0017773396102711558, 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": "term", "annotation": null, "type_comment": null}}], "kwarg": null...
def _check_list_of_one_list(self, term): # make sure term is not a list of one (list of one..) item # return the final non list item if so if isinstance(term,list) and len(term) == 1: term = term[0] if isinstance(term,list): term = self._check_list_of_one...
16,766
[ -0.03591758385300636, 0.020074518397450447, 0.037361256778240204, 0.004492809530347586, -0.000023055692508933134, -0.012551241554319859, 0.008711818605661392, 0.012632137164473534, 0.013391309417784214, 0.07780898362398148, 0.027380000799894333, -0.04089576378464699, 0.03698789328336716, 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": "terms", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _do_flatten(self, terms, variables): ret = [] for term in terms: term = self._check_list_of_one_list(term) if term == 'None' or term == 'null': # ignore undefined items break if isinstance(term, basestring): # con...
16,767
[ -0.016439808532595634, 0.006783358287066221, 0.08440452814102173, -0.037052154541015625, -0.02453453652560711, -0.03292730078101158, -0.0033857182133942842, -0.03998485580086708, 0.04823456332087517, 0.03714752942323685, 0.02155414968729019, -0.02894550748169422, 0.0008248217636719346, -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 FormatJUnitXML(self): num_errors = len(self._junit_errors) num_failures = len(self._junit_failures) testsuite = xml.etree.ElementTree.Element('testsuite') testsuite.attrib['errors'] = str(num_errors) testsuite.attrib['failures'] = str(num_failures) testsuite.attrib['name'] = 'cpplint' ...
16,768
[ -0.007944398559629917, 0.021841593086719513, 0.049999091774225235, -0.03510059416294098, -0.02750830352306366, -0.0116195073351264, -0.048502642661333084, -0.03160154074430466, 0.018485579639673233, 0.06241083890199661, 0.01303893607109785, -0.005743734072893858, -0.006750537548214197, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "val", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def ProcessExtensionsOption(val): global _valid_extensions try: extensions = [ext.strip() for ext in val.split(',')] _valid_extensions = set(extensions) except ValueError: PrintUsage('Extensions should be a comma-separated list of values;' 'for example: extensions=hpp,cpp\n' ...
16,769
[ -0.011174408718943596, 0.024920877069234848, 0.0489339679479599, -0.016880489885807037, 0.022564956918358803, -0.031210534274578094, 0.0239698626101017, 0.021181665360927582, -0.009104873985052109, 0.07288222014904022, 0.022651413455605507, 0.008845506235957146, 0.05053339898586273, 0.0000...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Expr", "_fields": {"value...
def FixupPathFromRoot(): if _root_debug: sys.stderr.write("\n_root fixup, _root = '%s', repository name = '%s'\n" % (_root, fileinfo.RepositoryName())) # Process the file path with the --root flag if it was set. if not _root: if _root_debug: sys.stderr.write("_root unspecified...
16,770
[ 0.025331122800707817, 0.022830044850707054, 0.025528252124786377, -0.03134356811642647, 0.01077435165643692, 0.04484692960977554, 0.0003603771037887782, 0.00869833305478096, -0.006382063031196594, 0.07259288430213928, 0.057068951427936554, -0.037109602242708206, -0.00060524872969836, 0.012...
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": "lines", "annotation": null, "type_comment": null}}], "kwarg": nul...
def __init__(self, lines): self.elided = [] self.lines = [] self.raw_lines = lines self.num_lines = len(lines) self.lines_without_raw_strings = CleanseRawStrings(lines) for linenum in range(len(self.lines_without_raw_strings)): self.lines.append(CleanseComments( self.lines_withou...
16,771
[ -0.018180938437581062, 0.02040240354835987, 0.006296099629253149, -0.0033760422375053167, -0.01055195927619934, 0.018812302500009537, 0.00003605770325521007, -0.023430610075592995, 0.04333025962114334, 0.05962879955768585, 0.03708677366375923, 0.002810445614159107, 0.02686803601682186, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "clean_lines", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "linenum", "annotation": null, "type_comment": null}}], "kw...
def IsMacroDefinition(clean_lines, linenum): if Search(r'^#define', clean_lines[linenum]): return True if linenum > 0 and Search(r'\\$', clean_lines[linenum - 1]): return True return False
16,772
[ 0.046355195343494415, 0.0279245488345623, -0.01846407726407051, -0.0036800007801502943, -0.014552856795489788, 0.006329267285764217, 0.016436036676168442, -0.06088576838374138, -0.003813717747107148, 0.051169004291296005, 0.038443610072135925, 0.00863031204789877, 0.004997669719159603, 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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, name, class_or_struct, clean_lines, linenum): _BlockInfo.__init__(self, linenum, False) self.name = name self.is_derived = False self.check_namespace_indentation = True if class_or_struct == 'struct': self.access = 'public' self.is_struct = True else: self.ac...
16,773
[ 0.014800090342760086, 0.09472057968378067, -0.015365976840257645, -0.013233022764325142, -0.006034301593899727, 0.019653650000691414, 0.017161576077342033, -0.017683932557702065, -0.012982727028429508, 0.05750270560383797, 0.05489092320203781, 0.009179321117699146, 0.025486627593636513, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "filename", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "nesting_state", "annotation": null, "type_comment": null}}, {...
def CheckForNamespaceIndentation(filename, nesting_state, clean_lines, line, error): is_namespace_indent_item = ( len(nesting_state.stack) > 1 and nesting_state.stack[-1].check_namespace_indentation and isinstance(nesting_state.previous_stack_top, _NamespaceInfo) and...
16,774
[ 0.07975507527589798, 0.08486819267272949, -0.004727841354906559, -0.011671765707433224, -0.0124721834436059, 0.06006718426942825, -0.019221976399421692, -0.0231404397636652, 0.0003281563986092806, 0.042338524013757706, 0.03712983429431915, -0.027070850133895874, 0.04520568996667862, 0.0653...
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": "filename", "annotation": null, "type_comment": null}}, {"_type": ...
def CheckEnd(self, filename, clean_lines, linenum, error): # If there is a DISALLOW macro, it should appear near the end of # the class. seen_last_thing_in_class = False for i in xrange(linenum - 1, self.starting_linenum, -1): match = Search( r'\b(DISALLOW_COPY_AND_ASSIGN|DISALLOW_IMPLIC...
16,775
[ 0.03134947270154953, 0.023078883066773415, 0.02033514715731144, -0.05154021084308624, -0.042665738612413406, 0.0006687034037895501, 0.007030000910162926, -0.007482914254069328, 0.0228294525295496, 0.02453608252108097, 0.037335801869630814, -0.007522298023104668, -0.014650758355855942, 0.03...
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(): filenames = ParseArguments(sys.argv[1:]) backup_err = sys.stderr try: # Change stderr to write with replacement characters so we don't die # if we try to print something containing non-ASCII characters. sys.stderr = codecs.StreamReader(sys.stderr, 'replace') _cpplint_state.ResetErrorC...
16,776
[ -0.014251225627958775, -0.009634929709136486, -0.01929103583097458, -0.038306787610054016, 0.03578688204288483, 0.012472469359636307, -0.026787223294377327, 0.012906570918858051, -0.006342113018035889, 0.03426223248243332, -0.02496611513197422, -0.00946552399545908, -0.05908012017607689, 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 get_version(self): if not self._version: # Determine the controller version by querying the # cluster nodes. Currently, the version will be the # one of the server that responds. self.request('GET', '/ws.v1/control-cluster/node') if not self._versi...
16,777
[ -0.010685119777917862, 0.00833108276128769, 0.00009137984307017177, -0.025918925181031227, 0.03673278167843819, 0.04301021248102188, 0.0056368145160377026, 0.0031448460649698973, 0.011574014090001583, -0.050513703376054764, -0.02492581680417061, -0.02555110678076744, -0.01283685676753521, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "AsyncFunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields":...
async def async_update_data(): try: thermostats = await hass.async_add_executor_job( api.get_thermostats, session_id ) except RequestException as err: raise UpdateFailed(f"Error communicating with Schluter API: {err}") from err if thermostats ...
16,778
[ 0.02696063183248043, 0.012847385369241238, 0.013402587734162807, 0.0016947556287050247, -0.03675440326333046, 0.018343890085816383, 0.013025050051510334, 0.002834308659657836, -0.00792273972183466, 0.005979530513286591, 0.026827383786439896, 0.02862624078989029, 0.017466669902205467, 0.012...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "repo", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "revs", "annotation": null, "type_comment": null}}, {"_type": "arg...
def backupwithlockheld(repo, revs, connect_opts=None, force=False): remotepath = ccutil.getremotepath(repo.ui) getconnection = lambda: repo.connectionpool.get(remotepath, connect_opts) with repo.lock(): # Load the backup state under the repo lock to ensure a consistent view. state = backupst...
16,779
[ -0.016568521037697792, -0.009390543214976788, 0.045692067593336105, -0.07404378801584244, -0.02050483040511608, 0.013635583221912384, 0.06262077391147614, -0.05037447437644005, -0.0444314181804657, 0.02465982362627983, 0.015603737905621529, -0.018909724429249763, -0.018125034868717194, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def setUpClass(cls): super(ServerNotificationTest, cls).setUpClass() cur_dir = os.path.dirname(__file__) # tacker/tests/etc... # /functional/sol_v2 image_dir = os.path.join( cur_dir, "../../etc/samples/etsi/nfv/common/Files/images") image_file = "c...
16,780
[ -0.008128759451210499, -0.005803263746201992, -0.05384255573153496, -0.005562333855777979, 0.03752218559384346, 0.0680888369679451, 0.021369418129324913, -0.04349305108189583, 0.02009144425392151, 0.039219167083501816, -0.02331780642271042, -0.033394955098629, -0.010244750417768955, 0.0657...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "dense_svm", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "sparse_svm", "annotation": null, "type_comment": null}}, {"_...
def check_svm_model_equal(dense_svm, sparse_svm, X_train, y_train, X_test): dense_svm.fit(X_train.toarray(), y_train) if sparse.isspmatrix(X_test): X_test_dense = X_test.toarray() else: X_test_dense = X_test sparse_svm.fit(X_train, y_train) assert_true(sparse.issparse(sparse_svm.supp...
16,781
[ 0.033511120826005936, -0.0295595470815897, -0.005483086220920086, -0.012097558937966824, 0.018532665446400642, 0.039361219853162766, 0.012263127602636814, -0.03306960314512253, -0.0009368433384224772, 0.050067998468875885, -0.0011244879569858313, -0.04437243193387985, 0.020552605390548706, ...
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 test_unsorted_indices(): # test that the result with sorted and unsorted indices in csr is the same # we use a subset of digits as iris, blobs or make_classification didn't # show the problem digits = load_digits() X, y = digits.data[:50], digits.target[:50] X_test = sparse.csr_matrix(digits...
16,782
[ -0.012633531354367733, -0.01547954697161913, 0.0040781316347420216, -0.024272114038467407, 0.03695192188024521, 0.01286491472274065, 0.017400028184056282, 0.008034787140786648, 0.0218657273799181, 0.08274269104003906, -0.0014020384987816215, -0.04708651453256607, 0.0132235586643219, 0.0047...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"va...
def test_svc_iris(): # Test the sparse SVC with the iris dataset for k in ('linear', 'poly', 'rbf'): sp_clf = svm.SVC(kernel=k).fit(iris.data, iris.target) clf = svm.SVC(kernel=k).fit(iris.data.toarray(), iris.target) assert_array_almost_equal(clf.support_vectors_, ...
16,783
[ 0.004948716145008802, 0.024285422638058662, 0.007379078771919012, 0.029467768967151642, 0.036409929394721985, 0.013629449531435966, 0.007676426321268082, -0.012276213616132736, 0.03529335558414459, 0.06845066696405411, 0.031361084431409836, -0.04395892098546028, -0.015182940289378166, 0.03...
9
{"_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 test_error(): # Test that it gives proper exception on deficient input # impossible value of C assert_raises(ValueError, svm.SVC(C=-1).fit, X, Y) # impossible value of nu clf = svm.NuSVC(nu=0.0) assert_raises(ValueError, clf.fit, X_sp, Y) Y2 = Y[:-1] # wrong dimensions for labels ...
16,784
[ 0.01628456637263298, -0.02458580955862999, -0.012905195355415344, -0.007924448698759079, 0.029696078971028328, 0.039916615933179855, 0.0027008478064090014, -0.02639913000166416, 0.04712280258536339, 0.05538871884346008, 0.0165200624614954, -0.0661744475364685, -0.02512745000422001, 0.05576...
14
{"_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_sparse_decision_function(): #Test decision_function #Sanity check, test that decision_function implemented in python #returns the same as the one in libsvm # multi class: svc = svm.SVC(kernel='linear', C=0.1, decision_function_shape='ovo') clf = svc.fit(iris.data, iris.target) de...
16,785
[ -0.0154994772747159, -0.010458163917064667, -0.0010597568470984697, -0.017468206584453583, 0.04062638431787491, 0.024535149335861206, 0.006628814619034529, -0.028290528804063797, 0.024535149335861206, 0.07706495374441147, -0.002953094197437167, -0.06035919860005379, -0.012802432291209698, ...
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 test_linearsvc_iris(): # Test the sparse LinearSVC with the iris dataset sp_clf = svm.LinearSVC(random_state=0).fit(iris.data, iris.target) clf = svm.LinearSVC(random_state=0).fit(iris.data.toarray(), iris.target) assert_equal(clf.fit_intercept, sp_clf.fit_intercept) assert_array_almost_equal...
16,786
[ -0.03269439935684204, -0.002508575562387705, -0.019101714715361595, 0.009652042761445045, 0.03537021204829216, 0.03150264918804169, 0.038180943578481674, -0.03842828422784805, 0.0440722294151783, 0.0905279591679573, -0.005348816979676485, -0.02145148254930973, -0.005539946723729372, 0.0423...
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_linearsvc(): # Similar to test_SVC clf = svm.LinearSVC(random_state=0).fit(X, Y) sp_clf = svm.LinearSVC(random_state=0).fit(X_sp, Y) assert_true(sp_clf.fit_intercept) assert_array_almost_equal(clf.coef_, sp_clf.coef_, decimal=4) assert_array_almost_equal(clf.intercept_, sp_clf.interce...
16,787
[ 0.020140470936894417, -0.01738540641963482, 0.010741189122200012, -0.04593357443809509, 0.03173074126243591, 0.010248364880681038, 0.038594651967287064, -0.010064298287034035, 0.008158315904438496, 0.05448377504944801, -0.012362164445221424, -0.02110236883163452, -0.01847793348133564, 0.01...
11
{"_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_weight(): # Test class weights X_, y_ = make_classification(n_samples=200, n_features=100, weights=[0.833, 0.167], random_state=0) X_ = sparse.csr_matrix(X_) for clf in (linear_model.LogisticRegression(), svm.LinearSVC(random_state=0), ...
16,788
[ 0.04391924664378166, -0.027736276388168335, 0.022939778864383698, -0.0249626487493515, 0.004204757045954466, -0.011386471800506115, 0.03968581557273865, -0.03564007207751274, 0.015150681138038635, 0.08283345401287079, 0.008388659916818142, -0.0025038246531039476, -0.02043725736439228, 0.03...
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_sample_weights(): # Test weights on individual samples clf = svm.SVC() clf.fit(X_sp, Y) assert_array_equal(clf.predict([X[2]]), [1.]) sample_weight = [.1] * 3 + [10] * 3 clf.fit(X_sp, Y, sample_weight=sample_weight) assert_array_equal(clf.predict([X[2]]), [2.])
16,789
[ 0.022885149344801903, -0.0069057513028383255, 0.0061994194984436035, -0.011822907254099846, 0.045770298689603806, 0.03933724761009216, 0.006351552903652191, -0.042336441576480865, 0.04959535598754883, 0.01727796159684658, 0.0020184789318591356, -0.028883537277579308, -0.02949206903576851, ...
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 test_sparse_svc_clone_with_callable_kernel(): # Test that the "dense_fit" is called even though we use sparse input # meaning that everything works fine. a = svm.SVC(C=1, kernel=lambda x, y: x * y.T, probability=True, random_state=0) b = base.clone(a) b.fit(X_sp, Y) pred = b...
16,790
[ -0.010515345260500908, -0.020929398015141487, 0.022360144183039665, -0.020081080496311188, 0.03481902554631233, 0.036059848964214325, 0.006786544341593981, 0.0016412421828135848, 0.019853174686431885, 0.06183858588337898, 0.02041027881205082, -0.017194267362356186, 0.0033331301528960466, 0...
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_sparse_realdata(): # Test on a subset from the 20newsgroups dataset. # This catches some bugs if input is not correctly converted into # sparse format or weights are not correctly initialized. data = np.array([0.03771744, 0.1003567, 0.01174647, 0.027069]) indices = np.array([6, 5, 35, 31])...
16,791
[ 0.013936303555965424, -0.008645040914416313, 0.021131062880158424, -0.010112318210303783, 0.013947634026408195, 0.03328850492835045, 0.05692356824874878, 0.0026073919143527746, 0.031611617654561996, 0.04346314072608948, 0.04547993838787079, 0.028552427887916565, -0.007041798904538155, -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}}, {"_type": "arg", "_fields": {"arg": "poke_interval", "annotation": {"_type": "Name", "_fields": {"id":...
def __init__(self, poke_interval: float = 60, timeout: float = 60 * 60 * 24 * 7, soft_fail: bool = False, mode: str = 'poke', exponential_backoff: bool = False, *args, **kwargs) -> None: super(...
16,792
[ 0.015109602361917496, -0.04267580062150955, -0.01460860576480627, 0.015792779624462128, -0.016236845403909683, 0.03113010711967945, 0.04048963636159897, -0.03529748693108559, 0.036003436893224716, 0.06285230070352554, 0.0014567330945283175, -0.03386281803250313, -0.006626818794757128, 0.05...
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 test_consistent_proba(): a = svm.SVC(probability=True, max_iter=1, random_state=0) with ignore_warnings(category=ConvergenceWarning): proba_1 = a.fit(X, Y).predict_proba(X) a = svm.SVC(probability=True, max_iter=1, random_state=0) with ignore_warnings(category=ConvergenceWarning): pr...
16,793
[ 0.033649057149887085, 0.015634916722774506, 0.017904892563819885, -0.02699693664908409, 0.021291648969054222, 0.03204672411084175, 0.0028951300773769617, 0.0017464857082813978, 0.058509547263383865, 0.05273142457008362, -0.0018102149479091167, 0.011871853843331337, -0.017649974673986435, -...
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 _validate_input_values(self) -> None: if not isinstance(self.poke_interval, (int, float)) or self.poke_interval < 0: raise AirflowException( "The poke_interval must be a non-negative number") if not isinstance(self.timeout, (int, float)) or self.timeout < 0: r...
16,794
[ -0.0005806154804304242, 0.007962726056575775, -0.005714989732950926, -0.05595429241657257, -0.006001934874802828, 0.027140222489833832, -0.0016828133957460523, 0.02076765149831772, 0.021652398630976677, 0.01810145191848278, -0.011424001306295395, 0.01648738607764244, -0.011824528686702251, ...
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": "context", "annotation": {"_type": "Name", "_fields": {"id": "Dict...
def execute(self, context: Dict) -> None: started_at = timezone.utcnow() try_number = 1 if self.reschedule: # If reschedule, use first start date of current try task_reschedules = TaskReschedule.find_for_task_instance(context['ti']) if task_reschedules: ...
16,795
[ 0.0036663829814642668, 0.0010129448492079973, 0.006384622305631638, -0.025470277294516563, 0.00445081852376461, -0.007394156418740749, 0.014201692305505276, 0.0011536317178979516, 0.02919463999569416, 0.03317820653319359, 0.020900089293718338, -0.011514147743582726, -0.029740335419774055, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "reset_randomstate", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "pos...
def test_full_output_false(reset_randomstate): # newton needs f, score, start, fargs, kwargs # bfgs needs f, score start, fargs, kwargs # nm needs "" # cg "" # ncg "" # powell "" for method in fit_funcs: func = fit_funcs[method] if method == "newton": xopt, retval...
16,796
[ 0.02168181724846363, -0.011307614855468273, 0.0028469054959714413, -0.04056340083479881, 0.01512126810848713, -0.002785233547911048, -0.011014256626367569, 0.018614893779158592, 0.04499043896794319, 0.03906994313001633, 0.0316026508808136, -0.0012309364974498749, -0.029789164662361145, 0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "reset_randomstate", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "pos...
def test_full_output(reset_randomstate): for method in fit_funcs: func = fit_funcs[method] if method == "newton": xopt, retvals = func( dummy_func, dummy_score, [1], (), {}, hess=dummy_hess, ...
16,797
[ 0.05794315040111542, 0.050328537821769714, -0.008673449978232384, -0.01671610400080681, 0.02602034993469715, 0.022021550685167313, 0.07114481925964355, 0.016580931842327118, 0.004446551203727722, 0.01807907409965992, 0.033297035843133926, 0.040213268250226974, 0.011343070305883884, -0.0023...
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": "path", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, path, mode): if 'r' in mode and zipfile.is_zipfile(path): zip_file = zipfile.ZipFile(path, "r") self._file = zip_file.open(zip_file.filelist[0], "r") else: self._file = open(path, mode) self.seq_already_write = False
16,798
[ -0.012153325602412224, 0.0036586932837963104, -0.0029243577737361193, -0.03367844596505165, 0.021859826520085335, -0.02686889097094536, -0.007767510134726763, 0.01383840199559927, 0.023983485996723175, -0.00566404964774847, 0.024883732199668884, -0.006636431440711021, -0.061170581728219986, ...
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": "Subscript", "_fields"...
def test_minimize_scipy_slsqp(): func = fit_funcs["minimize"] xopt, _ = func( dummy_bounds_constraint_func, None, (2, 0), (), { "min_method": "SLSQP", "bounds": dummy_bounds(), "constraints": dummy_constraints(), }, hess...
16,799
[ -0.03715459257364273, -0.04502054303884506, 0.016187161207199097, -0.01368320919573307, -0.006727788597345352, -0.025014221668243408, -0.0016313623636960983, -0.0026003788225352764, 0.049547888338565826, 0.027518173679709435, 0.027391711249947548, -0.0237748920917511, -0.020385704934597015, ...
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 FixedIpTestV21(test.NoDBTestCase): def setUp(self): super(FixedIpTestV21, self).setUp() fakes.stub_out_networking(self.stubs) fakes.stub_out_rate_limiting(self.stubs) self.stubs.Set(compute.api.API, "add_fixed_ip", compute_api_add_fixed_ip) self.s...
16,800
[ -0.03254201263189316, -0.052047617733478546, 0.019566865637898445, -0.022923985496163368, -0.04146166145801544, -0.03932976722717285, 0.012344155460596085, 0.006074059754610062, 0.025974798947572708, 0.003589913249015808, 0.027812639251351357, -0.012148119509220123, -0.03393876925110817, -...
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): super(FixedIpTestV21, self).setUp() fakes.stub_out_networking(self.stubs) fakes.stub_out_rate_limiting(self.stubs) self.stubs.Set(compute.api.API, "add_fixed_ip", compute_api_add_fixed_ip) self.stubs.Set(compute.api.API, "remove_fixed_ip", ...