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
Called when the user specifies an intent for this skill
def on_intent(intent_request, session): print("on_intent requestId=" + intent_request['requestId'] + ", sessionId=" + session['sessionId']) intent = intent_request['intent'] intent_name = intent_request['intent']['name'] # Dispatch to your skill's intent handlers if intent_name == "GetLo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_intent(intent_request, session):\n\n intent = intent_request['intent']\n intent_name = intent_request['intent']['name']\n\n # Dispatch to your skill's intent handlers\n\n if intent_name not in skillmap:\n intent_name = \"NullSkill\"\n\n if intent_name in skillmap:\n try:\n ...
[ "0.71425295", "0.69551635", "0.69480896", "0.6904782", "0.68920237", "0.6763186", "0.6754033", "0.67221457", "0.67199254", "0.6715521", "0.6698368", "0.66912574", "0.66695374", "0.66442376", "0.6641862", "0.6638022", "0.66073626", "0.6594146", "0.6574747", "0.6569399", "0.656...
0.65029997
30
Initialize weighst to zero
def _initialize_weights(self, m): self.w_ = np.zeros(1 + m) self.w_initialized = True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initializeWeightsToZero(self):\n\t\t## YOUR CODE BELOW\n\t\t\n\t\tutil.raiseNotDefined()\n\t\treturn", "def zero_weight():\n return Weight(kg=0)", "def init_weights(self) -> None:\n self.fc.bias.data.fill_(0)\n self.fc.weight.data.uniform_(-0.1, 0.1)", "def get_zero_twist():\n\n\tnew_twi...
[ "0.74295646", "0.7037761", "0.7036993", "0.66959065", "0.6679357", "0.6679357", "0.6554429", "0.6540206", "0.6540206", "0.6540206", "0.6472681", "0.64633346", "0.6460859", "0.6458265", "0.6439538", "0.6337896", "0.63283694", "0.63249236", "0.6244811", "0.6243575", "0.6238858"...
0.6070152
28
Creates an TacotronInferenceHelper instance.
def __init__(self, batch_size, input_size, max_iterations=None): self._batch_size = batch_size self._input_size = input_size # Set the sequence length to be generated according to max_iterations. if max_iterations is None: # Do not stop generating. self._sequence...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n\n\t\tself.Helpers = Helpers(\"TassAI\", False)\n\n\t\tself.qs = 16\n\t\tself.context = InferenceContext([self.Helpers.confs[\"iotJumpWay\"][\"MQTT\"][\"TassAI\"][\"runas\"], self.Helpers.confs[\"iotJumpWay\"][\"MQTT\"][\"TassAI\"][\"runas\"], self.Helpers.confs[\"iotJumpWay\"][\"MQTT\"][\"Tas...
[ "0.54419243", "0.51597995", "0.5140037", "0.5136019", "0.50649256", "0.50288266", "0.4966438", "0.49530295", "0.48938224", "0.48878124", "0.48021108", "0.47827142", "0.47542924", "0.47404054", "0.47306332", "0.46825254", "0.4681935", "0.4680647", "0.4678351", "0.46712652", "0...
0.0
-1
Get the batch size of the current batch.
def batch_size(self): return self._batch_size
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def batch_size(self):\n return self.size", "def batch_size(self) -> pulumi.Output[Optional[int]]:\n return pulumi.get(self, \"batch_size\")", "def _get_batch_size(self):\n if self.batch_size == 'auto':\n return self._backend.compute_batch_size()\n else:\n # Fix...
[ "0.859251", "0.84918725", "0.8287922", "0.8177948", "0.8177948", "0.8177948", "0.8177948", "0.8106", "0.8044378", "0.79484206", "0.78738534", "0.7864224", "0.7791276", "0.7784568", "0.762182", "0.75779676", "0.7568926", "0.74709004", "0.7442687", "0.7425036", "0.74006546", ...
0.84533024
3
Query information used to initialize the decoder RNN. This information includes information about whether the decoding process is finished yet as well as the initial inputs to the RNN. The initial state of the decoding process has to be that decoding is not finished. As for the initial input we use a zero vector aka. f...
def initialize(self, name=None): # When the decoder starts, there is no sequence in the batch that is finished. initial_finished = tf.tile([False], [self._batch_size]) # The initial input for the decoder is considered to be a <GO> frame. # We will input an zero vector as the <GO> frame....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _inference_initial_state(self, encoder_outputs, encoder_decoder_attention_bias):\n\n with tf.variable_scope(\"inference_initial_state\"):\n n_layers = self.attention_layers\n n_heads = self.attention_heads\n batch_size = tf.shape(encoder_outputs)[0]\n n_featur...
[ "0.6505445", "0.6186858", "0.6073342", "0.56868494", "0.5657712", "0.5646717", "0.56221867", "0.56089747", "0.56075585", "0.55688393", "0.55419827", "0.55416197", "0.552817", "0.5509665", "0.54916793", "0.54858226", "0.5480347", "0.54530305", "0.5384752", "0.5317886", "0.5299...
0.6751211
0
Get the batch size of the current batch.
def batch_size(self): return self._batch_size
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def batch_size(self):\n return self.size", "def batch_size(self) -> pulumi.Output[Optional[int]]:\n return pulumi.get(self, \"batch_size\")", "def _get_batch_size(self):\n if self.batch_size == 'auto':\n return self._backend.compute_batch_size()\n else:\n # Fix...
[ "0.85912186", "0.8491231", "0.82880163", "0.81776613", "0.81776613", "0.81776613", "0.81776613", "0.81050867", "0.8043511", "0.79478955", "0.78747344", "0.7863647", "0.7790454", "0.778359", "0.76203316", "0.7578211", "0.7569127", "0.74713427", "0.74404794", "0.7423674", "0.74...
0.8452738
4
Query information used to initialize the decoder RNN. This information includes information about whether the decoding process is finished yet as well as the initial inputs to the RNN. The initial state of the decoding process has to be that decoding is not finished. As for the initial input we use a zero vector aka. f...
def initialize(self, name=None): with tf.name_scope(name, "TacotronTrainingHelperInitialize"): # When the decoder starts, there is no sequence in the batch that is finished. initial_finished = tf.tile([False], [self._batch_size]) # The initial input for the decoder is consid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize(self, name=None):\n # When the decoder starts, there is no sequence in the batch that is finished.\n initial_finished = tf.tile([False], [self._batch_size])\n\n # The initial input for the decoder is considered to be a <GO> frame.\n # We will input an zero vector as the <...
[ "0.6749815", "0.6504746", "0.60726666", "0.5686171", "0.56565964", "0.5646809", "0.56218976", "0.56079066", "0.56073964", "0.55676305", "0.554153", "0.554112", "0.5527037", "0.5509606", "0.5491529", "0.5486333", "0.54803973", "0.5452192", "0.5384493", "0.5317143", "0.5298522"...
0.6184855
2
Convert word indices to strings.
def decode_batch_output(decoded_tokens, vocab: Vocab, oov_dict: OOVDict) -> List[List[str]]: decoded_batch = [] if not isinstance(decoded_tokens, list): decoded_tokens = decoded_tokens.transpose(0, 1).tolist() for i, doc in enumerate(decoded_tokens): decoded_doc = [] for word_idx in doc: if word...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_idx2word():\n idx2word = {}\n d = train_data.shared['word2idx']\n for word, idx in d.items():\n print(word)\n idx2word[idx] = word\n if config.use_glove_for_unk:\n d2 = train_data.shared['new_word2idx']\n for word, idx in d2.items():\...
[ "0.691161", "0.6769812", "0.67211235", "0.6648241", "0.65625167", "0.6545675", "0.6496118", "0.6462496", "0.6454771", "0.64292914", "0.6411378", "0.6349923", "0.63463485", "0.61219895", "0.6090902", "0.6039364", "0.6024312", "0.6007287", "0.5997666", "0.59450454", "0.59119964...
0.0
-1
Test the `model` on the `batch`, return the decoded textual tokens and the Seq2SeqOutput.
def decode_batch(batch: Batch, model: Seq2Seq, vocab: Vocab, criterion=None, *, pack_seq=True, show_cover_loss=False) -> Tuple[List[List[str]], Seq2SeqOutput]: if not pack_seq: input_lengths = None else: input_lengths = batch.input_lengths with torch.no_grad(): input_tensor = batch.in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decode_batch(\n batch: Batch,\n model: Seq2Seq,\n vocab: Vocab,\n criterion=None,\n *,\n pack_seq=True,\n show_cover_loss=False\n) -> Tuple[List[List[str]], Seq2SeqOutput]:\n if not pack_seq:\n input_lengths = None\n else:\n input_lengths = batch.input_lengths\n with...
[ "0.7166668", "0.66255784", "0.61632776", "0.610854", "0.60396373", "0.60074013", "0.5928364", "0.5921841", "0.5885195", "0.5876306", "0.58629924", "0.58629924", "0.5854257", "0.5805924", "0.579727", "0.5755242", "0.5754296", "0.5714086", "0.5713308", "0.5697287", "0.56800944"...
0.72441125
0
Gene symbols expected, e.g. NANOG.
def GetGene(ids, base_url=BASE_URL, fout=None): n_out=0; tags=None; for id_this in ids: gene = rest.Utils.GetURL(base_url+'/gene/{0}'.format(id_this), parse_json=True) logging.debug(json.dumps(gene, indent=2)) if not tags: tags = list(gene.keys()) fout.write("\t".join(tags)+"\n") vals = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def safe_gene_name(symbol):\n return (\n symbol.replace(\"(\", \"\")\n .replace(\")\", \"\")\n .replace(\":\", \"\")\n .replace(\"&\", \"\")\n .replace(\"|\", \"\")\n .replace(\".\", \"\")\n .replace(\" \", \"\")\n )", "def test_ambiguous():\n genes = gen...
[ "0.6920557", "0.575978", "0.570711", "0.56412536", "0.5613778", "0.5613778", "0.5591658", "0.5576242", "0.5501423", "0.54986864", "0.54389566", "0.54386145", "0.54099035", "0.5373188", "0.5368665", "0.5362512", "0.53363734", "0.53221464", "0.52829427", "0.5279064", "0.5272123...
0.0
-1
Gene symbols expected, e.g. NANOG.
def GetGeneAssociations(ids, base_url=BASE_URL, fout=None): n_out=0; gene_tags=[]; assn_tags=[]; for id_this in ids: gene = rest.Utils.GetURL(base_url+'/gene/{0}?showAssociations=true'.format(id_this), parse_json=True) assns = gene["associations"] if "associations" in gene else [] if not assns: continue...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def safe_gene_name(symbol):\n return (\n symbol.replace(\"(\", \"\")\n .replace(\")\", \"\")\n .replace(\":\", \"\")\n .replace(\"&\", \"\")\n .replace(\"|\", \"\")\n .replace(\".\", \"\")\n .replace(\" \", \"\")\n )", "def test_ambiguous():\n genes = gen...
[ "0.6920557", "0.575978", "0.570711", "0.56412536", "0.5613778", "0.5613778", "0.5591658", "0.5576242", "0.5501423", "0.54986864", "0.54389566", "0.54386145", "0.54099035", "0.5373188", "0.5368665", "0.5362512", "0.53363734", "0.53221464", "0.52829427", "0.5279064", "0.5272123...
0.0
-1
Convert text transcript into int labels.
def _extract_labels(self, samples: List): targets = [ self.sp_model.encode(sample[2].lower().replace("<unk>", "<garbage>").replace("\n", "")) for sample in samples ] targets = [ [ele if ele != 4 else self.sp_model.unk_id() for ele in target] for target in targ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encode(self, text: str) -> List[int]:\n return [self._label2id.get(char, self.oov) for char in text]", "def text_to_int(self, text):\n int_sequence = []\n for c in text:\n if c == ' ':\n ch = self.char_map['']\n else:\n ch = self.char_m...
[ "0.63030833", "0.6253171", "0.6220805", "0.6200461", "0.6058251", "0.58463323", "0.5807401", "0.57985806", "0.57213354", "0.56356037", "0.5586737", "0.55853325", "0.5557671", "0.55280674", "0.5520413", "0.55140454", "0.5458375", "0.5453453", "0.5444925", "0.54423255", "0.5433...
0.0
-1
Initializes a costsensitive weighted ensemble.
def __init__(self, K=10, base_learner=DecisionTreeClassifier(), S=200, cv=5, epsilon=3, cost=90, fraud_label=1, t=3): # let the parent do the stuffs super().__init__(K=K, base_learner=base_learner, S=S, cv=cv) # init statistics of bins (i,k) each epsilon bin has an array k ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_weights_(self):\n raise NotImplementedError", "def _initialize_weights(self):\n pass", "def init_weights(self):\n # Initialize weights\n self.apply(self._init_weights)\n # Tie weights if needed\n self.tie_weights()", "def __init__(self, weights):\n se...
[ "0.7459445", "0.74515176", "0.7315243", "0.72551847", "0.72536296", "0.71434695", "0.6946876", "0.6884614", "0.68276185", "0.6790329", "0.6778321", "0.6760338", "0.67335093", "0.6700311", "0.6695161", "0.66849315", "0.6680402", "0.66742474", "0.66624177", "0.6660677", "0.6621...
0.0
-1
Normalize a matrix of predictions of specialists.
def normalize_predmat(predmat, sample_counts=None): pred_indicators = np.abs(np.sign(predmat)) if sample_counts is None: sample_counts = np.array(pred_indicators.sum(axis=0)).flatten() spec_weights = calc_specialist_weights(sample_counts) return sp.sparse.csr_matrix(predmat).multiply(sp.sparse.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize_features(X):\n std = X.std(axis=0)\n std = np.where(std == 0, 1, std) # to avoid division by zero\n x_normed = (X - X.mean(axis=0)) / std\n return x_normed", "def normalize(predictors):\n normalization_constant = np.max(np.max(predictors, axis=1), axis=0)\n return predictors / no...
[ "0.6866112", "0.68160945", "0.67679286", "0.67080677", "0.662686", "0.660742", "0.65844554", "0.6584147", "0.657186", "0.6532119", "0.6513379", "0.6467592", "0.6447643", "0.64305377", "0.642267", "0.6404732", "0.6404558", "0.63929", "0.63929", "0.6339829", "0.632517", "0.63...
0.65244246
10
Generator to yield the rows from an input file in minibatches of a specified size.
def mbatGen(file_obj, mbatsize): for _, lines in enumerate(itertools.islice(file_obj, mbatsize)): #TODO(Akshay): Add filtering condition here, if any. yield lines
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def chunkify(self, size=1024*1024*5):\n with open(self.file_name_raw, 'rb') as file:\n chunk_end = file.tell()\n while True:\n chunk_start = chunk_end\n file.seek(size, 1)\n file.readline()\n chunk_end = file.tell()\n\n ...
[ "0.7142849", "0.69246334", "0.6658175", "0.66544956", "0.6627259", "0.66092145", "0.6440792", "0.6415317", "0.6383953", "0.6362212", "0.63404804", "0.63006556", "0.62695885", "0.62638694", "0.62591445", "0.6249338", "0.62358564", "0.62203074", "0.62168926", "0.62168205", "0.6...
0.67967534
2
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
def plot_confusion_matrix(normalize, title, class_names, cmap=cmap): if not title: if normalize: title = 'Normalized confusion matrix' else: title = 'Confusion matrix, without normalization' # Compute confusion matri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_confusion_matrix(cm, classes=[0,1], normalize=False, title='Confusion matrix', print_matrix=False):\n\n if normalize:\n cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]\n print(\"Normalized confusion matrix\")\n else:\n print('Confusion matrix, without normalization')\n\n...
[ "0.8193067", "0.8093563", "0.80270845", "0.80171025", "0.7992049", "0.79890734", "0.79785955", "0.7973588", "0.7959112", "0.79545826", "0.79353666", "0.7932262", "0.79320717", "0.79288954", "0.792416", "0.7922282", "0.7921632", "0.79207784", "0.7920719", "0.79201275", "0.7915...
0.0
-1
Tokenizes the captions. This will add caption_tokens in each entry of the dataset. 1 represents nil, and should be treated as padding_idx in embedding.
def tokenize(self): count = 0 for entry in self._entries: token_pairs = [] for relation in entry['relations']: assert len(relation) == 3 token_pairs.append((relation[0][0],relation[1][0],relation[2][0])) num_rels = len(entry['relations...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _process_caption(caption):\n tokenized_caption = [FLAGS.start_word]\n caption = caption.lower()\n if FLAGS.cut_words:\n tokens = [\n \" \".join(tk.tokenize(cap))\n for cap in jieba.cut(caption)\n ]\n else:\n tokens = tk.tokenize(caption)\n tokenized_cap...
[ "0.6539573", "0.6307985", "0.60693014", "0.5987092", "0.5949673", "0.586602", "0.57654035", "0.5592448", "0.55121845", "0.5487706", "0.54631776", "0.54217577", "0.53776205", "0.53189903", "0.5303974", "0.5292294", "0.5289654", "0.5199242", "0.5163434", "0.5146411", "0.5090166...
0.51136947
20
Init Patient with all the attributes defined in the patients.csv file.
def __init__(self, subject_id, gender, dob, dod, dod_hosp, dod_ssn, expire_flag): self.id = int(subject_id) self.gender = gender self.dob = utils.convert_to_date_time_object(dob) self.dod = utils.convert_to_date_time_object(dod) self.dod_hosp = utils.convert_to_date_time_object(d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self,donnee_patient):\n self.initiales = donnee_patient[0]\n self.date_naissance = donnee_patient[1]\n self.age = donnee_patient[2]\n self.sexe = donnee_patient[3]\n self.poids = donnee_patient[4]\n self.taille = donnee_patient[5]\n self.BMI = donnee_pa...
[ "0.65407604", "0.6318401", "0.6262858", "0.62587535", "0.6075107", "0.60255903", "0.5954937", "0.5944245", "0.5920489", "0.59051895", "0.5867612", "0.5855946", "0.5845458", "0.58112895", "0.5800917", "0.5792273", "0.5786439", "0.5758055", "0.5739256", "0.5705005", "0.5691129"...
0.0
-1
Determine whether an activity is one of the extension activities.
def is_extension_activity(self, activity) -> bool: return self.is_start(activity) or self.is_end(activity)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_asset_based_activity(self):\n return bool(self._my_map['assetIds'])", "def is_activity_only(self):\n return self._tag == 'activity_only'", "def is_course_based_activity(self):\n return False", "def is_start(self, activity) -> bool:\n return activity == self.activity_concept...
[ "0.64245397", "0.6276303", "0.62526405", "0.60466594", "0.5900595", "0.584871", "0.5809351", "0.5763061", "0.5685653", "0.5674815", "0.55561095", "0.5455534", "0.5407591", "0.54029953", "0.53897274", "0.5310585", "0.5284247", "0.5266866", "0.5257903", "0.5235382", "0.5222705"...
0.8200745
0
Generates a random string for a given length.
def random_string(length): # this conservatively gets 8*length bits and then returns 6*length of # them. Grabbing (6/8)*length bits could lose some entropy off the ends. return urlsafe_b64encode(os.urandom(length))[:length]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _generate_random_string(length: int):\n\tall_chars = string.ascii_letters + string.digits\n\treturn ''.join(random.choices(all_chars, k=length))", "def generate_random_string(length):\r\n return ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(length))", "def generate_random_...
[ "0.9019125", "0.89278793", "0.88345236", "0.8758328", "0.8741335", "0.8737719", "0.87296337", "0.8705112", "0.86769843", "0.86556464", "0.8654667", "0.8605328", "0.8567087", "0.84950083", "0.84815973", "0.8474372", "0.8467232", "0.8402903", "0.84023684", "0.8390262", "0.83876...
0.8231812
28
Calculates a message authorization code (MAC) for a timestamp.
def calculate_ts_mac(ts, credentials): normalized = ('hawk.{hawk_ver}.ts\n{ts}\n' .format(hawk_ver=HAWK_VER, ts=ts)) log.debug(u'normalized resource for ts mac calc: {norm}' .format(norm=normalized)) digestmod = getattr(hashlib, credentials['algorithm']) if not isinstanc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_mac(self):\n try:\n dt_obj = duparser.parse(timestamp)\n self.out_mac = str(int((dt_obj - self.epoch_2001).total_seconds()))\n except Exception as e:\n if not args.log:\n pass\n else:\n logging.error(str(type(e)) + \",\"...
[ "0.6514976", "0.6100469", "0.60948724", "0.60575527", "0.5916459", "0.5789472", "0.5786541", "0.57769", "0.57674253", "0.57244414", "0.5652684", "0.5561936", "0.55420953", "0.5486743", "0.5479845", "0.5453809", "0.54324806", "0.543181", "0.5410798", "0.5409588", "0.5399325", ...
0.61863315
1
The representation in console
def __repr__(self): dic = self.toDict() body = '<gbif.taxonomy.Presences instance: \n' for key,value in dic.iteritems(): c = 'key %s : %i \n' %(key,int(value)) body += c body += '\>' return body
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n return self.pretty_print(self.__dict__)", "def pprint(self):\n # just here for defining the interface; work is done in subclasses\n pass", "def pprint(self):\n print(self.pprint_str())", "def __repr__(self):\n return self.display()", "def __repr__(se...
[ "0.76344675", "0.75901246", "0.7400275", "0.7373723", "0.7369008", "0.73329264", "0.73060834", "0.72766286", "0.7268593", "0.71860003", "0.7183518", "0.7152908", "0.7146982", "0.7141354", "0.7135409", "0.7135409", "0.7135409", "0.7135409", "0.7135409", "0.7135409", "0.7135409...
0.0
-1
.. setPresenceAbsenceFeature This method sets the presences attribute. A dictionary of presence/absence taxons based on a referenced list passed as the parameter 'reference_list'. This parameter should be an 'ordered' integer list of present taxons.
def setPresenceAbsenceFeature(self,reference_dict='parent'): presences_dic = {} if isinstance(reference_dict,dict): for key,reference_list in reference_dict.iteritems(): presences_dic[key] = self.singlePresenceAbsenceRepr(reference=reference_list,taxonkey=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setPresenceAbundanceData(self,reference_dict):\n \n ref = reference_dict\n \n for taxonomy in self.taxonomies:\n taxonomy.setPresenceAbsenceFeature(reference_dict=ref)\n\n return None", "def setPresenceInLevels(self,external_reference_dic='No'): \n ...
[ "0.7794573", "0.5545041", "0.53208065", "0.5285978", "0.5073565", "0.50003326", "0.47386643", "0.45981526", "0.45844314", "0.4559044", "0.44808787", "0.44713068", "0.44582564", "0.44302252", "0.44201553", "0.4398005", "0.4372609", "0.43720537", "0.43498403", "0.43453664", "0....
0.7476997
1
Dilated conv2d without BN or relu.
def dilated_conv2d(x, kernel_size, num_o, dilation_factor, name, channel_axis=3, biased=False): num_x = x.shape[channel_axis].value with tf.variable_scope(name) as scope: w = tf.get_variable('weights', shape=[kernel_size, kernel_size, num_x, num_o]) o = tf.nn.atrous_conv2d(x, w, dilation_factor,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deconv2d(layer_input,num=256):\n u = UpSampling2D(size=2)(layer_input)\n u = Conv2D(num, kernel_size=3, strides=1, padding='same')(u)\n u = Activation('relu')(u)\n return u", "def deconv2d(layer_input, filters, f_size=8, dropout_rate=0,permanent=False):\n u = UpSampling...
[ "0.7137829", "0.71281564", "0.70719963", "0.70065814", "0.6934656", "0.69137776", "0.6847782", "0.6836987", "0.6710518", "0.6553559", "0.6502695", "0.649141", "0.6464154", "0.6383561", "0.6383561", "0.6376357", "0.63763344", "0.63694984", "0.63467604", "0.634634", "0.6345352"...
0.6423028
13
Define deconv for generator. The deconv is defined to be a x2 resize_nearest_neighbor operation with additional gen_conv operation.
def deconv(x, num_outputs, scope='deconv', padding='SAME', normalizer_fn=None): with tf.variable_scope(scope): # x = resize(x, func=tf.image.resize_bilinear) x = resize(x, func=tf.image.resize_nearest_neighbor) x = conv(x, num_outputs, 3, 1, scope=scope, padding=padding, normalizer_fn=normal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_deconvolution(node, **kwargs):\n name, inputs, attrs = get_inputs(node, kwargs)\n\n kernel_dims = list(parse_helper(attrs, \"kernel\"))\n stride_dims = list(parse_helper(attrs, \"stride\", [1, 1]))\n pad_dims = list(parse_helper(attrs, \"pad\", [0, 0]))\n num_group = int(attrs.get(\"num_...
[ "0.66509515", "0.64131564", "0.6403125", "0.6391284", "0.6376882", "0.6371317", "0.63408786", "0.6329372", "0.629048", "0.62618", "0.6256144", "0.6252768", "0.62170047", "0.6195425", "0.6121979", "0.6105527", "0.609766", "0.608912", "0.60717684", "0.60234404", "0.59736854", ...
0.6651721
0
Contextual attention layer implementation.
def contextual_attention(f, b, mask=None, ksize=3, stride=1, rate=1, fuse_k=3, softmax_scale=10., training=True, fuse=True): # get shapes raw_fs = tf.shape(f) raw_int_fs = f.get_shape().as_list() raw_int_bs = b.get_shape().as_list() # extract patches from background with str...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self, encoder_state, context, context_lens):\n attn = self.attention(context, encoder_state.squeeze(0), context_lens)\n return attn", "def _Attention(self, name, is_causal=True):\n p = self.params\n tr_atten_p = TransformerAttentionLayer.Params().Set(\n name='transformer_at...
[ "0.7302596", "0.70033437", "0.6519189", "0.65044045", "0.6473802", "0.6447233", "0.6391859", "0.63718355", "0.62860805", "0.6249749", "0.62475526", "0.6188868", "0.6185548", "0.61709875", "0.61514854", "0.61309737", "0.6128917", "0.60853946", "0.60835904", "0.6078229", "0.604...
0.55089843
82
Create timedelta object representing time delta expressed in a string Takes a string in the format produced by calling str() on a python timedelta object and returns a timedelta instance that would produce that string.
def parseTimeDelta(s): if s is None: return None d = re.match(r'((?P<days>\d+) days, )?(?P<hours>\d+):' r'(?P<minutes>\d+):(?P<seconds>\d+)', s).groupdict(0) return datetime.timedelta(**dict(((key, int(value)) for key, value in d.items())))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_string_to_timedelta(string):\n # type: (str) -> datetime.timedelta\n if is_none_or_empty(string):\n raise ValueError('{} is not a valid timedelta string'.format(string))\n # get days\n tmp = string.split('.')\n if len(tmp) == 2:\n days = int(tmp[0])\n tmp = tmp[1]\n ...
[ "0.8020014", "0.7750731", "0.76613027", "0.7352371", "0.7301059", "0.7181434", "0.7069684", "0.69542277", "0.69039804", "0.6831612", "0.66608936", "0.6642936", "0.6609754", "0.6486892", "0.6467533", "0.6333492", "0.6173104", "0.61590916", "0.6082571", "0.60380995", "0.5945603...
0.7044704
7
Initialize user defined window.
def __init__(self, len_x, len_y, win_func, *args, **kwargs): self._gen_window(len_x, len_y, win_func, *args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init(self):\n sg.theme(gui.app_theme)\n self.window = sg.Window(\n gui.app_title,\n gui.create_layout(),\n **gui.window_config,\n )\n gui.after_window_init(self.window)", "def _prep_window(self, parent=None):\n self.toolkit.app.initialize()\...
[ "0.75944954", "0.7452284", "0.72010154", "0.7070473", "0.70182097", "0.69559664", "0.6885936", "0.68694276", "0.681405", "0.6793306", "0.66986454", "0.6637159", "0.6574032", "0.65606105", "0.65000606", "0.64833724", "0.64585763", "0.6431412", "0.6421573", "0.6401828", "0.6385...
0.0
-1
Create a new Agent object.
def __init__(self, ID, habitatType, anthro): self.agentID = ID self.habitatType = int(habitatType) self.humanPresence = bool(np.random.binomial(1,(anthro / 100),1))#False#int(random.choice([True,False])) self.predatorPresence = False self.nestInfo = None self.chickWeight = list() self.nestLocation = list...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_solver_agent(self, aname):\n # Get agent context\n sctx = self.context.solver.get(aname)\n if not isinstance(sctx, Context):\n raise CpoSolverException(\"Unknown solving agent '\" + aname + \"'. Check config.context.solver.agent parameter.\")\n if sctx.is_log_enab...
[ "0.673424", "0.66497", "0.66011393", "0.65660524", "0.6562681", "0.6551008", "0.65483594", "0.6523992", "0.6318455", "0.62691504", "0.6151852", "0.6115709", "0.61114633", "0.60810745", "0.6049386", "0.59780204", "0.59743094", "0.59542644", "0.59355146", "0.5913426", "0.583584...
0.0
-1
Return habitat type (integer) of the given agent.
def getHabitatType(self): return self.habitatType
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_type_of_habit(self,obj):\n type_of_habit = obj.habit.type_of_habit\n return type_of_habit", "def get_agent_indices_of_type(array, agent_type):\t\n\tagent_indices = np.argwhere(array == agent_type)\n\treturn agent_indices", "def getType(self):\n if (self.type == 's'):\n #...
[ "0.6339022", "0.61213976", "0.554485", "0.54386634", "0.54190695", "0.5418463", "0.54138404", "0.53895646", "0.53819895", "0.5359392", "0.53473306", "0.53356934", "0.5309831", "0.5299539", "0.52913475", "0.5267995", "0.523981", "0.5223867", "0.5218349", "0.5210069", "0.518532...
0.6218382
1
Formats the time in am/pm and returns it back
def format_time(time: int) -> str: minute = time % 100 hour = int(time / 100) if hour >= 12: if hour > 12: hour = hour -12 response = f'{hour} {minute} pm' else: response = f'{hour} {minute} am' return response
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def format_time(time):\n hour, minute = time.hour, time.minute\n period = \"am\" if hour < 12 or hour == 24 else \"pm\"\n hour = hour % 12\n if hour == 0:\n hour = 12\n return \":t:\" + str(hour) + \":\" + str(minute).rjust(2, \"0\") + period", "def format_time(self, time):\n hh = ti...
[ "0.7726085", "0.73185325", "0.72903675", "0.72406083", "0.68986374", "0.6875297", "0.6819052", "0.68142426", "0.6793375", "0.6764113", "0.6691114", "0.6633439", "0.6586422", "0.6580666", "0.6439708", "0.64335454", "0.64179015", "0.64143884", "0.6414268", "0.6384084", "0.63585...
0.7595894
1
Test to verify if status_code is 200
def test_status_code(self): assert self.list_response.status_code == 200
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_status_code(self):\n self.assertEquals(self.response.status_code, 200)", "def test_status_code(self):\n assert self.detail_response.status_code == 200", "def test_status_code(self):\n formatted_status_code = get_status_code('python')\n self.assertEqual(formatted_status_code...
[ "0.88936466", "0.8670677", "0.8592555", "0.8505382", "0.8349568", "0.83140826", "0.83053833", "0.826668", "0.82304287", "0.8203277", "0.8203277", "0.81438184", "0.81426513", "0.8132057", "0.81286323", "0.80839944", "0.8046117", "0.80358505", "0.80358505", "0.80358505", "0.803...
0.85761786
3
Test to verify if status_code is 200
def test_status_code(self): assert self.detail_response.status_code == 200
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_status_code(self):\n self.assertEquals(self.response.status_code, 200)", "def test_status_code(self):\n formatted_status_code = get_status_code('python')\n self.assertEqual(formatted_status_code, 200) #compares the test result with the result expected", "def test_status_code(self)...
[ "0.88936466", "0.8592555", "0.85761786", "0.8505382", "0.8349568", "0.83140826", "0.83053833", "0.826668", "0.82304287", "0.8203277", "0.8203277", "0.81438184", "0.81426513", "0.8132057", "0.81286323", "0.80839944", "0.8046117", "0.80358505", "0.80358505", "0.80358505", "0.80...
0.8670677
1
Read a commit message from the user and return it.
def get_commit_message_with_stdin(): print( "Please enter a commit message." " Use Ctrl-d to finish or Ctrl-c to abort.") commitmessage = [] while True: commitmessage.append(sys.stdin.readline()) if not commitmessage[-1]: break commitmessage = "".join(commitmessage) return commitmessage
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_commit_message(self):\n r = requests.get('{base}/index.txt'.format(base=self.api_base_url))\n return r.text", "def commit_msg(self) -> Optional[List[str]]:\n return self._yaml[\"commit\"].get(\"message\")", "def read_commit(self, form):\n\n db = PostsaiDB(self.config)\n ...
[ "0.70925623", "0.6745661", "0.66714114", "0.6360029", "0.6344708", "0.6279413", "0.6266167", "0.61320513", "0.6086845", "0.5962883", "0.5960415", "0.5919991", "0.58435065", "0.5829628", "0.58245236", "0.5824278", "0.57914263", "0.5764911", "0.57589155", "0.5738275", "0.568739...
0.715548
0
get or create spark context
def get_or_create_sc(type="sparkContext", name="CerebralCortex-Kernal", enable_spark_ui=False): from pyspark.sql import SparkSession ss = SparkSession.builder if name: ss.appName(name) ss.config("spark.streaming.backpressure.enabled", True) ss.config("spark.streaming.backpressure.initialRa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getSparkContext():\n conf = (SparkConf()\n .setMaster(\"local\") # run on local\n .setAppName(\"Logistic Regression\") # Name of App\n .set(\"spark.executor.memory\", \"1g\")) # Set 1 gig of memory\n sc = SparkContext(conf = conf) \n return sc", "def get_spark_context(conf=No...
[ "0.8157877", "0.8112589", "0.73943627", "0.7345505", "0.72176373", "0.71225065", "0.702145", "0.6966927", "0.67781854", "0.67504627", "0.67132294", "0.6638977", "0.66302836", "0.65896523", "0.6580868", "0.6578734", "0.6578701", "0.6546139", "0.6546139", "0.6546139", "0.654613...
0.71357316
5
go to the exam page root from main page
def to_exam_root(self): self._bottom_tab(4) self._goto("exam_icon")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _go_to_page(self):\n self.salesforce.go_to_setup_home()\n self.eda.wait_for_new_window(\"Home | Salesforce\")\n self.selenium.switch_window(\"Home | Salesforce\")\n self.salesforce.wait_until_loading_is_complete()", "def to_main(self):\n num_attempts = 0\n max_try = ...
[ "0.6486907", "0.63848364", "0.6312138", "0.62814885", "0.62814885", "0.62107074", "0.61515325", "0.60869044", "0.60384095", "0.60321206", "0.6018836", "0.60148245", "0.598375", "0.5975513", "0.59298736", "0.5912535", "0.5889935", "0.5887519", "0.5858156", "0.58440816", "0.584...
0.67589283
0
Return job ID string.
def __str__(self): return str(self._id())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def job_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"job_id\")", "def _get_job_id(self) -> str:\n return self.split_name[2][3:]", "def _get_job_id(self):\n return uuid.uuid4().hex", "def job_id(self):\n return self._job_id", "def job_id(self):\n return self._pr...
[ "0.8901857", "0.8629227", "0.8201229", "0.8092779", "0.7983968", "0.79754436", "0.79657495", "0.78958243", "0.78833807", "0.7769949", "0.77153236", "0.767876", "0.7675292", "0.7618979", "0.7569767", "0.7456451", "0.7445517", "0.7399612", "0.73531973", "0.73531973", "0.7333188...
0.0
-1
Return the name of the cluster job.
def name(self): return self._id()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def job_name(self) -> str:\n return pulumi.get(self, \"job_name\")", "def name(self):\n return self._job", "def job_name(self):\n return self._stub.List(self._message).job_name", "def get_job_name(self) -> Text:\n return self._job_name", "def job_name(self) -> str:\n return s...
[ "0.8287319", "0.8225645", "0.8162553", "0.8026767", "0.80012196", "0.7952225", "0.7952225", "0.7905167", "0.78427595", "0.7825245", "0.7806414", "0.7643695", "0.7643695", "0.760637", "0.7547269", "0.7547269", "0.7547269", "0.7547269", "0.7547269", "0.7499029", "0.7499029", ...
0.0
-1
Return the status of the cluster job.
def status(self): return self._status
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getClusterStatus(self):\n data = self.connect('get','cluster/status', None)\n return data", "def status(self):\n return self.job_proto.status", "def get_status(self):\n\t\treturn call_sdk_function('PrlJob_GetStatus', self.handle)", "def get_status(self):\n url = \"data_request...
[ "0.7837157", "0.77732414", "0.7676472", "0.7521254", "0.7507368", "0.74757385", "0.73318505", "0.72635925", "0.72172624", "0.7165556", "0.7162144", "0.71574455", "0.7134243", "0.7094901", "0.70175815", "0.6980884", "0.6862862", "0.68544084", "0.6852705", "0.68246293", "0.6798...
0.0
-1
create instance of flask app with test client
def client(): flask_app = create_app("testing") test_client = flask_app.test_client() # create app context ctx = flask_app.app_context() ctx.push() yield test_client """ TESTS RUN HERE """ ctx.pop()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def client():\n return app.test_client()", "def client(app: Flask) -> FlaskClient:\n return app.test_client()", "def app_client(app) -> Flask:\n app.testing = True\n app.response_class = JSONResponse\n return app.test_client()", "def client(app):\n return app.test_client()", "def client(a...
[ "0.83049715", "0.82507235", "0.82389295", "0.82149965", "0.82149965", "0.82149965", "0.82149965", "0.82149965", "0.82149965", "0.82149965", "0.82149965", "0.82149965", "0.82109016", "0.82009155", "0.81224453", "0.8097574", "0.7974656", "0.78868157", "0.78801835", "0.7871654", ...
0.7744363
25
Invalidate outputs of this node
def invalidateOutputs(self): all_outputs = self.getFullOutputs() for node_id in all_outputs: if self.model.existNode(node_id): self.model.getNode(node_id).silentInvalidate()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear_outputs(self):\n self.outputs = []", "def remove_all_outputs(self):\n self._outs.clear()", "def remove_output(nb):\n for cell in nb['cells']:\n if 'outputs' in cell:\n cell['outputs'] = []", "def clear(self):\n # we want to use self.inputs.clear() but it's ...
[ "0.69874203", "0.6359119", "0.62072235", "0.61870223", "0.61360806", "0.60123605", "0.596732", "0.5965166", "0.59340876", "0.59026974", "0.5896651", "0.5895035", "0.58629483", "0.57549393", "0.57481575", "0.5743056", "0.57326853", "0.570272", "0.5686179", "0.56697345", "0.565...
0.80363137
0
Set up the sensor platform.
def setup_platform(hass, config, add_entities, discovery_info=None): api_list = hass.data[DOMAIN][DATA] entities = [] for tado in api_list: # Create zone sensors zones = tado.zones devices = tado.devices for zone in zones: zone_type = zone["type"] i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_sensors(self, configs):\n self.__sensors = self.setup_components(configs, 'scale_client.sensors')", "def setup_platform(\n hass: HomeAssistant,\n config: ConfigType,\n add_entities: AddEntitiesCallback,\n discovery_info: DiscoveryInfoType | None = None,\n) -> None:\n name = config...
[ "0.7161053", "0.7153387", "0.7075047", "0.7040154", "0.6979527", "0.6920127", "0.6885005", "0.6857596", "0.68458396", "0.6802712", "0.680186", "0.677836", "0.67364186", "0.67142266", "0.67105585", "0.6710512", "0.6702681", "0.6694298", "0.6671031", "0.6669839", "0.6637563", ...
0.0
-1
Initialize of the Tado Sensor.
def __init__(self, tado, zone_name, zone_id, zone_variable): self._tado = tado self.zone_name = zone_name self.zone_id = zone_id self.zone_variable = zone_variable self._unique_id = f"{zone_variable} {zone_id} {tado.device_id}" self._state = None self._state_at...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self) -> None:\n self.sensor = serial.Serial(config.DEVICE)\n super().__init__()", "def _initialize(self):\n self.flush()\n print(\"Initializing sensor...\")\n try:\n self.get_sample()\n print('Initialization successful')\n except:\n ...
[ "0.7044184", "0.7005467", "0.6894087", "0.67948544", "0.6769476", "0.6659158", "0.66283876", "0.66155255", "0.65899575", "0.65589267", "0.6515959", "0.6501444", "0.6483881", "0.6471495", "0.6425903", "0.64154685", "0.6410433", "0.63809276", "0.6369167", "0.6355475", "0.634680...
0.0
-1
Return the name of the sensor.
def name(self): return f"{self.zone_name} {self.zone_variable}"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self._sensor.name", "def get_sensor_name(self):\n return self.data[1]", "def name(self):\n return self.device.device_data[self.device_id]['name'] + \\\n f' {self._sensor_type}'", "def name(self):\n return f\"{self._name} {SENSOR_TYPES[self.senso...
[ "0.91896784", "0.9168378", "0.890185", "0.8770976", "0.8511273", "0.8479953", "0.844435", "0.8299758", "0.8186503", "0.8105667", "0.8079737", "0.8066149", "0.8049647", "0.7700968", "0.7612295", "0.7611456", "0.7600605", "0.7600605", "0.7600605", "0.75392073", "0.75166553", ...
0.0
-1
Return the state attributes.
def device_state_attributes(self): return self._state_attributes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_attributes(self):\n return self._attributes", "def state_attributes(self):\n return self._attributes", "def device_state_attributes(self):\r\n return self.attributes", "def device_state_attributes(self):\n return self._state_attrs", "def device_state_attributes(self):\...
[ "0.8953404", "0.8953404", "0.85239846", "0.8366765", "0.8366765", "0.8363429", "0.83362615", "0.8334551", "0.8310377", "0.8292682", "0.8289349", "0.8289349", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.828...
0.82236886
26
Initialize of the Tado Sensor.
def __init__(self, tado, device_name, device_id, device_variable): self._tado = tado self.device_name = device_name self.device_id = device_id self.device_variable = device_variable self._unique_id = f"{device_variable} {device_id} {tado.device_id}" self._state = None ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self) -> None:\n self.sensor = serial.Serial(config.DEVICE)\n super().__init__()", "def _initialize(self):\n self.flush()\n print(\"Initializing sensor...\")\n try:\n self.get_sample()\n print('Initialization successful')\n except:\n ...
[ "0.7043086", "0.7004321", "0.689426", "0.67932975", "0.6768979", "0.665847", "0.66269547", "0.66144633", "0.6589928", "0.65586334", "0.65009403", "0.6483048", "0.64696705", "0.6425338", "0.6414107", "0.64087695", "0.6379069", "0.6369041", "0.6354811", "0.63460577", "0.6344817...
0.651638
10
Return the name of the sensor.
def name(self): return f"{self.device_name} {self.device_variable}"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self._sensor.name", "def get_sensor_name(self):\n return self.data[1]", "def name(self):\n return self.device.device_data[self.device_id]['name'] + \\\n f' {self._sensor_type}'", "def name(self):\n return f\"{self._name} {SENSOR_TYPES[self.senso...
[ "0.91893077", "0.91680735", "0.89015853", "0.87704504", "0.85108286", "0.8479386", "0.8444154", "0.8299531", "0.81861234", "0.8105427", "0.8078726", "0.80649143", "0.804929", "0.770065", "0.76117194", "0.7611273", "0.76001656", "0.76001656", "0.76001656", "0.75384134", "0.751...
0.7415863
22
Get the file name and guid
def getFilenamesAndGuid(thisfile): pfn = str(thisfile.getElementsByTagName("pfn")[0].getAttribute("name")) filename = os.path.basename(pfn)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_file_guid(file):\r\n\r\n try:\r\n return str(file.url_guid).replace('-', '')\r\n except FileUpload.DoesNotExist:\r\n return ''", "def get_file_name(self):\n return str(self.get_file())", "def filename(self):\n return '%s%s' % (self.identifier, self.extension)", "def ...
[ "0.73126644", "0.7245074", "0.72184175", "0.72061604", "0.7130262", "0.7124688", "0.7057672", "0.70453507", "0.69740105", "0.69689745", "0.69574416", "0.69195664", "0.6917901", "0.69004595", "0.68388283", "0.6831425", "0.67936087", "0.67669797", "0.6696421", "0.6678754", "0.6...
0.72149426
3
Get the file name and guid
def getFilenamesAndGuid(thisfile): pfn = str(thisfile.getElementsByTagName("pfn")[0].getAttribute("name")) filename = os.path.basename(pfn) pfn = os.path.abspath(pfn) lfn = '' if (thisfile.getElementsByTagName("lfn") != []): lfn = str(thisfile.getElementsByTagName("lfn")[0].getAttribute("n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_file_guid(file):\r\n\r\n try:\r\n return str(file.url_guid).replace('-', '')\r\n except FileUpload.DoesNotExist:\r\n return ''", "def get_file_name(self):\n return str(self.get_file())", "def filename(self):\n return '%s%s' % (self.identifier, self.extension)", "def ...
[ "0.73126644", "0.7245074", "0.72184175", "0.72149426", "0.72061604", "0.7130262", "0.7124688", "0.7057672", "0.70453507", "0.69740105", "0.69689745", "0.69574416", "0.69195664", "0.69004595", "0.68388283", "0.6831425", "0.67936087", "0.67669797", "0.6696421", "0.6678754", "0....
0.6917901
13
Get the list of space tokens
def getSpaceTokenList(token, listSEs, jobCloud, analysisJob, fileListLength, si, alt=False): # check if there are any space tokens if token == [''] and fileListLength > 1: # correct length of empty list token = token*fileListLength tolog("Corrected length of empty space token list from ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_tokens(self) -> List[str]:\n return self.tokens", "def get_tokens(self):\n\t\treturn self.get_starttokens() + self.get_endtokens()", "def getTokens(self):\n list = []\n for i in range(self.startIdx, self.endIdx + 1):\n token = self.sentence[i]\n list.append(to...
[ "0.75143534", "0.74559", "0.7310991", "0.7276783", "0.7168467", "0.71526885", "0.71526885", "0.71526885", "0.7142839", "0.7142481", "0.70369035", "0.6953375", "0.6897877", "0.68596196", "0.6840465", "0.68287206", "0.6816993", "0.68082255", "0.68077147", "0.68025273", "0.67779...
0.6578032
33
Sets self._hp to val, clips between 0 and self._max_hp if val is out of bounds
def set_hp(self, val) -> None: self._player_data.hp = np.clip(val, 0, self.character_data.max_hp)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def restore_hp(self):\n if self.cur_hp < self.max_hp:\n self.cur_hp += 1\n self.hp_rect.width = (self.cur_hp / self.max_hp) * self.hp_bar_width", "def health(self, hp: float) -> None:\n if hp > self.MIN_HEALTH:\n self.__health = hp\n else:\n self._...
[ "0.6915073", "0.66689795", "0.641652", "0.596276", "0.58309484", "0.57140654", "0.566834", "0.5574543", "0.5562832", "0.5553714", "0.5481304", "0.5471656", "0.54420847", "0.537472", "0.53698236", "0.5367253", "0.5355457", "0.5346497", "0.5333844", "0.53233695", "0.5311334", ...
0.87461185
0
Return the boolean truth value of this trit. Only the positive trit is considered True in the boolean (twovalued logic) sense, the other trits are False.
def __bool__(self): return (self.value == POS)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __bool__(self):\n return bool(self._value)", "def is_bool(self):\n answer = self._call('is_bool')\n return answer.yes", "def __bool__(self):\n return bool(self.get_value())", "def is_bool(self):\n return self.op in self.cond_ops", "def is_bool(self):\n return s...
[ "0.71584207", "0.7018425", "0.69773513", "0.6962845", "0.6962845", "0.68862647", "0.68840426", "0.67453605", "0.66986436", "0.66971415", "0.6678788", "0.6672788", "0.6658126", "0.6651965", "0.6644796", "0.6640763", "0.6637573", "0.65245223", "0.65032786", "0.6444738", "0.6441...
0.60746473
54
Return whether this sequence contains no nonzero trits. Note that this returns True for empty sequences.
def is_zero(self): for t in self: if t != TRIT_ZERO: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_empty(self):\n return self._sum() == 0", "def is_empty(self):\n return ch.prod(ch.tensor(self.x.shape)).item() == 0", "def isEmpty(self):\n return self.n == 0", "def isZero(self):\n return self.count == 0", "def isEmpty(self):\n return self._N == 0", "def __nonzero__...
[ "0.75379956", "0.73575705", "0.73557997", "0.73251754", "0.72908723", "0.72718203", "0.7198352", "0.713327", "0.713327", "0.71322346", "0.71091735", "0.7097988", "0.70741564", "0.70741564", "0.70429665", "0.70014215", "0.6995336", "0.69777495", "0.6963483", "0.69589055", "0.6...
0.79994154
0
Open selected build(s) in web browser
def build_browse(ctx, args): for build_id in args: data = ctx.obj.get_build_by_build_id(build_id) webbrowser.open(data['webUrl'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _open_browser(self, single_doc_html):\n url = os.path.join(\"file://\", DOC_PATH, \"build\", \"html\", single_doc_html)\n webbrowser.open(url, new=2)", "def _open_browser(self, single_doc_html):\n url = os.path.join(\n \"file://\", DOC_PATH, \"build\", \"html\", single_doc_htm...
[ "0.7009013", "0.6935488", "0.6881924", "0.68322414", "0.6786367", "0.6734594", "0.6690917", "0.6633779", "0.6610568", "0.65711063", "0.6560799", "0.64294404", "0.6420453", "0.6396", "0.63842267", "0.6317444", "0.6312837", "0.6309538", "0.6306566", "0.6264318", "0.6222327", ...
0.8342757
0
Creates a graph from saved GraphDef file and returns a Graph object.
def create_inception_graph(): with tf.Session() as sess: model_filename = os.path.join( FLAGS['model_dir'], 'classify_image_graph_def.pb') with gfile.FastGFile(model_filename, 'rb') as f: graph_def = tf.GraphDef() graph_def.ParseFromString(f.read()) b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_graph():\n # Creates graph from saved graph_def.pb.\n with tf.gfile.FastGFile(os.path.join(\n FLAGS.model_dir, pbfilename), 'rb') as f:\n graph_def = tf.GraphDef()\n graph_def.ParseFromString(f.read())\n _ = tf.import_graph_def(graph_def, name='')", "def create_graph():\n # Creates ...
[ "0.7890266", "0.78362", "0.7805612", "0.7740064", "0.76060516", "0.7559079", "0.7468323", "0.7405169", "0.72379494", "0.7231459", "0.7206656", "0.7146248", "0.7093667", "0.70155597", "0.70097727", "0.691572", "0.690586", "0.6876043", "0.6864873", "0.6863852", "0.6860719", "...
0.0
-1
Attach a lot of summaries to a Tensor (for TensorBoard visualization).
def variable_summaries(var): with tf.name_scope('summaries'): mean = tf.reduce_mean(var) tf.summary.scalar('mean', mean) with tf.name_scope('stddev'): stddev = tf.sqrt(tf.reduce_mean(tf.square(var - mean))) tf.summary.scalar('stddev', stddev) tf.summary.scalar('m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_summary(self):\n for k, v in self.metrics.items():\n tf.summary.scalar(k, v)\n \n self.summary_op = tf.summary.merge_all()", "def build_summaries(self):\n\n # Loss summary.\n tf.summary.scalar('loss', self.loss)\n\n merged = tf.summary.merge_all()\n self.summary_op = merged\n ...
[ "0.7071791", "0.6970259", "0.6970259", "0.6800256", "0.67872906", "0.67407334", "0.66669947", "0.66576326", "0.66193783", "0.66085786", "0.6595776", "0.65836215", "0.6581151", "0.655297", "0.6500364", "0.6459978", "0.64145213", "0.6294558", "0.62718755", "0.62713677", "0.6265...
0.5519074
98
Adds a new softmax and fullyconnected layer for training. We need to retrain the top layer to identify our new classes, so this function adds the right operations to the graph, along with some variables to hold the weights, and then sets up all the gradients for the backward pass.
def add_final_training_ops(class_count, final_tensor_name, bottleneck_tensor): with tf.name_scope('input'): bottleneck_input = tf.placeholder_with_default( bottleneck_tensor, shape=[None, BOTTLENECK_TENSOR_SIZE], name='BottleneckInputPlaceholder') ground_truth_input = tf.pla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward_pass(self):\n # Have to use one_hot labels since sparse softmax doesn't allow\n # second derivatives.\n one_hot_train_labels = tf.one_hot(self.data.train_labels, self.way)\n train_embeddings_ = self.embedding_fn(\n self.data.train_images,\n depth_multiplier=self.depth_multipli...
[ "0.69957", "0.68413377", "0.6801121", "0.6746523", "0.66904783", "0.66889435", "0.6647734", "0.6598884", "0.64854693", "0.6466062", "0.6463312", "0.6462675", "0.6453182", "0.64386916", "0.64257425", "0.6322342", "0.63161224", "0.6315125", "0.63068974", "0.6284771", "0.6233209...
0.6742902
4
Convert this entities to python dictionary ready to be dumped to json. Also make sure to recursively go through all the WorkflowInformation entities. Can later be used to rebuild the BurstInformation entity.
def to_dict(self): workflows = [wf.to_dict() for wf in self.get_workflows()] dict_data = deepcopy(self._data_dict) dict_data[self.KEY_BI_WORKFLOWS] = workflows return dict_data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_dict(self):\n print(\"\\n\\nSTARTING...\")\n ea = db.session.query(entity_assets).filter(entity_assets.c.entity_id == self.id).all()\n print(\"\\n\\nmade it\", ea)\n em = db.session.query(entity_meters).filter(entity_meters.c.entity_id == self.id).all()\n est = db.session....
[ "0.71634704", "0.6744064", "0.65631396", "0.65446454", "0.6401836", "0.6379266", "0.6336514", "0.6323715", "0.6318159", "0.63168836", "0.6316238", "0.6270852", "0.6244957", "0.6244357", "0.62025416", "0.61851233", "0.6173681", "0.6156775", "0.6110615", "0.6106025", "0.6102761...
0.5970527
33
Convert this entities to python dictionary ready to be dumped to json. Also make sure to recursively go through all the WorkflowStepInformation entities. Can later be used to rebuild the WorkflowInformation entity.
def to_dict(self): view_steps = [view_step.to_dict() for view_step in self.get_view_steps()] wf_steps = [wf_step.to_dict() for wf_step in self.get_workflow_steps()] dict_data = deepcopy(self._data_dict) dict_data[self.KEY_VIEW_STEPS] = view_steps dict_data[self.KEY_WF_STEPS] = wf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toDictionary(self):\n result = {}\n for key, method in self.__dict__.iteritems():\n if (key == '_Entity__instanced'): continue\n\n value = method()\n if (isinstance(value, Entity)):\n value = value.toDictionary()\n elif (isinstance(value,...
[ "0.6912778", "0.67918354", "0.6641958", "0.6553141", "0.62753654", "0.6273456", "0.62655944", "0.6229435", "0.6131419", "0.6101043", "0.60893375", "0.60867786", "0.60802245", "0.6065724", "0.60623425", "0.6062028", "0.6049311", "0.59632164", "0.5962158", "0.59437186", "0.5925...
0.64175284
4
Return the portlet that was saved on this entity. Should only be called if beforehand 'set_portlet' was called on this entity.
def get_portlet(self): if self.PORTLET_IDENT not in self._data_dict: return None return dao.get_portlet_by_identifier(self._data_dict[self.PORTLET_IDENT])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def portlet_id(self):\n return id(self)", "def getPortalObject( self ):\n return self", "def get_parent_for_portlets(self):\n if self.id == 1:\n return get_default_shop()\n else:\n return lfs_get_object_or_404(Page, pk=1)", "def set_portlet(self, portlet):\n ...
[ "0.6229671", "0.56374687", "0.5418071", "0.53069323", "0.5205599", "0.5198436", "0.51958925", "0.5159317", "0.51292104", "0.50123507", "0.4980597", "0.4959603", "0.4959603", "0.49528733", "0.49255514", "0.48724377", "0.48724377", "0.48579565", "0.4846376", "0.48375604", "0.48...
0.7904204
0
Just create a new WorkflowViewStepInformation entity with the given input dictionary.
def load_from_dict(input_dict): return WorkflowViewStepInformation(input_dict)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_from_dict(input_dict):\n return WorkflowStepInformation(input_dict)", "def load_from_dict(input_dict):\n view_steps = [WorkflowViewStepInformation.load_from_dict(data) \n for data in input_dict[WorkflowInformation.KEY_VIEW_STEPS]]\n wf_steps = ...
[ "0.7625794", "0.7013634", "0.625054", "0.625054", "0.5901205", "0.5753252", "0.56630635", "0.56424564", "0.5552752", "0.55285144", "0.54138285", "0.541064", "0.5357521", "0.53087825", "0.5304357", "0.5301243", "0.5277259", "0.52623874", "0.5245709", "0.5235822", "0.52241594",...
0.8120858
0
Return the operation that was saved on this entity. Should only be called if beforehand 'set_operation' was called on this entity.
def get_operagion(self): if self.OP_GID not in self._data_dict: return None return dao.get_operation_by_gid(self._data_dict.get(self.OP_GID, None))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getOp(self):\n return self._OPERATION", "def current_operation(self):\n return self._current_operation", "def current_operation(self):\n return self._current_operation", "def operation(self) -> str:\n return self._operation", "def operation(cls):\n return relationship...
[ "0.7935082", "0.76592726", "0.76592726", "0.74537057", "0.7252906", "0.7252906", "0.71628183", "0.7086954", "0.7086954", "0.7069782", "0.6922303", "0.68606395", "0.68204015", "0.67819554", "0.67588156", "0.6665729", "0.66505915", "0.66272", "0.655608", "0.6500425", "0.6488419...
0.71664774
6
Return a random character between ASCII 32 and 126 (i.e. spaces, symbols, letters, and digits). All characters returned will be nicely printable.
def random_state(numStates, numLetters): next_state = random.randrange(0, numStates) replace_letter = random.randrange(0, numLetters) movement = random.randrange(0, 2) return { "next_state": next_state, "replace_letter": replace_letter, "movement": movement }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random_charachter() -> chr:\r\n return chr(int(random.randrange(32, 126, 1)))", "def random_char():\n return chr(random.randrange(32, 126, 1))", "def get_random_char():\n return chr(randint(97, 122))", "def RandomAlphaNumChar():\n num = random.randint(0, 26 + 26 + 10)\n if num < 26:\n retur...
[ "0.8830241", "0.8716843", "0.8302129", "0.81229544", "0.78954685", "0.77026635", "0.7412084", "0.7321563", "0.72080076", "0.72037554", "0.717497", "0.70809203", "0.6990806", "0.68588734", "0.68489367", "0.6808381", "0.67977935", "0.67955863", "0.6784961", "0.67774403", "0.677...
0.0
-1
List of best `computeroutes` configurations for this router's network. See compute.Route resource for available attributes.
def best_routes(self) -> Sequence['outputs.GetRouterStatusBestRouteResult']: return pulumi.get(self, "best_routes")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def best_config(self):\n if self.total_propose == 0:\n idx = random.randint(0, len(self.config_list))\n result = {'config_id': idx,\n 'score': -1 * float('inf'),\n 'configs': self.config_list[idx]}\n return [result]\n else:\n ...
[ "0.5671168", "0.56002706", "0.5563659", "0.5209191", "0.5200414", "0.5198498", "0.51846653", "0.5143087", "0.50800574", "0.5067204", "0.5055715", "0.5052228", "0.5052228", "0.50073296", "0.49790263", "0.49629116", "0.49178708", "0.49154183", "0.4902326", "0.48918152", "0.4882...
0.5703108
0
Escape special characters from a command so that it can be passed as a double quoted (" ") string in a (ba)sh command.
def sh_escape(command): command = command.replace("\\", "\\\\") command = command.replace("$", r'\$') command = command.replace('"', r'\"') command = command.replace('`', r'\`') return command
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sh_quote_safe(arg):\n return (\"'\" + str(arg).replace(\"'\", r\"'\\''\") + \"'\")", "def _quote(self, arg):\n arg = arg.replace('\\\\', '\\\\\\\\')\n arg = arg.replace('\"', '\\\\\"')\n return '\"%s\"' % arg", "def sh_quote_unsafe(arg):\n return ('\"' + _DQUOTE_RE.sub(r'\\1\\1\\...
[ "0.71227795", "0.7096507", "0.70825183", "0.6959612", "0.6934037", "0.69244194", "0.6778915", "0.6745683", "0.6719159", "0.67011964", "0.6647718", "0.66419667", "0.65683866", "0.6548638", "0.651951", "0.64733046", "0.6451334", "0.64511096", "0.6422595", "0.6367236", "0.635057...
0.8537555
0
this method loads a trie
def load_trie(counts): if os.path.exists('words_trie.marisa'): trie = marisa_trie.Trie() trie.load('words_trie.marisa') else: trie = marisa_trie.Trie(counts.keys()) trie.save('words_trie.marisa') return trie
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def loadTrie(self):\n for file in self._gram_files:\n trie_file = getTrieFile(os.path.basename(file), self._pickle_dir)\n with open(trie_file, 'rb') as fd:\n self._tries.append(pickle.load(fd))", "def __init__(self):\r\n self.trie = {}", "def retrieve_trie(sel...
[ "0.71454096", "0.69764745", "0.69761264", "0.69396645", "0.69396645", "0.69396645", "0.69396645", "0.6932094", "0.6791796", "0.6778495", "0.6729265", "0.6695448", "0.6694302", "0.6694302", "0.66236806", "0.66236806", "0.6616495", "0.6558629", "0.6512014", "0.64526457", "0.643...
0.684731
8
Connection name of the Cloud SQL instance used in connection strings.
def connection_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "connection_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connection_name(self) -> str:\n return pulumi.get(self, \"connection_name\")", "def connection_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"connection_name\")", "def database_name(self) -> str:\n return pulumi.get(self, \"database_name\")", "def getConnectionName(sel...
[ "0.81795406", "0.7576764", "0.7065248", "0.70221233", "0.6914813", "0.683571", "0.67776614", "0.67594033", "0.6709607", "0.66911197", "0.667662", "0.66761816", "0.6667056", "0.6583285", "0.6577576", "0.65334857", "0.6489954", "0.64871365", "0.64439005", "0.64005417", "0.63913...
0.7493815
2
This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.
def etag(self) -> Optional[pulumi.Input[str]]: warnings.warn("""This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.""", DeprecationWarning) pulumi.log.warn("""etag is deprecated: This field is deprecated and will be removed fro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def settings_version(self) -> str:\n return pulumi.get(self, \"settings_version\")", "def output_version_format(self) -> str:\n warnings.warn(\"\"\"Deprecated. This field is unused.\"\"\", DeprecationWarning)\n pulumi.log.warn(\"\"\"output_version_format is deprecated: Deprecated. This field...
[ "0.710721", "0.57799554", "0.57665646", "0.57665646", "0.5756154", "0.5754775", "0.56942314", "0.5638642", "0.5513889", "0.54554707", "0.54523", "0.5389307", "0.5339242", "0.5282502", "0.5193535", "0.5167269", "0.5159607", "0.51526934", "0.5124931", "0.5109181", "0.5100242", ...
0.57183206
6
The current software version on the instance.
def maintenance_version(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "maintenance_version")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def software_version(self) -> str:\n return self.data.get(Attribute.SOFTWARE_VERSION)", "def version(self):\n return self.get_current_version()", "def software_version(self) -> str:\n return self.camera_info[\"main_sw_version\"]", "def sw_version(self) -> str | None:\n return self...
[ "0.85168064", "0.82145387", "0.82048416", "0.80843496", "0.80584466", "0.80137014", "0.79851043", "0.79303586", "0.78017116", "0.78017116", "0.78017116", "0.78017116", "0.77904105", "0.77904105", "0.77904105", "0.7778217", "0.77434903", "0.773746", "0.766631", "0.7649244", "0...
0.0
-1
The name of the instance which will act as primary in the replication setup.
def master_instance_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "master_instance_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def master_instance_name(self) -> str:\n return pulumi.get(self, \"master_instance_name\")", "def primary_name_server(self) -> str:\n return pulumi.get(self, \"primary_name_server\")", "def master_instance_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"master_instance_name\"...
[ "0.82031125", "0.79779893", "0.7943739", "0.7382919", "0.7219182", "0.71792084", "0.7131665", "0.708143", "0.7048929", "0.7048929", "0.70269376", "0.6989914", "0.6906967", "0.6896248", "0.68723893", "0.68592256", "0.68494916", "0.68494916", "0.68494916", "0.68494916", "0.6849...
0.77533096
3
The maximum disk size of the instance in bytes.
def max_disk_size(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "max_disk_size")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_disk_size(self) -> str:\n return pulumi.get(self, \"max_disk_size\")", "def max_disk_size(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"max_disk_size\")", "def max_size_bytes(self) -> Optional[float]:\n return pulumi.get(self, \"max_size_bytes\")", "def maximum_size(se...
[ "0.9081589", "0.8789356", "0.806168", "0.80428505", "0.80195016", "0.79826194", "0.79826194", "0.7939504", "0.79164445", "0.77908987", "0.7760818", "0.7760818", "0.7721978", "0.7719844", "0.7706931", "0.76886636", "0.7660995", "0.7658464", "0.7597128", "0.7510604", "0.7475623...
0.84711045
2
Name of the Cloud SQL instance. This does not include the project ID.
def name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self._client.project_name + '/instances/' + self.instance_id", "def cloud_name(self):\n return self._cloud_name", "def name(self):\n _LOGGER.debug(self._shelly_cloud_device_name + ' >>> ' +\n self._shelly_cloud_entity_name + ' >>> name() >>> ' ...
[ "0.82408255", "0.72820383", "0.7166519", "0.7141045", "0.70123327", "0.70090204", "0.70012414", "0.69451183", "0.69451183", "0.6935064", "0.69150794", "0.6914176", "0.68695205", "0.6863732", "0.68619806", "0.68598646", "0.67754424", "0.67754424", "0.67754424", "0.67754424", "...
0.0
-1
The start time of any upcoming scheduled maintenance for this instance.
def scheduled_maintenance(self) -> Optional[pulumi.Input['SqlScheduledMaintenanceArgs']]: return pulumi.get(self, "scheduled_maintenance")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def maintenance_window_start_time(self) -> pulumi.Output['outputs.BrokerMaintenanceWindowStartTime']:\n return pulumi.get(self, \"maintenance_window_start_time\")", "def start_time(self):\n return self.__start", "def start_time(self):\n pass", "def maintenance_window_start_time(self) -> ...
[ "0.74400115", "0.73701787", "0.7295396", "0.72721374", "0.72721374", "0.7230234", "0.72214323", "0.72214323", "0.72214323", "0.72214323", "0.72214323", "0.72214323", "0.72214323", "0.72214323", "0.7218906", "0.7218906", "0.71962094", "0.7183786", "0.71649396", "0.71412766", "...
0.0
-1
The URI of this resource.
def self_link(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "self_link")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uri(self) -> str:\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return s...
[ "0.88131094", "0.87184894", "0.87184894", "0.87184894", "0.87184894", "0.87184894", "0.87184894", "0.86957633", "0.8589977", "0.8530575", "0.83784175", "0.82684904", "0.82548934", "0.81537634", "0.8080312", "0.8044302", "0.804392", "0.8011002", "0.79373264", "0.78654665", "0....
0.0
-1
The service account email address assigned to the instance.\\This property is readonly.
def service_account_email_address(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "service_account_email_address")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service_account_email_address(self) -> str:\n return pulumi.get(self, \"service_account_email_address\")", "def service_account_email_address(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"service_account_email_address\")", "def email_address(self) -> str:\n return self._emai...
[ "0.8540649", "0.8340232", "0.79287213", "0.7803455", "0.7663944", "0.75938857", "0.75938857", "0.75938857", "0.75938857", "0.7592874", "0.75346684", "0.75152725", "0.7507502", "0.7492078", "0.7492078", "0.7482742", "0.7472985", "0.74440634", "0.74440634", "0.74440634", "0.743...
0.82330644
2
The current serving state of the Cloud SQL instance.
def state(self) -> Optional[pulumi.Input['InstanceState']]: return pulumi.get(self, "state")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status(self):\n return self.microblaze.state", "def state(self) -> str:\n return str(self.coordinator.server_status)", "def get_status(self):\n return self._conn_state", "def server_status(self):\n return self._server_status", "def status(self):\n return self.state", ...
[ "0.7107327", "0.66442436", "0.65739805", "0.65454876", "0.6507662", "0.64906347", "0.63984823", "0.63689315", "0.6310545", "0.6296189", "0.62279505", "0.62262386", "0.62054956", "0.6194882", "0.6148098", "0.61463165", "0.6121624", "0.6107632", "0.6106236", "0.6083054", "0.606...
0.0
-1
Connection name of the Cloud SQL instance used in connection strings.
def connection_name(self) -> pulumi.Output[str]: return pulumi.get(self, "connection_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connection_name(self) -> str:\n return pulumi.get(self, \"connection_name\")", "def connection_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"connection_name\")", "def database_name(self) -> str:\n return pulumi.get(self, \"database_name\")", "def getConnectio...
[ "0.8179065", "0.7493981", "0.7064641", "0.70212114", "0.6913428", "0.68352664", "0.6777818", "0.6759108", "0.67088455", "0.6690942", "0.667614", "0.66759604", "0.66685355", "0.6583245", "0.65767694", "0.65326995", "0.64884615", "0.6487971", "0.6443129", "0.6400055", "0.639146...
0.7576788
1
This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.
def etag(self) -> pulumi.Output[str]: warnings.warn("""This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.""", DeprecationWarning) pulumi.log.warn("""etag is deprecated: This field is deprecated and will be removed from a futur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def settings_version(self) -> str:\n return pulumi.get(self, \"settings_version\")", "def output_version_format(self) -> str:\n warnings.warn(\"\"\"Deprecated. This field is unused.\"\"\", DeprecationWarning)\n pulumi.log.warn(\"\"\"output_version_format is deprecated: Deprecated. This field...
[ "0.710621", "0.5780798", "0.5765775", "0.5765775", "0.57557285", "0.5718192", "0.5693694", "0.5637216", "0.5512594", "0.5454009", "0.5451743", "0.5388087", "0.5338008", "0.5281544", "0.5192456", "0.51658887", "0.5159132", "0.5150841", "0.5123596", "0.5108042", "0.5102565", ...
0.5754418
5
The current software version on the instance.
def maintenance_version(self) -> pulumi.Output[str]: return pulumi.get(self, "maintenance_version")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def software_version(self) -> str:\n return self.data.get(Attribute.SOFTWARE_VERSION)", "def version(self):\n return self.get_current_version()", "def software_version(self) -> str:\n return self.camera_info[\"main_sw_version\"]", "def sw_version(self) -> str | None:\n return self...
[ "0.8517211", "0.8213725", "0.82053864", "0.80839765", "0.80575514", "0.80145174", "0.7984864", "0.7929071", "0.78002846", "0.78002846", "0.78002846", "0.78002846", "0.77896225", "0.77896225", "0.77896225", "0.7777845", "0.77438027", "0.7736233", "0.76651967", "0.7648641", "0....
0.0
-1
The name of the instance which will act as primary in the replication setup.
def master_instance_name(self) -> pulumi.Output[str]: return pulumi.get(self, "master_instance_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def master_instance_name(self) -> str:\n return pulumi.get(self, \"master_instance_name\")", "def primary_name_server(self) -> str:\n return pulumi.get(self, \"primary_name_server\")", "def master_instance_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"master_instan...
[ "0.82047457", "0.79776996", "0.77548045", "0.7386303", "0.72223026", "0.71791637", "0.713213", "0.708482", "0.70524865", "0.70524865", "0.70241857", "0.69899267", "0.69118845", "0.68993187", "0.6875062", "0.68612313", "0.68529224", "0.68529224", "0.68529224", "0.68529224", "0...
0.7945594
2
The maximum disk size of the instance in bytes.
def max_disk_size(self) -> pulumi.Output[str]: return pulumi.get(self, "max_disk_size")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_disk_size(self) -> str:\n return pulumi.get(self, \"max_disk_size\")", "def max_disk_size(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"max_disk_size\")", "def max_size_bytes(self) -> Optional[float]:\n return pulumi.get(self, \"max_size_bytes\")", "def maximu...
[ "0.9080668", "0.8470645", "0.8061531", "0.80418956", "0.8019521", "0.7982345", "0.7982345", "0.7939518", "0.791622", "0.7791719", "0.7760943", "0.7760943", "0.7720729", "0.7720243", "0.7705724", "0.76871824", "0.76612306", "0.76585156", "0.75974673", "0.75105655", "0.7475651"...
0.87882894
1
Name of the Cloud SQL instance. This does not include the project ID.
def name(self) -> pulumi.Output[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self._client.project_name + '/instances/' + self.instance_id", "def cloud_name(self):\n return self._cloud_name", "def name(self):\n _LOGGER.debug(self._shelly_cloud_device_name + ' >>> ' +\n self._shelly_cloud_entity_name + ' >>> name() >>> ' ...
[ "0.8241517", "0.7281684", "0.7165427", "0.7141217", "0.70123976", "0.7008578", "0.70008135", "0.69455564", "0.69455564", "0.6934033", "0.69147676", "0.69139934", "0.686959", "0.6863885", "0.6861637", "0.68600094", "0.6775866", "0.6775866", "0.6775866", "0.6775866", "0.6752222...
0.0
-1
The start time of any upcoming scheduled maintenance for this instance.
def scheduled_maintenance(self) -> pulumi.Output['outputs.SqlScheduledMaintenanceResponse']: return pulumi.get(self, "scheduled_maintenance")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def maintenance_window_start_time(self) -> pulumi.Output['outputs.BrokerMaintenanceWindowStartTime']:\n return pulumi.get(self, \"maintenance_window_start_time\")", "def start_time(self):\n return self.__start", "def start_time(self):\n pass", "def maintenance_window_start_time(self) -> ...
[ "0.7440252", "0.73684734", "0.72935003", "0.7273055", "0.7273055", "0.72285575", "0.72197175", "0.72197175", "0.72197175", "0.72197175", "0.72197175", "0.72197175", "0.72197175", "0.72197175", "0.721738", "0.721738", "0.71946853", "0.7182488", "0.7163239", "0.71409386", "0.71...
0.0
-1
The URI of this resource.
def self_link(self) -> pulumi.Output[str]: return pulumi.get(self, "self_link")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uri(self) -> str:\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return self._uri", "def uri(self):\n return s...
[ "0.8812683", "0.8718146", "0.8718146", "0.8718146", "0.8718146", "0.8718146", "0.8718146", "0.8695291", "0.8589555", "0.8529888", "0.83778185", "0.8267541", "0.82543814", "0.81543136", "0.8079777", "0.80435663", "0.8043164", "0.8011471", "0.7937294", "0.786632", "0.786632", ...
0.0
-1
The service account email address assigned to the instance.\\This property is readonly.
def service_account_email_address(self) -> pulumi.Output[str]: return pulumi.get(self, "service_account_email_address")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service_account_email_address(self) -> str:\n return pulumi.get(self, \"service_account_email_address\")", "def service_account_email_address(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"service_account_email_address\")", "def email_address(self) -> str:\n return s...
[ "0.8543191", "0.8235831", "0.79294664", "0.7804446", "0.7664565", "0.75937384", "0.75937384", "0.75937384", "0.75937384", "0.7590669", "0.75334173", "0.7515387", "0.7507213", "0.74948746", "0.74948746", "0.74826413", "0.7472492", "0.7444743", "0.7444743", "0.7444743", "0.7434...
0.83422476
1
The current serving state of the Cloud SQL instance.
def state(self) -> pulumi.Output[str]: return pulumi.get(self, "state")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status(self):\n return self.microblaze.state", "def state(self) -> str:\n return str(self.coordinator.server_status)", "def get_status(self):\n return self._conn_state", "def server_status(self):\n return self._server_status", "def status(self):\n return self.state", ...
[ "0.7107327", "0.66442436", "0.65739805", "0.65454876", "0.6507662", "0.64906347", "0.63984823", "0.63689315", "0.6310545", "0.6296189", "0.62279505", "0.62262386", "0.62054956", "0.6194882", "0.6148098", "0.61463165", "0.6121624", "0.6107632", "0.6106236", "0.6083054", "0.606...
0.0
-1
Validates that the current_password field is correct.
def clean_current_password(self): current_password = self.cleaned_data.get('current_password') if len(current_password) > 0: if not self.instance.check_password(current_password): self.add_error('current_password', _('Your current password was e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_current_password(self):\n if not self.user.check_password(self.cleaned_data['current_password']):\n raise forms.ValidationError('Wrong password.')\n return True", "def validate_current_password(form, field) -> None:\n if form.user is None:\n raise ValidationEr...
[ "0.878692", "0.8646536", "0.77352524", "0.7308862", "0.7253243", "0.72428316", "0.72366464", "0.723097", "0.7196515", "0.7193591", "0.71440053", "0.71327883", "0.71239513", "0.70966136", "0.7096046", "0.7087876", "0.7036529", "0.70197356", "0.70062834", "0.6964504", "0.696214...
0.84919894
2
Validates that both new password entries are equal.
def clean_new_password2(self): password1 = self.cleaned_data.get('new_password1') password2 = self.cleaned_data.get('new_password2') if password1 and password2: validate_password(password1, self.instance) if password1 != password2: self.add_error('new_pass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_password(self):\n password1 = self.cleaned_data.get('password1')\n password2 = self.cleaned_data.get('password2')\n if password1 and password2 and password1 != password2:\n raise forms.ValidationError('Passwords do not match')\n return password2", "def clean(self)...
[ "0.76834244", "0.76553345", "0.7654889", "0.7648828", "0.76043934", "0.7591285", "0.75876975", "0.7567358", "0.7567358", "0.7514976", "0.7467321", "0.7450473", "0.7447969", "0.7447969", "0.7437245", "0.74283504", "0.74109167", "0.7403912", "0.7403618", "0.7397933", "0.7391694...
0.7750816
0
Setup Client instance with test values.
def client(): return Client(**common_data.AUTH_ARGS)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setUp(self):\n self.client = api.Client(config.get_config(), api.json_handler)", "def client_setup(self):\n self.client = Client()", "def setUp(self):\n self.client = Client()", "def setUp(self):\n self.client = Client()", "def setUp(self):\n self.client = Client()", ...
[ "0.8162402", "0.81195503", "0.8071952", "0.8071952", "0.8071952", "0.8071952", "0.7969196", "0.79429394", "0.7734588", "0.76686865", "0.76686865", "0.76686865", "0.76399094", "0.75936216", "0.75550693", "0.751291", "0.75107384", "0.7497584", "0.7473147", "0.7473147", "0.74687...
0.0
-1
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
def plot_confusion_matrix(y_true, y_pred, classes, normalize=True, title='Confusion matrix', cmap=plt.cm.Blues, ax=None): cm = confusion_matrix(y_true, y_pred) if normalize: cm = cm.astype('float') / cm.sum(axis=1)[:, np.newa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_confusion_matrix(cm, classes=[0,1], normalize=False, title='Confusion matrix', print_matrix=False):\n\n if normalize:\n cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]\n print(\"Normalized confusion matrix\")\n else:\n print('Confusion matrix, without normalization')\n\n...
[ "0.8194052", "0.8095069", "0.80293566", "0.8018802", "0.799371", "0.7990971", "0.7980545", "0.7975993", "0.79609", "0.7957234", "0.7937344", "0.79343724", "0.79341805", "0.79310715", "0.7926063", "0.79241866", "0.7923726", "0.79229325", "0.79226404", "0.79218584", "0.7917542"...
0.0
-1
Mean of the sum of the probas of predicted labels by ranking.
def mean_sum_proba_rank(self, proba_pred): return proba_pred.sum(axis=1).mean()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mrr(self, ranking):\n return np.mean(ranking)", "def predict_proba(self):\n if self.rank_prob is None:\n raise ValueError('No results available. Did you already call predict(...)?')\n\n return np.array([sum(map(lambda x: x[1], result)) / len(result) for result in self.rank_pro...
[ "0.68926406", "0.66016316", "0.6540639", "0.6502815", "0.6500498", "0.64435244", "0.64071697", "0.63483125", "0.6339095", "0.6327947", "0.6308335", "0.6292286", "0.62765217", "0.62531674", "0.6236935", "0.6236734", "0.62030566", "0.62012285", "0.61865544", "0.6166541", "0.616...
0.7116372
0
Controller for the app home page.
def home(request): gefs_layers,geoserver_wms_url,geoserver_workspace = listLayers() context = { 'gefs_layers':json.dumps(gefs_layers), 'geoserver_wms_url':geoserver_wms_url, 'geoserver_workspace':geoserver_workspace } return render(request, 'gefs/home.html', context)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def home():\n payload = manager.get_payload()\n return render_template('index.html', payload=payload)", "def home():\n\n\treturn render_template('index.html', title='Home Page',\n\t\t\t\t\t\t year=datetime.now().year)", "def home(self, *args, **kwargs):\n pass", "def home(request):\n\treturn r...
[ "0.78027886", "0.7685395", "0.7654384", "0.7584396", "0.7558254", "0.7547364", "0.7488385", "0.7459023", "0.7447416", "0.73899287", "0.7388719", "0.7388719", "0.7388719", "0.7388719", "0.7388719", "0.7388719", "0.7388719", "0.7388719", "0.7388719", "0.7388719", "0.7383182", ...
0.0
-1
Plot an image with matplotlib
def show_image(image): plt.imshow(image, cmap='gray') plt.show()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show(image):\n fig = pyplot.figure()\n ax = fig.add_subplot(1,1,1)\n imgplot = ax.imshow(image, cmap=mpl.cm.Greys)\n imgplot.set_interpolation('nearest')\n ax.xaxis.set_ticks_position('top')\n ax.yaxis.set_ticks_position('left')\n pyplot.show()", "def show_image(path):\n img = mpimg.i...
[ "0.76425314", "0.763159", "0.7609451", "0.7608801", "0.7608801", "0.7608801", "0.75327146", "0.74777037", "0.74590474", "0.7394067", "0.73899895", "0.7371036", "0.7316413", "0.722232", "0.71974516", "0.7166849", "0.7152444", "0.7096305", "0.708788", "0.7072402", "0.7048796", ...
0.7323584
12
Returns left image previously retrieved by checkImages().
def getImageLeft(self): return self.leftImage
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetLeftImage(self):\r\n\r\n return self._leftimage", "def GetItemLeftImage(self, item):\r\n\r\n return item.GetLeftImage()", "def GetLeftImageList(self):\r\n\r\n return self._imageListLeft", "def left(self, event, number):\n\n if not hasattr(self, 'top_images'):\n v...
[ "0.82496667", "0.7528543", "0.70796824", "0.65561473", "0.64673203", "0.64662445", "0.63721764", "0.6247222", "0.6170972", "0.61557025", "0.6138585", "0.60020614", "0.5982858", "0.5972725", "0.59677976", "0.59669876", "0.59587574", "0.5935524", "0.59072673", "0.59072673", "0....
0.83531606
0
Returns the menu item id previously retrieved by checkMenuItem().
def getMenuItemID(self): return self.eventID
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetId(self,item):\r\n id = self.item_itemId.get(item)\r\n if id: return id\r\n #--Else get a new item id.\r\n id = self.nextItemId\r\n self.nextItemId += 1\r\n self.item_itemId[item] = id\r\n self.itemId_item[id] = item\r\n return id", "def get_menu_ite...
[ "0.709671", "0.70523727", "0.69765997", "0.6968587", "0.67483187", "0.67385817", "0.6720442", "0.6685133", "0.66190904", "0.65182424", "0.63155776", "0.62768465", "0.627461", "0.6238139", "0.62343234", "0.61891097", "0.618653", "0.61826724", "0.61218876", "0.6052543", "0.6050...
0.8228357
0
Rounds a number 'x' to 'p' number of significant figures.
def round_significant(x, p: int) -> np.ndarray: x = np.asarray(x) x_positive = np.where(np.isfinite(x) & (x != 0), np.abs(x), 10 ** (p - 1)) mags = 10 ** (p - 1 - np.floor(np.log10(x_positive))) return np.round(np.float32(x) * mags) / mags
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_precision(x,p):\n\n x = float(x)\n\n if x == 0.:\n return \"0.\" + \"0\"*(p-1)\n\n out = []\n\n if x < 0:\n out.append(\"-\")\n x = -x\n\n e = int(math.log10(x))\n tens = math.pow(10, e - p + 1)\n n = math.floor(x/tens)\n\n if n < math.pow(10, p - 1):\n e ...
[ "0.7293502", "0.6587418", "0.6319854", "0.62474453", "0.6188413", "0.6143279", "0.61056674", "0.60728264", "0.60695755", "0.60556185", "0.6038661", "0.5926247", "0.5923275", "0.58999515", "0.5892357", "0.58399725", "0.58399725", "0.58336896", "0.58172464", "0.5809709", "0.580...
0.68067485
1
Indicates where this entity currently resides.
def getPosition(self): return self._position
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def location(self) -> str:\n return self.metadata.location", "def location(self):\n return self.properties.get(\"location\", Location())", "def get_current_location(self):\n return self.enu_2_local()", "def location(self) -> str:\n return self.__location", "def location(self) ->...
[ "0.7027857", "0.6800661", "0.67905426", "0.677674", "0.677674", "0.677674", "0.67570925", "0.6743707", "0.67263514", "0.67263514", "0.6697957", "0.6697957", "0.6697957", "0.6697957", "0.6697957", "0.6697957", "0.6697957", "0.6697957", "0.6697957", "0.6697957", "0.6697957", ...
0.0
-1
Returns the indices of elements in a list that match 'val'"
def matchloc(alist,val): return [ilc for ilc,jlc in enumerate(alist) if jlc==val]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getIndexes(self, val):\n # Find where this value is listed. \n valNdx = (self.values == val).nonzero()[0]\n \n # If this value is not actually in those listed, then we \n # must return empty indexes\n if len(valNdx) == 0:\n start = 0\n end = 0\n ...
[ "0.72998315", "0.7224039", "0.6636536", "0.66250855", "0.66159004", "0.654293", "0.65053695", "0.64388454", "0.64315575", "0.64291763", "0.64099455", "0.63420516", "0.6315953", "0.6305117", "0.62907666", "0.62255603", "0.62049013", "0.6176437", "0.6158123", "0.6112617", "0.60...
0.75336146
0
Method to populate the list view with layers
def populateList(self): self.model = QStandardItemModel() for text in self.options: item = QStandardItem(text) # item.setData(value, Qt.UserRole) item.setCheckable(True) item.setCheckState(Qt.Unchecked) item.setDropEnabled(False) se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def layers(self): # -> LayerView:\n ...", "def refreshLayerLists(self):\n self.layers = self.iface.legendInterface().layers()\n self.lineLayerIndexMap = dict()\n self.pointLayerIndexMap = dict()\n self.lineLayerList = [] # holds the filtered layer names\n self.pointLaye...
[ "0.7480695", "0.6713793", "0.65163594", "0.6364033", "0.6233648", "0.60341275", "0.5985248", "0.5958934", "0.5958934", "0.5844208", "0.58178234", "0.5770876", "0.57708126", "0.5727334", "0.56390965", "0.5621116", "0.561126", "0.5604606", "0.5518711", "0.55067426", "0.5487317"...
0.6494038
3
Returns lagged subsequences of a given sequence.
def get_lagged_subsequences( F, sequence: Tensor, sequence_length: int, indices: List[int], subsequences_length: int = 1, ) -> Tensor: # we must have: sequence_length - lag_index - subsequences_length >= 0 # for all lag_index, hence the following assert ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_lagged_subsequences(\n sequence: torch.Tensor,\n subsequences_length: int,\n lags_seq: Optional[List[int]] = None,\n mask: Optional[torch.Tensor] = None\n) -> Tuple[torch.Tensor, Optional[torch.Tensor]]:\n batch_size = sequence.shape[0]\n num_features = sequence.shape[2]\n...
[ "0.79730827", "0.79256815", "0.5979293", "0.59698606", "0.5847689", "0.57762474", "0.5745616", "0.5531521", "0.54885876", "0.5482183", "0.5477068", "0.54522854", "0.54178095", "0.5384893", "0.537083", "0.5314072", "0.5287688", "0.5281908", "0.52717537", "0.52548593", "0.52542...
0.7920394
2