query stringlengths 9 9.05k | document stringlengths 10 222k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
returns array of vertex indices of profiles needed to fill the section | def get_indices_section(self):
return np.unique(self.sv_map.volume_surf_coordinates['triangles']) | [
"def expand_indexed_profiles(self,indices,profiles):\n profiles_full = np.zeros((655362,np.shape(profiles)[1]))\n profiles_full[indices]=profiles\n return profiles_full",
"def neighbor_indices(self):",
"def get_index_profile(self):\n return np.copy(self._index_profile)",
"def get_p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a set of profiles indices and matching profiles, expand the profiles to be a matrix of profiles with zeros in the gaps | def expand_indexed_profiles(self,indices,profiles):
profiles_full = np.zeros((655362,np.shape(profiles)[1]))
profiles_full[indices]=profiles
return profiles_full | [
"def expand_profiles(sarr, full_players, profiles): # pylint: disable=too-many-locals\n reduced_players = np.add.reduceat(profiles, sarr.role_starts, 1)\n utils.check(\n np.all(full_players >= reduced_players),\n \"full_players must be at least as large as reduced_players\",\n )\n utils.c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
plots indexed profiles back to 2D histology using surface to volume mapper | def plot_indexed_profiles(self, indices, profiles, interpolation='linear'):
expanded_profiles=self.expand_indexed_profiles(indices,profiles)
block = self.orient_local_mncfile(np.squeeze(self.sv_map.map_profiles_to_block(expanded_profiles, interpolation=interpolation)))
return block | [
"def profile_asterix(data, center=None, nprofiles=5, clim=None):\n fig = plt.figure(figsize=(17,11))\n ax1 = fig.add_subplot(121)\n im = plt.imshow(data,cmap=plt.cm.jet)\n cb = plt.colorbar()\n if clim:\n plt.clim(clim)\n plt.xlabel('col #')\n plt.ylabel('row #')\n\n ax2 = fig.add_sub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
load locally generated mnc file Checks, loads and orients correctly for plotting | def import_results_mncfile(self, filename):
if not os.path.isfile(filename):
print("Can't find {}".format(filename))
print("Consider generating one with the .generate_results_mncfile")
array_data = self.load_2D_mnc(filename)
array_data = self.orient_local_mncfile(array_da... | [
"def load_2D_mnc(self,filename):\n import pyminc.volumes.factory as pyminc\n mncfile=pyminc.volumeFromFile(filename)\n array_data = np.squeeze(np.array(mncfile.data))\n return array_data",
"def load_and_track(directory,fileprefix,fileext=\".dat\",radius = 3,minmass=None,preprocess=Fals... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set zeros to nan for transparent | def filter_zeros(self,array_data):
array_data[array_data==0]=np.nan
return array_data | [
"def nan2zero(array):\n for i in range(array.shape[0]):\n for j in range(array.shape[1]):\n if isNaN(array[i][j]):\n array[i][j] = 0\n return array",
"def setZero(self):\n self.image.setZero()",
"def nan_as_zero(v):\n return 0 if math.isnan(v) else v",
"def zer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
loads and squeezes a 2D mncfile | def load_2D_mnc(self,filename):
import pyminc.volumes.factory as pyminc
mncfile=pyminc.volumeFromFile(filename)
array_data = np.squeeze(np.array(mncfile.data))
return array_data | [
"def parse_nd2_file(nd2_filepath):\n\n with ND2_Reader(nd2_filepath) as images:\n #print(\"The metadata is \", str(images.metadata).encode('utf-8'))\n \n num_fov = images.sizes['m']\n num_channels = images.sizes['c']\n num_rows = images.sizes['y']\n num_columns = images.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get string and index describing axis | def get_axis_info(self):
axes=['x','y','z']
axis_strings=['Sagittal','Coronal','Axial']
self.axis_index=axes.index(self.axis)
self.axis_str = axis_strings[self.axis_index] | [
"def Get_axis(node):\n\n node.plotting()\n\n if len(node) == 1:\n arg = node[0]\n\n if arg.cls == \"Matrix\" and len(arg[0]) == 4:\n a,b,c,d = arg[0]\n return \"_plot.axis(\" + str(a) + \", \" + str(b) + \", \" + str(c) + \", \" + str(d) + \")\"\n\n elif arg.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
takes a set of images and crops each to the mask | def autocrop_to_mask(self, all_images,mask, thr=0):
mask = mask>thr
rows = np.any(mask, axis=1)
cols = np.any(mask, axis=0)
rmin, rmax = np.where(rows)[0][[0, -1]]
cmin, cmax = np.where(cols)[0][[0, -1]]
for image in all_images.keys():
all_images[image]= all_i... | [
"def crop_images(ipath, width, height, opath, padding=0 , dataset=''): \n assert(width > 0 and height > 0 and padding >= 0)\n \n if not os.path.exists(opath):\n os.mkdir(opath);\n \n if ipath == opath:\n print 'Error : Input Path: (', ipath, ') == Output Path (', opath, ')'\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
>>> [x for x in gen_all_n_length_bitsrings(3)] ['000', '001', '010', '011', '100', '101', '110', '111'] | def gen_all_n_length_bitsrings(n):
for i in range(1 << n):
yield '{:0{}b}'.format(i, n) | [
"def generate_n_bit_strings(start, n, graph_size, bit_string_length=10):\r\n bit_strings = [\r\n f'{i:0{bit_string_length}b}' for i in range(start, start+n) if i <= 2**graph_size\r\n ]\r\n data = {\r\n 'bit_strings': bit_strings,\r\n 'count': len(bit_strings),\r\n 'graph_size': ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
>>> data = [[3], [7, 4], [2, 4, 6], [8, 5 , 9, 3]] >>> take_path(data, "001") == 3 + 7 + 2 + 5 True >>> take_path(data, "101") == 3 + 4 + 4 + 9 True >>> take_path(data, "011") == 3 + 7 + 4 + 9 True | def take_path(data, directions):
assert(len(directions) == len(data) - 1)
cur_pos = 0
vals = []
for i in xrange(0, len(data)):
if i == 0:
d = 0
else:
d = int(directions[i - 1])
cur_pos += d
vals.append(data[i][cur_pos])
# print vals
return ... | [
"def _traverse_path(cursor, path, start=0):\n\n for pathIndex in range(start, len(path)):\n if isinstance(path[pathIndex], str):\n cursor_goto(cursor, path[pathIndex])\n else:\n if isinstance(path[pathIndex], int):\n arrayIndex = [path[pathIndex]]\n e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses a Windows Restore Point (rp.log) log filelike object. | def ParseFileObject(self, parser_mediator, file_object):
file_size = file_object.get_size()
file_header_map = self._GetDataTypeMap('rp_log_file_header')
try:
file_header, _ = self._ReadStructureFromFileObject(
file_object, 0, file_header_map)
except (ValueError, errors.ParseError) as e... | [
"def ParseFileObject(self, parser_mediator, file_object):\r\n event_data = FileHistoryRestoreLogEventData()\r\n encoding = self._ENCODING or parser_mediator.codepage\r\n\r\n text_file_object = text_parser.text_file.TextFile(file_object, encoding=encoding)\r\n line = ''\r\n try:\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Map raw rwc eat data to beat position in bar (e.g. 1, 2, 3, 4). | def _position_in_bar(beat_positions, beat_times):
# Remove -1
_beat_positions = np.delete(beat_positions, np.where(beat_positions == -1))
beat_times_corrected = np.delete(beat_times, np.where(beat_positions == -1))
# Create corrected array with downbeat positions
beat_positions_corrected = np.zeros... | [
"def _extract_bars(self, data):",
"def _map_velocity_to_bar_location(self, velocity):\n # (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min --> map one spectrum to another\n if velocity < self._velocity_bar_min_velocity:\n return self._velocity_bar_min_pixel\n if vel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returnss the prediction (highest scoring class id) of a a loglinear classifier with given parameters on input x. | def predict(x, params):
return np.argmax(classifier_output(x, params)) | [
"def predict_logit(self, x):\n self.model.train()\n with torch.no_grad():\n y_ = self.model(x)\n return y_",
"def lasso_predict(self, x: np.array) -> np.array:\r\n if self.LassoModel is None:\r\n print('Lasso Model not trained, please run lasso_fit first!')\r\n return No... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write the dataframe to the HDFStore. Nonpure. | def writer(df, name, store_path, settings, start_time, overwrite=True):
with pd.get_store(store_path) as store:
store.append(name, df, append=False)
logname = name.lstrip('m')
with open(settings["make_hdf_store_completed"], 'a') as f:
f.write('{},{},{}\n'.format(logname, start_time, arrow.u... | [
"def store(self, station_id: int, df: pd.DataFrame) -> None:\n\n # Make sure that there is data that can be stored\n if df.empty:\n return\n\n # Replace IntegerArrays by float64\n for column in df:\n if column in QUALITY_FIELDS or column in INTEGER_FIELDS:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Drops columns that are duplicated. Have to transpose for unknown reason. I'm hitting multiple PADDING's, that should be it. | def dedup_cols(df):
if not df.columns.is_unique:
dupes = df.columns.get_duplicates()
print("Duplicates: {}".format(dupes))
return df.drop(dupes, axis=1)
else:
return df | [
"def _deduplicate_columns(df):\n to_check = df.columns.tolist()\n leading_columns = []\n to_merge = collections.defaultdict(collections.deque)\n for column in to_check:\n for leading_column in leading_columns:\n if column.lower() == leading_column.lower() and co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the definition for a code. Maybe add option to pass dd_name with a lookup from settings as convinence. | def get_definition(code, dd_path=None, style=None):
regex = make_regex(style)
def dropper(line):
maybe_match = regex.match(line)
try:
line_code = maybe_match.groups()[0]
return line_code
except AttributeError:
return None
def get_def(dd):
... | [
"def get_abbrev(self, code):\r\n return AbbrevDecl(code, self._abbrev_map[code])",
"def definition(self):\n return self._bound_context.get_function_def(self.name)",
"def get_definition(self) -> LabwareDefinitionDict:\n return cast(LabwareDefinitionDict, self._definition.dict(exclude_none=True))... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Select only those columns specified under settings. Optionaly | def get_subset(df, settings, dd_name, quiet=False):
cols = {x for x in flatten(settings["dd_to_vars"][dd_name].values())}
good_cols = {x for x in flatten(settings["dd_to_vars"]["jan2013"].values())}
all_cols = cols.union(good_cols)
subset = df.columns.intersection(all_cols)
if not quiet:
pr... | [
"def selectColumns(df, constraint):\n columns = [c for c in df.columns if constraint(c)]\n return df[columns].copy()",
"def select_cols(df,list_col):\n df = df[list_col] ##loading data using read_csv from pandas\n return df #returning the data structure ",
"def test_select_column_step_must_sub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Rename cols in df according to the spec in settings for that year. | def standardize_cols(df, dd_name, settings):
renamer = settings["col_rename_by_dd"][dd_name]
df = df.rename(columns=renamer)
common = {"PRTAGE", "HRMIS", "HRYEAR4", "PESEX", "HRMONTH", "PTDTRACE",
"PEMLR", "PRERNWA", "PTWK", "PEMARITL", "PRDISC",
"HEFAMINC", "PTDTRACE", "HWHHWGT... | [
"def __rename_used_cols(df, train_cols: list):\n return df.rename(columns={col: C.USED_COL_FORMAT.format(col) for col in train_cols})",
"def rename_columns(df, pheno, pop):\n\n if \"LOG(OR)_SE\" in df.columns:\n df.rename(columns={\"LOG(OR)_SE\": \"SE\"}, inplace=True)\n columns_to_rename = [\"BET... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For 89 and 92; "AdHRS1", "AdHRS2" combine to form "PEHRACTT" | def combine_hours(df, dd_name):
fst = df['AdHRS1']
snd = df['AdHRS2']
df['PEHRACTT'] = fst * 10 + snd
df = df.drop(["AdHRS1", "AdHRS2"], axis=1)
return df | [
"def build_term_code(year_semester: str, abbr: str) -> str:\n if abbr != \"GV\" and abbr != \"QT\":\n return year_semester + \"1\"\n else:\n if abbr == \"GV\":\n return year_semester + \"2\"\n else:\n return year_semester + \"3\"",
"def correct_name(hour):\n hou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Onboard the OMSAgent to the specified OMS workspace. This includes enabling the OMS process on the machine. This call will return nonzero if the settings provided are incomplete or incorrect. | def enable(hutil):
exit_if_vm_not_supported(hutil, 'Enable')
public_settings, protected_settings = get_settings(hutil)
if public_settings is None:
raise OmsAgentParameterMissingError('Public configuration must be ' \
'provided')
if protected_settings ... | [
"def setup_omsagent(configurator, run_command, logger_log, logger_error):\n # Remember whether OMI (not omsagent) needs to be freshly installed.\n # This is needed later to determine whether to reconfigure the omiserver.conf or not for security purpose.\n need_fresh_install_omi = not os.path.exists('/opt/o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the VM this extension is running on is supported by OMSAgent Returns for platform.linux_distribution() vary widely in format, such as '7.3.1611' returned for a machine with CentOS 7, so the first provided digits must match The supported distros of the OMSAgentforLinux, as well as Ubuntu 16.10, are allowed to ... | def is_vm_supported_for_extension():
supported_dists = {'redhat' : ('5', '6', '7'), # CentOS
'centos' : ('5', '6', '7'), # CentOS
'red hat' : ('5', '6', '7'), # Oracle, RHEL
'oracle' : ('5', '6', '7'), # Oracle
'debian' : ('... | [
"def os_version_check():\n with hide('running', 'stdout'):\n version = run('cat /etc/issue')\n return True if 'Ubuntu 10.04' in versio else False",
"def test_os_detection():\n host = ipaddress.ip_address(u\"92.222.10.88\")\n scanner = Scanner(host, mock=True, sudo=True)\n scanner.perform_sca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate formats of workspace_id and workspace_key | def check_workspace_id_and_key(workspace_id, workspace_key):
# Validate that workspace_id matches the GUID regex
guid_regex = r'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
search = re.compile(guid_regex, re.M)
if not search.match(workspace_id):
raise OmsAgentIn... | [
"def project_id_validator(s: str):\n value: Optional[str]\n is_valid, value, msg = False, None, None\n\n if not project_helper.project_id_is_valid(s):\n msg = ('The project id is invalid.\\n'\n 'A project id can only contain letters, numbers, or underscores with at ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Some commands fail because the package manager is locked (aptget/dpkg only); this will allow retries on failing commands. | def run_command_with_retries(hutil, cmd, retries, check_error = True,
log_cmd = True, initial_sleep_time = 30,
sleep_increase_factor = 1):
try_count = 0
sleep_time = initial_sleep_time # seconds
dpkg_locked_search = r'^.*dpkg.+lock.*$'
dpkg_locke... | [
"def _retry_command(self, command_list, text, prefix, verbose=None):\n\n run_command = check_output\n if self.verbose or verbose:\n run_command = call\n\n for retry in range(self.max_retries):\n retry += 1\n try:\n output = run_command(command_list, env=self.env)\n except Excepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set and retrieve the contents of HandlerEnvironment.json as JSON | def get_handler_env():
global HandlerEnvironment
if HandlerEnvironment is None:
handler_env_path = os.path.join(os.getcwd(), 'HandlerEnvironment.json')
try:
with open(handler_env_path, 'r') as handler_env_file:
handler_env_txt = handler_env_file.read()
han... | [
"def load_backend() -> json:\n\treturn _load_config(\"env.json\")",
"def load():\n flask_env = os.environ[\"FLASK_ENV\"]\n\n with open(f\"settings.{flask_env}.json\", \"r\") as f:\n return Dict(json.load(f))",
"def get_setup_json():\n with open(FILEPATH_SETUP_JSON, \"r\") as handle:\n set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Mimic waagent mothod RunGetOutput in case waagent is not available Run shell command and return exit code and output | def run_get_output(cmd, chk_err = False, log_cmd = True):
if 'Utils.WAAgentUtil' in sys.modules:
# WALinuxAgent-2.0.14 allows only 2 parameters for RunGetOutput
# If checking the number of parameters fails, pass 2
try:
sig = inspect.signature(waagent.RunGetOutput)
par... | [
"def test_shell_with_return_code(self):\n response, code = self.device.shell_capability.shell(\n self.test_config[\"shell_cmd\"], include_return_code=True)\n self.assertTrue(response)\n self.assertIsInstance(response, str)\n self.assertEqual(code, _SUCCESS_RETURN_CODE)",
"def _run_command(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize waagent logger If waagent has not been imported, catch the exception | def init_waagent_logger():
try:
waagent.LoggerInit('/var/log/waagent.log','/dev/stdout', True)
except Exception as e:
print('Unable to initialize waagent log because of exception ' \
'{0}'.format(e)) | [
"def _init_logger(self):\n #self._logger = logger_factory.make_logger(__name__)",
"def __init__(self):\n self._logger = logging.getLogger(__name__)",
"def _init_log():\n global log\n\n orig_logger_cls = logging.getLoggerClass()\n logging.setLoggerClass(EyeLogger)\n try:\n log = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log informational message, being cautious of possibility that waagent may not be imported | def waagent_log_info(message):
if 'Utils.WAAgentUtil' in sys.modules:
waagent.Log(message)
else:
print('Info: {0}'.format(message)) | [
"def info(self,msg):\n self.logger.info(msg)",
"def log_message(self) -> global___LogMessage:",
"def logger_info(self,text):\n logging.info(self.log_my_name()+' '+text)",
"def info(msg):\n message(msg, flag='i')",
"def logger_debug(self,text):\n logging.debug(self.log_my_name()+' '+t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log error message, being cautious of possibility that waagent may not be imported | def waagent_log_error(message):
if 'Utils.WAAgentUtil' in sys.modules:
waagent.Error(message)
else:
print('Error: {0}'.format(message)) | [
"def log_error(e):\r\n\tprint(e)",
"def logger_error(self,text):\n logging.error(self.log_my_name()+' '+text)",
"def error(msg):\n global logger\n logger.error(msg)",
"def error(self, message):\n pass",
"def error(self, message: str, **extra: t.Any):\n self.log(logging.ERROR, mess... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log informational message, being cautious of possibility that hutil may not be imported and configured | def hutil_log_info(hutil, message):
if hutil is not None:
hutil.log(message)
else:
print('Info: {0}'.format(message)) | [
"def hutil_log_error(hutil, message):\n if hutil is not None:\n hutil.error(message)\n else:\n print('Error: {0}'.format(message))",
"def info(self,msg):\n self.logger.info(msg)",
"def handle_info(self, message, info_name=None):\n\n msg = ''\n if info_name is not None:\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log error message, being cautious of possibility that hutil may not be imported and configured | def hutil_log_error(hutil, message):
if hutil is not None:
hutil.error(message)
else:
print('Error: {0}'.format(message)) | [
"def log_error(e):\r\n\tprint(e)",
"def logger_error(self,text):\n logging.error(self.log_my_name()+' '+text)",
"def error(msg):\n global logger\n logger.error(msg)",
"def log_error(self):\n return \"\"\"--log-error=file_name\"\"\"",
"def log_error(self, message: str):\n self.logg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create Shipping in db | def create(session, params):
shipment = models.Shipping()
shipment.shippingName = params["shipping_name"]
shipment.bltimeStamp = datetime.datetime.now()
shipment.creationDate = datetime.datetime.now()
# FK to proposal
shipment.proposalId = params["proposal_id"]
shipment.sendingLabContactId ... | [
"def create_shipping(info: ShippingModel):\n data = storage.all('Shipping')\n id_ = 1 if data is None else max((one.id_ for one in data)) + 1\n obj = Shipping(id_, **info.__dict__)\n storage.new(obj)\n msg = storage.save()\n return msg if msg else {\n 'shipping': 'shipping created',\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Breaks the glyphname into a two item list | def breakSuffix(glyphname):
if glyphname.find('.') != -1:
split = glyphname.split('.')
return split
else:
return None | [
"def controls(glyphname):\n\tcontrolslist =\t[]\n\tfor value in controldict.values():\n\t\tfor v in value:\n\t\t\tfor i in v.split('/'):\n\t\t\t\tif len(i) > 0:\n\t\t\t\t\tif i not in controlslist:\n\t\t\t\t\t\tcontrolslist.append(i)\t\n\tcs = ''\n\tif glyphname in controlslist:\n\t\tfor key in controldict.keys():\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the base glyph of an accented glyph | def findAccentBase(accentglyph):
base = splitAccent(accentglyph)[0]
return base | [
"def get_complementary_base(b):\n if b=='A':\n return 'T'\n elif b=='T':\n return 'A'\n elif b=='C':\n return 'G'\n elif b=='G':\n return 'C'\n else:\n print 'ERROR: Check String Input'",
"def getGlyph(self, char):\n return FontGlyph(char, self, self.cairoC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Split an accented glyph into a two items | def splitAccent(accentglyph):
base = None
suffix = ''
accentList=[]
broken = breakSuffix(accentglyph)
if broken is not None:
suffix = broken[1]
base = broken[0]
else:
base=accentglyph
ogbase=base
temp_special = lowercase_special_accents + uppercase_special_accents
if base in lowercase_plain + uppercase_p... | [
"def accent_letters(self, letters=latin):\n if self.isaccent():\n for l in letters:\n a = l + self.combining_accent\n b = unicodedata.normalize(\"NFC\", a)\n if len(b) == 1:\n yield (l, b)",
"def glyphs(self, text):\r\n # fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert all possible characters to uppercase in a glyph string. | def upper(glyphstring):
_InternalCaseFunctions().expandcasedict()
uc = []
for i in glyphstring.split('/'):
if i.find('.sc') != -1:
if i[-3] != '.sc':
x = i.replace('.sc', '.')
else:
x = i.replace('.sc', '')
i = x
suffix = ''
bS = breakSuffix(i)
if bS is not None:
suffix = bS[1]
i... | [
"def convert_pybites_chars(text):\r\n text = text.capitalize()\r\n for char in PYBITES:\r\n text = text.replace(char, char.upper())\r\n if text[0].lower() in PYBITES:\r\n text = text[0].lower() + text[1:]\r\n return text",
"def str_to_ascii_upper_case(s):\n return ''.join([c.upper() if ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert all possible characters to smallcaps in a glyph string. | def small(glyphstring):
_InternalCaseFunctions().expandcasedict()
_InternalCaseFunctions().expandsmallcapscasedict()
sc = []
for i in glyphstring.split('/'):
suffix = ''
bS = breakSuffix(i)
if bS is not None:
suffix = bS[1]
if suffix == 'sc':
suffix = ''
i = bS[0]
if i in lowercase:
if i n... | [
"def convert_pybites_chars(text):\r\n text = text.capitalize()\r\n for char in PYBITES:\r\n text = text.replace(char, char.upper())\r\n if text[0].lower() in PYBITES:\r\n text = text[0].lower() + text[1:]\r\n return text",
"def smallcapName( glyphName=\"scGlyph\", suffix=\".sc\", lowerca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send this a glyph name and get a control string with all glyphs separated by slashes. | def controls(glyphname):
controlslist = []
for value in controldict.values():
for v in value:
for i in v.split('/'):
if len(i) > 0:
if i not in controlslist:
controlslist.append(i)
cs = ''
if glyphname in controlslist:
for key in controldict.keys():
for v in controldict[key]:
if glyphn... | [
"def glyphs(self, text):\r\n # fix: hackish\r\n text = re.sub(r'\"\\Z', '\\\" ', text)\r\n\r\n glyph_search = (\r\n # apostrophe's\r\n re.compile(r\"(\\w)\\'(\\w)\"),\r\n # back in '88\r\n re.compile(r'(\\s)\\'(\\d+\\w?)\\b(?!\\')'),\r\n #... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Roughly sort a list of control strings. | def sortControlList(list):
controls = []
for v in controldict.values():
for w in v:
for x in w.split('/'):
if len(x) is not None:
if x not in controls:
controls.append(x)
temp_digits = digits + digits_oldstyle + fractions
temp_currency = currency + currency_oldstyle
ss_uppercase = []
ss_low... | [
"def sortCaseInsensitive():\n pass",
"def reorder_strucs_in_canonical_order_and_omit_punctuation(struc_list):\r\n\r\n labeled_struc_list = [struc for struc in struc_list if not struc.is_space_or_punctuation_only()]\r\n labeled_struc_list.sort(key = lambda struc: (canonical_struc_order.index(struc.label) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return no existing user token and item name | def NO_EXISTING_TOKEN():
return {
"token":"token_invalid",
"name":"myobject1"
} | [
"def NO_EXISTING_ITEM():\r\n ###TODO must be query db or get request\r\n return {\r\n \"item_id\":\"100\", \r\n }",
"def get_single_user():",
"def user(self) -> Optional[str]:\n\n if header := self.data.get(\"User\"):\n return header.name\n return None",
"d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return no existing item | def NO_EXISTING_ITEM():
###TODO must be query db or get request
return {
"item_id":"100",
} | [
"def test_getNonexistant(self):\n failure = self.failureResultOf(self.storage.get([\"BOGUS\"]))\n failure.trap(exceptions.NoSuchStoreException)",
"def _get_item_no_load(self):\r\n for index, iterator in enumerate(self._loaded_files):\r\n try:\r\n item = next(iterator... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve el NER del modelo si existe o un NER en blanco en caso que no exista. | def __get_model_ner(self):
if not self.is_loaded():
return None
return ModelLoader.get_model_ner(self.__reference) | [
"def _check_model_path(self):\n root = os.path.expanduser('~')\n model_path = os.path.join(root, 'cltk_data', self.language, 'model',\n self.language + '_models_cltk', 'taggers',\n 'pos', 'model.la')\n assert os.path.isfile(model... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(num, num, num) > (num) This function receives initial velocity, launch angle, and altitude change in the landing position and returns the horizontal range of a projectile. v is in [m/s] theta is in [degrees] del_h is in [m] >>> range = horizontal_distance(100, 20, 40) >>> range 515.5652309241808 | def horizontal_distance(v, theta, del_h):
gravitational_acceleration = 9.81
theta_converted = theta * (math.pi/180) #converts theta from given degrees to radians
#split range equation into four parts so it's cleaner when pieced together
first_term = v*math.cos(theta_converted)
second_term= (v*m... | [
"def HorizontalLineLimits(self, horizontalTrial):\n x,y = self.point\n x2,y2 = self.point2\n if self.direction is UP or self.direction is DOWN:\n top = min(y, y2)\n bottom = max(y, y2)\n if horizontalTrial.ptOrigin[1] >= top and horizontalTrial.ptOrigin[1] <= bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate weighted percentiles. Multiple percentiles may be passed as a list | def calculate_weighted_percentiles(data, wt, percentiles):
assert np.greater_equal(percentiles,
0.0).all(), "Percentiles less than zero"
assert np.less_equal(percentiles,
1.0).all(), "Percentiles greater than one"
data = np.asarray(... | [
"def percentile(data, percentiles, weights=None):\n # check if actually weighted percentiles is needed\n if weights is None:\n return np.percentile(data, list(percentiles))\n if np.equal(weights, 1.).all():\n return np.percentile(data, list(percentiles))\n\n # make sure percentiles are fra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decorator that creates new Click command and adds it to command list. | def command(self, *args, **kwargs) -> Callable:
def inner(func):
command = click.command(*args, **kwargs)(func)
self.commands.append(command)
return command
return inner | [
"def command(*args, **kwargs):\r\n\r\n def decorator(function):\r\n return Command(function, **kwargs)\r\n\r\n if args:\r\n return decorator(*args)\r\n return decorator",
"def command(self, func=None, **kwargs):\n def decorator(func):\n self._register_command(func, **kwarg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers all commands to the given group. | def register_to(self, group: click.Group) -> None:
for command in self.commands:
group.add_command(command) | [
"def register_all_groups():\n register_group_default()",
"def add_subcommands(command_group, plugin_manager):",
"def add_target_command_groups(self, target: \"SoCTarget\", command_set: \"CommandSet\"):\n pass",
"def add_all_commands(parser):\n for command in pymod.command.all_commands():\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use this data source to access information about an existing Enrollment Account Billing Scope. Example Usage ```python import pulumi import pulumi_azure as azure example = azure.billing.get_enrollment_account_scope(billing_account_name="existing", enrollment_account_name="existing") pulumi.export("id", example.id) ``` | def get_enrollment_account_scope(billing_account_name: Optional[str] = None,
enrollment_account_name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEnrollmentAccountScopeResult:
__args__ = dict()
__args__['bill... | [
"def get_enrollment_account_scope_output(billing_account_name: Optional[pulumi.Input[str]] = None,\n enrollment_account_name: Optional[pulumi.Input[str]] = None,\n opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetEnrollmen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use this data source to access information about an existing Enrollment Account Billing Scope. Example Usage ```python import pulumi import pulumi_azure as azure example = azure.billing.get_enrollment_account_scope(billing_account_name="existing", enrollment_account_name="existing") pulumi.export("id", example.id) ``` | def get_enrollment_account_scope_output(billing_account_name: Optional[pulumi.Input[str]] = None,
enrollment_account_name: Optional[pulumi.Input[str]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetEnrollmentAccoun... | [
"def get_enrollment_account_scope(billing_account_name: Optional[str] = None,\n enrollment_account_name: Optional[str] = None,\n opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEnrollmentAccountScopeResult:\n __args__ = dict()\n __arg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print Database User Lock Information | def userlock(self):
sql = """SELECT
username,
account_status
FROM dba_users
WHERE (account_status LIKE '%EXPIRED%'
OR account_status LIKE '%LOCKED%\')
AND username NOT in('DBSNMP','DMSYS','ORACLE_OCM', 'OLAPSYS', 'WMSYS', 'XDB', 'SCOTT', 'OUTLN', '... | [
"def lock_info(self):\n infos = []\n\n locks = Lock.query.valid_locks(self.object_type, self.object_id)\n for lock in locks:\n infos.append({'creator': lock.creator,\n 'time': lock.time,\n 'token': lock.token,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register a Minid for a file. | def register(filename, title, locations, replaces, test, json):
mc = commands.get_client()
kwargs = parse_none_values([
('replaces', replaces, None),
('locations', locations.split(',') if locations else None, []),
])
minid = mc.register_file(filename, title=title, test=test, **kwargs)
... | [
"def setup_id_file(self):\n\n with open(self.id_path, \"w+\") as f_id:\n\n f_id.write(str(UniqueID.create_id()))",
"def register_raw_file(self, nifti_file):\n\n # insert the NIfTI file\n self.fetch_and_insert_nifti_file(nifti_file)",
"def add_file(self, filename, UUID):\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register a batch of Minids from an RFM or file stream Batch Register can either be passed a file to a Remote File Manifest JSON file, or streamed where each entry in the stream is an RFM formatted dict. | def batch_register(filename, test, update_if_exists):
batch_register = commands.get_client().batch_register(filename, test,
update_if_exists=update_if_exists)
click.echo(json.dumps(batch_register, indent=2)) | [
"def register(filename, title, locations, replaces, test, json):\n mc = commands.get_client()\n kwargs = parse_none_values([\n ('replaces', replaces, None),\n ('locations', locations.split(',') if locations else None, []),\n ])\n minid = mc.register_file(filename, title=title, test=test, *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send message to recipient using SMS, on failure call on_error. | def send_sms(self, recipient, message, on_error):
# Shorten the message because SMS is precious
if len(message) > 320:
sms_message_to_send = message[:317] + "..."
else:
sms_message_to_send = message
send = self.sms.send_sms(sender=recipient,
... | [
"def send_msg(to_number, message):\r\n smsagent = SMSAgent();\r\n smsagent.send_msg(to_number, message)",
"def _google_voice_sms(phone_number, msg):\r\n try:\r\n _voice.send_sms(phone_number, msg)\r\n except googlevoice.ValidationError:\r\n # I seem to be getting these but the text messa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send msg to user, if no ack received try SMS. | def wait_for_ack(self, user, msg):
def sms_failed(failure):
self.messagehandler.send_chat(
user, "My SMS attempt failed, sorry.")
def no_ack(recipient):
self.messagehandler.send_chat(
recipient, "I didn't get a response so I'll try SMS.")
... | [
"def send(self, msg):\n\n # send length\n send_only_msg(len(pickle.dumps(msg)))\n\n # wait for confirmation\n if (recv_only_msg() == 'ack'):\n\n # send msg\n send_only_msg(msg)\n\n # if didn't recv ack for some reason\n else:\n raise Connect... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiate the Users, Airline, Review, and RequestFactory instances needed for testing. | def setUp(self):
self.factory = RequestFactory()
self.user = User.objects.create(username='Abdullah',
email='abd@gmail.com',
password="Abdullah's passwd")
self.airline = Airline.objects.create(title='United Airlines'... | [
"def setUp(self):\n self.factory = APIRequestFactory()\n self.user = User.objects.create(\n username='testuser',\n email='loser@loser.com',\n password='password'\n )\n self.user_pref = {\n 'user':self.user,\n 'age':'y, a, s',\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiate the Users, Airline, Review, and RequestFactory instances needed for testing. | def setUp(self):
self.factory = RequestFactory()
self.user = User.objects.create(username='Abdullah',
email='abd@gmail.com',
password="Abdullah's passwd")
self.airline = Airline.objects.create(title='United Airlines'... | [
"def setUp(self):\n self.factory = APIRequestFactory()\n self.user = User.objects.create(\n username='testuser',\n email='loser@loser.com',\n password='password'\n )\n self.user_pref = {\n 'user':self.user,\n 'age':'y, a, s',\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An airline is still visibile after the user who posted it is deleted from the database. | def test_see_airline_after_user_deletion(self):
pass | [
"def delete_by_user(self):\n\n self.availability_flag = False\n self.save()",
"def deactivatable(self):\n\n\t\traise foundations.exceptions.ProgrammingError(\n\t\t\"{0} | '{1}' attribute is not deletable!\".format(self.__class__.__name__, \"deactivatable\"))",
"def revoke_dataset_access(self):\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Can check if key is not in client | def test_not_in(self):
client = etcd.Client()
client.get = mock.Mock(side_effect=etcd.EtcdKeyNotFound())
result = '/testkey' not in client
self.assertEquals(True, result) | [
"def validate_client_key(self, client_key, request):\r\n log.debug('Validate client key for %r', client_key)\r\n if not request.client:\r\n request.client = self._clientgetter(client_key=client_key)\r\n if request.client:\r\n return True\r\n return False",
"def as... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads a .wav file, returning the sound data. If stereo, converts to mono by averaging the two channels | def load_wav(fname):
rate, data = wavfile.read(fname)
if len(data.shape) > 1 and data.shape[1] > 1:
data = data[:, 0] + data[:, 1] # stereo -> mono
length = data.shape[0] / rate
print(f"Loaded sound file {fname}.")
return rate, data, length | [
"def mono_only(wavfile):\n open_wav = wave.open(wavfile, 'r')\n wav_channels = open_wav.getnchannels()\n file_mono = open_wav\n if wav_channels != 1:\n open_wav = wave.open(wavfile)\n wav_frames = open_wav.getnframes()\n wav_read = open_wav.readframes(wav_frames)\n wavpairs =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An input function for training | def train_input_fn():
dataset = data.get_training_dataset()
return dataset | [
"def eval_input_fn():\n dataset = tf.data.TFRecordDataset(\"test\")\n dataset = dataset.map(_parse_function)\n dataset = dataset.batch(32)\n return dataset.make_one_shot_iterator().get_next()",
"def _create_input_fn(self, label_dimension, batch_size):\n data = np.linspace(0., 2., batch_size * label... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The value that was passed to the parameter | def parameter_value(self):
return self._param_value | [
"def p_value(self):\n return self.field_control_params[0]",
"def get_parameter(self) -> str:\n return self.parameter",
"def i_value(self):\n return self.field_control_params[1]",
"def get_value(self):\n return self._variable_value",
"def get_param(self, name):\n return(sel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unregisters the specified callback function | def unregister_callback(callback_func):
if callback_func in _callbacks:
_callbacks.remove(callback_func) | [
"def unregister(self, callback):\n for n, reg in enumerate(self.__registry):\n if reg[\"callback\"] == callback:\n del self.__registry[n]\n self.driftwood.log.info(\"Tick\", \"unregistered\",\n callback.__qualname__)",
"def rem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends the specified failure information to all registered callback handlers. | def failure_dispatch(failureinfo):
global _callbacks
for cb in _callbacks:
assert isinstance(failureinfo, ValidationFailureInfo)
try:
cb(failureinfo)
except Exception as ex:
# If a particular callback throws an exception, we do not want
# that to pre... | [
"def _callback_on_error(self):\n try:\n yield\n except:\n self._error_count += 1\n self._do_callback()\n raise",
"def notify_failure(self, notify_failure):\n\n self._notify_failure = notify_failure",
"def on_failure(self, failure: VerificationFail... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check whether software version or sample set has changed. | def _changed(self, samples):
with self._open('r') as f:
if f.attrs['version'] != __version__:
return True
if not _np.array_equal(f['thetas'], samples):
return True
return False | [
"def test_no_tracker_file_version_old(self):\n if os.path.exists(self.timestamp_file_path):\n os.remove(self.timestamp_file_path)\n self.assertFalse(os.path.exists(self.timestamp_file_path))\n self.version_mod_time = 0\n expected = not self._IsPackageOrCloudSDKInstall()\n self.assertEqual(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Archive an existing cache file. | def _archive(self):
# to archive the existing cache file
archive_dir = _os.path.join(self._cache_dir, 'archive')
try:
if not _os.path.isdir(archive_dir):
_os.mkdir(archive_dir)
except OSError:
yield ('Archiving failed... cache file %s will be '
... | [
"def archive_file(filepath, archivepath):\n with zipfile.ZipFile(archivepath, 'w', zipfile.ZIP_DEFLATED) as archive:\n archive.write(filepath)",
"def archive(self, file):\n with zipfile.ZipFile(file, \"w\") as archive:\n # Write archive members in deterministic order and with determini... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for hostname, mapped from YANG variable /access_points/access_point/config/hostname (leafref) | def _set_hostname(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=six.text_type, is_leaf=True, yang_name="hostname", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/wifi/ac... | [
"def _set_hostname(self, v, load=False):\n parent = getattr(self, \"_parent\", None)\n if parent is not None and load is False:\n raise AttributeError(\"Cannot set keys directly when\" +\n \" within an instantiated list\")\n\n if hasattr(v, \"_utype\"):\n v = v._utype(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for transmit_power, mapped from YANG variable /access_points/access_point/radios/radio/config/transmit_power (int8) | def _set_transmit_power(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_siz... | [
"def set_transmit_power(self, power):\n (status, null) = self.__device.set_transmit_power(int(power,0))\n if(status != 0x01):\n print self.__device.decode_error_status(status)",
"def set_tx_power(self, tx_power):\r\n valid_tx_power_values = [-40, -20, -16, -12, -8, -4, 0, 3, 4]\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for transmit_eirp, mapped from YANG variable /access_points/access_point/radios/radio/config/transmit_eirp (uint8) | def _set_transmit_eirp(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="transmit-eirp", parent=self, path_helper=self._path_helper, extmethods=s... | [
"def _set_rssi(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), is_leaf=True, yang_name=\"rssi\", parent=self, path_helper=self._path_helper, extmethods=sel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for channel, mapped from YANG variable /access_points/access_point/radios/radio/config/channel (uint8) | def _set_channel(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..165']}), is_leaf=True, yang_name="channel... | [
"def _set_channel(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..165']}), is_leaf=True, yang_na... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for channel_width, mapped from YANG variable /access_points/access_point/radios/radio/config/channel_width (uint8) | def _set_channel_width(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(20... | [
"def _set_num_channels(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name=\"num-channels\", parent=self, path_helper=self._path_helper, e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for dca, mapped from YANG variable /access_points/access_point/radios/radio/config/dca (boolean) | def _set_dca(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="dca", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/y... | [
"def is_ca(self) -> pulumi.Input[bool]:\n return pulumi.get(self, \"is_ca\")",
"def set_dcc_selection(self, value):\n assert type(value) is bool\n read = bytearray(self._device.readRaw(PI3HDMI336_TOTAL_BYTES))\n read[PI3HDMI336_OFFSET_BYTE1] = \\\n (read[PI3HDMI336_OFFSET_BY... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for dtp, mapped from YANG variable /access_points/access_point/radios/radio/config/dtp (boolean) | def _set_dtp(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="dtp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/y... | [
"def _set_trust_dscp(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGBool, default=YANGBool(\"true\"), is_leaf=True, yang_name=\"trust-dscp\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, names... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for dtp_min, mapped from YANG variable /access_points/access_point/radios/radio/config/dtp_min (int8) | def _set_dtp_min(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8)(3)... | [
"def min_start_time(self, min_start_time):\n if min_start_time is not None and len(min_start_time) > 5:\n raise ValueError(\"Invalid value for `min_start_time`, length must be less than or equal to `5`\") # noqa: E501\n\n self._min_start_time = min_start_time",
"def minimum_temperature(s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for dtp_max, mapped from YANG variable /access_points/access_point/radios/radio/config/dtp_max (int8) | def _set_dtp_max(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8)(15... | [
"def set_max_rate_deviation(self, *args, **kwargs):\n return _digital_swig.digital_pfb_clock_sync_fff_sptr_set_max_rate_deviation(self, *args, **kwargs)",
"def target_temperature_max(self) -> Optional[float]:\n if self._state is None:\n return None\n limits = self._device_conf.get(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for antenna_gain, mapped from YANG variable /access_points/access_point/radios/radio/config/antenna_gain (int8) | def _set_antenna_gain(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), is_leaf=True, yang_name="antenna-gain", parent=self, path_helper=self._path_helper, extmethods=... | [
"def set_pga_gain(self, pga_num, gain):\n\t\treturn self.config_ads(pga_num, 2, gain)",
"def set_analog_gain(self, gain):\n if gain < 0:\n raise ValueError('Gain register must be greater than 0.')\n self.i2c.mem_write(int(gain), self.bus_addr, 1)",
"def _set_gain(self, adjustment: int) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning, mapped from YANG variable /access_points/access_point/radios/radio/config/scanning (boolean) | def _set_scanning(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="scanning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openco... | [
"def is_scan_enabled(self):\n return self._is_scan_enabled",
"def SendStartScanSignal(self):\n self._scanning = True",
"def _set_scanning_interval(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning_interval, mapped from YANG variable /access_points/access_point/radios/radio/config/scanning_interval (uint8) | def _set_scanning_interval(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="scanning-interval", parent=self, path_helper=self._path_helper, extm... | [
"def scan_interval(self, scan_interval):\n\n self._scan_interval = scan_interval",
"def option_scan_interval(self):\n scan_interval = self.config_entry.options.get(CONF_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL)\n return timedelta(seconds=scan_interval)",
"def _set_polling_interval(self, v, load... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning_dwell_time, mapped from YANG variable /access_points/access_point/radios/radio/config/scanning_dwell_time (uint16) | def _set_scanning_dwell_time(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="scanning-dwell-time", parent=self, path_helper=self._path_helper... | [
"def _set_blacklist_time(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name=\"blacklist-time\", parent=self, path_helper=self._path_hel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning_defer_clients, mapped from YANG variable /access_points/access_point/radios/radio/config/scanning_defer_clients (uint8) | def _set_scanning_defer_clients(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="scanning-defer-clients", parent=self, path_helper=self._path_he... | [
"def _set_clients(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_clients_openconfig_wifi_mac__ssids_ssid_clients, is_container='container', yang_name=\"clients\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, regist... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning_defer_traffic, mapped from YANG variable /access_points/access_point/radios/radio/config/scanning_defer_traffic (boolean) | def _set_scanning_defer_traffic(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="scanning-defer-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://open... | [
"def ingress_traffic_allowed(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"ingress_traffic_allowed\")",
"def bandwidth_corrected(self, value: Optional[Boolean]):\n\n if value is not None:\n attest(\n isinstance(value, bool),\n f'\"bandwidt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for noise_floor, mapped from YANG variable /access_points/access_point/radios/radio/state/counters/noise_floor (int8) | def _get_noise_floor(self):
return self.__noise_floor | [
"def noise_floor(self):\n return 2",
"def find_least_noise(self, low_slice, high_slice, directory='D:/Research/Python Data/Spectral CT/'):\n subfolder = '/Slices/'\n path = self.save_dir + subfolder\n vials = np.load(self.save_dir + '/Vial_Masks.npy')\n noise_vals = np.zeros(hig... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for noise_floor, mapped from YANG variable /access_points/access_point/radios/radio/state/counters/noise_floor (int8) | def _set_noise_floor(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), is_leaf=True, yang_name="noise-floor", parent=self, path_helper=self._path_helper, extmethods=se... | [
"def noise_floor(self):\n return 2",
"def find_least_noise(self, low_slice, high_slice, directory='D:/Research/Python Data/Spectral CT/'):\n subfolder = '/Slices/'\n path = self.save_dir + subfolder\n vials = np.load(self.save_dir + '/Vial_Masks.npy')\n noise_vals = np.zeros(hig... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for enabled, mapped from YANG variable /access_points/access_point/radios/radio/state/enabled (boolean) | def _set_enabled(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconf... | [
"def _is_enabled(self, state):\n enabled = True\n\n if isinstance(self._enabled, State):\n enabled = bool(state.get(\n self._enabled.name, self._enabled.default))\n\n else:\n enabled = bool(self._enabled)\n\n return enabled",
"def _set_enabled(self,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for transmit_power, mapped from YANG variable /access_points/access_point/radios/radio/state/transmit_power (int8) | def _set_transmit_power(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_siz... | [
"def _set_transmit_power(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127'... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for transmit_eirp, mapped from YANG variable /access_points/access_point/radios/radio/state/transmit_eirp (uint8) | def _set_transmit_eirp(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="transmit-eirp", parent=self, path_helper=self._path_helper, extmethods=s... | [
"def _set_steering_rssi(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), is_leaf=True, yang_name=\"steering-rssi\", parent=self, path_helper=self._path_help... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for channel, mapped from YANG variable /access_points/access_point/radios/radio/state/channel (uint8) | def _set_channel(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..165']}), is_leaf=True, yang_name="channel... | [
"def _set_channel(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..165']}), is_leaf=True, yang_na... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for channel_width, mapped from YANG variable /access_points/access_point/radios/radio/state/channel_width (uint8) | def _set_channel_width(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(20... | [
"def set_chan_width(self, chan, width):\n self._set_chan_width(chan, width)",
"def _set_num_channels(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for dca, mapped from YANG variable /access_points/access_point/radios/radio/state/dca (boolean) | def _set_dca(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="dca", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/y... | [
"def dns_active(self, dns_active: bool):\n self._indicator_data['flag1'] = self.util.to_bool(dns_active)",
"def set_cd(self, b):\n _ldns.ldns_pkt_set_cd(self, b)\n #parameters: ldns_pkt *,bool,\n #retvals: ",
"def is_ca(self) -> pulumi.Input[bool]:\n return pulumi.get(self, \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for dtp, mapped from YANG variable /access_points/access_point/radios/radio/state/dtp (boolean) | def _set_dtp(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="dtp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/y... | [
"def _set_trust_dscp(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGBool, default=YANGBool(\"true\"), is_leaf=True, yang_name=\"trust-dscp\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, names... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for dtp_min, mapped from YANG variable /access_points/access_point/radios/radio/state/dtp_min (int8) | def _set_dtp_min(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8)(3)... | [
"def minimum_temperature(self, value: float) -> None:\n self._min_temp = value",
"def state_min(self):\n return self.__state_min",
"def min_start_time(self, min_start_time):\n if min_start_time is not None and len(min_start_time) > 5:\n raise ValueError(\"Invalid value for `min_s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for dtp_max, mapped from YANG variable /access_points/access_point/radios/radio/state/dtp_max (int8) | def _set_dtp_max(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8)(15... | [
"def target_temperature_max(self) -> Optional[float]:\n if self._state is None:\n return None\n limits = self._device_conf.get(\"max\", {})\n return limits.get(str(_operation_mode_to(self.operation_mode)), {}).get(\"max\", 31)",
"def state_max(self):\n return self.__state_ma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for antenna_gain, mapped from YANG variable /access_points/access_point/radios/radio/state/antenna_gain (int8) | def _set_antenna_gain(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['-128..127']}, int_size=8), is_leaf=True, yang_name="antenna-gain", parent=self, path_helper=self._path_helper, extmethods=... | [
"def set_analog_gain(self, gain):\n if gain < 0:\n raise ValueError('Gain register must be greater than 0.')\n self.i2c.mem_write(int(gain), self.bus_addr, 1)",
"def set_pga_gain(self, pga_num, gain):\n\t\treturn self.config_ads(pga_num, 2, gain)",
"def _set_gain(self, adjustment: int) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning, mapped from YANG variable /access_points/access_point/radios/radio/state/scanning (boolean) | def _set_scanning(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, default=YANGBool("true"), is_leaf=True, yang_name="scanning", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openco... | [
"def SendStartScanSignal(self):\n self._scanning = True",
"def is_scan_enabled(self):\n return self._is_scan_enabled",
"def pitch_scan_status_changed(self, status):\n self.scan_status = status",
"def _scan(self):\n # Set the scan parameters\n if self._data_range is not None:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning_interval, mapped from YANG variable /access_points/access_point/radios/radio/state/scanning_interval (uint8) | def _set_scanning_interval(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="scanning-interval", parent=self, path_helper=self._path_helper, extm... | [
"def _set_scanning_interval(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name=\"scanning-interval\", parent=self, path_helper=self._path... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning_dwell_time, mapped from YANG variable /access_points/access_point/radios/radio/state/scanning_dwell_time (uint16) | def _set_scanning_dwell_time(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="scanning-dwell-time", parent=self, path_helper=self._path_helper... | [
"def time_selection(self):\r\n\t\tbus.write_byte_data(TMD2671_DEFAULT_ADDRESS, TMD2671_REG_PTIME | TMD2671_COMMAND_BIT, TMD2671_REG_PTIME_2_72)\r\n\t\t\r\n\t\t\"\"\"Select the WTIME register configuration from the given provided values\"\"\"\r\n\t\tbus.write_byte_data(TMD2671_DEFAULT_ADDRESS, TMD2671_REG_WTIME | TM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning_defer_clients, mapped from YANG variable /access_points/access_point/radios/radio/state/scanning_defer_clients (uint8) | def _set_scanning_defer_clients(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), is_leaf=True, yang_name="scanning-defer-clients", parent=self, path_helper=self._path_he... | [
"def _set_clients(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_clients_openconfig_wifi_mac__ssids_ssid_clients, is_container='container', yang_name=\"clients\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, regist... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for scanning_defer_traffic, mapped from YANG variable /access_points/access_point/radios/radio/state/scanning_defer_traffic (boolean) | def _set_scanning_defer_traffic(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="scanning-defer-traffic", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://open... | [
"def ingress_traffic_allowed(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"ingress_traffic_allowed\")",
"def get_traffic_meter_enabled(self):\n response = self._get(\n c.SERVICE_DEVICE_CONFIG, c.GET_TRAFFIC_METER_ENABLED\n )\n return h.zero_or_one_dict_to... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for software_selectable, mapped from YANG variable /access_points/access_point/radios/radio/state/software_selectable (boolean) | def _get_software_selectable(self):
return self.__software_selectable | [
"def glIsSoftwareRenderer(self):\n return self.__glIsSoftware",
"def software_type(self):\n return self._software_type",
"def feature_enabled(self, feature_name):\n feature_list = self.prop('available-features-list', None)\n if feature_list is None:\n raise ValueError(\"Fi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for software_selectable, mapped from YANG variable /access_points/access_point/radios/radio/state/software_selectable (boolean) | def _set_software_selectable(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="software-selectable", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig... | [
"def _get_software_selectable(self):\n return self.__software_selectable",
"def glIsSoftwareRenderer(self):\n return self.__glIsSoftware",
"def software_type(self):\n return self._software_type",
"def set_software(self, software):\n self.directives.append(\"-l software={}\".format(soft... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for channel_change_reason, mapped from YANG variable /access_points/access_point/radios/radio/state/channel_change_reason (identityref) | def _get_channel_change_reason(self):
return self.__channel_change_reason | [
"def _set_channel_change_reason(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type=\"dict_key\", restriction_arg={'DFS': {'@module': 'openconfig-wifi-types', '@namespace': 'http://opencon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for channel_change_reason, mapped from YANG variable /access_points/access_point/radios/radio/state/channel_change_reason (identityref) | def _set_channel_change_reason(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DFS': {'@module': 'openconfig-wifi-types', '@namespace': 'http://openconfig.net/yang/... | [
"async def edit(\n self,\n reason: Optional[str] = None,\n **kwargs\n ):\n headers = {}\n\n if reason is not None:\n headers[\"X-Audit-Log-Reason\"] = str(reason)\n\n data = await self._http.patch(\n f\"channels/{self.id}\",\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for counters, mapped from YANG variable /access_points/access_point/radios/radio/state/counters (container) | def _set_counters(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=yc_counters_openconfig_access_points__access_points_access_point_radios_radio_state_counters, is_container='container', yang_name="counters", parent=self, path_helper=self._path_helper, extm... | [
"def _set_counters(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_counters_openconfig_wifi_mac__ssids_ssid_state_counters, is_container='container', yang_name=\"counters\", parent=self, path_helper=self._path_helper, extmethods=self._extmetho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |