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 |
|---|---|---|---|---|---|---|
draw rectangles specified in bboxes (bounding boxes) to image | def draw_boxes_on_image(img, bboxes, color=(0, 0, 1), thick=6):
imcopy = np.copy(img)
for bbox in bboxes:
cv2.rectangle(imcopy, bbox[0], bbox[1], color, thick)
return imcopy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def draw_bboxes(img, bboxes, color=(0, 0, 255), thick=6):\n draw_img = np.copy(img)\n # Draw rectangles given bbox coordinates as opposing coordinates\n # bboxes = opposing coordinates: (x1,y1), (x2,y2)\n [cv2.rectangle(draw_img, bbox[0], bbox[1], color, thick) for bbox in bboxes]\n return draw_img"... | [
"0.80107635",
"0.7867511",
"0.7841109",
"0.780896",
"0.7688777",
"0.76672894",
"0.76650274",
"0.76551294",
"0.74801457",
"0.74761707",
"0.74568844",
"0.7402932",
"0.7327139",
"0.73203677",
"0.73158246",
"0.7310521",
"0.7292519",
"0.7284807",
"0.7263597",
"0.71753",
"0.7130301... | 0.7706731 | 4 |
Draw boxes around all detected cars | def draw_boxes_cars(img, vehicles_instance):
for car_number in range(1, vehicles_instance.number_of_found_cars+1):
# Find pixels with each car_number label value
nonzero = (vehicles_instance.binary_map == car_number).nonzero()
# Identify x and y values of those pixels
nonzeroy = np... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def drawCars(self):\n for car in self.cars:\n if car.aliveForFrames >= ALIVE_THRESHOLD:\n msg = 'ID: {0:>2}\\n'.format(car.id)\n msg += 'conf:{0:.2f}%\\n'.format(car.displayedConfidence * 100)\n msg += 'active: {} frames'.format(car.aliveForFrames - ca... | [
"0.780447",
"0.7102278",
"0.7014191",
"0.6913511",
"0.6858935",
"0.68518883",
"0.68231654",
"0.68112147",
"0.6710263",
"0.67082924",
"0.6702254",
"0.6671096",
"0.66701335",
"0.66457176",
"0.66432387",
"0.6538863",
"0.6533277",
"0.65137863",
"0.6497355",
"0.6496607",
"0.642925... | 0.7596473 | 1 |
Return how many minutes, rounded to 2 decimals, Python 2 has left on Planet Miller | def py2_miller_min_left():
left = PY2_RETIRED_DT - BITE_CREATED_DT
left_earth_mins = round(left.total_seconds()/60,2)
left_miller_hours = left_earth_mins/3679200
left_miller_mins = round(left_miller_hours * 60,2) #assume that 1 miller hour is 60 miller mins (same as earth)
return left_mille... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calculate_minutes(time):\n return int(time / 60)",
"def _unit_ms(self):\n return (self.time_base / 1000.0) / 60.0",
"def get_time_in_round() -> int:\n # FIXME - returning negative value for projectiles\n return store.round_time",
"def minutes(self):\n return int(int(self) / 60)",
... | [
"0.7250221",
"0.71407723",
"0.7115165",
"0.70469683",
"0.70183474",
"0.6991307",
"0.6988934",
"0.69780076",
"0.69602925",
"0.6760116",
"0.6759534",
"0.66422814",
"0.6521414",
"0.64251256",
"0.6411746",
"0.63647366",
"0.63623047",
"0.633441",
"0.63188565",
"0.62785894",
"0.626... | 0.6725961 | 11 |
Find the largest float f such as `f 10scale <= val` | def largest_scaled_float_not_above(val, scale):
assert val >= 0
assert scale >= 0
float_val = float(val) / 10**scale
if float_val * 10**scale > val:
# Take the float just below... it *should* satisfy
float_val = np.nextafter(float_val, 0.0)
if float_val * 10**scale > val:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find_max_f():\n fmax = fmin(g, 2)\n return fmax[0]",
"def zzx_max_norm(f):\n if not f:\n return INT_ZERO\n else:\n return max(zzx_abs(f))",
"def float_parameter(level, maxval):\n return float(level) * maxval / 10.",
"def above_threshold(self, value):\n # We use floating ... | [
"0.7130445",
"0.66953975",
"0.6477718",
"0.64043176",
"0.6339146",
"0.63076824",
"0.6281727",
"0.6252579",
"0.61984867",
"0.61789423",
"0.6161066",
"0.61153615",
"0.60929424",
"0.6086036",
"0.60584617",
"0.60010904",
"0.59959984",
"0.5983106",
"0.598265",
"0.5977817",
"0.5938... | 0.8383343 | 0 |
Return a float representation (possibly approximate) of `int_valscale` | def scaled_float(int_val, scale):
assert isinstance(int_val, int)
unscaled = decimal.Decimal(int_val)
scaled = unscaled.scaleb(-scale)
float_val = float(scaled)
return float_val | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _scale(x):\n scaleFactor = 1\n _ret = int(x/scaleFactor)\n return _ret",
"def int2float(img_int):\n img = img_int.astype(np.float64)\n img /= (MAX_VALUE - 1)\n return img",
"def compute_val(self, val: Union[int, float]) -> Union[int, float]:\n\n return (val - self.min) / (self.max - self... | [
"0.6641409",
"0.64979357",
"0.62895054",
"0.6282461",
"0.6247815",
"0.62260747",
"0.62083685",
"0.6164233",
"0.60824484",
"0.6073852",
"0.6062791",
"0.60520333",
"0.60428756",
"0.6004682",
"0.5992375",
"0.5931669",
"0.59175926",
"0.5914517",
"0.58995",
"0.5894253",
"0.5872754... | 0.79696685 | 0 |
Return FloatToDecimalCase instances with integral values. | def integral_float_to_decimal_cast_cases(float_ty, max_precision):
mantissa_digits = 16
for precision in range(1, max_precision, 3):
for scale in range(0, precision, 2):
yield FloatToDecimalCase(precision, scale, 0.0)
yield FloatToDecimalCase(precision, scale, 1.0)
ep... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def random_float_to_decimal_cast_cases(float_ty, max_precision):\n r = random.Random(42)\n for precision in range(1, max_precision, 6):\n for scale in range(0, precision, 4):\n for i in range(20):\n unscaled = r.randrange(0, 10**precision)\n float_val = scaled_... | [
"0.67214733",
"0.6682397",
"0.57373416",
"0.5626315",
"0.54216003",
"0.528349",
"0.5278428",
"0.51888865",
"0.5139494",
"0.51257926",
"0.5076805",
"0.5071481",
"0.5066847",
"0.50126404",
"0.49964017",
"0.49909097",
"0.4983989",
"0.4969541",
"0.49523664",
"0.49232996",
"0.4911... | 0.7221957 | 0 |
Return FloatToDecimalCase instances with real values. | def real_float_to_decimal_cast_cases(float_ty, max_precision):
mantissa_digits = 16
for precision in range(1, max_precision, 3):
for scale in range(0, precision, 2):
epsilon = 2 * 10**max(precision - mantissa_digits, 0)
abs_minval = largest_scaled_float_not_above(epsilon, scale)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def random_float_to_decimal_cast_cases(float_ty, max_precision):\n r = random.Random(42)\n for precision in range(1, max_precision, 6):\n for scale in range(0, precision, 4):\n for i in range(20):\n unscaled = r.randrange(0, 10**precision)\n float_val = scaled_... | [
"0.6582907",
"0.60159844",
"0.5950356",
"0.52849394",
"0.5282446",
"0.5274511",
"0.5265422",
"0.5251841",
"0.5232054",
"0.5205284",
"0.5172633",
"0.51722366",
"0.5153649",
"0.5118333",
"0.51155394",
"0.5101598",
"0.5074054",
"0.50718665",
"0.5053393",
"0.5030344",
"0.5011955"... | 0.67996025 | 0 |
Given two dicts, merge them into a new dict as a shallow copy. | def merge_two_dicts(x, y):
z = x.copy()
z.update(y)
return z | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mergedict(x, y):\n z = x.copy()\n z.update(y)\n return z",
"def merge_dicts(dict_a, dict_b):\n dict_c = dict_a.copy()\n dict_c.update(dict_b)\n return dict_c",
"def merge_two_dicts(x, y):\n\tz = x.copy()\n\tz.update(y)\n\treturn z",
"def merge_two_dicts(self, x, ... | [
"0.8502164",
"0.84473974",
"0.8439782",
"0.8427673",
"0.83827174",
"0.83827174",
"0.83827174",
"0.83827174",
"0.83827174",
"0.83827174",
"0.83827174",
"0.83827174",
"0.8350322",
"0.8350322",
"0.8350322",
"0.8209194",
"0.8189421",
"0.8189421",
"0.81892985",
"0.8083102",
"0.799... | 0.84307104 | 3 |
Convert class labels from scalars to onehot vectors. | def dense_to_one_hot(labels_dense, num_classes):
num_labels = labels_dense.shape[0]
index_offset = numpy.arange(num_labels) * num_classes
labels_one_hot = numpy.zeros((num_labels, num_classes))
labels_one_hot.flat[index_offset + labels_dense.ravel()] = 1
return labels_one_hot | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def one_hot(labels, classes=None):\n return K.utils.to_categorical(labels, classes)",
"def one_hot(labels, classes=None):\n\n one_hot_ = K.utils.to_categorical(labels, classes)\n return(one_hot_)",
"def to_onehot(labels: torch.Tensor, num_classes: int) -> torch.Tensor:\n if len(labels.size()) == 1:... | [
"0.8250402",
"0.807683",
"0.80523187",
"0.7977843",
"0.7908335",
"0.7900327",
"0.7892233",
"0.7869711",
"0.7849721",
"0.7849721",
"0.7826951",
"0.7826122",
"0.77677035",
"0.7765413",
"0.77540547",
"0.77540547",
"0.77540547",
"0.77489346",
"0.7742955",
"0.7737176",
"0.77226317... | 0.7690543 | 24 |
Create a Trie from 'words'. If 'words' is not specified, create an empty Trie. | def __init__(self, words=None):
Trie.__init__(self)
if words:
if isinstance(words, str):
self._read_words(words)
else:
for (word, data) in words:
self.insert(word, data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _words2trie(self, words):\n ret = Trie()\n for w_i in words:\n term = USCORE_RE.sub(' ', w_i)\n terms = SPACE_RE.split(self._preprocess(term))\n ret.add(terms, [None] * len(terms), 1.)\n return ret",
"def buildDict(self, words):\r\n for word in wor... | [
"0.7320551",
"0.6916375",
"0.68819046",
"0.6836755",
"0.6469625",
"0.6240145",
"0.6236305",
"0.6204703",
"0.6191328",
"0.6159992",
"0.60589105",
"0.60545737",
"0.6046716",
"0.60194635",
"0.60115486",
"0.59644556",
"0.5957056",
"0.59549713",
"0.5945491",
"0.5898391",
"0.588711... | 0.76858807 | 0 |
Sets the key_id of this BuildSignature. An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (e.g., the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (e.g., a reference to a key in Cloud KMS). | def key_id(self, key_id):
self._key_id = key_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_key_id(self, key_id=''):\n self.key_id = key_id",
"def set_id(self, id):\n\n\t\tif id is not None and not isinstance(id, int):\n\t\t\traise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None)\n\t\t\n\t\tself.__id = id\n\t\tself.__key_modified['id'] = 1",
"def public... | [
"0.7521612",
"0.6373119",
"0.6320409",
"0.6279871",
"0.6023736",
"0.59320563",
"0.59130543",
"0.58895135",
"0.58895135",
"0.58477914",
"0.5778203",
"0.5744714",
"0.5744714",
"0.566411",
"0.5635972",
"0.56269157",
"0.5613733",
"0.5561747",
"0.55580217",
"0.5509975",
"0.5509651... | 0.72164375 | 1 |
Returns true if both objects are equal | def __eq__(self, other):
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False",
"def __eq__(self, other):\n if i... | [
"0.8089139",
"0.8089139",
"0.8054507",
"0.79827213",
"0.796109",
"0.796109",
"0.79430795",
"0.7930464",
"0.7927239",
"0.78980625",
"0.7883048",
"0.7883048",
"0.7880565",
"0.7872065",
"0.78687155",
"0.7867311",
"0.7826154",
"0.7819807",
"0.7816069",
"0.7807642",
"0.78075194",
... | 0.79669285 | 31 |
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 if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)",
"def __eq__(self, other):\n ... | [
"0.8457179",
"0.8393067",
"0.81457263",
"0.8140635",
"0.8133462",
"0.8094992",
"0.8093376",
"0.8093376",
"0.8093376",
"0.80863357",
"0.80863357",
"0.8077303",
"0.8077303",
"0.8066831"
] | 0.0 | -1 |
Extends eq of fileObject, any object with matching hashes is also equal | def __eq__(self, other):
if super.__eq__(other):
return True
elif self.weakHashFunction != other.weakHashFunction:
raise ValueError("Attempted to compare '%s' and '%s' with differing hash algorithms '%s' and '%s'."
% (self, other, self.weakHashFunction, other.weakHashFunction))
elif self.strongHashFunct... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return self.sha == other.sha",
"def __eq__(self, other):\n if not isinstance(other, TestCloudFileHash):\n return False\n\n return self.__dict__ == other.__dict__",
"def __eq__(self, other):\r\n\t\tif self.eqHash == other.eqHash:\r\n\t\t\treturn True\r\n\t\... | [
"0.691091",
"0.6736297",
"0.6370133",
"0.63312566",
"0.6246282",
"0.6218975",
"0.6182683",
"0.6175523",
"0.6169455",
"0.6123054",
"0.61175066",
"0.60997564",
"0.60963047",
"0.6081268",
"0.6081242",
"0.6079772",
"0.60758466",
"0.6072721",
"0.6072721",
"0.6072721",
"0.60707015"... | 0.0 | -1 |
Overrides the parents repr to provide more information | def __repr__(self):
return repr(self.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __repr__(self):\n return super().__repr__()",
"def __repr__(self) -> str:\n return '{:s}({!s})'.format(self.__class__.__name__,\n super().__repr__())",
"def _extra_repr(self):\n return ''",
"def __repr__(self):\n\n return self._repr__base(rich... | [
"0.79831535",
"0.79562134",
"0.78858817",
"0.7828759",
"0.7828759",
"0.7825827",
"0.7806663",
"0.7802564",
"0.7764173",
"0.7730905",
"0.7728163",
"0.77141565",
"0.77094305",
"0.7686916",
"0.7635272",
"0.7617932",
"0.7608132",
"0.76061726",
"0.76051784",
"0.76029897",
"0.76029... | 0.0 | -1 |
Return the API version number. | def get_version(self):
return call_sdk_function('PrlApi_GetVersion') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_version(self):\n return self.api_version",
"def api_version(self):\n\n\t\treturn self._api_version",
"def get_api_version(self):\n major, minor, patch = self.client.config['api_version']\n return '%s.%s.%s' % (major, minor, patch)",
"def api_version(self) -> Optional[str]:\n ... | [
"0.87853223",
"0.86268544",
"0.8580725",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",
"0.85587674",... | 0.78962183 | 46 |
Return the API application mode. | def get_app_mode(self):
return call_sdk_function('PrlApi_GetAppMode') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_mode(self):\r\n return self._api.get_mode()",
"def api(self) -> Optional[pulumi.Input['ApplicationApiArgs']]:\n return pulumi.get(self, \"api\")",
"def api(self) -> Optional[pulumi.Input['ApplicationApiArgs']]:\n return pulumi.get(self, \"api\")",
"def mode(self) -> Optional[str]... | [
"0.68116915",
"0.6732769",
"0.6732769",
"0.64427567",
"0.64427567",
"0.6397768",
"0.6397768",
"0.63877463",
"0.63804984",
"0.6364909",
"0.63364154",
"0.6313168",
"0.62885934",
"0.62561226",
"0.62523913",
"0.6238072",
"0.6217063",
"0.6158289",
"0.61208147",
"0.6101609",
"0.609... | 0.80202425 | 0 |
Return the default guest OS version for the specified guest OS type. | def get_default_os_version(self, nGuestOsType):
return call_sdk_function('PrlApi_GetDefaultOsVersion', nGuestOsType) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vm_os_type(self, name_of_vm):\n # import pdb;pdb.set_trace()\n vm_obj = self.get_dc_object([vim.VirtualMachine], name_of_vm)\n os_type = vm_obj.config.guestFullName\n if \"CentOS\" in os_type:\n ostype = \"Centos\"\n return ostype\n elif \"Windows\" in o... | [
"0.6754532",
"0.65406084",
"0.6537127",
"0.643416",
"0.63574415",
"0.63036925",
"0.6292959",
"0.6292959",
"0.6291497",
"0.6265987",
"0.62372947",
"0.6208963",
"0.6197874",
"0.617547",
"0.6147763",
"0.6118308",
"0.6060429",
"0.60184115",
"0.6012759",
"0.5995715",
"0.59772074",... | 0.8653423 | 0 |
Return a readable string representation of the specified handle type. | def handle_type_to_string(self, handle_type):
return call_sdk_function('PrlDbg_HandleTypeToString', handle_type) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def handle_to_str(fh):\n return \"%d:%s\" % (fh.type, binascii.hexlify(fh.handle).decode())",
"def _type_str(self):\n try:\n record_name = RECORD_TYPES[self.type]\n return '{0} record'.format(record_name)\n except KeyError:\n return '{0} type 0x{1:04x}'.format(se... | [
"0.6574471",
"0.65078765",
"0.63511413",
"0.6281302",
"0.62451494",
"0.61900485",
"0.6184378",
"0.6166433",
"0.6122804",
"0.6087308",
"0.60548574",
"0.6020816",
"0.59633106",
"0.5932965",
"0.5928833",
"0.5927537",
"0.5910427",
"0.5895531",
"0.5834833",
"0.5819174",
"0.5819174... | 0.8709832 | 0 |
Obtain a string result from the Result object identified by index. | def get_param_by_index_as_string(self, nIndex):
return call_sdk_function('PrlResult_GetParamByIndexAsString', self.handle, nIndex) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_doc(results, index):\n return results[index]",
"def get_by_index_key(self, index, key=str):\n return str(self.get(key, self.get_all_childname(key)[index]))",
"def get_result(self, results=None, index=0):\n if results is None:\n results = self.results\n try:\n ... | [
"0.67568785",
"0.6568232",
"0.6366978",
"0.62885183",
"0.6246316",
"0.6117667",
"0.6084179",
"0.60529375",
"0.6025084",
"0.6014473",
"0.5962536",
"0.5962536",
"0.59044605",
"0.59040916",
"0.58791065",
"0.58570695",
"0.5850354",
"0.5841403",
"0.5832603",
"0.5832056",
"0.583141... | 0.7068006 | 0 |
Obtain the current job status. | def get_status(self):
return call_sdk_function('PrlJob_GetStatus', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def status(self):\n return self.job_proto.status",
"def get_job_status(self):\n if self.worker_thread is None:\n return None\n else:\n return self.worker_thread.get_status()",
"def get_status(self):\n url = \"data_request?id=jobstatus&job=%d&plugin=zwave\" % se... | [
"0.8550901",
"0.82638997",
"0.8236378",
"0.8165552",
"0.81185997",
"0.77727276",
"0.77650255",
"0.76733154",
"0.7598961",
"0.7584391",
"0.75767595",
"0.7563619",
"0.75411415",
"0.75295424",
"0.7527923",
"0.750675",
"0.7459155",
"0.7459155",
"0.7459155",
"0.74168706",
"0.74157... | 0.8501793 | 1 |
Obtain the L{DispConfig} object containing the specified Dispatcher Service preferences info. | def get_common_prefs(self):
return Job(SDK.PrlSrv_GetCommonPrefs(self.handle)[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_config():\n return _CONFIG",
"def get_config() -> Optional[Config]:\n return CurrentConfig.get()",
"def get_config():\n return _config",
"def get_config():\n return CONFIG",
"def CONFIG(self) -> misc_.Config:\n\t\treturn self._CONFIG",
"def _cfg(self):\n if not hasattr(self, '_... | [
"0.56664366",
"0.54789686",
"0.5438382",
"0.5420108",
"0.53992724",
"0.5327895",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
"0.53101313",
... | 0.0 | -1 |
Obtain the L{UserConfig} object containing profile data of the currently logged in user. | def get_user_profile(self):
return Job(SDK.PrlSrv_GetUserProfile(self.handle)[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def user_config(self):\n\n return self.__user_config",
"def get_user_profile(self):\n return self.user.profile",
"def get_user_config():\n config = models.Config.query.get(0)\n if config is None:\n config = models.Config()\n config.id = 0\n\n config.save()\n\n return config",
"def _... | [
"0.7406046",
"0.7283797",
"0.7245219",
"0.71950626",
"0.70875144",
"0.69252115",
"0.6911774",
"0.6877034",
"0.68103105",
"0.6800933",
"0.6772288",
"0.672279",
"0.66881114",
"0.66586244",
"0.665607",
"0.6554622",
"0.65533054",
"0.655279",
"0.65134805",
"0.65082437",
"0.6487024... | 0.65059036 | 20 |
Obtain the L{VirtualNet} object containing information about all existing virtual networks. | def get_virtual_network_list(self, nFlags = 0):
return Job(SDK.PrlSrv_GetVirtualNetworkList(self.handle, nFlags)[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def virtual_networks(self) -> pulumi.Output[Optional[Sequence['outputs.ResourceIdResponse']]]:\n return pulumi.get(self, \"virtual_networks\")",
"def virtual_networks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ResourceIdArgs']]]]:\n return pulumi.get(self, \"virtual_networks\")",
"def ... | [
"0.69861084",
"0.66993606",
"0.6649431",
"0.64679366",
"0.64624655",
"0.6384471",
"0.62271214",
"0.60293806",
"0.5995477",
"0.59632266",
"0.5884923",
"0.5878804",
"0.5866423",
"0.58228266",
"0.5791774",
"0.57787824",
"0.5777323",
"0.5770656",
"0.57660675",
"0.57387394",
"0.57... | 0.63443446 | 6 |
Determine if the connection to the specified Dispatcher Service is active. | def is_connected(self):
return call_sdk_function('PrlSrv_IsConnected', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_connected(self):\n return \"_connection\" in self.__dict__",
"def is_connected(self):\n return self._current_protocol is not None",
"def is_connected(self) -> bool:\n return hasattr(_app_ctx_stack.top, \"zodb_connection\")",
"def get_connected(self) -> bool:\n try:\n ... | [
"0.66327524",
"0.6612514",
"0.65417904",
"0.65104437",
"0.6450484",
"0.64420587",
"0.64310247",
"0.6401386",
"0.6373706",
"0.6345335",
"0.6312951",
"0.6311461",
"0.62946874",
"0.62904555",
"0.6280704",
"0.6267369",
"0.62617517",
"0.6257889",
"0.6247424",
"0.6244973",
"0.62438... | 0.6023432 | 52 |
Obtain the L{License} object containing the license information. | def get_license_info(self):
return Job(SDK.PrlSrv_GetLicenseInfo(self.handle)[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def get_license(self) -> APIReturn:\n return await self._request(\"GET\", \"/getLicense\")",
"def license(self): # noqa: A003\n logger.debug(\"Get license\")\n return self._raw_api.license.get()",
"def getLicense(self, resource):\n\n if isinstance(resource, int):\n ... | [
"0.86104673",
"0.8501188",
"0.80881447",
"0.77811754",
"0.7700964",
"0.73172355",
"0.7203056",
"0.6965388",
"0.6923614",
"0.68359727",
"0.6824072",
"0.67939675",
"0.67395735",
"0.66818154",
"0.66769916",
"0.66716516",
"0.6610605",
"0.6584055",
"0.6543347",
"0.65330833",
"0.65... | 0.7888529 | 3 |
Determine the amount of memory (RAM) available on the host. | def get_host_ram_size(self):
return call_sdk_function('PrlSrvCfg_GetHostRamSize', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_ram():\n try:\n from psutil import virtual_memory\n ram = virtual_memory().total / 1024.**3\n except ImportError:\n logging.exception('Retrieving info about RAM memory failed.')\n ram = np.nan\n return ram",
"def mem_avail():\n return psutil.virtual_memory().avail... | [
"0.81678605",
"0.8086091",
"0.8023689",
"0.8009097",
"0.79777646",
"0.79498047",
"0.78877974",
"0.7818889",
"0.7781148",
"0.775373",
"0.7743869",
"0.7684872",
"0.7675678",
"0.76712096",
"0.76354706",
"0.76298",
"0.76111656",
"0.7586829",
"0.7559701",
"0.75528336",
"0.746226",... | 0.7773731 | 9 |
Determine the hardware virtualization type of the host CPU. | def get_cpu_hvt(self):
return call_sdk_function('PrlSrvCfg_GetCpuHvt', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_cpu_virtualization(self):\n try:\n cpu_vt = self._get_bios_setting('ProcVirtualization')\n except exception.IloCommandNotSupportedError:\n return False\n if cpu_vt == 'Enabled':\n vt_status = True\n else:\n vt_status = False\n ... | [
"0.72556245",
"0.6553122",
"0.6248355",
"0.6226707",
"0.62029916",
"0.61978793",
"0.6146271",
"0.611062",
"0.60955125",
"0.60955125",
"0.607446",
"0.607236",
"0.6011564",
"0.6011564",
"0.5982344",
"0.5979626",
"0.5899397",
"0.5873816",
"0.5873816",
"0.5848837",
"0.5798014",
... | 0.6345472 | 2 |
Return the host operating system type. | def get_host_os_type(self):
return call_sdk_function('PrlSrvCfg_GetHostOsType', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_os_type(cls):\n return {\n 'Darwin': cls.MAC,\n 'Linux': cls.LINUX,\n 'Windows': cls.WINDOWS\n }.get(platform.system(), cls.LINUX)",
"def known_os_type():\n return 'Linux'",
"def get_os_type(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetOsType', sel... | [
"0.8278843",
"0.8258547",
"0.81333387",
"0.8097595",
"0.809676",
"0.8069424",
"0.79538584",
"0.78488207",
"0.78488207",
"0.77419996",
"0.7692606",
"0.7636332",
"0.7568692",
"0.75617355",
"0.7514017",
"0.75077057",
"0.748762",
"0.74245197",
"0.7419811",
"0.7410988",
"0.7349788... | 0.86791205 | 0 |
Return the full host operating system information as a single string. | def get_host_os_str_presentation(self):
return call_sdk_function('PrlSrvCfg_GetHostOsStrPresentation', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def system_info() -> str:\n return \"\\n\".join(\n [\n f\"Python version: {platform.python_version()}\",\n f\"Python implementation: {platform.python_implementation()}\",\n f\"Python compiler: {platform.python_compiler()}\",\n f\"PyTorch version: {torch.__versi... | [
"0.7755849",
"0.7574621",
"0.74975336",
"0.74574566",
"0.7456094",
"0.7388692",
"0.73616827",
"0.7340593",
"0.73080075",
"0.7172858",
"0.7155344",
"0.7144731",
"0.70703727",
"0.70178545",
"0.7006123",
"0.6995333",
"0.6973711",
"0.6953893",
"0.6950812",
"0.6925305",
"0.692277"... | 0.6503619 | 49 |
Obtain the L{HostDevice} object containing information about a sound mixer device on the host. | def get_sound_mixer_dev(self, nIndex):
return handle_to_object(call_sdk_function('PrlSrvCfg_GetSoundMixerDev', self.handle, nIndex)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_mixer_dev(self):\n\t\treturn call_sdk_function('PrlVmDevSound_GetMixerDev', self.handle)",
"def device(self):\n hw = self.hw()\n if hw: return hw.device()",
"def get_device(self):\n raise NotImplementedError()",
"def device(self):\n return self.broker.device(**{\"DeviceRou... | [
"0.72215086",
"0.67696834",
"0.6234502",
"0.6207123",
"0.6198182",
"0.6163951",
"0.6145951",
"0.6121736",
"0.61075044",
"0.6035177",
"0.6035177",
"0.6035177",
"0.6035177",
"0.6035177",
"0.6033608",
"0.60207003",
"0.598787",
"0.5904285",
"0.5887914",
"0.58427316",
"0.5827793",... | 0.5781212 | 25 |
Determine the number of printers installed on the host. | def get_printers_count(self):
return call_sdk_function('PrlSrvCfg_GetPrintersCount', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_count():\n _check_init()\n return _pypm.CountDevices()",
"def get_number_of_devices(self):\n return self.drt_manager.get_number_of_devices()",
"def listPrinters(self):\n raise NotImplementedError(\"listPrinters not implemented\")",
"def total_ports(self):\n return len(self.port_ext... | [
"0.6218197",
"0.6034468",
"0.5991871",
"0.5977253",
"0.59532887",
"0.5851531",
"0.57505625",
"0.5728622",
"0.57187104",
"0.571862",
"0.5712666",
"0.5704371",
"0.5689567",
"0.56653374",
"0.5660505",
"0.562508",
"0.56239766",
"0.55799663",
"0.5546997",
"0.552137",
"0.55164665",... | 0.8208915 | 0 |
Determine the number of PCI devices installed on the host. | def get_generic_pci_devices_count(self):
return call_sdk_function('PrlSrvCfg_GetGenericPciDevicesCount', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_generic_pci_devs_count(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetGenericPciDevsCount', self.handle)",
"def get_count():\n _check_init()\n return _pypm.CountDevices()",
"def get_number_devices(self):\n no_devices = c_int()\n self._dll.ShamrockGetNumberDevices(byref(no_devices... | [
"0.769036",
"0.7482535",
"0.7345879",
"0.720226",
"0.71872574",
"0.7127099",
"0.7007554",
"0.69816244",
"0.6962707",
"0.6891554",
"0.6861722",
"0.6817629",
"0.67455727",
"0.6732108",
"0.67259526",
"0.6706761",
"0.6696252",
"0.66169137",
"0.65836364",
"0.6483195",
"0.6453034",... | 0.77048624 | 0 |
Obtain the L{HostDevice} object containing information about a PCI device installed on the host. | def get_generic_pci_device(self, nIndex):
return handle_to_object(call_sdk_function('PrlSrvCfg_GetGenericPciDevice', self.handle, nIndex)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_pci_devices(self):\n\n system = self._get_host_details()\n if ('links' in system['Oem']['Hp'] and\n 'PCIDevices' in system['Oem']['Hp']['links']):\n # Get the PCI URI and Settings\n pci_uri = system['Oem']['Hp']['links']['PCIDevices']['href']\n ... | [
"0.65758896",
"0.6446108",
"0.6410559",
"0.6305643",
"0.62287927",
"0.6163382",
"0.6146309",
"0.60331905",
"0.6021132",
"0.6002525",
"0.5925738",
"0.59114385",
"0.5902485",
"0.5880391",
"0.58594084",
"0.5816229",
"0.5814618",
"0.5804151",
"0.5801349",
"0.5778911",
"0.5744436"... | 0.5799319 | 19 |
Obtain the L{HostDevice} object containing information about a USB device on the host. | def get_usb_dev(self, nIndex):
return handle_to_object(call_sdk_function('PrlSrvCfg_GetUsbDev', self.handle, nIndex)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find_device():\n device = usb.core.find(\n idVendor=LuxaforFlag.DEVICE_VENDOR_ID,\n idProduct=LuxaforFlag.DEVICE_PRODUCT_ID\n )\n return device",
"def device(self):\n hw = self.hw()\n if hw: return hw.device()",
"def find_device(device):\n return usb.core.find(idVend... | [
"0.69643384",
"0.6553503",
"0.6517002",
"0.6483129",
"0.6268593",
"0.6251658",
"0.6197192",
"0.6162169",
"0.6121566",
"0.6112523",
"0.6101814",
"0.60868204",
"0.6043475",
"0.6005313",
"0.59985214",
"0.59927285",
"0.59700334",
"0.59688294",
"0.59636337",
"0.59459746",
"0.59299... | 0.5653328 | 55 |
Obtain the device name. | def get_name(self):
return call_sdk_function('PrlSrvCfgDev_GetName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_device_name(self):\n name = self._device[\"name\"]\n if not name or name == \"--\":\n name = self._mac\n\n return name",
"def device_name(self) -> Optional[str]:\n return pulumi.get(self, \"device_name\")",
"def device_name(self) -> Optional[str]:\n return ... | [
"0.8687594",
"0.8647641",
"0.8647641",
"0.8480002",
"0.8480002",
"0.8392571",
"0.8392571",
"0.8392571",
"0.83457804",
"0.82758826",
"0.82748806",
"0.8222574",
"0.81796515",
"0.8103578",
"0.80059415",
"0.7924562",
"0.7910175",
"0.7863523",
"0.7850169",
"0.7841794",
"0.7838243"... | 0.66671854 | 67 |
Obtain the device type. | def get_type(self):
return call_sdk_function('PrlSrvCfgDev_GetType', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def device_type(self):\n return self._meta['device_type']",
"def device_type(self):\n return Context.devtype2str[self.device_typeid]",
"def device_type(self):\n return Context.devtype2str[self.device_typeid]",
"def device_type(self):\n return self._device_type",
"def device_type... | [
"0.86991054",
"0.86832815",
"0.86832815",
"0.86236674",
"0.85794765",
"0.8463424",
"0.84059787",
"0.8302163",
"0.8206885",
"0.8206885",
"0.8206885",
"0.8186243",
"0.81583124",
"0.81029564",
"0.81013554",
"0.80620706",
"0.80371064",
"0.797016",
"0.7820398",
"0.781102",
"0.7790... | 0.6687404 | 71 |
Return the hard disk device name. | def get_dev_name(self):
return call_sdk_function('PrlSrvCfgHdd_GetDevName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_disk_name():\n return \"%s.dat.disk\" % getpass.getuser()",
"def get_disk_file_name():\n return \"%s/%s\" % (get_user_homedir(), get_disk_name())",
"def get_device_name(self):\n name = self._device[\"name\"]\n if not name or name == \"--\":\n name = self._mac\n\n r... | [
"0.75380844",
"0.74101245",
"0.7344254",
"0.7294645",
"0.72321004",
"0.7220133",
"0.72085637",
"0.7144578",
"0.7144578",
"0.7068932",
"0.7060824",
"0.7048874",
"0.70407677",
"0.7020615",
"0.70070165",
"0.70070165",
"0.69910675",
"0.69863945",
"0.69212157",
"0.6888058",
"0.686... | 0.76647776 | 0 |
Return the hard disk partition system name. | def get_sys_name(self):
return call_sdk_function('PrlSrvCfgHddPart_GetSysName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_sys_name(self):\n\t\treturn call_sdk_function('PrlVmDevHdPart_GetSysName', self.handle)",
"def get_file_system(disk):\n\n #TODO\n return \"Unknown\"",
"def virtual_hard_disk_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"virtual_hard_disk_name\")",
"def get_disk_n... | [
"0.7550138",
"0.703297",
"0.7026572",
"0.70102966",
"0.6982616",
"0.6943084",
"0.68221617",
"0.66419923",
"0.66188747",
"0.6517527",
"0.6504786",
"0.6442833",
"0.638939",
"0.6308146",
"0.6257531",
"0.62431735",
"0.621819",
"0.62015414",
"0.6200851",
"0.6080915",
"0.60497093",... | 0.75746787 | 0 |
Determine whether the specified partition is a logical partition. | def is_logical(self):
return bool(call_sdk_function('PrlSrvCfgHddPart_IsLogical', self.handle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_partition(disk): #TODO: Could change to use \"Whole\" attrib. Good idea?\n\n return \"s\" in disk.split(\"disk\")[1]",
"def is_partition(dev):\n dev = os.path.realpath(dev)\n if not stat.S_ISBLK(os.lstat(dev).st_mode):\n raise Error('not a block device', dev)\n\n name = get_dev_name(dev... | [
"0.71115863",
"0.64464265",
"0.6348064",
"0.60153884",
"0.5919169",
"0.5885577",
"0.5861168",
"0.58417934",
"0.57656425",
"0.5690864",
"0.5685317",
"0.55625856",
"0.5480473",
"0.5477915",
"0.5400561",
"0.5398535",
"0.53662026",
"0.5355939",
"0.5330665",
"0.53283477",
"0.52922... | 0.7489929 | 0 |
Return the network adapter type. | def get_net_adapter_type(self):
return call_sdk_function('PrlSrvCfgNet_GetNetAdapterType', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_network_type(self):\n\t\treturn call_sdk_function('PrlVirtNet_GetNetworkType', self.handle)",
"def get_network_type(self):\n net_type = self._data['type']\n if net_type == 'Shared':\n return 'guest'\n elif net_type == 'Isolated':\n return 'isolated'",
"def dev... | [
"0.7694803",
"0.7303902",
"0.72543085",
"0.69771385",
"0.6870048",
"0.67161655",
"0.6659059",
"0.6550148",
"0.6544242",
"0.6535036",
"0.6526369",
"0.6490484",
"0.6481494",
"0.6466726",
"0.6466726",
"0.6466726",
"0.6452918",
"0.64399177",
"0.6400822",
"0.6351929",
"0.6351929",... | 0.8633338 | 0 |
Return name and path of the default virtual machine folder for the Dispatcher Service. | def get_vm_dir_uuid(self):
return call_sdk_function('PrlUsrCfg_GetVmDirUuid', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_default_vm_folder(self):\n return self.get_vm_folders()[0]['folder']",
"def get_default_vm_dir(self):\n\t\treturn call_sdk_function('PrlDispCfg_GetDefaultVmDir', self.handle)",
"def get_default_vm_folder(self):\n\t\treturn call_sdk_function('PrlUsrCfg_GetDefaultVmFolder', self.handle)",
"def g... | [
"0.75501496",
"0.738908",
"0.73332053",
"0.7301135",
"0.6524976",
"0.61608094",
"0.614056",
"0.59871614",
"0.5984635",
"0.59074104",
"0.5874632",
"0.5818115",
"0.5740097",
"0.56954384",
"0.5685517",
"0.5685369",
"0.566451",
"0.5636924",
"0.5632099",
"0.56093997",
"0.56091684"... | 0.51530313 | 100 |
Determine if the current user can modify Dispatcher Service preferences. | def can_change_srv_sets(self):
return bool(call_sdk_function('PrlUsrCfg_CanChangeSrvSets', self.handle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_current_user_admin():\n return (os.environ.get('USER_IS_ADMIN', '0')) == \"1\"",
"def can_edit(self, user):\n if user.has_perm('funding.make_application_decisions'):\n # Funding manager can update things later, if required\n return True\n # Applicants can only edit the... | [
"0.6002932",
"0.5977661",
"0.59344935",
"0.5816692",
"0.58160514",
"0.58113813",
"0.579063",
"0.579063",
"0.579063",
"0.5782572",
"0.57820785",
"0.576401",
"0.57571954",
"0.573972",
"0.57326156",
"0.5727073",
"0.57260704",
"0.5719985",
"0.57143784",
"0.5700493",
"0.5691238",
... | 0.0 | -1 |
Determine if the user is a local administrator on the host where Dispatcher Service is running. | def is_local_administrator(self):
return bool(call_sdk_function('PrlUsrCfg_IsLocalAdministrator', self.handle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_admin():\n if platform_is(WINDOWS):\n return windll.shell32.IsUserAnAdmin()\n return os.getuid() == 0",
"def is_current_user_admin():\n return (os.environ.get('USER_IS_ADMIN', '0')) == \"1\"",
"def check_admin() -> bool:\n return ctypes.windll.shell32.IsUserAnAdmin() == 1",
"def i... | [
"0.7747991",
"0.77392924",
"0.7462113",
"0.7355583",
"0.7327995",
"0.7299104",
"0.7291741",
"0.72550887",
"0.7143907",
"0.7119392",
"0.70986885",
"0.7073353",
"0.70517457",
"0.7021438",
"0.7021438",
"0.6930423",
"0.6918999",
"0.69102836",
"0.689898",
"0.689898",
"0.68962073",... | 0.8073703 | 0 |
Return the user active session count. | def get_session_count(self):
return call_sdk_function('PrlUsrInfo_GetSessionCount', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def activeusercount(self):\n sql = '''select to_char(count(*)-1, 'FM99999999999999990') retvalue \n from v$session where username is not null \n and status='ACTIVE' '''\n self.cur.execute(sql)\n res = self.cur.fetchall()\n for i in res:\n print(i[0])... | [
"0.8156791",
"0.8083743",
"0.79133284",
"0.7619318",
"0.75550777",
"0.7443656",
"0.74185646",
"0.73810744",
"0.7227607",
"0.71658546",
"0.7114421",
"0.7057495",
"0.69099355",
"0.6894076",
"0.6878144",
"0.68763715",
"0.68142617",
"0.67380714",
"0.66942346",
"0.66540456",
"0.66... | 0.80099946 | 2 |
Determine whether the specified user is allowed to modify Dispatcher Service preferences. | def can_change_srv_sets(self):
return bool(call_sdk_function('PrlUsrInfo_CanChangeSrvSets', self.handle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def can_edit_user(user):\n\tu = current_user._get_current_object()\n\treturn u==user or u.is_admin()",
"def can_edit(self, user):\n if user.has_perm('funding.make_application_decisions'):\n # Funding manager can update things later, if required\n return True\n # Applicants can... | [
"0.65991956",
"0.65939474",
"0.6551513",
"0.6533737",
"0.65317166",
"0.65232813",
"0.64943206",
"0.641639",
"0.6408942",
"0.64000636",
"0.63362885",
"0.6285649",
"0.6226423",
"0.62116295",
"0.62111086",
"0.6179489",
"0.61742705",
"0.616842",
"0.61652964",
"0.61633223",
"0.616... | 0.0 | -1 |
Determine the minimum required memory size that must be allocated to an individual virtual machine. | def get_min_vm_mem(self):
return call_sdk_function('PrlDispCfg_GetMinVmMem', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def required_memory_minimum(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"required_memory_minimum\")",
"def required_vcpu_minimum(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"required_vcpu_minimum\")",
"def min_disk_size(self) -> int:\n return pulumi.get(self, \"min_di... | [
"0.7821292",
"0.7067376",
"0.70225346",
"0.6980278",
"0.6971328",
"0.69611186",
"0.69240135",
"0.6913583",
"0.6896193",
"0.6886789",
"0.681942",
"0.681942",
"0.681942",
"0.6786141",
"0.67765766",
"0.67443705",
"0.6725455",
"0.6709505",
"0.6690329",
"0.66667473",
"0.663669",
... | 0.7067946 | 1 |
Determine the recommended memory size for an individual virtual machine. | def get_recommend_max_vm_mem(self):
return call_sdk_function('PrlDispCfg_GetRecommendMaxVmMem', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def memsize(self):\n return self.xlist(\"get-memsize\")[1][0] * 1024",
"def get_memory_info():\n return psutil.virtual_memory()",
"def vm_size(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"vm_size\")",
"def vm_size(self) -> Optional[pulumi.Input[str]]:\n return... | [
"0.7069362",
"0.69645125",
"0.68460643",
"0.68460643",
"0.68460643",
"0.68204886",
"0.6812301",
"0.6811826",
"0.67844",
"0.6774021",
"0.6750267",
"0.671376",
"0.66657937",
"0.66474503",
"0.6641933",
"0.6630501",
"0.65959233",
"0.6595686",
"0.6591258",
"0.6591258",
"0.6591258"... | 0.65953344 | 18 |
Determine if the backup user password is enabled. | def is_backup_user_password_enabled(self):
return bool(call_sdk_function('PrlDispCfg_IsBackupUserPasswordEnabled', self.handle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_has_password(self, user):\n return True if user.password else False",
"def enable_password_verification(self) -> bool:\n return pulumi.get(self, \"enable_password_verification\")",
"def has_usable_password(self):\n return True",
"def enable_password_policy(self) -> bool:\n ... | [
"0.75806683",
"0.7268105",
"0.7093325",
"0.7020353",
"0.6830543",
"0.67843145",
"0.6610479",
"0.65864545",
"0.65579957",
"0.6540665",
"0.6540665",
"0.65239596",
"0.651174",
"0.64855874",
"0.6481689",
"0.6416375",
"0.6390537",
"0.63565487",
"0.6311423",
"0.6311423",
"0.6297471... | 0.8867669 | 0 |
Set the virtual network ID. | def set_network_id(self, sNetworkId):
call_sdk_function('PrlVirtNet_SetNetworkId', self.handle, sNetworkId) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_virtual_network_id(self, sNewVirtualNetworkId):\n\t\tcall_sdk_function('PrlVmDevNet_SetVirtualNetworkId', self.handle, sNewVirtualNetworkId)",
"def get_virtual_network_id(self):\n\t\treturn call_sdk_function('PrlVmDevNet_GetVirtualNetworkId', self.handle)",
"def virtual_network_id(self) -> Optional[pul... | [
"0.7693968",
"0.63517797",
"0.6341928",
"0.62679",
"0.624121",
"0.61970073",
"0.60789174",
"0.60100573",
"0.5948184",
"0.59422016",
"0.5906501",
"0.5862112",
"0.58239496",
"0.58043665",
"0.5787764",
"0.575508",
"0.5754674",
"0.57239896",
"0.5716999",
"0.5662424",
"0.56606543"... | 0.7991012 | 0 |
Return the description of the specified virtual network. | def get_description(self):
return call_sdk_function('PrlVirtNet_GetDescription', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def network(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"network\")",
"def get_description():\n desc = {\"description\": __doc__, \"data\": True, \"cache\": 300}\n desc[\"defaults\"] = {\"_r\": \"t\"}\n yest = date.today() - timedelta(days=1)\n desc[\"arguments\"] = [\n dict... | [
"0.6537149",
"0.6510712",
"0.64867145",
"0.640584",
"0.63835734",
"0.63305956",
"0.6311881",
"0.6189604",
"0.61296874",
"0.6129629",
"0.61247116",
"0.6124544",
"0.6046188",
"0.6004972",
"0.6004857",
"0.5997187",
"0.59790206",
"0.5974439",
"0.59131604",
"0.5872604",
"0.5869334... | 0.7534796 | 0 |
Return the bound card MAC address of the specified virtual network. | def get_bound_card_mac(self):
return call_sdk_function('PrlVirtNet_GetBoundCardMac', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mac_from_vm(vm: libvirt.virDomain = None) -> str:\n doc = minidom.parseString(vm.XMLDesc())\n interfaces = doc.getElementsByTagName('mac')\n return interfaces[0].getAttribute('address')",
"def get_mac():\n\n interface = [x for x in netifaces.interfaces() if 'wlan' in x or 'wlp' in x][0]\n retu... | [
"0.6636479",
"0.6580072",
"0.65669185",
"0.6564665",
"0.6366094",
"0.6326765",
"0.6303715",
"0.6084087",
"0.6084087",
"0.60405797",
"0.58742994",
"0.5730645",
"0.5724374",
"0.5720674",
"0.5691902",
"0.5668704",
"0.5582945",
"0.5569515",
"0.553349",
"0.5531044",
"0.551368",
... | 0.7125394 | 0 |
Sets the specified virtual network bound card MAC address. | def set_bound_card_mac(self, sBoundCardMac):
call_sdk_function('PrlVirtNet_SetBoundCardMac', self.handle, sBoundCardMac) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_mac_address(self, sNewMacAddress):\n\t\tcall_sdk_function('PrlVmDevNet_SetMacAddress', self.handle, sNewMacAddress)",
"def virtual_router_mac(self, virtual_router_mac):\n self._virtual_router_mac = virtual_router_mac",
"def set_macaddr(self):\n if not self.macaddr:\n return\n ... | [
"0.69409734",
"0.67557675",
"0.6464818",
"0.6448499",
"0.6192605",
"0.6099493",
"0.6048907",
"0.5999048",
"0.598341",
"0.59660953",
"0.58828586",
"0.5882134",
"0.5882134",
"0.5840497",
"0.58211374",
"0.5593378",
"0.55886865",
"0.55636275",
"0.5555418",
"0.5519838",
"0.545333"... | 0.7412489 | 0 |
Return the name of the network adapter in the specified virtual network. | def get_adapter_name(self):
return call_sdk_function('PrlVirtNet_GetAdapterName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_interface_name(self, network, port=None):\n if not port:\n device_id = self.get_device_id(network)\n port = self.plugin.get_dhcp_port(network.id, device_id)\n return self.driver.get_device_name(port)",
"def get_network_name_on_vc(options):\n network = get_network_on... | [
"0.70673096",
"0.69213957",
"0.6915876",
"0.6650888",
"0.6207288",
"0.61864823",
"0.6172801",
"0.61024636",
"0.59666646",
"0.5957127",
"0.5946242",
"0.5914605",
"0.5877514",
"0.58029205",
"0.57921064",
"0.57279164",
"0.5643939",
"0.5631188",
"0.56063914",
"0.55987203",
"0.559... | 0.7410131 | 0 |
Sets the specified virtual network adapter name. | def set_adapter_name(self, sAdapterName):
call_sdk_function('PrlVirtNet_SetAdapterName', self.handle, sAdapterName) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_bound_adapter_name(self, sNewBoundAdapterName):\n\t\tcall_sdk_function('PrlVmDevNet_SetBoundAdapterName', self.handle, sNewBoundAdapterName)",
"def set_adapter_index(self, nAdapterIndex):\n\t\tcall_sdk_function('PrlVirtNet_SetAdapterIndex', self.handle, nAdapterIndex)",
"def set_name(self, sNewVmName):... | [
"0.7035402",
"0.609258",
"0.59367883",
"0.5859807",
"0.5628993",
"0.56280106",
"0.5558111",
"0.55571604",
"0.55462474",
"0.5539768",
"0.55217254",
"0.55217254",
"0.55217254",
"0.55217254",
"0.55135554",
"0.5504727",
"0.5504727",
"0.5494828",
"0.54735637",
"0.54198426",
"0.540... | 0.79051006 | 0 |
Set the virtual network DHCP IP address. | def set_dhcp_ipaddress(self, sDhcpIPAddress):
call_sdk_function('PrlVirtNet_SetDhcpIPAddress', self.handle, sDhcpIPAddress) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setIpaddr(self):\n\t\tself.ipaddr = self.settings.getKeyValue('ipaddr')\n\t\tself.socket.send('setenv ipaddr ' + self.ipaddr+'\\r', 1)\t\t\n\t\treturn None",
"def set_host_ipaddress(self, sHostIPAddress):\n\t\tcall_sdk_function('PrlVirtNet_SetHostIPAddress', self.handle, sHostIPAddress)",
"def setAddress(s... | [
"0.70444036",
"0.67419136",
"0.6573031",
"0.64852655",
"0.6470435",
"0.6402322",
"0.6258895",
"0.6227937",
"0.6179001",
"0.6163052",
"0.6161513",
"0.6144138",
"0.6135237",
"0.608224",
"0.60524935",
"0.6039651",
"0.59954566",
"0.59954566",
"0.59954566",
"0.5929166",
"0.5928744... | 0.7499358 | 0 |
Determine if the device is enabled. | def is_enabled(self):
return bool(call_sdk_function('PrlVmDev_IsEnabled', self.handle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def enabled(self):\n return bool(int(utils.readstr_all(os.path.join(_CHANNEL_PATH(self._chip,\n self._channel),\n 'enable'))))",
"def is_enabled(self):\n return self.sdk.is_enab... | [
"0.7806466",
"0.75651217",
"0.7521107",
"0.74178874",
"0.74142826",
"0.74122465",
"0.7377801",
"0.7377801",
"0.7377801",
"0.7377801",
"0.7377801",
"0.7377801",
"0.73749757",
"0.73731583",
"0.73731583",
"0.733074",
"0.7261978",
"0.72459686",
"0.72368306",
"0.72324765",
"0.7214... | 0.7562204 | 2 |
Return virtual device image path. | def get_image_path(self):
return call_sdk_function('PrlVmDev_GetImagePath', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def device_path(self):\n return self._engine.device_path()",
"def device_path(self):\n return self._device_path",
"def get_pathname(self):\n return self.image_data.path",
"def imagePath(self):\n return self.path",
"def get_vm_image_name(self):\n return self.virtual_enviro... | [
"0.7290569",
"0.6985538",
"0.65436405",
"0.64245933",
"0.6321593",
"0.6253433",
"0.6216826",
"0.62019354",
"0.61007637",
"0.60862875",
"0.6078733",
"0.60779226",
"0.6057668",
"0.60570586",
"0.60310555",
"0.60271794",
"0.59627765",
"0.59254926",
"0.5919995",
"0.5908637",
"0.58... | 0.7777559 | 0 |
Return the virtual device system name. | def get_sys_name(self):
return call_sdk_function('PrlVmDev_GetSysName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_systemname(self) -> str:\n\n return self.send(self.cmd.GET_SYSTEMNAME)",
"def get_system_name(self):\n\n\t\treturn self.__system_name",
"def name(cls):\n\n system = platform.system()\n\n # Apply system map\n if system in NAME_MAP:\n system = NAME_MAP[system]\n\n ... | [
"0.777083",
"0.76899844",
"0.7482192",
"0.7435347",
"0.7214457",
"0.72077346",
"0.71955925",
"0.71365845",
"0.70869184",
"0.70869184",
"0.70562834",
"0.70213115",
"0.70079786",
"0.70079786",
"0.70079786",
"0.6992434",
"0.6986312",
"0.69574314",
"0.69574314",
"0.69305116",
"0.... | 0.7804216 | 0 |
Determine if the passthrough mode is enabled for the mass storage device. | def is_passthrough(self):
return bool(call_sdk_function('PrlVmDev_IsPassthrough', self.handle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def enabled(self):\n return self._packet.get('enabled', True)",
"def enable(self):\n return self._packet.get('enable', False)\n\n # TODO: TCONT and GEM lists",
"def device_only_auth_enabled(self) -> pulumi.Output[Optional[bool]]:\n return pulumi.get(self, \"devic... | [
"0.64695036",
"0.61141497",
"0.60930204",
"0.60714316",
"0.6055504",
"0.6055278",
"0.5978989",
"0.59477514",
"0.5942255",
"0.5937048",
"0.59225684",
"0.58999485",
"0.5883886",
"0.5883886",
"0.58790463",
"0.5851315",
"0.582366",
"0.5819314",
"0.58161914",
"0.58161914",
"0.5812... | 0.72642046 | 0 |
Set serial number of the virtual hard disk. | def set_serial_number(self, sSerialNumber):
call_sdk_function('PrlVmDevHd_SetSerialNumber', self.handle, sSerialNumber) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_serial(self, serial=0):\n self.serial = serial",
"def serialno(self, serialno):\n\n self._serialno = serialno",
"def serial_number(self, serial_number: str):\n\n self._serial_number = serial_number",
"def _SetDeviceSerial(self, device_serial):\n self._device_address = (\"1... | [
"0.76237035",
"0.73242885",
"0.6889583",
"0.67971885",
"0.67450374",
"0.6732578",
"0.66285366",
"0.62953675",
"0.62594163",
"0.60770553",
"0.607157",
"0.602856",
"0.5962626",
"0.5952211",
"0.5892175",
"0.5855107",
"0.5814513",
"0.5731513",
"0.5698129",
"0.56081593",
"0.560769... | 0.757833 | 1 |
Return the hard disk partition system name. | def get_sys_name(self):
return call_sdk_function('PrlVmDevHdPart_GetSysName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_sys_name(self):\n\t\treturn call_sdk_function('PrlSrvCfgHddPart_GetSysName', self.handle)",
"def get_file_system(disk):\n\n #TODO\n return \"Unknown\"",
"def virtual_hard_disk_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"virtual_hard_disk_name\")",
"def get_disk... | [
"0.75738096",
"0.703076",
"0.7024341",
"0.70080036",
"0.698536",
"0.6945135",
"0.68207055",
"0.66388875",
"0.6618992",
"0.6516116",
"0.6504809",
"0.64407474",
"0.63871694",
"0.6307191",
"0.62553096",
"0.6240222",
"0.6216567",
"0.6204932",
"0.6202269",
"0.60829103",
"0.6051901... | 0.75490695 | 1 |
Return the name of the adapter to which this virtual adapter is bound. | def get_bound_adapter_name(self):
return call_sdk_function('PrlVmDevNet_GetBoundAdapterName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_adapter_name(self):\n\t\treturn call_sdk_function('PrlVirtNet_GetAdapterName', self.handle)",
"def get_adapter_name(self, value: str) -> str:\n fields = self.get()\n\n search = strip_right(obj=value.lower().strip(), fix=\"_adapter\")\n\n if search in AGG_ADAPTER_ALTS:\n se... | [
"0.8482917",
"0.66035485",
"0.65725416",
"0.6513236",
"0.64169574",
"0.6324917",
"0.63019323",
"0.6270776",
"0.62182647",
"0.621028",
"0.6139976",
"0.61186826",
"0.60998714",
"0.60998714",
"0.60998714",
"0.60795903",
"0.60713935",
"0.6068131",
"0.6052623",
"0.6048731",
"0.601... | 0.8490343 | 0 |
Set the name of the network adapter to which this virtual adapter will bind. | def set_bound_adapter_name(self, sNewBoundAdapterName):
call_sdk_function('PrlVmDevNet_SetBoundAdapterName', self.handle, sNewBoundAdapterName) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_adapter_name(self, sAdapterName):\n\t\tcall_sdk_function('PrlVirtNet_SetAdapterName', self.handle, sAdapterName)",
"def setName(self, *args):\n return _libsbml.Port_setName(self, *args)",
"def set_interface(interface, name=''):\n if not interface:\n raise ValueError('interface is empty... | [
"0.7686953",
"0.61756617",
"0.6016249",
"0.59760195",
"0.59579134",
"0.5887119",
"0.58699876",
"0.58298165",
"0.5818389",
"0.5818389",
"0.58033603",
"0.57773083",
"0.57773083",
"0.57773083",
"0.57773083",
"0.57627404",
"0.574475",
"0.574475",
"0.574475",
"0.574475",
"0.574475... | 0.73835546 | 1 |
Return the MAC address of the virtual network adapter. | def get_mac_address(self):
return call_sdk_function('PrlVmDevNet_GetMacAddress', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mac_from_vm(vm: libvirt.virDomain = None) -> str:\n doc = minidom.parseString(vm.XMLDesc())\n interfaces = doc.getElementsByTagName('mac')\n return interfaces[0].getAttribute('address')",
"def get_mac_address():\n eth0_interface = 'eth0'\n addresses = netifaces.ifaddresses(eth0_interface)[neti... | [
"0.78209114",
"0.76312315",
"0.749842",
"0.7494788",
"0.74824846",
"0.7406852",
"0.7389347",
"0.7184292",
"0.7172067",
"0.7103022",
"0.7103022",
"0.7094503",
"0.7091121",
"0.7040763",
"0.6936843",
"0.69331986",
"0.69280833",
"0.6872838",
"0.6863478",
"0.6863478",
"0.6859588",... | 0.7804422 | 1 |
Generate a unique MAC address for the virtual network adapter. | def generate_mac_addr(self):
call_sdk_function('PrlVmDevNet_GenerateMacAddr', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __get_mac_address(self):\n str_hex_mac = uuid.UUID(int=uuid.getnode()).hex[-12:]\n return str_hex_mac",
"def mac_address(self):\n mac = [\n self.random.randint(0x00, 0xff),\n self.random.randint(0x00, 0xff),\n self.random.randint(0x00, 0xff),\n ... | [
"0.75173825",
"0.7509689",
"0.7420315",
"0.72265893",
"0.72265893",
"0.7197269",
"0.7163656",
"0.7129687",
"0.7023139",
"0.7014934",
"0.69750875",
"0.69644344",
"0.69479823",
"0.6886659",
"0.67862964",
"0.6783848",
"0.6769261",
"0.6740785",
"0.67026764",
"0.6623902",
"0.66201... | 0.81498015 | 0 |
Set the virtual network ID for the network adapter. | def set_virtual_network_id(self, sNewVirtualNetworkId):
call_sdk_function('PrlVmDevNet_SetVirtualNetworkId', self.handle, sNewVirtualNetworkId) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_network_id(self, sNetworkId):\n\t\tcall_sdk_function('PrlVirtNet_SetNetworkId', self.handle, sNetworkId)",
"def get_virtual_network_id(self):\n\t\treturn call_sdk_function('PrlVmDevNet_GetVirtualNetworkId', self.handle)",
"def setNetwork(self, network):\n # type: (str)->None\n\n self._val... | [
"0.7572192",
"0.64128464",
"0.61919063",
"0.60942125",
"0.6088959",
"0.5928192",
"0.5811924",
"0.57978296",
"0.5784561",
"0.57237977",
"0.57102436",
"0.57076854",
"0.56990385",
"0.56349677",
"0.55881387",
"0.55850774",
"0.5577554",
"0.55582273",
"0.5466951",
"0.5446985",
"0.5... | 0.75429964 | 1 |
Obtain the number of virtual devices of the specified type. | def get_devs_count_by_type(self, vmDeviceType):
return call_sdk_function('PrlVmCfg_GetDevsCountByType', self.handle, vmDeviceType) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_number_of_devices(self):\n return self.drt_manager.get_number_of_devices()",
"def get_devs_count(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetDevsCount', self.handle)",
"def get_count():\n _check_init()\n return _pypm.CountDevices()",
"def device_count() -> int:\n return flow._oneflo... | [
"0.69981873",
"0.64777434",
"0.6461426",
"0.6221669",
"0.6154865",
"0.6117705",
"0.61134946",
"0.6089518",
"0.6087799",
"0.60722685",
"0.59357005",
"0.5922796",
"0.59192127",
"0.5903956",
"0.58799636",
"0.5850271",
"0.57034975",
"0.56475586",
"0.56225777",
"0.56018287",
"0.55... | 0.74036753 | 0 |
Obtains the L{VmDevice} object containing information about a virtual parallel port. | def get_parallel_port(self, nIndex):
return handle_to_object(call_sdk_function('PrlVmCfg_GetParallelPort', self.handle, nIndex)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def com_port():\n port = ListPortInfo(DEFAULT_PORT)\n port.serial_number = \"1234\"\n port.manufacturer = \"Virtual serial port\"\n port.device = DEFAULT_PORT\n port.description = \"Some serial port\"\n\n return port",
"def get_vncport(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetVNCPort',... | [
"0.64083785",
"0.6180269",
"0.61552846",
"0.5739653",
"0.57293206",
"0.5696253",
"0.56926215",
"0.56100345",
"0.55976325",
"0.5585604",
"0.55776596",
"0.5519957",
"0.55197126",
"0.55197126",
"0.55197126",
"0.55197126",
"0.55197126",
"0.548939",
"0.5488319",
"0.54525566",
"0.5... | 0.64168996 | 0 |
Determine the number of USB devices in a virtual machine. | def get_usb_devices_count(self):
return call_sdk_function('PrlVmCfg_GetUsbDevicesCount', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_device_count():\n debug(\"MpOrLibUsb.get_device_count()\")\n num = MpOrLibUsb.__get_device_count_Mpusb()\n num = num + MpOrLibUsb.__get_device_count_Libusb()\n return num\n #end get_device_count()",
"def get_usb_devs_count(self):\n\t\treturn call_sdk_function('PrlSrvCfg... | [
"0.7901427",
"0.77579844",
"0.73542845",
"0.70729125",
"0.7012515",
"0.6990445",
"0.69864947",
"0.68867445",
"0.6733235",
"0.6676241",
"0.6637164",
"0.65972704",
"0.65937966",
"0.65868545",
"0.65723944",
"0.65478396",
"0.65371925",
"0.6499074",
"0.6493036",
"0.64583",
"0.6380... | 0.8242806 | 0 |
Obtain the L{VmDevice} object containing information about a generic PCI device. | def get_generic_pci_dev(self, nIndex):
return handle_to_object(call_sdk_function('PrlVmCfg_GetGenericPciDev', self.handle, nIndex)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_generic_pci_device(self, nIndex):\n\t\treturn handle_to_object(call_sdk_function('PrlSrvCfg_GetGenericPciDevice', self.handle, nIndex))",
"def get_generic_scsi_device(self, nIndex):\n\t\treturn handle_to_object(call_sdk_function('PrlSrvCfg_GetGenericScsiDevice', self.handle, nIndex))",
"def get_generic... | [
"0.71870863",
"0.69362533",
"0.67069197",
"0.6652196",
"0.6566979",
"0.61527306",
"0.61169803",
"0.60612506",
"0.6040385",
"0.6000018",
"0.5996812",
"0.5931097",
"0.590655",
"0.5880138",
"0.58497065",
"0.5824036",
"0.5823631",
"0.58124363",
"0.57844037",
"0.5761457",
"0.57257... | 0.70590156 | 1 |
Determines the number of generic SCSI devices in a virtual machine. | def get_generic_scsi_devs_count(self):
return call_sdk_function('PrlVmCfg_GetGenericScsiDevsCount', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_generic_scsi_devices_count(self):\n\t\treturn call_sdk_function('PrlSrvCfg_GetGenericScsiDevicesCount', self.handle)",
"def get_generic_pci_devs_count(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetGenericPciDevsCount', self.handle)",
"def get_generic_pci_devices_count(self):\n\t\treturn call_sdk_fu... | [
"0.8240304",
"0.7263721",
"0.71678245",
"0.63478386",
"0.6325695",
"0.604123",
"0.58771545",
"0.5774178",
"0.5735934",
"0.56599265",
"0.5659419",
"0.5624545",
"0.56207",
"0.5598855",
"0.5586943",
"0.5586063",
"0.55731016",
"0.5556782",
"0.5552523",
"0.55314714",
"0.55051726",... | 0.8150895 | 1 |
Obtain the L{VmDevice} object containing information about a SCSI device in a virtual machine. | def get_generic_scsi_dev(self, nIndex):
return handle_to_object(call_sdk_function('PrlVmCfg_GetGenericScsiDev', self.handle, nIndex)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_generic_scsi_device(self, nIndex):\n\t\treturn handle_to_object(call_sdk_function('PrlSrvCfg_GetGenericScsiDevice', self.handle, nIndex))",
"def guess_vserver_device():\n\n s = commands.getoutput('/bin/mount | /bin/grep tagxid | /usr/bin/head -n 1')\n device = s.split()[0]\n\n return device",
... | [
"0.6471637",
"0.6177547",
"0.61043954",
"0.60269636",
"0.5921255",
"0.59171814",
"0.5711887",
"0.56910735",
"0.56848174",
"0.56530005",
"0.56154066",
"0.56060094",
"0.5578963",
"0.5559405",
"0.5550101",
"0.5541306",
"0.5539447",
"0.55334634",
"0.55260134",
"0.5522196",
"0.551... | 0.6436077 | 1 |
Obtains the L{VmDevice} containing information about a display device in a virtual machine. | def get_display_dev(self, nIndex):
return handle_to_object(call_sdk_function('PrlVmCfg_GetDisplayDev', self.handle, nIndex)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_device_information(self):\n return self.mycam.devicemgmt.GetDeviceInformation()",
"def device(self):\n return self.broker.device(**{\"VirtualNetworkMemberID\": self.VirtualNetworkMemberID})",
"def device_info(self) -> DeviceInfo:\n return DeviceInfo(\n identifiers={(DOMA... | [
"0.6597919",
"0.6541259",
"0.65092725",
"0.6430049",
"0.6368078",
"0.6336151",
"0.63076746",
"0.627577",
"0.6269318",
"0.6253648",
"0.6243863",
"0.6225028",
"0.619479",
"0.6168327",
"0.6148272",
"0.61339515",
"0.6127793",
"0.6119365",
"0.6108902",
"0.61037534",
"0.609177",
... | 0.6527102 | 2 |
Determines the interval at which snapshots are taken by SmartGuard. | def get_smart_guard_interval(self):
return call_sdk_function('PrlVmCfg_GetSmartGuardInterval', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def capture_interval(self):\n return self._capture_interval",
"def get_interval_of_checking(self):\n return int(self.config['interval_of_checking'])",
"def get_monitor_sampling_interval():\n return _config.get_monitor_sampling_interval()",
"def interval(self) -> int:\n return pulumi.g... | [
"0.6566741",
"0.6223582",
"0.6181421",
"0.61630136",
"0.6145356",
"0.60799843",
"0.5966957",
"0.5927684",
"0.59240466",
"0.5913528",
"0.59083253",
"0.59064853",
"0.5853207",
"0.5843043",
"0.5841725",
"0.58308554",
"0.5814906",
"0.58016217",
"0.58016217",
"0.5796344",
"0.57816... | 0.67410773 | 0 |
Set the maximum snapshot count, a SmartGuard feature. | def set_smart_guard_max_snapshots_count(self, nMaxSnapshotsCount):
call_sdk_function('PrlVmCfg_SetSmartGuardMaxSnapshotsCount', self.handle, nMaxSnapshotsCount) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_smart_guard_max_snapshots_count(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetSmartGuardMaxSnapshotsCount', self.handle)",
"def setMaxValue(self, max_value):\r\n\t\tself.MaxValue = max_value",
"def setMaxValue(self, max_value):\r\n\t\tself.MaxValue = max_value",
"def _set_maximum(self):\n ... | [
"0.660566",
"0.6315587",
"0.6315587",
"0.62029344",
"0.6151008",
"0.6101535",
"0.6068858",
"0.6042187",
"0.59192556",
"0.5916225",
"0.5915581",
"0.5914849",
"0.5911969",
"0.59102094",
"0.5907532",
"0.5896055",
"0.5895493",
"0.58327806",
"0.58032876",
"0.5790795",
"0.5768718",... | 0.7477978 | 0 |
Return the virtual machine name. | def get_name(self):
return call_sdk_function('PrlVmCfg_GetName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def machine_name(self) -> str:\n return pulumi.get(self, \"machine_name\")",
"def machine_name(self) -> str:\n return pulumi.get(self, \"machine_name\")",
"def virtual_name(self) -> Optional[str]:\n return pulumi.get(self, \"virtual_name\")",
"def virtual_name(self) -> Optional[str]:\n ... | [
"0.7950245",
"0.7950245",
"0.7263014",
"0.7263014",
"0.7224905",
"0.7224905",
"0.7149373",
"0.70489395",
"0.6927535",
"0.67736346",
"0.6684076",
"0.65657014",
"0.6564943",
"0.65182674",
"0.65164113",
"0.6491311",
"0.64786255",
"0.6405483",
"0.63777137",
"0.6359408",
"0.633729... | 0.6671365 | 11 |
Return the type of the operating system that the specified virtual machine is running. | def get_os_type(self):
return call_sdk_function('PrlVmCfg_GetOsType', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vm_os_type(self, name_of_vm):\n # import pdb;pdb.set_trace()\n vm_obj = self.get_dc_object([vim.VirtualMachine], name_of_vm)\n os_type = vm_obj.config.guestFullName\n if \"CentOS\" in os_type:\n ostype = \"Centos\"\n return ostype\n elif \"Windows\" in o... | [
"0.8002714",
"0.7192394",
"0.70872575",
"0.7078954",
"0.7048819",
"0.6997547",
"0.69628745",
"0.69628745",
"0.69343734",
"0.68983674",
"0.6875358",
"0.6860248",
"0.681677",
"0.6728286",
"0.6693294",
"0.65984195",
"0.65984195",
"0.65585184",
"0.65566784",
"0.65234107",
"0.6435... | 0.77533007 | 1 |
Return the version of the operating system that the specified virtual machine is running. | def get_os_version(self):
return call_sdk_function('PrlVmCfg_GetOsVersion', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_osversion(self):\n\t\treturn call_sdk_function('PrlFoundVmInfo_GetOSVersion', self.handle)",
"def version():\n cmd = \"{} -v\".format(_detect_os())\n out = __salt__[\"cmd.run\"](cmd).splitlines()\n ret = out[0].split(\": \")\n return ret[1]",
"def operating_system_version(self):\n re... | [
"0.74803454",
"0.74350077",
"0.7242069",
"0.7122221",
"0.7119205",
"0.7103064",
"0.69923455",
"0.6990281",
"0.6827472",
"0.6788211",
"0.6788211",
"0.6724745",
"0.6722497",
"0.66806906",
"0.66612685",
"0.65643734",
"0.6522838",
"0.65012276",
"0.6390683",
"0.6390549",
"0.637086... | 0.7489674 | 0 |
Return the virtual machine memory (RAM) size, in megabytes. | def get_ram_size(self):
return call_sdk_function('PrlVmCfg_GetRamSize', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def memsize(self):\n return self.xlist(\"get-memsize\")[1][0] * 1024",
"def memory():\n sin = psutil.virtual_memory()\n return round((sin.total / sin.used) / 100, 3)",
"def get_memory_info():\n return psutil.virtual_memory()",
"def total_ram():\n return int(convert.bytetomb(psutil.virt... | [
"0.8268629",
"0.81719834",
"0.81146026",
"0.7960984",
"0.7953702",
"0.78727883",
"0.7815392",
"0.7665129",
"0.76503664",
"0.76500964",
"0.7624981",
"0.7564306",
"0.7550285",
"0.75490546",
"0.7520985",
"0.74745893",
"0.74086785",
"0.7408162",
"0.73918736",
"0.7391138",
"0.7385... | 0.812008 | 2 |
Return the video memory size of the virtual machine. | def get_video_ram_size(self):
return call_sdk_function('PrlVmCfg_GetVideoRamSize', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_memory_info():\n return psutil.virtual_memory()",
"def memsize(self):\n return self.xlist(\"get-memsize\")[1][0] * 1024",
"def vm_size(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"vm_size\")",
"def get_max_vm_mem(self):\n\t\treturn call_sdk_function('PrlDisp... | [
"0.751055",
"0.74495745",
"0.7351477",
"0.72361857",
"0.72113925",
"0.7034809",
"0.7026887",
"0.6982603",
"0.69782215",
"0.6958345",
"0.6958345",
"0.6958345",
"0.6914254",
"0.68945885",
"0.68770516",
"0.6770202",
"0.6745252",
"0.6660185",
"0.6623967",
"0.6598368",
"0.6551583"... | 0.8171691 | 0 |
Return the virtual machine home directory name and path. | def get_home_path(self):
return call_sdk_function('PrlVmCfg_GetHomePath', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_home():\n from os.path import expanduser\n home = expanduser('~')\n return home",
"def get_home_dir(self) -> str:\n ret = os.path.expanduser(\"~\")\n if not os.path.exists(ret):\n raise RuntimeError(\"The home directory does not exist.\")\n return ret",
"def ho... | [
"0.76197547",
"0.7569645",
"0.7420627",
"0.72627336",
"0.7232854",
"0.7232854",
"0.72056586",
"0.7156204",
"0.7122883",
"0.7085768",
"0.7045199",
"0.6944898",
"0.68395764",
"0.68283945",
"0.6763378",
"0.67113966",
"0.66165316",
"0.6589431",
"0.6565456",
"0.6559414",
"0.651614... | 0.7884738 | 0 |
Return the name of the icon file used by the specified virtual machine. | def get_icon(self):
return call_sdk_function('PrlVmCfg_GetIcon', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def downloadicon_name(self):\n return 'platform_%s.gif' % \\\n re.sub(r'\\W', '_', self.context.getPlatform()).lower()",
"def toolIcon(self):\n if self.tmFile is not None:\n iconFile = pFile.conformPath(os.path.join(os.path.dirname(self.tmFile), '__ico__.png'))\n ... | [
"0.6907276",
"0.6812037",
"0.6756709",
"0.6311895",
"0.61864835",
"0.60848886",
"0.6069069",
"0.5995225",
"0.5958886",
"0.59469104",
"0.59337366",
"0.58902615",
"0.58869314",
"0.5845141",
"0.5812802",
"0.5812802",
"0.58089757",
"0.58089757",
"0.58089757",
"0.57685226",
"0.572... | 0.6322209 | 3 |
Set the virtual machine description. | def set_description(self, sNewVmDescription):
call_sdk_function('PrlVmCfg_SetDescription', self.handle, sNewVmDescription) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_description(self, sNewDescription):\n\t\tcall_sdk_function('PrlVmDev_SetDescription', self.handle, sNewDescription)",
"def set_description(self, sDescription):\n\t\tcall_sdk_function('PrlVirtNet_SetDescription', self.handle, sDescription)",
"def set_description(self, description):\r\n self.__des... | [
"0.78766114",
"0.7491857",
"0.7344358",
"0.7295461",
"0.7253651",
"0.72430646",
"0.7117327",
"0.7094734",
"0.70234996",
"0.70234996",
"0.69903374",
"0.69663835",
"0.69605833",
"0.6931912",
"0.6848854",
"0.68359834",
"0.6791002",
"0.6791002",
"0.6791002",
"0.6791002",
"0.67737... | 0.8061994 | 0 |
Return the automatic startup login mode for the virtual machine. | def get_start_login_mode(self):
return call_sdk_function('PrlVmCfg_GetStartLoginMode', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def login_mode(self) -> str:\n return pulumi.get(self, \"login_mode\")",
"def get_auto_start(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetAutoStart', self.handle)",
"def set_start_login_mode(self, nVmStartLoginMode):\n\t\tcall_sdk_function('PrlVmCfg_SetStartLoginMode', self.handle, nVmStartLoginMod... | [
"0.6733527",
"0.63929176",
"0.62240833",
"0.62212217",
"0.61762786",
"0.60334766",
"0.60184497",
"0.5881925",
"0.5881925",
"0.58512586",
"0.5818647",
"0.5804401",
"0.57983047",
"0.57983047",
"0.578379",
"0.5783438",
"0.5765319",
"0.56611955",
"0.5613805",
"0.55885273",
"0.558... | 0.789804 | 0 |
Determine whether the host user home directory will be available in the guest OS as a share. | def is_share_user_home_dir(self):
return bool(call_sdk_function('PrlVmCfg_IsShareUserHomeDir', self.handle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def user_home_dir_exists(self, username: str) -> bool:\n try:\n user = pwd.getpwnam(username)\n home_dir = user.pw_dir\n return os.path.isdir(home_dir)\n except KeyError:\n return False",
"def IsCryptohomeMounted(self, username, is_guest):\n # Check wh... | [
"0.71103024",
"0.69703156",
"0.6726729",
"0.6660486",
"0.6561841",
"0.6450626",
"0.63699454",
"0.6306295",
"0.62938637",
"0.6234948",
"0.62205714",
"0.61977303",
"0.61968505",
"0.61677784",
"0.6161206",
"0.61554444",
"0.6122329",
"0.6120748",
"0.61196405",
"0.6053022",
"0.604... | 0.8224605 | 0 |
Generate a unique name for a virtual device. | def generate_vm_dev_filename(self, sFilenamePrefix = '', sFilenameSuffix = '', sIndexDelimiter = ''):
return Job(SDK.PrlVm_GenerateVmDevFilename(self.handle, sFilenamePrefix, sFilenameSuffix, sIndexDelimiter)[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generate_unique_name():\n return 'titanic-' + str(get_mac())",
"def unique_name():\n return \"unique-{0}\".format(uuid.uuid4())",
"def name(self):\n return f\"{get_device_name(self._data, 0, self._name)}\"",
"def generate_device_name(device, description): \n datacenter = 'SYD' \n ... | [
"0.77781785",
"0.75206107",
"0.7180663",
"0.7128443",
"0.7035805",
"0.69545615",
"0.6852856",
"0.68369627",
"0.6831754",
"0.6767644",
"0.6764947",
"0.6745382",
"0.6745382",
"0.6734029",
"0.66971934",
"0.6687517",
"0.6676063",
"0.66752243",
"0.6661117",
"0.6652531",
"0.6652531... | 0.0 | -1 |
Return the shared folder path. | def get_path(self):
return call_sdk_function('PrlShare_GetPath', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_share_path():\n cwd = os.path.dirname(__file__)\n share = os.path.join(cwd, '../share')\n return os.path.abspath(share)",
"def path_share(self) -> Path:\n return self.path_supervisor / SHARE_DATA",
"def shared_area_path() -> str:\n\n try:\n return os.environ[\"OITG_SHARED_AREA... | [
"0.8271035",
"0.7772355",
"0.76341224",
"0.7172191",
"0.68408746",
"0.6832248",
"0.6795195",
"0.6787234",
"0.67415416",
"0.6635583",
"0.6618588",
"0.6584158",
"0.65420663",
"0.6534957",
"0.65157247",
"0.64789855",
"0.6462365",
"0.6396277",
"0.6390553",
"0.63874316",
"0.638306... | 0.72260904 | 3 |
Return the boot device type. Device type is a property that, together with device index, is used to uniquely identify a device in the virtual machine boot priority list. | def get_type(self):
return call_sdk_function('PrlBootDev_GetType', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def device_type(self):\n return self._meta['device_type']",
"def device_type(self):\n return Context.devtype2str[self.device_typeid]",
"def device_type(self):\n return Context.devtype2str[self.device_typeid]",
"def device_type(self):\n return self._device_type",
"def get_device_... | [
"0.7911683",
"0.77122587",
"0.77122587",
"0.7690797",
"0.7561128",
"0.75329965",
"0.7511292",
"0.7421441",
"0.73780054",
"0.7274752",
"0.7263991",
"0.7241931",
"0.7241931",
"0.7241931",
"0.7183933",
"0.7152906",
"0.71274793",
"0.7015195",
"0.70098525",
"0.6925974",
"0.6914402... | 0.7546261 | 5 |
Obtain the sequence index of the boot device in the boot priority list. | def get_sequence_index(self):
return call_sdk_function('PrlBootDev_GetSequenceIndex', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_serial_number(self):\n\n\t\treturn struct.unpack('<Q', self.boot_sector_data[72 : 80])[0]",
"def _current_device_index(self) -> int:\n device = PArray._get_current_device()\n if device is None: # not called inside current task\n return self._coherence.owner\n elif device.... | [
"0.6398201",
"0.597787",
"0.5832383",
"0.5816129",
"0.5554263",
"0.5524602",
"0.5513951",
"0.5472762",
"0.5405131",
"0.53894985",
"0.5367486",
"0.5366988",
"0.53289396",
"0.5320778",
"0.5320778",
"0.53199553",
"0.5309731",
"0.5306902",
"0.5300226",
"0.5296493",
"0.52921027",
... | 0.7406401 | 0 |
Determine if the specified virtual machine is invalid. | def is_invalid(self):
return bool(call_sdk_function('PrlVmInfo_IsInvalid', self.handle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_answer_unknownVm(self):\n\n self.failUnlessRaises(pyVmomi.vim.fault.NotFound,\n Answer().DoIt, self.host, 'unknownVm')",
"def _check_virtualbox():\n # Adapted from https://github.com/giampaolo/psutil/issues/132#issuecomment-44017679\n # to avoid race conditions\n ... | [
"0.6188283",
"0.60426545",
"0.59584737",
"0.5927735",
"0.58837825",
"0.5817454",
"0.5751019",
"0.566931",
"0.5507371",
"0.54657984",
"0.54571944",
"0.5410602",
"0.537063",
"0.53566426",
"0.5352551",
"0.5346553",
"0.53277504",
"0.53277504",
"0.5257468",
"0.5257468",
"0.5234771... | 0.69988084 | 0 |
Determine the virtual machine owner name. | def get_owner_name(self):
return call_sdk_function('PrlAcl_GetOwnerName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_name_owner(self): # real signature unknown; restored from __doc__\n return \"\"",
"def owner(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"owner\")",
"def owner(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"owner\")",
"def username(self) -> str:\n ret... | [
"0.7383871",
"0.73557794",
"0.73557794",
"0.71358985",
"0.70962375",
"0.70724076",
"0.705071",
"0.7039065",
"0.69920504",
"0.69920504",
"0.6793247",
"0.67753",
"0.67567545",
"0.6751791",
"0.6745921",
"0.6736065",
"0.665089",
"0.6551066",
"0.64628935",
"0.64166784",
"0.6394124... | 0.715857 | 3 |
Return total RAM size in bytes. | def get_total_ram_size(self):
return call_sdk_function('PrlStat_GetTotalRamSize', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def total_ram():\n return int(convert.bytetomb(psutil.virtual_memory().total))",
"def ram_size(self) -> pulumi.Output[float]:\n return pulumi.get(self, \"ram_size\")",
"def total_ram(self):\n return sum([self.size_to_gb(slot[\"Size\"]) for slot in self.get(\"Memory Device\")])",
"def get_ram... | [
"0.85581404",
"0.8493749",
"0.8438762",
"0.82252955",
"0.8158771",
"0.79586643",
"0.79038715",
"0.78784996",
"0.78141415",
"0.78141415",
"0.77585423",
"0.7732854",
"0.7726538",
"0.770086",
"0.76893926",
"0.76166964",
"0.74763364",
"0.739314",
"0.7389536",
"0.73628306",
"0.734... | 0.8613999 | 0 |
Return the size of RAM currently in use, in bytes. | def get_usage_ram_size(self):
return call_sdk_function('PrlStat_GetUsageRamSize', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ram_size(self) -> pulumi.Output[float]:\n return pulumi.get(self, \"ram_size\")",
"def memsize(self):\n return self.xlist(\"get-memsize\")[1][0] * 1024",
"def total_ram():\n return int(convert.bytetomb(psutil.virtual_memory().total))",
"def get_free_ram_size(self):\n\t\treturn call_sdk_f... | [
"0.83605635",
"0.8242637",
"0.8177375",
"0.81554496",
"0.81499463",
"0.7989757",
"0.7842196",
"0.78394276",
"0.7795874",
"0.77117187",
"0.77107817",
"0.7690609",
"0.7660962",
"0.7642647",
"0.76157135",
"0.7606995",
"0.7591106",
"0.7573598",
"0.7456887",
"0.7455341",
"0.744215... | 0.81519306 | 4 |
Return free RAM size in bytes. | def get_free_ram_size(self):
return call_sdk_function('PrlStat_GetFreeRamSize', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def free_ram():\n return int(convert.bytetomb(psutil.virtual_memory().available))",
"def get_free_ram():\n try:\n output = subprocess.check_output(['free', '-b']).decode(\"utf-8\")\n lines = output.splitlines()\n m = re.match(r'\\w+:' + '(\\s+(\\d+))'*6, lines[1])\n if m:\n ... | [
"0.84889907",
"0.8186313",
"0.80782",
"0.7885934",
"0.7827641",
"0.7809839",
"0.7713841",
"0.76959294",
"0.76768035",
"0.7674205",
"0.76590663",
"0.75787956",
"0.7539901",
"0.75314444",
"0.7527859",
"0.7522411",
"0.7499088",
"0.74433285",
"0.74346524",
"0.73982257",
"0.738621... | 0.8737773 | 0 |
Return the name of the machine hosting the specified Dispatcher Service. | def get_host_name(self):
return call_sdk_function('PrlSrvInfo_GetHostName', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def service_operations_host_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"service_operations_host_name\")",
"def GetHostName(self):\n try:\n return self.server.GetHostName()\n except dbus.DBusException:\n return None",
"def service_operations_host_name... | [
"0.63674057",
"0.6161218",
"0.6150792",
"0.6122033",
"0.6103708",
"0.6103708",
"0.60609615",
"0.60609615",
"0.6059704",
"0.6029814",
"0.602298",
"0.60182303",
"0.6014436",
"0.6013208",
"0.59947556",
"0.59868944",
"0.5949521",
"0.59477144",
"0.5944545",
"0.5944545",
"0.5944545... | 0.6041952 | 9 |
Returns the version of the host operating system. | def get_os_version(self):
return call_sdk_function('PrlSrvInfo_GetOsVersion', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def version():\n cmd = \"{} -v\".format(_detect_os())\n out = __salt__[\"cmd.run\"](cmd).splitlines()\n ret = out[0].split(\": \")\n return ret[1]",
"def osversion():\n return platform()",
"def version():\n return uname().version",
"def version():\n return uname().version",
"def system... | [
"0.8440449",
"0.832466",
"0.82035303",
"0.82035303",
"0.81476206",
"0.8046412",
"0.79717606",
"0.795386",
"0.78929645",
"0.78675795",
"0.76100117",
"0.760791",
"0.75842917",
"0.7527522",
"0.7440546",
"0.7375691",
"0.73729044",
"0.7358015",
"0.73369014",
"0.73290443",
"0.73066... | 0.78902394 | 9 |
Return the product version number. | def get_product_version(self):
return call_sdk_function('PrlSrvInfo_GetProductVersion', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_product_version(self):\n return self.get_attr('product_version')",
"def product_version(self):\n return self._product_version",
"def product_version(self):\n return self.get_version(self.ProdVerMS) + \".\" + self.get_version(self.ProdVerLS)",
"def productVersion( self ):\n ... | [
"0.8675642",
"0.85469264",
"0.85279596",
"0.836526",
"0.7854475",
"0.7745025",
"0.7665345",
"0.7654696",
"0.7560091",
"0.7544179",
"0.75225836",
"0.74630827",
"0.74628156",
"0.7437579",
"0.7376961",
"0.73476243",
"0.73476243",
"0.73476243",
"0.73476243",
"0.7345084",
"0.73438... | 0.8281586 | 4 |
Return the host OS version. | def get_host_os_version(self):
return call_sdk_function('PrlLoginResponse_GetHostOsVersion', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def osversion():\n return platform()",
"def get_os_version(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetOsVersion', self.handle)",
"def get_os_version(self):\n\t\treturn call_sdk_function('PrlSrvInfo_GetOsVersion', self.handle)",
"def get_host_os_major(self):\n\t\treturn call_sdk_function('PrlSrvCfg_... | [
"0.8428178",
"0.82568604",
"0.8176538",
"0.80942214",
"0.7997938",
"0.79924446",
"0.79670393",
"0.7943922",
"0.7876671",
"0.78120625",
"0.7805224",
"0.7749633",
"0.7723658",
"0.7602195",
"0.74153334",
"0.74153334",
"0.7360196",
"0.73526627",
"0.73348016",
"0.7327575",
"0.7308... | 0.84466195 | 0 |
Return the product version number. | def get_product_version(self):
return call_sdk_function('PrlLoginResponse_GetProductVersion', self.handle) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_product_version(self):\n return self.get_attr('product_version')",
"def product_version(self):\n return self._product_version",
"def product_version(self):\n return self.get_version(self.ProdVerMS) + \".\" + self.get_version(self.ProdVerLS)",
"def productVersion( self ):\n ... | [
"0.8675642",
"0.85469264",
"0.85279596",
"0.836526",
"0.8281586",
"0.7745025",
"0.7665345",
"0.7654696",
"0.7560091",
"0.7544179",
"0.75225836",
"0.74630827",
"0.74628156",
"0.7437579",
"0.7376961",
"0.73476243",
"0.73476243",
"0.73476243",
"0.73476243",
"0.7345084",
"0.73438... | 0.7854475 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.