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
ID of the User Managed Identity used to authenticate against the Service Bus Queue endpoint.
def identity_id(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "identity_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_id(self) -> str:\n return self._user_id", "def user_id(self) -> str:\n return self._user_id", "def user_id(self):\n return self._user_id", "def user_id(self):\n return self._user_id", "def user_id(self):\n return self._user_id", "def user_id(self):\n ret...
[ "0.69907063", "0.69907063", "0.6939324", "0.6939324", "0.6939324", "0.6939324", "0.6939324", "0.6875801", "0.6858073", "0.67586154", "0.6744285", "0.67085814", "0.6691733", "0.66626483", "0.66626483", "0.6647796", "0.6630985", "0.6576022", "0.6576022", "0.6553367", "0.6541990...
0.0
-1
The name of the resource group under which the Service Bus Queue has been created. Changing this forces a new resource to be created.
def resource_group_name(self) -> pulumi.Output[str]: return pulumi.get(self, "resource_group_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")", "def resource_group_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"resource_group_name\")", "def resource_group_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"resource_gro...
[ "0.7226661", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "0.6973292", "...
0.6767823
65
Adds a suffix to staging and development values.
def suffix(string, suffix, sep = '_'): if suffix == 'production': suffixed = string else: suffixed = string + sep + suffix return suffixed
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_suffix(name: str, suffix: str):\n return f'{name}_{suffix}'", "def add_suffix(word, suffix):\n suffix, sep, rest = suffix.partition(' ')\n expanded = _add_suffix(word, suffix)\n return expanded + sep + rest", "def suffix(self, suffix):\n\n self._suffix = suffix", "def suffix(self, su...
[ "0.68501705", "0.65921366", "0.61370754", "0.61370754", "0.61370754", "0.61370754", "0.6071173", "0.6018203", "0.5981132", "0.59731644", "0.5944371", "0.5835993", "0.575423", "0.575423", "0.57105756", "0.5707032", "0.55977184", "0.55886215", "0.55409336", "0.55144596", "0.549...
0.70712113
0
Writes JSON representation of the ordered dictionary preserving the order of the keys
def toJson(self): text = '{' if len(self._sequence): for key in self._sequence: text += '"%s":%s,' % (key,json.dumps(self.dictionary[key])) text = text[:-1] text += '}' return text
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_json(self, *args, **kwargs):\n if 'sortorder' in kwargs:\n kwargs['sort_keys'] = False\n sortorder = kwargs['sortorder']\n del kwargs['sortorder']\n obj = OrderedDict()\n for k in sortorder:\n if k in self:\n obj...
[ "0.6786466", "0.6704306", "0.66707903", "0.6640456", "0.64944774", "0.6305722", "0.6264041", "0.61754274", "0.6169123", "0.6127872", "0.6107136", "0.60845405", "0.60734487", "0.604723", "0.6027462", "0.60065955", "0.5995343", "0.5985601", "0.59842795", "0.5980031", "0.5976199...
0.5628555
92
Given user_id, return the associated User object.
def user_loader(user_id): return User.query.get(user_id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_by_id(user_id):\n\n return User.query.get(user_id)", "def get(self, user_id):\n return User.get(user_id)", "def get_user_from_id(user_id):\n return Users.query.filter_by(id=user_id).first()", "def get_user(self, user_id):\n User = get_user_model()\n try:\n ...
[ "0.8470548", "0.8392397", "0.8368338", "0.82840234", "0.8246376", "0.824378", "0.82422614", "0.8225579", "0.8178128", "0.8178128", "0.8177786", "0.8150401", "0.8150401", "0.8150401", "0.8150401", "0.7942767", "0.7908402", "0.7871334", "0.78454524", "0.7819107", "0.77851176", ...
0.0
-1
Return the number of seconds represented by this instance
def to_seconds(self): return self.hours * 3600 + self.minutes * 60 + self.seconds
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def seconds(self):\n return int(self)", "def seconds(self):\n return self._seconds", "def seconds(self):\n return self._seconds", "def seconds(self):\n end = self.end or timezone.now()\n result = end - self.start\n return result.seconds", "def total_seconds(self):\...
[ "0.9011046", "0.86127627", "0.86127627", "0.83609205", "0.82136047", "0.7992389", "0.795224", "0.7924782", "0.79148555", "0.7886629", "0.7763954", "0.7749396", "0.76207286", "0.7509158", "0.7506567", "0.7494706", "0.7494352", "0.7492711", "0.7470637", "0.7468545", "0.74481237...
0.7580618
13
Return True if I am strictly greater than time2
def after(self, time2): return self.to_seconds() > time2.to_seconds()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def after(self, time2):\n return self.to_seconds() > time2.to_seconds()", "def __gt__(self, other):\n return self.to_seconds() > other.to_seconds()", "def __gt__(self, other):\n return self.to_seconds() > other.to_seconds()", "def time_after(time_a, time_b=None) -> bool:\n if time_b i...
[ "0.7845175", "0.7456088", "0.7456088", "0.71889436", "0.7070054", "0.70096356", "0.69865257", "0.6856543", "0.6851539", "0.68224585", "0.6813712", "0.6745095", "0.6632427", "0.6596037", "0.6557212", "0.6427977", "0.6314521", "0.63109756", "0.6293565", "0.6285244", "0.62758315...
0.79369086
0
Returns yaw of tello.
def get_yaw(self): return self.state['yaw']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yaw(self):\n return self._yaw", "def yawAngle(self):\n return self._yawAngle", "def yaw_rate(self) -> float:\n return self._state[5]", "def yaw_pitch_roll(self):\n\n self._normalise()\n yaw = np.arctan2(2*(self.q[0]*self.q[3] - self.q[1]*self.q[2]),\n 1 - 2*(...
[ "0.8058127", "0.74816555", "0.70126164", "0.6869275", "0.67675924", "0.66052693", "0.65671396", "0.6518231", "0.6497515", "0.6393872", "0.63558275", "0.630903", "0.6298739", "0.6291687", "0.62529606", "0.6251937", "0.62275285", "0.61687493", "0.6057177", "0.60497236", "0.6042...
0.77702296
1
Obtain one batch of episodes.
def collect_episode_batch(policy, *, env, batch_size, n_workers=4): sampler = get_sampler(policy, env=env, n_workers=n_workers) agent_update = policy.get_param_values() episodes = sampler.obtain_samples(0, batch_size, agent_update...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def next_batch(self, batch_size):\n batch_data = np.zeros([batch_size,] + list(self.example_shape))\n for i in range(batch_size):\n index = self.q.pop()\n batch_data[i,...] = self.data[index]\n if len(self.q)==0:\n self.__new_epoch()\n\n return b...
[ "0.5775431", "0.5752162", "0.5737229", "0.5647322", "0.5641418", "0.5577668", "0.5576429", "0.557314", "0.55596435", "0.5549813", "0.5538726", "0.5518864", "0.5510035", "0.55075294", "0.5502222", "0.5501887", "0.5494666", "0.5462133", "0.5452544", "0.5452544", "0.5448642", ...
0.63889444
0
An operator that performs an arbitrary (userdefined) function on items of a stream.
def pipe(*args, **kwargs): return parser(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parser(stream, objconf, tuples, **kwargs):\n return map(kwargs[\"func\"], stream)", "def pipe(*functions):\n\n return reduce(compose, functions, identity)", "def m_pipe(val, *fns, **kwargs):\n kw = kwargs\n _val = val\n for fn in fns:\n _val = fn(_val, **kw)\n return _val", "def ...
[ "0.63373715", "0.58867866", "0.57664835", "0.5719077", "0.56753117", "0.5665952", "0.56323695", "0.5591342", "0.5582847", "0.5574816", "0.5525541", "0.5491133", "0.54297334", "0.53983706", "0.5379057", "0.53118664", "0.5285642", "0.5278786", "0.5274747", "0.52652615", "0.5256...
0.0
-1
Gets the duration_bin of this InlineResponse20023. Lower bound of number of seconds the match lasted
def duration_bin(self): return self._duration_bin
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def duration(self):\n return self._get(\"duration\")", "def duration(self):\n return self._get('duration')", "def run_duration(self) -> 'outputs.DurationResponse':\n return pulumi.get(self, \"run_duration\")", "def lookback_duration(self) -> str:\n return pulumi.get(self, \"lookba...
[ "0.6292436", "0.62761927", "0.6248562", "0.6116954", "0.6111447", "0.6072243", "0.60611916", "0.603508", "0.59833705", "0.59833705", "0.59833705", "0.59833705", "0.59833705", "0.59833705", "0.59833705", "0.59833705", "0.59819955", "0.59782547", "0.596437", "0.5934116", "0.588...
0.7012631
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, InlineResponse20023): return False return self.__dict__ == other.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.8457167", "0.8393036", "0.81455255", "0.8139734", "0.81333447", "0.8094964", "0.8093362", "0.8093362", "0.8093362", "0.80863476", "0.80863476", "0.8077286", "0.8077286", "0.806682" ]
0.0
-1
Test case for delete_on_background_response_descriptor_variables_library_variable_set_library_variable_set_resource
def test_delete_on_background_response_descriptor_variables_library_variable_set_library_variable_set_resource(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_on_background_response_descriptor_variables_library_variable_set_library_variable_set_resource_spaces(self):\n pass", "def test_modify_response_descriptor_variables_library_variable_set_library_variable_set_resource(self):\n pass", "def test_create_response_descriptor_variables_li...
[ "0.9055788", "0.79201555", "0.76813954", "0.74651873", "0.74061143", "0.7332813", "0.7134756", "0.69760406", "0.6917734", "0.6707609", "0.6524485", "0.63648224", "0.6312147", "0.6218006", "0.61093134", "0.5976504", "0.5791378", "0.57193226", "0.57078564", "0.5620841", "0.5511...
0.9601569
0
Return an ordered list of indices. Batches will be constructed based on this order.
def ordered_indices(self): return self.base_dataset.ordered_indices()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ordered_indices(self):\r\n return np.arange(len(self), dtype=np.int64)", "def get_indexes(self):\n indexes = []\n for c in self.components:\n indexes.extend(c.get_indexes())\n return indexes", "def inidices(self):\n return [Index(name, index) for name, index in...
[ "0.78777957", "0.7394045", "0.73657113", "0.7307805", "0.7235391", "0.7089839", "0.70796317", "0.7079322", "0.70746034", "0.7031149", "0.7029713", "0.69848675", "0.69450635", "0.69399405", "0.6898343", "0.6898284", "0.6883149", "0.68633986", "0.68050504", "0.6696233", "0.6590...
0.78239244
1
Returns the value of the distribution `rv`'s cdf at the physical boundaries in the requested dimension (e.g., coszen or energy)
def get_trunc_cdf(rv, dim): trunc_low, trunc_high = get_physical_bounds(dim=dim) cdf_low = rv.cdf(trunc_low) if trunc_low is not None else 0. cdf_high = rv.cdf(trunc_high) if trunc_high is not None else 1. return cdf_low, cdf_high
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cdf(self,x):\n if self.base == 'natural':\n cdfValue = (math.log(x)-self.lowerBound)/(self.upperBound-self.lowerBound)\n else:\n cdfValue = (math.log10(x)-self.lowerBound)/(self.upperBound-self.lowerBound)\n return cdfValue", "def cdf(self,x):\n if self.method == 'spline':\n coordi...
[ "0.6267399", "0.6257863", "0.6124699", "0.60731983", "0.60438824", "0.6042075", "0.59981596", "0.59470475", "0.59470475", "0.59368235", "0.59342027", "0.5912595", "0.5860004", "0.58467084", "0.5839231", "0.5823932", "0.5816488", "0.5798018", "0.57554287", "0.57454383", "0.572...
0.67278033
0
Checks if agent can perform function for object
def _can_for_asset(self, func_name, asset_id): return self._can_for_object(func_name, asset_id, 'get_repository_ids_for_asset')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def callable(obj): # pylint: disable=redefined-builtin\n return bool(PyCallable_Check(py_object(obj)))", "def can_act(self, **kwargs):\n return True", "def callable(obj):\n return bool(_PyCallable_Check(_py_object(obj)))", "def has_object_permission(self, request, view, obj):\n if reques...
[ "0.6584413", "0.6569731", "0.6554303", "0.6234831", "0.6221521", "0.6213265", "0.62034136", "0.62007624", "0.61898196", "0.61593145", "0.61191446", "0.61087525", "0.6092017", "0.6082001", "0.6073203", "0.6073203", "0.60713905", "0.60696673", "0.6050383", "0.6036749", "0.59975...
0.0
-1
Checks if agent can perform function for object
def _can_for_composition(self, func_name, composition_id): return self._can_for_object(func_name, composition_id, 'get_repository_ids_for_composition')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def callable(obj): # pylint: disable=redefined-builtin\n return bool(PyCallable_Check(py_object(obj)))", "def can_act(self, **kwargs):\n return True", "def callable(obj):\n return bool(_PyCallable_Check(_py_object(obj)))", "def has_object_permission(self, request, view, obj):\n if reques...
[ "0.6583134", "0.6572348", "0.6553039", "0.6236116", "0.62234074", "0.6215932", "0.6205267", "0.6203405", "0.61915296", "0.6161733", "0.6120615", "0.61102647", "0.6093958", "0.6081199", "0.607463", "0.607463", "0.60730535", "0.6068198", "0.6052449", "0.60382694", "0.5999123", ...
0.0
-1
Performs a local (numpy) calculation of the PERR.
def calculate_precision_at_equal_recall_rate(predictions, actuals): aggregated_precision = 0.0 num_videos = actuals.shape[0] for row in np.arange(num_videos): num_labels = int(np.sum(actuals[row])) top_indices = np.argpartition(predictions[row], -num_labels)[-num_label...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _eventRs(self, phi, u):\n with np.errstate(all='ignore'):\n return 1/u[0] - self.Rs", "def _residual_edp(self, params):\n data = self.F**2\n model = np.absolute(self._model())**2\n sigma = self.sigma\n return (data[self.mask]-model[self.mask]) / sigma[self.mask] \n \n ...
[ "0.6274424", "0.6254192", "0.62139803", "0.61871874", "0.61234605", "0.5976498", "0.5916309", "0.58709174", "0.57511616", "0.57511616", "0.57174593", "0.570606", "0.56922114", "0.5655125", "0.56417197", "0.5621845", "0.56072056", "0.56039804", "0.5578275", "0.55507386", "0.55...
0.0
-1
Clear the evaluation metrics and reset the EvaluationMetrics object.
def clear(self): self.sum_hit_at_one = 0.0 self.sum_perr = 0.0 self.sum_loss = 0.0 self.map_calculator.clear() self.global_ap_calculator.clear() self.num_examples = 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_metrics(self):\n self.metrics['loss'] = 0.0\n self.metrics['num_tokens'] = 0\n self.metrics['correct_tokens'] = 0\n self.metrics['correct_pred'] = 0\n self.metrics['pred_count'] = 0", "def reset(self):\n self.sum_metric = 0.\n self.num_inst = 0.\n ...
[ "0.7331311", "0.69290507", "0.6841959", "0.68257946", "0.67987525", "0.67758185", "0.66918826", "0.666724", "0.6645745", "0.6589855", "0.6499612", "0.6499612", "0.64207226", "0.6392772", "0.6356073", "0.63542366", "0.633912", "0.62911403", "0.62889814", "0.62866", "0.6284122"...
0.66543615
8
Unmapped model property for average rating of game
def average_rating(self): reviews = self.gamereview_set.all() try: return mean([ review.rating for review in reviews ]) except StatisticsError: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def average_rating(self):\n ratings = Rating.objects.filter(game=self)\n\n if len(ratings):\n # Sum all of the ratings for the game\n total_rating = 0\n for rating in ratings:\n total_rating += rating.value\n\n # Calculate the averge and retu...
[ "0.75269234", "0.7108122", "0.709028", "0.69843864", "0.69826597", "0.68777335", "0.678841", "0.66425586", "0.66110647", "0.6531666", "0.65083975", "0.6465322", "0.6358872", "0.6330752", "0.63009137", "0.6252159", "0.6237771", "0.61960155", "0.6176452", "0.6119526", "0.605772...
0.68180996
6
Returns the last value of the current blockchain.
def get_last_blockchain_value(): if len(blockchain) < 1: return None return blockchain[-1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_last_blockchain_value():\n return blockchain[-1]", "def last_value():\n return blockchain[-1]", "def get_last_blockchainvalue(self):\n if len(self.__chain) < 1:\n return None\n return self.__chain[-1]", "def get_last_blockchain_value(self):\n if len(s...
[ "0.93852717", "0.9372048", "0.9113195", "0.9109386", "0.9109386", "0.9109386", "0.9109386", "0.9109386", "0.90086985", "0.89820707", "0.81745803", "0.8166603", "0.8075334", "0.7772074", "0.7757982", "0.7621899", "0.7564715", "0.75502884", "0.7514232", "0.7455249", "0.7415701"...
0.90047807
9
Verify a transaction by checking whether the sender has sufficient coins.
def verify_transaction(transaction): sender_balance = get_balance(transaction['sender']) return sender_balance >= transaction['amount']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_transaction(\n transaction: SignedRawTransaction,\n get_balance: Callable,\n get_last_tx_nonce: Callable,\n check_funds: bool = True,\n ) -> bool:\n if check_funds:\n logger.debug(\n \"Checking the sender's balance can cover the amount bein...
[ "0.74869204", "0.72842675", "0.6665725", "0.6661393", "0.664886", "0.64767253", "0.6388629", "0.63101035", "0.62947595", "0.6268109", "0.61552846", "0.6086223", "0.6020964", "0.6014358", "0.6013245", "0.59876275", "0.59845376", "0.5978551", "0.596343", "0.5951069", "0.5939104...
0.7515717
0
All open transactions taken, added to a new block, then added to blockchain. Can invalidate following block if hash does not match previous.
def mine_block(): # Fetch the current last block of blockchain last_block = blockchain[-1] # Hash th elast block (=> to be able to compare it to stored hash value) hashed_block = hash_block(last_block) proof = proof_of_work() # Miners should be rewarded, so here is reward # reward_transact...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addBlock(self, block, unSpentTransactions):\n if self.isValidBlock(block, unSpentTransactions):\n self.chain[block.currHash] = block\n self.tailBlockHash = block.currHash\n return True\n return False", "def add_block(self, block):\n # Create a list of tra...
[ "0.7299239", "0.697445", "0.6936649", "0.6864879", "0.68612957", "0.6861291", "0.6836973", "0.67552066", "0.67429435", "0.67392534", "0.667231", "0.6576803", "0.6533263", "0.65226805", "0.65224403", "0.64510244", "0.6425288", "0.64222014", "0.6411214", "0.6393698", "0.6372051...
0.6466925
15
Test reporting of an article that does not exist
def test_report_of_article_does_not_exist(self): from rest_framework.test import APIClient client = APIClient() response = client.post('/api/report/spoon/', self.report, HTTP_AUTHORIZATION='Token ' + self.token_1, format='js...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_rate_article_not_found(self):\n self.client.credentials(HTTP_AUTHORIZATION='Bearer ' + self.token)\n self.rate_details[\"user\"][\"slug\"] = \"-ss-dd-dd-ff\"\n response = self.client.post(\n self.rate_url,\n self.rate_details,\n format='json')\n ...
[ "0.7283493", "0.71171564", "0.695727", "0.69475085", "0.69136393", "0.6837442", "0.68372315", "0.6657535", "0.65150505", "0.64166903", "0.63671476", "0.63273185", "0.6298003", "0.6290093", "0.62636065", "0.625549", "0.62228197", "0.62222844", "0.62222844", "0.6148152", "0.613...
0.78766966
0
Sets the node knowledge_source value for the current node.
def set_node_provenance(self, node_data: Dict): self.set_provenance("provided_by", node_data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_source(self, source):\n self.data['source'] = source", "def use_source(self, src_node):\n self._bld.Addreference(self.get_sobj(), src_node.get_sobj())", "def set_node(self, name, state):\n self.source_net.nodes[name] = state", "def set_source(self, source_name):\n self.sou...
[ "0.65061307", "0.6417278", "0.63754386", "0.6263851", "0.62089854", "0.6073915", "0.6073915", "0.6073915", "0.6073915", "0.6073915", "0.6073915", "0.6073915", "0.6041957", "0.59914553", "0.5975039", "0.58851427", "0.582757", "0.57991904", "0.57767886", "0.56857675", "0.557627...
0.5046243
64
Sets the edge knowledge_source value for the current edge. Edge knowledge_source properties include the 'knowledge_source' related properties.
def set_edge_provenance(self, edge_data: Dict): data_fields = list(edge_data.keys()) for ksf in data_fields: if ksf in knowledge_provenance_properties: self.set_provenance(ksf, edge_data) for ksf in self.mapping: if ksf != "provided_by": se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def edge(self, edge: EdgeConfig):\n\n self._edge = edge", "def setSource(self, *args):\n return _libsbml.ExternalModelDefinition_setSource(self, *args)", "def use_source(self, src_node):\n self._bld.Addreference(self.get_sobj(), src_node.get_sobj())", "def set_source(self, source_name):\...
[ "0.62508196", "0.57065916", "0.5530068", "0.54177684", "0.54154164", "0.52718985", "0.5243277", "0.52162755", "0.52013206", "0.5134606", "0.51154166", "0.51154166", "0.51154166", "0.51154166", "0.51154166", "0.51154166", "0.51154166", "0.50501686", "0.50395364", "0.5021171", ...
0.5068716
17
AWS healtcheck expects 200 status on root url
def get(self, request, *args, **kwargs): return HttpResponse('It\'s working ✨')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _healthcheck():\n return '', 200", "def url_health():\n return \"OK\"", "def health_check():\n # TODO: implement any other checking logic.\n return '', 200", "def test_health_check(self):\n self.url = reverse(\"health-check\")\n response = self.client.get(self.url, **self.au...
[ "0.75829935", "0.7139423", "0.7089537", "0.6906219", "0.68725795", "0.6721617", "0.67154694", "0.66651255", "0.6633958", "0.6595418", "0.6577928", "0.6535786", "0.6529145", "0.65202874", "0.65103686", "0.64997905", "0.645079", "0.6445831", "0.64388096", "0.6427025", "0.639492...
0.0
-1
Store the fact that a scheduled message was unsent.
def unsend_scheduled_messages_after(self, time_cutoff): for user_id in self.user_id_to_scheduled_message_ts: for scheduled_ts in list(self.user_id_to_scheduled_message_ts[user_id]): if scheduled_ts >= time_cutoff: # The below if statement is likley redundant ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def handle_unsent_message(cls, ctx, user, target, msg_type, delivered_or_queued, unsent):\n return", "def scheduled_message_was_sent(self, user_id, scheduled_ts):\n if user_id not in self.user_id_to_scheduled_message_ts:\n self.user_id_to_scheduled_message_ts[user_id] = set()\n ...
[ "0.6281566", "0.6062708", "0.59902596", "0.5865085", "0.57213324", "0.56656295", "0.5647895", "0.5647895", "0.56224066", "0.54500836", "0.5444862", "0.5393879", "0.5379537", "0.5338373", "0.53230965", "0.53176296", "0.5287505", "0.5284822", "0.5284822", "0.52847815", "0.52596...
0.55489004
9
Check if datetime dates are the same.
def compare_dates(dt1, dt2): return dt1.year == dt2.year and dt1.month == dt2.month and dt1.day == dt2.day
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_hotshot_check_date(self):\n date_first = check_date('2015-11-03 13:21:02.071381', '03.11.2015', '20.11.2015')\n date_second = check_date('2015-11-03 13:21:02.071381', '01.11.2015', '02.11.2015')\n\n self.assertTrue(date_first)\n self.assertFalse(date_second)", "def test_date1...
[ "0.7406846", "0.73458844", "0.73046005", "0.6966629", "0.6849388", "0.6791419", "0.67734766", "0.6743858", "0.673997", "0.67293555", "0.6710147", "0.6682322", "0.66746116", "0.6660897", "0.6622947", "0.66100264", "0.6599583", "0.6520754", "0.64506376", "0.6448551", "0.6427077...
0.813794
0
Returns center cropped image
def center_crop(img, dim): height, width = img.shape[0], img.shape[1] # process crop width and height for max available dimension crop_width = dim[1] if dim[1]<img.shape[1] else img.shape[1] crop_height = dim[0] if dim[0]<img.shape[0] else img.shape[0] mid_x, mid_y = int(width/2), int(height/2) cw2, ch2 = int(c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def crop_center(image, cropx, cropy):\n x,y = image.shape\n startx = x//2 - cropx//2\n starty = y//2 - cropy//2 \n return image[startx:startx+cropx, starty:starty+cropy]", "def crop_center_img(self):\n # TODO Task 1.1\n img = self.data\n img_with_missing_crop = np.copy(img)\n ...
[ "0.7963459", "0.7638151", "0.76044345", "0.74087983", "0.740208", "0.7284791", "0.728289", "0.7279314", "0.7261671", "0.72432995", "0.7205581", "0.72042626", "0.7200235", "0.7156868", "0.7101748", "0.70445836", "0.696327", "0.69575727", "0.6903975", "0.69010776", "0.68450946"...
0.6660887
34
Yield successive nsized chunks from l.
def chunks(l, n): for i in range(0, len(l), n): yield l[i:i + n]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _chunk(self, l, n):\n for i in range(0, len(l) + 1, n):\n yield l[i:i + n]", "def chunks(self, l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]", "def __chunks(l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]", "def get_chunks(self, ...
[ "0.8040086", "0.79256725", "0.7923959", "0.78855336", "0.78781366", "0.7816429", "0.7766289", "0.7756418", "0.7744994", "0.77324396", "0.77295053", "0.77257586", "0.77034765", "0.7690202", "0.7690202", "0.7664886", "0.7657751", "0.7656609", "0.7656609", "0.7646568", "0.764656...
0.74497783
72
Escape problematic characters for RTF. Returns a cleanedup version of the passed string, converted to 7bit ASCII, suitable for insertion into an RTF document.
def fix(text): text = text.replace("\\", "\\\\") text = text.replace("{", "\\{").replace("}", "\\}") text = _nonAsciiPattern.sub(_replace, text) return text
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def escape_unicode_string(u):\n def replacer(matchobj):\n if ord(matchobj.group(1)) == 127:\n return \"\\\\x7f\"\n if ord(matchobj.group(1)) == 92: # backslash\n return \"\\\\\\\\\"\n return REPLACEMENT_TABLE[ord(matchobj.group(1))]\n return re.sub(\"([\\\\000-\\\\0...
[ "0.6638866", "0.65845484", "0.62748605", "0.610262", "0.6100276", "0.60689026", "0.6063311", "0.6022153", "0.59766936", "0.5971409", "0.59683627", "0.59496856", "0.59364694", "0.5932294", "0.5929602", "0.592675", "0.5912138", "0.5910917", "0.59015197", "0.58791673", "0.585418...
0.67479604
0
Creates a new list type. Pass in List.NONE for an unnumbered list, or a real number type (e.g., List.ARABIC). Typically, user code will invoke this indirectly, through the Document.addList() method (q.v.).
def __init__(self, numberType): self.id = List.__getNextId() self.__numberType = numberType if self.__numberType != List.NONE: self.__levelText = "\\'02\\'00." self.__levelNumbers = "\\'01" else: self.__levelText = "\\'01\\u8226 *" self.__...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_new_list(self, list_item_type_name, list_type_name):\n global last_added_list_type_id\n last_added_list_type_id += 1\n new_list_id = last_added_list_type_id\n\n new_list_name = \"ListOf\" + list_type_name + \"s\"\n\n # First create the list itself\n # Create a ...
[ "0.706224", "0.706224", "0.67515886", "0.6415258", "0.5961175", "0.57241756", "0.57237995", "0.5665359", "0.5633094", "0.56301224", "0.5582019", "0.55509025", "0.5530938", "0.545514", "0.5439083", "0.5439083", "0.5417483", "0.5362759", "0.5356182", "0.53456825", "0.52998185",...
0.62718654
4
Returns the default collector settings
def get_default_config(self): config = super(DropwizardCollector, self).get_default_config() config.update({ 'url': DEFAULT_METRICS_URL, 'path': 'dropwizard' }) return config
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_default_config(self):\r\n config = super(CMDCollector, self).get_default_config()\r\n config.update({\r\n 'enabled': 'True',\r\n 'fs': ',',\r\n 'timeout': 300,\r\n })\r\n return config", "def getDefaultSettings():\n return {}", "def ge...
[ "0.70514023", "0.7008024", "0.6713433", "0.65743333", "0.65309024", "0.6521635", "0.6515402", "0.6466526", "0.6447688", "0.641337", "0.6397818", "0.6380512", "0.63683224", "0.6357208", "0.63517016", "0.6331759", "0.63120294", "0.62353724", "0.6231899", "0.62074906", "0.620161...
0.69490683
2
Sends a 401 response that enables basic auth
def authenticate(): return "Please log in... Log in page"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def authenticate():\n return Response('Not Authorized', 401, {'WWW-Authenticate': 'Basic realm=\"api\"'})", "def authenticate():\n return Response(\n '', 401, {'WWW-Authenticate': 'Basic realm=\"Login Required\"'}\n )", "def authenticate():\n return Response(\n 'You have to login with pro...
[ "0.8093736", "0.80926424", "0.7958403", "0.7852648", "0.7843114", "0.7824419", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", "0.7810746", ...
0.0
-1
Returns a boolean indicating if the password is strong Strong passwords are 8 characters or longer, contain at least one uppercase letter, lowercase letter and digit.
def check_pass(text): upperRegex = re.compile(r'[A-Z]') lowerRegex = re.compile(r'[a-z]') lengthRegex = re.compile(r'.{8,}') digitRegex = re.compile(r'\d') if not upperRegex.search(text): return False elif not lowerRegex.search(text): return False elif not length...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_strong(password):\n # at least eight characters long\n if len(password) < 8:\n return False\n\n # contains both uppercase and lowercase characters\n upper = re.compile(r\"[A-Z]\")\n up = upper.search(password)\n lower = re.compile(r\"[a-z]\")\n low = lower.search(password)\n\n ...
[ "0.8663722", "0.75587124", "0.72078776", "0.7196853", "0.7176138", "0.7115806", "0.71134627", "0.7087266", "0.70488226", "0.70135796", "0.6969454", "0.69403523", "0.69234264", "0.6874378", "0.68543565", "0.68320864", "0.67779094", "0.6757781", "0.6703692", "0.6696325", "0.668...
0.67354107
18
Returns a tag, which may be start time of this test run. This tag is identical across the test runner's worker processes.
def test_start_time_tag(): return os.environ.get("RUINER_TEST_START_TIME", "latest")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_time(self) -> str:\n return pulumi.get(self, \"start_time\")", "def start_time(self) -> str:\n return pulumi.get(self, \"start_time\")", "def getStartTime(self):\n assert not self.isWaitingToStart(), \"Too early to tell: %s\" % self\n return \"%s\" % self.__jobInfo.startTime",...
[ "0.6283497", "0.6283497", "0.6277567", "0.62729317", "0.62515754", "0.6248598", "0.61785764", "0.6171838", "0.6163418", "0.61497474", "0.61011755", "0.6072867", "0.6044303", "0.6038727", "0.6017822", "0.59328866", "0.5908952", "0.59056944", "0.5905075", "0.5905075", "0.590507...
0.8001191
0
Strip all ansi escape codes
def strip_ansi(content): return ANSI_ESCAPES_REGEX.sub('', content)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strip_ansi(text):\n return ANSI_ESCAPE_RE.sub('', text)", "def strip_ansi(text: str):\n return _ANSI_SEQUENCE_REGEX.sub('', text)", "def _strip_ansi(s):\n if isinstance(s, str):\n return _ansi_codes.sub(r\"\\4\", s)\n else: # a bytestring\n return _ansi_codes_bytes.sub(r\"\\4\", ...
[ "0.8682332", "0.83025575", "0.8297623", "0.82542694", "0.7964481", "0.7932828", "0.78513604", "0.768965", "0.75720173", "0.756677", "0.75487787", "0.7260478", "0.7085713", "0.7008547", "0.6988856", "0.69182104", "0.6716041", "0.66886145", "0.6680426", "0.66245204", "0.6604268...
0.858079
1
Compute the distance between 2 bounding boxes
def get_distance(self, b_a, b_b): dx = max(max(0, b_a[1] - b_b[3]), max(0, b_b[1] - b_a[3])) dy = max(max(0, b_a[0] - b_b[2]), max(0, b_b[0] - b_a[2])) return max(dx, dy)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bbox_dist(bbox1, bbox2):\n d = 0.0\n midpoint1 = midpoint(bbox1)\n midpoint2 = midpoint(bbox2)\n for i in range(2):\n d += (midpoint1[i] - midpoint2[i])**2\n d = np.sqrt(d)\n return d", "def distance_hyperbox(b1,b2):\n return max(0,np.max(np.hstack((b1.l-b2.u,b2.l-b1.u))))", "de...
[ "0.79955995", "0.75176734", "0.72025377", "0.7184925", "0.71459496", "0.7116346", "0.7005331", "0.69272166", "0.69012177", "0.68160224", "0.6803914", "0.6742389", "0.66856384", "0.66558456", "0.6637974", "0.6632439", "0.66309494", "0.6559493", "0.65449345", "0.65399456", "0.6...
0.0
-1
Check that there are still surviving ships
def check_fleet(self): if len(self.ships) > 0: response = False for ship in self.ships: if ship.afloat == True: response = True return response
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_game_over(self):\n for piece in self.pieces:\n if not piece.destroyed:\n return False\n print(\"Signal.END\")\n return True", "def hit(self):\n\n self.units.pop()\n return (len(self.units) == 0) # Returns True if the ship has been sunk", "def h...
[ "0.6768147", "0.66486454", "0.6641144", "0.6333098", "0.6238693", "0.61549944", "0.6092869", "0.6067527", "0.6065381", "0.6049714", "0.6021803", "0.6015942", "0.5995482", "0.5933524", "0.5903855", "0.5867603", "0.5847981", "0.58386475", "0.5838318", "0.5830238", "0.5809827", ...
0.0
-1
A view that will return the index.html template.
def index(request): return render(request, "index.html")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index():\n # Render template\n return render_template('index.html')", "def index():\n return render_template('index.html')", "def index():\r\n return render_template('index.html')", "def index():\n return render_template('index.html')", "def index():\n return r...
[ "0.8954126", "0.8953713", "0.8946297", "0.8933021", "0.8933021", "0.8896368", "0.8896368", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0.88458806", "0....
0.0
-1
A view that will return to the about.html template.
def about(request): return render(request, "about.html")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def about():\r\n return render_template(\"/home/about.html\")", "def about():\n\n return render_template('about_page.html', title='About')", "def about():\n return render_template('about.html', title='About')", "def about(request):\n return render_template('core/about.html')", "def about():...
[ "0.8657666", "0.8654846", "0.86494917", "0.86154366", "0.8607712", "0.8587782", "0.85710955", "0.8550439", "0.854989", "0.8545402", "0.8541093", "0.8541093", "0.8541093", "0.8541093", "0.8541093", "0.8541093", "0.8541093", "0.8541093", "0.8541093", "0.85380125", "0.85186124",...
0.84747577
27
A view that will return to the contact.html template.
def contact(request): return render(request, "contact.html")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contact():\n return render_template('contact.html')", "def contact(request):\n\n return render(request, 'home/contact.html')", "def contact():\n return render_template(\n 'contact.html',\n title='Contact',\n year=datetime.now().year,\n message='My contact page.'\n )"...
[ "0.87275285", "0.85623634", "0.83891225", "0.83853567", "0.835942", "0.8348642", "0.8348642", "0.8348642", "0.8348642", "0.8348642", "0.8348642", "0.8348642", "0.8348642", "0.834425", "0.8342942", "0.8342942", "0.8269166", "0.81857646", "0.81837237", "0.81811655", "0.81615585...
0.85719264
1
A view that will return a list of cakes to the weddingcakes.html template.
def weddingcakes(request): products = Product.objects.all() return render(request, "weddingcakes.html", {"products": products})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cafe_list():\n\n cafes = Cafe.query.order_by('name').all()\n\n return render_template(\n 'cafe/list.html',\n cafes=cafes,\n )", "def show_all_cupcakes():\n all_cupcakes = Cupcake.query.all()\n serialized = [serialize(cupcake) for cupcake in all_cupcakes]\n\n return jsonify(cup...
[ "0.6764154", "0.6590569", "0.6529792", "0.62766933", "0.62275034", "0.62184834", "0.6130166", "0.60844857", "0.6077805", "0.60669076", "0.6065775", "0.6045268", "0.602269", "0.6002405", "0.5950898", "0.5928992", "0.5907874", "0.58995223", "0.5835869", "0.5831679", "0.5814352"...
0.718781
0
A view that will return a list of birthday cakes to the birthdaycakes.html template.
def birthdaycakes(request): products = Product.objects.all() return render(request, "birthdaycakes.html", {"products": products})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cafe_list():\n\n cafes = Cafe.query.order_by('name').all()\n\n return render_template(\n 'cafe/list.html',\n cafes=cafes,\n )", "async def birthdaylist(self, ctx):\n await birthday_list.birthday_info(ctx)", "def index(request):\n try:\n doctor = Doctor.objects.get(us...
[ "0.6172296", "0.6135843", "0.6091858", "0.5974001", "0.5815637", "0.5812576", "0.5792597", "0.5779868", "0.5736192", "0.5683933", "0.56755096", "0.5644524", "0.5611166", "0.5607934", "0.5599547", "0.5591209", "0.55896664", "0.5587035", "0.5577466", "0.55613345", "0.5512725", ...
0.7414948
0
A view that will return a list of sheetcakes to the sheetcakes.html template.
def sheetcakes(request): products = Product.objects.all() return render(request, "sheetcakes.html", {"products": products})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cafe_list():\n\n cafes = Cafe.query.order_by('name').all()\n\n return render_template(\n 'cafe/list.html',\n cafes=cafes,\n )", "def list_of_stories():\n return render_template(\"list_of_stories.html\", stories = stories.values())", "def listing(request):\n lakes = Lake.objects...
[ "0.6229192", "0.61509186", "0.6025846", "0.5932279", "0.59009314", "0.5870074", "0.5794099", "0.57722735", "0.57498497", "0.56898165", "0.56718445", "0.564996", "0.5644606", "0.5608243", "0.56081337", "0.555043", "0.55415154", "0.5512649", "0.5510938", "0.55083203", "0.548114...
0.7386663
0
A view that will return the testimonials.html template.
def testimonials(request): return render(request, "testimonials.html")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testimonials(self):\n return self._get_child_page_of_type(UserTestimonialsPage)", "def testimonials(self):\n return self._get_child_page_of_type(UserTestimonialsPage)", "def portfolio_detail():\n return render_template('portfolio/portfolio.html')", "def story(request):\n return render...
[ "0.6440264", "0.6440264", "0.62551194", "0.62105566", "0.6202186", "0.6111025", "0.60678613", "0.6062352", "0.5989167", "0.59329116", "0.59191036", "0.58942693", "0.5865982", "0.5806878", "0.5788199", "0.57860357", "0.57579136", "0.5745933", "0.5745238", "0.5745238", "0.57197...
0.8700251
0
Returns a list of valid words. Words are strings of lowercase letters.
def loadWords(): # inFile: file inFile = open(WORDLIST_FILENAME, 'r') # line: string line = inFile.readline() # wordlist: list of strings wordlist = line.split() return wordlist
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_words(f: str, letters: List[str]) -> List[str]:\r\n forbidden_letters = [i for i in string.ascii_lowercase]\r\n for i in letters:\r\n try:\r\n forbidden_letters.remove(i)\r\n except:\r\n pass\r\n words_file = open(f)\r\n word_list = []\r\n letstr = \"\"\r\...
[ "0.74141264", "0.7316963", "0.71649086", "0.7083956", "0.7075021", "0.70583266", "0.70583266", "0.70572466", "0.701335", "0.7008619", "0.7007723", "0.69712204", "0.6958952", "0.6958382", "0.6941486", "0.6941275", "0.6916614", "0.6858929", "0.6823021", "0.6822135", "0.6820978"...
0.0
-1
take 1D float array of rewards and compute discounted reward
def discount_rewards(r): discounted_r = np.zeros_like(r) running_add = 0 for t in reversed(range(0, r.size)): running_add = running_add * gamma + r[t] discounted_r[t] = running_add return discounted_r
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def discount_rewards(rewards):\r\n discounted_r = np.zeros_like(rewards)\r\n running_add = 0\r\n for t in reversed(range(0, len(rewards))): \r\n running_add = running_add * reward_discount + rewards[t]\r\n discounted_r[t] = running_add\r\n return discounted_r", "def discoun...
[ "0.8100446", "0.7839692", "0.779265", "0.77411646", "0.7653726", "0.7597975", "0.75828975", "0.7581594", "0.7579058", "0.7535841", "0.751882", "0.7504493", "0.7467504", "0.74343014", "0.7426615", "0.74061066", "0.7394629", "0.73702496", "0.73562455", "0.7328596", "0.7201555",...
0.7456529
13
Get the list of all nodes in the graph.
def getNodes(self): return self.__allNodes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_nodes(self):\n\n return list(self.graph.nodes)", "def get_node_list(self):\n return [[node] for node in self.graph.nodes]", "def nodes(self):\n return list(self.__graph.keys())", "def get_all_nodes(self):\n return self._get_all_nodes()", "def nodes(self):\n nodes ...
[ "0.85697395", "0.8516235", "0.83069646", "0.8289322", "0.82169616", "0.82070625", "0.81972146", "0.81449574", "0.81319046", "0.8104505", "0.80961007", "0.800618", "0.7982536", "0.7982536", "0.788919", "0.78725296", "0.7834642", "0.78113556", "0.7781186", "0.7747402", "0.76825...
0.82738733
4
Get the name of the currently selected node.
def getSelectedNode(self): return self.__selectedNode
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def node_name(self):\n return self._node_name", "def get_name(self):\n return self.tagnode", "def get_node_name(self, node):\n return node.name", "def get_name(self):\n return self.children[0]", "def get_node_name(self):\n return util.join_names_underscore(self.name, str(...
[ "0.80392283", "0.79532605", "0.7841116", "0.77826786", "0.77112156", "0.7666512", "0.7666512", "0.7666512", "0.7666512", "0.7427819", "0.7388148", "0.734379", "0.729248", "0.729143", "0.729141", "0.7156889", "0.7147383", "0.711365", "0.7090674", "0.70897114", "0.70676506", ...
0.0
-1
Get the distance above the node that is being displayed.
def getAboveDistance(self): return self.__aboveDistance
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def top_distance(self):\n return self.y", "def getBelowDistance(self):\n return self.__belowDistance", "def get_distance(self, node):\n return np.sqrt(\n (self.x - node.x) ** 2 +\n (self.y - node.y) ** 2\n )", "def get_distance(self) -> int:\n return s...
[ "0.7222821", "0.71368724", "0.69738525", "0.6769557", "0.6647744", "0.6600473", "0.65055746", "0.64567316", "0.6449563", "0.644421", "0.64156026", "0.641031", "0.63718027", "0.6370833", "0.6331696", "0.632832", "0.6326339", "0.6326339", "0.6326339", "0.6326339", "0.6326339", ...
0.76243824
0
Get the distance below the node that is being displayed.
def getBelowDistance(self): return self.__belowDistance
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def height(self):\n return self.i_node.distance(self.n_node)", "def top_distance(self):\n return self.y", "def getAboveDistance(self):\n return self.__aboveDistance", "def get_distance(self, node):\n return np.sqrt(\n (self.x - node.x) ** 2 +\n (self.y - node...
[ "0.70612484", "0.69837356", "0.6900154", "0.68536454", "0.68156075", "0.67329437", "0.66154844", "0.65944964", "0.65942335", "0.6567826", "0.65518767", "0.6523599", "0.6504559", "0.64094913", "0.62892777", "0.6251985", "0.6219749", "0.62019897", "0.6192968", "0.61922884", "0....
0.74886084
0
Probability density function for uniform semimajor axis distribution in AU
def dist_sma(self, a): return self.uniform(a, self.arange.to("AU").value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rate_density(x, a):\n return a * x", "def pdf(x, mu, std):\n if std == 0:\n return 0\n return (1.0 / (std * sqrt(2 * pi))) * np.exp(-(x - mu) ** 2 / (2 * std ** 2))", "def probability_density(self, X):\n raise NotImplementedError", "def test_probability_density(self):\n # Se...
[ "0.69303334", "0.6818437", "0.68084055", "0.6746853", "0.66229695", "0.6593313", "0.65365404", "0.651651", "0.6502097", "0.64832777", "0.64654124", "0.6455742", "0.6444512", "0.6442557", "0.64206487", "0.6408499", "0.63383675", "0.6328811", "0.6313404", "0.63095045", "0.62974...
0.0
-1
Delete a comment in a post. Only the author of a comment or the owner of a resub can delete the comment.
async def delete_comment(comment: models.Comment = Depends(resolve_comment_for_comment_owner_or_resub_owner), db: Session = Depends(get_db)): crud.delete_comment(db, comment.id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_comment(request, comment_id):\n raise NotImplementedError", "def cmd_comment_delete(client, args):\n delete_comment = client.delete_comment(args.comment_id)\n generate_output({'delete_comment': delete_comment})", "def comment_remove(request, pk):\n comment = get_object_or_404(Comment, pk...
[ "0.71567506", "0.70379335", "0.68949413", "0.68340385", "0.6823589", "0.68172073", "0.67659277", "0.6680487", "0.66638416", "0.65956354", "0.65643597", "0.6516853", "0.6507571", "0.6456063", "0.6417316", "0.6358114", "0.63370985", "0.6307334", "0.62630486", "0.6127596", "0.61...
0.73769075
0
Convert default service account to account email.
def email_for_default_sa(project): sa_structs = gcloud_json(['gcloud', 'iam', 'service-accounts', 'list', '--project', project]) for sa_struct in sa_structs: if 'compute@developer' in sa_struct['email']: return sa_struct['email'] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service_account_email_address(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"service_account_email_address\")", "def service_account_email_address(self) -> str:\n return pulumi.get(self, \"service_account_email_address\")", "def service_account_email_address(self) -> Optional[pulumi...
[ "0.6715278", "0.6700822", "0.6628977", "0.6562429", "0.6562429", "0.6465216", "0.6396426", "0.6125913", "0.6021179", "0.59912086", "0.59912086", "0.5959284", "0.59316605", "0.5904003", "0.5891224", "0.5876859", "0.5866315", "0.5849906", "0.5798227", "0.5798227", "0.5798227", ...
0.7228228
0
Validate service account, and SA keys, rewriting email if needed.
def validate_service_account_keys(service_account, project): Print.GN('Validating service account and keys.') if service_account == 'default': service_account = email_for_default_sa(project) try: user_keys = gcloud_json([ 'gcloud', 'iam', 'service-accounts', 'keys', 'list', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post(self):\n data = EmailAddressValidationSchema().load(request.json)\n email_lowercase = data[\"email\"].lower()\n verification_token = data[\"verificationToken\"]\n UserRegistrationService.validate_email_address_verification_token(email_lowercase, verification_token)", "def val...
[ "0.5763259", "0.554804", "0.53703517", "0.53526074", "0.5324196", "0.5302309", "0.5282969", "0.519255", "0.5183283", "0.51717764", "0.516484", "0.5151231", "0.5149192", "0.51301616", "0.51300055", "0.5125551", "0.5110303", "0.5101654", "0.5092259", "0.50743043", "0.50578415",...
0.5329634
4
Empty dummy layer to serve as placeholder for shortcut and route layers, which provide connections to previous layers. Actual logic is handled in Darknet.forward().
def __init__(self): super().__init__()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createEmptyLayer(self):\n # , wt.greeting: False , wt.ects: False, wt.preReqs: False, wt.courseCodeMentioned: False\n layer = {wt.questionWord: \"\", wt.pronoun: \"\", wt.verb: \"\", wt.websiteName: \"\", wt.timeWord: \"\", wt.about: \"\",\n wt.weather: \"\", wt.when: \"\", wt.key...
[ "0.6661153", "0.6490303", "0.6232783", "0.6221655", "0.5946437", "0.594271", "0.59382886", "0.5890493", "0.5887442", "0.5840491", "0.58024573", "0.57472515", "0.57430995", "0.57235676", "0.5696434", "0.5647566", "0.5645178", "0.56379694", "0.56197906", "0.55343336", "0.552417...
0.0
-1
Process input tensor and produce bounding box coordinates, class probability, and class index.
def forward(self, x): # Introspect number of classes from anchors and input shape. num_anchors = len(self.anchors) batch_size, num_predictions, h, w = x.shape num_classes = int(num_predictions / num_anchors) - 5 x = x.reshape((batch_size, num_anchors, num_classes + 5, h, w)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_outputs(self, outputs, image_size):\n boxes = []\n box_confidences = []\n box_class_probs = []\n for output in outputs:\n boxes.append(output[..., 0:4])\n box_confidences.append(self.sig(output[..., 4, np.newaxis]))\n box_class_probs.append(s...
[ "0.6706056", "0.65239096", "0.62652785", "0.6218411", "0.61396897", "0.61283857", "0.6122238", "0.611993", "0.61045426", "0.6103687", "0.6064496", "0.60588264", "0.6027531", "0.59847194", "0.5966662", "0.59279644", "0.586214", "0.5801339", "0.57982415", "0.5781957", "0.577820...
0.0
-1
List of all the explicit and implied data requirements for this request, as needed for creating a job object. Returns List[DataRequirement] List of all the explicit and implied data requirements for this request.
def data_requirements(self) -> List[DataRequirement]: return [ self.bmi_cfg_data_requirement, self.forcing_data_requirement, self.hydrofabric_data_requirement, self.partition_cfg_data_requirement, self.realization_cfg_data_requirement, ]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_data_reqs(self):\n reqs = {\n \"requires_partial_lc\": True,\n \"metric\": self.metric,\n \"requires_hyperparameters\": False,\n \"hyperparams\": None,\n \"unlabeled\": False,\n \"unlabeled_factor\": 0,\n }\n return reqs...
[ "0.7399392", "0.6757007", "0.6298203", "0.59120965", "0.58829975", "0.5852859", "0.57605505", "0.5758578", "0.5730543", "0.57006925", "0.5682317", "0.56804734", "0.5628312", "0.56186134", "0.56152946", "0.56106013", "0.5610255", "0.55861616", "0.5585712", "0.5531084", "0.5506...
0.85020816
0
The index value of ``data_id`` to uniquely identify sets of BMI module config data that are otherwise similar. Returns str Index value of ``data_id`` to uniquely identify sets of BMI module config data that are otherwise similar.
def bmi_config_data_id(self) -> str: return self._bmi_config_data_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_data_id(self, name):\n\n idx = -1\n if type(name) is str:\n data_names = self.data_list()\n if name in data_names:\n idx = data_names.index(name)\n return(idx)", "def realization_config_data_id(self) -> str:\n return self.config_data_id", ...
[ "0.6216138", "0.58915424", "0.5877848", "0.566948", "0.5658639", "0.56280905", "0.55710214", "0.55339956", "0.5516464", "0.5487767", "0.54839426", "0.5452809", "0.5375143", "0.53696126", "0.5366345", "0.5353029", "0.5341586", "0.53280956", "0.5319926", "0.5319926", "0.5307271...
0.66749483
0
A requirement object defining of the BMI configuration data needed to execute this request. Returns DataRequirement A requirement object defining of the BMI configuration data needed to execute this request.
def bmi_cfg_data_requirement(self) -> DataRequirement: if self._bmi_cfg_data_requirement is None: bmi_config_restrict = [ DiscreteRestriction( variable="data_id", values=[self._bmi_config_data_id] ) ] bmi_config_domain = Dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hydrofabric_data_requirement(self) -> DataRequirement:\n if self._hydrofabric_data_requirement is None:\n hydro_restrictions = [\n DiscreteRestriction(\n variable=\"hydrofabric_id\", values=[self._hydrofabric_uid]\n ),\n Discrete...
[ "0.6452344", "0.61670595", "0.61638826", "0.6128956", "0.60974234", "0.57616895", "0.5329206", "0.5039065", "0.5002695", "0.4939127", "0.49187788", "0.48541144", "0.48475865", "0.48267353", "0.48071423", "0.4777065", "0.47014198", "0.46792993", "0.467474", "0.46577188", "0.46...
0.8191051
0
A requirement object defining of the forcing data needed to execute this request. Returns DataRequirement A requirement object defining of the forcing data needed to execute this request.
def forcing_data_requirement(self) -> DataRequirement: if self._forcing_data_requirement is None: # TODO: going to need to address the CSV usage later forcing_domain = DataDomain( data_format=DataFormat.AORC_CSV, continuous_restrictions=[self._time_range],...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hydrofabric_data_requirement(self) -> DataRequirement:\n if self._hydrofabric_data_requirement is None:\n hydro_restrictions = [\n DiscreteRestriction(\n variable=\"hydrofabric_id\", values=[self._hydrofabric_uid]\n ),\n Discrete...
[ "0.7167389", "0.6622867", "0.63169146", "0.62775666", "0.5754902", "0.56679356", "0.55585635", "0.5285966", "0.51847655", "0.51163375", "0.50830495", "0.5072645", "0.50726414", "0.50674707", "0.5050114", "0.5044926", "0.49724722", "0.49594453", "0.49417934", "0.49417934", "0....
0.80969536
0
A requirement object defining the hydrofabric data needed to execute this request. Returns DataRequirement A requirement object defining the hydrofabric data needed to execute this request.
def hydrofabric_data_requirement(self) -> DataRequirement: if self._hydrofabric_data_requirement is None: hydro_restrictions = [ DiscreteRestriction( variable="hydrofabric_id", values=[self._hydrofabric_uid] ), DiscreteRestriction( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def partition_cfg_data_requirement(self) -> DataRequirement:\n if self._partition_cfg_data_requirement is None:\n d_restricts = []\n\n # Add restriction on hydrofabric\n d_restricts.append(\n DiscreteRestriction(\n variable=\"hydrofabric_id\...
[ "0.6787229", "0.67788893", "0.61636657", "0.6025319", "0.5768143", "0.56299055", "0.5516795", "0.55032426", "0.5409377", "0.53630954", "0.53078556", "0.52778864", "0.5185936", "0.51387703", "0.51206166", "0.50780064", "0.5045509", "0.50188434", "0.5002105", "0.49975094", "0.4...
0.8381505
0
The data format ``data_id`` for the hydrofabric dataset to use in requested modeling. This identifier is needed to distinguish the correct hydrofabric dataset, and thus the correct hydrofabric, expected for this modeling request. For arbitrary hydrofabric types, this may not be possible with the unique id of the hydrof...
def hydrofabric_data_id(self) -> str: return self._hydrofabric_data_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_id(self):\n return self.unpack_string(0x4, 2)", "def dataset_id(self) -> str:\n return self._dataset_id", "def generated_data_id(self) -> Optional[str]:\n return self._generated_data_id", "def dataset_id(self) -> str:\n return pulumi.get(self, \"dataset_id\")", "def dat...
[ "0.6602505", "0.6537788", "0.6456604", "0.6410008", "0.6410008", "0.6410008", "0.63690454", "0.6231081", "0.62167346", "0.61841124", "0.6151895", "0.6112876", "0.61104673", "0.6096965", "0.60433245", "0.60189515", "0.5904478", "0.58916736", "0.5846801", "0.5816432", "0.574085...
0.7605217
0
The unique id of the hydrofabric for this modeling request. Returns str The unique id of the hydrofabric for this modeling request.
def hydrofabric_uid(self) -> str: return self._hydrofabric_uid
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hydrofabric_data_id(self) -> str:\n return self._hydrofabric_data_id", "def unique_id(self) -> str:\n return f\"{self._host}_{self._name}_{self._unique_id}\"", "def unique_id(self):\n return self._uuid", "def unique_id(self):\n return self._uuid", "def unique_id(self):\n ...
[ "0.76448876", "0.7108294", "0.70984775", "0.70984775", "0.7009763", "0.6986668", "0.6979647", "0.6956512", "0.6956512", "0.6956512", "0.6956512", "0.6956512", "0.6956512", "0.6956512", "0.6956512", "0.6920794", "0.6916433", "0.6909974", "0.68713135", "0.6844287", "0.6819783",...
0.766789
0
The ``data_id`` for the partition config dataset to use in requested modeling. This identifier is needed to distinguish the correct specific partition config dataset, and thus the correct partition config, expected for this modeling request. However, this may not always be necessary, as it should be possible to find a ...
def partition_cfg_data_id(self) -> Optional[str]: return self._part_config_data_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def partition_id(self) -> 'outputs.PreventionJobTriggerInspectJobStorageConfigDatastoreOptionsPartitionId':\n return pulumi.get(self, \"partition_id\")", "def dataset_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"dataset_id\")", "def hydrofabric_data_id(self) -> str:\n ...
[ "0.6641666", "0.6637607", "0.6272348", "0.6272189", "0.6205243", "0.6205243", "0.6205243", "0.60910755", "0.60485655", "0.5829867", "0.58218056", "0.56978405", "0.5673452", "0.5643621", "0.5586364", "0.55681723", "0.5535753", "0.5469309", "0.5446034", "0.5386966", "0.53774095...
0.81040806
0
A requirement object defining of the partitioning configuration data needed to execute this request. Returns DataRequirement A requirement object defining of the partitioning configuration data needed to execute this request.
def partition_cfg_data_requirement(self) -> DataRequirement: if self._partition_cfg_data_requirement is None: d_restricts = [] # Add restriction on hydrofabric d_restricts.append( DiscreteRestriction( variable="hydrofabric_id", values=[sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hydrofabric_data_requirement(self) -> DataRequirement:\n if self._hydrofabric_data_requirement is None:\n hydro_restrictions = [\n DiscreteRestriction(\n variable=\"hydrofabric_id\", values=[self._hydrofabric_uid]\n ),\n Discrete...
[ "0.7100639", "0.66819", "0.6378112", "0.61715674", "0.6142692", "0.5281486", "0.5260798", "0.50124", "0.4985995", "0.49736303", "0.49723744", "0.49531448", "0.49437967", "0.4938578", "0.4931926", "0.49203426", "0.49138469", "0.48987493", "0.48796716", "0.4870465", "0.48703337...
0.83387774
0
The index value of ``data_id`` to uniquely identify sets of realization config data that are otherwise similar. For example, two realization configs may apply to the same time and catchments, but be very different. The nature of the differences is not necessarily even possible to define generally, and certainly not thr...
def realization_config_data_id(self) -> str: return self.config_data_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dataset_id(self) -> str:\n return self._dataset_id", "def data_set_id(self) -> str:\n return self.__data_set_id", "def get_data_id(self, name):\n\n idx = -1\n if type(name) is str:\n data_names = self.data_list()\n if name in data_names:\n id...
[ "0.5906265", "0.58740586", "0.58686537", "0.58409125", "0.58409125", "0.58409125", "0.58183324", "0.5810139", "0.573511", "0.5713862", "0.56794393", "0.5643375", "0.5568151", "0.5507479", "0.5465332", "0.541492", "0.5406673", "0.5343021", "0.53146416", "0.52843493", "0.528049...
0.7141302
0
A requirement object defining of the realization configuration data needed to execute this request. Returns DataRequirement A requirement object defining of the realization configuration data needed to execute this request.
def realization_cfg_data_requirement(self) -> DataRequirement: if self._realization_cfg_data_requirement is None: real_cfg_dis_restrict = [ self._gen_catchments_domain_restriction(), DiscreteRestriction( variable="data_id", values=[self.realization...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hydrofabric_data_requirement(self) -> DataRequirement:\n if self._hydrofabric_data_requirement is None:\n hydro_restrictions = [\n DiscreteRestriction(\n variable=\"hydrofabric_id\", values=[self._hydrofabric_uid]\n ),\n Discrete...
[ "0.72139984", "0.7128334", "0.7094481", "0.6395429", "0.62972754", "0.59896845", "0.57582146", "0.5580275", "0.54701006", "0.5332864", "0.53096044", "0.5291085", "0.52241236", "0.51713294", "0.5163806", "0.5134517", "0.5063458", "0.50514644", "0.50514644", "0.5027643", "0.502...
0.78063565
0
The time range for the requested model execution. Returns TimeRange The time range for the requested model execution.
def time_range(self) -> TimeRange: return self._time_range
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_range(self):\n return time_to_range(self.get_time())", "def time_range(self) -> pulumi.Output[Optional[int]]:\n return pulumi.get(self, \"time_range\")", "def time_range(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"time_range\")", "def time_range(self) -> Opt...
[ "0.7430795", "0.73937994", "0.7353925", "0.7353925", "0.71835655", "0.6716699", "0.6540193", "0.6520157", "0.63728553", "0.6252574", "0.6242362", "0.6106308", "0.60347825", "0.60261065", "0.6023762", "0.59920084", "0.58939207", "0.5864677", "0.5770926", "0.5726301", "0.571052...
0.78510463
0
Get a list of models in model zoo.
def get_model_list(batch: int = 1): batch = str(batch) err_msg = "Batch {} is not yet optimized.".format(batch) assert batch in MODEL_ZOO_BATCH_NGC.keys(), err_msg return list(MODEL_ZOO_BATCH_NGC[batch].keys())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def peak_all_models(self) -> List:\n models = list(self.meta.name)\n print(models)\n return models", "def get_model_list():\n with open(os.path.join(MODELS_FOLDER, \"models.json\"), \"r\") as model_file:\n model_list = json.load(model_file)\n return model_list", "def models(se...
[ "0.6992904", "0.67451334", "0.6694033", "0.66928583", "0.6624113", "0.65980107", "0.6594745", "0.6587399", "0.6558596", "0.65421385", "0.65250117", "0.6492301", "0.64787614", "0.6434414", "0.63837016", "0.6349985", "0.6349985", "0.632745", "0.6306835", "0.6291476", "0.6265060...
0.5531619
76
Returns semester start date in form yyyydd i.e. 201208, 201601
def get_start_date(self): return "%d%02d" % (self.year, self.term)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_start_date(year, month):\n start_date = date(year, month, 1).strftime(\"%Y-%m-%d\")\n return start_date", "def starting_date(self):\n return datetime.date(2016, 1, 4)", "def start_month(d):\n return date(d.year, d.month, 1)", "def convert_ct_start_date(ds):\n return datetime.strpti...
[ "0.7199725", "0.7079765", "0.6590601", "0.65203524", "0.6392222", "0.63878745", "0.63366205", "0.62193346", "0.621797", "0.6200114", "0.6161047", "0.6161047", "0.61384165", "0.61282766", "0.6126273", "0.61065817", "0.607368", "0.6072346", "0.60117626", "0.59925467", "0.598995...
0.7532529
0
Returns true if course has student
def has_student(self, user, allow_superusers=True): return (user.is_superuser and allow_superusers) or len(self.students.filter(id=user.id)) > 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_student(self):\n return bool(LTI_ROLES[STUDENT] & self.roles)", "def is_pce_student():\n return _is_member('uw_affiliation_extension-student')", "def has_students(self):\n\n students = Student.query.filter_by(class_id=self.id).first()\n link_1 = None\n link_2 = None\n ...
[ "0.71209717", "0.7019764", "0.6961854", "0.6958923", "0.6924965", "0.69076675", "0.69059694", "0.6788597", "0.6757258", "0.6672615", "0.667184", "0.6642762", "0.65137285", "0.64584666", "0.64223605", "0.6378117", "0.636403", "0.6346648", "0.62971133", "0.62501436", "0.6223687...
0.6727482
9
Returns true if user is a student, instructor, or TA in the course
def has_user(self, user, allow_superusers=True): return self.has_student(user, allow_superusers) or self.has_ta(user, False) or self.has_instructor(user, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_tacoma_student():\n return _is_member('uw_affiliation_tacoma-student')", "def is_instructor(self):\n return bool(LTI_ROLES[INSTRUCTOR] & self.roles)", "def user_is_student(userobj):\n from .assignment_group import AssignmentGroup\n return AssignmentGroup.published_where_is_candidate(user...
[ "0.72055805", "0.71850854", "0.69868726", "0.69824886", "0.6963467", "0.68859684", "0.6807471", "0.6781184", "0.6743564", "0.66523254", "0.65662855", "0.6482974", "0.64740014", "0.6287183", "0.6237474", "0.6221776", "0.6206598", "0.61709535", "0.6169735", "0.61420554", "0.614...
0.63123786
13
Returns the filename of the submission. Use get_directory() to get the path to this file.
def get_filename(self): for f in os.listdir(self.get_directory()): if os.path.isfile(os.path.join(self.get_directory(), f)): return f return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_file_name(self):\n return str(self.get_file())", "def get_filename(self):\n return self.filename", "def get_filename(self) -> str:\n return self._filename", "def get_file_name(self):\n return self.file_name", "def get_filename(self):\n return self._filename", "d...
[ "0.7730678", "0.7619063", "0.76091427", "0.75316316", "0.7490227", "0.7489141", "0.7477875", "0.7447406", "0.74409646", "0.74136066", "0.74056846", "0.73689955", "0.73390937", "0.73288506", "0.7304497", "0.7289233", "0.72790104", "0.72790104", "0.72790104", "0.72790104", "0.7...
0.7256689
27
Import data from JSON file. File must contain single dictionary on single row for each song.
def import_json(filename, text_index=True): with open(filename) as infile: for song_json in infile.readlines(): db_songs().insert(loads(song_json)) index_fields = [ ('title', TEXT), ('artist', TEXT)] if text_index: db_songs().create_index(index_fields, default_l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_song_file(cur, filepath):\n\n df = pd.read_json(filepath, lines=True)\n\n song_data = df[['song_id', 'title',\n 'artist_id', 'year', 'duration']].values[0]\n cur.execute(song_table_insert, song_data)\n\n artist_data = df[['artist_id', 'artist_name', 'artist_location',\n ...
[ "0.7096663", "0.70849717", "0.700879", "0.69973725", "0.69747627", "0.69136375", "0.69119555", "0.6850115", "0.68446517", "0.6830215", "0.682027", "0.67841035", "0.6691523", "0.6655029", "0.6637783", "0.66297126", "0.6580391", "0.6568912", "0.6565538", "0.6552895", "0.6546255...
0.7611846
0
Returns an array of zeros with the same shape and type as the input. It's also a scalar if the input is a scalar.
def zero(x): # TODO: get dtype from Expr and Matrix: return x * 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _zero_of_dtype(dtype):\n return np.zeros((), dtype=dtype)", "def _zero_of_dtype(dtype):\n return np.zeros((), dtype=dtype)", "def zeros(shape, dtype=None):\n\n return full(shape, 0, dtype)", "def scalararray(inp) -> np.ndarray:\n return np.array([None, inp], dtype=object)[[1]].reshape([])", ...
[ "0.7685601", "0.7685601", "0.74982744", "0.74880177", "0.74315387", "0.74073005", "0.7350435", "0.73385525", "0.731737", "0.72537047", "0.7251449", "0.7223648", "0.71793944", "0.7177599", "0.7144379", "0.713774", "0.710387", "0.710387", "0.7048264", "0.6991514", "0.69805145",...
0.66374564
38
Returns an array of ones with the same shape and type as the input. It's also a scalar if the input is a scalar.
def one(x): return zero(x) + 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _ones_like(x):\n # Should only be used for small vectors.\n if x.get_shape().is_fully_defined():\n return array_ops.ones(x.get_shape().as_list(), dtype=x.dtype)\n return array_ops.ones_like(x)", "def ones(shape, dtype=None):\n raise NotImplementedError", "def ones(shape, dtype=None):\n\n re...
[ "0.7662596", "0.76247525", "0.7460353", "0.73407924", "0.71340084", "0.70367914", "0.70091367", "0.69979167", "0.69794905", "0.69794905", "0.690926", "0.6881283", "0.6806493", "0.6736797", "0.6678277", "0.6658882", "0.66454256", "0.66448563", "0.65974736", "0.65550995", "0.64...
0.5434131
77
Stops computing gradients during back propagation.
def stop_grad(x): get_runtime().prog.current_ast_builder().stop_grad(x.snode.ptr)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backward(self, gradient):\n #TODO\n pass", "def backward(self, gradient):\n #TODO\n pass", "def backward(self, gradient):\n raise NotImplementedError()", "def backward_pass(self, grad):\n pass", "def backward(self):\n gradient = blah\n return grad...
[ "0.7607569", "0.7607569", "0.73023933", "0.7051164", "0.70306116", "0.70306116", "0.6847789", "0.68288726", "0.6790999", "0.6790999", "0.6720263", "0.6717395", "0.66867167", "0.6658791", "0.6633585", "0.66208655", "0.66191477", "0.66122675", "0.65764815", "0.654124", "0.65407...
0.6838095
7
Converts a datetime to some arbitrary and unspecified format appropriate for putting in a query and roundtripping. This format happens to be a UTC Unix timestamp with fractional seconds. The returned value is a string, to avoid stupid float weirdness.
def _datetime_to_query(dt): timestamp = timegm(dt.timetuple()) return u"{whole}.{part:06d}".format( whole=timestamp, part=dt.microsecond, )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def datetime_to_str(dt):\n return dt.replace(microsecond=0).isoformat()", "def datetime_to_str(dt: Union[str, datetime]) -> str:\n if isinstance(dt, datetime):\n dt = dt.replace(tzinfo=timezone.utc).isoformat(\" \").replace(\"+00:00\", \"Z\")\n return dt", "def datetime_to_str(time):\n retur...
[ "0.77046627", "0.7150771", "0.69562626", "0.6737727", "0.66724247", "0.66338336", "0.66338336", "0.66292375", "0.65687037", "0.65685", "0.65478057", "0.6525653", "0.6518266", "0.65135354", "0.64929557", "0.6475553", "0.6471868", "0.6455217", "0.6453492", "0.64129233", "0.6392...
0.6124532
41
Returns the name of the security group from its id
def _get_sg_name(sg_name, session): return session.resource("ec2").SecurityGroup(sg_name).group_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_sg_name(ec2,s_id):\n name = \"\"\n try:\n security_group = ec2.SecurityGroup(s_id)\n # name = security_group.description\n name = security_group.group_name\n except:\n name = s_id\n\n return name", "def getGroupName(Id):\r\n return \"Group name\"", "def ge...
[ "0.7855197", "0.7839829", "0.77106595", "0.7545373", "0.7477008", "0.7305087", "0.72627914", "0.72627914", "0.7200689", "0.7188735", "0.7117418", "0.7078469", "0.7077535", "0.7068865", "0.7068865", "0.697779", "0.697779", "0.6952421", "0.69315714", "0.69315714", "0.69169134",...
0.70908403
11
A unicode aware version of urllib.unquote. Take `str` value previously obtained by `unicode_quote`.
def unicode_unquote(value): return unquote(value).decode('utf-8')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _unquote(s, encoding='utf-8'):\n return urllib.unquote(s).decode(encoding)", "def _unquote(src, encoding=\"utf-8\"):\n return urllib.unquote(src).decode(encoding)", "def unquote(uri):\r\n uri = uri.encode('ascii')\r\n unquoted = urllib_unquote(uri)\r\n return unquoted.decode('utf...
[ "0.81841207", "0.75159836", "0.7121042", "0.704444", "0.7036177", "0.6865811", "0.65967625", "0.653975", "0.64833635", "0.6470386", "0.63675755", "0.63546556", "0.6278126", "0.61924624", "0.61790395", "0.61526614", "0.6122402", "0.6085202", "0.6066467", "0.60517645", "0.60416...
0.78107417
1
Create an annotated confusion matrix by adding label annotations and formatting to sklearn's `confusion_matrix`.
def annot_confusion_matrix(valid_tags, pred_tags): # Create header from unique tags header = sorted(list(set(valid_tags + pred_tags))) # Calculate the actual confusion matrix matrix = confusion_matrix(valid_tags, pred_tags, labels=header) # Final formatting touches for the string output mat_f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def confusion_matrix_heatmap(y_test, preds, classification_labels):\n labels = list(set(y_test))\n long_labels = [ll + \" (\" + str(l) + \")\" for ll, l\n in zip(classification_labels, labels)]\n cm = confusion_matrix(y_test, preds, labels=labels)\n fig = plt.figure(figsize=(20, 20))\...
[ "0.74431473", "0.73193806", "0.7093408", "0.7092514", "0.70693564", "0.706353", "0.7062197", "0.7057164", "0.7053998", "0.70467997", "0.70467997", "0.70467997", "0.70467997", "0.70467997", "0.70467997", "0.70426863", "0.70396966", "0.7038413", "0.7036621", "0.703483", "0.7033...
0.7482808
0
A generator of filter_size x filter_size patches from the input images
def image_patch(self, image): height, width = image.shape self.current_image = image H_out, W_out = output_shape(height, width, self.filter_size, self.padding, self.stride) for j in range(H_out): for k in range(W_out): image_patch = image[j*self.stride : (j*se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def patchGenerator(gen, patch_size=128, patch_batch_size=1):\n \n for imgs, masks in gen: # For each batch\n img_list = []\n mask_list = []\n for i in range(0, imgs.shape[0]): # For each image in a batch\n patch_x = patchify(imgs[i], (patch_size, patch_size, imgs[i].shape[-1])...
[ "0.7352859", "0.6926747", "0.67323333", "0.66842306", "0.6676392", "0.6472619", "0.6422902", "0.63768595", "0.63502824", "0.6283506", "0.6246085", "0.62162703", "0.61970764", "0.6156886", "0.6155508", "0.61371356", "0.61209923", "0.6101028", "0.6055743", "0.60552937", "0.6010...
0.74587655
0
Initialize or reset the instance to yield a new iterator from zero.
def reset(self) -> None: self.is_run = False self.env_step = 0 if self.resume_from_log: self.start_epoch, self.env_step, self.gradient_step = \ self.logger.restore_data() self.last_rew, self.last_len = 0.0, 0 self.start_time = time.time() if s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __iter__(self):\n self.iterator = 0\n return self", "def __iter__(self):\n self.iterator = 0\n return self", "def __iter__(self):\n self.iterator = 0\n return self", "def __iter__(self):\n self.iterator = 0\n return self", "def __iter__(self):\n ...
[ "0.77757174", "0.77757174", "0.77757174", "0.77757174", "0.7275725", "0.72478557", "0.72478557", "0.72478557", "0.721383", "0.7157337", "0.71496683", "0.6947955", "0.6924827", "0.68129325", "0.68129325", "0.6733835", "0.6729113", "0.671245", "0.666939", "0.6666317", "0.655417...
0.0
-1
Given transitions, returns a time stacked `Trajectory`. The tensors of the produced `Trajectory` will have a time dimension added (i.e., a shape of `[B, T, ...]` where T = 2 in this case). The `Trajectory` can be used when calling `agent.train()` or passed directly to `to_transition` without the need for a `next_trajec...
def stacked_trajectory_from_transition(time_step, action_step, next_time_step): # Note that we reuse action_step and next_time_step in experience2 in order to # ensure the action, policy_info, next_step_type, reward, and discount match # for both values of the time dimension. experience1 = trajectory.from_trans...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trajectory(self, state, T=1, time_steps=200):\n\n state = state.to(device)\n t = torch.linspace(0, T, time_steps).to(device)\n\n # integrate and remove batch dim\n traj = self.model_of_dyn_system.trajectory(state, t)\n return traj.detach().cpu()[:, 0, :]", "def simtraj(tran...
[ "0.55376565", "0.54614097", "0.54272187", "0.54254943", "0.53131664", "0.5288642", "0.5252784", "0.51649725", "0.5123772", "0.50909686", "0.50837016", "0.5077783", "0.5075004", "0.50670207", "0.5064855", "0.5044619", "0.50440705", "0.5040611", "0.503416", "0.4994389", "0.4973...
0.7769187
0
Get the challenge code as part of the request.
def ping_challenge(self): return self._ping_data_raw['challenge']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def challenge_id(self):\n return self._challenge_id", "def get_challenge(self, obj):\n return obj.challenge_phase.challenge", "def _get_request_code(self, data) -> int:\n return int(self._request_code)", "def generate_challenge(self):\n return None", "def challenge_name(self):\n...
[ "0.6763375", "0.6594989", "0.65758306", "0.6562436", "0.6436856", "0.6429208", "0.64251035", "0.6215292", "0.6205906", "0.601385", "0.5962471", "0.59252965", "0.59252965", "0.59252965", "0.59252965", "0.59252965", "0.59252965", "0.59252965", "0.59252965", "0.59133214", "0.580...
0.638079
7
Store those words only in cadidate_pos
def sentence_segment(self, doc, candidate_pos, lower): sentences = [] for sent in doc.sents: selected_words = [] for token in sent: # Store words only with cadidate POS tag if token.pos_ in candidate_pos and token.is_stop is False: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _partsofspeech(self):\n \n l = len(self._words)\n for i in range(l):\n self._words[i]['pos'] = pos_tag( [ self._words[i]['word'] ])[0][1]", "def test_word_positions_in_file(self):\n pass", "def get_word_pos_list(self, raw_text):\n raw_text = raw_text.strip()...
[ "0.6313715", "0.6032558", "0.60120255", "0.5993958", "0.5989751", "0.5950847", "0.5927919", "0.57849723", "0.57830197", "0.57597053", "0.5696669", "0.56333035", "0.56061155", "0.5596007", "0.55601776", "0.55532134", "0.5547649", "0.552179", "0.55212325", "0.5519369", "0.55169...
0.6076473
1
Returns the operation type from the message.
def get_operation_name(operation): if operation == banking_pb2.QUERY: return 'QUERY' if operation == banking_pb2.DEPOSIT: return 'DEPOSIT' if operation == banking_pb2.WITHDRAW: return 'WITHDRAW'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def operation_type(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"operation_type\")", "def get_op_type(self):\n return self.op_type", "def get_operation_type(self, operation_name):\n # type: (Optional[str]) -> Optional[str]\n operations_map = self.operations_map\...
[ "0.7274859", "0.6981731", "0.6853061", "0.666931", "0.6561505", "0.6561505", "0.6552215", "0.65170413", "0.6507768", "0.64999974", "0.64732456", "0.6465173", "0.644767", "0.6362257", "0.63052267", "0.63052267", "0.63052267", "0.63052267", "0.63037723", "0.62938905", "0.629389...
0.5876898
33
Make a GET request to the OCUM API method with an optional filter.
def GET(self, path, params={}): request_url = 'https://{0}:{1}/rest/{2}'.format( self.settings.api_host, self.settings.api_port, path ) # Make the API request response = requests.get(request_url, auth = (self.settings.api_user, self.set...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self,request,sector,format=None):\n industry_list = IdleClickerIndustry.objects.filter(sector=sector)\n serializer = IdleClickerSerializer(industry_list,many=True)\n return Response(data=serializer.data,status=status.HTTP_200_OK)", "def get(self, *args, **kw):\n kw['method'] =...
[ "0.5556942", "0.55412465", "0.54999053", "0.5495995", "0.5487847", "0.5435009", "0.5430004", "0.5428564", "0.5423031", "0.54207397", "0.54108864", "0.54008585", "0.540083", "0.540083", "0.540083", "0.540083", "0.540083", "0.540083", "0.540083", "0.540083", "0.540083", "0.54...
0.0
-1
The primary view of the IMDProfileXBlock.
def student_view(self, context=None): # pylint: disable=no-member context = { 'student_view_data': json.dumps(self.student_view_data()), 'id': self.location.name.replace('.', '_'), } if self.show_staff_ui: context['show_staff_ui'] = True s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def view(self, profile_id):\r\n return View(self, profile_id)", "def viewer(self):\n return self.parent", "def block_header(self):\n return self._current_block[0]", "def student_view_aside(self, block, context): # pylint: disable=unused-argument\n return Fragment(self.FRAG_CONTEN...
[ "0.5602022", "0.5488123", "0.54387707", "0.54120886", "0.5379465", "0.5235485", "0.5170562", "0.5122266", "0.5102193", "0.5097705", "0.5094012", "0.50916034", "0.50834495", "0.50711226", "0.5043043", "0.50425315", "0.5035233", "0.501403", "0.50133514", "0.497389", "0.49722967...
0.4968459
21
Check if user is course staff.
def is_course_staff(self): # pylint: disable=no-member return getattr(self.xmodule_runtime, 'user_is_staff', False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_staff(self):\n # Simplest possible answer: All admins are staff\n return self.is_admin", "def is_staff(self):\n # Simplest possible answer: All admins are staff\n return self.is_admin", "def is_staff(self):\n # Simplest possible answer: All admins are staff\n re...
[ "0.7812888", "0.7812888", "0.7812888", "0.77043736", "0.75808585", "0.74982476", "0.74982476", "0.74835616", "0.7433671", "0.7433608", "0.7419011", "0.7370185", "0.7277466", "0.7176093", "0.7100349", "0.70355904", "0.69785076", "0.6971723", "0.69194937", "0.68560183", "0.6839...
0.8251043
0
Returns True if current user is staff and not in studio.
def show_staff_ui(self): return self.is_course_staff and not self.in_studio_preview
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_staff(self):\n\t\treturn self.is_admin", "def is_staff(self) -> bool:\n return self.is_admin", "def is_staff(self):\r\n return self.is_admin", "def is_staff(self):\n # Simplest possible answer: All admins are staff\n return self.is_admin", "def is_staff(self):\n # Si...
[ "0.79906446", "0.78967124", "0.7875991", "0.7861846", "0.7861846", "0.7861846", "0.78592956", "0.78592956", "0.76533175", "0.7475163", "0.7475163", "0.74568665", "0.7451172", "0.7321006", "0.7252022", "0.70269454", "0.702485", "0.6869117", "0.68188494", "0.67960364", "0.67743...
0.7366562
13
Find out equality of two SQL items.
def is_sql_equal(sqls1, sqls2): is_seq1 = isinstance(sqls1, (list, tuple)) is_seq2 = isinstance(sqls2, (list, tuple)) if not is_seq1: sqls1 = (sqls1,) if not is_seq2: sqls2 = (sqls2,) if len(sqls1) != len(sqls2): return False for sql1, sql2 in zip(sqls1, sqls2): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cmpEquals(self, conn1, sql1, conn2, sql2):\n for row in self.get_query_results(conn1, sql1):\n res1 = row[0]\n for row in self.get_query_results(conn2, sql2):\n res2 = row[0]\n self.log.info(\n \"cmpEquals:: task: {}, value1: {}, value2: {}\".format(\n ...
[ "0.72058487", "0.713274", "0.69424504", "0.6901998", "0.67543185", "0.6731083", "0.6669991", "0.66623795", "0.66196704", "0.6610867", "0.65645105", "0.6549154", "0.64819735", "0.6469222", "0.64510655", "0.6435281", "0.6398511", "0.6393961", "0.6382533", "0.63806325", "0.63656...
0.6470574
13
Constructs and returns the Resource specification for Job.
def GetJobResourceSpec(): return concepts.ResourceSpec( 'transcoder.projects.locations.jobs', resource_name='job', jobsId=JobAttributeConfig(), projectsId=concepts.DEFAULT_PROJECT_ATTRIBUTE_CONFIG, locationsId=LocationAttributeConfig(), disable_auto_completers=False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_job_spec(\n self,\n job_id: Text,\n training_input: Dict[Text, Any],\n job_labels: Optional[Dict[Text, Text]] = None) -> Dict[Text, Any]:\n\n job_spec = {\n 'display_name': job_id,\n 'job_spec': training_input,\n 'labels': job_labels,\n }\n return job_s...
[ "0.6955378", "0.69095653", "0.6903996", "0.6666785", "0.65318686", "0.65144813", "0.64716077", "0.6461381", "0.64574796", "0.6406098", "0.6383242", "0.6349475", "0.62298", "0.62255585", "0.6091057", "0.596617", "0.59617835", "0.59389067", "0.5914529", "0.5883165", "0.58783543...
0.83145744
0
Constructs and returns the Location Resource Argument.
def AddLocationResourceArg(parser): return concept_parsers.ConceptParser.ForResource( '--location', GetLocationResourceSpec(), 'Transcoder location', required=True).AddToParser(parser)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_location(self, location: str) -> Location:\n return Location({\n 'location': location,\n '': 'Location'\n })", "def __init__(__self__, *,\n location: pulumi.Input[str]):\n pulumi.set(__self__, \"location\", location)", "def __init__(self, loca...
[ "0.7093596", "0.6935495", "0.69322425", "0.67237437", "0.6674017", "0.65902025", "0.65902025", "0.65902025", "0.6464628", "0.6395458", "0.6347191", "0.6324593", "0.6319056", "0.63185483", "0.6302648", "0.6290051", "0.6282335", "0.6282335", "0.6282335", "0.6282335", "0.6282335...
0.70098424
1
Constructs and returns the Job Resource Argument.
def AddJobResourceArg(parser): return concept_parsers.ConceptParser.ForResource( 'job_name', GetJobResourceSpec(), 'Transcoder Job name', required=True).AddToParser(parser)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__,\n resource_name: str,\n opts: Optional[pulumi.ResourceOptions] = None,\n copy: Optional[pulumi.Input[pulumi.InputType['JobCopyArgs']]] = None,\n extract: Optional[pulumi.Input[pulumi.InputType['JobExtractArgs']]] = None,\n ...
[ "0.69206184", "0.6386816", "0.6372518", "0.6289271", "0.6259405", "0.6192683", "0.6158288", "0.6158288", "0.61329836", "0.61063856", "0.6102167", "0.610027", "0.60962725", "0.6088601", "0.6079827", "0.6079358", "0.6063962", "0.60390806", "0.6031915", "0.6007343", "0.59889936"...
0.6779319
1
Constructs and returns Job Template Resource Argument.
def AddTemplateResourceArg(parser): return concept_parsers.ConceptParser.ForResource( 'template_id', GetTemplateResourceSpec(), 'Transcoder job template id', required=True).AddToParser(parser)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__,\n resource_name: str,\n args: ProvisioningTemplateArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...", "def __init__(__self__,\n resource_name: str,\n args: WorkbookTemplateArgs,\n ...
[ "0.6476952", "0.6341375", "0.62523276", "0.6168798", "0.61044526", "0.60185146", "0.6010929", "0.58726627", "0.5866239", "0.5838961", "0.5822505", "0.5817104", "0.58144724", "0.5778014", "0.57233566", "0.57186306", "0.5715411", "0.57138664", "0.57138664", "0.5690226", "0.5680...
0.6865925
0