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
Test the return value of the update methods. It doesn't test the actual update itself.
def test_product_update(old_client): product = old_client.products.create( models.ProductDraft( key="test-product", name=models.LocalizedString(en=f"my-product-1"), slug=models.LocalizedString(en=f"my-product-1"), product_type=models.ProductTypeResourceIdentif...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update(self):\n pass", "def test_000_update(self):\n print('INFO: [TEST_000] Test the stats update function')\n try:\n stats.update()\n except Exception as e:\n print('ERROR: Stats update failed: %s' % e)\n self.assertTrue(False)\n time...
[ "0.83604944", "0.77209014", "0.7504089", "0.7317916", "0.72920424", "0.72660625", "0.72033197", "0.71852124", "0.71516544", "0.70958", "0.7069264", "0.70566076", "0.70484143", "0.70212287", "0.7013685", "0.69902396", "0.697524", "0.6962134", "0.6945763", "0.6935366", "0.68899...
0.0
-1
Attempt scalar promotion. Candidates are tensors, perhaps created by some clusterwise transformations, that do not appear in any other clusters.
def optimize(clusters): clusters = merge(clusters) processed = [] for c1 in clusters: mapper = {} temporaries = [] for k, v in c1.trace.items(): if v.function.is_TensorFunction and\ not any(v.function in c2.unknown for c2 in clusters): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scalar_op(self):\n if not self.is_scalar:\n raise ValueError()\n return self", "def test_mul_scalar_torch_tensor(self):\n import torch\n\n scalar = torch.tensor(5)\n prod_op = qml.RX(1.23, 0) * scalar\n assert isinstance(prod_op, SProd)\n assert pro...
[ "0.602584", "0.5996063", "0.58626217", "0.5845248", "0.5811407", "0.57521653", "0.57350713", "0.5636514", "0.56170636", "0.56170636", "0.55004376", "0.54932404", "0.54727185", "0.546815", "0.541489", "0.53933644", "0.5390492", "0.5355908", "0.5321586", "0.53028333", "0.529635...
0.48097336
94
Run a git command and return output
def get_output(self, *command): try: out = check_output([ self.git, '-C', self.root ] + list(command)) except CalledProcessError: raise GitError() return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exec_git(git_cmd):\n stdout, stderr, rc = exec_cmd(\"git %s\" % git_cmd)\n\n if rc > 0:\n raise ScriptError(\"Error running command: \\\"git %s\\\"\\nOutput: %s\" % (git_cmd, stderr))\n\n return stdout", "def _run(self, cmd, **kwargs):\n kwargs.setdefault('cwd', self.dir)\n cmd = ['git'...
[ "0.82486826", "0.813581", "0.81014127", "0.79256546", "0.7905497", "0.78977394", "0.7836089", "0.7567041", "0.74514145", "0.7422934", "0.73658174", "0.735356", "0.7335961", "0.7331719", "0.7310843", "0.72721356", "0.72660625", "0.7240476", "0.71775305", "0.7165316", "0.714914...
0.77697664
7
Return the working branch 'working' here means most recently checked out, not the branch of HEAD.
def working_branch(self): branches = self.get_output('branch', '--list', '--no-color') for branch in branches.split("\n"): current = re.search('^\* (?P<branch_name>[^\s]+)$', branch.strip()) if current: return current.groupdict()['branch_name'] raise GitEr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def current_branch(self):\n if (self.settings.non_interactive):\n return 'master'\n else:\n return map(self.clean, filter(self.current, self.run_git('branch')))[0]", "def get_current_branch(self):\n branch = self.get_current_ref()\n if not branch:\n re...
[ "0.72777826", "0.6938585", "0.68106306", "0.678033", "0.6738637", "0.6718223", "0.66282713", "0.66246086", "0.6622121", "0.6497953", "0.6497953", "0.6435573", "0.63367337", "0.6282661", "0.62593526", "0.6240738", "0.62317955", "0.6230109", "0.6226678", "0.62174207", "0.619900...
0.7588569
0
Sets the date, needs tuple with (year, month, day) as argument
def date(self, value): year, month, day = value self._write_register(48, year) self._write_register(49, month) self._write_register(50, day)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_date(day, month, time = None):\r\n if time:\r\n arg_str = p2e._base._util._convert_args_to_string(\"set.model.date\", day, month, time)\r\n else:\r\n arg_str = p2e._base._util._convert_args_to_string(\"set.model.date\", day, month)\r\n p2e._app.Exec(arg_str)", "def SetDate(*args, *...
[ "0.7406994", "0.7256043", "0.70554703", "0.70554703", "0.70554703", "0.7032882", "0.70149195", "0.69764465", "0.686718", "0.686718", "0.686718", "0.6856682", "0.6821862", "0.6803235", "0.6643049", "0.65631264", "0.65420127", "0.6480253", "0.64708954", "0.64157254", "0.6407664...
0.65013725
17
Add a DigitalClock to the timing diagram.
def add_digital_clock(td, name, start_state, freq, duty_cycle = 50): dclk = td.addDigitalClock(name, start_state, freq, duty_cycle) return dclk
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_clock(self):\n self.clocks.append(pygame.time.Clock())", "def add(self,widget,timeout=0,callback=None):\n assert isinstance(widget,GObject)\n self.add_widget(widget)\n if timeout > 0:\n timer = _ClockEvent(self,widget,callback)\n self._events.append(timer...
[ "0.6669398", "0.5647195", "0.54680353", "0.5424643", "0.5174711", "0.5168999", "0.51027596", "0.4942448", "0.4942448", "0.48985738", "0.48677126", "0.48509696", "0.48141068", "0.4772331", "0.46981245", "0.46887276", "0.46765196", "0.4676383", "0.46761405", "0.46619266", "0.46...
0.75599825
0
Add a PulseWidthLabel to the timing diagram This functions adds a PulseWidthLabel between 2 edges in the timing diagram.
def add_pulse_width_label(td, e1, e2, label, label_pos='Center'): pwl = td.addPulseWidthLabel(e1,e2,label,label_pos) return pwl
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetPulseWidth(self):\n ...", "def __pie_chart_create_labels(wedges, kw, ax, labels):\n for i, p in enumerate(wedges):\n ang = (p.theta2 - p.theta1) / 2. + p.theta1\n y = np.sin(np.deg2rad(ang))\n x = np.cos(np.deg2rad(ang))\n horizontalalignment = {-1...
[ "0.5424459", "0.5196038", "0.5162195", "0.5141934", "0.50685424", "0.49994433", "0.49703306", "0.4958686", "0.49473137", "0.4939175", "0.4906886", "0.48980695", "0.48855963", "0.48676485", "0.48594284", "0.4824856", "0.48243928", "0.4815593", "0.48012018", "0.47751722", "0.47...
0.8165402
0
Add a PartDelay to file library This function is used to add a PartDelay to the file library. This could represent specifications from a manufacturer for a part.
def add_part_delay(td, name, min, typ, max, desc): pd = td.addPartDelay(name, min * 1000, typ * 1000, max * 1000, desc) return pd
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_delay(td, part_delay, edge_from, edge_to):\n\n dly = td.addDelay(part_delay, edge_from, edge_to)\n return dly", "def add_delay(self, delay):\n if self.delay is not None:\n raise Exception(\"Can only set delay once.\")\n if delay > 0:\n self.delay = delay\n ...
[ "0.6676912", "0.60828996", "0.5725975", "0.55753934", "0.53941196", "0.53941196", "0.53941196", "0.53941196", "0.5390621", "0.5390621", "0.5390621", "0.5390621", "0.52089", "0.5187019", "0.5171485", "0.51243603", "0.5122326", "0.5054671", "0.5045535", "0.5040493", "0.5038812"...
0.64826727
1
Sets the rise time of a signal This function sets the time of the rising transistion.
def set_rise_time(sig, rise_time): sig.setRiseTime(rise_time * 1000)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_fall_time(sig, fall_time):\n\n sig.setFallTime(fall_time * 1000)", "def program_set_interval_time(self, _time=0.1):\r\n self.yoko.write(\":PROG:INT %f\"%(_time))", "def setTimeSignal(self, newTimeSignal):\n self.timeSignal = newTimeSignal\n self.frequentialSignal = getFreqSignal...
[ "0.62945163", "0.59191257", "0.58311546", "0.5826539", "0.5746922", "0.56837773", "0.5660614", "0.55649894", "0.5517763", "0.54884255", "0.54859555", "0.5459888", "0.5388547", "0.53602844", "0.5347117", "0.5296434", "0.5271999", "0.5223404", "0.5196297", "0.5155398", "0.51406...
0.79405177
0
Sets the fall time of a signal This function sets the time of the falling transistion.
def set_fall_time(sig, fall_time): sig.setFallTime(fall_time * 1000)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_time(self, time):\n self.game_inst.set_time(time)", "def set_time(self, time):\n self._set_time(time, True)", "def set_time(self, time):\n\n self.time.set_value(time)", "def set_time(self, time):\n pass", "def set_rise_time(sig, rise_time):\n\n sig.setRiseTime(rise_ti...
[ "0.6536874", "0.64891636", "0.6376531", "0.63144654", "0.62597734", "0.6190032", "0.6115839", "0.6016312", "0.5908696", "0.58718735", "0.58599955", "0.58585703", "0.5849036", "0.5767727", "0.5685797", "0.5681004", "0.567345", "0.566577", "0.56382376", "0.56320274", "0.563065"...
0.8349095
0
True for pad tokens
def make_padding_mask(input_ids, padding_idx=1): padding_mask = input_ids.eq(padding_idx) if not padding_mask.any(): padding_mask = None return padding_mask
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_pad_feature(self):\n # Check no padding for context features\n feature_tensor = self.parser.pad_feature(tf.zeros((10)),\n self.feature_config.get_feature(\"query_text\"))\n assert feature_tensor.shape == (10,)\n\n # Check padding ...
[ "0.6377485", "0.62193346", "0.59823036", "0.5875113", "0.58566135", "0.58275914", "0.5716598", "0.56738114", "0.561048", "0.5608989", "0.5596914", "0.5579323", "0.5561883", "0.55421287", "0.55411553", "0.5531905", "0.5526215", "0.55195135", "0.5470614", "0.54588026", "0.54588...
0.0
-1
Constructor for repository exception class message A string representing the exception message
def __init__(self, message): self.__message = message
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, message=None):\n super().__init__()\n self._message = message\n assert (self._message is not None), 'No exception message given, no further information.'", "def __init__(self, message):\r\n\r\n Exception.__init__(self)\r\n\r\n self.message = message", "def ...
[ "0.74663347", "0.74495155", "0.74034387", "0.71740216", "0.7129546", "0.7129546", "0.7087493", "0.705939", "0.70270056", "0.69974667", "0.6968088", "0.6900239", "0.6839899", "0.6810347", "0.67974454", "0.67257136", "0.671545", "0.6673316", "0.66574293", "0.6612377", "0.656866...
0.63814163
39
Constructor that defines the maximum array size and initialises the array that is going to be used to store values for the hash table.
def __init__(self): self.MAX = 100 self.hash_arr = [[] for _ in range(self.MAX)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n self.max = 1000\n self.hash_table = [None] * self.max", "def __init__(self):\n self._table = Array(7)\n self._count = 0\n self._maxCount = len(self._table) - len(self._table) // 3", "def __init__(self):\n self.array = []\n self.hashMap = {}...
[ "0.73905057", "0.715344", "0.69817615", "0.69079906", "0.68382776", "0.67957807", "0.6754112", "0.67407095", "0.6713185", "0.66045135", "0.6599307", "0.6571099", "0.6516338", "0.6506237", "0.64654493", "0.6458361", "0.64507776", "0.6406179", "0.63908917", "0.63747686", "0.632...
0.7983793
0
get the path to the .pp module file for this module entry
def _filepath(self, entry): return os.path.join("/usr/share/selinux", self.setype, entry.get("name") + '.pp')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getModuleFilename(self):\n psp = self.getPassport()\n res_filename = psp.findResourceFilename()\n if res_filename:\n module_filename = file_func.setFilenameExt(filename=res_filename, ext='.py')\n if os.path.exists(module_filename):\n return module_filen...
[ "0.7246206", "0.7241761", "0.72055423", "0.7097739", "0.7078429", "0.7052008", "0.69973135", "0.6913203", "0.68783456", "0.6869978", "0.6868036", "0.6868036", "0.68630135", "0.6845462", "0.6842326", "0.6808659", "0.68054515", "0.6765818", "0.6668819", "0.65819216", "0.6561681...
0.7033256
6
Find length of lecturename based on unicode bites
def lecturename_len(self, text): length = 0 for c in text: if unicodedata.east_asian_width(c) in 'FWA': length += 2 else: length += 1 return length
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _getBitNameLen(self, fn):\n out = \"{0:b}\".format(len(fn))\n if len(out) < 5:\n for _ in range(5-len(out)):\n out = \"0\" + out\n return out\n elif len(out) > 5:\n return False\n else: \n return out", "def length(name):\n...
[ "0.6678606", "0.64897823", "0.64436036", "0.62951946", "0.62355405", "0.62152845", "0.6208925", "0.6142138", "0.61399674", "0.6130137", "0.61199147", "0.61189157", "0.6093699", "0.5986994", "0.5981024", "0.59061664", "0.5904898", "0.5889656", "0.58772373", "0.58596677", "0.58...
0.82622284
0
Get the interface whose default method would be called when calling the CalledInterfaceName function.
def get_called(self): all_ifaces = set(iface for iface in self if iface.default) for i in all_ifaces: if all(map(lambda j: i not in j.get_super_types(), all_ifaces)): return i raise Exception("UNREACHABLE! Unable to find default method!")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def interface_func(self):\n return self._interface_func", "def get_default_interface():\n gws = netifaces.gateways()\n if 'default' not in gws:\n return ''\n\n route = gws['default'].get(netifaces.AF_INET)\n if route:\n return route[1]", "def _get_interface(self):\r\n pa...
[ "0.68127453", "0.6524908", "0.6468993", "0.63640434", "0.63640434", "0.63640434", "0.63640434", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634", "0.6363634"...
0.7230803
0
Initialize interface with the given superinterfaces
def __init__(self, ifaces, default): self.ifaces = sorted(ifaces) self.default = default end = "_DEFAULT" if default else "" self.class_name = "INTERFACE_"+gensym()+end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _initialize_interfaces(self):\n # initialize model interfaces\n for model_name in allmodels:\n self._register_interface(model_name)", "def __init__(self, iface, verbose=False):\n BaseInterface.__init__(self, iface, verbose)", "def __init__(self, interface, logger, base_confi...
[ "0.66414726", "0.64532536", "0.643507", "0.63329375", "0.6131151", "0.6107043", "0.60921764", "0.5987233", "0.5867644", "0.5746266", "0.5733298", "0.5726828", "0.5726551", "0.57241035", "0.5706607", "0.5670823", "0.566673", "0.56284106", "0.56211805", "0.5601577", "0.55995446...
0.5824369
9
Returns a set of all the supertypes of this interface
def get_super_types(self): return set(i2 for i2 in self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def supertypes(self):\n return self.conjunction.types()", "def get_subtypes(self):\n return self.subtypes.all()", "def types(self):\n subclass_types = self._types()\n subclass_types.update(self._base_types)\n return subclass_types", "def get_types(cls):\n types = set...
[ "0.7583694", "0.6942709", "0.68981797", "0.6808549", "0.6790601", "0.6680479", "0.65713024", "0.65670806", "0.65228623", "0.64789826", "0.6477391", "0.6442627", "0.64338243", "0.63720584", "0.6355504", "0.634696", "0.6337898", "0.6325182", "0.63135535", "0.6289706", "0.627155...
0.763861
0
The set of arguments for constructing a Saml resource.
def __init__(__self__, *, issuer: pulumi.Input[str], kid: pulumi.Input[str], sso_url: pulumi.Input[str], account_link_action: Optional[pulumi.Input[str]] = None, account_link_group_includes: Optional[pulumi.Input[Sequence[pulumi.Input[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__,\n resource_name: str,\n args: SamlArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...", "def __init__(__self__,\n resource_name: str,\n opts: Optional[pulumi.ResourceOptions] = None,\n ...
[ "0.73955965", "0.6060033", "0.5966101", "0.59637487", "0.5924368", "0.584732", "0.5784595", "0.5779353", "0.5775813", "0.5773945", "0.57721186", "0.57388645", "0.5722049", "0.570815", "0.57024443", "0.5666118", "0.5662683", "0.56555915", "0.5649623", "0.5644333", "0.5635811",...
0.0
-1
URI that identifies the issuer.
def issuer(self) -> pulumi.Input[str]: return pulumi.get(self, "issuer")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def issuer_endpoint(self) -> str:\n return pulumi.get(self, \"issuer_endpoint\")", "def issuer_endpoint(self) -> str:\n return pulumi.get(self, \"issuer_endpoint\")", "def issuer_endpoint(self) -> str:\n return pulumi.get(self, \"issuer_endpoint\")", "def issuer_endpoint(self) -> str:\n ...
[ "0.8263894", "0.8263894", "0.8263894", "0.8263894", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.79161644", "0.78571683", "0.7857067", "0.7857067", "0.7857067", "0.7857067", "0.78568256", "0.78564215", "0.7855742", "0.7848283",...
0.735472
34
The ID of the signing key.
def kid(self) -> pulumi.Input[str]: return pulumi.get(self, "kid")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def key_id(self) -> str:\n return pulumi.get(self, \"key_id\")", "def id(self):\n return self._key_pair.name", "def key_id(self):\n return self.__key_id", "def _get_id(self):\n return self.key.id()", "def keyid(self):\n pass", "def kms_key_id(self) -> str:\n retu...
[ "0.82664067", "0.7861954", "0.77682257", "0.77387327", "0.7544639", "0.75032294", "0.7492494", "0.74760485", "0.734753", "0.72963345", "0.7280276", "0.7279877", "0.7232126", "0.72152686", "0.72125566", "0.717317", "0.717317", "0.717317", "0.717317", "0.717317", "0.717317", ...
0.0
-1
The type of ACS. It can be `"INSTANCE"` or `"ORG"`.
def acs_type(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "acs_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def acs_type(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"acs_type\")", "def atype(self) -> str:\n return 'A2C'", "def atype(self):\n return 'A2C'", "def get_account_license_type(self) -> dict:\n return self._get(\"/spPortal/account/license/type\")", "def organ...
[ "0.76833355", "0.6554186", "0.63638085", "0.58957833", "0.5792413", "0.57434106", "0.57434106", "0.57434106", "0.57434106", "0.5692119", "0.5668654", "0.5665879", "0.5665879", "0.5649893", "0.5649893", "0.5597408", "0.55966467", "0.559584", "0.559584", "0.5581414", "0.5520808...
0.7677174
2
Status of the IdP.
def status(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "status")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self...
[ "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037"...
0.0
-1
The type of ACS. It can be `"INSTANCE"` or `"ORG"`.
def acs_type(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "acs_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def acs_type(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"acs_type\")", "def atype(self) -> str:\n return 'A2C'", "def atype(self):\n return 'A2C'", "def get_account_license_type(self) -> dict:\n return self._get(\"/spPortal/account/license/type\")", "def organ...
[ "0.76833355", "0.6554186", "0.63638085", "0.58957833", "0.5792413", "0.57434106", "0.57434106", "0.57434106", "0.57434106", "0.5692119", "0.5668654", "0.5665879", "0.5665879", "0.5649893", "0.5649893", "0.5597408", "0.55966467", "0.559584", "0.559584", "0.5581414", "0.5520808...
0.7677174
1
The audience restriction for the IdP.
def audience(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "audience")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def audience(self) -> str:\n return pulumi.get(self, \"audience\")", "def audience(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"audience\")", "def allowed_audiences(self) -> Sequence[str]:\n return pulumi.get(self, \"allowed_audiences\")", "def allowed_audiences(self) -> Sequ...
[ "0.7175847", "0.6537475", "0.6337614", "0.6337614", "0.6337614", "0.6337614", "0.6337614", "0.6337614", "0.63365984", "0.63365984", "0.63365984", "0.6336593", "0.6336593", "0.6336593", "0.6336593", "0.6336593", "0.6336593", "0.6336593", "0.6319076", "0.6246115", "0.6246115", ...
0.695666
1
URI that identifies the issuer.
def issuer(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "issuer")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def issuer_endpoint(self) -> str:\n return pulumi.get(self, \"issuer_endpoint\")", "def issuer_endpoint(self) -> str:\n return pulumi.get(self, \"issuer_endpoint\")", "def issuer_endpoint(self) -> str:\n return pulumi.get(self, \"issuer_endpoint\")", "def issuer_endpoint(self) -> str:\n ...
[ "0.8263894", "0.8263894", "0.8263894", "0.8263894", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.79161644", "0.78571683", "0.7857067", "0.7857067", "0.7857067", "0.7857067", "0.78568256", "0.78564215", "0.7855742", "0.7848283",...
0.71062183
38
The ID of the signing key.
def kid(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "kid")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def key_id(self) -> str:\n return pulumi.get(self, \"key_id\")", "def id(self):\n return self._key_pair.name", "def key_id(self):\n return self.__key_id", "def _get_id(self):\n return self.key.id()", "def keyid(self):\n pass", "def kms_key_id(self) -> str:\n retu...
[ "0.82664067", "0.7861954", "0.77682257", "0.77387327", "0.7544639", "0.75032294", "0.7492494", "0.74760485", "0.734753", "0.72963345", "0.7280276", "0.7279877", "0.7232126", "0.72152686", "0.72125566", "0.717317", "0.717317", "0.717317", "0.717317", "0.717317", "0.717317", ...
0.0
-1
Status of the IdP.
def status(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "status")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self...
[ "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037"...
0.0
-1
Type of the IdP.
def type(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def type(self) -> str:\n return pulumi.get(self, \"type\")", "def type(self) -> str:\n return pulumi.get(self, \"type\")", "def type(self) -> str:\n return pulumi.get(self, \"type\")", "def type(self) -> str:\n return pulumi.get(self, \"type\")", "def type(self) -> str:\n ...
[ "0.6842128", "0.6842128", "0.6842128", "0.6842128", "0.6842128", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "...
0.0
-1
The type of ACS. It can be `"INSTANCE"` or `"ORG"`.
def acs_type(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "acs_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def acs_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"acs_type\")", "def acs_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"acs_type\")", "def atype(self) -> str:\n return 'A2C'", "def atype(self):\n return 'A2C'", "def get_accoun...
[ "0.7677174", "0.7677174", "0.6554186", "0.63638085", "0.58957833", "0.5792413", "0.57434106", "0.57434106", "0.57434106", "0.57434106", "0.5692119", "0.5668654", "0.5665879", "0.5665879", "0.5649893", "0.5649893", "0.5597408", "0.55966467", "0.559584", "0.559584", "0.5581414"...
0.76833355
0
The audience restriction for the IdP.
def audience(self) -> pulumi.Output[str]: return pulumi.get(self, "audience")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def audience(self) -> str:\n return pulumi.get(self, \"audience\")", "def audience(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"audience\")", "def audience(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"audience\")", "def allowed_audiences(self) ->...
[ "0.7175847", "0.695666", "0.695666", "0.6337614", "0.6337614", "0.6337614", "0.6337614", "0.6337614", "0.6337614", "0.63365984", "0.63365984", "0.63365984", "0.6336593", "0.6336593", "0.6336593", "0.6336593", "0.6336593", "0.6336593", "0.6336593", "0.6319076", "0.6246115", ...
0.6537475
3
URI that identifies the issuer.
def issuer(self) -> pulumi.Output[str]: return pulumi.get(self, "issuer")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def issuer_endpoint(self) -> str:\n return pulumi.get(self, \"issuer_endpoint\")", "def issuer_endpoint(self) -> str:\n return pulumi.get(self, \"issuer_endpoint\")", "def issuer_endpoint(self) -> str:\n return pulumi.get(self, \"issuer_endpoint\")", "def issuer_endpoint(self) -> str:\n ...
[ "0.8263894", "0.8263894", "0.8263894", "0.8263894", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.8151617", "0.79161644", "0.78571683", "0.7857067", "0.7857067", "0.7857067", "0.7857067", "0.78568256", "0.78564215", "0.7855742", "0.7848283",...
0.755693
33
The ID of the signing key.
def kid(self) -> pulumi.Output[str]: return pulumi.get(self, "kid")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def key_id(self) -> str:\n return pulumi.get(self, \"key_id\")", "def id(self):\n return self._key_pair.name", "def key_id(self):\n return self.__key_id", "def _get_id(self):\n return self.key.id()", "def keyid(self):\n pass", "def kms_key_id(self) -> str:\n retu...
[ "0.82664067", "0.7861954", "0.77682257", "0.77387327", "0.7544639", "0.75032294", "0.7492494", "0.74760485", "0.734753", "0.72963345", "0.7280276", "0.7279877", "0.7232126", "0.72152686", "0.72125566", "0.717317", "0.717317", "0.717317", "0.717317", "0.717317", "0.717317", ...
0.0
-1
Status of the IdP.
def status(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "status")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self) -> str:\n return pulumi.get(self, \"status\")", "def status(self...
[ "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037", "0.72499037"...
0.6866787
89
Type of the IdP.
def type(self) -> pulumi.Output[str]: return pulumi.get(self, "type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def type(self) -> str:\n return pulumi.get(self, \"type\")", "def type(self) -> str:\n return pulumi.get(self, \"type\")", "def type(self) -> str:\n return pulumi.get(self, \"type\")", "def type(self) -> str:\n return pulumi.get(self, \"type\")", "def type(self) -> str:\n ...
[ "0.6842128", "0.6842128", "0.6842128", "0.6842128", "0.6842128", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "0.68416804", "...
0.0
-1
Create a string that contains the first name, middle name, and the last name separated by a space
def get_full_name(self): # There is only one name if self.middle == "" and self.last =="": full_name = "{0}".format(self.first) # There are three names elif self.middle != "" and self.last != "": full_name = "{0} {1} {2}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(first_name, middle_name='', last_name=''):\r\n full_name = first_name + ' ' + middle_name + ' ' + last_name\r\n return full_name", "def get_formatted_name(first_name, middle_name, last_name):\r\n full_name = f\"\\n{first_name} {middle_name} {last_name}\"\r\n return full_name.title()", "def get...
[ "0.7960051", "0.7922175", "0.7909538", "0.78934896", "0.7874696", "0.7859679", "0.78343296", "0.7825742", "0.778879", "0.7779234", "0.77444875", "0.77031463", "0.7695229", "0.7680286", "0.7637756", "0.7637756", "0.76060885", "0.75840867", "0.75732553", "0.75673014", "0.756611...
0.7386478
25
Returns file content as string with normalized line endings
def get_file_string(self, file): string = open(file, 'r').read() return self.normalize(string)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_endings(file_contents):\n modified_contents = file_contents.replace(b\"\\n\", b\"\\r\\n\")\n return modified_contents", "def make_string(self):\n text = \"\"\n for line in self.lines:\n # using \"\\n\" line end as that's what existing files have\n #(Note from...
[ "0.7086935", "0.68506575", "0.6769361", "0.6694914", "0.6393109", "0.63631386", "0.62780374", "0.6270547", "0.62591875", "0.61761415", "0.61409396", "0.61409396", "0.6126476", "0.61099523", "0.6062828", "0.6037851", "0.60309315", "0.6017555", "0.6017408", "0.5983322", "0.5982...
0.6725913
3
Draws graph of lines of code written by user by quarters of years. Picks top `MAX_LANGUAGES` languages from each quarter only.
async def create_loc_graph(yearly_data: Dict, save_path: str): colors = await DM.get_remote_yaml("linguist") years = len(yearly_data.keys()) year_indexes = arange(years) languages_all_loc = dict() for i, y in enumerate(sorted(yearly_data.keys())): for q in yearly_data[y].keys(): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yggtime_lang():\n timing.plot_scalings(compare='language')", "def bargraphs():\n v = pd.read_csv(\n \"src\\kjpcjs.csv\")\n\n # 2015\n\n df1 = v[\n (v['Week'] < '2016-01-01')\n ]\n # 2016\n df2 = v[\n (v['Week'] > '2016-01-01') & (v['Week'] < '2017-01-01')\n ]...
[ "0.54443043", "0.5341886", "0.5332707", "0.52416897", "0.5229334", "0.5225105", "0.5157445", "0.5122051", "0.5116177", "0.50904816", "0.50902814", "0.5063641", "0.5048774", "0.5035928", "0.49583519", "0.49553415", "0.49527812", "0.49486363", "0.4925707", "0.4916962", "0.48818...
0.5255473
3
calculate iou between box_a and multiple box_b in a broadcast way.
def calc_iou(self, box_a, box_b): # (B, N, 1, 4) box_a = tf.expand_dims(box_a, -2) # (B, 1, M, 4) box_b = tf.expand_dims(box_b, -3) # (B, N, M, 4) new_shape = tf.broadcast_dynamic_shape(tf.shape(box_a), tf.shape(box_b)) # (B, N, M, 4) # (B, N, M, 4) box_a = tf.broadcast_to(box_a, n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def box_iou(boxes1, boxes2):\n\n area1 = box_area(boxes1)\n area2 = box_area(boxes2)\n\n boxes1 = boxes1.unsqueeze(1) # N x 1 x 4\n lt = paddle.maximum(boxes1[:, :, :2], boxes2[:, :2])\n rb = paddle.minimum(boxes1[:, :, 2:], boxes2[:, 2:])\n\n wh = (rb - lt).clip(min=0)\n inter = wh[:, :, 0] *...
[ "0.7380166", "0.71522397", "0.70978993", "0.7034451", "0.7016755", "0.7009435", "0.69936615", "0.69929045", "0.69275177", "0.69186264", "0.6909711", "0.69072306", "0.6906411", "0.688789", "0.6885852", "0.6859099", "0.6833838", "0.6829596", "0.6817357", "0.6728318", "0.6713871...
0.6507702
33
create a new, local, inactive 'User', and generate an 'Account' and email the activation key. return the new 'User' the activation key is a SHA1 hash, generated from a combination of the 'username' and a random slat
def create_inactive_account(self, username, email, password, send_email=True): new_user = User.objects.create_user(username, email, password) new_user.is_active = False new_user.save() # create corresponding 'Account' salt = sha_constructor(str(random.random())).hexdi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_user(username, email, password):\n return {\n 'user': User.objects.create_user(username, email, password),\n 'username': username,\n 'email': email,\n 'password': password,\n 'id': str(User.objects.latest('id').id)\n }", "def save_new_user(self):\n\n e...
[ "0.78249675", "0.77775186", "0.7506659", "0.7442291", "0.74158007", "0.74066406", "0.7375684", "0.7323383", "0.73148745", "0.72372764", "0.72256523", "0.72200114", "0.72171444", "0.7205869", "0.7204064", "0.72031504", "0.71973294", "0.7175925", "0.7160081", "0.7149083", "0.71...
0.7095144
24
Calculate total revenue for all assets in the collection This method calculates the investment profit of all assets in collection for a specified period and a current rate.
def calculate_revenue(self, period: int, currency_rates: dict) -> float: total_revenue = 0 for asset in self._asset_collection: revenue = asset.calculate_revenue(period, currency_rates[asset.char_code]) total_revenue += revenue return total_revenue
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_all_revenue():\n try:\n input_periods = request.args.getlist(\"period\")\n indicators = get_indicators()\n currencies = get_daily_currencies()\n res = {}\n for period in input_periods:\n res[period] = 0\n for asset in all_assets:\n ...
[ "0.7426501", "0.72416365", "0.68370783", "0.63026196", "0.5979268", "0.58651876", "0.57524586", "0.5666383", "0.5634872", "0.56109905", "0.55824685", "0.55749166", "0.55300486", "0.548975", "0.54255956", "0.5397397", "0.53844106", "0.5376415", "0.5346912", "0.53352433", "0.53...
0.81624043
0
Get the upstream module of the qam
def get_ups_module(self) -> list: self.sendline("show system") self.expect(self.prompt) results = list(map(int, re.findall(r"Module (\d+) UPS", self.before))) return results
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_qam_module(self) -> str:\n self.sendline(\"show system\")\n self.expect(self.prompt)\n return re.findall(r\"Module (\\d+) QAM\", self.before)[0]", "def _get_required_module(self):\n return self.__required_module", "def _get_module(self):\n return self.__module", "def _get_m...
[ "0.6525834", "0.6227454", "0.62200826", "0.62200826", "0.5990756", "0.56429887", "0.5618229", "0.5616979", "0.55496913", "0.55372745", "0.5506712", "0.5477981", "0.5477981", "0.5477981", "0.5477981", "0.54749256", "0.54571223", "0.53962624", "0.53942996", "0.5347726", "0.5330...
0.5303199
24
Get the provisioning mode of the cable modem from CMTS
def check_docsis_mac_ip_provisioning_mode(self, index: str) -> str: self.sendline(f"show interface docsis-mac {index}") self.expect(r"ip-provisioning-mode (\w+\-\w+)") result = self.match.group(1) self.expect(self.prompt) if self.match is not None: if "ipv4" in result...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_cmts_type(self) -> str:\n self.sendline(\"show system | include Product\")\n self.expect(self.prompt)\n return self.before.split(\",\")[0].split(\":\")[1].strip().lower()", "def mode(self):\n self._check_npcap_requirement()\n return POWERSHELL_PROCESS.query([_WlanHelpe...
[ "0.61645216", "0.5658178", "0.5605044", "0.5578493", "0.55753165", "0.5469417", "0.54532087", "0.5448785", "0.5437009", "0.5414549", "0.5358723", "0.5330665", "0.52947634", "0.52930176", "0.52621055", "0.5231186", "0.5226741", "0.52021646", "0.5196787", "0.5196368", "0.519543...
0.5202802
17
Getting erouter ipv4 from CMTS
def get_ertr_ipv4(self, mac: str, offset: int = 2) -> Optional[str]: self.sendline(f"show cable modem {mac} cpe") self.expect(self.prompt) mac = netaddr.EUI(mac) ertr_mac = netaddr.EUI(int(mac) + offset) ertr_mac.dialect = netaddr.mac_cisco ertr_ipv4 = re.search(f"({Valid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_ipv4(self):\n return self.__ipv4", "def _get_ipv4(self):\n return self.__ipv4", "def _get_ipv4(self):\n return self.__ipv4", "def get_ipv4(headers):\n received = headers['Received'].pop()\n match = re.search('(?P<ip>\\d+\\.\\d+\\.\\d+\\.\\d+)', received)\n if match:\n return...
[ "0.69039875", "0.6903621", "0.6903621", "0.6556042", "0.6508576", "0.645902", "0.61275107", "0.6111558", "0.5994433", "0.5940542", "0.59029865", "0.583154", "0.57624435", "0.5710486", "0.5698452", "0.5690591", "0.56901705", "0.56824404", "0.5656251", "0.56489724", "0.5629684"...
0.6202298
6
Returns the current time on the CMTS
def get_current_time(self, fmt: str = "%Y-%m-%dT%H:%M:%S%z") -> str: self.current_time_cmd = "show clock" self.dateformat = "%a %b %d %H:%M:%S %Z %Y" return super().get_current_time(fmt)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_current_time(self):\n return self.current_time", "def get_current_time():\n return datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\")", "def get_current_time(self):\n return self.timestamp", "def get_time(self):\n return self._current_time", "def getCurrentTime():\n\tret...
[ "0.79437906", "0.78153443", "0.78005886", "0.7759232", "0.77273035", "0.7723066", "0.7713242", "0.76704484", "0.7666588", "0.76509976", "0.7631643", "0.76099634", "0.7603165", "0.7585094", "0.75783426", "0.75726265", "0.75625473", "0.75588346", "0.7527951", "0.74990654", "0.7...
0.0
-1
Return list of lines from a given file.
def get_lines(file_name): fd = open(file_name, 'r') lines = fd.readlines() fd.close() return lines
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_lines(file):\n f = open(file, 'r')\n tmp_list = f.readlines()\n f.close()\n return tmp_list", "def _readlines(self, filename):\n lines = []\n if self._has_file(filename):\n with open(filename, 'r') as file:\n lines = [line.strip() for l...
[ "0.8397637", "0.837132", "0.82836455", "0.8222494", "0.81668186", "0.81621194", "0.8136363", "0.81306493", "0.8060679", "0.79974824", "0.7971339", "0.7937943", "0.79379237", "0.7903042", "0.7880434", "0.7880434", "0.7810291", "0.77796125", "0.7775068", "0.7773699", "0.77331",...
0.82446295
3
Set up the Netdata sensor.
async def async_setup_platform( hass: HomeAssistant, config: ConfigType, async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None, ) -> None: name = config[CONF_NAME] host = config[CONF_HOST] port = config[CONF_PORT] resources = config[CONF_RESOURCES] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup(self):\n \n # preload buffer with four chunks to avoid wacky noises on startup\n preload_data = np.zeros(self.buffer_size * 2 * 4, dtype='int16')\n preload_data = struct.pack('%dh'%(len(preload_data)), *list(preload_data))\n self.output_device.write(preload_data)\n ...
[ "0.6295725", "0.62367874", "0.62342", "0.6202856", "0.61619633", "0.60810214", "0.60545343", "0.60544217", "0.59686714", "0.5934384", "0.59308386", "0.58612", "0.585158", "0.584455", "0.5840364", "0.58100957", "0.5799218", "0.5785516", "0.57778955", "0.57576644", "0.57337284"...
0.5502486
62
Return the name of the sensor.
def name(self): return f"{self._name} {self._sensor_name}"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self.sensor.name", "def name(self):\n return self.sensor.name", "def name(self) -> str:\n return self._sensor.name", "def sensor_name(self):\n return self._sensor_name", "def name(self):\n return SENSOR_NAME", "def name(self):\n return '{...
[ "0.9172938", "0.9172938", "0.9119264", "0.90965885", "0.8981336", "0.85841", "0.82223254", "0.81386924", "0.809015", "0.79436237", "0.77122", "0.7700968", "0.7556649", "0.7541934", "0.7540329", "0.7538318", "0.75381917", "0.7537575", "0.74322224", "0.74322224", "0.7308479", ...
0.8511273
7
Return the unit the value is expressed in.
def native_unit_of_measurement(self): return self._unit_of_measurement
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unit_of_measurement(self):\n return self._def[ATTR_UNIT]", "def unit_of_measurement(self):\n return self._unit", "def unit_of_measurement(self):\n return self._unit", "def unit_of_measurement(self):\n return self._unit", "def unit(self) -> str:\n return pulumi.get(sel...
[ "0.84029853", "0.82990766", "0.82990766", "0.82990766", "0.8298213", "0.8298213", "0.82146513", "0.8203726", "0.8153548", "0.81447643", "0.81290025", "0.810741", "0.810741", "0.8067337", "0.8056088", "0.8056088", "0.8056088", "0.8056088", "0.8056088", "0.8056088", "0.8056088"...
0.7757663
48
Return the icon to use in the frontend, if any.
def icon(self): return self._icon
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def icon():\n\n return None", "def get_icon(self):\n return self.icon", "def icon(self):\n return ICON", "def icon(self):\n return ICON", "def icon(self):\n return ICON", "def icon(self):\n return ICON", "def icon(self):\n return ICON", "def icon(self)...
[ "0.83787686", "0.82625246", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.8247893", "0.82073784", "0.81608546",...
0.8024557
42
Return the name of the sensor.
def name(self): return f"{self._name} Alarms"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self.sensor.name", "def name(self):\n return self.sensor.name", "def name(self) -> str:\n return self._sensor.name", "def sensor_name(self):\n return self._sensor_name", "def name(self):\n return SENSOR_NAME", "def name(self):\n return '{...
[ "0.9172938", "0.9172938", "0.9119264", "0.90965885", "0.8981336", "0.85841", "0.8511273", "0.8511273", "0.82223254", "0.81386924", "0.809015", "0.79436237", "0.77122", "0.7700968", "0.7556649", "0.7541934", "0.7540329", "0.7538318", "0.75381917", "0.7537575", "0.74322224", ...
0.0
-1
Initialize first and last name attributes.
def __init__(self, fname, lname): self.fname = fname self.lname = lname
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, last_name, first_name):\n self.last_name = last_name\n self.first_name = first_name", "def __init__(self, last_name, first_name):\n self.last_name = last_name\n self.first_name = first_name", "def __init__(self, first_name, last_name):\r\n self.first_name =...
[ "0.77020556", "0.77020556", "0.76772267", "0.7507109", "0.733851", "0.709517", "0.70332116", "0.69303846", "0.6783339", "0.6751386", "0.67321587", "0.6712869", "0.67078257", "0.66449165", "0.66449165", "0.66449165", "0.66360164", "0.65814316", "0.65789056", "0.65235484", "0.6...
0.6247463
30
Return a string representation of the morpheme.
def pprint(self, mrepr='tokens-and-lemmas'): if mrepr == 'tokens-and-lemmas': if self.lemma != self.token: leaf = '='.join([self.token, self.lemma]) else: leaf = self.token elif mrepr == 'lemmas': leaf = self.lemma else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unicode(self):\r\n if self.suit.val == 0:\r\n assert self.rank.val == 0\r\n return '🃏'\r\n else:\r\n unicode_cards = ['🃑🃒🃓🃔🃕🃖🃗🃘🃙🃚🃛🃝🃞',\r\n '🃁🃂🃃🃄🃅🃆🃇🃈🃉🃊🃋🃍🃎',\r\n '🂱🂲🂳🂴🂵🂶🂷🂸🂹🂺...
[ "0.5794937", "0.57202166", "0.5624352", "0.5624352", "0.5563785", "0.55241686", "0.5522179", "0.54741025", "0.54690367", "0.5452108", "0.54346734", "0.5383639", "0.5344011", "0.5334924", "0.5331363", "0.5319803", "0.52851653", "0.52828526", "0.52703047", "0.525311", "0.524892...
0.48843476
91
Returns True if the split occurs in any tree of the taxa `mask` if there is only fewer than two 1's or fewer than two 0's in `split` (among all of the that are 1 in mask).
def is_trivial_split(split, mask): masked = split & mask if split == 0 or split == mask: return True if ((masked - 1) & masked) == 0: return True cm = (~split) & mask if ((cm - 1) & cm) == 0: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_compatible(split1, split2, mask):\n m1 = mask & split1\n m2 = mask & split2\n if 0 == (m1 & m2):\n return True\n c2 = mask ^ split2\n if 0 == (m1 & c2):\n return True\n c1 = mask ^ split1\n if 0 == (c1 & m2):\n return True\n if 0 == (c1 & c2):\n return Tru...
[ "0.6121255", "0.5668431", "0.55749893", "0.5475235", "0.53464943", "0.5313871", "0.52588516", "0.5247748", "0.5217937", "0.5180994", "0.5151627", "0.5138181", "0.50996846", "0.50701547", "0.50653845", "0.5043983", "0.5020986", "0.50138944", "0.5005004", "0.5001995", "0.497793...
0.7137401
0
Searches for a split_bitmask (in the rooted context it does not flip the bits) within the subtree descending from `root`. Returns None if no such node is found. Recursive impl, but should be an order(log(N)) operation.
def find_edge_from_split(root, split_to_find, mask=-1): e = root.edge cm = e.split_bitmask i = cm & split_to_find if i != split_to_find: return None if (mask&cm) == split_to_find: return e for child in root.child_nodes(): r = find_edge_from_split(child, split_to_find, mas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bstFindMax(n):\n\n if n is None:\n return None\n\n max = None\n\n if n.left:\n cur = n.left\n while cur:\n max = cur\n cur = cur.right\n return max\n else:\n return None", "def find(self, node: int) -> Optional[int]:\n is_validated =...
[ "0.5377586", "0.50701666", "0.50221467", "0.50090206", "0.49121526", "0.48890704", "0.48855725", "0.4847435", "0.48340315", "0.47951037", "0.4766731", "0.475645", "0.47428912", "0.47375134", "0.47355047", "0.4727448", "0.47156358", "0.47012776", "0.46961257", "0.466032", "0.4...
0.6362716
0
Download an object from Swift.
def download(request, project, container, objectname): storage_url = get_storage_endpoint(request, 'adminURL') auth_token = get_token_id(request) headers = {'X-Storage-Token': auth_token} url = '{0}/{1}/{2}'.format(storage_url, container, str(objectname)) res = requests.get( url, headers...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def download_object(self, out_file):\n if not self.resource:\n raise ValueError('can only call download_object on object path')\n\n self._swift_service_call('download',\n container=self.container,\n objects=[self.resource],\n ...
[ "0.6573577", "0.61681545", "0.6081286", "0.6056902", "0.59693044", "0.59671056", "0.5884709", "0.583569", "0.583569", "0.583569", "0.583569", "0.5824694", "0.58156526", "0.57933646", "0.5770669", "0.5766506", "0.5693403", "0.5692227", "0.5643299", "0.5641232", "0.56399447", ...
0.6192134
1
Edit CORS on given container.
def edit_cors(request, project, container): auth_token = get_token_id(request) storage_url, http_conn = connection(request) if request.method == 'POST': form = AddCORSForm(request.POST) if form.is_valid(): cors = get_cors( storage_url, auth_token, container, htt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_origins_cors(api):\n from constants import Constants as Const\n CORS(api, origins=[r\"http://localhost:5000\", r\"https://localhost:5001\", r\"http://192.168.0.104:5000\"])", "def configure_cors(\n app: Sanic, cors_origins: Union[Text, List[Text], None] = \"\"\n) -> None:\n\n # Workarou...
[ "0.6491801", "0.63223475", "0.63194704", "0.61779475", "0.6068586", "0.6065821", "0.6035122", "0.60024154", "0.59734833", "0.5943877", "0.5918961", "0.5918961", "0.5918961", "0.58834016", "0.58540654", "0.58367884", "0.5714188", "0.5655914", "0.55599356", "0.55585974", "0.555...
0.776996
0
Wait for one of the futures to complete. Works correctly with both green and nongreen futures (but not both together, since this can't be guaranteed to avoid deadlock due to how the waiting implementations are different when green threads are being used). Returns pair (done futures, not done futures).
def wait_for_any(fs, timeout=None): green_fs = sum(1 for f in fs if isinstance(f, futures.GreenFuture)) if not green_fs: return _futures.wait(fs, timeout=timeout, return_when=_futures.FIRST_COMPLETED) else: non_green_fs = len(fs) - gr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def fetch_finished(self, futures):\n done = set()\n try:\n done, pending = await asyncio.wait(\n futures, return_when=asyncio.FIRST_COMPLETED\n )\n except ValueError:\n # nothing pending!\n pending = set()\n\n assert (\n ...
[ "0.7453681", "0.6417639", "0.6355059", "0.594817", "0.583243", "0.56183064", "0.5467197", "0.5350268", "0.5315947", "0.5199942", "0.5199942", "0.5199942", "0.5199942", "0.50752777", "0.5028925", "0.5022533", "0.49980977", "0.4997132", "0.49864194", "0.4960986", "0.49492046", ...
0.6160437
3
Return ``True`` if filename has the same extension as the target extension.
def is_extension(filename: str, extension: str) -> bool: filename = filename.lower() if extension.startswith("."): extension = extension[1:] dot_after = filename.rfind(".") if dot_after == -1: return False return filename[dot_after:] == extension
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def valid_extension(self, filename):\n for extension in self.allowed_extensions:\n if filename.endswith(extension):\n return True\n return False", "def check_extension(filename):\n filename = filename.lower()\n for ext in [\".hdr\", \".docx\", \".csv\", \".txt\", \"....
[ "0.77385175", "0.75984067", "0.75483227", "0.7443647", "0.7431806", "0.73394626", "0.7285529", "0.72704273", "0.7265124", "0.72409016", "0.71997637", "0.7190823", "0.71590304", "0.71590304", "0.71590304", "0.71590304", "0.71590304", "0.715716", "0.7109944", "0.70805067", "0.7...
0.7764488
0
Resets (force teleports) all vehicles in the traffic away from the player. Useful for resolving traffic jam situations.
def reset(self) -> None: data = dict(type='ResetTraffic') self._send(data).ack('TrafficReset')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self, pg_world: PGWorld, map: Map, controllable_vehicles: List, traffic_density: float) -> None:\n self._clear_traffic(pg_world)\n\n self.vehicles = []\n self.block_triggered_vehicles = [] if self.mode != TrafficMode.Reborn else None\n self.traffic_vehicles = deque() # it is ...
[ "0.6438447", "0.617165", "0.61018336", "0.6040647", "0.6032608", "0.59778154", "0.5960376", "0.5950294", "0.59240115", "0.5916739", "0.5848616", "0.5780745", "0.5761374", "0.5737102", "0.5736618", "0.5721651", "0.57104486", "0.5710129", "0.5705412", "0.56967145", "0.5695134",...
0.5429338
52
Forward pass for a single transformer encoder layer. First applies layer norm, then self attention, then dropout with residual connection (adding the input to the result), and then a positionwise feedforward layer.
def forward(self, x: Tensor, mask: Tensor, rl_pe: Tensor) -> Tensor: x_norm = self.layer_norm(x) h = self.src_src_att(x_norm, x_norm, x_norm, mask, rl_pe=None) h = self.dropout(h) + x o = self.feed_forward(h) return o
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transformer_encoder(encoder_input,\n encoder_self_attention_bias,\n hparams,\n name=\"encoder\",\n nonpadding=None):\n x = encoder_input\n attention_dropout_broadcast_dims = (\n common_layers.comma_separated_stri...
[ "0.671692", "0.6555583", "0.6426811", "0.6401248", "0.63908064", "0.63861346", "0.6319244", "0.63107866", "0.63094825", "0.62707967", "0.62493205", "0.6240461", "0.62268174", "0.6209723", "0.6161259", "0.61588705", "0.61260724", "0.6116749", "0.61126626", "0.6094331", "0.6072...
0.0
-1
Return a string representation of the object.
def __str__(self): string = "" for qubit_id, _l in enumerate(self._l): string += f"Qubit {qubit_id} : " for command in self._l[qubit_id]: string += f"{str(command)}, " string = f"{string[:-2]}\n" return string
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toString(self):\n return \"[object %s]\" % self.__class__.__name__", "def to_str (self):\n return str(self.__class__) + \" \" + pprint.pformat(self.to_dict())", "def to_string(self):\r\n return self.__str__()", "def toString(self):\n return self.__str__()", "def __str__(self...
[ "0.84798676", "0.8287372", "0.82287294", "0.8204006", "0.81198627", "0.8070041", "0.8070041", "0.8070041", "0.8070041", "0.8039086", "0.80352366", "0.7982635", "0.7970068", "0.7970068", "0.7970068", "0.7970068", "0.7970068", "0.7970068", "0.7970068", "0.7970068", "0.7970068",...
0.0
-1
Reset the environment or makes a further step of initialization if called on an environment never used before. It must always be called before .step() method to avoid errors.
def reset(self): self.t = 23 self.done = False self.profits = [0 for e in range(len(self.data))] self.agent_positions = [] self.agent_open_position_value = 0 self.cumulative_return = [0 for e in range(len(self.data))] self.init_price = self.data.iloc[0, :]['Close...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUp(self) -> None:\n self.env.scenario_idx = 0\n self.env.reset()", "def _init_env_variables(self):\n self.steps_beyond_done = None", "def init_environment(self):\n pass", "def setUp(self) -> None:\n self.env.scenario_idx = 0\n self.env.saw.LoadState()", "def...
[ "0.7427271", "0.7130241", "0.70576864", "0.70171463", "0.70171463", "0.7001152", "0.68737215", "0.68439955", "0.67842084", "0.6738432", "0.6726305", "0.6695659", "0.6690732", "0.6690732", "0.6690732", "0.66866994", "0.6669856", "0.65699065", "0.65545034", "0.6547508", "0.6515...
0.0
-1
The height of sprite in pixels.
def height(self) -> int: return self.uv_rect.h // self.num_frames - (self.num_layers - 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_height(self):\n return self.__size.y", "def height(self):\n return _yarp.Image_height(self)", "def height(self):\n return self.rectangle[3] - self.y", "def getHeight(self):\n return self.height", "def height(self):\n return self.img.height", "def getHeight(self):\...
[ "0.80268687", "0.7887852", "0.7822511", "0.7772398", "0.7759196", "0.76982427", "0.7677421", "0.76576453", "0.760621", "0.7601851", "0.755454", "0.755454", "0.755454", "0.7550915", "0.75344306", "0.75344306", "0.753267", "0.753267", "0.75180316", "0.7506502", "0.7506502", "...
0.7635736
8
heals up to 20 health per party member, and gives them a 20% chance of recovering from a disease
def rest(self): for party_member in self.party: party_member.health += 20 if party_member.health > 100: party_member.health = 100 if party_member.sick: healed = 0.2 > random.uniform(0, 1) if healed : get_well(party_member) self.incremen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def heal(self):\n heal = random.randint(14,22)\n print(f\"{self.name} used Heal - Recovered: {heal}\")\n self.health += heal\n if self.health >= 100:\n self.health = 100", "def death_blow(attacker, defender):\n if random.randint(0, 100) <= 20:\n return {\n ...
[ "0.6795921", "0.6597443", "0.6437708", "0.63963145", "0.63458896", "0.6236154", "0.6193355", "0.6173349", "0.61545354", "0.61534154", "0.6142379", "0.60934573", "0.6077882", "0.6064626", "0.60218775", "0.60098344", "0.60076505", "0.59946877", "0.5982098", "0.59704834", "0.594...
0.7262723
0
Convert board into PyTorch tensor
def to_torch(self, player): f, m, b, c = self.to_numpy(player) return torch.Tensor(f), torch.Tensor(m), torch.Tensor(b), torch.Tensor(c)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def video_to_tensor(pic):\r\n return torch.from_numpy(pic.transpose([3, 0, 1, 2]))", "def numpy2tensor(x):\n result = torch.from_numpy(x)\n # result = torch.tensor(x)\n\n\n return result", "def video_to_tensor(pic):\n return torch.from_numpy(pic.transpose([3,0,1,2]))", "def video_to_tensor(pic)...
[ "0.6494524", "0.64820284", "0.64460564", "0.64460564", "0.6379661", "0.6124187", "0.611803", "0.61128193", "0.6094433", "0.60396975", "0.59603107", "0.59543353", "0.5842148", "0.58385074", "0.58228964", "0.5795467", "0.5767725", "0.5752762", "0.5705265", "0.5688542", "0.56846...
0.65389544
0
Create test flavor profile disabled test.
def test_create_flavor_profile_with_optional_params(self): resource = 'service_profile' cmd = flavor_profile.CreateFlavorProfile( test_cli20.MyApp(sys.stdout), None) name = '' description = 'Test flavor profile - disabled' myid = 'myid' driver = 'mydriver' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _add_dummy_profile_only_if_testing(self, obj):\n pass", "def test_update_flavor_profile(self):\n resource = 'service_profile'\n cmd = flavor_profile.UpdateFlavorProfile(\n test_cli20.MyApp(sys.stdout), None)\n newdescription = 'Test new description'\n newdriver =...
[ "0.60590947", "0.59437144", "0.5852059", "0.5677497", "0.55105203", "0.5507526", "0.54584134", "0.5419113", "0.5318911", "0.53049725", "0.5285031", "0.5242631", "0.52338535", "0.52325755", "0.5210992", "0.5199618", "0.51844853", "0.51709265", "0.5169597", "0.51688796", "0.513...
0.70545655
0
Explore a course and verify that all course cards are loaded with response code OK"
def verify_href_response_code(self, element_list): images_list = self.get_element_list(element_list) try: for element in images_list: value = element.get_attribute('href') req = requests.get(value) response_code = req.status_code ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_courses_all(self):\n response = self.client.get(reverse('ct:courses'))\n self.assertEqual(response.status_code, 200)\n self.assertTemplateUsed(response, 'ct/courses.html')\n self.assertIn('courses', response.context)\n self.assertEqual(len(response.context['courses']), 2...
[ "0.72217005", "0.7214185", "0.7114598", "0.66966325", "0.6548964", "0.6506499", "0.64910173", "0.6480934", "0.6462393", "0.63693243", "0.6260712", "0.62531036", "0.6239785", "0.62382436", "0.61526144", "0.61166537", "0.6107737", "0.60938096", "0.6068683", "0.6063475", "0.6046...
0.0
-1
delmask |= where seeds are out of bounds
def _update_delmask_oob(self, v_field, seeds, delmask=None): self._prepare_xl_xh(v_field) if delmask is None: delmask = np.zeros([seeds.shape[1]], dtype='bool') delmask |= np.any(np.bitwise_or(seeds.T < self.obound_xl, seeds.T > self.obound_x...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mutate(mask_old):\n mask= mask_old.copy()\n for i in range(len(mask)):\n if np.random.randint(0, 2) == 0:\n mask[i]= not mask[i]\n \n while np.sum(mask) < min_features:\n mask[np.random.randint(len(mask))]= True\n ...
[ "0.6558611", "0.64978004", "0.59265226", "0.5909278", "0.562292", "0.56070966", "0.55865407", "0.55121744", "0.54778373", "0.5457325", "0.5426119", "0.5423849", "0.5415111", "0.54141235", "0.54106504", "0.54037565", "0.5386724", "0.53725106", "0.5359944", "0.53482014", "0.534...
0.7135914
0
Closes the database again at the end of the request.
def close_db(self, error): if hasattr(self, 'sqlite_db'): self.sqlite_db.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _end_db(self):\n database.close()", "def end_connection(self):\n self.db.close()", "def close_db(self):\n self.con.close()", "def _close():\n if _database:\n _database.close()", "def close(self):\n self.db_connection.close()", "def close(self):\n self.db.c...
[ "0.8461316", "0.8064864", "0.80246055", "0.80006665", "0.7966797", "0.7960271", "0.7960271", "0.79365206", "0.7909422", "0.7838959", "0.7830544", "0.7814513", "0.776124", "0.7743608", "0.766845", "0.76379323", "0.75472033", "0.75464606", "0.754423", "0.75393695", "0.7526966",...
0.69571394
88
list of str, values of ``windowsiconfromico`` and ``linuxonefileicon``
def getIconPaths(): result = options.icon_path # Check if Linux icon requirement is met. if isLinux() and not result and isOnefileMode(): # spell-checker: ignore pixmaps default_icons = ( "/usr/share/pixmaps/python%s.xpm" % python_version_str, "/usr/share/pixmaps/py...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def argIcons(self):\n return [site.att for site in self.sites.argIcons]", "def getIcon(self):\n return self.base.get(\"icon\", [])", "def icon(self):\n\t\treturn \"\".join([\"[%s]\" % card.icon() for card in self.cards])", "def os_tweaks( self ):\n if self.os_win:\n pass\n ...
[ "0.64941883", "0.6368206", "0.6324398", "0.6310441", "0.6300544", "0.62557393", "0.62511766", "0.6194737", "0.6145462", "0.6130492", "0.6125608", "0.6081642", "0.6075194", "0.6050982", "0.5979595", "0.59520286", "0.5950933", "0.5943354", "0.5942327", "0.594214", "0.5927469", ...
0.7396761
0
str name of the app to use during signing
def getMacOSSignedAppName(): return options.macos_signed_app_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_application_name(): # real signature unknown; restored from __doc__\n return \"\"", "def application_name(self):\n pass", "def appname(self) -> str:\n return self._appname", "def name(self):\n assert self.NAME, \"Invalid Name for app\"\n return self.NAME", "def get_ap...
[ "0.72160643", "0.6939744", "0.6926084", "0.6874896", "0.66777927", "0.662443", "0.6581824", "0.65166736", "0.65072984", "0.6471653", "0.6458501", "0.64120793", "0.63914084", "0.63012373", "0.62131286", "0.61815494", "0.6173748", "0.6138375", "0.6132675", "0.6097334", "0.60744...
0.7472335
0
bool = "no_asserts" in python flags given
def hasPythonFlagNoAsserts(): return "no_asserts" in _getPythonFlags()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def do_asserts_work():\n pass", "def test_bool():\n pass", "def test_noqa(self):\n self.assert_okay(\"noqa\")", "def testAssertFalse(self):\n self.assertFalse(False)", "def l_assertFalse(self, a, stop_on_fail=None):\n self.assertFalse(a)\n self.logger.info(\"AssertFalse : ...
[ "0.68035674", "0.6802378", "0.66254056", "0.65706956", "0.65266156", "0.64674735", "0.6394706", "0.6365015", "0.63149846", "0.63120776", "0.6291028", "0.6276581", "0.62095946", "0.61985755", "0.6195938", "0.6193185", "0.61498666", "0.6135212", "0.6053001", "0.5997202", "0.599...
0.8338797
0
Test container_add when an ip address is already assigned in pool client.assign_address returns an empty list. Assert that the system then exits and all expected calls are made
def test_container_add_ip_previously_assigned( self, m_netns, m_get_pool_or_exit, m_client, m_get_container_info_or_exit, m_enforce_root): # Set up mock object m_client.get_endpoint.side_effect = KeyError m_client.assign_address.return_value = [] # Call method un...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_container_ip_add_fail_assign_address(\n self, m_netns, m_client, m_get_container_info_or_exit,\n m_get_pool_or_exit, m_enforce_root):\n # Set up mock objects\n m_get_container_info_or_exit.return_value = {\n 'Id': 666,\n 'State': {'Running': 1, 'Pi...
[ "0.8051146", "0.7605275", "0.74602085", "0.7432104", "0.73366374", "0.72936255", "0.727995", "0.7269348", "0.7237531", "0.7128284", "0.7106983", "0.7008158", "0.69036597", "0.6887897", "0.68802714", "0.66586494", "0.64953", "0.64442366", "0.6370582", "0.6362419", "0.6294471",...
0.81054705
0
Test for container_ip_add when the client cannot assign an IP client.assign_address returns an empty list. Assert that the system then exits and all expected calls are made
def test_container_ip_add_fail_assign_address( self, m_netns, m_client, m_get_container_info_or_exit, m_get_pool_or_exit, m_enforce_root): # Set up mock objects m_get_container_info_or_exit.return_value = { 'Id': 666, 'State': {'Running': 1, 'Pid': 'Pid_in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_container_add_ip_previously_assigned(\n self, m_netns, m_get_pool_or_exit, m_client,\n m_get_container_info_or_exit, m_enforce_root):\n # Set up mock object\n m_client.get_endpoint.side_effect = KeyError\n m_client.assign_address.return_value = []\n\n # Ca...
[ "0.82708377", "0.7743619", "0.7711973", "0.76563376", "0.7643031", "0.7620324", "0.7584101", "0.75720656", "0.7402599", "0.7396209", "0.73783296", "0.6935996", "0.6915869", "0.6913236", "0.6901051", "0.6893552", "0.6887857", "0.68130153", "0.6671133", "0.6628933", "0.6598181"...
0.8527586
0
Test container_ip_add when netns cannot add an ipv4 to interface netns.add_ip_to_ns_veth throws a CalledProcessError. Assert that the system then exits and all expected calls are made
def test_container_ip_add_netns_error_ipv4( self, m_netns_add_ip_to_ns_veth, m_client, m_get_container_info_or_exit, m_get_pool_or_exit, m_enforce_root): # Set up mock objects m_get_container_info_or_exit.return_value = { 'Id': 666, 'State': {'Running': 1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_container_ip_add_error_updating_datastore(\n self, m_netns_add_ip_to_ns_veth, m_client,\n m_get_container_info_or_exit, m_get_pool_or_exit, m_enforce_root):\n # Set up mock objects\n m_get_pool_or_exit.return_value = 'pool'\n m_get_container_info_or_exit.return_v...
[ "0.80281574", "0.7979363", "0.791105", "0.76889795", "0.7530228", "0.7497743", "0.7288381", "0.7198418", "0.71666807", "0.7086367", "0.69022244", "0.6754617", "0.670269", "0.6681846", "0.6674117", "0.66310436", "0.6624121", "0.65555555", "0.65494084", "0.6336652", "0.62779254...
0.84694564
0
Test container_ip_add when netns cannot add an ipv6 to interface netns.add_ip_to_ns_veth throws a CalledProcessError. Assert that the system then exits and all expected calls are made
def test_container_ip_add_netns_error_ipv6( self, m_netns, m_print_container_not_in_calico_msg, m_client, m_get_container_info_or_exit, m_get_pool_or_exit, m_enforce_root): # Set up mock objects m_get_container_info_or_exit.return_value = { 'Id': 666, 'St...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_container_ip_add_ipv6(\n self, m_netns, m_client, m_get_container_info_or_exit,\n m_get_pool_or_exit, m_enforce_root):\n # Set up mock objects\n pool_return = 'pool'\n m_get_pool_or_exit.return_value = pool_return\n m_get_container_info_or_exit.return_valu...
[ "0.80438757", "0.80079424", "0.7706118", "0.7645587", "0.71675164", "0.71661705", "0.7152963", "0.6951176", "0.6759288", "0.6735003", "0.6695714", "0.6691967", "0.65401953", "0.65017986", "0.64953893", "0.6478263", "0.6431382", "0.64290476", "0.63927466", "0.63459265", "0.618...
0.8473008
0
Turn training model into test model. Removes layers of type "Data","SoftmaxWithLoss" and "Accuracy". Removes parameters used for learning. Adds a Softmax layer to the model to compute class probabilities.
def deploy(self, input_dim=(1,3,224,224)): trash_layers = ['Data','SoftmaxWithLoss','Accuracy'] trash_bin = [] for layer in self.net_spec.layer: if layer.type in trash_layers: trash_bin.append(layer) continue ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fine_tune(model):\n model.load_weights('saved_models/weights.best.mbnetv2.hdf5')\n\n x = model.get_layer('Dropout').output\n x = Conv2D(100, (1, 1), padding='same')(x)\n x = Activation('softmax', name='softmax')(x)\n output = Reshape((100,))(x)\n\n model = Model(inputs=model.input, outputs=ou...
[ "0.6542002", "0.639494", "0.6372887", "0.6338798", "0.6247488", "0.6239131", "0.6201593", "0.61716664", "0.60860777", "0.60755044", "0.6070243", "0.60502595", "0.6023337", "0.6000754", "0.5977825", "0.5977653", "0.5968927", "0.596553", "0.59495425", "0.5940579", "0.59345853",...
0.0
-1
Set the format of the given token.
def _highlightToken(self, tokenDescriptor): if tokenDescriptor.start - self._paragraphStartPosition >= 0: self.setFormat(tokenDescriptor.start - self._paragraphStartPosition, tokenDescriptor.end - tokenDescriptor.start, self._typeFormatMap[tokenDescriptor.ty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_format_token(token, func):\n _format_tokens[token] = func", "def setFormat(self, formatName):\n pass", "def set_token(self, token):\n\n self.token = token", "def format(self, format):\n\n self._format = format", "def format(self, format):\n\n self._format = format", ...
[ "0.67398584", "0.66274226", "0.65262467", "0.65010935", "0.65010935", "0.65010935", "0.6253544", "0.6191593", "0.61915547", "0.6178631", "0.6178631", "0.6178631", "0.61300296", "0.6025402", "0.5955429", "0.59506863", "0.590654", "0.5905208", "0.58699685", "0.5788506", "0.5775...
0.6099413
13
Tell whether the first value is approximately less than or equal to the second value.
def is_close_or_less_nb(a, b, rel_tol=rel_tol, abs_tol=abs_tol): if is_close_nb(a, b, rel_tol=rel_tol, abs_tol=abs_tol): return True return a < b
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def smaller_or_equal(self, value1, value2):\n self.answer = value1 <= value2", "def less_or_equal(val1,val2,decimals=None):\n return val1 <= val2", "def less_than(val1, val2):\n if round(val1, 3) <= round(val2, 3): # only care to the 3rd position after decimal point\n return True\n e...
[ "0.7773864", "0.77649873", "0.7489982", "0.74692863", "0.74488175", "0.7297253", "0.7272888", "0.7261987", "0.71511835", "0.71467364", "0.7102696", "0.71013844", "0.7061634", "0.7049506", "0.7039859", "0.70175594", "0.70053136", "0.6975969", "0.6962007", "0.6959812", "0.69572...
0.66643244
38
A list of halfsegments placed by the move.
def placed_half_segments(self) -> List[HalfSegment]: dots = [segment.dot for segment in self.segs] dots.append(self.segs[-1].end()) direction = self.segs[0].dir half_segments = list() for dot in dots: half_segments.append(HalfSegment(dot, direction)) ha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_segments(self):\n return [(s.t, e.t, 0 if i > 0 else o)\n for i, (s, e, o) in enumerate(self.segments)]", "def removed_potential(self) -> List[HalfSegment]:\n\n return self.placed_half_segments()", "def segments(self):\n return self._segments", "def added_potential...
[ "0.6597143", "0.64799416", "0.6479604", "0.6406605", "0.6346411", "0.6277191", "0.6241527", "0.62386465", "0.6161242", "0.60738415", "0.6065553", "0.6045387", "0.5979351", "0.5927456", "0.59031594", "0.5897847", "0.58668375", "0.5857445", "0.5845693", "0.58295053", "0.5781553...
0.8356038
0
Calculate the bounding box for the grid.
def bounding_box(self): upper_left = Dot(min(self.dots, key=lambda d: d.x).x, min(self.dots, key=lambda d: d.y).y) lower_right = Dot(max(self.dots, key=lambda d: d.x).x, max(self.dots, key=lambda d: d.y).y) rows = lower_right.y - upper_left.y + 2 cols = lower_right.x - upper_left.x + 2 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bounding_box(self):\r\n pass", "def calc_bounding_box(self):\n # This may get overwritten in some subclasses\n self.boundingBox = BBox.as_bbox((self.position, self.position))", "def boundingBox(self):\n # Find upper bound\n u = cvx.Variable(self.n)\n Y = cvx.Variab...
[ "0.7937455", "0.7907886", "0.78222173", "0.7675152", "0.7660012", "0.75837207", "0.756225", "0.75340873", "0.75214225", "0.7483498", "0.74024665", "0.7366357", "0.7245339", "0.7239327", "0.7233219", "0.7187495", "0.7166493", "0.71521735", "0.70872974", "0.7070126", "0.7038666...
0.78231883
2
A representation of the RatingMetricSet object.
def __repr__(self): return "RatingMetricSet()"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n return \"MetricSet()\"", "def __repr__(self):\n return \"RankingMetricSet()\"", "def __repr__(self):\n return \"ClassificationMetricSet()\"", "def getRatings(self):\n return self._Ratings", "def __repr__(self):\n return \"CoverageMetricSet()\"", "d...
[ "0.7216735", "0.7159554", "0.69228566", "0.62642366", "0.6156082", "0.60907173", "0.60705143", "0.59337676", "0.5685589", "0.5598934", "0.5384237", "0.5320268", "0.5311464", "0.52276766", "0.52276766", "0.5195822", "0.5148299", "0.5133195", "0.5131598", "0.50865704", "0.50726...
0.8710908
0
A representation of the RankingMetricSet object.
def __repr__(self): return "RankingMetricSet()"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n return \"RatingMetricSet()\"", "def __repr__(self):\n return \"MetricSet()\"", "def __repr__(self):\n return \"ClassificationMetricSet()\"", "def ranks(self):\n return self._rk", "def ranks(self):\n return self._ranks", "def __repr__(self):\n ...
[ "0.718274", "0.67303354", "0.66016084", "0.632041", "0.6022951", "0.59959465", "0.5790719", "0.56128305", "0.5559308", "0.5547041", "0.54683816", "0.53394216", "0.5309008", "0.5297167", "0.5297167", "0.5271686", "0.52372205", "0.51839936", "0.51676315", "0.516503", "0.5161959...
0.8511676
0
For a given number generates a Verhoeff digit and returns number + digit
def checksum(self,number): c = 0 for i, item in enumerate(reversed(str(number))): c = self.verhoeff_table_d[c][self.verhoeff_table_p[i % 8][int(item)]] return c
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(number):\n code = Luhn(10*number)\n return 10*number + (-code.checksum()) % 10", "def create(number):\n if Luhn(number*10).is_valid():\n return number * 10\n\n return int(''.join([str(number), str(10 - (Luhn(number*10).checksum() % 10))]))", "def generateVerhoe...
[ "0.7323523", "0.7064306", "0.6916054", "0.6586842", "0.6578308", "0.65390885", "0.6532988", "0.651751", "0.6515342", "0.648494", "0.6449636", "0.6433126", "0.6402597", "0.64016247", "0.638647", "0.63449645", "0.62665284", "0.6256418", "0.6251845", "0.62450916", "0.6239484", ...
0.0
-1
Randomly select n unique individuals from a weighted population, fitness determines probability of being selected
def weighted_choice(population, n): def random_index_betavariate(pop_size): # has a higher probability of returning index of item at the head of the list alpha = 1 beta = 2.5 return int(random.betavariate(alpha, beta) * pop_size) def random_index_weighted(pop_size): """...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fitness_proportionate_selection(random, population, args):\n num_selected = args.setdefault('num_selected', 1)\n len_pop = len(population)\n psum = [i for i in range(len_pop)]\n pop_max_fit = (max(population)).fitness\n pop_min_fit = (min(population)).fitness\n \n # If we're actually doing...
[ "0.72319525", "0.70245266", "0.6944456", "0.68826586", "0.676446", "0.67041886", "0.6692319", "0.66501004", "0.6627781", "0.66124463", "0.65551037", "0.6540361", "0.65175325", "0.6495808", "0.64939725", "0.6481097", "0.6469475", "0.6468865", "0.64645517", "0.6436622", "0.6423...
0.75249404
0
disruptive uniform crossover uniformly crossover genes between dna1 and dna2, with children guaranteed to be different from parents, if the number of differences between parents is larger than 1
def disruptive_uniform_crossover(dna1, dna2): differences = sum(1 for i, j in zip(dna1, dna2) if i != j) swaps = 0 child1 = dna1[:] child2 = dna2[:] while swaps < (differences + 1) // 2: for ind in range(len(dna1)): # if there is a difference on this index and has not been swappe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uniform_crossover(dna1, dna2):\n ind = np.random.random(len(dna1)) > 0.5\n child1 = [dna1[i] if ind[i] else dna2[i] for i in range(len(ind))]\n child2 = [dna2[i] if ind[i] else dna1[i] for i in range(len(ind))]\n return child1, child2", "def cross_genes(parent_1: Genome, parent_2: Genome):\n\n ...
[ "0.7799028", "0.74388385", "0.73482245", "0.72267216", "0.71936315", "0.7154532", "0.7120165", "0.71059364", "0.6926705", "0.6915364", "0.6849699", "0.68302745", "0.6749846", "0.6694711", "0.66547227", "0.6649855", "0.66312027", "0.6520985", "0.64747417", "0.64580864", "0.645...
0.7848982
0
This method is used to populate testing data for blackbox, greybox, and whitebox testing. It can be used in the setup for unit tests, or run on a development database to populate some initial data. It will be especially useful when a schema changes, and the entire database needs to be recreated.
def populate_testing_data(): # Create users user1 = Profile.create_new_user('testuser1', 'testuser1@none.com', 'test', date.today()) user2 = Profile.create_new_user('testuser2', 'testuser2@none.com', 'test', date.today()) user3 = Profile.create_new_user('testuser3', 'testuser3@none.com'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUpTestData(cls):\n TestDatabase.create()", "def setUpTestData(cls):\n TestDatabase.create()", "def setUpTestData(cls):\n cls._db_aliases = test_utils.get_db_aliases()", "def setUp(self):\n schema(DBPATH)\n seed(DBPATH)", "def setUpTestData(cls):\n data_gen.r...
[ "0.778531", "0.778531", "0.75073814", "0.7304107", "0.7206181", "0.7206181", "0.7180728", "0.71519107", "0.70963836", "0.7075529", "0.70528626", "0.7050361", "0.70277375", "0.69834673", "0.6978312", "0.69765484", "0.69765484", "0.69625074", "0.69420743", "0.69420743", "0.6942...
0.708461
9
given a low level state, evaluates the reachability of each object and subsequent spaces of shared reachability.
def get_reachabilities(ll_in): #extract the x,y values from state vector obj_locs = [] for i in range(len(ll_in)): if not ((i % 3) == 2) and i > 2: obj_locs.append(ll_in[i]) #get the min and max x value from which each object can be reached can_reach = [] for i in range(len...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self):\n\n # Then do (loop-free) backwards reachability check, worklist of tuples\n #\n # (q,\n # ids, target, root,\n # arrs,\n # pos_cons, pvs, pd, p*)\n #\n # which means you can accept from q, using the set of IDs in ids and targe...
[ "0.63025755", "0.6269196", "0.57247573", "0.5708885", "0.5650418", "0.5635847", "0.5604187", "0.5595394", "0.55895424", "0.55739665", "0.5559911", "0.55396086", "0.5471784", "0.54571974", "0.5445696", "0.542792", "0.5425176", "0.5411525", "0.5407792", "0.5399476", "0.53841144...
0.64622515
0
Function based view to render the home page
def index(request): disciplines = Discipline.objects.order_by('name') mentors = Mentor.objects.filter(year=CURRENT_YEAR, is_active=True) edas = EDA.objects.filter(year=CURRENT_YEAR, is_active=True) contracts = Contract.objects.filter(year=CURRENT_YEAR, end_date=None).order_by('discipline') convocati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def home():\r\n return render_template('home.html')", "def home():\r\n return render_template(\"home.html\")", "def home():\n\treturn render_template('home.html')", "def home():\n\n return render_template('home.html')", "def home():\n\n return render_template('home.html')", "def home():\n ...
[ "0.86877465", "0.8670566", "0.8662029", "0.86024827", "0.86024827", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", "0.85663927", ...
0.0
-1
Convert tensor data type from uint8 to float, divide value by 255.0 and permute the dimensions of clip tensor
def to_tensor(clip): _is_tensor_video_clip(clip) if not clip.dtype == torch.uint8: raise TypeError("clip tensor should have data type uint8. Got %s" % str(clip.dtype)) return clip.float().permute(3, 0, 1, 2) / 255.0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def torch_preprocessing(x):\n x /= 255.\n x[..., 0] -= 0.485\n x[..., 1] -= 0.456\n x[..., 2] -= 0.406\n x[..., 0] /= 0.229\n x[..., 1] /= 0.224\n x[..., 2] /= 0.225\n return x", "def torch_postprocessing(x, return_int=True):\n x[..., 0] *= 0.229\n x[..., 1] *= 0.224\n x[..., 2] ...
[ "0.6851523", "0.66354877", "0.6390593", "0.6283023", "0.6256986", "0.62424755", "0.61904716", "0.6073073", "0.6032588", "0.598832", "0.598832", "0.5940747", "0.5937501", "0.58374614", "0.5823506", "0.58057743", "0.5779066", "0.57639146", "0.57351583", "0.56961095", "0.5690574...
0.7669383
0
Get your guild's bottohuman ratio
async def bhratio(self, ctx): bots, humans, ratio = self.bot_human_ratio(ctx.guild) _, _, global_ratio = self.bhratio_global() await ctx.send(f'{len(bots)} bots / {len(humans)} humans => `{ratio:.2}b/h`, global is `{global_ratio:.2}`')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def golden_ratio():\n\n return ratio(1)", "def extract_ratio(self):\n return 0.375", "def bronze_ratio():\n\n return ratio(3)", "def ballot_full_ratio(self):\n return self._ballot_stats['ballot.bullet.ratio']", "def win_percentage(self, return_on_div_by_zero='n/a'):\n if self.bat...
[ "0.6591321", "0.6298116", "0.61943525", "0.6139173", "0.6114504", "0.60610455", "0.5998703", "0.5987076", "0.5961319", "0.5956775", "0.5886398", "0.5869049", "0.5864992", "0.5854815", "0.5819462", "0.5817256", "0.5767451", "0.57587814", "0.5757735", "0.57372147", "0.5735369",...
0.76334584
0
Returns the distance between the bounding boxes centers.
def distance(self, bb1, bb2): x1, y1, z1 = self.bb_center(bb1) x2, y2, z2 = self.bb_center(bb2) return math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def boxes_dist(boxes):\n total_dist = 0\n for box1, box2 in zip(boxes, boxes[1:]):\n box1_center = np.array(center_of_box(box1))\n box2_center = np.array(center_of_box(box2))\n dist = np.linalg.norm(box2_center - box1_center)\n total_dist += dist\n return total_dist", "def ce...
[ "0.7332187", "0.6774284", "0.6674207", "0.6616702", "0.64964217", "0.6458047", "0.6445978", "0.63924664", "0.6288245", "0.623518", "0.61956066", "0.6191819", "0.60996175", "0.6051367", "0.60498464", "0.603837", "0.60251176", "0.6024966", "0.6022455", "0.6014261", "0.60051167"...
0.57601726
49
Returns True if bb1 is in bb2. To be 'in' bb1 is weakly contained by bb2 and the bottom of bb1 is lower than the top of bb2 and higher than the bottom of bb2.
def isin(self, bb1, bb2, prev=False): bb1_min, _ = bb1 bb2_min, bb2_max = bb2 x1, y1, z1 = bb1_min x2, y2, z2 = bb2_max x3, y3, z3 = bb2_min if z1 > z2 + EPSILON: return False if z1 < z3 - EPSILON: return False return self.weakl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __contains__(self, other: GenomeInterval) -> bool:\n left = InterLap.binsearch_left_start(\n self._iset, other.start - self._maxlen, 0, len(self._iset)\n )\n # Use a shortcut, since often the found interval will overlap.\n max_search = 8\n if left == len(self._iset...
[ "0.63924366", "0.6373991", "0.63376886", "0.6313738", "0.62545705", "0.6209834", "0.61458844", "0.60908645", "0.6051085", "0.59153944", "0.5892492", "0.58889425", "0.5832494", "0.5824722", "0.5780716", "0.57770425", "0.57740146", "0.57622653", "0.5759069", "0.5741975", "0.570...
0.8093235
0
Yield successive nsized chunks from l.
def chunks(l, n): for i in range(0, len(l), n): yield l[i:i + n]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __chunks(self, l, n):\n for i in range(0, len(l), n):\n yield l[i:i+n]", "def _chunks(self, l, n):\n for i in xrange(0, len(l), n):\n yield l[i:i+n]", "def chunk(self, l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]", "def chunks(l, n):\n ...
[ "0.80763406", "0.79780173", "0.7848591", "0.7818154", "0.7764843", "0.7764843", "0.7740603", "0.76803994", "0.7677509", "0.7673566", "0.765864", "0.7655856", "0.7655856", "0.7655856", "0.76458347", "0.7615106", "0.75838816", "0.7557435", "0.7549177", "0.7549177", "0.7549177",...
0.7448925
72
Sets the contact_info of this ContactInfoConfigurationForUserProfile.
def contact_info(self, contact_info): self._contact_info = contact_info
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_contact(self, contact_info: dict):\n # find the contact link object for this entity\n contact_link = ContactLinkModel.find_by_entity_id(self._model.id)\n if contact_link is None or contact_link.contact is None:\n raise BusinessException(Error.DATA_NOT_FOUND, None)\n\n ...
[ "0.57884884", "0.57796615", "0.5731104", "0.56297964", "0.5520064", "0.5413486", "0.534106", "0.5270309", "0.52281445", "0.51741964", "0.5161118", "0.5040845", "0.50378156", "0.502457", "0.502457", "0.49553046", "0.48856267", "0.48242778", "0.48081684", "0.48081684", "0.48081...
0.74038607
0
Sets the availability of this ContactInfoConfigurationForUserProfile.
def availability(self, availability): self._availability = availability
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setAvailability(self, availability):\n raise NotImplementedError(\"Changing availability is not supported for this clock.\")", "def bioavailability(self, bioavailability):\n\n self._bioavailability = bioavailability", "def available(self) -> bool:\n available = super().available\n ...
[ "0.55352086", "0.54262334", "0.5126858", "0.5090915", "0.49472302", "0.49452683", "0.49252862", "0.49174353", "0.47482285", "0.47160706", "0.47156727", "0.47106853", "0.47008848", "0.46718583", "0.46488854", "0.45483658", "0.45483652", "0.45457387", "0.45265064", "0.45034853", ...
0.5559937
0
Sets the manage_privacy of this ContactInfoConfigurationForUserProfile.
def manage_privacy(self, manage_privacy): self._manage_privacy = manage_privacy
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def can_manage(self, can_manage):\n\n self._can_manage = can_manage", "async def set_privacy_mode(self, status):\n await self._set_config(prop='privacyMode', internal_prop='privacy_mode', value=status, value_type=bool)", "def allow_account_management_metadata(self, allow_account_management_metada...
[ "0.5257503", "0.50397384", "0.49937835", "0.49922895", "0.47752953", "0.47178206", "0.47178206", "0.47008282", "0.47008282", "0.46573308", "0.46459365", "0.4544154", "0.44393596", "0.4417494", "0.43127358", "0.43095", "0.41944462", "0.417854", "0.4141179", "0.41409075", "0.40...
0.76621854
0
Returns the string representation of the model
def to_str(self): return pprint.pformat(self.to_dict())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _repr_model_(self):\n return str(self)", "def __str__(self):\n\n return str(self.model)", "def get_model_string(self):\n raise NotImplementedError()", "def __str__(self):\n return self.model", "def serialize_model(self):\n return dill.dumps(self.model)", "def __str_...
[ "0.8602374", "0.85093755", "0.8237104", "0.8050309", "0.80128866", "0.79348034", "0.78766525", "0.77898884", "0.7786461", "0.7745792", "0.7627315", "0.76055235", "0.757999", "0.7514394", "0.75038797", "0.75035286", "0.74850684", "0.7440529", "0.74325883", "0.74239755", "0.740...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, ContactInfoConfigurationForUserProfile): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n return not self == other", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other):\n return self.__dict__ != other.__dict__", "def __eq__(self, other):\n return not self.__ne__(other)", ...
[ "0.8410411", "0.8391477", "0.8172175", "0.81410587", "0.80920255", "0.8088807", "0.80676955", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1