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
Assign an elastic IP to this instance.
def steal_elastic_ip(access_key, secret_key, region, ip): aws_ec2 = init_aws_ec2_conn(access_key, secret_key, region) logging.debug('steal_elastic_ip()') instance_id = get_self_instance_id() aws_ec2.associate_address(instance_id, ip)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def associate_elastic_ip(ElasticIp=None, InstanceId=None):\n pass", "def update_elastic_ip(ElasticIp=None, Name=None):\n pass", "def ip(self, ip):\n\n self._ip = ip", "def ip(self, ip):\n\n self._ip = ip", "def ip(self, ip):\n self._ip = ip\n return self", "def set_host_...
[ "0.76383185", "0.7450347", "0.6687569", "0.6687569", "0.6671771", "0.66536766", "0.66298693", "0.6611097", "0.6568639", "0.6534717", "0.6534717", "0.6534717", "0.6518712", "0.64277977", "0.64141524", "0.63853544", "0.6344613", "0.63331574", "0.63143235", "0.6306998", "0.62642...
0.646973
13
Creates a 2d convlayer with Spectral Norm applied to the weights.
def snconv2d(input_, output_dim, k_h=3, k_w=3, d_h=2, d_w=2, training=True, name='snconv2d'): with tf.variable_scope( name, custom_getter=sn_gettr(training=training, equality_constrained=False)): return tf.layers.conv2d( input_, filters=output_dim, kernel_size=(k_h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SNConv2d(*args, **kwargs):\n return spectral_norm(nn.Conv2d(*args, **kwargs))", "def _add_double_norm_layer(model_1, model_2):\n return DoubleLayerNorm(\n model_1.normalized_shape,\n model_2.normalized_shape,\n model_1.weight,\n model_2.weight,\n model_1.bias,\n ...
[ "0.6766796", "0.6318123", "0.6229136", "0.61992186", "0.61467487", "0.61104065", "0.6064617", "0.599069", "0.5943439", "0.5933635", "0.59171647", "0.59171647", "0.58886445", "0.5864886", "0.58385235", "0.5808983", "0.57847536", "0.5773556", "0.5765658", "0.5757367", "0.575335...
0.55780363
38
Creates a linear layer with Spectral Normalization applied.
def snlinear(x, output_size, bias_start=0.0, training=True, name='snlinear'): with tf.variable_scope( name, custom_getter=sn_gettr(training=training, equality_constrained=False)): return tf.layers.dense( x, output_size, activation=None, use_bias=True, kernel_ini...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SNLinear(*args, **kwargs):\n return spectral_norm(nn.Linear(*args, **kwargs))", "def normalized_linear_layer(inputs, \n num_outputs,\n weights_initializer, \n weights_regularizer,\n scale_inputs=Non...
[ "0.7253427", "0.6207253", "0.59440666", "0.59299266", "0.59118426", "0.57790774", "0.5698557", "0.5683368", "0.5633953", "0.55963355", "0.5579435", "0.557672", "0.55710036", "0.55628276", "0.5549484", "0.5543351", "0.5528736", "0.5523626", "0.55077887", "0.54922193", "0.54920...
0.61973536
2
Adds Conditional Batch norm to the TF Graph.
def __call__(self, inputs, labels): inputs = tf.convert_to_tensor(value=inputs) inputs_shape = inputs.get_shape() params_shape = inputs_shape[-1:] axis = [0, 1, 2] shape = tf.TensorShape([self.num_categories]).concatenate(params_shape) with tf.variable_scope(self.name): self.gamma = tf.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def batch_norm(x, training, name):\n with tf.variable_scope(name):\n x = tf.cond(training, lambda: tf.contrib.layers.batch_norm(x, is_training=True, scope=name+'_batch_norm'),\n lambda: tf.contrib.layers.batch_norm(x, is_training=False, scope=name+'_batch_norm', reuse=True)...
[ "0.651612", "0.634967", "0.6093033", "0.60527295", "0.6025607", "0.59895104", "0.59162915", "0.59009624", "0.57722205", "0.57587117", "0.574903", "0.5744107", "0.5698618", "0.559333", "0.5580914", "0.55704486", "0.5570305", "0.55601525", "0.5506552", "0.54987055", "0.54765207...
0.0
-1
Computes the box loss (FastRCNN branch) of MaskRCNN. This function implements the box regression loss of the FastRCNN. As the `box_outputs` produces `num_classes` boxes for each RoI, the reference model expands `box_targets` to match the shape of `box_outputs` and selects only
def __call__(self, box_outputs, class_targets, box_targets): with tf.name_scope('fast_rcnn_loss'): class_targets = tf.cast(class_targets, dtype=tf.int32) # Selects the box from `box_outputs` based on `class_targets`, with which # the box has the maximum overlap. (batch_size, num_rois, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _fast_rcnn_box_loss(self, box_outputs, box_targets, class_targets,\n normalizer=1.0):\n with tf.name_scope('fast_rcnn_box_loss'):\n mask = tf.tile(tf.expand_dims(tf.greater(class_targets, 0), axis=2),\n [1, 1, 4])\n mask = tf.cast(mask, dtype=tf.float32...
[ "0.77247", "0.6800456", "0.65552115", "0.6547652", "0.6503136", "0.6494873", "0.6494873", "0.64850503", "0.64330405", "0.6390961", "0.62827057", "0.6255115", "0.621268", "0.6205515", "0.61603117", "0.6152924", "0.6133612", "0.6115728", "0.61107314", "0.60996604", "0.609374", ...
0.7875608
0
Computes the mask loss of MaskRCNN. This function implements the mask loss of MaskRCNN. As the `mask_outputs` produces `num_classes` masks for each RoI, the reference model expands `mask_targets` to match the shape of `mask_outputs` and selects only the
def __call__(self, mask_outputs, mask_targets, select_class_targets): with tf.name_scope('mask_rcnn_loss'): (batch_size, num_masks, mask_height, mask_width) = mask_outputs.get_shape().as_list() weights = tf.tile( tf.reshape(tf.greater(select_class_targets, 0), [bat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_maskrcnn_loss(cls_prob, bbox_reg, mask_prob, cls_targets, bbox_targets,\n mask_targets):\n cls_loss = F.nll_loss(cls_prob, cls_targets)\n _, cls_pred = torch.max(cls_prob, 1)\n # Only predicted class masks contribute to bbox and mask loss.\n bbox_loss, mask_loss = 0, 0\n ...
[ "0.76678836", "0.74467456", "0.6840684", "0.6747658", "0.6580615", "0.65435463", "0.6468192", "0.6466967", "0.6440098", "0.64205974", "0.64121765", "0.6396213", "0.6394036", "0.6345463", "0.63196385", "0.6284413", "0.62776643", "0.6264739", "0.6260094", "0.62046355", "0.61575...
0.81678396
0
Convert probablity of exceedence of damage states, to probability of being in each discrete damage state
def pe2pb(pe): # sorted array: from max to min pex = np.sort(pe)[::-1] tmp = -1.0 * np.diff(pex) pb = np.append(tmp, pex[-1]) pb = np.insert(pb, 0, 1 - pex[0]) return pb
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_probs(self, states, actions):\n # YOUR CODE HERE\n \n probs = np.ones(len(states))/2\n return probs", "def get_probs(self, states, actions):\n # YOUR CODE HERE\n \n # So we need to determine for every input state-action pair, what the resulting policy dist...
[ "0.72657996", "0.69723207", "0.6650643", "0.66365546", "0.6604822", "0.66037893", "0.65621597", "0.6541678", "0.64806664", "0.6445234", "0.64182675", "0.63711476", "0.6363385", "0.631948", "0.630406", "0.62913287", "0.6276154", "0.62485045", "0.6238045", "0.62306184", "0.6208...
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) res...
{ "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.76427615", "0.74189496", "0.7418079", "0.72710466", "0.72456723", "0.72446615", "0.7237539", "0.72213703", "0.7210107", "0.7058935", "0.6852219", "0.6786084", "0.67836976", "0.6768417", "0.67273885", "0.67181736", "0.67181736", "0.67181736", "0.67181736", "0.67181736", "0....
0.0
-1
The TOPICLEN support parameter is parsed into an integer value indicating the maximum length of a topic a client may set.
def test_support_TOPICLEN(self): self._testIntOrDefaultFeature("TOPICLEN")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_support_CHANNELLEN(self):\n default = irc.ServerSupportedFeatures()._features[\"CHANNELLEN\"]\n self._testIntOrDefaultFeature(\"CHANNELLEN\", default)", "def __len__(self):\n return self.HEADER_LEN + 4 + sum(len(t) + 2 for t in self.topics)", "def supportedLength(self):\n r...
[ "0.64322615", "0.59648174", "0.5911425", "0.5911425", "0.5911425", "0.5911425", "0.5834683", "0.57438403", "0.5687495", "0.567807", "0.5637416", "0.56222594", "0.5598848", "0.55422384", "0.5538949", "0.5538949", "0.5538949", "0.5538949", "0.5538949", "0.5538949", "0.5538949",...
0.795213
0
Return a list of which branch version ids differ from what was stored in the database at the beginning of this bulk operation.
def dirty_branches(self): # If no course index has been set, then no branches have changed if self.index is None: return [] # If there was no index in the database to start with, then all branches # are dirty by definition if self.initial_index is None: r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def missing_branches(self):\n upstream_tags = self.upstream_model.tags_from_semver_point(\"0.8.7\")\n deb_branches = self.deb_model.base.branches_from_semver_point(\"0.8.7\")\n return list(set(upstream_tags) - set(deb_branches))", "def missing_branches(self):\n upstream_tags = self.up...
[ "0.6360029", "0.62996095", "0.6110513", "0.5765152", "0.5761192", "0.57539415", "0.560806", "0.55911493", "0.5566624", "0.5482653", "0.5482622", "0.5476313", "0.54746825", "0.54743236", "0.5473782", "0.546778", "0.54629153", "0.54446214", "0.54415315", "0.5440457", "0.5432181...
0.6529352
0
Find the course_indexes which have the specified branch and search_targets. An optional org_target can be specified to apply an ORG filter to return only the courses that are part of that ORG.
def find_matching_course_indexes(self, branch=None, search_targets=None, org_target=None, course_keys=None): indexes = self.db_connection.find_matching_course_indexes( branch, search_targets, org_target, course_keys=course_keys) indexes = self._add_indexe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_courses_by_search_target(self, field_name, field_value):\n entries = self.find_matching_course_indexes(\n search_targets={field_name: field_value}\n )\n return [\n CourseLocator(entry['org'], entry['course'], entry['run']) # Branch agnostic\n for entr...
[ "0.650313", "0.6464242", "0.64032197", "0.63864523", "0.5401636", "0.5068013", "0.5004355", "0.49104536", "0.48904943", "0.48877397", "0.48714936", "0.47013405", "0.46730778", "0.46645495", "0.46551314", "0.46427497", "0.4619389", "0.4604255", "0.4580605", "0.457683", "0.4548...
0.8263778
0
Closes any open connections to the underlying databases
def close_connections(self): self.db_connection.close_connections()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close_db_connections():\n for db in db_connections.values():\n db.close()", "def close(self):\n self.clean()\n\n for conn in self.conn__.values():\n try:\n conn.commit()\n conn.close()\n except sqlite3.ProgrammingError:\n ...
[ "0.84474874", "0.8211622", "0.80338216", "0.7990529", "0.7889166", "0.7816392", "0.7770842", "0.772729", "0.76978415", "0.76758957", "0.7657428", "0.7656085", "0.7655884", "0.765019", "0.7612401", "0.7602851", "0.7594656", "0.7580378", "0.7569555", "0.75374573", "0.751959", ...
0.84062976
1
A destructive operation to drop the underlying database and close all connections. Intended to be used by test code for cleanup. If database is True, then this should drop the entire database. Otherwise, if collections is True, then this should drop all of the collections used by this modulestore. Otherwise, the module...
def _drop_database(self, database=True, collections=True, connections=True): # drop the assets super()._drop_database(database, collections, connections) self.db_connection._drop_database(database, collections, connections) # pylint: disable=protected-access
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def drop(self):\n\n def drop_db(name):\n \"\"\"TestDB.drop helper function\"\"\"\n try:\n connection.creation._destroy_test_db(name, verbosity=0)\n except:\n return None\n return True\n\n if not settings.DATABASE_ENGINE in ['sq...
[ "0.6912522", "0.6742455", "0.6732116", "0.67305785", "0.6697684", "0.6697684", "0.6678533", "0.6678533", "0.6678533", "0.6678533", "0.6678533", "0.6678533", "0.6678533", "0.6678533", "0.6678533", "0.6645338", "0.65998626", "0.65583265", "0.6519494", "0.6515916", "0.6514582", ...
0.7402762
0
Find the descriptor cache for this course if it exists
def _get_cache(self, course_version_guid): if self.request_cache is None: return None return self.request_cache.data.setdefault('course_cache', {}).get(course_version_guid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_cache(self, course_version_guid):\r\n if not hasattr(self.thread_cache, 'course_cache'):\r\n self.thread_cache.course_cache = {}\r\n system = self.thread_cache.course_cache\r\n return system.get(course_version_guid)", "def _get_module(self, course_id, descriptor, location...
[ "0.6361399", "0.5887188", "0.57271576", "0.5629998", "0.5613309", "0.5510258", "0.5427488", "0.53530014", "0.52426124", "0.52417207", "0.52172154", "0.52119625", "0.5150895", "0.5145449", "0.5131879", "0.50994647", "0.50951713", "0.50937015", "0.50888675", "0.5063768", "0.505...
0.6378092
0
Return an array of all of the orphans in the course.
def get_orphans(self, course_key, **kwargs): if not isinstance(course_key, CourseLocator) or course_key.deprecated: # The supplied CourseKey is of the wrong type, so it can't possibly be stored in this modulestore. raise ItemNotFoundError(course_key) detached_categories = [name ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getRoots():\n ret = []\n for cc in Concept.objects.all():\n if Link.objects.filter(descendant=cc).count() == 0:\n ret.append(cc)\n return ret", "def get_orphans(self, course_key):\r\n detached_categories = [name for name, __ in XBlock.load_tagged_classes(\"detached\")]\r\n ...
[ "0.60377336", "0.57976925", "0.56879157", "0.5673465", "0.5672352", "0.5649246", "0.5620423", "0.55818796", "0.5580104", "0.55704206", "0.55599695", "0.5552538", "0.5497069", "0.54842556", "0.5484014", "0.5461218", "0.54577625", "0.54296136", "0.5426422", "0.53883654", "0.538...
0.0
-1
Create a new entry in the active courses index which points to an existing or new structure. Returns the course root of the resulting entry (the location has the course id)
def create_course( # lint-amnesty, pylint: disable=arguments-differ self, org, course, run, user_id, master_branch=None, fields=None, versions_dict=None, search_targets=None, root_category='course', root_block_id=None, **kwargs ): # either need to assert this or have a default ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_courselike( # lint-amnesty, pylint: disable=too-many-statements\n self, locator, user_id, master_branch, fields=None,\n versions_dict=None, search_targets=None, root_category='course',\n root_block_id=None, **kwargs\n ):\n index = self.get_course_index(locator, ignore_ca...
[ "0.6929181", "0.64013904", "0.62071186", "0.61486405", "0.6143385", "0.589748", "0.57878083", "0.56724465", "0.56681705", "0.5665047", "0.55656147", "0.5552855", "0.55295444", "0.5510233", "0.5489564", "0.5488629", "0.54446286", "0.54082686", "0.5372727", "0.5366258", "0.5358...
0.5926982
5
This method instantiates the correct subclass of XModuleDescriptor based on the contents of json_data. It does not persist it and can create one which has no usage id. parent_xblock is used to compute inherited metadata as well as to append the new xblock.
def create_xblock( self, runtime, course_key, block_type, block_id=None, fields=None, definition_id=None, parent_xblock=None, **kwargs ): assert runtime is not None xblock_class = runtime.load_block_type(block_type) json_data = { 'block_type': block_type,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_xblock(self, runtime, category, fields=None, block_id=None, definition_id=None, parent_xblock=None):\r\n xblock_class = runtime.load_block_type(category)\r\n json_data = {\r\n 'category': category,\r\n 'fields': fields or {},\r\n }\r\n if definition_id i...
[ "0.6520745", "0.5930786", "0.584284", "0.5812016", "0.56971437", "0.56635016", "0.5623204", "0.55514807", "0.5544859", "0.55113035", "0.54684615", "0.5437197", "0.5409401", "0.5332828", "0.5315792", "0.5200123", "0.51950604", "0.5190217", "0.5139555", "0.5139229", "0.51245785...
0.649731
1
Return True if the settings are not == to the original fields
def _compare_settings(self, settings, original_fields): original_keys = list(original_fields.keys()) if 'children' in original_keys: original_keys.remove('children') if len(settings) != len(original_keys): return True else: new_keys = list(settings.key...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _compare_settings(self, settings, original_fields):\r\n original_keys = original_fields.keys()\r\n if 'children' in original_keys:\r\n original_keys.remove('children')\r\n if len(settings) != len(original_keys):\r\n return True\r\n else:\r\n new_keys...
[ "0.79467356", "0.7118527", "0.6934282", "0.68726224", "0.686396", "0.68064344", "0.66815805", "0.664834", "0.6247836", "0.61969346", "0.616874", "0.61615676", "0.6160348", "0.6114915", "0.6095754", "0.60906893", "0.6058233", "0.60563254", "0.6052456", "0.6044839", "0.6026975"...
0.7936154
1
Delete the block or tree rooted at block (if delete_children) and any references w/in the course to the block from a new version of the course structure. returns CourseLocator for new version raises ItemNotFoundError if the location does not exist. raises ValueError if usage_locator points to the structure root
def delete_item(self, usage_locator, user_id, force=False): # lint-amnesty, pylint: disable=arguments-differ if not isinstance(usage_locator, BlockUsageLocator) or usage_locator.deprecated: # The supplied UsageKey is of the wrong type, so it can't possibly be stored in this modulestore. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_item(self, usage_locator, user_id, delete_all_versions=False, delete_children=False, force=False):\r\n assert isinstance(usage_locator, BlockUsageLocator)\r\n original_structure = self._lookup_course(usage_locator.course_key)['structure']\r\n if original_structure['root'] == usage_l...
[ "0.6936629", "0.6421142", "0.6122814", "0.60422903", "0.59603184", "0.58920443", "0.57414865", "0.5554101", "0.5546292", "0.5514769", "0.5357851", "0.53114384", "0.5307605", "0.52640206", "0.5257437", "0.52031523", "0.52030134", "0.5183137", "0.5170265", "0.5165044", "0.51413...
0.672744
1
Add value to the list ensuring the list is long enough to accommodate it at the given index
def __setitem__(self, index, value): missing = index - len(self) + 1 if missing > 0: self.extend([None] * missing) list.__setitem__(self, index, value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert(self, index, value):\n self.__validate_index(index)\n self.__list = self.__list[:index] + [value] + self.__list[index:]\n return self.__list", "def addAtIndex(self, index, val):\n if 0 <= index < len(self.nums):\n self.nums.insert(index, val)\n elif index ...
[ "0.72899246", "0.6907019", "0.68651366", "0.683967", "0.6769182", "0.6760779", "0.67505634", "0.66848123", "0.6678297", "0.6632727", "0.66158146", "0.6608906", "0.6608906", "0.6595964", "0.6586267", "0.6581172", "0.65632784", "0.6560353", "0.6559379", "0.65488815", "0.6541182...
0.7282095
1
Function creates a normalization layer for the specified numeric feature.
def get_normalization_layer(name: str, ds: tf.data.Dataset, weighted=False): # Normalization layer for the feature normalizer = tf.keras.layers.experimental.preprocessing.Normalization(axis=None) # Dataset that only yields specified feature if weighted: feature_ds = ds.map(lambda x, y, w:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _normalize_feature(self, feature):\n\n for ic in range(self.data_shape[0]):\n feature[ic] = (feature[ic] - self.feature_mean[ic]\n ) / self.feature_std[ic]\n return feature", "def layer_norm(input_tensor, trainable=True, name=None):\n #return tf.keras.layer...
[ "0.65399927", "0.6354144", "0.62865245", "0.6273336", "0.6249632", "0.62408394", "0.6182979", "0.6071978", "0.60206324", "0.5994672", "0.59808034", "0.5935642", "0.5917826", "0.5881845", "0.5791358", "0.5759912", "0.57513094", "0.5750446", "0.57262427", "0.5725838", "0.572111...
0.6230879
6
Function plots a chart with training and validation metrics.
def plot_history(hist): # Losses mae = hist.history['loss'] val_mae = hist.history['val_loss'] # Epochs to plot along x axis x_axis = range(1, len(mae) + 1) plt.plot(x_axis, mae, 'bo', label='Training') plt.plot(x_axis, val_mae, 'ro', label='Validation') plt.title('Training a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(self, train: List[float], validation: List[float]) -> None:\n self.ax.plot(train)\n self.ax.plot(validation)\n self.ax.set_xlabel('epochs')\n if self.loss:\n self.ax.set_ylabel('loss')\n else:\n self.ax.set_ylabel('accuracy')\n self.ax.lege...
[ "0.7655461", "0.7633836", "0.748409", "0.74176306", "0.73979706", "0.7373917", "0.734832", "0.73385936", "0.73222196", "0.7272251", "0.7250507", "0.72484773", "0.72439075", "0.7206476", "0.71855736", "0.7179055", "0.7156112", "0.71413726", "0.7086196", "0.70732564", "0.705749...
0.0
-1
Test if the email of the user is normalized
def test_new_user_email_normalized(self): email = 'test@GOOGLE.COM' user = get_user_model().objects.create_user(email, '212ds') self.assertEqual(user.email, email.lower())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_email(self, email):\n return models.Email.normalize_address(email)", "def clean_email(self):\n # NOTE: all emails are stored in lower case\n e = self.cleaned_data['email'].lower()\n if User.objects.filter(email=e).count() > 0:\n raise forms.ValidationError('An ...
[ "0.766158", "0.7491468", "0.7399585", "0.721531", "0.71985656", "0.7187279", "0.7184423", "0.7184423", "0.71306634", "0.7119871", "0.71183753", "0.7106335", "0.7096149", "0.70874584", "0.70781785", "0.7070264", "0.7070264", "0.70585614", "0.70045596", "0.6975868", "0.6955099"...
0.6918848
23
Set new password for the user
def reset_password(self, user_id, reset_code, password): if not password: raise Exception('New password can\'t be blank.') try: user = self.get(id=user_id) if not user.reset_code or user.reset_code != reset_code or user.reset_code_expire < timezone.now(): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setpassword(self, pwd):\n pass", "def set_password(self, new_password):\n super(Mafiasi, self).set_password(new_password)\n self.new_password = new_password", "def change_password(self):\n self.test_user.set_password(self.create_user_data()['password1'])\n self.test_user....
[ "0.8562052", "0.8419897", "0.8404144", "0.83254594", "0.81957877", "0.8066909", "0.801569", "0.7983155", "0.7922001", "0.79215026", "0.7906483", "0.7901986", "0.7880637", "0.78703576", "0.7866787", "0.7854254", "0.7851453", "0.7845233", "0.78207177", "0.7820269", "0.7813562",...
0.0
-1
Apply the "gt" operation between "self" and "other"
def __gt__( self, other: Union[TensorWrappedPhiTensorPointer, MPCTensor, int, float, np.ndarray], ) -> Union[TensorWrappedPhiTensorPointer, MPCTensor]: return TensorWrappedPhiTensorPointer._apply_op(self, other, "__gt__")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __gt__(self, other):\n self.conds.append((self.name, '>', other))\n return self", "def __gt__(self, other):\n return self.greaterThan(other)", "def __gt__(self, other):\n return other < self", "def __gt__(self, other: Any) -> ColumnOperators:\n return self.operate(gt, o...
[ "0.84689647", "0.82520205", "0.8193422", "0.80674213", "0.80558026", "0.800849", "0.799071", "0.7946985", "0.7901362", "0.7899278", "0.78909767", "0.78689414", "0.78683186", "0.78683186", "0.7842956", "0.7830139", "0.7771713", "0.77460486", "0.77460486", "0.76710606", "0.7659...
0.68987256
86
Apply the "ge" operation between "self" and "other"
def __ge__( self, other: Union[TensorWrappedPhiTensorPointer, MPCTensor, int, float, np.ndarray], ) -> Union[TensorWrappedPhiTensorPointer, MPCTensor]: return TensorWrappedPhiTensorPointer._apply_op(self, other, "__ge__")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ge__(self, other):\n return self.abs2phy.__ge__(other)", "def __ge__(self, other):\n return self.abs2phy.__ge__(other)", "def __ge__(self, other):\n return self.x ** 2 + self.y ** 2 >= other.x ** 2 + other.y ** 2", "def __ge__(self, other):\n return _generate_relational_expr...
[ "0.80558014", "0.80558014", "0.79868466", "0.7961324", "0.78051895", "0.7802615", "0.770713", "0.7702887", "0.7686695", "0.7681339", "0.762388", "0.76188976", "0.7579965", "0.753623", "0.7516408", "0.75079787", "0.75042", "0.75042", "0.7500837", "0.7492989", "0.7487158", "0...
0.6865808
67
Apply the "le" operation between "self" and "other"
def __le__( self, other: Union[TensorWrappedPhiTensorPointer, MPCTensor, int, float, np.ndarray], ) -> Union[TensorWrappedPhiTensorPointer, MPCTensor]: return TensorWrappedPhiTensorPointer._apply_op(self, other, "__le__")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __le__(self, other):\n return self.abs2phy.__le__(other)", "def __le__(self, other):\n return self.abs2phy.__le__(other)", "def __le__(self, other):\r\n # self <= other <=> not (other < self)\r\n return 1 - runtime.lt(other, self)", "def __le__(self, other):\n return se...
[ "0.801525", "0.801525", "0.79707754", "0.78096956", "0.78011394", "0.7774941", "0.77533686", "0.7749417", "0.756372", "0.7473518", "0.7460254", "0.7457723", "0.7446196", "0.74313086", "0.74198675", "0.74089354", "0.74066883", "0.7404599", "0.7357632", "0.7347238", "0.7334328"...
0.6755636
51
Apply the "eq" operation between "self" and "other"
def __eq__( # type: ignore self, other: Union[TensorWrappedPhiTensorPointer, MPCTensor, int, float, np.ndarray], ) -> Union[TensorWrappedPhiTensorPointer, MPCTensor]: return TensorWrappedPhiTensorPointer._apply_op(self, other, "__eq__")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n self.conds.append((self.name, '==', other))\n return self", "def __eq__(self, other):\r\n if other is not None:\r\n return self.value() == other.value()\r\n else:\r\n return False", "def __eq__(self, other):\n r...
[ "0.7878088", "0.7656015", "0.763252", "0.763252", "0.763252", "0.75939363", "0.7525744", "0.75252616", "0.75252616", "0.7511141", "0.75062954", "0.7505896", "0.7505896", "0.7491136", "0.74889493", "0.7487042", "0.7480274", "0.7480274", "0.7476846", "0.74635756", "0.7449278", ...
0.0
-1
Apply the "ne" operation between "self" and "other"
def __ne__( # type: ignore self, other: Union[TensorWrappedPhiTensorPointer, MPCTensor, int, float, np.ndarray], ) -> Union[TensorWrappedPhiTensorPointer, MPCTensor]: return TensorWrappedPhiTensorPointer._apply_op(self, other, "__ne__")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other):\n pass", "def __ne__(self, other):\n return self.isNot(other)", "def __ne__(self, other):\n self.conds.append((self.name, '!=', other))\n return self", "def ne (self, other):\n return not (self == other) # opposite of eq", "def __ne__...
[ "0.8123668", "0.8080227", "0.8044026", "0.8043643", "0.8026838", "0.79472417", "0.7928555", "0.7795502", "0.77623266", "0.77547103", "0.77408236", "0.7719936", "0.7719936", "0.7719936", "0.7719936", "0.7719936", "0.7719936", "0.7719936", "0.7719936", "0.7719936", "0.7719936",...
0.0
-1
Apply the "softmax" operation on "self"
def softmax( self, ) -> Union[TensorWrappedPhiTensorPointer, MPCTensor]: attr_path_and_name = "syft.core.tensor.tensor.Tensor.softmax" # TODO: should modify to log reduction. def softmax(val: np.ndarray) -> np.ndarray: logits = val - val.max() numerator = np....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_softmax_base():\n x = np.array([[[2.0, 3.0, 4.0, 5.0],\n [3.0, 4.0, 5.0, 6.0],\n [7.0, 8.0, 8.0, 9.0]],\n [[1.0, 2.0, 3.0, 4.0],\n [5.0, 6.0, 7.0, 8.0],\n [6.0, 7.0, 8.0, 9.0]]])\n res = np.a...
[ "0.7282096", "0.7256486", "0.7254963", "0.71321", "0.7109516", "0.708068", "0.701603", "0.7006106", "0.6971035", "0.69379747", "0.6931134", "0.6913795", "0.6909939", "0.68986917", "0.68976617", "0.6888045", "0.6869124", "0.6864466", "0.6863424", "0.68517166", "0.68322587", ...
0.0
-1
Repeat elements of an array.
def repeat( self, repeats: Union[int, Tuple[int, ...]], axis: Optional[int] = None ) -> PhiTensor: result = self.child.repeat(repeats, axis) if isinstance(self.min_vals, lazyrepeatarray): minv = lazyrepeatarray(data=self.min_vals.data.min(), shape=result.shape) maxv ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def repeat(a, repeats, axis=None):\n return afnumpy.asarray(a).repeat(repeats, axis=axis)", "def rep(\n x: Any,\n times: IntOrIter = 1,\n length: int = None, # pylint: disable=redefined-outer-name\n each: int = 1,\n) -> ArrayLikeType:\n if is_scalar(x):\n x = [x]\n if is_iterable(tim...
[ "0.77669495", "0.6952881", "0.68815815", "0.67514676", "0.6715123", "0.6682219", "0.66743696", "0.661403", "0.65719515", "0.65643", "0.6558338", "0.65580964", "0.6512198", "0.64070255", "0.6353142", "0.62469375", "0.62239957", "0.6217", "0.6207992", "0.618354", "0.6103445", ...
0.563294
41
Calculate line unit price including discounts and vouchers.
def calculate_base_line_unit_price( line_info: "CheckoutLineInfo", channel: "Channel", discounts: Optional[Iterable[DiscountInfo]] = None, ) -> Money: total_line_price = calculate_base_line_total_price( line_info=line_info, channel=channel, discounts=discounts ) quantity = line_info.line...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _calc_line_base_price(self, cr, uid, line, context=None):\n return line.price_unit", "def _calculate_base_line_unit_price(\n line_info: \"CheckoutLineInfo\",\n channel: \"Channel\",\n discounts: Optional[Iterable[DiscountInfo]] = None,\n) -> Money:\n variant = line_info.variant\n varian...
[ "0.73969275", "0.73394305", "0.6993151", "0.6927366", "0.68886274", "0.6861681", "0.66165376", "0.6611978", "0.65724295", "0.65357333", "0.65189856", "0.65183806", "0.6483923", "0.6477163", "0.6466802", "0.6436142", "0.63719827", "0.6348608", "0.6308976", "0.615861", "0.61504...
0.67623496
6
Calculate line total price including discounts and vouchers.
def calculate_base_line_total_price( line_info: "CheckoutLineInfo", channel: "Channel", discounts: Optional[Iterable[DiscountInfo]] = None, ) -> Money: unit_price = _calculate_base_line_unit_price( line_info=line_info, channel=channel, discounts=discounts ) if line_info.voucher and line_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def checkout_line_total(\n *,\n manager: \"PluginsManager\",\n checkout_info: \"CheckoutInfo\",\n lines: Iterable[\"CheckoutLineInfo\"],\n checkout_line_info: \"CheckoutLineInfo\",\n discounts: Iterable[DiscountInfo] = [],\n) -> \"TaxedMoney\":\n address = checkout_info.shipping_address or che...
[ "0.72130984", "0.7098418", "0.7073085", "0.7012024", "0.70043033", "0.69671786", "0.6885046", "0.6837071", "0.6777761", "0.67638266", "0.6749034", "0.66829085", "0.6595098", "0.6551119", "0.65477043", "0.647221", "0.6423837", "0.64222634", "0.64187115", "0.64128643", "0.64064...
0.7007376
4
Calculate line total price excluding discounts and vouchers.
def calculate_undiscounted_base_line_total_price( line_info: "CheckoutLineInfo", channel: "Channel", ) -> Money: unit_price = calculate_undiscounted_base_line_unit_price( line_info=line_info, channel=channel ) total_price = unit_price * line_info.line.quantity return quantize_price(total...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def basket_total_before_discounts_excl_tax(self):\n result = self.lines.aggregate(total=Sum(\"line_price_before_discounts_excl_tax\"))\n return result[\"total\"]", "def basket_total_before_discounts_incl_tax(self):\n result = self.lines.aggregate(total=Sum(\"line_price_before_discounts_incl_...
[ "0.7326034", "0.7186262", "0.69015306", "0.6853348", "0.6740668", "0.67262346", "0.6627008", "0.6625306", "0.6611523", "0.6579247", "0.6563589", "0.64025104", "0.6290077", "0.62217015", "0.6181813", "0.6139562", "0.61353797", "0.61082375", "0.5972937", "0.59541214", "0.594935...
0.65664643
10
Calculate line unit price without including discounts and vouchers.
def calculate_undiscounted_base_line_unit_price( line_info: "CheckoutLineInfo", channel: "Channel", ): variant = line_info.variant variant_price = variant.get_price( line_info.product, line_info.collections, channel, line_info.channel_listing, [], line_inf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _calc_line_base_price(self, cr, uid, line, context=None):\n return line.price_unit", "def _calculate_base_line_unit_price(\n line_info: \"CheckoutLineInfo\",\n channel: \"Channel\",\n discounts: Optional[Iterable[DiscountInfo]] = None,\n) -> Money:\n variant = line_info.variant\n varian...
[ "0.72960985", "0.71888113", "0.6834595", "0.6819352", "0.6745493", "0.6660202", "0.664901", "0.6597645", "0.64112365", "0.637923", "0.6352976", "0.6339665", "0.62621653", "0.6227796", "0.6216953", "0.6193217", "0.61719316", "0.6141893", "0.6136706", "0.6127397", "0.61103594",...
0.72485054
1
Return checkout shipping price.
def calculate_base_price_for_shipping_method( checkout_info: "CheckoutInfo", shipping_method_info: "ShippingMethodInfo", lines: Iterable["CheckoutLineInfo"] = None, ) -> Money: from .fetch import CheckoutLineInfo shipping_method = shipping_method_info.delivery_method if lines is not None and a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def checkout_shipping_price(\n *,\n manager: \"PluginsManager\",\n checkout_info: \"CheckoutInfo\",\n lines: Iterable[\"CheckoutLineInfo\"],\n address: Optional[\"Address\"],\n discounts: Optional[Iterable[DiscountInfo]] = None,\n) -> \"TaxedMoney\":\n calculated_checkout_shipping = manager.ca...
[ "0.810749", "0.729325", "0.71539706", "0.68384516", "0.6799031", "0.6799031", "0.67477036", "0.6732251", "0.6636605", "0.6620703", "0.65922046", "0.64757997", "0.6433518", "0.6391271", "0.6374596", "0.6374596", "0.6374596", "0.6372151", "0.6344977", "0.6340818", "0.62997717",...
0.6468815
12
Take a string input and try to normalize it to a 13digit, split ISBN. This method takes a string which is meant to represent a split or unsplit 13digit ISBN. It applies a range of tests to verify its validity and then returns a normalized, split variant.
def test_and_normalize_isbn(self, isbn): ret = {"valid": False, "input_value": str(isbn)} stripped_isbn = isbn.strip() unsplit_isbn = stripped_isbn.replace("-", "") split_on_input = False if self.ISBN_SPLIT_RE.match(stripped_isbn): if len(stripped_isbn) < 17: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize_isbn(val):\n if is_isbn10(val):\n val = isbnlib.to_isbn13(val)\n return isbnlib.mask(isbnlib.canonical(val))", "def verify(s):\n\t# Remove any spurious characters\n\ts = re.sub(r'[^0-9xX]', '', s).upper().strip()\n\n\tl = len(s)\n\n\tif l==10:\n\t\tif verify_10(s):\n\t\t\treturn s\n\te...
[ "0.6674792", "0.64660627", "0.62945503", "0.6246992", "0.62351245", "0.6074272", "0.6062049", "0.59419674", "0.589477", "0.5799298", "0.5714389", "0.56275535", "0.5602507", "0.55823916", "0.55606186", "0.5551071", "0.55099666", "0.55029225", "0.5407276", "0.5311291", "0.53079...
0.73894507
0
Take a string representing a 13digit ISBN (without hyphens) and test if its check digit is correct.
def isbn_has_valid_check_digit(self, isbn): if not self.ISBN_RE.match(isbn): raise ValueError(str(isbn) + " is no valid 13-digit ISBN!") checksum = 0 for index, digit in enumerate(isbn): if index % 2 == 0: checksum += int(digit) else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify(s):\n\t# Remove any spurious characters\n\ts = re.sub(r'[^0-9xX]', '', s).upper().strip()\n\n\tl = len(s)\n\n\tif l==10:\n\t\tif verify_10(s):\n\t\t\treturn s\n\telif l==13:\n\t\tif verify_13(s):\n\t\t\treturn s\n\n\t# It's not the right length to be an ISBN\n\treturn False", "def isISBN(code):\n i...
[ "0.8214894", "0.8021371", "0.8005802", "0.79226404", "0.7880769", "0.78354245", "0.77611536", "0.7659838", "0.74279064", "0.72540087", "0.7227549", "0.7223759", "0.7174878", "0.71154135", "0.7003766", "0.6941466", "0.6922699", "0.69004124", "0.6846859", "0.681032", "0.6447314...
0.79992795
3
Return a representative string of this object
def __repr__(self) -> str: template = "BrownModel(fx={fx}, fy={fy}, px={px}, py={py}, alpha={skew},\n" \ " field_of_view={fov}, k1={k1}, k2={k2}, k3={k3}, p1={p1}, p2={p2},\n" \ " misalignment={mis!r}, a1={a1}, a2={a2}, a3={a3}, n_rows={nr}, n_cols={nc}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self) -> str:\n return '{:s}({!r})'.format(self.__class__.__name__, self.getvalue())", "def __repr__(self) -> str:\n return '{:s}({!r})'.format(self.__class__.__name__, self.getvalue())", "def __repr__(self) -> str:\n return '{:s}({!r})'.format(self.__class__.__name__, self.ge...
[ "0.8388756", "0.8388756", "0.8388756", "0.8328609", "0.8328609", "0.8328609", "0.8328609", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.8313814", "0.82937354", ...
0.0
-1
The focal length in units of pixels along the y axis (focal length divided by y axis pixel pitch)
def fy(self) -> float: return self.intrinsic_matrix[1, 1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def focal_length(self):\n\n return self.f * self.diameter", "def estimate_focal_length(self):\n fl = (self.fiber_diameter / 2) / np.tan(np.deg2rad(self.fov / 2))\n\n return fl", "def bspb_focalLength():\n shotCam = pm.PyNode('shot_cam').getShape()\n return str(shotCam.focalLength.get...
[ "0.788754", "0.73121446", "0.6450626", "0.62973905", "0.615877", "0.6155386", "0.60900915", "0.60008806", "0.59614646", "0.5949694", "0.5923351", "0.5869475", "0.5864568", "0.58227557", "0.5818874", "0.57800424", "0.57486063", "0.57402515", "0.5732848", "0.5725423", "0.570654...
0.5653421
25
An alpha term for nonrectangular pixels. This corresponds to the [0, 1] component of the intrinsic matrix
def kxy(self) -> float: return self.intrinsic_matrix[0, 1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alpha(self) -> float:\n return self.intrinsic_matrix[0, 1]", "def GetAlpha(self):\n return _itkRGBAPixelPython.itkRGBAPixelUC_GetAlpha(self)", "def GetAlpha(self):\n return _itkRGBAPixelPython.itkRGBAPixelUS_GetAlpha(self)", "def calculate_alpha(color, F, B):\n return np.dot(color...
[ "0.73271114", "0.65395194", "0.65311337", "0.6404922", "0.63371676", "0.62575656", "0.62575656", "0.62575656", "0.6222696", "0.62112284", "0.62021446", "0.619871", "0.61942816", "0.61434275", "0.6118861", "0.6077974", "0.60577303", "0.60525185", "0.6028178", "0.6015746", "0.5...
0.0
-1
The radial distortion coefficient corresponding to the r4 term
def k2(self) -> float: return self.distortion_coefficients[1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def radial4(self) -> float:\n return self.distortion_coefficients[1]", "def radial6(self) -> float:\n return self.distortion_coefficients[2]", "def radial2(self) -> float:\n return self.distortion_coefficients[0]", "def _radial_distortion(self, r2: np.ndarray) -> np.ndarray:\n # d...
[ "0.87969923", "0.75054", "0.7216595", "0.69312906", "0.64339226", "0.63490605", "0.63448644", "0.6328019", "0.62846756", "0.62701464", "0.62337613", "0.6182114", "0.61567074", "0.615641", "0.6147529", "0.607349", "0.60599643", "0.6035504", "0.6030468", "0.60072345", "0.600044...
0.0
-1
The tip/tilt/decentering distortion coefficient corresponding to the y term.
def p1(self) -> float: return self.distortion_coefficients[3]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tiptilt_y(self) -> float:\n return self.distortion_coefficients[3]", "def c(self, y, t):\n return 1 / 2 * (np.sum((y - t) ** 2) ** 0.5) ** 2", "def estimateCt(y, inp):\n\treturn getK2(inp) * (1 - math.exp(-getLambda(inp) * y / getY90(inp)))", "def k2(self) -> float:\n return self.dis...
[ "0.79322433", "0.68064606", "0.65626264", "0.6455155", "0.63988346", "0.63988346", "0.6396854", "0.6392586", "0.63401", "0.63281226", "0.6232789", "0.62324154", "0.6212128", "0.6207462", "0.6207073", "0.620298", "0.61938345", "0.61749625", "0.6153538", "0.6153538", "0.6153538...
0.59655464
57
The tip/tilt/decentering distortion coefficient corresponding to the x term.
def p2(self) -> float: return self.distortion_coefficients[4]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tiptilt_x(self) -> float:\n return self.distortion_coefficients[4]", "def k1(self) -> float:\n return self.distortion_coefficients[0]", "def p1(self) -> float:\n return self.distortion_coefficients[3]", "def tiptilt_y(self) -> float:\n return self.distortion_coefficients[3]", ...
[ "0.75612336", "0.66120297", "0.64530754", "0.6359008", "0.63357747", "0.6313782", "0.60880786", "0.6058135", "0.6047822", "0.6004018", "0.5985889", "0.5978641", "0.595037", "0.58847964", "0.5883826", "0.58681625", "0.5775393", "0.5770165", "0.5758531", "0.57430613", "0.573941...
0.5610056
34
The radial distortion coefficient corresponding to the r4 term
def radial4(self) -> float: return self.distortion_coefficients[1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def radial6(self) -> float:\n return self.distortion_coefficients[2]", "def radial2(self) -> float:\n return self.distortion_coefficients[0]", "def _radial_distortion(self, r2: np.ndarray) -> np.ndarray:\n # dr = (1 + k1 * r^2 + k2 * r^4 + k3 * r^6)/(1 + k4 * r^2 + k5 * r^4 + k6 * r^6)\n ...
[ "0.75054", "0.7216595", "0.69312906", "0.64339226", "0.63490605", "0.63448644", "0.6328019", "0.62846756", "0.62701464", "0.62337613", "0.6182114", "0.61567074", "0.615641", "0.6147529", "0.607349", "0.60599643", "0.6035504", "0.6030468", "0.60072345", "0.6000448", "0.5994733...
0.87969923
0
The tip/tilt/decentering distortion coefficient corresponding to the y term.
def tiptilt_y(self) -> float: return self.distortion_coefficients[3]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def c(self, y, t):\n return 1 / 2 * (np.sum((y - t) ** 2) ** 0.5) ** 2", "def estimateCt(y, inp):\n\treturn getK2(inp) * (1 - math.exp(-getLambda(inp) * y / getY90(inp)))", "def k2(self) -> float:\n return self.distortion_coefficients[1]", "def y(self):\n return self._turtle.ycor()", "...
[ "0.68070656", "0.6562243", "0.64538574", "0.63990027", "0.63990027", "0.63957673", "0.63933456", "0.63416785", "0.63280827", "0.62337", "0.6232076", "0.62119496", "0.6207458", "0.6207133", "0.6202341", "0.6191225", "0.61757123", "0.61538625", "0.61538625", "0.61538625", "0.61...
0.7930956
0
The tip/tilt/decentering distortion coefficient corresponding to the x term.
def tiptilt_x(self) -> float: return self.distortion_coefficients[4]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def k1(self) -> float:\n return self.distortion_coefficients[0]", "def p1(self) -> float:\n return self.distortion_coefficients[3]", "def tiptilt_y(self) -> float:\n return self.distortion_coefficients[3]", "def xcoeff(self):\n a, c, d, b = self.to_ccw()\n p1, q1 = a + b, c...
[ "0.66121715", "0.64527875", "0.63560426", "0.63368684", "0.63139975", "0.60863584", "0.60588", "0.6047389", "0.600498", "0.5985766", "0.59771216", "0.5950371", "0.5885334", "0.58826536", "0.5868901", "0.5776274", "0.57702", "0.57566893", "0.57438385", "0.5739601", "0.5738259"...
0.7560582
0
This method transforms 3D points or directions expressed in the camera frame into the corresponding 2D image locations. The points input should be either 1 or 2 dimensional, with the first axis being length 3 (each point (direction) in the camera frame is specified as a column). The optional ``image`` key word argument...
def project_onto_image(self, points_in_camera_frame: ARRAY_LIKE, image: int = 0, temperature: Real = 0) -> np.ndarray: _, __, picture_locations = self.get_projections(points_in_camera_frame, image, temperature=temperature) return picture_locations
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_projections(self, points_in_camera_frame: ARRAY_LIKE,\n image: int = 0, temperature: Real = 0) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:\n\n # ensure the input is an array\n points_in_camera_frame = np.asarray(points_in_camera_frame)\n\n # apply misalignment ...
[ "0.6900852", "0.63088614", "0.6070347", "0.5940883", "0.590531", "0.58069074", "0.572071", "0.56972075", "0.5679944", "0.5675518", "0.56532395", "0.5615244", "0.5608112", "0.5572359", "0.5554709", "0.55475515", "0.5527778", "0.5494807", "0.5478514", "0.5442041", "0.5411114", ...
0.77804095
0
Get the code of cell for Test
def format_cell_test_code(cell: Cell) -> str: # Note: on Windows, we have the EOL \r that we need to remove source = _PAT_EXPORT_TEST.sub("", cell["source"]).replace("\r", "") return f"# Test Cell\n{source.strip()}"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_code_cell(cell):\n return cell[\"cell_type\"] == \"code\"", "def is_test_cell(cell):\n if cell['cell_type'] != 'code':\n return False\n source = get_source(cell)\n return source and re.match(TEST_REGEX, source[0], flags=re.IGNORECASE)", "def test_get_cell(workbook):\n assert workbo...
[ "0.6154993", "0.6043332", "0.59702533", "0.5966432", "0.5956251", "0.5953669", "0.5942119", "0.5921109", "0.5833941", "0.5833941", "0.5833941", "0.5833941", "0.5828637", "0.580202", "0.5711887", "0.5711887", "0.5711887", "0.5711887", "0.5700427", "0.56967574", "0.56558496", ...
0.6820381
0
Adds rate specified point source at the center of cell_index. Returns the index of the new rate well. The units of rate are kg/s.
def add_point_rate_well(self, injection_rate, cell_index, well_name): self.rate_wells.append(cell_index) self.rate_wells_rate.append(injection_rate) self.rate_wells_name.append(well_name) return len(self.rate_wells)-1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GroundExcelAddPlayerSightPointRate(builder, PlayerSightPointRate):\n return AddPlayerSightPointRate(builder, PlayerSightPointRate)", "def add_rate_well(self, injection_rate, cell_index, well_name):\n raise NameError(\"add_rate_well not yet implemented\")", "def GroundExcelAddEnemySightPointRate(b...
[ "0.55762017", "0.5430882", "0.5401547", "0.5345356", "0.5278539", "0.52448744", "0.52338934", "0.5147642", "0.51168233", "0.5012667", "0.49884123", "0.49308655", "0.48908228", "0.48515493", "0.48479602", "0.48309967", "0.48301044", "0.47500736", "0.4700235", "0.46753547", "0....
0.60488534
0
The author of the app. This may be an organization name.
def author(self) -> str: return self._author
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def author(self) -> str:\n return pulumi.get(self, \"author\")", "def author(self):\n return self._data.get('author', None)", "def author(self):\n return self._changeset.get('author', None)", "def author(self):\n return self._author", "def author(self):\n return self._aut...
[ "0.8002666", "0.7755853", "0.76482785", "0.756365", "0.756365", "0.756365", "0.7494945", "0.74589664", "0.74589664", "0.74161977", "0.74085903", "0.7377308", "0.71530354", "0.7061731", "0.7048248", "0.6949798", "0.69345075", "0.6931464", "0.6931464", "0.6860079", "0.68161815"...
0.78561145
2
The version number of the app.
def version(self) -> str: return self._version
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def app_version(self) -> str:\n return pulumi.get(self, \"app_version\")", "def get_version(self):\n data = self._get('app_version')\n return data['version']", "def version(self):\n return self.proto.details.appDetails.versionString", "def version(self):\n\n return self.man...
[ "0.88341653", "0.87490255", "0.85175085", "0.84491843", "0.83330125", "0.82620686", "0.820602", "0.8171728", "0.8171728", "0.8171728", "0.8171728", "0.81123245", "0.8084238", "0.8071373", "0.8045607", "0.8010347", "0.79804206", "0.79558265", "0.79534954", "0.79534954", "0.795...
0.80760205
16
The main window for the app.
def main_window(self) -> MainWindow: return self._main_window
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_main_window():\n\n pass", "def main(self):\n\n self.window.show_all()\n gtk.main()", "def maya_main_window():\n main_window = omui.MQtUtil.mainWindow()\n return shiboken2.wrapInstance(long(main_window), PySide2.QtWidgets.QWidget)", "def maya_main_window():\n main_window = om...
[ "0.77721673", "0.75412744", "0.7458601", "0.74379116", "0.74325544", "0.74325544", "0.74325544", "0.73820394", "0.7364752", "0.73627883", "0.73271334", "0.7315375", "0.72902465", "0.72601336", "0.7252809", "0.7233855", "0.72044706", "0.71879685", "0.7122447", "0.70843464", "0...
0.80526423
0
Hide cursor from view.
def hide_cursor(self) -> None: self._impl.hide_cursor()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hide_cursor():\n props = WindowProperties()\n props.setCursorHidden(True)\n # somehow the window gets undecorated after hiding the cursor\n # so we reset it here to the value we need\n #props.setUndecorated(settings.fullscreen)\n base.win.requestProperties(props)", "def hide_cursor():\n ...
[ "0.8027462", "0.7757837", "0.74412817", "0.7413757", "0.73863417", "0.7113815", "0.7042827", "0.6971995", "0.69178647", "0.6881005", "0.68390054", "0.68257904", "0.6770166", "0.6770166", "0.676966", "0.6756844", "0.6739214", "0.6718766", "0.6718766", "0.66753215", "0.66221386...
0.8764623
0
Open the application's homepage in the default browser. If the application metadata doesn't define a homepage, this is a noop.
def visit_homepage(self) -> None: if self.home_page is not None: webbrowser.open(self.home_page)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def go_home(self):\r\n if self.home_url is not None:\r\n self.set_url(self.home_url)", "def go_home(request):\n\n url = request.route_url('home', _app_url=get_app_url(request))\n return HTTPFound(location=url)", "def start_page():\n if not _home:\n abort(404)\n return redir...
[ "0.6916172", "0.6697548", "0.6400468", "0.6400468", "0.63540894", "0.6353771", "0.63046205", "0.6300461", "0.6274875", "0.6274157", "0.6261622", "0.6245474", "0.6196917", "0.6160398", "0.61221474", "0.6117675", "0.6117631", "0.6117631", "0.6115424", "0.61142755", "0.6113185",...
0.7404126
0
Create a documentbased Application. A documentbased application is the same as a normal application, with the exception that there is no main window. Instead, each document managed by the app will have it's own window.
def __init__( self, formal_name: str | None = None, app_id: str | None = None, app_name: str | None = None, id: str | None = None, icon: str | None = None, author: str | None = None, version: str | None = None, home_page: str | None = None, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createApp(self):\n app = self.app\n window = self.window\n window.show()\n app.exec()", "def create_app(self):\n raise NotImplementedError", "def doc_factory(global_config, **local_conf):\n\treturn make_app(blueprints.developer_portal, settings.ProductionConfig)", "def ...
[ "0.7056966", "0.671927", "0.66820997", "0.66635036", "0.65116876", "0.65085894", "0.6425547", "0.6339706", "0.6303332", "0.62694585", "0.6227871", "0.618809", "0.6076847", "0.60748124", "0.60281664", "0.5930749", "0.5914392", "0.5907134", "0.5832579", "0.5819253", "0.58163154...
0.5705825
28
Updates the learning rate given the learning rate decay. The routine has been implemented according to the original Lua SGD optimizer
def adjust_learning_rate(optimizer): for group in optimizer.param_groups: if 'step' not in group: group['step'] = 0 group['step'] += 1 group['lr'] = args.lr / (1 + group['step'] * args.lr_decay)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_learning_rate(self) -> None:\n self.epsilon = self.initial_epsilon / (1. + self.rate_decay * self.n_it)\n return", "def update_learning_rate(self) -> None:\n self.epsilon = self.initial_epsilon / (1. + self.rate_decay * self.n_it)\n return", "def adjust_learning_rate(epoc...
[ "0.7999012", "0.7999012", "0.7923972", "0.7874986", "0.78091747", "0.7807278", "0.77625346", "0.7747964", "0.7720907", "0.7703745", "0.7682217", "0.76511174", "0.7618364", "0.7616941", "0.75490105", "0.7534407", "0.75342274", "0.75326735", "0.7531651", "0.7526517", "0.7522038...
0.75397056
15
Return the precision of the climate device.
def _get_precision(self) -> float: precicions = [PRECISION_WHOLE, PRECISION_HALVES, PRECISION_TENTHS] static_info = self._static_info if static_info.visual_current_temperature_step != 0: step = static_info.visual_current_temperature_step else: step = static_info.v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_precision(self):\n ...", "def get_observed_precision(self):\n return self.get_precision()", "def precision(self) :\n return self.__precision", "def precision(self) :\n return self.__precision", "def precision(self) -> float:\n return self._matrix.precision", "de...
[ "0.788355", "0.7763876", "0.7676219", "0.7676219", "0.7317313", "0.7284578", "0.7284578", "0.7274982", "0.7266258", "0.72445273", "0.7237609", "0.70578796", "0.70523655", "0.70465827", "0.7036292", "0.6812104", "0.680383", "0.6763572", "0.67613536", "0.6752192", "0.6701664", ...
0.7453799
4
Return current fan setting.
def fan_mode(self) -> str | None: state = self._state return state.custom_fan_mode or _FAN_MODES.from_esphome(state.fan_mode)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def current_fan_mode(self):\n return self._current_fan_mode", "def fan_mode(self) -> str | None:\n return self._current_fan_mode", "def get_fan(self):\n return _fan", "def get_fan_mode(self):\n return self.__fan_mode", "def fan_mode(self):\n return self._fan_mode", "def...
[ "0.7449567", "0.73221064", "0.7309107", "0.720236", "0.71879905", "0.71879905", "0.7134496", "0.705924", "0.69959635", "0.69700766", "0.6842017", "0.68051666", "0.67910105", "0.6722937", "0.67029494", "0.6628719", "0.66091967", "0.6595738", "0.6491829", "0.6454682", "0.632314...
0.657611
18
Return current swing mode.
def swing_mode(self) -> str | None: return _SWING_MODES.from_esphome(self._state.swing_mode)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def swing_mode(self) -> str | None:\n return self._current_swing_mode", "def swing_mode(self):\n return self._swing_mode", "def current_swing_mode(self):\n return self._current_swing_mode", "def current_swing_mode(self):\n return None", "def swing_modes(self):\n return se...
[ "0.9201016", "0.89646655", "0.8495496", "0.8187901", "0.77310926", "0.7537186", "0.7359679", "0.6980932", "0.6975297", "0.6939033", "0.68946016", "0.6871971", "0.6865493", "0.68460476", "0.6748605", "0.6698572", "0.6667825", "0.6667502", "0.66546077", "0.66410697", "0.6637367...
0.8540556
2
Shift a date with given amount of months. Month overflows are clipped. E.g. Jan 31 + 1 month > Feb 28
def month_shift( d: Union[dt.date, dt.datetime, pd.Timestamp], months: int = 1 ) -> Union[dt.date, dt.datetime, pd.Timestamp]: year = d.year month = d.month + months if not (1 <= month <= 12): year = year + ((month - 1) // 12) month = ((month - 1) % 12) + 1 try: r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def date_diff_months_to_shift(d1_date,d2_date): \n d1 = datetime.strptime(d1_date, '%m/%d/%Y')\n d2 = datetime.strptime(d2_date, '%m/%d/%Y')\n return (d2.year - d1.year) * 12 + d2.month - d1.month-1", "def ceil_start_month(date):\n if date.month == 12:\n date = datetime(date.year + 1, 1, 1)\n ...
[ "0.6601737", "0.64476234", "0.6301691", "0.62808883", "0.62110174", "0.61765957", "0.6158793", "0.59865683", "0.5949973", "0.5928423", "0.592073", "0.59153014", "0.5813594", "0.57914007", "0.5741284", "0.57052565", "0.5682961", "0.56287175", "0.56236124", "0.55915785", "0.556...
0.7158706
0
Called when the user specifies an intent for this skill
def on_intent(intent_request, session): print("on_intent requestId=" + intent_request['requestId'] + ", sessionId=" + session['sessionId']) intent = intent_request['intent'] intent_name = intent_request['intent']['name'] # Dispatch to your skill's intent handlers if intent_name == "Find...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_intent(intent_request, session):\n\n intent = intent_request['intent']\n intent_name = intent_request['intent']['name']\n\n # Dispatch to your skill's intent handlers\n\n if intent_name not in skillmap:\n intent_name = \"NullSkill\"\n\n if intent_name in skillmap:\n try:\n ...
[ "0.7143966", "0.6956116", "0.6949057", "0.6905333", "0.68928874", "0.67641324", "0.6754843", "0.6722764", "0.67161995", "0.6699252", "0.6691263", "0.6670276", "0.6645522", "0.6642719", "0.6638686", "0.6607724", "0.6594981", "0.6575682", "0.6570076", "0.65620786", "0.65609014"...
0.6720773
8
The display name for the application.
def display_name(self) -> pulumi.Input[str]: return pulumi.get(self, "display_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def display_name(self):\n answer = self._call('display_name')\n return answer.display_name", "def display_name(self):\n return self.settings['displayName']", "def display_name(self) -> str:\n return pulumi.get(self, \"display_name\")", "def display_name(self) -> str:\n retu...
[ "0.84603864", "0.83620465", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8167425", "0.8115532", "0.8115532", "0.8115532", "0.8115532", "0.8115532", "0.8115532", ...
0.780021
54
Specifies whether this application supports device authentication without a user. Defaults to `false`.
def device_only_auth_enabled(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "device_only_auth_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_only_auth_enabled(self) -> pulumi.Output[Optional[bool]]:\n return pulumi.get(self, \"device_only_auth_enabled\")", "def enable_authentication(self) -> Optional[bool]:\n return pulumi.get(self, \"enable_authentication\")", "def selective_authentication(self) -> Optional[pulumi.Input[bo...
[ "0.790193", "0.65557116", "0.642526", "0.642526", "0.6348986", "0.62986463", "0.6187738", "0.5896016", "0.5875295", "0.5875295", "0.58743936", "0.58387774", "0.58387774", "0.573451", "0.5722695", "0.57115597", "0.57115597", "0.56902784", "0.5663405", "0.5652437", "0.56505346"...
0.80837446
1
Specifies whether the application is a public client. Appropriate for apps using token grant flows that don't use a redirect URI. Defaults to `false`.
def fallback_public_client_enabled(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "fallback_public_client_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def public_client(self) -> Optional[pulumi.Input['ApplicationPublicClientArgs']]:\n return pulumi.get(self, \"public_client\")", "def public_client(self) -> Optional[pulumi.Input['ApplicationPublicClientArgs']]:\n return pulumi.get(self, \"public_client\")", "def fallback_public_client_enabled(se...
[ "0.68363947", "0.68363947", "0.67830515", "0.6505681", "0.6280208", "0.62704164", "0.6243586", "0.6243586", "0.6243586", "0.6243586", "0.59927905", "0.59639245", "0.5949322", "0.5946739", "0.5946739", "0.5934967", "0.5930053", "0.5915916", "0.5915916", "0.58525616", "0.584005...
0.7112489
1
A logo image to upload for the application, as a raw base64encoded string. The image should be in gif, jpeg or png format. Note that once an image has been uploaded, it is not possible to remove it without replacing it with another image.
def logo_image(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "logo_image")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def app_logo_img():\n return base64.b64decode(\n b\"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlPM0jRW/QAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=\"\n )", "def logo_image(self):\n return self.company_logo or \"upload/default_avatar.gif\"", "def logo(self):\...
[ "0.79813576", "0.72153246", "0.6970924", "0.68604004", "0.6736078", "0.6554209", "0.65284497", "0.64555794", "0.6432389", "0.6374371", "0.63244677", "0.62635386", "0.62635386", "0.62635386", "0.62635386", "0.62634635", "0.6253474", "0.62421376", "0.62421376", "0.6217152", "0....
0.680888
4
Specifies whether, as part of OAuth 2.0 token requests, Azure AD allows POST requests, as opposed to GET requests. Defaults to `false`, which specifies that only GET requests are allowed.
def oauth2_post_response_required(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "oauth2_post_response_required")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post(self):\n # by default post is not supported\n return False", "def http_method_post():\n return 'POST'", "def should_skip_auth(flask_request):\n return flask_request.method in ['HEAD', 'OPTIONS']", "def is_post(request):\n return request.method == 'POST'", "def request_access_ena...
[ "0.6081792", "0.56264895", "0.55850613", "0.55316305", "0.54844886", "0.54844886", "0.54627204", "0.5461739", "0.53738385", "0.5334968", "0.53207165", "0.5245951", "0.52398354", "0.52316236", "0.52289134", "0.5224223", "0.5223141", "0.52227193", "0.5204453", "0.519844", "0.51...
0.5508216
4
A `web` block as documented below, which configures web related settings for this application. > Application Name Uniqueness Application names are not unique within Azure Active Directory. Use the `prevent_duplicate_names` argument to check for existing applications if you want to avoid name collisions.
def web(self) -> Optional[pulumi.Input['ApplicationWebArgs']]: return pulumi.get(self, "web")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, application_name):\r\n self._name = application_name", "def app_name(self, value):\n self._app_name = value", "def get_name():\n return config.APP_NAME", "def app_name(self):\n return 'oauth-dropins demo'", "def app_name(self): # pylint:disable=function-redefined\n ...
[ "0.5805637", "0.5801917", "0.55731195", "0.5467121", "0.54364896", "0.5289888", "0.52641195", "0.524554", "0.5200135", "0.51720077", "0.5083288", "0.5078545", "0.5066698", "0.505212", "0.50446206", "0.49686518", "0.49548832", "0.49362174", "0.49362174", "0.49362174", "0.49362...
0.4899932
22
Specifies whether this application supports device authentication without a user. Defaults to `false`.
def device_only_auth_enabled(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "device_only_auth_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_only_auth_enabled(self) -> pulumi.Output[Optional[bool]]:\n return pulumi.get(self, \"device_only_auth_enabled\")", "def enable_authentication(self) -> Optional[bool]:\n return pulumi.get(self, \"enable_authentication\")", "def selective_authentication(self) -> Optional[pulumi.Input[bo...
[ "0.790193", "0.65557116", "0.642526", "0.642526", "0.6348986", "0.62986463", "0.6187738", "0.5896016", "0.5875295", "0.5875295", "0.58743936", "0.58387774", "0.58387774", "0.573451", "0.5722695", "0.57115597", "0.57115597", "0.56902784", "0.5663405", "0.5652437", "0.56505346"...
0.80837446
0
Whether Microsoft has disabled the registered application. If the application is disabled, this will be a string indicating the status/reason, e.g. `DisabledDueToViolationOfServicesAgreement`
def disabled_by_microsoft(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "disabled_by_microsoft")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disabled_by_microsoft(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"disabled_by_microsoft\")", "def app_uninstall_disabled(self):\n return self._app_uninstall_disabled", "def disabled_reason(self) -> Sequence[str]:\n return pulumi.get(self, \"disabled_reason\")", "def avai...
[ "0.7363265", "0.73035616", "0.7032541", "0.6687124", "0.662721", "0.6623295", "0.66189885", "0.66189885", "0.661522", "0.65843874", "0.65690154", "0.6562384", "0.6562384", "0.6546885", "0.6510372", "0.644383", "0.64227915", "0.6411034", "0.6389757", "0.6389757", "0.626062", ...
0.7121292
2
The display name for the application.
def display_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "display_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def display_name(self):\n answer = self._call('display_name')\n return answer.display_name", "def display_name(self):\n return self.settings['displayName']", "def display_name(self) -> str:\n return pulumi.get(self, \"display_name\")", "def display_name(self) -> str:\n retu...
[ "0.84603864", "0.83620465", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8324322", "0.8167425", "0.8115532", "0.8115532", "0.8115532", "0.8115532", "0.8115532", "0.8115532", ...
0.76488906
78
Specifies whether the application is a public client. Appropriate for apps using token grant flows that don't use a redirect URI. Defaults to `false`.
def fallback_public_client_enabled(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "fallback_public_client_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def public_client(self) -> Optional[pulumi.Input['ApplicationPublicClientArgs']]:\n return pulumi.get(self, \"public_client\")", "def public_client(self) -> Optional[pulumi.Input['ApplicationPublicClientArgs']]:\n return pulumi.get(self, \"public_client\")", "def fallback_public_client_enabled(se...
[ "0.68388957", "0.68388957", "0.6783818", "0.65026027", "0.62822604", "0.6267877", "0.62402743", "0.62402743", "0.62402743", "0.62402743", "0.5989875", "0.5960949", "0.59503686", "0.59503686", "0.5946532", "0.59326094", "0.59275407", "0.5912154", "0.5912154", "0.58492756", "0....
0.7112928
0
A logo image to upload for the application, as a raw base64encoded string. The image should be in gif, jpeg or png format. Note that once an image has been uploaded, it is not possible to remove it without replacing it with another image.
def logo_image(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "logo_image")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def app_logo_img():\n return base64.b64decode(\n b\"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlPM0jRW/QAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=\"\n )", "def logo_image(self):\n return self.company_logo or \"upload/default_avatar.gif\"", "def logo(self):\...
[ "0.7981143", "0.72148025", "0.6970497", "0.6860129", "0.6738055", "0.6555166", "0.65273416", "0.64554775", "0.6434083", "0.6376537", "0.63251865", "0.6262822", "0.6262296", "0.6262296", "0.6262296", "0.6262296", "0.62548274", "0.6241293", "0.6241293", "0.6217936", "0.6206818"...
0.6808212
5
Specifies whether, as part of OAuth 2.0 token requests, Azure AD allows POST requests, as opposed to GET requests. Defaults to `false`, which specifies that only GET requests are allowed.
def oauth2_post_response_required(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "oauth2_post_response_required")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post(self):\n # by default post is not supported\n return False", "def http_method_post():\n return 'POST'", "def should_skip_auth(flask_request):\n return flask_request.method in ['HEAD', 'OPTIONS']", "def is_post(request):\n return request.method == 'POST'", "def request_access_ena...
[ "0.6081792", "0.56264895", "0.55850613", "0.55316305", "0.54844886", "0.54844886", "0.54627204", "0.5461739", "0.53738385", "0.5334968", "0.53207165", "0.5245951", "0.52398354", "0.52316236", "0.52289134", "0.5224223", "0.5223141", "0.52227193", "0.5204453", "0.519844", "0.51...
0.5508216
5
The verified publisher domain for the application.
def publisher_domain(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "publisher_domain")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def publisher_domain(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"publisher_domain\")", "def get_domain(self):\n return self.domain", "def domain(self) -> str:\n return pulumi.get(self, \"domain\")", "def domain(self) -> str:\n return pulumi.get(self, \"domain\")", "...
[ "0.84052634", "0.7401995", "0.7373781", "0.7373781", "0.73674095", "0.73489976", "0.7251138", "0.7226201", "0.7226201", "0.7226201", "0.72015774", "0.7140628", "0.708017", "0.70244414", "0.69789034", "0.696854", "0.696854", "0.6964269", "0.69488525", "0.6899571", "0.68887925"...
0.8156008
1
A `web` block as documented below, which configures web related settings for this application. > Application Name Uniqueness Application names are not unique within Azure Active Directory. Use the `prevent_duplicate_names` argument to check for existing applications if you want to avoid name collisions.
def web(self) -> Optional[pulumi.Input['ApplicationWebArgs']]: return pulumi.get(self, "web")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, application_name):\r\n self._name = application_name", "def app_name(self, value):\n self._app_name = value", "def get_name():\n return config.APP_NAME", "def app_name(self):\n return 'oauth-dropins demo'", "def app_name(self): # pylint:disable=function-redefined\n ...
[ "0.58048755", "0.5801222", "0.55712956", "0.546556", "0.54352385", "0.52893937", "0.52647454", "0.52446866", "0.51969075", "0.5169939", "0.5083204", "0.5076642", "0.5065599", "0.505101", "0.5043331", "0.49673623", "0.49522004", "0.4935466", "0.4935466", "0.4935466", "0.493546...
0.48961195
24
Example Usage Create an application ```python import pulumi import base64 import pulumi_azuread as azuread current = azuread.get_client_config() example = azuread.Application("example", display_name="example",
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, api: Optional[pulumi.Input[pulumi.InputType['ApplicationApiArgs']]] = None, app_roles: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ApplicationAp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_application(name=None, description=None):\n pass", "def new_application(self, method=\"POST\", name=\"Sample App\",\r\n short_name=\"sampleapp\", description=\"Description\",\r\n long_description=u'Long Description\\n================'):\r\n if me...
[ "0.7277725", "0.6746367", "0.6267596", "0.6206369", "0.6189026", "0.5997745", "0.5994921", "0.5961476", "0.59414744", "0.59152824", "0.5913994", "0.5911413", "0.58866787", "0.5866374", "0.5862522", "0.5839431", "0.58270764", "0.5812851", "0.576877", "0.5765183", "0.57516646",...
0.57344604
22
Example Usage Create an application ```python import pulumi import base64 import pulumi_azuread as azuread current = azuread.get_client_config() example = azuread.Application("example", display_name="example",
def __init__(__self__, resource_name: str, args: ApplicationArgs, opts: Optional[pulumi.ResourceOptions] = None): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_application(name=None, description=None):\n pass", "def new_application(self, method=\"POST\", name=\"Sample App\",\r\n short_name=\"sampleapp\", description=\"Description\",\r\n long_description=u'Long Description\\n================'):\r\n if me...
[ "0.72774976", "0.67462224", "0.6267769", "0.62060386", "0.61896545", "0.5998551", "0.59950185", "0.59609807", "0.5940616", "0.5914583", "0.5913546", "0.5910626", "0.5886105", "0.5865403", "0.5862351", "0.58400995", "0.58270156", "0.58126515", "0.5769408", "0.576495", "0.57512...
0.0
-1
Get an existing Application resource's state with the given name, id, and optional extra properties used to qualify the lookup.
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, api: Optional[pulumi.Input[pulumi.InputType['ApplicationApiArgs']]] = None, app_role_ids: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, app_role...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(resource_name: str,\n id: pulumi.Input[str],\n opts: Optional[pulumi.ResourceOptions] = None,\n application_name: Optional[pulumi.Input[str]] = None,\n description: Optional[pulumi.Input[str]] = None,\n resource_group_id: Optional[pulumi.Input[str]] = ...
[ "0.65805185", "0.63087666", "0.6210852", "0.5939297", "0.59073037", "0.58668077", "0.58439964", "0.5816552", "0.58106405", "0.570881", "0.5664215", "0.5597263", "0.55850774", "0.5509455", "0.54910964", "0.5461933", "0.54597425", "0.5442064", "0.5407725", "0.53887534", "0.5387...
0.57609755
9
Specifies whether this application supports device authentication without a user. Defaults to `false`.
def device_only_auth_enabled(self) -> pulumi.Output[Optional[bool]]: return pulumi.get(self, "device_only_auth_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_only_auth_enabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"device_only_auth_enabled\")", "def device_only_auth_enabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"device_only_auth_enabled\")", "def enable_authentication(self) -> Optional...
[ "0.80837446", "0.80837446", "0.65557116", "0.642526", "0.642526", "0.6348986", "0.62986463", "0.6187738", "0.5896016", "0.5875295", "0.5875295", "0.58743936", "0.58387774", "0.58387774", "0.573451", "0.5722695", "0.57115597", "0.57115597", "0.56902784", "0.5663405", "0.565243...
0.790193
2
Whether Microsoft has disabled the registered application. If the application is disabled, this will be a string indicating the status/reason, e.g. `DisabledDueToViolationOfServicesAgreement`
def disabled_by_microsoft(self) -> pulumi.Output[str]: return pulumi.get(self, "disabled_by_microsoft")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def app_uninstall_disabled(self):\n return self._app_uninstall_disabled", "def disabled_by_microsoft(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"disabled_by_microsoft\")", "def disabled_reason(self) -> Sequence[str]:\n return pulumi.get(self, \"disabled_reason\")", ...
[ "0.7303224", "0.7119325", "0.70295006", "0.6687221", "0.6625431", "0.66220737", "0.6616596", "0.6616596", "0.66130376", "0.6582711", "0.65668964", "0.65604216", "0.65604216", "0.6545759", "0.65086097", "0.6443054", "0.6420923", "0.64096045", "0.6387761", "0.6387761", "0.62579...
0.73613364
0
The display name for the application.
def display_name(self) -> pulumi.Output[str]: return pulumi.get(self, "display_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def display_name(self):\n answer = self._call('display_name')\n return answer.display_name", "def display_name(self):\n return self.settings['displayName']", "def display_name(self) -> str:\n return pulumi.get(self, \"display_name\")", "def display_name(self) -> str:\n retu...
[ "0.84602207", "0.8361768", "0.8324278", "0.8324278", "0.8324278", "0.8324278", "0.8324278", "0.8324278", "0.8324278", "0.8324278", "0.8324278", "0.8324278", "0.8324278", "0.8324278", "0.8167047", "0.8048344", "0.80325794", "0.8016174", "0.80098313", "0.80098313", "0.80098313"...
0.8115454
20
Specifies whether the application is a public client. Appropriate for apps using token grant flows that don't use a redirect URI. Defaults to `false`.
def fallback_public_client_enabled(self) -> pulumi.Output[Optional[bool]]: return pulumi.get(self, "fallback_public_client_enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fallback_public_client_enabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"fallback_public_client_enabled\")", "def fallback_public_client_enabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"fallback_public_client_enabled\")", "def public_client(s...
[ "0.7112109", "0.7112109", "0.6838804", "0.6838804", "0.65038556", "0.6281939", "0.6268782", "0.6241211", "0.6241211", "0.6241211", "0.6241211", "0.59904855", "0.59623533", "0.59481263", "0.59481263", "0.59463936", "0.5933269", "0.5928529", "0.59140164", "0.59140164", "0.58508...
0.6783009
4
A logo image to upload for the application, as a raw base64encoded string. The image should be in gif, jpeg or png format. Note that once an image has been uploaded, it is not possible to remove it without replacing it with another image.
def logo_image(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "logo_image")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def app_logo_img():\n return base64.b64decode(\n b\"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlPM0jRW/QAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=\"\n )", "def logo_image(self):\n return self.company_logo or \"upload/default_avatar.gif\"", "def logo(self):\...
[ "0.798273", "0.7216339", "0.69724065", "0.6809278", "0.6809278", "0.6736232", "0.65536255", "0.65290445", "0.6455403", "0.64331913", "0.63754624", "0.63251925", "0.6263393", "0.6263393", "0.6263393", "0.6263393", "0.6263253", "0.6253825", "0.6242892", "0.6242892", "0.62169296...
0.68617225
3
Specifies whether, as part of OAuth 2.0 token requests, Azure AD allows POST requests, as opposed to GET requests. Defaults to `false`, which specifies that only GET requests are allowed.
def oauth2_post_response_required(self) -> pulumi.Output[Optional[bool]]: return pulumi.get(self, "oauth2_post_response_required")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post(self):\n # by default post is not supported\n return False", "def http_method_post():\n return 'POST'", "def should_skip_auth(flask_request):\n return flask_request.method in ['HEAD', 'OPTIONS']", "def is_post(request):\n return request.method == 'POST'", "def oauth2_post_respon...
[ "0.6080787", "0.5627004", "0.55849916", "0.5532276", "0.55067277", "0.55067277", "0.5483562", "0.5483562", "0.5463236", "0.54609257", "0.53727764", "0.5333098", "0.5320476", "0.5246424", "0.52393967", "0.52306175", "0.5228846", "0.52236116", "0.5222283", "0.52215093", "0.5205...
0.5083388
32
The verified publisher domain for the application.
def publisher_domain(self) -> pulumi.Output[str]: return pulumi.get(self, "publisher_domain")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def publisher_domain(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"publisher_domain\")", "def get_domain(self):\n return self.domain", "def domain(self) -> str:\n return pulumi.get(self, \"domain\")", "def domain(self) -> str:\n return pulumi.get(self, \"domain...
[ "0.815532", "0.7402136", "0.73735166", "0.73735166", "0.73675746", "0.73489153", "0.7250924", "0.72262985", "0.72262985", "0.72262985", "0.72015005", "0.714002", "0.708024", "0.70243925", "0.69786894", "0.6968363", "0.6968363", "0.6963417", "0.694852", "0.6899507", "0.6889009...
0.8404752
0
A `web` block as documented below, which configures web related settings for this application. > Application Name Uniqueness Application names are not unique within Azure Active Directory. Use the `prevent_duplicate_names` argument to check for existing applications if you want to avoid name collisions.
def web(self) -> pulumi.Output[Optional['outputs.ApplicationWeb']]: return pulumi.get(self, "web")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, application_name):\r\n self._name = application_name", "def app_name(self, value):\n self._app_name = value", "def get_name():\n return config.APP_NAME", "def app_name(self):\n return 'oauth-dropins demo'", "def app_name(self): # pylint:disable=function-redefined\n ...
[ "0.58048755", "0.5801222", "0.55712956", "0.546556", "0.54352385", "0.52893937", "0.52647454", "0.52446866", "0.51969075", "0.5169939", "0.5083204", "0.5076642", "0.5065599", "0.505101", "0.5043331", "0.49673623", "0.49522004", "0.4935466", "0.4935466", "0.4935466", "0.493546...
0.44146633
93
Hard reset the ghost position back to its original location
def reset_position(self): self.rect.left, self.rect.top = self.start_pos
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_position(self):\n self.set_position(copy.deepcopy(self.ab_pos))", "def reset(self):\n self._x = 0\n self._y = 0", "def reset_position(self):\n self.goto(STARTING_POSITION)", "def reset_position(self, x, y):\n\t\tself.grid[x][y] = self.terminal", "def reset_position(sel...
[ "0.80594546", "0.7724436", "0.7513997", "0.75054705", "0.74481714", "0.74218756", "0.7378934", "0.72264427", "0.71630377", "0.71295905", "0.71199", "0.7115677", "0.7108925", "0.70704895", "0.70704895", "0.70704895", "0.7045318", "0.70140547", "0.69937086", "0.6988673", "0.697...
0.7766869
1
Get the current column location on the maze map
def get_nearest_col(self): return (self.rect.left - (self.screen.get_width() // 5)) // self.maze.block_size
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def maze_position(self):\n pos = self._env.observations()['DEBUG.POS.TRANS']\n x, y = self._to_maze_coord(pos[0], pos[1])\n return np.array([x, y])", "def get_current_position(self) -> Tuple[int, int]:\n return self.__row_position, self.__col_position", "def get_pos_index(self):\n return...
[ "0.6874667", "0.6668471", "0.66362596", "0.65826774", "0.6453075", "0.64276814", "0.6418957", "0.6411399", "0.6406793", "0.63920206", "0.6369816", "0.63647914", "0.6303829", "0.6271424", "0.626639", "0.62477577", "0.6243863", "0.62283534", "0.62250924", "0.62234855", "0.62234...
0.7103007
0
Compose a transformation matrix out of the given scales, offsets and axis rotations.
def compose(scales, offsets, rotations, origin=None): preRotate = np.eye(4) postRotate = np.eye(4) rotations = np.array(rotations) if rotations.shape == (3,): rotations = axisAnglesToRotMat(*rotations) if origin is not None: preRotate[ 0, 3] = -origin[0] preRotate[ 1, 3]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compose(scales, offsets, rotations, origin=None, shears=None,\n scaleAtOrigin=False):\n\n preRotate = np.eye(4)\n postRotate = np.eye(4)\n\n rotations = np.array(rotations)\n\n if rotations.shape == (3,):\n rotations = axisAnglesToRotMat(*rotations)\n\n if origin is not None:\...
[ "0.7537555", "0.65690684", "0.64986134", "0.6487529", "0.6481269", "0.64779437", "0.64676887", "0.6443265", "0.6421232", "0.6374487", "0.6032259", "0.5979625", "0.5943301", "0.5902371", "0.58697015", "0.5814364", "0.5743307", "0.5739233", "0.5736209", "0.57157046", "0.5684465...
0.8076804
0
Constructs a ``(3, 3)`` rotation matrix from the given angles, which must be specified in radians.
def axisAnglesToRotMat(xrot, yrot, zrot): xmat = np.eye(3) ymat = np.eye(3) zmat = np.eye(3) xmat[1, 1] = np.cos(xrot) xmat[1, 2] = -np.sin(xrot) xmat[2, 1] = np.sin(xrot) xmat[2, 2] = np.cos(xrot) ymat[0, 0] = np.cos(yrot) ymat[0, 2] = np.sin(yrot) ymat[2, 0] = -np.sin(y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_rotation_matrix_3d(angles) -> np.array:\n\n mat1 = np.array([[1., 0., 0.],\n [0., math.cos(angles[0]), math.sin(angles[0])],\n [0., -math.sin(angles[0]), math.cos(angles[0])]],\n dtype='float')\n\n mat2 = np.array([[math.cos(angles[1]), 0....
[ "0.81032157", "0.7730615", "0.7703992", "0.76832724", "0.74151605", "0.7353072", "0.7353072", "0.7352797", "0.7352797", "0.7352797", "0.7106909", "0.70327955", "0.7030317", "0.6907833", "0.6900828", "0.6872135", "0.68530506", "0.674285", "0.671553", "0.661541", "0.6557267", ...
0.59142697
93
Takes in a first name and a last name as two parameters, and returns a concatenated string of the full name.
def full_name(first_name, last_name): return first_name + " " + last_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def full_name(first_name, last_name):\n return first_name + \" \" + last_name", "def get_formated_name(first_name,last_name):\n\tfull_name = first_name + '' + last_name\n\treturn full_name.title()", "def get_formatted_name(first_name, last_name):\n full_name = first_name + ' ' + last_name\n return ful...
[ "0.9380116", "0.87884164", "0.86451995", "0.86451995", "0.86451995", "0.8613916", "0.86031663", "0.8593502", "0.8572887", "0.85226303", "0.8500354", "0.8500354", "0.8500354", "0.8488867", "0.84846205", "0.84799737", "0.84624654", "0.845756", "0.8455832", "0.8450128", "0.84501...
0.9336813
1
Test that update failures are logged.
async def test_update_failure(airsensor, hass, config, caplog): caplog.set_level(logging.ERROR) feature_mock, entity_id = airsensor feature_mock.async_update = AsyncMock(side_effect=blebox_uniapi.error.ClientError) await async_setup_entity(hass, config, entity_id) assert f"Updating '{feature_mock...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update(app):\n\n assert False", "def test_update(self):\n pass", "def test_update(self):\n pass", "def test_update(self):\n pass", "def test_error_logging(self):\n # Verify nothing in the journal\n assert len(Record.objects.recent('heartbeat')) == 0\n\n ...
[ "0.6998096", "0.69833946", "0.69833946", "0.69833946", "0.6970104", "0.689585", "0.6781766", "0.6774411", "0.67665017", "0.676294", "0.671667", "0.6684071", "0.6609819", "0.6589228", "0.6580149", "0.6580149", "0.6573245", "0.6546282", "0.6526446", "0.65201277", "0.6511645", ...
0.7021775
0
Call the global process tokenizer on the input text.
def tokenize(text: str) -> Dict: tokens = TOK.tokenize(text) output = { 'words': tokens.words(), 'offsets': tokens.offsets(), 'pos': tokens.pos(), 'lemma': tokens.lemmas(), 'ner': tokens.entities(), 'sentences': tokens.sentences(), } return output
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tokenization(text):\n\n global tokenizer_tree\n tokenised_document = tokenizer_tree.tokenize(text)\n return tokenised_document", "def _tokenize(self, text: str) -> List[str]:\n return self.bert_model.tokenize(text.strip())", "def sentence_tokenizer(text):\n return sent_tokenize(text)", ...
[ "0.69637275", "0.6924892", "0.68528223", "0.68372166", "0.68065596", "0.6799736", "0.6765403", "0.67490304", "0.6710439", "0.66586006", "0.66367644", "0.66302836", "0.6599883", "0.65889925", "0.6582765", "0.6565064", "0.65626687", "0.655907", "0.6538387", "0.65037644", "0.648...
0.0
-1
Return a discrete colormap from the continuous colormap cmap.
def _cmap_discretize(cmap, N): if type(cmap) == str: cmap = plt.get_cmap(cmap) colors_i = np.concatenate((np.linspace(0, 1., N), (0.,0.,0.,0.))) colors_rgba = cmap(colors_i) indices = np.linspace(0, 1., N+1) cdict = {} for ki, key in enumerate(('red','green','blue')): cdict[key]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def discrete_cmap(N, base_cmap=None):\n base = plt.get_cmap(base_cmap)\n color_list = base(np.linspace(0, 1, N))\n cmap_name = base.name + str(N)\n return base.from_list(cmap_name, color_list, N)", "def discrete_cmap(N, base_cmap=None):\n\t# Note that if base_cmap is a string or None, you can simply ...
[ "0.728505", "0.72603613", "0.72455084", "0.72360593", "0.72360593", "0.72360593", "0.72089005", "0.7171376", "0.7171376", "0.7171376", "0.7171376", "0.71471137", "0.7134598", "0.7107368", "0.6235518", "0.6215949", "0.6136177", "0.61234826", "0.6092151", "0.6057911", "0.602438...
0.6255922
14
Home page of the app It loads the template page and passes on any current tasks and projects that exist. Also passes along the currently active tab. If the active tab was removed, selects the first project in the Projects database and sets that one as the active one.
def index(): active = None projects = Projects.query.all() tasks = Tasks.query.all() if len(projects) == 1: projects[0].active = True active = projects[0].project_id db.session.commit() if projects: for project in projects: if project.active: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tab_nav(tab):\n projects = Projects.query.all()\n\n for project in projects:\n if project.project_name == tab:\n project.active = True\n else:\n project.active = False\n\n db.session.commit()\n return redirect('/')", "def home():\n return render_template('Ma...
[ "0.6601887", "0.6487843", "0.632421", "0.62322557", "0.6208382", "0.61697704", "0.61617917", "0.61453724", "0.61415714", "0.61326885", "0.61320406", "0.6113126", "0.60896224", "0.606239", "0.606239", "0.606239", "0.606239", "0.606239", "0.606239", "0.606239", "0.606239", "0...
0.66121143
0
Test Templates creation in projects
def test_04_public_private_template_use_in_project(self): # 1. Create a project # 2. Verify Public templates can be used without any restriction # 3. Verify that private template created in project belongs to this project # Verify that list template api wth project id list this template ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_template_subsciption(self):\n pass", "def test_create_namespaced_template(self):\n pass", "def test_create_project_from_template(self):\n project_new = self.project_template.take_template()\n\n self.assertTrue(project_new)", "def test_create_template_for_all_namesp...
[ "0.7811733", "0.7460819", "0.7352725", "0.7265911", "0.72642744", "0.7079148", "0.707098", "0.70588493", "0.70588493", "0.70588493", "0.6968562", "0.69062257", "0.69041383", "0.6833981", "0.68136793", "0.68062633", "0.6800149", "0.67936975", "0.6766053", "0.66730267", "0.6653...
0.654992
24
Test use of private template in a project
def test_05_use_private_template_in_project(self): # 1. Create a project # 2. Verify that in order to use somebody's Private template for vm # creation in the project, permission to use the template has to # be granted to the Project (use API 'updateTemplatePermissions' # ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_04_public_private_template_use_in_project(self):\n # 1. Create a project\n # 2. Verify Public templates can be used without any restriction\n # 3. Verify that private template created in project belongs to this project\n # Verify that list template api wth project id list this ...
[ "0.74264836", "0.71694666", "0.71670556", "0.70519453", "0.7035184", "0.69642603", "0.69372934", "0.6887848", "0.6876676", "0.6861864", "0.68592834", "0.6785371", "0.672083", "0.6697108", "0.666767", "0.66515505", "0.6591332", "0.65756756", "0.65432435", "0.65164953", "0.6507...
0.7319271
1
This returns a compact description of the region, suitable for human consumption.
def description(self): return "%s, %s" % (self.name, self.country)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def region(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"region\")", "def region(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"region\")", "def region(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"region\")", "def region(self) -> pulumi.Output[str]:\n ...
[ "0.7551226", "0.7551226", "0.7551226", "0.7551226", "0.7551226", "0.7551226", "0.7445978", "0.7445978", "0.7445978", "0.7445978", "0.7445978", "0.7445978", "0.7426828", "0.73874456", "0.73402077", "0.7336879", "0.7281869", "0.7281869", "0.7281869", "0.7235257", "0.7205276", ...
0.645011
42
This returns the effective boldness score of the label, based on the blend. Each varietal within the blend has a boldness score, these are weighted based on the portion of the wine made up by that varietal.
def weightedBoldness(self): return sum([blend.varietal.boldness * blend.portion / 100.0 for blend in self.blends])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def analyze_belief_strength_with_bias(self, G):\r\n n = []\r\n nbs_list = []\r\n for node in G.nodes: #cycles through the nodes of the graph to mine the attributes\r\n n.append(node) #appends each node to a list that will be put into a dictionary\r\n pbs_list = []...
[ "0.5945224", "0.58419406", "0.56666714", "0.5630025", "0.5621001", "0.5585648", "0.556737", "0.556591", "0.55561244", "0.5509792", "0.5505881", "0.5458614", "0.5447041", "0.54452795", "0.5444499", "0.54209197", "0.54193723", "0.54058754", "0.5385326", "0.53715783", "0.5371578...
0.8216474
0