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
Softmax Function used to convert Score outputs from Linear Function (list of numbers) into Probabilities, and returns list of values given by the Softmax function. It takes Exponential of all Scores to ensure they are positive numbers to solve problems with 3+ classes (Multiclass Classification), whereas 2 class proble...
def softmax(L): expL = np.exp(L) sumExpL = sum(expL) result = [] for i in expL: result.append(i*1.0/sumExpL) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _compute_softmax(scores):\n if not scores:\n return []\n\n max_score = None\n for score in scores:\n if max_score is None or score > max_score:\n max_score = score\n\n exp_scores = []\n total_sum = 0.0\n for score in scores:\n x = np.exp(score - max_score)\n exp_scores.append(x)\n tot...
[ "0.80448925", "0.79826593", "0.79826593", "0.79826593", "0.79826593", "0.78369415", "0.78041816", "0.7410945", "0.73087615", "0.7200696", "0.71898997", "0.71138996", "0.7073865", "0.701149", "0.69976586", "0.69727325", "0.6867229", "0.67977446", "0.6783592", "0.6777038", "0.6...
0.705361
13
Get current traefik config
def _get_config(): resp = requests.get(TRAEFIK_API_URL) if not resp.ok: raise Exception( "Bad traefik response: %s %s" % (resp.status_code, resp.text) ) return resp.json()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config(self):\n if self.faucet is not None:\n return self.faucet.get_config()\n return None", "def config(self):\n return self[CONFIG_KEY]", "def _config():\n config = None\n try:\n with open(\"%s/sites.yaml\" % CONFIG_PATH, \"r\", encoding=\"utf8\") as f:\n...
[ "0.65415466", "0.6487854", "0.64643747", "0.63762534", "0.6346586", "0.62744397", "0.62612295", "0.6244715", "0.6242028", "0.6240448", "0.6240448", "0.6240448", "0.6240448", "0.6240448", "0.6240448", "0.6240448", "0.6240448", "0.6240448", "0.6240448", "0.6240448", "0.6240448"...
0.7550375
0
Function to return word tokens after removing stopwords
def process_text(text): return [token.text for token in nlp(text) if not token.is_stop]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_stopwords(text):\n tokens = tokenize(text)\n tokens = stopwordsRem(tokens)\n return tokens", "def remove_stop_words(tweet):\n tokens_without_sw = \"\"\n for word in tweet.split():\n if not word.lower() in STOPWORDS:\n tokens_without_sw += word.lower() + \" \"\n retur...
[ "0.8282506", "0.8236921", "0.81577164", "0.8124182", "0.79964346", "0.79879606", "0.7941632", "0.79021937", "0.78257424", "0.7790527", "0.7781247", "0.7778923", "0.77590746", "0.7750506", "0.7732251", "0.77091384", "0.7674733", "0.7656764", "0.7650664", "0.7640874", "0.762771...
0.0
-1
Creates and saves a new superuser
def create_superuser(self, email, password): user = self.create_user(email, password) user.is_superuser = True user.is_staff = True user.save(using=self._db) return user
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_superuser(self, username, email, password):\n print(\"creating super user....\")\n user = self.create_user(\n\n username=username,\n password=password,\n email = email,\n commit=False,\n )\n user.is_staff = True\n user.is_sup...
[ "0.77547395", "0.77106166", "0.76589674", "0.76153344", "0.76043314", "0.7571577", "0.75513625", "0.75086164", "0.7498614", "0.7489792", "0.7474367", "0.74643284", "0.745592", "0.7434419", "0.7433068", "0.74285924", "0.74242926", "0.7416112", "0.7409944", "0.7408624", "0.7398...
0.7091985
85
Asserts that the scaled shape is correct, given orig shape and scale_factor.
def check_scaled_shape(orig: torch.Tensor, scaled: torch.Tensor, scale_factor: float) -> bool: N, C, H, W = orig.shape Hc = int(scale_factor * H) Wc = int(scale_factor * W) return scaled.shape == (N, C, Hc, Wc)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_scale_shape_axis(shape_x, shape_scale, axis, num_axes, scale_from_blob):\n\n length_x = len(shape_x)\n length_scale = len(shape_scale)\n\n if (axis >= length_x) or (axis < (-length_x)):\n raise RuntimeError(\"axis out of range index\")\n\n if num_axes < -1:\n raise RuntimeError...
[ "0.68980896", "0.6707433", "0.66122127", "0.65666986", "0.6384991", "0.6234652", "0.6158823", "0.61243045", "0.6106264", "0.6034931", "0.60271806", "0.59370005", "0.5861821", "0.58276594", "0.5797442", "0.5783301", "0.5780703", "0.5778719", "0.57183325", "0.5713862", "0.56936...
0.7542899
0
Tests that no operation is performed when scale_factor == 1.
def test_resize_noop(self, X, y, mode): Xc, _ = resize_batch(X, y, 1.0, mode, resize_targets=False) assert X is Xc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_scale(app):\n\n assert False", "def test_validate_scale_count(ctx):\n assert eos.validate_scale_count(None, ctx) is None\n assert eos.validate_scale_count(orm.Int(3), ctx) is None\n assert eos.validate_scale_count(orm.Int(2), ctx) == 'need at least 3 scaling factors.'", "def testZeroInput(...
[ "0.6535765", "0.65304375", "0.6429214", "0.6369639", "0.6264504", "0.6258484", "0.6203764", "0.62014693", "0.6109567", "0.6101256", "0.6010517", "0.5995616", "0.5943552", "0.59334576", "0.5865869", "0.5820763", "0.5789148", "0.57808703", "0.57342374", "0.5732263", "0.5693144"...
0.524274
81
Sets the cash_flow_lineage of this CashFlowValue.
def cash_flow_lineage(self, cash_flow_lineage): self._cash_flow_lineage = cash_flow_lineage
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def line(self, value):\n\n\t\tif value is not None:\n\t\t\tassert type(value) is int, \"'{0}' attribute: '{1}' type is not 'int'!\".format(\"line\", value)\n\t\t\tassert value > 0, \"'{0}' attribute: '{1}' need to be exactly positive!\".format(\"line\", value)\n\t\tself.__line = value", "def home_money_line(self...
[ "0.505394", "0.5008375", "0.49500218", "0.48923913", "0.48034826", "0.47586742", "0.47417346", "0.47019252", "0.46580777", "0.46134818", "0.46059132", "0.45832402", "0.45728016", "0.45586666", "0.45404127", "0.45394343", "0.45317507", "0.4521919", "0.4516098", "0.45103064", "...
0.88833
0
Sets the payment_amount of this CashFlowValue.
def payment_amount(self, payment_amount): if self.local_vars_configuration.client_side_validation and payment_amount is None: # noqa: E501 raise ValueError("Invalid value for `payment_amount`, must not be `None`") # noqa: E501 self._payment_amount = payment_amount
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def amount(self, amount: float):\n if amount is None:\n raise ValueError(\"Invalid value for `amount`, must not be `None`\") # noqa: E501\n\n self._amount = amount", "def amount(self, amount):\n if amount is None:\n raise ValueError(\"Invalid value for `amount`, must n...
[ "0.66576576", "0.6585119", "0.6585119", "0.6500116", "0.6313185", "0.6207765", "0.617024", "0.617024", "0.617024", "0.617024", "0.617024", "0.617024", "0.617024", "0.617024", "0.617024", "0.61599547", "0.61599547", "0.6056337", "0.600363", "0.59911865", "0.5963222", "0.5933...
0.77774256
0
Sets the payment_ccy of this CashFlowValue.
def payment_ccy(self, payment_ccy): if self.local_vars_configuration.client_side_validation and payment_ccy is None: # noqa: E501 raise ValueError("Invalid value for `payment_ccy`, must not be `None`") # noqa: E501 self._payment_ccy = payment_ccy
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def payment_type(self, payment_type):\n\n self._payment_type = payment_type", "def kyc_state(self, kyc_state):\n\n self._kyc_state = kyc_state", "def payment_date(self, payment_date):\n\n self._payment_date = payment_date", "def payment_date(self, payment_date):\n\n self._payment_...
[ "0.5009276", "0.50025815", "0.4880561", "0.4880561", "0.4737453", "0.47234666", "0.46897516", "0.46878213", "0.4657173", "0.45723772", "0.45570904", "0.45404842", "0.45360726", "0.45128644", "0.45008203", "0.44773725", "0.44564056", "0.44444105", "0.44374436", "0.44142264", "...
0.8008341
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, CashFlowValue): 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.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): if not isinstance(other, CashFlowValue): 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.8457179", "0.8393067", "0.81457263", "0.8140635", "0.8133462", "0.8094992", "0.8093376", "0.8093376", "0.8093376", "0.80863357", "0.80863357", "0.8077303", "0.8077303", "0.8066831", "0.8043635", "0.8043635", "0.8043635", "0.8043635", "0.8043635", "0.8043635", "0.8043635", ...
0.0
-1
Pads the given array X with zeroes at the both end of given dims.
def zero_pad(X, padding_width, dims): dims = (dims) if isinstance(dims, int) else dims pad = [(0, 0) if idx not in dims else (padding_width, padding_width) for idx in range(len(X.shape))] X_padded = np.pad(X, pad, 'constant') return X_padded
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _pad_with_zeros(self, X, margin):\n newX = np.zeros((X.shape[0] + 2 * margin, X.shape[1] + 2 * margin, X.shape[2]))\n x_offset = margin\n y_offset = margin\n newX[x_offset:X.shape[0] + x_offset, y_offset:X.shape[1] + y_offset, :] = X\n return newX", "def padding(a, dim):\n\...
[ "0.70617837", "0.6535911", "0.6467196", "0.6465936", "0.64072335", "0.63002443", "0.62966114", "0.6285144", "0.6267398", "0.624555", "0.61968255", "0.61869466", "0.6162422", "0.60674536", "0.60464317", "0.59686375", "0.59444034", "0.5927191", "0.59177244", "0.5876671", "0.587...
0.8131378
0
Initializam reteaua cu arhitectura pasata la size biases si weights random
def __init__(self, sizes): self.num_layers = len(sizes) self.sizes = sizes self.biases = [np.random.randn(y, 1) for y in sizes[1:]] self.weights = [np.random.randn(y, x) for x, y in zip(sizes[:-1], sizes[1:])]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, size, parameters):\n\n self.weights = self.init_weights(size)\n self.alpha = parameters['alpha']\n self.epsilon = parameters['epsilon']\n self.gamma = parameters['gamma']\n self.value = 0.0 #np.random.random()", "def default_weight_initializer(self):\n ...
[ "0.7187552", "0.7145378", "0.70761406", "0.70706934", "0.7064725", "0.7016062", "0.7009611", "0.69568557", "0.6938749", "0.69345564", "0.6901814", "0.6901069", "0.6899508", "0.6864811", "0.6843959", "0.6828675", "0.6824855", "0.6809027", "0.6803097", "0.68016416", "0.67849064...
0.68136257
17
Derivative of the sigmoid function.
def sigmoid_prime(z): return sigmoid(z) * (1 - sigmoid(z))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sigmoid_derivative(x):\n return x * (1-x)", "def sigmoid_derivative(x):\n return x * (1.0 - x)", "def sigmoid_derivative(x):\n\n return sigmoid(x) * (1 - sigmoid(x))", "def derivative_sigmoid(x):\n return x * (1 - x)", "def derivative_sigmoid(x):\n return x * (1 - x)", "def sigmoid_der...
[ "0.84754366", "0.8450928", "0.8396931", "0.83485264", "0.83485264", "0.8298343", "0.80539966", "0.7753385", "0.77070266", "0.7498153", "0.7464916", "0.7454039", "0.7401582", "0.7385017", "0.73829913", "0.7346935", "0.7321687", "0.73094004", "0.7192053", "0.7113881", "0.709236...
0.0
-1
Switch Chromosomes Choses two random chromosomes and switches them in place.
def switch_chromosomes(mutated_genome): index1 = random.randint(0,max(0,len(mutated_genome)-1)) index2 = random.randint(0,max(0,len(mutated_genome)-1)) temp = mutated_genome[index1] mutated_genome[index1] = mutated_genome[index2] mutated_genome[index2] = temp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def switch_opacities(mutated_genome):\n index1 = random.randint(0,max(0,len(mutated_genome)-1))\n index2 = random.randint(0,max(0,len(mutated_genome)-1))\n temp = mutated_genome[index1][1]\n mutated_genome[index1][1] = mutated_genome[index2][1]\n mutated_genome[index2][1] = temp", "def mutate_chromosom...
[ "0.7144732", "0.6635525", "0.6614316", "0.63819915", "0.63241905", "0.6230874", "0.621616", "0.60042495", "0.5984897", "0.58996826", "0.5879291", "0.5870332", "0.5848764", "0.58395606", "0.5818081", "0.5794118", "0.57570326", "0.5740301", "0.5658126", "0.564185", "0.56400144"...
0.8238444
0
Increment Chromosome Choose a chromosome at random and move it up the list.
def increment_chromosome(mutated_genome): index1 = random.randint(0,max(0,len(mutated_genome)-2)) seed = random.randint(0,2) if seed == 0: index2 = index1 + 1 elif seed == 1: index2 = random.randint(index1,max(index1,len(mutated_genome)-1)) else: #seed == 2: index2 = max(0,len(mutated_g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mutate_chromosome(mutated_genome):\n seed = random.randint(0,5)\n if len(mutated_genome) <= 1: seed = 0\n if seed == 0:\n insert_chromosome(mutated_genome)\n elif seed == 1:\n remove_chromosome(mutated_genome)\n elif seed == 2:\n switch_chromosomes(mutated_genome)\n elif seed == 3:\n...
[ "0.71094", "0.68858737", "0.6837561", "0.64810765", "0.6364784", "0.619279", "0.61292785", "0.6052236", "0.6003865", "0.60003", "0.59984756", "0.5936744", "0.5886909", "0.58779913", "0.58752", "0.58748037", "0.584617", "0.58280873", "0.58273613", "0.58146113", "0.5792828", ...
0.75429916
0
Decrement point Choose a point at random and move it down the list.
def decrement_point(mutated_genome,index): point_index1 = random.randint(1,max(0,len(mutated_genome[index][2])-1)) seed = random.randint(0,2) if seed == 0: point_index2 = point_index1 - 1 elif seed == 1: point_index2 = random.randint(0, point_index1) else: #seed == 2: point_index2 = 0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move(self):\n if random.random() < 0.5:\n self.y = (self.y + 1) % 100\n else:\n self.y = (self.y - 1) % 100\n if random.random() < 0.5:\n self.x = (self.x + 1) % 100\n else:\n self.x = (self.x - 1) % 100", "def move(self):\n if se...
[ "0.63784575", "0.63140285", "0.6232528", "0.620877", "0.61166966", "0.6031018", "0.5980155", "0.5971945", "0.5944956", "0.5941785", "0.59283733", "0.59094703", "0.5893862", "0.58891445", "0.5831326", "0.58275235", "0.58086455", "0.5803677", "0.5783991", "0.57765067", "0.57286...
0.73261166
0
Reference to the stored application handler hub instance. Returns `glue.core.Hub` The internal ``Hub`` instance for the application.
def hub(self): return self._application_handler.data_collection.hub
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hub(self) -> N4Hub:\n return self.platform_common.hub", "def get_hub_class():\n hubtype = _threadlocal.Hub\n if hubtype is None:\n hubtype = _threadlocal.Hub = Hub\n return hubtype", "def getHubble(self):\n return self._hubble", "def hub(self) -> str:\n return...
[ "0.6844369", "0.65937203", "0.6418254", "0.64054644", "0.6383628", "0.62375075", "0.6179945", "0.58709204", "0.57260436", "0.5712981", "0.56110317", "0.5432539", "0.54244554", "0.5381225", "0.5363423", "0.53575784", "0.53285116", "0.53079474", "0.5302257", "0.5299189", "0.528...
0.77686507
0
Reference to the stored data collection instance, used to maintain the the data objects that been loaded into the application this session. Returns `glue.core.DataCollection` The ``DataCollection`` instance for this application session.
def data_collection(self): return self._application_handler.data_collection
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collection(self):\n return self._collection", "def _get_collection(self) -> Any:\n return self.anki.Collection(self.db_location, log=True)", "def collection(cls):\n if not cls.__collection__:\n cls.__collection__ = AbstractModel.set_collection(\n cls.__collect...
[ "0.6517237", "0.63170373", "0.6297143", "0.62534904", "0.6187596", "0.6077068", "0.60538465", "0.6033493", "0.59763515", "0.5964674", "0.59622073", "0.59612966", "0.59549165", "0.5820513", "0.57710814", "0.57635427", "0.56965595", "0.562019", "0.5590878", "0.55457205", "0.552...
0.7464061
0
Return a `~glue_jupyter.bqplot.common.BqplotBaseView` viewer instance. This is not an ``IPyWidget``. This is stored here because the state of the viewer and data methods that allow add/removing data to the viewer exist in a wrapper around the core ``IPyWidget``, which is needed to interact with the data rendered within...
def get_viewer(self, viewer_reference): return self._viewer_by_reference(viewer_reference)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_viewer(self, v_id):\n try:\n return self.viewers[v_id]\n except KeyError:\n pass\n\n viewer = ImageViewCanvas(self.logger)\n\n # customize this viewer\n viewer.enable_autocuts('on')\n viewer.set_autocut_params('zscale')\n viewer.enable_...
[ "0.6201998", "0.6027048", "0.5955231", "0.5684626", "0.5668301", "0.5553026", "0.55480707", "0.5508652", "0.54964983", "0.5488692", "0.5456012", "0.5440536", "0.5426284", "0.54038316", "0.5401872", "0.5393912", "0.5284073", "0.5221294", "0.52079785", "0.51587325", "0.5158485"...
0.5737619
3
Sets the plot axes labels to be the units of the data to be loaded.
def _set_plot_axes_labels(self, data, viewer_id): viewer = self._viewer_by_id(viewer_id) # Get the units of the data to be loaded. spectral_axis_unit_type = data.spectral_axis.unit.physical_type.title() flux_unit_type = data.flux.unit.physical_type.title() if data.spectral_axis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_plot_labels():\n plt.xlabel(\"Time (s)\")\n plt.ylabel(\"Temperature (F)\")\n plt.title('Temperature Time Series')", "def set_labels(self):\n\n if 1 <= self.selected_data <= 2:\n self.plot_select.setLabel(\"left\", \"P (kPa)\")\n self.plot_select.setLabel...
[ "0.7401984", "0.7270071", "0.7244804", "0.71676916", "0.71547055", "0.6971593", "0.69226855", "0.685886", "0.6846964", "0.67511654", "0.66938823", "0.6624968", "0.65828294", "0.6566672", "0.6536452", "0.64586335", "0.6407508", "0.6403295", "0.6401583", "0.635184", "0.62365395...
0.79337114
0
Retrieve the data item given the Glue ``DataCollection`` data label.
def _data_id_from_label(self, label): for data_item in self.state.data_items: if data_item['name'] == label: return data_item['id']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_item_from_label(self, label):\n idx = self.labels.index(label)\n item = self[idx][0]\n return item", "def _getData(self, label):\n\n try:\n return self._data[label]\n except KeyError:\n try:\n field = ATOMIC_FIELDS[label]\n ...
[ "0.71659845", "0.66788447", "0.64941347", "0.63662076", "0.6309209", "0.628625", "0.6263994", "0.6184752", "0.61751646", "0.6117431", "0.6086813", "0.6042351", "0.6021907", "0.6012093", "0.60106826", "0.60106826", "0.60106826", "0.6006878", "0.59989995", "0.5995493", "0.59756...
0.66968685
1
Filter out short and stopword tokens for clustering.
def filter_tokens(tokens): token_list = [] for token in tokens: if len(token) > 2 and token not in STOPWORDS: token_list.append(token) else: continue return token_list
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filter_tokens(self, tokens):\n # TODO get hyphenated words\n filtered = [w.lower() for w in tokens\n if len(w) > self.MIN_WORD_LENGTH\n and w.isalpha()\n and w.lower() not in self.stopwords]\n return filtered", "async def wordfilte...
[ "0.7497983", "0.650764", "0.64179766", "0.63375425", "0.63212675", "0.6321185", "0.63017374", "0.62763894", "0.6239774", "0.61798644", "0.61528003", "0.61392766", "0.6115985", "0.6067838", "0.6055764", "0.6025008", "0.6010469", "0.6004695", "0.5987277", "0.59814066", "0.59715...
0.68190277
1
Picks a random color R,G or B
def random_color(): rgbl=[255,0,0] random.shuffle(rgbl) return tuple(rgbl)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random_color_gen():\n r = randint(0, 255)\n g = randint(0, 255)\n b = randint(0, 255)\n return [r, g, b]", "def get_random_color():\n r=random.randint(0,255)\n g=random.randint(0,255)\n b=random.randint(0,255)\n return(r,g,b)", "def randcolor():\n return (randint(0,255), randint(0,...
[ "0.83104855", "0.82600963", "0.8135276", "0.8089616", "0.8087748", "0.8077425", "0.8057069", "0.7987774", "0.78941417", "0.7893156", "0.7779068", "0.7702594", "0.7514886", "0.74942607", "0.7481826", "0.7411472", "0.73857653", "0.7366962", "0.7365365", "0.7336715", "0.7306373"...
0.8278991
1
Limits magnitude of vector2
def limit(v2, max): v = copy.deepcopy(v2) if v.length() > max: v.scale_to_length(max) return v
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def magnitude(vector):\n return math.sqrt(sum_of_squares(vector))", "def magnitude(v: Vector) -> float:\n return math.sqrt(sum_of_squares(v))", "def magnitude(v: Vector) -> float:\n return math.sqrt(sum_of_squares(v)) #math.sqrt() is a square root function", "def vecmag(r1, r2=None):\n\n if(r2 is...
[ "0.66841894", "0.63870865", "0.63861686", "0.6385587", "0.63286835", "0.6249266", "0.61933464", "0.61672807", "0.6128961", "0.60936856", "0.60586774", "0.6058216", "0.6047002", "0.59680426", "0.59630466", "0.59459984", "0.5913757", "0.5899458", "0.58974916", "0.58435106", "0....
0.54466784
56
View function for Home Page.
def homepage(): return render_template("coursePage.html",courseName = "Welcome", Courses = COURSES, blank = 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def home(request):\n\treturn render(request, \"compta/home.html\")", "def home(request):\r\n return render(request, 'home.html')", "def home(request):\n return render(request, 'base/home.html')", "def home():\n\n return render_template('home_page.html')", "def home_page(request):\r\n return rend...
[ "0.85985065", "0.85185015", "0.83027583", "0.83000445", "0.82764816", "0.82706845", "0.826092", "0.8236431", "0.82290536", "0.8208599", "0.8207083", "0.8207083", "0.8207083", "0.8207083", "0.8207083", "0.8207083", "0.8207083", "0.8207083", "0.8207083", "0.8207083", "0.8207083...
0.0
-1
Sets the payor_id of this PayorV1.
def payor_id(self, payor_id): self._payor_id = payor_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def payer_wallet_id(self, payer_wallet_id):\n\n self._payer_wallet_id = payer_wallet_id", "def payor_name(self, payor_name):\n if payor_name is None:\n raise ValueError(\"Invalid value for `payor_name`, must not be `None`\") # noqa: E501\n\n self._payor_name = payor_name", "def...
[ "0.63355136", "0.6201651", "0.61329395", "0.59394777", "0.59336877", "0.570057", "0.5573957", "0.55196893", "0.55196893", "0.54524994", "0.52524555", "0.5232599", "0.5218464", "0.5215905", "0.51985943", "0.5160082", "0.5157064", "0.5107751", "0.51050353", "0.5081833", "0.5081...
0.84491444
0
Sets the payor_name of this PayorV1.
def payor_name(self, payor_name): if payor_name is None: raise ValueError("Invalid value for `payor_name`, must not be `None`") # noqa: E501 self._payor_name = payor_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def payee_name(self, payee_name):\n\n self._payee_name = payee_name", "def set_policyname(self, policyname):\n self.options['policyname'] = policyname", "def set_policyname(self, policyname):\n self.options[\"policyname\"] = policyname", "def set_name(self, name):\n self._name = n...
[ "0.6842898", "0.6199264", "0.61720127", "0.6089483", "0.6075576", "0.607368", "0.6063098", "0.60554343", "0.60235476", "0.60235476", "0.6022743", "0.60094285", "0.60094285", "0.6002755", "0.6002755", "0.6002755", "0.6002755", "0.6002755", "0.5992705", "0.59337103", "0.5933710...
0.8310435
0
Sets the funding_account_routing_number of this PayorV1.
def funding_account_routing_number(self, funding_account_routing_number): self._funding_account_routing_number = funding_account_routing_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def funding_account_account_number(self, funding_account_account_number):\n\n self._funding_account_account_number = funding_account_account_number", "def account_number(self, account_number):\n\n self._account_number = account_number", "def business_phone_number(self, business_phone_number):\n\n...
[ "0.6880107", "0.5692706", "0.559265", "0.54221827", "0.53995097", "0.53400546", "0.51918113", "0.49915436", "0.49777344", "0.48777074", "0.4852884", "0.48452345", "0.48309794", "0.48295087", "0.48261392", "0.48261392", "0.48261392", "0.48261392", "0.48200414", "0.48077908", "...
0.8870168
0
Sets the funding_account_account_number of this PayorV1.
def funding_account_account_number(self, funding_account_account_number): self._funding_account_account_number = funding_account_account_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def funding_account_account_name(self, funding_account_account_name):\n\n self._funding_account_account_name = funding_account_account_name", "def account_number(self, account_number):\n\n self._account_number = account_number", "def funding_account_routing_number(self, funding_account_routing_nu...
[ "0.75032413", "0.71144485", "0.67067826", "0.6625295", "0.6614265", "0.64627105", "0.62555176", "0.60974365", "0.60974365", "0.6025871", "0.58473986", "0.58305347", "0.5771254", "0.5722951", "0.56920105", "0.56828403", "0.5615841", "0.5615841", "0.5615841", "0.5615841", "0.56...
0.87810177
0
Sets the funding_account_account_name of this PayorV1.
def funding_account_account_name(self, funding_account_account_name): self._funding_account_account_name = funding_account_account_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def account_name(self, account_name):\n\n self._account_name = account_name", "def account_name(self, account_name):\n\n self._account_name = account_name", "def account_name(self, account_name):\n if account_name is None:\n raise ValueError(\"Invalid value for `account_name`, m...
[ "0.73881924", "0.73881924", "0.71534306", "0.69642144", "0.63179857", "0.6275674", "0.60105515", "0.5957612", "0.5901144", "0.5821598", "0.5814455", "0.5794503", "0.5764635", "0.57026356", "0.560097", "0.54965055", "0.54769254", "0.5460772", "0.5460772", "0.5460772", "0.54607...
0.878634
0
Sets the manual_lockout of this PayorV1.
def manual_lockout(self, manual_lockout): self._manual_lockout = manual_lockout
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def door_unlock(self, delay):\n self.send_command(cmd=DEFS.CMD_UNLOCK, data=struct.pack('<I', delay))\n self.recv_reply()", "def f_unlock(self):\n self._locked = False", "def force_unlock():\r\n global timeout_before_override\r\n timeout_backup = timeout_before_override\r\n timeou...
[ "0.5701152", "0.56926244", "0.5505024", "0.54779047", "0.5424242", "0.53772455", "0.53644836", "0.52131414", "0.5207312", "0.5173328", "0.5153729", "0.5128545", "0.51212317", "0.50903", "0.50903", "0.507624", "0.50645363", "0.5045414", "0.5038615", "0.49915093", "0.49891204",...
0.8568033
0
Sets the payee_grace_period_processing_enabled of this PayorV1.
def payee_grace_period_processing_enabled(self, payee_grace_period_processing_enabled): self._payee_grace_period_processing_enabled = payee_grace_period_processing_enabled
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def payee_grace_period_days(self, payee_grace_period_days):\n\n self._payee_grace_period_days = payee_grace_period_days", "def charge_recurring(self, grace_period=None):\n pass", "def grace_period(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"grace_period\")", "def gr...
[ "0.66259366", "0.48222676", "0.48089108", "0.48089108", "0.48089108", "0.48089108", "0.4743078", "0.47321197", "0.47321197", "0.4706583", "0.45939893", "0.45867842", "0.45271042", "0.44113725", "0.44113725", "0.4318995", "0.42700022", "0.4205203", "0.40889862", "0.4083876", "...
0.89865565
0
Sets the payee_grace_period_days of this PayorV1.
def payee_grace_period_days(self, payee_grace_period_days): self._payee_grace_period_days = payee_grace_period_days
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def payee_grace_period_processing_enabled(self, payee_grace_period_processing_enabled):\n\n self._payee_grace_period_processing_enabled = payee_grace_period_processing_enabled", "def delete_grace_period(course_key, user):\r\n descriptor = modulestore('direct').get_course(course_key)\r\n\r\n ...
[ "0.58535814", "0.4963054", "0.49036047", "0.49036047", "0.49036047", "0.49036047", "0.48728707", "0.4862558", "0.4862558", "0.4747155", "0.47440302", "0.47440302", "0.4737978", "0.45983976", "0.45415044", "0.45279464", "0.441735", "0.43994328", "0.43237093", "0.4294724", "0.4...
0.89652497
0
Sets the reminder_emails_opt_out of this PayorV1.
def reminder_emails_opt_out(self, reminder_emails_opt_out): self._reminder_emails_opt_out = reminder_emails_opt_out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disable_emails(self, disable_emails):\n\n self._disable_emails = disable_emails", "def change_email_settings(request):\r\n user = request.user\r\n\r\n course_id = request.POST.get(\"course_id\")\r\n course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id)\r\n receive_emails =...
[ "0.5807515", "0.55776596", "0.53989935", "0.5275582", "0.5179341", "0.5179341", "0.51339", "0.51292616", "0.5036423", "0.4972134", "0.4972134", "0.48938823", "0.48462263", "0.47982708", "0.47901762", "0.46857128", "0.46672958", "0.46612996", "0.46229532", "0.46209982", "0.459...
0.9000681
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, PayorV1): 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.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
Calculates Mean Absolute Error (MAE).
def calc_mae(y: np.ndarray, y_hat: np.ndarray) -> float: return np.mean(np.abs(y - y_hat))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_MAE(e):\n\n return np.mean(np.abs(e))", "def calculate_mae(e):\n return np.mean(np.abs(e))", "def compute_mae(e):\n return np.mean(np.abs(e))", "def mae(t, y):\n\treturn mean_absolute_error(t, y)", "def evaluate_mae(y_true, y_pred):\n\n mae_eval = mean_absolute_error(y_true, y_pred)...
[ "0.8718821", "0.85836166", "0.8438701", "0.77336985", "0.7544971", "0.75055325", "0.72205764", "0.7173563", "0.71522987", "0.7151292", "0.7019276", "0.69663084", "0.68051916", "0.67219645", "0.6649685", "0.6609578", "0.6609578", "0.6591694", "0.6586305", "0.65788233", "0.6564...
0.72506326
6
Calculates Mean Absolute Percent Error (MAPE).
def calc_mape(y: np.ndarray, y_hat: np.ndarray) -> float: perc_err = (100*(y - y_hat))/y return np.mean(np.abs(perc_err))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mape(actual: np.ndarray, predicted: np.ndarray):\n return np.mean(np.abs(_percentage_error(actual, predicted)))", "def calculate_mae(e):\n return np.mean(np.abs(e))", "def compute_MAE(e):\n\n return np.mean(np.abs(e))", "def compute_mae(e):\n return np.mean(np.abs(e))", "def mean_absolute_p...
[ "0.75342137", "0.74545497", "0.7414745", "0.7323534", "0.70200163", "0.6871825", "0.6868987", "0.6786182", "0.6751182", "0.67390716", "0.6738578", "0.67343223", "0.6719688", "0.6661018", "0.6657157", "0.66214347", "0.6614511", "0.6569917", "0.655968", "0.65446645", "0.6527636...
0.72959256
4
Returns string containing the organization of the issuer or subject
def get_organization(self): return self.reference[REF_ORGANIZATION][REF_VALUE]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_urn(self):\n return f\"psc:org:{self.credentials.org_key}\"", "def organization_name(self):\n if self.organization is not None:\n return self.organization.name\n\n return ''", "def issuer(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"issuer\")", "def ...
[ "0.7208062", "0.7111981", "0.7076489", "0.70501924", "0.6814553", "0.6784478", "0.67168474", "0.6688398", "0.6680084", "0.6613211", "0.6582595", "0.65641916", "0.6516042", "0.6516042", "0.65090615", "0.64037406", "0.6385013", "0.6345938", "0.6342618", "0.63391626", "0.6324698...
0.7063677
3
Returns string containing the email of the issuer or subject
def get_email(self): return self.reference[REF_EMAIL_ADDRESS][REF_VALUE]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def email(self) -> str:\n return pulumi.get(self, \"email\")", "def email(self) -> str:\n return pulumi.get(self, \"email\")", "def email(self) -> str:\n return pulumi.get(self, \"email\")", "def issuer(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"issuer\")", "def is...
[ "0.73019487", "0.73019487", "0.73019487", "0.72025603", "0.71583205", "0.71215004", "0.7088522", "0.70780873", "0.70780873", "0.70780873", "0.70780873", "0.7045777", "0.6983743", "0.68862295", "0.6874981", "0.67854977", "0.67769545", "0.67604405", "0.6751657", "0.6750814", "0...
0.68041015
15
Function to softmax output values.
def softmax(oSums): result = np.zeros(shape=[len(oSums)], dtype=np.float32) m = max(oSums) divisor = 0.0 for k in range(len(oSums)): divisor += math.exp(oSums[k] - m) for k in range(len(result)): result[k] = math.exp(oSums[k] - m) / divisor return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def softmax(x):\n \"\"\"\"\"\"\n return exp(x) / sum(exp(x), axis=0)", "def softmax(x): \n e_x = np.exp(x - np.max(x)) \n return e_x / e_x.sum()", "def softmax(x):\n e_x = np.exp(x - np.max(x))\n return e_x / e_x.sum(axis=0)", "def softmax(values):\n ...
[ "0.83309054", "0.8317747", "0.829802", "0.82978904", "0.82652503", "0.8221267", "0.8221267", "0.8218964", "0.82160187", "0.82160187", "0.8205934", "0.8205934", "0.82025796", "0.8198203", "0.81870097", "0.8172021", "0.8172021", "0.8172021", "0.8172021", "0.8172021", "0.8172021...
0.0
-1
Binary Search Tree This is the main class for the binary search tree. Every node is initialized with a value (required as parameter) and with left and right nodes as None.
def __init__(self, value): self.value = value self.left = None self.right = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, value: object) -> None:\n self.value = value # to store node's data\n self.left = None # pointer to root of left subtree\n self.right = None # pointer to root of right subtree", "def __init__(self, value: object) -> None:\n self.value =...
[ "0.7826072", "0.7826072", "0.7747387", "0.7655006", "0.7349176", "0.73194087", "0.72852015", "0.7281503", "0.72293556", "0.722295", "0.722295", "0.7137702", "0.711475", "0.710441", "0.7087449", "0.70194036", "0.696607", "0.69336766", "0.6929373", "0.69103885", "0.6905661", ...
0.77583057
3
The name of the process, used mainly for debugging.
def name(self): return self.__name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_process_name(self):\n\n return self._args.t", "def name(self):\n # This is how PIDs 0 and 4 are always represented in taskmgr\n # and process-hacker.\n if self.pid == 0:\n return \"System Idle Process\"\n if self.pid == 4:\n return \"System\"\n ...
[ "0.8568027", "0.7876318", "0.7381887", "0.7363172", "0.7359385", "0.7306131", "0.720444", "0.7176244", "0.71734023", "0.70283014", "0.68915474", "0.68846655", "0.6834126", "0.67779416", "0.6772353", "0.6736372", "0.67317796", "0.6730247", "0.6730247", "0.6726631", "0.6711542"...
0.0
-1
The time when the process was introduced / created.
def introduction_time(self) -> int: return self.__introduction_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_created(self) -> str:\n return pulumi.get(self, \"time_created\")", "def time_created(self) -> str:\n return pulumi.get(self, \"time_created\")", "def time_created(self) -> str:\n return pulumi.get(self, \"time_created\")", "def create_time(self):\n return self._create_ti...
[ "0.76302326", "0.76302326", "0.76302326", "0.75405246", "0.75405246", "0.75405246", "0.7483395", "0.7483395", "0.74617386", "0.74617386", "0.74617386", "0.74617386", "0.74617386", "0.74617386", "0.74617386", "0.74617386", "0.74617386", "0.74617386", "0.74617386", "0.74617386", ...
0.0
-1
Returns the next known start time of the process that is later than the current time.
def get_next_known_start_time(self, current_time): raise NotImplementedError()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_next_known_activation_time(self, current_time):\n if self.state in (Process.SLEEPING, Process.WAITING):\n if self.suspended_until is not None and self.suspended_until > current_time:\n return self.suspended_until\n else:\n return None\n else...
[ "0.71737796", "0.65457976", "0.6538598", "0.650583", "0.650583", "0.63778317", "0.6309486", "0.62815076", "0.6238292", "0.6169901", "0.6147242", "0.6147242", "0.6137489", "0.61165", "0.6112455", "0.6112455", "0.607195", "0.60330987", "0.6029764", "0.60037893", "0.5974186", ...
0.73748016
0
Gets the id of this PipelineDefinition.
def id(self) -> str: return self._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def id(self) -> str:\n return self._pipeline_definition.get(\"id\")", "def pipeline_id(self) -> PipelineId:\r\n return self._pipeline_id", "def pipeline_id(self) -> PipelineId:\r\n return self._pipeline_id", "def pipeline_id(self):\n return self._pipeline_id", "def pipeline_id(s...
[ "0.8302719", "0.76591474", "0.76591474", "0.73328024", "0.6987881", "0.6767791", "0.6655542", "0.66166955", "0.6569898", "0.6569898", "0.6569898", "0.6569898", "0.6569898", "0.6569898", "0.65418833", "0.65126777", "0.65126777", "0.64920515", "0.64920515", "0.64920515", "0.649...
0.0
-1
Sets the id of this PipelineDefinition.
def id(self, id: str): 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):\n self.data['id'] = id", "def SetId(self, id):\n self.id = int(id)", "def set_id(self, id_=None):\n if id_ is None:\n self.id = id(self)\n else:\...
[ "0.7094438", "0.70793575", "0.70047617", "0.68297213", "0.679057", "0.6693951", "0.6693951", "0.66840315", "0.6668349", "0.6667876", "0.6667876", "0.6667876", "0.6590996", "0.6590996", "0.6590996", "0.6590996", "0.6546957", "0.65249383", "0.65249383", "0.65249383", "0.6524938...
0.6406037
46
Gets the job of this PipelineDefinition.
def job(self) -> str: return self._job
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def job(self):\n return self.batch[self.job_id]", "def job(self):\n\n if self.current_bead is None:\n return None\n\n if self.jobs is None:\n RosProxy().notify(\"Can not find jobs.\", STATE.ERROR)\n return None\n\n _job = None\n for job in self....
[ "0.79181683", "0.78297883", "0.7652419", "0.7131362", "0.710709", "0.7100101", "0.7019288", "0.6962839", "0.6886126", "0.6872765", "0.68580294", "0.68414134", "0.6748054", "0.6680782", "0.66614974", "0.664935", "0.6594653", "0.65943813", "0.6571922", "0.653828", "0.6503799", ...
0.7187537
3
Gets the version of this PipelineDefinition.
def version(self) -> str: return self._version
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def schema_version(self) -> str:\n return self._pipeline_definition.get(\"version\")", "def get_version(self):\n return self._version", "def get_version(self):\n return self._version", "def get_version(self):\n return self.version", "def get_version(self):\n return versio...
[ "0.8007929", "0.7582612", "0.7582612", "0.75405353", "0.74795246", "0.74795246", "0.743001", "0.74150413", "0.7414735", "0.7406148", "0.73891497", "0.73891497", "0.73891497", "0.73891497", "0.73891497", "0.73891497", "0.73891497", "0.73891497", "0.73891497", "0.73891497", "0....
0.70234734
39
Gets the name of this PipelineDefinition.
def name(self) -> str: return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pipeline_name(self) -> typing.Optional[str]:\n return self._values.get(\"pipeline_name\")", "def pipeline_stack_name(self) -> str:\n return self._values.get(\"pipeline_stack_name\")", "def unique_pipeline_name(self):\n return self._unique_pipeline_name", "def name(self):\n ret...
[ "0.73616374", "0.71854097", "0.71008766", "0.7092869", "0.7079408", "0.707929", "0.70766884", "0.70766884", "0.70766884", "0.70702976", "0.7064148", "0.7064148", "0.7064148", "0.70420253", "0.70420253", "0.70420253", "0.70420253", "0.70420253", "0.70420253", "0.70420253", "0....
0.7014503
61
Sets the name of this PipelineDefinition.
def name(self, name: str): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, name):\n self.__name = name", "def set_name(self, name):\n self.__name = name", "def set_name(self, name):\n self._name = name", "def set_name(self, name: str):\n self._name = name", "def set_name(self, _name):\n self.name = _name", "def set_name(self...
[ "0.74731845", "0.74731845", "0.74434304", "0.74313897", "0.7371164", "0.7362817", "0.7355426", "0.73513126", "0.73513126", "0.73513126", "0.73513126", "0.73513126", "0.73307556", "0.7281537", "0.7275859", "0.72383726", "0.72216463", "0.72059166", "0.72059166", "0.71684945", "...
0.6973241
41
Gets the status of this PipelineDefinition.
def status(self) -> str: return self._status
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getStatus(self):\n return self.__status", "def getStatus(self):\n return self._status", "def status(self) -> pulumi.Output['outputs.JobStatus']:\n return pulumi.get(self, \"status\")", "def get_status(self):\n return self._status", "def status(self):\n\n return self._...
[ "0.7325867", "0.7319872", "0.7296943", "0.72174495", "0.717716", "0.717716", "0.717716", "0.7138564", "0.7138564", "0.7138564", "0.7112205", "0.7112205", "0.7112205", "0.7112205", "0.7112205", "0.7112205", "0.7112205", "0.7112205", "0.7112205", "0.7112205", "0.7112205", "0....
0.0
-1
Sets the status of this PipelineDefinition.
def status(self, status: str): self._status = status
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_status(self, status: JobStatus, pipeline: Optional['Pipeline'] = None) -> None:\n self._status = status\n connection: 'Redis' = pipeline if pipeline is not None else self.connection\n connection.hset(self.key, 'status', self._status)", "def set_status(self, status):\n self.sta...
[ "0.72480935", "0.7142644", "0.7142644", "0.7142644", "0.711632", "0.70518744", "0.70065457", "0.6820144", "0.6791966", "0.674742", "0.67376614", "0.67376614", "0.67376614", "0.67376614", "0.67376614", "0.67376614", "0.67376614", "0.67376614", "0.67376614", "0.67376614", "0.67...
0.65736616
42
Gets the message of this PipelineDefinition.
def message(self) -> str: return self._message
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_message (self) :\n return self._message", "def get_message(self):\n return self.message", "def get_message(self):\n return self.message", "def _get_message(self):\n return self.__message", "def message(self):\n \n return(self.__message)", "def message(sel...
[ "0.77600425", "0.7622223", "0.7622223", "0.761053", "0.76061046", "0.76061046", "0.76061046", "0.76061046", "0.76061046", "0.76061046", "0.7592087", "0.7576966", "0.7484424", "0.7484424", "0.7484424", "0.7484424", "0.7484424", "0.7463944", "0.7463944", "0.7463944", "0.7456543...
0.7161395
37
Sets the message of this PipelineDefinition.
def message(self, message: str): self._message = message
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_message(self, value):\n self.__message = value", "def setMessage(self, message):\n self._message = message", "def message(self, message):\n self._message = message", "def message(self, message):\n self._message = message", "def message(self, message):\n\n self._m...
[ "0.75298643", "0.73980016", "0.7096324", "0.7096324", "0.7037648", "0.7037648", "0.7037648", "0.7037648", "0.7037648", "0.7037648", "0.7037648", "0.7037648", "0.69550866", "0.69488287", "0.69288653", "0.68697226", "0.68198174", "0.6714724", "0.6638104", "0.66079134", "0.65752...
0.6938177
14
Gets the completion_time of this PipelineDefinition.
def completion_time(self) -> datetime: return self._completion_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def completion_time(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"completion_time\")", "def completion_time(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"completion_time\")", "def last_completion_time(self) -> float:\n return self._last_completion_ti...
[ "0.78471494", "0.78471494", "0.72959805", "0.7145048", "0.67873794", "0.64880455", "0.64852744", "0.64364386", "0.63926834", "0.63926834", "0.6317047", "0.6298877", "0.629586", "0.62631494", "0.6257636", "0.62541485", "0.6223915", "0.6220111", "0.62187344", "0.62187344", "0.6...
0.820775
0
Sets the completion_time of this PipelineDefinition.
def completion_time(self, completion_time: datetime): self._completion_time = completion_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def completion_time(self) -> datetime:\n return self._completion_time", "def finish_time(self, finish_time):\n\n self._finish_time = finish_time", "def finish_time(self, finish_time):\n\n self._finish_time = finish_time", "def finish_time(self, finish_time):\n\n self._finish_time ...
[ "0.634808", "0.63433826", "0.63433826", "0.63433826", "0.61501217", "0.5967187", "0.59086436", "0.5907479", "0.5907479", "0.5784306", "0.57203007", "0.56642324", "0.5612889", "0.5601048", "0.5566239", "0.5566239", "0.5566239", "0.5566239", "0.5566239", "0.55057436", "0.549884...
0.8397433
0
Returns reference start time of measurements
def get_ref_time(self): from datetime import datetime, timedelta ref_time = datetime(2010, 1, 1, 0, 0, 0) ref_time += timedelta(seconds=int(self.fid['/PRODUCT/time'][0])) return ref_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def startTime(self) -> float:\n try: return self.times[0]\n except IndexError: return 0.0", "def start_time(self) -> float:\r\n ...", "def start_time(self):\n return RPR.GetAudioAccessorStartTime(self.id)", "def min_time(self):\n #{{{ function to return time of first sample\n\n...
[ "0.75119007", "0.74680257", "0.7448813", "0.72745", "0.7237121", "0.7215591", "0.7210783", "0.71771395", "0.71344805", "0.7118216", "0.7091196", "0.704252", "0.70335746", "0.7012827", "0.7011436", "0.7001905", "0.69441384", "0.69025576", "0.69014984", "0.690063", "0.6889564",...
0.6795699
38
Adds noise to the pointcloud. For every point n in the point cloud, we return a new point sampled from a gaussian centered in n and with isotropic covariance stddev.
def add_noise(pointcloud, stddev=0.01): result = pointcloud result[0:2, :] = np.random.normal(pointcloud[0:2, :], stddev) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sample_new_observations(self, point, n_samples, random_seed=None):\n\n if random_seed is not None:\n np.random.seed(random_seed)\n\n posterior_parameters = self.compute_posterior_parameters(point)\n mean = posterior_parameters['mean']\n var = posterior_parameters['cov']\n...
[ "0.7149916", "0.6772249", "0.6618812", "0.65509987", "0.6486856", "0.63938916", "0.6365274", "0.6340059", "0.63180757", "0.6285348", "0.6226938", "0.62060875", "0.6204843", "0.61729354", "0.61727405", "0.6172375", "0.61392367", "0.6134273", "0.61137295", "0.6089325", "0.60860...
0.8075141
0
Checks whether the cached values for the given domain and language expired. Before you call this method, you have to ensure that there are cached values for the given domain and language.
def is_cache_outdated(self, domain, language): return self.is_outdated(self.domain_cache[domain][language]['update'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def invalidate_caches_if_necessary(sender, **kwargs):\n\n # Check for any necessary invalidations\n keys = { _language_invalidation_key(x): x for x in map(lambda x: x[0], settings.LANGUAGES) }\n for k, v in cache.get_many(keys.keys()).items():\n # If the time invalidated is greater than the time we...
[ "0.63667095", "0.6303817", "0.61651474", "0.61516696", "0.6111825", "0.6071183", "0.60683006", "0.6063873", "0.6060407", "0.60112154", "0.6009345", "0.5994494", "0.59919256", "0.599043", "0.5947974", "0.58699137", "0.586247", "0.58600485", "0.58584154", "0.58516943", "0.58473...
0.72786856
0
Tests that when there are no control_points in the spline, a ValueError is raised.
def test_bspline_no_points_given() -> None: with pytest.raises(ValueError): BSplineCurve(np.array([]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_invalid_grid_values_less_than_1(self):\n self.assertRaises(ValueError, splines.Spline.__init__, splines.Spline,\n np.array([-0.1, 0.5, 0.9]), np.array([1, 2, 3, 4]))", "def test_invalid_grid_values_non_ascending(self):\n self.assertRaises(ValueError, splines.Spline...
[ "0.6862795", "0.685714", "0.67331636", "0.63119876", "0.6241843", "0.6241201", "0.6185283", "0.60802424", "0.6068685", "0.6026746", "0.5969342", "0.59453547", "0.5925668", "0.5906497", "0.59017175", "0.5856611", "0.5848129", "0.58122706", "0.5809007", "0.5786393", "0.5759765"...
0.7210145
0
Tests that a nonunit length bspline has its parameter go up to the number of segments of the bspline.
def test_non_unit_length_bspline_radius() -> None: # a multi-displacement b-spline with length=4.0 control_points = np.array( [ (0.0, 0.0, 0.0), (2.0, 0.0, 0.0), (2.0, 1.0, 0.0), (2.0, 1.0, 1.0), ] ) curve = BSplineCurve(control_points) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_multi_segment_non_axis_aligned_bspline_radius() -> None:\n # a length=1.0 3-segment b-spline that isn't axis aligned. Each\n # segment is length=1/3.\n control_points = np.array(\n [\n (0.0, 0.0, 0.0),\n (-1 / 12 * (2 + 2 ** 0.5), 1 / 12 * (2 - 2 ** 0.5), 1 / 6),\n ...
[ "0.62120944", "0.6207528", "0.61624837", "0.6050851", "0.5997233", "0.5976955", "0.594966", "0.59452546", "0.59130085", "0.5906222", "0.588441", "0.5802465", "0.57929", "0.57342", "0.5701176", "0.5687711", "0.5677765", "0.5670487", "0.56679994", "0.56483513", "0.5611913", "...
0.58786494
11
Tests that a nonunit length bspline has its parameter go up to the number of segments of the bspline.
def test_non_unit_length_bspline_first_derivative() -> None: # a multi-displacement b-spline with length=4.0 control_points = np.array( [ (0.0, 0.0, 0.0), (2.0, 0.0, 0.0), (2.0, 1.0, 0.0), (2.0, 1.0, 1.0), ] ) curve = BSplineCurve(control_p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_multi_segment_non_axis_aligned_bspline_radius() -> None:\n # a length=1.0 3-segment b-spline that isn't axis aligned. Each\n # segment is length=1/3.\n control_points = np.array(\n [\n (0.0, 0.0, 0.0),\n (-1 / 12 * (2 + 2 ** 0.5), 1 / 12 * (2 - 2 ** 0.5), 1 / 6),\n ...
[ "0.62117255", "0.62069565", "0.6161795", "0.6052216", "0.59771967", "0.5950327", "0.59452647", "0.5912312", "0.5906749", "0.5884653", "0.58785313", "0.5803312", "0.57932514", "0.57376856", "0.5700694", "0.56876546", "0.56788284", "0.5671832", "0.56671816", "0.56500226", "0.56...
0.59965396
4
Tests that a nonunit length bspline has its parameter go up to the number of segments of the bspline.
def test_non_unit_length_bspline_second_derivative() -> None: # a multi-displacement b-spline with length=4.0 control_points = np.array( [ (0.0, 0.0, 0.0), (2.0, 0.0, 0.0), (2.0, 1.0, 0.0), (2.0, 1.0, 1.0), ] ) curve = BSplineCurve(control_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_multi_segment_non_axis_aligned_bspline_radius() -> None:\n # a length=1.0 3-segment b-spline that isn't axis aligned. Each\n # segment is length=1/3.\n control_points = np.array(\n [\n (0.0, 0.0, 0.0),\n (-1 / 12 * (2 + 2 ** 0.5), 1 / 12 * (2 - 2 ** 0.5), 1 / 6),\n ...
[ "0.6211701", "0.62072957", "0.6162065", "0.60521215", "0.59963864", "0.5975972", "0.59495836", "0.59446657", "0.5905508", "0.58851844", "0.58775914", "0.5802016", "0.579172", "0.5736016", "0.5700935", "0.5687125", "0.5677384", "0.5671923", "0.56655496", "0.5649768", "0.561101...
0.5912095
8
Tests that a nonunit length bspline has its parameter go up to the number of segments of the bspline.
def test_non_unit_length_bspline_third_derivative() -> None: # a multi-displacement b-spline with length=4.0 control_points = np.array( [ (0.0, 0.0, 0.0), (2.0, 0.0, 0.0), (2.0, 1.0, 0.0), (2.0, 1.0, 1.0), ] ) curve = BSplineCurve(control_p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_multi_segment_non_axis_aligned_bspline_radius() -> None:\n # a length=1.0 3-segment b-spline that isn't axis aligned. Each\n # segment is length=1/3.\n control_points = np.array(\n [\n (0.0, 0.0, 0.0),\n (-1 / 12 * (2 + 2 ** 0.5), 1 / 12 * (2 - 2 ** 0.5), 1 / 6),\n ...
[ "0.6212112", "0.62080157", "0.6162611", "0.6051323", "0.5996946", "0.5976906", "0.59503496", "0.591238", "0.5905873", "0.5884315", "0.58778006", "0.5802442", "0.5792494", "0.57356286", "0.57010245", "0.568764", "0.56780005", "0.5670657", "0.5666851", "0.56486976", "0.56121767...
0.5944566
7
Creates a pandas DataFrame from the all_holdings list of dictionaries. Creates a returns stream and normalizes the equity curve to be percentagebased. Thus, initial account size is 1.0, as opposed to the absolute dollar amount.
def create_equity_curve_dataframe(self): # returns the cumulative product for percent change over every timestamp in the index curve = pd.DataFrame(self.all_holdings) curve.set_index('datetime', inplace=True) curve['returns'] = curve['total'].pct_change() #curve['equity_curve'] =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _construct_all_holdings(self):\n d = dict((s, 0.0) for s in self.symbol_list)\n d['datetime'] = self.backtest_date\n d['cash'] = self.initial_capital\n d['commission'] = 0.0\n d['total'] = self.initial_capital\n d['buy_times'] = 0\n d['sell_times'] = 0\n ...
[ "0.6518125", "0.64987063", "0.64987063", "0.6132095", "0.6132095", "0.6053807", "0.5899172", "0.5812591", "0.57502925", "0.57439005", "0.54652596", "0.54619974", "0.5456973", "0.544827", "0.52925646", "0.52881396", "0.5266654", "0.52658826", "0.52419686", "0.5222863", "0.5179...
0.57409686
10
Creates a pandas DataFrame from the all_holdings list of dictionaries. Creates a returns stream and normalizes the equity curve to be percentagebased. Thus, initial account size is 1.0, as opposed to the absolute dollar amount.
def create_equity_curve_dataframe(self): # returns the cumulative product for percent change over every timestamp in the index curve = pd.DataFrame(self.all_holdings) curve.set_index('datetime', inplace=True) curve['returns'] = curve['total'].pct_change() #curve['equity_curve'] =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _construct_all_holdings(self):\n d = dict((s, 0.0) for s in self.symbol_list)\n d['datetime'] = self.backtest_date\n d['cash'] = self.initial_capital\n d['commission'] = 0.0\n d['total'] = self.initial_capital\n d['buy_times'] = 0\n d['sell_times'] = 0\n ...
[ "0.6518125", "0.64987063", "0.64987063", "0.6132095", "0.6132095", "0.6053807", "0.5899172", "0.5812591", "0.57502925", "0.57409686", "0.54652596", "0.54619974", "0.5456973", "0.544827", "0.52925646", "0.52881396", "0.5266654", "0.52658826", "0.52419686", "0.5222863", "0.5179...
0.57439005
9
Initialize the weights of the recurrent model
def init_hidden(self): if isinstance(self.rnn, nn.GRU) or isinstance(self.rnn, nn.RNN): return torch.zeros(self.num_directions * self.num_layers, 1, self.hidden_size, device=device) elif isinstance(self.rnn, nn.LSTM): return (torch.zeros(self.num_directions * self.num_layers, 1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_weights(model):\n ...", "def init_weights(self):\n # Initialize weights\n self.apply(self._init_weights)", "def _initialize_weights(self):\n pass", "def init_weights(self):\n self._q_neuron.h(self._weights) \n self._q_neuron.x(self._weights)", "def init_we...
[ "0.8338346", "0.8224569", "0.8132384", "0.806974", "0.8064683", "0.7987769", "0.79154414", "0.79140365", "0.79114634", "0.78817904", "0.78817904", "0.78817904", "0.7845224", "0.78087133", "0.7794658", "0.77131665", "0.77131665", "0.7693593", "0.76428246", "0.76239896", "0.761...
0.0
-1
Initialize the weights of the recurrent model
def init_hidden(self): if isinstance(self.rnn, nn.GRU): return torch.zeros(self.num_directions * self.num_layers, 1, self.hidden_size, device=device) elif isinstance(self.rnn, nn.LSTM): return (torch.zeros(self.num_directions * self.num_layers, 1, self.hidden_size, device=device)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_weights(model):\n ...", "def init_weights(self):\n # Initialize weights\n self.apply(self._init_weights)", "def _initialize_weights(self):\n pass", "def init_weights(self):\n self._q_neuron.h(self._weights) \n self._q_neuron.x(self._weights)", "def init_we...
[ "0.8338346", "0.8224569", "0.8132384", "0.806974", "0.8064683", "0.7987769", "0.79154414", "0.79140365", "0.79114634", "0.78817904", "0.78817904", "0.78817904", "0.7845224", "0.78087133", "0.7794658", "0.77131665", "0.77131665", "0.7693593", "0.76428246", "0.76239896", "0.761...
0.0
-1
Forward pass through RNN based decoder
def forward(self, input, hidden): embedded = self.embedding(input).view(1, 1, -1) output = F.relu(embedded) output, hidden = self.rnn(output, hidden) output = self.softmax(self.out(output[0])) return output, hidden
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self, trg_embed, encoder_hidden, encoder_final, \n src_mask, trg_mask, hidden=None, max_len=None):\n \n # the maximum number of steps to unroll the RNN\n #print(\"czw src mask\", src_mask.size())\n #print(\"czw trg embed\", trg...
[ "0.71793747", "0.67865217", "0.6750573", "0.6742852", "0.6716031", "0.67155707", "0.6595728", "0.6572298", "0.6564318", "0.655776", "0.65356886", "0.6501583", "0.64964455", "0.6490973", "0.649055", "0.64765185", "0.6422618", "0.64000434", "0.6394515", "0.6393933", "0.6385249"...
0.62092113
54
Initialize the weights of the recurrent model
def init_hidden(self): if isinstance(self.rnn, nn.GRU) or isinstance(self.rnn, nn.RNN): return torch.zeros(self.num_directions * self.num_layers, 1, self.hidden_size, device=device) elif isinstance(self.rnn, nn.LSTM): return (torch.zeros(self.num_directions * self.num_layers, 1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_weights(model):\n ...", "def init_weights(self):\n # Initialize weights\n self.apply(self._init_weights)", "def _initialize_weights(self):\n pass", "def init_weights(self):\n self._q_neuron.h(self._weights) \n self._q_neuron.x(self._weights)", "def init_we...
[ "0.8338346", "0.8224569", "0.8132384", "0.806974", "0.8064683", "0.7987769", "0.79154414", "0.79140365", "0.79114634", "0.78817904", "0.78817904", "0.78817904", "0.7845224", "0.78087133", "0.7794658", "0.77131665", "0.77131665", "0.7693593", "0.76428246", "0.76239896", "0.761...
0.0
-1
Forward pass through attention decoder
def forward(self, input, hidden, encoder_outputs): embedded = self.embedding(input).view(1, 1, -1) embedded = self.dropout(embedded) # attn_weights = F.softmax(self.attn(torch.cat((embedded[0], hidden[0]), 1)), dim=1) attn_state = hidden[0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self, input):\n x = self.emb(input)\n output = self.attention(x)\n # print(\"Idggfghrf \", output.size())\n return output", "def forward( self, target, encoder_output, attention_mask ):\n x = target\n for layer in self.decoder_layers:\n x = layer( ...
[ "0.7387319", "0.7179627", "0.70960534", "0.7084376", "0.708437", "0.7082512", "0.695077", "0.6824018", "0.6802872", "0.6768741", "0.671523", "0.66622066", "0.6627993", "0.6603511", "0.6593991", "0.65829796", "0.6573563", "0.6567262", "0.65636027", "0.65430355", "0.6532642", ...
0.6172629
54
Initialize the weights of the recurrent model
def init_hidden(self): if isinstance(self.rnn, nn.GRU): return torch.zeros(self.num_directions * self.num_layers, 1, self.hidden_size, device=device) elif isinstance(self.rnn, nn.LSTM): return (torch.zeros(self.num_directions * self.num_layers, 1, self.hidden_size, device=device)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_weights(model):\n ...", "def init_weights(self):\n # Initialize weights\n self.apply(self._init_weights)", "def _initialize_weights(self):\n pass", "def init_weights(self):\n self._q_neuron.h(self._weights) \n self._q_neuron.x(self._weights)", "def init_we...
[ "0.8338346", "0.8224569", "0.8132384", "0.806974", "0.8064683", "0.7987769", "0.79154414", "0.79140365", "0.79114634", "0.78817904", "0.78817904", "0.78817904", "0.7845224", "0.78087133", "0.7794658", "0.77131665", "0.77131665", "0.7693593", "0.76428246", "0.76239896", "0.761...
0.0
-1
Clears the social distancing function of the model and all its agents for pickling
def clear_social_distancing_func(self): self.social_distancing_func = None for agent in self.grid.get_all_cell_contents(): agent.social_distancing_func = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear(self):\n self.sum_hit_at_one = 0.0\n self.sum_perr = 0.0\n self.sum_loss = 0.0\n self.map_calculator.clear()\n self.global_ap_calculator.clear()\n self.num_examples = 0", "def _clear_state(self):\n if hasattr(self, 'estimators_'):\n self.estimators_ = np.empty((0, 0)...
[ "0.67340225", "0.6640129", "0.6602608", "0.65433407", "0.6540731", "0.6495879", "0.64885485", "0.64474887", "0.6384358", "0.63661957", "0.63501775", "0.634676", "0.63357806", "0.6331055", "0.63253343", "0.6324515", "0.6311783", "0.63087803", "0.63084924", "0.62998295", "0.629...
0.71531135
0
Boolean numpy array of active board, channel combinations. Shape = (13, 8) 13 boards and 8 channels
def active_brdch(self): return self._faux._active_brdch.copy()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def possibilities(board):\n return board[np.where(board == 0)]", "def getBooleanArray2D(self) -> typing.List[typing.List[bool]]:\n ...", "def available_combinations(self):\n result = []\n\n for i in range(3):\n for j in range(3):\n if self.board[i][j] == 0:\n ...
[ "0.61384374", "0.5767436", "0.57551336", "0.5737518", "0.57345146", "0.57080257", "0.56419057", "0.5618275", "0.5569301", "0.5551517", "0.55450714", "0.55234545", "0.55117565", "0.5499993", "0.54848176", "0.5452511", "0.5450796", "0.5445584", "0.5445584", "0.5394048", "0.5370...
0.0
-1
Reads source and target sequences from txt files.
def __init__(self, val_file, name, src_word2id, trg_word2id, intent_type=None, intent2index=None): self.val_file = val_file self.name = name # the name of json dialogue self.src_word2id = src_word2id self.trg_word2id = trg_word2id self.intent2index = intent2index self.int...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_examples(source_file, target_file):\n sources = []\n targets = []\n\n with gfile.GFile(source_file, \"r\") as txt_file:\n for line in txt_file:\n sources.append(line.rstrip(\"\\n\"))\n\n with gfile.GFile(target_file, \"r\") as txt_file:\n for line in txt_file:\n targets.append(line.rst...
[ "0.7004173", "0.62104285", "0.614928", "0.6135123", "0.6077857", "0.60459733", "0.60262614", "0.5773353", "0.56907296", "0.567575", "0.565867", "0.56117463", "0.5503338", "0.54958713", "0.5477541", "0.5457064", "0.5429928", "0.54290515", "0.54217696", "0.54169047", "0.5394655...
0.0
-1
Returns data loader for train in turnlevel.
def get_loader(file_path, src_word2id, trg_word2id, intent_type=None, intent2index=None, batch_size=1): dials = json.load(open(file_path)) dataset_list = [] for name in dials.keys(): val_file = dials[name] # build a custom dataset dataset = MultiwozSingleDataset(val_file, name, src_w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_each_loader(data_path, batch_size, trn_negnum, shuffle=True, num_workers=0):\n \n dataset = ML_Dataset(data_path, trn_negnum)\n \n if data_path.endswith('trn') == True:\n collate = dataset.train_collate\n else:\n collate = test_collate\n\n data_loader = data.DataLoader(datas...
[ "0.75176334", "0.749375", "0.7328463", "0.7213266", "0.7092191", "0.7091802", "0.7051254", "0.70409703", "0.70346665", "0.69718724", "0.69660026", "0.693725", "0.68223566", "0.6761632", "0.6746695", "0.6741186", "0.67396015", "0.6739318", "0.673075", "0.66948885", "0.6686167"...
0.7042871
7
Return the entry ID of the ODE or NOAD entry with which this component is linked (if any). Returns None if there's no link.
def paired_id(self): if self.paired_link() is not None: return self.paired_link().entry_id() else: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def entry_id(self):\n if self.lexid is not None:\n return self.lexid.split('.')[0]\n else:\n return None", "def linkno(self):\n if hasattr(self, \"_linkno\"):\n return self._linkno\n else:\n return None", "def get_id_shortlink(link = None)...
[ "0.6923058", "0.6822363", "0.6108968", "0.6011526", "0.59809464", "0.59809464", "0.59809464", "0.5965352", "0.5938222", "0.5916377", "0.58279663", "0.5819388", "0.58167094", "0.5691095", "0.5670867", "0.56300735", "0.5610285", "0.55816233", "0.5569148", "0.54882526", "0.54779...
0.71002346
0
Return the set of domClass topics found in the component.
def topics(self): return set([n.text for n in self.node.xpath('.//domClass') if n.text is not None])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def topics(self):\r\n return topics.Topics(self)", "def topics(self):\r\n return contents.Topics(self)", "def topics(self):\n return topics.Topics(self)", "def topics(self):\n # use get_model to avoid circular dependency\n topic_model = apps.get_model('tags', 'Topic')\n ...
[ "0.7290563", "0.7201646", "0.7099551", "0.7011569", "0.6786736", "0.6620541", "0.64232665", "0.63414145", "0.60784614", "0.60325885", "0.6023995", "0.6022614", "0.59995496", "0.59947073", "0.5992155", "0.5931425", "0.59110504", "0.59008944", "0.5890705", "0.58559626", "0.5786...
0.802408
0
Return the ID of the target entry.
def entry_id(self): if self.lexid is not None: return self.lexid.split('.')[0] else: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def target_id(self):\n\n return self._target_id", "def target_id(self):\n\n return self._target_id", "def target_id(self) -> str:\n return self._target_id", "def target_id(self) -> Optional[str]:\n return pulumi.get(self, \"target_id\")", "def get_target_id(self):\n\n res...
[ "0.76533705", "0.76533705", "0.7609248", "0.7252243", "0.6823659", "0.67660266", "0.6627055", "0.65696234", "0.65585095", "0.65585095", "0.65585095", "0.65585095", "0.65585095", "0.65585095", "0.65585095", "0.65585095", "0.65585095", "0.65585095", "0.65585095", "0.65585095", ...
0.6563248
8
Return True if this is a link between ODE and NOAD.
def is_ode_noad_link(self): if self.project_name in IDENTIFIERS: return True else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_ortho(self, leg, **kwargs):\n B = self @ self.adj(leg) # Make and contract with the adjoint\n return B.is_unity(**kwargs)", "def is_hom_ref(self) -> bool:\n return self.is_hom() and (self.allele1 == 0 or self.allele2 == 0)", "def is_linked(self): \n return self.ichair_id is ...
[ "0.66074234", "0.6520379", "0.65064394", "0.6447779", "0.6365083", "0.6355285", "0.63116074", "0.6286722", "0.6246453", "0.6160388", "0.6139014", "0.60947007", "0.60074884", "0.59585917", "0.5929041", "0.5912489", "0.59105563", "0.58539504", "0.5851654", "0.5829513", "0.58295...
0.7602552
0
Test project initialization with remote and possibly gitlab groups set.
def test_init_with_git_remote(isolated_runner, project_init, remote): data, commands = project_init # create the project new_project = Path(data["test_project"]) new_project.mkdir() repo = git.Repo.init(new_project) repo.create_remote("origin", remote[0]) result = isolated_runner.invoke( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_init_remote(isolated_runner, project_init):\n data, commands = project_init\n\n # create the project\n new_project = Path(data[\"test_project\"])\n assert not new_project.exists()\n result = isolated_runner.invoke(\n cli, commands[\"init_test\"] + commands[\"id\"] + commands[\"force\...
[ "0.6922681", "0.6520916", "0.6434641", "0.63318795", "0.6306162", "0.6271748", "0.62689763", "0.62048405", "0.6188058", "0.61763966", "0.61763966", "0.61473775", "0.61473775", "0.61473775", "0.6128032", "0.60938376", "0.60865563", "0.6054143", "0.603706", "0.60166526", "0.600...
0.669432
1
Computes the average distance of a walk.
def averageDistance(nbSteps, nbWalks, func): totalDistance = 0 startPoint = (0, 0) for _ in range(nbWalks): arrival = None while arrival is None: arrival = func(startPoint, nbSteps) totalDistance += distance(startPoint, arrival) return pow(totalDistance/nbWalks, 2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __calculate_average_distance(self):\n game = self.__game # type: Game\n all_icebergs = game.get_all_icebergs()\n all_icebergs_length = len(all_icebergs)\n sum_distances = 0\n for i in range(all_icebergs_length):\n for j in range(i + 1, all_icebergs_length):\n ...
[ "0.7261382", "0.7024056", "0.6731039", "0.6188855", "0.6151521", "0.6151521", "0.6151521", "0.61377794", "0.6130262", "0.6112313", "0.6065622", "0.59523565", "0.5891296", "0.5876016", "0.5875842", "0.5874567", "0.5860777", "0.5858323", "0.58561724", "0.58469546", "0.58341604"...
0.7139583
1
construct the ResNet V1 residual block
def construct(self, x): identity = x out = self.conv1(x) out = self.bn1(out) out = self.relu(out) out = self.conv2(out) out = self.bn2(out) out = self.relu(out) out = self.conv3(out) out = self.bn3(out) if self.downsample: i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_resnet(self):\r\n\r\n # INPUTS\r\n inputs_data = Input((self.data_rows, self.data_cols, 1),name='inputs_data')\r\n\r\n\r\n def residual_block(input, output_channels=64, kernel_size=(3, 3), stride=(1, 1)):\r\n x = Conv2D(output_channels, kernel_size, padding='same', strides...
[ "0.69647676", "0.6790248", "0.65371746", "0.6484117", "0.64593923", "0.642138", "0.63897717", "0.6338853", "0.63199425", "0.6281898", "0.6263456", "0.6201295", "0.6181082", "0.6176573", "0.61679983", "0.6160329", "0.61534846", "0.6133226", "0.6107439", "0.60885274", "0.606961...
0.0
-1
Test behaviour of a POST with a bad signature. We'll get different results here depending on settings.
def test_bad_signature(fail_on_mismatch, settings, rf): app_key = '123appkey' setattr(settings, APP_KEY_SETTING, app_key) setattr(settings, FAIL_ON_MISMATCH_SETTING, fail_on_mismatch) view = OurVeryOwnReceiverView.as_view() request = rf.post( WEBHOOK_URL, GOOD_EVENT_LIST_JSON, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_wrong_signature(self):\r\n response = requests.post(self.launch_uri, data=self.payload)\r\n self.assertIn('Wrong LTI signature', response.content)", "def test_add_hmac_signature_post_without_data(self):\n resp = self.client.post(\"/\")\n status_code = resp.status_code\n ...
[ "0.773038", "0.764125", "0.7537984", "0.7530935", "0.72413063", "0.68900365", "0.68290555", "0.682563", "0.6815828", "0.67936", "0.67920154", "0.6771525", "0.67652184", "0.6712462", "0.6680074", "0.66687334", "0.66687334", "0.6664628", "0.6623283", "0.66168", "0.65732396", ...
0.7279833
4
Residual function that handles different inputs and outputs inner dims.
def gnmt_residual_fn(inputs, outputs): def split_input(inp, out): out_dim = out.get_shape().as_list()[-1] inp_dim = inp.get_shape().as_list()[-1] return tf.split(inp, [out_dim, inp_dim - out_dim], axis=1) actual_inputs, _ = nest.map_structure(split_input, inputs, outputs) def assert...
{ "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 _residuals(params: List[float], xs: np.ndarray, ys: np.ndarray) -> float:\n return _model(params=params, xs=xs) - ys", "def _resid...
[ "0.6912124", "0.67175055", "0.6706249", "0.6487664", "0.6351428", "0.63212997", "0.631264", "0.63111556", "0.62559056", "0.619572", "0.61419815", "0.613941", "0.61247987", "0.61215866", "0.6080595", "0.6027744", "0.60000426", "0.5984757", "0.58955103", "0.58756155", "0.584352...
0.54233754
55
Constructs a `ResidualWrapper` for `cell`.
def __init__(self, cell): self._cell = cell self._residual_fn = gnmt_residual_fn
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __call__(self, inputs, state, scope=None):\n outputs, new_state = self._cell(inputs, state, scope=scope)\n # Ensure shapes match\n def assert_shape_match(inp, out):\n inp.get_shape().assert_is_compatible_with(out.get_shape())\n def default_residual_fn(inputs, outputs):\n nest.assert_same_...
[ "0.525483", "0.50582814", "0.5056793", "0.50306237", "0.49004534", "0.47767895", "0.4756119", "0.47508952", "0.4745276", "0.4728889", "0.4727167", "0.47174016", "0.47139803", "0.47139803", "0.4676678", "0.46365133", "0.46133268", "0.46071672", "0.45875415", "0.45706397", "0.4...
0.6759328
0
Object initialization given_name ........ (str|None, optional, defaults to None) The given (first) name of the person the instance represents. initials .......... (str|None, optional, defaults to None) The middle initial(s) of the person the instance represents. family_name ....... (str|None, optional, defaults to None...
def __init__(self, given_name=None, initials=None, family_name=None, email_address=None ): self.given_name = given_name self.initials = initials self.family_name = family_name self.email_address = email_address
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self,\r\n name=None,\r\n given_name=None,\r\n middle_name=None,\r\n family_name=None,\r\n address=None,\r\n additional_properties = {}):\r\n\r\n # Initialize members of the class\r\n self.name...
[ "0.77782553", "0.7519987", "0.75088555", "0.74528587", "0.7425556", "0.74173546", "0.7249808", "0.72475874", "0.7201071", "0.71894956", "0.71421474", "0.7066244", "0.7058378", "0.70476776", "0.7040424", "0.70349354", "0.70349354", "0.70349354", "0.70349354", "0.70349354", "0....
0.8482793
0
Object initialization student_id ........ (int|None, optional, defaults to 0 [zero]) The unique identifying number of the student given_name ........ (str|None, optional, defaults to None) The given (first) name of the student the instance represents. initials .......... (str|None, optional, defaults to None) The middl...
def __init__(self, student_id=0, # - Arguments from Person given_name=None, initials=None, family_name=None, email_address=None, # - Other student-specific arguments major=None, minor=None ): # - We can use super() to call the parent class' __init__ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, first_name, last_name, address):\n\n self.first_name = first_name\n self.last_name = last_name\n self.address = address\n\n # Creates dictionary for each student with the label & info.\n\n self.info = {\n 'first name': self.first_name,\n '...
[ "0.7474234", "0.73341835", "0.71787", "0.70912176", "0.6885495", "0.6728643", "0.6597062", "0.6529507", "0.6471617", "0.6423829", "0.64211345", "0.6397629", "0.63790256", "0.6378795", "0.63497055", "0.6346681", "0.6337333", "0.6299591", "0.62544394", "0.6197605", "0.61961967"...
0.7631311
0
Stripe a column in a dataframe, by interpolating quantiles into a set of discrete indexes.
def stripe_column ( values: list, bins: int, *, use_gpus: bool = False, ) -> np.ndarray: if use_gpus: s = cudf.Series(values) else: s = pd.Series(values) q = s.quantile(bins, interpolation="nearest") try: stripe = np.digitize(values, q) - 1 return st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def quartile(db: pd.DataFrame, col: str) -> pd.DataFrame:\n _, bins = pd.qcut(x=db[col],\n q=[0.25, 0.75], # [0.0, 0.25, 0.5, 0.75, 1.0],\n retbins=True, duplicates='drop')\n q1 = bins[0] # lower (first) quartile\n q3 = bins[1] # upper (third) quartile\n iqr...
[ "0.6155155", "0.59328115", "0.5739949", "0.5671343", "0.5617835", "0.55964226", "0.5511522", "0.54988414", "0.54791105", "0.54629344", "0.53953433", "0.5391538", "0.53371656", "0.5333492", "0.527579", "0.52589947", "0.5220919", "0.51387763", "0.50933665", "0.50857997", "0.504...
0.61993945
0
Return the element stored at this Position.
def element(self): return self._node._element
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_element(self):\n return self.element", "def get_element(self):\n return self.element", "def get_element(self):\n return self._element", "def element(self):\n return self._element", "def element(self):\n return self._element", "def element(self):\n ...
[ "0.7991133", "0.7991133", "0.79683876", "0.78909487", "0.7818736", "0.7818736", "0.7818736", "0.75961065", "0.75703907", "0.7486983", "0.7271655", "0.7221839", "0.72033703", "0.72033703", "0.72033703", "0.72033703", "0.70869666", "0.6923757", "0.69016874", "0.68744016", "0.68...
0.7495175
12
Return True if other Position represents the same location.
def __eq__(self, other): return type(other) is type(self) and other._node is self._node
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sameLocation(self, other):\n if not isinstance(other,Point):\n return False\n return self.longitude == other.getLongitude() and self.latitude == other.getLatitude()", "def is_same_as(self, other) -> bool:\n return self.x == other.x and self.y == other.y", "def __eq__(self, o...
[ "0.84157455", "0.8079219", "0.7786436", "0.7786436", "0.7691206", "0.7679783", "0.76025367", "0.75659394", "0.7451102", "0.73797554", "0.7364951", "0.7344662", "0.7325785", "0.7313814", "0.72921383", "0.7285434", "0.72343457", "0.7201619", "0.71943647", "0.71350956", "0.71306...
0.0
-1
Return True if other does not represents the same location.
def __ne__(self, other): return not (self == other)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: 'LocationOutput') -> bool:\n return not self == other", "def sameLocation(self, other):\n if not isinstance(other,Point):\n return False\n return self.longitude == other.getLongitude() and self.latitude == other.getLatitude()", "def __ne__(self, other: 'L...
[ "0.8464421", "0.819087", "0.81640583", "0.77991784", "0.76913416", "0.76381975", "0.7608116", "0.7572509", "0.7563071", "0.7563071", "0.7553644", "0.7539375", "0.75329036", "0.7529435", "0.75214463", "0.7492222", "0.7457559", "0.7416773", "0.7246046", "0.7237671", "0.7176044"...
0.0
-1
Gets the severity of this PolicyEvaluationProblem.
def severity(self): return self._severity
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def severity(self) -> str:\n return pulumi.get(self, \"severity\")", "def severity(self) -> str:\n return pulumi.get(self, \"severity\")", "def severity(self) -> str:\n return pulumi.get(self, \"severity\")", "def severity(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"s...
[ "0.78816473", "0.78816473", "0.78816473", "0.77773297", "0.76952446", "0.7459061", "0.7459061", "0.7459061", "0.745034", "0.73328614", "0.71362484", "0.70060045", "0.6928198", "0.6892049", "0.6720854", "0.66371197", "0.636598", "0.6313522", "0.58744997", "0.57795143", "0.5762...
0.79127765
1
Gets the problem_type of this PolicyEvaluationProblem.
def problem_type(self): return self._problem_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getprobtype(self): # 3\n res,resargs = self.__obj.getprobtype()\n if res != 0:\n result,msg = self.__getlasterror(res)\n raise Error(rescode(res),msg)\n _probtype_return_value = resargs\n _probtype_return_value = problemtype(_probtype_return_value)\n return _probtype_retu...
[ "0.69119966", "0.67224455", "0.67224455", "0.67224455", "0.67224455", "0.67224455", "0.6341443", "0.63391316", "0.62962055", "0.62962055", "0.6234336", "0.6189345", "0.617481", "0.61438507", "0.6107251", "0.6107251", "0.6078641", "0.6072959", "0.60621804", "0.6042226", "0.604...
0.80605066
0
Sets the problem_type of this PolicyEvaluationProblem.
def problem_type(self, problem_type): if problem_type is None: raise ValueError("Invalid value for `problem_type`, must not be `None`") # noqa: E501 self._problem_type = problem_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def problem_type(self):\n return self._problem_type", "def set_problem(self, problem):\n\t\tif isinstance(problem, str):\n\t\t\tself._problem = problem\n\t\t\treturn\n\n\t\tif isinstance(problem, polyfempy.Problem):\n\t\t\tself._problem = \"GenericScalar\" if self._is_scalar else \"GenericTensor\"\n\t\t\t...
[ "0.62316334", "0.62279195", "0.61493415", "0.61261266", "0.5996442", "0.5971947", "0.5971947", "0.5959344", "0.587077", "0.58425814", "0.58094555", "0.5744428", "0.5732569", "0.5710684", "0.5707716", "0.5707716", "0.56963664", "0.56963664", "0.56963664", "0.5681315", "0.56676...
0.81191987
0
Gets the details of this PolicyEvaluationProblem.
def details(self): return self._details
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def problem(self):\n return self['problem']", "def __get_evaluation_summary(self):\n self.logger.debug(\n f\"Getting summary for assignment {self.assignment_id}, eval_id {self.eval_id}\"\n )\n result = self.interactor.get_policy_eval_summary(self.assignment_id)\n\n i...
[ "0.6440447", "0.64267933", "0.62389845", "0.606752", "0.6048847", "0.6048847", "0.6048847", "0.5985877", "0.59639025", "0.5920422", "0.5914245", "0.58789855", "0.58447075", "0.5759893", "0.57477915", "0.5723416", "0.57126033", "0.5712018", "0.5712018", "0.5671037", "0.5668864...
0.62127274
3
Checks if all mines have been flagged.
def won(self): return self.mines_found == self.mines
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mark_mines(self, cells):\r\n for cell in cells:\r\n row, col = cell\r\n self.mine_field[row][col] = 'x'\r\n self.mines_left -= 1\r\n return", "def known_mines(self):\n self.mines", "def all_bees_raised_flag(self):\n pos, com, success = self.perce...
[ "0.6493939", "0.64380544", "0.62672025", "0.6193501", "0.59457463", "0.59377706", "0.5888218", "0.5871176", "0.58325356", "0.5807797", "0.5793292", "0.5792148", "0.5780905", "0.5763106", "0.57473433", "0.5706428", "0.5688238", "0.5619981", "0.5616461", "0.5607642", "0.5599766...
0.67858374
3
Returns the set of all cells in self.cells known to be mines.
def known_mines(self): if len(self.cells)==self.count: return self.cells return set() #raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def known_mines(self):\n if len(self.cells) <= self.count:\n return self.cells\n return set([])", "def known_mines(self):\n \n if len(self.cells) == self.count:\n return self.cells", "def known_mines(self):\n #if the length of the amount of open cells is...
[ "0.87650234", "0.8293779", "0.82612735", "0.7944578", "0.7944578", "0.76535374", "0.76535374", "0.7336784", "0.71533304", "0.6954018", "0.68953633", "0.67344165", "0.6729412", "0.671902", "0.6691797", "0.6594178", "0.6469754", "0.6462674", "0.6419005", "0.6399146", "0.6356947...
0.8837728
0