query stringlengths 10 2k | document stringlengths 20 51.2k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Compute the qth quantile of the data along the specified axis, while ignoring nan values. Wrapping np.nanquantile | def nanquantile(self, q, *, axis=0, **kwargs) -> "Dataset":
return self._quantile(q, axis=axis, func=np.nanquantile, **kwargs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def quantile(self, q, *, axis=0, **kwargs) -> \"Dataset\":\n return self._quantile(q, axis=axis, func=np.quantile, **kwargs)",
"def quantile(series: Sequence, quantile: Union[None, float] = None):\n if quantile is None:\n try:\n last, series = series[-1], series[:-1]\n retu... | [
"0.7184147",
"0.6936191",
"0.6727281",
"0.6711691",
"0.654463",
"0.65105313",
"0.63924503",
"0.637806",
"0.6341884",
"0.62984467",
"0.6278268",
"0.62484974",
"0.618317",
"0.6170574",
"0.61692625",
"0.61671835",
"0.61428773",
"0.6102075",
"0.6098417",
"0.60966015",
"0.6042386"... | 0.81329286 | 0 |
Max value along an axis (NaN removed) | def nanmax(self, axis=0, **kwargs) -> "Dataset":
return self.aggregate(axis=axis, func=np.nanmax, **kwargs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nanmax(a, axis=None):\n y = array(a, subok=True)\n if not issubclass(y.dtype.type, _nx.integer):\n y[isnan(a)] = -_nx.inf\n return y.max(axis)",
"def nanargmax(a, axis=None):\n y = array(a,subok=True)\n if not issubclass(y.dtype.type, _nx.integer):\n y[isnan(a)] = -_nx.inf\n r... | [
"0.8146544",
"0.7660803",
"0.7338371",
"0.72976214",
"0.7216784",
"0.72148705",
"0.7120048",
"0.69568974",
"0.69553584",
"0.69323945",
"0.6904336",
"0.68544555",
"0.6825769",
"0.6813247",
"0.6795778",
"0.6783772",
"0.6779849",
"0.6749476",
"0.6718724",
"0.6678142",
"0.6658603... | 0.7718298 | 1 |
Min value along an axis (NaN removed) | def nanmin(self, axis=0, **kwargs) -> "Dataset":
return self.aggregate(axis=axis, func=np.nanmin, **kwargs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nanmin(a, axis=None):\n y = array(a,subok=True)\n if not issubclass(y.dtype.type, _nx.integer):\n y[isnan(a)] = _nx.inf\n return y.min(axis)",
"def nanargmin(a, axis=None):\n y = array(a, subok=True)\n if not issubclass(y.dtype.type, _nx.integer):\n y[isnan(a)] = _nx.inf\n ret... | [
"0.81511104",
"0.74820536",
"0.723163",
"0.71335053",
"0.7130694",
"0.7095125",
"0.70706505",
"0.7024405",
"0.70151824",
"0.70009863",
"0.6964784",
"0.69630307",
"0.6956852",
"0.6945719",
"0.6945383",
"0.6943358",
"0.6862732",
"0.682295",
"0.67841405",
"0.67729205",
"0.677292... | 0.7880222 | 1 |
Convert Dataset to a Pandas DataFrame | def to_pandas(self, **kwargs) -> pd.Series | pd.DataFrame:
if self.n_items != 1:
return self.to_dataframe(**kwargs)
else:
return self[0].to_pandas(**kwargs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_to_df(data):\r\n ans = pd.DataFrame(data)\r\n return ans",
"def to_pandas_df(self):\n data = self._get_data(pd=True)\n return data",
"def as_dataframe(self) -> \"pd.DataFrame\":\n import pandas as pd\n\n df = pd.DataFrame([row.as_series() for row in self.rows])\n ... | [
"0.78686273",
"0.7611633",
"0.743833",
"0.7393665",
"0.73556995",
"0.7094109",
"0.7082637",
"0.706036",
"0.70400715",
"0.70134246",
"0.70134246",
"0.69809103",
"0.69196576",
"0.69052213",
"0.68982834",
"0.68625337",
"0.6852273",
"0.68181056",
"0.67492163",
"0.67334753",
"0.66... | 0.0 | -1 |
Convert Dataset to a Pandas DataFrame | def to_dataframe(
self, *, unit_in_name: bool = False, round_time: str | bool = "ms"
) -> pd.DataFrame:
if self.ndim > 1:
raise ValueError(
"Only data with a single dimension can be converted to a dataframe. Hint: use `squeeze` to remove singleton dimensions or `isel` to ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_to_df(data):\r\n ans = pd.DataFrame(data)\r\n return ans",
"def to_pandas_df(self):\n data = self._get_data(pd=True)\n return data",
"def as_dataframe(self) -> \"pd.DataFrame\":\n import pandas as pd\n\n df = pd.DataFrame([row.as_series() for row in self.rows])\n ... | [
"0.78686273",
"0.7611633",
"0.743833",
"0.7393665",
"0.73556995",
"0.7094109",
"0.7082637",
"0.706036",
"0.70400715",
"0.70134246",
"0.70134246",
"0.69809103",
"0.69196576",
"0.69052213",
"0.68982834",
"0.68625337",
"0.6852273",
"0.68181056",
"0.67492163",
"0.67334753",
"0.66... | 0.0 | -1 |
This filter performs semiautomatic multithresholding of a data set. Voxels are automatically classified into a chosen number of classes such that interclass variance of the voxel values is minimized. The output is a label map with one label per voxel class. | def transform(self, dataset, number_of_thresholds=1,
enable_valley_emphasis=False):
# Initial progress
self.progress.value = 0
self.progress.maximum = 100
# Approximate percentage of work completed after each step in the
# transform
STEP_PCT = [10, 20,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GlobalThresholding(image, kernel_sigma, N_levels, N_classes, step = 1): \n \n if kernel_sigma >= 1:\n image = Denoising(image, kernel_sigma);\n \n pixel_count, pixel_count_normalized = CountPixels(image, N_levels);\n mean_g = image.mean(); # global mean\n\n if N_classes == 2:... | [
"0.6789509",
"0.6082601",
"0.57816094",
"0.562476",
"0.5605348",
"0.5578588",
"0.5536205",
"0.5525997",
"0.5513793",
"0.5498474",
"0.54799175",
"0.5472891",
"0.54496235",
"0.54342127",
"0.5423375",
"0.5408499",
"0.54080087",
"0.53988403",
"0.5359552",
"0.53423816",
"0.5341909... | 0.0 | -1 |
Render the rock main index page. | def index(self):
return render("/derived/rock/index.mako") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index(self):\n return render_template('main/index.html')",
"def index(self):\n\t\treturn render_template('index.html')",
"def index():\r\n return render_template('index.html')",
"def index():\n return render_template('index.html')",
"def index():\n\n\treturn(render_template... | [
"0.8169865",
"0.8097387",
"0.79788834",
"0.7961282",
"0.7960076",
"0.79286724",
"0.79286724",
"0.7926249",
"0.7854505",
"0.78412926",
"0.78412926",
"0.78113234",
"0.77949405",
"0.7752855",
"0.7752855",
"0.7752855",
"0.7747315",
"0.7742504",
"0.7734907",
"0.7724055",
"0.771404... | 0.8350566 | 0 |
Remove whitespace and punctuation from word list and return list. | def convert_book_to_list_of_words(book):
book = book.replace('\n', ' ')
book = book.split(' ')
filtered_book = []
for word in book:
for c in word:
word = ''.join([c for c in word if c.isalpha()])
if word:
filtered_book.append(word)
return filtered_book | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_punctuation(words: list) -> list:\n new_words = []\n for word in words:\n new_word = re.sub(r'[^\\w\\s]', '', word)\n if new_word != '':\n new_words.append(new_word)\n return new_words",
"def strip_punctuation(word_list):\n return [word.strip(punctuation) for word ... | [
"0.8220594",
"0.81486297",
"0.7974198",
"0.7910484",
"0.78758574",
"0.78716475",
"0.78716475",
"0.78716475",
"0.78716475",
"0.78716475",
"0.78716475",
"0.78694326",
"0.77411914",
"0.772312",
"0.7695867",
"0.7693235",
"0.7616778",
"0.7595553",
"0.75498295",
"0.75003374",
"0.74... | 0.0 | -1 |
Remove all boxes with any side smaller than min_size. | def _filter_boxes(boxes, min_size):
ws = boxes[:, 2] - boxes[:, 0] + 1
hs = boxes[:, 3] - boxes[:, 1] + 1
keep = np.where((ws >= min_size) & (hs >= min_size))[0]
return keep | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_small_boxes(boxes, min_size):\r\n ws, hs = boxes[:, 2] - boxes[:, 0], boxes[:, 3] - boxes[:, 1]\r\n keep = (ws >= min_size) & (hs >= min_size)\r\n keep = np.where(keep)[0]\r\n return keep",
"def remove_small_boxes(boxlist, min_size):\n # TODO maybe add an API for querying the ws / hs\n ... | [
"0.844285",
"0.81151116",
"0.79018307",
"0.78406245",
"0.7636337",
"0.75476605",
"0.66610324",
"0.6600835",
"0.6247463",
"0.6089499",
"0.6043841",
"0.59839225",
"0.59649944",
"0.59573674",
"0.58060014",
"0.57966226",
"0.5783344",
"0.5774629",
"0.57445675",
"0.5741229",
"0.572... | 0.7921694 | 3 |
Remove all boxes with any side smaller than min_size. | def _filter_img_boxes(boxes, im_info):
padding = 50
w_min = -padding
w_max = im_info[1] + padding
h_min = -padding
h_max = im_info[0] + padding
keep = np.where((w_min <= boxes[:,0]) & (boxes[:,2] <= w_max) & (h_min <= boxes[:,1]) &
(boxes[:,3] <= h_max))[0]
return keep | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_small_boxes(boxes, min_size):\r\n ws, hs = boxes[:, 2] - boxes[:, 0], boxes[:, 3] - boxes[:, 1]\r\n keep = (ws >= min_size) & (hs >= min_size)\r\n keep = np.where(keep)[0]\r\n return keep",
"def remove_small_boxes(boxlist, min_size):\n # TODO maybe add an API for querying the ws / hs\n ... | [
"0.844285",
"0.81151116",
"0.7921694",
"0.7921694",
"0.79018307",
"0.78406245",
"0.7636337",
"0.75476605",
"0.66610324",
"0.6600835",
"0.6247463",
"0.6089499",
"0.6043841",
"0.59839225",
"0.59649944",
"0.59573674",
"0.58060014",
"0.57966226",
"0.5783344",
"0.5774629",
"0.5741... | 0.57445675 | 20 |
Return the Lpnorm of ``x``. | def _call(self, x):
if self.exponent == 0:
return self.domain.one().inner(np.not_equal(x, 0))
elif self.exponent == 1:
return x.ufuncs.absolute().inner(self.domain.one())
elif self.exponent == 2:
return np.sqrt(x.inner(x))
elif np.isfinite(self.exponen... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_norm(x):\n return np.sqrt(np.sum(np.square(x)))",
"def normpdf(x, mu, sigma):\n return np.exp(-0.5 * ((x - mu) / sigma)**2) / (np.sqrt(2.0 * np.pi) * sigma)",
"def normalizerows(x):\n # Compute x_norm as the norm 2 of x. Use np.linalg.norm(..., ord=2, axis= ..., keepdims=True)\n x_norm = np... | [
"0.659248",
"0.65489304",
"0.6484165",
"0.63767415",
"0.6365428",
"0.6334258",
"0.63126105",
"0.6302611",
"0.62880284",
"0.6279716",
"0.6279716",
"0.6258947",
"0.6244585",
"0.6238091",
"0.6238091",
"0.6234304",
"0.6231905",
"0.6231905",
"0.6231905",
"0.62142503",
"0.61875373"... | 0.0 | -1 |
Return the group L1norm of ``x``. | def _call(self, x):
# TODO: update when integration operator is in place: issue #440
pointwise_norm = self.pointwise_norm(x)
return pointwise_norm.inner(pointwise_norm.space.one()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l1_normalize(x: np.ndarray) -> np.ndarray: # pylint: disable=invalid-name\n return x / x.sum()",
"def l1_norm(f):\n return dmp_l1_norm(f.rep, f.lev, f.dom)",
"def normalizerows(x):\n # Compute x_norm as the norm 2 of x. Use np.linalg.norm(..., ord=2, axis= ..., keepdims=True)\n x_norm = np... | [
"0.71530235",
"0.7008377",
"0.6907065",
"0.6812746",
"0.6739675",
"0.67038065",
"0.656245",
"0.6539035",
"0.64698774",
"0.64266086",
"0.6391742",
"0.63589257",
"0.63474756",
"0.6337067",
"0.63293564",
"0.6326656",
"0.6305104",
"0.6305104",
"0.6305104",
"0.62951446",
"0.626133... | 0.0 | -1 |
Return the squared L2norm of ``x``. | def _call(self, x):
return x.inner(x) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def square_norm(x):\n return np.linalg.norm(x) ** 2",
"def norm(x):\n return np.sqrt(norm2(x))",
"def l2norm(X):\n norm = np.linalg.norm(X, axis=1, keepdims=True)\n return 1.0 * X / norm",
"def norm(x):\n return inner_prod(x, x)[0].sqrt_()",
"def normalize_l2(x):\n return x / (npla.norm(x... | [
"0.79668176",
"0.7929981",
"0.7671645",
"0.7555502",
"0.74408513",
"0.73718435",
"0.7354695",
"0.7327022",
"0.7327022",
"0.7327022",
"0.7321454",
"0.7305051",
"0.7301135",
"0.7294631",
"0.72443897",
"0.7224687",
"0.72119886",
"0.71849626",
"0.71472526",
"0.71278566",
"0.71221... | 0.0 | -1 |
The constant value of the functional if ``x=0``. | def constant(self):
return self.__constant | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _call(self, x):\n if x.norm() == 0:\n # In this case x is the zero-element.\n return self.constant\n else:\n return np.inf",
"def fun(self, x):\n if np.any(x < 0):\n return np.inf\n else:\n return 0",
"def fun(self, x):\n ... | [
"0.7908442",
"0.7216641",
"0.7200933",
"0.71985126",
"0.7194042",
"0.7081722",
"0.70204914",
"0.6990876",
"0.69048536",
"0.68733686",
"0.6852062",
"0.6741258",
"0.6703379",
"0.6682655",
"0.6658882",
"0.6640127",
"0.661869",
"0.66175324",
"0.6617421",
"0.6614477",
"0.65932167"... | 0.0 | -1 |
Return the value in the point ``x``. If any components of ``x`` is larger than or equal to 1, the value is positive infinity. | def _call(self, x):
if self.prior is None:
tmp = -1.0 * (np.log(1 - x)).inner(self.domain.one())
else:
tmp = (-self.prior * np.log(1 - x)).inner(self.domain.one())
if np.isnan(tmp):
# In this case, some element was larger than or equal to one
retur... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fun(self, x):\n if np.any(x < 0):\n return np.inf\n else:\n return 0",
"def fun(self, x):\n if np.any(x > 0):\n return np.inf\n else:\n return 0",
"def x(self, x=None):\n\n if x is None:\n return self._x\n else... | [
"0.7057548",
"0.69485694",
"0.658109",
"0.658109",
"0.64816487",
"0.64674306",
"0.64585423",
"0.64253575",
"0.6421781",
"0.63903886",
"0.6389484",
"0.63131446",
"0.6289737",
"0.62855875",
"0.62516797",
"0.6198385",
"0.6142605",
"0.6136284",
"0.61110973",
"0.61060286",
"0.5997... | 0.6476943 | 5 |
Return the value in the point ``x``. | def _call(self, x):
if self.prior is None:
tmp = (np.exp(x) - 1).inner(self.domain.one())
else:
tmp = (self.prior * (np.exp(x) - 1)).inner(self.domain.one())
return tmp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getValue(self, x):\n lowidx = self._findIndex(x)\n if lowidx == None:\n return 0.0\n\n lx, ly = self[lowidx]\n if lx == x:\n return ly\n\n highidx = lowidx +1\n if highidx == len(self):\n return 0.0\n\n hx,hy = self[highidx]\n\n m = (hy-ly)/(hx - lx)\n c = ly - (m*lx)\... | [
"0.7768049",
"0.74854285",
"0.73264635",
"0.73264635",
"0.7317072",
"0.70364845",
"0.7011903",
"0.6893682",
"0.6864561",
"0.68174523",
"0.6732626",
"0.6732626",
"0.6732626",
"0.6732626",
"0.6732626",
"0.6732626",
"0.6732626",
"0.6732626",
"0.6732626",
"0.6732626",
"0.6732626"... | 0.0 | -1 |
Return the separable sum evaluated in ``x``. | def _call(self, x):
return sum(fi(xi) for xi, fi in zip(x, self.functionals)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eval(self, x):\n return ( float(self.coeff.nominator) / self.coeff.denominator ) * ( x ** self.expt )",
"def evaluate( self, x ) :\n\n P = 0.\n for c_l in reversed( self.coefficients ) : P = c_l + x * P\n return( P )",
"def easy_eval(self, x):\n answer = 0\n for i... | [
"0.6703467",
"0.66921073",
"0.65390813",
"0.6482499",
"0.6399506",
"0.6241214",
"0.6231142",
"0.60728467",
"0.6046281",
"0.5997211",
"0.59932595",
"0.59665775",
"0.59373546",
"0.59340733",
"0.59038365",
"0.5883976",
"0.5879872",
"0.58760184",
"0.5873032",
"0.5863851",
"0.5863... | 0.64181894 | 4 |
Computes the accuracy of a binary prediction task using a given threshold for generating hard predictions. | def accuracy(targets: List[int], preds: List[float], threshold: float = 0.5) -> float:
hard_preds = [1 if p > threshold else 0 for p in preds]
return accuracy_score(targets, hard_preds) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def accuracy(targets: List[int], preds: Union[List[float], List[List[float]]], \n threshold: float = 0.5) -> float:\n if type(preds[0]) == list: # multiclass\n hard_preds = [p.index(max(p)) for p in preds]\n else:\n hard_preds = [1 if p > threshold else 0 for p in preds] # binary ... | [
"0.75006294",
"0.74562275",
"0.73413956",
"0.73385656",
"0.70948625",
"0.7091479",
"0.70469326",
"0.70036733",
"0.6890526",
"0.67949045",
"0.67720085",
"0.6660802",
"0.6581948",
"0.65548366",
"0.6522707",
"0.6516858",
"0.6489799",
"0.64753747",
"0.647307",
"0.6467891",
"0.644... | 0.7632909 | 0 |
Computes the recall of a binary prediction task using a given threshold for generating hard predictions. | def recall(targets: List[int], preds: List[float], threshold: float = 0.5) -> float:
hard_preds = [1 if p > threshold else 0 for p in preds]
return recall_score(targets, hard_preds) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sensitivity(\n targets: List[int], preds: List[float], threshold: float = 0.5\n) -> float:\n return recall(targets, preds, threshold)",
"def prediction_processing(predictions, labels, threshold, step_nb):\n new_labels = []\n new_predictions = []\n number_sequences = step_nb//50\n\n for k in... | [
"0.6724609",
"0.65601647",
"0.641446",
"0.6387502",
"0.63526374",
"0.62943715",
"0.6232934",
"0.6217982",
"0.61683476",
"0.61573744",
"0.61553144",
"0.6131212",
"0.61195964",
"0.6109633",
"0.6109632",
"0.6109632",
"0.6109632",
"0.6109632",
"0.6109632",
"0.6109632",
"0.6098372... | 0.7626533 | 0 |
Computes the specificity of a binary prediction task using a given threshold for generating hard predictions. | def specificity(
targets: List[int], preds: List[float], threshold: float = 0.5
) -> float:
hard_preds = [1 if p > threshold else 0 for p in preds]
tn, fp, _, _ = confusion_matrix(targets, hard_preds).ravel()
return tn / float(tn + fp) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def binary_predict(probs, threshold = 0.5):\n return (probs >= threshold) * np.ones(len(probs))",
"def get_predict(prediction, threshold):\n\n prediction[prediction < threshold] = 0\n prediction[prediction >= threshold] = 1\n \n return prediction",
"def round_using_t(prediction, threshold):\n return (p... | [
"0.7077002",
"0.68827677",
"0.65327036",
"0.6517184",
"0.64509386",
"0.6432547",
"0.6430848",
"0.6408652",
"0.6402898",
"0.63421226",
"0.6320346",
"0.6190938",
"0.6182838",
"0.6168198",
"0.6139987",
"0.6115637",
"0.61138237",
"0.6102747",
"0.60950327",
"0.6085495",
"0.6061224... | 0.7610559 | 0 |
Computes the area under the precisionrecall curve. | def prc_auc(targets: List[int], preds: List[float]) -> float:
precision, recall, _ = precision_recall_curve(targets, preds)
return auc(recall, precision) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pr_auc_score(precision: list, recall: list) -> float:\n return quadrature_calculator(recall, precision)",
"def compute_ap(recall, precision):\r\n # correct AP calculation\r\n # first append sentinel values at the end\r\n mrec = np.concatenate(([0.0], recall, [1.0]))\r\n mpre = np.concatenate((... | [
"0.8208191",
"0.79268074",
"0.79202956",
"0.790217",
"0.790217",
"0.78619045",
"0.7840341",
"0.75207496",
"0.74233323",
"0.7329511",
"0.73156524",
"0.708228",
"0.7062399",
"0.7015234",
"0.6936933",
"0.68373823",
"0.6776866",
"0.6753741",
"0.6667789",
"0.6637576",
"0.6547334",... | 0.67768353 | 17 |
Creates an instance of this model from a dictionary | def from_dictionary(cls,
dictionary):
if dictionary is None:
return None
# Extract variables from the dictionary
max_vmware_http_sessions = dictionary.get('maxVmwareHttpSessions')
o_365_emulator_entity_info = dictionary.get('o365EmulatorEntityInfo')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dictionary(cls,\n dictionary):\n if dictionary is None:\n return None\n\n # Extract variables from the dictionary\n id = dictionary.get('id')\n name = dictionary.get('name')\n mtype = dictionary.get('type')\n usage_bytes = diction... | [
"0.83181584",
"0.8168118",
"0.8168118",
"0.8118749",
"0.8089047",
"0.79787344",
"0.7949278",
"0.79231393",
"0.7898951",
"0.78923255",
"0.788838",
"0.7882321",
"0.7882212",
"0.7876749",
"0.78585315",
"0.7836853",
"0.7801407",
"0.7801407",
"0.7801407",
"0.7801407",
"0.7801407",... | 0.0 | -1 |
Return the value of the state (computed in __init__). | def getValue(self, state):
return self.values[state] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def value(self, state):\n raise NotImplementedError",
"def value(self, state):\n raise NotImplementedError",
"def value(self, state):\n\t\traise NotImplementedError",
"def getValue(self, state):\n util.raiseNotDefined()",
"def getValue(self, state):\n util.raiseNotDefined()",
... | [
"0.83014333",
"0.83014333",
"0.826012",
"0.8086146",
"0.8086146",
"0.79581815",
"0.79296756",
"0.78013283",
"0.77367806",
"0.77336967",
"0.76010257",
"0.76010257",
"0.76010257",
"0.76010257",
"0.76010257",
"0.76010257",
"0.76010257",
"0.76010257",
"0.76010257",
"0.76010257",
... | 0.77333474 | 19 |
The policy is the best action in the given state according to the values currently stored in self.values. You may break ties any way you see fit. Note that if there are no legal actions, which is the case at the terminal state, you should return None. | def computeActionFromValues(self, state):
#return None if terminal
if self.mdp.isTerminal(state):
return None
#get the legal actions
actions=self.mdp.getPossibleActions(state)
#if there are not legal actions return None
if len(actions) == 0:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getPolicy(self, state):\n \"*** YOUR CODE HERE ***\"\n # OUR CODE HERE\n possibleActions = self.mdp.getPossibleActions(state)\n #checking for terminal state (no possible actions)\n if len(possibleActions) is 0: \n return None\n \n #attempt at using the Counter\n eValsActions = ut... | [
"0.77924776",
"0.771162",
"0.7612669",
"0.7490432",
"0.74670315",
"0.73735553",
"0.734055",
"0.733961",
"0.73371553",
"0.7335494",
"0.7314689",
"0.7308831",
"0.73080486",
"0.72947824",
"0.72724277",
"0.72438973",
"0.72438973",
"0.71556383",
"0.70876473",
"0.70818317",
"0.7063... | 0.76075274 | 3 |
Returns True is string is a number. | def is_number_regex(s):
if re.match("^\d+?\.\d+?$", s) is None:
return s.isdigit()
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_number(string):\r\n try:\r\n float(string)\r\n return True\r\n except ValueError: return False",
"def is_number(string):\n try:\n float(string)\n return True\n except ValueError:\n return False",
"def is_number(s):\r\n try:\r\n int(s)\r\n r... | [
"0.8850884",
"0.8807396",
"0.87623763",
"0.87143797",
"0.86495125",
"0.86369324",
"0.8611852",
"0.8602863",
"0.8597067",
"0.8597067",
"0.8597067",
"0.85868895",
"0.8556723",
"0.8540039",
"0.846474",
"0.83899784",
"0.83504224",
"0.82912153",
"0.8217023",
"0.81620115",
"0.81181... | 0.7648834 | 46 |
Converts Pandas DataFrame to iterator of Row objects | def pandas_to_rows(df):
if df is None:
_logger.debug("Returning nothing")
return iter([])
if type(df) is pd.Series:
df = df.to_frame().T
if df.empty:
_logger.warning("Pandas DataFrame is empty! Returning nothing!")
return iter([])
_logger.debug("Convert DataFrame ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iterrows(self):\n return (self.Row(*row_vals) for row_vals in izip(*self.columns))",
"def __iter__(self):\n return iter(self.__rows)",
"def __iter__(self):\n return iter(self.rows)",
"def __iter__(self):\n for row in self.rows:\n yield row",
"def __iter__(self):\n... | [
"0.71922195",
"0.7103916",
"0.7012801",
"0.69924754",
"0.66092145",
"0.6562388",
"0.65115505",
"0.64368486",
"0.6285659",
"0.6147097",
"0.61347324",
"0.6132943",
"0.60719174",
"0.60571617",
"0.6013558",
"0.6004366",
"0.5968578",
"0.5918694",
"0.5915255",
"0.59052604",
"0.5905... | 0.7486568 | 0 |
Opens the settings window. | def open_settings_window():
settings_window = ModalView(size_hint=(0.5, 0.5), auto_dismiss=False)
settings_window.add_widget(SettingsView(settings_window))
settings_window.open() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def open_settings_window(self):\n self.screen_blank_timer.stop()\n self.settings_window.show()\n # Ensure the window is raised in top, useful when main window is fullscreened\n # and settings window is accidentally sent to the background\n getattr(self.settings_window, \"raise\")... | [
"0.8175285",
"0.78478265",
"0.77202475",
"0.7671831",
"0.7423133",
"0.74225456",
"0.73041064",
"0.7203665",
"0.71986234",
"0.71657836",
"0.7147344",
"0.7029777",
"0.69412977",
"0.6913961",
"0.6844861",
"0.68071955",
"0.6774567",
"0.6708652",
"0.66639817",
"0.66207325",
"0.658... | 0.86569446 | 0 |
Return an array containing the z coordinates of the field maps. | def getZRange(self):
return self.z_array | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getZ(self):\n\t\treturn self.coords.z",
"def z(self):\n return self.coords[2]",
"def get_z(self):\n return self.coords[2]",
"def z(self):\n return self._coords[2]",
"def getMagneticFieldMap(self):\n return self.solenoid.B_interp(self.z_array)",
"def get_zarr(self, position... | [
"0.70121163",
"0.6981236",
"0.6953585",
"0.69075906",
"0.6793561",
"0.65497416",
"0.65411973",
"0.6447",
"0.6427521",
"0.6381801",
"0.63791925",
"0.6274203",
"0.6191149",
"0.6185509",
"0.6165033",
"0.6165033",
"0.6165033",
"0.61593896",
"0.61358833",
"0.6104013",
"0.6100221",... | 0.6253655 | 12 |
Return the final momentum in MeV/c at the end of the cavity. | def getFinalMomentum(self):
return self.final_p_MeV | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Momentum(self):\n return (np.multiply(Particle.LorentzFactor(self)\n , np.array(self.velocity,dtype=float))* self.restMass)",
"def calcMomentum(self):\n # start conditions\n if not self.quiet:\n fs = u'''Calculating momentum gain.\n Peak field: {self.rf... | [
"0.7134746",
"0.70385295",
"0.67711955",
"0.6680594",
"0.6574308",
"0.6398321",
"0.62544286",
"0.62111026",
"0.61991435",
"0.61555874",
"0.61442757",
"0.6015435",
"0.5955292",
"0.5910545",
"0.58865964",
"0.5859064",
"0.5841254",
"0.5814408",
"0.58014333",
"0.5799998",
"0.5782... | 0.76269394 | 0 |
Set RF peak field and phase and return the momentum and momentum gradient. | def rfParamsToMomAndGrad(self, peak_field, phase):
self.setRFPeakField(peak_field)
self.setRFPhase(phase)
return np.array([self.getFinalMomentum(), self.getMomentumGradient()]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getMomentumGradient(self):\n dphi = 0.5\n orig_phase = self.phase\n p0 = self.phaseToMomentum(orig_phase - dphi / 2)\n p1 = self.phaseToMomentum(orig_phase + dphi / 2)\n self.setRFPhase(orig_phase)\n return (p1 - p0) / dphi",
"def setFinalMomentumOnCrest(self, moment... | [
"0.6576893",
"0.6223719",
"0.6004393",
"0.57753736",
"0.57243973",
"0.56165916",
"0.5483323",
"0.5414743",
"0.5407059",
"0.54011774",
"0.5400503",
"0.5375942",
"0.53657514",
"0.53621143",
"0.53284293",
"0.52852076",
"0.52731246",
"0.5255681",
"0.52360785",
"0.5227954",
"0.522... | 0.7927221 | 0 |
Takes a list of lists of parameter values and returns all possible combinations of those parameters as another list of lists. | def combine_params(param_list):
if sum(isinstance(l, list) for l in param_list) > 1:
return list(map(list, list(itertools.product(*param_list))))
else:
return [[p] for p in param_list] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def combinations(*args: List[Any]) -> List[List]:\n return list([list(el) for el in list(product(*args))])",
"def _generate_combinations(self, param_idx, params):\n\n if param_idx == len(self.grid) - 1:\n # last parameter, just return list of values for this parameter\n return [[v... | [
"0.7979039",
"0.73033744",
"0.7045879",
"0.68900615",
"0.6833264",
"0.6764255",
"0.671766",
"0.67132974",
"0.6700727",
"0.66856605",
"0.65207416",
"0.6470147",
"0.6436473",
"0.63977647",
"0.63554376",
"0.63351625",
"0.6333194",
"0.6271757",
"0.62584627",
"0.62558293",
"0.6240... | 0.8367513 | 0 |
return True if a simplex connects anything on the edge. The assumption is that everything that connects to the edge belongs to upper convex hull. We would want to compute only the lower convex hull. | def is_upper_hull(grid, simplex):
point = grid[:,simplex]
if np.isclose(point, MIN_POINT_PRECISION).any():
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_simplex(self):\n return self.affine_dimension()+1==self.n_vertices()",
"def is_simplex(self):\n return self.is_compact() and (self.dim()+1==self.n_vertices())",
"def is_purecomp_hull(grid, simplex):\n dim = grid.shape[0]\n points = grid[:,simplex]\n flags = np.zeros(dim)\n for ... | [
"0.67079717",
"0.64349264",
"0.6382087",
"0.63122696",
"0.6312139",
"0.61281234",
"0.59945285",
"0.59680974",
"0.5924086",
"0.59029925",
"0.5864539",
"0.5800636",
"0.5754618",
"0.5704125",
"0.57019424",
"0.56920016",
"0.5689519",
"0.567255",
"0.56534964",
"0.56499416",
"0.561... | 0.6382488 | 2 |
return True if a simplex connects anything on the edge. The assumption is that everything that connects to the edge belongs to upper convex hull. We would want to compute only the lower convex hull. | def ray_is_upper_hull(grid, simplex):
point = grid[:,simplex]
if np.isclose(point, MIN_POINT_PRECISION).any():
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_simplex(self):\n return self.affine_dimension()+1==self.n_vertices()",
"def is_simplex(self):\n return self.is_compact() and (self.dim()+1==self.n_vertices())",
"def is_upper_hull(grid, simplex):\n point = grid[:,simplex]\n if np.isclose(point, MIN_POINT_PRECISION).any():\n re... | [
"0.67079717",
"0.64349264",
"0.6382488",
"0.6382087",
"0.6312139",
"0.61281234",
"0.59945285",
"0.59680974",
"0.5924086",
"0.59029925",
"0.5864539",
"0.5800636",
"0.5754618",
"0.5704125",
"0.57019424",
"0.56920016",
"0.5689519",
"0.567255",
"0.56534964",
"0.56499416",
"0.5619... | 0.63122696 | 4 |
Return a list of parents for given nodes. | def get_parents(self, nodes):
parents = []
# Fill the parent info list
for node in nodes:
if mc.nodeType(node) != 'transform':
node = mc.listRelatives(node, parent=True, fullPath=True)[0]
parent = mc.listRelatives(node, parent=True, fullPath=True)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_parents(self, node):\n pass",
"def getRootParents(nodes):\n return {getRootParent(node) for node in nodes}",
"def get_reference_node_parents(ref):\n parents = []\n return parents",
"def get_parents(self):\n return NodeList(self._my_map['parentNodes'])",
"def getnodeparents(se... | [
"0.7833762",
"0.75613385",
"0.74643654",
"0.74187547",
"0.73676103",
"0.72831386",
"0.71988815",
"0.7171457",
"0.70464975",
"0.6938068",
"0.69211936",
"0.6768125",
"0.6762596",
"0.67101365",
"0.6615292",
"0.66094",
"0.6570429",
"0.65602654",
"0.6550607",
"0.65458333",
"0.6539... | 0.827926 | 0 |
Return a list of visbility values for given nodes. | def get_visibility_values(self, nodes):
values = []
for node in nodes:
if mc.nodeType(node) != 'transform':
node = mc.listRelatives(node, parent=True, fullPath=True)[0]
# Store the visibility attr state in the list
values.append(mc.getAttr("{0}.visibil... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_all_v(self) -> dict:\n return self.nodes",
"def getVisitableNodes(self):\n\n result = []\n value = self.subnode_dest\n if value is None:\n pass\n else:\n result.append(value)\n result.append(self.subnode_value)\n return tuple(result)"... | [
"0.5851391",
"0.5802576",
"0.5799363",
"0.57108355",
"0.56312054",
"0.5593874",
"0.55923855",
"0.55916125",
"0.5537057",
"0.55321425",
"0.55321425",
"0.55321425",
"0.5488098",
"0.54843146",
"0.5472058",
"0.54498035",
"0.5437775",
"0.5430528",
"0.5426866",
"0.5423837",
"0.5417... | 0.7218569 | 0 |
The file names/paths this set can recover | def files(self) -> List[str]:
return [packet.name for packet in self.packets.file_description.values()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def filepaths(self):\n pass",
"def picked_file_paths(self):\n return self._picked_file_paths",
"def filenames(self):\n pass",
"def _get_filepaths(self):\n self._printer(str(self.__len__()) + \" file paths have been parsed in \" + str(self.timer.end))\n if self._hash_files:\... | [
"0.7253563",
"0.70755726",
"0.7051222",
"0.6954465",
"0.67863643",
"0.6783569",
"0.6722681",
"0.6679777",
"0.65919393",
"0.65919393",
"0.65719527",
"0.65260506",
"0.6522436",
"0.6522436",
"0.64993465",
"0.64690936",
"0.64690936",
"0.6461194",
"0.64530987",
"0.6435905",
"0.643... | 0.58417267 | 78 |
Generate a random string | def random_str(length: int = 10, unique: str = '') -> str:
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(length)) + unique | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generateRandomString():\n return ''.join(b64encode(urandom(32)).decode('utf-8'))",
"def generate_random_string():\n return \"\".join(random.choice(string.ascii_lowercase + string.digits) for _ in range(16)) # nosec",
"def __generate_random_string():\n return uuid4().hex[:6].upper()",
"def r... | [
"0.8613455",
"0.85251755",
"0.8186519",
"0.8047497",
"0.80169266",
"0.80067813",
"0.7974762",
"0.7881589",
"0.7869363",
"0.78422016",
"0.7795121",
"0.77787286",
"0.7775118",
"0.7761029",
"0.7759843",
"0.7751808",
"0.77188057",
"0.7710082",
"0.7705413",
"0.76817256",
"0.767893... | 0.0 | -1 |
mean unweughted MAPE. I.e. all timesteps of all series in batch are weighted equally. | def MAPE(pred, true):
# print(pred.shape, true.shape)
EPSILON = 10e-5
denom = torch.abs(true)
#!!!!!!!!!! due to definition of MAPE, this can give infs if time series has true=0, so consider using other metric
mape = torch.abs(pred - true) / (denom + EPSILON)
mean_mape = mape.mean()
return m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def em_mean(self) -> float:\n if self.__total_pulls == 0:\n raise Exception('Number of pulls is 0. No empirical mean.')\n return self.__total_rewards / self.__total_pulls",
"def mean(self):\n return self.sum / self.sum_weights",
"def compute_MAE(e):\n\n return np.mean(np.abs(e))",
"def _... | [
"0.6844588",
"0.67765474",
"0.6765992",
"0.6744606",
"0.6697556",
"0.668193",
"0.66213775",
"0.6615637",
"0.66004896",
"0.6577302",
"0.6554235",
"0.65482956",
"0.65441394",
"0.65393776",
"0.6489328",
"0.6484666",
"0.6465315",
"0.64618206",
"0.6439352",
"0.6418638",
"0.6402404... | 0.66867435 | 5 |
Pinball loss = q (true pred) if true >= pred (1q) (pred true) if true < pred returns a list of the mean pinball loss for each quantile q (mean is over all BATCHES and TIMESTEPS) pred.shape is [batchsize x T x Q ], where is number of quantiles true.shape is [batchsize x T x 1] (in the multivariate case, this loss functi... | def quantile_loss(pred, true, quantiles, mask=None, weights=None):
assert(len(quantiles)==pred.shape[2])
Q = torch.cat([q*torch.ones_like(true) for q in quantiles], dim=2)
pinball = Q*F.relu(true - pred) + (1.-Q)*F.relu(pred - true)
mean_pinball = pinball.mean(axis=[0,1])
return mean_pinba... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HeatmapLoss(pred, gt, masks):\n assert pred.size() == gt.size()\n l = ((pred - gt)**2) * masks[:, None, :, :].expand_as(pred)\n l = l.mean(dim=3).mean(dim=2).mean(dim=1)\n return l",
"def compute_loss(output, y_true, anchors, num_classes, input_shape, ignore_threshold=0.5, print_loss=False):\n ... | [
"0.62062824",
"0.6139368",
"0.60957825",
"0.6072511",
"0.6060144",
"0.602632",
"0.5998271",
"0.5982624",
"0.59823734",
"0.58957905",
"0.58509475",
"0.5822722",
"0.5795531",
"0.5755057",
"0.5728217",
"0.57229674",
"0.57085615",
"0.56825024",
"0.5650361",
"0.5645232",
"0.564386... | 0.7024141 | 0 |
Get the configuration of the preprocessor. Returns A dictionary of configurations of the preprocessor. | def get_config(self):
return {"name": self.name, "tunable": self.tunable} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_configuration(self) -> dict:\n return self.config",
"def get_config(self):\n if self.allow_reco():\n return self.chs_config()\n else:\n return self.get_config_j(self.id)",
"def get_config(self) -> Dict[str, Any]:\n if self.config is None:\n s... | [
"0.7051181",
"0.6711208",
"0.6696731",
"0.6696731",
"0.66682494",
"0.66244143",
"0.65918857",
"0.65527296",
"0.65307045",
"0.6497371",
"0.649295",
"0.64908504",
"0.6490534",
"0.6464434",
"0.64585036",
"0.6444836",
"0.6433465",
"0.64180744",
"0.63934046",
"0.6388657",
"0.63780... | 0.62364835 | 28 |
Converts a UNIX timestamp to SAML2 timestamp on the form | def parse_time_to_SAML(time):
data = datetime.utcfromtimestamp(float(time))
return data.strftime('%Y-%m-%dT%H:%M:%SZ') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _normalize_timestamp(timestamp):\n if isinstance(timestamp, datetime.datetime):\n timestamp = time.mktime(timestamp.timetuple())\n return timestamp",
"def to_unix(cls, timestamp):\n if not isinstance(timestamp, datetime.datetime):\n raise TypeError(\"Time.millisecon... | [
"0.75004345",
"0.7253891",
"0.72172564",
"0.71904427",
"0.71349204",
"0.7121744",
"0.71105486",
"0.70947546",
"0.7054338",
"0.7043997",
"0.70417076",
"0.69871074",
"0.6973331",
"0.6949917",
"0.6944295",
"0.6933218",
"0.69282115",
"0.68943125",
"0.6883105",
"0.68597686",
"0.68... | 0.68470275 | 22 |
Sets the auth_password of this HTTPConnectionData. | def auth_password(self, auth_password):
self._auth_password = auth_password | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_password(self, password):\n self.authentication.password = password",
"def set_password(self, password):\n self.password = password",
"def set_password(self, password):\n self.PASS = password",
"def set_password(self, password):\n self.PASSWORD = password",
"def set_pass... | [
"0.73091984",
"0.69687676",
"0.6954471",
"0.6887524",
"0.67897576",
"0.6711324",
"0.6711324",
"0.6711324",
"0.6711324",
"0.66878164",
"0.667693",
"0.66747624",
"0.66397786",
"0.6608896",
"0.65886176",
"0.6575706",
"0.65734756",
"0.65734756",
"0.6562507",
"0.6516779",
"0.64261... | 0.8318893 | 0 |
Sets the auth_username of this HTTPConnectionData. | def auth_username(self, auth_username):
self._auth_username = auth_username | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_username(self, value):\n self.username = value",
"def git_username(self, git_username):\n self._git_username = git_username",
"def username(self, username) :\n\t\ttry :\n\t\t\tself._username = username\n\t\texcept Exception as e:\n\t\t\traise e",
"def username(self, username: str):\n\n ... | [
"0.68895084",
"0.67146707",
"0.6587424",
"0.6548955",
"0.65462756",
"0.65462756",
"0.65462756",
"0.65462756",
"0.65462756",
"0.65462756",
"0.65462756",
"0.65462756",
"0.65462756",
"0.65334374",
"0.64473826",
"0.63482374",
"0.6218501",
"0.619603",
"0.61711687",
"0.6087823",
"0... | 0.8171586 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, HTTPConnectionData):
return False
return self.to_dict() == other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False",
"def __eq__(self, other):\n if i... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
if not isinstance(other, HTTPConnectionData):
return True
return self.to_dict() != other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)",
"def __eq__(self, other):\n ... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
Center the square matrix X (subtract col and row means). | def center(X):
n,m = X.shape
if n != m:
raise Exception('Matrix is not square.')
colsum = X.sum(axis=0) / n
rowsum = X.sum(axis=1) / n
totalsum = X.sum() / (n**2)
#center
Y = array([[ X[i,j]-rowsum[i]-colsum[j]+totalsum for i in range(n) ] for j in range(n)])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def center(self, X):\n X = X - self.mu\n X = X / numpy.where(self.sigma == 0, 1e-30, self.sigma)\n return X",
"def center(x):\n return x - x.mean()",
"def center(self, x):\n\n shape = x.shape\n nx = shape[1]\n ny = shape[0]\n hnx = nx // 2\n hny = ny /... | [
"0.7267593",
"0.71808183",
"0.7112684",
"0.67000574",
"0.6686159",
"0.66783804",
"0.66135854",
"0.6588247",
"0.654921",
"0.6472564",
"0.64431196",
"0.63927126",
"0.6352913",
"0.63193035",
"0.62576944",
"0.62576944",
"0.6098444",
"0.6080106",
"0.60610974",
"0.6055836",
"0.6051... | 0.81245136 | 0 |
Initialize an abstract class model base for machine learning problem. self.df pandas dataframe store both features and target data self.X pandas dataframe store features self.Y pandas dataframe store target data self.features list store list of features self.max pandas dataframe store max value of each column self._loo... | def __init__(self):
self.X = None
self.Y = None
self.features = None
self.max = self.min = None
self._look_up = None
self.attr_weight = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self):\n self.data_file = ''\n self.data = pd.DataFrame()\n self.labels = pd.DataFrame()\n self.labels_onehot = pd.DataFrame()\n self.df = pd.DataFrame()\n self.df_perm = pd.DataFrame() # for debug purpose\n self.n_samples = 0\n self.n_features ... | [
"0.6680599",
"0.6621073",
"0.6601641",
"0.6531107",
"0.6522224",
"0.64913243",
"0.6443025",
"0.6398711",
"0.6372071",
"0.6319768",
"0.6291694",
"0.62841016",
"0.6275872",
"0.6275402",
"0.62675303",
"0.62546563",
"0.6242229",
"0.62391025",
"0.623403",
"0.62237096",
"0.6221181"... | 0.6640147 | 1 |
Store dataset and preprocess. | def fit(self, dataset, features, target, attr_weight=None):
col_names = features + [target]
dataset = copy.deepcopy(dataset[col_names])
self.features = features[:]
self.attr_weight = [1] * len(features) if attr_weight is None else attr_weight
self._preprocess(dataset)
s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _prepare_data(self):\n #TODO hardcoded values need to change\n print_info(\"Preprocessing the train data...\")\n self._place_dataset(os.path.join(self._hparams[\"temp-data\"], \"train\"),\n self.TRAIN_OUT_PATH)\n\n print_info(\"Preprocessing the test data..... | [
"0.7231019",
"0.7009327",
"0.68845916",
"0.67984915",
"0.67025626",
"0.6698023",
"0.6664426",
"0.6615126",
"0.65924656",
"0.65718335",
"0.6562007",
"0.65548366",
"0.6531403",
"0.6524054",
"0.6469851",
"0.6394583",
"0.63785547",
"0.6377573",
"0.6368925",
"0.63004607",
"0.62810... | 0.0 | -1 |
Generates fake data for counterfactual experimentation. The covariants are sex, age and severity, the treatment is a binary variable, medication and the response days until recovery. | def make_confounded_data(n: int) -> Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:
def get_severity(df: pd.DataFrame) -> np.ndarray:
return ((np.random.beta(1, 3, size=df.shape[0]) * (df["age"] < 30))
+ (np.random.beta(3, 1.5, size=df.shape[0]) * (df["age"] >= 30)))
def get_treatment... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fakedata():\n if User.query.filter_by(email='chair@conferency.com').first():\n print ('fake data already generated')\n else:\n generate_test_confs() # load testing confs and tracks\n generate_fake_tickets() # create fake tickets\n generate_test_users() # create named fake u... | [
"0.660626",
"0.6185692",
"0.5915134",
"0.5893856",
"0.5843462",
"0.5806208",
"0.57696325",
"0.5757261",
"0.57506263",
"0.57386947",
"0.5717909",
"0.56937456",
"0.56453717",
"0.56320643",
"0.56318605",
"0.55833024",
"0.5557605",
"0.55568534",
"0.55081624",
"0.5499036",
"0.5491... | 0.62040025 | 1 |
Unload a config entry. | async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
hass.data[DOMAIN].pop(entry.entry_id)
return unload_ok | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def async_unload_entry(hass, config_entry):\n unload_ok = await hass.config_entries.async_forward_entry_unload(\n config_entry, \"climate\"\n )\n return unload_ok",
"async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:\n hass.data.pop(DOMAIN)\n return True",
... | [
"0.697284",
"0.6888074",
"0.6779855",
"0.6747459",
"0.6689002",
"0.6657831",
"0.66162205",
"0.6603433",
"0.65925974",
"0.65595686",
"0.65411645",
"0.6507643",
"0.6507643",
"0.6507643",
"0.6507643",
"0.64977276",
"0.64931643",
"0.6486601",
"0.6486601",
"0.6486601",
"0.6486601"... | 0.6469397 | 22 |
Returns the next item in the iterable. | def next(self):
if not self._peek_seen:
self._peek_seen = True
return self._peek
try:
# Object is a generator or iterator.
return self._iterable.next()
except AttributeError:
pass
try:
# Object is a list.
return self._iterable.pop(0)
except AttributeError:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __next__(self):\n \n if self.i == len(self.data):\n raise StopIteration\n item = self.data[self.i]\n self.i += 1\n return item",
"def __next__(self):\n\t\tif self.i >= len(self.l):\n\t\t\tself.i = 0\n\t\t\traise StopIteration\n\t\tresult = self.l[self.i]\n\t\tsel... | [
"0.8139975",
"0.79860306",
"0.79345596",
"0.7925858",
"0.7815197",
"0.77324206",
"0.76788473",
"0.7660627",
"0.7620676",
"0.76020813",
"0.7552565",
"0.7509855",
"0.74615127",
"0.74615127",
"0.74615127",
"0.74615127",
"0.74615127",
"0.74615127",
"0.74615127",
"0.74299467",
"0.... | 0.7330623 | 27 |
Returns the next item in self._iterable. | def _NextItem(self):
if self._injected:
self._injected = False
return self._injected_value
try:
# Object is a generator or iterator.
return self._iterable.next()
except AttributeError:
pass
except StopIteration:
self._tap.Done()
raise
try:
# Object is ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __next__(self):\n \n if self.i == len(self.data):\n raise StopIteration\n item = self.data[self.i]\n self.i += 1\n return item",
"def __next__(self):\n if self.index < self.n:\n x = self.items[self.index]\n self.index += 1\n ... | [
"0.82905835",
"0.8072318",
"0.8052131",
"0.80155826",
"0.8008696",
"0.79680765",
"0.7857969",
"0.78205097",
"0.77555555",
"0.77474064",
"0.7680544",
"0.7680544",
"0.7672657",
"0.76590854",
"0.7650628",
"0.7650628",
"0.7650628",
"0.7650628",
"0.7650628",
"0.7650628",
"0.765062... | 0.8173762 | 1 |
Gets the next item, calls _tap.Tap() on it, and returns it. | def next(self):
while True:
item = self._NextItem()
inject_or_keep = self._tap.Tap(item)
if inject_or_keep is None:
self._tap.Done()
raise StopIteration
if isinstance(inject_or_keep, TapInjector):
if not inject_or_keep.is_replacement:
self._injected = True
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_next_item(self):\n pass",
"def get_next_item(self, timeout=None):\n if self.current_item is not None:\n raise error_classes.UVMSequenceError(\"You must call item_done() before calling get_next_item again\")\n self.current_item = self.req_q.get(timeout=timeout)\n ret... | [
"0.7415415",
"0.68432087",
"0.6776212",
"0.67243487",
"0.6584797",
"0.6579913",
"0.6534749",
"0.6461507",
"0.645244",
"0.6402099",
"0.63606703",
"0.63083965",
"0.6134342",
"0.6132902",
"0.6114795",
"0.6061921",
"0.60532475",
"0.6014705",
"0.6002252",
"0.59841096",
"0.59841096... | 0.67414165 | 3 |
Distance to another city using Haversine formula. | def compute_distance_to_city_in_km(self, city):
lat = math.radians(self.latitude - city.latitude)
long = math.radians(self.longitude - city.longitude)
a = math.pow(math.sin(lat/2), 2) \
+ math.cos(math.radians(self.latitude)) * math.cos(math.radians(city.latitude)) * pow(math.sin(long... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def distance(self, other: \"Location\") -> float:\n return haversine(self.latitude, self.longitude, other.latitude, other.longitude)",
"def harversine_distance(self, other):\n\n lat1, lon1, lat2, lon2 = (\n a/180*pi for a in [self.stop_lat, self.stop_lon, other.stop_lat, other.stop_lon])... | [
"0.76227534",
"0.73321885",
"0.72094214",
"0.7080691",
"0.6963732",
"0.69534624",
"0.69212145",
"0.6912582",
"0.6886729",
"0.686194",
"0.6823944",
"0.6804765",
"0.6789463",
"0.67576355",
"0.6717863",
"0.6711706",
"0.67073774",
"0.6704267",
"0.6701798",
"0.66849756",
"0.668357... | 0.68828595 | 9 |
Distance to another city using precomputed distance. | def distance_to_city_in_km(self, city):
global distances_pair
if self.index != city.index:
indices = [self.index, city.index]
return distances_pair[max(indices)][min(indices)]
return 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_distance_between_cities(self, source, destination):\n query = {\"$or\": [{SOURCE: source, DESTINATION: destination}, {SOURCE: destination, DESTINATION: source}]}\n doc1 = self._cities_distance.find_one_and_update(query, {\"$inc\": {HITS: 1}})\n distance = -1\n if doc1:\n ... | [
"0.7155882",
"0.70160455",
"0.7008829",
"0.6874793",
"0.6741367",
"0.65280604",
"0.64172184",
"0.6396197",
"0.6384421",
"0.6374974",
"0.6365254",
"0.6364163",
"0.6357212",
"0.6350049",
"0.63342315",
"0.63342315",
"0.6309287",
"0.6305145",
"0.6301836",
"0.62993366",
"0.6297999... | 0.6990234 | 3 |
Create a block diagonal matrix from M repeated num_reps times. | def make_block_diag(M, num_reps, out=None):
if out is None:
big_M = np.zeros((M.shape[0] * num_reps, M.shape[1] * num_reps))
else:
big_M = out
for i in range(num_reps):
big_M[i * M.shape[0]:(i + 1) * M.shape[0], i * M.shape[1]:(i + 1) * M.shape[1]] = M
return big_M | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def diagonal(self):\n M = self.rep\n m, n = self.shape\n return [M[i, i] for i in range(min(m, n))]",
"def diagM(l):\r\n dim = len(l)\r\n M = np.zeros((dim, dim))\r\n np.fill_diagonal(M, l)\r\n return matrix(M)",
"def _block_diagonal(factor_matrices):\n shapes_dict = {}\n ... | [
"0.63368285",
"0.6219159",
"0.62086225",
"0.602153",
"0.59024596",
"0.57196087",
"0.56890094",
"0.56568295",
"0.5619571",
"0.5600405",
"0.55958784",
"0.5566357",
"0.55585825",
"0.5515991",
"0.548243",
"0.5471379",
"0.54121524",
"0.53991383",
"0.5384035",
"0.5365567",
"0.52809... | 0.835959 | 0 |
Infer the mean of the latent variables x given obervations y. | def _E_mean(self, y, big_K=None):
T = [yi.shape[0] for yi in y]
big_d = [np.tile(self.d_, Ti) for Ti in T]
big_y = [yi.ravel() for yi in y]
if big_K is None:
big_K = {Ti: None for Ti in set(T)}
big_K = {Ti: calc_big_K(Ti, self.n_factors, self.tau_, self.var_n, big_K[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d_mean(x, y):\n return (x + y) / 2",
"def batch_mean(cls, y, y_target):\n tot = 0\n for i, o in zip(y, y_target):\n tot += cls.loss(i.reshape(-1, 1), o.reshape(-1, 1))\n return tot / len(y)",
"def mape(x, y):\n return statistics.mean(ape(x, y))",
"def learn(self, Xtr... | [
"0.69523144",
"0.6735079",
"0.66089714",
"0.64980674",
"0.63977975",
"0.63735217",
"0.6336661",
"0.63128215",
"0.6289675",
"0.628413",
"0.62599015",
"0.62408644",
"0.6239265",
"0.6181971",
"0.61260223",
"0.61228126",
"0.60946274",
"0.6093645",
"0.60922736",
"0.60902584",
"0.6... | 0.5496498 | 71 |
Infer the mean of the latent variables x given obervations y. | def transform(self, y):
if isinstance(y, np.ndarray) and y.ndim == 2:
T, n = y.shape
x = self._E_mean([y - self.mean_])[0]
x = x[0].reshape(T, self.n_factors)
else:
x = self._E_mean([yi - self.mean_ for yi in y])[0]
x = [xi.reshape(yi.shape[0],... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d_mean(x, y):\n return (x + y) / 2",
"def batch_mean(cls, y, y_target):\n tot = 0\n for i, o in zip(y, y_target):\n tot += cls.loss(i.reshape(-1, 1), o.reshape(-1, 1))\n return tot / len(y)",
"def mape(x, y):\n return statistics.mean(ape(x, y))",
"def learn(self, Xtr... | [
"0.69495493",
"0.673485",
"0.66066253",
"0.64969975",
"0.6397104",
"0.6373036",
"0.6335148",
"0.63115394",
"0.62875617",
"0.6283083",
"0.6257689",
"0.6240965",
"0.6237721",
"0.61791396",
"0.6125957",
"0.61210275",
"0.60931826",
"0.6092843",
"0.6091155",
"0.60873157",
"0.60764... | 0.5975428 | 23 |
Returns true iff both of the image's dimensions are bigger than MIN_DIM | def _image_is_large_enough(im):
return (im.shape[0] >= MIN_DIM) and (im.shape[1] >= MIN_DIM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fits_into(self, other) -> bool:\n return other.width > self.width and other.height > self.height",
"def check_image_before_load(self,image_dims):\n\n if image_dims[0]*image_dims[1]*image_dims[2]*4 < self.check_available_memory():\n return True\n else:\n return False... | [
"0.6711817",
"0.6597963",
"0.63314086",
"0.6288132",
"0.62578297",
"0.6168613",
"0.6136003",
"0.6132776",
"0.61265504",
"0.60534424",
"0.6014323",
"0.60106575",
"0.59902906",
"0.59727424",
"0.58582175",
"0.5858027",
"0.5804632",
"0.57604814",
"0.5730944",
"0.5696193",
"0.5686... | 0.7970968 | 0 |
Return a mocked ApiClient class. | def mock_apiclient() -> Generator[ApiClient, None, None]:
with patch(
"homeassistant.components.kostal_plenticore.helper.ApiClient",
autospec=True,
) as mock_api_class:
apiclient = MagicMock(spec=ApiClient)
apiclient.__aenter__.return_value = apiclient
apiclient.__aexit__... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def api_client() -> APIClient:\n return APIClient()",
"def api_client() -> APIClient:\n\n return APIClient()",
"def mock_base_api_client():\n def _make_mock_api_client(status_code=200,\n response=None,\n component='reana-server'):\n mock... | [
"0.78236777",
"0.7798974",
"0.76256984",
"0.72218627",
"0.7125344",
"0.7108991",
"0.7013713",
"0.6859118",
"0.6728005",
"0.6690196",
"0.6668552",
"0.66165876",
"0.6604755",
"0.6604182",
"0.65880346",
"0.6580131",
"0.65080667",
"0.6382698",
"0.6342769",
"0.6203766",
"0.6158421... | 0.7505051 | 3 |
Delete a load balancer. Delete a load balancer. | def delete_load_balancer(self,
instance_id: str,
dnszone_id: str,
lb_id: str,
*,
x_correlation_id: str = None,
**kwargs
) -> DetailedResponse:
if instance_id is None:
raise ValueError('instance_id must be provided')
if dnszone_id is None:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_balancer(self):\n response = self.client.delete_load_balancer(\n LoadBalancerArn=self.get_balancer_arn()\n )\n assert response['ResponseMetadata']['HTTPStatusCode'] == 200",
"def delete_balancer(ctx):\n if self.balancer_exists():\n self.delete_... | [
"0.84813094",
"0.8267166",
"0.8187805",
"0.813262",
"0.81004614",
"0.80709004",
"0.79002845",
"0.7850532",
"0.78482544",
"0.70188874",
"0.68874204",
"0.6776845",
"0.668229",
"0.63436687",
"0.62121755",
"0.61817497",
"0.6162699",
"0.61314136",
"0.6127075",
"0.60897136",
"0.608... | 0.6787516 | 11 |
Get a load balancer. Get details of a load balancer. | def get_load_balancer(self,
instance_id: str,
dnszone_id: str,
lb_id: str,
*,
x_correlation_id: str = None,
**kwargs
) -> DetailedResponse:
if instance_id is None:
raise ValueError('instance_id must be provided')
if dnszone_id is None:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_balancer_info(self):\n try:\n response = self.client.describe_load_balancers(\n Names=[self.get_balancer_name()],\n )\n assert response['ResponseMetadata']['HTTPStatusCode'] == 200\n\n vpc_id = self.get_vpc_id()\n balancers = [bal... | [
"0.7956489",
"0.731729",
"0.7074114",
"0.6979116",
"0.6685279",
"0.64478135",
"0.6396215",
"0.6389491",
"0.6372476",
"0.63425577",
"0.6316885",
"0.63028675",
"0.6241254",
"0.62178457",
"0.6192141",
"0.6184186",
"0.61822814",
"0.61822814",
"0.61822814",
"0.6170494",
"0.6146213... | 0.66309965 | 5 |
Initialize a LoadBalancerAzPoolsItem object from a json dictionary. | def from_dict(cls, _dict: Dict) -> 'LoadBalancerAzPoolsItem':
args = {}
if 'availability_zone' in _dict:
args['availability_zone'] = _dict.get('availability_zone')
if 'pools' in _dict:
args['pools'] = _dict.get('pools')
return cls(**args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'ListPools':\n args = {}\n if 'pools' in _dict:\n args['pools'] = [Pool.from_dict(x) for x in _dict.get('pools')]\n else:\n raise ValueError('Required property \\'pools\\' not present in ListPools JSON')\n if 'offset' in _dict:\n ... | [
"0.72558683",
"0.7203689",
"0.6453143",
"0.6317233",
"0.6030612",
"0.5826826",
"0.57262254",
"0.5704521",
"0.56597763",
"0.563717",
"0.5615495",
"0.5517881",
"0.54989743",
"0.54145366",
"0.5377127",
"0.53710234",
"0.534387",
"0.53381735",
"0.5289306",
"0.5274349",
"0.52718055... | 0.8410766 | 0 |
Initialize a LoadBalancerAzPoolsItem object from a json dictionary. | def _from_dict(cls, _dict):
return cls.from_dict(_dict) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'LoadBalancerAzPoolsItem':\n args = {}\n if 'availability_zone' in _dict:\n args['availability_zone'] = _dict.get('availability_zone')\n if 'pools' in _dict:\n args['pools'] = _dict.get('pools')\n return cls(**args)",
"def from_... | [
"0.8410051",
"0.7255007",
"0.7202465",
"0.6452589",
"0.6315046",
"0.60299355",
"0.58269083",
"0.5725876",
"0.5704963",
"0.5658328",
"0.56385934",
"0.561608",
"0.55160826",
"0.54984206",
"0.5412707",
"0.5374946",
"0.53702295",
"0.534171",
"0.5337929",
"0.5287854",
"0.52730507"... | 0.51297706 | 67 |
Return a `str` version of this LoadBalancerAzPoolsItem object. | def __str__(self) -> str:
return json.dumps(self.to_dict(), indent=2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __str__(self):\n return str(self.buckets)",
"def __repr__(self):\n return str(self._queue_items)",
"def __repr__(self) -> str:\n\n return 'NodePool({}, {})'.format(self.name, self.genesis_txn_path)",
"def __str__(self):\n result = \"\"\n for i in range(len(self.__bucket... | [
"0.62028676",
"0.60885775",
"0.60604393",
"0.59305084",
"0.59069943",
"0.5894897",
"0.58777404",
"0.586424",
"0.58566326",
"0.584308",
"0.584308",
"0.584308",
"0.584308",
"0.584308",
"0.584308",
"0.584308",
"0.584308",
"0.584308",
"0.584308",
"0.584308",
"0.584308",
"0.5843... | 0.0 | -1 |
Return `true` when self and other are equal, false otherwise. | def __eq__(self, other: 'LoadBalancerAzPoolsItem') -> bool:
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def equals(self, other): # -> bool:\n ...",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return self is other",
"def __eq__(self, other):\n return self is other",
"de... | [
"0.8637504",
"0.8509938",
"0.8509938",
"0.8452069",
"0.8452069",
"0.833335",
"0.8319583",
"0.8300503",
"0.8300503",
"0.82743293",
"0.8272289",
"0.8259091",
"0.8255991",
"0.8246755",
"0.82411456",
"0.82053465",
"0.82053465",
"0.8190857",
"0.8183335",
"0.8158784",
"0.8140229",
... | 0.0 | -1 |
Return `true` when self and other are not equal, false otherwise. | def __ne__(self, other: 'LoadBalancerAzPoolsItem') -> bool:
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return not self.__ne__(other)",
"def __ne__ (self, other):\n return not self == other",
"def __ne__(self, other):\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)"... | [
"0.8608476",
"0.85141045",
"0.8458375",
"0.84514666",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
... | 0.0 | -1 |
Initialize a FirstHref object from a json dictionary. | def from_dict(cls, _dict: Dict) -> 'FirstHref':
args = {}
if 'href' in _dict:
args['href'] = _dict.get('href')
return cls(**args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'NextHref':\n args = {}\n if 'href' in _dict:\n args['href'] = _dict.get('href')\n return cls(**args)",
"def from_dict(cls, _dict: Dict) -> 'PortsPaginatedCollectionFirst':\n args = {}\n if 'href' in _dict:\n args['href']... | [
"0.7095795",
"0.6934982",
"0.61930704",
"0.6026101",
"0.5787007",
"0.5738281",
"0.57335573",
"0.5595133",
"0.5577209",
"0.5568147",
"0.55575716",
"0.5537527",
"0.54413843",
"0.54292023",
"0.5408737",
"0.5350386",
"0.5342893",
"0.52990925",
"0.52691305",
"0.5259772",
"0.525555... | 0.8494797 | 0 |
Initialize a FirstHref object from a json dictionary. | def _from_dict(cls, _dict):
return cls.from_dict(_dict) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'FirstHref':\n args = {}\n if 'href' in _dict:\n args['href'] = _dict.get('href')\n return cls(**args)",
"def from_dict(cls, _dict: Dict) -> 'NextHref':\n args = {}\n if 'href' in _dict:\n args['href'] = _dict.get('href')... | [
"0.8494113",
"0.7097391",
"0.6935372",
"0.6194826",
"0.6027938",
"0.5788431",
"0.57402015",
"0.57350135",
"0.55969715",
"0.55787313",
"0.55681056",
"0.55598605",
"0.55397004",
"0.54426575",
"0.54310226",
"0.54084116",
"0.53500664",
"0.5344508",
"0.53013635",
"0.5269012",
"0.5... | 0.0 | -1 |
Return `true` when self and other are equal, false otherwise. | def __eq__(self, other: 'FirstHref') -> bool:
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def equals(self, other): # -> bool:\n ...",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return self is other",
"def __eq__(self, other):\n return self is other",
"de... | [
"0.8637504",
"0.8509938",
"0.8509938",
"0.8452069",
"0.8452069",
"0.833335",
"0.8319583",
"0.8300503",
"0.8300503",
"0.82743293",
"0.8272289",
"0.8259091",
"0.8255991",
"0.8246755",
"0.82411456",
"0.82053465",
"0.82053465",
"0.8190857",
"0.8183335",
"0.8158784",
"0.8140229",
... | 0.0 | -1 |
Return `true` when self and other are not equal, false otherwise. | def __ne__(self, other: 'FirstHref') -> bool:
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return not self.__ne__(other)",
"def __ne__ (self, other):\n return not self == other",
"def __ne__(self, other):\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)"... | [
"0.8608476",
"0.85141045",
"0.8458375",
"0.84514666",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
... | 0.0 | -1 |
Return `true` when self and other are equal, false otherwise. | def __eq__(self, other: 'HealthcheckHeader') -> bool:
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def equals(self, other): # -> bool:\n ...",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return self is other",
"def __eq__(self, other):\n return self is other",
"de... | [
"0.8637504",
"0.8509938",
"0.8509938",
"0.8452069",
"0.8452069",
"0.833335",
"0.8319583",
"0.8300503",
"0.8300503",
"0.82743293",
"0.8272289",
"0.8259091",
"0.8255991",
"0.8246755",
"0.82411456",
"0.82053465",
"0.82053465",
"0.8190857",
"0.8183335",
"0.8158784",
"0.8140229",
... | 0.0 | -1 |
Return `true` when self and other are not equal, false otherwise. | def __ne__(self, other: 'HealthcheckHeader') -> bool:
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return not self.__ne__(other)",
"def __ne__ (self, other):\n return not self == other",
"def __ne__(self, other):\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)"... | [
"0.8608476",
"0.85141045",
"0.8458375",
"0.84514666",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
... | 0.0 | -1 |
Initialize a ListLoadBalancers object from a json dictionary. | def from_dict(cls, _dict: Dict) -> 'ListLoadBalancers':
args = {}
if 'load_balancers' in _dict:
args['load_balancers'] = [LoadBalancer.from_dict(x) for x in _dict.get('load_balancers')]
else:
raise ValueError('Required property \'load_balancers\' not present in ListLoadBa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'LoadBalancer':\n args = {}\n if 'id' in _dict:\n args['id'] = _dict.get('id')\n if 'name' in _dict:\n args['name'] = _dict.get('name')\n if 'description' in _dict:\n args['description'] = _dict.get('description')\n ... | [
"0.74859315",
"0.7067506",
"0.6717337",
"0.62645125",
"0.6195288",
"0.5988796",
"0.5771439",
"0.57689786",
"0.57323194",
"0.5712991",
"0.5684599",
"0.5550201",
"0.5544978",
"0.5535637",
"0.5535637",
"0.5535637",
"0.5523209",
"0.5517023",
"0.5515322",
"0.55136514",
"0.5512371"... | 0.85112065 | 0 |
Initialize a ListLoadBalancers object from a json dictionary. | def _from_dict(cls, _dict):
return cls.from_dict(_dict) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'ListLoadBalancers':\n args = {}\n if 'load_balancers' in _dict:\n args['load_balancers'] = [LoadBalancer.from_dict(x) for x in _dict.get('load_balancers')]\n else:\n raise ValueError('Required property \\'load_balancers\\' not present i... | [
"0.85111594",
"0.7486165",
"0.7067795",
"0.6717971",
"0.62653077",
"0.6195072",
"0.598881",
"0.5772005",
"0.5766839",
"0.57336104",
"0.5712892",
"0.5685948",
"0.55517256",
"0.55452305",
"0.5536959",
"0.5536959",
"0.5536959",
"0.55248326",
"0.5518064",
"0.5517262",
"0.5514389"... | 0.54435796 | 53 |
Return a `str` version of this ListLoadBalancers object. | def __str__(self) -> str:
return json.dumps(self.to_dict(), indent=2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_balancer_name(self) -> str:\n return pulumi.get(self, \"load_balancer_name\")",
"def load_balancer_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"load_balancer_id\")",
"def describe_balancer(ctx):\n data = self.get_balancer_info()\n if data is not None:... | [
"0.6587434",
"0.6341559",
"0.60800993",
"0.60775095",
"0.604459",
"0.601384",
"0.59731513",
"0.5966964",
"0.59174377",
"0.59174377",
"0.59174377",
"0.5914742",
"0.58630896",
"0.5846145",
"0.57973754",
"0.5741939",
"0.5735507",
"0.57220167",
"0.5698252",
"0.56967235",
"0.56823... | 0.0 | -1 |
Return `true` when self and other are equal, false otherwise. | def __eq__(self, other: 'ListLoadBalancers') -> bool:
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def equals(self, other): # -> bool:\n ...",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return self is other",
"def __eq__(self, other):\n return self is other",
"de... | [
"0.8637504",
"0.8509938",
"0.8509938",
"0.8452069",
"0.8452069",
"0.833335",
"0.8319583",
"0.8300503",
"0.8300503",
"0.82743293",
"0.8272289",
"0.8259091",
"0.8255991",
"0.8246755",
"0.82411456",
"0.82053465",
"0.82053465",
"0.8190857",
"0.8183335",
"0.8158784",
"0.8140229",
... | 0.0 | -1 |
Return `true` when self and other are not equal, false otherwise. | def __ne__(self, other: 'ListLoadBalancers') -> bool:
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return not self.__ne__(other)",
"def __ne__ (self, other):\n return not self == other",
"def __ne__(self, other):\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)"... | [
"0.8608476",
"0.85141045",
"0.8458375",
"0.84514666",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
... | 0.0 | -1 |
Initialize a ListMonitors object. | def __init__(self,
monitors: List['Monitor'],
offset: int,
limit: int,
count: int,
total_count: int,
first: 'FirstHref',
next: 'NextHref') -> None:
self.monitors = monitors
self.offset ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'ListMonitors':\n args = {}\n if 'monitors' in _dict:\n args['monitors'] = [Monitor.from_dict(x) for x in _dict.get('monitors')]\n else:\n raise ValueError('Required property \\'monitors\\' not present in ListMonitors JSON')\n if ... | [
"0.6902739",
"0.63859284",
"0.6324431",
"0.56553143",
"0.555197",
"0.55154955",
"0.546914",
"0.54532856",
"0.5310003",
"0.52543867",
"0.5192219",
"0.5180564",
"0.5175997",
"0.5154588",
"0.5143262",
"0.5137185",
"0.5099917",
"0.5095834",
"0.5071898",
"0.50636256",
"0.5060277",... | 0.66769403 | 1 |
Initialize a ListMonitors object from a json dictionary. | def from_dict(cls, _dict: Dict) -> 'ListMonitors':
args = {}
if 'monitors' in _dict:
args['monitors'] = [Monitor.from_dict(x) for x in _dict.get('monitors')]
else:
raise ValueError('Required property \'monitors\' not present in ListMonitors JSON')
if 'offset' in _... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'Monitor':\n args = {}\n if 'id' in _dict:\n args['id'] = _dict.get('id')\n if 'name' in _dict:\n args['name'] = _dict.get('name')\n if 'description' in _dict:\n args['description'] = _dict.get('description')\n i... | [
"0.6534093",
"0.5799982",
"0.56466603",
"0.55496746",
"0.5464191",
"0.545905",
"0.5449219",
"0.54001576",
"0.5386713",
"0.5375386",
"0.53744954",
"0.53287",
"0.53010863",
"0.5256233",
"0.5201136",
"0.5174319",
"0.51587975",
"0.5156924",
"0.51436657",
"0.5089314",
"0.50634205"... | 0.8097466 | 0 |
Initialize a ListMonitors object from a json dictionary. | def _from_dict(cls, _dict):
return cls.from_dict(_dict) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'ListMonitors':\n args = {}\n if 'monitors' in _dict:\n args['monitors'] = [Monitor.from_dict(x) for x in _dict.get('monitors')]\n else:\n raise ValueError('Required property \\'monitors\\' not present in ListMonitors JSON')\n if ... | [
"0.80964",
"0.6535766",
"0.58035666",
"0.56494516",
"0.55516195",
"0.5464117",
"0.5459666",
"0.54502565",
"0.54008424",
"0.5389488",
"0.53812313",
"0.5375483",
"0.5332622",
"0.5303393",
"0.5251864",
"0.5205792",
"0.5174366",
"0.5160555",
"0.51581013",
"0.5146137",
"0.5092502"... | 0.48266733 | 82 |
Return `true` when self and other are equal, false otherwise. | def __eq__(self, other: 'ListMonitors') -> bool:
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def equals(self, other): # -> bool:\n ...",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return self is other",
"def __eq__(self, other):\n return self is other",
"de... | [
"0.8637504",
"0.8509938",
"0.8509938",
"0.8452069",
"0.8452069",
"0.833335",
"0.8319583",
"0.8300503",
"0.8300503",
"0.82743293",
"0.8272289",
"0.8259091",
"0.8255991",
"0.8246755",
"0.82411456",
"0.82053465",
"0.82053465",
"0.8190857",
"0.8183335",
"0.8158784",
"0.8140229",
... | 0.0 | -1 |
Return `true` when self and other are not equal, false otherwise. | def __ne__(self, other: 'ListMonitors') -> bool:
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return not self.__ne__(other)",
"def __ne__ (self, other):\n return not self == other",
"def __ne__(self, other):\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)"... | [
"0.8608476",
"0.85141045",
"0.8458375",
"0.84514666",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
... | 0.0 | -1 |
Initialize a ListPools object. | def __init__(self,
pools: List['Pool'],
offset: int,
limit: int,
count: int,
total_count: int,
first: 'FirstHref',
next: 'NextHref') -> None:
self.pools = pools
self.offset = offset
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self,\n *,\n availability_zone: str = None,\n pools: List[str] = None) -> None:\n self.availability_zone = availability_zone\n self.pools = pools",
"def from_dict(cls, _dict: Dict) -> 'ListPools':\n args = {}\n if 'pools' in... | [
"0.6845024",
"0.6683048",
"0.6333999",
"0.6190794",
"0.59206516",
"0.588844",
"0.58512324",
"0.5767226",
"0.57204884",
"0.5696401",
"0.56705743",
"0.5663508",
"0.5636617",
"0.5589189",
"0.5570518",
"0.55653733",
"0.5524624",
"0.551444",
"0.551002",
"0.5509663",
"0.550538",
... | 0.66162306 | 2 |
Initialize a ListPools object from a json dictionary. | def from_dict(cls, _dict: Dict) -> 'ListPools':
args = {}
if 'pools' in _dict:
args['pools'] = [Pool.from_dict(x) for x in _dict.get('pools')]
else:
raise ValueError('Required property \'pools\' not present in ListPools JSON')
if 'offset' in _dict:
arg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'LoadBalancerAzPoolsItem':\n args = {}\n if 'availability_zone' in _dict:\n args['availability_zone'] = _dict.get('availability_zone')\n if 'pools' in _dict:\n args['pools'] = _dict.get('pools')\n return cls(**args)",
"def from_... | [
"0.73401266",
"0.65396804",
"0.6241476",
"0.59498864",
"0.56927234",
"0.5648013",
"0.56183606",
"0.56159943",
"0.56003845",
"0.5511233",
"0.5470232",
"0.5468224",
"0.5461218",
"0.54340106",
"0.54197925",
"0.541495",
"0.5404726",
"0.539526",
"0.5373105",
"0.53711104",
"0.53329... | 0.8257339 | 0 |
Initialize a ListPools object from a json dictionary. | def _from_dict(cls, _dict):
return cls.from_dict(_dict) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'ListPools':\n args = {}\n if 'pools' in _dict:\n args['pools'] = [Pool.from_dict(x) for x in _dict.get('pools')]\n else:\n raise ValueError('Required property \\'pools\\' not present in ListPools JSON')\n if 'offset' in _dict:\n ... | [
"0.82572",
"0.73412395",
"0.65393174",
"0.62414813",
"0.5948871",
"0.5692048",
"0.5647521",
"0.5617677",
"0.56151414",
"0.5600418",
"0.55118865",
"0.54700506",
"0.5466721",
"0.5462335",
"0.5434124",
"0.5420975",
"0.5415776",
"0.5403557",
"0.5395525",
"0.53722286",
"0.53720397... | 0.5144629 | 69 |
Return a `str` version of this ListPools object. | def __str__(self) -> str:
return json.dumps(self.to_dict(), indent=2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __repr__(self) -> str:\n\n return 'NodePool({}, {})'.format(self.name, self.genesis_txn_path)",
"def __str__(self):\n return str(self.buckets)",
"def __str__(self) -> str:\n out = ''\n for i in range(self.buckets.length()):\n list = self.buckets.get_at_index(i)\n ... | [
"0.68986535",
"0.66809714",
"0.6648696",
"0.66117",
"0.66078615",
"0.6585872",
"0.6569734",
"0.6564575",
"0.6493839",
"0.64594305",
"0.6433998",
"0.64317375",
"0.6337943",
"0.6336434",
"0.63216966",
"0.63195926",
"0.63050467",
"0.63049865",
"0.63034445",
"0.6278698",
"0.62725... | 0.0 | -1 |
Return `true` when self and other are equal, false otherwise. | def __eq__(self, other: 'ListPools') -> bool:
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def equals(self, other): # -> bool:\n ...",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return self is other",
"def __eq__(self, other):\n return self is other",
"de... | [
"0.8637504",
"0.8509938",
"0.8509938",
"0.8452069",
"0.8452069",
"0.833335",
"0.8319583",
"0.8300503",
"0.8300503",
"0.82743293",
"0.8272289",
"0.8259091",
"0.8255991",
"0.8246755",
"0.82411456",
"0.82053465",
"0.82053465",
"0.8190857",
"0.8183335",
"0.8158784",
"0.8140229",
... | 0.0 | -1 |
Return `true` when self and other are not equal, false otherwise. | def __ne__(self, other: 'ListPools') -> bool:
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return not self.__ne__(other)",
"def __ne__ (self, other):\n return not self == other",
"def __ne__(self, other):\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)"... | [
"0.8608476",
"0.85141045",
"0.8458375",
"0.84514666",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
... | 0.0 | -1 |
Initialize a LoadBalancer object from a json dictionary. | def from_dict(cls, _dict: Dict) -> 'LoadBalancer':
args = {}
if 'id' in _dict:
args['id'] = _dict.get('id')
if 'name' in _dict:
args['name'] = _dict.get('name')
if 'description' in _dict:
args['description'] = _dict.get('description')
if 'enabl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'ListLoadBalancers':\n args = {}\n if 'load_balancers' in _dict:\n args['load_balancers'] = [LoadBalancer.from_dict(x) for x in _dict.get('load_balancers')]\n else:\n raise ValueError('Required property \\'load_balancers\\' not present i... | [
"0.7551409",
"0.682529",
"0.6581623",
"0.64541495",
"0.6382936",
"0.6365204",
"0.6320605",
"0.630422",
"0.62972564",
"0.6256784",
"0.61853236",
"0.61853236",
"0.61853236",
"0.6155711",
"0.6155711",
"0.6155711",
"0.6155711",
"0.6155711",
"0.6155711",
"0.6155711",
"0.6155711",
... | 0.76988983 | 0 |
Initialize a LoadBalancer object from a json dictionary. | def _from_dict(cls, _dict):
return cls.from_dict(_dict) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'LoadBalancer':\n args = {}\n if 'id' in _dict:\n args['id'] = _dict.get('id')\n if 'name' in _dict:\n args['name'] = _dict.get('name')\n if 'description' in _dict:\n args['description'] = _dict.get('description')\n ... | [
"0.7698691",
"0.75519115",
"0.68231845",
"0.65761715",
"0.6456121",
"0.6377324",
"0.6360647",
"0.63147867",
"0.6300201",
"0.629789",
"0.62511265",
"0.6179407",
"0.6179407",
"0.6179407",
"0.60961276",
"0.60423505",
"0.59722227",
"0.59696317",
"0.592832",
"0.5922158",
"0.591227... | 0.61475927 | 40 |
Return a `str` version of this LoadBalancer object. | def __str__(self) -> str:
return json.dumps(self.to_dict(), indent=2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __str__ (self) :\n\n return self.as_string()",
"def to_str(self) -> str:\n return pprint.pformat(self.dict())",
"def to_str(self):\n return pprint.pformat(self.to_dict())",
"def to_str(self):\n return pprint.pformat(self.to_dict())",
"def to_str(self):\n return pprint... | [
"0.67682564",
"0.67417794",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134",
"0.67409134"... | 0.0 | -1 |
Return `true` when self and other are equal, false otherwise. | def __eq__(self, other: 'LoadBalancer') -> bool:
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def equals(self, other): # -> bool:\n ...",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return self is other",
"def __eq__(self, other):\n return self is other",
"de... | [
"0.8637504",
"0.8509938",
"0.8509938",
"0.8452069",
"0.8452069",
"0.833335",
"0.8319583",
"0.8300503",
"0.8300503",
"0.82743293",
"0.8272289",
"0.8259091",
"0.8255991",
"0.8246755",
"0.82411456",
"0.82053465",
"0.82053465",
"0.8190857",
"0.8183335",
"0.8158784",
"0.8140229",
... | 0.0 | -1 |
Return `true` when self and other are not equal, false otherwise. | def __ne__(self, other: 'LoadBalancer') -> bool:
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return not self.__ne__(other)",
"def __ne__ (self, other):\n return not self == other",
"def __ne__(self, other):\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)"... | [
"0.8608476",
"0.85141045",
"0.8458375",
"0.84514666",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
... | 0.0 | -1 |
Initialize a Monitor object from a json dictionary. | def from_dict(cls, _dict: Dict) -> 'Monitor':
args = {}
if 'id' in _dict:
args['id'] = _dict.get('id')
if 'name' in _dict:
args['name'] = _dict.get('name')
if 'description' in _dict:
args['description'] = _dict.get('description')
if 'type' in _... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'ListMonitors':\n args = {}\n if 'monitors' in _dict:\n args['monitors'] = [Monitor.from_dict(x) for x in _dict.get('monitors')]\n else:\n raise ValueError('Required property \\'monitors\\' not present in ListMonitors JSON')\n if ... | [
"0.6782456",
"0.63144755",
"0.61874485",
"0.61282325",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
"0.6096391",
... | 0.77471673 | 0 |
Initialize a Monitor object from a json dictionary. | def _from_dict(cls, _dict):
return cls.from_dict(_dict) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, _dict: Dict) -> 'Monitor':\n args = {}\n if 'id' in _dict:\n args['id'] = _dict.get('id')\n if 'name' in _dict:\n args['name'] = _dict.get('name')\n if 'description' in _dict:\n args['description'] = _dict.get('description')\n i... | [
"0.7747811",
"0.67824703",
"0.63115007",
"0.61853594",
"0.61247855",
"0.6064725",
"0.6052614",
"0.60308033",
"0.59965605",
"0.5979812",
"0.5962336",
"0.59049153",
"0.58994204",
"0.5893681",
"0.5893681",
"0.5893681",
"0.5889531",
"0.58499914",
"0.5835049",
"0.58308566",
"0.582... | 0.60919994 | 32 |
Return `true` when self and other are equal, false otherwise. | def __eq__(self, other: 'Monitor') -> bool:
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def equals(self, other): # -> bool:\n ...",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return self is other",
"def __eq__(self, other):\n return self is other",
"de... | [
"0.8637504",
"0.8509938",
"0.8509938",
"0.8452069",
"0.8452069",
"0.833335",
"0.8319583",
"0.8300503",
"0.8300503",
"0.82743293",
"0.8272289",
"0.8259091",
"0.8255991",
"0.8246755",
"0.82411456",
"0.82053465",
"0.82053465",
"0.8190857",
"0.8183335",
"0.8158784",
"0.8140229",
... | 0.0 | -1 |
Return `true` when self and other are not equal, false otherwise. | def __ne__(self, other: 'Monitor') -> bool:
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return not self.__ne__(other)",
"def __ne__ (self, other):\n return not self == other",
"def __ne__(self, other):\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)"... | [
"0.8608476",
"0.85141045",
"0.8458375",
"0.84514666",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
"0.8406577",
... | 0.0 | -1 |
Initialize a NextHref object. | def __init__(self,
*,
href: str = None) -> None:
self.href = href | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self,\n href: str) -> None:\n self.href = href",
"def from_dict(cls, _dict: Dict) -> 'NextHref':\n args = {}\n if 'href' in _dict:\n args['href'] = _dict.get('href')\n return cls(**args)",
"def __init__(self, links: List[Link]=None, next_page:... | [
"0.69988644",
"0.69816804",
"0.6882996",
"0.6548524",
"0.6409807",
"0.6222878",
"0.6117346",
"0.6017983",
"0.59651417",
"0.5958204",
"0.5885165",
"0.5884981",
"0.58360106",
"0.58356273",
"0.58329475",
"0.58286166",
"0.5824927",
"0.5813651",
"0.5689857",
"0.56762147",
"0.56541... | 0.6725987 | 3 |
Return `true` when self and other are equal, false otherwise. | def __eq__(self, other: 'NextHref') -> bool:
if not isinstance(other, self.__class__):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def equals(self, other): # -> bool:\n ...",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return self is other",
"def __eq__(self, other):\n return self is other",
"de... | [
"0.8637504",
"0.8509938",
"0.8509938",
"0.8452069",
"0.8452069",
"0.833335",
"0.8319583",
"0.8300503",
"0.8300503",
"0.82743293",
"0.8272289",
"0.8259091",
"0.8255991",
"0.8246755",
"0.82411456",
"0.82053465",
"0.82053465",
"0.8190857",
"0.8183335",
"0.8158784",
"0.8140229",
... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.