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
Convert the given length to this unit system.
def accumulated_precipitation(self, precip: float | None, from_unit: str) -> float: if not isinstance(precip, Number): raise TypeError(f"{precip!s} is not a numeric value.") # type ignore: https://github.com/python/mypy/issues/7207 return DistanceConverter.convert( # type: ignore[u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_length(self, event):\n try:\n #Compare other unit to one unit(meters)\n current_value, current_unit = float(\"0\" + str(self.v.get())), self.dropdown.get()\n unit_comp = {\"angstroms\": 10 ** -10, \"au\": 149598550000.0, \"barleycorns\": 0.008467, \"cables\": 182...
[ "0.6670528", "0.66462547", "0.6538739", "0.65376264", "0.6306371", "0.6266917", "0.62175375", "0.61862123", "0.60758966", "0.60726297", "0.57924855", "0.5782921", "0.5779073", "0.5777692", "0.57317674", "0.5725653", "0.57113177", "0.5657724", "0.56575876", "0.56210715", "0.56...
0.0
-1
Convert the given pressure to this unit system.
def pressure(self, pressure: float | None, from_unit: str) -> float: if not isinstance(pressure, Number): raise TypeError(f"{pressure!s} is not a numeric value.") # type ignore: https://github.com/python/mypy/issues/7207 return PressureConverter.convert( # type: ignore[unreachable]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def set_pressure(self, pressure: str) -> pint.Quantity:\n # Add units (mbar) if none\n try:\n float(pressure)\n except ValueError:\n pass\n else:\n logger.warning(\"No units provided to set_pressure, assuming mbar.\")\n pressure = pressu...
[ "0.6652109", "0.66339236", "0.62720007", "0.61590123", "0.6077406", "0.60663325", "0.6018506", "0.5881737", "0.5860045", "0.5814669", "0.5710054", "0.57037246", "0.5678668", "0.56356466", "0.56356466", "0.56356466", "0.56026274", "0.5590976", "0.5579915", "0.5566469", "0.5563...
0.6949114
0
get u from time
def t2u(self, t ): if t < self.time_final: # Find time index i = (np.abs(self.t_sol - t)).argmin() # Find associated control input u = self.u_sol[i,:] else: u = self.ubar return u
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time(self, u):\n return self._ll_tree.get_time(u)", "def get_time(self):\n return \"%02u:%02u:%02u (%d)\" % self.rtc.datetime()[4:8]", "def uptime():\n seconds = timedelta(seconds=int(time.time() - start_time))\n d = datetime(1, 1, 1) + seconds\n return(\"%dD:%dH:%dM:%dS\" % (d.day-1...
[ "0.76406306", "0.6499333", "0.62756634", "0.6248426", "0.62467057", "0.6226869", "0.6211265", "0.6151163", "0.6135651", "0.6134488", "0.61249197", "0.61018676", "0.60952395", "0.6094671", "0.608546", "0.60584384", "0.6053521", "0.6022374", "0.6012883", "0.6012883", "0.6011582...
0.57993203
46
Darknet Convolution2D followed by BatchNormalization and LeakyReLU.
def DarknetConv2D_BN_Leaky(*args, **kwargs): no_bias_kwargs = {'use_bias': False} no_bias_kwargs.update(kwargs) return compose( DarknetConv2D(*args, **no_bias_kwargs), BatchNormalization(), LeakyReLU(alpha=0.1))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def darknet_CBL(*args, **kwargs):\n\n no_bias_kwargs = {'use_bias': False} # 没懂为啥用 no_bias\n no_bias_kwargs.update(kwargs)\n return compose(\n darknet_Conv2D(*args, **no_bias_kwargs),\n custom_batchnormalization(),\n LeakyReLU(alpha=0.1)\n )", "def darknet_CBM(*args, **kwargs):\...
[ "0.72769314", "0.69703734", "0.68800706", "0.6808079", "0.6775198", "0.66250277", "0.6619191", "0.6596903", "0.6548156", "0.6438889", "0.6412645", "0.6403083", "0.6384412", "0.6384063", "0.6368069", "0.63608307", "0.63480204", "0.6341501", "0.6320468", "0.6317373", "0.6316059...
0.64908445
9
Create YOLO_V3 model CNN body in Keras.
def yolo_body(inputs, num_anchors, num_classes): darknet = Model(inputs, darknet_body(inputs)) x, y1 = make_last_layers(darknet.output, 512, num_anchors*(num_classes+5)) x = compose( DarknetConv2D_BN_Leaky(256, (1,1)), UpSampling2D(2))(x) x = Concatenate()([x,darknet.layers[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_model(new_shape):\n model = Sequential()\n\n\n model.add(Convolution3D(\n input_shape = new_shape[1:],\n filters=64,\n kernel_size=6,\n data_format='channels_first',\n ))\n\n\n model.add(Dropout(0.2))\n\n model.add(Convolution3D(\n filters=64,\n k...
[ "0.7000937", "0.6814621", "0.6803811", "0.68015534", "0.67773974", "0.67460144", "0.6714797", "0.6638663", "0.6617054", "0.6589045", "0.65775615", "0.65713036", "0.65538025", "0.65469056", "0.6522481", "0.64997536", "0.6484227", "0.64808244", "0.6478727", "0.6426085", "0.6413...
0.66727483
7
Convert final layer features to bounding box parameters.
def yolo_head(feats, anchors, num_classes, n): num_anchors = len(anchors) # Reshape to batch, height, width, num_anchors, box_params. anchors_tensor = K.reshape(K.constant(anchors), [1, 1, 1, num_anchors, 2]) conv_dims = K.shape(feats)[1:3] # assuming channels last # In YOLO the height index is th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _recover_boundingboxes(features):\n ymin = features['image/object/bbox/ymin'].values\n xmin = features['image/object/bbox/xmin'].values\n ymax = features['image/object/bbox/ymax'].values\n xmax = features['image/object/bbox/xmax'].values\n return tf.transpose([ymin, xmin, ymax, xmax])", "def t...
[ "0.7014735", "0.63791776", "0.630396", "0.6226149", "0.6146508", "0.6130948", "0.61238664", "0.61238664", "0.61097616", "0.60883397", "0.60687864", "0.6041045", "0.6035037", "0.5999887", "0.59981453", "0.599375", "0.59856915", "0.59845275", "0.59782374", "0.59268117", "0.5925...
0.0
-1
Convert YOLO box predictions to bounding box corners.
def yolo_boxes_to_corners(box_xy, box_wh): box_mins = box_xy - (box_wh / 2.) box_maxes = box_xy + (box_wh / 2.) return K.concatenate([ box_mins[..., 1:2], # y_min box_mins[..., 0:1], # x_min box_maxes[..., 1:2], # y_max box_maxes[..., 0:1] # x_max ])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yolo2_boxes_to_corners(box_xy, box_wh):\n box_mins = box_xy - (box_wh / 2.)\n box_maxes = box_xy + (box_wh / 2.)\n\n return K.concatenate([\n box_mins[..., 1:2], # y_min\n box_mins[..., 0:1], # x_min\n box_maxes[..., 1:2], # y_max\n box_maxes[..., 0:1] # x_max\n ])",...
[ "0.6786762", "0.6678438", "0.66167235", "0.62608075", "0.62465745", "0.61667407", "0.61380535", "0.6099331", "0.5994448", "0.598241", "0.59424794", "0.58903325", "0.58597636", "0.5851628", "0.5850366", "0.5840755", "0.58114934", "0.580946", "0.5795982", "0.57877517", "0.57852...
0.6826108
0
Get a random element from the set.
def getRandom(self) -> int: size = len(self.value_set) if size > 0: from random import randint x = randint(1, size) return self.values[x - 1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getRandom(self):\n return self.nums[random.randint(0, len(self.nums) - 1)]\n\n # Your RandomizedSet object will be instantiated and called as such:\n # obj = RandomizedSet()\n # param_1 = obj.insert(val)\n # param_2 = obj.remove(val)\n # param_3 = obj.getRandom()", "...
[ "0.77060276", "0.738916", "0.7296881", "0.72187954", "0.6871744", "0.68453854", "0.68330806", "0.67740154", "0.67226046", "0.6703282", "0.6665089", "0.66356236", "0.66217655", "0.6612035", "0.6567767", "0.6477719", "0.6462421", "0.64428514", "0.64162946", "0.6400411", "0.6398...
0.66000897
14
Returns a String representation of this node.
def __str__(self): return 'BinarySearchTreeNode(' + str(self.element) + ')'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n # string representation includes values of all inner fields\n return \\\n \"Node Name: \" + str(self.name) + \"\\n\" + \\\n \"Node Attributes: \" + str(self.attributes) + \"\\n\" + \\\n \"Incident Edges: \" + \"\\n\".join([edge.__str__() for edge ...
[ "0.8291988", "0.8291988", "0.82533664", "0.8191103", "0.8079578", "0.80739796", "0.80497724", "0.804564", "0.79801595", "0.79225874", "0.7911872", "0.7892363", "0.78823924", "0.7861754", "0.78566617", "0.7829123", "0.78088105", "0.77361065", "0.773497", "0.7688711", "0.765610...
0.0
-1
Returns a String representation of this node.
def __repr__(self): return str(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n # string representation includes values of all inner fields\n return \\\n \"Node Name: \" + str(self.name) + \"\\n\" + \\\n \"Node Attributes: \" + str(self.attributes) + \"\\n\" + \\\n \"Incident Edges: \" + \"\\n\".join([edge.__str__() for edge ...
[ "0.8291988", "0.8291988", "0.82533664", "0.8191103", "0.8079578", "0.80739796", "0.80497724", "0.804564", "0.79801595", "0.79225874", "0.7911872", "0.7892363", "0.78823924", "0.7861754", "0.78566617", "0.7829123", "0.78088105", "0.77361065", "0.773497", "0.7688711", "0.765610...
0.74894565
44
Get the node in left Returns
def get_left(self): return self.left
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def left(self, node):\r\n if self._col(node.count) > 0:\r\n return self.nodes[node.count - 1]\r\n else:\r\n return None", "def _left(node):\n return 2 * node + 1", "def get_left(self):\n return BinaryNode.or_none(self.left)", "def get_left(self):\n return ...
[ "0.8266706", "0.8181526", "0.8121266", "0.80485576", "0.7981654", "0.7856588", "0.7795719", "0.7795719", "0.7756437", "0.76558304", "0.7613392", "0.7586135", "0.7560027", "0.7547983", "0.7500931", "0.7464654", "0.74285597", "0.73867786", "0.73867786", "0.73559", "0.7345297", ...
0.81041837
3
Check if there is a left node Returns Boolean True if this node has a left node, False otherwise
def has_left(self): return self.left != None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_left(self):\n return self.__left != None", "def _is_left(self):\n if self.parent is None:\n return None\n else:\n return self is self.parent.left", "def isLeft(self):\n return self.left", "def has_left(self):\n return self.l is not None", "de...
[ "0.8452011", "0.8218997", "0.81602395", "0.8051771", "0.7943002", "0.7887608", "0.7633336", "0.75017947", "0.7456436", "0.7453908", "0.72634757", "0.719522", "0.7152842", "0.7035977", "0.69829607", "0.6890689", "0.68843067", "0.6857836", "0.68354315", "0.6823545", "0.67718804...
0.8503447
0
Check if there is a right node Returns Boolean True if this node has a right node, False otherwise
def has_right(self): return self.right != None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_right(self):\n return self.__right != None", "def has_right(self):\n return self.r is not None", "def has_right(self, position):\n return self.right_child(position) is not None", "def isRight(self):\n return self.right", "def is_right_child(self):\n if self.parent...
[ "0.82744443", "0.80768716", "0.799553", "0.767467", "0.7664969", "0.7276706", "0.72104865", "0.7195391", "0.7141292", "0.7041455", "0.68037605", "0.6722828", "0.6719649", "0.6683277", "0.66723096", "0.6653542", "0.6602737", "0.6491335", "0.64379066", "0.6428469", "0.64243644"...
0.83415973
0
Check if this node is a left child. Returns Boolean True if this node is a Left child, False otherwise
def is_left_child(self): if self.parent == None: return False return self.parent.left == self
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_left_child(self):\n is_left_child = False\n parent = self.get_parent()\n if parent is not None:\n is_left_child = parent.get_left() == self\n\n return is_left_child", "def _is_left(self):\n if self.parent is None:\n return None\n else:\n ...
[ "0.86834097", "0.8252207", "0.81634355", "0.81033516", "0.7756187", "0.77090186", "0.75064105", "0.73689735", "0.7367423", "0.7285645", "0.72672045", "0.7069587", "0.70231384", "0.69660443", "0.6911641", "0.68435735", "0.6837624", "0.67881703", "0.67812175", "0.6779749", "0.6...
0.875686
0
Check if this node is a right child. Returns Boolean True if this node is a right child, False otherwise
def is_right_child(self): if self.parent == None: return False return self.parent.right == self
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_right_child(self):\n is_right_child = False\n parent = self.get_parent()\n if parent is not None:\n is_right_child = parent.get_right() == self\n\n return is_right_child", "def has_right(self, position):\n return self.right_child(position) is not None", "def...
[ "0.8800208", "0.8230735", "0.7642522", "0.7597405", "0.7575094", "0.73211753", "0.726169", "0.7253628", "0.71304727", "0.7090633", "0.69669855", "0.67735183", "0.67693514", "0.67012644", "0.66908145", "0.6678091", "0.66195977", "0.65199625", "0.6487182", "0.64120066", "0.6392...
0.8847885
0
Add new child node for this move remove m from list of untried_moves. Return the added child node.
def AddChild(self, move, state, isGameOver): node = Node(Move = move, state = state, isGameOver = isGameOver, parent = self) self.untried_moves.remove(move) # this move is now not available self.child.append(node) return node
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_child(self, m, s):\n n = Node(move=m, parent=self, state=s)\n self.untried_moves.remove(m)\n self.child_nodes.append(n)\n return n", "def AddChild(self, m, s):\n n = Node(move=m, parent=self, state=s)\n self.untriedMoves.remove(m)\n self.childNodes.append(...
[ "0.78564954", "0.75309515", "0.75309515", "0.68633735", "0.6787122", "0.6705781", "0.6516797", "0.6291655", "0.6028146", "0.5708837", "0.5531847", "0.5402255", "0.5396621", "0.53821003", "0.5376219", "0.5351933", "0.5319961", "0.5271597", "0.51948035", "0.5180786", "0.5155151...
0.71495616
3
Acquisition end time, as a python time or datetime object. `acquisition_end_time` is taken from the $ETIM keyword parameter in the TEXT segment of the FCS file. If date information is also found, `acquisition_end_time` is a datetime object with the acquisition date. If not, `acquisition_end_time` is a datetime.time obj...
def acquisition_end_time(self): return self._acquisition_end_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timeEnd(self)->datetime:\n if self._scenario == LM_HardDate.Scenario.ValidSince:\n raise SdkError(\"timeEnd not defined for scenario 'ValidSince'\")\n\n return self._lic.params['timeEnd'].value", "def end_time(self) -> Optional[str]:\n return pulumi.get(self, \"end_time\")", ...
[ "0.6776973", "0.67281276", "0.6718161", "0.66283387", "0.66228485", "0.66228485", "0.6568629", "0.6546321", "0.646039", "0.6458155", "0.6410434", "0.63802314", "0.62897855", "0.62298214", "0.6216701", "0.6216701", "0.6216701", "0.6216701", "0.6216701", "0.6216701", "0.6214385...
0.6902065
0
The name of the channels contained in `FCSData`.
def channels(self): return self._channels
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def channelName(self):\n channel_list = (\"Neutral\",\n \"BBC1\",\n \"BBC2\",\n \"ITV\",\n \"Channel 4\",\n \"Channel 5\")\n channel_name = channel_list[self.channel]\n return cha...
[ "0.7196674", "0.71135443", "0.6969351", "0.67643434", "0.6583998", "0.6531709", "0.6453464", "0.6431921", "0.6379767", "0.6379767", "0.6379767", "0.6379767", "0.6379767", "0.6379767", "0.6379767", "0.6379767", "0.6379767", "0.6379767", "0.6379767", "0.6379767", "0.6379767", ...
0.5646401
54
if y = f(ab), then dy/da = f'(ab) b
def backward(self, gradient: Tensor) -> Tensor: self.b_grad = np.sum(gradient, axis=0) self.w_grad = self.inputs.T @ gradient return gradient @ self.w.T
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fn(a, y):\n return 0.5*np.linalg.norm(a-y)**2", "def f(y):\n \n\n k = 1.0\n return y*(1-y)", "def func(x, f, fp):\n\n return np.sqrt((1+fp(x)**2) / (2 * g * f(x)))", "def f(t,y):\n return (lam*y)", "def f(z):\n a=1./(1.+z)\n #da=0.01\n da=0.01*a\n #da=1e-7\n gp,g,gm...
[ "0.6806588", "0.67754924", "0.6533475", "0.65239465", "0.6343497", "0.6326029", "0.6315155", "0.6309114", "0.6250414", "0.6245013", "0.6226546", "0.61594445", "0.614734", "0.61399615", "0.6118182", "0.61175346", "0.6117179", "0.61162466", "0.6064573", "0.60514385", "0.6014878...
0.0
-1
Get total area of all tile indices specified in a list.
def get_total_tiles_building_area(tile_ind_list, session): total_area_ml, total_area_osm = 0, 0 for row in session.query(TilePredBA).filter( TilePredBA.tile_index.in_(tile_ind_list)): total_area_ml += row.building_area_ml total_area_osm += row.building_area_osm return total_are...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def areas(cells):\n return numpy.array([polygon_area(cells[i])\n for i in range(len(cells.keys()))])", "def area(aList):\n if(len(aList) == 1):\n return aList[0] * aList[0]\n\n elif(len(aList) == 2):\n return aList[0] * aList[1]\n\n else:\n ...
[ "0.6270175", "0.61464286", "0.61337996", "0.6116405", "0.6088713", "0.6076375", "0.60678476", "0.6043014", "0.6015344", "0.601369", "0.6001085", "0.58745104", "0.5868182", "0.58441234", "0.5834597", "0.5828097", "0.5824046", "0.5824019", "0.581013", "0.58012897", "0.5787106",...
0.7806504
0
Adds trailing slash (if needed) necessary for pathprefix
def get_http_path_prefix(): return os.path.join(CONF.deploy.http_root, '')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_trailing_slash(path):\n if len(path) > 0:\n if path[len(path) - 1] == \"/\":\n return path\n else:\n return path + \"/\"\n else:\n return path + \"/\"", "def remove_trailing_slash(path):\n if len(path) > 0:\n if path[len(path) - 1] == \"/\":\n ...
[ "0.78178227", "0.7040311", "0.69666165", "0.67129457", "0.6707802", "0.6658162", "0.6609265", "0.6604214", "0.6496019", "0.6462296", "0.64223737", "0.6406034", "0.6382311", "0.6335334", "0.6305823", "0.6254839", "0.6242467", "0.6230016", "0.62023354", "0.61835104", "0.6161932...
0.0
-1
Return file relative path to CONF.deploy.http_root
def get_path_relative_to_http_root(file_path): return os.path.relpath(file_path, get_http_path_prefix())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_http_path_prefix():\n return os.path.join(CONF.deploy.http_root, '')", "def getRootPath()->str:\n if '--develop' in sys.argv:\n return eel._get_real_path('public') + '/'\n\n return eel._get_real_path('build') + '/'", "def get_workdir() -> str:\n Config.__get()\n assert Con...
[ "0.7876288", "0.67677426", "0.67573947", "0.67458016", "0.6736677", "0.6667319", "0.6615886", "0.6596041", "0.65944177", "0.65932536", "0.6570204", "0.65567654", "0.65524304", "0.65293", "0.6512645", "0.6503641", "0.6495014", "0.64725935", "0.6442347", "0.6441308", "0.6437111...
0.7450004
1
This function will load the caffe model that we will use for detecting a human_blob, and then set the preferable target to the correct target.
def load_caffe_model(self): print("Loading caffe model used for detecting a human_blob.") # Use cv2.dnn function to read the caffe model used for detecting faces and set preferable target. # self.detector = cv2.dnn.readNetFromCaffe(os.path.join( # os.path.dirname(os.path.realpath(__...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_feature_extractor(model_spec, device):\n\n model_type = model_spec['name']\n model_weights_fp = model_spec['weights']\n\n if model_type == 'imagenet_swav':\n # or could load from hub model\n # model = torch.hub.load('facebookresearch/swav', 'resnet50')\n\n model = models.resn...
[ "0.6256075", "0.60586816", "0.59366816", "0.58215976", "0.58113027", "0.5756603", "0.57422817", "0.5735567", "0.5632396", "0.5629319", "0.5626558", "0.56104046", "0.56073666", "0.5607243", "0.560487", "0.5601525", "0.55759776", "0.5566809", "0.5552113", "0.5545482", "0.554111...
0.7959105
0
Tests when we go to the welcome url it loads the welcome view
def test_welcome_url(self): welcome = resolve(reverse('managealumni:welcome')) return self.assertEqual(welcome.func.__name__, WelcomeView.__name__)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def welcome(self):\n if self.user:\n return self.render('welcome.html')\n self.redirect('/register')", "def welcome(request):\n return HttpResponse('Welcome from Site')", "def welcome_page():\n return redirect(\"/static/welcome.html\")", "def get(self):\n if self.user:\n...
[ "0.74080044", "0.72399986", "0.71286726", "0.71176225", "0.6983478", "0.6920026", "0.6920026", "0.6734718", "0.6733647", "0.67083305", "0.6688498", "0.664293", "0.6634933", "0.6626609", "0.653521", "0.651643", "0.6512423", "0.65058875", "0.6498859", "0.6489529", "0.6486775", ...
0.7603674
0
Function to perform a gnomonic projection on a sphere of points of a plane.
def proj_gnomonic_sphere(lamb0, phi, x, y): rho = (x**2+y**2)**0.5 c = np.arctan(rho) # print('c', rho, c, np.rad2deg(c)) lamb = x*np.sin(c) lamb /= (rho*np.cos(phi)*np.cos(c)-y*np.sin(phi)*np.sin(c)) lamb = lamb0+np.arctan(lamb) phi1 = np.cos(c)*np.sin(phi) phi1 += (y*np.sin(c)*np.cos(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def proj_gnomonic_plane(lamb0, phi1, lamb, phi):\n\n cosc = np.sin(phi1)*np.sin(phi)\n cosc += np.cos(phi1)*np.cos(phi)*np.cos(lamb-lamb0)\n\n x = np.cos(phi)*np.sin(lamb-lamb0)\n x /= cosc\n\n y = np.cos(phi1)*np.sin(phi)\n y -= np.sin(phi1)*np.cos(phi)*np.cos(lamb-lamb0)\n\n y /= cosc\n\n ...
[ "0.6797266", "0.66344917", "0.64777976", "0.6369328", "0.6367009", "0.61759984", "0.6168496", "0.60970324", "0.60864496", "0.60579985", "0.601673", "0.60148984", "0.60132277", "0.6003982", "0.59006894", "0.5888742", "0.5850808", "0.58436984", "0.58426523", "0.5841092", "0.582...
0.6882025
0
Returns the NSPoint of the rightmost intersection with the baseline.
def intersectionOnBaseline( thisLayer ): goodMeasure = 1 originX = thisLayer.bounds.origin.x - goodMeasure originPoint = NSPoint( originX, 0.0 ) targetX = originX + thisLayer.bounds.size.width + goodMeasure targetPoint = NSPoint( targetX, 0.0 ) listOfIntersections = sliceIntersections( thisLayer, originPoint, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def right(self):\n return self.points['topRight'].x", "def right(self):\n return self.points['topRight'].x", "def topRightCorner(self):\n self._updateExtents()\n return (self._mMaxX,self._mMinY)", "def top_right(self) -> Line:\n start = Point(self.shape.right_bound, self.sh...
[ "0.5926043", "0.5926043", "0.58119345", "0.57971543", "0.5672867", "0.56642306", "0.5607061", "0.5522033", "0.551393", "0.55041677", "0.5503997", "0.548169", "0.54784906", "0.54652107", "0.5458439", "0.54455906", "0.5410307", "0.5391617", "0.53753906", "0.53621024", "0.536009...
0.7168148
0
Check if the field_name field is a valid user.
def clean_existing_user(field_name): @check_field_is_empty(field_name) def wrapped(self): """Decorator wrapper method. """ link_id = clean_link_id(field_name)(self) user_entity = user_logic.getFromKeyFields({'link_id': link_id}) if not user_entity: # user does not exist raise form...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_username(self, field):\n if User.query.filter_by(username=field.data).first():\n raise ValidationError(\"Username already in use.\")", "def validate_username(self, username_field):\n if User.get_by_username(username_field.data):\n raise ValidationError('This usern...
[ "0.7212673", "0.70796436", "0.6978678", "0.6972315", "0.6951979", "0.6951052", "0.69260347", "0.6917713", "0.6860696", "0.6784827", "0.67585427", "0.67394245", "0.6690567", "0.66882473", "0.6684545", "0.6666737", "0.65888906", "0.65641105", "0.6563912", "0.6559857", "0.654989...
0.63284314
45
Check if the field_name field is a valid user and is not equal to the current user.
def clean_users_not_same(field_name): @check_field_is_empty(field_name) def wrapped(self): """Decorator wrapper method. """ clean_user_field = clean_existing_user(field_name) user_entity = clean_user_field(self) current_user_entity = user_logic.getCurrentUser() # pylint: disable=E1103 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_username(self, field):\n if User.query.filter_by(username=field.data).first():\n raise ValidationError(\"Username already in use.\")", "def clean_user_account_not_in_use(field_name):\n\n @check_field_is_empty(field_name)\n def wrapped(self):\n \"\"\"Decorator wrapper method.\n...
[ "0.695105", "0.69149786", "0.6637322", "0.6575774", "0.6573968", "0.65097433", "0.65089965", "0.64932936", "0.64925766", "0.6458666", "0.64563656", "0.6427139", "0.6398337", "0.6388755", "0.63648266", "0.6345251", "0.6330887", "0.63149107", "0.6292026", "0.6290428", "0.628893...
0.71450865
0
Check if the field_name value contains an email address that hasn't been used for an existing account.
def clean_user_account_not_in_use(field_name): @check_field_is_empty(field_name) def wrapped(self): """Decorator wrapper method. """ email_adress = self.cleaned_data.get(field_name).lower() # get the user account for this email and check if it's in use user_account = users.User(email_adress) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_email(self, data, field_name):\n existing = User.objects.filter(email__iexact=data['email'])\n if existing.exists():\n raise fields.ValidationError(\"A user with that email already exists.\")\n else:\n return data", "def clean_email(self):\n existing...
[ "0.7526965", "0.72224885", "0.72059774", "0.71725845", "0.70428735", "0.70428735", "0.70380056", "0.70377064", "0.70362145", "0.70286083", "0.702808", "0.7024613", "0.7017353", "0.70158327", "0.7003014", "0.70017296", "0.6969533", "0.69595975", "0.691978", "0.68686837", "0.68...
0.70151365
14
Checks whether the current user has the required access.
def has_access(rights, access_level, scope_path, prefix): checker = callback.getCore().getRightsChecker(prefix) roles = checker.getMembership(access_level) django_args = { 'scope_path': scope_path, 'prefix': prefix, } return rights.hasMembership(roles, django_args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def current_user_has_access(self):\n return self.user_has_access(users.get_current_user())", "def has_access(self, user):\n if user.is_superuser:\n return True\n return self.user_objects(user).filter(id=self.id).exists()", "def checkIfAllowed(self, user):\n\n # Default case i...
[ "0.8458953", "0.7809165", "0.7621577", "0.7597592", "0.7593007", "0.7593007", "0.7593007", "0.7535834", "0.739783", "0.7392741", "0.7333217", "0.7291266", "0.7289617", "0.72522485", "0.7227394", "0.71588236", "0.71465874", "0.71465874", "0.71465796", "0.7139072", "0.71167153"...
0.0
-1
Clean method for cleaning comma separated strings. Obtains the separated string from the form and returns it as a set of strings.
def str2set(string_field, separator=','): def wrapper(self): """Decorator wrapper method. """ cleaned_data = self.cleaned_data string_data = cleaned_data.get(string_field) list_data = [] for string in string_data.split(separator): string_strip = string.strip() if string_strip an...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _clean_string(self, string):\n if string is None:\n return []\n str_list = string.strip().split(\",\")\n return [each.strip() for each in str_list]", "def separate_comma(s):\n return s.split(',')", "def _clean(matches):\n # type: (List[str]) -> None\n while True:\n ...
[ "0.7104075", "0.6398996", "0.6370906", "0.63630885", "0.6339547", "0.6207833", "0.6163238", "0.6115373", "0.60795194", "0.605182", "0.60515034", "0.6040052", "0.60056716", "0.59161395", "0.5872921", "0.586806", "0.5853141", "0.5853141", "0.58201516", "0.5802614", "0.5780249",...
0.6953057
1
Name of the service.
def service_name(self) -> str: return pulumi.get(self, "service_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service_name(self):\n return self._service_name", "def service_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"service_name\")", "def service_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"service_name\")", "def service_name(self) -> pulumi.Output[str]:\n...
[ "0.89885104", "0.87708855", "0.87708855", "0.87708855", "0.8632549", "0.8632549", "0.8632549", "0.832409", "0.832409", "0.832409", "0.82325894", "0.8127267", "0.785057", "0.7743876", "0.76368743", "0.7590222", "0.75873625", "0.7544445", "0.73286045", "0.7316036", "0.7237534",...
0.90985924
1
Current value of the service quota.
def value(self) -> float: return pulumi.get(self, "value")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def quota(self) -> int:\n return pulumi.get(self, \"quota\")", "def get_quota(self):\n raise NotImplementedError", "def quota(self) -> 'outputs.CommitmentQuotaResponse':\n return pulumi.get(self, \"quota\")", "def usage_quota(self) -> Optional[pulumi.Input[str]]:\n return pulumi.g...
[ "0.77670854", "0.7446824", "0.70987386", "0.6942532", "0.6688799", "0.66298956", "0.6514471", "0.64642084", "0.6391936", "0.63593936", "0.63506377", "0.6349508", "0.6329015", "0.6328705", "0.63007766", "0.62739515", "0.62664056", "0.62437546", "0.6234557", "0.62256527", "0.62...
0.61880404
24
Generate a new list of class objects with random networkconnection values in [0, nbr_networks].
def generate(method='random'): if method == 'random': min_connection_ind = Connection.possible_connections.start max_connection_ind = Connection.possible_connections.stop - 1 connections_list = [Connection(randint(min_connection_ind, max_connection_ind), building) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_random(self):\n for key in self.nn_param_choices:\n self.network[key] = random.choice(self.nn_param_choices[key])", "def create_random(self):\n number_of_layers = random.choice(self.parameter_choices['number_of_layers'])\n neurons_per_layer = []\n dropout_per_lay...
[ "0.685704", "0.6813407", "0.6693404", "0.66514516", "0.6629633", "0.6415598", "0.629567", "0.62762225", "0.6211654", "0.6205845", "0.61777097", "0.61707705", "0.6114049", "0.60692084", "0.60692084", "0.60692084", "0.60563594", "0.60473967", "0.60437477", "0.6041458", "0.60371...
0.67087376
2
Get EVSE controller flags
def _flags(self): done, data = self._request('GE') if done: flags = int(data[1], 16) else: raise EvseError return { 'service_level': (flags & 0x0001) + 1, 'diode_check': not flags & 0x0002, 'vent_required': not flags & 0x0004, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eflags(vdb, line):\n trace = vdb.getTrace()\n argv = shlex.split(line)\n if len(argv) not in (0, 1):\n return vdb.do_help('eflags')\n\n if len(argv) > 0:\n flag = argv[0].upper()\n valid_flags = list(trace.getStatusFlags().keys())\n if flag not in valid_flags:\n ...
[ "0.586173", "0.57777774", "0.5696792", "0.56556875", "0.5625211", "0.5605443", "0.55081916", "0.5506377", "0.5478047", "0.54634863", "0.546029", "0.5455059", "0.54491174", "0.5444521", "0.54341966", "0.5419467", "0.539428", "0.53742415", "0.5360109", "0.5359566", "0.5357107",...
0.69314706
0
Get or set the charge time limit, in minutes. This time is rounded to the nearest quarter hour. The maximum value is 3825 minutes. Returns the limit
def time_limit(self, limit=None): if limit is None: done, data = self._request('G3') if done: return int(data[0])*15 else: limit = int(round(limit/15.0)) if self._request('S3', str(limit))[0]: return limit raise Evs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def charge_limit(self, limit=None):\n if limit is None:\n done, data = self._request('GH')\n if done:\n return int(data[0])\n else:\n if self._request('SH', str(int(limit)))[0]:\n return limit\n\n raise EvseError", "def time_limi...
[ "0.70346034", "0.6572836", "0.6342111", "0.6304517", "0.6276798", "0.6195106", "0.6171386", "0.6147078", "0.6147078", "0.61444235", "0.6120159", "0.6114225", "0.6092856", "0.6006875", "0.600371", "0.59972626", "0.5992696", "0.5955476", "0.5953279", "0.588673", "0.5855543", ...
0.6266285
5
Get or set the charge limit (in kWh) Returns the limit in kWh
def charge_limit(self, limit=None): if limit is None: done, data = self._request('GH') if done: return int(data[0]) else: if self._request('SH', str(int(limit)))[0]: return limit raise EvseError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def limit_bandwidth_unit(self):\n return self._limit_bandwidth_unit", "def limit(self) -> pulumi.Input[float]:\n return pulumi.get(self, \"limit\")", "def pwm_limit(self):\n return self._read(MX_PWM_LIMIT)", "def get_limit(self):\n return self.limit", "def limit_bandwidth(self):...
[ "0.6939957", "0.6737347", "0.6714779", "0.6697181", "0.6669025", "0.65325147", "0.65267825", "0.65267825", "0.6385521", "0.6384387", "0.629606", "0.62420326", "0.6241383", "0.6171989", "0.61673516", "0.61560285", "0.61560285", "0.6148095", "0.6139005", "0.60568637", "0.603571...
0.773973
0
Set the service level
def service_level(self, level=None): if level is None: flags = self._flags() if flags['auto_service_level']: return 0 return flags['service_level'] else: if self._request('SL', _service_levels[level])[0]: return level ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_level(self, device_id, new_level):\n\t\treturn self.post(self.value_url % (ART_SERVER_HOST, device_id), {'value':new_level })", "def set_level(self, level: LogLevel):\n pass", "def level(self, level=ERROR):\n try:\n self._level = level_dict[level]\n except KeyError:\n ...
[ "0.641874", "0.6370891", "0.62254953", "0.61440414", "0.61306614", "0.61165065", "0.6041749", "0.6006176", "0.5909119", "0.58666164", "0.58651865", "0.58479106", "0.5822135", "0.58183753", "0.58151615", "0.57751316", "0.5769112", "0.57529086", "0.5747073", "0.5677586", "0.566...
0.76737183
0
Get the response of a command.
def _get_response(self): if self.sync: self.newline_available.wait() response = self.newline self.newline_available.clear() response_match = self.respose_regex.match(response) if response_match is not None: r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_response(command):\n connection = get_client()\n\n connection.send(command)\n\n data = connection.recv()\n connection.close()\n\n return data", "def __call__(self, command):\n return self.execute(command).response.body", "def _get_response(self):\n resp = yield from self._r...
[ "0.83564925", "0.7146335", "0.7053197", "0.7028037", "0.7028037", "0.7028037", "0.7028037", "0.7028037", "0.7028037", "0.7028037", "0.7028037", "0.7028037", "0.7028037", "0.7028037", "0.7028037", "0.70096374", "0.6872557", "0.6804226", "0.67991716", "0.67609257", "0.6743227",...
0.64145964
35
Retrieve and decrypt all EYAML nodes identified via a YAML Path.
def get_eyaml_values( self, yaml_path: YAMLPath, mustexist: bool = False, default_value: str = "" ) -> Generator[Union[str, list], None, None]: self.logger.verbose(f"Decrypting value(s) at {yaml_path}.") for node in self.get_nodes(yaml_path, mustexist=mustexist, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decrypt_eyaml(\n self, value: Union[str, list, NodeCoords]\n ) -> Union[str, list]:\n if isinstance(value, NodeCoords):\n value = self.decrypt_eyaml(value.node)\n\n # Recursively decrypt lists\n if isinstance(value, list):\n decvals: list = []\n f...
[ "0.5978005", "0.5765115", "0.5633267", "0.56090814", "0.5413266", "0.53038657", "0.5284189", "0.52752095", "0.52709526", "0.5243304", "0.5226155", "0.5220826", "0.5200933", "0.5188679", "0.5147183", "0.51428044", "0.51317084", "0.5058167", "0.50533456", "0.49935448", "0.49839...
0.6616852
0
The name of current database
def db_name(): headers = { 'accept': 'text/plain', } try: response = requests.get('https://reactome.org/AnalysisService/database/name', headers=headers) except ConnectionError as e: print(e) if response.status_code == 200: return response.text else: pri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def database_name(self) -> str:\n return pulumi.get(self, \"database_name\")", "def getDatabaseName(self):\n return self._base.getDatabaseName()", "def get_db_name(self):\n\t\treturn conf.db_name", "def db_name(self):\n return self._db_name", "def database_name(self) -> pulumi.Output[s...
[ "0.9027067", "0.88655585", "0.8811652", "0.8764089", "0.8694933", "0.86814076", "0.8625411", "0.8547365", "0.83625615", "0.8308478", "0.8196721", "0.81481373", "0.8005808", "0.79866225", "0.79125184", "0.7890239", "0.77313614", "0.77204466", "0.7567863", "0.7537789", "0.74966...
0.0
-1
Given a hour and an a/p specifier, then convert the hour into 24 hour clock if need be
def convert_to_24_hours(time, ap): if ap.lower() == 'p' and time <= 12: time += 12 return time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_24hr_12ampm(military_hr): \n\t\n if military_hr == 0:\n hour_ampm_str = \"12am\"\n elif military_hr == 12:\n hour_ampm_str = \"12pm\"\n elif military_hr > 12:\n hour_ampm_str = str(military_hr - 12) + \"pm\"\n else:\n hour_ampm_str = str(military_hr) + \"...
[ "0.7251803", "0.6876839", "0.67813945", "0.6776302", "0.6769173", "0.67146665", "0.6684279", "0.6507988", "0.6449184", "0.6422249", "0.6371726", "0.6339657", "0.61947954", "0.6154167", "0.6153549", "0.6083289", "0.60241634", "0.6023049", "0.60043037", "0.59405994", "0.5928877...
0.7937838
0
Adds a Donor to the list but not a donation
def add_a_donor(): print() print('Welcome to the Add a Donor Menu') print() donor_name = get_name_input() firstname, lastname = donor_name.split(' ') add_donor(firstname, lastname, donor_name) print('Added Donor to our database. See below for updated database list') print_donors_names()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_donor(self, new_donor: Donor):\n self.donor_list.append(new_donor)", "def add_donor(self, name, donation=None):\n if \",\" in name: # Remove donor name commas to preserve CSV save\n print(\"Warning: Comma will be removed from name\")\n name = name.replace(\",\", \"\")...
[ "0.75522584", "0.731089", "0.70302176", "0.7023298", "0.6981367", "0.69480103", "0.6905423", "0.6902113", "0.68842626", "0.6616342", "0.658263", "0.6440102", "0.6378078", "0.6367712", "0.6330996", "0.6246403", "0.61361134", "0.6083845", "0.6029793", "0.59989804", "0.59128356"...
0.5808881
23
Return the KLDivergence of q from p, where they are both discrete.
def kullback_leibler_divergence(p, q): null = 1e-10 return sum(p.get(key, null) * math.log(p.get(key, null) / q.get(key, null)) for key in set(chain(p.keys(), q.keys())))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kl_divergence(p, q):\n p = np.asarray(p, dtype=np.float)\n q = np.asarray(q, dtype=np.float)\n\n # Add error message when p==0\n return np.sum(np.where(p != 0, p * np.log(p / q), 0))", "def _kl_divergence(p, p_logits, q):\n for tensor in [p, p_logits, q]:\n if not tensor.dtype.is_floating:\n ...
[ "0.83783793", "0.8248797", "0.8238453", "0.8237623", "0.8002661", "0.7934934", "0.7809173", "0.7544666", "0.7491476", "0.7442535", "0.72507805", "0.7227291", "0.72206163", "0.7204128", "0.7196086", "0.71212834", "0.7028148", "0.6997681", "0.69451886", "0.6937735", "0.693512",...
0.8021706
4
Create a new Application.
def create(self, **kwargs): resource = self.resource.create(kwargs) if 'admin_token' in kwargs: resource.context.authorize('Gem-Application', api_token=resource.api_token, admin_token=kwargs['admin_token']) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_application(name=None, description=None):\n pass", "def create():\n\n return App()", "def create_app(self):\n raise NotImplementedError", "def new_app(project_name,app_name ):\n from flask_create_app.core.commands.cmd_newapp import create_new_app\n proj_dir = os.getcwd()\n cr...
[ "0.8049611", "0.7894759", "0.778717", "0.7714202", "0.76950544", "0.7632642", "0.7461711", "0.743065", "0.7373661", "0.734395", "0.7319151", "0.7264961", "0.7224036", "0.7176076", "0.7156717", "0.7142044", "0.71234006", "0.7078663", "0.70746887", "0.70540684", "0.70340383", ...
0.0
-1
Resets any of the tokens for this Application. Note that you may have to reauthenticate afterwards.
def reset(self, *args): self.resource = self.resource.reset(list(args)) return self
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_all_requests(self):\n self._send_request(\"/reset\")", "def reset(self):\n requests.put('{}/reset'.format(self._get_url()))", "def refresh_auth_token(self):\n self._auth_token = self.generate_auth_token()", "def clean_user_tokens() -> None:\n asyncio.run(clean_old_user_token...
[ "0.6538824", "0.6530027", "0.64196795", "0.63505626", "0.622071", "0.6215047", "0.6198929", "0.61964613", "0.6158335", "0.612172", "0.6065665", "0.60498947", "0.6018655", "0.5990005", "0.59845394", "0.5968237", "0.5966214", "0.5955728", "0.5937876", "0.59283274", "0.58569354"...
0.0
-1
Fetch and return Subscriptions associated with this account.
def subscriptions(self): if not hasattr(self, '_subscriptions'): subscriptions_resource = self.resource.subscriptions self._subscriptions = Subscriptions( subscriptions_resource, self.client) return self._subscriptions
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_subscriptions(self):\n url = '{}/v2/subscriptions'.format(self.url)\n r = requests.get(url, headers=self.headers_v2)\n return r.json()", "def subscriptions(self):\r\n return subs.AccountSubscriptions(self)", "def get_subscriptions(self):\n return self.subscriptions.al...
[ "0.7990724", "0.7946658", "0.78739756", "0.7686811", "0.7393206", "0.7365164", "0.7336142", "0.7271344", "0.6977177", "0.69047856", "0.6897478", "0.6868403", "0.68661726", "0.68577534", "0.67974514", "0.6767764", "0.6758763", "0.67523557", "0.67145425", "0.6712708", "0.667692...
0.70616055
8
Computes the accuracy over the k top predictions for the specified values of k
def accuracy(output, target, topk=(1,)): with torch.no_grad(): maxk = max(topk) batch_size = target.size(0) _, pred = output.topk(maxk, 1, True, True) pred = pred.t() correct = pred.eq(target.view(1, -1).expand_as(pred)) res = [] for k in topk: c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def topk_accuracy(y, y_pred, k=2):\n pred = []\n for i in range(len(y)):\n if y[i] in y_pred[i][:k]:\n pred.append(1)\n else:\n pred.append(0)\n return sum(pred) / len(pred)", "def accuracy(y_pred, y_actual, topk=(1, )):\n maxk = max(topk)\n batch_size = y_actua...
[ "0.8331214", "0.8284662", "0.82381004", "0.8229767", "0.82202226", "0.81864446", "0.81847763", "0.8175173", "0.8171541", "0.81699467", "0.81664646", "0.81645083", "0.81637454", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "...
0.7847017
100
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
def adjust_learning_rate(optimizer, epoch, args): lr = args.lr * (0.3 ** (epoch // args.lr_decay)) for param_group in optimizer.param_groups: param_group['lr'] = lr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def adjust_learning_rate(init_lr, optimizer, epoch, n=100):\n init_lr = init_lr * (0.1 ** (epoch // n))\n print('learning rate : ', init_lr)\n for param_group in optimizer.param_groups:\n param_group['lr'] = init_lr", "def adjust_learning_rate(start_lr, optimizer, epoch, total_epoch_num):\n #l...
[ "0.79125106", "0.7905808", "0.784919", "0.77743787", "0.7733029", "0.7730123", "0.7722105", "0.77219707", "0.771907", "0.7708634", "0.769325", "0.76734984", "0.7665429", "0.7665429", "0.7665429", "0.7654525", "0.76393783", "0.7637545", "0.7625412", "0.762393", "0.7620798", ...
0.7641484
16
Returns a list of a tuple of two lists of usually ints.
def get_revoked_job_ids(): return list(inspect().revoked().values())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_list_of_int2(self):\n pass", "def _tuple_from_one_or_two_ints(self, v):\n try:\n a, b = [int(x) for x in v]\n except TypeError:\n a, b = int(v), int(v)\n return (a,b)", "def _to_tuple(values: Union[int, Iterable[int]]) -> Tuple[int, ...]:\n try:\n ...
[ "0.7138478", "0.7056853", "0.70269233", "0.6809916", "0.676243", "0.6708052", "0.66612697", "0.6595524", "0.6498595", "0.644377", "0.6419206", "0.64167994", "0.6400565", "0.63758326", "0.6371181", "0.63563305", "0.633618", "0.6319137", "0.6305672", "0.63044655", "0.6290991", ...
0.0
-1
Is this user authorized to edit this domain?
def editor_is(self, user): if not user: return False if JobPost.query.filter_by(domain=self, user=user).notempty(): return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def can_be_edited(self, user):\n return (self.is_public or user == self.owner or\n user in list(self.auth_users.all()))", "def can_edit(self, user):\n return self.author_id == user.id or user.is_staff", "def user_can_edit(self, user):\n return user == self.owner", "def edit_allowed(se...
[ "0.7709783", "0.77018327", "0.76261306", "0.76224643", "0.74032384", "0.73819256", "0.71887064", "0.6987602", "0.6955905", "0.69551045", "0.69412404", "0.6897451", "0.6876156", "0.68627214", "0.6856763", "0.684721", "0.68378896", "0.68247706", "0.68235326", "0.68235326", "0.6...
0.0
-1
Align text representation with neural soft attention
def soft_attention_alignment(input_1, input_2): attention = Dot(axes=-1)([input_1, input_2]) w_att_1 = Lambda(lambda x: softmax(x, axis=1), output_shape=unchanged_shape)(attention) w_att_2 = Permute((2, 1))(Lambda(lambda x: softmax(x, axis=2), output_shap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _soft_alignment(self, inputs):\n attention = inputs[0]\n sentence = inputs[1]\n\n # Subtract the max. from the attention weights to avoid overflows.\n exp = K.exp(attention - K.max(attention, axis=-1, keepdims=True))\n exp_sum = K.sum(exp, axis=-1, keepdims=True)\n sof...
[ "0.66776156", "0.62227994", "0.6209605", "0.61780703", "0.6041781", "0.6035291", "0.60170335", "0.5924213", "0.5906429", "0.5897682", "0.5815565", "0.5757317", "0.5754428", "0.57333404", "0.5706334", "0.5701764", "0.5694026", "0.5676868", "0.5669681", "0.56671107", "0.5653984...
0.5906069
9
Checks whether the event is close (< 333.33 km), local (< 1111.1 km) or nonlocal.
def is_local(baz): if 0.001 * baz[0] / 111.11 < 10.0: if 0.001 * baz[0] / 111.11 < 3.0: is_local = 'close' else: is_local = 'local' else: is_local = 'non-local' return is_local
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def are_close(coord1, coord2, tolerance=10):\n return vincenty(coord1, coord2).meters < tolerance", "def is_closeby(self, lat1, lon1, lat2, lon2, distance=0.5):\n\n distance = geopy.distance.distance((lat1, lon1), (lat2, lon2)).km < distance\t \n \n return(distance)", "def isstat...
[ "0.59032863", "0.5859245", "0.57062525", "0.5683135", "0.5587486", "0.55783063", "0.55658764", "0.5556887", "0.549712", "0.5462718", "0.54563504", "0.5442784", "0.5435991", "0.54337895", "0.539335", "0.5373526", "0.5359536", "0.53254163", "0.532251", "0.53136206", "0.52923113...
0.5320151
19
Set actor name. Should be an AJAX POST.
def edit_actor_name(request, id_): if request.method == "POST" and request.is_ajax(): user = request.user.username name = request.POST.get('name', None) if not name: return HttpResponse(json.dumps({'success': False, 'message': 'Not all...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name_for_actor(name, actor):\n key = StringKey.MakeKey(\"MeshName\", \"root\")\n i = vtk.vtkInformation()\n i.Set(key, name)\n actor.SetPropertyKeys(i)", "def put(self, actor_id, name):\n self.post(actor_id, name)", "def setName(self,value):\n assert value == None or type(valu...
[ "0.7654658", "0.69476855", "0.6570049", "0.6494318", "0.6388236", "0.63637435", "0.6328593", "0.6318659", "0.6312924", "0.6309923", "0.62596786", "0.62596786", "0.62312734", "0.6184796", "0.61632735", "0.6155613", "0.6146275", "0.6124514", "0.6119059", "0.6089604", "0.6089604...
0.782819
0
Test case for get_asset_location
async def test_get_asset_location(client): params = [('access_token', 'access_token_example'), ('start_ms', 56), ('end_ms', 56)] headers = { 'Accept': 'application/json', } response = await client.request( method='GET', path='/v1/fleet/ass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_test_asset(self):\n pass", "def test_retrieve_system_asset(self):\n pass", "def asset_location(location, filename):\r\n return StaticContent.compute_location(location.course_key, filename)", "def test_get_test_assets(self):\n pass", "def test_import_test_asset(self)...
[ "0.7415348", "0.69235885", "0.6899057", "0.638585", "0.62809753", "0.6270019", "0.6233576", "0.6228147", "0.6144367", "0.60533535", "0.60388875", "0.6031024", "0.6000491", "0.5995636", "0.59561104", "0.58891505", "0.58824044", "0.5879761", "0.5842656", "0.5838969", "0.5795523...
0.7002647
1
Test case for update_vehicles /fleet/set_data
async def test_update_vehicles(client): vehicle_update_param = {} params = [('access_token', 'access_token_example')] headers = { 'Accept': 'application/json', 'Content-Type': 'application/json', } response = await client.request( method='POST', path='/v1/fleet/set_d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_full_update_vehicle(self):\n vehicle = sample_vehicle(self.user)\n\n payload = {\n 'type': 'VSL',\n 'license_plate': 'BB-123-BB'\n }\n url = detail_url(vehicle.id)\n\n self.client.put(url, payload)\n\n vehicle.refresh_from_db()\n\n sel...
[ "0.71505785", "0.68947595", "0.6579535", "0.6251394", "0.6177396", "0.61734515", "0.61277056", "0.6039747", "0.6037411", "0.6037411", "0.6037411", "0.6005619", "0.5963101", "0.59276724", "0.58947337", "0.5876618", "0.5862244", "0.58160585", "0.58143586", "0.58109504", "0.5786...
0.7403942
0
Returns the object the view is displaying. You may want to override this if you need to provide nonstandard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
def get_object(self): try: obj = WorkoutFile.objects.get( Q(workout=self.kwargs['workout_id']) & Q(file=f'workouts/{self.kwargs["workout_id"]}/{self.kwargs["filename"]}') ) except: raise Http404("Media does not exist") self.check_object_permis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_object(self):\n queryset = self.filter_queryset(self.get_queryset())\n\n # Perform the lookup filtering.\n lookup_url_kwarg = self.lookup_url_kwarg or self.lookup_field\n\n assert lookup_url_kwarg in self.kwargs, (\n 'Expected view %s to be called with a URL keywo...
[ "0.78314036", "0.769374", "0.7584883", "0.7418032", "0.73830104", "0.7135776", "0.7098794", "0.7098794", "0.7051305", "0.7049022", "0.7027892", "0.7011859", "0.6934976", "0.68255", "0.67854565", "0.66764516", "0.66085947", "0.65987587", "0.6594525", "0.6593504", "0.6590956", ...
0.0
-1
Get absolute path to resource, works for dev and for PyInstaller
def resource_path(relative_path): try: # PyInstaller creates a temp folder and stores path in _MEIPASS base_path = sys._MEIPASS except Exception: base_path = os.path.abspath("..") return os.path.join(base_path, relative_path)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_resource_path():\n return os.path.join(os.path.dirname(__file__), \"resources\") + os.path.sep", "def resourcePath(relative):\r\n try:\r\n # PyInstaller creates a temp folder and stores path in _MEIPASS\r\n base_path = sys._MEIPASS\r\n except Exception:\r\n base_path = os.pa...
[ "0.8371822", "0.8281945", "0.82500875", "0.8140755", "0.81153977", "0.81001383", "0.80954826", "0.80812496", "0.80692154", "0.8064015", "0.8064015", "0.8064015", "0.8064015", "0.8064015", "0.8064015", "0.8064015", "0.80585384", "0.80561507", "0.8046439", "0.8046439", "0.80464...
0.8068952
9
Calculate the great circle distance between two points on the earth (specified in decimal degrees) with aversine methods (Formula dell'emisenoverso) Distance between center of the earth and one pole of 6356,988 Km
def aversine(lon1, lat1, lon2, lat2): lon1 = float(lon1) lon2 = float(lon2) lat1 = float(lat1) lat2 = float(lat2) # convert decimal degrees to radians lon1, lat1, lon2, lat2 = map(math.radians, [lon1, lat1, lon2, lat2]) # haversine formula dlon = lon2 - lon1 dlat = lat2 - lat1 ...
{ "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.7871812", "0.7415874", "0.7413148", "0.7409321", "0.7187257", "0.7163925", "0.71522003", "0.7136417", "0.7133373", "0.7127404", "0.7115002", "0.7108447", "0.7105007", "0.7093324", "0.7091262", "0.70894", "0.70875317", "0.7083735", "0.7082329", "0.7051968", "0.70396394", ...
0.6902858
36
Calculate the distance between two objects in earth surface with aversine function
def obj_distance(obj1, obj2): distance = aversine(obj1.details['lon'], obj1.details['lat'], obj2.details['lon'], obj2.details['lat']) return distance
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def harversine_distance(self, other):\n\n lat1, lon1, lat2, lon2 = (\n a/180*pi for a in [self.stop_lat, self.stop_lon, other.stop_lat, other.stop_lon])\n dlon = lon2 - lon1\n dlat = lat2 - lat1\n a = sin(dlat/2) ** 2 + cos(lat1) * cos(lat2) * sin(dlon/2) ** 2\n c = 2 ...
[ "0.70784503", "0.6869446", "0.6761259", "0.67116684", "0.6543642", "0.65325594", "0.6512383", "0.645304", "0.6434847", "0.6404621", "0.63854754", "0.6365717", "0.6317675", "0.6310138", "0.628761", "0.628512", "0.6275293", "0.62502754", "0.62141174", "0.6207847", "0.6205076", ...
0.7500694
0
Return the resource classes for the given type names
def get_resource_types(cls, resource_types): resource_classes, not_found = import_resource_classes( cls.resource_map, resource_types) for r in resource_classes: cls.resources.notify(r) return resource_classes, not_found
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _resource_names(resource_types):\n return [six.text_type(i) for i, t in enumerate(resource_types)]", "def resource_types(self) -> Sequence[str]:\n return pulumi.get(self, \"resource_types\")", "def classes(self):\n if self.classname:\n return [self.classname]\n return...
[ "0.6930224", "0.655719", "0.63146454", "0.61923003", "0.61095965", "0.6028112", "0.5930096", "0.5885124", "0.58668715", "0.58506316", "0.58110446", "0.57932234", "0.57844025", "0.57808083", "0.57771176", "0.57461643", "0.5736121", "0.57168233", "0.5711547", "0.5679436", "0.56...
0.7458863
0
Load YAML config file, replacing environmental variables.
def load_config(config_file): with open(config_file) as in_handle: config = yaml.load(in_handle) # for field, setting in config.items(): # if isinstance(config[field], dict): # for sub_field, sub_setting in config[field].items(): # config[field][sub_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_config(filename):\n AS[\"config\"] = load_yaml_file(filename)", "def load_config():\n global config\n with open('config.yml', 'r') as file:\n config = yaml.load(file)", "def load_config(filename):\n with open(filename, \"r\") as stream:\n try:\n global CONFIG\n ...
[ "0.759806", "0.75476813", "0.7429467", "0.7321961", "0.7150322", "0.71351194", "0.71229714", "0.7112208", "0.7074874", "0.7074874", "0.7048942", "0.701205", "0.7001649", "0.69677484", "0.6959319", "0.6842998", "0.6834498", "0.67806965", "0.67494947", "0.67384756", "0.6738105"...
0.6527966
31
Returns unique identifier for this item.
def get_id(self): return self.id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unique_identifier(self) -> str:\n return pulumi.get(self, \"unique_identifier\")", "def item_id(self):\n return self._item_id", "def unique_id(self) -> str:\n return self._unique_id", "def unique_id(self) -> str:\n return self._unique_id", "def unique_id(self) -> str:\n ...
[ "0.7988448", "0.79261", "0.79163027", "0.79163027", "0.79163027", "0.79163027", "0.79163027", "0.79163027", "0.79163027", "0.79163027", "0.7907528", "0.79003954", "0.79003954", "0.7835717", "0.783288", "0.78139853", "0.78109676", "0.7801746", "0.7772201", "0.7761753", "0.7760...
0.0
-1
Returns name for this item. By default it is always file name but it does not have to be.
def get_name(self): return self.file_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_name(self):\n return self._file.name", "def get_item_name(self):\n return self.__item_name", "def get_file_name(self):\n return str(self.get_file())", "def name(self):\n #type: ()->Text\n return (\n os.path.splitext(os.path.basename(self.fileName))[0])", ...
[ "0.8253217", "0.79557985", "0.79266256", "0.7917495", "0.78880054", "0.78258127", "0.7702499", "0.76604885", "0.76604885", "0.76604885", "0.76604885", "0.76604885", "0.7622075", "0.7603988", "0.7601418", "0.74866647", "0.74866647", "0.74638736", "0.7448695", "0.7448695", "0.7...
0.8299885
0
Always returns ebooklib.ITEM_DOCUMENT as type of this document.
def get_type(self): return ebooklib.ITEM_DOCUMENT
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DocumentType(self, default='article'):\n return self.data.get('document_type', [{}])", "def document_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"document_type\")", "def item_type(self):\n return self._item_type", "def DocumentType(self, default=[None]):...
[ "0.69555175", "0.6916534", "0.6800712", "0.6697258", "0.66136515", "0.65289104", "0.65249836", "0.63585246", "0.62989086", "0.62585694", "0.61281234", "0.6040799", "0.5930187", "0.5899448", "0.58831155", "0.58387256", "0.58204675", "0.5791197", "0.57875174", "0.57697415", "0....
0.9294342
0
Get language code for this book item. Language of the book item can be different from the language settings defined globaly for book.
def get_language(self): return self.lang
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def language_code(self) -> str:\n return pulumi.get(self, \"language_code\")", "def language(self) -> str:\n if self.language_code in CODE_TO_LANGUAGE:\n return CODE_TO_LANGUAGE[self.language_code]\n\n return self.language_code", "def language_code(self):\n return self._l...
[ "0.784877", "0.78031695", "0.77836025", "0.74651676", "0.7389355", "0.7333395", "0.728975", "0.724844", "0.72329926", "0.7231016", "0.7231016", "0.72168297", "0.72112036", "0.72112036", "0.7206865", "0.7201981", "0.7201981", "0.7201981", "0.7201981", "0.7183346", "0.71661973"...
0.7451734
4
Sets unique id for this epub
def set_identifier(self, uid): self.uid = uid self.set_unique_metadata('DC', 'identifier', self.uid, {'id': self.IDENTIFIER_ID})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_id(self):\n raise NotImplementedError()", "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, value):\n pass", "def id(self, _id):\n self.metadata[\"id\"] = _id", "def addUniqueId(...
[ "0.71130604", "0.6918782", "0.6905892", "0.68966883", "0.6835794", "0.68318474", "0.68172216", "0.68147004", "0.67846906", "0.6764645", "0.6761164", "0.6708345", "0.6698819", "0.66710097", "0.6651248", "0.6651248", "0.6651248", "0.6651248", "0.6651248", "0.6651248", "0.665124...
0.0
-1
Gets the text_rendering_hint of this GraphicsOptions.
def text_rendering_hint(self): return self._text_rendering_hint
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def text_rendering_hint(self, text_rendering_hint):\n if text_rendering_hint is None:\n raise ValueError(\"Invalid value for `text_rendering_hint`, must not be `None`\")\n allowed_values = [\"SystemDefault\", \"SingleBitPerPixelGridFit\", \"SingleBitPerPixel\", \"AntiAliasGridFit\", \"Anti...
[ "0.69604117", "0.62317777", "0.62317777", "0.5886041", "0.5681343", "0.54823095", "0.5445572", "0.53595686", "0.53379554", "0.5291398", "0.5291398", "0.5291398", "0.5256358", "0.5242656", "0.5223719", "0.51909864", "0.51909864", "0.51569676", "0.510505", "0.50916517", "0.5064...
0.8371151
0
Gets the smoothing_mode of this GraphicsOptions.
def smoothing_mode(self): return self._smoothing_mode
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def smoothing_mode(self, smoothing_mode):\n if smoothing_mode is None:\n raise ValueError(\"Invalid value for `smoothing_mode`, must not be `None`\")\n allowed_values = [\"Default\", \"HighSpeed\", \"HighQuality\", \"None\", \"AntiAlias\", \"Invalid\"]\n if not smoothing_mode.isdigi...
[ "0.6940231", "0.59442544", "0.5766346", "0.56253767", "0.56072974", "0.54676175", "0.5460788", "0.5443999", "0.54239273", "0.53444034", "0.53301466", "0.5329961", "0.532129", "0.5301903", "0.5252747", "0.52279854", "0.5216892", "0.52037525", "0.51897633", "0.51848143", "0.517...
0.85734326
0
Gets the interpolation_mode of this GraphicsOptions.
def interpolation_mode(self): return self._interpolation_mode
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def interpolation(self):\n return self._image.interpolation", "def interpolation(self):\n return self._interpolation", "def interpolation_mode(self, interpolation_mode):\n if interpolation_mode is None:\n raise ValueError(\"Invalid value for `interpolation_mode`, must not be `No...
[ "0.7008349", "0.6776836", "0.6755735", "0.6540449", "0.6482457", "0.6359577", "0.58184665", "0.57703996", "0.52565974", "0.52365285", "0.5205391", "0.5149392", "0.5140956", "0.5114028", "0.51070696", "0.51070696", "0.510544", "0.5094688", "0.507713", "0.5065038", "0.50186205"...
0.86079556
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, GraphicsOptions): 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.84568954", "0.83923674", "0.81447554", "0.81407183", "0.81326675", "0.80941343", "0.8092415", "0.8092415", "0.8092415", "0.8085536", "0.8085536", "0.8076502", "0.8076502", "0.8066026" ]
0.0
-1
transfer date string into datetime format
def time_trans(datetime_str): if re.compile("(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)").match(datetime_str): return datetime.strptime(datetime_str, "%Y-%m-%d %H:%M:%S")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def csv_str_to_date(datestr: str) -> datetime:\n return datetime.strptime(datestr, \"%Y-%b-%d %I:%M %p\")", "def str2date(s):\n return datetime.strptime(s.decode(), \"%Y-%m-%d %H:%M:%S\")", "def convert_str2date(date):\n import datetime\n date = str(date)\n year = int(date[0:4])\n mon...
[ "0.7619423", "0.7598419", "0.7523032", "0.7468575", "0.74368787", "0.7366947", "0.73159945", "0.7309965", "0.730503", "0.7283155", "0.7243974", "0.72322965", "0.71828765", "0.717542", "0.7172572", "0.71616393", "0.7157044", "0.7146218", "0.71439713", "0.7105502", "0.70988613"...
0.6414288
92
Convert a positive integer num into an mbit bit vector
def bin_array(num, m): return np.array(list(np.binary_repr(num).zfill(m))).astype(np.int8)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bitfield(x, m):\n b = [1 if digit=='1' else 0 for digit in bin(x)[2:]]\n for i in range(len(b), m):\n b.insert(0, 0)\n return b", "def _bits(num):\r\n return bin(int(num))[2:]", "def bits(a,m):\r\n if isinstance(a, int):\r\n res = [None]*m\r\n for i in range(m):\r\n ...
[ "0.7303951", "0.69518465", "0.6793526", "0.65504116", "0.65124774", "0.63102084", "0.62854797", "0.6249089", "0.6228623", "0.62114257", "0.61986667", "0.61986667", "0.61485374", "0.6075668", "0.6073431", "0.60692275", "0.6055679", "0.6054397", "0.603171", "0.5994067", "0.5955...
0.64981943
5
This function search for money in the dataframe series. We try to locate keyletters to determine the money amount. We are only considering the money ponderated in $. We'll filter amountwise.
def capital_search (serie=None): money = { "$":1, "M":2, "k":3, "K":4, "B":5 } for key, numero in money.items(): if key in serie: return serie return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_dollar(df, col):\n \n df[col] = df[col].apply(lambda s: s.strip('$')).astype(float)\n \n return df", "def money_digitalization(raw_data, target_columns=['First Place Prize', 'Total Prize']):\r\n output = raw_data.copy()\r\n\r\n for column in target_columns:\r\n for i in range(l...
[ "0.548414", "0.5436483", "0.5252488", "0.52291626", "0.5182891", "0.51439315", "0.512255", "0.5093436", "0.5091164", "0.5045387", "0.4961957", "0.4879498", "0.48383567", "0.48377803", "0.482176", "0.47819585", "0.4776685", "0.47725916", "0.4736894", "0.47220966", "0.46958765"...
0.5407936
2
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)) # Radius...
{ "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
Convert 'string' to Unicode according to current encoding and replace all invalid characters with '?'
def unicodise_safe(string, encoding = None): return unicodise(deunicodise(string, encoding), encoding).replace(u'\ufffd', '?')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_unicode(text):\n clean_text = text.encode(\"ascii\", errors=\"replace\").strip().decode(\"ascii\")\n clean_text = clean_text.replace(\"?\", ' ')\n return clean_text", "def to_unicode(string):\n if not isinstance(string, unicode):\n for codec in CODECS:\r\n try:\r\n ...
[ "0.7505681", "0.73375976", "0.7302059", "0.7115624", "0.71018153", "0.70222497", "0.70015144", "0.6964247", "0.68974555", "0.6822589", "0.68002146", "0.6763085", "0.6746833", "0.6710765", "0.6704518", "0.667207", "0.66646576", "0.66643494", "0.6642949", "0.66275585", "0.65879...
0.7598488
0
Return the UUID of the object.
def get_uuid(self, obj): return IUUID(obj, None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uuid(self) -> str:\n return self.obj.uuid", "def uuid(self):\n\n return self.__uuid", "def uuid(self):\n return self.__uuid", "def uuid(self):\n return self.__uuid", "def uuid(self) -> str:\n return self.__uuid", "def uuid(self):\n return self._uuid", "def ...
[ "0.85558087", "0.79988", "0.7993092", "0.7993092", "0.79525244", "0.7904036", "0.7904036", "0.7889704", "0.7872532", "0.7872532", "0.7872532", "0.7865517", "0.785074", "0.7837192", "0.75898683", "0.74724305", "0.7459345", "0.74169964", "0.7348409", "0.7348409", "0.73042244", ...
0.8143481
2
Applies dropout to the inputs, as vanilla dropout, but also scales the remaining elements up by 1/drop_prob.
def xdropout(self, inputs): mask = tf.cast( 1 - tf.compat.v1.distributions.Bernoulli(probs=1.0 - self.drop_prob).sample(sample_shape=shape_list(inputs)), tf.bool, ) scale = tf.convert_to_tensor(1.0 / (1 - self.drop_prob), dtype=tf.float32) if self.drop...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _Dropout(self, name, drop_prob):\n return super()._Dropout(name, keep_prob=1.0 - drop_prob)", "def compute_dropout(self, activations, dropout_prob = 0.5):\n # handle error\n if dropout_prob < 0 or dropout_prob > 1:\n dropout_prob = 0.5\n # scale the activations (see http://...
[ "0.73190767", "0.72104555", "0.6984206", "0.6726625", "0.6438859", "0.6378311", "0.63739455", "0.6333642", "0.6303439", "0.62422913", "0.6238144", "0.6197577", "0.61939985", "0.6146432", "0.611204", "0.6100422", "0.6041613", "0.598868", "0.59458494", "0.5928544", "0.59189373"...
0.73971844
0
Applies embedding based on inputs tensor.
def call( self, input_ids: tf.Tensor = None, position_ids: tf.Tensor = None, token_type_ids: tf.Tensor = None, inputs_embeds: tf.Tensor = None, mask: tf.Tensor = None, training: bool = False, ) -> tf.Tensor: if input_ids is None and inputs_embeds is No...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def call(self,\n inputs: tf.Tensor,\n **kwargs):\n # one dim case\n # out = self.embeddings[inputs[0]]\n\n # this feels like cheating, read docs for explanation\n out = embedding_ops.embedding_lookup(self.embeddings, inputs)\n return out", "def call(self...
[ "0.7492827", "0.7180979", "0.7180979", "0.7164134", "0.70087683", "0.69689703", "0.6889047", "0.6888748", "0.66949385", "0.66910964", "0.66897273", "0.66417754", "0.6632423", "0.66254747", "0.6582906", "0.6548298", "0.6505206", "0.6484405", "0.64827895", "0.64605796", "0.6443...
0.6407886
22
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments.
def __init__(self, *args, **kwds): if args or kwds: super(mav_monitor, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.header is None: self.header = std_msgs.msg.Header() if self.battery_voltage is None: self.batt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, *args, **kwds):\n if args or kwds:\n super(KomodoSpeechRecCommand, self).__init__(*args, **kwds)\n #message fields cannot be None, assign default values for those that are\n if self.header is None:\n self.header = std_msgs.msg.Header()\n if self.cmd is None:\n ...
[ "0.77944714", "0.77215654", "0.77215654", "0.76878554", "0.762691", "0.7565032", "0.744052", "0.7418174", "0.73521847", "0.7309203", "0.72811013", "0.7238687", "0.7227824", "0.7225277", "0.7225277", "0.7219933", "0.72126967", "0.72126967", "0.72126967", "0.72126967", "0.72126...
0.0
-1
Set up data used in the tests. this method is called before each test function execution.
def setUp(self): trytond.tests.test_tryton.install_module('nereid_webshop')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUp(self):\n self.dataset = get_test_dataset()", "def setUpTestData(cls):\n # volunteer user\n common.initialize_empty_volunteer()", "def setUp(self):\n\n self.test_data_path = 'testing/test_data/'", "def setUp(self):\n self.dataset = self.dataset_cls()", "def setUp...
[ "0.8316004", "0.81669205", "0.80365294", "0.79593265", "0.7851743", "0.7851743", "0.7851743", "0.7851743", "0.78030396", "0.7733172", "0.77156585", "0.7709763", "0.7698654", "0.7601516", "0.75898266", "0.75895333", "0.7572539", "0.75524235", "0.7548495", "0.7548288", "0.75450...
0.0
-1
Verify that exceptions are raised when invalid inputs are provided.
def test_exceptions(self): # Argument must be a list of LeastSquaresTerms with self.assertRaises(ValueError): prob = LeastSquaresProblem(7) with self.assertRaises(ValueError): prob = LeastSquaresProblem([]) with self.assertRaises(ValueError): prob = Le...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_with_invalid_input(self):\n for dataset_type in ['ruler', 'pencil', 'cheese']:\n with self.assertRaises(ValueError) as exc:\n check_dataset_type(dataset_type)\n self.assertEqual(\"Dataset type not 'regular' or 'raw' is %s\" % dataset_type,\n ...
[ "0.7241708", "0.7142847", "0.7078709", "0.7075399", "0.6971915", "0.6874864", "0.68641305", "0.68528914", "0.67550623", "0.67008084", "0.66096216", "0.660916", "0.66013396", "0.65843433", "0.6580535", "0.65796393", "0.65637916", "0.64911616", "0.64769465", "0.6474615", "0.647...
0.66250074
10
Function that creates a popup window, where the user choses the path of the pictures to be imported.
def _pop(self, obj): # Creates the layouts. fileChooser = FileChooserIconView(size_hint_y=None) content = BoxLayout(orientation='vertical', spacing=7) scrollView = ScrollView() # Binds the chosen path to the "validate" function. fileChooser.bind(on_submit=self._validate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def open_file():\n filepath = filedialog.askopenfilename(initialdir = \"./\",title = \"Seleccionar archivo\",filetypes = ((\"xls files\",\"*.xls\"),(\"xlsx files\",\"*.xlsx\")))\n if not filepath:\n return\n\n window.title(filepath)\n lbl_url[\"text\"] = filepath\n btn_generate['state'] = 'no...
[ "0.66438276", "0.6612577", "0.6491037", "0.6460821", "0.63719344", "0.6350408", "0.62853444", "0.62116045", "0.61943567", "0.60447955", "0.60042334", "0.5988993", "0.5987815", "0.59491676", "0.58990157", "0.5892898", "0.5881457", "0.58800566", "0.5879434", "0.5872016", "0.587...
0.55250293
59
This function recodes age to voting age indicator.
def votingage_recode(row, age_var): return Row(**row.asDict(), VA=int(int(row[age_var]) >= 18))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def recode_VotingAgeAttr():\n QAGE = \"QAGE\"\n \n # get the max age from the AgeAttr\n ages = getIndices(schemamaker.AGE.getLevels())\n\n sql = ['case']\n # under 18 (0-17)\n sql += [f\"when {QAGE} = '{age}' then '0'\" for age in ages[:18]]\n # 18+\n sql += [f\"when {QAGE} = '{age}' the...
[ "0.72888666", "0.63422006", "0.61982685", "0.6087664", "0.6044752", "0.60132456", "0.5996665", "0.5911703", "0.5901286", "0.5840923", "0.58004", "0.57445115", "0.5730684", "0.57280827", "0.57280827", "0.571167", "0.56999373", "0.5686093", "0.56769687", "0.5626336", "0.5591922...
0.70308846
1
This function recodes age to voting age indicator.
def gqtype1940_recode(row, gqtype_var): dict= {0:0,2:1,3:2,4:3,6:4,7:5,8:6,9:7} return Row(**row.asDict(), GQTYPE2=int(dict[int(row[gqtype_var])]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def recode_VotingAgeAttr():\n QAGE = \"QAGE\"\n \n # get the max age from the AgeAttr\n ages = getIndices(schemamaker.AGE.getLevels())\n\n sql = ['case']\n # under 18 (0-17)\n sql += [f\"when {QAGE} = '{age}' then '0'\" for age in ages[:18]]\n # 18+\n sql += [f\"when {QAGE} = '{age}' the...
[ "0.7288859", "0.7029836", "0.6342088", "0.61982423", "0.6086834", "0.60438293", "0.6011859", "0.59954005", "0.5910818", "0.5900025", "0.5839856", "0.57997704", "0.5743357", "0.57295084", "0.57269484", "0.57269484", "0.5710921", "0.5698795", "0.56848055", "0.5676055", "0.56264...
0.0
-1
Returns dict required by the submissions app for creating and retrieving submissions for a particular student.
def get_student_item_dict(self): # pylint: disable=no-member return { "student_id": "TURMAS_PROFESSORES2", "course_id": self.block_course_id(), "item_id": "TURMAS_PROFESSORES", "item_type": "TURMAS_PROFESSORES", }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def student_state(self):\n submission = self.get_submission()\n if submission:\n uploaded_submission = submission.get(\"answer\").get(\"filename\", None)\n if uploaded_submission:\n uploaded = {\"filename\": submission['answer']['filename']}\n else:\n ...
[ "0.6342659", "0.62900764", "0.611838", "0.6073937", "0.6051365", "0.6027995", "0.60204875", "0.59528667", "0.5901761", "0.5887693", "0.58747524", "0.5845859", "0.58351123", "0.5783542", "0.5770243", "0.5769744", "0.57578826", "0.57285917", "0.5711314", "0.5651691", "0.563121"...
0.60782087
3
Implementation of the gelu activation function.
def gelu(x): return x * 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gelu_activation(inp):\n out = 1 + tf.tanh(np.sqrt(np.pi) * (inp + 0.044715 * tf.pow(inp, 3)))\n out *= 0.5 * inp\n return out", "def gelu_activation(inp):\n out = 1 + tf.tanh(np.sqrt(np.pi) * (inp + 0.044715 * tf.pow(inp, 3)))\n out *= 0.5 * inp\n return out", "def gelu(x):\n return f_...
[ "0.81878746", "0.81878746", "0.78091353", "0.75566226", "0.75261027", "0.74784553", "0.7371147", "0.7235054", "0.7213163", "0.72079337", "0.71979815", "0.71930933", "0.71736133", "0.7157644", "0.6968456", "0.6956587", "0.69499516", "0.6794776", "0.6789725", "0.677464", "0.677...
0.69697493
21
Check if given string is a number
def is_number(text): return text.lower() in AVRO_NUMBERS
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_number(s):\r\n try:\r\n int(s)\r\n return True\r\n except ValueError:\r\n return False", "def is_number(s):\n try:\n int(s)\n return True\n except ValueError:\n return False", "def is_valid_numeric(inString):\r\n return is_int(inString) or is_floa...
[ "0.86266977", "0.8614113", "0.85569495", "0.8530858", "0.85076964", "0.83444005", "0.83386594", "0.8308308", "0.8308308", "0.8308308", "0.8232177", "0.82226145", "0.81765175", "0.8125507", "0.8109672", "0.8108557", "0.8100462", "0.80996865", "0.7942509", "0.79189825", "0.7896...
0.75334406
42
max_noutput_items(udp_debug_sptr self) > int
def max_noutput_items(self): return _spacegrant_swig.udp_debug_sptr_max_noutput_items(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_noutput_items(self):\n return _spacegrant_swig.ax25_udp_pdu_gen_sptr_max_noutput_items(self)", "def max_noutput_items(self):\n return _spacegrant_swig.ax25_udp_pdu_receiver_sptr_max_noutput_items(self)", "def set_max_noutput_items(self, m):\n return _spacegrant_swig.udp_debug_sptr_...
[ "0.8176988", "0.81450784", "0.8090422", "0.80487424", "0.7770448", "0.76995355", "0.7576218", "0.7572661", "0.7562225", "0.75537467", "0.75497144", "0.75414896", "0.7504701", "0.7499048", "0.74851", "0.7482035", "0.7474103", "0.7460695", "0.7447523", "0.7441404", "0.7428933",...
0.8675666
0
set_max_noutput_items(udp_debug_sptr self, int m)
def set_max_noutput_items(self, m): return _spacegrant_swig.udp_debug_sptr_set_max_noutput_items(self, m)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_max_noutput_items(self, m):\n return _spacegrant_swig.ax25_udp_pdu_gen_sptr_set_max_noutput_items(self, m)", "def set_max_noutput_items(self, m):\n return _spacegrant_swig.message_debug_sptr_set_max_noutput_items(self, m)", "def set_max_noutput_items(self, m):\n return _spacegrant_...
[ "0.8731032", "0.872651", "0.8692746", "0.8410931", "0.8314686", "0.8240967", "0.82327634", "0.8226602", "0.8218581", "0.81887805", "0.8179597", "0.8112417", "0.8104528", "0.805799", "0.80314523", "0.80273014", "0.8019604", "0.8013521", "0.7984897", "0.7877809", "0.7876769", ...
0.9258258
0
is_set_max_noutput_items(udp_debug_sptr self) > bool
def is_set_max_noutput_items(self): return _spacegrant_swig.udp_debug_sptr_is_set_max_noutput_items(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_set_max_noutput_items(self):\n return _spacegrant_swig.ax25_udp_pdu_receiver_sptr_is_set_max_noutput_items(self)", "def is_set_max_noutput_items(self):\n return _spacegrant_swig.message_debug_sptr_is_set_max_noutput_items(self)", "def is_set_max_noutput_items(self):\n return _spaceg...
[ "0.82234603", "0.8190864", "0.815605", "0.8080453", "0.8004134", "0.79332983", "0.7811644", "0.7752836", "0.7727448", "0.77059495", "0.7700653", "0.76872283", "0.7634478", "0.7621657", "0.7564723", "0.7564068", "0.7536739", "0.7535124", "0.75273585", "0.75152254", "0.7491826"...
0.8736726
0
set_min_noutput_items(udp_debug_sptr self, int m)
def set_min_noutput_items(self, m): return _spacegrant_swig.udp_debug_sptr_set_min_noutput_items(self, m)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_min_noutput_items(self, m):\n return _spacegrant_swig.message_debug_sptr_set_min_noutput_items(self, m)", "def set_min_noutput_items(self, m):\n return _spacegrant_swig.ax25_udp_pdu_gen_sptr_set_min_noutput_items(self, m)", "def set_min_noutput_items(self, m):\n return _spacegrant_...
[ "0.84740466", "0.8459526", "0.84588146", "0.8285908", "0.8146845", "0.8030416", "0.80297667", "0.8007855", "0.7955436", "0.79414004", "0.78577363", "0.78562254", "0.77967966", "0.77940476", "0.7793667", "0.77389014", "0.77387166", "0.7705193", "0.7688705", "0.76880807", "0.76...
0.90772825
0
pc_noutput_items(udp_debug_sptr self) > float
def pc_noutput_items(self): return _spacegrant_swig.udp_debug_sptr_pc_noutput_items(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pc_noutput_items(self) -> \"float\":\n return _beamforming_swig.doaesprit_sptr_pc_noutput_items(self)", "def pc_noutput_items_var(self) -> \"float\":\n return _beamforming_swig.doaesprit_sptr_pc_noutput_items_var(self)", "def pc_noutput_items(self) -> \"float\":\n return _beamforming_s...
[ "0.70510346", "0.6985436", "0.69120073", "0.68841857", "0.6744606", "0.67430186", "0.66462183", "0.66411895", "0.6380339", "0.63471013", "0.6328753", "0.6194949", "0.61185396", "0.60945433", "0.6074499", "0.6050756", "0.6025998", "0.60117245", "0.59765965", "0.59574544", "0.5...
0.6299872
11
pc_nproduced_avg(udp_debug_sptr self) > float
def pc_nproduced_avg(self): return _spacegrant_swig.udp_debug_sptr_pc_nproduced_avg(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pc_nproduced_avg(self) -> \"float\":\n return _beamforming_swig.beamformer_sptr_pc_nproduced_avg(self)", "def pc_nproduced_avg(self) -> \"float\":\n return _beamforming_swig.doaesprit_sptr_pc_nproduced_avg(self)", "def pc_nproduced_avg(self) -> \"float\":\n return _beamforming_swig.pha...
[ "0.74531144", "0.7408706", "0.74051094", "0.7268281", "0.6997663", "0.6896879", "0.68887824", "0.68878484", "0.6863739", "0.67930955", "0.6790072", "0.6755643", "0.67507094", "0.66394335", "0.66389656", "0.6608949", "0.6579007", "0.65693325", "0.6563511", "0.65218437", "0.651...
0.73349625
3
pc_input_buffers_full_var(udp_debug_sptr self, int which) > float pc_input_buffers_full_var(udp_debug_sptr self) > pmt_vector_float
def pc_input_buffers_full_var(self, *args): return _spacegrant_swig.udp_debug_sptr_pc_input_buffers_full_var(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pc_input_buffers_full_var(self, *args) -> \"std::vector< float,std::allocator< float > >\":\n return _beamforming_swig.doaesprit_sptr_pc_input_buffers_full_var(self, *args)", "def pc_input_buffers_full_var(self, *args) -> \"std::vector< float,std::allocator< float > >\":\n return _beamforming_s...
[ "0.77895504", "0.77480537", "0.7715826", "0.7558733", "0.74101645", "0.7374321", "0.73480177", "0.7325397", "0.73100954", "0.7305582", "0.71849203", "0.71570075", "0.7122481", "0.7112337", "0.7100657", "0.70335454", "0.6987018", "0.6966076", "0.6932339", "0.6916485", "0.69117...
0.75039816
4
pc_output_buffers_full(udp_debug_sptr self, int which) > float pc_output_buffers_full(udp_debug_sptr self) > pmt_vector_float
def pc_output_buffers_full(self, *args): return _spacegrant_swig.udp_debug_sptr_pc_output_buffers_full(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pc_output_buffers_full(self, *args) -> \"std::vector< float,std::allocator< float > >\":\n return _beamforming_swig.doaesprit_sptr_pc_output_buffers_full(self, *args)", "def pc_output_buffers_full_var(self, *args) -> \"std::vector< float,std::allocator< float > >\":\n return _beamforming_swig.d...
[ "0.7752476", "0.76877147", "0.7650493", "0.7642452", "0.75981295", "0.7544605", "0.7446683", "0.7419137", "0.74005014", "0.73852396", "0.7354925", "0.732073", "0.73042905", "0.7262177", "0.72431934", "0.7229593", "0.72227234", "0.7211849", "0.71948636", "0.71867716", "0.71379...
0.76134247
4
pc_output_buffers_full_avg(udp_debug_sptr self, int which) > float pc_output_buffers_full_avg(udp_debug_sptr self) > pmt_vector_float
def pc_output_buffers_full_avg(self, *args): return _spacegrant_swig.udp_debug_sptr_pc_output_buffers_full_avg(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pc_output_buffers_full_avg(self, *args) -> \"std::vector< float,std::allocator< float > >\":\n return _beamforming_swig.doaesprit_sptr_pc_output_buffers_full_avg(self, *args)", "def pc_output_buffers_full_avg(self, *args) -> \"std::vector< float,std::allocator< float > >\":\n return _beamformin...
[ "0.81388396", "0.80316126", "0.8029397", "0.80271417", "0.79425716", "0.7912824", "0.78737164", "0.78492975", "0.7787294", "0.77725387", "0.7742103", "0.7732606", "0.77256894", "0.77253693", "0.76800233", "0.7653576", "0.7653434", "0.76514405", "0.7648713", "0.76471686", "0.7...
0.80217606
4
pc_output_buffers_full_var(udp_debug_sptr self, int which) > float pc_output_buffers_full_var(udp_debug_sptr self) > pmt_vector_float
def pc_output_buffers_full_var(self, *args): return _spacegrant_swig.udp_debug_sptr_pc_output_buffers_full_var(self, *args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pc_output_buffers_full_var(self, *args) -> \"std::vector< float,std::allocator< float > >\":\n return _beamforming_swig.doaesprit_sptr_pc_output_buffers_full_var(self, *args)", "def pc_output_buffers_full_var(self, *args) -> \"std::vector< float,std::allocator< float > >\":\n return _beamformin...
[ "0.7959861", "0.79230946", "0.7895542", "0.7710034", "0.76395094", "0.7538643", "0.75088626", "0.7403616", "0.7378762", "0.73759335", "0.7374973", "0.7362911", "0.7325134", "0.73201096", "0.7313963", "0.7293196", "0.7263875", "0.7254347", "0.722618", "0.7204909", "0.71927387"...
0.7716308
3
max_noutput_items(hdlc_framer_sptr self) > int
def max_noutput_items(self): return _spacegrant_swig.hdlc_framer_sptr_max_noutput_items(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_noutput_items(self) -> \"int\":\n return _beamforming_swig.beamformer_sptr_max_noutput_items(self)", "def max_noutput_items(self) -> \"int\":\n return _beamforming_swig.doaesprit_sptr_max_noutput_items(self)", "def max_noutput_items(self):\n return _TestA_swig.my_qpsk_demod_cb_sptr...
[ "0.86392236", "0.86145955", "0.856988", "0.8524229", "0.8497105", "0.8468115", "0.8461704", "0.8388109", "0.83707696", "0.8359412", "0.8353683", "0.8324141", "0.8318215", "0.8317569", "0.8283969", "0.8275221", "0.82706237", "0.8240553", "0.82174313", "0.82123303", "0.81874096...
0.87307626
0