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 |
|---|---|---|---|---|---|---|
Sets the iepsrate of this OrderDetails. | def iepsrate(self, iepsrate):
self._iepsrate = iepsrate | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rate(self, rate):\n\n self._rate = rate",
"def Rate(self, rate):\n for bi in self.BudgetItems:\n bi.Rate = rate\n for part in self.ResourceParts:\n part.Rate = rate\n self._Rate = Decimal(rate).quantize(Decimal('.01'))",
"def change_rate(self, new_rate: boo... | [
"0.63842607",
"0.62467253",
"0.61362773",
"0.6010227",
"0.57873243",
"0.5744153",
"0.5743444",
"0.5688148",
"0.5683974",
"0.56539977",
"0.56120265",
"0.56120265",
"0.55890775",
"0.5530095",
"0.54708034",
"0.54708034",
"0.5468623",
"0.5456241",
"0.5436234",
"0.5436234",
"0.543... | 0.7694226 | 0 |
Sets the isr_ret_rate of this OrderDetails. | def isr_ret_rate(self, isr_ret_rate):
self._isr_ret_rate = isr_ret_rate | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isr_ret(self, isr_ret):\n\n self._isr_ret = isr_ret",
"def isr_ret(self, isr_ret):\n\n self._isr_ret = isr_ret",
"def vat_ret_rate(self, vat_ret_rate):\n\n self._vat_ret_rate = vat_ret_rate",
"def vat_ret_rate(self, vat_ret_rate):\n\n self._vat_ret_rate = vat_ret_rate",
"def... | [
"0.689193",
"0.689193",
"0.62549555",
"0.62549555",
"0.5229875",
"0.5047854",
"0.49549",
"0.49347514",
"0.48839718",
"0.48801705",
"0.48605642",
"0.48280433",
"0.48185417",
"0.48047033",
"0.47493345",
"0.4733946",
"0.47195718",
"0.47097448",
"0.46725193",
"0.46568266",
"0.463... | 0.8863659 | 0 |
Returns the string representation of the model | def to_str(self):
return pprint.pformat(self.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _repr_model_(self):\n return str(self)",
"def __str__(self):\n\n return str(self.model)",
"def get_model_string(self):\n raise NotImplementedError()",
"def __str__(self):\n return self.model",
"def serialize_model(self):\n return dill.dumps(self.model)",
"def __str_... | [
"0.8603192",
"0.8509214",
"0.82360506",
"0.8049831",
"0.80115575",
"0.79342973",
"0.78785366",
"0.77903765",
"0.77898926",
"0.7746775",
"0.7629959",
"0.7608436",
"0.75825727",
"0.75152564",
"0.7506636",
"0.7504804",
"0.74877965",
"0.7443503",
"0.7435226",
"0.7427192",
"0.7407... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n return not self == other",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other):\n return self.__dict__ != other.__dict__",
"def __eq__(self, other):\n return not self.__ne__(other)",
... | [
"0.8410411",
"0.8391477",
"0.8172175",
"0.81410587",
"0.80920255",
"0.8088807",
"0.80676955"
] | 0.0 | -1 |
Calculate the exponential of the input | def exp(var):
if isinstance(var, Dual):
val = np.e ** var.val
der = np.e ** var.val * var.der
return Dual(val, der)
elif isinstance(var, Node):
new_node = Node(0)
new_node.inputs = [var]
new_node.val = np.e ** var.val
new_node.gradients = [np.e ** var.val... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def exponential(x):\n return K.exp(x)",
"def exp(x):\r\n\r\n return math.exp(x)",
"def exp(x):\n return np.e**x",
"def exp(a):\n return math.exp(a)",
"def em(x):\n return math.exp(x)-1",
"def exp(self, out=None):\n return exponential.exp(self, out)",
"def exponential(self):\r\n ... | [
"0.8390438",
"0.82796305",
"0.81268924",
"0.80611444",
"0.7876197",
"0.78720623",
"0.7723043",
"0.76963574",
"0.76654404",
"0.7650216",
"0.7603982",
"0.758408",
"0.7556247",
"0.7525233",
"0.7468542",
"0.72995543",
"0.72315055",
"0.7210301",
"0.71974105",
"0.7179551",
"0.70895... | 0.6653689 | 53 |
Calculate the cos of the input | def cos(var):
if isinstance(var, Dual):
der = -1 * np.sin(var.val) * var.der
val = np.cos(var.val)
return Dual(val, der)
elif isinstance(var, Node):
new_node = Node(np.cos(var.val))
new_node.inputs = [var]
new_node.gradients = [-np.sin(var.val)]
return ne... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cos(a):\n return math.cos(a)",
"def cos(self):\n return self._unop(\"cos\")",
"def cos(x):\n return CosOp(x)",
"def cos(self, out=None):\n return trigonometrics.cos(self, out)",
"def cos(x:int)->float:\n return math.cos(x)",
"def cos(x, name=None):\n result = _op_def_lib.apply... | [
"0.85265887",
"0.8483461",
"0.8457567",
"0.84271747",
"0.8051378",
"0.8034816",
"0.8023252",
"0.79073113",
"0.7847084",
"0.7775674",
"0.7751061",
"0.7709505",
"0.7700546",
"0.7681198",
"0.76571655",
"0.76466435",
"0.76058155",
"0.7604048",
"0.75632584",
"0.7536069",
"0.752017... | 0.71521264 | 35 |
Calculate the losgistic value of the input, default is the standard logistics function | def logistic(var, L=1, k=1, x0=0):
if isinstance(var, Dual):
temp = help_logistic(var.val, L, k, x0)
der = k * temp * (1 - temp/L) * var.der
val = temp
return Dual(val, der)
elif isinstance(var, Node):
temp = help_logistic(var.val, L, k, x0)
new_node = Node(temp)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def logistic(x):\n return 2.0 / (1 + exp(-x)) - 1.0",
"def help_logistic(x, L=1, k=1, x0=0):\n return L / (1 + np.exp(-k * (x - x0)))",
"def Lvalue(self):\n if self._k > 0:\n return -self._chi.bernoulli(self._k)/self._k\n if self.is_trivial():\n return Infinity\n ... | [
"0.69111896",
"0.68445796",
"0.68327737",
"0.6820469",
"0.666728",
"0.6613422",
"0.63379323",
"0.6325374",
"0.63203794",
"0.626929",
"0.62474865",
"0.618161",
"0.61339504",
"0.61234003",
"0.60762066",
"0.60581774",
"0.6048731",
"0.60297877",
"0.6017204",
"0.60119176",
"0.6006... | 0.65352464 | 6 |
Check if a given line is an empty line | def is_empty(self, line):
return len(line.split()) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_empty_line(line):\n return len(line.lstrip()) == 0",
"def is_empty_line(line):\n return line in ('\\n', '\\r\\n')",
"def _line_is_empty(self, line):\n\n return re.match(self._emptyline, line) is not None",
"def is_empty(self, line):\n return len(line) == 0",
"def is_empty(line):\... | [
"0.89498985",
"0.89071935",
"0.8901483",
"0.8869052",
"0.8774211",
"0.8762585",
"0.8762585",
"0.8607838",
"0.8492053",
"0.84525573",
"0.82795846",
"0.8078066",
"0.7948461",
"0.76214355",
"0.75395226",
"0.7344542",
"0.7344542",
"0.7344542",
"0.7344542",
"0.7344542",
"0.7344542... | 0.8747609 | 7 |
Get observation pairs from the study. This function collects observation pairs from the complete trials of the study. Pruning is currently not supported. The values for trials that don't contain the parameter named ``param_name`` are set to None. Objective values are negated if their directions are maximization and all... | def _get_observation_pairs(
study: "multi_objective.study.MultiObjectiveStudy",
param_name: str,
) -> Tuple[List[Optional[float]], List[List[float]]]:
trials = [
multi_objective.trial.FrozenMultiObjectiveTrial(study.n_objectives, trial)
for trial in study._storage.get_all_trials(study._stud... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_param_pairs(self):\n params = pd.Series(self.data.comb.unique()).str.split(',').values\n self.params = []\n for i, j in params:\n self.params.append([float(i), float(j)])",
"def _split_observation_pairs(\n self,\n study: \"multi_objective.study.MultiObjective... | [
"0.56480247",
"0.56413877",
"0.5469813",
"0.54271954",
"0.5400454",
"0.5378663",
"0.53667927",
"0.5360827",
"0.53504294",
"0.5332544",
"0.5323374",
"0.53126276",
"0.53004575",
"0.52966726",
"0.5291474",
"0.5242439",
"0.5242439",
"0.52388567",
"0.5224813",
"0.5224813",
"0.5224... | 0.755729 | 0 |
Test whether the plot labels are appropriately constructed if valid | def test_labels_slices():
x = Slice(Continuous([1, 2, 3], start=start, dt=1), labels={"y": "Force [pN]", "title": "x"})
y = Slice(Continuous([1, 2, 3], start=start, dt=1), labels={"y": "Force [pN]", "title": "y"})
for operation, _, operator_str, keep_dims in operators:
if operation.startswith("__r"... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def shouldCreateLabel(self) -> bool:\n ...",
"def _check_labels(self, labels):\n if labels.shape[1:] != self._labels_shape:\n raise AssertionError(\"Labels need to have the same shape described by the model \" + str(self._labels_shape)\n + \" .Current labe... | [
"0.73571914",
"0.686035",
"0.66702145",
"0.6639146",
"0.6459882",
"0.63510877",
"0.6316396",
"0.6316396",
"0.62952495",
"0.62654203",
"0.62654203",
"0.6193135",
"0.6186707",
"0.6159771",
"0.6140928",
"0.60889083",
"0.60642296",
"0.60394126",
"0.6029964",
"0.6028236",
"0.60166... | 0.5579981 | 53 |
Test whether the plot labels are appropriately constructed if valid | def test_labels_scalars():
x = Slice(Continuous([1, 2, 3], start=start, dt=1), labels={"y": "Force [pN]", "title": "x"})
y = 5
for operation, _, operator_str, keep_dims in operators:
if operation.startswith("__r"):
assert getattr(x, operation)(y).labels["title"] == f"(5 {operator_str} x... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def shouldCreateLabel(self) -> bool:\n ...",
"def _check_labels(self, labels):\n if labels.shape[1:] != self._labels_shape:\n raise AssertionError(\"Labels need to have the same shape described by the model \" + str(self._labels_shape)\n + \" .Current labe... | [
"0.73575103",
"0.6861076",
"0.6671374",
"0.66400784",
"0.646033",
"0.63519824",
"0.6317555",
"0.6317555",
"0.629856",
"0.6265236",
"0.6265236",
"0.6194405",
"0.61882216",
"0.61591524",
"0.61427265",
"0.60899144",
"0.60635364",
"0.6040472",
"0.6032225",
"0.6028222",
"0.6018756... | 0.5766556 | 38 |
find combos of values that eliminate other square's possibles | def blockers(grid):
for row in grid.grid:
for square in row:
a_line, o_line, rest = get_sectioned_horz(grid, square)
blocker_check(grid, square, o_line, rest)
a_line, o_line, rest = get_sectioned_vert(grid, square)
blocker_check(grid, square, o_line, rest... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def combos(trace):\r\n return set((x, y) for x in trace for y in trace if x != y)",
"def possib(self):\r\n for a,row in enumerate(self._sudoku):\r\n for b,n in enumerate(row):\r\n if n == 0:\r\n ## Search through the rows\r\n for m in self... | [
"0.71045697",
"0.65540767",
"0.64400303",
"0.6393994",
"0.6369821",
"0.62665",
"0.62454563",
"0.62259686",
"0.6218711",
"0.61918",
"0.61918",
"0.61918",
"0.61664474",
"0.61589897",
"0.6146614",
"0.6137638",
"0.60870415",
"0.608596",
"0.60713893",
"0.6067646",
"0.60658926",
... | 0.0 | -1 |
Return the bibliography model that is active in this project. Defaults to `kdl_wagtail_zotero.Bibliography`. | def get_bibliography_model():
try:
return apps.get_model(
settings.KDL_WAGTAIL_BIBLIOGRAPHY_MODEL, require_ready=False)
except AttributeError:
return Bibliography
except ValueError:
raise ImproperlyConfigured(
('KDL_WAGTAIL_BIBLIOGRAPHY_MODEL must be of the fo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __get_active_object__(self):\n return bpy.data.objects[self.__active_object_name] if self.__active_object_name in bpy.data.objects else None",
"def model(self):\n return self.__modelRef() if self.__modelRef is not None else None",
"def get_model(self):\n return self._get('model')",... | [
"0.6067248",
"0.56996787",
"0.5662753",
"0.5662753",
"0.559165",
"0.55719227",
"0.55631566",
"0.55631566",
"0.55631566",
"0.5539019",
"0.5539019",
"0.5539019",
"0.5539019",
"0.5539019",
"0.5539019",
"0.5539019",
"0.5539019",
"0.5539019",
"0.5522854",
"0.5509127",
"0.5507851",... | 0.7611922 | 0 |
Compute the CV score and RMSE error | def get_generations( self ):
db = connect( self.setting.db_name )
select_cond = [("converged","=","1")]
if ( self.select_cond is not None ):
select_cond += self.select_cond
all_generations = []
for row in db.select(select_cond):
try:
gen =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cv_regression_model(\n model: ModelRegressor, X: pd.DataFrame, y: pd.DataFrame, \n scoring: str=\"neg_mean_squared_error\", \n cv: int=5) -> np.ndarray:\n rmses = cross_val_score(\n model, X, y, scoring=scoring, cv=cv)\n avg_rmse = np.mean(np.sqrt(-rmses))\n return avg_rmse... | [
"0.716936",
"0.711542",
"0.69546676",
"0.6921815",
"0.6836816",
"0.6749899",
"0.6741926",
"0.66453105",
"0.6616742",
"0.6564844",
"0.65596974",
"0.65595925",
"0.6536691",
"0.65344924",
"0.65212137",
"0.6508215",
"0.64836895",
"0.64726484",
"0.6466545",
"0.64662313",
"0.646428... | 0.0 | -1 |
Return random AES key. | def random_key(self):
if self.debug:
return ''
return urandom(16) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_key():\n return urandom(32)",
"def random_fernet_key():\n return Fernet.generate_key().decode('utf8')",
"def _generate_key(self):\n return ''.join(chr(random.randint(0, 0xFF)) for i in range(self.key_size))",
"def generate_key():\n choice = string.ascii_letters + string.digits\n... | [
"0.81380165",
"0.7814673",
"0.7771459",
"0.7760946",
"0.76622754",
"0.75838107",
"0.75570655",
"0.75330484",
"0.75172293",
"0.7516936",
"0.74895096",
"0.7464995",
"0.74607265",
"0.74607265",
"0.74161583",
"0.73831004",
"0.7235645",
"0.71921915",
"0.71617657",
"0.71606386",
"0... | 0.81017005 | 1 |
Return AES key secured with RSA private key. | def secure_key(self, key):
if self.debug:
return key
result = openssl_private_encrypt(self.private_key, key, self.openssl)
return b64encode(result).decode() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getSessionKey(rsa, cipher):\n AESEncrypted = cipher[:256]\n print('AESEncrypted...')\n print(binascii.hexlify(AESEncrypted))\n AESKey = rsa.decrypt(AESEncrypted)\n return AESKey[(len(AESKey)-32):]",
"def private_key():\n return binascii.b2a_hex(os.urandom(32))",
"def _generate_cipher(... | [
"0.7081259",
"0.69666517",
"0.668231",
"0.66068494",
"0.6542388",
"0.6439732",
"0.63722324",
"0.63681847",
"0.6368074",
"0.6346596",
"0.63140434",
"0.62962395",
"0.626916",
"0.62570494",
"0.6205289",
"0.62011045",
"0.6191071",
"0.6187153",
"0.6176072",
"0.61016124",
"0.609052... | 0.6752445 | 2 |
Returns the dataframe as a list of dictionaries | def get_list_companies(df, cols_to_keep=None):
if cols_to_keep is None:
cols_to_keep = ['name', 'score', 'source_country']
list_companies = df.filter(cols_to_keep).to_dict('records')
return list_companies | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dataframe_to_list(dataframe: pd.DataFrame) -> List[dict]:\n result = list(dataframe.to_dict(orient=\"index\").values())\n return result",
"def df_to_dict_list(df, reverse= True):\n\n data = df.values.tolist()\n column_names = df.columns.values.tolist()\n data = [dict(zip(column_names, item)) f... | [
"0.7781296",
"0.7073516",
"0.6955736",
"0.69276327",
"0.6848074",
"0.6839691",
"0.6839691",
"0.6826724",
"0.6792195",
"0.6716483",
"0.66932863",
"0.66144",
"0.65988857",
"0.6596658",
"0.65356225",
"0.6496432",
"0.64685977",
"0.6460097",
"0.6448633",
"0.64426875",
"0.6409442",... | 0.0 | -1 |
takes a dictionary of things key is whatever you want (like path or whatever) key has to be immutable value is weight | def weighted_prob2(dictionary, num_times = 1, prev_keys = set()):
#set all weights add up to 1
original_dict = dict(dictionary)
summation = 0
key_type = None
key_dict = {}
count = 0
for key,value in dictionary.items():
key_dict[str(count)]= key
count += 1
key_type = type(key)
if val... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, weighted_dict):\n self.wd = weighted_dict",
"def _make_weight_counter(self, cnter_dict):\n weight_dict = copy.deepcopy(cnter_dict)\n\n total = np.sum(weight_dict.values())\n\n for k, v in weight_dict.iteritems():\n weight_dict[k] = v / total\n\n re... | [
"0.6404987",
"0.59944606",
"0.596517",
"0.58492523",
"0.57981724",
"0.5743519",
"0.57289755",
"0.5720328",
"0.5673365",
"0.5666215",
"0.5625454",
"0.5606303",
"0.55910015",
"0.5590327",
"0.55855197",
"0.54870754",
"0.5480463",
"0.54741323",
"0.54582053",
"0.5447664",
"0.54294... | 0.5895453 | 3 |
Test to delete a Statistic model. | def test_delete_statistic(self) -> None:
data = {
'post_id': '10213575510401212',
'user_id': '1808970598',
'likes': 5,
'created_at': '2021-09-05'
}
Statistic.objects.create(**data)
statistic = Statistic.objects.get(post_id='102135755104012... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_can_delete_stat(self):\n user = User.objects.create_user('user', 'user@cs.local', 'user', is_staff=True)\n self.client.login(username='user', password='user')\n stat = Stat.objects.create(\n owner=user, title=self.stat_title, amount=2.5, date='2020-04-20')\n response... | [
"0.76349235",
"0.7107762",
"0.7107762",
"0.7081621",
"0.69751453",
"0.6900565",
"0.6872883",
"0.6782068",
"0.6775073",
"0.6772959",
"0.67441237",
"0.6682688",
"0.6605948",
"0.66049564",
"0.6597597",
"0.6582438",
"0.6582133",
"0.658212",
"0.6478058",
"0.6476363",
"0.64736956",... | 0.79652673 | 0 |
Iterative function that enumerates the set of all sequences of outcomes of given length. | def gen_all_sequences(outcomes, length):
answer_set = set([()])
for dummy_idx in range(length):
temp_set = set()
for partial_sequence in answer_set:
for item in outcomes:
new_sequence = list(partial_sequence)
new_sequence.append(item)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gen_all_sequences(outcomes, length): \r\n ans = set([()])\r\n for _ in range(length):\r\n temp = set()\r\n for seq in ans:\r\n for item in outcomes:\r\n new_seq = list(seq)\r\n new_seq.append(item)\r\n temp.add(tuple(new_seq))\r\n ... | [
"0.7268264",
"0.7220661",
"0.7216504",
"0.72137845",
"0.7073211",
"0.6633384",
"0.608081",
"0.6039705",
"0.6039705",
"0.6031359",
"0.5960812",
"0.5952458",
"0.58968276",
"0.5861383",
"0.58086693",
"0.57752603",
"0.5635916",
"0.5627742",
"0.5588421",
"0.5533482",
"0.5530461",
... | 0.72592014 | 4 |
Test Speaker reports volume correctly. | async def test_report_speaker_volume(hass: HomeAssistant) -> None:
hass.states.async_set(
"media_player.test_speaker",
"on",
{
"friendly_name": "Test media player speaker",
"supported_features": MediaPlayerEntityFeature.VOLUME_MUTE
| MediaPlayerEntityFeatu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def volume():\n pass",
"def get_volume(self): \n return mixer.music.get_volume()",
"def speaker_volume(self):\n volume = self._attrs.get('speaker_volume')\n try:\n return int(volume)\n except ValueError:\n return volume",
"def volume():\n\tpass",
... | [
"0.69960994",
"0.6900418",
"0.6809821",
"0.67938393",
"0.6734797",
"0.66950166",
"0.6668795",
"0.6668795",
"0.6469635",
"0.6468431",
"0.63959503",
"0.63771075",
"0.6343532",
"0.63373595",
"0.6333915",
"0.6302522",
"0.6288169",
"0.62766796",
"0.62000275",
"0.6187672",
"0.61642... | 0.80496097 | 0 |
Calculate created and expires datetime objects. The method is going to be used for building ADFS Request Security Token message. Time interval between ``created`` and ``expires`` dates is now static and equals to 120 seconds. ADFS security tokens should not be live too long, as currently ``keystoneauth1`` doesn't have ... | def _token_dates(self, fmt='%Y-%m-%dT%H:%M:%S.%fZ'):
date_created = datetime.datetime.utcnow()
date_expires = date_created + datetime.timedelta(
seconds=self.DEFAULT_ADFS_TOKEN_EXPIRATION)
return [_time.strftime(fmt) for _time in (date_created, date_expires)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generate_expired_auth_token(self):\n token = self.generate_auth_token()\n token.created = timezone.now()-timezone.timedelta(hours=25)\n token.save()\n return token",
"def _get_expiry_time(self, created_at):\n\n if created_at:\n expires_at = created_at + datetime.... | [
"0.6301253",
"0.6260241",
"0.5894187",
"0.5681902",
"0.5648776",
"0.56289047",
"0.55684114",
"0.54838645",
"0.54838645",
"0.54838645",
"0.54838645",
"0.54667014",
"0.54601055",
"0.5387894",
"0.5337509",
"0.5304141",
"0.5302771",
"0.52988034",
"0.5294982",
"0.529475",
"0.52809... | 0.57416356 | 3 |
Dequeue the earliest enqueued item still in the queue. This operation removes the item from the queue. | def pop(self):
return self.list.pop() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dequeue(self):\n item = self._queue[0]\n self._queue = self._queue[1:]\n return item",
"def dequeue(self):\n assert self.__count > 0, \"Queue is empty!\"\n item = self.__items[self.__head]\n self.__items[self.__head] = None\n self.__head = (self.__head + 1) % ... | [
"0.771767",
"0.7643924",
"0.76182216",
"0.7494681",
"0.748503",
"0.7455701",
"0.74288684",
"0.7426655",
"0.7409967",
"0.74028456",
"0.7379622",
"0.73754096",
"0.73667866",
"0.73508674",
"0.7347134",
"0.73210615",
"0.7320887",
"0.73153704",
"0.7303947",
"0.7265148",
"0.7261141... | 0.0 | -1 |
Safely cast the values to the given dtype. "safe" in this context means the casting is lossless. e.g. if 'values' has a floating dtype, each value must be an integer. | def _safe_cast(cls, values: np.ndarray, dtype: np.dtype, copy: bool) -> np.ndarray:
try:
return values.astype(dtype, casting="safe", copy=copy)
except TypeError as err:
casted = values.astype(dtype, copy=copy)
if (casted == values).all():
return casted... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def maybe_coerce_values(values: ArrayLike) -> ArrayLike:\n # Caller is responsible for ensuring NumpyExtensionArray is already extracted.\n\n if isinstance(values, np.ndarray):\n values = ensure_wrapped_if_datetimelike(values)\n\n if issubclass(values.dtype.type, str):\n values = np.... | [
"0.67241335",
"0.65672046",
"0.6463357",
"0.619293",
"0.61464906",
"0.6079903",
"0.60079396",
"0.5922982",
"0.58990085",
"0.58908004",
"0.5890687",
"0.5873025",
"0.58627003",
"0.5851513",
"0.5772054",
"0.57564324",
"0.573702",
"0.55568403",
"0.5548885",
"0.55466896",
"0.54992... | 0.7732191 | 0 |
(Re)Initialize the pathfinding matrices for grid or part of it. | def _option_initpath(*suboptions):
grid = get_xyzgrid()
# override grid's logger to echo directly to console
def _log(msg):
print(msg)
grid.log = _log
xymaps = grid.all_maps()
nmaps = len(xymaps)
for inum, xymap in enumerate(xymaps):
print(f"(Re)building pathfinding matrix... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setupMatrices(self):\n self.matrix = np.zeros(shape=(self.geometry.numX * self.geometry.numY, self.geometry.numX * self.geometry.numY))\n self.elementCountTarget = self.geometry.numX * self.geometry.numY\n self.elementsInRow = self.geometry.numX\n for row in range(0, self.geometry.n... | [
"0.68414783",
"0.668183",
"0.6556638",
"0.65480196",
"0.6533668",
"0.64393145",
"0.6386169",
"0.63325906",
"0.63102937",
"0.6261194",
"0.6168131",
"0.61423075",
"0.6119364",
"0.60815924",
"0.6024125",
"0.59963095",
"0.59807414",
"0.5959249",
"0.59562373",
"0.5943827",
"0.5934... | 0.61678106 | 11 |
Set weights for the collaborative classification cost. | def set_disc_weights(self, dweight_gn=1.0, dweight_dn=1.0):
zero_ary = np.zeros((1,)).astype(theano.config.floatX)
new_dw_dn = zero_ary + dweight_dn
self.dw_dn.set_value(new_dw_dn)
new_dw_gn = zero_ary + dweight_gn
self.dw_gn.set_value(new_dw_gn)
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_weights(self,weights):\n self.weights=weights",
"def set_weights(self, w):\r\n raise NotImplementedError('This function must be implemented within child class!')",
"def setWeights(self, weights): # real signature unknown; restored from __doc__\n pass",
"def set_class_weights(self... | [
"0.71678936",
"0.71434784",
"0.7111687",
"0.70112133",
"0.700772",
"0.6980351",
"0.6944171",
"0.6940752",
"0.680278",
"0.6770823",
"0.6762671",
"0.6701725",
"0.6672015",
"0.66445446",
"0.6578584",
"0.6516434",
"0.65121263",
"0.65067726",
"0.64731115",
"0.646239",
"0.6432399",... | 0.0 | -1 |
Return queryset of objects accessible by identity. | def identity(self, identity):
return self.filter(self.get_identity_q(identity)).distinct() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_queryset(self):\n user = self.request.user\n queryset = self.queryset.filter(pk=user.pk)\n\n return queryset",
"def get_queryset(self, request, is_list=False, *args, **kwargs):\n\n return self.model.objects.filter(owner=request.user)",
"def get_queryset(self):\n print... | [
"0.72803855",
"0.72689986",
"0.72103155",
"0.71493524",
"0.71039087",
"0.70462215",
"0.70462215",
"0.703911",
"0.7038226",
"0.6939554",
"0.6938031",
"0.69092864",
"0.6908858",
"0.689963",
"0.6860162",
"0.6848527",
"0.6844245",
"0.6809001",
"0.6806736",
"0.6806341",
"0.6804882... | 0.0 | -1 |
Get detail url for this object | def api_detail_url(self):
return reverse(f'api:{self.basename}-detail', kwargs={'pk': str(self.pk)}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getDetailUrl(self):\n return self.base.get(\"detailUrl\", [])",
"def detail_url(self) -> str:\n return reverse(f'{self.get_meta().app_label}:detail', args=[self.pk])",
"def url(self):\r\n return reverse('%s:detail' % URL_NAMESPACE, kwargs={\r\n 'module': self.module,\r\n ... | [
"0.84228706",
"0.8157762",
"0.7710548",
"0.7696192",
"0.7636731",
"0.7540655",
"0.7540655",
"0.7540655",
"0.7540655",
"0.7540655",
"0.7540655",
"0.7412279",
"0.7348704",
"0.73363286",
"0.7294369",
"0.7242404",
"0.7242404",
"0.7242404",
"0.72244954",
"0.7221004",
"0.7214704",
... | 0.7799355 | 2 |
Create a fixture and check the local standard deviation | def test_stddev():
arr = numpy.zeros((5, 5))
# a 3x3 patch
arr[1:4, 1:4] = 1
parameters = {'data': [arr], 'size': [3, 3]}
result = statistics.stddev(parameters)
assert_equal(result[2, 2], 0.0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_std(self):\n std = (\n Maxwellian_1D(self.v_vect, T=self.T_e, particle=self.particle)\n * self.v_vect**2\n * self.dv\n ).sum()\n std = np.sqrt(std)\n T_distri = (std**2 / k_B * m_e).to(u.K)\n assert np.isclose(T_distri.value, self.T_e.val... | [
"0.6403232",
"0.61417174",
"0.5889531",
"0.5813401",
"0.57854974",
"0.57733566",
"0.57677567",
"0.57417136",
"0.56640434",
"0.56554806",
"0.56445247",
"0.5644388",
"0.56408715",
"0.56400245",
"0.56290513",
"0.5577674",
"0.5566851",
"0.5544013",
"0.55363214",
"0.5534291",
"0.5... | 0.57052463 | 8 |
Draw text within a particular square | def draw_text_board_square(position, text, color_rgba=(0.5, 0.23, 0.23, 1.0)):
i, j = position
x, y, dx, dy = index_to_pixels(i, j)
xc = x + dx * 0.5
yc = y + dy * 0.5
pyglet.gl.glColor4f(*color_rgba)
pyglet.text.Label(
str(text),
font_name='Times New Roman',
font_size=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PaintTextRect(Width, Height, Text):\n pass",
"def paint(self):\n loc = [(0,1), (1,0), (1,1), (1,2)]\n text = ['N', 'W', 'S', 'E']\n for l, s in zip(loc, text):\n self.create_rectangle(l[1] * self.gsize[0],\n l[0] * self.gsize[1],\n ... | [
"0.7602844",
"0.75226176",
"0.74447095",
"0.74318075",
"0.7359705",
"0.72913253",
"0.7246187",
"0.71757966",
"0.716394",
"0.71474427",
"0.7107036",
"0.70934385",
"0.70907366",
"0.7001304",
"0.69852734",
"0.6950188",
"0.6942426",
"0.69418186",
"0.6922232",
"0.69217837",
"0.690... | 0.790716 | 0 |
Transforms an image mapping its original points to new positions. Fills in the new image with white pixels wherever there is no mapping. The original image must be in BGR. | def transformImage(originalImage, oldPoints, newPoints):
# originalImage = cv2.cvtColor(originalImage, cv2.COLOR_BGR2GRAY)
newImage = np.full(originalImage.shape, fill_value=255, dtype=np.uint8)
newImage[newPoints[0], newPoints[1]] = originalImage[oldPoints[0], oldPoints[1]]
return newImage | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def map_image(orig_image, mask_map):\n orig_image_pixels = orig_image.load()\n\n new_image = orig_image\n new_image_pixels = new_image.load()\n for i in range(orig_image.size[0]):\n for j in range(orig_image.size[1]):\n new_image_pixels[i, j] = mask_map[orig_image_pixels[i, j]]\n r... | [
"0.69263923",
"0.67740875",
"0.64654034",
"0.630024",
"0.62923056",
"0.62860584",
"0.6226098",
"0.6184687",
"0.61712617",
"0.6101856",
"0.6009943",
"0.5968541",
"0.59509534",
"0.5950894",
"0.5922722",
"0.59067965",
"0.5905667",
"0.58934444",
"0.5877072",
"0.5862906",
"0.58588... | 0.77779084 | 0 |
Cumulative Density Function at x of the defined two piece distribution. | def cdf_tp_generic(x, cdf, loc, sigma1, sigma2):
if sigma1 * sigma2 <= 0:
raise AssertionError('Scale parameters must be positive.')
aux = 2 / (sigma1 + sigma2)
if isscalar(x):
if x < loc:
output = aux * sigma1 * cdf((x - loc) / sigma1)
else:
output = 1 - aux... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def piecewise_cdf(x):\n x = F.relu(1+x)-1\n x = 1-F.relu(1-x)\n x = (x+1)/2\n return x",
"def cdfe(x1, x2):\n\n return norm.cdf(x2, 0, np.sqrt(1/12)) - norm.cdf(x1, 0, np.sqrt(1/12))",
"def cdf(self, x, *args, **kwargs) -> float:\n return self.scipy_distribution.cdf(x, *args, **kwargs, **... | [
"0.7490728",
"0.67944264",
"0.6672135",
"0.66580003",
"0.6638141",
"0.6457338",
"0.64381117",
"0.64311206",
"0.63612986",
"0.6264993",
"0.62497956",
"0.61993116",
"0.6159796",
"0.6113631",
"0.608917",
"0.60549426",
"0.6051621",
"0.60494375",
"0.6003152",
"0.5918353",
"0.59125... | 0.0 | -1 |
Given a string containing the bounding box of span, the width of the page and height, get the bounding box in form of a list and based of a 100 depending on width and height of page | def get_bbox_from_string(string, width, height):
bbox_string = string.split(" ")
bbox = []
for number in bbox_string[0:2]:
bbox.append(float(number))
for number in bbox_string[-2:]:
bbox.append(float(number))
return get_new_bbox(bbox, width, height) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_new_bbox(bbox, width, height):\n try:\n x1 = round(bbox[0]*100/float(width), 4)\n x2 = round(bbox[2]*100/float(width), 4)\n y1 = round(bbox[1]*100/float(height), 4)\n y2 = round(bbox[3]*100/float(height), 4)\n except IndexError:\n print(bbox)\n return [x1, y1, x2... | [
"0.66660744",
"0.6385561",
"0.6363178",
"0.6360463",
"0.63364995",
"0.63045853",
"0.6272649",
"0.6272649",
"0.6236391",
"0.6236391",
"0.62362516",
"0.6226753",
"0.62192404",
"0.61745834",
"0.6112218",
"0.60689497",
"0.60400635",
"0.60017693",
"0.59848464",
"0.5948",
"0.592894... | 0.7325756 | 0 |
Test that the DEM subtraction script gives reasonable numbers. | def test_dem_subtraction():
diff = xdem.spatial_tools.subtract_rasters(
examples.FILEPATHS["longyearbyen_ref_dem"],
examples.FILEPATHS["longyearbyen_tba_dem"])
assert np.nanmean(np.abs(diff.data)) < 100 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_difference():\n from simplecalc.calculator import difference\n\n assert difference([0, 1, -10, 12]) == -3\n assert difference([0, 1, -0.1]) == -0.9",
"def test_calculator_subtract():\n assert calculator.calculator_subtract(4, 4) == 0\n assert calculator.calculator_subtract(0, 0) == 0\n ... | [
"0.7554304",
"0.7288784",
"0.7247366",
"0.71988064",
"0.7040571",
"0.69262695",
"0.6889777",
"0.67324066",
"0.662649",
"0.66070074",
"0.6541388",
"0.6533963",
"0.65068126",
"0.647731",
"0.6423831",
"0.6310636",
"0.6245369",
"0.62270075",
"0.6216656",
"0.6201912",
"0.6200678",... | 0.7067596 | 4 |
Handlers are closed when they are removed from the logger. | def test_removeHandler_closes_handler(self):
log_output = StringIO()
class DummyStreamHandlerWithClose(StreamHandler):
def close(self):
self.stream.close()
StreamHandler.close(self)
log_handler = DummyStreamHandlerWithClose(log_output)
self.l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def shut_down_logger(self):\n handlers = self.logger.handlers[:]\n for handler in handlers:\n handler.close()\n self.logger.removeHandler(handler)",
"def cleanup_handlers():\n # There's nothing to set up so we immediately yield control.\n yield\n # After the with bloc... | [
"0.8342594",
"0.7858853",
"0.7760076",
"0.76801807",
"0.7505274",
"0.7323176",
"0.72494674",
"0.71975136",
"0.7168344",
"0.713264",
"0.7111437",
"0.71074617",
"0.71000355",
"0.7083364",
"0.7004053",
"0.6990487",
"0.69856507",
"0.69312996",
"0.69280607",
"0.6893034",
"0.688986... | 0.7356662 | 5 |
This is a system test to check that handler.emit() reached windows event log. | def test_emit_system(self):
# Source name is static to know where to look at.
# We will use event_id and content to identity an emited log.
source_name = 'chevah-server-test-suite'
# Unique string/number are only unique inside a single test run.
# Since we interact with external ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_capture_handler_output(self):\n capture = CapturingHandler(logger=test_logger, name=__name__)\n messages = [\"first message\", \"this is a second message\"]\n test_logger.warning(messages[0])\n test_logger.info(messages[1])\n test_logger.removeHandler(hdlr=capture)\n ... | [
"0.63858867",
"0.63755894",
"0.6369425",
"0.6365748",
"0.6263252",
"0.62290394",
"0.62023056",
"0.6164636",
"0.6124555",
"0.6118028",
"0.61174655",
"0.6014555",
"0.5955072",
"0.59423465",
"0.5874538",
"0.58598334",
"0.5827416",
"0.5795965",
"0.57794744",
"0.5779396",
"0.57577... | 0.7440141 | 0 |
Return a dictionary of hyperparameters. | def get_hypers(self):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hyperparameters(self) -> Mapping[str, str]:\n return pulumi.get(self, \"hyperparameters\")",
"def hyperparams(self):\n return self._hyperparams",
"def hyperparameters(self) -> 'outputs.GoogleCloudMlV1__HyperparameterSpecResponse':\n return pulumi.get(self, \"hyperparameters\")",
"def... | [
"0.8059758",
"0.7923371",
"0.76595455",
"0.7543167",
"0.7185331",
"0.71254736",
"0.7115735",
"0.7109539",
"0.70974594",
"0.7087111",
"0.70348954",
"0.70121735",
"0.70092726",
"0.7007907",
"0.6989551",
"0.6989551",
"0.69804734",
"0.69435275",
"0.69181985",
"0.6914971",
"0.6887... | 0.0 | -1 |
Return a dict, where grids['hyper'] is a list of grid points for the binned hyperparameter distribution. This method is included in the interface since each GPM knows the valid values of its hypers, and may also use datadependent heuristics from X to create better grids. | def construct_hyper_grids(X, n_grid=20):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_hps(self) -> dict():\n return self._hyper_params",
"def generate_grid(self):\n\n options = dict(self.options)\n params = {}\n\n # Remove 'p' to hold as a constant in the paramater combinations\n p = options.pop(\"p\")\n params[\"p\"] = [p for _ in xrange(self.n_s... | [
"0.6260274",
"0.62058175",
"0.6161938",
"0.6109266",
"0.60671306",
"0.59766537",
"0.58281755",
"0.56806237",
"0.56691647",
"0.56363475",
"0.56363475",
"0.5498982",
"0.5492527",
"0.5486412",
"0.5474736",
"0.547075",
"0.54639786",
"0.5411577",
"0.53998035",
"0.53625554",
"0.532... | 0.64633185 | 0 |
Is the sampler collapsed? | def is_collapsed():
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_sample(self) -> bool:\n return self.check_is_sample()",
"def is_collapsed(node):\n marker = '({})'.format(node['label'][-1])\n text_without_marker = node['text'].replace(marker, '')\n return node['text'].strip() and not text_without_marker.strip()",
"def has_to_gather(self):\... | [
"0.5844537",
"0.5552839",
"0.55388486",
"0.5481644",
"0.54545397",
"0.5446192",
"0.5417137",
"0.5404601",
"0.53976786",
"0.53559405",
"0.5338655",
"0.5338655",
"0.5338655",
"0.53247947",
"0.5317883",
"0.53032696",
"0.52465403",
"0.5185618",
"0.51301044",
"0.5124413",
"0.51101... | 0.6460983 | 0 |
Get the current nibble. | def getcurrentnibbleid(self):
if self._status != RUNNING:
return None
else:
return self.getnibblebyid(self._currentnibbleid)._NAME | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_borrow_wire(self):\r\n return self.out.get_wire(1)",
"def Nibble():\n return BitsInteger(4)",
"def _get_bit_position(self):\n return self.__bit_position",
"def _get_bit_position(self):\n return self.__bit_position",
"def _get_bit_position(self):\n return self.__bit_position",
"... | [
"0.611633",
"0.59440273",
"0.5819298",
"0.5819298",
"0.5819298",
"0.5819298",
"0.5819298",
"0.5819298",
"0.5819298",
"0.5819298",
"0.5817851",
"0.5806795",
"0.580202",
"0.57530004",
"0.5738483",
"0.5716218",
"0.57145375",
"0.5701214",
"0.5678269",
"0.5655355",
"0.56319845",
... | 0.6628017 | 0 |
Sets the number of rounds the game should last. | def setrounds(self, number):
self._rounds = number | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setRounds(self, rounds):\n self.roundsToGo = rounds",
"def round_num(self, round_num: int):\n\n self._round_num = round_num",
"def number_of_winners(self, number_of_winners):\n\n self._number_of_winners = number_of_winners",
"def set_alg_rounds(self, t):\n self.alg_rounds = t"... | [
"0.74116164",
"0.6895427",
"0.6794711",
"0.67756206",
"0.653322",
"0.6378044",
"0.6332626",
"0.6167043",
"0.61279124",
"0.60996485",
"0.607623",
"0.6071907",
"0.59924453",
"0.59847",
"0.59592605",
"0.5943132",
"0.59157336",
"0.5902721",
"0.59003574",
"0.58970404",
"0.5864173"... | 0.835479 | 0 |
Get the dimension of the board. | def getworlddimensions(self):
return (self._board.getwidth(), self._board.getheight()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getdim(self):\n\n # 25 px vert buffer in between grids\n dim = (self.w() - 25) // 2\n \n if dim > self.h():\n dim = self.h()\n \n return dim",
"def size(self): \n\t\n\t\tx = self._myBoard.numRows()\n\t\t\n\t\treturn x",
"def get_dimension(self):\n ... | [
"0.7876762",
"0.78340095",
"0.76757526",
"0.75420696",
"0.75253564",
"0.7500588",
"0.7500588",
"0.7500588",
"0.7452613",
"0.7449136",
"0.7449136",
"0.7422794",
"0.74151844",
"0.7401913",
"0.7394244",
"0.7394244",
"0.7390154",
"0.7378527",
"0.73153996",
"0.73025554",
"0.723004... | 0.66544366 | 62 |
Place food on the baord randomly. The amount of food dropped is the number of nibbles self._foodpernibble. If food drops on a nibble the lucky one can eat at once. | def _dropfood(self):
for i in range(self._foodpernibble * len(self._nibblelist)):
rx = self._random.randint(0, self._board._width - 1)
ry = self._random.randint(0, self._board._height - 1)
# if a nibble is on the chosen location, feed it
token = self._board.gettok... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def spawn_food(self):\n if not self.food_spawned:\n xCoord = random.randint(1, self.grid_count - 1)\n yCoord = random.randint(1, self.grid_count - 1)\n self.food_pos = (xCoord, yCoord)\n if self.grid[xCoord][yCoord] == 0:\n self.grid[xCoord][yCoord]... | [
"0.696253",
"0.6918107",
"0.6884922",
"0.646027",
"0.64135605",
"0.6347388",
"0.6219035",
"0.6176862",
"0.609677",
"0.6090387",
"0.6063988",
"0.59798414",
"0.5912757",
"0.5893131",
"0.5879726",
"0.5877262",
"0.5837344",
"0.58261263",
"0.58231354",
"0.57983726",
"0.5773526",
... | 0.81978714 | 0 |
Iterator over (row, val) tuples for nonzero values in column col | def get_column(self, col):
for ii in range(self._X.indptr[col], self._X.indptr[col + 1]):
yield (self._X.indices[ii], self._X.data[ii]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nonzero(self):\n\n # convert to COOrdinate format\n A = self.tocoo()\n nz_mask = A.data != 0\n return (A.row[nz_mask], A.col[nz_mask])",
"def notzero(self,row=\".*\",col=[0]) :\n a=(row,col)\n ind,cols,lbl=self.select(*a)\n# print ind,cols,lbl\n a=array(cols).transpose... | [
"0.6618048",
"0.6450839",
"0.61575645",
"0.6148901",
"0.6098083",
"0.60646224",
"0.59949327",
"0.59384257",
"0.59267867",
"0.59067506",
"0.58822083",
"0.585931",
"0.57848644",
"0.5779927",
"0.576507",
"0.57477397",
"0.56743634",
"0.54620004",
"0.54507273",
"0.5450603",
"0.544... | 0.5300702 | 34 |
Sets label to max label in visible slice | def max_label(viewer, layer_name="annotations"):
label = viewer.layers[layer_name].data.max()
viewer.layers[layer_name].selected_label = label + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, maxLabelLength):\n super(PlayerPresenceLabel, self).__init__()\n setOpaque(True)\n setHorizontalAlignment(CENTER)\n setVerticalAlignment(CENTER)\n self.maxLabelLength = maxLabelLength",
"def find_max_label(loader):\n max_label = 0\n ... | [
"0.6239787",
"0.586124",
"0.585544",
"0.57395715",
"0.5735928",
"0.5641497",
"0.560708",
"0.5579444",
"0.5526018",
"0.55256224",
"0.5501598",
"0.5489932",
"0.5489932",
"0.5489932",
"0.5476389",
"0.54703283",
"0.54630184",
"0.5391625",
"0.5354868",
"0.53350914",
"0.53282964",
... | 0.75284046 | 0 |
Find a point on an arc spanned by three points. Given three points `p1`, `p2` and `p3` on a sphere with origin (0, 0, 0), find the coordinates of a `point` at a fraction `frac` of the overall distance on an arc spanning from `p1` over `p2` to `p3`. Given this assumption, for fractions of zero, `point` will equal `p1`; ... | def find_point_at_fraction(p1, p2, p3, frac):
# Unpack the point tuples
x1, y1, z1 = p1
x2, y2, z2 = p2
x3, y3, z3 = p3
# Using the cross product, find unit normal vector (xn, yn, zn)
# of the plane spanning the three points:
x12 = x2 - x1
y12 = y2 - y1
z12 = z2 - z1
x13 = x3 - ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def circle_through_points(p1, p2, p3):\n x1, y1, _ = p1\n x2, y2, _ = p2\n x3, y3, _ = p3\n\n A = x1 * (y2 - y3) - y1 * (x2 - x3) + x2 * y3 - x3 * y2\n B = (x1**2 + y1**2) * (y3 - y2) + (x2**2 + y2**2) * (y1 - y3) + (x3**2 + y3**2) * (y2 - y1)\n C = (x1**2 + y1**2) * (x2 - x3) + (x2**2 + y2**2) * (x3 - x1) +... | [
"0.6975656",
"0.678601",
"0.6544403",
"0.6132668",
"0.6068247",
"0.6052736",
"0.5906454",
"0.588591",
"0.58844197",
"0.5877126",
"0.5856438",
"0.57724255",
"0.57535946",
"0.57161593",
"0.5713876",
"0.5679003",
"0.56287307",
"0.5529693",
"0.5510987",
"0.549893",
"0.54695356",
... | 0.81775534 | 0 |
Get xyz coordinates from a pandas data frame. | def get_xyz(df, label):
# Check that all labels are present
for var in ["label", "x", "y", "z"]:
if var not in df.columns:
raise ValueError('df must contain a column "{}"'.format(var))
# Check we get exactly one row of data
subdf = df[df["label"] == label]
nrows = subdf.shape[0]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calc_xyz(df,range=None,azimuth=None,elevation=0.0,\n small_elevation_angles=False):\n\n try:\n r = df.index.get_level_values('range')\n except KeyError:\n assert (range is not None), 'need to specify constant value for `range`'\n r = range\n try:\n az = np.radi... | [
"0.68914443",
"0.6515309",
"0.6210157",
"0.6208376",
"0.6199526",
"0.61885816",
"0.6118256",
"0.6090002",
"0.6023867",
"0.60194135",
"0.60025775",
"0.59958136",
"0.5984989",
"0.5925723",
"0.5901433",
"0.58164054",
"0.5813696",
"0.58069646",
"0.5781152",
"0.5746166",
"0.571018... | 0.7464641 | 0 |
Closes the XML data file for the XML Exporter. | def close_xmlfile(self):
if self.xmlfile != 0:
self.xmlfile.close()
self.xmlfile = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def close(self):\r\n self.data_files.write()",
"def close(self):\n self.writer_zip.close()\n self.writer_date.close()",
"def closeFile():\r\n global datafile\r\n if datafile is not None:\r\n datafile.close()",
"def close( self ):\n self.oodocument.dispose()\n s... | [
"0.70128757",
"0.69288063",
"0.6853477",
"0.66862786",
"0.66719025",
"0.66719025",
"0.6598524",
"0.64620745",
"0.6458102",
"0.6458102",
"0.6458102",
"0.64029574",
"0.6398914",
"0.6380793",
"0.63748026",
"0.63675714",
"0.63675714",
"0.63675714",
"0.63675714",
"0.63662577",
"0.... | 0.75459856 | 0 |
Determines if stack frame contains any parameters or local variables. | def check_stack_frame(self, sframe):
n = sframe.memqty
for i in range(n):
member = sframe.get_member(i)
if member == None:
continue
mname = ida_struct.get_member_name(member.id)
if mname != None and len(mname) > 0:
if mname... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __is_frame_defined__(self, arg):\n\n if arg.frame == \"GF\":\n return True\n elif arg.frame == \"TF\" and self.temp_defined == True:\n return True\n elif arg.frame == \"LF\" and self.local_defined == True:\n return True\n else:\n return Fa... | [
"0.64897573",
"0.6405966",
"0.63710374",
"0.62416315",
"0.6219721",
"0.6156693",
"0.60561603",
"0.60363954",
"0.59963816",
"0.5948649",
"0.59458447",
"0.5912631",
"0.5875233",
"0.57704914",
"0.5765313",
"0.5758337",
"0.5723477",
"0.570431",
"0.56363994",
"0.5633552",
"0.56284... | 0.63303274 | 3 |
Returns a string representing the address. The representation is typically a hex string of the address, but may include a segment or space name prefixe based on the processor or architecture. | def get_address_string(self, addr):
temp = "0x%X" % (addr - ida_segment.get_segm_base(ida_segment.getseg(addr)))
space = self.get_space_name(addr)
if space != None:
temp = "%s:%04X" % (space,
addr - ida_segment.get_segm_base(ida_segment.getseg(addr)))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def addr_text(self):\n if isinstance(self.addr, str):\n return '.%s' % self.addr\n elif isinstance(self.addr, int):\n return '%s[%s]' % (self.name, self.addr)\n else:\n raise ValueError('Unknown addr type: %s' % type(self.target).__name__)",
"def address(self... | [
"0.73175097",
"0.7168455",
"0.7102137",
"0.6874893",
"0.67891985",
"0.67361736",
"0.6670569",
"0.66673625",
"0.66104716",
"0.6597458",
"0.658627",
"0.658627",
"0.658627",
"0.658627",
"0.658627",
"0.658627",
"0.658627",
"0.658627",
"0.658627",
"0.658627",
"0.658627",
"0.6528... | 0.8119239 | 0 |
Returns the symbol name for the address. | def get_symbol_name(self, ea):
name = ida_name.get_demangled_name(ea, DEMANGLED_FORM,
self.inf.demnames, idc.GN_STRICT)
if name == None or len(name) == 0 or name == "`string'":
name = idc.get_name(ea)
if name != None:
name = name.r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find_symbol_name(bv, addr):\n sym = bv.get_symbol_at(addr)\n if sym is not None:\n return sym.name\n return ''",
"def get_name_by_offset(self, addr):\n try:\n (name, disp) = self._symbols.GetNameByOffset(addr)\n name = \"%s+0x%x\" % (name.decode(), disp)\n except exc... | [
"0.7681565",
"0.75710696",
"0.7398782",
"0.7225242",
"0.7075321",
"0.7033387",
"0.69611245",
"0.68621933",
"0.6855949",
"0.6841922",
"0.6699349",
"0.66978264",
"0.6683413",
"0.6654689",
"0.6650356",
"0.6625993",
"0.65836287",
"0.65478784",
"0.65154433",
"0.64905494",
"0.64346... | 0.71741766 | 4 |
Returns true if instruction operand at address is an immediate value. | def is_imm_op(self, addr, op):
insn = ida_ua.insn_t()
ida_ua.decode_insn(insn, addr)
if (insn.ops[op].type == idc.o_imm):
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_atom(e):\n\n return e == NIL or type(e) == int or type(e) == str",
"def _is_scalar(e):\n\n # sympify to set proper attributes\n e = sympify(e)\n if isinstance(e, Expr):\n if (e.is_Integer or e.is_Float or\n e.is_Rational or e.is_Number or\n (e.is_Symbol and e.is_co... | [
"0.6102693",
"0.6087423",
"0.59526056",
"0.5726626",
"0.5554269",
"0.54274714",
"0.5387618",
"0.5302551",
"0.5293896",
"0.52599835",
"0.52580994",
"0.52453136",
"0.5232416",
"0.5220265",
"0.52141976",
"0.51962805",
"0.516718",
"0.5127292",
"0.51146764",
"0.51048785",
"0.50907... | 0.57140696 | 4 |
Outputs an attribute (name and value) for an element. | def write_attribute(self, name, value):
if name == None or value == None:
return
if (len(name) == 0) or (len(value) == 0):
return
attr = " " + name + '="' + self.check_for_entities(value) + '"'
self.write_to_xmlfile(attr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_attribute(self, element, attr):\n return element.get(attr)",
"def get_attribute(self, name):\n return self._safe_get_element_text('ItemAttributes.{}'.format(name))",
"def get_attribute(self, by, value, attribute):\n we = self.find_element(by, value)\n we.get_attribute(attrib... | [
"0.64533526",
"0.64461255",
"0.62207574",
"0.62174094",
"0.6178214",
"0.6152351",
"0.6124485",
"0.60702306",
"0.6010825",
"0.6009634",
"0.59869444",
"0.59869444",
"0.59756076",
"0.59472984",
"0.59414834",
"0.59394556",
"0.5936183",
"0.5914792",
"0.58948267",
"0.58712715",
"0.... | 0.6366096 | 2 |
Writes the XML Declarations at the start of the XML file. | def write_xml_declaration(self):
self.dbg("\n")
xml_declaration = "<?xml version=\"1.0\" standalone=\"yes\"?>"
xml_declaration += "\n<?program_dtd version=\"1\"?>\n"
self.write_to_xmlfile(xml_declaration) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def start(self):\n self._writer.startDocument()\n attrs = AttributesNSImpl({}, {})\n self._writer.startElementNS((None, self._root), self._root, attrs)",
"def header(f):\n f.write(\"<?xml version='1.0' encoding='UTF-8'?>\\n\")\n f.write(\"<?xml-stylesheet href='xml-output.css' type='te... | [
"0.6659532",
"0.63768846",
"0.6011089",
"0.584006",
"0.57557654",
"0.563289",
"0.56080204",
"0.54624623",
"0.5435227",
"0.54062563",
"0.5338306",
"0.529857",
"0.52798617",
"0.52569944",
"0.52256423",
"0.5212186",
"0.5201383",
"0.51848614",
"0.51232946",
"0.5102511",
"0.509248... | 0.7329415 | 0 |
Returns the flags bitmask for the datatype. | def get_datatype_flags(self, datatype, size):
if datatype.lower().startswith("byte"): return ida_bytes.byte_flag()
if datatype.lower().startswith("word"): return ida_bytes.word_flag()
if datatype.lower().startswith("dword"): return ida_bytes.dword_flag()
if datatype.lower().st... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def flags(self):\r\n flags = ct.c_uint()\r\n dll.kvaDbGetFlags(self._handle, ct.byref(flags))\r\n return flags.value",
"def Flags(self):\n if self.force_auto_sync:\n self.get('Flags')\n return self._Flags",
"def _get_flags(self):\n flags = self.get_option('f... | [
"0.68042135",
"0.66645175",
"0.66410005",
"0.6616757",
"0.6585469",
"0.65452737",
"0.6526955",
"0.6526955",
"0.6522965",
"0.6501039",
"0.63915616",
"0.63875115",
"0.61711943",
"0.6109612",
"0.61040163",
"0.60856855",
"0.6002288",
"0.5961514",
"0.5946307",
"0.59123373",
"0.590... | 0.75084656 | 0 |
Returns true if the datatype represents a string type. | def is_string_type(self, datatype):
if datatype.lower().startswith("unicode"): return True
if datatype.lower().startswith("string"): return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_string(self):\n return self._tag == 'string'",
"def value_is_string(value) -> bool:\n return isinstance(value, str)",
"def is_string(obj):\n return type(obj) in types.StringTypes",
"def isStringType(parameter):\n\n return (type(parameter) in StringTypes)",
"def _is_string(self, v... | [
"0.8015449",
"0.7976146",
"0.7875269",
"0.7798255",
"0.775129",
"0.7637953",
"0.7620248",
"0.75579816",
"0.74968857",
"0.73446566",
"0.7280308",
"0.72678655",
"0.723073",
"0.71825767",
"0.71675575",
"0.7134433",
"0.7126822",
"0.70986706",
"0.70408297",
"0.7023079",
"0.6991739... | 0.9166643 | 0 |
Creates a member for a structure. | def import_member(self, member, sptr, defer=True):
offset = self.get_attribute_value(member, OFFSET)
datatype = self.get_attribute(member, DATATYPE)
if self.has_attribute(member, DATATYPE_NAMESPACE):
dt_namespace = self.get_attribute(member, DATATYPE_NAMESPACE)
name = ''
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def addMember(self, variable):\n variable.setParent(self)\n self.members[variable.getName()] = variable\n self.isStruct = True",
"def make_struct(name, schema):\n return _StructMetaclass(name, (Struct,), schema)",
"def build_struct(self, object, definition):\r\n for member in def... | [
"0.6405611",
"0.5808044",
"0.57886744",
"0.573997",
"0.5700821",
"0.5692536",
"0.5584277",
"0.5566589",
"0.5556303",
"0.55528474",
"0.5549871",
"0.55302924",
"0.55290234",
"0.5525184",
"0.5520253",
"0.5498583",
"0.54962087",
"0.54962087",
"0.54962087",
"0.54962087",
"0.549620... | 0.50995857 | 66 |
Ry = [[cosX, 0, sinX], [0, 1, 0], beta pitch [sinX, 0, cosX]] | def func_matrix_rotation_Ry(beta):
c = math.cos(beta)
s = math.sin(beta)
return [[c,0,s],[0,1,0],[-s,0,c]] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rot_y(beta):\n if not torch.is_tensor(beta):\n beta = torch.tensor(beta, dtype=torch.get_default_dtype())\n return beta.new_tensor([\n [beta.cos(), 0, beta.sin()],\n [0, 1, 0],\n [-beta.sin(), 0, beta.cos()]\n ])",
"def rotation_phi_beta(x, y, z, phi_deg, beta_deg, scale)... | [
"0.68225944",
"0.67461294",
"0.6551456",
"0.63876665",
"0.6248054",
"0.5863126",
"0.5849501",
"0.5846118",
"0.58142877",
"0.5812253",
"0.5787098",
"0.5773336",
"0.57461774",
"0.5735801",
"0.5667841",
"0.56650555",
"0.56519043",
"0.56519043",
"0.5638717",
"0.55859333",
"0.5575... | 0.7380328 | 0 |
Compares two ndarray objects | def compare_ndarrays(diff_ctx, array0, array1, keys):
if isinstance(array0, list):
array0 = {"data": array0}
if isinstance(array1, list):
array1 = {"data": array1}
ignore_keys = {"source", "data"}
compare_dicts(diff_ctx, array0, array1, keys, ignore_keys)
differences = []
for f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return np.allclose(self._arr, other.data())",
"def _arr_eq(self, arr1, arr2):\n self.assertEqual(np.abs(arr1 - arr2).sum(), 0)",
"def compareArrays(arr1, arr2):\n def _compareArrays(xarr1, xarr2):\n assert xarr1.shape == xarr2.shape\n for idx in range(l... | [
"0.72510785",
"0.7189082",
"0.6834571",
"0.6827956",
"0.67170954",
"0.6602954",
"0.646879",
"0.6466689",
"0.641991",
"0.63996285",
"0.6365073",
"0.6288545",
"0.62744594",
"0.6249164",
"0.6243594",
"0.6214074",
"0.6208292",
"0.6205907",
"0.6196329",
"0.6141429",
"0.6140905",
... | 0.6976459 | 2 |
Returns True if both inputs correspond to ndarrays, False otherwise | def both_are_ndarrays(tree0, tree1):
if not (isinstance(tree0, Tagged) and isinstance(tree1, Tagged)):
return False
if not (NDARRAY_TAG in tree0._tag and NDARRAY_TAG in tree1._tag):
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sameDims(arr1, arr2):\n if arr1.ndim != arr2.ndim:\n return False\n\n for d1,d2 in zip(arr1.shape, arr2.shape):\n if d1 != d2:\n return False\n\n return True",
"def is_ndarray(data_to_check):\n flag = False\n if isinstance(data_to_check, np.ndarray):\n flag = Tr... | [
"0.7188756",
"0.70578766",
"0.6861822",
"0.6683089",
"0.66233146",
"0.65877044",
"0.6579938",
"0.6579296",
"0.6498129",
"0.64945817",
"0.6490339",
"0.6468621",
"0.64211696",
"0.6343892",
"0.6316476",
"0.6295857",
"0.62777",
"0.62757427",
"0.6264216",
"0.62564987",
"0.6221128"... | 0.7714467 | 0 |
If we have a completed cached value, return it. | def get_immediate(
self, key: KT, default: T, update_metrics: bool = True
) -> Union[VT, T]:
return self.cache.get(key, default, update_metrics=update_metrics) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_cached_value(self):\n if not self.cache_ttl or not self.redis.exists(self._cache_key):\n return None\n else:\n return self.redis.get(self._cache_key).decode()",
"def get(self):\n if not self.has_expired() and self._cached_copy is not None:\n return se... | [
"0.73085845",
"0.7101148",
"0.66822845",
"0.66540414",
"0.66450286",
"0.6581506",
"0.65649444",
"0.6549046",
"0.65338767",
"0.65338767",
"0.6500757",
"0.6496718",
"0.64054745",
"0.63803315",
"0.6372593",
"0.63627297",
"0.63602877",
"0.629506",
"0.6286786",
"0.62702626",
"0.62... | 0.56441784 | 84 |
Returns the dict as a model | def from_dict(cls, dikt) -> 'ComAdobeCqWcmStyleInternalComponentStyleInfoCacheImplProperties':
return util.deserialize_model(dikt, cls) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_dict(cls, dikt) -> 'Model':\n return util.deserialize_model(dikt, cls)",
"def from_dict(cls, dikt) -> 'ModelOutput':\n return util.deserialize_model(dikt, cls)",
"def from_dict(cls, dikt) -> 'ModelStat':\n return util.deserialize_model(dikt, cls)",
"def from_dict(cls, dikt):\n ... | [
"0.73100865",
"0.7226481",
"0.68927467",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67725724",
"0.67388964",
"0.66993856",
"0.6698291",
"0.6698291",
"0.6698291",
"0.6650225",
"... | 0.0 | -1 |
Sets the size of this ComAdobeCqWcmStyleInternalComponentStyleInfoCacheImplProperties. | def size(self, size: ConfigNodePropertyInteger):
self._size = size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_size(self, size):\n pass",
"def size(self, size):\n self._size = size",
"def size(self, size):\n\n self._size = size",
"def size(self, size):\n\n self._size = size",
"def size(self, size):\n\n self._size = size",
"def size(self, size):\n\n self._size = si... | [
"0.5715951",
"0.56146604",
"0.5567449",
"0.5567449",
"0.5567449",
"0.5567449",
"0.5567449",
"0.5567449",
"0.5567449",
"0.5567449",
"0.54586303",
"0.54585147",
"0.54559344",
"0.5439289",
"0.53972554",
"0.5327788",
"0.53248227",
"0.53101885",
"0.52868086",
"0.51350945",
"0.5119... | 0.5784811 | 0 |
Strips name from an Email header | def find_name(x):
email= find_email(x)
x = x.replace(email, '')
x = re.sub('[!@#$<>"]', '', x)
return x.strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def scrape_email_for_name(mail_body):\n body = mail_body.split(\"\\r\\n\")\n name_line = body[1].split(' ')[1:]\n return name_line[0].lower(), name_line[-1].lower() # Firstname, Lastname",
"def cleanup(header):\n parts = email.header.decode_header(header)\n full = \" \".join(part if (enc is None) ... | [
"0.70846504",
"0.70458627",
"0.6741598",
"0.6545705",
"0.6537981",
"0.64789176",
"0.639265",
"0.6384617",
"0.63660985",
"0.62648463",
"0.62192875",
"0.6191891",
"0.61375654",
"0.6083929",
"0.60752213",
"0.6073341",
"0.6071519",
"0.60584205",
"0.6051768",
"0.60278684",
"0.6012... | 0.7094559 | 0 |
Gets the account_moid of this VnicFcAdapterPolicy. The Account ID for this managed object. | def account_moid(self):
return self._account_moid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def account_id(self):\n return self._account_id",
"def account_id(self):\n return self._account_id",
"def account_id(self) -> pulumi.Output[int]:\n return pulumi.get(self, \"account_id\")",
"def account_number(self):\n return self.__account_number",
"def account_no(self):\n ... | [
"0.62222236",
"0.62222236",
"0.61850554",
"0.61797816",
"0.61733186",
"0.61089176",
"0.6084379",
"0.6084379",
"0.6084379",
"0.6084379",
"0.5934314",
"0.5934314",
"0.5934314",
"0.5934314",
"0.5787793",
"0.5766643",
"0.576337",
"0.576337",
"0.576337",
"0.576337",
"0.576337",
... | 0.77251637 | 3 |
Gets the create_time of this VnicFcAdapterPolicy. The time when this managed object was created. | def create_time(self):
return self._create_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_create_time(self):\n return self._ctime",
"def creation_time(self):\n\n return self._creation_time.value",
"def creation_date_time(self):\n return self._creation_date_time",
"def time_of_creation(self):\n return self._time_of_creation",
"def creation_time(self) -> str:\n... | [
"0.7829141",
"0.7704421",
"0.7690286",
"0.7600687",
"0.7565061",
"0.7565061",
"0.7565061",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75395125",
"0.75049704",
"0.... | 0.8038378 | 3 |
Sets the create_time of this VnicFcAdapterPolicy. The time when this managed object was created. | def create_time(self, create_time):
self._create_time = create_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def creation_time(self, creation_time):\n\n self._creation_time = creation_time",
"def creation_date_time(self, creation_date_time):\n self._creation_date_time = creation_date_time",
"def time_of_creation(self, time_of_creation):\n \n self._time_of_creation = time_of_creation",
"d... | [
"0.7090065",
"0.69362664",
"0.6758327",
"0.6746303",
"0.66275597",
"0.6597471",
"0.6597471",
"0.6597471",
"0.6597471",
"0.6443153",
"0.6443153",
"0.60921764",
"0.5902336",
"0.5902336",
"0.5872905",
"0.5872905",
"0.5872905",
"0.5872905",
"0.5872905",
"0.58656347",
"0.5863269",... | 0.7416308 | 6 |
Gets the domain_group_moid of this VnicFcAdapterPolicy. The DomainGroup ID for this managed object. | def domain_group_moid(self):
return self._domain_group_moid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def domain_group(self):\n return self._domain_group",
"def group_id(self):\n return self._group_id",
"def group_id(self) -> str:\n return pulumi.get(self, \"group_id\")",
"def group_id(self) -> str:\n return pulumi.get(self, \"group_id\")",
"def semantic_group_id(self):\n ... | [
"0.71545434",
"0.6369722",
"0.6330751",
"0.6330751",
"0.62819654",
"0.6222647",
"0.6217587",
"0.61946595",
"0.61946595",
"0.61946595",
"0.61946595",
"0.6121279",
"0.61114436",
"0.6089082",
"0.60380715",
"0.6019645",
"0.5977002",
"0.59439677",
"0.59198433",
"0.59198433",
"0.59... | 0.7878607 | 3 |
Sets the domain_group_moid of this VnicFcAdapterPolicy. The DomainGroup ID for this managed object. | def domain_group_moid(self, domain_group_moid):
self._domain_group_moid = domain_group_moid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def domain_group(self, domain_group):\n\n self._domain_group = domain_group",
"def domain_group(self, domain_group):\n\n self._domain_group = domain_group",
"def domain_group_moid(self):\n return self._domain_group_moid",
"def domain_group_moid(self):\n return self._domain_group_m... | [
"0.68297535",
"0.68297535",
"0.6600311",
"0.6600311",
"0.6600311",
"0.6600311",
"0.59294087",
"0.5866019",
"0.5671655",
"0.566095",
"0.5597172",
"0.55860925",
"0.54894614",
"0.54894614",
"0.54894614",
"0.54894614",
"0.5406718",
"0.53877944",
"0.5331001",
"0.5226629",
"0.51529... | 0.7956324 | 3 |
Sets the mod_time of this VnicFcAdapterPolicy. The time when this managed object was last modified. | def mod_time(self, mod_time):
self._mod_time = mod_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def modification_date_time(self, modification_date_time):\n self._modification_date_time = modification_date_time",
"def modified_time(self, modified_time: float):\n\n self._modified_time = modified_time",
"def mod_time(self):\n return self._mod_time",
"def mod_time(self):\n retur... | [
"0.6827481",
"0.6639533",
"0.65168625",
"0.65168625",
"0.65168625",
"0.65168625",
"0.6219314",
"0.58310175",
"0.57986516",
"0.57107097",
"0.5576674",
"0.5570646",
"0.5514991",
"0.5482073",
"0.5473786",
"0.54716283",
"0.54480445",
"0.5445581",
"0.54279053",
"0.54266",
"0.53887... | 0.7755411 | 3 |
Gets the moid of this VnicFcAdapterPolicy. The unique identifier of this Managed Object instance. | def moid(self):
return self._moid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vmMOID_calculator(self):\r\n\r\n return self.vm_obj._moId",
"def hostMOID_calculator(self):\r\n\r\n return self.vm_obj.runtime.host._moId",
"def notificationid(self):\n if not \"notificationid\" in self.model:\n return \"org.openmediavault.%s\" % self.id\n return self... | [
"0.65344507",
"0.6189719",
"0.59716105",
"0.5967752",
"0.587068",
"0.58548754",
"0.58517534",
"0.58506614",
"0.5821772",
"0.58159643",
"0.58159643",
"0.5814798",
"0.5814798",
"0.5813474",
"0.5803254",
"0.5794957",
"0.57830316",
"0.57830316",
"0.57830316",
"0.5759872",
"0.5712... | 0.0 | -1 |
Sets the moid of this VnicFcAdapterPolicy. The unique identifier of this Managed Object instance. | def moid(self, moid):
self._moid = moid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_id(self, idem):\n self.__id = idem",
"def set_vm_id(self, vm_id):\n self.vm_id = vm_id",
"def _set_modeid(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name=\"modeid\", parent=self, p... | [
"0.5553852",
"0.5392622",
"0.5260846",
"0.5244543",
"0.5225703",
"0.5177555",
"0.5104384",
"0.50537413",
"0.50488365",
"0.5023687",
"0.501506",
"0.5006701",
"0.5006062",
"0.49538204",
"0.49500963",
"0.49206138",
"0.48896816",
"0.48819795",
"0.48755616",
"0.48700303",
"0.48591... | 0.63851047 | 3 |
Gets the object_type of this VnicFcAdapterPolicy. The fullyqualified type of this managed object, i.e. the class name. This property is optional. The ObjectType is implied from the URL path. If specified, the value of objectType must match the class name specified in the URL path. | def object_type(self):
return self._object_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def type(self):\n return self._object_type",
"def object_type(self, object_type):\n if self.local_vars_configuration.client_side_validation and object_type is None: # noqa: E501\n raise ValueError(\"Invalid value for `object_type`, must not be `None`\") # noqa: E501\n allowed_va... | [
"0.6981538",
"0.65139943",
"0.6496305",
"0.6429223",
"0.6372542",
"0.62731767",
"0.60237306",
"0.59160274",
"0.59160274",
"0.5867198",
"0.58217525",
"0.5775677",
"0.5765545",
"0.57574457",
"0.5726857",
"0.57254285",
"0.5715658",
"0.5675358",
"0.5662407",
"0.5662407",
"0.56617... | 0.7317083 | 7 |
Sets the owners of this VnicFcAdapterPolicy. The array of owners which represent effective ownership of this object. | def owners(self, owners):
self._owners = owners | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def new_cargo_owners(self):\n\n self.cargo_owners = []\n for iterator in range(self.nr_cargo_owners):\n cargo_owner = CargoOwner(iterator)\n self.cargo_owners.append(cargo_owner)",
"def assign_requester_as_an_owner(cls, instances, requester, **kwargs):\n for instance in... | [
"0.60800666",
"0.60486096",
"0.6003202",
"0.5794706",
"0.57097757",
"0.5604212",
"0.5604212",
"0.5604212",
"0.5604212",
"0.5499384",
"0.53680354",
"0.535309",
"0.53469616",
"0.53469616",
"0.53469616",
"0.53469616",
"0.53469616",
"0.53469616",
"0.53469616",
"0.53469616",
"0.53... | 0.76166385 | 3 |
Gets the shared_scope of this VnicFcAdapterPolicy. Intersight provides prebuilt workflows, tasks and policies to end users through global catalogs. Objects that are made available through global catalogs are said to have a 'shared' ownership. Shared objects are either made globally available to all end users or restric... | def shared_scope(self):
return self._shared_scope | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def shared_by(self):\n if \"sharedBy\" in self._prop_dict:\n if isinstance(self._prop_dict[\"sharedBy\"], OneDriveObjectBase):\n return self._prop_dict[\"sharedBy\"]\n else :\n self._prop_dict[\"sharedBy\"] = IdentitySet(self._prop_dict[\"sharedBy\"])\n ... | [
"0.6285353",
"0.6250253",
"0.5782811",
"0.5782811",
"0.5782811",
"0.5782811",
"0.5740067",
"0.5715922",
"0.5688349",
"0.5605922",
"0.5605922",
"0.55602986",
"0.5452661",
"0.5436433",
"0.54319304",
"0.54319304",
"0.54319304",
"0.54319304",
"0.54319304",
"0.5405973",
"0.5365668... | 0.7252654 | 3 |
Sets the shared_scope of this VnicFcAdapterPolicy. Intersight provides prebuilt workflows, tasks and policies to end users through global catalogs. Objects that are made available through global catalogs are said to have a 'shared' ownership. Shared objects are either made globally available to all end users or restric... | def shared_scope(self, shared_scope):
self._shared_scope = shared_scope | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def shared_scope(self):\n return self._shared_scope",
"def shared_scope(self):\n return self._shared_scope",
"def shared_scope(self):\n return self._shared_scope",
"def shared_scope(self):\n return self._shared_scope",
"def shared(self, shared):\n\n self._shared = shared"... | [
"0.5832526",
"0.5832526",
"0.5832526",
"0.5832526",
"0.5829142",
"0.5829142",
"0.5829142",
"0.56965816",
"0.56540906",
"0.5645257",
"0.5570031",
"0.53945756",
"0.5305219",
"0.5296663",
"0.5296518",
"0.5236038",
"0.5188668",
"0.5168783",
"0.5168783",
"0.5168783",
"0.5168783",
... | 0.7639403 | 3 |
Gets the ancestors of this VnicFcAdapterPolicy. The array containing the MO references of the ancestors in the object containment hierarchy. | def ancestors(self):
return self._ancestors | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_ancestors(self):\n ancestors = []\n obj = self\n while obj and obj.parent is not None:\n temp = obj.parent.get_content_object()\n ancestors.append(temp)\n obj = obj.parent\n\n return ancestors",
"def get_ancestors(self):\n ancestors = []... | [
"0.7769057",
"0.74464643",
"0.7388999",
"0.68549186",
"0.66641444",
"0.6598934",
"0.6531304",
"0.6501486",
"0.63873345",
"0.6354569",
"0.6333515",
"0.62973154",
"0.6290389",
"0.62854505",
"0.6201401",
"0.61941797",
"0.6168269",
"0.6168269",
"0.6147782",
"0.6126634",
"0.611450... | 0.72705734 | 6 |
Sets the ancestors of this VnicFcAdapterPolicy. The array containing the MO references of the ancestors in the object containment hierarchy. | def ancestors(self, ancestors):
self._ancestors = ancestors | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ancestors(self):\n \n pass",
"def get_ancestors(self):\n ancestors = []\n obj = self\n while obj and obj.parent is not None:\n temp = obj.parent.get_content_object()\n ancestors.append(temp)\n obj = obj.parent\n\n return ancestors",
"de... | [
"0.62133735",
"0.60735303",
"0.5990909",
"0.5847626",
"0.5847626",
"0.5847626",
"0.5847626",
"0.5837733",
"0.56521785",
"0.5610779",
"0.56069136",
"0.5425555",
"0.5309916",
"0.52948296",
"0.5287327",
"0.52613264",
"0.5229553",
"0.5223829",
"0.5171928",
"0.51702225",
"0.514824... | 0.68389815 | 3 |
Gets the permission_resources of this VnicFcAdapterPolicy. A slice of all permission resources (organizations) associated with this object. Permission ties resources and its associated roles/privileges. These resources which can be specified in a permission is PermissionResource. Currently only organizations can be spe... | def permission_resources(self):
return self._permission_resources | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def permissions(self) -> PermissionList:\n return list(self.permission)",
"def permissions(self):\n return Permission.objects.distinct().filter(\n Q(role_permissions__role__in=self.roles)\n ).order_by('id')",
"def get_permissions(self):\n return [permission() for permissi... | [
"0.6827865",
"0.666716",
"0.64357895",
"0.63291377",
"0.63185906",
"0.62880105",
"0.62668246",
"0.62636465",
"0.62426114",
"0.6242552",
"0.6196247",
"0.61900973",
"0.6107951",
"0.6092231",
"0.60774976",
"0.60738444",
"0.60738444",
"0.60738444",
"0.60738444",
"0.6057007",
"0.6... | 0.7774297 | 3 |
Sets the permission_resources of this VnicFcAdapterPolicy. A slice of all permission resources (organizations) associated with this object. Permission ties resources and its associated roles/privileges. These resources which can be specified in a permission is PermissionResource. Currently only organizations can be spe... | def permission_resources(self, permission_resources):
self._permission_resources = permission_resources | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def permissions(self, permissions):\n\n self._permissions = permissions",
"def authorization_permissions(self, authorization_permissions):\n\n self._authorization_permissions = authorization_permissions",
"def permission_resources(self):\n return self._permission_resources",
"def permiss... | [
"0.63584274",
"0.6289751",
"0.62804",
"0.62804",
"0.62804",
"0.62804",
"0.6098809",
"0.5782513",
"0.57654107",
"0.5660968",
"0.56571734",
"0.56537336",
"0.565371",
"0.5641186",
"0.5633654",
"0.5623444",
"0.56197834",
"0.5613878",
"0.5529288",
"0.53878516",
"0.5360779",
"0.5... | 0.81995136 | 3 |
Gets the description of this VnicFcAdapterPolicy. Description of the policy. | def description(self):
return self._description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def policy_description(self):\n return self.properties.get(\"PolicyDescription\", None)",
"def getDescription(self):\n return self.__description",
"def getDescription(self):\n return self.__description",
"def description(self):\n\n return self.descriptor.get('description', u'')",
... | [
"0.79000616",
"0.6700635",
"0.6700635",
"0.6655874",
"0.66508865",
"0.6588009",
"0.65794235",
"0.65702695",
"0.6568838",
"0.65409267",
"0.65409267",
"0.65409267",
"0.65409267",
"0.65409267",
"0.65405077",
"0.6494054",
"0.6490251",
"0.6490251",
"0.6490251",
"0.6490251",
"0.649... | 0.644745 | 85 |
Sets the description of this VnicFcAdapterPolicy. Description of the policy. | def description(self, description):
self._description = description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_description(self, description):\n\t\tself.description = description",
"def set_description(self, description):\n self.description = description",
"def set_description(self, description):\n self.description = description",
"def set_description(self, description):\n self._descripti... | [
"0.6983087",
"0.6980021",
"0.6980021",
"0.6955408",
"0.6953252",
"0.6856032",
"0.6808462",
"0.67988676",
"0.6797152",
"0.6797152",
"0.6797152",
"0.6797152",
"0.6797152",
"0.6797152",
"0.6797152",
"0.6790783",
"0.6775693",
"0.67285794",
"0.6727353",
"0.66900533",
"0.66900533",... | 0.67641634 | 63 |
Sets the name of this VnicFcAdapterPolicy. Name of the concrete policy. | def name(self, name):
self._name = name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_policyname(self, policyname):\n self.options['policyname'] = policyname",
"def policyname(self, policyname) :\n\t\ttry :\n\t\t\tself._policyname = policyname\n\t\texcept Exception as e:\n\t\t\traise e",
"def set_name(self, name=''):\n self._name = name",
"def set_name(self, name):\n ... | [
"0.728806",
"0.6809529",
"0.6777732",
"0.67184055",
"0.6702238",
"0.6702238",
"0.6702238",
"0.6702238",
"0.6702238",
"0.6701698",
"0.6701698",
"0.6701698",
"0.6701698",
"0.6701698",
"0.6701698",
"0.66226906",
"0.6608808",
"0.6561344",
"0.6531369",
"0.6528586",
"0.6496209",
... | 0.0 | -1 |
Gets the error_recovery_settings of this VnicFcAdapterPolicy. Fibre Channel Error Recovery Settings. | def error_recovery_settings(self):
return self._error_recovery_settings | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def error_recovery_settings(self, error_recovery_settings):\n\n self._error_recovery_settings = error_recovery_settings",
"def fc_settings(self):\n return self._fc_settings",
"def error_config(self):\n if self.type == 'ANL':\n return self.parser.parse_analyze_error_config()\n ... | [
"0.6271301",
"0.54315037",
"0.528429",
"0.52799267",
"0.5270547",
"0.52685106",
"0.526507",
"0.52569264",
"0.5189335",
"0.51477945",
"0.5146776",
"0.51225984",
"0.51177293",
"0.50771606",
"0.5051539",
"0.5040912",
"0.5030395",
"0.49758834",
"0.49343646",
"0.49165252",
"0.4905... | 0.7945375 | 0 |
Sets the error_recovery_settings of this VnicFcAdapterPolicy. Fibre Channel Error Recovery Settings. | def error_recovery_settings(self, error_recovery_settings):
self._error_recovery_settings = error_recovery_settings | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def error_recovery_settings(self):\n return self._error_recovery_settings",
"def _set_recovery_flag(cls, flag=False):\n cls._recovery_flag = flag",
"def _set_error(self, error: Exception) -> None:\n self._reader_status = ReaderStatus.FAILED\n self._inner_exception = error\n l... | [
"0.61302435",
"0.53828245",
"0.51958036",
"0.50986797",
"0.50838864",
"0.49829057",
"0.49759442",
"0.4951374",
"0.49384373",
"0.4937999",
"0.4928492",
"0.49064776",
"0.48596302",
"0.48582062",
"0.46799648",
"0.46490434",
"0.46336114",
"0.46286234",
"0.4616081",
"0.46112895",
... | 0.78919905 | 0 |
Gets the io_throttle_count of this VnicFcAdapterPolicy. The maximum number of data or control I/O operations that can be pending for the virtual interface at one time. If this value is exceeded, the additional I/O operations wait in the queue until the number of pending I/O operations decreases and the additional opera... | def io_throttle_count(self):
return self._io_throttle_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def io_throttle_count(self, io_throttle_count):\n\n self._io_throttle_count = io_throttle_count",
"def throttle(self):\n return int(self.backing[\"throttle\"])",
"def app_rate_limit_count(self):\n return self._app_rate_limit_count",
"def increase_kernel_aio_value(self):\n path = \... | [
"0.6383108",
"0.5828085",
"0.55917996",
"0.5442848",
"0.54298455",
"0.5312475",
"0.5294472",
"0.52919173",
"0.52919173",
"0.52840716",
"0.5273699",
"0.5255937",
"0.52528894",
"0.5149967",
"0.5138064",
"0.5133064",
"0.5115455",
"0.5114044",
"0.50920385",
"0.5086502",
"0.508246... | 0.7772764 | 0 |
Gets the lun_count of this VnicFcAdapterPolicy. The maximum number of LUNs that the Fibre Channel driver will export or show. The maximum number of LUNs is usually controlled by the operating system running on the server. | def lun_count(self):
return self._lun_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def max_count(self) -> int:\n return pulumi.get(self, \"max_count\")",
"def list_file_volume_limit(self):\n return self.get_volume_count_limits()",
"def max_entries(self) -> pulumi.Output[int]:\n return pulumi.get(self, \"max_entries\")",
"def max_count(self) -> Optional[int]:\n r... | [
"0.6093009",
"0.5836794",
"0.5826008",
"0.5800447",
"0.5773394",
"0.57406956",
"0.5705376",
"0.56280386",
"0.5626368",
"0.5601613",
"0.55834025",
"0.5583002",
"0.5556354",
"0.5541062",
"0.5538614",
"0.54943025",
"0.54943025",
"0.5490722",
"0.5488473",
"0.5482425",
"0.5478307"... | 0.757461 | 0 |
Gets the lun_queue_depth of this VnicFcAdapterPolicy. The number of commands that the HBA can send and receive in a single transmission per LUN. | def lun_queue_depth(self):
return self._lun_queue_depth | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pqtotqueuedepth(self) :\n\t\ttry :\n\t\t\treturn self._pqtotqueuedepth\n\t\texcept Exception as e:\n\t\t\traise e",
"def _get_queue_length(self):\n halt_N = traci.edge.getLastStepHaltingNumber(\"N2TL\")\n halt_S = traci.edge.getLastStepHaltingNumber(\"S2TL\")\n halt_E = traci.edge.getLas... | [
"0.69399035",
"0.6845454",
"0.6628603",
"0.62627923",
"0.6261412",
"0.6154928",
"0.61152536",
"0.602398",
"0.598926",
"0.5890229",
"0.5877525",
"0.5826954",
"0.5789162",
"0.57815534",
"0.57381773",
"0.5705341",
"0.5690896",
"0.5467934",
"0.5467934",
"0.54408526",
"0.5432334",... | 0.8382344 | 0 |
Sets the lun_queue_depth of this VnicFcAdapterPolicy. The number of commands that the HBA can send and receive in a single transmission per LUN. | def lun_queue_depth(self, lun_queue_depth):
self._lun_queue_depth = lun_queue_depth | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lun_queue_depth(self):\n return self._lun_queue_depth",
"def output_queue_depth(self, output_queue_depth):\n\n self._output_queue_depth = output_queue_depth",
"def input_queue_max_depth(self, input_queue_max_depth):\n\n self._input_queue_max_depth = input_queue_max_depth",
"def lun_c... | [
"0.69796616",
"0.58268994",
"0.5710336",
"0.5306202",
"0.5017911",
"0.49285606",
"0.47555283",
"0.47501263",
"0.47427833",
"0.47001135",
"0.46763676",
"0.4670407",
"0.46697348",
"0.46415734",
"0.4605633",
"0.46051705",
"0.45614368",
"0.45542306",
"0.45532277",
"0.4548996",
"0... | 0.84311414 | 0 |
Gets the plogi_settings of this VnicFcAdapterPolicy. Fibre Channel Plogi Settings. | def plogi_settings(self):
return self._plogi_settings | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def flogi_settings(self):\n return self._flogi_settings",
"def plogi_settings(self, plogi_settings):\n\n self._plogi_settings = plogi_settings",
"def fc_settings(self):\n return self._fc_settings",
"def flogi_settings(self, flogi_settings):\n\n self._flogi_settings = flogi_setting... | [
"0.7732276",
"0.61482185",
"0.58195376",
"0.5716512",
"0.550641",
"0.54011977",
"0.5323806",
"0.53237605",
"0.53118956",
"0.5302165",
"0.5238787",
"0.5231079",
"0.51957035",
"0.5195667",
"0.5190494",
"0.5185904",
"0.5082495",
"0.50670874",
"0.5039604",
"0.5029584",
"0.5029399... | 0.81307787 | 0 |
Gets the resource_allocation_timeout of this VnicFcAdapterPolicy. Resource Allocation Timeout, also referred to as RATOV, is the number of milliseconds to wait before the system assumes that a resource cannot be properly allocated. | def resource_allocation_timeout(self):
return self._resource_allocation_timeout | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_resource_timeout(self):\n return self.web_page.resource_timeout",
"def resource_create_timeout(self):\n return int(self.get(\"resource_create_timeout\", 7))",
"def resource_get_timeout(self):\n return int(self.get(\"resource_get_timeout\", 7))",
"def resource_update_timeout(self)... | [
"0.66281223",
"0.652418",
"0.64758646",
"0.63175964",
"0.62933856",
"0.6243649",
"0.61209947",
"0.5644159",
"0.56244797",
"0.56244797",
"0.54923856",
"0.54886883",
"0.53689706",
"0.5326461",
"0.5291763",
"0.52735966",
"0.52639955",
"0.5231377",
"0.52061605",
"0.5189929",
"0.5... | 0.7986336 | 0 |
Sets the resource_allocation_timeout of this VnicFcAdapterPolicy. Resource Allocation Timeout, also referred to as RATOV, is the number of milliseconds to wait before the system assumes that a resource cannot be properly allocated. | def resource_allocation_timeout(self, resource_allocation_timeout):
self._resource_allocation_timeout = resource_allocation_timeout | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_resource_timeout(self, timeout):\n self.web_page.resource_timeout = timeout",
"def resource_allocation_timeout(self):\n return self._resource_allocation_timeout",
"def configure_resource_alloc_info(self, vm_obj):\n rai_change_detected = False\n memory_allocation = vim.Resour... | [
"0.6463698",
"0.6377363",
"0.57586837",
"0.5307893",
"0.5248911",
"0.51835036",
"0.5111517",
"0.5009081",
"0.4991742",
"0.49574667",
"0.49550712",
"0.4938026",
"0.49244094",
"0.49107513",
"0.4898084",
"0.48397377",
"0.4782901",
"0.4782901",
"0.4782901",
"0.4782901",
"0.477567... | 0.8288212 | 0 |
Gets the scsi_queue_settings of this VnicFcAdapterPolicy. SCSI Input/Output Queue Settings. | def scsi_queue_settings(self):
return self._scsi_queue_settings | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def scsi_queue_settings(self, scsi_queue_settings):\n\n self._scsi_queue_settings = scsi_queue_settings",
"def tx_queue_settings(self):\n return self._tx_queue_settings",
"def rx_queue_settings(self):\n return self._rx_queue_settings",
"def get_output_queue(self, queue_index=0) -> Stoppa... | [
"0.6858417",
"0.6606268",
"0.6420036",
"0.51969147",
"0.50985587",
"0.50868607",
"0.49807483",
"0.49672258",
"0.49422994",
"0.49422994",
"0.49368817",
"0.49279925",
"0.49216136",
"0.49206308",
"0.4875566",
"0.48499563",
"0.48420617",
"0.4833137",
"0.48234707",
"0.48069274",
"... | 0.8493045 | 0 |
Sets the scsi_queue_settings of this VnicFcAdapterPolicy. SCSI Input/Output Queue Settings. | def scsi_queue_settings(self, scsi_queue_settings):
self._scsi_queue_settings = scsi_queue_settings | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def scsi_queue_settings(self):\n return self._scsi_queue_settings",
"def tx_queue_settings(self, tx_queue_settings):\n\n self._tx_queue_settings = tx_queue_settings",
"def rx_queue_settings(self, rx_queue_settings):\n\n self._rx_queue_settings = rx_queue_settings",
"def setQueue(self, qu... | [
"0.69898474",
"0.62546253",
"0.5814858",
"0.5230102",
"0.50616324",
"0.4791333",
"0.47495133",
"0.47384217",
"0.47076645",
"0.45661113",
"0.45643875",
"0.45179108",
"0.44874203",
"0.4459605",
"0.44516957",
"0.4400508",
"0.43737707",
"0.4368467",
"0.43654525",
"0.43469054",
"0... | 0.86932963 | 0 |
Gets the tx_queue_settings of this VnicFcAdapterPolicy. Fibre Channel Transmit Queue Settings. | def tx_queue_settings(self):
return self._tx_queue_settings | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rx_queue_settings(self):\n return self._rx_queue_settings",
"def scsi_queue_settings(self):\n return self._scsi_queue_settings",
"def tx_queue_settings(self, tx_queue_settings):\n\n self._tx_queue_settings = tx_queue_settings",
"def rabbitmq_settings(self):\n return self.appli... | [
"0.76350874",
"0.6688975",
"0.6552699",
"0.5827409",
"0.5797575",
"0.57200515",
"0.56822723",
"0.5628079",
"0.55680937",
"0.53271675",
"0.5326602",
"0.5265305",
"0.5265305",
"0.5252141",
"0.5233595",
"0.522987",
"0.5187735",
"0.51667404",
"0.51667404",
"0.5157951",
"0.5154609... | 0.8493249 | 0 |
Sets the tx_queue_settings of this VnicFcAdapterPolicy. Fibre Channel Transmit Queue Settings. | def tx_queue_settings(self, tx_queue_settings):
self._tx_queue_settings = tx_queue_settings | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rx_queue_settings(self, rx_queue_settings):\n\n self._rx_queue_settings = rx_queue_settings",
"def tx_queue_settings(self):\n return self._tx_queue_settings",
"def scsi_queue_settings(self, scsi_queue_settings):\n\n self._scsi_queue_settings = scsi_queue_settings",
"def rx_queue_sett... | [
"0.71142685",
"0.6844888",
"0.65518355",
"0.5932028",
"0.5392885",
"0.5283866",
"0.5118692",
"0.49957597",
"0.49936277",
"0.49788928",
"0.48651072",
"0.47088873",
"0.4699681",
"0.46983862",
"0.46872106",
"0.46858695",
"0.46486413",
"0.46326208",
"0.4597634",
"0.45943472",
"0.... | 0.8369595 | 0 |
Returns the string representation of the model | def to_str(self):
return pformat(self.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _repr_model_(self):\n return str(self)",
"def __str__(self):\n\n return str(self.model)",
"def get_model_string(self):\n raise NotImplementedError()",
"def __str__(self):\n return self.model",
"def serialize_model(self):\n return dill.dumps(self.model)",
"def __str_... | [
"0.8602374",
"0.85093755",
"0.8237104",
"0.8050309",
"0.80128866",
"0.79348034",
"0.78766525",
"0.77898884",
"0.7786461",
"0.7745792",
"0.7627315",
"0.76055235",
"0.757999",
"0.7514394",
"0.75038797",
"0.75035286",
"0.74850684",
"0.7440529",
"0.74325883",
"0.74239755",
"0.740... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n return not self == other",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other):\n return self.__dict__ != other.__dict__",
"def __eq__(self, other):\n return not self.__ne__(other)",
... | [
"0.8410411",
"0.8391477",
"0.8172175",
"0.81410587",
"0.80920255",
"0.8088807",
"0.80676955"
] | 0.0 | -1 |
Computes the log of the probability density function of the normal N(mean, cov) for the data x. The normal may be univariate or multivariate. Wrapper for older versions of scipy.multivariate_normal.logpdf which don't support support the allow_singular keyword prior to verion 0.15.0. If it is not supported, and cov is s... | def logpdf(x, mean, cov, allow_singular=True):
flat_mean = np.asarray(mean).flatten()
flat_x = np.asarray(x).flatten()
return multivariate_normal.logpdf(flat_x, flat_mean, cov, allow_singular) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def logpdf(x, mean=None, cov=1, allow_singular=True):\n\n if mean is not None:\n flat_mean = np.asarray(mean).flatten()\n else:\n flat_mean = None\n\n flat_x = np.asarray(x).flatten()\n\n if _support_singular:\n return multivariate_normal.logpdf(flat_x, flat_mean, cov, allow_singul... | [
"0.8701125",
"0.8258525",
"0.7828475",
"0.7623683",
"0.75918245",
"0.75813097",
"0.75128365",
"0.7454922",
"0.744525",
"0.74325603",
"0.7373165",
"0.7358745",
"0.7341166",
"0.7087474",
"0.7045547",
"0.7033066",
"0.70032",
"0.6986132",
"0.69729537",
"0.6932501",
"0.6904072",
... | 0.88634884 | 0 |
Returns a copy of Args object for temporary manipulation. | def copy(self):
return ArgsList(self.all) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def copy_with_new_args(self, args):\n return (type(self))(*args)",
"def raw_args(args):\n\n args = args.copy()\n args.pop('is_valid', None)\n return args",
"def join_arguments_into_dictionary(args, **kwargs):\n if isinstance(args, dict):\n args.update(kwargs)\n else:\n ... | [
"0.66916126",
"0.6302011",
"0.60818905",
"0.6069321",
"0.6068176",
"0.60058343",
"0.5964546",
"0.58338284",
"0.5825532",
"0.57592493",
"0.5632539",
"0.56323236",
"0.56097025",
"0.5607746",
"0.55902576",
"0.55668724",
"0.55561924",
"0.5543462",
"0.5541647",
"0.552248",
"0.5522... | 0.71414083 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.