Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
15
7.82k
ids
sequencelengths
1
7
def METHOD_NAME(self, session): pass
[ 69, 2333 ]
def METHOD_NAME(g): g.cmd(b's', b'T05thread:01;')
[ 8149, 367 ]
def METHOD_NAME(self): self.check('/admin/default/shell') ws_url = server.base_url.replace('http://', 'ws://') + '/admin/default/webshell-data' ws = create_connection(ws_url) # Python expressions are computed ws.send('1 + 2') eq_(ws.recv(), '3') # Session state is maintained. Gramex can be i...
[ 9, 2770 ]
def METHOD_NAME(self, x): self.__buf.write(struct.pack('>L', x))
[ 1699, 11068 ]
def METHOD_NAME(self): action = ChatJoinRequestHandler(self.callback) for attr in action.__slots__: assert getattr(action, attr, "err") != "err", f"got extra slot '{attr}'" assert len(mro_slots(action)) == len(set(mro_slots(action))), "duplicate slot"
[ 9, 3572, 3573 ]
def METHOD_NAME(self) -> str: """ Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} """ return pulumi.get(self, "id")
[ 147 ]
def METHOD_NAME(path: Optional[Path] = None) -> Path: if path is None: path = Path.cwd() here = path while here.parent != here: config = here / ".neuro.toml" if config.exists(): return here here = here.parent raise ConfigError(f"Project root is not found for {...
[ 416, 155, 1563 ]
def METHOD_NAME(): parser = argparse.ArgumentParser( description=USAGE, prog="ddtrace-run", usage="ddtrace-run <your usual python command>", formatter_class=argparse.RawTextHelpFormatter, ) parser.add_argument("command", nargs=argparse.REMAINDER, type=str, help="Command strin...
[ 57 ]
def METHOD_NAME(iterable, n): """ Split a interable into chunks of length n with the final element being the remainder len < n if n does not divide evenly """ len_iter = len(iterable) return [iterable[i: min(i + n, len_iter)] for i in range(0, len_iter, n)]
[ 1828, 293 ]
def METHOD_NAME(self): log.debug("Loading live event") res = self.request("GET", self.live_url) for event in res.get("events", []): return "event/{sportId}/{propertyId}/{tournamentId}/{id}".format(**event)
[ 19, 1824, 147 ]
def METHOD_NAME(n_servers, i=None): return server_n
[ 1260, 2122, 1170, 163 ]
def METHOD_NAME(self) -> 'outputs.PrivateEndpointConnectionPropertiesResponse': """ Resource properties. """ return pulumi.get(self, "properties")
[ 748 ]
def METHOD_NAME(self): cli_params = ['application_name', 'config_file', 'eu-west-1', '--destinationTableAutoCreate', '--connection-pre-test', 'False'] config_reader = GlobalConfigParametersReader() default_parameters = config_reader.get_config_key_values_updated_with_cli_args(cli_params) expected_value ...
[ 9, 285, 200, 781, 7440, 235, 99 ]
def METHOD_NAME( staff_api_client, permission_manage_shipping, shipping_method ): # given shipping_method.store_value_in_private_metadata({PUBLIC_KEY: PUBLIC_VALUE}) shipping_method.save(update_fields=["metadata"]) shipping_method_id = graphene.Node.to_global_id( "ShippingMethodType", shippi...
[ 9, 34, 547, 773, 43, 850, 103 ]
def METHOD_NAME(self): if not session.user: raise Forbidden # If the user cannot manage the whole event see if anything gives them # limited management access. if not self.event.can_manage(session.user): urls = sorted(values_from_signal(signals.event_management.management_url.send(self.e...
[ 250, 1089 ]
def METHOD_NAME(cursor) -> List[Tuple[DbTableSchema, str]]: schemas: Dict = {} for row in cursor.fetchall(): table_schema_name: str = row[_TABLE_SCHEMA] table_name: DbTableMeta = DbTableMeta(row[_TABLE_NAME]) table_column: DbColumn = DbColumn( name=row[_COLUMN_NAME], ...
[ 214, 539, 1571 ]
def METHOD_NAME(): # Try again with a target with a stretched y axis. A_orig = np.array([[-3, 3], [-2, 3], [-2, 2], [-3, 2]], dtype=float) B_orig = np.array([[3, 40], [1, 0], [3, -40], [5, 0]], dtype=float) A, A_mu = _centered(A_orig) B, B_mu = _centered(B_orig) R, s = orthogonal_procrustes(A, B...
[ 9, 5329, 5330, 14262, 1441 ]
def METHOD_NAME( mock_smb_client: SMBClient, smb_remote_access_client: SMBRemoteAccessClient, ): tags = EXPLOITER_TAGS.copy() smb_remote_access_client.login(FULL_CREDENTIALS[0], set()) smb_remote_access_client.execute_agent(DESTINATION_PATH, tags) assert tags == EXPLOITER_TAGS.union(EXECUTION_TA...
[ 9, 750, 7909 ]
def METHOD_NAME(self) -> str: """ Gets the workflow trigger callback URL relative path. """ return pulumi.get(self, "relative_path")
[ 1821, 157 ]
def METHOD_NAME(self): form_data = { "name": "Assunto 2", "visible": True, "init_date": datetime.now() + timedelta(days=2), "end_date": datetime.now() + timedelta(days=3), "subscribe_begin": datetime.now(), "subscribe_end": datetime.now() + timedelta(days=1), ...
[ 9, 1029, 114 ]
def METHOD_NAME(self): self.deployment_type = "AllAtOnce" self.pre_traffic_hook = "pre_traffic_function_ref" self.post_traffic_hook = "post_traffic_function_ref" self.alarms = ["alarm1ref", "alarm2ref"] self.role = {"Ref": "MyRole"} self.trigger_configurations = { "TriggerEvents": ["Depl...
[ 0, 1 ]
def METHOD_NAME(x, n): c = 0.9 mu = (np.arange(1, n+1) - 0.5)/n return x - 1/(1 - c/(2*n) * (mu[:,None]*x / (mu[:,None] + mu)).sum(axis=1))
[ 474, 1327 ]
def METHOD_NAME(): args = argsparser() config_parser = ConfigParser(args) args = config_parser.parser() random.seed(args.seed) np.random.seed(args.seed) paddle.seed(args.seed) paddle.device.set_device(args.device) class_name = args.category assert class_name in mvtec.CLASS_NAMES ...
[ 57 ]
def METHOD_NAME(api_dir, xml_dir): import subprocess, sys try: # We don't generate groups since we create those manually ret = subprocess.call('breathe-apidoc -m -o %s -p openucx %s -g struct,file' % (api_dir, xml_dir), shell=True) if ret < 0: sys.stderr.write('breathe-apidoc...
[ 22, 4892 ]
def METHOD_NAME( tmp_path: Path, filename: str, fmt: str | None, data: str, expected: Any, testing_metadata, ): path = tmp_path / filename path.write_text(data) assert ( jinja_context.load_file_data(str(path), fmt, config=testing_metadata.config) == expected )
[ 9, 557, 171, 365 ]
def METHOD_NAME(self) -> int: return hash(self)
[ 1161, 544 ]
def METHOD_NAME(self): """Open preferences dialog""" widgets = gamewidget.getWidgets() preferencesDialog.run(widgets) notebook = widgets["preferences_notebook"] self.assertIsNotNone(preferencesDialog.general_tab) notebook.next_page() self.assertIsNotNone(preferencesDialog.hint_tab) noteb...
[ 9251 ]
def METHOD_NAME(dataarray) -> None: data_repr = fh.short_data_repr_html(dataarray) assert data_repr.startswith("<pre>array")
[ 9, 1707, 365, 92, 382 ]
def METHOD_NAME(self, fileno, new=False): mask = 0 if self.listeners[self.READ].get(fileno): mask |= self.READ_MASK | self.EXC_MASK if self.listeners[self.WRITE].get(fileno): mask |= self.WRITE_MASK | self.EXC_MASK try: if mask: if new: self.poll.METHO...
[ 372 ]
def METHOD_NAME(self): # restart the collectd mapper to use recently set port c8y_mapper_status = self.startProcess( command=self.sudo, arguments=["systemctl", "restart", "tedge-mapper-collectd.service"], stdouterr="collectd_mapper_restart", ) # check the status of the collectd m...
[ 187, 17916, 3782 ]
def METHOD_NAME(self, collection_name, vectors, top_k): # Search vector in milvus collection try: self.set_collection(collection_name) search_params = { "metric_type": METRIC_TYPE, "params": { "nprobe": 16 } } res = self.collect...
[ 1070, 1742 ]
def METHOD_NAME(q, t, q_len, t_len): """Compute the sliding dot products between a query and a time series. Parameters ---------- q: numpy.array Query. t: numpy.array Time series. q_len: int Length of the query. t_len: int Lengt...
[ 3343, 1903, 4866 ]
def METHOD_NAME(file_path, size=None): """ Turn given picture into a smaller version. """ im = Image.open(file_path) if size is not None: (width, height) = size if height == 0: size = get_full_size_from_width(im, width) else: size = im.size im = make_im_bi...
[ 6553, 409, 4137 ]
def METHOD_NAME(self): pass
[ 9, 3637 ]
METHOD_NAME(self):
[ 192 ]
def METHOD_NAME(): group_delete_mock = MagicMock(return_value=True) group_info_mock = MagicMock(return_value={"things": "stuff"}) with patch.dict(group.__salt__, {"group.delete": group_delete_mock}), patch.dict( group.__salt__, {"group.info": group_info_mock} ): ret = group.absent("salt"...
[ 9, 1447, 41, 125 ]
def METHOD_NAME(bin): if type(bin) == type(bytes()): try: return bytes.decode(bin, encoding='utf-8', errors='strict') except: pass # we want a hexdump in \xNN notation. bin.hex only takes a single char, so we replace that later. return "\\x" + bin.hex(':').replace(':', "\\x") return "ERR...
[ 762, 5990 ]
def METHOD_NAME(): # One of these environment variables are guaranteed to exist # from our official docker images. # DISPATCH_VERSION is from a tagged release, and DISPATCH_BUILD is from a # a git based image. return "DISPATCH_VERSION" in os.environ or "DISPATCH_BUILD" in os.environ
[ 137, 223 ]
def METHOD_NAME(validate_event_schema): def inner(message, **kwargs): event = serialize({"logentry": {"message": message}}, **kwargs) validate_event_schema(event) return event["logentry"]["message"] return inner
[ 277, 7331 ]
def METHOD_NAME(): s = vaex.string_column(["aap", None, "noot", "mies"]) o = ["aap", None, "noot", np.nan] x = np.arange(4, dtype=np.float64) x[2] = x[3] = np.nan m = np.ma.array(x, mask=[0, 1, 0, 1]) df = vaex.from_arrays(x=x, m=m, s=s, o=o) x = df.x.dropmissing().tolist() assert (9 not...
[ 9, -1 ]
def METHOD_NAME(A, node_features, k): """ Compute the k-hop adjacency matrix and aggregated features using message passing. Parameters: A (numpy array or scipy sparse matrix): The adjacency matrix of the graph. node_features (numpy array or scipy sparse matrix): The feature matrix of the nodes. ...
[ 4407, 2367, 277, 7405, 2087 ]
def METHOD_NAME(self): if self.options.shared: self.options.rm_safe("fPIC") self.options["trantor"].shared = True if not self.options.with_orm: del self.options.with_postgres del self.options.with_postgres_batch del self.options.with_mysql del self.options.with_sq...
[ 111 ]
async def METHOD_NAME(self): pass
[ 958, 531, 481 ]
def METHOD_NAME( self, recipe: BaseRecipe, recipe_conf: PerfRecipeConf, results: List[PerfMeasurementResults], ) -> List[List[PerfMeasurementResults]]: results_by_host = self._divide_results_by_host(results) for host_results in results_by_host.values(): yield host_results
[ 846, 51 ]
def METHOD_NAME(): aq17 = ThermoFunDatabase("aq17") T = 298.15 P = 1.0e5 #------------------------------------------------------------------- # Testing attributes and thermodynamic properties of H2O@ #------------------------------------------------------------------- species = aq17.species(...
[ 9, 12077, 3435, 463 ]
def METHOD_NAME(next_link=None): if not next_link: request = build_list_request( subscription_id=self._config.subscription_id, api_version=api_version, template_url=self.list.metadata["url"], headers=_headers, params=_params, ) requ...
[ 123, 377 ]
def METHOD_NAME(self, record: logging.LogRecord) -> str: levelname = record.levelname if self.use_color and levelname in self.COLORS: levelname_with_color = ( self.COLOR_SEQ % (30 + self.COLORS[levelname]) + levelname + self.RESET_SEQ ) record.levelnam...
[ 275 ]
def METHOD_NAME(self): section = self.doc_structure.add_new_section('mysection') section.writeln('section contents') self.doc_structure.hrefs['foo'] = 'www.foo.com' section.hrefs['bar'] = 'www.bar.com' contents = self.doc_structure.flush_structure() self.assertIn(b'.. _foo: www.foo.com', content...
[ 9, 1579, 1011, 12292 ]
def METHOD_NAME(): """ "vendors" notary into docker by copying all of notary into the docker vendor directory - also appending several lines into the Dockerfile because it pulls down notary from github and builds the binaries """ docker_notary_relpath = "vendor/src/github.com/theupdateframework/...
[ 1278, 2080 ]
def METHOD_NAME(context, data_dict): return {'success': False, 'msg': 'Not implemented yet in the auth refactor'}
[ 71, 7588 ]
def METHOD_NAME(): if not isRunningAsRoot(): return False if not isMMapSupported(): return False return True
[ 137, 845, 4045, 616 ]
def METHOD_NAME(filename, line): """ Append one line of text to filename. :param filename: Path to the file. :type filename: str :param line: Line to be written. :type line: str """ append_file(filename, line.rstrip("\n") + "\n")
[ 1459, 206, 534 ]
def METHOD_NAME(self, assembler): """ Create a list of functions to be tested and their reference values for the problem """ func_list = [ functions.StructuralMass(assembler), functions.Compliance(assembler), functions.KSDisplacement( assembler, ksWeight=ksweight, dir...
[ 102, 3168 ]
def METHOD_NAME(request, kube_apis): filtered_ns_1 = create_namespace_with_name_from_yaml(kube_apis.v1, f"filtered-ns-1", f"{TEST_DATA}/common/ns.yaml") filtered_ns_2 = create_namespace_with_name_from_yaml(kube_apis.v1, f"filtered-ns-2", f"{TEST_DATA}/common/ns.yaml") filtered_secret_1 = create_secret_from_...
[ 102, 107, 3619, 61, 107, 2161 ]
def METHOD_NAME(name: Optional[pulumi.Input[str]] = None, resource_group_name: Optional[pulumi.Input[str]] = None, version: Optional[pulumi.Input[str]] = None, workspace_name: Optional[pulumi.Input[str]] = None, ...
[ 19, 365, 281, 146 ]
METHOD_NAME( self ) :
[ 9, 215 ]
def METHOD_NAME(address: str) -> bytes32: hrpgot, data = bech32_decode(address) if data is None: raise ValueError("Invalid Address") decoded = convertbits(data, 5, 8, False) decoded_bytes = bytes32(decoded) return decoded_bytes
[ 1268, 727, 1161 ]
def METHOD_NAME(en_vocab): doc = Doc(en_vocab, words=["hello", "world"]) with make_tempdir() as d: file_path = d / "doc" doc.to_disk(file_path) doc_d = Doc(en_vocab).from_disk(file_path) assert doc.to_bytes() == doc_d.to_bytes()
[ 9, 183, 366, 3544, 113 ]
def METHOD_NAME(self): with self.assertRaises(ValueError): losses.regularization_penalty("l1_l2", 1e-4, [])
[ 9, 6773, 1038, 930, 99 ]
def METHOD_NAME(): """Parse command line arguments using argparse. """ parser = argparse.ArgumentParser(description=DESCRIPTION) parser.add_argument( '-V', '--version', action='version', version='{0}: v{1} by {2}'.format('%(prog)s', __version__, __author__) ) parser.add_a...
[ 214, 335 ]
def METHOD_NAME( component: ComponentSpec, cross_section: CrossSectionSpec = "strip", port1: str = "o1", port2: str = "o2", straight_length: float | None = None, **kwargs, ) -> ComponentSpec: """Returns double straight. Args: component: for cutback. cross_section: specifi...
[ 9590, 2152 ]
def METHOD_NAME(self): """ BaseDirectory with no existence check accepts any pathlib path. """ foo = SimpleBaseDirectory() foo.path = pathlib.Path("!!!") self.assertIsInstance(foo.path, str)
[ 9, 53, 1186, 2147, 11771 ]
def METHOD_NAME(): fmt = """ # comments are allowed > # big endian (see documentation for struct) # empty lines are allowed: ashort: h along: l abyte: b # a byte achar: c astr: 5s afloat: f; adouble: d # multiple "statements" are allowed afixed: 16.16F abool: ? apad: x """ print("size:...
[ 9 ]
def METHOD_NAME(tmp_path): outfilename = tmp_path / "vu_tide_hourly_p0.dfs0" ds = mikeio.read("tests/testdata/vu_tide_hourly.dfs1") assert ds.n_elements > 1 ds_0 = ds.isel(0, axis="space") assert ds_0.n_elements == 1 ds_0_0 = ds_0.isel(0) assert ds_0_0.n_timesteps == 1 ds_0_0.to_dfs(outf...
[ 9, 1472, 1669, 61, 97, 367, 2085 ]
def METHOD_NAME(self): self.window.show_all() self.window.present()
[ 697 ]
async def METHOD_NAME( auth: AcaPyAuth = Depends(acapy_auth),
[ 129, 1837 ]
def METHOD_NAME(): session = requests.Session() make_session_public_only(session, 'demo_domain', src='testing') return session
[ 0, 1, 240 ]
def METHOD_NAME(self): self.assertEqual(build_password("plain"), "plaintext:plain")
[ 9, 235, 11129 ]
def METHOD_NAME( user_id: str ) -> List[learner_group_domain.LearnerGroup]: """Returns a list of learner groups of the given facilitator. Args: user_id: str. The id of the facilitator. Returns: list(LearnerGroup). A list of learner groups of the given facilitator. """ learner_grp...
[ 19, 5916, 861, 47, -1 ]
def METHOD_NAME(self, value: Optional[float]) -> None: """When not draining we pass thru to the socket, since when draining we control the timeout. """ if value is not None: self._recv_timeout_sec = value if self._drain_thread is None: socket.socket.METHOD_NAME(self, value)
[ 4247 ]
def METHOD_NAME( self, description: str, params: Mapping[str, Any], url: bool | None = False, provider: ExternalProviders | None = None, ) -> str: if self.user: name = self.user.name or self.user.email else: name = "Sentry" issue_name = self.group.qualified_short_id or "a...
[ 1067, 947, 526 ]
def METHOD_NAME(self, native_face): self._face = native_face self._loops = [RhinoBrepLoop(loop) for loop in native_face.Loops] self._surface = RhinoNurbsSurface.from_rhino(self._face.UnderlyingSurface().ToNurbsSurface())
[ 0, 4805 ]
def METHOD_NAME(self, user): return self.get_for_user(user, teammembership__role=TeamMembership.ROLE.OWNER)
[ 19, 2013, 6969 ]
def METHOD_NAME(): column = BigqueryColumn( name="date", field_path="date", ordinal_position=1, data_type="TIMESTAMP", is_partition_column=True, cluster_column_position=None, comment=None, is_nullable=False, ) partition_info = PartitionInfo(typ...
[ 9, 567, 1724, 1816, 2312, 7275, 539 ]
def METHOD_NAME(self, inputs, metric, functional_metric, ref_metric, ignore_index): """Test functional implementation of metric.""" preds, target = inputs if ignore_index is not None: target = inject_ignore_index(target, ignore_index) self.run_functional_metric_test( preds=preds, ...
[ 9, 9585, 4510, 4167 ]
def METHOD_NAME(self, positions: TensorType["bs":..., 3]) -> TensorType["bs":..., 1]: """Returns only the density. Used primarily with the density grid. Args: positions: the origin of the samples/frustums """ # Need to figure out a better way to descibe positions with a ray. ray_samples = Ra...
[ 2915, 667 ]
METHOD_NAME(self, old_name, new_name, merge=False):
[ 1887, 2010 ]
def METHOD_NAME(): examinee = create_upgrade_pr( from_ref=cm.ComponentReference( name='c1', componentName='c1', version='1.2.3', ), to_ref=cm.ComponentReference( name='c1', componentName='c1', version='2.0.0', ),...
[ 9, 137, 8439 ]
def METHOD_NAME(testsystem_names, niterations=5): """ Run sampler stack on named test systems. Parameters ---------- testsystem_names : list of str Names of test systems to run niterations : int, optional, default=5 Number of iterations to run """ for testsystem_name in t...
[ 22, 17407 ]
def METHOD_NAME(self) -> Response: """ Get a list with all of the tabels in TDEngine """ q = 'SHOW TABLES;' return self.native_query(q)
[ 19, 2253 ]
def METHOD_NAME( self, configs: List[Config[ModelConfig]], performances: List[Performance], ) -> None: super().METHOD_NAME(configs, performances) # We need to sort by dataset to have the same ordering for each model config ordering = np.argsort([c.dataset.name() for c in configs]) performanc...
[ 90 ]
async def METHOD_NAME(mock_iam_client): group = await get_group(EXAMPLE_GROUPNAME, mock_iam_client) assert group["GroupName"] == EXAMPLE_GROUPNAME
[ 9, 19, 846 ]
def METHOD_NAME(self, Paramsmulticast): # controle parameters multicast return self.api.SetMulticastMultiSessionParameters(Paramsmulticast)
[ 5315, 0, 138, 457, 240, 386 ]
f METHOD_NAME(self):
[ 9, 356, 171 ]
def METHOD_NAME(m): opt = pyo.SolverFactory('gurobi') res = opt.solve(m) assert_optimal_termination(res)
[ 283, 5295, 708 ]
def METHOD_NAME(self) -> str: """ Resource ID. """ return pulumi.get(self, "id")
[ 147 ]
def METHOD_NAME(self): return self.event.METHOD_NAME + f"/session/{self.id}"
[ 1055, 548 ]
def METHOD_NAME(colorer, s, i): return colorer.match_seq_regexp(s, i, kind="label", regexp="`[A-z0-9]+[^`]+`_{1,2}")
[ 3183, 6935 ]
def METHOD_NAME(self): for pos in self: seq = pos.l10n_es_simplified_invoice_sequence_id pos.l10n_es_simplified_invoice_number = ( seq._get_current_sequence().number_next_actual ) pos.l10n_es_simplified_invoice_prefix = seq._get_prefix_suffix()[0] pos.l10n_es_simp...
[ 226, 8018, 2486, 771 ]
def METHOD_NAME(self): x = tensor.Tensor(np.array([1, 2, 3])) self.assertEqual(x.rank, 1)
[ 9, 1499, 137, 206, 43, 798 ]
def METHOD_NAME(): assert not np.isnan(atmosphere.get_relative_airmass(10))
[ 9, 10054, 1997 ]
def METHOD_NAME(): """Return the default filters (all available filters).""" return dict((name, set(PlayerIter(name))) for name in PlayerIter.filters)
[ 19, 235, 469 ]
def METHOD_NAME(self, token_ids: Sequence[bytes]) -> Sequence[KlerosToken]: queries = [] for token_id in token_ids: queries.append(self.kleros_contract.functions.getTokenInfo(token_id)) # name string, ticker string, addr address, symbolMultihash string, status uint8, numberOfRequests uint256 tok...
[ 19, 466, 100 ]
def METHOD_NAME( self, aligned_segment_starting_times: List[List[float]], stub_test: bool = False ): """ Align the individual starting time for each video in this interface relative to the common session start time. Must be in units seconds relative to the common 'session_start_time'. Parameters ...
[ 0, 7546, 4373, 8466, 3148 ]
def METHOD_NAME(self, msg): pass
[ 69, 5862 ]
def METHOD_NAME(self, output, identifier): return self._wrapped.METHOD_NAME(output._lines, identifier)
[ 19, 99, 280, 146 ]
def METHOD_NAME(): x = np.zeros((5, 5), dtype=int) array_2d_view_assign(x[::, ::], 9) array_2d_view_assign(x[:2:2, :2:3], 10) array_2d_view_assign(x[3::2, 3::3], 11) array_2d_view_assign(x[1:2, 2:3], 12) array_1d_view_assign(x[0, :], 1) array_1d_view_assign(x[1, ::2], 2) array_1d_view_as...
[ 877, 1085, 1179 ]
def METHOD_NAME(iterable): """Test whether visitors properly set the type constraint of the a For node representing for/else statement iterating over a heterogeneous list. """ assume(type(iterable[0]) != type(iterable[1])) val_types = [type(val) for val in iterable] if int in val_types: ...
[ 9, 43, 5565, 245 ]
def METHOD_NAME(plistpath, content): """A test utility to create a plist file with known content. Ensures that the directory for the file exists, and writes an XML plist with specific content. :param plistpath: The path for the plist file to create. :param content: A dictionary of content that plist...
[ 129, 5953, 171 ]
def METHOD_NAME(instance, check, aggregator): del instance['custom_queries'] with mock.patch( 'datadog_checks.ibm_was.IbmWasCheck.make_request', return_value=mock_data('perfservlet-multiple-nodes.xml') ): check = check(instance) check.check(instance) node = 'node:cmhqlvij2a04' ...
[ 9, 2786, 163, 82 ]
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
13