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
Generates a random, Nlength partition from the CRP with parameter alpha
def crp_gen(N, alpha): assert N > 0 assert alpha > 0.0 alpha = float(alpha) partition = np.zeros(N, dtype=int) Nk = [1] for i in range(1, N): K = len(Nk) ps = np.zeros(K+1) for k in range(K): # get the number of people sitting at table k ps[k] = f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def partition_random(A, p, r):\n n = random.randint(p, r)\n A[n], A[r] = A[r], A[n]\n x = A[r]\n i = p-1\n for j in range(p, r):\n if A[j] <= x:\n i += 1\n A[i], A[j] = A[j], A[i]\n A[i+1], A[r] = A[r], A[i+1]\n return i+1", "def rand_partition(n, j):\n j_grou...
[ "0.61078537", "0.59711003", "0.5920494", "0.5848939", "0.58304894", "0.5805549", "0.5732983", "0.570661", "0.5702067", "0.56607306", "0.56561536", "0.56497455", "0.55667603", "0.552321", "0.5518484", "0.55155826", "0.5502811", "0.55016387", "0.54934347", "0.5457892", "0.54529...
0.7991425
0
check for terminal arguments, then read user options
def read_opts(self): # process any optlist_ options self.valid_opts.check_special_opts(sys.argv) # ------------------------------------------------------------ # terminal arguments, first # cannot have len(argv) <= 1 here, but be consistent with other progs if len(sys.argv) <= 1 o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_options(self):\n\n argv = sys.argv\n\n # process any optlist_ options\n self.valid_opts.check_special_opts(argv)\n\n # process terminal options without the option_list interface\n # (so that errors are not reported)\n\n # if no arguments are given, do default processing\n ...
[ "0.7018133", "0.68383974", "0.6714749", "0.66555446", "0.664898", "0.66265047", "0.6619694", "0.66077894", "0.6593117", "0.652164", "0.6502628", "0.6500051", "0.6494879", "0.6432781", "0.6405282", "0.6399504", "0.6398667", "0.63985723", "0.63876545", "0.6379504", "0.6352271",...
0.77860695
0
Determines whether a note corresponding to a particular identifier exists already.
def exists( identifier ): return note.exists(identifier)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_existing_object(did):\n if not d1_gmn.app.did.is_existing_object(did):\n raise d1_common.types.exceptions.NotFound(\n 0,\n \"Identifier is {}. Expected a Persistent ID (PID) for an existing \"\n 'object. id=\"{}\"'.format(d1_gmn.app.did.classify_identifier(did), di...
[ "0.6197243", "0.61839956", "0.6118145", "0.607983", "0.5966587", "0.584417", "0.5784489", "0.5783354", "0.57734895", "0.57275945", "0.5671185", "0.5656902", "0.56519544", "0.56461525", "0.5613567", "0.56104845", "0.55545044", "0.5540034", "0.54817325", "0.5480508", "0.5480508...
0.8617015
0
Either fetches or creates a note from an identifier and set of attributes.
def get_or_create( identifier='', prioritya="", priorityb="", priorityc="", priorityd="", prioritye="", published_at=None ): note_created, errors = note.get_or_create(identifier=identifier, prioritya=prioritya, priorityb=p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(resource_name: str,\n id: pulumi.Input[str],\n opts: Optional[pulumi.ResourceOptions] = None) -> 'Note':\n opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))\n\n __props__ = NoteArgs.__new__(NoteArgs)\n\n __props__.__dict__[\"attestation_auth...
[ "0.63100713", "0.6215361", "0.6196092", "0.61039186", "0.60570014", "0.5993152", "0.5867402", "0.58536905", "0.5828437", "0.58181596", "0.58041924", "0.5779979", "0.57792276", "0.5740977", "0.57316273", "0.5701909", "0.5648413", "0.5580823", "0.55708146", "0.55688125", "0.553...
0.6310479
0
Test module synth_tr.py by downloading synth_tr.csv and testing shape of extracted data has 250 rows and 3 columns
def test_synth_tr(): test_path = tempfile.mkdtemp() x_train, metadata = synth_tr(test_path) try: assert x_train.shape == (250, 3) except: shutil.rmtree(test_path) raise()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_trflp(lines):\r\n\r\n sample_ids = []\r\n otu_ids = []\r\n data = []\r\n non_alphanum_mask = re.compile('[^\\w|^\\t]')\r\n # not sure why the above regex doesn't cover the following regex...\r\n dash_space_mask = re.compile('[_ -]')\r\n\r\n for i, line in enumerate(lines):\r\n ...
[ "0.6532047", "0.64950264", "0.6212872", "0.6078355", "0.5769094", "0.5764994", "0.5756712", "0.57565534", "0.5701729", "0.5647569", "0.560415", "0.55754846", "0.5565445", "0.5511482", "0.5480622", "0.5477392", "0.5473815", "0.5460178", "0.54418266", "0.5436172", "0.5407693", ...
0.6775
0
Permute the network tuple. Repetitive permutation after each call of respond() functionally allows the network to inherit many of the anonymous aspects of a mixing network. Packets are sent sequentially in the order of the network tuple, which when permuted, thwarts many timing attacks. '' Doesn't return
def permute_network_tuple(self): net_tuple = self.read_nodestate(0) cs_prng = random.SystemRandom() network_list = list(net_tuple) cs_prng.shuffle(network_list) new_network_tuple = tuple(network_list) self.write_nodestate(nodeState, 0, new_network_tuple)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def traffic_permutation(request):\n global AVP_MAC, NVP_MAC, UDP_SPORT, SRC_IP, DST_IP, OUTER_SRC_MAC,\\\n OUTER_DST_MAC, PKT_TYPE\n\n # Values common to all packet types\n SRC_IP = VTEP_PEER_IP\n DST_IP = S1_LO_IP\n OUTER_SRC_MAC = HOST3_MAC\n OUTER_DST_MAC = SW_MAC\n AVP_MAC = AVP1_MA...
[ "0.61151236", "0.6020961", "0.54332894", "0.53485817", "0.53375506", "0.5326326", "0.52796644", "0.51501876", "0.5112834", "0.511048", "0.51098067", "0.5084952", "0.5071781", "0.50574267", "0.5028591", "0.50164175", "0.5013029", "0.5000476", "0.49943426", "0.49921364", "0.498...
0.6810986
0
Do a brute force search for a specific socket. Maybe this can be optimized by caching the indexes of commonlyused connections?
def lookup_socket(self, address): # TODO: optimize me net_tuple = self.read_nodestate(0) for item in net_tuple: discovered_address = item[1] if address == discovered_address: return item[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lookup_address(self, in_sock): # TODO: optimize me\n\n net_tuple = self.read_nodestate(0)\n for item in net_tuple:\n discovered_socket = item[0]\n if in_sock == discovered_socket:\n return item[1]", "def find_connections():\n # print \"External\"\n # ...
[ "0.6487177", "0.6132528", "0.60195374", "0.59754914", "0.58608496", "0.5724805", "0.5685544", "0.565211", "0.56495214", "0.5647388", "0.5607787", "0.55679166", "0.55133724", "0.5470036", "0.54689276", "0.53921384", "0.5351019", "0.5332982", "0.5304648", "0.530399", "0.5297584...
0.6772558
0
Do a brute force search for a specific socket. Maybe this can be optimized by caching the indexes of commonlyused connections?
def lookup_address(self, in_sock): # TODO: optimize me net_tuple = self.read_nodestate(0) for item in net_tuple: discovered_socket = item[0] if in_sock == discovered_socket: return item[1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lookup_socket(self, address): # TODO: optimize me\n\n net_tuple = self.read_nodestate(0)\n for item in net_tuple:\n discovered_address = item[1]\n if address == discovered_address:\n return item[0]", "def find_connections():\n # print \"External\"\n #...
[ "0.6775142", "0.6132786", "0.60190773", "0.59775984", "0.5862512", "0.57275397", "0.56868243", "0.5651624", "0.5649641", "0.5649339", "0.5608421", "0.5567738", "0.55121535", "0.54701644", "0.54690665", "0.5391756", "0.53513986", "0.5334197", "0.5305196", "0.53026515", "0.5298...
0.64883214
1
Remove a connection from the network tuple. Doesn't return
def remove(self, connection): net_tuple = self.read_nodestate(0) # Tuples are immutable; convert it to a list. network_list = list(net_tuple) # Identify and remove said connection try: index = network_list.index(connection) network_list.pop(index) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def removeConnection(tagA, tagB): #@NoSelf", "def remove_connection(self, source, target):\r\n\r\n connection = (self.coalesce_node(source), self.coalesce_node(target))\r\n self.connections.discard(connection)", "def view_removeConnection(self, user, tagA, tagB):\r\n key = int(md5(tagA).h...
[ "0.72589743", "0.71595305", "0.705364", "0.7046502", "0.6869789", "0.68205637", "0.67689615", "0.676171", "0.66775596", "0.6648932", "0.652343", "0.64680856", "0.6364976", "0.6338103", "0.62939054", "0.6264243", "0.6245344", "0.6244308", "0.6243338", "0.6227488", "0.6216134",...
0.79689485
0
Rotate to some position, optionally with a spesific speed
async def rotate_to(self, position, rotation_speed=None): self._check_if_stopped() await self._rotate_to(position, rotation_speed, time.time())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rotate(self, direction, speed):\n self.motor_A(direction, speed)\n self.motor_B(direction * (-1), speed)", "def rotate(self,direction, speed=50):\n if direction == 1: \n self.leftMotor.run(Adafruit_MotorHAT.FORWARD)\n self.rightMotor.run(Adafr...
[ "0.71515214", "0.6956926", "0.69552153", "0.69527555", "0.69006735", "0.68871063", "0.6768412", "0.66295767", "0.6507885", "0.64933574", "0.6476911", "0.64572203", "0.6442482", "0.6442482", "0.6422517", "0.6404415", "0.6231368", "0.62230086", "0.62199014", "0.61741173", "0.61...
0.7353319
0
Check if the text in the message matches the regex. If not, return `None`. If so, return an iterable of strings with the matched group results.
def message_matches(cls, msg, regex): m = regex.match(msg.text) if m: return m.groups() return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plaintext_regex_search(pattern, plaintext_data):\n result = []\n #if not pattern.startswith(r'\\b') and not pattern.endswith(r'\\b'):\n #pattern = r'\\b' + pattern + '\\b'\n try:\n compiled_pattern = re.compile(pattern)\n except:\n import traceback\n...
[ "0.6425498", "0.6398071", "0.62266237", "0.6176314", "0.6097741", "0.6020928", "0.6007811", "0.59645367", "0.59459245", "0.594077", "0.59313244", "0.5926929", "0.5920126", "0.5919781", "0.5869187", "0.5865897", "0.58215874", "0.5772262", "0.57676655", "0.5746535", "0.5743026"...
0.78782004
0
Return True if the message was addressed to one of our acceptable_to_numbers. (Must be set as a class attribute of any subclass.)
def is_addressed_to_us(cls, msg): return msg.fields.get('to_addr') in cls.acceptable_to_numbers
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_accepted_phone_number(self, dst):\n\n if self.cfg['VoipIO']['allowed_phone_numbers']:\n p = re.search(self.cfg['VoipIO']['allowed_phone_numbers'], dst)\n if not p:\n return False\n\n if self.cfg['VoipIO']['forbidden_phone_number']:\n p = re.searc...
[ "0.5881346", "0.58362854", "0.5701675", "0.56186736", "0.56056666", "0.5561018", "0.55283827", "0.54320776", "0.5345319", "0.5330984", "0.53243214", "0.5321657", "0.52786225", "0.5255317", "0.52092534", "0.5202545", "0.518183", "0.51548314", "0.51399606", "0.51196986", "0.508...
0.71790993
0
Return True if the message is from a whitelisted number.
def is_whitelisted(cls, msg): return is_whitelisted(msg.fields.get('from_addr'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_blacklisted(cls, msg):\n return is_blacklisted(msg.fields.get('from_addr'))", "def whitelist_numbers(self):\n return getattr(self, '_do_whitelist_numbers', False)", "def check_number(self, number):\n return (not self.whitelist_numbers or\n number in self._number_white...
[ "0.70236224", "0.6650185", "0.6531918", "0.6340848", "0.6182939", "0.6087741", "0.59492123", "0.58595324", "0.5831698", "0.5830689", "0.5825186", "0.57499087", "0.5733545", "0.5660376", "0.5609939", "0.56058025", "0.55526245", "0.5548588", "0.55303067", "0.55271345", "0.55149...
0.74651486
0
Return True if the message is from a blacklisted number.
def is_blacklisted(cls, msg): return is_blacklisted(msg.fields.get('from_addr'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_whitelisted(cls, msg):\n return is_whitelisted(msg.fields.get('from_addr'))", "def is_blacklisted(self):\r\n \r\n in_blacklist = False \r\n if self.chrompos in parser.blacklist:\r\n in_blacklist = True\r\n \r\n return in_blacklist", "async def ...
[ "0.69719183", "0.66170114", "0.6474549", "0.63965756", "0.6359802", "0.62952083", "0.62315065", "0.6208277", "0.61754835", "0.6151524", "0.6029577", "0.60007", "0.5989301", "0.59858334", "0.59754956", "0.5971981", "0.59598887", "0.5927039", "0.590708", "0.5900584", "0.5868339...
0.7755278
0
function for reading orderlog and storing in in a list
def read_orderlog(orderlog_path: str) -> list: order_log = [] reader = csv.DictReader(open(orderlog_path)) for row in reader: order_log.append(row) return order_log
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_linelog():", "def read_file(log_file):\n\t\tfile = open(log_file, 'r')\n\t\tresult = []\n\t\twhile 1:\n\t\t\tcontent = file.readline()\n\t\t\tif not content:\n\t\t\t\tbreak\n\t\t\telse:\n\t\t\t\tdata = content.split(\"\\003\")\n\t\t\t\tif len(data) == 13:\n\t\t\t\t\ttrack = {\n\t\t\t\t\t\t\t 'device_no'...
[ "0.66273075", "0.65234274", "0.6360236", "0.61646944", "0.6048912", "0.598094", "0.5861279", "0.58318186", "0.58094394", "0.5799935", "0.57187766", "0.5713676", "0.5701349", "0.56952375", "0.5687096", "0.5667034", "0.5665461", "0.5650138", "0.5639709", "0.56341064", "0.559870...
0.80687886
0
Filter out rows that satisfy a predicate
def filter(df, predicate): if not df: return [] return [row for row in df if predicate(row)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filterRows(function, rows):\n return [y for y in rows if function(y)]", "def filter_rows(self, **kwds):\n if kwds:\n normalize = lambda v: (v,) if isinstance(v, str) else v\n kwds = dict((k, normalize(v)) for k, v in kwds.items())\n matches_kwds = lambda row: all(ro...
[ "0.7404971", "0.69632494", "0.68878824", "0.68617713", "0.67693585", "0.6732073", "0.657788", "0.6421594", "0.6404885", "0.6382189", "0.6380808", "0.636383", "0.6349913", "0.632111", "0.6309168", "0.62346923", "0.6215647", "0.6144121", "0.6137133", "0.61227715", "0.6076036", ...
0.7938089
0
Apply function to df
def apply(df, f): return [f(row) for row in df]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def apply(self, df: DataFrame) -> Optional[Report]:", "def _apply_as_series_or_frame(self, func: Callable[[Column], Column]) -> FrameLike:\n pass", "def _apply_as_series_or_frame(self, func: Callable[[Column], Column]) -> FrameLike:\n pass", "def my_feature_xxx(df: pd.DataFrame):\n\n # CODE ...
[ "0.70133775", "0.6912145", "0.6912145", "0.68105054", "0.6779876", "0.6710938", "0.66639787", "0.66497433", "0.6524732", "0.6458132", "0.64552027", "0.6427227", "0.6414696", "0.64019215", "0.63953596", "0.6330124", "0.62763065", "0.6271092", "0.62296927", "0.61959547", "0.619...
0.76161844
0
Sort df by columns
def sort(df, cols): if not df: return [] return sorted(df, key=lambda row: [row[col] for col in cols])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _sort_dataframe(self, dataframe):\r\n columns = list(dataframe.columns)\r\n columns.sort()\r\n dataframe = dataframe[columns]\r\n return dataframe", "def sort_data(df, col_order=[\"id\", 'event_name', 'specialty', 'plan_type']):\n df.sort_values(col_order, inplace = True)\n ...
[ "0.8139114", "0.7613205", "0.72982395", "0.70291346", "0.700765", "0.68263125", "0.6794312", "0.67654765", "0.6693364", "0.66906923", "0.66773635", "0.66012657", "0.6489415", "0.647338", "0.64679766", "0.64582866", "0.6449206", "0.64100856", "0.64079297", "0.6385409", "0.6378...
0.7789332
1
function for preprocessing the orderlog returns preprocessed orderlog
def preprocess_orderlog(order_log: list) -> list: # changing column types reformat_orderlog(order_log) # filtering out some rows order_log = filter(order_log, lambda row: row['SECCODE'] in SECCODES and row['TIME'] < 2350 * 1E8) # harvard hack order_log = apply(order_log, harvard) or...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reformat_orderlog(log):\n types_dict = {\n 'NO': int,\n 'SECCODE': lambda x: x,\n 'BUYSELL': lambda x: x,\n 'TIME': int,\n 'ORDERNO': int,\n 'ACTION': int,\n 'PRICE': float,\n 'VOLUME': int,\n 'TRADENO': lambda x: float(x) if x != '' else np.nan...
[ "0.6176767", "0.6000025", "0.58862805", "0.5755458", "0.5647017", "0.5647017", "0.5647017", "0.554887", "0.5525142", "0.5525142", "0.5525142", "0.5525142", "0.5525142", "0.5464413", "0.541223", "0.53067297", "0.52225906", "0.5216588", "0.5206404", "0.519728", "0.51412195", ...
0.7050671
0
Builds a kNN model, and use it to get a softmax output on the eval set. This function builds a single kNN model using the embeddings and labels in the training set, and evaluate the model on the eval embeddings. For each eval example, its prediction is given by the labels of its k nearest neighbors in the training set,...
def _compute_knn_softmax( train_embeddings: np.ndarray, train_labels: np.ndarray, eval_embeddings: np.ndarray, num_labels: int, ) -> np.ndarray: neigh = sklearn_neighbors.NearestNeighbors(n_neighbors=_NUM_NEIGHBORS.value) neigh.fit(train_embeddings) distances, neighbors = neigh.kneighbors( e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def perform_eval(model, k=100, dataset_name='PIR', batch_size=256):\n with tf.device('/gpu:0'):\n\n logging.info('=== Reading Datasets ===')\n if dataset_name == 'PIR':\n file_pattern_query = 'Insert-Path-To-Query-Dataset'\n file_pattern_index = 'Insert-Path-To-Index-Dataset'\n elif dataset_nam...
[ "0.6699925", "0.65281945", "0.6450584", "0.6393218", "0.608774", "0.6019287", "0.59655094", "0.59279704", "0.5907984", "0.59005505", "0.5894397", "0.58737385", "0.58480215", "0.58480215", "0.58480215", "0.58470863", "0.584249", "0.58386314", "0.5827011", "0.5821149", "0.58143...
0.7151429
0
get the content from the file @ In, fn, str, file name @ Out, getFileContent, None or Str, the content of the file, None if the file does not exist
def getFileContent(fn): content = None if not os.path.exists(fn): print("Can not open file " + fn) else: with open(fn, "rb") as f: content = f.readlines() return content
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getFileContent(self, filePath, mode):\n with open(filePath, mode) as my_file:\n return my_file.read()", "def getOneFileContent(fpath):\n\twith open(fpath, 'r') as contentFile:\n\t\tdocStr = contentFile.read()\n\treturn docStr", "def get_file_content(*args, **kwargs):\n return get_file_co...
[ "0.7004429", "0.6944194", "0.69117856", "0.6891505", "0.6869781", "0.6693023", "0.66398597", "0.66370535", "0.6601953", "0.6581153", "0.65580076", "0.6511232", "0.64998174", "0.6497492", "0.645005", "0.63932353", "0.6383015", "0.6368801", "0.6360603", "0.63588893", "0.6324127...
0.77819645
0
parse internal field, extract data to numpy.array @ In, fn, str, file name @ Out, parseInternalField, np.array, numpy array of internal field
def parseInternalField(fn): content = getFileContent(fn) if content is not None: return parseInternalFieldContent(content) else: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_internal_field(fn):\n if not os.path.exists(fn):\n print(\"Can not open file \" + fn)\n return None\n with open(fn, \"rb\") as f:\n content = f.readlines()\n return parse_internal_field_content(content)", "def load_field(self, filename,unmask=True,timeslice=None,fieldn...
[ "0.67038345", "0.6337403", "0.61946183", "0.61830485", "0.5911439", "0.5790525", "0.5700548", "0.5656776", "0.5563022", "0.54895", "0.5336497", "0.5327244", "0.52660453", "0.5234727", "0.5218746", "0.5186795", "0.51747614", "0.51649714", "0.5164957", "0.5154004", "0.5146514",...
0.6392078
1
parse internal field from content @ In, content, list, contents of lines @ Out, parseInternalFieldContent, np.array, numpy array of internal field
def parseInternalFieldContent(content): isBinary = isBinaryFormat(content) for ln, lc in enumerate(content): if lc.startswith(b'internalField'): if b'nonuniform' in lc: return parseDataNonuniform(content, ln, len(content), isBinary) elif b'uniform' in lc: return parseDataUniform(cont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_internal_field_content(content):\n is_binary = is_binary_format(content)\n for ln, lc in enumerate(content):\n if lc.startswith(b'internalField'):\n if b'nonuniform' in lc:\n return parse_data_nonuniform(content, ln, len(content), is_binary)\n elif b'unif...
[ "0.71107364", "0.63168263", "0.5897091", "0.55849326", "0.534179", "0.52867335", "0.527866", "0.52609754", "0.5251811", "0.5246303", "0.51816", "0.5168758", "0.51266754", "0.50884134", "0.506751", "0.50451964", "0.50402737", "0.50331396", "0.5031976", "0.50304556", "0.5023518...
0.70458513
1
parse internal field, extract data to numpy.array @ In, fn, str, file name @ Out, parseBoundaryField, np.array, numpy array of boundary field
def parseBoundaryField(fn): content = getFileContent(fn) if content is not None: return parseBoundaryContent(content) else: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_field(self, filename,unmask=True,timeslice=None,fieldname=None,\n check_for_grid_info=False,grid_info=None,grid_type='HD',\n **grid_kwargs):\n\n print(\"Reading input from {0}\".format(filename))\n grid = gd.makeGrid(grid_type,**grid_kwargs)\n retur...
[ "0.64242876", "0.62162095", "0.6209677", "0.61975586", "0.60571015", "0.5770253", "0.5619833", "0.55901575", "0.55566555", "0.5482648", "0.54454863", "0.5392667", "0.53734994", "0.53622764", "0.5351194", "0.526895", "0.5196798", "0.518764", "0.51780814", "0.51777613", "0.5162...
0.6371894
1
parse each boundary from boundaryField @ In, content, list, contents of lines @ Out, parseBoundaryContent, np.array, numpy array of boundary content
def parseBoundaryContent(content): data = {} isBinary = isBinaryFormat(content) bd = splitBoundaryContent(content) for boundary, (n1, n2) in bd.items(): pd = {} n = n1 while True: lc = content[n] if b'nonuniform' in lc: v = parseDataNonuniform(content, n, n2, isBinary) pd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def splitBoundaryContent(content):\n bd = {}\n n = 0\n inBoundaryField = False\n inPatchField = False\n currentPath = ''\n while True:\n lc = content[n]\n if lc.startswith(b'boundaryField'):\n inBoundaryField = True\n if content[n+1].startswith(b'{'):\n n += 2\n continue\n ...
[ "0.676758", "0.5943389", "0.5825941", "0.57428473", "0.5671639", "0.56188065", "0.55569106", "0.52741206", "0.5226079", "0.5182346", "0.5175217", "0.50705624", "0.50478774", "0.50197846", "0.5018908", "0.5012712", "0.5005119", "0.49888638", "0.4963069", "0.4928823", "0.492704...
0.6636226
1
parse uniform data from a line @ In, line, str, a line include uniform data, eg. "value uniform (0 0 0);" @ Out, data, float, the data
def parseDataUniform(line): if b'(' in line: return np.array([float(x) for x in line.split(b'(')[1].split(b')')[0].split()]) return float(line.split(b'uniform')[1].split(b';')[0])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_data_uniform(line):\n if b'(' in line:\n return np.array([float(x) for x in line.split(b'(')[1].split(b')')[0].split()])\n return float(line.split(b'uniform')[1].split(b';')[0])", "def strToFloatArray(line, delim=\",\"):\n\tarr = line.split(delim)\n\treturn [float(a) for a in arr]", "def...
[ "0.8340972", "0.5517812", "0.5491438", "0.54515165", "0.5444749", "0.5411866", "0.53617203", "0.53522086", "0.5350895", "0.5341383", "0.5338666", "0.5314843", "0.53035843", "0.529991", "0.52765393", "0.5266891", "0.5255733", "0.52467054", "0.52228665", "0.5216676", "0.5210526...
0.8375711
0
parse nonuniform data from lines @ In, content, list, contents of lines @ In, n, int, line number @ In, n2, int, last line number @ In, isBinary, bool, binary format or not @ Out, data, np.array, the data
def parseDataNonuniform(content, n, n2, isBinary): num = int(content[n + 1]) if not isBinary: if b'scalar' in content[n]: data = np.array([float(x) for x in content[n + 3:n + 3 + num]]) else: data = np.array([parseDataUniform(ln) for ln in content[n + 3:n + 3 + num]], dtype=float) else: nn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_data_nonuniform(content, n, n2, is_binary):\n num = int(content[n + 1])\n if not is_binary:\n if b'scalar' in content[n]:\n data = np.array([float(x) for x in content[n + 3:n + 3 + num]])\n else:\n data = np.array([ln[1:-2].split() for ln in content[n + 3:n + 3 +...
[ "0.72939473", "0.576256", "0.5614503", "0.55399686", "0.55272764", "0.55082977", "0.5430766", "0.5424401", "0.5421151", "0.5420277", "0.54124707", "0.5398691", "0.5389238", "0.5387025", "0.5370565", "0.5365845", "0.5358624", "0.5338451", "0.5271029", "0.5271029", "0.5269201",...
0.72283554
1
split each boundary from boundaryField @ In, content, list, contents of lines @ Out, bd, dict, boundary and its content range
def splitBoundaryContent(content): bd = {} n = 0 inBoundaryField = False inPatchField = False currentPath = '' while True: lc = content[n] if lc.startswith(b'boundaryField'): inBoundaryField = True if content[n+1].startswith(b'{'): n += 2 continue elif content[n+1]....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parseBoundaryContent(content):\n data = {}\n isBinary = isBinaryFormat(content)\n bd = splitBoundaryContent(content)\n for boundary, (n1, n2) in bd.items():\n pd = {}\n n = n1\n while True:\n lc = content[n]\n if b'nonuniform' in lc:\n v = parseDataNonuniform(content, n, n2, isBin...
[ "0.69426537", "0.58689356", "0.57067156", "0.570597", "0.56788254", "0.5639119", "0.55016166", "0.54326475", "0.5416712", "0.53725225", "0.5365889", "0.53334326", "0.53104985", "0.5258571", "0.5258571", "0.51881635", "0.5147788", "0.51426715", "0.5136968", "0.51313025", "0.51...
0.7796221
0
parse file header to judge the format is binary or not @ In, content, list, contents of lines @ In, maxline, int, optional, maximum lines to parse @ Out, isBinaryFormat, bool, optional, binary format or not
def isBinaryFormat(content, maxline=20): for lc in content[:maxline]: if b'format' in lc: if b'binary' in lc: return True return False return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_binary_format(content, maxline=20):\n for lc in content[:maxline]:\n if b'format' in lc:\n if b'binary' in lc:\n return True\n return False\n return False", "def _read_binary_file_header(self, header):\n pos = 0\n for item in BINARY_FILE_HEAD...
[ "0.6929272", "0.66425496", "0.61613995", "0.60625654", "0.6061429", "0.5974824", "0.5963592", "0.58999676", "0.586145", "0.5808696", "0.57958114", "0.5765717", "0.57649165", "0.57426006", "0.57401216", "0.5723259", "0.57137513", "0.5710796", "0.5689677", "0.56783456", "0.5665...
0.68826246
1
Builds a standard argument parser with arguments for talking to vCenter s service_host_name_or_ip o optional_port_number u required_user p optional_password
def build_arg_parser(): parser = argparse.ArgumentParser( description='Standard Arguments for talking to vCenter') # because -h is reserved for 'help' we use -s for service parser.add_argument('-s', '--host', required=True, action='store', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n self._parser = argparse.ArgumentParser(description='Arguments for talking to vCenter')\n self._standard_args_group = self._parser.add_argument_group('standard arguments')\n self._specific_args_group = self._parser.add_argument_group('sample-specific arguments')\n\n ...
[ "0.71266836", "0.6339634", "0.62475085", "0.6217708", "0.6208542", "0.6149711", "0.60763437", "0.6069174", "0.6051406", "0.5938939", "0.59186774", "0.5914091", "0.5845859", "0.5845533", "0.581851", "0.5769098", "0.5727322", "0.57154006", "0.5696293", "0.56790084", "0.5671075"...
0.78942305
0
if no password is specified on the command line, prompt for it
def prompt_for_password(args): if not args.password: args.password = getpass.getpass( prompt='Enter password for host %s and user %s: ' % (args.host, args.user)) return args
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _prompt_for_password(self, args):\n if not args.password:\n args.password = getpass.getpass(\n prompt='\"--password\" not provided! Please enter password for host %s and user %s: '\n % (args.host, args.user))\n return args", "def prompt_pass():\n ...
[ "0.8108544", "0.7064553", "0.6888839", "0.6848358", "0.6839806", "0.68363935", "0.6786832", "0.67775637", "0.6741633", "0.6583825", "0.65416706", "0.653224", "0.6495999", "0.6487865", "0.6382495", "0.6373791", "0.63475865", "0.6344081", "0.63420063", "0.62388223", "0.62127674...
0.7991988
1
Test that can successfully create ordered pvarray from parameters dict, and that the axis azimuth convention works correctly (via normal vector)
def test_ordered_pvarray_from_dict(params): pvarray = OrderedPVArray.from_dict(params) # Test that ground is created successfully assert isinstance(pvarray.ground, PVGround) assert pvarray.ground.length == (MAX_X_GROUND - MIN_X_GROUND) # Test the front and back sides assert len(pvarray.pvrows)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_plot_ordered_pvarray():\n is_ci = os.environ.get('CI', False)\n if not is_ci:\n import matplotlib.pyplot as plt\n\n # Create base params\n params = {\n 'n_pvrows': 3,\n 'pvrow_height': 2.5,\n 'pvrow_width': 2.,\n 'surface_azimuth': 90....
[ "0.6299245", "0.58484405", "0.561972", "0.5596307", "0.54138875", "0.5412273", "0.53812486", "0.53592557", "0.5348416", "0.53450435", "0.5343961", "0.53433716", "0.53161144", "0.5312588", "0.52936256", "0.52879596", "0.52826524", "0.52818984", "0.52647763", "0.5201233", "0.51...
0.79074186
0
Test that ordered pv array plotting works correctly
def test_plot_ordered_pvarray(): is_ci = os.environ.get('CI', False) if not is_ci: import matplotlib.pyplot as plt # Create base params params = { 'n_pvrows': 3, 'pvrow_height': 2.5, 'pvrow_width': 2., 'surface_azimuth': 90., # east orien...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_plot_npy(self, script_runner: ScriptRunner, tmp_path: Path) -> None:\n outfile = tmp_path.joinpath(\"projection.png\")\n logfile = tmp_path.joinpath(\"plot.log\")\n result = script_runner.run(\n \"qaa\",\n \"plot\",\n \"-i\",\n PROJNP,\n ...
[ "0.6210039", "0.62089", "0.610732", "0.59814525", "0.590776", "0.5853877", "0.5850298", "0.5782757", "0.57447165", "0.5709907", "0.56855", "0.56848544", "0.56525546", "0.5639313", "0.56114954", "0.5593207", "0.5592659", "0.5566774", "0.55631036", "0.5520934", "0.5510298", "...
0.8187743
0
Test shadow casting on ground, no interrow shading
def test_ordered_pvarray_gnd_shadow_casting(params): # Test front shading on right ordered_pvarray = OrderedPVArray.from_dict(params) ordered_pvarray.cast_shadows() # Check shadow casting on ground assert len(ordered_pvarray.ground.list_segments[0] .shaded_collection.list_surfaces) =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def end_cast(self):\r\n #draw the actual map\r\n self.emap.draw(shader=self.mshader, camera=self.camera)\r\n super(ShadowCaster, self)._end()\r\n # set third texture to this ShadowCaster texture\r\n texs = self.emap.buf[0].textures\r\n if len(texs) == 2:\r\n texs.append(self)\r\n else:\r\...
[ "0.6186927", "0.6113336", "0.608853", "0.60086364", "0.5798564", "0.5783662", "0.57199466", "0.56908786", "0.56398773", "0.5573316", "0.5569924", "0.55008674", "0.54907596", "0.5489581", "0.5449145", "0.5441071", "0.5439844", "0.54287004", "0.5422062", "0.5410058", "0.5386575...
0.65886277
0
Test that pvarray ground is cut correctly
def test_ordered_pvarray_cuts_for_pvrow_view(ordered_pvarray): ordered_pvarray.cast_shadows() n_surfaces_0 = ordered_pvarray.ground.n_surfaces len_0 = ordered_pvarray.ground.length ordered_pvarray.cuts_for_pvrow_view() n_surfaces_1 = ordered_pvarray.ground.n_surfaces len_1 = ordered_pvarray.gro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testVarianceClip(self):\n stats = afwMath.makeStatistics(self.image, afwMath.VARIANCECLIP)\n self.assertEqual(stats.getValue(afwMath.VARIANCECLIP), 0)", "def impact(self, ground):\n return self.position[1] > ground", "def test_cut_volume(self):\n\n shape_with_cut = ExtrudeCircle...
[ "0.61489254", "0.6070586", "0.60605496", "0.58516884", "0.5765802", "0.57376856", "0.57366025", "0.57259303", "0.5628916", "0.5616238", "0.5569605", "0.5551783", "0.5545372", "0.5543925", "0.5486489", "0.5484237", "0.5484222", "0.547607", "0.5465004", "0.54188496", "0.5408771...
0.67409575
0
Check that getting a correct list of surfaces
def test_ordered_pvarray_list_surfaces(ordered_pvarray): ordered_pvarray.cast_shadows() n_surfaces = ordered_pvarray.n_surfaces list_surfaces = ordered_pvarray.all_surfaces assert isinstance(list_surfaces, list) assert len(list_surfaces) == n_surfaces assert isinstance(list_surfaces[0], PVSurfa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def surfaces(self):\n surfaces = []\n for i in range(1000):\n surface = self.surfaceInfo(i)\n if surface is not None:\n surfaces.append(surface)\n else:\n break\n\n return surfaces", "def _get_surfaces(idf):\n surfaces = idf.g...
[ "0.6924068", "0.6849405", "0.6583199", "0.64819354", "0.63409185", "0.6302007", "0.61874706", "0.6174321", "0.61370504", "0.6024608", "0.5953972", "0.59246856", "0.58038336", "0.5795394", "0.5744935", "0.5740025", "0.5738082", "0.5727116", "0.5714613", "0.5675944", "0.5593768...
0.71579975
0
Test that building surface registry correctly
def test_build_surface_registry(ordered_pvarray): ordered_pvarray.cast_shadows() reg = ordered_pvarray.surface_registry assert reg.shape[0] == ordered_pvarray.n_surfaces assert reg.shape[1] == len(ordered_pvarray.registry_cols)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_registry(self):\n validate_registry()", "def test_registry():\n assert(CQT.get_id() in msaf.base.features_registry.keys())\n assert(PCP.get_id() in msaf.base.features_registry.keys())\n assert(Tonnetz.get_id() in msaf.base.features_registry.keys())\n assert(MFCC.get_id() in msaf.base....
[ "0.69811434", "0.6693563", "0.63478315", "0.6304317", "0.62059057", "0.6082819", "0.5975071", "0.5939645", "0.5885287", "0.5876585", "0.5812304", "0.58108705", "0.58007985", "0.57593113", "0.5748162", "0.5730178", "0.5712615", "0.56892425", "0.56724757", "0.56724757", "0.5647...
0.67098224
1
Making sure that things are correct when the pvarray is almost flat and the sun is very low, which means that the shadows on the ground, and the edge points will be outside of ground range (since not infinite)
def test_orderedpvarray_almost_flat(): params = { 'n_pvrows': 3, 'pvrow_height': 2.5, 'pvrow_width': 2., 'surface_azimuth': 90., # east oriented modules 'axis_azimuth': 0., # axis of rotation towards North 'surface_tilt': 0.01, # almost flat 'gcr': 0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def checkEdges( self ):\n\t\tx, y = self.position.xy\n\t\tvx, vy = self.velocity.xy\n\t\t\n\t\t#if particle hit left or right wall\n\t\tif abs( x ) > WINDOW_X - self.r:\n\t\t\t#change vertical speed\n\t\t\tvx *= -1\n\t\t\t\n\t\t#if particle hit top or bottom wall\n\t\tif abs( y ) > WINDOW_Y - self.r:\n\t\t\t#chang...
[ "0.6272341", "0.5909485", "0.5843608", "0.57478935", "0.5712216", "0.55625147", "0.55246043", "0.54803514", "0.5457255", "0.54491323", "0.5443486", "0.53756225", "0.53627175", "0.53010017", "0.5285085", "0.52525085", "0.524432", "0.5243245", "0.52396655", "0.5213551", "0.5171...
0.6220021
1
Get all uid service
def get_all_uid_service(): return user_dao.get_all_uid_dao()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self):\n return UserServices.get_all()", "def get_service_uuids(self) -> list[bluetooth.BluetoothUuid]:\n return [bluetooth.BluetoothUuid(i) for i in self.serviceUuids()]", "def get_all_users():", "def get_service_ids(self) -> list[bluetooth.BluetoothUuid]:\n return [bluetooth.Bl...
[ "0.6878982", "0.67938226", "0.6772734", "0.6752165", "0.6518208", "0.65042496", "0.63989496", "0.6291184", "0.6289868", "0.6243451", "0.618874", "0.6172876", "0.6141646", "0.6121221", "0.6118732", "0.61183184", "0.61183184", "0.61183184", "0.61183184", "0.61112946", "0.609277...
0.8835818
0
Is validated location service
def is_validated_location_service(request_body): schema = schema_utils.get_location_schema() validator = Validator(schema, require_all=True) result = validator.validate(request_body) if validator.errors: logging.error(str(validator.errors)) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_valid(self):\n for location in self.locations.values():\n if not location.is_valid:\n return False\n return True", "async def validate_location(self, latitude: float, longitude: float) -> bool:\n params = {\n 'latlng': '{},{}'.format(latitude, long...
[ "0.6827493", "0.6746625", "0.669648", "0.6668864", "0.65373766", "0.65335685", "0.6292397", "0.6285626", "0.6271284", "0.62309146", "0.6221453", "0.62207806", "0.6184326", "0.61672896", "0.6148031", "0.6100087", "0.6073776", "0.60446525", "0.6036794", "0.6026727", "0.5989667"...
0.7939023
0
Get location by uid
def get_location_by_uid_service(uid): user = user_dao.get_user_by_uid_dao(uid) if user is not None: location_in_user = user.location if location_in_user is not None: location_in_city = city_service.get_city_by_name_service(location_in_user) if location_in_city is not None...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_location_by_id(self, location_id):", "def get(self, uid=None):\n if uid is None:\n users = User.query.filter(User.username != 'admin').join(Location).add_columns(Location.location_name).order_by(User.username).all()\n lista = []\n for u, l in users:\n ...
[ "0.695641", "0.69563276", "0.68235", "0.66111964", "0.65950066", "0.6579128", "0.6448447", "0.64483994", "0.63976526", "0.6377154", "0.63526666", "0.6344677", "0.623912", "0.6233662", "0.62210566", "0.6199421", "0.61988014", "0.615675", "0.61533123", "0.611789", "0.6087007", ...
0.80399734
0
Test case for add_device_users Add device users
def test_add_device_users(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_resource_user_resource_add_users_post(self):\n pass", "def test_add_device(self):\n\n pass", "def test_add_user(self):\n pass", "def test_delete_device_users(self):\n pass", "def testAdd2(self):\n self.assertEquals(models.SUCCESS, self.users.add(\"userC\", \"pass...
[ "0.73578095", "0.731361", "0.72545964", "0.71359545", "0.6859352", "0.67971987", "0.6771388", "0.67663026", "0.67103314", "0.66910756", "0.6665874", "0.66456485", "0.66326815", "0.6605868", "0.6597038", "0.65885776", "0.6524774", "0.65050274", "0.6492861", "0.64587355", "0.64...
0.9053967
0
Test case for create_device Create a device
def test_create_device(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_device1(self):\n pass", "def test_create_device_data(self):\n pass", "def test_create_device_template(self):\n pass", "def test_add_device(self):\n\n pass", "def test_create_device_group1(self):\n pass", "def test_gwservice_createdevice(self, setup_contr...
[ "0.8706713", "0.84661424", "0.8282174", "0.80598336", "0.7619959", "0.7429987", "0.7389389", "0.71390444", "0.71036476", "0.71036476", "0.70619774", "0.6943331", "0.6885383", "0.6839649", "0.6815849", "0.680661", "0.6757838", "0.6746112", "0.6746112", "0.67344606", "0.6701593...
0.91683114
1
Test case for create_device_template Create a device template
def test_create_device_template(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_device_template(self):\n pass", "def create_device(jwt: str, template_id: str, label: str) -> str:\n LOGGER.debug(\"Creating template...\")\n\n args = {\n \"url\": \"{0}/device\".format(CONFIG['dojot']['url']),\n \"headers\": {\n \"Content-Ty...
[ "0.7558732", "0.74659073", "0.7054378", "0.6984121", "0.69432616", "0.6923282", "0.6923282", "0.68996066", "0.6780393", "0.6757307", "0.6706696", "0.653945", "0.6403003", "0.6312825", "0.62448364", "0.6209234", "0.61997443", "0.618059", "0.61704856", "0.6109631", "0.6102503",...
0.88231057
0
Test case for delete_device Delete a device
def test_delete_device(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_device_by_id(self):\n pass", "def test_delete_device_by_id1(self):\n pass", "def test_delete_device_user(self):\n pass", "def test_delete_device_template(self):\n pass", "def test_delete_device_token(self):\n pass", "def test_gwservice_deletedevice(self,...
[ "0.8816926", "0.86022997", "0.84536564", "0.82883555", "0.7951894", "0.7951835", "0.7951469", "0.775631", "0.74633205", "0.74265844", "0.73754066", "0.72918934", "0.72641563", "0.72374195", "0.7196228", "0.7173849", "0.7173083", "0.7068335", "0.6993801", "0.6954111", "0.69499...
0.9224932
0
Test case for delete_device_template Delete an device template
def test_delete_device_template(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_template_success(self):\n template_id = util.MOCK_UUID_1\n\n rv = TEST_CLIENT.delete(f\"/templates/{template_id}\")\n result = rv.json()\n\n expected = {\"message\": \"Template deleted\"}\n self.assertDictEqual(expected, result)", "def test_delete_device(self):\...
[ "0.75278586", "0.7441134", "0.7441134", "0.7341785", "0.7266573", "0.71652085", "0.7113398", "0.7082586", "0.7027247", "0.7015206", "0.6957292", "0.6924533", "0.6904488", "0.68481714", "0.68216103", "0.6819011", "0.6674969", "0.6670254", "0.662203", "0.6591491", "0.6581371", ...
0.9101061
0
Test case for delete_device_user Delete a device user
def test_delete_device_user(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_device_users(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_delete_user(self):\n pass", "def test_delete_user(self):\n pass", "def test_del...
[ "0.8446846", "0.826355", "0.8187466", "0.8187466", "0.80080813", "0.800481", "0.78356504", "0.78356504", "0.7833679", "0.78216195", "0.7813622", "0.77610695", "0.7752938", "0.7584494", "0.75747484", "0.7518278", "0.7494845", "0.7482349", "0.74594706", "0.74318725", "0.7431872...
0.91480225
0
Test case for delete_device_users Delete all device users
def test_delete_device_users(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_device_user(self):\n pass", "def test_delete_device(self):\n pass", "def test_delete_device(self):\n pass", "def test_delete_user(self):\n pass", "def test_delete_user(self):\n pass", "def test_products_ref_users_user_delete(self):\n pass", "def...
[ "0.84467477", "0.7459479", "0.7459479", "0.73279345", "0.73279345", "0.7281826", "0.7254793", "0.71910816", "0.7177074", "0.7154791", "0.7148654", "0.709819", "0.709819", "0.7081001", "0.7072572", "0.7012183", "0.70052934", "0.69912326", "0.69912326", "0.69323254", "0.6922827...
0.9037446
0
Test case for get_device Get a single device
def test_get_device(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_device_by_id(self):\n pass", "def test_get_device_by_id1(self):\n pass", "def test_get_device_unknown():\n device = get_device(SERIAL, CREDENTIAL, \"unknown\")\n assert device is None", "def get_device(arn=None):\n pass", "def GetDevice(self, arg):\n\n if not arg: r...
[ "0.81833744", "0.7968419", "0.76543206", "0.7466782", "0.7458269", "0.7350012", "0.7350012", "0.7348333", "0.7342829", "0.73057467", "0.7265913", "0.71554714", "0.7151205", "0.6985566", "0.6928717", "0.6913276", "0.6910796", "0.6908214", "0.686872", "0.6852534", "0.6852534", ...
0.8730457
0
Test case for get_device_template Get a single device template
def test_get_device_template(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_device_templates(self):\n pass", "def test_create_device_template(self):\n pass", "def get_template(self, template):\n\n\n env = Environment(\n loader=FileSystemLoader('templates')\n )\n return env.get_template(template)", "def test_get_template_...
[ "0.73202986", "0.729892", "0.67775726", "0.6698397", "0.6588988", "0.64848536", "0.6441047", "0.6400326", "0.6342013", "0.6304625", "0.62597734", "0.6206748", "0.6118068", "0.6099196", "0.608626", "0.6064453", "0.6042264", "0.60273707", "0.60178995", "0.600901", "0.60042655",...
0.839098
0
Test case for get_device_templates List and search device templates
def test_get_device_templates(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_device_template(self):\n pass", "def test_create_device_template(self):\n pass", "def test_list_templates_no_args(self):\n rv = TEST_CLIENT.get(\"/templates\")\n result = rv.json()\n\n expected = util.MOCK_TEMPLATE_LIST\n self.assertEqual(result, expected)...
[ "0.7597677", "0.6757893", "0.67180157", "0.6585385", "0.6512994", "0.6441086", "0.63105434", "0.6310152", "0.628977", "0.62838167", "0.6243493", "0.6235861", "0.62315977", "0.62143195", "0.62143195", "0.62139773", "0.6186927", "0.61868125", "0.6176081", "0.61642534", "0.60989...
0.85823727
0
Test case for get_devices List and search devices
def test_get_devices(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_devices(self):\n print(\"Test Device List\")\n self.mock_api.return_value = call_json.DeviceList.device_list_response()\n self.manager.get_devices()\n all_kwargs = parse_args(self.mock_api)\n assert assert_test(self.manager.get_devices, all_kwargs, None,\n ...
[ "0.82819635", "0.82287055", "0.769721", "0.76637846", "0.7592765", "0.7563899", "0.7402828", "0.73823375", "0.73076856", "0.73076856", "0.73022485", "0.72585624", "0.7241559", "0.72160584", "0.7191287", "0.7173276", "0.71238774", "0.71208197", "0.71132135", "0.7065103", "0.70...
0.8521103
1
Test case for update_device Update a device
def test_update_device(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update_device_by_id(self):\n pass", "def test_update_device_by_id1(self):\n pass", "def test_partially_update_device_by_id(self):\n pass", "def test_partially_update_device_by_id1(self):\n pass", "def test_update_device_template(self):\n pass", "def test_update...
[ "0.8387374", "0.8313011", "0.8131258", "0.8049254", "0.7702412", "0.7431526", "0.7407491", "0.73720753", "0.72002023", "0.70570225", "0.70231795", "0.7020823", "0.6881969", "0.68653166", "0.6847393", "0.6778359", "0.6722223", "0.6722223", "0.6722223", "0.67198354", "0.670192"...
0.8999517
0
Test case for update_device_template Update an device template
def test_update_device_template(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_device_template(self):\n pass", "def test_update_template_registration(self):\n pass", "def test_update_template_success(self):\n template_id = util.MOCK_UUID_1\n template_name = \"template-3\"\n\n rv = TEST_CLIENT.patch(\n f\"/templates/{template_i...
[ "0.73621833", "0.72091824", "0.7033278", "0.7003331", "0.688735", "0.66845644", "0.6677435", "0.6677435", "0.65816057", "0.64058125", "0.63215053", "0.62437636", "0.62369215", "0.62116665", "0.61367315", "0.6071071", "0.6053043", "0.6014181", "0.5998571", "0.59458286", "0.589...
0.88984853
0
Get all entities as a set
def entities(self): triples = self.triples() return set(pd.concat((triples["head"], triples["tail"])))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gather_entities(self):\n entitylist = set()\n for entity in self.entities.all():\n entitylist.add(entity)\n entitylist.update(entity.get_ancestors())\n return entitylist #set(entity for entity in entitylist if not entity.abstract_entity)", "def get_all_entities(self...
[ "0.784685", "0.7360404", "0.7099119", "0.70690656", "0.70656127", "0.6717839", "0.66854465", "0.6665307", "0.6663667", "0.6625189", "0.65861917", "0.6536721", "0.64790106", "0.647811", "0.6478027", "0.64688426", "0.6431237", "0.6431237", "0.63910395", "0.6389514", "0.6382306"...
0.7604863
1
Get all relations as a set
def relations(self): return set(self.triples()["relation"])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gather_entities(self):\n entitylist = set()\n for entity in self.entities.all():\n entitylist.add(entity)\n entitylist.update(entity.get_ancestors())\n return entitylist #set(entity for entity in entitylist if not entity.abstract_entity)", "def sets(self):\n\n ...
[ "0.6956754", "0.6833932", "0.6713846", "0.66833305", "0.66541994", "0.6653318", "0.6592581", "0.65674", "0.6426487", "0.64105093", "0.6392888", "0.6389067", "0.6388016", "0.6374364", "0.6333366", "0.6306048", "0.6287926", "0.62876713", "0.6279454", "0.627794", "0.62490934", ...
0.8302892
0
Get the label of the specified entity
def entity_label(self, eid): entities = self._load_entities() return entities[eid]["label"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_label(self):\n return self.label", "def entity_type_label(self, type_id):\n type_labels = self._load_entity_type_labels()\n return type_labels[type_id][\"label\"]", "def get_label(self):\n return self.job[self.label_key]", "def _get_label ( self ):\n if self._label...
[ "0.7276516", "0.7205477", "0.7191478", "0.70857084", "0.70378274", "0.70378274", "0.70378274", "0.70378274", "0.69848406", "0.69386566", "0.6933686", "0.69301033", "0.69268405", "0.68992525", "0.688368", "0.68731064", "0.68668896", "0.67959106", "0.67959106", "0.67464054", "0...
0.81898516
0
Get the Wikidata description of the specified entity
def entity_description(self, eid): entities = self._load_entities() return entities[eid]["description"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_description(self):\n return \"It is an Entity.\"", "def get_description():\n raise NotImplementedError", "def get_description(self):", "def get_description(self):\n raise NotImplementedError", "def get_description(self) -> str:\n pass", "def get_description(self):\n ...
[ "0.69636524", "0.6657783", "0.6623214", "0.6414043", "0.63408333", "0.63365275", "0.6297167", "0.62928176", "0.62681735", "0.62667286", "0.62577486", "0.6203583", "0.6203583", "0.62032956", "0.61936265", "0.6177083", "0.616883", "0.6154934", "0.6154934", "0.6153788", "0.61537...
0.7234484
0
Get the Wikipedia URL of this entity
def entity_wikipedia_url(self, eid): entities = self._load_entities() return entities[eid]["wiki"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def entity_type_wikipedia_url(self, type_id):\n type_labels = self._load_entity_type_labels()\n return type_labels[type_id][\"wiki\"]", "def get_wikipedia_url(query):\n sitew = pywikibot.Site(\"en\", \"wikipedia\")\n result = None\n print(\"looking up:\", query)\n search = sitew.search(...
[ "0.75906295", "0.7037407", "0.67068356", "0.6607818", "0.63991827", "0.6390745", "0.6329658", "0.6241659", "0.62362003", "0.62211347", "0.6214804", "0.6214804", "0.6197", "0.61952233", "0.6179749", "0.6179749", "0.6176869", "0.61635286", "0.6161402", "0.6157759", "0.61346143"...
0.8273978
0
Get the label of this relation
def relation_label(self, rid): relations = self._load_relations() return relations[rid]["label"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_label(self):\n return self._label", "def get_label(self):\n\n return self._label", "def label(self) -> str:\n return self._underlying.label", "def get_label(self):\n return self.label", "def get_label(self):\n return self.label", "def get_label(self):\n r...
[ "0.7765079", "0.7757239", "0.7757034", "0.7748383", "0.7748383", "0.7748383", "0.7748383", "0.773344", "0.7722936", "0.77152187", "0.76963216", "0.7694587", "0.76940954", "0.76722056", "0.76722056", "0.76722056", "0.76722056", "0.76722056", "0.76722056", "0.76722056", "0.7659...
0.8474983
0
Get the Wikidata description of this relation
def relation_description(self, rid): relations = self._load_relations() return relations[rid]["description"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_description(self):\n raise NotImplementedError", "def get_description(self):", "def get_description():\n raise NotImplementedError", "def get_description(self):\r\n return self.__description", "def description(self):\n return self.definition.description", "def get_desc...
[ "0.68826866", "0.6872814", "0.68134815", "0.67933035", "0.67725354", "0.6751493", "0.674796", "0.67381465", "0.67381465", "0.67182386", "0.67141235", "0.67141235", "0.67141235", "0.67141235", "0.67141235", "0.67141235", "0.67141235", "0.67141235", "0.67141235", "0.67141235", ...
0.7552016
0
Get the Wikidata description of this entity type
def entity_type_description(self, type_id): type_labels = self._load_entity_type_labels() return type_labels[type_id]["description"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_description(self):\n return \"It is an Entity.\"", "def get_description(self):\n raise NotImplementedError", "def get_description():\n raise NotImplementedError", "def description(self):\n return self.definition.description", "def getDescription(self):\n raise Not...
[ "0.7560341", "0.741767", "0.73861045", "0.7275411", "0.72101784", "0.72083867", "0.71942973", "0.71942973", "0.7192919", "0.718812", "0.7179861", "0.7178777", "0.71510714", "0.7117293", "0.7102342", "0.7102342", "0.7102342", "0.7102342", "0.7093504", "0.7093504", "0.7093504",...
0.74495554
1
Get the Wikipedia URL of this entity
def entity_type_wikipedia_url(self, type_id): type_labels = self._load_entity_type_labels() return type_labels[type_id]["wiki"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def entity_wikipedia_url(self, eid):\n entities = self._load_entities()\n return entities[eid][\"wiki\"]", "def get_wikipedia_url(query):\n sitew = pywikibot.Site(\"en\", \"wikipedia\")\n result = None\n print(\"looking up:\", query)\n search = sitew.search(\n query, where=\"titl...
[ "0.8273978", "0.7037407", "0.67068356", "0.6607818", "0.63991827", "0.6390745", "0.6329658", "0.6241659", "0.62362003", "0.62211347", "0.6214804", "0.6214804", "0.6197", "0.61952233", "0.6179749", "0.6179749", "0.6176869", "0.61635286", "0.6161402", "0.6157759", "0.61346143",...
0.75906295
1
Get ALL triples in the dataset as a pandas DataFrame with columns ['head', 'relation', 'tail']
def triples(self): return pd.concat((self._load_train(), self._load_valid(), self._load_test()))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pairs_to_df(pairs, columns=['source', 'target']):\n\n edges = pd.DataFrame(data=pairs, columns=columns)\n return edges", "def construct_df():\n iterable = [['approach', 'contact', 'retract', 'pause'], ['force', 'height']]\n index = pd.MultiIndex.from_product(iterable, names=['segment', 'c...
[ "0.61316717", "0.5876836", "0.5817665", "0.5795269", "0.5713467", "0.57110244", "0.5672862", "0.5665925", "0.56156945", "0.55938035", "0.558964", "0.55612916", "0.5543907", "0.55086553", "0.55017775", "0.5466847", "0.5456998", "0.5417017", "0.54076993", "0.53812265", "0.53694...
0.65025246
0
>>> subarray_sort([3, 4, 8, 7, 10, 6, 17]) [2, 5] >>> subarray_sort([3, 4, 8, 7, 20, 6 , 17]) [2, 6] >>> subarray_sort([3, 4, 8, 7, 20, 6 , 17, 22, 14, 26]) [2, 8]
def subarray_sort(array): # iterate through the array # when value at index is less than value at next index, set start pointer # keep track of the max at that stage. When you hit a value greater than maximum, set end pointer. # return start and end start = 0 end = len(array) minimum = mat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def merge(items, start, end, subarray_size):\n mid = start + subarray_size\n assert is_sorted(items[start:mid])\n assert is_sorted(items[start+subarray_size:end])\n\n aux = []\n i = start\n j = mid\n\n while i < mid and j < end:\n if items[i] < items[j]:\n aux.append(items[i]...
[ "0.6585845", "0.6479241", "0.6469128", "0.63522285", "0.6244256", "0.6203021", "0.6198199", "0.61646646", "0.60745865", "0.6045471", "0.6003464", "0.5982406", "0.5951736", "0.59433675", "0.5914686", "0.59073436", "0.5890387", "0.5855082", "0.5830936", "0.58259004", "0.5805941...
0.76662284
0
(dict, dict) > void This function takes two vectors in the form of dictionnaries and adds them together. It only modifies the input of v1.
def add_vectors(v1,v2): #iterates through second dictionnary for key in v2: #if key is in v1 and v2 then we would add the values if key in v1: v1[key] = v1[key] +v2[key] #checks if the value at current key is 0 if v1[key] == 0: # if value ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def merge_dicts_of_vectors(d1,d2):\n \n \n for key in d2:\n \n #adds a key from d2 in d1 if the key doesnt exist in d1 \n if key not in d1:\n \n d1[key] = d2[key] \n \n \n #if key in d2 \n elif key in d1:\n \n ...
[ "0.77904284", "0.70172906", "0.6773894", "0.67006165", "0.66165036", "0.6537785", "0.65032035", "0.64944863", "0.6449679", "0.64478683", "0.64445156", "0.6395278", "0.6322595", "0.6262542", "0.6256518", "0.623545", "0.62072104", "0.61411554", "0.61297673", "0.61224455", "0.61...
0.8485566
0
(dict,dict) > dict This function takes 2 vectors in the form of 2 dictionnaries and the first vector substracts the second vector without modifying any of the inputs. It returns a new dictionnary instead.
def sub_vectors(d1,d2): #creates a new dictionnary to deep copy the inputs empty_dict = {} #creates a deep copy of d1 into an empty dictionnary for key in d1: empty_dict[key] = d1[key] #checks if any keys if a value of 0 if empty_dict[key] == 0: #if so we would d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dict_subtract(a, b):\n return {k: a[k] for k in set(a) - set(b)}", "def subtract(d1, d2):\n res = {}\n \n for key in d1:\n if key not in d2:\n res[key]=None\n\n return res", "def subtract(d1, d2):\n res = {}\n for key in d1:\n if key not in d2:\n res...
[ "0.8019216", "0.7516817", "0.75147736", "0.73366153", "0.7233189", "0.7071012", "0.69974273", "0.6870052", "0.6567892", "0.6555567", "0.6534538", "0.65214676", "0.6475726", "0.6470439", "0.6446864", "0.6437038", "0.63999826", "0.6344553", "0.6321223", "0.62762105", "0.6251254...
0.77851033
1
(dict,dict) > int This function takes 2 vectors in the form as dictionnaries for both inputs. It then returns the dot product the 2 vectors as input.
def get_dot_product(v1,v2): #sets default dot product dot_product = 0 for key in v2: if key in v1: # updates the dot product if key is present in both vectors dot_product += v1[key]*v2[key] #returns final dot product return dot_product
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dot_product(vector_1, vector_2):\n result = 0\n for idx_1, value_1 in vector_1.items():\n if idx_1 in vector_2:\n result += value_1 * vector_2[idx_1]\n return result", "def dot(a,b):\n acc = 0\n for k in b.keys():\n acc += a[k] * b[k]\n return acc", "def dotproduc...
[ "0.80098444", "0.7926375", "0.7590323", "0.7570805", "0.75266075", "0.7500883", "0.7497483", "0.74910325", "0.73982996", "0.73711026", "0.7362979", "0.73448074", "0.7324401", "0.7301347", "0.72973365", "0.72910786", "0.728106", "0.718888", "0.71722794", "0.71653205", "0.71496...
0.80899405
0
(dict) > void This function takes in a vector in the form of a dictionnary and divides each value by the norm of the vector.
def normalize_vector(v1): #this gets the vector length vector_length = get_vector_norm(v1) #divides each coordinate of the vector by its norm for key in v1: v1[key] = v1[key]/ vector_length
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def norm_vec(vec):\n return vec / norm(vec)", "def norm(vector):\r\n result = 0\r\n # initial value for the result of this function\r\n for z in range(len(vector)):\r\n # this loop will continue as long as there are more values in the list \r\n result += vector[z]**2\r\n result = result**.5\r\n # ...
[ "0.7041765", "0.69374895", "0.6909736", "0.68978244", "0.68261373", "0.6816595", "0.68094146", "0.67418873", "0.67230755", "0.67134273", "0.6711797", "0.6700801", "0.6694086", "0.6683999", "0.66580236", "0.66348505", "0.66265297", "0.6624056", "0.66171694", "0.65889084", "0.6...
0.77610236
0
Inherit Default Get Method To Add Employee Donor
def default_get(self, cr, uid, fields, context=None): res = super(granted_rights_order, self).default_get(cr, uid, fields, context=context) employee_obj = self.pool.get('hr.employee') department_obj = self.pool.get('hr.department') manager = False ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def retrieve(self, request, pk=None):\n employee = self.get_employee_object(pk)\n print(F\"Employee: {employee}\")\n serializer = data_serializers.PresentEmployeeDataSerializer(employee)\n return Response(serializer.data)", "def get(self):\n resultado = EmployeeModel.query.all(...
[ "0.5937169", "0.5712069", "0.56761324", "0.55464655", "0.5537098", "0.54883313", "0.5455306", "0.53574085", "0.53373045", "0.5319878", "0.52610743", "0.52512735", "0.52504754", "0.52499604", "0.5211736", "0.52112573", "0.5210425", "0.5210425", "0.52026063", "0.5201065", "0.51...
0.61324453
0
Hiding files in Backblaze allows the system lifecycle rules to operate and eventually age out files.
def hide(bucket, paths): info = SqliteAccountInfo() b2 = B2Api(info) bucket = b2.get_bucket_by_name(bucket) for path in paths: path = path.strip('\n') if path.startswith('b2://'): path = '/'.join(path.split('/')[3:]) print(f'{path} ', end='') try: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_hidden_file(file_path: pathlib.Path) -> None:\n file_path.touch()\n make_file_hidden(file_path)", "def make_file_hidden(file_path: pathlib.Path, if_dot=False) -> None:\n if os.name == 'nt':\n if not if_dot or file_path.stem.startswith('.'):\n atts = win32api.GetFileAttributes(...
[ "0.6327918", "0.5975653", "0.59576935", "0.5920448", "0.5574143", "0.55521053", "0.5502464", "0.5483319", "0.54502296", "0.53635746", "0.536256", "0.5343542", "0.53346723", "0.5324353", "0.5274758", "0.5253053", "0.5246893", "0.5242575", "0.52021486", "0.51197624", "0.5115872...
0.6088717
1
Test that human dwell times are unique and within expected ranges
def test_human_dwell_time(mu, sigma, base, multiplier, minimum, maximum): lower = minimum upper = float('Inf') if maximum is None else maximum iterations = 10 unique_dwell_times = set() unique_threshold = 0.9 cumulative_dwell_time = 0 lognormal_mean = math.exp(mu + (sigma ** 2) / 2) dw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_general_subset_invalid_time():\n pass", "def test_analyze_time(self):\n self.ph5validate.analyze_time()\n self.assertEqual(self.ph5validate.das_time.keys(), [('12183', 1, 500)])\n Dtime = self.ph5validate.das_time[('12183', 1, 500)]\n\n # 3 different deploy time\n s...
[ "0.648733", "0.64328337", "0.6280101", "0.6278174", "0.6261032", "0.62254643", "0.6218768", "0.6213306", "0.62099594", "0.6151937", "0.6099454", "0.60956514", "0.60956514", "0.6039151", "0.5995002", "0.5991447", "0.59632486", "0.5951149", "0.5865077", "0.58582985", "0.5855219...
0.67406905
0
Calculate array averages per group, given a group size
def average_by_group(array, group_size): length = len(array) num_groups = math.ceil(length / group_size) averages = [] remainder = array for _ in range(num_groups): group = remainder[:group_size] averages.append(sum(group) / len(group)) remainder = remainder[group_size:] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def piecewise_avg(vec, n_groups):\n size = len(vec) / n_groups\n ends = []\n for i in range(1, n_groups + 1):\n ends.append(int(size * i))\n ends[-1] = len(vec)\n\n sums = []\n start = 0\n for end in ends:\n sums.append(vec[start:end].sum() / (end - start))\n start = end\n...
[ "0.74085945", "0.6965847", "0.6746528", "0.6711129", "0.6465137", "0.63374853", "0.6148024", "0.614573", "0.6139967", "0.6126672", "0.6080923", "0.6078601", "0.6026114", "0.5984713", "0.5953734", "0.5926242", "0.59008497", "0.5888155", "0.58394784", "0.58372307", "0.5820444",...
0.8387848
0
Test human selection shuffle via unsteadily increasing values
def test_human_selection_shuffle(seed, lambd): iterations = 10 array_size = 20 group_size = 5 total_deltas = iterations * array_size delta_threshold = 0.5 cumulative_delta = 0 total_progressions = iterations * (math.ceil(array_size / group_size) - 1) progression_threshold = 0.5 cum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_case_1(self):\n print(\"-------------------shuffle-----------------------------------\")\n for _ in range(10):\n deck_size = np.random.randint(low=1, high=100000)\n deck = np.arange(deck_size)\n shuffle_deck = shuffle(deck)\n self.assertEqual(sum(s...
[ "0.65695316", "0.6567558", "0.6567269", "0.65465283", "0.6395455", "0.6392282", "0.6368654", "0.6290193", "0.628437", "0.62578815", "0.617706", "0.617706", "0.61744714", "0.6143033", "0.6142749", "0.6138102", "0.6138102", "0.611224", "0.61092275", "0.61059326", "0.60993993", ...
0.70852333
0
Testing the vectorized version against scipy on random data.
def test_fishers_vec(): a, b, c, d = _gen_rand_abcd() n = len(a) for alt in ['two-sided', 'less', 'greater']: ORs, pvalues = fishersapi.fishers_vec(a, b, c, d, alternative=alt) scipy_pvalues, scipy_ORs = np.zeros(n), np.zeros(n) for i in range(n): scipy_ORs[i], scipy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rng_fn_scipy(cls, rng, *args, **kwargs):", "def test_random_sphere_vector():\n\ttest_vector = o_gen_instance.generate_random_sphere_vector()\n\tassert isinstance(test_vector, np.ndarray)\n\tassert test_vector.shape == (3,)\n\tfor component in test_vector:\n\t\tassert component != 0.\n\tassert np.isclose(np.l...
[ "0.64752555", "0.58103216", "0.5797803", "0.5611891", "0.5604316", "0.55474585", "0.5507381", "0.550593", "0.54412353", "0.54228926", "0.54228926", "0.54118544", "0.5401395", "0.53620285", "0.5340474", "0.5330373", "0.5294335", "0.52810127", "0.52800304", "0.52713484", "0.526...
0.61810064
1
Print errors from Merger errors handler. sections map from Merger.get_errors() max_jobs_num maximum hosts to display. If <0 display all hosts outfile where to write
def finish(self): for msg, info in self.errors.iteritems(): hosts = [ self.job_to_str_func(job) for job in info['jobs'] ] max_jobs_num = self.max_jobs_num if max_jobs_num < 0 or max_jobs_num > len(hosts): hosts_msg = ': %s' % ' '.join(hosts) elif ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def processErrors(self):\n e = self.formatErrors()\n if not self.config.nologtostdout:\n if e:\n print e\n else:\n print \"No errors\"\n if self.config.logtomail:\n if e:\n m = xeputils.mail.LogMail(self.config, e)\n...
[ "0.5863673", "0.577774", "0.56743836", "0.55766803", "0.55453384", "0.55157065", "0.547031", "0.54671425", "0.54458654", "0.54288375", "0.5399173", "0.53842336", "0.5313307", "0.53128314", "0.5304199", "0.5296273", "0.5282605", "0.5258653", "0.52228993", "0.5200202", "0.51995...
0.64395785
0
Format exception as a str hash.
def exception_hash(err, traceback = None): result = '' if isinstance(err, str): result = "str: %s" % err else: if traceback == None: traceback = "\nNone\n" else: traceback = '\n' + traceback result = "%s.%s: %s%s" % (err.__class__.__module__, \ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hash(self) -> str:\r\n ...", "def __str__(self: Hash) -> str:\n return self.to_hex()", "def __str_to_hash(string_to_hash: str, errors: str = 'ignore') -> str:\n string_hash = string_to_hash.encode(encoding=\"utf-8\", errors=errors)\n return hashlib.md5(string_hash).hexdigest()", "def ...
[ "0.6792434", "0.6499622", "0.64186484", "0.6302711", "0.6254243", "0.6252223", "0.62357163", "0.62350696", "0.62148184", "0.62102276", "0.6206872", "0.61781335", "0.6158389", "0.6157197", "0.61546654", "0.6152599", "0.61406463", "0.6117195", "0.60565066", "0.60334337", "0.602...
0.80808693
0
Format exception description to display.
def exception_description(err): result = '' if isinstance(err, str): result = err elif isinstance(err, Exception): result = "Exception class: %s.%s\n" % (err.__class__.__module__, \ err.__class__.__name__) if len(err.args) > 0: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _exceptions_formatter(field, description):\n heads = ['throws']\n types = _or_types(field)\n if types:\n heads.append(types)\n tail = description\n return heads, tail", "def _exceptions_formatter(field):\n heads = ['throws']\n types = _or_types(field)\n if types:\n heads...
[ "0.6922721", "0.6913142", "0.6741802", "0.66862935", "0.6558262", "0.64827377", "0.643904", "0.6413507", "0.6372438", "0.63645434", "0.6358276", "0.6343516", "0.632333", "0.6276261", "0.6231479", "0.6142017", "0.6129628", "0.6127812", "0.6127812", "0.60836035", "0.6080737", ...
0.7123112
0
Util to get a model's subfield
def getUuidDocSubfield(coll, uuid, field, subField): mongoColl = mongoConfigColls[coll] query = { 'field' : field, 'apiviz_front_uuid' : uuid } result = mongoColl.find_one(query) log_app.debug("getUuidDocSubfield / result : %s", result ) return result[subField]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subfield():\n return Subfield()", "def get_field(self):\n return self", "def get_field(self, field):\n return self.extra_fields[field]", "def get_field(key, obj):\n\n val = obj\n\n for subkey in key.split('.'):\n val = val[subkey]\n\n return val", "def field(self):\n ...
[ "0.7862643", "0.6237273", "0.61779076", "0.6127797", "0.61008894", "0.6032195", "0.5980655", "0.5945626", "0.58978", "0.58787894", "0.5821626", "0.5821626", "0.5814458", "0.5791505", "0.57828593", "0.57695323", "0.57584214", "0.5704528", "0.57021326", "0.5695523", "0.56832296...
0.64687246
1
Main route to GET apiviz instance (uuid) auth doc
def checkUuidAuthUrl(uuid): print ("") log_app.debug("checkUuidAuthUrl") log_app.debug("checkUuidAuthUrl / method : %s", request.method ) msg = "there is the apiviz instance (uuid) auth options given your credentials" ### get request args if any auth_mode = request.args.get('auth_mode', default="", type...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main():\n\n return redirect('/apidocs')", "def auth(self):\n return self.api(self.token)", "def apiDocs():\n\treturn render_template('apiDocs.html')", "def api(self) -> str:", "def docs(request):\n # if request.user.is_authenticated():\n # return redirect('/fastapp')\n return context(...
[ "0.6339631", "0.610972", "0.6079194", "0.60340285", "0.5966885", "0.59479654", "0.59318936", "0.59318936", "0.5913621", "0.590195", "0.58598113", "0.5842073", "0.5827876", "0.5771853", "0.5771853", "0.5771853", "0.57624143", "0.5736158", "0.5733719", "0.57136416", "0.5698522"...
0.68790346
0
Checks whether the given list of genetic code is sorted in nondecreasing order. If the array (A) is None, return None.
def is_sorted(A: list) -> bool: # If it's None, return None if A is None: return None # If the length is 0 or 1, then # it's sorted if len(A) <= 1: return True # If not, let's loop through curr = A[0] for i in rang...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_not_in_descending_order(a):\n for i in range(len(a) - 1):\n if a[i] > a[i + 1]:\n return False\n return True", "def is_sorted_array(arr, increasing=True):\n # If only 1\n if len(arr) == 0:\n return True\n # If multiple values\n if increasing:\n return np.a...
[ "0.57564235", "0.5746037", "0.57452464", "0.5689957", "0.5679232", "0.56140393", "0.561256", "0.5541488", "0.5528832", "0.5473361", "0.546755", "0.54452485", "0.54323417", "0.54323417", "0.5426333", "0.5348625", "0.5346158", "0.53455627", "0.53300214", "0.52938354", "0.528478...
0.6066341
0
Get boundary values This will provide L and H, where L is the lowest index of a number where |A[i] i | <= c. H is the highest index of the number where |A[i] i| <= c
def get_bounds(self, A: list, c: int) -> (int, int): # This implementation uses two binary search algorithms to find # the upper and lower bound. # First step is to isolate the upper_bound. L = 0 R = len(A) while L < R: # Find the middle value ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_B(self):\n max_lb = 0\n for arc in self.arcs():\n lb = self.arc_info[arc[0]]['lower_bound']\n max_lb = max(max_lb, lb)\n n = len(self)\n m = len(list(self.edges()))\n return((m - n + 2)*max_lb)", "def boundary_of_set(i):\n b = self.args...
[ "0.6999565", "0.6554169", "0.6540402", "0.65089256", "0.6498955", "0.6460582", "0.6411427", "0.6409149", "0.63579535", "0.6310938", "0.6297428", "0.6292847", "0.6254609", "0.624314", "0.6221796", "0.62201816", "0.619398", "0.6192762", "0.6183565", "0.618086", "0.61747366", ...
0.7649461
0
Counts the number of elements in A such that | A[i] i | <= c If there are no numbers, return 0. If the array is invalid or None, return None.
def count_markers(self, A: list, c: int) -> int: # Corner cases if A is None: return None if len(A) == 0: return 0 # If it's 1 element long, check if it satisfies the condition. if len(A) == 1: return 1 if A[0] <= c else 0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def count_nonzero(a):\n return (np.count_nonzero(a))", "def counts(e, x):\n arr = np.asarray(arr)\n return len(np.where(arr == x)[0])", "def countZeroes(arr):\n counter = 0\n #sort the array\n arr.sort(reverse=True)\n print(arr)\n n = len(arr)\n print(n)\n\n # Find index of first ...
[ "0.635538", "0.6185249", "0.6184591", "0.60116416", "0.5962696", "0.5819565", "0.58080333", "0.57618463", "0.5671169", "0.565397", "0.5650213", "0.5625188", "0.5601584", "0.5588182", "0.5531587", "0.54829085", "0.547651", "0.5450212", "0.54434407", "0.54339063", "0.54213417",...
0.7254955
0
Return title object from associated Habit model.
def get_title(self, obj): title = obj.habit.title return title
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_model_title(self):\n pass", "def get_title(self):\n return self.metadata['title']", "def get_title(self):\n title = self.title\n if not title and self.parent_id:\n title = self.parent.title\n return title", "def get_title(self):\n return self.title...
[ "0.6521747", "0.6459908", "0.6407352", "0.64042", "0.64042", "0.64042", "0.6393259", "0.63920677", "0.637615", "0.6329303", "0.63084364", "0.63078314", "0.6305315", "0.6305315", "0.6305315", "0.62818336", "0.6270223", "0.6270223", "0.6267295", "0.6261046", "0.62459254", "0....
0.79024225
0
Return type_of_habit from associated Habit model.
def get_type_of_habit(self,obj): type_of_habit = obj.habit.type_of_habit return type_of_habit
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getHabitatType(self):\n\t\treturn self.habitatType", "def get_thermostat_type(self, home_id: str, room_id: str) -> Optional[str]:\n for module in self.modules.get(home_id, {}).values():\n if module.get(\"room_id\") == room_id:\n return module.get(\"type\")\n\n return N...
[ "0.73613846", "0.57704407", "0.5605953", "0.5596343", "0.5549498", "0.5549498", "0.54931337", "0.54931337", "0.54378486", "0.54340917", "0.5432066", "0.54173887", "0.53595924", "0.53525895", "0.53525895", "0.5352308", "0.5334593", "0.53299564", "0.53201526", "0.5312231", "0.5...
0.8260561
0
compare current floor with destination floor to get desired direction of each user
def check_floor(self): if self.current_floor > self.destination_floor: self.down = True elif self.current_floor < self.destination_floor: self.up = True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tryDirection(d, currentRoom):\n attrib = d + '_to'\n\n # See if the room has the destination attribute\n if hasattr(currentRoom, attrib):\n # If so, return its value (the next room)\n return getattr(currentRoom, attrib)\n\n # Otherwise print an error and stay in the same room\n pri...
[ "0.5854728", "0.5848312", "0.5727105", "0.5694538", "0.56649184", "0.56484467", "0.56479555", "0.55605876", "0.5556367", "0.5542874", "0.5530492", "0.55186653", "0.551756", "0.54783475", "0.5463694", "0.5445613", "0.541707", "0.5408882", "0.5386475", "0.5377211", "0.5346046",...
0.6890124
0
returns an 8bit str of x in binary
def binstr(x): xs = binary_repr(x) outstr = xs; for i in range(8 - len(xs)): outstr = '0' + outstr return outstr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_binary_string(x):\n return \"{0:b}\".format(x)", "def _get_bit_string(value):\n\n return \"{0:b}\".format(value).zfill(8)", "def _bin_backport(x):\n chars = []\n for n in range(7, -1, -1):\n y = x - 2**n\n if y >= 0:\n chars.append('1')\n ...
[ "0.8095117", "0.7473436", "0.74637", "0.7205661", "0.7122201", "0.7061172", "0.68579745", "0.6797246", "0.67897487", "0.6746678", "0.67330176", "0.67216563", "0.6681564", "0.66752654", "0.66666543", "0.6662359", "0.6610202", "0.65787375", "0.65569323", "0.6556036", "0.6525864...
0.8149528
0
Returns the proper Azure cloud object or raises an InterruptException if not found
def get_or_raise(value: str = "AZURE_PUBLIC_CLOUD") -> azure_cloud.Cloud: if not value: logger.warning("Azure cloud not provided. Using" " AZURE_PUBLIC_CLOUD as default") return azure_cloud.AZURE_PUBLIC_CLOUD cloud = value.strip().upper() if cloud == AZURE_PUBLIC_CL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _init_cloud(self, cloud_arg):\n # Disable too broad exception warning\n # pylint: disable=W0703\n cloud = None\n if cloud_arg:\n try:\n if hasattr(self.args, \"cm\"):\n cloud_module = self.args.cm if self.args.cm else None\n ...
[ "0.5035468", "0.4966669", "0.49548995", "0.49085197", "0.4901816", "0.48929438", "0.48124748", "0.48091525", "0.4799723", "0.4797991", "0.47526836", "0.47215092", "0.47177196", "0.4699975", "0.4695395", "0.4681023", "0.46798596", "0.4669056", "0.4653598", "0.4634809", "0.4633...
0.6404487
0
Bind new methods to already instantiated objects.
def bind_method(obj, method): setattr(obj, method.__name__, method.__get__(obj))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _bind(self):\n\n pass", "def __init__(self, obj, adapted_methods):\n self.obj = obj\n self.__dict__.update(adapted_methods)", "def __init__(self, obj, **adapted_methods):\n self.obj = obj\n self.__dict__.update(adapted_methods) # 将传入的实例属性作为适配器实例的属性", "def bind(self, ob...
[ "0.6655089", "0.66309637", "0.6426072", "0.63450414", "0.63182515", "0.62245023", "0.62052745", "0.6188573", "0.612461", "0.6004609", "0.59983754", "0.592303", "0.590517", "0.58745253", "0.5789438", "0.5775595", "0.5769056", "0.57031953", "0.57022685", "0.56356037", "0.561486...
0.6666269
0
Asks users whether they want to delete all experiments and then deletes.
def main(): crayon_client = pycrayon.CrayonClient("localhost") choice = raw_input("Are you sure? ") if choice == 'y': crayon_client.remove_all_experiments() else: print("Not deleting")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _delete_experiments(self):\n response = self.tsp_client.fetch_experiments()\n for experiment in response.model.experiments:\n self.tsp_client.delete_experiment(experiment.UUID)\n assert response.status_code == 200", "def test_delete_experiment(client, users):\n login_ex...
[ "0.7107457", "0.6406032", "0.62343085", "0.61992556", "0.61835784", "0.6144011", "0.6120033", "0.60342747", "0.60053545", "0.5905315", "0.5883846", "0.5882311", "0.5825803", "0.58122575", "0.5779762", "0.5753375", "0.5709011", "0.57069325", "0.5701448", "0.56829786", "0.56780...
0.71388346
0
test method for list config node objects
def test_list_config_nodes(self): with self.override_role(): self.config_client.list_config_nodes()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_list(self):\n pass", "def test_list(self):\n pass", "def test_get_hyperflex_node_list(self):\n pass", "def test_get_list(self):\n pass", "def test_get_hyperflex_config_result_list(self):\n pass", "def test_get_hyperflex_node_config_policy_list(self):\n p...
[ "0.7477382", "0.7477382", "0.74751604", "0.7381981", "0.7080617", "0.6992007", "0.696177", "0.6812762", "0.6713372", "0.6647431", "0.66187465", "0.65833324", "0.65396404", "0.6529229", "0.65099716", "0.6502414", "0.6451645", "0.6432264", "0.64042276", "0.63779175", "0.6348988...
0.80000955
0
test method for create config node objects
def test_create_config_nodes(self): with self.override_role(): self._create_config_node()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_hyperflex_node_config_policy(self):\n pass", "def test_node_config() -> None:\n node = MyNode()\n node.configure(\n MyConfig(\n int_field=5,\n str_field=\"hello\",\n float_field=0.5,\n int_enum_field=MyIntEnum.B,\n str_enu...
[ "0.72890365", "0.7229918", "0.69116074", "0.69116074", "0.6904619", "0.67127997", "0.66661125", "0.6608727", "0.65605664", "0.65585953", "0.65534633", "0.65189326", "0.65149873", "0.64977956", "0.6492603", "0.6460184", "0.64425975", "0.6429027", "0.64255685", "0.6422017", "0....
0.81596076
0
test method for delete config node objects
def test_delete_config_node(self): config_node = self._create_config_node() config_node_uuid = config_node['config-node']['uuid'] with self.override_role(): self.config_client.delete_config_node( config_node_uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_hyperflex_node_config_policy(self):\n pass", "def test_delete_hyperflex_node_profile(self):\n pass", "def test_delete_network(self):\n pass", "def test_delete(self):\n pass", "def test_delete_run(self):\n pass", "def test_delete_namespaced_build_config(s...
[ "0.7887402", "0.74162674", "0.71738786", "0.7155332", "0.71060485", "0.7103513", "0.7062092", "0.69920903", "0.6986483", "0.6986483", "0.6968798", "0.69288015", "0.6898798", "0.684463", "0.6791939", "0.67843753", "0.6770345", "0.67541426", "0.67393696", "0.6708821", "0.668430...
0.8112687
0
test method for show config node objects
def test_show_config_node(self): config_node = self._create_config_node() config_node_uuid = config_node['config-node']['uuid'] with self.override_role(): self.config_client.show_config_node(config_node_uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_list_config_nodes(self):\n with self.override_role():\n self.config_client.list_config_nodes()", "def test_get_node_properties(self):\n pass", "def test_repr(self):\n\n node = Node(\n {\n 'healthchecks': [],\n 'host': 'iwa-ait.or...
[ "0.68633324", "0.68528444", "0.65061164", "0.6463069", "0.6440449", "0.64354926", "0.6396421", "0.6338916", "0.6310414", "0.61396825", "0.61186045", "0.6112672", "0.6100063", "0.60926354", "0.60215753", "0.6019778", "0.59638155", "0.59361124", "0.5936082", "0.5900485", "0.589...
0.7694455
0
test method for update config node objects
def test_update_config_node(self): config_node = self._create_config_node() config_node_uuid = config_node['config-node']['uuid'] updated_name = data_utils.rand_name('new_config_node') with self.override_role(): self.config_client.update_config_node( config_no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update_node_driveconfig(self):\n pass", "def test_update(self):\n pass", "def test_update(self):\n pass", "def test_update(self):\n pass", "def test_config_change():\n clean_tables()\n config = set_configuration()\n assert config['age']['value'] == \"72\"\n ...
[ "0.78854764", "0.73083067", "0.73083067", "0.73083067", "0.72954184", "0.72635174", "0.71841335", "0.71324265", "0.70363474", "0.6961581", "0.69414324", "0.6867226", "0.6772135", "0.6770638", "0.67575026", "0.6721655", "0.67100775", "0.6690196", "0.6653531", "0.6651143", "0.6...
0.7541321
1
test method for create config root service objects
def test_create_config_roots(self): with self.override_role(): self._create_config_root()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_namespaced_build_config(self):\n pass", "def test_ipam_services_create(self):\n pass", "def setUp(self):\n super(TestDOSCreateService, self).setUp()\n self.domain_list = [{\"domain\": \"mywebsite%s.com\" % uuid.uuid1()}]\n self.origin_list = [{\"origin\": \"my...
[ "0.71373236", "0.6811014", "0.67886037", "0.6767992", "0.6674754", "0.6616519", "0.6588925", "0.65781355", "0.65781355", "0.6463882", "0.6440979", "0.6414679", "0.6376161", "0.63649035", "0.6350063", "0.6340745", "0.6337429", "0.6333677", "0.632861", "0.63259166", "0.6318296"...
0.7099051
1
test method for delete config root service objects
def test_delete_config_root(self): config_root = self._create_config_root() config_root_uuid = config_root['config-root']['uuid'] with self.override_role(): self.config_client.delete_config_root( config_root_uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_virtual_service(self):\n pass", "def test_delete_namespaced_deployment_config(self):\n pass", "def test_delete_namespaced_build_config(self):\n pass", "def test_ipam_services_delete(self):\n pass", "def test_delete_deployment(self):\n pass", "def test_de...
[ "0.74798995", "0.7432673", "0.73822534", "0.73602796", "0.71391976", "0.7043867", "0.7030351", "0.6898217", "0.6898217", "0.6897348", "0.68919617", "0.68813914", "0.68755764", "0.6867956", "0.68589646", "0.6850118", "0.68431205", "0.6800697", "0.67916316", "0.67829514", "0.67...
0.74364525
1
test method for show config root service objects
def test_show_config_root(self): config_root = self._create_config_root() config_root_uuid = config_root['config-root']['uuid'] with self.override_role(): self.config_client.show_config_root(config_root_uuid)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_configs():\n\n configs = application_services.get_configs()\n\n assert isinstance(configs, dict)\n assert len(configs) > 0", "def test_virtualservice_get(self):\n pass", "def test_show_container(self):\n pass", "def test_get_virtual_service(self):\n pass", "def te...
[ "0.6763634", "0.6462204", "0.63950956", "0.63438046", "0.63203824", "0.6298182", "0.6292683", "0.6289494", "0.6226915", "0.6226915", "0.62235105", "0.6222744", "0.61648166", "0.6160904", "0.6108005", "0.61050624", "0.60838884", "0.6062203", "0.6057853", "0.6056994", "0.605367...
0.68713015
0
test method for list config root service objects
def test_list_config_roots(self): with self.override_role(): self.config_client.list_config_roots()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_list_namespaced_build_config(self):\n pass", "def test_get_hyperflex_config_result_list(self):\n pass", "def test_ipam_services_list(self):\n pass", "def test_get_configs():\n\n configs = application_services.get_configs()\n\n assert isinstance(configs, dict)\n assert l...
[ "0.7140677", "0.7106869", "0.70969623", "0.70403177", "0.70263183", "0.6910596", "0.6812251", "0.67210114", "0.6705195", "0.6705195", "0.66721165", "0.66242075", "0.6592045", "0.6538712", "0.6514715", "0.64969534", "0.64871436", "0.64755553", "0.6447008", "0.6445273", "0.6443...
0.7121747
1
test method for list global system config service objects
def test_list_global_system_configs(self): with self.override_role(): self.config_client.list_global_system_configs()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_configs():\n\n configs = application_services.get_configs()\n\n assert isinstance(configs, dict)\n assert len(configs) > 0", "def test_get_hyperflex_config_result_list(self):\n pass", "def test_ipam_services_list(self):\n pass", "def test_get_systems(self):\n pass",...
[ "0.70759225", "0.683192", "0.6829176", "0.67525166", "0.6644014", "0.66372985", "0.6632893", "0.6607294", "0.6549285", "0.6537304", "0.65296245", "0.65218645", "0.6494985", "0.64251655", "0.639047", "0.63754594", "0.633876", "0.63348", "0.63242215", "0.6300985", "0.62936395",...
0.7710494
0