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
determines if the given value equates to a null value for the given column type
def _val_is_null(self, val): return val is None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_null(value: Any) -> bool:\n return not value", "def is_null(val):\n return (val is None)", "def isNull(self):\n return self.__column is None", "def null_value_handler(datatype, value, null_format):\n if DataType.Name(datatype) == \"STRING\":\n if NullValues.STRING == value...
[ "0.70396405", "0.6953715", "0.68051517", "0.65276504", "0.65276504", "0.6513544", "0.6492605", "0.6483572", "0.6411812", "0.6407888", "0.63900584", "0.63698894", "0.63635004", "0.6324211", "0.63219696", "0.6280636", "0.6263403", "0.6218287", "0.6182792", "0.6146611", "0.60830...
0.7073682
0
Returns a connection to the queue freeing it up for other queries to use.
def put(self, conn): try: self._queue.put(conn, block=False) except queue.Full: conn.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conn(self):\n return self._queue.conn", "def _unthreadsafe_get_connection(self):\n return PooledDBConnection(self, self._queue.get())", "def close(self):\n if not self.isqueue:\n return self.connection\n return None", "def get_queue():\n\n return multiprocess...
[ "0.7420231", "0.7403942", "0.7373516", "0.6397066", "0.6374049", "0.6351053", "0.6210756", "0.62034017", "0.6195142", "0.61904854", "0.6183977", "0.6174935", "0.6174935", "0.6174935", "0.6174935", "0.6174935", "0.6174935", "0.6174935", "0.6174935", "0.6174935", "0.6174935", ...
0.0
-1
Returns the manual keyspace, if set, otherwise the default keyspace
def _get_keyspace(cls): return cls.__keyspace__ or DEFAULT_KEYSPACE
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def keyspace(self, name):\n if self.options.db_prefix:\n return \"{}_{}\".format(self.options.db_prefix, name)\n return name", "def setup_keyspace():\n\n try: \n # Make a connection to a Cassandra instance in the local machine (127.0.0.1)\n cluster = Cluster(['127.0.0.1'...
[ "0.6798931", "0.5761402", "0.5755196", "0.5736525", "0.5550943", "0.5540408", "0.53758234", "0.5354882", "0.5281825", "0.51958215", "0.515821", "0.51508963", "0.5137628", "0.5100279", "0.5049342", "0.50379395", "0.50215477", "0.49270323", "0.492065", "0.49099424", "0.48931712...
0.7874462
0
Sets a column's value.
def __setitem__(self, key, val): if not isinstance(key, basestring): raise TypeError if key not in self._columns.keys(): raise KeyError return setattr(self, key, val)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_value(self, row, colName, value):\n\t\tself[row][self._columns[colName]] = value", "def __set__(self, instance, value):\r\n if instance:\r\n return instance._values[self.column.column_name].setval(value)\r\n else:\r\n raise AttributeError('cannot reassign column values...
[ "0.798895", "0.7824895", "0.7598617", "0.752768", "0.7524157", "0.7439146", "0.74188954", "0.7237151", "0.7187136", "0.7173066", "0.7064264", "0.70516247", "0.70390576", "0.70088947", "0.68765867", "0.6864636", "0.6851159", "0.68436414", "0.68436414", "0.68436414", "0.6836743...
0.6298768
71
Returns list of column's values.
def values(self): return [self[k] for k in self]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def columns_values(self):\r\n return self._columns_values", "def get_values(self, col) :\n\n if col not in self.cols :\n raise Exception('Column %s not in data' % col)\n\n select_sql = 'SELECT \"%s\" FROM \"%s\" ORDER BY __ROWID ASC' % (col, self.name)\n cur = self.con.curs...
[ "0.80946887", "0.8016706", "0.8009569", "0.77419317", "0.7721563", "0.7547381", "0.75327945", "0.7487636", "0.74791294", "0.74791294", "0.7451305", "0.7413071", "0.73345447", "0.7316666", "0.7280822", "0.7213556", "0.71621114", "0.71582276", "0.7101145", "0.7088221", "0.70797...
0.6861172
42
Returns the column matching the given name
def _get_column(self, name): return self.column(name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_column(cls, name):\r\n return cls._columns[name]", "def col(self, name):\n # Identify the column corresponding to the\n # supplied name and return a copy of the data\n for i in range(0, self.ncolumns()):\n if self.table_column(i).title() == name:\n r...
[ "0.8785118", "0.8327137", "0.8140929", "0.80441755", "0.80186266", "0.78739524", "0.77940667", "0.7725953", "0.7447847", "0.7387166", "0.72642064", "0.71723866", "0.7128886", "0.69995147", "0.6993494", "0.69687283", "0.69590706", "0.6930867", "0.68332505", "0.6772882", "0.669...
0.8668432
1
Adds WHERE arguments to the queryset, returning a new queryset
def filter(self, *args, **kwargs): #add arguments to the where clause filters clone = copy.deepcopy(self) for operator in args: if not isinstance(operator, WhereClause): raise QueryException('{} is not a valid query operator'.format(operator)) clone....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filter(self, *args, **kwargs):\n # *args are `Q` objects\n for q in args:\n self.query.add_q(q)\n if kwargs:\n self.query.add_q(ql.Q(**kwargs))\n return self", "def _query(self, model_class, **kwargs):\r\n query = model_class.objects\r\n if self...
[ "0.7684622", "0.7024997", "0.6918114", "0.66038775", "0.6593252", "0.65431154", "0.6527908", "0.64939487", "0.64560634", "0.64373094", "0.63421416", "0.62900984", "0.62775046", "0.6274605", "0.62683535", "0.6246241", "0.6198931", "0.614362", "0.6127067", "0.61217946", "0.6109...
0.6175584
17
adds an assignment clause to this statement
def add_assignment_clause(self, clause): if not isinstance(clause, AssignmentClause): raise StatementException("only instances of AssignmentClause can be added to statements") clause.set_context_id(self.context_counter) self.context_counter += clause.get_context_size() s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _AugAssign(self, t):\n if not isinstance(t.target, ast.Name):\n self.RaiseError(t, \"Augmented assignment to complex expressions not supported\")\n # check if target exists in locals\n if t.target.id not in self._locals :\n self.RaiseError(t, \"Augmented assignment no...
[ "0.70160717", "0.68667066", "0.686158", "0.67617506", "0.6701849", "0.6635754", "0.64798445", "0.64755535", "0.6344363", "0.63012415", "0.6276582", "0.6221685", "0.619108", "0.60657656", "0.6061136", "0.60564345", "0.59993297", "0.5982664", "0.59596145", "0.5945916", "0.59387...
0.6692114
5
Tests that big collections are detected and raise an exception.
def test_element_count_validation(self): TestSetModel.create(text_set={str(uuid4()) for i in range(65535)}) with self.assertRaises(ValidationError): TestSetModel.create(text_set={str(uuid4()) for i in range(65536)})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_sized(self):\n # verify ----------------------\n try:\n len(self.collection)\n except TypeError:\n msg = \"object of type 'Collection' has no len()\"\n self.fail(msg)", "def _assertCollectionSize(self, expected_size, collection):\n actual_size...
[ "0.7300641", "0.69615376", "0.6222403", "0.6147432", "0.6035037", "0.60026973", "0.596971", "0.5902574", "0.5899291", "0.5880304", "0.58673614", "0.5865392", "0.5853629", "0.58482605", "0.58181524", "0.5814445", "0.58136076", "0.57981724", "0.579068", "0.5785935", "0.57420844...
0.5586945
34
Tests that big collections are detected and raise an exception.
def test_element_count_validation(self): TestListModel.create(text_list=[str(uuid4()) for i in range(65535)]) with self.assertRaises(ValidationError): TestListModel.create(text_list=[str(uuid4()) for i in range(65536)])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_sized(self):\n # verify ----------------------\n try:\n len(self.collection)\n except TypeError:\n msg = \"object of type 'Collection' has no len()\"\n self.fail(msg)", "def _assertCollectionSize(self, expected_size, collection):\n actual_size...
[ "0.7300641", "0.69615376", "0.6222403", "0.6147432", "0.6035037", "0.60026973", "0.596971", "0.5902574", "0.5899291", "0.5880304", "0.58673614", "0.5865392", "0.5853629", "0.58482605", "0.58181524", "0.5814445", "0.58136076", "0.57981724", "0.579068", "0.5785935", "0.57420844...
0.0
-1
Tests that big collections are detected and raise an exception.
def test_element_count_validation(self): TestMapModel.create(text_map={str(uuid4()): i for i in range(65535)}) with self.assertRaises(ValidationError): TestMapModel.create(text_map={str(uuid4()): i for i in range(65536)})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_sized(self):\n # verify ----------------------\n try:\n len(self.collection)\n except TypeError:\n msg = \"object of type 'Collection' has no len()\"\n self.fail(msg)", "def _assertCollectionSize(self, expected_size, collection):\n actual_size...
[ "0.7300265", "0.6961293", "0.62224644", "0.61483103", "0.6034997", "0.6003072", "0.59676856", "0.5903304", "0.5901086", "0.5878358", "0.58681554", "0.5866912", "0.58541065", "0.585057", "0.58183247", "0.58148205", "0.58147913", "0.5800317", "0.579008", "0.57875186", "0.574270...
0.0
-1
Tests that get calls that don't return a result raises a DoesNotExist error
def test_get_doesnotexist_exception(self): with self.assertRaises(self.table.DoesNotExist): self.table.objects.get(test_id=100)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_doesnotexist_exception(self):\r\n with self.assertRaises(TestModel.DoesNotExist):\r\n TestModel.objects.get(test_id=100)", "def test_get_non_existing(self):\n\n response = self.client.get('/auth/non-existing-resource')\n\n self.assert404(response)\n self.assert...
[ "0.7817047", "0.7508474", "0.75026125", "0.72781926", "0.7244218", "0.72387505", "0.70803034", "0.70595175", "0.7058279", "0.7047297", "0.7040424", "0.703045", "0.6959287", "0.6957789", "0.6944207", "0.6933935", "0.69269294", "0.69262475", "0.6920375", "0.69072175", "0.689878...
0.7459388
3
Tests that get calls that return multiple results raise a MultipleObjectsReturned error
def test_get_multipleobjects_exception(self): with self.assertRaises(self.table.MultipleObjectsReturned): self.table.objects.get(test_id=1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_multipleobjects_exception(self):\r\n with self.assertRaises(TestModel.MultipleObjectsReturned):\r\n TestModel.objects.get(test_id=1)", "def test_get_multiple_match_raises_multipleobjectsreturned(self):\n assert self.Person.objects().count() == 0\n\n person1 = self.Per...
[ "0.83667654", "0.75813705", "0.75530773", "0.7085528", "0.6771927", "0.6732845", "0.6636747", "0.6578345", "0.6553375", "0.6420692", "0.6398565", "0.63796914", "0.6332963", "0.6300165", "0.62547886", "0.62514955", "0.61639583", "0.61630106", "0.61601496", "0.6125868", "0.6089...
0.8191664
1
Tests that providing query args that are not query operator instances raises an error
def test_using_non_query_operators_in_query_args_raises_error(self): with self.assertRaises(query.QueryException): TestModel.objects(5)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_operator_check(self):\r\n with self.assertRaises(StatementException):\r\n WhereClause('a', 'b', 'c')", "def test_using_invalid_column_names_in_filter_kwargs_raises_error(self):\r\n with self.assertRaises(query.QueryException):\r\n TestModel.objects(nonsense=5)", "de...
[ "0.67611057", "0.6727879", "0.66550964", "0.66107684", "0.65923256", "0.6447455", "0.6367334", "0.63288754", "0.6324935", "0.6310166", "0.63025284", "0.6290567", "0.6286229", "0.62138647", "0.6212129", "0.6110521", "0.61018616", "0.60940605", "0.60883266", "0.6085934", "0.608...
0.81682426
0
Tests that get calls that don't return a result raises a DoesNotExist error
def test_get_doesnotexist_exception(self): with self.assertRaises(TestModel.DoesNotExist): TestModel.objects.get(test_id=100)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_non_existing(self):\n\n response = self.client.get('/auth/non-existing-resource')\n\n self.assert404(response)\n self.assertEqual('not found', response.json['error'])", "def test_get_not_exist(self):\n attempt_id = 9999\n _, err = self.resource.get(attempt_id)\n ...
[ "0.7508474", "0.75026125", "0.7459388", "0.72781926", "0.7244218", "0.72387505", "0.70803034", "0.70595175", "0.7058279", "0.7047297", "0.7040424", "0.703045", "0.6959287", "0.6957789", "0.6944207", "0.6933935", "0.69269294", "0.69262475", "0.6920375", "0.69072175", "0.689878...
0.7817047
0
Tests that get calls that return multiple results raise a MultipleObjectsReturned error
def test_get_multipleobjects_exception(self): with self.assertRaises(TestModel.MultipleObjectsReturned): TestModel.objects.get(test_id=1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_multipleobjects_exception(self):\r\n with self.assertRaises(self.table.MultipleObjectsReturned):\r\n self.table.objects.get(test_id=1)", "def test_get_multiple_match_raises_multipleobjectsreturned(self):\n assert self.Person.objects().count() == 0\n\n person1 = self.P...
[ "0.8191437", "0.75818586", "0.75534725", "0.7085557", "0.6771821", "0.6733346", "0.66376376", "0.6579255", "0.6553857", "0.6420854", "0.6399035", "0.6379899", "0.6333417", "0.6299312", "0.6254859", "0.62514275", "0.6165017", "0.61630994", "0.61612326", "0.61276513", "0.608921...
0.8366821
0
Tests that attempting to delete a model without defining a partition key fails
def test_delete_without_partition_key(self): with self.assertRaises(query.QueryException): TestModel.objects(attempt_id=0).delete()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_hyperflex_server_model(self):\n pass", "def test_raise_when_no_id(self):\n model = self.Test({}, False)\n self.assertRaises(errors.PersistenceError, model.delete)", "def test_raise_on_delete_when_frozen(self):\n self.test_model.freeze()\n self.assertRaises(err...
[ "0.7101447", "0.6993923", "0.6971779", "0.6917623", "0.687548", "0.68264705", "0.68049544", "0.67651594", "0.67031085", "0.6698377", "0.66606545", "0.66465336", "0.66436243", "0.66367686", "0.66167164", "0.66072345", "0.6602913", "0.6586974", "0.6575001", "0.6574833", "0.6513...
0.827905
0
! stderr stream from underlying process.
def stderr(self): return self.__stderr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stderr(self):\n if self._stderr is None:\n stderr = [p.stderr.read() for p in self.processes if p.stderr]\n output = b'\\n'.join(stderr).strip()\n if not isinstance(output, str):\n output = output.decode(self.encoding, 'ignore')\n self._stderr =...
[ "0.7474572", "0.7372968", "0.7319949", "0.7305797", "0.72216713", "0.7101965", "0.7048743", "0.68976283", "0.6800332", "0.6709422", "0.66310734", "0.6612904", "0.65943754", "0.65033805", "0.64688593", "0.64442796", "0.6434591", "0.6406449", "0.63765466", "0.6370616", "0.62990...
0.71829313
5
Test Modify Phonebook Test changing contacts and reconnecting PBAP.
def test_modify_phonebook(self): bt_contacts_utils.generate_contact_list(self.contacts_destination_path, PSE_CONTACTS_FILE, 100) phone_numbers_added = bt_contacts_utils.import_device_contacts_from_vcf( self.pse, self.contacts_destination_path, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_multiple_phones(self):\n\n PSE1_CONTACTS_FILE = \"{}{}\".format(PSE_CONTACTS_FILE, \"1\")\n PSE2_CONTACTS_FILE = \"{}{}\".format(PSE_CONTACTS_FILE, \"2\")\n\n bt_contacts_utils.generate_contact_list(self.contacts_destination_path,\n PSE1_...
[ "0.646718", "0.6444301", "0.6443872", "0.6266042", "0.61570555", "0.6098025", "0.60452086", "0.6016764", "0.59980035", "0.5931897", "0.5931897", "0.5923593", "0.5868643", "0.5851936", "0.58476675", "0.5846757", "0.5841958", "0.5829707", "0.5821451", "0.5811704", "0.58019596",...
0.79061306
0
Create fixture for SparkSession.
def spark_session_test() -> SparkSession: return SparkSession.builder.appName("pytest").getOrCreate()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def spark():\n return SparkSession.builder.master(\"local\").appName(\"tests\").getOrCreate()", "def create_sparksession():\n return SparkSession.builder.\\\n appName(\"Transforming the historical parking occupancy and blockface datasets\").\\\n getOrCreate()", "def spark():\n\n ...
[ "0.7069859", "0.69803655", "0.69124013", "0.6482651", "0.64244974", "0.6394725", "0.6236659", "0.6154706", "0.6135422", "0.6110805", "0.6100049", "0.60944444", "0.6083281", "0.6081415", "0.6081415", "0.6081415", "0.6081415", "0.60811204", "0.60811204", "0.60811204", "0.608112...
0.7461626
0
Get a random element from the collection.
def getRandom(self) -> int: return random.choice(self.elements)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random_element(self) -> 'PFElement':\n return random.choice(list(iter(self)))", "def _rand_elem(self, iterable):\n\n lst = list(iterable)\n idx = self._rand_int(0, len(lst))\n return lst[idx]", "def getRandom(self):\n random_index = randint(0, len(self.list_val)-1)\n ...
[ "0.7651958", "0.7149041", "0.70814615", "0.7044879", "0.70404017", "0.7034526", "0.6959262", "0.68719393", "0.68376184", "0.6797525", "0.670551", "0.6697882", "0.6692588", "0.6692588", "0.6692588", "0.6692588", "0.66815263", "0.66744214", "0.6673934", "0.66513956", "0.6639083...
0.69563407
7
Sort release notes by category.
def get_categorized_relnotes(filtered_notes): categorized_relnotes = {} for relnote in filtered_notes: issue_id = re.search(r"\(\#[0-9]+\)$", relnote.strip().split()[-1]) category = None if issue_id: category = get_label(re.sub(r"\(|\#|\)", "", issue_id.group(0).strip())) if category is None:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sort(self):\n self.notes.sort()", "def sort_movies(self, keyword):\n self.movies.sort(key=attrgetter(keyword, \"title\"))", "def sortAdquires(catalog, sort):\n return model.sort(catalog, sort, 'artworks', model.cmpArtworkByDateAcquired)", "def sortArtworks(catalog):\n return model.sor...
[ "0.62602025", "0.5383559", "0.52002805", "0.5185903", "0.50706095", "0.5057053", "0.5005541", "0.49984968", "0.4996055", "0.49914122", "0.4964277", "0.49613604", "0.49341446", "0.49103972", "0.49015033", "0.4896613", "0.48798168", "0.48419118", "0.48345134", "0.4833555", "0.4...
0.4506489
49
Update priorities of sampled transitions Sets priority of transition at index idxes[i] in buffer to priorities[i]
def update_priorities(self, idxes, priorities): assert len(idxes) == len(priorities) for ndx, priority in zip(idxes, priorities): assert priority > 0 assert 0 <= ndx < len(self.memory) self.iter_sum[ndx] = priority ** self.alpha self.iter_min[ndx] = priori...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def priority_update(self, indices, priorities):\n for i, p in zip(indices, priorities):\n self.tree.val_update(i, p**self.alpha)", "def priority_update(self, indices, priorities):\n for i, p in zip(indices, priorities):\n self.tree.val_update(i, p ** self.alpha)", "def prior...
[ "0.7021918", "0.70111406", "0.70111406", "0.69518745", "0.6900836", "0.6838339", "0.6818248", "0.67039144", "0.65646493", "0.6410004", "0.633665", "0.62111807", "0.5977805", "0.5809495", "0.57236284", "0.5586567", "0.5512969", "0.5283271", "0.52124536", "0.52034044", "0.51941...
0.7071745
0
Set the learning rate of the wrapped models. We try to set the learning rate on a member variable model and a member variable small. If we do not find a member variable model we raise a NotImplementedError
def set_lr(self, lr): try: K.set_value( self.model.optimizer.lr, lr ) except AttributeError: raise NotImplementedError() try: K.set_value( self.small.optimizer.lr, lr ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def updatelearningrate(self, epoch):\n self.lr = getlearningrate(epoch=epoch, opt=self.opt)\n # update learning rate of model optimizer\n if isinstance(self.model, list):\n count = 0\n for param_group in self.optimzer.param_groups:\n # if type(model) is <li...
[ "0.69450057", "0.6861425", "0.67382616", "0.65478915", "0.64802456", "0.64802456", "0.6465115", "0.640421", "0.6394084", "0.6370992", "0.63678735", "0.63677263", "0.63480854", "0.63145995", "0.63132006", "0.6312069", "0.63116443", "0.6304324", "0.63043106", "0.6301967", "0.62...
0.0
-1
Returns a tuple (code, name). >>> fake.region() ('UK1', 'London 1')
def region(self): return self.random_element(self._regions)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def region_name(self):\n return self.random_element(self._regions)[1]", "def region_code(self):\n return self.random_element(self._regions)[0]", "def get_region(state: str) -> str:\n state: str = state.title()\n region: str = \"\"\n states: dict = {\n \"NORTE\": [\...
[ "0.6911644", "0.68579656", "0.67662454", "0.67599875", "0.67299587", "0.66718", "0.66438085", "0.66362476", "0.66362476", "0.66362476", "0.66362476", "0.66362476", "0.66362476", "0.6579959", "0.65675294", "0.65675294", "0.65675294", "0.65675294", "0.65675294", "0.65675294", "...
0.58597916
73
Create and save a User with the given email and password.
def create_user(self, email, password, **extra_fields): if not email: raise ValueError(_('The Email must be set')) email = self.normalize_email(email) user = self.model(email=email, **extra_fields) user.set_password(password) extra_fields.setdefault('is_active', True)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_user(self, email, password, **extra_fields):\n if not email:\n raise ValueError('The given email must be set')\n email = self.normalize_email(email)\n user = self.model(email=email, **extra_fields)\n user.set_password(password)\n user.save(using=self._db)\n return user", "def...
[ "0.85437864", "0.8511318", "0.85077024", "0.8502027", "0.85019606", "0.84889764", "0.84889764", "0.84882575", "0.84882575", "0.84882575", "0.84854496", "0.84765774", "0.84759104", "0.8474798", "0.8474798", "0.8474798", "0.8474798", "0.8474798", "0.8474798", "0.8474798", "0.84...
0.817005
68
parse a date in DD/MM/YYYY format
def dateHandler(aDateString): day, month, year = ddmmyyyy_pattern.search(aDateString).groups() return (int(year), int(month), int(day), 0, 0, 0, 0, 0, 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_date(date_str):\n date_str = re.sub(r\"[ .-]\", '/', date_str.strip())\n date_time = datetime.strptime(date_str, \"%d/%m/%Y\")\n return date_time.date()", "def parse_date(date):\n\n return dateutil.parser.parse(date)", "def parse_date(date) -> datetime:\n\n if type(date) == datetim...
[ "0.7611388", "0.7348315", "0.732171", "0.72428256", "0.7204218", "0.70197684", "0.69892186", "0.6882629", "0.6816928", "0.6744217", "0.6739206", "0.6705018", "0.66750306", "0.66628635", "0.6655837", "0.6640502", "0.66391027", "0.65792245", "0.65638214", "0.65400827", "0.65342...
0.5932941
73
estimate of threshold for being in the top N self.tau = posterior median of treshold to be in top N should be updated every 10say samples
def estimate_tau(self,nsamples=10,N=100): samples_X_pos=self.samples(nsamples) taus=np.zeros(nsamples) for i in range(nsamples): taus[i]=np.sort(samples_X_pos[:,i])[-N] self.tau=np.median(taus)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_tau_gap(vals,tau): \n ans = 0.0\n m = 0.0\n N = len(vals)\n for i in range(N):\n ai = 2.0*vals[i]-1\n if ai > 0:\n m += 1\n tmp = 0.0\n if tau >= 0: # votes close to 50% are weighed more (\"traditional\")\n if ai >= 0: \n tmp = ...
[ "0.6265538", "0.5930905", "0.58151585", "0.57302976", "0.57302976", "0.5727878", "0.5596226", "0.55900234", "0.5565852", "0.55491686", "0.5479325", "0.54750466", "0.54606366", "0.5430388", "0.54249203", "0.5419281", "0.5409822", "0.53861815", "0.5385662", "0.5364278", "0.5356...
0.693883
0
return the keras model
def get_model(self): return self.model
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def model(self):\n i = self.keras.Input(self.s)\n\n return keras.Model(inputs=[i], outputs=self.call(i))", "def get_model(self) -> tf.keras.Model:\n if self.model is None:\n self._raise_none_model()\n return self.model", "def get_model():\n model = tf.keras.models.Sequ...
[ "0.81193316", "0.78805256", "0.771002", "0.7674831", "0.76123756", "0.75891864", "0.75825006", "0.75458455", "0.7489374", "0.74303603", "0.7403798", "0.74027103", "0.73826295", "0.7335903", "0.73166263", "0.7298006", "0.7258533", "0.7258533", "0.71969223", "0.7187632", "0.715...
0.654532
96
Loads the saved weights in the model
def load_weights(self, file): self.model.load_weights(file) return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_model_weights(self):\n raise NotImplementedError", "def load_model_weights(self, filename):\n self.model.load_weights(filename)", "def load_model(self):\n saved_path = self.config.path_tmp / self.model.model_name\n if saved_path.exists():\n self.model.load_weight...
[ "0.87745357", "0.80872726", "0.8074394", "0.79140115", "0.79134226", "0.79023224", "0.7878395", "0.78297657", "0.7730205", "0.77257156", "0.7698637", "0.7696288", "0.7679661", "0.7652248", "0.7649624", "0.7640869", "0.76098406", "0.7573142", "0.7529449", "0.7475999", "0.74663...
0.72695243
35
Splits the sentences in a dataframe's column into a list of the separate words.
def word_splitter(df): df['Split Tweets'] = [i.lower().split() for i in df['Tweets']] return df
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def word_splitter(df):\n result = []\n l1 = df['Tweets']\n for tweet in l1:\n result.append(tweet.lower().split(' '))\n df['Split Tweets'] = result\n return df", "def word_splitter(df):\n #split the tweets column and lowercase the words\n df['Split Tweets'] = df['Tweets'].str.lower().str....
[ "0.7669734", "0.7277383", "0.7173178", "0.7106168", "0.7048508", "0.6907862", "0.6873786", "0.68376553", "0.68316835", "0.6717478", "0.66340524", "0.66340524", "0.6603729", "0.65878886", "0.6584361", "0.6554645", "0.65175956", "0.6493134", "0.6451709", "0.640864", "0.63579243...
0.7588457
1
Positive case for creating qrcode.
def test_create_qrcode(self): res = WxPusher.create_qrcode( self.test_create_qrcode.__doc__, ) self.assertIsInstance(res, dict) self.assertIn('code', res) self.assertEqual(1000, res['code'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_generate_barcode_qr_code(self):\n pass", "def create_qr(data):\n qr = qrcode.QRCode(\n version=2,\n error_correction=qrcode.constants.ERROR_CORRECT_M,\n border=1.5,\n box_size=25,\n )\n qr.add_data(data)\n image = qr.make_image(fill_color=\"black\", back_co...
[ "0.7917199", "0.6799247", "0.6674917", "0.6595111", "0.6530255", "0.6495176", "0.639668", "0.6359464", "0.63580525", "0.6254763", "0.6238374", "0.6207048", "0.6163179", "0.6163018", "0.61518043", "0.608764", "0.6075267", "0.5975406", "0.59677047", "0.59428364", "0.5899924", ...
0.7205274
1
Return the OVS port name for the given port ID. The port name is the one that plumbs into the integration bridge.
def get_br_int_port_name(prefix, port_id): return ("%si-%s" % (prefix, port_id))[:constants.DEVICE_NAME_MAX_LEN]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self) -> str:\n return f\"{self._inst} port {self._data[self._sid_data['sid_name']]}\"", "def PortName(self):\n if self.force_auto_sync:\n self.get('PortName')\n return self._PortName", "def getName(self):\n return _libsbml.Port_getName(self)", "def get_br_trun...
[ "0.69072276", "0.69042873", "0.6462332", "0.6366873", "0.6226501", "0.6187253", "0.60043144", "0.5988336", "0.5944686", "0.5928641", "0.5924472", "0.5877555", "0.5781504", "0.5774838", "0.5768092", "0.576424", "0.57635444", "0.5740112", "0.55615646", "0.55220866", "0.5503697"...
0.67282796
2
Return the OVS port name for the given port ID. The port name is the one that plumbs into the trunk bridge.
def get_br_trunk_port_name(prefix, port_id): return ("%st-%s" % (prefix, port_id))[:constants.DEVICE_NAME_MAX_LEN]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self) -> str:\n return f\"{self._inst} port {self._data[self._sid_data['sid_name']]}\"", "def PortName(self):\n if self.force_auto_sync:\n self.get('PortName')\n return self._PortName", "def get_br_int_port_name(prefix, port_id):\n return (\"%si-%s\" % (prefix, port_...
[ "0.69139934", "0.6833304", "0.67400473", "0.63344043", "0.6096366", "0.6042632", "0.59455025", "0.5942904", "0.5892684", "0.58887005", "0.58411086", "0.5839385", "0.5737951", "0.5720051", "0.5707574", "0.5701889", "0.56891245", "0.5687021", "0.5662054", "0.5651413", "0.545738...
0.6816762
2
Show of margaritas poured when user goes to the app homepage.
def get(self): global tw_margarita self.response.out.write('I love margaritas! ') self.response.out.write('%d margaritas served so far. ' % tw_margarita.getCount())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_launch():\n return get_welcome_message()", "def show_landing(self):\n print(\"Hooray, the Eagle has landed!\")", "def show_homepage():\n\n return render_template(\"blank-slate.html\")", "def home():\n return render_template(\n \"home.html\",\n title = \"Capteurs\",\n ...
[ "0.64544505", "0.62334806", "0.6227994", "0.6188418", "0.6186295", "0.6128069", "0.6122138", "0.6083575", "0.60654366", "0.60395753", "0.6018936", "0.60174215", "0.599884", "0.5992332", "0.5972681", "0.5963817", "0.59595126", "0.5954587", "0.5948972", "0.594741", "0.59235924"...
0.0
-1
Estimate the length of this curve by iterating through it and averaging the length of the flat bits.
def _estimateCubicCurveLength(pt0, pt1, pt2, pt3, precision=10): points = [] length = 0 step = 1.0 / precision factors = range(0, precision + 1) for i in factors: points.append(_getCubicPoint(i * step, pt0, pt1, pt2, pt3)) for i in range(len(points) - 1): pta = points[i] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __CalculateLength(self, curve):\r\n return cv2.arcLength(curve, True)", "def _get_length(self):\n from math import sqrt\n\n if self._length is None:\n sum1 = 0\n for a in self.diff:\n sum1 += a * a\n self._length = sqrt(sum1)\n retur...
[ "0.65588725", "0.6205204", "0.61679035", "0.6099986", "0.60723263", "0.6012226", "0.5999269", "0.59664977", "0.5924486", "0.5891755", "0.5885671", "0.5879491", "0.58585393", "0.58457214", "0.58218455", "0.5813476", "0.5811856", "0.57442623", "0.57408255", "0.5740521", "0.5731...
0.0
-1
Return True if no two adjacent vertices in G have like colors, False otherwise.
def CheckProperColoring(G): coloring_proper = True for vertex in G._color: #print('Vertex',vertex) #print('G._color',G._color[vertex]) #print('G._adj[vertex]', G._adj[vertex]) for adj_vertex in G._adj[vertex]: if G._color[vertex] == G._color[adj_vertex]: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_legal(vtx, color):\n for neighbor in vtx[\"adjacent\"]:\n if VERTICES[neighbor][\"color\"] is color:\n return False\n return True", "def is_bipartite(G):\n try:\n bipartite_color(G)\n return True\n except:\n return False", "def is_connected(self):\n ...
[ "0.70387244", "0.6984505", "0.6703973", "0.66583544", "0.66349864", "0.6618688", "0.65810007", "0.6573248", "0.65597653", "0.64927286", "0.64853567", "0.6438747", "0.64151275", "0.64123815", "0.6397582", "0.6332955", "0.6311781", "0.6303385", "0.6292916", "0.6286291", "0.6264...
0.79199946
0
Bool determining if axes are polar
def polar(self): return self._polar[self._plotid] # KeyError is desired, as all plots must have this property
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ispolar(self, pole=None):\n\n if not isinstance(self.crs, GeographicalCRS):\n raise CRSError(\"ispolar defined only for geographical CRS\")\n\n if pole is None:\n pole = Point((0, 90), crs=SphericalEarth)\n\n lon0 = geodesy.reduce_deg(self[-1].vertex[0])\n sum_...
[ "0.64816445", "0.6477351", "0.6061748", "0.6034967", "0.60315657", "0.5799067", "0.5798748", "0.57693183", "0.5763671", "0.56564", "0.56420803", "0.56287587", "0.56264746", "0.560022", "0.5597759", "0.5588149", "0.5547315", "0.5532259", "0.55002224", "0.54850507", "0.5466729"...
0.6105981
2
Random weights drawn from a Gaussian
def norm_weight(nin,nout=None, scale=0.01, ortho=True): if nout == None: nout = nin if nout == nin and ortho: W = ortho_weight(nin) else: W = scale * rng_np.randn(nin, nout) return W.astype('float32')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_gaussian_random(self):\n u1 = generateRandom()\n u2 = generateRandom()\n if u1 < 1e-6:\n u1 = 1e-6\n return sqrt(-2 * log(u1)) * cos(2 * pi * u2)", "def randomizeWeights(self, rand_distr):\n raise NotImplementedError", "def _random_weight_initialization(se...
[ "0.69253546", "0.6907757", "0.6906672", "0.6900726", "0.6889791", "0.6867258", "0.6847343", "0.6796425", "0.67804855", "0.6768728", "0.67305326", "0.6666161", "0.6633314", "0.66207737", "0.65838647", "0.65782684", "0.655484", "0.65189344", "0.65089655", "0.6487783", "0.647785...
0.0
-1
Commit current transaction to the database and closes the session.
def commit(self): self._session.commit() self._session.close() return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def commit(self):\n try:\n self.session.commit()\n except:\n self.session.rollback()\n raise\n finally:\n self.session.remove()", "def commit_transaction(self):\n cursor = self._cursor()\n cursor.close()\n self._db.commit()\n ...
[ "0.8390884", "0.83139867", "0.82459295", "0.8241319", "0.8063171", "0.80528224", "0.8003893", "0.7955035", "0.7926504", "0.79139423", "0.79110473", "0.77656", "0.7730027", "0.7697118", "0.7653001", "0.76513547", "0.7611183", "0.7574999", "0.75732267", "0.7566592", "0.75178057...
0.792663
8
Get a normalized workflow definition. Includes step definitions.
def get_workflow_def_by_id(self, workflow_id): try: result = self._session.query( WorkflowEntity.id, WorkflowEntity.name, WorkflowEntity.description, WorkflowEntity.username, WorkflowEntity.git, WorkflowE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_workflow_definition(self):\n pass", "def get_workflow_description(self):\n workflow_record = self._read_transaction(tx.get_workflow_description)\n requirements, hints = self.get_workflow_requirements_and_hints()\n inputs, outputs = self.get_workflow_inputs_and_outputs()\n...
[ "0.6574724", "0.6020268", "0.59788454", "0.594022", "0.584116", "0.5769096", "0.56301755", "0.5536663", "0.5507104", "0.5333442", "0.53079915", "0.52602005", "0.5237962", "0.5217325", "0.51626635", "0.51210874", "0.5113218", "0.50822586", "0.5061828", "0.50469553", "0.5033223...
0.60455227
1
Get all workflows from database.
def get_workflows(self): try: result = self._session.query(WorkflowEntity).all() result_dict = self.result_dict(result) except SQLAlchemyError as err: Log.an().error('sql exception [%s]', str(err)) return False return result_dict
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_workflows(self):\n return self._data_dict[self.KEY_BI_WORKFLOWS]", "def get_all_workflows(self, with_json=False):\n result = {}\n for key in self.workflows.keys():\n if key.playbook not in result:\n result[key.playbook] = []\n\n if with_json:\n ...
[ "0.69960076", "0.6623817", "0.6358585", "0.629228", "0.6103799", "0.61", "0.60530347", "0.60371464", "0.6025272", "0.6021985", "0.6001965", "0.59680104", "0.5925983", "0.5916089", "0.5916089", "0.59109306", "0.5907336", "0.58608246", "0.5851723", "0.58503926", "0.5823642", ...
0.7333403
0
Get workflow record matching name.
def get_workflow_by_name(self, name): try: result = self._session.query(WorkflowEntity).\ filter(WorkflowEntity.name == name).\ all() result_dict = self.result_dict(result) except SQLAlchemyError as err: Log.an().error('sql exception [%...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_workflow(self, playbook_name, workflow_name):\n key = _WorkflowKey(playbook_name, workflow_name)\n if key in self.workflows:\n return self.workflows[key]\n return None", "def get_record_by_name(name):\n with RECORD_LOCK:\n # return list of matches or []\n ...
[ "0.66692716", "0.6533419", "0.6185945", "0.61060184", "0.6001739", "0.5912225", "0.58674544", "0.5840107", "0.580679", "0.57601225", "0.5743296", "0.5729701", "0.5715426", "0.57080424", "0.56744814", "0.5670675", "0.5670675", "0.5670675", "0.56508905", "0.56379086", "0.563275...
0.70117813
0
Merge two dictionaries (for Python versions 3.4 or lower).
def merge_dicts(dict_a, dict_b): dict_c = dict_a.copy() dict_c.update(dict_b) return dict_c
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dict_merge(dict1, dict2):\n combined = dict(dict1)\n combined.update(dict2)\n return combined", "def dict_merge(dict1, dict2):\n combined = dict(dict1)\n combined.update(dict2)\n return combined", "def merge(a: dict, b: dict) -> dict:\n return __merge(a, b)", "def mergedict(x, y):\n ...
[ "0.87440944", "0.87440944", "0.8604518", "0.8542383", "0.8430911", "0.83664495", "0.83628416", "0.8324757", "0.8293234", "0.82810736", "0.82810736", "0.82810736", "0.82810736", "0.82810736", "0.82810736", "0.82810736", "0.82810736", "0.82495934", "0.8242429", "0.8242429", "0....
0.82829416
9
Update single app in the database from definition file.
def update_app_from_def(self, def_path, app_id=None): # load app from yaml gf_def = Definition() if not gf_def.load(def_path): Log.an().error('invalid geneflow definition') return False if not gf_def.apps(): Log.an().error('no apps in geneflow definit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update():\n appname = request.form['applicationname']\n appdetails = request.form['appinfo']\n obj = json.loads(appdetails)\n if appname and obj:\n db.hset('applications', appname, appdetails)\n return json.dumps({'message':'success'})", "def update_app(AppId=None, Name=None, Descriptio...
[ "0.7048188", "0.7038956", "0.6754146", "0.6541597", "0.64679176", "0.6395738", "0.6325607", "0.6325091", "0.6287174", "0.6177061", "0.6150028", "0.61283207", "0.58783746", "0.58614904", "0.5845857", "0.582619", "0.57730013", "0.57504874", "0.572238", "0.57101375", "0.5704924"...
0.6675841
3
Boolean indicating if the stage is half_bit. If n_bits is N and half_bit is True, then the stage is N5 bits, otherwise is N bits.
def half_bit(self): return self._half_bit
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isPowerOfFour(self, n: int) -> bool:\n return (n > 0) and log2(n) % 2 == 0", "def format_bits(n_bits, half_bit=None):\n n_bits, half_bit = parse_bits(n_bits, half_bit)\n return \"{}.5\".format(n_bits) if half_bit else n_bits", "def halfload_state(self):\n if self.is_info_v2:\n ...
[ "0.57912517", "0.560956", "0.5515977", "0.5496919", "0.54908276", "0.5467086", "0.54547805", "0.5451216", "0.5414721", "0.5370397", "0.53437686", "0.5318265", "0.53032583", "0.5277937", "0.5226696", "0.5206873", "0.519937", "0.5139952", "0.50669175", "0.50379527", "0.49905849...
0.6479142
0
Least significant bit (LSB) value, given the number of references per capacitor, stage bits and FSR of this adc.
def lsb(self): return compute_lsb(self.n_bits, *self.fsr, half_bit=self.half_bit)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def msb(self):\n return self.lsb + self.width - 1", "def _get_lrs_bits(self):\n return self.__lrs_bits", "def get_tempmsb(self):\n byte_list = self.i2c.readfrom_mem(\n self.device_address,\n self.REGISTER_TEMPMSB,\n 1,\n addrsize=8\n )\n ...
[ "0.56907386", "0.53607804", "0.53203577", "0.5211054", "0.5211054", "0.51254183", "0.510235", "0.50609004", "0.5050689", "0.5036792", "0.5019199", "0.4982198", "0.49801344", "0.49681422", "0.4911531", "0.4898022", "0.48955002", "0.48892698", "0.48775658", "0.48593745", "0.484...
0.4504236
66
Instances a variation of the stage, with mostly gaussian perturbations.
def generate_gaussian(self, s_eff=0, s_cap=0, s_refs=0, s_thres=0, s_cm=0): eff, caps, refs, thres, cm = self._ideal_values() def fill_shape(arr, target): shape = np.shape(arr) assert all(s == 1 or s == t for s, t in zip(shape, target)), ( "Shape {} cannot be ext...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, img_input, beta=2.):\n super(TotalVariation, self).__init__()\n self.name = \"TV({}) Loss\".format(beta)\n self.img = img_input\n self.beta = beta", "def GaussianPosteriorSample(bs, ls) :\n def gps(args) :\n mu, log_var = args\n eps = K.random_norma...
[ "0.59553856", "0.5839891", "0.5816997", "0.57438236", "0.5611601", "0.56082207", "0.5561648", "0.5493947", "0.542442", "0.5383027", "0.5336993", "0.53330004", "0.5312429", "0.5303202", "0.5294666", "0.5293719", "0.52886087", "0.52577204", "0.52576655", "0.5247153", "0.524447"...
0.56016606
6
The capacitors value, in farads.
def caps(self): return self._caps
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_capacitor(self):\n cap = 0.5 * self.metric_.logdet()\n return cap", "def capacitance(self):\n return None", "def capacitor(self):\n capacity = self._getAttribute(Attribute.capacitorCapacity)\n recharge = self._getAttribute(Attribute.capacitorRecharge)\n\n recharge /= 1000 ...
[ "0.68959904", "0.6707049", "0.6655092", "0.65290135", "0.62120014", "0.61525416", "0.60047424", "0.5990799", "0.5983682", "0.59502274", "0.5798132", "0.5794862", "0.5780826", "0.57698506", "0.57615864", "0.5757776", "0.575139", "0.574284", "0.567625", "0.5673123", "0.5663351"...
0.55341256
38
Define a Gaussian function specified by a minimal number of parameters
def param_gauss(xdata_, *params_): scale_, mean_, cov_ = params_to_scale_mean_cov(params_) return scale_ * gaussian(xdata_, mean=mean_, cov=cov_)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gaussian(x, *parameters):\n position, sigma, amplitude, background = parameters\n return amplitude * np.exp(-(x - position)**2 / (2.0 * sigma**2)) + background", "def gaussian(pars, x):\n A, b, mu, sigma = pars\n # return b + A/(np.sqrt(2*np.pi)*sigma**2) \\\n return b + A \\\n * np.exp...
[ "0.76877534", "0.7625238", "0.7266791", "0.7193128", "0.71709555", "0.71703607", "0.71607167", "0.7160505", "0.71378654", "0.7098316", "0.70353496", "0.7017975", "0.7010893", "0.7003919", "0.7003919", "0.7003919", "0.6969632", "0.6966521", "0.69597256", "0.69301003", "0.69202...
0.67862684
29
Method responsible for initialize objects during its creation. args dataframe (pd.DataFrame) > dataframe to br grouped.
def __init__(self, dataframe): self._dataframe = dataframe self._data_grouped_by_manufacturer = self._group_by_manufacturer() self._data_agg_by_mean_value = self._agg_by_mean() self._formatted_data = self._format_data()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, df, group_by='name'):\n self.data = df\n if group_by not in self.data.columns:\n raise ValueError(f'`group_by` column \"{group_by}\" not in dataframe.')\n self.group_by = group_by\n self.analyzers = self._composition_handler()", "def __init__(self, df):\n...
[ "0.7343573", "0.68431693", "0.673401", "0.6719422", "0.6624343", "0.65898407", "0.6508529", "0.64557725", "0.6288773", "0.61976933", "0.60989386", "0.60507965", "0.60454756", "0.60131985", "0.5955241", "0.5931669", "0.59289926", "0.5920753", "0.59089595", "0.59007853", "0.589...
0.7649919
0
Takes in input a list of texts and returns their bag of word representation, removing stopwords
def get_gensim_representation_new_docs_for_inference(texts, current_id2word, use_lemmer=True, min_df=2, max_df=0.8, tf_matrix_dump_filename=None): if tf_matrix_dump_filename is not None and os.path.exists(tf_matrix_dump_filename+'-features.json'): loggin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_words(texts, stop_words=stop_words, allowed_postags=['NOUN', 'ADJ', 'VERB', 'ADV']):\n texts = [[word for word in simple_preprocess(str(doc)) if word not in stop_words] for doc in texts]\n texts = [bigram_mod[doc] for doc in texts]\n texts = [trigram_mod[bigram_mod[doc]] for doc in texts]\n ...
[ "0.7663746", "0.76076394", "0.7249647", "0.72061646", "0.7197113", "0.71198606", "0.711351", "0.71099806", "0.7108562", "0.7023653", "0.7022274", "0.70074296", "0.6996041", "0.6980275", "0.6974739", "0.6974172", "0.69511074", "0.6949183", "0.6949183", "0.6949183", "0.6949183"...
0.0
-1
Test case for child_index_response_descriptor_policies_machine_policy_machines_deployment_targets_deployment_target_machine_policy_resource_deployment_target_resource
def test_child_index_response_descriptor_policies_machine_policy_machines_deployment_targets_deployment_target_machine_policy_resource_deployment_target_resource(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_child_index_response_descriptor_policies_machine_policy_machines_deployment_targets_deployment_target_machine_policy_resource_deployment_target_resource_spaces(self):\n pass", "def test_child_index_response_descriptor_policies_machine_policy_machines_workers_worker_machine_policy_resource_worker_...
[ "0.8896974", "0.75235844", "0.7499346", "0.74811196", "0.7250744", "0.7098596", "0.7008892", "0.6997721", "0.69265276", "0.6916972", "0.6787637", "0.67027223", "0.6674629", "0.65331006", "0.6515995", "0.6433049", "0.62677723", "0.613561", "0.58985835", "0.58572006", "0.577434...
0.95712495
0
Test case for create_response_descriptor_policies_machine_policy_machine_policy_resource
def test_create_response_descriptor_policies_machine_policy_machine_policy_resource(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_response_descriptor_policies_machine_policy_machine_policy_resource_spaces(self):\n pass", "def test_modify_response_descriptor_policies_machine_policy_machine_policy_resource(self):\n pass", "def test_load_response_descriptor_policies_machine_policy_machine_policy_resource(self):...
[ "0.88068867", "0.87985384", "0.8406674", "0.825386", "0.8144353", "0.78056", "0.7718411", "0.739654", "0.7166726", "0.7101359", "0.6941821", "0.6637769", "0.6584572", "0.64433765", "0.6252241", "0.6192197", "0.5834513", "0.5801379", "0.5725711", "0.5690357", "0.55643827", "...
0.94835985
0
Test case for load_response_descriptor_policies_machine_policy_machine_policy_resource
def test_load_response_descriptor_policies_machine_policy_machine_policy_resource(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_load_response_descriptor_policies_machine_policy_machine_policy_resource_spaces(self):\n pass", "def test_create_response_descriptor_policies_machine_policy_machine_policy_resource(self):\n pass", "def test_modify_response_descriptor_policies_machine_policy_machine_policy_resource(self):...
[ "0.8644574", "0.8619191", "0.8525388", "0.82113725", "0.8111796", "0.7814716", "0.7810621", "0.7288712", "0.72456956", "0.653477", "0.64254284", "0.60474956", "0.6046188", "0.589291", "0.5791006", "0.5790854", "0.5620659", "0.5584146", "0.552302", "0.52976006", "0.52885467", ...
0.9495415
0
Test case for modify_response_descriptor_policies_machine_policy_machine_policy_resource_spaces
def test_modify_response_descriptor_policies_machine_policy_machine_policy_resource_spaces(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_modify_response_descriptor_policies_machine_policy_machine_policy_resource(self):\n pass", "def test_create_response_descriptor_policies_machine_policy_machine_policy_resource_spaces(self):\n pass", "def test_index_response_descriptor_policies_machine_policy_machine_policy_resource_space...
[ "0.8700898", "0.86620927", "0.8287713", "0.82463676", "0.80559903", "0.79894406", "0.7560112", "0.751485", "0.7372133", "0.7351127", "0.7101574", "0.70739204", "0.6954957", "0.69376224", "0.6933205", "0.66508603", "0.6613824", "0.64696896", "0.62371033", "0.6196047", "0.61190...
0.9487136
0
Plots a confusion matrix to evaluate the test results.
def plot_cnf_matrix(self): plt.figure() analysis.plot_cnf_matrix(self.y_pred, self.y_test)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_confusion_matrix(self):\r\n interp = ClassificationInterpretation.from_learner(self.learn)\r\n interp.plot_confusion_matrix()", "def plot_confusion_matrix(name, trained_predictor, X_test, y_test):\n\n fig, ax = plt.subplots()\n fig.tight_layout()\n cm = confusion_matrix(y_test, tr...
[ "0.81640506", "0.80124193", "0.79541945", "0.78007317", "0.7789243", "0.775305", "0.7685425", "0.76723754", "0.76633817", "0.76545256", "0.76444125", "0.7631314", "0.76306367", "0.76228106", "0.7619309", "0.7617778", "0.76016146", "0.759867", "0.7597556", "0.75738513", "0.754...
0.78003657
4
Return a TF operation assigning the initial value to the weights.
def initialize(self): return self._variable.initializer
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_weights(w_shape, layer_index, weight_initializer):\n\n return tf.Variable(weight_initializer(w_shape), name=\"weight{}\".format(layer_index))", "def DefaultValue(self):\n return tf.zeros(self.shape, dtype=self.dtype)", "def DefaultValue(self):\n return tf.zeros(self.shape, dtype=self.dtype)",...
[ "0.6791518", "0.6541152", "0.6541152", "0.6510613", "0.6504187", "0.64963615", "0.64861786", "0.63937783", "0.6384702", "0.63722587", "0.6366087", "0.63388604", "0.6326887", "0.6323851", "0.6315977", "0.6315977", "0.6315977", "0.6256287", "0.62474585", "0.62474585", "0.624745...
0.0
-1
Return a TF operation assigning values to the weights.
def assign(self, value): if self._log: raise StructureError("Trying to assign non-log values to log-weights.") value = tf.where(tf.is_nan(value), tf.ones_like(value) * 0.01, value) if self._mask and not all(self._mask): # Only perform masking if mask is given and mask co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assign_weights(root, value, name=None):\n assign_ops = []\n\n def assign(node):\n if isinstance(node, Weights):\n assign_ops.append(node.assign(value))\n\n with tf.name_scope(name, \"AssignWeights\", [root, value]):\n # Get all assignment operations\n traverse_graph(roo...
[ "0.7049258", "0.69972116", "0.6707612", "0.6550825", "0.6474707", "0.638979", "0.6344495", "0.6317916", "0.6302889", "0.6280631", "0.625535", "0.62451196", "0.6236948", "0.6220461", "0.61867607", "0.61860126", "0.6174677", "0.6174677", "0.6171669", "0.61416024", "0.6140697", ...
0.0
-1
Creates a TF variable holding the vector of the SPN weights.
def _create(self): shape = (self._num_sums, self._num_weights) init_val = self._initializer(shape=shape, dtype=conf.dtype) if self._mask and not all(self._mask): # Only perform masking if mask is given and mask contains any 'False' init_val *= tf.cast(tf.reshape(self._mas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weights_variable(shape, stddev):\n return tf.Variable(tf.truncated_normal(\n shape=shape, stddev=stddev), name='weights')", "def create_weight_variable(shape):\n\n\tinitial = tf.truncated_normal(shape, stddev=0.1)\n\treturn tf.Variable(initial)", "def weight_variable(shape):\n initial = tf.trunc...
[ "0.6913707", "0.68658197", "0.6845287", "0.68304086", "0.6808019", "0.6808019", "0.6808019", "0.67768633", "0.67688084", "0.67688084", "0.67688084", "0.67688084", "0.67688084", "0.67688084", "0.67688084", "0.67688084", "0.67688084", "0.67688084", "0.67672366", "0.67153627", "...
0.66110384
21
hides the pygame and screen object
def draw_line(color, start_pos, end_pos, width=1): pygame.draw.line(screen, color, start_pos, end_pos, width)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hide(self):\n self.visible = False", "def hide(self):\n self._dev.hide()", "def hide(self):\r\n self.rect.center = (WINDOWWIDTH/2, WINDOWHEIGHT -2000)", "def hide(self):\n super(SkillShotScreen, self).hide()\n \n if self.cube != None: self.cube.clearLight(self.dl...
[ "0.7413223", "0.7331187", "0.71981186", "0.7151229", "0.7149498", "0.713473", "0.7130116", "0.70563614", "0.70563614", "0.7043192", "0.7034575", "0.70331573", "0.70331573", "0.6987356", "0.69708204", "0.6969802", "0.6940072", "0.691373", "0.6847738", "0.6833521", "0.6804366",...
0.0
-1
hides the pygame and screen object
def draw_circle(color, position, radius, width=0): #print('(color={}, position={}, radius={}, width={})') pygame.draw.circle(screen, color, position, radius, width)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hide(self):\n self.visible = False", "def hide(self):\n self._dev.hide()", "def hide(self):\r\n self.rect.center = (WINDOWWIDTH/2, WINDOWHEIGHT -2000)", "def hide(self):\n super(SkillShotScreen, self).hide()\n \n if self.cube != None: self.cube.clearLight(self.dl...
[ "0.7413223", "0.7331187", "0.71981186", "0.7151229", "0.7149498", "0.713473", "0.7130116", "0.70563614", "0.70563614", "0.7043192", "0.7034575", "0.70331573", "0.70331573", "0.6987356", "0.69708204", "0.6969802", "0.6940072", "0.691373", "0.6847738", "0.6833521", "0.6804366",...
0.0
-1
Returns a TaskArgs instance off the provided json_obj
def from_json(cls, json_obj, mapper=None): mapper_dict = mapper or {} kwargs = {arg_name: mapper_dict.get(arg_name, lambda x: x)(arg_value) for arg_name, arg_value in json_obj.items()} return cls(**kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FromJson(as_json):\n if _is_string(as_json):\n #we assume it's either a json string or a dictionary\n as_json = json.loads(as_json)\n return Task.FromDictionary(as_json)", "def from_json(json):\n\n if \"description\" not in json or \"tags\" not in json or \"files\" ...
[ "0.6822117", "0.6712608", "0.6182938", "0.6159463", "0.6109039", "0.5748612", "0.54605085", "0.5448529", "0.544563", "0.5381603", "0.53746974", "0.53458726", "0.53357446", "0.53030705", "0.52987415", "0.529009", "0.5263604", "0.5240057", "0.5231938", "0.52193654", "0.51753956...
0.5064551
25
Swap dragged column with its side (=left/right) neighbor.
def _swap_columns(self, side): displayed_cols = self._displayed_cols i1 = self._dragged_col_index i2 = i1 + 1 if side == 'right' else i1 - 1 if 0 <= i2 < len(displayed_cols): # there is a neighbor, swap columns: displayed_cols[i1] = displayed_cols[i2] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _drag_col(self, event):\n x = self._dx + event.x # get dragged column new left x coordinate\n self._visual_drag.place_configure(x=x) # update column preview position\n # if one border of the dragged column is beyon the middle of the\n # neighboring column, swap them\n if (s...
[ "0.746539", "0.64704865", "0.6058456", "0.6013608", "0.59787625", "0.59440774", "0.59092337", "0.59037364", "0.5856675", "0.58260787", "0.58126676", "0.5711143", "0.56855", "0.5634223", "0.56194085", "0.5616279", "0.5602784", "0.5546898", "0.5535435", "0.5509204", "0.5507428"...
0.8474727
0
Processes a caption string into a list of tonenized words.
def _process_caption(caption): tokenized_caption = [FLAGS.start_word] caption = caption.lower() if FLAGS.cut_words: tokens = [ " ".join(tk.tokenize(cap)) for cap in jieba.cut(caption) ] else: tokens = tk.tokenize(caption) tokenized_caption.extend(token...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def caption_cleaning(root_captioning):\n\n null_punct = str.maketrans('', '',string.punctuation)\n lookup = dict()\n\n #open the captions file\n with open( os.path.join(root_captioning,\\\n 'Flickr8k.token.txt'), 'r') as fp:\n max_length=0\n for line in fp.read().split('\\n'):\n ...
[ "0.62614983", "0.6255969", "0.6221338", "0.61310685", "0.59324855", "0.58542925", "0.5843329", "0.5807745", "0.57163656", "0.5710895", "0.5699942", "0.5682566", "0.56334734", "0.56207794", "0.5601772", "0.55834544", "0.5559133", "0.5525589", "0.55217165", "0.5513625", "0.5505...
0.7981181
0
Generates a weight matrix initalised from a normal distribution with mean 0 and std 0.01
def guassian_initalisation(num_inputs, num_output, relus=False): return np.random.normal(0, 0.01, size=(num_inputs, num_outputs))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _init_weights(n_rows, n_cols, std_dev=0.5):\n weights = np.random.randn(n_rows, n_cols) * std_dev\n return weights", "def standard_normal(weight_shape):\n return np.random.normal(size=weight_shape)", "def init_weights(self, dims):\n self.W = np.random.normal(size=dims) * 0.0001", "def get_sta...
[ "0.74671483", "0.7281929", "0.7185771", "0.7047699", "0.7010598", "0.69735193", "0.69236743", "0.6908911", "0.6834146", "0.68054605", "0.67550397", "0.6655013", "0.6561774", "0.6492779", "0.6449521", "0.64364666", "0.6413837", "0.6403048", "0.63818115", "0.6380275", "0.637997...
0.0
-1
Return moving average for period n.
def smooth(x, n): w = np.ones((n, )) / n return np.convolve(x, w, mode='valid')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def moving_average(a, n=3) :\n ret = np.cumsum(a, dtype=float)\n ret[n:] = ret[n:] - ret[:-n]\n return ret[n - 1:] / n", "def moving_average(self, a, n=3):\n ret = np.nancumsum(a, dtype=float)\n ret[n:] = ret[n:] - ret[:-n]\n return ret[n - 1:] / n", "def moving_average(a, n: int ...
[ "0.8288004", "0.8283937", "0.8266076", "0.8247028", "0.80869025", "0.7769073", "0.7768334", "0.76030016", "0.7514784", "0.74884856", "0.7334855", "0.7321151", "0.72422904", "0.72330064", "0.7209438", "0.7081082", "0.70081294", "0.6937434", "0.69300556", "0.68885964", "0.68784...
0.0
-1
return a query set. you also have access to request.user if needed
def get_query(self,q,request): return Order.objects.filter(Q(number__icontains=q))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n queryset = super(BaseViewSet, self).get_queryset()\n user = self.request.user\n return queryset.filter(user=user)", "def get_queryset(self):\n # tags = self.request.query_params.get('tags')\n # ingredients = self.request.query_params.get('ingredients')...
[ "0.74429035", "0.7426656", "0.7419412", "0.7413035", "0.7413035", "0.7413035", "0.7236549", "0.71846837", "0.716911", "0.7161239", "0.71602887", "0.7159513", "0.71435976", "0.7131444", "0.7075717", "0.70644253", "0.70318854", "0.7028139", "0.7017795", "0.6988719", "0.6963546"...
0.0
-1
Tests whether or not the input is numeric.
def isnumeric(number): try: float(number) return True except (TypeError, ValueError): return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_numeric(self) -> bool:\n return False", "def isnumeric(self):\n return isnumeric(self)", "def is_numeric(value):\n return isinstance(value, int) or isinstance(value, float)", "def is_numeric (self) :\n\n return self.__isnumeric__", "def is_numeric(val):\n if \\\n isinst...
[ "0.86188084", "0.85750777", "0.8377308", "0.8322693", "0.8021472", "0.7998773", "0.7972825", "0.78975505", "0.78323746", "0.78222513", "0.7802421", "0.7743957", "0.7717319", "0.77046573", "0.7704217", "0.76487166", "0.7635208", "0.76268786", "0.759113", "0.757049", "0.7505088...
0.816058
4
Remove URL baggage to display a clean hostname/path. Returns a string when passed either a string or a urlparse.ParseResult.
def prettify_url(url): if not isinstance(url, urllib.parse.ParseResult): url = urllib.parse.urlparse(url) urlstr = url.hostname + url.path return urlstr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_clean_url(url):\n return urlparse.urldefrag(url)[0]", "def clean_url(url: str) -> str:\n r = urlparse(url)\n parts = list(r)\n # Add a / to the end of the path if it isn't there\n if not parts[2].endswith(\"/\"):\n parts[2] += \"/\"\n return urlunparse(parts)", "def host_clean...
[ "0.6993557", "0.67576265", "0.66650224", "0.66586196", "0.6652087", "0.6645249", "0.6633025", "0.65752643", "0.65409863", "0.65345746", "0.650515", "0.64885426", "0.6464696", "0.63186455", "0.6308508", "0.6306015", "0.62875205", "0.6282048", "0.6259317", "0.62511647", "0.6231...
0.6760828
1
Gets luno's account balance
def get_balance(self): r = requests.get(build_api_call(self.base_url, None, 'balance', ''), auth=HTTPBasicAuth(KEY, SECRET)) if r.status_code == 200: return r.json() else: return 'error'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_account_balance(self):\n return int(self.request('get', 'fort/accounts')['balance'])", "def get_balance(self):\n return self._call_account_method(\n 'getBalance'\n )", "def get_balance(self):\r\n return self.balance", "def get_balance(self):\n return self...
[ "0.8299717", "0.8140001", "0.8070133", "0.797602", "0.797602", "0.792703", "0.79037005", "0.78553283", "0.7809634", "0.77631515", "0.7741913", "0.772294", "0.7715991", "0.7700649", "0.7699275", "0.7681096", "0.7666911", "0.7659812", "0.7634236", "0.7612852", "0.75019634", "...
0.8184576
1
Gets layer objects that can make a Transformer encoder block.
def common_layers_with_encoder(self): return [ self.self_attention, self.self_attention_layer_norm, self.intermediate_dense, self.output_dense, self.output_layer_norm ]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transformer_layers(self):\n return self._transformer_layers", "def _get_layers(self) :\n \n return self._layers", "def getLayers(self):\n return self.__layers", "def get_layers(self):\n layers = set()\n for element in itertools.chain(self.polygons, self.paths):\n ...
[ "0.71611303", "0.680441", "0.6467036", "0.64140487", "0.62969625", "0.6263503", "0.6165777", "0.61518013", "0.60822934", "0.5933826", "0.5804896", "0.5742837", "0.5729919", "0.5729318", "0.5729318", "0.5619722", "0.5607468", "0.55784374", "0.55744386", "0.55633366", "0.555057...
0.6747973
2
Return the output of the decoder layer stacks.
def call(self, inputs, cache=None, decode_loop_step=None): decoder_inputs = inputs["decoder_inputs"] encoder_outputs = inputs["encoder_outputs"] self_attention_mask = inputs["self_attention_mask"] attention_mask = inputs["attention_mask"] decoder_shape = tf_utils.get_shape_list(decoder_inputs, expec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_stack_output(name: Optional[pulumi.Input[str]] = None,\n tags: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,\n opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetStackResult]:\n ...", "def peek(self):\n if self.output_stack == ...
[ "0.62365675", "0.6229245", "0.6180031", "0.6179814", "0.617678", "0.6087826", "0.6087826", "0.6087826", "0.60857046", "0.6056521", "0.60167295", "0.60167295", "0.60057425", "0.5904918", "0.5903868", "0.58951133", "0.58662087", "0.58401304", "0.5839997", "0.58239543", "0.58028...
0.0
-1
Constructor Instantiates an empty dictionary.
def __init__(self): self.dGrph = {} self.__prime_ip = [] self.__prime_op = [] self.__op_fanout = {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mempty(self) -> 'Dictionary':\n return Dictionary()", "def empty(cls, key_type, value_type):\n return cls(dcttype=DictType(key_type, value_type))", "def __init__(self, dict):\n self.dict = dict", "def __init__(self, dict):\n self.dict = dict", "def __init__(self):\n s...
[ "0.73705274", "0.71895057", "0.7131651", "0.7131651", "0.707373", "0.707373", "0.7044296", "0.69207585", "0.68438846", "0.68438846", "0.68003595", "0.6785088", "0.67671424", "0.67278594", "0.6725374", "0.66781056", "0.66448504", "0.66448504", "0.66448504", "0.66448504", "0.66...
0.0
-1
Returns the label for that partition (if any). 'partitionDevice' should no be prefixed with '/dev/' if it is a block device. It can be a full path if the partition is contained in a file.
def getFsLabel(partitionDevice): if os.path.exists('/dev/{0}'.format(partitionDevice)) and S_ISBLK(os.stat('/dev/{0}'.format(partitionDevice)).st_mode): path = '/dev/{0}'.format(partitionDevice) elif os.path.isfile(partitionDevice): path = partitionDevice else: label = False path = False if path...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getLabel(device):\n cmd = \"/sbin/blkid -s LABEL -o value %s\" % device\n proc = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)\n return proc.communicate()[0].strip()", "def partitionname(self) :\n\t\ttry :\n\t\t\treturn self._partitionname\n\t\texcept Exception as e:\n\t\t\traise e", "def ...
[ "0.67012095", "0.6582321", "0.64726335", "0.63306135", "0.6259873", "0.61355835", "0.6036432", "0.6030853", "0.59999144", "0.5981667", "0.5980198", "0.59630114", "0.593702", "0.593702", "0.5914262", "0.5907501", "0.58630013", "0.5844552", "0.57786477", "0.57224375", "0.568802...
0.8201686
0
Tests parsing an invalid HTTP method.
def test_url_line_parser_invalid_method(self): line = "DERP /path?var=val&var2=val2 HTTP/1.1" self.assertRaises(ValueError, parser._parse_url_line, line, endpoint)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_bad_method(self):\n\n request = service.get_request('GET', {})\n x = self.start_request_tests(request)\n # GET method not allowed\n self.assertEqual(x.status_code, 405)\n # TBD: check for informativeness\n json.dump(x.to_dict(), sys.stdout, indent=2)", "def test...
[ "0.76048857", "0.69158894", "0.68886876", "0.68546087", "0.6849259", "0.6838932", "0.68302256", "0.6820263", "0.6779374", "0.67392325", "0.6701662", "0.6700252", "0.6693697", "0.6691574", "0.6654865", "0.65625334", "0.65423274", "0.6493293", "0.64893305", "0.63593465", "0.630...
0.7443638
1
Tests calling invalid method in URL string.
def test_call_external_invalid_method(self): string = 'GET /v1/CALL_EXTERNAL|uuid:asdfasdfasdf:[]|' self.assertRaises( AttributeError, parser.call_external_functions, string)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_url_line_parser_invalid_method(self):\n line = \"DERP /path?var=val&var2=val2 HTTP/1.1\"\n self.assertRaises(ValueError, parser._parse_url_line, line, endpoint)", "def test_validate_url_invalid_d_value():\n url_invalid_d_value = 'https://docs.google.com/spreadsheets/abc/AbCde1'\n ass...
[ "0.754976", "0.67596656", "0.67533267", "0.66945595", "0.66368294", "0.66093415", "0.6551803", "0.65427613", "0.65202135", "0.64954686", "0.6461145", "0.64351803", "0.63831276", "0.6381552", "0.6373941", "0.63539594", "0.63279265", "0.631961", "0.63160187", "0.6264169", "0.62...
0.7792445
0
Returns XML representation of Dataset.
def export_set(dataset): return to_xml(dataset.dict)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_xml(self):\n return etree.tostring(self.get_etree())", "def get_xml(self):\n with io.StringIO() as string:\n string.write(ET.tostring(self.root, encoding=\"unicode\"))\n return string.getvalue()", "def xml(self):\n raise NotImplementedError('This api does not ...
[ "0.6541075", "0.65287054", "0.6447503", "0.63351196", "0.63056076", "0.62810475", "0.62559366", "0.61521703", "0.6105792", "0.6013876", "0.6013876", "0.6005389", "0.59993374", "0.5995777", "0.59687835", "0.5947462", "0.58789515", "0.58733755", "0.58549255", "0.5844089", "0.58...
0.7176284
0
Return the logscaled Mel bands of an audio signal.
def get_log_melspectrogram(audio, sr = 22050, hop_length = 220, n_fft = 1024, n_mels = 80, fmin = 64, fmax = 8000): bands = librosa.feature.melspectrogram( y=audio, sr=sr, hop_length=hop_length, n_fft=n_fft, n_mels=n_mels, fmin=fmin, fmax=fmax, dtype=np.float32) return librosa.core.power_to_db(bands, am...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logmelfilterbank(audio,\r\n sampling_rate,\r\n fft_size=1024,\r\n hop_size=256,\r\n win_length=None,\r\n window=\"hann\",\r\n num_mels=80,\r\n fmin=None,\r\n ...
[ "0.70189166", "0.6813336", "0.66273147", "0.6598909", "0.6461665", "0.6459326", "0.6396563", "0.63392806", "0.62883216", "0.62751853", "0.6124016", "0.61219096", "0.6114814", "0.60655165", "0.6028684", "0.6027702", "0.6023701", "0.6012507", "0.60043156", "0.5988086", "0.59803...
0.6733039
2
Adds the experience to memory and fits the agent.
def _step( self, states: np.ndarray, actions: List[np.ndarray], rewards: np.ndarray, next_states: np.ndarray, dones: np.ndarray, ) -> None: self.memory.add(states, np.concatenate(actions), rewards, next_states, dones) self.step_count += 1 if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_new_experience(self, state, action, reward, next_state, done):\n e = self.experience(state, action, reward, next_state, done, self.max_priority)\n self.memory.append(e)", "def store(self, experience):\n\n self.memory.store(experience)", "def add(self, state, action, reward, next_st...
[ "0.76737654", "0.76030546", "0.75169814", "0.74013215", "0.72838026", "0.7259962", "0.7229993", "0.7179652", "0.70125467", "0.6981418", "0.6981418", "0.6981418", "0.6981418", "0.6981418", "0.6981418", "0.6981418", "0.6981418", "0.6981418", "0.6981418", "0.6981418", "0.6953012...
0.0
-1
Update search tree with opponent action. can raise SearchTreeFull
def make_action(self, game, node, action, moves): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update(self, opponent_action, player_action):\n\n self.root = self.root.make_updated_node(player_action, opponent_action)", "def update_root(self, action: Action) -> \"MonteCarloSearchTree\":\n if action in self._root.children:\n new_root = self._root.children[action]\n else:\...
[ "0.6969919", "0.65709364", "0.6038096", "0.5772111", "0.57715154", "0.57608086", "0.5748883", "0.5738186", "0.57324505", "0.5613534", "0.5602209", "0.5546124", "0.55147356", "0.5503853", "0.5497304", "0.5431547", "0.5426108", "0.54244936", "0.54194784", "0.5399953", "0.539942...
0.0
-1
split a list into N chunks
def chunks(seq, n): assert len(seq) > n avg = len(seq) / float(n) out = [] last = 0 while round(last) < len(seq): out.append(seq[round(last):round(last + avg)]) last += avg return out
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_chunks(l, n):\n return [l[i:i+n] for i in range(0, len(l), n)]", "def divide_chunks(a_list, n):\n return [a_list[i:i + n] for i in range(0, len(a_list), n)]", "def get_chunks(lst, n):\n size = int(len(lst) / n)\n output_list = []\n for i in range(0, n):\n sub_list = lst[i*size:i*...
[ "0.8645034", "0.8631166", "0.8502032", "0.84976035", "0.84938794", "0.848579", "0.84806937", "0.84806937", "0.84798867", "0.84782726", "0.8476487", "0.8475375", "0.8467082", "0.8459613", "0.8456037", "0.84556925", "0.84505635", "0.84504116", "0.8448339", "0.8445609", "0.84373...
0.0
-1
Create an object to manage ZJULeaper dataset.
def __init__(self, dir: str, fabric: Union[str, int], setting: Union[str, int], seed: int = 0): self.dataset_dir = dir if isinstance(fabric, int): fabric = 'pattern%d' % fabric assert fabric in ['pattern%d' % i for i in range(1, 20)] \ or fabric in ['group%d' % i for ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, dataset):\n self._dataset = dataset", "def __init__(self, dataset: Dataset):\n self.dataset = dataset", "def __init__(self):\n self.__dataset = None", "def create_dataset(opt):\n\tdata_loader = CustomDatasetDataLoader(opt)\n\tdataset = data_loader.load_data()\n\treturn...
[ "0.66415405", "0.6589742", "0.65591735", "0.6386111", "0.62914306", "0.6263057", "0.62055784", "0.6197735", "0.6140442", "0.6129028", "0.61066204", "0.6052518", "0.6008786", "0.5974914", "0.59657073", "0.59392434", "0.5938667", "0.59256953", "0.5923153", "0.58961564", "0.5887...
0.0
-1
Return True if the set contains this chunk.
def contains_octree_chunk(self, octree_chunk: OctreeChunk) -> bool: return octree_chunk in self._chunks
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __contains__(self, fragment):\n return fragment in self._items", "def contains(self, key):\n return key in self.hashset[key % self.N]", "def has_item(self, item):\n return item in self.set", "def has_item(self, item):\n return item in self.set", "def __contains__(self, key):...
[ "0.71972394", "0.7185163", "0.7039827", "0.7039827", "0.7002307", "0.6941259", "0.69288486", "0.69057125", "0.68997145", "0.68413794", "0.6837034", "0.6833185", "0.678168", "0.6775103", "0.6773133", "0.6758561", "0.6757164", "0.6742197", "0.67323714", "0.6720583", "0.6718777"...
0.6559872
45
Variables Returns lists of compiled variables
def __compileVariables(self): state_variables = [] state_diffs = [] networks = [] frames = [] vars = [] language = self.language instansiate_variables = {} self.obj_vars = self.object_variables() for key, var in self.variables.items(): # Grouping the variables siz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_all_variables(self):\n return []", "def get_variables(self):\n\t\treturn self.variables", "def get_variables(self):\n return [self.variables[key] for key in sorted(self.variables)]", "def getVariables(self):\n statVars = [self[vn] for vn in self.statVars]\n timeVars = [sel...
[ "0.71020514", "0.69099486", "0.6857483", "0.6845794", "0.68278503", "0.6808922", "0.6790509", "0.6773222", "0.6746856", "0.66467154", "0.66441834", "0.6612803", "0.6606403", "0.6596628", "0.65494496", "0.6530946", "0.6520007", "0.6520007", "0.6520007", "0.6515181", "0.6509478...
0.6702802
9
Status of the current tracking session.
def status(): _request('worklog/status/')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status(self):\n self._refresh_state()\n return self._data.get('status')", "def status(self):\n\t\treturn self._status", "def status(self):\n return self.status", "def status(self):\r\n return self._status", "def status(self):\r\n return self._status", "def getstatus...
[ "0.7282273", "0.7228162", "0.7186645", "0.7175305", "0.7175305", "0.71481085", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", "0.7133964", ...
0.0
-1
Validate the user and get the current language.
def validate_user_and_language(db, enable_users): is_admin = False if enable_users: manager = user_manager.UserManager(db) manager.validate_login(PW_HASH_ITERATIONS, ADMIN_USER) is_admin = (manager.current_user() and manager.current_user().name == ADMIN_USER) lang...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def requestLanguage(request):\n # Return the user language preferences for registered users\n if request.user.valid and request.user.language:\n return request.user.language\n\n # Or try to return one of the user browser accepted languages, if it\n # is available on this wiki...\n available =...
[ "0.7318058", "0.7274545", "0.7221204", "0.68653643", "0.6850431", "0.6808369", "0.67635536", "0.6760026", "0.6756641", "0.6711602", "0.65899515", "0.6509169", "0.6489777", "0.6451752", "0.64348745", "0.6428045", "0.6401297", "0.6340181", "0.633737", "0.63304114", "0.63120115"...
0.63257664
20
Finds the euclidian distance between two points
def distance(point1, point2, categorical_list): assert len(point1) == len(point2) indiv_dis = [] for i in range(len(point1)): if(i in categorical_list): indiv_dis.append(point1[i] == point2[i]) else: indiv_dis.append((point1[i] - point2[i])**2) return math.sqrt(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def euclidian_distance(x1, y1, x2, y2):\n distance = sqrt(pow((x1-x2), 2)+(pow((y1-y2), 2)))\n return distance", "def eucl_dist(x_0, y_0, x_1, y_1):\n return sqrt((x_1 - x_0)**2 + (y_1 - y_0)**2)", "def eucl_dist(a, b):\n return np.sqrt( (a[0]-b[0])** 2 + (a[1]-b[1])** 2)", "def euclidian_distanc...
[ "0.8522549", "0.8174402", "0.8101151", "0.79981077", "0.7976142", "0.7892798", "0.78447795", "0.7841264", "0.78239584", "0.78231484", "0.7778741", "0.777168", "0.77597356", "0.7737484", "0.76794404", "0.76750165", "0.7666207", "0.76628315", "0.7657074", "0.7652516", "0.762872...
0.0
-1
Gets the indices of all occurances of each value on the list
def separate_by_value(yvals): bins = {} for i, val in enumerate(yvals): if(val not in bins): bins[val] = [] bins[val].append(i) return bins
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def occ_indices(self):\n indices = []\n for index,item in enumerate(self):\n if item==1:\n indices.append(index)\n return indices", "def getIndexes(self, val):\n # Find where this value is listed. \n valNdx = (self.values == val).nonzero()[0]\n ...
[ "0.79099303", "0.7451633", "0.70815015", "0.70019865", "0.6972958", "0.6947848", "0.690228", "0.6866459", "0.67076683", "0.6706704", "0.66598165", "0.66575575", "0.6643541", "0.6459474", "0.6421432", "0.6407178", "0.63575613", "0.63316524", "0.6318876", "0.6282532", "0.622784...
0.0
-1
updates the learning rate using inverse time decay
def learning_rate(epoch): return alpha / (1 + decay_rate * epoch)
{ "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 update_learning_rate(self...
[ "0.79141027", "0.79141027", "0.7600679", "0.755973", "0.74991554", "0.7437204", "0.74210054", "0.7418398", "0.7370435", "0.7333608", "0.73212445", "0.73181844", "0.7294031", "0.71980155", "0.71483403", "0.7143655", "0.71194965", "0.7064005", "0.69669044", "0.68850595", "0.687...
0.6791655
27
Gets the negotiated MTU size in bytes for the active connection.
def mtu_size(self) -> int: return self._backend.mtu_size
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_mtu(self):\n return self.__mtu", "def max_size_bytes(self) -> Optional[float]:\n return pulumi.get(self, \"max_size_bytes\")", "def size_bytes(self) -> int:\n return pulumi.get(self, \"size_bytes\")", "def target_size(self) -> pulumi.Output[float]:\n return pulumi.get(self, \...
[ "0.6917868", "0.66717887", "0.65195954", "0.6463377", "0.62763387", "0.62763387", "0.6253585", "0.6240081", "0.6220285", "0.6216473", "0.6209106", "0.6201511", "0.6201511", "0.6198849", "0.6198849", "0.6190796", "0.618667", "0.6178433", "0.6178433", "0.6178433", "0.6176396", ...
0.8054783
0
Get all services registered for this GATT server.
async def get_services(self, **kwargs) -> BleakGATTServiceCollection: warn( "This method will be removed future version, use the services property instead.", FutureWarning, stacklevel=2, ) return await self._backend.get_services(**kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_services(self):\r\n return get_service_list()", "def get_services(self):\n\n return list(self.services.values())", "def services(self) -> List[Service]:\n return self._services", "def getAllServices(self) -> List[ghidra.framework.plugintool.ServiceInterfaceImplementationPair]:\n ...
[ "0.7966446", "0.78073156", "0.75966966", "0.7578413", "0.7342178", "0.7335799", "0.7291781", "0.71853995", "0.718065", "0.71795416", "0.7165328", "0.7136255", "0.7125677", "0.70754325", "0.70368284", "0.69296724", "0.6906356", "0.6890786", "0.6885455", "0.68508124", "0.679264...
0.7189342
7
sl.length( ) > int Returns the number of selectable objects.
def length(self): return len(self.object_list)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def size(self):\n return len(self.selected)", "def selectables_length(self) -> int:\n\n return 1", "def __len__(self):\n return self._number_of_items", "def test_len():\n sc.menu = sc.default_menu\n sc.current.add_item('Fries', 3)\n sc.current.add_item('Steak', 1)\n assert sc...
[ "0.76478016", "0.7184975", "0.64857197", "0.6408985", "0.6373906", "0.63495624", "0.63207763", "0.6255674", "0.62550473", "0.6238708", "0.62190384", "0.6210997", "0.6201861", "0.6191347", "0.61624664", "0.6141853", "0.61418194", "0.6127571", "0.61187345", "0.6114711", "0.6114...
0.6330998
6
Stores the (state, action, reward, new_state, done) in the memory
def remember(self, r_state, r_action, r_reward, r_new_state, r_done): self.memory.append((r_state, r_action, r_reward, r_new_state, r_done))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def store(self, state, action, reward, next_state, done):\n self.replay_memory.append((state, action, reward, next_state, done))", "def store(self, state, action, reward, obs_state, done):\n\n self.states.append(state)\n self.actions.append(action)\n self.rewards.append(reward)\n ...
[ "0.82408077", "0.80172557", "0.7915945", "0.76803255", "0.7659453", "0.7597184", "0.7492261", "0.7402835", "0.72515005", "0.7236974", "0.7204879", "0.7144086", "0.71235025", "0.70950997", "0.69806784", "0.6941013", "0.6919628", "0.6863612", "0.6863612", "0.6863612", "0.686361...
0.76339084
5
Number of nodes in the Memcached instance.
def node_count(self) -> pulumi.Input[int]: return pulumi.get(self, "node_count")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def node_count(self) -> int:\n return pulumi.get(self, \"node_count\")", "def number_of_nodes(self):\n return int(self._data['number_of_nodes'])", "def num_nodes(self) -> int:\n return pulumi.get(self, \"num_nodes\")", "def node_count(self):\n return self._node_count", "def Node...
[ "0.8198362", "0.789495", "0.78221065", "0.78131914", "0.77021295", "0.76578176", "0.76578176", "0.7627171", "0.761858", "0.7593431", "0.7545183", "0.7480903", "0.74587244", "0.7448119", "0.74132216", "0.74132216", "0.7384715", "0.7381537", "0.7263562", "0.7236913", "0.7223049...
0.7582516
10
The time the instance was created.
def create_time(self) -> pulumi.Output[str]: return pulumi.get(self, "create_time")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_time(self):\n return self._create_time", "def create_time(self):\n return self._create_time", "def create_time(self):\n return self._create_time", "def time_created(self):\n return self._time_created", "def time_created(self):\n return self._time_created", "d...
[ "0.88944787", "0.88944787", "0.88944787", "0.86405927", "0.86405927", "0.86405927", "0.86405927", "0.85531133", "0.85531133", "0.8518028", "0.84558433", "0.84558433", "0.84558433", "0.8358678", "0.83528525", "0.83528525", "0.83528525", "0.83528525", "0.83528525", "0.83528525", ...
0.7775189
54
The full version of memcached server running on this instance. System automatically determines the full memcached version for an instance based on the input MemcacheVersion. The full version format will be "memcached1.5.16".
def memcache_full_version(self) -> pulumi.Output[str]: return pulumi.get(self, "memcache_full_version")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def memcache_version(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"memcache_version\")", "def memcache_version(self) -> Optional[pulumi.Input['InstanceMemcacheVersion']]:\n return pulumi.get(self, \"memcache_version\")", "def version(self):\n response = self._request_call('/vers...
[ "0.7536718", "0.7418024", "0.6915868", "0.66688776", "0.6619421", "0.64315057", "0.637918", "0.6232198", "0.6208061", "0.6208061", "0.6195724", "0.6132795", "0.6084395", "0.6080513", "0.6063134", "0.60595894", "0.60595894", "0.60235375", "0.60201406", "0.598459", "0.59841734"...
0.7410697
2
Number of nodes in the Memcached instance.
def node_count(self) -> pulumi.Output[int]: return pulumi.get(self, "node_count")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def node_count(self) -> int:\n return pulumi.get(self, \"node_count\")", "def number_of_nodes(self):\n return int(self._data['number_of_nodes'])", "def num_nodes(self) -> int:\n return pulumi.get(self, \"num_nodes\")", "def node_count(self):\n return self._node_count", "def Node...
[ "0.8198731", "0.7895121", "0.78228307", "0.7813235", "0.7702046", "0.7626724", "0.7618849", "0.7593106", "0.7583286", "0.7583286", "0.75454766", "0.7481042", "0.7458819", "0.7447763", "0.74135596", "0.74135596", "0.7385229", "0.73815125", "0.7263382", "0.7237654", "0.72237325...
0.76582205
5
The state of this Memcached instance.
def state(self) -> pulumi.Output[str]: return pulumi.get(self, "state")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state(self):\n return self.__state", "def state(self):\n return self.__state", "def State(self):\r\n return self._state", "def state(self):\r\n return self._state", "def state(self):\r\n return self._state", "def state(self):\r\n return self._state", "def s...
[ "0.7281849", "0.7281849", "0.7150078", "0.7147992", "0.7147992", "0.7147992", "0.7135151", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0.71349686", "0....
0.0
-1
Returns true if there is an update waiting to be applied
def update_available(self) -> pulumi.Output[bool]: return pulumi.get(self, "update_available")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def needs_update(self) -> bool:\n return False", "def needs_update(self):\n now = time.time()/60\n return (self.last_update_time_in_minutes+self.timeout) < now", "def is_ready_update(self):\n size_of_buffer = len(self.training_buffer.update_buffer[\"actions\"])\n return size_...
[ "0.81495774", "0.79288965", "0.7670999", "0.76364183", "0.7630447", "0.75946134", "0.75639987", "0.7507022", "0.749998", "0.7415133", "0.7382009", "0.7282999", "0.7271687", "0.7252065", "0.72253454", "0.72230667", "0.7153481", "0.7150191", "0.7117309", "0.7111094", "0.706234"...
0.7617034
5