query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Tests that the client_id and client_secret are set for any Metadata Wrangler lookups
def test_authenticates_wrangler_requests(self): mw_integration = Configuration.METADATA_WRANGLER_INTEGRATION mw_client_id = Configuration.METADATA_WRANGLER_CLIENT_ID mw_client_secret = Configuration.METADATA_WRANGLER_CLIENT_SECRET with temp_config() as config: config['integ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_client_key_secret_not_provided(self):\r\n\r\n #this adds lti passports to system\r\n mocked_course = Mock(lti_passports = ['test_id:test_client:test_secret'])\r\n modulestore = Mock()\r\n modulestore.get_course.return_value = mocked_course\r\n runtime = Mock(modulestore=...
[ "0.6225641", "0.620938", "0.60602754", "0.60518366", "0.6024625", "0.600619", "0.5976633", "0.5952987", "0.5944266", "0.59124804", "0.59015816", "0.5884947", "0.58759344", "0.58474773", "0.58470154", "0.58388627", "0.5817512", "0.5800156", "0.5784628", "0.57732445", "0.577094...
0.66878676
0
Converts a binary OPF file (.dat or .opf) to a .txt file.
def opf2txt(opf_path: str, output_file: Optional[str] = None) -> None: logger.info("Converting file: %s ...", opf_path) header_format = "<iii" header_size = struct.calcsize(header_format) with open(opf_path, "rb") as f: header_data = struct.unpack(header_format, f.read(header_size)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_to_file(data, ta_file):\n file_handle = file(ta_file, \"w\")\n file_handle.write(data_to_string(data))\n file_handle.close()", "def f2o(forfile, opath):\n return f2suff(forfile, opath, 'o')", "def output_file(data, filename):\n with open(filename + '.txt', 'w+') as f_out:\n for c...
[ "0.6141955", "0.6113444", "0.5941108", "0.58821917", "0.5808017", "0.5794867", "0.5755523", "0.568969", "0.5668281", "0.56444365", "0.5632868", "0.5631192", "0.55704373", "0.54836816", "0.5467935", "0.5424194", "0.540998", "0.5392386", "0.53882116", "0.53703266", "0.5370166",...
0.70846903
0
Converts a binary OPF file (.dat or .opf) to a .csv file.
def opf2csv(opf_path: str, output_file: Optional[str] = None) -> None: logger.info("Converting file: %s ...", opf_path) header_format = "<iii" header_size = struct.calcsize(header_format) with open(opf_path, "rb") as f: header_data = struct.unpack(header_format, f.read(header_size)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gp_file(data,filename,output_dir='',order = [],head = False):\n f = open(output_dir + filename + '.csv', 'w')\n f.write(str(len(order)-1) + '\\n')\n write = csv.writer(f)\n write.writerows(manip.dic_to_list(data,order,head),)\n f.closed\n\n return None", "def pull_data(raw_file, out_file):\...
[ "0.5750063", "0.57131565", "0.5615271", "0.55760473", "0.55718046", "0.55707633", "0.5554854", "0.55513525", "0.5545663", "0.55176777", "0.5496984", "0.54939777", "0.54535645", "0.5451237", "0.5450241", "0.54268384", "0.54268384", "0.5418672", "0.5394695", "0.53816354", "0.53...
0.69811004
0
Converts a binary OPF file (.dat or .opf) to a .json file.
def opf2json(opf_path: str, output_file: Optional[str] = None) -> None: logger.info("Converting file: %s ...", opf_path) header_format = "<iii" header_size = struct.calcsize(header_format) with open(opf_path, "rb") as f: header_data = struct.unpack(header_format, f.read(header_size)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verilog_to_json(verilog_filename, json_filename):\n system(f'yosys -p \"read_verilog {verilog_filename}\" '\n '-p \"write_json {json_filename}\"')", "def dict_2_json(obj, filename):\n\twith open('data/output/' + filename, 'w') as fp:\n\t\tjson.dump(obj, fp, indent=4)", "def to_bin_json(self, j...
[ "0.6118258", "0.6042721", "0.59791267", "0.5867365", "0.5807094", "0.57787466", "0.5758677", "0.5737004", "0.57077307", "0.5640802", "0.55905616", "0.55708736", "0.5537253", "0.5508185", "0.54944956", "0.5476644", "0.5473966", "0.5452779", "0.5449527", "0.54450536", "0.543474...
0.7183994
0
Get the Breeding Methods
def get_breedingmethods( page: Optional[int] = None, page_size: Optional[int] = Query(None, alias='pageSize'), authorization: Optional[constr(regex=r'^Bearer .*$')] = Query( None, alias='Authorization' ), ) -> BreedingMethodListResponse: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def breedte(self):\n return self._breedte.get_waarde()", "def get_blue():\n # return name of actor, grazing speed, self defense\n return 'Piggy', 2", "def discriminator(self) -> str:", "def thing_classes(self):\n return [Wall, Gold, Pit, Agent]", "def methods(self) -> List[str]:\n ...
[ "0.59997076", "0.57501924", "0.56736887", "0.55821085", "0.54889053", "0.53928035", "0.5347656", "0.5326758", "0.52569395", "0.52136797", "0.5179482", "0.5179482", "0.5179482", "0.5171688", "0.5137512", "0.5109612", "0.5109338", "0.51086676", "0.51045275", "0.5095217", "0.504...
0.5780603
1
Get the details of a specific Breeding Method
def get_breedingmethods_breeding_method_db_id( breeding_method_db_id: str = Query(..., alias='breedingMethodDbId'), authorization: Optional[constr(regex=r'^Bearer .*$')] = Query( None, alias='Authorization' ), ) -> BreedingMethodSingleResponse: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_breedingmethods(\n page: Optional[int] = None,\n page_size: Optional[int] = Query(None, alias='pageSize'),\n authorization: Optional[constr(regex=r'^Bearer .*$')] = Query(\n None, alias='Authorization'\n ),\n) -> BreedingMethodListResponse:\n pass", "def breedte(self):\n retu...
[ "0.6126337", "0.57000554", "0.56439865", "0.54723096", "0.5434245", "0.53535664", "0.5255534", "0.52171296", "0.52065945", "0.5202647", "0.51174474", "0.5047638", "0.5043298", "0.5010723", "0.4977329", "0.49709356", "0.49579695", "0.4936958", "0.49194703", "0.4880286", "0.483...
0.5860461
1
Get the pedigree details of a specific Germplasm
def get_germplasm_germplasm_db_id_pedigree( germplasm_db_id: str = Query(..., alias='germplasmDbId'), notation: Optional[str] = None, include_siblings: Optional[bool] = Query(None, alias='includeSiblings'), authorization: Optional[constr(regex=r'^Bearer .*$')] = Query( None, alias='Authorization...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pedigree(self) -> hl.Pedigree:\n return hl.Pedigree.read(self.path, delimiter=self.delimiter)", "def get_tree(treename,shotnum,**kwargs):\n return traverseTree(mds.Tree(treename,shotnum),**kwargs)", "def explore_tree(tree):\n\n salmonellaleaf = None\n print(\"LEAVES:\\n\")\n for l in tre...
[ "0.5956518", "0.57291734", "0.562867", "0.56083", "0.55735844", "0.5550442", "0.5317693", "0.5257209", "0.52437055", "0.5199199", "0.51558405", "0.51508904", "0.50932765", "0.5077629", "0.5011504", "0.4993379", "0.4955708", "0.4927025", "0.49022344", "0.4892796", "0.4862671",...
0.57569957
1
Get a filtered list of Planned Cross entities
def get_plannedcrosses( crossing_project_db_id: Optional[str] = Query(None, alias='crossingProjectDbId'), planned_cross_db_id: Optional[str] = Query(None, alias='plannedCrossDbId'), external_reference_i_d: Optional[str] = Query(None, alias='externalReferenceID'), external_reference_source: Optional[str]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getHostileCamps(self):\n r = []\n for p in self.__camps:\n if(p.getOwner() >=2):\n r.append(p)\n return r", "def get_visible_products(self):\r\n all_products = billing.loading.get_products(hidden=True)\r\n public_products = billing.loading.get_prod...
[ "0.5460431", "0.5317245", "0.53025705", "0.52848035", "0.5253663", "0.5251023", "0.520825", "0.519097", "0.516335", "0.51526403", "0.5137009", "0.51277745", "0.51198304", "0.5106961", "0.51026475", "0.50893444", "0.50813955", "0.5057279", "0.5053374", "0.50442815", "0.5043868...
0.5739615
0
Submit a search request for Germplasm Attributes
def post_search_attributes( authorization: Optional[constr(regex=r'^Bearer .*$')] = Query( None, alias='Authorization' ), body: GermplasmAttributeSearchRequest = None, ) -> Union[GermplasmAttributeListResponse, Field202AcceptedSearchResponse]: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PostAttributeSearch(self, request, context):\n context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n context.set_details('Method not implemented!')\n raise NotImplementedError('Method not implemented!')", "def search(self, query):", "def get_search_parameters(self, name):\n\t\tparams = {}\n\t\tparams[...
[ "0.63733333", "0.616483", "0.60895747", "0.6018367", "0.5969769", "0.59631115", "0.5923306", "0.58425486", "0.5746906", "0.5731922", "0.5699176", "0.56560344", "0.5642121", "0.563909", "0.5630578", "0.5601194", "0.55978423", "0.5585836", "0.5553929", "0.5550289", "0.55487335"...
0.6327143
1
Submit a search request for Germplasm Attribute Values
def post_search_attributevalues( authorization: Optional[constr(regex=r'^Bearer .*$')] = Query( None, alias='Authorization' ), body: GermplasmAttributeValueSearchRequest = None, ) -> Union[GermplasmAttributeValueListResponse, Field202AcceptedSearchResponse]: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PostAttributeSearch(self, request, context):\n context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n context.set_details('Method not implemented!')\n raise NotImplementedError('Method not implemented!')", "def search(self, query):", "def post_search_attributes(\n authorization: Optional[constr(rege...
[ "0.6304787", "0.61514103", "0.61295056", "0.5977271", "0.58458835", "0.582855", "0.58228564", "0.58206433", "0.56517464", "0.5632575", "0.56116474", "0.5567423", "0.5562335", "0.5521162", "0.5517153", "0.5491101", "0.54780626", "0.54587454", "0.54570097", "0.54527915", "0.544...
0.6176366
1
Stores/updates the answer in the sqlite database.
def store(self) -> None: con, c = db.connect() if not db.exists('SELECT * FROM answers WHERE id = ?', self.id, con=con): c.execute('INSERT INTO answers VALUES (?, ?, ?, ?, ?, ?, ?)', (self.id, self.answer, self.likes, self.created, self.tell, self.user.id, self.parent_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_in_db(self):\n self.sql_database.table_name = self.table_db\n self.sql_database.db_name = self.db\n if self.sql_database.insert_item(text_path=self.path, word_first=self.word_1.get(),\n word_second=self.word_2.get(),\n ...
[ "0.69069976", "0.6643052", "0.6586425", "0.65801084", "0.65632874", "0.6535597", "0.64679", "0.6408999", "0.63363874", "0.6320574", "0.6298427", "0.6289796", "0.6279446", "0.62009656", "0.61841047", "0.6154114", "0.61537963", "0.61282855", "0.601876", "0.6005319", "0.59924555...
0.8279674
0
Asserts the messages.htm file in the Facebook dump can be found and saves its location for later usage in this module
def initialize(dump_directory="."): global _messages_file fb_message_filename = "html/messages.htm" _messages_file = os.path.join(dump_directory, fb_message_filename) if not os.path.isfile(_messages_file): print(""" The directory provided did not contain messages.htm, the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ttest_messages(self):\n self.login(\n app.config['USERNAME'],\n app.config['PASSWORD']\n )\n rv = self.app.post('/add', data=dict(\n title='<Hello>',\n text='<strong>HTML</strong> allowed here'\n ), follow_redirects=True)\n assert b...
[ "0.5705286", "0.5673753", "0.55702585", "0.5524049", "0.54223275", "0.5402138", "0.53846145", "0.5379307", "0.5317384", "0.5308413", "0.53063416", "0.5296559", "0.5262647", "0.52487755", "0.5237496", "0.51747113", "0.51670253", "0.5154805", "0.51279557", "0.51215595", "0.5116...
0.64103043
0
Tries to map the provided identifier for facebook to the name of the user
def resolve_user_id(fb_provided_identifier): fb_id_pattern_match = _FB_ID_PATTERN.match(fb_provided_identifier) if not fb_id_pattern_match: # fb_provided_identifier is not in the form # We are expecting (_FB_ID_PATTERN), # so it should not be mapped return fb_provided_identifier ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _manual_lookup(self, facebook_id, facebook_id_string):\n resp = self._session.get(\n 'https://www.facebook.com/%s' % facebook_id,\n allow_redirects=True, timeout=10\n )\n # No point in trying to get this using BeautifulSoup. The HTML here\n # is the very epitom...
[ "0.7153712", "0.62756395", "0.62513393", "0.616826", "0.60676646", "0.60315", "0.5966212", "0.5962096", "0.5961427", "0.5945935", "0.593729", "0.5874181", "0.58537513", "0.5821518", "0.5820027", "0.58175856", "0.5813852", "0.579311", "0.57922703", "0.5789563", "0.57862604", ...
0.70085585
1
Convert a string containing floating point CMYK to a string containing floating point RGB.
def cmykstring2rgbstring(s): c, m, y, k = [float(j) for j in s.split()] r, g, b = cmyk2rgb(c, m, y, k) return f"{r:.6f} {g:.6f} {b:.6f}"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def color_conversion(string):\n if (string == 'J'):\n return 0.14\n if (string == 'I'):\n return 0.28\n if (string == 'H'):\n return 0.42\n if (string == 'G'):\n return 0.56\n if (string == 'F'):\n return 0.70\n if (string == 'E'):\n return 0.84\n if (...
[ "0.7042149", "0.68205154", "0.65336984", "0.63970584", "0.61267006", "0.61093616", "0.60316396", "0.6030214", "0.5950676", "0.59441936", "0.5935679", "0.59104604", "0.5874035", "0.582385", "0.57444525", "0.5737379", "0.5733953", "0.5706634", "0.56880945", "0.5673844", "0.5598...
0.836875
0
Calculate the percent b for Bollinger band values of given dataframe.
def get_percent_b(data): if data is None: raise EmptyDataError('[!] Invalid data value') result = TA.PERCENT_B(data) if result is None: raise IndicatorException return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def percent_b(self) -> float:\n return self._percent_b", "def calculate_band(value, bands):\n for band in bands:\n if band > value:\n return band", "def percent_bias(x_arr, y_arr):\n delta = np.mean(x_arr) - np.mean(y_arr)\n denom = np.sqrt((np.var(x_arr) + np.var(y_arr)) / 2....
[ "0.6755464", "0.5696231", "0.5688687", "0.567889", "0.56577015", "0.5576227", "0.5554268", "0.5549845", "0.5538334", "0.5510047", "0.5486824", "0.5485633", "0.54644984", "0.5458092", "0.54313123", "0.5406273", "0.54009", "0.5381132", "0.5380744", "0.537681", "0.53644156", "...
0.6447695
1
Calculate Fibonacci pivot point.
def get_pivot_fib(data): if data is None: raise EmptyDataError('[!] Invalid data value') result = TA.PIVOT_FIB(data) if result is None: raise IndicatorException return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fib(index):\n return round((GR**index)/R5)", "def problem2(limit):\n index = 6\n total = 2\n while True:\n fib_n = fib(index)\n if fib_n <= limit:\n total += fib_n\n index += 3\n else:\n break\n return total", "def fibonacci(n):", "def ...
[ "0.66935045", "0.6545212", "0.6490429", "0.638323", "0.6350748", "0.628482", "0.62183374", "0.62171686", "0.6203544", "0.6201006", "0.6194163", "0.6186965", "0.61459553", "0.61321265", "0.6098191", "0.60949445", "0.6072646", "0.60579705", "0.60540205", "0.6035255", "0.6022667...
0.71014637
0
Calculate the QStick indicator of given dataframe.
def get_qstick(data): if data is None: raise EmptyDataError('[!] Invalid data value') result = TA.QSTICK(data) if result is None: raise IndicatorException return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ferry_data_QC(ferry, TH_abs, TH_u, TH_d):\n if type(ferry) is not xr.core.dataset.Dataset:\n raise ValueError('Ferry is not defined')\n # QC1: make nan all Absolute velocities that are greater than 6.5 m/s\n abs_u = ferry.eastward_absolute_water_velocity.where(\n (abs(ferry.eastward_abso...
[ "0.5548507", "0.53946453", "0.53575414", "0.5270051", "0.52557576", "0.5222448", "0.5205864", "0.5154176", "0.5139655", "0.51202375", "0.5077482", "0.50461346", "0.50302935", "0.50096893", "0.49911082", "0.496595", "0.49571842", "0.49203065", "0.4913841", "0.4911095", "0.4900...
0.65637976
0
Downloads the selected keys and returns a dictionary of xarray Datasets
def retrieve(self, selected_keys): if not isinstance(selected_keys, list): selected_keys = [selected_keys] # Select the keys we want to download key_dict = {key: self._results[key]["keys"] for key in selected_keys} results = defaultdict(dict) for key, dateranges in ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_datasets():\n datasets = {}\n for datafile in HERE.glob(\"*.csv.gz\"):\n index = False\n name = datafile.name[:-7]\n if \".indexed\" in name:\n name = name.replace(\".indexed\", \"\")\n index = True\n datasets[name] = {\"index\": index, \"file\": dat...
[ "0.6441696", "0.6342734", "0.6135613", "0.6011204", "0.596598", "0.59392834", "0.58940387", "0.56972826", "0.56912065", "0.56219697", "0.5612117", "0.558123", "0.55763495", "0.5570293", "0.55420387", "0.552462", "0.55161846", "0.5508887", "0.55005866", "0.5486021", "0.5484720...
0.6484685
0
Get all the edits in the queue, then execute them. The algorithm gets all edits, and then executes all of them. It does not pull off one edit, execute, repeat until the queue is empty, and that means that the queue might not be empty at the end of ``run_edits``, because new edits might have entered the queue while the ...
def get_and_run_edits(self): if self.empty(): return edits = [] while True: try: edits.append(self.get_nowait()) except queue.Empty: break for e in edits: try: e() except Excepti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def execute(self):\n for move in self._queue:\n move.execute()", "def run():\n curr = getcurrent()\n _run_calls.append(curr)\n _scheduler_remove(curr)\n try:\n schedule()\n assert not _squeue\n finally:\n _scheduler_append(curr)", "def run_pending(self):\n ...
[ "0.57101387", "0.5231929", "0.5227184", "0.5049614", "0.50330013", "0.5030209", "0.49871188", "0.49718112", "0.492354", "0.48987594", "0.48768955", "0.48674873", "0.4857593", "0.48346376", "0.48323318", "0.48292837", "0.48197904", "0.48057216", "0.47977448", "0.47940072", "0....
0.7934237
0
constructor reads in all associated words w/ this category from specified file location
def __init__(self, file_location, name): self.category_name = name self.associatedWords = [] # reset the instance so that class name is visible to self reference self.read_associated_words(file_location)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__ (self, languageFilename):\n if not isinstance(languageFilename, str): # Checks if the filename is entered as a string.\n raise TypeError('The filename must be a string')\n self._words = set()\n try:\n with open(languageFilename) as data:\n line...
[ "0.6941086", "0.67626715", "0.6733642", "0.6610899", "0.6595003", "0.6575396", "0.63854784", "0.6376412", "0.6299852", "0.6273629", "0.62441474", "0.62342405", "0.6223162", "0.61930317", "0.615311", "0.61307865", "0.61257255", "0.6083725", "0.6075572", "0.60321593", "0.602980...
0.8039725
0
reads in all associated words w/ this category
def read_associated_words(self, file_location): with open(file_location, 'rt', encoding='utf-8') as csvfile: wordreader = csv.reader(csvfile, delimiter=',', quotechar='|') for row in wordreader: for word in row: self.associatedWords.append(word)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wordsByCategoryName(self, category):\n\t\ttry:\n\t\t\treturn (self.dictData[category])\n\t\texcept KeyError:\n\t\t\tprint (\"La categoría ingresada no existe.\")", "def get_words(self):\n words = self.wiki.get_words(cleaner=self.cleaner)\n df = pd.DataFrame({\"word\": words})\n df = df.d...
[ "0.6645934", "0.6495823", "0.6343733", "0.606668", "0.59635323", "0.5857648", "0.5799395", "0.57908744", "0.5769561", "0.5741228", "0.572905", "0.5726776", "0.5723046", "0.5719667", "0.57039535", "0.5701957", "0.5635061", "0.55928344", "0.55928344", "0.5579448", "0.5577349", ...
0.65803564
1
checks if a commit belongs to this category by analyzing its commit message. boolean
def belongs(self, commit_msg): # if self.category_name == "Corrective": # patterns = [r'TO #\d+',r'FIX #\d+'] # for pattern in patterns: # if re.search(pattern,commit_msg,re.IGNORECASE) != None: # return True commit_msg = commit_msg.lower().spl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def something_to_commit():\n\n # Procelain returns nothing if there's nothing to commit\n ret = subprocess.check_output([\"git\", \"status\", \"--porcelain\"])\n\n if (len(ret) > 0):\n return True\n\n return False", "def is_new_commit(self, commit, cache):\n\n return (commit.id not in c...
[ "0.6578913", "0.63028985", "0.62910825", "0.6171852", "0.6163462", "0.6152981", "0.61194307", "0.59946", "0.58318406", "0.58077", "0.5804606", "0.57519174", "0.57174957", "0.5713901", "0.56629765", "0.55595255", "0.5539709", "0.55147064", "0.5475954", "0.5465391", "0.54643315...
0.6511109
1
returns the name of the category
def get_name(self): return self.category_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def category_name(self):\n return self.category.name", "def get_category_name(self):\n return self._ctx.get(\"name\", self._ctx[\"id\"])", "def name(self) -> str:\n return str(self.category.value)", "def category_name(self):\n try:\n category = self.proto.category.paren...
[ "0.9068063", "0.8722485", "0.8506539", "0.84734535", "0.84050316", "0.8374542", "0.83245224", "0.8021976", "0.8008453", "0.8008453", "0.79978114", "0.79790866", "0.79735017", "0.7836228", "0.7750591", "0.77092224", "0.7682434", "0.76673347", "0.7519273", "0.7519273", "0.75192...
0.89166725
1
Add example images from validation step just before the end of epoch training.
def pre_epoch_finish(self, input, output, metric_manager, train_stage: TrainStage): if train_stage == TrainStage.VALIDATE: generated_imgs, _, _, _, real_imgs = output self.add_generated_image( generated_imgs, nrow=self.display_imgs, height=self.height, wid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _add_images(self, epoch, train_batch, train_outputs, valid_batch, valid_outputs):\n raise NotImplementedError", "def validation_step(self, *args: Any, **kwargs: Any) -> None:\n batch = args[0]\n batch_idx = args[1]\n x = batch[\"image\"]\n y = batch[\"mask\"]\n y_hat...
[ "0.72593313", "0.68180865", "0.6365877", "0.62507015", "0.62291545", "0.62089425", "0.61836976", "0.60631335", "0.60622555", "0.59737265", "0.59521", "0.5930284", "0.5926477", "0.5890381", "0.5866923", "0.58662957", "0.5840874", "0.5835551", "0.5830301", "0.5805428", "0.57943...
0.7097236
1
Remove transactions that haven't cleared. USAA labels transactions as "posted" if it has been confirmed / cleared. Removing unposted debits / credits filters out the temporary information.
def _remove_unconfirmed_transactions(frame): frame.drop(frame.loc[frame['posted'] == False].index, inplace=True) return frame
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_existing_customers(self):\n # remove the customers which are not active (.is_active )\n self.to_move = False\n #for cust in self.customers:\n # print(cust.state)\n self.customers = [cust for cust in self.customers if cust.state != 'checkout']\n #if cust.t...
[ "0.59069633", "0.58232784", "0.5738553", "0.57195294", "0.56886846", "0.56493396", "0.5644709", "0.5633155", "0.55795133", "0.5406209", "0.5403424", "0.53915113", "0.5386159", "0.53705055", "0.5344936", "0.5296469", "0.5279621", "0.52556336", "0.5220535", "0.5217002", "0.5210...
0.75808173
0
True if the input file has the expected column count.
def check_column_count(cls, line): # MAGIC n_cols = n_delim + 1 (no trailing delimiter) cols = line.count(cls.DELIMITER) + 1 expected = 7 # MAGIC USAA convention, not all are populated though return cols == expected
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_csv(filename, header, cols, rows):\n\n # open file\n data = pd.read_csv(filename, delimiter='|')\n\n # validate header\n assert header == '|'.join(list(data.columns.values))\n\n # validate column count\n assert data.shape[1] == cols\n\n # validate row count\n assert data.shape[...
[ "0.6716031", "0.66669893", "0.6572388", "0.6439016", "0.6356936", "0.6305089", "0.62905955", "0.6206614", "0.61629325", "0.6160195", "0.61299366", "0.61041373", "0.609446", "0.60682875", "0.60517627", "0.60458726", "0.6033479", "0.60077685", "0.6006416", "0.59526783", "0.5946...
0.81323093
0
Return a rule that combines all the other rules.
def combine(*rules): def rule(symbol): for r in rules: result = r(symbol) if result is not None: return result return rule
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compile_rule(self, cmd):\n cfg, rules = self.config, self.rules\n if cmd == None:\n return Rule()\n if isinstance(cmd, dict):\n r = []\n if 'as' in cmd:\n r += [self.compile_rule(cmd['as'])]\n if 'find' in cmd:\n r +...
[ "0.67277527", "0.64279395", "0.6336341", "0.63086694", "0.62339693", "0.61356467", "0.6127985", "0.60564697", "0.5999981", "0.5981532", "0.5946726", "0.58983195", "0.58983195", "0.5892907", "0.58374155", "0.58368623", "0.5814092", "0.5814092", "0.57034874", "0.56955075", "0.5...
0.7218224
0
Return a rule that combines all the other rules, inverted.
def invert(*rules): def rule(symbol): for r in rules: result = r(symbol) if result is not None: return not result return rule
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reversed(self) -> \"ConversionRule\":\n return ConversionRule(\n factors_categories_a=self.factors_categories_b,\n factors_categories_b=self.factors_categories_a,\n auxiliary_categories=self.auxiliary_categories,\n comment=self.comment,\n csv_line_n...
[ "0.650421", "0.6429384", "0.59779906", "0.5972173", "0.5807686", "0.5744636", "0.5657112", "0.5651569", "0.56488776", "0.5637576", "0.5588684", "0.55815774", "0.55285984", "0.5517738", "0.54881024", "0.54657876", "0.5463242", "0.5432689", "0.5402106", "0.53791577", "0.5367707...
0.6529788
0
Returns a rule that matches symbols that start with `name`.
def prefix(name): def rule(symbol): return symbol.startswith(name) or None return rule
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fuzz_by_name(self, name):\n self.fuzz_single_node_by_path(re.split('->', name))", "def name_startswith(self, name):\n matches = [\n entry\n for entry in self\n if entry is not None and entry.name.startswith(name)\n ]\n return matches", "def get_r...
[ "0.6070791", "0.6057224", "0.5953903", "0.5944083", "0.5766332", "0.5760553", "0.5716832", "0.56984437", "0.5663661", "0.554733", "0.5408483", "0.53502303", "0.53404063", "0.5333337", "0.5312788", "0.5304694", "0.53042454", "0.5304086", "0.5279189", "0.5276322", "0.5242773", ...
0.786792
0
A rule that matches toplevel symbols.
def top_level(symbol): return (symbol and ('.' not in symbol)) or None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self: 'Leaf', symbol: str) -> None:\n RegexTree.__init__(self, symbol, [])", "def binary_symbol_pattern():\n return (\n Pattern._var() + symbol() + Pattern._var() +\n Pattern.precedence_level().possibly()\n )", "def prefix(name):\n def rule(symbol)...
[ "0.5767851", "0.5453861", "0.5320165", "0.5144085", "0.51271427", "0.51242083", "0.5085474", "0.50838226", "0.49596024", "0.49522105", "0.49469292", "0.49258763", "0.48992896", "0.48745644", "0.48684523", "0.48581654", "0.48189384", "0.47892785", "0.47684112", "0.47569567", "...
0.60573566
0
Creates an Image from a numpy ndarray object. The format may be 'RGB' or 'RGBA'. If a size is specified, the array will be implicitly reshaped to that size, otherwise the size is inferred from the first two dimensions of the array.
def image_from_ndarray(array, format, size = None): if array.itemsize <> 1: raise ValueError("Color component size must be 1 byte") if size is not None: width, height = size data_size = array.size pixel_size = data_size // (width * height) if pixel_size <> len(format): raise ValueError("Array has wrong s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fromarray(obj, mode=None):\r\n if isinstance(obj, np.ndarray):\r\n _mode = Image()._get_mode(obj.shape, obj.dtype)\r\n if _mode == 'RGB':\r\n obj = cv2.cvtColor(obj, cv2.COLOR_RGB2BGR)\r\n elif mode == \"RGBA\":\r\n obj = cv2.cvtColor(obj, cv2.COLOR_RGBA2BGRA)\r\n ...
[ "0.6886535", "0.68577886", "0.6810634", "0.68098444", "0.679235", "0.6758308", "0.6635669", "0.6484383", "0.645007", "0.64300656", "0.6303361", "0.62902", "0.6270004", "0.60437775", "0.6000727", "0.5981661", "0.590255", "0.58883786", "0.5841458", "0.5821051", "0.5787234", "...
0.81061274
0
Perform an interruptible epoll_wait, calling callbacks with any events. We take care to store the running state of this method on the object, so that if we're cancelled, someone else can continue the call without dropping any events. It would be nice if we didn't have to do that manually; see "shared coroutine" notion ...
async def do_wait(self) -> None: async with self.running_wait.needs_run() as needs_run: if needs_run: for number in self.pending_remove: del self.number_to_cb[number] self.pending_remove = set() maxevents = 32 if sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def poll(self, poll_timeout):\n self.latest_poll_time = current_time()\n\n callbacks, self._callbacks = self._callbacks[:], []\n\n for timer in callbacks:\n try:\n timer.function()\n except Exception:\n log.exception(\"Exception raised while ...
[ "0.6105604", "0.5967324", "0.5822933", "0.5782656", "0.57593894", "0.57268625", "0.56343025", "0.54932696", "0.54140204", "0.54088587", "0.539946", "0.53702486", "0.5360539", "0.5305276", "0.5297108", "0.52932584", "0.5278314", "0.52524126", "0.523766", "0.52201563", "0.52077...
0.662377
0
Make a subsidiary epoller, as described in the module docstring. We delegate responsibility for blocking to wait for new events to some other component. We call the passedin wait_readable function to block for new events.
def make_subsidiary(ram: RAM, epfd: FileDescriptor, wait_readable: t.Callable[[], t.Awaitable[None]]) -> Epoller: center = Epoller(EpollWaiter(ram, epfd, wait_readable, 0), ram, epfd) return center
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inherit(self, ram: RAM) -> Epoller:\n return Epoller(self.epoll_waiter, ram, ram.task.make_fd_handle(self.epfd))", "async def make(epoller: Epoller, ram: RAM, fd: FileDescriptor) -> AsyncFileDescriptor:\n status = FDStatus(EPOLL.NONE)\n epolled = await epoller.register(\n fd, ...
[ "0.6097022", "0.5795545", "0.54675144", "0.52809054", "0.5191281", "0.5179795", "0.51675886", "0.5065235", "0.50591904", "0.50471985", "0.50308615", "0.49129266", "0.49069068", "0.48429117", "0.48429117", "0.48214987", "0.4816606", "0.4803823", "0.4786772", "0.47835854", "0.4...
0.66900766
0
Make a root epoller, as described in the module docstring. We take responsibility for blocking to wait for new events for every other component in this thread. We pull the activity_fd from the SyscallInterface and register it on our epollfd. The activity_fd is readable whenever some other component in the thread wants ...
async def make_root(ram: RAM, task: Task) -> Epoller: activity_fd = task.sysif.get_activity_fd() if activity_fd is None: raise Exception("can't make a root epoll center if we don't have an activity_fd to monitor") epfd = await task.epoll_create() center = Epoller(EpollWaiter(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def make(epoller: Epoller, ram: RAM, fd: FileDescriptor) -> AsyncFileDescriptor:\n status = FDStatus(EPOLL.NONE)\n epolled = await epoller.register(\n fd, EPOLL.IN|EPOLL.OUT|EPOLL.RDHUP|EPOLL.PRI|EPOLL.ERR|EPOLL.HUP|EPOLL.ET,\n status.posedge,\n )\n return As...
[ "0.6300236", "0.60647976", "0.5741806", "0.558189", "0.5523016", "0.52225786", "0.52225786", "0.5220824", "0.52124107", "0.5206611", "0.51220876", "0.5060247", "0.5056893", "0.5041932", "0.501551", "0.5012656", "0.49834153", "0.498269", "0.49642462", "0.4945048", "0.4899053",...
0.68373346
0
Make a new Epoller which shares the same EpollWaiter class. We inherit the epollfd to a new task for the purpose of registering new fds on it; but we share the class and task which actually calls epoll_wait.
def inherit(self, ram: RAM) -> Epoller: return Epoller(self.epoll_waiter, ram, ram.task.make_fd_handle(self.epfd))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def make(epoller: Epoller, ram: RAM, fd: FileDescriptor) -> AsyncFileDescriptor:\n status = FDStatus(EPOLL.NONE)\n epolled = await epoller.register(\n fd, EPOLL.IN|EPOLL.OUT|EPOLL.RDHUP|EPOLL.PRI|EPOLL.ERR|EPOLL.HUP|EPOLL.ET,\n status.posedge,\n )\n return As...
[ "0.64243", "0.62948364", "0.5804244", "0.5804244", "0.549132", "0.52063644", "0.5178037", "0.5142833", "0.51293707", "0.50464976", "0.50464976", "0.5039993", "0.50005317", "0.49696732", "0.49672776", "0.4929856", "0.4880861", "0.4880861", "0.4880861", "0.47841814", "0.4768397...
0.7581962
0
Register a file descriptor on this epollfd, for the given events, calling the passed callback. The return value can be used to wait for callback calls, modify the events registered for this file descriptor, and delete the file descriptor from this epollfd.
async def register(self, fd: FileDescriptor, events: EPOLL, cb: t.Callable[[EPOLL], None]) -> EpolledFileDescriptor: number = self.epoll_waiter.add_and_allocate_number(cb) await self.epfd.epoll_ctl(EPOLL_CTL.ADD, fd, await self.ram.ptr(EpollEvent(number, events))) return E...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def register(self, fd):\n if fd not in self._fds:\n self._fds.append(fd)", "def start(self, events, callback):\n\n def cb_wrapper(uv_poll_t, status, events):\n callback(self, status, events)\n\n self._ffi_cb = ffi.callback('void (*)(uv_poll_t *, int, int)', cb_wrapper)\...
[ "0.54776704", "0.5453065", "0.5450676", "0.5378399", "0.53181183", "0.52710134", "0.5266686", "0.51593554", "0.5096348", "0.5096348", "0.5056609", "0.49452212", "0.48359776", "0.4822156", "0.4794035", "0.4775084", "0.47521576", "0.4726873", "0.4723494", "0.47212037", "0.46961...
0.753165
0
Make an AsyncFileDescriptor; make sure to call this with only O.NONBLOCK file descriptors. It won't actually break anything if this is called with file descriptors not in NONBLOCK mode; it just means that they'll block when we go to read, which is probably not what the user wants.
async def make(epoller: Epoller, ram: RAM, fd: FileDescriptor) -> AsyncFileDescriptor: status = FDStatus(EPOLL.NONE) epolled = await epoller.register( fd, EPOLL.IN|EPOLL.OUT|EPOLL.RDHUP|EPOLL.PRI|EPOLL.ERR|EPOLL.HUP|EPOLL.ET, status.posedge, ) return AsyncFileDesc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def with_handle(self, fd: FileDescriptor) -> AsyncFileDescriptor:\n return AsyncFileDescriptor(self.ram, fd, self.status, self.epolled)", "def __setNonBlocking(fd):\n flags = fcntl.fcntl(fd, fcntl.F_GETFL)\n flags = flags | os.O_NONBLOCK\n fcntl.fcntl(fd, fcntl.F_SETFL, flags)", "de...
[ "0.73803633", "0.62454563", "0.61789644", "0.61403185", "0.6112219", "0.55478466", "0.5487987", "0.54541755", "0.5344068", "0.5327343", "0.5309983", "0.52755606", "0.5136558", "0.51323277", "0.5109924", "0.49463588", "0.48783073", "0.4876187", "0.48146", "0.47435385", "0.4709...
0.6260577
1
Return a new AFD using this new FD handle for making syscalls. This is useful when we want to change what task we're making syscalls in when using this AFD.
def with_handle(self, fd: FileDescriptor) -> AsyncFileDescriptor: return AsyncFileDescriptor(self.ram, fd, self.status, self.epolled)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def make(epoller: Epoller, ram: RAM, fd: FileDescriptor) -> AsyncFileDescriptor:\n status = FDStatus(EPOLL.NONE)\n epolled = await epoller.register(\n fd, EPOLL.IN|EPOLL.OUT|EPOLL.RDHUP|EPOLL.PRI|EPOLL.ERR|EPOLL.HUP|EPOLL.ET,\n status.posedge,\n )\n return As...
[ "0.5519936", "0.536563", "0.53356636", "0.5181081", "0.51775277", "0.51409495", "0.5112925", "0.5050931", "0.50426495", "0.5011069", "0.4964682", "0.4929691", "0.49264705", "0.4711051", "0.46778992", "0.46667838", "0.46513033", "0.46373934", "0.46065158", "0.45969737", "0.457...
0.6332792
0
Read a sizeprefixed array of sizeprefixed bytestrings, with each bytestring containing '=', into a dict. This is the format we expect for envp, which is written to us on startup by nonchild threads. We assume that the environment is correctly formed; that is, each element contains '='. If that's not true, we'll throw a...
async def read_envp(self, length: int) -> t.Dict[bytes, bytes]: raw = await self.read_length_prefixed_array(length) environ: t.Dict[bytes, bytes] = {} for elem in raw: key, val = elem.split(b"=", 1) environ[key] = val return environ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _env(env):\n return dict((key.strip(), val)\n for line in env.strip().splitlines()\n for key, _, val in [line.partition('=')])", "def env_lines_to_dict(self, env_lines):\n env_dict = {}\n for env_line in env_lines:\n split_env_line = shlex.split(env_line)\n ...
[ "0.7215772", "0.6895297", "0.66043603", "0.6603137", "0.659407", "0.6410967", "0.6395798", "0.6348878", "0.633221", "0.61753106", "0.6143367", "0.6111592", "0.6021396", "0.5912533", "0.5882111", "0.58644074", "0.58538973", "0.58039504", "0.578983", "0.57661223", "0.5761103", ...
0.74943686
0
Adds outliers based on the given configuration to the base line
def add_outliers(self, config): OUTLIER_GENERATORS = {'extreme': MultivariateExtremeOutlierGenerator, 'shift': MultivariateShiftOutlierGenerator, 'trend': MultivariateTrendOutlierGenerator, 'variance': MultivariateVariance...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _introduce_outlier(self, row, column_target):\n # print('introduce outliers')\n sigma, maximum, minimum = self.feature_stats.loc[column_target][['std', 'max', 'min']].to_numpy()\n if np.random.random() < 0.5:\n # print(\"############INTRODUCE OUTLIER IF ########\",RAND)\n\n ...
[ "0.589313", "0.53155863", "0.52194333", "0.52070546", "0.5182835", "0.51827985", "0.5173553", "0.51621395", "0.5123073", "0.5121408", "0.5113796", "0.506454", "0.5063576", "0.5044219", "0.50334024", "0.5020642", "0.50188535", "0.50088096", "0.50062543", "0.49723503", "0.49719...
0.63981295
0
Get path to .eva.yml source path. This file will be copied to user's .eva directory.
def get_base_config(eva_installation_dir: Path) -> Path: # if eva package is installed into environment if importlib_resources.is_resource("eva", EVA_CONFIG_FILE): with importlib_resources.path("eva", EVA_CONFIG_FILE) as yml_path: return yml_path else: # For local dev environment...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetSrc():\n return os.path.abspath(os.path.join(_THIS_DIR, os.pardir, os.pardir,\n os.pardir))", "def source_root_dir():\n return os.path.abspath(os.path.dirname(__file__))", "def _get_path(): # THIS IS JUST FOR GETTING THE FILE\n return os.path.dirname(os.path....
[ "0.6970994", "0.66567016", "0.6614445", "0.6474654", "0.6442927", "0.63808626", "0.6359747", "0.6348", "0.63458693", "0.6283878", "0.6259253", "0.6251252", "0.624693", "0.62162316", "0.6177455", "0.6158472", "0.6146508", "0.6139442", "0.6113629", "0.6099703", "0.60947764", ...
0.7064225
0
Autocheck to see if some important variables do not have a problem (e.g. NAN values).
def _autocheck_nan(self): # assert np.isnan(self.W).any() == False, "W matrix should not contain NaN values." assert np.isnan(self.Win).any() == False, "Win matrix should not contain NaN values." if self.Wfb is not None: assert np.isnan(self.Wfb).any() == False, "Wfb matrix should no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_missings(df):\n \n import numpy as np\n import pandas as pd\n \n #make a list of the variables that contain missing values\n vars_with_na = [var for var in df.columns if df[var].isnull().sum()>1]\n miss_pred = pd.isnull(df[vars_with_na]).sum().sort_values(ascending=False)\n # prin...
[ "0.698746", "0.6619338", "0.66140956", "0.65936476", "0.6486346", "0.6451714", "0.6419469", "0.6415935", "0.6395993", "0.636473", "0.6355156", "0.6353178", "0.63273937", "0.6312749", "0.62675864", "0.6238982", "0.6186435", "0.6175119", "0.6163771", "0.61523044", "0.61264277",...
0.7026942
0
Reset reservoir by setting internal values to zero
def reset_reservoir(self): self.state = np.zeros((self.state_size,1),dtype=self.typefloat)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self):\n for i in range(0, len(self.current_state)):\n self.current_state[i] = 0\n\n for i in range(0, len(self.weights)):\n self.weights[i] = 0", "def reset(self) -> None:\n self.current = 0\n self.num_cuts = 0", "def reset(self):\n self._tota...
[ "0.74597675", "0.74589753", "0.7338142", "0.73011976", "0.7298493", "0.7295907", "0.7284026", "0.7284026", "0.7216253", "0.7205385", "0.7189206", "0.7177992", "0.71675295", "0.7163853", "0.7160688", "0.70904475", "0.7082232", "0.70653415", "0.70588523", "0.7033606", "0.702353...
0.78150654
0
Run the model on a sequence of inputs, and returned the states and readouts vectors.
def run(self, inputs: Sequence[np.ndarray], verbose: bool=False) -> Tuple[Sequence[np.ndarray], Sequence[np.ndarray]]: inputs_concat = [inp[t,:] for inp in inputs for t in range(inp.shape[0])] steps = np.sum([i.shape[0] for i in inputs]) if verbose: print(f"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_model(model):\n\n model.create_initialised_input()\n\n model.run_from_buffer()\n\n output = model.output_parse()\n return output", "def run(self, inputs, **kwargs):\n graph = self.model.graph\n # last_layers means we run this model until the last #N layers\n last_layers =...
[ "0.65314835", "0.6201062", "0.60202986", "0.5908771", "0.589728", "0.587849", "0.5863387", "0.5834885", "0.58271676", "0.57901555", "0.57857937", "0.57831436", "0.5776718", "0.576671", "0.57566184", "0.57438666", "0.57413876", "0.5728524", "0.5714826", "0.5698872", "0.5685066...
0.6757505
0
If old_corr_mat_inv is an approximation for the correlation matrix inverse of a dataset (p1, ..., pn), then the function returns an approximatrion for the correlation matrix inverse of dataset (p1, ..., pn, new_data)
def _new_correlation_matrix_inverse(new_data, old_corr_mat_inv): P = old_corr_mat_inv x = new_data # TODO : numerical instabilities if xTP is not computed first (order of multiplications) xTP = x.T @ P P = P - (P @ x @ xTP)/(1. + np.dot(xTP, x)) return P
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inverse(self,mat):\n result = np.linalg.inv(mat)\n self.out = result\n return self.out", "def inverse(self):\n data = np.linalg.inv(self._data)\n return self.create(self.rows, self.cols, data)", "def Inverse(self, freedofs: pyngcore.BitArray = None, inverse: str = '') -> ...
[ "0.62337655", "0.5850273", "0.5605754", "0.5605754", "0.55611527", "0.5553032", "0.5532508", "0.54951423", "0.54801476", "0.5457848", "0.54398435", "0.54170996", "0.5384555", "0.5373424", "0.5345962", "0.53337646", "0.53094935", "0.5297381", "0.528379", "0.52693945", "0.52455...
0.8637455
0
Invalidate existing tokens issued for this user.
def invalidate_existing_tokens(self, client_id, user): app = Application.objects.get(client_id=client_id) tokens = AccessToken.objects.filter(user=user, application=app) tokens.delete()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def expire_token(self):\n self.user_in_db = User.users_db.get(self.email)\n\n self.user_in_db.update({'token': ''})\n\n User.users_db.put(self.user_in_db)\n\n return {'success': True}", "def _purge_expired_user_tokens():\n expired = models.Token.query.filter_by(\n _user_fk=c...
[ "0.6913114", "0.67849505", "0.6450037", "0.6365823", "0.62868136", "0.62628525", "0.62393385", "0.61448014", "0.6139599", "0.61256796", "0.61163163", "0.6116211", "0.6102149", "0.6093293", "0.60893947", "0.6069814", "0.5999578", "0.5996173", "0.5985803", "0.5959749", "0.59451...
0.7791725
0
Add instance of quantize config class to the global list.
def add_config_object(config_object: "BaseConfig") -> None: assert ( len(G_CONFIG_OBJECT) == 0 ), "Looks like previous quatize object is alive. Did you call clear() on the object?" G_CONFIG_OBJECT.append(config_object)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def register_config(cls):\n _configs[cls.__name__] = cls", "def addconfiguration(self, name, q, unit='rad'):\n v = getvector(q, self.n)\n v = getunit(v, unit)\n self._configdict[name] = v\n setattr(self, name, v)", "def register_config(self, config):\n self.config = config...
[ "0.6045949", "0.5872532", "0.56113875", "0.54862934", "0.54753906", "0.53766334", "0.535181", "0.5317617", "0.53111964", "0.5255113", "0.5240271", "0.5218812", "0.5159698", "0.5146262", "0.5132604", "0.5105993", "0.50844115", "0.5076094", "0.50653505", "0.50653505", "0.505890...
0.59354746
1
Remove instance of quantize config class from the global list.
def remove_config_object() -> None: if G_CONFIG_OBJECT: G_CONFIG_OBJECT.clear()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __del__(self):\r\n del self.addons", "def tearDownClass(cls):\n cls.runModule(\"g.remove\", flags=\"rf\", type=\"vector\",\n name=\"gbif_poa3\")\n cls.del_temp_region()", "def clear_quantities(shared):\n\n del_list = [i for i, fm in enumerate(shared...
[ "0.5950699", "0.5797993", "0.57602096", "0.5682418", "0.5666054", "0.56004983", "0.5563779", "0.55631286", "0.5553813", "0.5499015", "0.54760677", "0.54371387", "0.5425191", "0.5407321", "0.5381912", "0.53784806", "0.5354165", "0.53504956", "0.53504956", "0.53504956", "0.5350...
0.63751787
0
Return quantize config class object
def get_config_object() -> "BaseConfig": assert ( len(G_CONFIG_OBJECT) == 1 ), "Have you created quantize config object before calling `quantize_model`?" if G_CONFIG_OBJECT: return G_CONFIG_OBJECT[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config():\n name = 'dynamic_pricing'\n num_products = 5\n scale = 1\n noise_var = 10\n p_max = 1\n\n agents = collections.OrderedDict(\n [('bsPricing',\n functools.partial(BootstrapDynamicPricing,\n num_products, scale, noise_var, p_max))]\n )\n\n environments =...
[ "0.6292881", "0.628295", "0.6153716", "0.6138943", "0.60848856", "0.608355", "0.6077801", "0.6077801", "0.6042524", "0.5960874", "0.59447587", "0.5915878", "0.58968484", "0.58963376", "0.58963376", "0.58963376", "0.58367944", "0.5834901", "0.58164454", "0.5815685", "0.5789725...
0.7425726
0
This function calculates the market value of all simulated technologies.
def market_value(dh: DataHandler): scenario_order = [ str(dh.scenarios.active_scenarios[keys]["name"]) for keys in dh.scenarios.active_scenarios ] # adding all vintage classes together df_supply = dh.get("o_supply").groupby(["r", "tec_supply", "t"]).sum() df_supply = df_supply.stack...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def simulate_trading(self):\n self._generate_trading_instances()\n self._run_backtest()\n self.portfolio.output_equity()\n res=self.portfolio.get_statistics()\n self.plot.plot_equity()\n return res", "def total_market_value(self):\n return self.pos_handler.total_m...
[ "0.6336138", "0.59560794", "0.58936256", "0.5855897", "0.58363926", "0.5775779", "0.56464887", "0.5641966", "0.5589091", "0.5561606", "0.5520114", "0.55123943", "0.5475496", "0.5474482", "0.54706997", "0.54225326", "0.54210335", "0.54210335", "0.54159886", "0.53869253", "0.53...
0.664783
0
This function calculates full load hours for all simulated technologies for all regions.
def full_load_hours(dh: DataHandler): gen_df = dh.get("o_supply") gen_df.index.names = change_tec_lvl_name_to_alltec(gen_df.index.names) cap_df = dh.get("o_capa") # In not all hours of the year are simulated, generation needs to be scaled by sc sc = 8760 / len(gen_df.index.get_level_values("t").uni...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getHourlyLoads(self):\n\n\t\tloads_data = self.getDataForLoadComparisons()\n\t\tload_values = [] # Array that will contain all the load data\n\t\tload_data = {} # Dictionary of load data\n\t\thour = 0 # Counter that determines the 24 hours in a day\n\n\t\t# Parsing load data\n\t\ttoday = self.he...
[ "0.6167878", "0.55146265", "0.5493105", "0.5485358", "0.53821945", "0.5340766", "0.5262669", "0.5251026", "0.52447903", "0.52302915", "0.5228154", "0.52249765", "0.5213609", "0.5202628", "0.5184404", "0.5184391", "0.5175788", "0.5165517", "0.51393294", "0.51185465", "0.510726...
0.68444955
0
This function creates a DataFrame of the electricity balance of all regions.
def electricity_balance(dh: DataHandler): # creates DataFrame of all electricity flows in TWh with index = ['alltec','r'] supply = dh.get("o_supply").groupby(["tec_supply", "r"]).sum() supply.index.names = ["alltec", "r"] supply = pd.concat([supply], keys=["supply"], names=["type"]) demand = dh.get(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_operation_balance_sheet(self):\n date_list = Operation_Invoice.objects.all().dates('origin', 'year')\n\n for years in date_list:\n Operation_Invoice.objects.filter(origin__year = years.year)\n\n expenses = 0\n balances = 0\n un_paid_count = 0\n conflicts...
[ "0.58328724", "0.57492054", "0.57220864", "0.56592655", "0.56283814", "0.55676305", "0.55500203", "0.5539761", "0.5522383", "0.5430314", "0.53675157", "0.5343915", "0.53427184", "0.53288674", "0.53116316", "0.528094", "0.5273634", "0.5263308", "0.5242708", "0.5237714", "0.522...
0.68846506
0
This function creates a DataFrame of the hydrogen balance of all regions.
def hydrogen_balance(dh: DataHandler): supply = ( dh.get("o_h2_gene").fillna(0).groupby(["tec_h2d", "r"]).sum().astype("Float64") ) supply.index.names = ["alltec", "r"] demand = ( dh.get("o_h2_usage") .fillna(0) .groupby(["tec_h2g", "r"]) .sum() .mul(-1) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def electricity_balance(dh: DataHandler):\n # creates DataFrame of all electricity flows in TWh with index = ['alltec','r']\n supply = dh.get(\"o_supply\").groupby([\"tec_supply\", \"r\"]).sum()\n supply.index.names = [\"alltec\", \"r\"]\n supply = pd.concat([supply], keys=[\"supply\"], names=[\"type\"...
[ "0.57196116", "0.5498928", "0.54071397", "0.5324006", "0.523702", "0.5171073", "0.51460904", "0.5129424", "0.50873667", "0.50807357", "0.50374055", "0.50161636", "0.50022745", "0.49439493", "0.4913101", "0.4887531", "0.4880016", "0.48761013", "0.4867963", "0.4843497", "0.4815...
0.6029688
0
This function pivots the price DataFrame of all regions.
def pdc_pivot(dh: DataHandler): df = dh.get("o_prices") df = df.reset_index().pivot(index="t", columns="r") for col in df.columns: df[col] = sorted(df[col]) df = df.reset_index(drop=True) return df
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pivot(s1_data: dict):\n s1_df = pd.DataFrame(s1_data, index=[0])\n\n s1_df = pd.pivot_table(s1_df, index=['PLANT_ID', 'TIMESTAMPLOCAL'],\n\t\t\t columns='TAG_TYPE', values=\"VALUE\",\n\t aggfunc=[sum])\n\n if s1_df['PLANT_ID'] = 503:\n s1_df_503 = pd.loc(s1_df['PLANT_ID'] == 5...
[ "0.5885518", "0.5851335", "0.5815203", "0.5792957", "0.5766836", "0.5728531", "0.5631021", "0.5590136", "0.5577737", "0.53386146", "0.5319494", "0.5250392", "0.52153224", "0.51873064", "0.5134582", "0.5116254", "0.51117384", "0.502042", "0.50052005", "0.49932662", "0.4946836"...
0.6719031
0
This function calculates the total investment costs of all regions and technologies.
def total_investment_costs(dh: DataHandler): # discountrate series with index: scenarios discount_rate = dh.get("scalars").loc["discountrate", :] sc = 8760 / dh.scenarios.hours scen_hor_map = dh.scenarios.horizon # investment costs dataframe with columns: scenarios and index: alltec inv = dh.g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _calculate_costs(self):\n cost = 0\n cost += self._cost_route_fine()\n cost += self._cost_petrol()\n cost += self._cost_wage()\n cost += self._cost_refueling()\n cost += self._cost_caught_by_police()\n cost += self._cost_vehicle_malfunction()\n return cos...
[ "0.63196385", "0.60729337", "0.6046727", "0.60354906", "0.6030218", "0.6025301", "0.60251653", "0.60047233", "0.59269637", "0.5908114", "0.5882564", "0.5792792", "0.5760947", "0.57504", "0.5725154", "0.5656901", "0.56521887", "0.56355023", "0.56252986", "0.5595133", "0.557262...
0.67882717
0
This function calculates variable costs of all technologies in all regions.
def variable_costs(dh: DataHandler): print("PtHydrogen not implemented") scen_hor_map = dh.scenarios.horizon cost_var = dh.get("i_cost").xs("varcost", level="par_cost") cost_var = cost_var.groupby(["alltec"]).apply( extract_horizon_specific_cost, scen_hor_map ) cost_var = add_dimension...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_costs(data, costs, simulation_parameters, site_radius, environment):\n inter_site_distance = site_radius * 2\n site_area_km2 = math.sqrt(3) / 2 * inter_site_distance ** 2 / 1e6\n sites_per_km2 = 1 / site_area_km2\n\n for key, value in simulation_parameters.items():\n if key == 'bac...
[ "0.602219", "0.5792515", "0.5732055", "0.56610703", "0.56389534", "0.55846244", "0.54889417", "0.54858124", "0.5484627", "0.545478", "0.5406301", "0.53866524", "0.5386245", "0.5382386", "0.53396386", "0.5282967", "0.5250495", "0.5249011", "0.5227258", "0.5226358", "0.5222038"...
0.63581795
0
Initialize with title, width and height. Invoke this function to deal with layout settings.
def __init__(self, title, width, height): super(BaseApp, self).__init__() self.title(title) self.__geometry(width, height)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_layout(self):\n pass", "def create_layout( self ):", "def initialize(self):\n\n super(RectTab,self).initialize()\n # special tkinter variables that will be changed with the scales\n self.width = tk.IntVar()\n self.height = tk.IntVar()\n\n # make width scale\n ...
[ "0.7435821", "0.7011673", "0.6796386", "0.67577404", "0.6748696", "0.6677753", "0.6645481", "0.6607011", "0.6586472", "0.65405345", "0.6525303", "0.65013033", "0.64908344", "0.6466996", "0.6455544", "0.64548826", "0.6439049", "0.64201504", "0.6394235", "0.63763034", "0.636173...
0.76597536
0
API call returns only fulfilled orders since specified time period or all fulfilled orders if no period is specified
def test91_GetFilledOrders(self): payload = PAYLOAD() payload['method'] = 'get_filled_orders' res = requests.post( url, data=json.dumps(payload), headers=headers).json()['result'] self.assertEqual(len(res), 3) self.assertEqual(res[0]['receiving_address'], 'mrUedhEhZzbmdSbmd41CxoT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def one_day(status, after):\n return woo.fetch_all_orders(status, after)", "def extractHourlyOrders(orders, fromDate, toDate=datetime.today()):\n orderTimeStamps = getTimeStampsFromMongoOrderData(orders)\n toDate = datetime.today() + timedelta(days=1)\n # Every day fromDate to toDate.\n dateRange = getDay...
[ "0.6404686", "0.6338604", "0.63085437", "0.6306702", "0.619886", "0.61274254", "0.6085297", "0.6044992", "0.598964", "0.59868956", "0.5966955", "0.5921275", "0.5907632", "0.58676374", "0.58195394", "0.5778055", "0.573728", "0.57229036", "0.56906056", "0.5688032", "0.56653047"...
0.64408785
0
API call returns only unfulfilled orders since specified time period or all unfulfilled orders if no period is specified
def test91_GetUnfilledOrders(self): payload = PAYLOAD() payload['method'] = 'get_unfilled_orders' res = requests.post( url, data=json.dumps(payload), headers=headers).json()['result'] self.assertEqual(len(res), 999) sorted(res, key = lambda x: x['created_at']) payload['pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def retrieve_unfulfilled_orders(self, **kwargs):\n return self.client.execute(\"order/get-fulfill\", \"GET\", kwargs)", "def test91_GetFilledOrders(self):\n payload = PAYLOAD()\n payload['method'] = 'get_filled_orders'\n res = requests.post( url, data=json.dumps(payload), headers=head...
[ "0.67620754", "0.6580948", "0.64761215", "0.6387386", "0.635767", "0.62995386", "0.62549376", "0.6155578", "0.61037886", "0.6090314", "0.60803956", "0.60242283", "0.600023", "0.5987958", "0.59777737", "0.5964894", "0.5914695", "0.58748996", "0.57534117", "0.5667088", "0.56556...
0.6997587
0
Gets the edge_attribute of this OperationFilterKgraphTopNParameters.
def edge_attribute(self): return self._edge_attribute
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def edge(self) -> EdgeConfig:\n return self._edge", "def get_edge_attributes(graph: BaseGraph, attr_key: str) -> Dict:\n return get_edge_attributes(graph.graph, attr_key)", "def edge_array(self):\n return self._edge_array", "def get_edge_size(self):\n return self._edge_size", "d...
[ "0.6981031", "0.6132798", "0.5874107", "0.5870594", "0.5823603", "0.574355", "0.56904745", "0.56496364", "0.56381154", "0.5628658", "0.5599069", "0.54278994", "0.5393487", "0.5335291", "0.5283611", "0.5282198", "0.52543914", "0.52404195", "0.52097356", "0.5201904", "0.5186886...
0.79824936
0
Sets the edge_attribute of this OperationFilterKgraphTopNParameters.
def edge_attribute(self, edge_attribute): if edge_attribute is None: raise ValueError("Invalid value for `edge_attribute`, must not be `None`") # noqa: E501 self._edge_attribute = edge_attribute
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def edge(self, edge: EdgeConfig):\n\n self._edge = edge", "def add_edge_attribute(\n self,\n subject_node: str,\n object_node: str,\n edge_key: Optional[str],\n attr_key: str,\n attr_value: Any,\n ) -> None:\n self.graph.add_edge(\n subject_no...
[ "0.65363365", "0.61576307", "0.5919292", "0.57818145", "0.57118034", "0.55595976", "0.54622144", "0.54342616", "0.5283297", "0.5159394", "0.5147188", "0.51219016", "0.5112962", "0.5081025", "0.50803375", "0.50714386", "0.49983177", "0.49794975", "0.49420726", "0.49186444", "0...
0.7095303
0
Gets the keep_top_or_bottom of this OperationFilterKgraphTopNParameters.
def keep_top_or_bottom(self): return self._keep_top_or_bottom
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def keep_top_or_bottom(self, keep_top_or_bottom):\n allowed_values = [\"top\", \"bottom\"] # noqa: E501\n if keep_top_or_bottom not in allowed_values:\n raise ValueError(\n \"Invalid value for `keep_top_or_bottom` ({0}), must be one of {1}\"\n .format(keep_to...
[ "0.6497807", "0.5250165", "0.5250165", "0.51789254", "0.51102257", "0.50859964", "0.5068248", "0.49790546", "0.4965563", "0.49600297", "0.49551472", "0.49125585", "0.48803905", "0.4868078", "0.48679614", "0.4858813", "0.48511815", "0.48112455", "0.48112455", "0.48112455", "0....
0.6969505
0
Sets the keep_top_or_bottom of this OperationFilterKgraphTopNParameters.
def keep_top_or_bottom(self, keep_top_or_bottom): allowed_values = ["top", "bottom"] # noqa: E501 if keep_top_or_bottom not in allowed_values: raise ValueError( "Invalid value for `keep_top_or_bottom` ({0}), must be one of {1}" .format(keep_top_or_bottom, all...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def keep_top_or_bottom(self):\n return self._keep_top_or_bottom", "def setTopK(self, value):\n return self._set(topK=value)", "def setTopK(self, value):\n return self._set(topK=value)", "def always_top(self, value: bool):\n self.tk_ref.wm_attributes('-topmost', int(value))", "de...
[ "0.5981992", "0.5712778", "0.5712778", "0.53906304", "0.5259678", "0.5259678", "0.5259678", "0.513726", "0.5093466", "0.5019082", "0.49986306", "0.49951434", "0.49903843", "0.4911783", "0.4830983", "0.4810733", "0.4788352", "0.46590135", "0.46310154", "0.45772782", "0.4564128...
0.7349395
0
Gets the max_edges of this OperationFilterKgraphTopNParameters.
def max_edges(self): return self._max_edges
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_nodes(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"max_nodes\")", "def num_edges(self):\n return self._top_exp.number_of_edges()", "def get_parameters_max(self):\n maxValues = numpy.zeros(self.get_num_parameters())\n i = 0\n for p in self.parameters:\n ...
[ "0.6117776", "0.61134166", "0.607696", "0.6068996", "0.60188544", "0.5996239", "0.5915247", "0.59126115", "0.5887926", "0.5842894", "0.58412194", "0.5758923", "0.5754709", "0.57310635", "0.5722847", "0.57169735", "0.56968087", "0.56936395", "0.56856334", "0.5683312", "0.56739...
0.76864016
0
Sets the max_edges of this OperationFilterKgraphTopNParameters.
def max_edges(self, max_edges): if max_edges is not None and max_edges < 0: # noqa: E501 raise ValueError("Invalid value for `max_edges`, must be a value greater than or equal to `0`") # noqa: E501 self._max_edges = max_edges
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_max_edges(self, edges):\n self.max_edges = edges", "def max_edges(self):\n return self._max_edges", "def max_num_neighbors(self, max_num_neighbors):\n self._max_num_neighbors = max_num_neighbors", "def setOutMax(self, out_max):\n\t\tself.out_max = out_max", "def set_maximum_ite...
[ "0.7707615", "0.6057649", "0.5979441", "0.58583033", "0.5842763", "0.5658066", "0.5623584", "0.56117105", "0.56104726", "0.5599811", "0.55863506", "0.55314344", "0.5517085", "0.5461102", "0.54228985", "0.54188716", "0.53991646", "0.5384841", "0.537968", "0.537968", "0.537968"...
0.68400383
1
Gets the qedge_keys of this OperationFilterKgraphTopNParameters.
def qedge_keys(self): return self._qedge_keys
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qnode_keys(self):\n return self._qnode_keys", "def qedge_keys(self, qedge_keys):\n\n self._qedge_keys = qedge_keys", "def keys(self):\n return self.params.keys()", "def get_vertex_keys(self):\n return self.vertList.keys()", "def keys(self):\n return self._key_to_node_...
[ "0.7288101", "0.60991013", "0.6067911", "0.60389143", "0.6025332", "0.5948107", "0.58627486", "0.58592695", "0.58093464", "0.57137764", "0.5697618", "0.56480795", "0.5603909", "0.55899596", "0.5586424", "0.5583137", "0.5570243", "0.55641234", "0.55617553", "0.55617553", "0.55...
0.83435977
0
Sets the qedge_keys of this OperationFilterKgraphTopNParameters.
def qedge_keys(self, qedge_keys): self._qedge_keys = qedge_keys
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qnode_keys(self, qnode_keys):\n\n self._qnode_keys = qnode_keys", "def qedge_keys(self):\n return self._qedge_keys", "def set_edge_param(self, key_a, key_b, **kwargs):\n for param_key, param_value in kwargs.items():\n self.vertices[key_a].edges_out[key_b].params[param_key] =...
[ "0.66506654", "0.65621734", "0.5372046", "0.52559894", "0.497499", "0.4789123", "0.4667218", "0.46193632", "0.461921", "0.46069968", "0.45542294", "0.4503366", "0.4466527", "0.4443377", "0.4394366", "0.43812448", "0.43238518", "0.42916432", "0.42729002", "0.42531464", "0.4235...
0.79714465
0
Gets the qnode_keys of this OperationFilterKgraphTopNParameters.
def qnode_keys(self): return self._qnode_keys
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qedge_keys(self):\n return self._qedge_keys", "def keys(self):\n return self._key_to_node_index.keys()", "def keys(self):\n list_all_dict = self.list_all()\n return list_all_dict[\"nodes\"] + list_all_dict[\"groups\"]", "def keys(self):\n return self.params.keys()", "...
[ "0.7329391", "0.6825162", "0.6334459", "0.6125614", "0.61179733", "0.60077274", "0.5966896", "0.5966896", "0.59188855", "0.59103674", "0.58554554", "0.5844913", "0.58417857", "0.5838304", "0.5831533", "0.5819362", "0.5817501", "0.5809469", "0.5809469", "0.58055615", "0.580543...
0.8228556
0
Sets the qnode_keys of this OperationFilterKgraphTopNParameters.
def qnode_keys(self, qnode_keys): self._qnode_keys = qnode_keys
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qedge_keys(self, qedge_keys):\n\n self._qedge_keys = qedge_keys", "def qnode_keys(self):\n return self._qnode_keys", "async def set_nodes(self, node_callq: Dict):\n for svc in self._services:\n await svc.set_nodes(node_callq)", "def qedge_keys(self):\n return self._...
[ "0.6633159", "0.62220204", "0.54897636", "0.5398658", "0.525292", "0.5149192", "0.498404", "0.49119735", "0.481222", "0.47867", "0.4727929", "0.46843454", "0.46096995", "0.4586564", "0.4537584", "0.452308", "0.45081043", "0.44956335", "0.44948918", "0.44943935", "0.4491927", ...
0.7906516
0
Process the doc data given in the `doc_data` parameter. The data has to be in the format returned by the DocParser. Returns the processed data in the same data structure.
def process(self, doc_data): self.doc_data = doc_data self.process_text(self.auto_link_messages) self.process_text(self.auto_link_xips) self.add_type_sizes() return self.doc_data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _parse_data(self, data):\n return data.get('docs', [])", "def process(self, doc):\n self.doc = doc\n if self.replace_words is True:\n self.replace_words_fun()\n if self.remove_html_tags is True:\n self.remove_html_tags_fun()\n if self.remove_stopwords ...
[ "0.66904587", "0.6009361", "0.6004425", "0.6001452", "0.5924678", "0.5909684", "0.5819687", "0.5697806", "0.56473726", "0.5593554", "0.55723184", "0.55050546", "0.54923874", "0.54898995", "0.5424654", "0.54024434", "0.53864413", "0.5360811", "0.5300393", "0.5225246", "0.52071...
0.8185726
0
Toggle the activity of the bots /toggleai
def toggleai(connection): protocol = connection.protocol protocol.ai_enabled = not protocol.ai_enabled if not protocol.ai_enabled: for bot in protocol.bots: bot.flush_input() state = "enabled" if protocol.ai_enabled else "disabled" protocol.broadcast_chat("AI %s!" % state) pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toggle(self):\n self._state.is_on = not self._state.is_on\n self.send_command(Command.TOGGLE, [])", "async def toggle(self, ctx):\r\n serverid = ctx.message.server.id\r\n if self.adkillr[serverid]['toggle'] is True:\r\n self.adkillr[serverid]['toggle'] = False\r\n e ...
[ "0.67937243", "0.65748763", "0.6364722", "0.6276554", "0.6276554", "0.62137747", "0.61486894", "0.6148306", "0.6121742", "0.60405606", "0.5988636", "0.5975764", "0.5931988", "0.59119296", "0.57696956", "0.57347775", "0.5675931", "0.56575006", "0.5634257", "0.56209266", "0.561...
0.78695995
0
Test all required basic map features.
def test_map_basics(self): self.assertDigitizerMapBasics(self.map, self.dgroup)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_core_functionality(self):\n # Test typing\n self.run_map_collection(\n _map_collection=self.example_map\n )", "def test_make_ec_map():\n pass", "def test_check_map(self):\r\n\r\n header, mapping_data = check_map(self.valid_mapping_data_golay)\r\n\r\n ex...
[ "0.7761282", "0.66582406", "0.656187", "0.6427593", "0.63699454", "0.63666", "0.63132364", "0.6309038", "0.62868077", "0.62779266", "0.6271356", "0.6256797", "0.622346", "0.62190473", "0.6214645", "0.62057835", "0.6204025", "0.61743695", "0.6169671", "0.61356306", "0.6133514"...
0.7919289
0
Test the map's identification of the active configuration
def test_active_configs(self): # one config and one active config if self.mod.knobs.n_configs != 1: self.mod.knobs.n_configs = 1 self.assertTrue(len(self.map.active_configs) == 1) self.assertTrue(self.map.active_configs[0] == 'config01') # three configs and one activ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_configuration_map(self):\n config = load_configuration(package_dir=self.dir, gitconfig_file=self.gitconfig)\n mapping = config.configuration_map()\n self.failUnless('cirrus' in mapping)\n self.failUnless('credentials' in mapping['cirrus'])\n self.failUnless('configuratio...
[ "0.6678039", "0.64523095", "0.6266289", "0.6109301", "0.59784067", "0.5894147", "0.5867088", "0.5861757", "0.5786266", "0.5746259", "0.56705576", "0.5639047", "0.56259125", "0.5603436", "0.5535164", "0.5526141", "0.5517809", "0.54996157", "0.54952544", "0.54807264", "0.547889...
0.661868
1
Test the map's identification of a configurations adc.
def test_adc_identification(self): config = self.map.active_configs[0] self.assertEqual(self.map.configs[config]['adc'], ['SIS 3301'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_configuration_map(self):\n config = load_configuration(package_dir=self.dir, gitconfig_file=self.gitconfig)\n mapping = config.configuration_map()\n self.failUnless('cirrus' in mapping)\n self.failUnless('credentials' in mapping['cirrus'])\n self.failUnless('configuratio...
[ "0.6094175", "0.5603944", "0.5485293", "0.54386777", "0.5373347", "0.52889127", "0.5282641", "0.524814", "0.5245888", "0.52443063", "0.52384907", "0.5223694", "0.5222365", "0.5221678", "0.5219707", "0.5205929", "0.5175017", "0.51677436", "0.5151094", "0.51460534", "0.51415986...
0.8274774
0
Test the map's identification of a configurations connected board and channel combinations.
def test_brdch_identification(self): # one config and one active config if self.mod.knobs.n_configs != 1: self.mod.knobs.n_configs = 1 # get active configuration config = self.map.active_configs[0] # set active board and channel combinations my_bcs = [(0, [0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_configuration_map(self):\n config = load_configuration(package_dir=self.dir, gitconfig_file=self.gitconfig)\n mapping = config.configuration_map()\n self.failUnless('cirrus' in mapping)\n self.failUnless('credentials' in mapping['cirrus'])\n self.failUnless('configuratio...
[ "0.5899208", "0.5829223", "0.57801706", "0.5736647", "0.57033056", "0.5598758", "0.5362771", "0.5238737", "0.5229015", "0.52171534", "0.5146625", "0.5114523", "0.50971216", "0.5082881", "0.5080336", "0.50796455", "0.5070209", "0.5048809", "0.5034352", "0.50274986", "0.4993234...
0.69533205
0
Asserts the map identified boards matches the predefined connected boards.
def assertBoards(self, config_name, my_bcs): # get defined boards brds = [] for brd, chs in my_bcs: brds.append(brd) # get map identified boards map_brds = [] for conn in self.map.configs[config_name]['SIS 3301']: map_brds.append(conn[0]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testBoardAll(self):\n self.assertEqual(self.boards.SelectBoards([]), {'all': 5})", "def testBoardArch(self):\n self.assertEqual(self.boards.SelectBoards(['arm']),\n {'all': 2, 'arm': 2})", "def testBoardDuplicate(self):\n self.assertEqual(self.boards.SelectBoard...
[ "0.68080086", "0.6801656", "0.6711426", "0.66321903", "0.6530586", "0.6523621", "0.6449439", "0.6430011", "0.63632405", "0.6233215", "0.6198039", "0.61945087", "0.6117289", "0.6117289", "0.6117289", "0.60558516", "0.6055197", "0.6010283", "0.5999192", "0.59447634", "0.5912163...
0.77703667
0
Asserts the map identified channels for each board matches the predefined connected channels for each board.
def assertChannels(self, config_name, my_bcs): # get defined boards brds = [] for brd, chs in my_bcs: brds.append(brd) # assert discovered channels are equal to defined channels for # each defined board for conn in self.map.configs[config_name]['SIS 3301']: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assertBoards(self, config_name, my_bcs):\n # get defined boards\n brds = []\n for brd, chs in my_bcs:\n brds.append(brd)\n\n # get map identified boards\n map_brds = []\n for conn in self.map.configs[config_name]['SIS 3301']:\n map_brds.append(con...
[ "0.6782004", "0.6423596", "0.63748574", "0.61178344", "0.58554864", "0.58554864", "0.58554864", "0.5841851", "0.5801546", "0.58009654", "0.57957405", "0.5762526", "0.57379985", "0.5707146", "0.5659369", "0.5634266", "0.56340164", "0.563076", "0.56032413", "0.55973357", "0.555...
0.71924806
0
Reads an image and resize it 1) open `image_path` that is image.jpg 2) resize to `new_WH` 3) save to save_dir/image.jpg 4) returns `image_path`
def read_image_and_resize(image_path: str, new_WH: Tuple[int, int]=(512, 512), save_dir: str="resize") -> str: assert os.path.exists(save_dir) is True new_path = os.path.join(save_dir, os.path.basename(image_path)) image = cv2.imread(image_path) image ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resize_image(image_path: str):\n image: Image.Image = Image.open(image_path)\n w = image.width\n h = image.height\n scale_factor = IMAGE_WIDTH_DEFAULT / w\n image.resize((int(w * scale_factor), int(h * scale_factor))).save(image_path)", "def resize(path_to_image, width, height):\n\n fd_...
[ "0.73719335", "0.7371661", "0.7371641", "0.7178271", "0.71419185", "0.7079309", "0.70735985", "0.70654607", "0.7065285", "0.70556676", "0.6998327", "0.6995009", "0.6883732", "0.68184906", "0.6792746", "0.67392623", "0.67038417", "0.66446984", "0.66312885", "0.66305876", "0.66...
0.89713985
0
Test case for groups_get
def test_groups_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_groups(self):\n pass", "def test_get_groups(self):\n pass", "def test_get_group(self):\n pass", "def test_groups_group_id_get(self):\n pass", "def test_api_v1_groups_get(self):\n pass", "def test_users_groups_get(self):\n pass", "def test_groups_gr...
[ "0.8974964", "0.8974964", "0.89357173", "0.8524152", "0.8510089", "0.8447553", "0.83933926", "0.79652333", "0.79652333", "0.7949919", "0.77985775", "0.779555", "0.7757213", "0.76320916", "0.7582985", "0.75826055", "0.7533458", "0.75169057", "0.7512961", "0.7461216", "0.745040...
0.91292423
1
Test case for groups_group_ref_delete
def test_groups_group_ref_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_products_ref_groups_delete(self):\n pass", "def test_delete_group(self):\n pass", "def test_delete_group(self):\n pass", "def test_delete_groups(self):\n pass", "def test_080_group_delete(self):\n\n testflow.step(RMV_GRP_MSG, TEST_GROUP_DELETE)\n assert GR...
[ "0.8770721", "0.8457102", "0.8457102", "0.8249822", "0.81108606", "0.7909003", "0.7909003", "0.7889186", "0.7868551", "0.78439146", "0.78351253", "0.7809793", "0.777316", "0.7684364", "0.7636218", "0.7636218", "0.758771", "0.74936086", "0.7471287", "0.7466132", "0.7450251", ...
0.9536207
0
Test case for groups_group_ref_get
def test_groups_group_ref_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_products_ref_groups_get(self):\n pass", "def test_groups_group_id_get(self):\n pass", "def test_get_group(self):\n pass", "def test_groups_get(self):\n pass", "def test_groups_get(self):\n pass", "def test_groups_group_ref_put(self):\n pass", "def test...
[ "0.8311243", "0.7915646", "0.7878037", "0.76351154", "0.76351154", "0.7595897", "0.741003", "0.729462", "0.7278464", "0.7278464", "0.72470546", "0.69882387", "0.6911045", "0.67729264", "0.6767321", "0.6743488", "0.6743488", "0.67221946", "0.6651499", "0.6498266", "0.64912575"...
0.94357073
0
Test case for groups_group_ref_put
def test_groups_group_ref_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_products_ref_groups_put(self):\n pass", "def test_groups_group_id_state_put(self):\n pass", "def test_groups_group_ref_get(self):\n pass", "def test_groups_group_ref_delete(self):\n pass", "def test_groups_group_users_put(self):\n pass", "def test_groups_group_...
[ "0.85092837", "0.77150786", "0.77021366", "0.74113566", "0.73371273", "0.73371273", "0.72512925", "0.72198373", "0.67665654", "0.67188305", "0.66985434", "0.6619467", "0.6601746", "0.6588789", "0.6588789", "0.65187174", "0.65177727", "0.65177727", "0.65144444", "0.64819306", ...
0.9403652
0
Test case for groups_group_users_delete
def test_groups_group_users_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_groups_group_users_user_delete(self):\n pass", "def test_groups_group_users_user_delete(self):\n pass", "def test_user_group_controller_delete(self):\n pass", "def test_delete_groups(self):\n pass", "def test_deluser(self):\n self.run_function(\"group.add\", [sel...
[ "0.9358476", "0.9358476", "0.85751295", "0.8404959", "0.8395862", "0.83170146", "0.8306103", "0.8306103", "0.81905824", "0.8097621", "0.7957189", "0.794946", "0.79202616", "0.7913392", "0.788021", "0.7844906", "0.7844906", "0.77372277", "0.7735396", "0.7628736", "0.76283085",...
0.93964773
0
Test case for groups_group_users_get
def test_groups_group_users_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_users_groups_get(self):\n pass", "def test_get_group_users(self):\n response = self.client.get_group_users(\"ABC123\")\n uri, args = response[\"uri\"].split(\"?\")\n\n self.assertEqual(response[\"method\"], \"GET\")\n self.assertEqual(uri, \"/admin/v2/groups/ABC123/use...
[ "0.8644726", "0.8494825", "0.8298521", "0.73591846", "0.7288162", "0.7177433", "0.71657836", "0.71131086", "0.71131086", "0.7081863", "0.7044649", "0.7044649", "0.70284253", "0.70284253", "0.702659", "0.702659", "0.69774276", "0.6961008", "0.69171274", "0.6902024", "0.6897762...
0.90623355
0
Test case for groups_group_users_put
def test_groups_group_users_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_resource_user_resource_set_user_groups_for_user_put(self):\n pass", "def test_groups_group_ref_put(self):\n pass", "def test_groups_group_users_get(self):\n pass", "def test_groups_group_users_get(self):\n pass", "def test_users_groups_post(self):\n pass", "def...
[ "0.8014479", "0.7218801", "0.72092277", "0.72092277", "0.720866", "0.7036973", "0.69831", "0.69413364", "0.69392294", "0.6926049", "0.6916855", "0.683536", "0.68323517", "0.6812893", "0.68069625", "0.68069625", "0.6799272", "0.6786988", "0.67496324", "0.6706429", "0.6706429",...
0.9184266
0
Test case for groups_group_users_user_delete
def test_groups_group_users_user_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_groups_group_users_delete(self):\n pass", "def test_groups_group_users_delete(self):\n pass", "def test_080_user_delete(self):\n\n testflow.step(RMV_USR_MSG, TEST_GROUP_DELETE)\n assert USER_CLI.run('delete', TEST_USER_DELETE)[0]", "def test_deluser(self):\n self.r...
[ "0.9118829", "0.9118829", "0.86449486", "0.8487957", "0.8469696", "0.8399384", "0.8252736", "0.81828237", "0.81828237", "0.79388124", "0.7854359", "0.78388655", "0.7806266", "0.7806266", "0.7784398", "0.77508163", "0.76269084", "0.7617778", "0.7606497", "0.7602558", "0.756962...
0.9386948
0
Test case for groups_post
def test_groups_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_groups_state_post(self):\n pass", "def test_users_groups_post(self):\n pass", "def test_api_v1_groups_post(self):\n pass", "def test_post_entry_groups(self):\r\n # This method utilises the POST request method and will make changes to the Canvas instance. This needs consid...
[ "0.8304994", "0.8216432", "0.7804689", "0.7667418", "0.7235881", "0.6799691", "0.67941415", "0.6728885", "0.6644323", "0.6644323", "0.65910846", "0.6526204", "0.6526204", "0.65190345", "0.65064895", "0.64757675", "0.64757675", "0.64710015", "0.64710015", "0.6470802", "0.64613...
0.89583665
0
Test case for products_ref_groups_delete
def test_products_ref_groups_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_groups_group_ref_delete(self):\n pass", "def test_delete_group(self):\n pass", "def test_delete_group(self):\n pass", "def test_delete_groups(self):\n pass", "def test_delete_collection_group(self):\n pass", "def test_delete_resource_group(self):\n pass"...
[ "0.90436023", "0.83081174", "0.83081174", "0.8282982", "0.7856535", "0.7768773", "0.77608097", "0.77608097", "0.76761997", "0.7596862", "0.75901264", "0.75684834", "0.7529615", "0.75211316", "0.75140876", "0.75029784", "0.744208", "0.74132663", "0.74132663", "0.73918164", "0....
0.95633006
0
Test case for products_ref_groups_get
def test_products_ref_groups_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_groups_group_ref_get(self):\n pass", "def test_groups_get(self):\n pass", "def test_groups_get(self):\n pass", "def test_products_ref_groups_put(self):\n pass", "def test_get_group(self):\n pass", "def test_products_ref_groups_delete(self):\n pass", "d...
[ "0.8702511", "0.77201664", "0.77201664", "0.7628584", "0.7600845", "0.7531133", "0.75125796", "0.7492316", "0.7492316", "0.7236388", "0.6928503", "0.69238037", "0.67971617", "0.6793483", "0.67688274", "0.6688224", "0.6558674", "0.65565073", "0.65276635", "0.65276635", "0.6505...
0.9443432
0
Test case for products_ref_groups_put
def test_products_ref_groups_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_groups_group_ref_put(self):\n pass", "def test_products_ref_groups_get(self):\n pass", "def test_products_ref_groups_delete(self):\n pass", "def test_groups_group_id_state_put(self):\n pass", "def test_update_group(self):\n pass", "def test_groups_group_ref_get...
[ "0.8763411", "0.7896594", "0.76712", "0.73332614", "0.7261318", "0.7234254", "0.7141976", "0.7141976", "0.7065529", "0.7021525", "0.6815915", "0.6805372", "0.6664815", "0.6664612", "0.662514", "0.662514", "0.65550685", "0.65550685", "0.651908", "0.6505335", "0.6486297", "0....
0.94390565
0
Sets the more_info of this XapiActivityDefinition.
def more_info(self, more_info): self._more_info = more_info
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def more_info(self, more_info: \"str\"):\n self._attrs[\"moreInfo\"] = more_info", "def more_info(self) -> \"str\":\n return self._attrs.get(\"moreInfo\")", "def info(self, info):\n\n self._info = info", "def extend_info(self, extend_info):\n self._extend_info = extend_info", "d...
[ "0.78607345", "0.6521519", "0.5452897", "0.541834", "0.5293734", "0.5277915", "0.5202872", "0.5084072", "0.5078834", "0.5025695", "0.5013662", "0.49675918", "0.49581105", "0.49581105", "0.49581105", "0.48645967", "0.48266262", "0.48098183", "0.48098183", "0.48045462", "0.4756...
0.81180525
0
Sets the interaction_type of this XapiActivityDefinition.
def interaction_type(self, interaction_type): self._interaction_type = interaction_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_interactions(self, interactions: dict):\n self._interactions = interactions", "def set_type(self, type):\n self._type = type", "def set_execution_type(self, type):\n self.execution_type = type", "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n...
[ "0.5839863", "0.5609744", "0.5606239", "0.5593561", "0.5593561", "0.5423773", "0.542183", "0.542183", "0.542183", "0.54202527", "0.53968126", "0.5381194", "0.53191566", "0.53191566", "0.5311249", "0.5304102", "0.5289866", "0.5289866", "0.5289866", "0.5289866", "0.5289866", ...
0.8043776
0
Sets the correct_responses_pattern of this XapiActivityDefinition.
def correct_responses_pattern(self, correct_responses_pattern): self._correct_responses_pattern = correct_responses_pattern
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, pattern, response_dict):\r\n self._pattern = pattern\r\n self._response_dict = response_dict", "def mc_setup_response(self):\r\n i = 0\r\n for response in self.xml.xpath(\"choicegroup\"):\r\n # Is Masking enabled? -- check for shuffle or answer-pool featu...
[ "0.5085137", "0.5026723", "0.4640069", "0.46339157", "0.46140507", "0.46008262", "0.45378122", "0.45022702", "0.4489702", "0.44496804", "0.44289222", "0.44202223", "0.4404709", "0.43924823", "0.43799654", "0.43738604", "0.43516237", "0.43486825", "0.4348316", "0.43350074", "0...
0.81889933
0
Sets the choices of this XapiActivityDefinition.
def choices(self, choices): self._choices = choices
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def choices(self, choices: Iterable[Tuple[str, str]]):\n try:\n iter(choices)\n except TypeError:\n raise TypeError(\"'choices' isn't a valid iterable\")\n\n apply_choices = []\n for i, (choice_id, choice_label) in enumerate(choices):\n apply_choices.app...
[ "0.63967466", "0.5922315", "0.555645", "0.55435973", "0.5459039", "0.53439164", "0.5308223", "0.52620864", "0.5150234", "0.50988597", "0.5052014", "0.5052004", "0.5031704", "0.4979425", "0.49375927", "0.48581317", "0.4835073", "0.4835073", "0.47601628", "0.4755359", "0.475511...
0.71045566
0
Sets the scale of this XapiActivityDefinition.
def scale(self, scale): self._scale = scale
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_scale(self, scale):\n scale = float(scale)\n if scale <= 1:\n raise ValueError('The scale parameter must exceed 1.')\n self._a = scale", "def setScale(self, *args):\n return _libsbml.Unit_setScale(self, *args)", "def setscaling(self, scaling):\n\n self.__sc...
[ "0.7394006", "0.70046496", "0.686296", "0.67637664", "0.67060214", "0.66701585", "0.65887743", "0.6566147", "0.651026", "0.6348749", "0.63107556", "0.6306564", "0.628669", "0.61750543", "0.60340875", "0.5997483", "0.59872174", "0.59820503", "0.5965335", "0.5941422", "0.589527...
0.7509979
1
Sets the target of this XapiActivityDefinition.
def target(self, target): self._target = target
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setTarget(self, target):\n\n self._target = target", "def target(self, target: Union[str, \"STACObject_Type\"]) -> None:\n if isinstance(target, str):\n self._target_href = target\n self._target_object = None\n else:\n self._target_href = None\n ...
[ "0.69587153", "0.66312045", "0.6470357", "0.64405227", "0.64405227", "0.6390277", "0.6278999", "0.5941848", "0.59082824", "0.56160045", "0.56160045", "0.56124806", "0.54473907", "0.5437887", "0.54270023", "0.54203737", "0.5377593", "0.5369749", "0.5330973", "0.53144246", "0.5...
0.66351336
1
Sets the steps of this XapiActivityDefinition.
def steps(self, steps): self._steps = steps
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_workflow_steps(self, steps_list):\n self._data_dict[self.KEY_WF_STEPS] = steps_list", "def __init__(self, *args, **kwargs):\n Step.__init__(self, *args, **kwargs)\n\n # Configure all of the steps\n for key, val in self.step_defs.items():\n cfg = self.steps.get(key)\...
[ "0.61694515", "0.5533536", "0.55265296", "0.55265296", "0.540327", "0.5262085", "0.52076966", "0.5163912", "0.5127112", "0.5119769", "0.5062182", "0.5058831", "0.5039181", "0.5029677", "0.49741653", "0.49483967", "0.49401796", "0.49399465", "0.49128258", "0.49088225", "0.4896...
0.6750662
0
Sets the extensions of this XapiActivityDefinition.
def extensions(self, extensions): self._extensions = extensions
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inject_extensions(self, extensions: Dict[str, str]) -> None:\n self.extensions = extensions", "def setExtension(self, ext):\n if ext:\n self.extension = ext\n else:\n self.extension = None", "def extensions(cls):\n raise NotImplementedError", "def extensi...
[ "0.6449373", "0.6285618", "0.5845395", "0.5802265", "0.5802265", "0.5787033", "0.56601024", "0.5616033", "0.56079364", "0.5589066", "0.5587543", "0.54442525", "0.5423955", "0.5389426", "0.53421164", "0.53269005", "0.53126067", "0.527798", "0.5252857", "0.52410066", "0.519096"...
0.7274568
0
Print an updated quotas for a quota class
def do_quota_class_update(cs, args): utils.print_dict(cs.quota_classes.update( args.quota_class_name, containers=args.containers, memory=args.memory, cpu=args.cpu, disk=args.disk)._info)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def api_quota_command():\n # 1. There is no parameter input required from Demisto\n # 2. Get the quota status info from SlashNext API\n response = api_quota()\n if response.get('errorNo') != 0:\n return\n # 3. Parse and format the response\n quota_data = response.get('quotaDetails')\n\n ...
[ "0.6467412", "0.6252226", "0.61512583", "0.60207814", "0.5842556", "0.5775611", "0.57741386", "0.5727333", "0.5686705", "0.5677381", "0.5667065", "0.5625699", "0.5524427", "0.543097", "0.5388943", "0.53675425", "0.5280113", "0.51982087", "0.5187126", "0.5118844", "0.5092132",...
0.63242894
1
Print a quotas for a quota class
def do_quota_class_get(cs, args): utils.print_dict(cs.quota_classes.get(args.quota_class_name)._info)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def api_quota_command():\n # 1. There is no parameter input required from Demisto\n # 2. Get the quota status info from SlashNext API\n response = api_quota()\n if response.get('errorNo') != 0:\n return\n # 3. Parse and format the response\n quota_data = response.get('quotaDetails')\n\n ...
[ "0.65359", "0.6332808", "0.6318052", "0.5950038", "0.5893998", "0.5893463", "0.5792191", "0.57884544", "0.5783056", "0.57649666", "0.57131916", "0.57120985", "0.5701113", "0.56165105", "0.55625373", "0.5561485", "0.55436105", "0.5521813", "0.55165243", "0.547561", "0.5471426"...
0.6925294
0