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
Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
def account_id(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "account_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def account_from_env(cls):\n return os.getenv(\"OIO_ACCOUNT\", \"myaccount\")", "def account(self) -> str:\n return self._account", "def account(self) -> str:\n return self._account", "def account_id():\n return client.get_caller_identity()['Account']", "def get_account(self):\n ...
[ "0.67411584", "0.6572133", "0.6572133", "0.651426", "0.6502544", "0.6502544", "0.64861584", "0.62360793", "0.6234122", "0.6115376", "0.6112006", "0.6105514", "0.6100154", "0.60846376", "0.60846376", "0.60846376", "0.6075806", "0.6068436", "0.6068436", "0.6068436", "0.6068436"...
0.57028115
65
The name of the workflow.
def name(self) -> pulumi.Input[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_workflow_name(self) -> str:\n return self._workflow_name", "def generate_workflow_name(self) -> str:\n pass", "def workflow_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"workflow_name\")", "def generate_workflow_name(self) -> str:\n workflow_n...
[ "0.8896285", "0.8787526", "0.86926943", "0.81865823", "0.8011067", "0.799171", "0.72725457", "0.71088874", "0.706677", "0.7042766", "0.7017034", "0.6982122", "0.6966963", "0.6959319", "0.6903017", "0.68444115", "0.6844175", "0.6823208", "0.6823208", "0.6823208", "0.6823208", ...
0.0
-1
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, SolidSimulationControl): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.80891633", "0.80891633", "0.8055254", "0.7983334", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, SolidSimulationControl): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Read a iterable where each element is a text line in file >>> mi_iterable = read_iter_from_file("file.txt")
def read_iter_from_file(path_to_file_read): with open(path_to_file_read, "r") as fichero: line = fichero.readline().strip() while line: yield line line = fichero.readline().strip()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_lines(fp: TextIO) -> Iterator[str]:\n while line := fp.readline().strip():\n yield line", "def txt_line_iterator(path):\n with tf.io.gfile.GFile(path) as f:\n for line in f:\n yield line.strip()", "def file_reading_iterator_raw(filename, options='r'):\n # actual loop\n with op...
[ "0.7375644", "0.6798216", "0.6752425", "0.67510635", "0.6735101", "0.67141837", "0.6643787", "0.6612823", "0.6526744", "0.65108556", "0.64707994", "0.64521176", "0.63654", "0.63356113", "0.63098156", "0.6287286", "0.62730384", "0.62217885", "0.62113535", "0.6197769", "0.61170...
0.76070154
0
Calculate the magnetic length in meters >>> print ('%.5e'%mag_length(1)) 2.56556e08
def mag_length(B, q=q_e): return np.sqrt(hbar/(q * B))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def total_length(self):\n # YOUR CODE HERE\n return abs(self.radius*self.angle)", "def mag(self) -> float:\n return sqrt(self.sqr_mag())", "def length(self):\n return self.length2 ** 0.5", "def magnitude(self):\n\t\treturn sqrt(self.dot(self))", "def debye_length_m(electron_dens...
[ "0.6541516", "0.64945585", "0.64743394", "0.64000195", "0.6364941", "0.62600607", "0.6180234", "0.6177758", "0.6119959", "0.6074357", "0.606164", "0.6044024", "0.6031989", "0.6030498", "0.5997262", "0.5992344", "0.5977709", "0.59500444", "0.5947922", "0.59397674", "0.59120846...
0.6625317
0
Calculate the spin gap in Kelvin. Use g_ex = 0.44 to obtain The Zeeman gap.
def spin_gap(B, g_ex): return mu_bohr * g_ex * B / k_b
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_EG(vals):\n return get_tau_gap(vals)/2", "def griewangk(indiv):\n p1 = 0\n p2 = 1\n for i in range(len(indiv)):\n p1 += (indiv[i])**2\n p2 *= np.cos(indiv[i] / math.sqrt(i+1))\n return 1 + p1/4000 + p2", "def convert_g_angle_kb(g_ka):\n return g_ka*kJmol_kcalmol/2.0", ...
[ "0.5982731", "0.5893158", "0.58776337", "0.5852622", "0.58461875", "0.57480794", "0.57330877", "0.5659215", "0.5655035", "0.56252605", "0.56003636", "0.5546503", "0.5537108", "0.552432", "0.54896474", "0.5487537", "0.5459066", "0.54504985", "0.5421223", "0.5397106", "0.538995...
0.7663334
0
In prime fields GF(p), it's much more efficient to use LAPACK/BLAS implementations of linear algebra and then reduce modulo p rather than compute manually.
def _lapack_linalg(field: Type[Array], a: Array, b: Array, function, out=None, n_sum=None) -> Array: assert field._is_prime_field # Determine the return data-type which is the minimum of the two inputs' data-types if np.object_ in [a.dtype, b.dtype]: return_dtype = np.object_ else: retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mod(p):\n return (p[0]**2 + p[1]**2 + p[2]**2)**0.5", "def quadRes(p, n):\n\n lamb = 1\n alpha = (n - 1) // 2\n p = p % n\n\n while alpha != 0:\n if alpha % 2:\n alpha -= 1\n lamb = (lamb * p) % n\n else:\n p = (p ** 2) % n\n alpha = al...
[ "0.6652304", "0.63271755", "0.62591195", "0.6220892", "0.61440307", "0.6082", "0.6058181", "0.60429585", "0.5965352", "0.5924484", "0.59145206", "0.59111476", "0.58481306", "0.58169603", "0.57719815", "0.57548386", "0.5742388", "0.5734586", "0.5726758", "0.5705237", "0.570014...
0.6105543
5
calculates difference of time between two datetime objects in seconds
def time_diff(dt1, dt2): return abs(int((dt2 - dt1).total_seconds()))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def diff_secs(self, other):\n if not isinstance(other, datetime):\n types = (type(other), datetime)\n raise TypeError('Type mismatch: %s not instance of %s' % types)\n # pylint: disable=protected-access\n diff = (self.nanosecond - other.nanosecond) / 1.0E9\n diff += self.seconds - other.secon...
[ "0.8132231", "0.79217863", "0.75874573", "0.7471752", "0.7382647", "0.738203", "0.73235506", "0.70654625", "0.69745016", "0.68189234", "0.6797099", "0.67885256", "0.6673033", "0.66612285", "0.66514945", "0.6620497", "0.661168", "0.6587432", "0.65800476", "0.654346", "0.653178...
0.8125882
1
Reshape instance segmentation masks. The instance segmentation masks are reshaped to [num_instances, height, width] and cast to boolean type to save memory.
def _reshape_instance_masks(self, keys_to_tensors): height = keys_to_tensors['image/height'] width = keys_to_tensors['image/width'] to_shape = tf.cast(tf.stack([-1, height, width]), tf.int32) masks = keys_to_tensors['image/object/mask'] if isinstance(masks, tf.SparseTensor): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_strided_predictions_to_instance_masks(\n boxes, classes, masks, true_image_shapes,\n densepose_part_heatmap=None, densepose_surface_coords=None, stride=4,\n mask_height=256, mask_width=256, score_threshold=0.5,\n densepose_class_index=-1):\n batch_size, output_height, output_width, _ = (\n...
[ "0.641852", "0.6380959", "0.6181154", "0.6067276", "0.5916344", "0.58877003", "0.5873666", "0.5832909", "0.5825497", "0.5825497", "0.57845134", "0.5691263", "0.5652433", "0.5639518", "0.56289315", "0.5615403", "0.56153107", "0.5596605", "0.55480146", "0.5542748", "0.55268663"...
0.68097126
0
The backward direction of the underlying bijection used for object generation and sampling.
def forward_map( self, comb_class: Tiling, obj: GriddedPerm, children: Optional[Tuple[Tiling, ...]] = None, ) -> Tuple[Optional[GriddedPerm], ...]: if children is None: children = self.decomposition_function(comb_class) raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backward_transform(self):\n try:\n backward = self.forward_transform.inverse\n except NotImplementedError as err:\n raise NotImplementedError(\"Could not construct backward transform. \\n{0}\".format(err))\n return backward", "def get_direction_backwards(self, direc...
[ "0.72981775", "0.7249619", "0.6909156", "0.6744899", "0.6727564", "0.6727564", "0.6727564", "0.667316", "0.6662554", "0.6636115", "0.6576549", "0.65240693", "0.65204304", "0.6500558", "0.6500558", "0.6500558", "0.6488409", "0.64342487", "0.6416533", "0.6393608", "0.6393608", ...
0.0
-1
If value = None in key/value pair, the pair is removed. Python >3
def remove_nonetype(dictionary): return {k: v for k, v in dictionary.items() if v is not None}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_none_values(dict_):\r\n\r\n res = {}\r\n res.update((key, value) for key, value in dict_.iteritems() \\\r\n if value is not None)\r\n return res", "def remove_none(obj: dict):\n return remap(\n obj, visit=lambda path, key, value: key is not None and value is not None\...
[ "0.7199909", "0.71255124", "0.71048284", "0.7097556", "0.6947902", "0.6943325", "0.693008", "0.6918297", "0.68535745", "0.67980546", "0.6757742", "0.66963124", "0.6693766", "0.6610607", "0.6496099", "0.6454929", "0.6387159", "0.63852906", "0.63816816", "0.6351571", "0.6329148...
0.66146773
13
Test subscribing a connection to the topic.
def test_subscribe(self): dest = '/topic/dest' self.tm.subscribe(self.conn, dest) f = Frame(frames.MESSAGE, headers={'destination': dest}, body='Empty') self.tm.send(f) self.assertEqual(len(self.conn.frames), 1) subscription = self.conn.frames[0].headers.pop("subscripti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_connect_subscriber():\n config = {\"listeners\": \"localhost:8080\"}\n registry = Registry()\n registry.new(name=\"test\", backend=\"dummy\", **config)\n\n dummy = registry[\"test\"]\n subscriber = dummy.subscribe([\"mytopic\"])\n message = subscriber.listen()\n\n assert message == \"...
[ "0.80134827", "0.783767", "0.7347584", "0.7334756", "0.71643394", "0.7117257", "0.7100742", "0.709914", "0.7064217", "0.7046813", "0.7046813", "0.7040008", "0.69340974", "0.69263434", "0.691771", "0.6898203", "0.6856945", "0.68561816", "0.68422633", "0.68328905", "0.6828031",...
0.7238532
4
Retrieves installed OS version from device.
def _get_system_info(target: Optional[str], serial_num: Optional[str]) -> Tuple[str, str]: # TODO(b/242191374): Remove when devices in swarming are no longer booted # into zedboot. if running_unattended(): try: boot_device(target, BootMode.REGULAR, serial_num) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_os_version(self):\n\t\treturn call_sdk_function('PrlSrvInfo_GetOsVersion', self.handle)", "def get_osversion(self):\n\t\treturn call_sdk_function('PrlFoundVmInfo_GetOSVersion', self.handle)", "def get_os_version(self):\n\t\treturn call_sdk_function('PrlVmCfg_GetOsVersion', self.handle)", "def get_ver...
[ "0.75230896", "0.7387258", "0.73764807", "0.7265544", "0.72094125", "0.71885556", "0.71261394", "0.70272106", "0.6934574", "0.690898", "0.6897831", "0.6869052", "0.6847165", "0.6788562", "0.6781813", "0.6775302", "0.6749016", "0.67337734", "0.67303157", "0.6729739", "0.672189...
0.0
-1
calculate the heuristic evaluation from node1 to node2
def calculate_heuristic(node1, node2): return abs(node1.x - node2.x) + abs(node1.y - node2.y)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def astar_heuristic(n1, n2):\n average_speed = 70\n return edge_weight(n1, n2, 70)", "def heuristic(p1, p2):\n x1, y1 = p1\n x2, y2 = p2\n heuristic = abs(x1 - x2) + abs(y1 - y2)\n return heuristic", "def compare_nodes(G,all_match_pairs,match_pair,traversed,node1,node2, ports_weight):\n lo...
[ "0.6951572", "0.6924342", "0.6732993", "0.6315844", "0.63148195", "0.6273038", "0.6269104", "0.62559277", "0.6177733", "0.608907", "0.6049852", "0.60307944", "0.6022618", "0.6020466", "0.59970605", "0.5952318", "0.58883685", "0.5864463", "0.58437485", "0.5841283", "0.58403456...
0.7449296
0
Gets the hierarchy record corresponding to the given ``Hierarchy`` record ``Type``. This method is used to retrieve an object implementing the requested record. The ``hierarchy_record_type`` may be the ``Type`` returned in ``get_record_types()`` or any of its parents in a ``Type`` hierarchy where ``has_record_type(hier...
def get_hierarchy_record(self, hierarchy_record_type): raise errors.Unimplemented()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_hierarchy_form_record(self, hierarchy_record_type):\n raise errors.Unimplemented()", "def get_hierarchy_query_record(self, hierarchy_record_type):\n return # osid.hierarchy.records.HierarchyQueryRecord", "def get_resource_record(self, resource_record_type):\n return self._get_reco...
[ "0.73865825", "0.7208002", "0.6584399", "0.598167", "0.5925665", "0.5786833", "0.5665801", "0.55690384", "0.5536204", "0.54776156", "0.53854537", "0.53640234", "0.52182007", "0.5170775", "0.5149012", "0.5124984", "0.50976646", "0.50312763", "0.5030048", "0.50089383", "0.49987...
0.7963511
0
Gets the ``HierarchyFormRecord`` corresponding to the given hierarchy record ``Type``.
def get_hierarchy_form_record(self, hierarchy_record_type): raise errors.Unimplemented()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_hierarchy_record(self, hierarchy_record_type):\n raise errors.Unimplemented()", "def get_resource_form_record(self, resource_record_type):\n return self._get_record(resource_record_type)", "def get_hierarchy_query_record(self, hierarchy_record_type):\n return # osid.hierarchy.reco...
[ "0.72000974", "0.71235085", "0.66865706", "0.61999136", "0.6083813", "0.60750806", "0.6050519", "0.54479074", "0.53905815", "0.536404", "0.5352595", "0.53295714", "0.52847695", "0.5263839", "0.52441955", "0.50897187", "0.50838405", "0.49866122", "0.48846775", "0.48395443", "0...
0.78756297
0
Gets the parents of this node.
def get_parents(self): return NodeList(self._my_map['parentNodes'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parents(self):\n return self._parents", "def parents(self):\n\n return self._parents", "def get_parents(self, node):\n pass", "def getParents(self):\n return self.parents[:]", "def parents(self):\n p = self\n result = []\n while p:\n result.ap...
[ "0.83495015", "0.83411306", "0.8210359", "0.8168234", "0.8152039", "0.8143665", "0.7901918", "0.78186667", "0.7641584", "0.7625975", "0.75490093", "0.7502157", "0.74523664", "0.74523664", "0.7407031", "0.7344404", "0.73357356", "0.7321648", "0.7283606", "0.72410923", "0.72384...
0.8540263
0
Gets the next ``Node`` in this list.
def get_next_node(self): # Implemented from template for osid.resource.ResourceList.get_next_resource return next(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def next_node(self):\n return self.__next_node", "def next_node(self):\n return self.__next_node", "def next_node(self):\n return self.__next_node", "def next_node(self):\n\n return self.__next_node", "def getNext(self):\n return self.__nextListNode", "def get_next(node...
[ "0.8135122", "0.8135122", "0.8135122", "0.80644196", "0.7872199", "0.7755925", "0.7686641", "0.7463416", "0.734394", "0.7171407", "0.71608984", "0.71608984", "0.71250165", "0.6985818", "0.6960069", "0.69061214", "0.6900083", "0.6890988", "0.688727", "0.68436545", "0.6747374",...
0.7513871
7
Get the black listed flavors from the powervc conf file
def get_flavors_black_list(self): return self._sanitize(CONF.powervc.flavor_black_list)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_flavors_white_list(self):\n return self._sanitize(CONF.powervc.flavor_white_list)", "def flavors(self, details=True):\n flv = _flavor.FlavorDetail if details else _flavor.Flavor\n return list(self._list(flv, paginated=True))", "def show_flavors():\n return get_flavors()", "def...
[ "0.7092219", "0.70254785", "0.67633003", "0.6679941", "0.6521571", "0.64732844", "0.6329954", "0.6240594", "0.6197365", "0.6181987", "0.61028016", "0.61024034", "0.60877186", "0.6018809", "0.5969436", "0.5898388", "0.5668966", "0.56671065", "0.5660539", "0.56110346", "0.55914...
0.78771657
0
Add source address to Rule. If the packet matches this then the action is taken.
def add_source_address(self, srcAddr): self.source.address = srcAddr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _add_source(self, source: _Source) -> None:\n\n self._sources.append(source)", "def _add_source_net_filter(self, rule_list, source_net):\n for rule in rule_list:\n if (\"source\" in rule.keys()):\n if (\"nets\" in rule[\"source\"].keys()):\n rule[\"s...
[ "0.61482495", "0.6041444", "0.60072917", "0.59999424", "0.5947418", "0.5873676", "0.5827872", "0.58194613", "0.5730725", "0.5722741", "0.5715106", "0.5710649", "0.5691271", "0.5675672", "0.5669773", "0.5629854", "0.5585104", "0.5569946", "0.55544144", "0.554702", "0.5455648",...
0.725079
0
Swaps female nouns/pronouns with male equivalents.
def f2m(tokens): full_text = [] stack = [] #for token in tokens: for i in range(0, len(tokens)): token = tokens[i] text = token.text.content # pos = pos_tags[token.part_of_speech.tag] # label = labels[token.dependency_edge.label] lower = text.lower() lemm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def standardize_sex2(series):\n mapper = {\n \"M\": \"M\",\n \"MALE\": \"M\",\n \"BOY\": \"M\",\n \"F\": \"F\",\n \"FEMALE\": \"F\",\n \"GIRL\": \"F\",\n \"FEEMALE\": \"F\",\n }\n if series.str.islower().any():\n raise ValueError(\"standardize_sex ex...
[ "0.6075868", "0.58058745", "0.5652048", "0.557339", "0.54075223", "0.53525454", "0.5352482", "0.5285578", "0.5255011", "0.52292794", "0.5193117", "0.5149454", "0.5146188", "0.51081795", "0.51057446", "0.5103285", "0.50197166", "0.4991473", "0.49861816", "0.4981076", "0.497007...
0.53250563
7
Return the connected PowerOutlet, if it exists, or the connected PowerFeed, if it exists. We have to check for ObjectDoesNotExist in case the referenced object has been deleted from the database.
def connected_endpoint(self): try: if self._connected_poweroutlet: return self._connected_poweroutlet except ObjectDoesNotExist: pass try: if self._connected_powerfeed: return self._connected_powerfeed except ObjectDoesN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connected_endpoint(self):\n try:\n if self._connected_interface:\n return self._connected_interface\n except ObjectDoesNotExist:\n pass\n try:\n if self._connected_circuittermination:\n return self._connected_circuittermination...
[ "0.63744736", "0.56567365", "0.5332663", "0.5195941", "0.5057437", "0.50493574", "0.5016327", "0.49589127", "0.49565372", "0.49474147", "0.49171218", "0.49060825", "0.48928872", "0.489134", "0.4844746", "0.47963548", "0.47812122", "0.47551093", "0.47458473", "0.47414142", "0....
0.7590158
0
Return configuration file name
def config_file_name(self): return self._config_file_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configFilename(self):\n return self.name()+'.py'", "def get_config_file_name(self):\n argv = sys.argv\n config_type = \"dev\" # default configuration type\n if None != argv and len(argv) > 1 :\n config_type = argv[1]\n config_file = config_type + \".cfg\"\n ...
[ "0.8206758", "0.82023764", "0.7964704", "0.7788226", "0.7772019", "0.7749993", "0.773228", "0.75145", "0.74586695", "0.7454398", "0.74381214", "0.7415092", "0.74122864", "0.7398208", "0.723858", "0.7230302", "0.72223777", "0.7197193", "0.71113753", "0.70726925", "0.7017251", ...
0.86739314
0
Calculate the average publising delay.
def get_delay(self): if self.msg_tn == self.last_msg_tn: return if not self.delays: return n = len(self.delays) mean = sum(self.delays) / n std_dev = math.sqrt(sum((x - mean)**2 for x in self.delays) / n) max_delta = max(self.delays) min_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def avg(self):\n return sum(self.times) / len(self.times)", "def avg(self):\n return sum(self.times) / len(self.times)", "def avg(self):\n return sum(self.times) / len(self.times)", "def mean_time_spending_in_system(self):\n dur_sum = 0.0\n spending_time_seq = self.system.s...
[ "0.6654537", "0.6654537", "0.6654537", "0.64962053", "0.6475853", "0.64543074", "0.6447789", "0.64459527", "0.64339215", "0.6395105", "0.6289255", "0.62692195", "0.6256454", "0.6248246", "0.6230584", "0.62158215", "0.61967504", "0.61967504", "0.6176685", "0.6175765", "0.61398...
0.6447168
7
ecef position from eci and earth rotation angle.
def ecef_from_eci(p,r_eci,earth_rotation_angle_offset,t_since_epoch): # gmst angle = a + b a = t_since_epoch*7.29211e-5 + earth_rotation_angle_offset b = t_since_epoch*5.14671e-11 # here I get sin and cosine of GMST sin_theta = sin(a)*cos(b) + cos(a)*sin(b) cos_theta = cos(a)*cos(b) - ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _position_to_ECEF(self, latitude, longitude, altitude):\n\n # Convert the position to cartesian coordinates in the ECEF frame.\n angular_latitude = radians(latitude)\n angular_longitude = radians(longitude)\n a = 6378137.0 # Earth's semi-major axis (meters)\n f = 1/298.257223563 # Reciprocal fla...
[ "0.68340486", "0.6617956", "0.65683836", "0.64385104", "0.63262826", "0.617024", "0.61589795", "0.59739476", "0.5908253", "0.58857924", "0.5878772", "0.5873284", "0.5865676", "0.5841298", "0.5819325", "0.5785457", "0.57847035", "0.5781098", "0.57653266", "0.57612556", "0.5731...
0.761811
0
Return mocked event manager.
def event_manager(axis_device: AxisDevice) -> EventManager: axis_device.enable_events() return axis_device.event
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subscriber(event_manager: EventManager) -> Mock:\n callback = Mock()\n event_manager.subscribe(callback)\n return callback", "def event_manager(self):\n return ScriptDB.objects.get(db_key=\"Event Manager\")", "def mock_event_loop() -> Generator[AbstractEventLoop, Any, None]:\n loop = get...
[ "0.7059761", "0.6552476", "0.6319077", "0.62388057", "0.6058253", "0.6016567", "0.60003", "0.60003", "0.5988482", "0.5906066", "0.5858232", "0.5835197", "0.57861525", "0.57310617", "0.5690031", "0.566618", "0.5654627", "0.5654627", "0.56426626", "0.5609342", "0.5608833", "0...
0.64568573
2
Return mocked event manager.
def subscriber(event_manager: EventManager) -> Mock: callback = Mock() event_manager.subscribe(callback) return callback
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def event_manager(self):\n return ScriptDB.objects.get(db_key=\"Event Manager\")", "def event_manager(axis_device: AxisDevice) -> EventManager:\n axis_device.enable_events()\n return axis_device.event", "def mock_event_loop() -> Generator[AbstractEventLoop, Any, None]:\n loop = get_event_loop()...
[ "0.6552418", "0.64590394", "0.63182586", "0.62381876", "0.60607773", "0.601739", "0.5998901", "0.5998901", "0.59890246", "0.59054756", "0.5858516", "0.5836866", "0.57859063", "0.5726394", "0.5690182", "0.56668776", "0.5653175", "0.5653175", "0.5644724", "0.5612078", "0.561186...
0.70605147
0
Verify that a new audio event can be managed.
def test_create_event( event_manager: EventManager, subscriber: Mock, input: bytes, expected: tuple ) -> None: event_manager.handler(input) assert subscriber.call_count == 1 event: Event = subscriber.call_args[0][0] assert event.topic == expected["topic"] assert event.source == expected["source...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def audio_event_detection(self):\n # Test if trials already exist\n if 'TimeIntervals_speaker' not in self.model.nwb.intervals:\n # Test if file contains audio signals\n if any(name in self.model.nwb.stimulus for name in ['speaker1', 'speaker2']):\n AudioEventDete...
[ "0.621071", "0.61631536", "0.59750557", "0.58539927", "0.58474535", "0.5808299", "0.5763903", "0.5754627", "0.57506657", "0.5710692", "0.5692078", "0.56897014", "0.56695914", "0.56650525", "0.5663686", "0.5643315", "0.5641818", "0.55992705", "0.55988914", "0.5595343", "0.5595...
0.5594195
21
Grid with reguarlyspaced deviatoric moment tensors Given input parameters ``magnitudes`` (`list`) and ``npts`` (`int`), returns a ``Grid`` of size `len(magnitudes)npts_per_axis^4`. The grid is `semiregular` in the sense of an interpolation between two parameterizations. `See here `_ for details.
def DeviatoricGridSemiregular(magnitudes=[1.], npts_per_axis=20, tightness=0.8, uniformity=0.8): v, _ = _semiregular(npts_per_axis, 1, tightness, uniformity) w = 0 kappa = regular(0., 360, npts_per_axis) sigma = regular(-90., 90., npts_per_axis) h = regular(0., 1., npts_per_axis) rho = lis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FullMomentTensorGridSemiregular(magnitudes=[1.], npts_per_axis=20, \n tightness=0.8, uniformity=0.8):\n v, w = _semiregular(npts_per_axis, 2*npts_per_axis + 1, tightness, uniformity)\n\n kappa = regular(0., 360, npts_per_axis)\n sigma = regular(-90., 90., npts_per_axis)\n h = regular(0., 1., npt...
[ "0.7749194", "0.74455154", "0.73339987", "0.67329544", "0.6606894", "0.54779863", "0.53954077", "0.5213843", "0.52086174", "0.51095724", "0.50985503", "0.5026414", "0.50130117", "0.50087553", "0.4987232", "0.49732086", "0.4965959", "0.49447355", "0.49386954", "0.49282596", "0...
0.7571712
1
Normalize a dictionary that represents a 'Rule' line from the TZ
def _process_rule_line(line: str) -> ZoneRuleRaw: tokens: List[str] = line.split() # Check for valid year. from_year: int = int(tokens[2]) to_year_string: str = tokens[3] if to_year_string == 'only': to_year: int = from_year elif to_year_string == 'max': to_year = MAX_YEAR e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def localize(self, dt):\n\n #\n # TODO: implement various RRULE styles (at least common ones..)\n # possibly move rrule parsing into own classes because it's used by VEVENT as well\n # TODO: move get x-th day of month, first sunday, etc in separate functions\n\n ...
[ "0.57824135", "0.5452374", "0.5202563", "0.5159275", "0.51121336", "0.50462997", "0.5034982", "0.49981382", "0.4978953", "0.49114728", "0.490512", "0.49032444", "0.489956", "0.48930347", "0.4816575", "0.48120394", "0.48067203", "0.47856057", "0.47855338", "0.47763228", "0.474...
0.6836218
0
By default uniform distrn; if specify mean and std, normal distrn ====PARAM====
def generate_number(lbound=1, ubound=100, mean=None, std=None): x = np.arange(lbound, ubound + 1) if mean and std: prob = stats.norm.pdf(x, loc=mean, scale=std) prob = prob / prob.sum() #normalize the probabilities so they sum up to 1 else: prob = np.repeat(1 / len(x), len(x)) nu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normal(mean, std):\n\n return random.gauss(mean, std)", "def get_standard_normal_distribution():\n return np.random.normal(0, 1)", "def stdProbabilityNorm(self,std=False):\n sv = str(scipy.__version__).split('.')\n if int(sv[0])==0 and int(sv[1])==15:\n self.raiseAWarning('SciPy 0....
[ "0.7481304", "0.7150449", "0.6674744", "0.6647537", "0.65668905", "0.6561496", "0.65324444", "0.65228206", "0.6521963", "0.6515184", "0.6515184", "0.6515184", "0.6515184", "0.6515184", "0.64524764", "0.6449643", "0.6449643", "0.6437839", "0.64184743", "0.64146954", "0.6388554...
0.0
-1
returns the top most directory of the git project
def topdir(self): if self._topdir: return self._topdir topleveldata = self.git("rev-parse", "--show-toplevel") self._topdir = topleveldata[0] return self._topdir
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getGitPath() -> osp:\n current_dir = osp.dirname(osp.realpath(__file__))\n git_dir = osp.dirname(osp.dirname(current_dir))\n return git_dir", "def get_git_root():\n path = os.getcwd()\n git_repo = git.Repo(path, search_parent_directories=True)\n git_root = git_repo.git.rev_parse(\"--show-to...
[ "0.73643875", "0.7295264", "0.72423214", "0.7195259", "0.7164417", "0.7145505", "0.70791304", "0.7046762", "0.7030625", "0.7003805", "0.6943827", "0.69284815", "0.68796974", "0.6870393", "0.6845009", "0.6845009", "0.6809483", "0.6809483", "0.6809483", "0.6809483", "0.6782268"...
0.78332925
0
Get all of the indexes of the Motifs each Syllable Instance occurs in
def get_motif_identifier(focus, context, labels): focus_index = dict() # Initiate a Dictionary for i in focus: focus_index[i] = [] # Initiate the Nested List Structure sequential_counter = -1 for chunk_contexts, chunk_labels in zip(context, labels): current_counter = 0 # Make sure...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def occ_indices(self):\n indices = []\n for index,item in enumerate(self):\n if item==1:\n indices.append(index)\n return indices", "def get_indexes(self):\n indexes = []\n for c in self.components:\n indexes.extend(c.get_indexes())\n ...
[ "0.6535834", "0.6408524", "0.6236046", "0.60537475", "0.5991812", "0.59807163", "0.59156346", "0.5897677", "0.58879083", "0.58827716", "0.5871496", "0.58553237", "0.5842256", "0.584223", "0.58376837", "0.5821874", "0.58058745", "0.5799644", "0.5799043", "0.5786045", "0.578539...
0.5996063
4
Function test product buy missings goods
def test_product_buy_missing_goods(self): result_buy = self.info_list.product_buy("хлеб серый хлебозавод", 3) self.assertFalse(result_buy)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_product_buy_more_then_have(self):\n result_buy = self.info_list.product_buy(\"соль 1 кг\", 50)\n self.assertFalse(result_buy)", "def test_product_buy_with_not_exists_name(self):\n result_buy = self.info_list.product_buy(\"Говядина Немецкая 2кг\", 3)\n self.assertFalse(result_...
[ "0.8075074", "0.758697", "0.727506", "0.7218785", "0.7169291", "0.692855", "0.6698481", "0.6640945", "0.6603445", "0.6593986", "0.65813667", "0.6530681", "0.6524645", "0.65111244", "0.6490919", "0.64665735", "0.6436672", "0.6417067", "0.64169216", "0.6413099", "0.6390444", ...
0.849865
0
Function test add with negative amount
def test_add_with_negative_amount(self): good = GoodInfo("яйцо 1 кат.", "30", "-40", "2020-12-30", "14", "2020-12-30") check_product_data = self.database.add(good) self.assertFalse(check_product_data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_add4(self):\n self.assertEqual(-15, add(-10 , -5), \"should be -15\")", "def test_add3(self):\n self.assertEqual(-5, add(-10 , 5), \"should be -5\")", "def test_add_all_args_less_zero(self):\n try:\n self.assertEqual(add(-7, -11), -18)\n except Exception as error...
[ "0.7448883", "0.7427729", "0.736824", "0.7166033", "0.7009859", "0.6873676", "0.6862421", "0.6811187", "0.6782726", "0.6606376", "0.6548451", "0.65070283", "0.6479222", "0.64663655", "0.640971", "0.640952", "0.6408912", "0.64019084", "0.63806325", "0.63600844", "0.635466", ...
0.72248083
3
Given an ignore_list and a whitelist of glob patterns, returns the list of unignored file paths in the current directory and its subdirectories
def get_unignored_file_paths(ignore_list=None, whitelist=None): unignored_files = [] if ignore_list is None: ignore_list = [] if whitelist is None: whitelist = [] for root, dirs, files in os.walk("."): floyd_logger.debug("Root:%s, Dirs:%s", root, dirs) if ignore_path(un...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_prune_ignore_list(self, ignore_list, expected_ignored_dirs,\n expected_ignored_files):\n all_dirs = []\n all_files = []\n\n for path in self.paths:\n rel_dir_root = path[\"root\"]\n dirs = path[\"dirs\"]\n files = path[\"f...
[ "0.7174905", "0.7038338", "0.6943888", "0.669516", "0.6634314", "0.6630188", "0.6628441", "0.6590959", "0.65220934", "0.64883035", "0.6462591", "0.64571255", "0.63581324", "0.6356287", "0.63509166", "0.6349922", "0.6348198", "0.6322206", "0.62822616", "0.62545085", "0.6248346...
0.85696393
0
Returns a boolean indicating if a path should be ignored given an ignore_list and a whitelist of glob patterns.
def ignore_path(path, ignore_list=None, whitelist=None): if ignore_list is None: return True should_ignore = matches_glob_list(path, ignore_list) if whitelist is None: return should_ignore return should_ignore and not matches_glob_list(path, whitelist)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _ignore(path):\n return any(re.match(pattern, path) for pattern in ignore)", "def is_ignored(file, ignored):\n return any(i in PurePath(path.abspath(file)).parts for i in ignored)", "def _is_ignored(self, full_path):\n for ignor in self._ignored:\n if fnmatch.fnmatch(full_path, ...
[ "0.7889924", "0.76503617", "0.748269", "0.7387516", "0.73445004", "0.7208653", "0.7157327", "0.70860875", "0.702825", "0.68691033", "0.6839855", "0.6837356", "0.6766732", "0.6714539", "0.66428685", "0.64568067", "0.64001673", "0.63938576", "0.6369518", "0.6366561", "0.6342184...
0.8971064
0
Prepare image for inputting to the neural network. Returns a Variable
def prep_image(img, inp_dim): img = (letterbox_image(img, (inp_dim, inp_dim))) img = img[:,:,::-1].transpose((2,0,1)).copy() img = torch.from_numpy(img).float().div(255.0).unsqueeze(0) return img
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def preprocess(self, img):\n img_ = image.load_img(img, target_size=(299, 299))\n img_ = image.img_to_array(img_)\n img_ = np.expand_dims(img_, axis=0)\n img_ = preprocess_input(img_)\n return img_", "def recreate_image(im_as_var):\n recreated_im = im_as_var.data.numpy()[0]\...
[ "0.6291536", "0.62114257", "0.62105995", "0.6195852", "0.6168508", "0.61647016", "0.61413085", "0.61290294", "0.6119026", "0.6114515", "0.6112793", "0.61009884", "0.60939866", "0.60806966", "0.6080033", "0.6020758", "0.601292", "0.5997404", "0.5967493", "0.59661937", "0.59604...
0.5530708
86
Starting camera will be at center of map
def centerCamera(self): self.camera = (self.width / 2, self.height / 2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def center_screen(self):\n avg_lat, avg_lon = self.midpoint_euclidean(lat1, lon1, lat2, lon2)\n self.ids.mapview.center_on(avg_lat,avg_lon) # Set map center\n\n # Zoom levels dependent on distance\n if (distance < 5000) & (distance > 2500):\n self.ids.mapview.zoom = 3\n ...
[ "0.70352405", "0.6985123", "0.6828631", "0.6796097", "0.663609", "0.65729964", "0.65299606", "0.64972895", "0.64821655", "0.6378152", "0.62620604", "0.625535", "0.62340134", "0.62124085", "0.61958635", "0.61819005", "0.6128658", "0.6115625", "0.6104025", "0.6074049", "0.60689...
0.7788346
0
Adds a vertex to the graph, with no edges defined
def add_vertex(self, vertex): self[vertex] = {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_vertex(self, vertex):\n if vertex.id not in self.vertices.keys():\n self.vertices[vertex.id] = vertex", "def add_vertex(self, vertex):\n if vertex not in self.__graph_dict:\n self.__graph_dict[vertex] = []", "def add_vertex(self, vertex):\n if vertex not in se...
[ "0.85055125", "0.82507557", "0.82507557", "0.82443446", "0.8133861", "0.8039547", "0.80097365", "0.79923725", "0.7982626", "0.79631823", "0.79133254", "0.7884315", "0.7877437", "0.78556025", "0.7847672", "0.77880496", "0.7728314", "0.7667613", "0.7650713", "0.75953573", "0.75...
0.7131942
38
Returns a list of all vertices in the Graph
def vertices(self): return self.keys()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vertices(self):\n return list(self._graph)", "def vertices(self):\n return list(self.__graph.values())", "def list_vertices(self):\n return list(self.graph_dict.keys())", "def vertices(self):\n return list(self.graph_dict.keys())", "def vertices(self):\n return list(s...
[ "0.8886154", "0.8846358", "0.8702179", "0.8630348", "0.8614847", "0.8614847", "0.8614847", "0.86006093", "0.8520988", "0.817491", "0.8136372", "0.8125069", "0.8094082", "0.80744404", "0.80613047", "0.80018073", "0.79625577", "0.7861375", "0.7799369", "0.7686689", "0.76830953"...
0.78210294
18
Returns a list of all edges incident to vertex
def out_edges(self, vertex): return self[vertex].values()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def edges(self):\n es = []\n for vertex1 in self.vertices():\n for vertex2 in self.out_vertices(vertex1):\n es.append(self[vertex1][vertex2])\n return es", "def edge_vertices(edge):\n return [edge.vertex1, edge.vertex2]", "def getEdges(self):\n\n return ...
[ "0.79765224", "0.7512251", "0.74728763", "0.7437287", "0.74364126", "0.7360541", "0.7336492", "0.733552", "0.7322114", "0.7300695", "0.7294439", "0.72580093", "0.7236979", "0.7232401", "0.72192353", "0.72074276", "0.72045577", "0.7198116", "0.7188049", "0.718195", "0.71756816...
0.74958163
2
Returns the order of the Graph ( vertices)
def order(self): return len(self.vertices())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getOrder(self):\n return len(self.vertices)", "def get_vertices(self):\n return self.graph.keys()", "def vertices(self):\r\n return list(self.__graph_dict.keys())", "def vertices(self):\n return list(self.graph_dict.keys())", "def vertices(self):\n return list(self.__...
[ "0.7850691", "0.72378206", "0.72038573", "0.7140147", "0.71300364", "0.71300364", "0.71300364", "0.7094095", "0.70011145", "0.6992567", "0.6960722", "0.6915666", "0.6912506", "0.6875411", "0.6842737", "0.6831304", "0.6788382", "0.6757558", "0.67508364", "0.66754866", "0.66446...
0.7643813
1
Returns the size of the Graph ( edges)
def size(self): return len(self.edges())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e_size(self) -> int:\n return self.edges_on_graph", "def num_edges(self):\r\n return len(self.__generate_edges())", "def return_num_edges(self):\n return sum(map(lambda x: len(x),self.__adj))", "def num_edges(self):\n return sum(len(v.adj) for v in self.vertices.values())", ...
[ "0.87315494", "0.83444655", "0.829474", "0.8278802", "0.8185221", "0.81806314", "0.8139453", "0.8068646", "0.8059087", "0.8056643", "0.8052091", "0.8042402", "0.79461014", "0.79356617", "0.7932557", "0.7896003", "0.7890604", "0.7875404", "0.7834918", "0.77904415", "0.7786159"...
0.8567235
1
Will stochastically add edge according to probability (p). Returns True if added, and False otherwise
def maybe_add_edge(self, edge, p): if random.random() < p: self.add_edge(edge) return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def probability(prob):\n return random.random() <= prob", "def probability(p):\n return p > random.uniform(0.0, 1.0)", "def addable(self):\n for dn in self.dim:\n cval = getattr(self, dn)\n if self.dim[dn].vote(cval) is False:\n CrawlConfig.log(\"%s votes again...
[ "0.5812488", "0.5730291", "0.55687344", "0.55371475", "0.553141", "0.54962033", "0.5493105", "0.5420615", "0.5416423", "0.5407257", "0.5402384", "0.5400078", "0.53958565", "0.53832835", "0.53322726", "0.5326718", "0.5302144", "0.5301565", "0.5295585", "0.52877825", "0.5262618...
0.76956624
0
Test that request can create a document with out document id using post
def test_request_create_a_new_document_when_document_id_not_provided_using_post(): http_client = Mock() base_uri = "" uri_parts = [ 'base_uri', 'database' ] options = dict( Body="I decided today that I like baseball.", ) request = WriteDocumentRequest( http_c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_request_can_create_a_new_document_with_a_document_id():\n http_client = Mock()\n uri_parts = [\n 'base_uri',\n \"database\"\n ]\n options = dict(\n id='some_doc_id',\n Body=\"I decided today that I like baseball.\",\n )\n\n request = WriteDocumentRequest(\n ...
[ "0.7759681", "0.75666445", "0.7484269", "0.72726965", "0.71749717", "0.70922416", "0.7057896", "0.7039089", "0.68926406", "0.68775666", "0.6864931", "0.6834118", "0.67676115", "0.6710808", "0.6710426", "0.6676006", "0.647908", "0.6422909", "0.63974714", "0.63569266", "0.63392...
0.8027402
0
Get subsampled source data from index range as a dict.
def get_dict_from_range(self, start=None, end=None): df = self.from_range(self.data, self.factor, start, end, self.lowpass) new_source_data = df.to_dict(orient="list") new_source_data["index"] = df.index for k in list(new_source_data): if isinstance(k, tuple): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __getitem__(self, index):\n return self.data_source.get_sample(index)", "def _subsample(\n data: Dict[str, np.ndarray],\n sample_count: int,\n) -> Dict[str, np.ndarray]:\n count = data[\"input\"].shape[0]\n samples = np.random.choice(count, sample_count, replace=False)\n return {\n ...
[ "0.5995742", "0.59851515", "0.59343714", "0.58508575", "0.5768535", "0.5677529", "0.56306547", "0.5613403", "0.5593749", "0.5590195", "0.55005395", "0.5460248", "0.54341394", "0.5393558", "0.5378026", "0.53661865", "0.5355112", "0.53535587", "0.53389543", "0.5337763", "0.5330...
0.64588374
0
Applies the kwargs to the object, returns obj(kwargs)
def make_object(obj, kwargs): return obj(**kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _chain(self, **kwargs):\n obj = self._clone()\n obj.__dict__.update(kwargs)\n return obj", "def __call__(self):\n return self.cls(**self.kwargs)", "def __call__(self, *args, **kwargs):\n args, kwargs = override_args_kwargs(self.__wrapped__, args, kwargs, self.forced_kwarg...
[ "0.6933572", "0.6492434", "0.634593", "0.63288796", "0.6299249", "0.6256631", "0.6214707", "0.61439466", "0.614303", "0.61196834", "0.61090845", "0.6035072", "0.6035072", "0.60207784", "0.5984696", "0.5934793", "0.5896466", "0.58872056", "0.5880492", "0.5863091", "0.58297706"...
0.7251061
0
Returns Hours Minutes Seconds.
def truncate_microsec(curr_time=None): time_str = curr_time.strftime("%H %M %S %f") return time_str[0:-3]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hours(self):\n return int(self.minutes / 60)", "def calculate_seconds_in_hours(hours):\n return int(hours * 3600)", "def hours_in(sec):\r\n return int(sec//3600)", "def sec2hms(seconds):\n hours, seconds = divmod(seconds, 60**2)\n minutes, seconds = divmod(seconds, 60)\n return int(...
[ "0.7904061", "0.750901", "0.73078614", "0.70920366", "0.70458233", "0.70401967", "0.69632274", "0.6961829", "0.6947475", "0.6904386", "0.68871826", "0.68803865", "0.687828", "0.68734455", "0.6859084", "0.68184334", "0.6813529", "0.6792327", "0.6783826", "0.6782428", "0.676367...
0.0
-1
Material attenuation coefficient in Np/m When called, this object returns a frequencydependent attenuation coefficient in Nepers per meter (Np/m).
def material_attenuation_factory(kind, *args, **kwargs): if kind == "constant": return _constant_mat_att(*args, **kwargs) elif kind == "polynomial": return _polynomial_mat_att(*args, **kwargs) else: raise ValueError(f"unknown material attenuation method '{kind}'")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attenuation_constant(self,freq):\n return np.real(self.propagation_constant(freq))", "def ambient_coefficient(self):\n return self._ambient_coefficient", "def mass(self):\n\t\treturn self.volume*self.density", "def getNumberOpenMicsAttenuation(self, channel, unitCode=0):\n resp = sel...
[ "0.6564062", "0.6434395", "0.6259492", "0.619671", "0.6111853", "0.6048485", "0.5969985", "0.59546685", "0.59276503", "0.5921307", "0.5917742", "0.590496", "0.59025544", "0.58992815", "0.58269763", "0.58165556", "0.58151376", "0.57929397", "0.57761097", "0.57018334", "0.56877...
0.53076035
89
Get a 404 from the api
def test_api_404(self): r = requests.get('{server}/api/0.1/sam'.format( server=self.get_server_url()), headers={'accept': 'application/json'}) self.assertEquals(404, r.status_code) self.assertIn('error', r.json())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def not_found():\n return HttpError(404)", "def resource_not_found(exc, request):\r\n request.response_status = \"404 Not Found\"\r\n return {'message': str(exc)}", "def normal404(e):\n return jsonify({\"error\": \"Not found\"}), 404", "def not_found(self, error):\n return jsonify({'error': 'N...
[ "0.8209154", "0.7824642", "0.7805917", "0.7767973", "0.77303576", "0.77285975", "0.76822436", "0.76737714", "0.76507485", "0.763392", "0.7623928", "0.7587681", "0.7584691", "0.7571031", "0.756735", "0.75025874", "0.74955064", "0.74955064", "0.7490479", "0.74538106", "0.742125...
0.7492089
18
Get the path to the schema directory. Returns str Absolute path to the directory containing schemarelated files.
def get_bundled_schema_path(): return str(data.load_resource("schema"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_templates_dir(self):\n return self.templates_dir", "def path(self):\n path = os.path.join(self.base_dir, self.store().replace(' ', '_'), self.package_name())\n return os.path.abspath(path)", "def migration_directory(self) -> str:\n\n with package_resources.path(\n ...
[ "0.653247", "0.64446396", "0.64312434", "0.64078027", "0.6396574", "0.6355574", "0.6344212", "0.63441914", "0.6333923", "0.6323513", "0.630447", "0.626138", "0.62237036", "0.62116265", "0.617212", "0.6158681", "0.6140182", "0.613251", "0.61221516", "0.61179286", "0.6071618", ...
0.69938314
0
Return a logger to use.
def get_logger(name=None): return logging.getLogger("bids-schema" + (".%s" % name if name else ""))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_logger():\n return logging.Logger(__name__)", "def get_logger():\r\n global logger\r\n \r\n if logger:\r\n return logger\r\n else:\r\n return create_logger()", "def get_logger():\n return logging.getLogger(__name__)", "def _logger(self) -> logging.Logger:\n ret...
[ "0.84556633", "0.8438837", "0.84093773", "0.83607113", "0.83491546", "0.8319979", "0.8233772", "0.8186244", "0.81163925", "0.80998576", "0.80715126", "0.80279315", "0.7983712", "0.7974102", "0.79734695", "0.7970801", "0.796836", "0.7960701", "0.7954365", "0.7951406", "0.79418...
0.75840944
44
Set the logger level.
def set_logger_level(lgr, level): if isinstance(level, int): pass elif level.isnumeric(): level = int(level) elif level.isalpha(): level = getattr(logging, level) else: lgr.warning("Do not know how to treat loglevel %s" % level) return lgr.setLevel(level)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setlevel(self, lvl):\n self.logger.setLevel(lvl)", "def set_level(self, level: str):\n self._logger.setLevel(getattr(logging, level))", "def level(self, log_level):\n self.logger.setLevel(log_level)", "def set_log_level(self, level):\n if level == 'info':\n leve...
[ "0.83490396", "0.8286088", "0.82048225", "0.8167511", "0.8110509", "0.7982989", "0.7967855", "0.78434926", "0.77775747", "0.7756647", "0.7745352", "0.774237", "0.7694874", "0.7679493", "0.7641758", "0.75494343", "0.7527466", "0.7498347", "0.7468073", "0.7458903", "0.7397463",...
0.7892524
7
Asks user to specify a city, month, and day to analyse.
def get_filters(): print('\nHello! Let\'s explore some US bikeshare data!') # get user input for city (chicago, new york city, washington). city=input('Please, introduce the name of the city you want to obtain information about [chicago/new york city/washington]: ') city=city.lower() #Let us now ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Raw_Data(city,month,day):\n print(\"The city you have entered is: \",city)\n print(\"The month you have entered is: \",month)\n print(\"The day you have entered is: \",day)", "def get_filters():\n city = None\n month = None\n day = None\n while day == None:\n # TO DO: get user input f...
[ "0.6676906", "0.66361713", "0.644072", "0.64044094", "0.6389289", "0.6348259", "0.63149446", "0.6287745", "0.62613475", "0.6259299", "0.6254077", "0.6252656", "0.6239785", "0.62238306", "0.618626", "0.6159143", "0.61465406", "0.6146475", "0.61377347", "0.61340225", "0.6130182...
0.0
-1
Loads data for the specified city and filters by month and day if applicable.
def load_data(city, month, day): # load data file into a dataframe df=pd.read_csv(CITY_DATA[city]) # convert the Start Time column to datetime df['Start Time'] = pd.to_datetime(df['Start Time']) # extract month and day of week from Start Time to create new columns df['month'] = df['Start Time'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data(city, month, day):\n df = pd.read_csv(CITY_DATA [city])\n \n # convert the Start Time column to datetime\n df['Start Time'] = pd.to_datetime(df['Start Time'])\n \n # extract month and day of week from Start Time to create new columns\n df['month'] = df['Start Time'].dt.month\n ...
[ "0.81320685", "0.8108889", "0.8045821", "0.8042514", "0.80090284", "0.80071104", "0.79991937", "0.7998333", "0.7988789", "0.797905", "0.79737365", "0.79610896", "0.7956163", "0.7947432", "0.79463065", "0.7908287", "0.7908229", "0.7904569", "0.7900715", "0.78930074", "0.788921...
0.7690176
65
Displays statistics on the most frequent times of travel.
def time_stats(df,month,day): print('\nCalculating The Most Frequent Times of Travel...\n') start_time = time.time() # display the most common month if month == 'all': try: popular_month_num = stat.mode(df['month']) tot_months=['january','february','march','april','may'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_stats(df):\n\n print('\\nDisplaying the statistics on the most frequent times of '\n 'travel...\\n')\n start_time = time.time()\n\n # display the most common month\n most_common_month = df['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' +\...
[ "0.8023676", "0.8022362", "0.79149705", "0.7825905", "0.78213924", "0.7813664", "0.7765152", "0.77395964", "0.7735777", "0.7733763", "0.76860064", "0.7668081", "0.7651128", "0.7644099", "0.7639373", "0.7636164", "0.7624668", "0.7622597", "0.76122236", "0.7599646", "0.75829977...
0.0
-1
Displays statistics on the most popular stations and trip.
def station_stats(df): print('\nCalculating The Most Popular Stations and Trip...\n') start_time = time.time() # display most commonly used start station try: popular_start_station=stat.mode(df['Start Station']) print('The most common start station is ', popular_start_station) exce...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def station_stats(df):\n\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n start_time = time.time()\n\n # display most commonly used start station\n print(popular_start_station(df))\n\n # display most commonly used end station\n print(popular_end_station(df))\n\n # display m...
[ "0.7815675", "0.7662213", "0.7553417", "0.74914914", "0.74748665", "0.7446617", "0.7428588", "0.74237514", "0.74177027", "0.7400495", "0.7387161", "0.7385634", "0.73647535", "0.735934", "0.73566747", "0.73548365", "0.7351854", "0.7351274", "0.735057", "0.73421645", "0.7340198...
0.7090215
65
Displays statistics on the total and average trip duration.
def trip_duration_stats(df): print('\nCalculating Trip Duration...\n') start_time = time.time() # display total travel time tot_time=df['Trip Duration'].sum() print('The total travel time is ', tot_time) # display mean travel time mean_time=df['Trip Duration'].mean() print('The mean t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trip_duration_stats(data):\n print('\\nCalculating Trip Duration...\\n')\n start_time = time.time()\n # display total travel time\n total_trip_time= data['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'. format(total_trip_time/3600))\n # display mean travel time\n avg_tri...
[ "0.81437284", "0.802547", "0.80045545", "0.7950035", "0.79377407", "0.7931485", "0.79268783", "0.79154867", "0.79149073", "0.79081887", "0.7905919", "0.7901011", "0.7889729", "0.7887157", "0.7885447", "0.7884455", "0.78829545", "0.7874428", "0.7868993", "0.7866923", "0.786433...
0.7891848
12
Sets the dhcp_total of this IpamsvcDHCPUtilization.
def dhcp_total(self, dhcp_total): self._dhcp_total = dhcp_total
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dhcp_used(self, dhcp_used):\n\n self._dhcp_used = dhcp_used", "def dhcp_utilization(self, dhcp_utilization):\n\n self._dhcp_utilization = dhcp_utilization", "def memory_segments_total(self, memory_segments_total):\n\n self._memory_segments_total = memory_segments_total", "def total(s...
[ "0.6143569", "0.6134892", "0.59524095", "0.590617", "0.5867286", "0.5867286", "0.5867286", "0.5867286", "0.5867286", "0.5867286", "0.5867286", "0.5867286", "0.57546216", "0.5656928", "0.55948377", "0.5485584", "0.5457866", "0.5326436", "0.53212035", "0.5304963", "0.53042376",...
0.90746355
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, IpamsvcDHCPUtilization): return False return self.__dict__ == other.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.808826", "0.808826", "0.8054592", "0.79827315", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "0.79666996", "...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Returns a date instance for an input string of the format today, tomorrow, n days later or YYYYMMDD
def get_date(date): if date == "today": d = datetime.date.today() elif date == "tomorrow": d = datetime.date.today() + datetime.timedelta(days=1) elif re.match(r'(\d+) days later', date): day_count = re.match(r'(\d+) days later', date).group(1) d = datetime.date.today() + dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_str_to_date(date_str):\n if date_str.lower() == 'tomorrow':\n return datetime.date.today() + datetime.timedelta(days=1)\n elif date_str.lower() == 'today':\n return datetime.date.today()\n elif date_str.lower() == 'yesterday':\n return datetime.date.today() + datetime.time...
[ "0.6779083", "0.629099", "0.6254444", "0.62116545", "0.61020595", "0.6094298", "0.6063271", "0.6041574", "0.60043776", "0.5996567", "0.59766126", "0.59766126", "0.5974323", "0.5974323", "0.5956379", "0.5951183", "0.5915846", "0.59110796", "0.5908084", "0.5871088", "0.5854535"...
0.67704743
1
Residual unit with 2 sub layers.
def _residual(self, x, in_filter, out_filter, stride, activate_before_residual=False): if activate_before_residual: with tf.variable_scope('shared_activation'): x = self._batch_norm('init_bn', x) x = self._relu(x,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _residual(self, x):\n h = x\n h = self.c1(h)\n h = self.activation(h)\n h = self.c2(h)\n h = F.avg_pool2d(h, 2)\n\n return h", "def _compute_residuals(self):\n residuls = self.I - self.E\n return residuls", "def _residual(self, x):\n h = x\n ...
[ "0.6926841", "0.6821984", "0.68052804", "0.67520994", "0.66504586", "0.6615629", "0.6560378", "0.6500654", "0.6449865", "0.64042366", "0.63595057", "0.6353905", "0.6266771", "0.62459993", "0.6239865", "0.62308127", "0.62068146", "0.620489", "0.61988837", "0.61864936", "0.6077...
0.62136924
16
A residual convolutional layer with a bottleneck. The layer is a composite of three convolutional layers with a ReLU non linearity and batch normalization after each linear convolution. The depth if the second and third layer is out_filter / 4 (hence it is a bottleneck).
def _bottleneck_residual(self, x, in_filter, out_filter, stride, activate_before_residual=False): if activate_before_residual: with tf.variable_scope('common_bn_relu'): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _bottleneck_residual_v2_build(self,\n x,\n kernel_size,\n in_filter,\n out_filter,\n stride):\n layers=[]\n with tf.name_scope('bo...
[ "0.7421475", "0.72686666", "0.7230579", "0.72246397", "0.71851045", "0.7154416", "0.7069251", "0.7011976", "0.6947003", "0.6942502", "0.6830424", "0.68250424", "0.6818204", "0.6760517", "0.6752154", "0.670637", "0.66961485", "0.668851", "0.6633543", "0.66120356", "0.66088223"...
0.75768554
0
Given a string of arbitrary characters x, returns a string containing only alphanumeric characters. >>> _alphanum("Hello World2!") 'helloworld2'
def _alphanum(x): return lower(sub(r'\W+', '', str(x)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alphanumeric(value: Any) -> str:\n str_value = str(value)\n\n if str_value.isalnum():\n return str_value\n\n raise vol.Invalid(\"String is not alphanumeric\")", "def _only_letters(s):\r\n\treturn _regex_non_letters.sub('', s)", "def alphanum(v):\n return re.sub('\\\\W+', '', v)", "def ...
[ "0.73670834", "0.7274214", "0.7183744", "0.7013882", "0.69354355", "0.6881688", "0.68380725", "0.67156744", "0.67156744", "0.6715192", "0.6668695", "0.6638525", "0.6631613", "0.663095", "0.6626183", "0.66256595", "0.66209036", "0.6609141", "0.66083586", "0.6608271", "0.656704...
0.85007995
0
Method to get the current state of this paragraph. This can be used
def get_state(self) -> dict: return { 'last_part': self.last_part, 'last_word': self.last_word }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CurrentState(self):\n return self.currentState", "def get_state(self):\n return self.get_pose()", "def getState(self):\r\n self.UpdateState()\r\n return self.cur_state", "def state(self):\n return self.get_state()", "def state(self):\n return self._current_va...
[ "0.7394515", "0.7294439", "0.7275485", "0.7233603", "0.72265166", "0.7210025", "0.7151723", "0.7136804", "0.7075063", "0.7073517", "0.7039003", "0.70182127", "0.6989819", "0.69434327", "0.69434327", "0.69434327", "0.69129217", "0.69129217", "0.6902597", "0.6902597", "0.689517...
0.0
-1
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, AdminAbortMetadata): return False return self.__dict__ == other.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.84564555", "0.8391999", "0.8144653", "0.81410354", "0.81326365", "0.8094085", "0.80921024", "0.80921024", "0.80921024", "0.8085453", "0.8085453", "0.807646", "0.807646", "0.806588" ]
0.0
-1
Activation layers do not have parameters to return.
def get_params(self): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def output_layer_activation(x):\n return x", "def _build_activation_layer_params(self, conv_param):\n return {}", "def _return_activation(x, nl):\n if nl == 'HS':\n x = Activation(_hard_swish)(x)\n if nl == 'RE':\n x = Activation(_relu6)(x)\n ...
[ "0.76275307", "0.71806186", "0.68092906", "0.6657098", "0.6633509", "0.6605289", "0.6409103", "0.63759506", "0.63720393", "0.6343785", "0.6296905", "0.6260543", "0.6256562", "0.62541515", "0.62461793", "0.62389296", "0.6211136", "0.6185329", "0.616977", "0.6160488", "0.615356...
0.0
-1
Calculate the great circle distance between two points on the earth (specified in decimal degrees)
def haversine(lon1, lat1, lon2, lat2): # convert decimal degrees to radians lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2]) # haversine formula dlon = lon2 - lon1 dlat = lat2 - lat1 a = sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlon/2)**2 c = 2 * asin(sqrt(a)) km ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def great_circle(lat_1, long_1, lat_2, long_2):\n long_1 = m.radians(long_1)\n lat_1 = m.radians(lat_1)\n long_2 = m.radians(long_2)\n lat_2 = m.radians(lat_2)\n\n d = 2 * 6367.45 * m.asin(\n m.sqrt(haversine(lat_2 - lat_1)\n + m.cos(lat_1)*m.cos(lat_2) *\n haversine(long...
[ "0.81450045", "0.7863265", "0.76322985", "0.76064754", "0.75978696", "0.75965863", "0.75944835", "0.75720793", "0.75630087", "0.7555095", "0.7528691", "0.7517629", "0.7492963", "0.7467739", "0.7452678", "0.7434477", "0.73914117", "0.7357736", "0.73484355", "0.73318124", "0.73...
0.0
-1
Set up test data.
def setUpTestData(cls): number_of_authors = 13 for author_id in range(number_of_authors): Author.objects.create( first_name=f'Christian {author_id}', last_name=f'Surname {author_id}', )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUp(self):\n\n self.test_data_path = 'testing/test_data/'", "def setUp(self):\n self.dataset = get_test_dataset()", "def setUpTestData(cls):\n # volunteer user\n common.initialize_empty_volunteer()", "def setUpTestData(cls):\n data_gen.run()", "def setUpTestData(cls...
[ "0.83564", "0.825977", "0.82419825", "0.8071621", "0.8071621", "0.8071621", "0.8071621", "0.7874065", "0.7855246", "0.783438", "0.7805763", "0.77781427", "0.7761605", "0.77067", "0.7682978", "0.76799023", "0.7657977", "0.76328367", "0.76242405", "0.7600356", "0.7600356", "0...
0.0
-1
Test whether view uses correct template.
def test_view_uses_correct_template(self): response = self.client.get(reverse('authors')) self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, 'catalog/author_list.html')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_view_uses_correct_template(self):\n response = self.client.get(reverse('home'))\n self.assertEqual(response.status_code, 200)\n self.assertTemplateUsed(response, 'home.html')", "def test_correct_template(self):\n self.assertCorrectTemplateUsed('common/home.html')", "def tes...
[ "0.7972926", "0.74334484", "0.73684883", "0.7063787", "0.69927156", "0.6970793", "0.69417226", "0.6869033", "0.6848959", "0.6818472", "0.6781452", "0.67717135", "0.67637086", "0.676036", "0.6733427", "0.6704484", "0.6603957", "0.65892375", "0.6588529", "0.6563026", "0.6453644...
0.68573385
8
Test whether the second page has remaining 3 author datas.
def test_list_all_authors(self): response = self.client.get(reverse('authors') + '?page=2') self.assertEqual(response.status_code, 200) self.assertTrue('is_paginated' in response.context) self.assertTrue(response.context['is_paginated'] is True) self.assertTrue(len(response.conte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_multiple_authors(self):\r\n args = self.page_kwargs.copy()\r\n content = Page(**args)\r\n assert content.authors == [content.author]\r\n args['metadata'].pop('author')\r\n args['metadata']['authors'] = ['First Author', 'Second Author']\r\n content = Page(**args)\r...
[ "0.6553073", "0.6420547", "0.6238431", "0.6177004", "0.6103268", "0.60127074", "0.5811108", "0.5786506", "0.57684463", "0.57521904", "0.5721928", "0.5714665", "0.57075924", "0.5638508", "0.5628726", "0.56103766", "0.56048155", "0.5601681", "0.5601321", "0.5593357", "0.5592118...
0.6258059
2
View To Create New Post For The Logged In Users
def post_create_view(request): if request.method == 'POST': token_type, token = request.META.get('HTTP_AUTHORIZATION').split() print('Token Type', token_type) print('Token', token) if(token_type != 'JWT'): return Response({'detail': 'No JWT Authentication Token Found'}, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self):\n\n self.render(\"newpost.html\", user=self.user)", "def get(self, request):\n\n # crear el formulario\n form = PostForm()\n form.fields['owner'].queryset = Blog.objects.filter(owner=request.user)\n # renderiza la plantilla con el formulario\n context = {\...
[ "0.75197774", "0.7458993", "0.73660964", "0.7280329", "0.7179917", "0.71763194", "0.7174415", "0.7167982", "0.71580124", "0.70999926", "0.70779955", "0.70665425", "0.706009", "0.7049474", "0.7032341", "0.70232904", "0.70169395", "0.6975465", "0.6905004", "0.6891271", "0.68687...
0.0
-1
Plot verificationrank histogram of member predictions.
def plot_rank_histogram(data, rank_column, bins=51): if rank_column not in data: raise KeyError("No rank column present in data") if data[rank_column].value_counts(dropna=False).loc[np.nan] == len(data): raise IndexError("No data present in rank column") data[rank_column].hist(bins=bins...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_card_rank_sns(): \n df = join_training_holdout()\n fig, ax = plt.subplots(figsize=(20,20))\n df['Outcome'] = df['made_or_lost'].apply(lambda x: give_names(x))\n ax = sns.histplot(data=df, x='card_rank', hue='Outcome', bins=20, element='step', hue_order=['Won/Broke Even', 'Lost'])\n ax.se...
[ "0.6615667", "0.6348781", "0.6210841", "0.6018151", "0.59984756", "0.59370756", "0.59137493", "0.58105886", "0.57934785", "0.57854235", "0.5766825", "0.5746995", "0.57243717", "0.5708908", "0.57015455", "0.5686671", "0.5668942", "0.5666561", "0.56384987", "0.5598878", "0.5598...
0.5787195
9
Sort two keys so that map and list types are ordered last.
def _sort_by_type(self, x, y): x_key, x_value = x y_key, y_value = y # if both values are map or list, sort by their keys if ((isinstance(x_value, schema.Map) or isinstance(x_value, schema.List)) and (isinstance(y_value, schema.Map) or isin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def safe_sort_key(value):\n if isinstance(value, abc.Mapping):\n return sorted(value.items())\n return value", "def sortVersion(ver_map):\n\tfor key in list(ver_map.keys()):\n\t\tver_map[key].sort( key=lambda x: x[1], reverse=True)", "def demonstrate_dict_sorting():\n john = {'name': 'John Lenn...
[ "0.64102507", "0.6231759", "0.6213341", "0.61664075", "0.6137948", "0.6123012", "0.6118101", "0.6108094", "0.60815483", "0.6057812", "0.6050743", "0.6044651", "0.6033242", "0.60204506", "0.6017607", "0.6011682", "0.59997904", "0.5995764", "0.59606415", "0.59431493", "0.591196...
0.7361374
0
Return package version as listed in `__version__` in `init.py`.
def get_version(): init_py = open(path.join(here, 'silverstrike', '__init__.py')).read() return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_version_from_package() -> str:\n path = join(dirname(__file__), \"__init__.py\")\n path = normpath(abspath(path))\n with open(path) as f:\n for line in f:\n if line.startswith(\"__version__\"):\n token, version = line.split(\" = \", 1)\n version = ve...
[ "0.8489906", "0.8391696", "0.83872837", "0.83810335", "0.8379964", "0.83716947", "0.83716947", "0.83716947", "0.83716947", "0.83716947", "0.83716947", "0.83716947", "0.83702946", "0.83589464", "0.8358408", "0.83572453", "0.80788046", "0.7975946", "0.79387873", "0.7893726", "0...
0.764969
28
Next trading day, according to self._trading_days as extracted from the price series. Used for cases where an action should be associated with the following day for some bookkeeping. E.g. `self.holdings` returns what was held at the beginning of a day, so should reflect buys from the previous day. Returns
def _next_trading_day(self, day): next_day = self._trading_days.shift(-1)[day] return next_day if not pd.isnull(next_day) else None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_next_day(self):\n pass", "def next_day(date):\n return date + datetime.timedelta(days=1)", "def next_day(date):\n return date + datetime.timedelta(days=1)", "def get_next_trading_day_schedule(reference_day: dt):\n reference_day = reference_day.date()\n schedule = get_trading_calend...
[ "0.73099154", "0.6321466", "0.6321466", "0.62277573", "0.59517384", "0.58179754", "0.57568824", "0.57125086", "0.5694916", "0.5649629", "0.55576724", "0.55576724", "0.55494326", "0.55078804", "0.5483971", "0.548372", "0.5481552", "0.545432", "0.54534245", "0.545306", "0.54374...
0.8203046
0
Calculate the great circle distance between two points on the earth (specified in decimal degrees).
def haversine(lon1, lat1, lon2, lat2): # convert decimal degrees to radians lon1 = math.radians(lon1) lat1 = math.radians(lat1) lon2 = math.radians(lon2) lat2 = math.radians(lat2) # haversine formula dlon = lon2 - lon1 dlat = lat2 - lat1 hav_a = (math.sin(dlat/2)**2 + m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def great_circle(lat_1, long_1, lat_2, long_2):\n long_1 = m.radians(long_1)\n lat_1 = m.radians(lat_1)\n long_2 = m.radians(long_2)\n lat_2 = m.radians(lat_2)\n\n d = 2 * 6367.45 * m.asin(\n m.sqrt(haversine(lat_2 - lat_1)\n + m.cos(lat_1)*m.cos(lat_2) *\n haversine(long...
[ "0.80903876", "0.7918765", "0.7660566", "0.75521797", "0.75284225", "0.7506654", "0.74786574", "0.74642843", "0.74548745", "0.74480456", "0.7425769", "0.74230164", "0.7411007", "0.7378529", "0.7346605", "0.73163897", "0.7268444", "0.72597384", "0.7253224", "0.72503906", "0.71...
0.0
-1
Converts kilometers to feet.
def kilometersToFeet(kilometers): return kilometers * 3280.8399
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def meters_to_feet(meters: float) -> float:\n meters = float(meters)\n feet = float(float(meters) * 3.28084)\n return round(feet, 2)", "def feet_to_meters(feet: float) -> float:\n feet = float(feet)\n meter = float(float(feet) * 0.3048)\n return round(meter, 2)", "def meters_from(feet):\n ...
[ "0.79020363", "0.76679796", "0.69603604", "0.69589305", "0.68606603", "0.6769439", "0.6701047", "0.67001724", "0.6582841", "0.64985365", "0.6488865", "0.6443928", "0.6426619", "0.63773346", "0.63653344", "0.6276663", "0.6261711", "0.6185956", "0.6090829", "0.6087881", "0.6061...
0.8038636
0
Computes distance to another position.
def distanceTo(self, other): dist = haversine( self.longitude, self.latitude, other.longitude, other.latitude) # Convert km to feet return kilometersToFeet(dist)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __distance_to(self, other: Any) -> float:\n return np.linalg.norm(self.pos - other.pos)", "def distance(self, other):\n # distance = math.sqrt((self.position.x - other.position.x) ** 2 +\n # (self.position.y - other.position.y) ** 2)\n distance = math.sqrt(sum...
[ "0.7790073", "0.7597254", "0.74673164", "0.74529016", "0.74423295", "0.7405607", "0.7405247", "0.7375575", "0.7350029", "0.7317094", "0.72704566", "0.7260872", "0.7221817", "0.7214805", "0.72144014", "0.7209372", "0.72062945", "0.71920884", "0.71911454", "0.7172432", "0.71559...
0.0
-1
Computes distance to another position.
def distanceTo(self, other): return math.hypot(abs(self.altitude_msl - other.altitude_msl), self.gps_position.distanceTo(other.gps_position))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __distance_to(self, other: Any) -> float:\n return np.linalg.norm(self.pos - other.pos)", "def distance(self, other):\n # distance = math.sqrt((self.position.x - other.position.x) ** 2 +\n # (self.position.y - other.position.y) ** 2)\n distance = math.sqrt(sum...
[ "0.7790073", "0.7597254", "0.74673164", "0.74529016", "0.74423295", "0.7405607", "0.7405247", "0.7375575", "0.7350029", "0.7317094", "0.72704566", "0.7260872", "0.7221817", "0.7214805", "0.72144014", "0.7209372", "0.72062945", "0.71920884", "0.71911454", "0.7172432", "0.71559...
0.0
-1
Computes distance to another waypoint.
def distanceTo(self, other): return self.position.distanceTo(other.position)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_distance(first: Waypoint, second: Waypoint) -> int:\n return int(distance.vincenty(first.coords(), second.coords()).m)", "def distance(self, other_pt, is_lla=True):\n return 0.0", "def distanceTo(self,other):\n if not isinstance(other,Point):\n return \n return m...
[ "0.7684375", "0.73794615", "0.7147475", "0.7086253", "0.70122766", "0.7009856", "0.6989472", "0.6986631", "0.6969396", "0.69655997", "0.6945678", "0.6930918", "0.69222295", "0.69194514", "0.68836", "0.6878844", "0.6867738", "0.6866467", "0.6862392", "0.6861021", "0.6859389", ...
0.0
-1
Whether the pos is contained within the obstacle.
def containsPos(self, aerial_pos): # Check altitude of position aerial_alt = aerial_pos.altitude_msl if (aerial_alt < 0 or aerial_alt > self.cylinder_height): return False # Check lat/lon of position dist_to_center = self.gps_position.distanceTo(aerial_pos.gps_positio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __contains__(self, pos):\n if pos in self._coordinates:\n return True\n return False", "def contains ( self, pos ):\n # make sure xmin is minimum etc\n xmin = min(self.x_min,self.x_max)\n xmax = max(self.x_min,self.x_max)\n ymin = min(self.y_min,self.y_max...
[ "0.8072759", "0.8004984", "0.7913597", "0.7877831", "0.7877831", "0.7824586", "0.76674896", "0.76564986", "0.7639229", "0.76113224", "0.75989133", "0.74908906", "0.746953", "0.74481034", "0.74299824", "0.7421714", "0.7394681", "0.7352582", "0.7341266", "0.73325235", "0.732953...
0.6593427
69
Gets the travel time to the current waypoint from a previous.
def getWaypointTravelTime(self, waypoints, id_tm1, id_t): # Validate inputs if (not waypoints or len(waypoints) < 2 or id_tm1 is None or id_t is None or id_tm1 < 0 or id_tm1 >= len(waypoints) or id_t < 0 or id_t >= len(waypoints) or...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def distance_to_current_waypoint():\n nextwaypoint = vehicle.commands.next\n if nextwaypoint == 0:\n return None\n missionitem = vehicle.commands[nextwaypoint -\n 1] #commands are zero indexed\n lat = missionitem.x\n lon = missionitem.y\n alt = missionite...
[ "0.67564076", "0.67471576", "0.6683569", "0.63197637", "0.63130295", "0.62086713", "0.6182511", "0.61681986", "0.61613643", "0.60957456", "0.602971", "0.5969862", "0.5969862", "0.59337944", "0.5896524", "0.5886175", "0.5884869", "0.586602", "0.58533466", "0.5841723", "0.58309...
0.6539501
3
Whether the pos is contained within the obstacle's pos.
def containsPos(self, obst_pos, aerial_pos): dist_to_center = obst_pos.distanceTo(aerial_pos) return dist_to_center <= self.sphere_radius
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contains ( self, pos ):\n # make sure xmin is minimum etc\n xmin = min(self.x_min,self.x_max)\n xmax = max(self.x_min,self.x_max)\n ymin = min(self.y_min,self.y_max)\n ymax = max(self.y_min,self.y_max)\n \n abs_tol = self.abs_tol\n # get pos indices insid...
[ "0.81055474", "0.80560154", "0.8015659", "0.7876811", "0.7876811", "0.78622717", "0.7719058", "0.76857233", "0.7667986", "0.76323044", "0.75321317", "0.751279", "0.751274", "0.7451799", "0.74485177", "0.7446227", "0.7401021", "0.7392253", "0.7372555", "0.7367254", "0.7300573"...
0.71885836
26
Whether the given pos is inside the zone.
def containsPos(self, aerial_pos): return self.containsManyPos([aerial_pos])[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __contains__(self, pos):\n if pos in self._coordinates:\n return True\n return False", "def check_inside(self, pos):\n x,y = pos\n return x >= self.posx and x <= self.posx + self.sizex and y >= self.posy and y <= self.posy + self.sizey", "def isPositionInRoom(self, pos):\n ...
[ "0.75990796", "0.7595194", "0.7532512", "0.74127835", "0.729342", "0.7201523", "0.7194056", "0.71933943", "0.71034855", "0.7099536", "0.7060864", "0.7042645", "0.70328623", "0.69877964", "0.69877964", "0.6985076", "0.6981042", "0.69747937", "0.6906688", "0.6893291", "0.689109...
0.6236167
65
Return reasonable activation name for initialization in `kaiming_uniform_` for hipster activations
def sanitize_activation_name(activation_name: str) -> str: if activation_name in {ACT_MISH, ACT_SWISH, ACT_SWISH_NAIVE, ACT_MISH_NAIVE}: return ACT_LEAKY_RELU return activation_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_activation_fn(activation):\n if activation == \"relu\":\n return F.relu\n if activation == \"gelu\":\n return F.gelu\n if activation == \"glu\":\n return F.glu\n raise RuntimeError(F\"activation should be relu/gelu, not {activation}.\")", "def get_activation(identifier):...
[ "0.6761652", "0.668276", "0.6613989", "0.6605213", "0.6539628", "0.6502119", "0.6485397", "0.6424983", "0.6419242", "0.640946", "0.6309949", "0.6281996", "0.6276343", "0.6202123", "0.6187426", "0.6178447", "0.6158005", "0.61384535", "0.6123243", "0.6095896", "0.5998492", "0...
0.6518931
5
Rectifier activation function. The relu function of a tensor T is the elementwise max between 0 and the appropriate element of T.
def relu(t: Tensor) -> Tensor: tensor = t if torch.is_tensor(t) else torch.tensor(t) return torch.max(tensor, torch.zeros_like(tensor))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def activation_ReLU(self):\n self.value = max(0, self.value)", "def ReLU(self, x):\n self.x = x\n output = np.maximum(0, x)\n return output", "def relu(x):\r\n return np.maximum(0, x)", "def lrelu(x):\r\n return max(0.1*x, x)", "def ReLU(self, x):\r\n self.x = x\r\n retu...
[ "0.68770915", "0.63752925", "0.63115066", "0.6309538", "0.6292214", "0.6291664", "0.628224", "0.6269601", "0.6232633", "0.6231103", "0.62033576", "0.6189135", "0.61839515", "0.6024637", "0.6012776", "0.60046065", "0.59631175", "0.5954576", "0.59474975", "0.59145164", "0.58935...
0.71457636
0
Return True if `thing` is a sqla model class.
def is_model(thing): return (isinstance(thing, sqlalchemy.ext.declarative.api.DeclarativeMeta) and hasattr(thing, '__table__')) # disard sqlalchemy.ext.declarative.declarative_base()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_sqlalchemy_class(klass):\n # TODO: better way?\n return hasattr(klass, \"_sa_class_manager\")", "def is_model_type(obj: Any) -> bool: # pragma: no cover\n pass", "def is_instance(self, thing: Any) -> bool:\n return isinstance(thing, self.underlying)", "def match(cls, kind: 'dsl.A...
[ "0.69174945", "0.67170745", "0.6689589", "0.64690644", "0.636973", "0.63364804", "0.627248", "0.6257936", "0.6234809", "0.6191098", "0.61553466", "0.60792625", "0.60792625", "0.6075516", "0.60668635", "0.6064807", "0.6056149", "0.60508865", "0.60508865", "0.60508865", "0.6050...
0.7730708
0
Return a json encodable dict of the `sqlalchemy.util._collections.result` given as `result`, containing a key per resource containing a dict of key per field containing the field value. The collection keys must be formatted as 'resource.field'.
def serialize_tuple(result): serialized = {} for key, value in result._asdict().items(): resource, field = key.split('.') serialized[resource] = dict(**{field: value}, **serialized.get(resource, {})) return serialized
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serializeSearchResult( result ):\n print( result.__dict__ )\n return { k: getattr( result, k ) for k in result.__dict__ }", "def result_dict(result):\n result_dict = [row.__dict__ for row in result]\n\n return result_dict", "def transform_hydrated_resource_table_output(result):\n\n i...
[ "0.6355387", "0.61579114", "0.61542946", "0.57927036", "0.5721456", "0.5713335", "0.5690201", "0.5682214", "0.5670728", "0.56477326", "0.56124437", "0.55953085", "0.55600506", "0.5534532", "0.55236703", "0.549499", "0.54457116", "0.54318476", "0.5406318", "0.53910553", "0.536...
0.61526495
3
initializeWeights return the random weights for Neural Network given the number of node in the input layer and output layer
def initializeWeights(n_in,n_out): epsilon = sqrt(6) / sqrt(n_in + n_out + 1); W = (np.random.rand(n_out, n_in + 1)*2* epsilon) - epsilon; return W
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_weights(no_input, no_hidden, no_output):\r\n weight_lst = []\r\n no_of_weights = (no_input * no_hidden) + (no_hidden * no_output)\r\n\r\n for weight in range(no_of_weights):\r\n weight = 0.01 * random.random()\r\n weight_lst.append(weight)\r\n\r\n return weight_lst", "def init_...
[ "0.79954374", "0.7986932", "0.7974503", "0.7787648", "0.7780327", "0.7771887", "0.7735712", "0.7685867", "0.7663179", "0.7653449", "0.7638454", "0.7635003", "0.763378", "0.75979704", "0.7595571", "0.7582085", "0.75628924", "0.7498529", "0.74930763", "0.7469328", "0.7467855", ...
0.74845827
19
Notice that z can be a scalar, a vector or a matrix return the sigmoid of input z
def sigmoid(z): return 1 / (1 + np.exp(-z))#your code here
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sigmoid(z):\r\n \r\n return vSigmoid(z);", "def sigmoid(z): \n return 1/(1 + np.e**(-z))", "def sigmoid(z):\r\n \r\n return 1.0 / (1.0+np.exp(-z))", "def sigmoid(z):\n return 1 / (1 + np.exp(-1 * z))", "def sigmoid(z):\n\treturn 1.0/(1.0+np.exp(-z))", "def sigmoid(z):\n return ...
[ "0.8941681", "0.8928782", "0.8770657", "0.8767649", "0.87237227", "0.8721816", "0.87175727", "0.8682023", "0.86781025", "0.86586905", "0.8646876", "0.8635549", "0.8620208", "0.86049646", "0.8585983", "0.856894", "0.8557261", "0.8535781", "0.85240513", "0.8511901", "0.8505612"...
0.8527784
18
Gets the id of this BuAgentScheduleShift. The globally unique identifier for the object.
def id(self): return self._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_id(self):\n return self.__id", "def get_id(self):\n return self.__id", "def get_id(self):\n\n\t\treturn self.__id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n ...
[ "0.7108567", "0.7108567", "0.7105296", "0.7059424", "0.7059424", "0.7059424", "0.7059424", "0.7059424", "0.7059424", "0.69911367", "0.69911367", "0.6974558", "0.69605136", "0.69425124", "0.69425124", "0.69425124", "0.69425124", "0.69425124", "0.69425124", "0.69425124", "0.694...
0.0
-1
Sets the id of this BuAgentScheduleShift. The globally unique identifier for the object.
def id(self, id): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_id(self, id):\n self.__id = id", "def set_id(self, id_):\n\n self.id_ = id_", "def set_id(self, id_=None):\n if id_ is None:\n self.id = id(self)\n else:\n self.id = id_", "def set_id(self, id):\n self.data['id'] = id", "def set_id(self, id):...
[ "0.7192467", "0.7172572", "0.7065659", "0.69546187", "0.69503474", "0.69023335", "0.68125516", "0.6809735", "0.6801133", "0.67747605", "0.67747605", "0.67747605", "0.67747605", "0.67747605", "0.67747605", "0.67747605", "0.67747605", "0.67747605", "0.67747605", "0.67747605", "...
0.68040025
10
Gets the start_date of this BuAgentScheduleShift.
def start_date(self): return self._start_date
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_date(self):\n return self.__start_date", "def start_date(self) -> str:\n return self._start_date", "def getStartDate(self):\n return self.__startDate", "def start_date(self) -> str:\n return pulumi.get(self, \"start_date\")", "def start_date(self) -> str:\n retu...
[ "0.72763145", "0.7179473", "0.71195656", "0.7019412", "0.7019412", "0.688474", "0.6808064", "0.67783654", "0.6752927", "0.6752927", "0.6719573", "0.6703717", "0.66093874", "0.6592975", "0.65413815", "0.6524515", "0.65144295", "0.64930826", "0.6449572", "0.64491713", "0.643894...
0.73096585
1
Sets the start_date of this BuAgentScheduleShift.
def start_date(self, start_date): self._start_date = start_date
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_date(self, start_date):\n\n self._start_date = start_date", "def start_date(self, start_date):\n\n self._start_date = start_date", "def start_date(self, start_date):\n\n self._start_date = start_date", "def start_date(self, start_date):\n\n self._start_date = start_date"...
[ "0.773006", "0.773006", "0.773006", "0.773006", "0.773006", "0.773006", "0.773006", "0.773006", "0.773006", "0.7724436", "0.77001864", "0.7534967", "0.75259924", "0.7333607", "0.73264724", "0.7070435", "0.6982366", "0.69806767", "0.64607537", "0.64365435", "0.64365435", "0....
0.78137726
0
Gets the length_minutes of this BuAgentScheduleShift. The length of this shift in minutes
def length_minutes(self): return self._length_minutes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def length_minutes(self, length_minutes):\n \n self._length_minutes = length_minutes", "def time_length(self):\n return self._time_length", "def minutes(self):\n return int((self.end - self.start).total_seconds()) / 60", "def get_game_length(self, duration):\n minutes = int...
[ "0.6467894", "0.63341165", "0.6315783", "0.62272733", "0.61702085", "0.6124439", "0.60538363", "0.5958617", "0.5904298", "0.5881073", "0.5838939", "0.5836568", "0.58350754", "0.5767936", "0.5736193", "0.5725747", "0.5681503", "0.56731683", "0.56577545", "0.56577545", "0.56377...
0.7974054
0