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
Format the start time value in milliseconds into a string value suitable for some of the supported output formats (ex. SRT, DFXP).
def format_start(self, msec_separator=None): return self._format_timestamp(self.start, msec_separator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_time_string(self):\r\n return time.strftime('%H:%M:%S', time.localtime(self.start_time))", "def start_delta_string(self):\r\n delta = int(self.start_time) - int(self.root().start_time)\r\n return '%02d:%02d' % (delta / 60, delta % 60)", "def format_start_time(self, data):\n return dat...
[ "0.7211427", "0.694554", "0.6940926", "0.69408184", "0.6898486", "0.67937607", "0.6674279", "0.6669438", "0.6621727", "0.66024446", "0.65528107", "0.65419763", "0.6506048", "0.6488599", "0.6479121", "0.644822", "0.6431824", "0.6426709", "0.6407089", "0.63642865", "0.62467617"...
0.7278223
0
Format the end time value in milliseconds into a string value suitable for some of the supported output formats (ex. SRT, DFXP).
def format_end(self, msec_separator=None): return self._format_timestamp(self.end, msec_separator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_end_time(self):\n return str(self._end_time)", "def time_to_string(value):\n if value == gst.CLOCK_TIME_NONE:\n return \"--:--:--.---\"\n ms = value / gst.MSECOND\n sec = ms / 1000\n ms = ms % 1000\n mins = sec / 60\n sec = sec % 60\n hours = mins / 60\n mins = mins ...
[ "0.6815521", "0.6603939", "0.65964884", "0.6524921", "0.6407275", "0.63813806", "0.62996995", "0.6276818", "0.6273975", "0.62591654", "0.6211727", "0.6205493", "0.6162361", "0.61458087", "0.61345196", "0.61345196", "0.6096289", "0.6042201", "0.6038373", "0.6019248", "0.601772...
0.7332041
0
Removes ``www``. from the beginning of the address. Only for routing purposes. `` and ``test.com/login/`` should find the same tenant.
def remove_www(hostname: str) -> str: if hostname.startswith("www."): return hostname[4:] return hostname
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def redirect_nonwww():\n urlparts = urlparse(request.url)\n if urlparts.netloc != 'www.mealscount.com':\n return redirect('https://www.mealscount.com/', code=301)", "def host_cleanup(host):\n if not host.startswith('https://'):\n host = 'https://' + host # Add schema\n host...
[ "0.5988731", "0.5965765", "0.5824932", "0.5604685", "0.55799305", "0.55328894", "0.55265784", "0.5500028", "0.54909337", "0.5481837", "0.5471048", "0.5420226", "0.5415641", "0.5383179", "0.53325796", "0.5331758", "0.5331336", "0.5311387", "0.5299343", "0.5293716", "0.52858394...
0.7954738
0
Apply dropout to input and hidden tensors (`hx`), and pass them to the torch GRUCell.
def forward( self, input: Tensor, # [batch, input_size], hx: Optional[Tensor] = None, # [batch, hidden_size] ) -> Tensor: # [batch, hidden_size] if hx is None: # Imitate behaviour of parent class: hx is assumed zero if not given. hx = torch.zeros( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self, x):\n x, self.hidden = self.gru(x, self.hidden)\n self.detach_hidden()\n x = self.dropout(x)\n x = self.out(x)\n return x", "def xdropout(self, inputs):\n mask = tf.cast(\n 1\n - tf.compat.v1.distributions.Bernoulli(probs=1.0 - sel...
[ "0.63158464", "0.61924565", "0.61344814", "0.6040275", "0.59563404", "0.59526837", "0.5945194", "0.589468", "0.5870516", "0.58595157", "0.5839773", "0.57184356", "0.5685813", "0.56556416", "0.5635242", "0.5629377", "0.5625709", "0.5618553", "0.5608568", "0.5607993", "0.558091...
0.68315345
0
Reset layer weights. Calls reset_parameters() of internal nn.modules
def reset_parameters(self) -> None: for i in range(self._num_edge_types): nn.init.xavier_uniform_(self.edge_message_functions[i].weight,) nn.init.constant_(self.edge_message_functions[i].bias, val=0.0) nn.init.orthogonal_(self.rnn.weight_hh) nn.init.xavier_uniform_(self.r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self):\n ih = (param for name, param in self.named_parameters() if 'weight_ih' in name)\n hh = (param for name, param in self.named_parameters() if 'weight_hh' in name)\n b = (param for name, param in self.named_parameters() if 'bias' in name)\n for t in ih:\n torch...
[ "0.8114691", "0.80887413", "0.80887413", "0.80887413", "0.77468145", "0.77122325", "0.7650901", "0.75666755", "0.7551285", "0.75419897", "0.74973166", "0.74819", "0.74630076", "0.7438601", "0.7422444", "0.74210846", "0.74027705", "0.735709", "0.7320795", "0.73007655", "0.7297...
0.7380051
17
Reset weights. Calls reset_parameters() of internal gnn blocks.
def reset_parameters(self) -> None: for gnn_block in self.gnn_blocks: gnn_block.reset_parameters()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self):\n ih = (param for name, param in self.named_parameters() if 'weight_ih' in name)\n hh = (param for name, param in self.named_parameters() if 'weight_hh' in name)\n b = (param for name, param in self.named_parameters() if 'bias' in name)\n for t in ih:\n torch...
[ "0.79932714", "0.79035616", "0.7834367", "0.78313875", "0.78313875", "0.78313875", "0.767987", "0.7626979", "0.76036555", "0.75981075", "0.75656754", "0.7537917", "0.7389454", "0.73858106", "0.73021424", "0.72516924", "0.7217353", "0.7180251", "0.7162394", "0.71096396", "0.70...
0.80934423
0
GNNEncoder outputs initial node embedding with dim. hidden_dim stacked with the processed output from the GNN (also of shape hidden_dim).
def output_dim(self) -> int: return 2 * self._hidden_dim
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encode(self, n_dimension=2, learning_rate=0.01, training_epochs=10, batch_size=400):\n X = tf.placeholder(tf.float32,[None, self.n_input])\n tf.set_random_seed(50)\n \n \n n_hidden_layer1 = int(math.pow(2, int(2*math.log(self.n_input,2)/3+math.log(n_dimension,2)/3)))\n ...
[ "0.68017566", "0.6478982", "0.63106364", "0.63058406", "0.6286394", "0.62127715", "0.6211216", "0.61363405", "0.6123324", "0.61028683", "0.60963625", "0.60943544", "0.6076765", "0.6036925", "0.5999666", "0.5998077", "0.59928495", "0.59321535", "0.59314495", "0.59126854", "0.5...
0.0
-1
Return the fields of a dataclass instance as a new dictionary mapping field names to field values.
def asdict(obj, *, dict_factory=dict): if not _is_dataclass_instance(obj): raise TypeError("asdict() should be called on dataclass instances") return _asdict_inner(obj, dict_factory)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fields(class_or_instance):\n\n # Might it be worth caching this, per class?\n try:\n fields_dict = getattr(class_or_instance, _FIELDS)\n except AttributeError:\n raise TypeError(\"must be called with a dataclass type or instance\")\n\n return fields_dict", "def declared_fields(class...
[ "0.79191566", "0.7322691", "0.7007178", "0.69605213", "0.68861115", "0.6854017", "0.6834418", "0.67091984", "0.6668334", "0.65869576", "0.6585059", "0.6585014", "0.65818274", "0.6540093", "0.65354383", "0.6530365", "0.65301424", "0.6496168", "0.64941", "0.64941", "0.64941", ...
0.0
-1
' Utility method to round a number of seconds given. '
def roundSeconds(seconds): minutes = seconds / 60 remainder = seconds % 60 if(remainder >= 30): minutes += 1 return minutes * 60
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def round_time(time):\n t_min = time.minute % 5\n t_sec = time.second\n t_mic = time.microsecond\n time = time - timedelta(minutes=t_min, seconds=t_sec, microseconds=t_mic)\n return time", "def seconds_to_minutes(seconds: int, round: Optional[bool] = True) -> Union[int, float]:\n return int(sec...
[ "0.70922214", "0.690971", "0.6848357", "0.67908466", "0.6730991", "0.6717476", "0.66908914", "0.6672902", "0.664795", "0.66186845", "0.6597363", "0.65158933", "0.6506588", "0.6506448", "0.64764565", "0.64697945", "0.64634943", "0.6400345", "0.63910776", "0.63588965", "0.63536...
0.76798344
0
r"""Number of graphs in the dataset. Return int
def __len__(self): return self.N.shape[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ngraphs(self):\n return len(self.__graph_list)", "def number_of_data_nodes(self):\n return int(self._data['number_of_data_nodes'])", "def graph_count(self) -> int:\n return int(self.graph_tuple_stats.graph_count)", "def graph_data_size(self) -> int:\n return int(self.graph_tuple_stats...
[ "0.81952626", "0.77314955", "0.7668739", "0.7506845", "0.7428712", "0.7361741", "0.73092073", "0.7281369", "0.723843", "0.70561796", "0.6998622", "0.6969466", "0.6893426", "0.6886653", "0.676338", "0.673413", "0.6698097", "0.6639831", "0.65961", "0.6585589", "0.657005", "0....
0.0
-1
Gets the full associated with the filename in the catalog.
def get_key_from_values(f, catalog): L_keys = [] L_values = [] for path, files in catalog.items(): if f in catalog[path]: return path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_filename(self):\n \n for f in os.listdir(self.get_directory()):\n if os.path.isfile(os.path.join(self.get_directory(), f)):\n return f\n \n return None", "def get_filename(filename):\n \n return utilities.get_filename(filename)",...
[ "0.65398574", "0.64793366", "0.6454564", "0.6429676", "0.64156085", "0.637961", "0.63664633", "0.6365864", "0.6311962", "0.6309322", "0.62764984", "0.62592703", "0.624536", "0.6238837", "0.62382144", "0.6236166", "0.62275565", "0.6214974", "0.6208357", "0.6186894", "0.6171039...
0.0
-1
Returns a dictionary of matched files as values and their respective directories as keys.
def catalog_files(directory): catalog = {} for dirpath, filename, files in os.walk(directory): catalog[dirpath] = files for dirpath, files in catalog.items(): matched_files = recognize_files(files) catalog[dirpath] = matched_files return catalog
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_files(current_dir, filename_pattern=\".*\"):\n files_dict = {}\n for root, dirs, files in os.walk(current_dir):\n files_dict.update(\n {filename: os.path.join(root, filename) for filename in files if re.match(filename_pattern, filename)}\n )\n return files_dict", "def ge...
[ "0.70753866", "0.70396566", "0.6896063", "0.6785947", "0.6500741", "0.6493186", "0.6489259", "0.6445012", "0.63776696", "0.6354776", "0.6290571", "0.62700784", "0.62406796", "0.62179244", "0.62060076", "0.62021506", "0.6194463", "0.61174506", "0.61078846", "0.6047192", "0.604...
0.65918416
4
Return the default parameters to use for this instrument.
def default_pypeit_par(cls): par = super().default_pypeit_par() # Ignore PCA par['calibrations']['slitedges']['sync_predict'] = 'nearest' par['calibrations']['slitedges']['bound_detector'] = True # Set pixel flat combination method par['calibrations']['pixelflatframe'][...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _default_params(self) -> dict[str, Any]:\n return {\n \"max_tokens\": self.max_tokens,\n \"temperature\": self.temperature,\n \"top_p\": self.top_p,\n \"logprobs\": self.logprobs,\n \"echo\": self.echo,\n \"stop_sequences\": self.stop_seq...
[ "0.78049785", "0.7762155", "0.7675555", "0.766228", "0.763464", "0.75622946", "0.7501994", "0.7304109", "0.7288433", "0.7284649", "0.72001016", "0.71704555", "0.71413034", "0.71157616", "0.7108974", "0.7082232", "0.7082014", "0.7081288", "0.7058132", "0.70476836", "0.69716156...
0.0
-1
Return the default parameters to use for this instrument.
def default_pypeit_par(cls): par = super().default_pypeit_par() # Ignore PCA par['calibrations']['slitedges']['sync_predict'] = 'nearest' par['calibrations']['slitedges']['bound_detector'] = True # Set pixel flat combination method par['calibrations']['pixelflatframe'][...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _default_params(self) -> dict[str, Any]:\n return {\n \"max_tokens\": self.max_tokens,\n \"temperature\": self.temperature,\n \"top_p\": self.top_p,\n \"logprobs\": self.logprobs,\n \"echo\": self.echo,\n \"stop_sequences\": self.stop_seq...
[ "0.78049785", "0.7762155", "0.7675555", "0.766228", "0.763464", "0.75622946", "0.7501994", "0.7304109", "0.7288433", "0.7284649", "0.72001016", "0.71704555", "0.71413034", "0.71157616", "0.7108974", "0.7082232", "0.7082014", "0.7081288", "0.7058132", "0.70476836", "0.69716156...
0.0
-1
BrandedFoodObjectCountryDetails a model defined in Swagger
def __init__(self, english_speaking: int=None, non_english_speaking: int=None): # noqa: E501 self.swagger_types = { 'english_speaking': int, 'non_english_speaking': int } self.attribute_map = { 'english_speaking': 'english_speaking', 'non_english...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_dict(cls, dikt) -> 'BrandedFoodObjectCountryDetails':\n return util.deserialize_model(dikt, cls)", "def __init__(self, **kwargs):\n APIBaseModel.__init__(self, **kwargs)\n self.flavor = Flavor(**self.flavor)", "def __init__(self):\n self.swagger_types = {\n 'id_c...
[ "0.65900415", "0.54613686", "0.53906906", "0.52766675", "0.5211504", "0.5159307", "0.50590795", "0.50522697", "0.504735", "0.50425875", "0.5020249", "0.49608222", "0.4940289", "0.4921281", "0.49094605", "0.4900009", "0.48872507", "0.48720148", "0.4853465", "0.4808178", "0.480...
0.0
-1
Sets the non_english_speaking of this BrandedFoodObjectCountryDetails.
def non_english_speaking(self, non_english_speaking: int): self._non_english_speaking = non_english_speaking
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def non_english_speaking(self) -> int:\n return self._non_english_speaking", "def set_as_not_feedback(self):\n self.feedback = False", "def disableVocolaTakesLanguages(self):\n key = \"VocolaTakesLanguages\"\n self.userregnl.set(key, 0)", "def __init__(self, english_speaking: int=...
[ "0.52364606", "0.52303463", "0.522108", "0.5217315", "0.5214619", "0.5182632", "0.51249015", "0.5087386", "0.5066", "0.50034666", "0.4968789", "0.4954232", "0.49344936", "0.49313223", "0.49189222", "0.49162045", "0.48993996", "0.48977357", "0.48833433", "0.4876455", "0.483357...
0.79648656
0
Opens a new database connection if there is none yet for the current application context.
def get_db(): if not hasattr(g, 'sqlite_db'): g.sqlite_db = connect_db() return g.sqlite_db
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def db_open():\n if not hasattr(g, 'sqlite_db'):\n g.sqlite_db = db_connect()\n return g.sqlite_db", "def open_database(self):\n if self._conn is None:\n self._conn = sqlite3.connect(self._db_path)", "def open_db(db_name: str = DB_NAME) -> DBConnection:\n return sqlite3.connec...
[ "0.77378136", "0.75821716", "0.7317949", "0.7168726", "0.7023119", "0.6966575", "0.6955527", "0.69501823", "0.6898128", "0.684287", "0.68288016", "0.6818829", "0.68058383", "0.67962265", "0.67700136", "0.6762472", "0.6752249", "0.6747864", "0.67321193", "0.67017424", "0.66881...
0.64031434
86
Get the root path of the current git repository
def get_root_path(self) -> Path: return self._path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_git_root():\n path = os.getcwd()\n git_repo = git.Repo(path, search_parent_directories=True)\n git_root = git_repo.git.rev_parse(\"--show-toplevel\")\n return git_root", "def get_git_root(path):\n\tgit_repo = git.Repo(path, search_parent_directories=True)\n\tgit_root = git_repo.git.rev_parse(...
[ "0.86095345", "0.8399939", "0.8356494", "0.8233204", "0.806679", "0.7743427", "0.75872004", "0.75515807", "0.7468636", "0.7427645", "0.7386061", "0.73626816", "0.7349098", "0.73400205", "0.7295785", "0.7281447", "0.7257806", "0.71958536", "0.7189713", "0.71467507", "0.7140026...
0.6516531
71
Get indices of true values.
def batch_boolean_mask(mask): # [batch_size, num_values] mask = tf.to_int32(mask) # [batch_size] num_true = tf.reduce_sum(mask, 1) # [] max_true = tf.reduce_max(num_true) # [batch_size, max_true] gathered_mask, true_indices = tf.nn.top_k(mask, max_true) gathered_mask = tf.cast(gathered_mask, tf.boo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def masked_indices(mask):\n\treturn np.nonzero(np.ravel(mask,order='C'))[0]", "def nonzero_indices(a):\n return (np.nonzero(a)[0])", "def bool_2_indices(bool_array):\n if ~isinstance(bool_array, np.ndarray):\n bool_array = np.array(bool_array)\n if bool_array[-1]:\n bool_array[-1] = Fals...
[ "0.6826024", "0.6795301", "0.6791858", "0.6759969", "0.672798", "0.6626752", "0.65397984", "0.65014577", "0.6481604", "0.6453055", "0.6425831", "0.635586", "0.6305538", "0.63024646", "0.6289012", "0.6267977", "0.6254181", "0.6239728", "0.62218106", "0.62199265", "0.621006", ...
0.0
-1
Gather indices into any dimension rather than dimension 0 of a tensor. Gathering is usually performed on dimension 0 of a tensor, such as a word embedding matrix. In the case where the target is batched, such as selecting a token or a set of tokens for each sequence in the batch, then this function
def batch_gather(tensors, indices): is_singleton = not isinstance(tensors, (list, tuple)) if is_singleton: tensors = [tensors] sequence_dim = len(indices.get_shape()) - 1 if sequence_dim > 1: batch_shape = shape(tensors[0])[:sequence_dim] batch_size = 1 for s in batch_shape: batch_size *...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def batch_gather(self, values, indices):\n\n idx = indices.unsqueeze(-1)\n idx = idx.int()\n size = indices.shape[0]\n rg = torch.arange(size, dtype=torch.int32).to(self.device)\n rg = rg.unsqueeze(-1)\n rg = rg.repeat([1, int(indices.shape[-1])])\n rg = rg.unsqueez...
[ "0.6665934", "0.6622428", "0.651188", "0.641203", "0.63652503", "0.6278413", "0.6264033", "0.61847204", "0.61328024", "0.61262345", "0.6085974", "0.60439724", "0.60379404", "0.60332716", "0.60314023", "0.60243285", "0.5997268", "0.5976041", "0.5966571", "0.5952064", "0.594880...
0.65790045
2
Reshape the projectons to apply softmax on each head
def _prepare_proj(self, x): b, l, d = x.size() return x.view(b, l, self.num_heads, self.d_head).transpose(1, 2).contiguous().view(b * self.num_heads, l, self.d_head)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def softmax(x):\n # (n_samples, n_classes)\n if len(x.shape) == 2:\n row_max = np.max(x, axis=1)\n x -= row_max.reshape((x.shape[0], 1))\n x = np.exp(x)\n row_sum = np.sum(x, axis=1)\n x /= row_sum.reshape((x.shape[0], 1))\n # (n_samples, n_tasks, n_classes)\n elif len(x.shape) == 3:\n row_ma...
[ "0.66047174", "0.6451085", "0.6424011", "0.6413043", "0.63913476", "0.63808346", "0.63367933", "0.63236886", "0.62037456", "0.6186977", "0.61717725", "0.6146727", "0.6142847", "0.61424714", "0.61395836", "0.61377966", "0.6073124", "0.6068041", "0.6058806", "0.60530776", "0.60...
0.0
-1
Controls the marines and medivacs in this drop, depending on the current mode. Returns True if it needs to regroup, else False.
async def handle(self, units_by_tag : Dict[int, Unit]) -> bool: alive_medivac_tags = self._medivac_tags & units_by_tag.keys() medivacs : Units = Units({units_by_tag[m_tag] for m_tag in alive_medivac_tags}, self._bot_object) self._medivac_tags = alive_medivac_tags loaded_marines...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def can_group(self) -> bool:\n return (\n self.all_icon is not None and\n self.all_name is not None\n )", "def IsDocked(self):\r\n \r\n return not self.HasFlag(self.optionFloating)", "def fuse_across_groups_of_beats(self) -> bool:\n return self._fuse_acr...
[ "0.55120707", "0.5495609", "0.5403977", "0.5359457", "0.5359457", "0.53358984", "0.51398915", "0.51116204", "0.5064731", "0.5059418", "0.50130737", "0.48907724", "0.48585862", "0.4840413", "0.48364085", "0.48255184", "0.48113787", "0.47980297", "0.479788", "0.47918457", "0.47...
0.0
-1
Test the api can delete a book.
def test_delete(self): test_user = get_user_model().objects.create_user(username='tester',password='pass') test_user.save() test_book = Book.objects.create( publisher = test_user, name = 'Title of Blog', description = 'Words about the blog' ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_book(self):\n\n\t\t# create book\n\t\tadd_book = {\n\t\t\t'title': 'Hello Books',\n\t\t\t'isbn': '5698745124'\n\t\t}\n\n\t\tlogin_data = self.login_test_user()\n\t\ttoken = login_data['auth_token']\n\t\tres = self.client.post(\n\t\t\tf'{URL_BOOKS}',\n\t\t\theaders=dict(Authorization=f'Bearer {token...
[ "0.8442967", "0.8335653", "0.7947527", "0.7756091", "0.7602016", "0.72454536", "0.69890076", "0.6983235", "0.6972409", "0.69536626", "0.6949433", "0.6940423", "0.6901441", "0.6901441", "0.69014114", "0.6897056", "0.68726975", "0.686629", "0.68317264", "0.68172264", "0.6816295...
0.78341246
3
Get a queryset filtered by perms for the user.
def for_user(self, user, perms, any_perm=False, with_superuser=False): if not has_guardian: return self.all() perms = [perms] if isinstance(perms, str) else perms return get_objects_for_user( user, perms, klass=self.model, any_perm=an...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self, *args, **kwargs):\n qs = super().get_queryset(*args, **kwargs).filter(user=self.request.user)\n return qs", "def get_queryset(self, request):\n qs = super().get_queryset(request)\n return qs.filter(user=request.user)", "def get_queryset(self):\n return ...
[ "0.67729986", "0.64800894", "0.6447097", "0.6425419", "0.6320951", "0.6320826", "0.6319103", "0.62921715", "0.62558794", "0.61816895", "0.61814433", "0.6141446", "0.6141446", "0.6141446", "0.61404645", "0.6115105", "0.61137193", "0.6113468", "0.61040956", "0.6076187", "0.6071...
0.6972515
0
convert_from_vanilla(value) Convert a value into a CommonTagCategory enum.
def convert_from_vanilla(value: Union[int, TagCategory]) -> 'CommonGameTagCategory': if value is None or value == TagCategory.INVALID: return CommonGameTagCategory.INVALID if isinstance(value, CommonGameTagCategory): return value mapping = dict() if hasattr(TagCat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_to_vanilla(value: 'CommonGameTagCategory') -> Union[TagCategory, None]:\n if value is None or value == CommonGameTagCategory.INVALID:\n return TagCategory.INVALID\n if isinstance(value, TagCategory):\n return value\n mapping = dict()\n if hasattr(TagCat...
[ "0.82687", "0.693499", "0.68909585", "0.679486", "0.6744596", "0.6589648", "0.649274", "0.5615093", "0.55661035", "0.52417326", "0.5211465", "0.516138", "0.5094616", "0.5071677", "0.49403134", "0.49266583", "0.489508", "0.48770243", "0.4857484", "0.4838501", "0.4813751", "0...
0.85750157
0
Returns the path to the main directory of a dataset.
def dataset_path(dataset, work_dir=consts.WORK_DIR): return join_path(work_dir, consts.DATA_DIR, dataset)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dataset_path(cls):\n basepath = os.path.dirname(__file__)\n filepath = os.path.abspath(\n os.path.join(basepath, \"..\", \"datasets\", get_env('DATA_FILENAME')))\n return filepath", "def dataset_dir(self):\n return self._dataset_dir", "def get_dataset_path(dataset: st...
[ "0.8022111", "0.793983", "0.7724553", "0.760623", "0.743435", "0.7395934", "0.7334338", "0.7223761", "0.7215189", "0.7193677", "0.717177", "0.71455944", "0.7145291", "0.71405476", "0.7116877", "0.7081616", "0.7075519", "0.7021476", "0.6978904", "0.6968586", "0.6968586", "0....
0.82498145
0
Returns the path to the indices directory of a dataset.
def indexes_path(dataset, work_dir=consts.WORK_DIR): return join_path(dataset_path(dataset, work_dir), consts.INDEXES_DIR)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dataset_path(dataset, work_dir=consts.WORK_DIR):\r\n return join_path(work_dir, consts.DATA_DIR, dataset)", "def dataset_dir(self):\n return self._dataset_dir", "def out_path(dataset, work_dir=consts.WORK_DIR):\r\n return join_path(dataset_path(dataset, work_dir), consts.OUTPUT_DIR)", "def i...
[ "0.69170535", "0.6482714", "0.635061", "0.6305727", "0.6247156", "0.62084097", "0.61789423", "0.6034254", "0.60136056", "0.59544593", "0.5881047", "0.5877882", "0.5877271", "0.5871797", "0.58517206", "0.58000183", "0.5799459", "0.57658565", "0.5761805", "0.5743858", "0.572568...
0.8147882
0
CUDA version of the calc X function Find the ration of the active layer to the protective layer minus 1
def calc_x(x, ALD,PL): ## jit works row, col = cuda.grid(2) if row < ALD.shape[0] and col < ALD.shape[1]: if PL[row,col] != 0 : x[row,col] = (ALD[row,col] / PL[row,col]) - 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def offset_to_uvd(self, x):\n self.batch_size = x.shape[0]\n self.W = x.shape[2]\n self.H = x.shape[3] \n self.D = 5\n self.grid_size = self.W*self.H*self.D\n \n grid_linear = x.reshape(self.batch_size, 64, -1)\n\n index = torch.from_numpy(np.asarray(n...
[ "0.6363954", "0.6331525", "0.6094874", "0.59222585", "0.58650947", "0.5860942", "0.5820519", "0.5804815", "0.57717425", "0.572791", "0.5713983", "0.5708005", "0.5705112", "0.5674194", "0.56690884", "0.5661184", "0.565243", "0.5651396", "0.5645875", "0.56375295", "0.5633886", ...
0.6823909
0
CUDA sigmoid 2 poi calculation function POI = K / C + A x ^ B
def calc_new_sig2_poi(new_poi, params, x, above_idx): K_a = 0 C_a = 1 A_a = 2 B_a = 3 K_b = 4 C_b = 5 A_b = 6 B_b = 7 row, col = cuda.grid(2) if row < x.shape[0] and col < x.shape[1]: if above_idx[row,col] == True: new_poi[row, col] = params[K_a] / \ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _lambda(xi):#xi=xis; xi=Phi.dot(w); xi = 0\n div0 = np.divide(1, (2*xi),where=xi!=0)\n return (div0 * (sigmoid(xi)-(1/2)))", "def sigmoid(z):\n \n return 1 / (1 + np.exp(-z))#your code here", "def sigmoid(z):\n return 1 / (1 + e ** -z)", "def calc_new_hill_poi(new_poi, params, x, above_id...
[ "0.6254849", "0.6156578", "0.60991484", "0.60180855", "0.597135", "0.5947934", "0.5933495", "0.5902696", "0.58800155", "0.5854712", "0.58530974", "0.5828795", "0.58283114", "0.58182395", "0.58182395", "0.58182395", "0.5814351", "0.58121985", "0.5807147", "0.5797886", "0.57957...
0.6284754
0
CUDA sigmoid poi calculation function POI = A2 + (A1 A2) / (1. + exp((x x0) / dx))
def calc_new_sig_poi(new_poi, params, x, above_idx): A1_a = 0 A2_a = 1 x0_a = 2 dx_a = 3 A1_b = 4 A2_b = 5 x0_b = 6 dx_b = 7 row, col = cuda.grid(2) if row < x.shape[0] and col < x.shape[1]: if above_idx[row,col] == True: new_poi[row, col] = params[A2_a]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _lambda(xi):#xi=xis; xi=Phi.dot(w); xi = 0\n div0 = np.divide(1, (2*xi),where=xi!=0)\n return (div0 * (sigmoid(xi)-(1/2)))", "def sigmoid(z):\n \n return 1 / (1 + np.exp(-z))#your code here", "def sigmoid(x):\r\n return 1 / (1 + np.exp(-x))", "def sigmoid(X):\n return 1 / (1 + np.exp(-...
[ "0.6552296", "0.6512669", "0.6466521", "0.64438874", "0.64438874", "0.64080256", "0.64080256", "0.64080256", "0.64080256", "0.64080256", "0.64080256", "0.6405294", "0.6388431", "0.6380154", "0.6361779", "0.636121", "0.636121", "0.63585955", "0.6335652", "0.6326919", "0.632422...
0.6070556
46
CUDA calc change. Calculates cohort the change for each cell.
def calc_change (change_amnts, rate_of_transition, from_cohort, present): row, col = cuda.grid(2) if row < from_cohort.shape[0] and col < from_cohort.shape[1]: change_amnts[row,col] = \ rate_of_transition[row,col] * from_cohort[row,col] if present[row, col] and change_amnts[row, co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_concentrations_batch(self): \n #--- Update the cell concentrations ---\n # dX_i/dt = mu_i*(1-rmp/100)*X_i*(1 - sum(i,(1-rmp/100)X(i))/carrying_capacity) or \n # (X_i(t+dt) - X_i(t))/dt = mu*(1-rmp/100)*X_i(t)*(1 - sum(i,(1-rmp/100)*X_i(t))/carrying_capacity)\n # where rmp is...
[ "0.56052387", "0.5582978", "0.54880106", "0.5454546", "0.544207", "0.54047835", "0.53826034", "0.53276867", "0.53138334", "0.5265648", "0.5238402", "0.52302736", "0.5151833", "0.5149516", "0.5089221", "0.5061779", "0.5051967", "0.5027821", "0.50277597", "0.50079554", "0.49970...
0.7268781
0
Use the given API key config specified by `keyID` during subsequent API calls
def useKeyID(self, keyID): if keyID not in self._data["keys"]: raise ConfigException("keyID does not exist: %s" % keyID) self._keyID = keyID
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_api_key(new_api_key):\n global api_key\n api_key = new_api_key", "def SetAPIKey(self, api_key):\n self._api_key = api_key", "def SetAPIKey(self, api_key):\n self._api_key = api_key", "def update_key(self, key):\n self._api_key = key", "def api_key(self, api_key):\n\n self....
[ "0.7007791", "0.6857665", "0.6857665", "0.67050457", "0.65302604", "0.6447463", "0.64085895", "0.6387832", "0.6359355", "0.63579786", "0.6354722", "0.63433", "0.6312342", "0.6309244", "0.6299176", "0.6263985", "0.6216683", "0.6193545", "0.6170056", "0.61216277", "0.6082163", ...
0.7160212
0
Retrieve a value from the config object.
def get(self, item, default=None): return self._data.get(item, default)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config_value(self, name):\r\n if name in self.config_values:\r\n return self.config_values[name]", "def _get_config_value(self, section, key):\n return config.get(section, key)", "def get_value(self, key):\n if key not in self._config:\n raise ValueError(\"%s ...
[ "0.79466707", "0.76257545", "0.76161593", "0.7457241", "0.73098373", "0.7299716", "0.70943105", "0.7071661", "0.70542556", "0.7045792", "0.70316285", "0.7028973", "0.7017211", "0.6988061", "0.6980378", "0.6949928", "0.69200706", "0.69194895", "0.68644893", "0.68601465", "0.68...
0.0
-1
Build kite from provided lines.
def fromLines(cls, listOfLine: list): points = cls.edgeToVertex(listOfLine) return cls.fromPoints(points)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_lines(cls, lines: List[str], mode: str):\n for line in lines:\n if line.startswith('Original Input'):\n _input = line[line.find(':') + 1 :].strip()\n elif line.startswith('Predicted Str'):\n pred = line[line.find(':') + 1 :].strip()\n e...
[ "0.5886205", "0.58646333", "0.57949644", "0.5779631", "0.56817114", "0.56526357", "0.5643199", "0.56321484", "0.562157", "0.5617317", "0.5614852", "0.5596618", "0.5578691", "0.5562098", "0.55486816", "0.55486816", "0.5541226", "0.55305016", "0.5530339", "0.5527023", "0.552382...
0.0
-1
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
def adjust_learning_rate(opt, optimizer, epoch): lr = opt.learning_rate * (0.1 ** (epoch // opt.lr_update)) for param_group in optimizer.param_groups: param_group['lr'] = lr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def adjust_learning_rate(init_lr, optimizer, epoch, n=100):\n init_lr = init_lr * (0.1 ** (epoch // n))\n print('learning rate : ', init_lr)\n for param_group in optimizer.param_groups:\n param_group['lr'] = init_lr", "def adjust_learning_rate(start_lr, optimizer, epoch, total_epoch_num):\n #l...
[ "0.79135466", "0.7906959", "0.78501177", "0.77753556", "0.7734022", "0.77317274", "0.7722737", "0.77221584", "0.7719314", "0.7709071", "0.7693548", "0.76741743", "0.766576", "0.766576", "0.766576", "0.7655009", "0.76420027", "0.7639289", "0.76378644", "0.7626088", "0.7624756"...
0.0
-1
Computes the precision for the specified values of k
def accuracy(output, target, topk=(1,)): maxk = max(topk) batch_size = target.size(0) _, pred = output.topk(maxk, 1, True, True) pred = pred.t() correct = pred.eq(target.view(1, -1).expand_as(pred)) res = [] for k in topk: correct_k = correct[:k].view(-1).float().sum(0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def precision(gt, pred, k):\n k = min(len(pred), k)\n den = min(len(gt), k)\n return sum([int(pred[i] in gt) for i in range(k)]) / den", "def precision_at_k(r, k):\n assert k >= 1\n r = np.asarray(r)[:k] != 0\n if r.size != k:\n raise ValueError('Relevance score length < k')\...
[ "0.7643041", "0.7418986", "0.7418119", "0.7270918", "0.7245867", "0.7244652", "0.72375184", "0.72214437", "0.7210162", "0.7058879", "0.6851859", "0.6786372", "0.6783499", "0.67681795", "0.6727462", "0.67179555", "0.67179555", "0.67179555", "0.67179555", "0.67179555", "0.67179...
0.0
-1
Polynomial decay of learning rate
def poly_lr_scheduler(optimizer, init_lr, iter, lr_decay_iter=1, max_iter=300, power=0.9): # if iter % lr_decay_iter or iter > max_iter: # return optimizer lr = init_lr * (1 - iter / max_iter) ** power optimizer.param_groups[0]['lr'] = lr return lr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lr_decay(step):\n return(alpha / (1 + decay_rate * step))", "def decay_learning_rate(initial_learning_rate, i, n_iterations):\n return initial_learning_rate * np.exp(-i / n_iterations)", "def learning_rate_decay(alpha, decay_rate, global_step, decay_step):\n epoc_number = int(global_st...
[ "0.7101829", "0.7059696", "0.6914346", "0.6776829", "0.67757654", "0.67602867", "0.67482287", "0.6728288", "0.67137057", "0.67137057", "0.6695183", "0.66131467", "0.65852076", "0.6568543", "0.6567431", "0.65560806", "0.6546024", "0.6538584", "0.65287113", "0.6522781", "0.6497...
0.57691336
93
Transform a 2D array in onehot format (depth is num_classes), to a 2D array with only 1 channel, where each pixel value is the classified class key. Arguments
def reverse_one_hot(image): # w = image.shape[0] # h = image.shape[1] # x = np.zeros([w,h,1]) # for i in range(0, w): # for j in range(0, h): # index, value = max(enumerate(image[i, j, :]), key=operator.itemgetter(1)) # x[i, j] = index image = image.permute(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_one_hot(arr, num_classes):\n arr = arr.data.astype(int)\n a = np.zeros((arr.shape[0], num_classes))\n a[np.arange(len(a)), arr] = 1\n return tensor.Tensor(a, requires_grad=True)", "def to_one_hot(arr, num_classes):\n arr = arr.data.astype(int)\n a = np.zeros((arr.shape[0], num_classes))\...
[ "0.8408257", "0.8408257", "0.8315677", "0.80681765", "0.7958623", "0.7928876", "0.78777206", "0.78674495", "0.78674495", "0.78674495", "0.78674495", "0.7864283", "0.78628916", "0.786034", "0.78562695", "0.7805977", "0.77559763", "0.7714744", "0.7673732", "0.76737237", "0.7657...
0.0
-1
categorical (multiclass) crossentropy loss, capable of adding weight, focal loss. input
def __init__(self, bWeighted=False, gamma=0, bMask=False): super(XentLoss, self).__init__() self.bWeighted = bWeighted self.bFL = gamma > 0 self.gamma = gamma self.bMask = bMask self.channel_axis = 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def crossentropy_loss(y_true, y_pred):\n ce = tf.keras.losses.categorical_crossentropy(y_true, y_pred, from_logits=True) \n return ce", "def categorical_crossentropy(predictions, targets):\n return theano.tensor.nnet.categorical_crossentropy(predictions, targets)", "def categorical_crossentropy(pre...
[ "0.7680454", "0.75057954", "0.75057954", "0.7330102", "0.7300252", "0.7239577", "0.7217701", "0.71571153", "0.7148089", "0.7140503", "0.7090015", "0.70017487", "0.6928028", "0.6870102", "0.68283427", "0.6787355", "0.67823076", "0.6769102", "0.6762372", "0.6694014", "0.6640877...
0.0
-1
Returns the amount of memory available on the device
def deviceMemory(self): return 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_total_memory_size(self):\n return self.drt_manager.get_total_memory_size()", "def mem_avail():\n return psutil.virtual_memory().available", "def memory():\n sin = psutil.virtual_memory()\n return round((sin.total / sin.used) / 100, 3)", "def get_available_memory():\n if platform == 'li...
[ "0.80908763", "0.8082392", "0.7982003", "0.7858731", "0.78526175", "0.78176254", "0.77905387", "0.77070045", "0.7687429", "0.7675964", "0.758462", "0.75833404", "0.7567711", "0.75567925", "0.7516925", "0.74682117", "0.74326515", "0.74259067", "0.7395813", "0.7353532", "0.7333...
0.78587407
3
[Returns the height of the window's content area (viewport) including scrollbars]
def innerHeight(self): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def height(self):\n _, ymin, _, ymax = self.viewport\n return self.parent.window_size[1] * (ymax - ymin)", "def window_height(self):\n return self._window_size()[1]", "def height(self) -> int:\n return self.screen.getmaxyx()[0]", "def get_height(self):\n return self.calc_he...
[ "0.7945583", "0.77285266", "0.7074563", "0.69382715", "0.68981206", "0.68597096", "0.679987", "0.6786393", "0.662778", "0.6589038", "0.6569717", "0.6537436", "0.6537436", "0.6509543", "0.6461215", "0.6421859", "0.6407395", "0.63973904", "0.6375135", "0.63634956", "0.635937", ...
0.0
-1
Extract defined color from image and return large contours (UNUSED)
def get_contours(mask, threshold_area): contours, hierarchy = cv2.findContours(mask,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE) return [x for x in contours if cv2.contourArea(x) > threshold_area], hierarchy
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def red_contour(image, save_images=False, fname=None):\n original = image.copy()\n\n b, g, r = cv2.split(image)\n bw0 = (r[:,:]>150).astype(np.uint8)*255\n\n bw1 = cv2.divide(r, g[:, :] + 1)\n bw1 = (bw1[:, :] > 1.5).astype(np.uint8)*255\n bw1 = np.multiply(bw1, bw0).astype(np.uint8) * 255\n b...
[ "0.68714905", "0.6757579", "0.669214", "0.66343045", "0.6594842", "0.65607345", "0.655099", "0.6409985", "0.63950217", "0.6382491", "0.6349377", "0.6342652", "0.632714", "0.63184047", "0.629059", "0.62844175", "0.6268783", "0.61918944", "0.61907256", "0.61861706", "0.61747867...
0.56387013
99
Creates and saves a User with the given email, username and password.
def create_user(self, email, username, password=None): if not email: raise ValueError('Users must have an email address') if not username: raise ValueError('Users must have a username') user = self.model(email = self.normalize_email(email), use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_user(self, email, password,username, **extra_fields):\r\n if not email:\r\n raise ValueError('The given email must be set')\r\n if not username:\r\n raise ValueError('The given username must be set')\r\n email = self.normalize_email(email)\r\n user = se...
[ "0.86353314", "0.8481137", "0.8441209", "0.8421481", "0.84093404", "0.8402659", "0.83984935", "0.8383734", "0.8354666", "0.8316264", "0.8308027", "0.82797647", "0.8261537", "0.82171035", "0.81949526", "0.8193694", "0.8185672", "0.8171927", "0.8171555", "0.81517804", "0.814899...
0.8221097
13
Pauses the scaling group, causing all scaling policy executions to be rejected until unpaused. This is an idempotent change, if it's already paused, this does not raise an error.
def pause_scaling_group(log, transaction_id, scaling_group, dispatcher): if not tenant_is_enabled(scaling_group.tenant_id, config_value): raise NotImplementedError("Pause is not implemented for legay groups") return perform(dispatcher, conv_pause_group_eff(scaling_group, transaction_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pause_scaling_group(self, request):\n group = self.store.get_scaling_group(\n self.log, self.tenant_id, self.group_id)\n return controller.pause_scaling_group(\n self.log, transaction_id(request), group, self.dispatcher)", "def conv_pause_group_eff(group, transaction_id):\...
[ "0.7711779", "0.72564363", "0.6947891", "0.63971376", "0.6323556", "0.6200588", "0.6197848", "0.6197715", "0.6197715", "0.617591", "0.61642057", "0.6159052", "0.6127139", "0.6086533", "0.6084649", "0.6073788", "0.6070744", "0.6051046", "0.6035837", "0.6028317", "0.5985923", ...
0.7651059
1
Describes a music album.
def make_album(artist, album, tracks=""): retval = {'artist': artist, 'album': album} if tracks: retval['tracks'] = tracks return retval
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_album(self, album: str) -> None:\n self.album = album", "def make_album(artist_name, album_title): \n music_album = {\n 'Artist': artist_name.title(),\n 'Album': album_title.title()\n }\n return music_album", "def set_album(audio: EasyID3, album):\r\n audio['album']...
[ "0.7066422", "0.70215434", "0.68383795", "0.6837679", "0.6798034", "0.6755106", "0.6682083", "0.66732985", "0.66602284", "0.66576916", "0.6619869", "0.65764177", "0.6571991", "0.65548277", "0.65320724", "0.6524331", "0.6491871", "0.6491871", "0.6471474", "0.6447201", "0.64456...
0.60693735
56
This method represents the Zoho CRM Production environment in EU domain
def PRODUCTION(cls): return DataCenter.Environment("https://www.zohoapis.eu", cls().get_iam_url(), cls().get_file_upload_url())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SANDBOX(cls):\n\n return DataCenter.Environment(\"https://sandbox.zohoapis.eu\", cls().get_iam_url(), cls().get_file_upload_url())", "def DEVELOPER(cls):\n\n return DataCenter.Environment(\"https://developer.zohoapis.eu\", cls().get_iam_url(), cls().get_file_upload_url())", "def _production()...
[ "0.6654427", "0.65283966", "0.6355464", "0.6292572", "0.5975507", "0.5958166", "0.5926409", "0.5657863", "0.56250566", "0.5617872", "0.5612356", "0.55655277", "0.5521967", "0.5469647", "0.54644597", "0.54508966", "0.5406809", "0.53754604", "0.53497416", "0.5229801", "0.519194...
0.69666076
0
Returns a string representation of the full url for the confirmation page, which is sent to the user in an email after they subscribe.
def get_confirm_url(confirm_auth): url = base_url + _CONFIRM % confirm_auth return url
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_url(cls):\n return reverse('shop_subscribe:confirm')", "def get_email_confirmation_url(self,client_domain, request, emailconfirmation):\n url = reverse(\n \"accounts:confirm_email\",\n args=[emailconfirmation.key])\n ret = build_absolute_uri(\n re...
[ "0.78176534", "0.7364205", "0.7014321", "0.6641499", "0.6423517", "0.6328158", "0.6274099", "0.6274099", "0.6155921", "0.61335504", "0.6125703", "0.60614973", "0.60011137", "0.60011137", "0.5986716", "0.59837425", "0.5928101", "0.5928101", "0.5914755", "0.58989257", "0.588841...
0.7166306
2
size (columns, rows) pieces (Piece[]) >>> m = Model._create_from_picture(3, (4, 3), [ ... 0, 0, 2, 0, ... 0, 1, 1, 0, ... 1, 2, 2, 1]) >>> print(m) 0020 0110 1221 >>> m.get_piece_at_opening(0, 0) 1
def _create_from_picture(consecutive_pieces_to_win, size, pieces): model = Model(consecutive_pieces_to_win, size) model.initialize_from_picture(pieces) return model
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_piece_at_opening(self, x, y):\n self._validate_opening(x, y)\n return self._openings[x][y]", "def get_piece(self, at):\n return self.nodes[at].piece", "def features(self, piece: \"CurrentPiece\", next_piece: Piece) -> Optional[Tuple]:\n\n # without pieces\n # heights: 10 ...
[ "0.6367122", "0.6323253", "0.6297955", "0.6132888", "0.60531974", "0.60531974", "0.59272397", "0.584704", "0.58299464", "0.57505697", "0.57505697", "0.5745817", "0.5740992", "0.57026416", "0.5670445", "0.5668726", "0.5668125", "0.56551147", "0.56494707", "0.56447756", "0.5643...
0.6068875
4
the ylocation that the piece would end up at, or 1 if the column is full
def get_drop_row(self, x): for y in range(self.size_y): if self.get_piece_at_opening(x, y) == Piece.NONE: return y return -1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def y(self):\n return self.coords[1]", "def get_y(self):\n return self.coords[1]", "def y(self):\r\n return self.position.y", "def get_y_position(self): \n return self.rect.y", "def get_y_position(self):\n return self.actual_coordinates[1]", "def locations_y(self):\n...
[ "0.6949835", "0.69490063", "0.6937042", "0.6927862", "0.6927149", "0.68999034", "0.68754035", "0.6846588", "0.6813633", "0.6797426", "0.679645", "0.6752494", "0.6713569", "0.67100585", "0.667167", "0.6656933", "0.6626716", "0.6611071", "0.6510616", "0.6471383", "0.6463802", ...
0.0
-1
Return string representation of this feed.
def __repr__(self): return "<{}(start={}, stop={}, duration={})>".format( self.__class__.__name__, self.start_time, self.stop_time, self.duration )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def as_string(self):\n return self.__repr__()", "def __str__(self):\n return '\\n\\n'.join(str(item) for item in self._data)", "def to_str(self):\n return '\\n'.join(str(entry) for entry in self)", "def serialize(self):\n\n return str(self)", "def to_str(self):\n return p...
[ "0.75369215", "0.7309885", "0.72970533", "0.7213381", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", "0.7209314", ...
0.0
-1
Return duration of this run.
def duration(self): return self._duration
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_duration(self) -> 'outputs.DurationResponse':\n return pulumi.get(self, \"run_duration\")", "def get_duration(self):\n return self.duration", "def duration(self):\n # type: () -> int\n return self._duration", "def duration( self ):\n return (self.start and time.proc...
[ "0.841819", "0.8320614", "0.83123016", "0.83057535", "0.829399", "0.829399", "0.82796854", "0.8276781", "0.82752943", "0.823269", "0.8168037", "0.8144613", "0.8130363", "0.8126044", "0.81130683", "0.80658925", "0.8061788", "0.80585253", "0.80529463", "0.80420655", "0.8023745"...
0.8279802
12
Return start time of this run.
def start_time(self): return self._start_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_time(self):\n return self.__start", "def start_time(self) -> float:\n return self._start_time", "def start_time(self) -> pulumi.Output[Optional[int]]:\n return pulumi.get(self, \"start_time\")", "def start_time(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"sta...
[ "0.8904563", "0.8877261", "0.86674637", "0.86278015", "0.8618451", "0.8618451", "0.8609431", "0.8603524", "0.8527951", "0.8417625", "0.8360233", "0.83549714", "0.8353214", "0.8292033", "0.8253035", "0.82044715", "0.82044715", "0.8146769", "0.81311834", "0.8126113", "0.8116545...
0.8745896
9
Return stop time of this run.
def stop_time(self): return self.start_time + timedelta(hours=self.duration)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stop_time(self):\n return self.__stopped", "def stop(self):\n self.__stopped = self.__last_time()\n return self.elapsed", "def stop(self):\n self.times.append(time.time() - self.tik)\n return self.times[-1]", "def stop(self):\n self.times.append(time.time() - sel...
[ "0.85870177", "0.8031591", "0.78807056", "0.78807056", "0.78807056", "0.78764784", "0.7491457", "0.7429995", "0.73848057", "0.7348293", "0.73042476", "0.72258806", "0.71945703", "0.7129227", "0.7025979", "0.70021003", "0.69894266", "0.6987054", "0.69773656", "0.69612354", "0....
0.78196543
6
Provide a usable representation of start and stop time.
def pretty_print(self): if self.start_time.day != datetime.now().day: start = self.start_time.strftime("%a, %H:%M") else: start = self.start_time.strftime("%H:%M") end = self.stop_time.strftime("%H:%M") return "{} - {}".format(start, end)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_time_string(self):\r\n return time.strftime('%H:%M:%S', time.localtime(self.start_time))", "def get_time(self):\n start=''\n end=''\n time=''\n times=self.times\n print(times[self.istep])\n if self.istep > 0:\n start=ncEarth.beginstr % times[self....
[ "0.71280074", "0.71063316", "0.7050227", "0.68914187", "0.6843214", "0.680543", "0.67934424", "0.67819357", "0.66692394", "0.6574475", "0.65690154", "0.65640473", "0.65607846", "0.6541919", "0.6523744", "0.651614", "0.6508179", "0.6488849", "0.64865726", "0.64790505", "0.6468...
0.68876326
4
Asserts that the target and actual shape match.
def assert_shape(tensor, shape, name): real_shape = tensor.get_shape().as_list() same_rank = len(real_shape) == len(shape) all_equal = all([(s == r or s == -1) for s, r in zip(shape, real_shape)]) if not same_rank or not all_equal: raise tf.errors.InvalidArgumentError( 'Error: Expected tensor %s to ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_same_shape(preds: Tensor, target: Tensor) ->None:\n if preds.shape != target.shape:\n raise RuntimeError(f'Predictions and targets are expected to have the same shape, but got {preds.shape} and {target.shape}.')", "def _AssertShapesMatch(op_name, in_tensor, out_tensor):\n in_shape = in_tens...
[ "0.7319899", "0.7054129", "0.690362", "0.685845", "0.66772175", "0.6632224", "0.65484196", "0.6517784", "0.6480683", "0.6478203", "0.6463825", "0.6431351", "0.6413117", "0.63978297", "0.6356055", "0.63386387", "0.63349813", "0.63167435", "0.6293742", "0.62749046", "0.6274886"...
0.66646236
5
Creates a new tensor axis and tiles it to a specified length.
def tile_new_axis(t, axis, length): t = tf.expand_dims(t, axis=axis) cur_shape = t.get_shape().as_list() tile_shape = [1] * len(cur_shape) tile_shape[axis] = length return tf.tile(t, tile_shape)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_and_permute_time_axis(tensor, sequence_length, axis=-3):\n shape = tensor.shape.as_list()\n shape[0] = sequence_length\n tensor.set_shape(shape)\n\n # in the original tensor the first axis is always the time axis.\n permutation = list(range(tensor.shape.ndims))\n permutation[0] = permutation[axis]\n...
[ "0.6480759", "0.6409938", "0.6055184", "0.6055184", "0.5978806", "0.58723545", "0.5797694", "0.579023", "0.5745332", "0.57359654", "0.569535", "0.5675055", "0.56415784", "0.562487", "0.5613713", "0.5598268", "0.5557938", "0.5546641", "0.5530259", "0.55118066", "0.5508421", ...
0.86206746
0
Return a string representation of the imager profile instance.
def __str__(self): profile = { 'address': self.address, 'bio': self.bio, 'website': self.website, 'hireable': self.hireable, 'travel_radius': self.travel_radius, 'phone number': self.phone_number, 'camera type': self.camera_type...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n return (\n \"{{\"\n '\"profile\": \"{self.profile!r}\", '\n '\"accesskey\": \"{self.accesskey!r}\", '\n '\"workspace_id\": \"{self.workspace_id!r}\", '\n '\"tenant_id\": \"{self.tenant_id!r}\", '\n '\"url\": \"{self.url!...
[ "0.7197736", "0.71337396", "0.6959724", "0.68646514", "0.67674387", "0.67632085", "0.65932965", "0.6549228", "0.65153575", "0.6513718", "0.6512621", "0.6466757", "0.64281404", "0.63845736", "0.63845736", "0.6372278", "0.6372278", "0.6372278", "0.6372278", "0.6372278", "0.6372...
0.6908537
3
Gets the label of the column.
def get_label ( self ): return self.label
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getLabelColumn(self):\n return self.getOrDefault(self.labelColumn)", "def _label(self, column):\n # XXX\n return column", "def _get_label ( self ):\n if self._label is not None:\n return self._label\n return 'Column %d' % (self.index + 1)", "def column_label(...
[ "0.86905575", "0.86013365", "0.85247946", "0.7622797", "0.7540919", "0.73672235", "0.7361779", "0.73584646", "0.73584646", "0.73584646", "0.73584646", "0.73191035", "0.73185396", "0.7307684", "0.7301056", "0.72894186", "0.72799706", "0.72799706", "0.72799706", "0.72799706", "...
0.73970884
5
Returns the height of the column cell's row while it is being edited.
def get_edit_height ( self, object ): return self.edit_height
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def height(self):\n return self.row", "def height(self):\n return len(self.rows)", "def get_grid_height(self):\r\n return self.height", "def height(self):\n return len(self._rows)", "def get_grid_height(self):\n # replace with your code\n return self._height", "d...
[ "0.8035072", "0.72411776", "0.7180565", "0.71582407", "0.7148934", "0.7112864", "0.70668644", "0.7054299", "0.7054299", "0.70108306", "0.70071125", "0.70071125", "0.7004636", "0.70033884", "0.70033884", "0.6998274", "0.6998274", "0.6943957", "0.6937389", "0.69369316", "0.6936...
0.73265344
1
Returns the cell background color for the column for a specified object.
def get_cell_color ( self, object ): if self.is_editable( object ): return self.cell_color_ return self.read_only_cell_color_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cell_color ( self, object ):\n if self.is_editable( object ):\n if self._is_selected( object ):\n return self.selected_cell_color_\n return self.cell_color_\n return self.read_only_cell_color_", "def background_color(self) -> BoxColor:\n return ge...
[ "0.68345994", "0.6281526", "0.6057362", "0.5913437", "0.5886267", "0.5784454", "0.5756031", "0.5750721", "0.5694421", "0.5671432", "0.561941", "0.561755", "0.5564679", "0.5548145", "0.55429244", "0.5522229", "0.54416186", "0.5405656", "0.53389734", "0.52914613", "0.52597046",...
0.69000113
0
Returns the cell background graph color for the column for a specified object.
def get_graph_color ( self, object ): return self.graph_color_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cell_color ( self, object ):\n if self.is_editable( object ):\n return self.cell_color_\n return self.read_only_cell_color_", "def get_cell_color ( self, object ):\n if self.is_editable( object ):\n if self._is_selected( object ):\n return self.se...
[ "0.6671416", "0.6592424", "0.6358976", "0.6299487", "0.6191073", "0.5837952", "0.5835975", "0.58019525", "0.57996476", "0.57749474", "0.57514226", "0.57434636", "0.57287246", "0.57268125", "0.57122487", "0.56985015", "0.5655659", "0.56445354", "0.55324876", "0.55112094", "0.5...
0.6389501
2
Returns the maximum value a numeric column can have.
def get_maximum ( self, object ): return self.maximum
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_max(self):\n max_value= self.df[self.col_name].max()\n return max_value", "def max_number(self, rows: List[Row], column: NumberColumn) -> Number:\n cell_values = [row.values[column.name] for row in rows if row.values[column.name] is not None]\n if not cell_values:\n return ...
[ "0.7949757", "0.7508968", "0.7505906", "0.7485621", "0.742532", "0.7198015", "0.71339726", "0.71242625", "0.70739967", "0.70612353", "0.7002507", "0.69686466", "0.69371647", "0.69188416", "0.6916566", "0.68938875", "0.68726885", "0.6842791", "0.6842791", "0.68370193", "0.6837...
0.67337346
32
Returns the string representation of the table column.
def __str__ ( self ): return self.get_label()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_string(self):\n return str(self.attribute_col) + self.symbol", "def typed_column(self) -> str:\n\n return \"{}:{}\".format(self.name, self.dtype)", "def columnToStr(self, column):\n return unicode(self.__getattribute__(HistoryEntry.COLUMN_STR[column]))", "def as_string(self):\n ...
[ "0.7857894", "0.7824976", "0.77788484", "0.71998507", "0.69918716", "0.69782275", "0.6969328", "0.69576627", "0.69408697", "0.6937393", "0.69145554", "0.6880316", "0.6806661", "0.6793285", "0.67822886", "0.67719007", "0.67441034", "0.67400753", "0.6701981", "0.6644846", "0.66...
0.0
-1
Gets the label of the column.
def _get_label ( self ): if self._label is not None: return self._label return user_name_for( self.name )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getLabelColumn(self):\n return self.getOrDefault(self.labelColumn)", "def _label(self, column):\n # XXX\n return column", "def _get_label ( self ):\n if self._label is not None:\n return self._label\n return 'Column %d' % (self.index + 1)", "def column_label(...
[ "0.86905575", "0.86013365", "0.85247946", "0.7622797", "0.7540919", "0.73970884", "0.73672235", "0.7361779", "0.73584646", "0.73584646", "0.73584646", "0.73584646", "0.73191035", "0.73185396", "0.7307684", "0.7301056", "0.72894186", "0.72799706", "0.72799706", "0.72799706", "...
0.640692
90
Sets the value of the column for a specified object.
def set_value ( self, object, value ): target, name = self.target_name( object ) setattr( target, name, value )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_value ( self, object, row, value ):\n column = self.get_data_column( object )\n column[ row ] = type( column[ row ] )( value )", "def set_value ( self, object, value ):\n object[ self.index ] = value", "def __set__(self, instance, value):\r\n if instance:\r\n retu...
[ "0.8151175", "0.7529195", "0.7241931", "0.7179882", "0.69967765", "0.6885749", "0.6606071", "0.6422484", "0.64063424", "0.6385849", "0.6382012", "0.6369049", "0.63424414", "0.6314007", "0.63119334", "0.62879497", "0.6277313", "0.62759095", "0.62614375", "0.62551206", "0.62551...
0.7206155
3
Gets the editor for the column of a specified object.
def get_editor ( self, object ): if self.editor is not None: return self.editor target, name = self.target_name( object ) return target.base_trait( name ).get_editor()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_editor ( self, object ):\n return super( NumericColumn, self ).get_editor( object )", "def get_editor ( self, object ):\n return None", "def editor(self):\n return self._editor", "def get_data_column ( self, object ):\n return getattr( object, self.name )", "def get_edit...
[ "0.7736865", "0.6847517", "0.62578267", "0.6037094", "0.5778927", "0.5654012", "0.56333137", "0.560536", "0.5563185", "0.55332774", "0.5499682", "0.54986906", "0.5476404", "0.53061664", "0.5272211", "0.52221936", "0.5216628", "0.5214872", "0.52039963", "0.51888514", "0.518130...
0.72835356
1
Gets the editor style for the column of a specified object.
def get_style ( self, object ): return self.style
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_cell_style(self, row: int, column: int):\n style = None\n if 'STYLE' in self._source.columns:\n style = self._source.loc[self.get_source_row(row), 'STYLE']\n column_name = self._dataframe.columns[column]\n if f'STYLE_{column_name}' in self._source.columns:\n ...
[ "0.681116", "0.66179705", "0.65270686", "0.6340773", "0.60804594", "0.601501", "0.5947503", "0.5778554", "0.5778554", "0.5593435", "0.5577242", "0.5540711", "0.5402539", "0.5243572", "0.52218306", "0.51929045", "0.5146163", "0.5135001", "0.51014274", "0.5091314", "0.5056963",...
0.6718743
1
Gets the label of the column.
def _get_label ( self ): if self._label is not None: return self._label return self.name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getLabelColumn(self):\n return self.getOrDefault(self.labelColumn)", "def _label(self, column):\n # XXX\n return column", "def _get_label ( self ):\n if self._label is not None:\n return self._label\n return 'Column %d' % (self.index + 1)", "def column_label(...
[ "0.86905575", "0.86013365", "0.85247946", "0.7622797", "0.7540919", "0.73970884", "0.73672235", "0.7361779", "0.73584646", "0.73584646", "0.73584646", "0.73584646", "0.73191035", "0.73185396", "0.7307684", "0.7301056", "0.72894186", "0.72799706", "0.72799706", "0.72799706", "...
0.699983
47
Returns the cell background color for the column for a specified object row.
def get_cell_color ( self, object ): if self.is_editable( object ): if self._is_selected( object ): return self.selected_cell_color_ return self.cell_color_ return self.read_only_cell_color_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cell_color ( self, object ):\n if self.is_editable( object ):\n return self.cell_color_\n return self.read_only_cell_color_", "def GetBackgroundColour(self):\r\n\r\n return self._colBack", "def _get_cell_style(self, row: int, column: int):\n style = None\n ...
[ "0.65797424", "0.60449946", "0.5811809", "0.57736534", "0.57585245", "0.57136506", "0.567724", "0.5561861", "0.5518657", "0.55150086", "0.54836965", "0.5456312", "0.5450515", "0.5440606", "0.54206413", "0.54044914", "0.53747666", "0.528467", "0.5278225", "0.52495706", "0.5246...
0.6549076
1
Returns the horizontal alignment for the column for a specified object row.
def get_horizontal_alignment ( self, object ): return self.horizontal_alignment
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def horizontal_alignment(self):\n self.update()\n return self._horizontal_alignment", "def GetColumnAlignment(self, column):\r\n \r\n return self._header_win.GetColumn(column).GetAlignment()", "def get_horizontal(self, row):\n start = self.HORIZONTAL_GROUP[row]\n end =...
[ "0.6685467", "0.6620425", "0.6472826", "0.6220936", "0.6108616", "0.6108616", "0.60954803", "0.60380316", "0.5980269", "0.59591275", "0.59591275", "0.59591275", "0.59015685", "0.5730585", "0.57073325", "0.56525975", "0.54857033", "0.5475834", "0.5449732", "0.53637564", "0.529...
0.7387041
0
Gets the value of the column for a specified object row.
def get_value ( self, object ): try: value = getattr( object, self.name ) try: return self.format % ( value, ) except: return 'Format!' except: return 'Undefined!'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(self, row, colName):\n\t\treturn self[row][self._columns[colName]]", "def get(self, column_name, row_index):\n self.check_for_column(column_name)\n return self.data[column_name][row_index]", "def _value(self, row):\n return row[\"_source\"][self.name]", "def getCellValue_qu...
[ "0.82184756", "0.75858814", "0.75552636", "0.74341667", "0.73170936", "0.7256945", "0.72362494", "0.72314465", "0.70758146", "0.7032267", "0.7007239", "0.6946452", "0.68728876", "0.6760917", "0.67112553", "0.6660365", "0.66290635", "0.6608173", "0.660303", "0.6591175", "0.659...
0.0
-1
Gets the editor for the column of a specified object row.
def get_editor ( self, object ): return super( NumericColumn, self ).get_editor( object )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_editor_row(editable_property):\n try:\n editor = editable_property.args[EDITOR]\n except KeyError:\n editor = SLIDER #default, if editor not specified\n \n create_func = EDITOR_ROW_CREATORS[editor]\n return create_func(editable_property)", "def get_editor ( self, object ):\n ...
[ "0.6708982", "0.63182646", "0.60418475", "0.58705795", "0.582339", "0.57156456", "0.5626795", "0.5623236", "0.5578205", "0.55349874", "0.55187184", "0.5493587", "0.5486184", "0.54861456", "0.54533494", "0.544203", "0.5428219", "0.54095453", "0.5408204", "0.54041564", "0.54038...
0.7125642
0
Gets the label of the column.
def _get_label ( self ): if self._label is not None: return self._label return 'Column %d' % (self.index + 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getLabelColumn(self):\n return self.getOrDefault(self.labelColumn)", "def _label(self, column):\n # XXX\n return column", "def column_label(self, rawcol):\n label = self.colLabels[rawcol]\n\n try:\n idx = self.dynamic_cols.index(rawcol)\n except ValueErr...
[ "0.86910146", "0.8601748", "0.762423", "0.7540734", "0.7397942", "0.7368096", "0.7361652", "0.73592573", "0.73592573", "0.73592573", "0.73592573", "0.73201543", "0.73193675", "0.7309397", "0.73019624", "0.7290396", "0.72809434", "0.72809434", "0.72809434", "0.72809434", "0.72...
0.85252935
2
Gets the value of the column for a specified object.
def get_value ( self, object ): return unicode( object[ self.index ] )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_data_column ( self, object ):\n return getattr( object, self.name )", "def _column_value_getter(self, obj):\n if is_namedtuple(obj):\n # Get values using properties\n def get(obj, column):\n return getattr(obj, column, None)\n\n elif is_dict_like(...
[ "0.802243", "0.77252126", "0.71887", "0.68370986", "0.6662876", "0.66384363", "0.65818477", "0.65477073", "0.6522401", "0.6485197", "0.63584733", "0.63518703", "0.6294203", "0.62488496", "0.62483054", "0.6207198", "0.6192606", "0.61747164", "0.6171897", "0.6156743", "0.614174...
0.67055136
4
Sets the value of the column for a specified object.
def set_value ( self, object, value ): object[ self.index ] = value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_value ( self, object, row, value ):\n column = self.get_data_column( object )\n column[ row ] = type( column[ row ] )( value )", "def __set__(self, instance, value):\r\n if instance:\r\n return instance._values[self.column.column_name].setval(value)\r\n else:\r\n ...
[ "0.8151175", "0.7241931", "0.7206155", "0.7179882", "0.69967765", "0.6885749", "0.6606071", "0.6422484", "0.64063424", "0.6385849", "0.6382012", "0.6369049", "0.63424414", "0.6314007", "0.63119334", "0.62879497", "0.6277313", "0.62759095", "0.62614375", "0.62551206", "0.62551...
0.7529195
1
Gets the editor for the column of a specified object.
def get_editor ( self, object ): return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_editor ( self, object ):\n return super( NumericColumn, self ).get_editor( object )", "def get_editor ( self, object ):\n if self.editor is not None:\n return self.editor\n\n target, name = self.target_name( object )\n\n return target.base_trait( name ).get_editor()...
[ "0.7736865", "0.72835356", "0.62578267", "0.6037094", "0.5778927", "0.5654012", "0.56333137", "0.560536", "0.5563185", "0.55332774", "0.5499682", "0.54986906", "0.5476404", "0.53061664", "0.5272211", "0.52221936", "0.5216628", "0.5214872", "0.52039963", "0.51888514", "0.51813...
0.6847517
2
First checks if user has old SHA256 password. If a SHA256 pw returns as anything besides null, then we check if the password was valid. If it is valid we convert the plaintext into bcrypt PW, remove the old password, and commit the user to DB. Then we allow the Bcrypt pw hash comparison.
def check_password(self, password): check = False if self.password is not None: logger.critical('Old style password exists.') if check_password_hash(self.password, password): self.passwd = password self.password = None db.session.ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def old_password_check(form, field):\n old_password = field.data\n password = current_user.password\n r = pwd_context.verify(old_password, current_user.password)\n if not r:\n raise validators.ValidationError('old password is wrong')", "def __is_correct_password(salt: bytes, pw_hash: bytes, pa...
[ "0.6957514", "0.69238627", "0.6763713", "0.67592585", "0.6738218", "0.66951346", "0.66834366", "0.65960836", "0.65084743", "0.6442836", "0.64326787", "0.6427476", "0.6390737", "0.63809144", "0.63685524", "0.6346269", "0.63041514", "0.6302455", "0.6296736", "0.62635005", "0.62...
0.7017114
0
Returns the minimax action using self.depth and self.evaluationFunction
def getAction(self, gameState): "*** YOUR CODE HERE ***" self.NumAgents = gameState.getNumAgents() self.root = gameState # alpha-beta-search # one call of Max_Value is enough to iterate the whole tree and keep the optimal move self.Max_Value(gameState, -10000, 10000, self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getAction(self, gameState: GameState):\n _max = float(\"-inf\")\n action = None\n for move in gameState.getLegalActions(0):\n util = minimax(self.evaluationFunction, 1, 0,\n gameState.generateSuccessor(0, move), self.depth)\n if util > _max o...
[ "0.7482665", "0.7383559", "0.71806973", "0.7110041", "0.70884514", "0.70694935", "0.70683014", "0.7048308", "0.70055133", "0.69651455", "0.69642085", "0.69604385", "0.6945924", "0.68998593", "0.6895832", "0.688605", "0.6826282", "0.6767276", "0.6758028", "0.6751636", "0.67054...
0.6421313
59
r"""Failures in finding the context structure for an Access Gateway session during attempts to send sessionspecific audit messages. During an Access Gateway session, audit messages related to the session are queued up in the auditlog buffer for transmission to the audit log server(s). If the session is killed before th...
def auditcontextnotfound(self) : try : return self._auditcontextnotfound except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _tcex_testing(self, session_id: str, trigger_id: int):\n if self.model.tcex_testing_context is not None:\n _context_tracker: list[str] = json.loads(\n self.redis_client.hget(self.model.tcex_testing_context, '_context_tracker') or '[]'\n )\n _context_tracke...
[ "0.5072777", "0.5037233", "0.49920177", "0.493634", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", "0.47781694", ...
0.481426
4
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
def adjust_learning_rate(optimizer, epoch): lr = args.lr * (0.1 ** (epoch // 30)) for param_group in optimizer.param_groups: param_group['lr'] = lr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def adjust_learning_rate(init_lr, optimizer, epoch, n=100):\n init_lr = init_lr * (0.1 ** (epoch // n))\n print('learning rate : ', init_lr)\n for param_group in optimizer.param_groups:\n param_group['lr'] = init_lr", "def adjust_learning_rate(start_lr, optimizer, epoch, total_epoch_num):\n #l...
[ "0.79140896", "0.7908034", "0.7850816", "0.7776915", "0.7735598", "0.7732588", "0.7723862", "0.77235436", "0.77208304", "0.7710736", "0.76948273", "0.7675381", "0.76670265", "0.76670265", "0.76670265", "0.7657111", "0.76431805", "0.7640621", "0.7639109", "0.76275903", "0.7625...
0.7581243
31
Path to the topology file.
def get_imc_topo(topo_file): topo_graph = nx.Graph() with open(topo_file, 'r') as f: for line in f.readlines(): if (len(line) > 10) and (line[0] != '#'): split_data = line.split() source = split_data[0] dest = split_data[2] #cap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def structure_file_path(self):\n return os.path.join(\n self.base_path,\n self.structure_dir,\n self.content_path,\n self.structure_filename\n )", "def file_path(self):\n return self._obs_file()", "def graph_path(scope=\"session\"):\n return j...
[ "0.6582124", "0.6533398", "0.6444924", "0.63309604", "0.62411016", "0.62280643", "0.6183243", "0.6140121", "0.6132891", "0.6113392", "0.6094624", "0.6092807", "0.6092807", "0.6079097", "0.60399055", "0.6025102", "0.6021762", "0.601031", "0.59675217", "0.5961744", "0.5959959",...
0.0
-1
Test request missing data returns bad request
def test_search_number_invalid(): response = search.number({"body": "{}"}, {}) assert response["statusCode"] == 422
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_missing_data(self):\n\n response = self.client.post(\n self.reg_url,\n {},\n format=\"json\")\n\n self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)\n self.assertIn(b\"required\", response.content)", "def missing_data(self, data):\n ...
[ "0.7796567", "0.74374986", "0.7252798", "0.7248151", "0.71832997", "0.71806026", "0.71496886", "0.7119186", "0.7112824", "0.7100003", "0.7070147", "0.7066765", "0.7047179", "0.700831", "0.6985001", "0.6969568", "0.6949432", "0.69426394", "0.69081557", "0.6899525", "0.6899085"...
0.0
-1
Test searching for a name missing data returns bad request
def test_search_assigned_bad_request(): response = search.assigned({"body": "{}"}, {}) assert response["statusCode"] == 422
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_bad_name(self):\n\n request = service.get_request('GET', {u'taxon': u'Nosuchtaxonia'})\n x = self.start_request_tests(request)\n m = x.json().get(u'message')\n self.assertTrue(x.status_code >= 200)\n self.assertTrue('No Taxon matched\" in \"%s\"' % m)", "def test_ice_a...
[ "0.7701791", "0.7330856", "0.7068752", "0.68458813", "0.6762438", "0.67555565", "0.67085963", "0.66919285", "0.6580761", "0.6573775", "0.653031", "0.6529306", "0.6488975", "0.648795", "0.64581347", "0.6454054", "0.64527106", "0.64371336", "0.63747424", "0.63695323", "0.636404...
0.64512247
17
Get rw_api_key if provided in the configuration, otherwise get ro_api_key
def get_le_api_key(auth): if auth.get('rw_api_key'): return auth.get('rw_api_key') else: return auth.get('ro_api_key')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_api_key():\n cfg = read_config()\n cfg = cfg['notifier']['telegram_bot']\n return cfg.get('api_key')", "def _get_api_key():\n api_key_directory = os.getenv(\"KOKORO_GFILE_DIR\")\n api_key_file = os.path.join(api_key_directory, \"resultstore_api_key\")\n assert os.path.isfil...
[ "0.69545305", "0.6857441", "0.6817429", "0.68095845", "0.67815363", "0.6729458", "0.6729458", "0.6723309", "0.6576936", "0.65597695", "0.6557634", "0.6547672", "0.64181113", "0.6394189", "0.63922924", "0.63775486", "0.6364561", "0.6307864", "0.63058734", "0.62862015", "0.6274...
0.77554333
0
Build index.html for cherrypy Render the template and return the html file to be delivered to the browser
def index(self, reload=None): if (self.plugin.login_state == True): self.set_cookie_pic(True) else: self.set_cookie_pic(False) log_file = '' for line in self.plugin.rotating_log: log_file += str(line)+'\n' myDevic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main():\n return render_template('index.html')", "def main():\n return render_template('index.html')", "def index():\n # Render template\n return render_template('index.html')", "def get_index():\n return render_template('index.html')", "def index():\n return render_template(\"index.h...
[ "0.7802277", "0.7802277", "0.7720471", "0.77078813", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", "0.7637202", ...
0.0
-1
Creates a Pokemon object from a json dictionary
def from_json(cls, data: dict) -> "Pokemon": moves: list = list(map(Move.from_json, data["move_set"])) return cls(data["id"], data["name"], data["types"], data["weight"], data["height"], data["abilities"], data["move_list"], moves)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_response(cls, api_handler: APIHandler, response: requests.models.Response) -> \"Pokemon\":\n\n api_data: dict = json.loads(response.text)\n id: int = api_data[\"id\"]\n name: str = api_data[\"name\"].capitalize()\n types: tuple = tuple([type[\"type\"][\"name\"].capitalize() for...
[ "0.6312325", "0.61387926", "0.58204556", "0.57325155", "0.5695455", "0.5693761", "0.56828916", "0.5662741", "0.5657147", "0.56004125", "0.555932", "0.555932", "0.555932", "0.55343896", "0.5518079", "0.55150104", "0.5508857", "0.55003303", "0.5498654", "0.54966396", "0.5494049...
0.78120804
0
Set the card's name, suit, and identification number.
def set_attributes(self, name, suit, id_no=0): self.name = str(name) self.suit = str(suit) self.id = int(id_no)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_card (self, card):\n\t\tif ((card == 1) or (card == 2)):\n\t\t\tself._card = card\n\t\telse:\n\t\t\tsys.stderr.write(\"\\nERROR : %s card number must be 1 or 2 so it can't be %s !\\n\" % (self._target_id, card))\n\t\t\tsys.exit(1)", "def setSuit(self, arg):\n self.suit = arg", "def set_card(self...
[ "0.7173432", "0.68502975", "0.6695155", "0.65101445", "0.64912117", "0.61500406", "0.61423874", "0.6100892", "0.6100892", "0.6070534", "0.5982453", "0.5962046", "0.59164387", "0.5883601", "0.5865561", "0.58543205", "0.5849564", "0.58125895", "0.5774057", "0.5745068", "0.56753...
0.8090841
0
Set the card's point value.
def assign_value(self, points): self.value = int(points)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def point(self, value: Point):\n self._point = value", "def setPoint(self, point):\n self.point = point", "def setPoint(self, point):\n self.position = point.position", "def setPoint(self, x, y, value):\n self._c[x*self.__height + y] = value", "def set_setpoint(self, value):\n ...
[ "0.7993416", "0.770242", "0.7499313", "0.74505854", "0.7435141", "0.7431511", "0.73892695", "0.73642975", "0.7231408", "0.71950835", "0.6984943", "0.69630444", "0.6881512", "0.68794894", "0.68794894", "0.68688494", "0.6858717", "0.6857276", "0.6800499", "0.67527306", "0.67527...
0.7058274
10
Retrieve a face up card from the deck, and add it to a hand.
def hit(self, player): hit_card = self.deck.draw() hit_card.flip() player.take_card(hit_card) if self.verbose: print(player, 'receives', hit_card)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_a_card_to_hand(self, hand, deck):\n hand.append(deck.pop())", "def _deal_card(frame):\n\n # pop the next card off the top of the deck\n # > pop() will grab it from the bottom of the stack,\n # > so we use pop(0) to take it from the top.\n next_card = deck.pop(0)\n\n # and add it...
[ "0.71988064", "0.70430404", "0.6818193", "0.6658511", "0.6654449", "0.663762", "0.66334426", "0.6583592", "0.6480948", "0.6368827", "0.6356826", "0.63499457", "0.6345977", "0.6306771", "0.6304496", "0.6266921", "0.62502885", "0.6246442", "0.62334615", "0.6210229", "0.6189125"...
0.5732996
70
Set the option to enable/disable SSL verification.
def fill_disable_ssl_verification(self, data): disable_ssl_verification = get_optional_value(data, self.DISABLE_SSL, False) self.verify_ssl = not bool(disable_ssl_verification)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable_ssl_verification(self) -> bool:\n return pulumi.get(self, \"enable_ssl_verification\")", "def use_skip_ssl_verify(self, val=True, force=False):\n if val:\n self.ssl_verify = False\n else:\n self.ssl_verify = True\n\n if force:\n self.force_s...
[ "0.72796327", "0.6935235", "0.6585898", "0.6501708", "0.64170074", "0.6353365", "0.6339298", "0.63162655", "0.6261193", "0.6243311", "0.6179049", "0.61781824", "0.61752486", "0.6135691", "0.60789657", "0.6077635", "0.6066835", "0.5986019", "0.5945604", "0.5882714", "0.5857971...
0.72945106
0
Function approximating a PSP shape with double exponential decay.
def double_psp_func(x, xoffset, yoffset, rise_tau, decay_tau1, decay_tau2, amp1, amp2, rise_power=2.0): x = x-xoffset out = np.zeros(x.shape, x.dtype) mask = x >= 0 x = x[mask] rise_exp = (1.0 - np.exp(-x / rise_tau))**rise_power decay_exp1 = amp1 * np.e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _semi_relativistic_loss(eps):\n P = Pcoef * np.imag(1./eps) / np.real(Theta**2.+ThetaE**2.)\n return P", "def expm(self, p, d_p):\n ldv = ldot(d_p, d_p, keepdim=True)\n nd_p = ldv.clamp_(min=0).sqrt_()\n t = torch.clamp(nd_p, max=1) # ? max clip\n nd_p.clamp...
[ "0.62019885", "0.61466205", "0.602316", "0.59439826", "0.5921692", "0.58465815", "0.58428156", "0.58369446", "0.58339137", "0.5825675", "0.5732989", "0.5701724", "0.5681052", "0.5666799", "0.56532085", "0.5641436", "0.5631958", "0.5631126", "0.5616071", "0.5599539", "0.558534...
0.63498926
0
Load config from yaml file
def load_yaml(self, file) -> dict: with open(file, 'r', encoding="utf8") as stream: mapping = yaml.safe_load(stream) if mapping is None: mapping = dict() includes = mapping.get('includes', []) if not isinstance(includes, list): raise AttributeE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_config(path):\n return yaml.load(open('config.yaml', 'r'), Loader=yaml.SafeLoader)", "def load_config(config_file):\n with open(config_file) as f:\n return yaml.load(f)", "def load_cfg(filepath=\"./config.yaml\"):\n with open(filepath, \"r\") as f:\n return yaml.load(f, Loader=y...
[ "0.8238205", "0.82098275", "0.81617427", "0.8139321", "0.8120203", "0.8080191", "0.8079976", "0.80757", "0.79741246", "0.7966643", "0.79287714", "0.79095185", "0.7897934", "0.7877389", "0.7869289", "0.78587055", "0.7854908", "0.78522414", "0.78200537", "0.7789606", "0.7772175...
0.0
-1
Check if an object is JSON serializable
def is_jsonable(self, input): try: json.dumps(input) return True except (TypeError, OverflowError): return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_JSONable(obj, encoder=json_encoder):\n try:\n encoded_string = json_encoder.encode(obj)\n except Exception as e:\n return False\n return True", "def is_json(my_object):\n try:\n json.loads(my_object)\n except ValueError:\n return False\n\n return True", "def...
[ "0.7747647", "0.75518507", "0.7452564", "0.727773", "0.71072584", "0.66864634", "0.6685461", "0.6672436", "0.66332936", "0.6586177", "0.6586177", "0.6571103", "0.65701634", "0.65676504", "0.65676504", "0.65676504", "0.65676504", "0.65675616", "0.6557073", "0.65459824", "0.653...
0.7498912
2
Build a 3D convolutional network, based loosely on C3D.
def conv_3d(self): # Model. model = Sequential() model.add(Conv3D(32, (3,3,3), activation='relu', input_shape=self.input_shape)) model.add(MaxPooling3D(pool_size=(1, 2, 2), strides=(1, 2, 2))) model.add(Conv3D(64, (3,3,3), activation='relu')) model.add(MaxPooling3D(pool_s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def c3d(self):\n model = Sequential()\n # 1st layer group\n model.add(Conv3D(64, 3, 3, 3, activation='relu',\n border_mode='same', name='conv1',\n subsample=(1, 1, 1),\n input_shape=self.input_shape))\n model.add(Ma...
[ "0.7309145", "0.7183123", "0.716791", "0.70170295", "0.69881535", "0.6914603", "0.6825567", "0.6825567", "0.6825567", "0.6825567", "0.6825567", "0.6825567", "0.6825567", "0.6817752", "0.6817186", "0.6817186", "0.68154675", "0.6814586", "0.6811636", "0.68095183", "0.68095183",...
0.7214952
1
Build a 3D convolutional network, aka C3D.
def c3d(self): model = Sequential() # 1st layer group model.add(Conv3D(64, 3, 3, 3, activation='relu', border_mode='same', name='conv1', subsample=(1, 1, 1), input_shape=self.input_shape)) model.add(MaxPooling3D(p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conv_3d(self):\n # Model.\n model = Sequential()\n model.add(Conv3D(32, (3,3,3), activation='relu', input_shape=self.input_shape))\n model.add(MaxPooling3D(pool_size=(1, 2, 2), strides=(1, 2, 2)))\n model.add(Conv3D(64, (3,3,3), activation='relu'))\n model.add(MaxPooli...
[ "0.7281649", "0.71841615", "0.707168", "0.690172", "0.68788487", "0.68189096", "0.67646915", "0.6761545", "0.6761545", "0.67369956", "0.67341983", "0.67341983", "0.67341983", "0.67341983", "0.67341983", "0.67341983", "0.67341983", "0.67245495", "0.6720777", "0.6718091", "0.67...
0.74094737
0
Build a 3D convolutional network, aka C3D.
def c3dLSTM(self): model = Sequential() # 1st layer group model.add(Conv3D(64, 3, 3, 3, activation='relu', border_mode='same', name='conv1', subsample=(1, 1, 1), input_shape=self.input_shape)) model.add(MaxPooling...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def c3d(self):\n model = Sequential()\n # 1st layer group\n model.add(Conv3D(64, 3, 3, 3, activation='relu',\n border_mode='same', name='conv1',\n subsample=(1, 1, 1),\n input_shape=self.input_shape))\n model.add(Ma...
[ "0.74094737", "0.7281649", "0.71841615", "0.707168", "0.690172", "0.68788487", "0.68189096", "0.67646915", "0.6761545", "0.6761545", "0.67369956", "0.67341983", "0.67341983", "0.67341983", "0.67341983", "0.67341983", "0.67341983", "0.67341983", "0.67245495", "0.6720777", "0.6...
0.0
-1
Load a JSON file content
def load_json(filepath: str): with open(filepath, encoding="utf-8") as f: return json.load(f)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load(self, path):\n with open(path, \"rt\") as open_file:\n data = json.load(open_file)\n return data", "def load_json_data(filepath):\n with open(filepath,'r') as f:\n return json.load(f)", "def load_json_file(json_path):\n with open(json_path, 'r') as json_file:\n ...
[ "0.79510486", "0.79478514", "0.79134405", "0.7912531", "0.78660494", "0.78617907", "0.78292775", "0.78042006", "0.7792268", "0.77746475", "0.7749817", "0.7733603", "0.7716962", "0.77117074", "0.7708901", "0.7662423", "0.76501304", "0.76371104", "0.7633017", "0.76303476", "0.7...
0.78927106
4
Sets the property_config_info_list of this MetadataGetMetadataPropertyResponse200.
def property_config_info_list(self, property_config_info_list): self._property_config_info_list = property_config_info_list
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transform_property_info_list(se, prop_list, output_type):\n props = [{\"description\": _prop.get(\"description\"),\n \"domain\": transform_schemaclasses_lst(se,\n _prop.get(\"domain\"),\n outpu...
[ "0.5501452", "0.5466533", "0.51612365", "0.48624235", "0.4836705", "0.48125964", "0.47940364", "0.47940364", "0.46879268", "0.46580964", "0.46144414", "0.4598811", "0.45596695", "0.45569187", "0.45034024", "0.446695", "0.44593295", "0.444063", "0.43988055", "0.43818757", "0.4...
0.838632
0
Sets the description of this MetadataGetMetadataPropertyResponse200.
def description(self, description): self._description = description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_description(self, desc: str) -> None:\n self.metadata.data[\"description\"] = desc", "def description(self, description):\n if (self.local_vars_configuration.client_side_validation and\n description is not None and len(description) > 200):\n raise ValueError(\"Inva...
[ "0.5822919", "0.5588271", "0.55798286", "0.55575776", "0.5537133", "0.54994047", "0.5466919", "0.54255635", "0.54122835", "0.53955185", "0.5383833", "0.53540146", "0.532675", "0.5307466", "0.5307466", "0.5307466", "0.5307466", "0.5284351", "0.5261667", "0.5233879", "0.5229344...
0.52642536
47
Sets the owner_type of this MetadataGetMetadataPropertyResponse200.
def owner_type(self, owner_type): self._owner_type = owner_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_owner(self, owner: Optional[\"STACObject_Type\"]) -> \"Link\":\n self.owner = owner\n return self", "def set_owner(self, owner):\n self.settings[\"owner\"] = owner", "def owner(self, owner):\n if self.local_vars_configuration.client_side_validation and owner is None: # noqa...
[ "0.62579507", "0.6134702", "0.6111381", "0.6087712", "0.5957848", "0.5856001", "0.5746968", "0.5613835", "0.5586895", "0.5586895", "0.5586895", "0.5586895", "0.55771726", "0.55339324", "0.55339324", "0.55339324", "0.55339324", "0.53568935", "0.5288345", "0.5262895", "0.525636...
0.680235
0