query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Send from this side of the pipe to the other side, synchronously (the function returns only when the other party signaled receive)
def send2(self, message): self.send(message) self.sync(message)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _send(self, message):\n if not self._fd_out:\n raise VsysException('vsys: call open before sendrecv')\n try:\n return os.write(self._fd_out, message)\n except OSError as err:\n raise VsysException('Failed to send message: %s' % err)", "def send_receive(re...
[ "0.5954774", "0.59465396", "0.5892532", "0.5854547", "0.57943916", "0.5781498", "0.57692057", "0.5740869", "0.5693627", "0.5650008", "0.5597073", "0.55746317", "0.5551487", "0.5502641", "0.5501087", "0.5480946", "0.54783326", "0.54752696", "0.5439659", "0.54392153", "0.541622...
0.58521724
4
Receive a message sent from the other side of the pipe to the this side, synchronously (let the other party know that recieved)
def receive2(self, message_length=100): self.receive(message) self.release(message)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def receive(self, message):", "def get_message(self):\n return self.pipe_start.recv()", "def receive():\n pass", "def _on_read(self, line):\n # Some game logic (or magic)\n line = line.strip()\n logger.info(\"RCV> %s\", line)\n if not line:\n self.stream.close...
[ "0.6549606", "0.6517275", "0.649147", "0.6390486", "0.62838334", "0.6280338", "0.6165112", "0.6163485", "0.6153914", "0.61532384", "0.6150815", "0.612057", "0.6103058", "0.61010784", "0.6098018", "0.60843754", "0.6077733", "0.60707396", "0.60494274", "0.6047585", "0.60465133"...
0.5960572
26
Return the correct write side of the general pipe
def _wpipe(self): if self._inchild: return self._general_pw_child else: return self._general_pw_parent
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write(self, s):\n\t\tif self._input: raise PlumberExceptions.PipeTypeException(self)\n\t\treturn pservlet.pipe_write(self._pipe_desc, s)", "def write():\n pass", "def _handle_write(self):\n pass", "def write(self, out):", "def make_send_write(pipe_to_child, uid, params_and_values):\n d...
[ "0.6027396", "0.5985349", "0.58283186", "0.57623416", "0.5752828", "0.56974834", "0.5655385", "0.5602302", "0.5599069", "0.55921566", "0.5586974", "0.55652577", "0.555992", "0.5538428", "0.55314046", "0.54355025", "0.54124594", "0.5402488", "0.5365683", "0.53546226", "0.53379...
0.60171205
1
Return the correct read side of the general pipe
def _rpipe(self): if self._inchild: return self._general_pr_child else: return self._general_pr_parent
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read(self, n = None):\n\t\tif not self._input: raise PlumberExceptions.PipeTypeException(self)\n\t\tsaved = self._state.read(n)\n\t\tif n == None:\n\t\t\treturn saved + pservlet.pipe_read(self._pipe_desc)\n\t\telif n == len(saved): \n\t\t\treturn saved\n\t\telse:\n\t\t\treturn saved + pservlet.pipe_read(self._...
[ "0.6686547", "0.6315335", "0.61424786", "0.59950244", "0.5978504", "0.5935821", "0.58637583", "0.5809072", "0.5807107", "0.5796637", "0.5742867", "0.5715618", "0.56860805", "0.5652517", "0.56375164", "0.5633861", "0.5599924", "0.55739534", "0.5541302", "0.5539636", "0.5517702...
0.5643574
14
Dump data through the pipe. The data is sent using pickle binary format.
def pickle_dump(self, data): os.write(self.wpipe, pickle.dumps(data, bin=True))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def dump(self, data: dict, file: IO):", "def pickle(self,data,filename):\n pickle.dump(data, open(filename, 'wb'))", "def dump(filename, data):\n _savez(filename, [], data, True, allow_pickle=False)", "def pickle_dump(data, file):\n with open(file, 'wb') as f:\n pickle.dump(data, f,...
[ "0.6462049", "0.62800205", "0.6105975", "0.6078913", "0.6073406", "0.60545284", "0.6024091", "0.60216373", "0.6004561", "0.6004561", "0.59766096", "0.5972074", "0.59595984", "0.59463143", "0.59452784", "0.5923174", "0.5905648", "0.58634555", "0.5854407", "0.58264023", "0.5821...
0.8239927
0
Load data from the pipe. The data is sent using pickle binary format.
def pickle_load(self): # # I am wrapping the file descriptor because this way pickle # returns on each data send separately (allowing for sending # multiple data before reading). # I close the file descriptor or else for some reason just # closing the write side ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data():\n with open('data.pickle', 'rb') as f:\n data = pickle.load(f)\n return data", "def pickle_dump(self, data):\n \n os.write(self.wpipe, pickle.dumps(data, bin=True))", "def load_data(self, data):\n self._load_raw_data = data", "def run(self, data: PipeLineDat...
[ "0.6285068", "0.6276552", "0.62092227", "0.61791235", "0.61763227", "0.61763227", "0.60887617", "0.60785884", "0.6005809", "0.5972852", "0.5966116", "0.59555256", "0.5851574", "0.57980245", "0.57809585", "0.574515", "0.5736422", "0.5733839", "0.5733341", "0.5703455", "0.56713...
0.7654427
0
A function to force Tensorflow to use CPU even Nvidia GPU present
def cpu_fallback(flag=True): gpu_phy_devices = tf.config.list_physical_devices("GPU") cpu_phy_devices = tf.config.list_physical_devices("CPU") general_warning_msg = ( f"Tensorflow has already been initialized, {inspect.currentframe().f_code.co_name}() needs " f"to be called before any Tenso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configure_gpu_tf():\n\n try:\n # locate available devices & set required environment variables\n available_device_ids = GPUtil.getFirstAvailable(order='first', maxLoad=0.7, maxMemory=0.7, attempts=1, interval=10)\n available_device_id = available_device_ids[0]\n os.environ['CUDA_...
[ "0.7213077", "0.7027226", "0.6988259", "0.6981788", "0.6814441", "0.6727671", "0.67254525", "0.6702479", "0.6702479", "0.66789967", "0.6660818", "0.66421443", "0.65990984", "0.65961355", "0.65846235", "0.6550118", "0.6528544", "0.6528544", "0.6528544", "0.65123516", "0.651196...
0.7158892
1
To manage GPU memory usage, prevent Tensorflow preoccupied all the video RAM
def gpu_memory_manage(ratio=True, log_device_placement=False): gpu_phy_devices = tf.config.list_physical_devices("GPU") general_warning_msg = ( f"Tensorflow has already been initialized, {inspect.currentframe().f_code.co_name}() needs " f"to be called before any Tensorflow operation, as a resul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def limit_mem():\n config = tf.compat.v1.ConfigProto()\n config.gpu_options.allow_growth = True\n tf.compat.v1.Session(config=config)", "def limit_gpu_memory_usage():\n\n tf_config = tf.ConfigProto()\n tf_config.gpu_options.allow_growth = True\n set_session(tf.Session(config=tf_config))", "de...
[ "0.77787095", "0.77177644", "0.70447195", "0.6973952", "0.6701718", "0.6523037", "0.6463422", "0.64411265", "0.64102", "0.62651575", "0.6188367", "0.6173714", "0.61653197", "0.610278", "0.6100437", "0.6084355", "0.60419965", "0.60419965", "0.6040399", "0.5980457", "0.5931701"...
0.6617499
5
Detect gpu on user system
def gpu_availability(): # assume if using tensorflow-gpu, then Nvidia GPU is available if is_built_with_cuda(): return len(tf.config.list_physical_devices("GPU")) > 0 else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_gpu_available() -> bool:\n return torch.cuda.is_available()", "def create_gpu_device_if_present():\n d = dpctl.SyclDevice(\"gpu,cpu\")\n print(\"Selected \" + (\"GPU\" if d.is_gpu else \"CPU\") + \" device\")", "def detect_gpus():\n def worker(q):\n # `device_lib` will not release the...
[ "0.793805", "0.7824804", "0.76235676", "0.7595042", "0.757113", "0.7430197", "0.736671", "0.7313999", "0.71865916", "0.71865916", "0.7172503", "0.7148618", "0.71343917", "0.71143043", "0.71101034", "0.7106468", "0.7088649", "0.7043535", "0.69750756", "0.6962145", "0.6906732",...
0.7644202
2
To get the smallest available folder name without replacing the existing folder
def folder_runnum(): now = datetime.datetime.now() runnum = 1 while True: folder_name = f"astroNN_{now.month:0{2}d}{now.day:0{2}d}_run{runnum:0{3}d}" if not os.path.exists(folder_name): break else: runnum += 1 return folder_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findShortestPath(self):\r\n pass", "def smallest_partition():\n try:\n usb_partitions = sort_partitions()\n smallest = usb_partitions[0]\n except IndexError:\n print(\"Not enough USB devices available\")\n exit(1)\n else:\n return str(smallest[0])", "def s...
[ "0.64637816", "0.6391596", "0.6326102", "0.615437", "0.6136348", "0.60862213", "0.6074333", "0.60702705", "0.5908632", "0.59054816", "0.5900024", "0.58987117", "0.5891309", "0.5881712", "0.58795285", "0.58645844", "0.5860318", "0.5817851", "0.576165", "0.57226294", "0.5720423...
0.57683134
18
Use Websocket to get notification of Celery task, instead of using ajax polling
def form_ws(request): if request.is_ajax() and request.method == 'POST': submit_task_form = YourForm(request.POST) if submit_task_form.is_valid(): task = sample_task.delay(submit_task_form.cleaned_data['email']) # return the task id so the JS can poll the state re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trigger_rss():\n logger.debug(\"Executing the heartbeat task and returning\")\n celery.send_task('process_all_rss', kwargs={'reprocess': False})\n return render_template('index.html', name=\"HEARTBEAT\")", "def start_background_task(target, *args, **kwargs):\n context.application.socket_io.start_...
[ "0.6114278", "0.60294247", "0.6019768", "0.5818084", "0.5776105", "0.57455283", "0.57425123", "0.5724266", "0.56564075", "0.5648143", "0.56453055", "0.56198674", "0.56069505", "0.55676126", "0.5474572", "0.5473116", "0.54653716", "0.5452801", "0.5446928", "0.5429502", "0.5429...
0.5481137
14
Return results from detector. This function prepares the environment loading the plugins, getting the response and passing it to the detector. In case of errors, it raises exceptions to be handled externally.
def get_detection_results( url, timeout, metadata=False, save_har=False, splash_url="", ): plugins = load_plugins() if not plugins: raise NoPluginsError("No plugins found") logger.debug("[+] Starting detection with %(n)d plugins", {"n": len(plugins)}) response = get_respons...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def request_plugins(self):", "def setup(self):\n rc = self.rc\n try:\n for plugin in self.plugins:\n plugin.setup(rc)\n except Exception as e:\n self.exit(e)", "def load_results(self):\n\n scan_results = engine_pb2.EnrichedLaunchToolResponse()\n ...
[ "0.57042605", "0.55662245", "0.54125327", "0.5357799", "0.5216095", "0.519449", "0.5178228", "0.5124306", "0.5099311", "0.5020611", "0.5015244", "0.4988996", "0.49813417", "0.49721754", "0.49609536", "0.49307635", "0.49148032", "0.49138626", "0.48853156", "0.48720548", "0.486...
0.58674943
0
Return the registered plugins. Load and return all registered plugins.
def get_plugins(metadata): plugins = load_plugins() if not plugins: raise NoPluginsError("No plugins found") results = [] for p in sorted(plugins.get_all(), key=attrgetter("name")): if metadata: data = {"name": p.name, "homepage": p.homepage} hints = getattr(p, "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_plugins(self):\n return []", "def get_available_plugins() -> Dict[str, BasePlugin]:\n if not INITIALIZED:\n _load_and_register_plugins()\n\n return REGISTERED_PLUGINS", "def get_plugins():\n return [cls() for cls in get_plugin_classes()]", "def get_loaded_plugins(self):\n ...
[ "0.82152784", "0.796333", "0.7959589", "0.7925304", "0.79169726", "0.7914014", "0.7880464", "0.78512776", "0.78216904", "0.77088267", "0.7692018", "0.76696086", "0.7655362", "0.7605362", "0.7576913", "0.7572741", "0.74741673", "0.74589276", "0.7349133", "0.73353696", "0.72761...
0.6619592
55
Returns encoding of HTTP response.
def encoding(response: tornado.httpclient.HTTPResponse) -> str: if 'Content-Encoding' in response.headers: return response.headers['Content-Encoding'].decode() elif 'Content-Type' in response.headers: headers = email.message_from_string('Content-Type: ' + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def return_response_string(self):\n response = \"{} {}\\r\\n\".format(self.protocol, self.code)\n str_headers = \"\"\n if self.headers:\n for k, v in self.headers.items():\n str_headers += \"{}: {}\\r\\n\".format(k, v)\n\n encoded_response = \"{}{}\\r\\n\".form...
[ "0.71907353", "0.706094", "0.6990889", "0.6629994", "0.6604779", "0.65353036", "0.64132226", "0.6401666", "0.6394215", "0.6381188", "0.6364501", "0.633328", "0.6321899", "0.62905544", "0.62905544", "0.62905544", "0.62905544", "0.6269559", "0.6250087", "0.6205546", "0.618269",...
0.7276046
0
Get HTTP response body as text.
def text_body(response: tornado.httpclient.HTTPResponse) -> str: return response.body.decode(encoding(response))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_request_txt(self):\n #print (self.url)\n try:\n with closing(get(self.url, stream=True)) as resp: #returns b`txt`\n if self.is_txt(resp):\n return resp.content.decode(\"utf-8\")\n else:\n return None\n exce...
[ "0.72369504", "0.71414113", "0.7134768", "0.70143604", "0.68329924", "0.67339194", "0.6597049", "0.6577305", "0.6570372", "0.64789695", "0.64780384", "0.6470492", "0.64699656", "0.6439313", "0.6419446", "0.64055383", "0.63803506", "0.6376543", "0.63081264", "0.62654847", "0.6...
0.8240622
0
Get HTTP response body as json
def json_body(response: tornado.httpclient.HTTPResponse): return json.loads(text_body(response))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_json(response):\n\tif requests.__version__ >= \"1.0.0\":\n\t\treturn response.json()\n\telif requests.__version__ == \"0.14.2\":\n\t\treturn response.json\n\telse:\n\t\treturn json.loads(response.content)", "def generate_http_response(body):\n body = json.dumps(body, ensure_ascii=False).encode('utf8')...
[ "0.729981", "0.7209948", "0.7168147", "0.706024", "0.7018765", "0.69994396", "0.69508433", "0.6911265", "0.6746027", "0.6719141", "0.6719075", "0.67182344", "0.67025316", "0.669225", "0.66248244", "0.6580149", "0.65752757", "0.6573697", "0.65716434", "0.6570659", "0.65155184"...
0.7616408
0
Set up the Seven segments OCR platform.
async def async_setup_platform( hass: HomeAssistant, config: ConfigType, async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None, ) -> None: entities = [] for camera in config[CONF_SOURCE]: entities.append( ImageProcessingSsocr( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_up_scenes():\n cmd.zoom('Cathepsin', 10) # Zoom out to get a view on the whole complex\n cmd.scene('001', 'store', message='This is the first scene with a view on the complex!')\n cmd.set_view(closeup) # Get a close-up of the ligand by using the manually chosen viewpoint\n cmd.scene('002', 's...
[ "0.58599365", "0.5214776", "0.5139342", "0.5102359", "0.51005644", "0.50902736", "0.50837576", "0.5072078", "0.506553", "0.50469977", "0.50398964", "0.5030437", "0.50203985", "0.5019275", "0.50162286", "0.501313", "0.5007627", "0.5007287", "0.4987544", "0.49856344", "0.497736...
0.0
-1
Initialize seven segments processing.
def __init__(self, hass, camera_entity, config, name): self.hass = hass self._camera_entity = camera_entity if name: self._name = name else: self._name = f"SevenSegment OCR {split_entity_id(camera_entity)[1]}" self._state = None self.filepath = os...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_substructure_production(self):\n\n self.wet_storage = WetStorage(self.env, float(\"inf\"))\n takt_time = self.config[\"offshore_substation_substructure\"].get(\"takt_time\", 0)\n attach_time = self.config[\"offshore_substation_topside\"].get(\"attach_time\", 24)\n to_asse...
[ "0.60542786", "0.5966365", "0.592777", "0.5900197", "0.5803988", "0.56291676", "0.55696326", "0.55532026", "0.5527429", "0.5501947", "0.5468462", "0.54520005", "0.5425295", "0.53850496", "0.5385044", "0.53742236", "0.53402185", "0.5315505", "0.53011215", "0.5280992", "0.52687...
0.0
-1
Return camera entity id from process pictures.
def camera_entity(self): return self._camera_entity
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def camera_entity(self):\n return self._camera_entity_id", "def camera_id(self):\n return self._camera_id", "def camera_id(self):\n return self._camera_id", "def __get_image_id(self):\n return self.__get_multi_images_ids(1)", "def camera_handle(self, index):\n index = ct....
[ "0.74219584", "0.6802486", "0.6802486", "0.65088964", "0.6216877", "0.6192439", "0.6192439", "0.6182187", "0.61736095", "0.6105989", "0.6018516", "0.6013205", "0.6013205", "0.59782887", "0.5971399", "0.59651834", "0.59651834", "0.59630704", "0.58175784", "0.57748514", "0.5700...
0.6347762
4
Return the name of the image processor.
def name(self): return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def processor():\n return uname().processor", "def processor():\n return uname().processor", "def get_processor_name() -> bytes:\n return collective.get_processor_name().encode()", "def displayName(self):\n return \"Wiretap Shot Processor\"", "def image_name(self) -> pulumi.Output[Optional[...
[ "0.73077613", "0.73077613", "0.70451164", "0.65770733", "0.6517253", "0.64237607", "0.64152735", "0.64152735", "0.64055926", "0.63907486", "0.6376056", "0.6345726", "0.6274667", "0.62642556", "0.62642556", "0.62207943", "0.62182707", "0.6201018", "0.6185578", "0.6175209", "0....
0.0
-1
Return the state of the entity.
def state(self): return self._state
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state(self):\n return self.get_state()", "def state(self):\n result = self.getResult()\n return result.state", "def getState(self) :\n return self.state", "def getState(self):\n return self.state", "def getState(self):\n return self.state", "def getState(self...
[ "0.770336", "0.7654755", "0.76498735", "0.7620778", "0.7620778", "0.7620778", "0.75572854", "0.75572854", "0.74765974", "0.7446079", "0.7446079", "0.7413098", "0.7413098", "0.73877645", "0.73821914", "0.73821914", "0.73821914", "0.73821914", "0.73821914", "0.73806906", "0.735...
0.727765
95
Create a default list of bounds for a given signal description
def _default_bounds(signal): # there's just the name if isinstance(signal, str): return (signal, 0, 0, 0, 0) else: # there's just the name in a list if len(signal) == 1: return signal + [0, 0, 0, 0] # there's the name and bounds if len(signal) == 3: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_bounds():\n return [0.00], [1.00]", "def bounds(self):\n return [(2, None)]", "def bounds(self): # -> tuple[()]:\n ...", "def bounds(self, pos):", "def _init_optimizer_bounds(self):\n bounds = []\n for filt in self.filters:\n if filt.optimize_fc:\n...
[ "0.7021897", "0.67702514", "0.6683141", "0.63438934", "0.63145226", "0.62476254", "0.6207278", "0.6207278", "0.6207278", "0.6207278", "0.6207278", "0.6207278", "0.6207278", "0.6207278", "0.6167822", "0.61064106", "0.60504097", "0.6016998", "0.5977074", "0.5952667", "0.589701"...
0.7777678
0
Parseinterfaces described in YAML files, bundled with the package
def parse_interface_definitions(dir_name=DIR): try: filenames = listdir(dir_name) except OSError: raise OSError(f"Directory '{dir_name}' " "doesn't exist or cannot be listed") defs = [] for filename in filenames: with open(join(dir_name, filename)) as f: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse(self, infile):\r\n raise NotImplementedError()", "def _parse(self, infile):\n raise NotImplementedError()", "def __parse(self, to_parse):\n path = Path(to_parse)\n if not path.exists():\n raise FileNotFoundError(f\"Configuration file {path.absolute()} not found.\")\...
[ "0.5856186", "0.5764196", "0.5734122", "0.5686092", "0.56764734", "0.56446433", "0.5535054", "0.55263555", "0.5507395", "0.54634154", "0.5458527", "0.5440412", "0.53991145", "0.53776085", "0.536266", "0.53351825", "0.5331788", "0.53305066", "0.532903", "0.5318388", "0.5302064...
0.57860667
1
Given filenames of Verilog source and JSON target, use 'write_json' function of yosys
def verilog_to_json(verilog_filename, json_filename): system(f'yosys -p "read_verilog {verilog_filename}" ' '-p "write_json {json_filename}"')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_write_source(self):\n req = Request()\n for name in sample_data.keys():\n orig_fn = self._filepath(name)\n temp_fn = self._filepath(name + '-write-source')\n\n # Read the message\n resp = req.get(fromfile=orig_fn)\n\n # Write to a tempor...
[ "0.654977", "0.6347858", "0.6209616", "0.6194429", "0.6187571", "0.6149994", "0.6075553", "0.6070677", "0.60704535", "0.60384846", "0.60266185", "0.60266185", "0.600497", "0.5989924", "0.59744734", "0.59439313", "0.59291714", "0.5905016", "0.5904322", "0.58849543", "0.5879473...
0.69165206
0
read a json file directly into an object
def read_json_to_object(fn): with open(fn, "r") as fid: obj = json.load(fid, object_hook=lambda d: SimpleNamespace(**d)) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_from_json_file(filename):\n with open(filename, 'r') as f:\n obj = json.loads(f.read())\n return obj", "def read_json(fpath):\n with open(fpath, 'r') as f:\n obj = json.load(f)\n return obj", "def convert_json_to_object(file_content):\n object = json.loads(file_content...
[ "0.8234452", "0.8224244", "0.8179653", "0.810801", "0.8070145", "0.8070145", "0.8020177", "0.7981813", "0.79800755", "0.79516125", "0.79361403", "0.79361403", "0.79121983", "0.790699", "0.7869537", "0.78496486", "0.7820066", "0.7800198", "0.7795892", "0.77883345", "0.77602947...
0.77658606
20
read a config.json file that is in the Phoenix format
def read(self, fn=None): if fn is not None: self.fn = fn self.obj = read_json_to_object(self.fn)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_config():\n with open(CONFIG_PATH) as config_file:\n return json.load(config_file)", "def config():\n with open(config_path) as config_file:\n data = json.load(config_file)\n return data", "def get_config():\n handle = open(\"config.json\", \"r\")\n raw_json = handle.read(...
[ "0.78890264", "0.7697138", "0.75643003", "0.7467863", "0.73794055", "0.73784065", "0.7369065", "0.73486245", "0.73164153", "0.7251942", "0.72210693", "0.7194192", "0.7171449", "0.7156009", "0.71144193", "0.71070135", "0.7049186", "0.7031709", "0.70009196", "0.69831425", "0.69...
0.0
-1
read a config.json file that is in the Phoenix format
def read(self, fn=None): if fn is not None: self.fn = fn self.obj = read_json_to_object(self.fn)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_config():\n with open(CONFIG_PATH) as config_file:\n return json.load(config_file)", "def config():\n with open(config_path) as config_file:\n data = json.load(config_file)\n return data", "def get_config():\n handle = open(\"config.json\", \"r\")\n raw_json = handle.read(...
[ "0.78901535", "0.76981205", "0.7565464", "0.746876", "0.7380037", "0.73798025", "0.7369653", "0.73490006", "0.731774", "0.7252721", "0.722114", "0.7195378", "0.71715796", "0.71569103", "0.71146476", "0.7107863", "0.7050212", "0.7032315", "0.7001664", "0.6983445", "0.696039", ...
0.0
-1
get channel metadata from index
def get_ch_metadata(self, index): tag = self.get_ch_tag(index) return getattr(self, f"{tag.lower()}_metadata")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_meta(self, *, index=None):\n\n return self.metadata(index=index, exclude_applied=False)", "def showmeta(self,\r\n index):\r\n\r\n return self.get_metadata_from_note(index)", "def getMetadata(self):\n result = super().getMetadata()\n if len(self._frames) > 1:\...
[ "0.6677486", "0.64471376", "0.63067454", "0.6167251", "0.60129225", "0.5979515", "0.59767544", "0.5872275", "0.5782871", "0.57287145", "0.5725852", "0.5725031", "0.5657962", "0.56345564", "0.5610363", "0.56080425", "0.5587384", "0.55509144", "0.5509374", "0.5505031", "0.54950...
0.749579
0
Load citation network dataset (cora only for now)
def load_data(args, path="./project_data/", dataset="paper_author.txt"): print('Loading {} dataset...'.format(dataset)) paper_author = make_graph(path+dataset) print('The number of nodes :', paper_author.number_of_nodes()) adj = nx.adjacency_matrix(paper_author) # build symmetric adjacency ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_citation(dataset_str=\"cora\", normalization=\"AugNormAdj\", cuda=True,task_type = \"full\"):\n names = ['x', 'y', 'tx', 'ty', 'allx', 'ally', 'graph']\n objects = []\n\n for i in range(len(names)):\n with open(\"data/ind.{}.{}\".format(dataset_str.lower(), names[i]), 'rb') as f:\n ...
[ "0.6683991", "0.6622463", "0.6141501", "0.6106169", "0.60774505", "0.60507864", "0.5980766", "0.59139097", "0.58660084", "0.58487874", "0.58372116", "0.5782893", "0.57269454", "0.5719912", "0.5669881", "0.5667391", "0.56019217", "0.5577402", "0.5559361", "0.55509675", "0.5508...
0.50518495
84
Convert a scipy sparse matrix to a torch sparse tensor.
def sparse_mx_to_torch_sparse_tensor(sparse_mx): sparse_mx = sparse_mx.tocoo().astype(np.float32) indices = torch.from_numpy( np.vstack((sparse_mx.row, sparse_mx.col)).astype(np.int64)) values = torch.from_numpy(sparse_mx.data) shape = torch.Size(sparse_mx.shape) return torch.sparse.Fl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def csr2tensor(self, matrix: sp.csr_matrix):\n matrix = matrix.tocoo()\n x = torch.sparse.FloatTensor(\n torch.LongTensor(np.array([matrix.row, matrix.col])),\n torch.FloatTensor(matrix.data.astype(np.float32)),\n matrix.shape,\n ).to(self.device)\n retu...
[ "0.83033675", "0.8148503", "0.8045674", "0.8032235", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.8029749", "0.80132157", "0.7997072", "0.7997072", "0.79769105", ...
0.7984944
22
deletes and returns minimum value (in this case the root of the heap)
def delete_min(self): self.switch(0, -1) min = self.heap.pop(-1) self.bubble_down(0) return min
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_min(self):\n #The length is 1 because the heap list was initialized with 0\n if len(self.heap_list) == 1:\n return \"Empty heap.\"\n\n #Store the min value of the heap\n top = self.heap_list[1]\n\n #Move the last value of the heap to the top\n self.he...
[ "0.8399035", "0.8222343", "0.81165886", "0.8064376", "0.7997324", "0.7903924", "0.7903202", "0.7774015", "0.7720592", "0.76391006", "0.76284105", "0.76253104", "0.75730777", "0.75428915", "0.752482", "0.7467781", "0.7435114", "0.7430907", "0.739603", "0.73590386", "0.73556286...
0.8246364
1
Inserts key into heap and heapifies the heap
def insert(self, key): self.heap.append(key) self.bubble_up(len(self.heap) - 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert(self, key, value):\n self.heap.append(None)\n hi = HeapItem(key,value)\n self.siftup(hi, len(self.heap)-1)\n return hi", "def insert(self, k): \r\n self.heap_array.append(k)\r\n\r\n current_index = len(self.heap_array) - 1\r\n while (current_index > 0):\r\n ...
[ "0.7821339", "0.7730161", "0.7576347", "0.7494207", "0.7476214", "0.74364775", "0.7433599", "0.730302", "0.7184035", "0.7181078", "0.7181078", "0.7160404", "0.715419", "0.7034118", "0.7034118", "0.69545007", "0.6943963", "0.6931309", "0.692168", "0.68648547", "0.6861515", "...
0.796826
0
Modifies self.heap to 'heapify' a new node
def bubble_up(self, i): parent = self.parent(i) while (parent is not None) and (self.heap[i][1] < self.heap[parent][1]): self.switch(i, parent) parent = self.parent(parent)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add(self, node: object) -> None:\n end_index=self.heap.length()\n parent_index=((end_index-1)//2)\n if end_index==0:\n self.heap.append(node)\n else:\n self.heap.append(node)\n while self.heap.get_at_index(end_index)<self.heap.get_at_index(parent_ind...
[ "0.7368758", "0.7256856", "0.71981007", "0.70830905", "0.70596296", "0.7052933", "0.69609797", "0.6955587", "0.6944264", "0.69201875", "0.691447", "0.67921174", "0.670558", "0.670558", "0.670558", "0.66921777", "0.66847306", "0.66812456", "0.6663765", "0.66413444", "0.6616077...
0.0
-1
Modifies self.heap such that index is a root of a heap (bubble down)
def bubble_down(self, i): smallest = self.find_smallest(i) org = i while smallest != org: self.switch(org, smallest) org = smallest smallest = self.find_smallest(smallest)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def up_heap(self, index):\r\n while index: # while not at the root\r\n parent = self._parent(index) # who is my parent?\r\n # Am I smaller than my parent?\r\n if self._data[index] < self._data[parent]:\r\n self.swap(index, parent) ...
[ "0.7791737", "0.7766719", "0.75886184", "0.74473083", "0.74288684", "0.73768574", "0.73337054", "0.727225", "0.723698", "0.72127444", "0.71719474", "0.71710014", "0.7146507", "0.71445376", "0.71445376", "0.7124536", "0.7057905", "0.70264316", "0.6930473", "0.6907069", "0.6878...
0.0
-1
Finds the smallest node of a triplet in a binary tree (i.e. parent and 2 children)
def find_smallest(self, i): left_child = self.left_child(i) right_child = self.right_child(i) if left_child and (self.heap[left_child][1] < self.heap[i][1]): smallest = left_child else: smallest = i if right_child and (self.heap[right_child][1] < se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_smallest(node):\n smallest = node.value\n\n while node.left is not None:\n node = node.left\n smallest = node.value\n\n return smallest", "def _min_node(node):\n if not node:\n return None\n i = node\n while i.left:\n i = i.left\n retu...
[ "0.7639504", "0.76221424", "0.7595344", "0.75773424", "0.73195463", "0.72040504", "0.70579934", "0.70435876", "0.69988513", "0.6918306", "0.69141304", "0.6905239", "0.68948126", "0.6882921", "0.6871649", "0.6845", "0.6739517", "0.67183876", "0.67172056", "0.6705599", "0.66853...
0.6466184
30
Switches values positions a and b in array
def switch(self, a, b): self.heap[a], self.heap[b] = self.heap[b], self.heap[a]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def swap(array, x, y):\n array[x], array[y] = array[y], array[x]", "def mod_inplace(a, b):", "def swap(a, b): #0(3)\r\n temp = numList[a] #0(1)\r\n numList[a] = numList[b] #0(1)\r\n numList[b] = temp ...
[ "0.634435", "0.63386816", "0.62641245", "0.6165419", "0.6154207", "0.61481", "0.6137165", "0.6124108", "0.6087986", "0.6049071", "0.60348904", "0.59904593", "0.5972711", "0.5971798", "0.5961837", "0.59445304", "0.59159595", "0.5893857", "0.5882406", "0.5840912", "0.58258826",...
0.6015397
11
Returns parent of node at n; None if there isn't a parent
def parent(self, n): return None if n == 0 else (n - 1) // 2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _parent(node):\n if node == _root():\n return _root()\n return (node + 1) // 2 - 1", "def parent(self, n):\n return n._parent", "def parent(self, node):\n self._validate_node(node)\n idx = node._index\n if idx == 0:\n return None #...
[ "0.7602089", "0.7594332", "0.7559299", "0.7262482", "0.72294337", "0.71347463", "0.70621294", "0.7060756", "0.70123017", "0.6988264", "0.6957921", "0.69313556", "0.68682724", "0.68682724", "0.68682724", "0.6822674", "0.6808915", "0.6743967", "0.672329", "0.6721794", "0.672035...
0.7795919
0
Returns left child of node at n; None if there isn't a left_child
def left_child(self, n): if 2 * n + 1 >= len(self.heap): return None else: return 2 * n + 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def left_most_child(n):\n if n == None:\n return None\n while n.left:\n n = n.left\n return n", "def get_node_left(self, n: MazeCell) -> MazeCell:\n if n.x == 0:\n return None\n else:\n return self.get_node(n.x - 1, n.y)", "def left(self, n):\n ...
[ "0.805531", "0.8024023", "0.7819353", "0.7786342", "0.77025276", "0.75769603", "0.7557661", "0.7511605", "0.749778", "0.72762555", "0.72099817", "0.7190135", "0.7172796", "0.7068378", "0.7064818", "0.69917893", "0.69912624", "0.69391996", "0.69372314", "0.69372314", "0.693026...
0.7845012
2
Returns right child of node at n; None if there isn't a right_child
def right_child(self, n): if 2 * n + 2 >= len(self.heap): return None else: return 2 * n + 2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_node_right(self, n: MazeCell) -> MazeCell:\n if n.x == self._ncols - 1:\n return None\n else:\n return self.get_node(n.x + 1, n.y)", "def right_child(self, position):\n child = 2 * position + 2\n if child > len(self.table) - 1:\n return None\n ...
[ "0.76178944", "0.7611006", "0.725117", "0.71613806", "0.71096224", "0.7073449", "0.69539064", "0.6897677", "0.6885739", "0.6885739", "0.68463993", "0.68296987", "0.6825695", "0.67875445", "0.6721572", "0.67042595", "0.6691901", "0.6611986", "0.65743893", "0.6552465", "0.64684...
0.7729437
0
1hot encodes a tensor
def to_categorical(y, num_classes): return np.eye(num_classes, dtype='uint8')[y]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def one_hot_encode(x):\n # TODO: Implement Function\n output = np.zeros((len(x), 10))\n \n for i, j in enumerate(x):\n output[i,j] = 1\n \n return output", "def one_hot_encode(self, arr, n_labels):\n one_hot = np.zeros((np.multiply(*arr.shape), n_labels), dtype=np.float32)\...
[ "0.82578593", "0.8061468", "0.80140257", "0.7917851", "0.7914897", "0.7883416", "0.78429884", "0.78089696", "0.7765784", "0.77376443", "0.77376443", "0.7733915", "0.7728651", "0.77133274", "0.7686273", "0.76797515", "0.75851345", "0.7560708", "0.75560004", "0.75353223", "0.75...
0.0
-1
Test case for aws_service_api_availability_zones_get
def test_aws_service_api_availability_zones_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_regions_get(self):\n pass", "def get_availability_zones(self, context, filters=None, fields=None,\n sorts=None, limit=None, marker=None,\n page_reverse=False):", "def compute_zones(self):\n path = '/os-availabili...
[ "0.7338367", "0.7293569", "0.717585", "0.7083272", "0.68036807", "0.68036807", "0.68036807", "0.68036807", "0.68036807", "0.68036807", "0.6736183", "0.67031825", "0.66727173", "0.66036886", "0.65988815", "0.6523843", "0.6429594", "0.6417555", "0.63666177", "0.6355343", "0.629...
0.95381105
0
Test case for aws_service_api_flavor_get
def test_aws_service_api_flavor_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_flavors_get(self):\n pass", "def test_get_flavor(self):\n response = self.flavors_client.get_flavor_details(self.flavor_ref)\n flavor = response.entity\n self.assertEqual(self.flavor_ref, flavor.id)", "def get_flavor(name):\r\n return nova.flavors.find(na...
[ "0.86479574", "0.7678447", "0.71027285", "0.70904493", "0.7076974", "0.6954673", "0.68324184", "0.6791326", "0.6621454", "0.657417", "0.65623415", "0.65623415", "0.6551517", "0.652183", "0.637626", "0.63374686", "0.63270867", "0.6284752", "0.62383753", "0.62356555", "0.622235...
0.9599665
0
Test case for aws_service_api_flavors_get
def test_aws_service_api_flavors_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_flavor_get(self):\n pass", "def get_flavors(self):\n url = '%s/flavors/detail' % self.catalog['compute']\n res = self.get(url)\n if res['status'] == 200:\n return json.loads(res['body'])['flavors']\n else:\n LOG.error('Get flavors ...
[ "0.8574573", "0.7565045", "0.714905", "0.71012104", "0.70156753", "0.7013291", "0.68955284", "0.6883247", "0.6825781", "0.6584661", "0.65827054", "0.6564486", "0.64388686", "0.64029205", "0.6390174", "0.6388977", "0.63272315", "0.6317298", "0.6264503", "0.62626445", "0.620792...
0.95660037
0
Test case for aws_service_api_image_get
def test_aws_service_api_image_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_public_image_get(self):\n pass", "def test_aws_service_api_private_image_get(self):\n pass", "def test_aws_service_api_public_images_get(self):\n pass", "def test_aws_service_api_private_images_get(self):\n pass", "def test_get_ao_image(self):\n r...
[ "0.8832171", "0.8454593", "0.84126693", "0.80433905", "0.7256785", "0.7198876", "0.7104483", "0.71016484", "0.69397616", "0.6722128", "0.66869414", "0.66866714", "0.6682441", "0.665069", "0.6630389", "0.6626029", "0.6619967", "0.6611323", "0.66050965", "0.6582941", "0.6579301...
0.94997585
0
Test case for aws_service_api_interfaces_get
def test_aws_service_api_interfaces_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getInterface(self):\n\t\tquery = ''\n\t\tconn = self.get_connection()\n\t\theaders = { 'Content-type' : 'application/json', 'Authorization' : 'A10 %s' %self.sessionid}\n\t\tconn.request('GET', self.get_path() + '/' + query, headers=headers)\n\t\tresponse = conn.getresponse()\n\t\texpected_status = 200\n\t\terr...
[ "0.6886365", "0.68692887", "0.68692887", "0.68692887", "0.6744842", "0.64471203", "0.6425522", "0.64148664", "0.63893855", "0.63771516", "0.6328008", "0.6327504", "0.6318172", "0.61683834", "0.6158", "0.6158", "0.6126433", "0.61211205", "0.61211205", "0.61211205", "0.61211205...
0.9369289
0
Test case for aws_service_api_keypair_delete
def test_aws_service_api_keypair_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_api_key(self):\n pass", "def test_aws_service_api_keypair_get(self):\n pass", "def test_delete_api_key_from_org(self):\n pass", "def test_delete():\n test_key = 'qmk_compiler_test_unique_key_name'\n\n # Make sure our test key doesn't exist\n try:\n qmk_sto...
[ "0.79903865", "0.76005006", "0.74329925", "0.73833454", "0.7266609", "0.72653955", "0.7207944", "0.71949244", "0.7136774", "0.7025226", "0.7004992", "0.69196093", "0.67822355", "0.67449534", "0.66366833", "0.6636205", "0.6635616", "0.6596003", "0.65895045", "0.6583519", "0.65...
0.9563869
0
Test case for aws_service_api_keypair_generate_post
def test_aws_service_api_keypair_generate_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_keypair_import_post(self):\n pass", "def test_aws_service_api_keypair_get(self):\n pass", "def test_create_api_key(self):\n pass", "def test_aws_service_api_keypair_delete(self):\n pass", "def create_key ():", "def test_aws_service_api_keypairs_get(sel...
[ "0.7824777", "0.7448113", "0.73979497", "0.7172839", "0.71695393", "0.70038456", "0.6849004", "0.6799752", "0.67478347", "0.6668105", "0.66087174", "0.65747166", "0.6556049", "0.6553861", "0.64367193", "0.6361898", "0.6323369", "0.63042235", "0.626602", "0.6251426", "0.623475...
0.9603776
0
Test case for aws_service_api_keypair_get
def test_aws_service_api_keypair_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_keypairs_get(self):\n pass", "def test_aws_service_api_keypair_generate_post(self):\n pass", "def test_aws_service_api_keypair_delete(self):\n pass", "def test_aws_service_api_keypair_import_post(self):\n pass", "def test_create_api_key(self):\n p...
[ "0.87272215", "0.77711517", "0.76828736", "0.69687665", "0.6587534", "0.65302324", "0.6508063", "0.6470722", "0.6401116", "0.6392054", "0.6370844", "0.6345941", "0.63402843", "0.63292104", "0.63100874", "0.62989324", "0.6209678", "0.6179603", "0.61722237", "0.61598915", "0.61...
0.9449849
0
Test case for aws_service_api_keypair_import_post
def test_aws_service_api_keypair_import_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_keypair_generate_post(self):\n pass", "def test_aws_service_api_keypair_get(self):\n pass", "def test_aws_service_api_keypair_delete(self):\n pass", "def test_aws_service_api_keypairs_get(self):\n pass", "def test_create_api_key(self):\n pass", ...
[ "0.792199", "0.694477", "0.67042994", "0.67018545", "0.61249477", "0.6051414", "0.56280106", "0.5590886", "0.55801374", "0.5567025", "0.5530842", "0.55304706", "0.5523036", "0.54735106", "0.54558766", "0.5437347", "0.5433976", "0.5428403", "0.54215634", "0.54156524", "0.54147...
0.9547715
0
Test case for aws_service_api_keypairs_get
def test_aws_service_api_keypairs_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_keypair_get(self):\n pass", "def test_aws_service_api_keypair_generate_post(self):\n pass", "def test_aws_service_api_keypair_delete(self):\n pass", "def test_aws_service_api_keypair_import_post(self):\n pass", "def get(self, name):\n path = '/os-...
[ "0.89948696", "0.7429849", "0.72318494", "0.68253005", "0.6428975", "0.637614", "0.60023105", "0.59939665", "0.5983117", "0.59761864", "0.59480745", "0.5947974", "0.59439266", "0.5929136", "0.58903056", "0.58107954", "0.5772948", "0.57086974", "0.569662", "0.5693239", "0.5678...
0.9444123
0
Test case for aws_service_api_network_subnets_get
def test_aws_service_api_network_subnets_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_subnets(self):\n url = '%s/v2.0/subnets' % self.catalog['network']\n res = self.get(url)\n if res['status'] == 200:\n return json.loads(res['body'])['subnets']\n else:\n LOG.error('Get subnets failed: %s %s %s' %\n (res['status'], res['...
[ "0.8326366", "0.8207443", "0.77458423", "0.773097", "0.76437336", "0.7635327", "0.75836563", "0.747489", "0.73467875", "0.73467875", "0.731024", "0.72891515", "0.7184063", "0.7079082", "0.70580095", "0.69772714", "0.6942426", "0.6940601", "0.6905459", "0.68559116", "0.6825933...
0.9566142
0
Test case for aws_service_api_networks_get
def test_aws_service_api_networks_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_networks(self):\n pass", "def test_get_network(self):\n pass", "def get_networks(self):\n url = '%s/v2.0/networks' % self.catalog['network']\n res = self.get(url)\n if res['status'] == 200:\n return json.loads(res['body'])['networks']\n else:\n ...
[ "0.8384454", "0.7379086", "0.7318698", "0.7318663", "0.7294449", "0.7183769", "0.69510686", "0.6810491", "0.67909086", "0.6770815", "0.6674351", "0.6660264", "0.66253245", "0.66232175", "0.6577437", "0.6521967", "0.651514", "0.65070605", "0.650605", "0.6473854", "0.6383238", ...
0.95457506
0
Test case for aws_service_api_private_image_get
def test_aws_service_api_private_image_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_private_images_get(self):\n pass", "def test_aws_service_api_public_image_get(self):\n pass", "def test_aws_service_api_image_get(self):\n pass", "def test_aws_service_api_public_images_get(self):\n pass", "def get_image(event, context):\n try:\n ...
[ "0.9268567", "0.8515992", "0.8399844", "0.81762105", "0.6704678", "0.66913", "0.64894724", "0.64272404", "0.63345486", "0.62184286", "0.6190606", "0.6187278", "0.6182644", "0.61573607", "0.61392295", "0.6135909", "0.61230046", "0.6112058", "0.60774755", "0.6073487", "0.601545...
0.9579085
0
Test case for aws_service_api_private_images_get
def test_aws_service_api_private_images_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_private_image_get(self):\n pass", "def test_aws_service_api_public_images_get(self):\n pass", "def test_aws_service_api_public_image_get(self):\n pass", "def test_aws_service_api_image_get(self):\n pass", "def test_images(self):\n\n message = {\"m...
[ "0.9245754", "0.8509919", "0.8128298", "0.7955235", "0.67987007", "0.67778707", "0.66492873", "0.65181035", "0.6443877", "0.6395238", "0.63889945", "0.6366931", "0.6331277", "0.6261341", "0.622767", "0.6148064", "0.6132572", "0.61236227", "0.6058544", "0.6032558", "0.6021095"...
0.9565417
0
Test case for aws_service_api_public_image_get
def test_aws_service_api_public_image_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_public_images_get(self):\n pass", "def test_aws_service_api_image_get(self):\n pass", "def test_aws_service_api_private_image_get(self):\n pass", "def test_aws_service_api_private_images_get(self):\n pass", "def get_image(event, context):\n try:\n ...
[ "0.9147275", "0.8947318", "0.86610794", "0.8327578", "0.6968766", "0.6962929", "0.68538654", "0.6803162", "0.6783308", "0.6701789", "0.6664229", "0.6662487", "0.66177744", "0.6595421", "0.6537655", "0.6490602", "0.6470058", "0.6434494", "0.6427295", "0.6417345", "0.6409972", ...
0.9514068
0
Test case for aws_service_api_public_images_get
def test_aws_service_api_public_images_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_public_image_get(self):\n pass", "def test_aws_service_api_private_images_get(self):\n pass", "def test_aws_service_api_image_get(self):\n pass", "def test_aws_service_api_private_image_get(self):\n pass", "def test_images(self):\n\n message = {\"...
[ "0.9030294", "0.8608971", "0.84502596", "0.8226284", "0.7452266", "0.6786225", "0.6761363", "0.6706916", "0.6639855", "0.6559341", "0.653849", "0.6529791", "0.65247184", "0.6505588", "0.6494819", "0.64355224", "0.64348966", "0.6434324", "0.6426369", "0.64168745", "0.6388035",...
0.9515447
0
Test case for aws_service_api_regions_get
def test_aws_service_api_regions_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_api_regions(self):\n # load api base\n r = requests.get('{server}/api/0.1/'.format(\n server=self.get_server_url())).json()\n # load regions from url specified in api base\n r = requests.get(r['regions']).json()\n self.assertIn('count', r)\n self.assert...
[ "0.7572894", "0.73636293", "0.7204617", "0.71709335", "0.7119498", "0.7119498", "0.6878119", "0.6786396", "0.6769581", "0.65975285", "0.6471772", "0.6452135", "0.6423102", "0.63701135", "0.63528806", "0.6258155", "0.6240444", "0.61896706", "0.6179061", "0.6056295", "0.6048398...
0.9564887
0
Test case for aws_service_api_security_groups_get
def test_aws_service_api_security_groups_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_api_v1_groups_get(self):\n pass", "def test_get_groups(self):\n pass", "def test_get_groups(self):\n pass", "def test_get_groups(self):\n response = self.client.get_groups()\n uri, args = response[\"uri\"].split(\"?\")\n\n self.assertEqual(response[\"method\...
[ "0.7902849", "0.7510473", "0.7510473", "0.7471958", "0.74338824", "0.74338824", "0.7391786", "0.73295635", "0.7019355", "0.6873554", "0.6837248", "0.68147165", "0.6743259", "0.6743259", "0.6727421", "0.6713464", "0.670311", "0.66311735", "0.6624133", "0.6624133", "0.6624133",...
0.9491485
0
Test case for aws_service_api_snapshot_delete
def test_aws_service_api_snapshot_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_snapshot(self):\n ctxt = context.get_admin_context()\n extra_specs = {}\n type_ref = volume_types.create(ctxt, 'hgst-1', extra_specs)\n snapshot = {'id': '1', 'name': 'volume1',\n 'display_name': '',\n 'volume_type_id': type_ref['id'...
[ "0.7890424", "0.7668865", "0.7533782", "0.73568654", "0.7311986", "0.7207969", "0.7096665", "0.70816356", "0.69637513", "0.690928", "0.69079185", "0.68927884", "0.6888659", "0.6888522", "0.68796116", "0.6850907", "0.67979336", "0.6763749", "0.6683268", "0.663037", "0.6612236"...
0.9599573
0
Test case for aws_service_api_snapshots_get
def test_aws_service_api_snapshots_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_snapshots_post(self):\n pass", "def xtest_snapshot_api(self):\n\n req = httplib2.Http(\".cache\")\n body = r\"\"\"{ \"snapshot\": { \"instanceId\": \"123\", \"name\": \"dbapi_test\" } }\"\"\"\n \n # Test creating an snapshot without a body in th...
[ "0.8165117", "0.76457405", "0.7574539", "0.7050154", "0.7035185", "0.6838947", "0.6798095", "0.67245835", "0.6693685", "0.6692401", "0.6687871", "0.66250813", "0.65893096", "0.6535789", "0.6534415", "0.6528434", "0.64653736", "0.63096005", "0.6277198", "0.62761366", "0.625982...
0.9516805
0
Test case for aws_service_api_snapshots_post
def test_aws_service_api_snapshots_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_snapshots_get(self):\n pass", "def xtest_snapshot_api(self):\n\n req = httplib2.Http(\".cache\")\n body = r\"\"\"{ \"snapshot\": { \"instanceId\": \"123\", \"name\": \"dbapi_test\" } }\"\"\"\n \n # Test creating an snapshot without a body in the...
[ "0.7824954", "0.727321", "0.71308035", "0.68776023", "0.6790315", "0.664617", "0.6434439", "0.6432623", "0.63407123", "0.63197875", "0.6133041", "0.6101257", "0.6053529", "0.60171944", "0.59851056", "0.59770787", "0.595111", "0.5950911", "0.5950342", "0.5913461", "0.58947", ...
0.9483812
0
Test case for aws_service_api_validate_subscription_post
def test_aws_service_api_validate_subscription_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_subscription(self):\n pass", "def post_create_subscription(\n self, response: pubsub.Subscription\n ) -> pubsub.Subscription:\n return response", "def test_get_subscription(self):\n pass", "def test_create_response_descriptor_subscriptions_subscription_subscript...
[ "0.72985333", "0.6906576", "0.6746659", "0.67185956", "0.670407", "0.65617806", "0.6491322", "0.6466054", "0.64172935", "0.64076334", "0.6401086", "0.63378197", "0.62992346", "0.624313", "0.62266105", "0.6217573", "0.6185081", "0.6161922", "0.61287135", "0.6126021", "0.612336...
0.95499164
0
Test case for aws_service_api_vm_command_put
def test_aws_service_api_vm_command_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_tag_put(self):\n pass", "def test_aws_service_api_vm_workshift_put(self):\n pass", "def test_aws_service_api_vm_patch(self):\n pass", "def test_aws_service_api_vm_delete(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass"...
[ "0.81759644", "0.74614275", "0.72217697", "0.6894823", "0.6842685", "0.67816526", "0.6751381", "0.6558063", "0.64946073", "0.63549376", "0.6314738", "0.61670405", "0.614158", "0.61310565", "0.6130978", "0.6096973", "0.60926175", "0.6065767", "0.6025456", "0.5973508", "0.59611...
0.9491606
0
Test case for aws_service_api_vm_delete
def test_aws_service_api_vm_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_delete(self):\n pass", "def test_delete_virtual_service(self):\n pass", "def delete_vm(client, resource_group_name, vm_name):\n return client.delete(resource_group_name, vm_name)", "def test_aws_service_api_snapshot_delete(self):\n pass", "def test_aw...
[ "0.76845914", "0.7401219", "0.73782235", "0.7279414", "0.72571427", "0.7151605", "0.70824784", "0.70211935", "0.700503", "0.6966841", "0.69554144", "0.69535273", "0.69121355", "0.6897992", "0.687267", "0.6852948", "0.6817927", "0.6777296", "0.6759868", "0.6732892", "0.6713095...
0.95375043
0
Test case for aws_service_api_vm_details_get
def test_aws_service_api_vm_details_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_get(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass", "def test_aws_service_api_vms_get(self):\n pass", "def get_details(self, psvm):\n return self.get(psvm)", "def test_aws_service_api_vm_patch(self):\n pass", "def ...
[ "0.86986274", "0.82846344", "0.7914184", "0.7215921", "0.68684095", "0.68192875", "0.66386724", "0.6511931", "0.6482203", "0.646786", "0.6464285", "0.637554", "0.6286821", "0.6259161", "0.6224959", "0.62205684", "0.6214965", "0.6181512", "0.61462253", "0.61442876", "0.6130757...
0.95614815
0
Test case for aws_service_api_vm_get
def test_aws_service_api_vm_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_details_get(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass", "def test_aws_service_api_vms_get(self):\n pass", "def test_aws_service_api_vm_patch(self):\n pass", "def test_virtualservice_get(self):\n pass", "def tes...
[ "0.91339034", "0.8864053", "0.861006", "0.76438653", "0.72016954", "0.71333116", "0.7080705", "0.70437694", "0.70271695", "0.69803905", "0.69289654", "0.6851026", "0.6775111", "0.6690608", "0.6568262", "0.64512783", "0.6433684", "0.64195716", "0.6370653", "0.63509077", "0.630...
0.9452272
0
Test case for aws_service_api_vm_management_get
def test_aws_service_api_vm_management_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_get(self):\n pass", "def test_aws_service_api_vm_details_get(self):\n pass", "def test_aws_service_api_vms_get(self):\n pass", "def test_aws_service_api_vm_patch(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def te...
[ "0.8650585", "0.8562624", "0.8373791", "0.70795417", "0.6962664", "0.6897586", "0.6574185", "0.65094703", "0.64713967", "0.6338804", "0.62986034", "0.62899095", "0.6258442", "0.6202984", "0.61594754", "0.61232984", "0.6044133", "0.6041169", "0.6038002", "0.6024266", "0.597843...
0.95178163
0
Test case for aws_service_api_vm_password_get
def test_aws_service_api_vm_password_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetPassword(self):\n pass", "def get_password(self):\n raise NotImplementedError('get_password')", "def GetPassword(self):\n return self._password", "def password(self) -> str:", "def test_invalid_password(self):\n pass", "def _get_password(self):\r\n return self._passwor...
[ "0.7222929", "0.7099967", "0.68307626", "0.6830078", "0.6776669", "0.6640706", "0.66043776", "0.65847296", "0.65678656", "0.6471251", "0.64595413", "0.6397165", "0.6388326", "0.6383084", "0.6377725", "0.6366573", "0.63620764", "0.63547564", "0.63525546", "0.6336687", "0.63261...
0.9478655
0
Test case for aws_service_api_vm_patch
def test_aws_service_api_vm_patch(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_get(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass", "def test_aws_service_api_vm_tag_put(self):\n pass", "def test_aws_service_api_vm_details_get(self):\n pass...
[ "0.82336074", "0.8126507", "0.7836095", "0.77227956", "0.7702922", "0.751186", "0.7425756", "0.7319667", "0.7219776", "0.6920091", "0.68976235", "0.66285187", "0.6533979", "0.6498052", "0.64471275", "0.6408248", "0.63949734", "0.63852394", "0.63488567", "0.6342148", "0.633660...
0.9435803
0
Test case for aws_service_api_vm_security_group_delete
def test_aws_service_api_vm_security_group_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_resource_group(self):\n pass", "def test_delete_group(self):\n pass", "def test_delete_group(self):\n pass", "def test_aws_service_api_vm_security_group_put(self):\n pass", "def security_group_delete(auth=None, **kwargs):\n cloud = get_operator_cloud(auth)\n ...
[ "0.7839854", "0.7500313", "0.7500313", "0.7480745", "0.7460259", "0.7452618", "0.743292", "0.7414543", "0.73841035", "0.7381263", "0.73142505", "0.71547073", "0.7150299", "0.7143438", "0.7121918", "0.71215004", "0.707065", "0.7057178", "0.705154", "0.7003657", "0.69980025", ...
0.96059275
0
Test case for aws_service_api_vm_security_group_put
def test_aws_service_api_vm_security_group_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_security_group_delete(self):\n pass", "def test_08_security_group(self):\n # Validate the following:\n # 1. Create a project\n # 2. Assign some security groups to that project\n # 3. Verify the security groups can only be assigned to VM belonging\n ...
[ "0.7739094", "0.73521936", "0.7036603", "0.6653077", "0.6653077", "0.6556714", "0.65383494", "0.65037537", "0.64947385", "0.6492873", "0.6491554", "0.6489214", "0.6464362", "0.63628876", "0.63405657", "0.63301015", "0.6310847", "0.6285586", "0.627555", "0.62239367", "0.622218...
0.95949286
0
Test case for aws_service_api_vm_tag_put
def test_aws_service_api_vm_tag_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_command_put(self):\n pass", "def test_add_or_update_single_tag(self):\n p = self.load_policy({\n 'name': 'test-azure-tag',\n 'resource': 'azure.vm',\n 'filters': [\n {'type': 'value',\n 'key': 'name',\n ...
[ "0.80429476", "0.729708", "0.70491844", "0.6841491", "0.6683153", "0.6553686", "0.6502497", "0.6415904", "0.64025015", "0.63829607", "0.63378245", "0.63253623", "0.61899245", "0.61463225", "0.6143658", "0.60995877", "0.5990448", "0.5973975", "0.59707505", "0.59622836", "0.595...
0.96140796
0
Test case for aws_service_api_vm_workshift_delete
def test_aws_service_api_vm_workshift_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_workshift_put(self):\n pass", "def test_aws_service_api_vm_workshift_post(self):\n pass", "def test_aws_service_api_vm_delete(self):\n pass", "def test_delete_workout(self):\n response = self.client.open(\n '/workout/{id}'.format(id='id_examp...
[ "0.7511097", "0.7364616", "0.73206496", "0.67302877", "0.66817266", "0.6495581", "0.64496297", "0.64332926", "0.6427471", "0.6413648", "0.6361137", "0.6328748", "0.6317846", "0.6265027", "0.61935854", "0.612659", "0.61088544", "0.60996175", "0.6056947", "0.60172695", "0.60065...
0.9626205
0
Test case for aws_service_api_vm_workshift_post
def test_aws_service_api_vm_workshift_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_workshift_put(self):\n pass", "def test_aws_service_api_vm_workshift_delete(self):\n pass", "def test_aws_service_api_vms_post(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def test_shift_view_post(self):\n path = re...
[ "0.84547627", "0.7423614", "0.68335587", "0.617915", "0.6070825", "0.5989244", "0.5934529", "0.5797156", "0.5796808", "0.5699866", "0.5630047", "0.5624665", "0.55860275", "0.55702406", "0.5515915", "0.54990745", "0.5466368", "0.5455596", "0.5427891", "0.53978723", "0.53920615...
0.94778556
0
Test case for aws_service_api_vm_workshift_put
def test_aws_service_api_vm_workshift_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_workshift_post(self):\n pass", "def test_aws_service_api_vm_workshift_delete(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def test_shift_view_put(self):\n path = reverse('api:id-shifts', kwargs={'id': self.shift.id})\n ...
[ "0.86835265", "0.7789825", "0.74265546", "0.64560974", "0.64510584", "0.62108296", "0.61423326", "0.6033521", "0.60048115", "0.5985862", "0.59651035", "0.59144586", "0.5877153", "0.5786453", "0.5764561", "0.57141596", "0.56339496", "0.560271", "0.54617304", "0.54551876", "0.5...
0.9653785
0
Test case for aws_service_api_vms_get
def test_aws_service_api_vms_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_get(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass", "def test_aws_service_api_vm_details_get(self):\n pass", "def test_aws_service_api_vms_post(self):\n pass", "def test_virtualservice_get(self):\n pass", "def test...
[ "0.86987966", "0.8631125", "0.842901", "0.7912379", "0.693028", "0.69067043", "0.6821294", "0.6698808", "0.66339666", "0.6614842", "0.6563548", "0.65617937", "0.654087", "0.64765596", "0.6475945", "0.64094234", "0.63141346", "0.6279449", "0.6171911", "0.6146017", "0.61012304"...
0.9503802
0
Test case for aws_service_api_vms_post
def test_aws_service_api_vms_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vms_get(self):\n pass", "def test_aws_service_api_vm_workshift_post(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def test_aws_service_api_vm_tag_put(self):\n pass", "def test_deployvm_userdata_post(self):\n deployVmRes...
[ "0.7603022", "0.72159064", "0.6981549", "0.69673485", "0.693044", "0.6839709", "0.68275684", "0.67187107", "0.65854514", "0.6572492", "0.6507726", "0.6489554", "0.63969433", "0.63578254", "0.6249199", "0.6237796", "0.6137117", "0.61366147", "0.60767686", "0.6037173", "0.60177...
0.94187784
0
Test case for aws_service_api_volume_attachment_delete
def test_aws_service_api_volume_attachment_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_delete(self):\n pass", "def test_delete_attached_volume(self):\n server, validation_resources = self._create_server()\n volume = self.create_volume()\n self.attach_volume(server, volume)\n\n self.assertRaises(lib_exc.BadRequest,\n ...
[ "0.8310692", "0.77349037", "0.7635774", "0.75067145", "0.75060105", "0.7399964", "0.73437047", "0.7274928", "0.7239528", "0.7180327", "0.71410435", "0.69960743", "0.6957549", "0.6951939", "0.6923718", "0.687879", "0.6873728", "0.68463564", "0.6834399", "0.6799959", "0.6781629...
0.9622656
0
Test case for aws_service_api_volume_attachment_put
def test_aws_service_api_volume_attachment_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_attachment_delete(self):\n pass", "def test_aws_service_api_volume_patch(self):\n pass", "def test_attachment_update_volume_in_error_state(self):\n volume_params = {'status': 'available'}\n\n vref = tests_utils.create_volume(self.context, **volume_par...
[ "0.78520364", "0.70537263", "0.6843338", "0.66168505", "0.65721464", "0.6559735", "0.6498688", "0.64489305", "0.6446952", "0.6433131", "0.6415115", "0.6407497", "0.63907266", "0.63678694", "0.6332799", "0.6299971", "0.6292937", "0.6288657", "0.62113434", "0.6199681", "0.61764...
0.95771945
0
Test case for aws_service_api_volume_delete
def test_aws_service_api_volume_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_attachment_delete(self):\n pass", "def test_delete_volume(self):\n ctxt = context.get_admin_context()\n extra_specs = {}\n type_ref = volume_types.create(ctxt, 'hgst-1', extra_specs)\n volume = {'id': '1', 'name': 'volume1',\n 'd...
[ "0.8468831", "0.81775326", "0.8146488", "0.77009195", "0.75285304", "0.7432786", "0.7391771", "0.735651", "0.73492223", "0.72565275", "0.71595895", "0.7126499", "0.7101761", "0.70642024", "0.7002589", "0.69212985", "0.6907403", "0.68808544", "0.6820135", "0.67568016", "0.6745...
0.9583541
0
Test case for aws_service_api_volume_get
def test_aws_service_api_volume_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volumes_get(self):\n pass", "def test_volumes_get(self):\n pass", "def test_aws_service_api_volume_patch(self):\n pass", "def test_aws_service_api_volume_types_get(self):\n pass", "def test_aws_service_api_volume_delete(self):\n pass", "def volu...
[ "0.87159956", "0.8193062", "0.79313076", "0.78389907", "0.75917023", "0.72042996", "0.7173881", "0.7138423", "0.70423996", "0.6946495", "0.6889604", "0.6761077", "0.67592734", "0.67408574", "0.66669095", "0.65210545", "0.6495301", "0.64644176", "0.6450827", "0.64361185", "0.6...
0.9506741
0
Test case for aws_service_api_volume_patch
def test_aws_service_api_volume_patch(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_get(self):\n pass", "def test_aws_service_api_volume_attachment_put(self):\n pass", "def test_aws_service_api_volume_delete(self):\n pass", "def test_aws_service_api_volumes_get(self):\n pass", "def test_aws_service_api_volumes_post(self):\n ...
[ "0.8404985", "0.7963305", "0.7776195", "0.77071863", "0.76335806", "0.74082214", "0.7226184", "0.7076858", "0.6940691", "0.6913554", "0.6855418", "0.671127", "0.6625104", "0.64926636", "0.6474662", "0.6460252", "0.64272976", "0.6321299", "0.6295169", "0.6265758", "0.6237064",...
0.9439126
0
Test case for aws_service_api_volume_types_get
def test_aws_service_api_volume_types_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_get(self):\n pass", "def get_volume_types(self):\n res = self.get('%s/types' % self.catalog['volume'])\n if res['status'] == 200:\n return json.loads(res['body'])['volume_types']\n else:\n LOG.error('Get volume types failed: %s %s ...
[ "0.7527856", "0.7515748", "0.7399525", "0.73993516", "0.70917654", "0.68899465", "0.63437366", "0.6312394", "0.60646117", "0.6017373", "0.59605116", "0.58603066", "0.5806784", "0.5803278", "0.5764818", "0.57422024", "0.5703015", "0.5697612", "0.56767386", "0.5667692", "0.5651...
0.956193
0
Test case for aws_service_api_volumes_get
def test_aws_service_api_volumes_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_volumes_get(self):\n pass", "def test_aws_service_api_volume_get(self):\n pass", "def test_aws_service_api_volumes_post(self):\n pass", "def test_aws_service_api_volume_types_get(self):\n pass", "def get_volumes_detail(self, **kw):\n return (200, {}, {\"volumes\"...
[ "0.8942529", "0.87519145", "0.80404556", "0.77520996", "0.7608479", "0.7544432", "0.7415526", "0.733975", "0.7072568", "0.6962387", "0.69297963", "0.6905789", "0.68827385", "0.68624336", "0.6763317", "0.67302483", "0.671769", "0.6712588", "0.6687525", "0.6679484", "0.6639061"...
0.9550234
0
Test case for aws_service_api_volumes_post
def test_aws_service_api_volumes_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_volumes_post(self):\n pass", "def test_aws_service_api_volumes_get(self):\n pass", "def test_volumes_get(self):\n pass", "def test_aws_service_api_volume_get(self):\n pass", "def test_aws_service_api_volume_delete(self):\n pass", "def test_aws_service_api_volum...
[ "0.8798903", "0.7797968", "0.72953814", "0.69540304", "0.6889303", "0.6877601", "0.67905885", "0.6789412", "0.6704169", "0.6693733", "0.6646005", "0.6571699", "0.64049333", "0.63365346", "0.62437063", "0.6133804", "0.60914564", "0.6068486", "0.60637164", "0.6053222", "0.60373...
0.94235116
0
Selects the inp_tgt class.
def inp_tgt_selector(inp_tgt_type, N_d, N_s, K, f_s, **kwargs): if inp_tgt_type == "MagXi": return MagXi(N_d, N_s, K, f_s, xi_map_type=kwargs['map_type'], xi_map_params=kwargs['map_params']) elif inp_tgt_type == "MagGamma": return MagGamma(N_d, N_s, K, f_s, gamma_map_type=kwargs['map_type'], gamma_map_param...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def choose_class(self, *args, **kwargs):", "def select(self, target):", "def get_target_renderer_class(self):\n return multiselect2.target_renderer.Target", "def target_type(self):", "def identify_class(self, cls):", "def initiator_select_passive_target(pnd, nm, pbtInitData, szInitData, pnt):\n ...
[ "0.62084436", "0.6174032", "0.57846993", "0.5605849", "0.55529165", "0.5476607", "0.54329026", "0.5359113", "0.53050107", "0.52828443", "0.5240273", "0.5214275", "0.5181254", "0.51570755", "0.5150422", "0.514307", "0.50758886", "0.50637585", "0.5049911", "0.5043485", "0.50434...
0.5789777
2
An observation for Deep Xi (noisyspeech STMS).
def observation(self, x): x = self.normalise(x) x_STMS, x_STPS = self.polar_analysis(x) return x_STMS, x_STPS
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_observation(self, observation):", "def observation(state):\n return state[:4]", "def observation(self, x):\n\t\tx = self.normalise(x)\n\t\tx_STDCT = self.stdct_analysis(x)\n\t\treturn x_STDCT, None", "def get_observable_description(stix_obj, log):\n desc = \"\"\n if stix_obj[\"type\"] =...
[ "0.55662227", "0.5463184", "0.52901006", "0.5277881", "0.5238921", "0.5238921", "0.515549", "0.51427716", "0.51330316", "0.5112975", "0.49843127", "0.49824482", "0.4959339", "0.49484357", "0.49383458", "0.49087724", "0.48979646", "0.48928228", "0.4870021", "0.48504192", "0.48...
0.4989213
10
The base stats() function is used when no statistics are requied for the target.
def stats(self, s_sample, d_sample, x_sample, wav_len): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def advancedStats():", "def statistics(target):\n worker=current_worker()\n if (not is_worker_thread()) or (not worker) or (not worker.isopen) or (worker.index<0):\n logging.warning(\"statistics can only be called from activated worker thread\")\n return\n with worker.statistics_lock:\n ...
[ "0.7029451", "0.7007821", "0.69655186", "0.68899584", "0.6792191", "0.6778495", "0.6397842", "0.6395703", "0.63614607", "0.6348688", "0.6335129", "0.6301621", "0.6299876", "0.62896705", "0.6237762", "0.62343776", "0.62160784", "0.6155348", "0.61037034", "0.6102778", "0.607806...
0.5957794
31
Transforms timedomain sample to shorttime magnitude spectrum sample.
def transfrom_stats(self, s_sample, d_sample, x_sample, wav_len): s_STMS_sample = [] d_STMS_sample = [] x_STMS_sample = [] for i in tqdm(range(s_sample.shape[0])): s_STMS, _ = self.polar_analysis(s_sample[i,0:wav_len[i]]) d_STMS, _ = self.polar_analysis(d_sample[i,0:wav_len[i]]) x_STMS, _ = self.polar_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_sample_to_video_time(sample, orig_s_freq, sampleStamp,\r\n sampleTime):\r\n if sample < sampleStamp[0]:\r\n s_freq = orig_s_freq\r\n id0 = 0\r\n elif sample > sampleStamp[-1]:\r\n s_freq = orig_s_freq\r\n id0 = len(sampleStamp) - 1\r\n ...
[ "0.5996829", "0.5939703", "0.58088386", "0.5775923", "0.5742934", "0.5584786", "0.5581855", "0.55798346", "0.5575136", "0.55709225", "0.5548055", "0.55040663", "0.54654056", "0.54162014", "0.5413356", "0.5367284", "0.5355243", "0.5354102", "0.53521895", "0.53439856", "0.53311...
0.4937446
74
Compute statistics for map class.
def stats(self, s_sample, d_sample, x_sample, wav_len): s_STMS_sample, d_STMS_sample, x_STMS_sample = self.transfrom_stats(s_sample, d_sample, x_sample, wav_len) xi_sample = self.xi(s_STMS_sample, d_STMS_sample) self.xi_map.stats(xi_sample)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_statistics(self):", "def _get_stats(self):\n self.stats = set()\n self._bstats = set()\n self._h_bstats = set()\n self._tstats = set()\n self._ftstats = set()\n for cl in self.data_classes:\n for stat in cl._bstats:\n self.stats.add(...
[ "0.65744215", "0.62907714", "0.6119016", "0.5945289", "0.59396243", "0.5904752", "0.5866978", "0.5799329", "0.5752798", "0.5724647", "0.5713357", "0.5663257", "0.5654346", "0.56468195", "0.5640491", "0.56287575", "0.5622677", "0.5621717", "0.56140465", "0.5601541", "0.5593295...
0.0
-1
Compute example for Deep Xi, i.e. observation (noisyspeech STMS) and target (mapped a priori SNR).
def example(self, s, d, s_len, d_len, snr): s, d, x, n_frames = self.mix(s, d, s_len, d_len, snr) s_STMS, _ = self.polar_analysis(s) d_STMS, _ = self.polar_analysis(d) x_STMS, _ = self.polar_analysis(x) xi = self.xi(s_STMS, d_STMS) xi_bar = self.xi_map.map(xi) return x_STMS, xi_bar, n_frames
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def example(self, s, d, s_len, d_len, snr):\n\t\ts, d, x, n_frames = self.mix(s, d, s_len, d_len, snr)\n\t\ts_STDCT = self.stdct_analysis(s)\n\t\td_STDCT = self.stdct_analysis(d)\n\t\tx_STDCT = self.stdct_analysis(x)\n\t\txi = self.xi(s_STDCT, d_STDCT)\n\t\txi_bar = self.xi_map.map(xi)\n\t\tcd = self.cd(s_STDCT, d...
[ "0.5948552", "0.5700826", "0.5651105", "0.5640878", "0.5577034", "0.5576918", "0.5554578", "0.5543959", "0.55181545", "0.54491025", "0.54060066", "0.5375079", "0.5331109", "0.5328549", "0.53145504", "0.5304042", "0.5275662", "0.52746445", "0.52499664", "0.52165246", "0.519287...
0.5483728
9
A priori SNR estimate.
def xi_hat(self, xi_bar_hat): xi_hat = self.xi_map.inverse(xi_bar_hat) return xi_hat
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SNR(S, S0):\n return np.var(S) / np.var(S - S0)", "def calculateSNR(self):\n pass", "def observed_snr(psrsnr, psrra, psrdec):\n global beam_profile\n return lambda obsra,obsdec: psrsnr*beam_profile.gain_at_angular_offset(angsep_arcmin(psrra, psrdec, obsra, obsdec))", "def get_S_r(self):\n...
[ "0.7378384", "0.6761361", "0.6504994", "0.64850724", "0.6474928", "0.6267786", "0.6218195", "0.6095376", "0.6088404", "0.5869324", "0.58604723", "0.58211243", "0.5758803", "0.5722649", "0.5691067", "0.56659824", "0.56636083", "0.5644464", "0.56381714", "0.56173897", "0.561616...
0.0
-1
Maximum likelihood a posteriori SNR estimate.
def gamma_hat(self, xi_bar_hat): xi_hat = self.xi_map.inverse(xi_bar_hat) return tf.math.add(xi_hat, 1.0).numpy()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_ln_posterior(thetas, posterior_stats):\n\tln_posterior = np.dot(posterior_stats['fisher'], (thetas - posterior_stats['mean']))\n\tln_posterior = - np.dot((thetas - posterior_stats['mean']).transpose(), ln_posterior) /2\n\n\treturn ln_posterior", "def _getCurrentPosteriorLikelihood(self): \n ...
[ "0.6374548", "0.62665206", "0.62026405", "0.5809972", "0.57637334", "0.5745454", "0.5740675", "0.5650863", "0.56457615", "0.5644841", "0.5629658", "0.5595183", "0.5582172", "0.55731404", "0.5533375", "0.55227435", "0.5509906", "0.54874676", "0.5473", "0.54597616", "0.5451472"...
0.0
-1
Compute statistics for map class.
def stats(self, s_sample, d_sample, x_sample, wav_len): s_STMS_sample, d_STMS_sample, x_STMS_sample = self.transfrom_stats(s_sample, d_sample, x_sample, wav_len) gamma_sample = self.gamma(x_STMS_sample, d_STMS_sample) self.gamma_map.stats(gamma_sample)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_statistics(self):", "def _get_stats(self):\n self.stats = set()\n self._bstats = set()\n self._h_bstats = set()\n self._tstats = set()\n self._ftstats = set()\n for cl in self.data_classes:\n for stat in cl._bstats:\n self.stats.add(...
[ "0.65744215", "0.62907714", "0.6119016", "0.5945289", "0.59396243", "0.5904752", "0.5866978", "0.5799329", "0.5752798", "0.5724647", "0.5713357", "0.5663257", "0.5654346", "0.56468195", "0.5640491", "0.56287575", "0.5622677", "0.5621717", "0.56140465", "0.5601541", "0.5593295...
0.0
-1
Compute example for Deep Xi, i.e. observation (noisyspeech STMS) and target (mapped a posteriori SNR).
def example(self, s, d, s_len, d_len, snr): s, d, x, n_frames = self.mix(s, d, s_len, d_len, snr) s_STMS, _ = self.polar_analysis(s) d_STMS, _ = self.polar_analysis(d) x_STMS, _ = self.polar_analysis(x) gamma = self.gamma(x_STMS, d_STMS) gamma_bar = self.gamma_map.map(gamma) return x_STMS, gamma_bar, n_fr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inner(base_example: int = 0):\n EX = Xy_raw.iloc[base_example]\n print(\"Base Example IDs:\")\n print((Xy_raw.index[[base_example]]).to_frame().reset_index(drop=True).iloc[0].rename(index=base_example))\n\n def get_widget(col: str):\n V = EX[col]\n ...
[ "0.5824987", "0.58057636", "0.5753222", "0.56873655", "0.56327254", "0.5599678", "0.55883867", "0.5556771", "0.5504452", "0.5492828", "0.5398652", "0.53814644", "0.53759575", "0.53738165", "0.5348238", "0.52822226", "0.5248246", "0.5241692", "0.52331996", "0.5222376", "0.5203...
0.49024558
62
A posteriori SNR estimate.
def gamma_hat(self, gamma_bar_hat): gamma_hat = self.gamma_map.inverse(gamma_bar_hat) return gamma_hat
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SNR(S, S0):\n return np.var(S) / np.var(S - S0)", "def calculateSNR(self):\n pass", "def get_S_r(self):\n\n S_r = np.sum((self.eta_model - self.eta_exp) ** 2.)\n\n return S_r", "def rsr(self) -> float:\n return float(self.rmse() / np.std(self.true))", "def psnr(y_true, y_pred):\n...
[ "0.6919377", "0.62423986", "0.6143222", "0.61193144", "0.60948455", "0.60733527", "0.5973061", "0.59636325", "0.59578675", "0.59245914", "0.59193355", "0.59114164", "0.586165", "0.580108", "0.5788481", "0.5743766", "0.5742211", "0.5742211", "0.56886184", "0.56880283", "0.5682...
0.0
-1
A priori SNR estimate.
def xi_hat(self, gamma_bar_hat): gamma_hat = self.gamma_map.inverse(gamma_bar_hat) return tf.maximum(tf.math.subtract(gamma_hat, 1.0), 1e-12).numpy()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SNR(S, S0):\n return np.var(S) / np.var(S - S0)", "def calculateSNR(self):\n pass", "def observed_snr(psrsnr, psrra, psrdec):\n global beam_profile\n return lambda obsra,obsdec: psrsnr*beam_profile.gain_at_angular_offset(angsep_arcmin(psrra, psrdec, obsra, obsdec))", "def get_S_r(self):\n...
[ "0.73832285", "0.6766759", "0.650804", "0.64868206", "0.6477918", "0.6270175", "0.62219375", "0.60975206", "0.60889465", "0.5873745", "0.58645684", "0.5822557", "0.57586515", "0.57262117", "0.56956685", "0.56705034", "0.56653404", "0.56461066", "0.5641833", "0.56205493", "0.5...
0.0
-1
Compute statistics for map class.
def stats(self, s_sample, d_sample, x_sample, wav_len): s_STMS_sample, d_STMS_sample, x_STMS_sample = self.transfrom_stats(s_sample, d_sample, x_sample, wav_len) xi_sample = self.xi(s_STMS_sample, d_STMS_sample) self.xi_map.stats(xi_sample) gamma_sample = self.gamma(x_STMS_sample, d_STMS_sample) self.gamma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_statistics(self):", "def _get_stats(self):\n self.stats = set()\n self._bstats = set()\n self._h_bstats = set()\n self._tstats = set()\n self._ftstats = set()\n for cl in self.data_classes:\n for stat in cl._bstats:\n self.stats.add(...
[ "0.65744215", "0.62907714", "0.6119016", "0.5945289", "0.59396243", "0.5904752", "0.5866978", "0.5799329", "0.5752798", "0.5724647", "0.5713357", "0.5663257", "0.5654346", "0.56468195", "0.5640491", "0.56287575", "0.5622677", "0.5621717", "0.56140465", "0.5601541", "0.5593295...
0.0
-1
Compute example for Deep Xi, i.e. observation (noisyspeech STMS) and target (mapped a priori and a posteriori SNR).
def example(self, s, d, s_len, d_len, snr): s, d, x, n_frames = self.mix(s, d, s_len, d_len, snr) s_STMS, _ = self.polar_analysis(s) d_STMS, _ = self.polar_analysis(d) x_STMS, _ = self.polar_analysis(x) xi = self.xi(s_STMS, d_STMS) xi_bar = self.xi_map.map(xi) gamma = self.gamma(x_STMS, d_STMS) gamma_ba...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inner(base_example: int = 0):\n EX = Xy_raw.iloc[base_example]\n print(\"Base Example IDs:\")\n print((Xy_raw.index[[base_example]]).to_frame().reset_index(drop=True).iloc[0].rename(index=base_example))\n\n def get_widget(col: str):\n V = EX[col]\n ...
[ "0.5818395", "0.57352644", "0.5700322", "0.5685485", "0.5536824", "0.55256635", "0.5505724", "0.5480714", "0.5440848", "0.54257584", "0.541507", "0.5366318", "0.53149724", "0.5260688", "0.52584064", "0.5233376", "0.52221096", "0.521376", "0.5192281", "0.5184847", "0.517647", ...
0.52199656
17
A priori SNR estimate.
def xi_hat(self, xi_gamma_bar_hat): xi_bar_hat, _ = tf.split(xi_gamma_bar_hat, num_or_size_splits=2, axis=-1) xi_hat = self.xi_map.inverse(xi_bar_hat) return xi_hat
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SNR(S, S0):\n return np.var(S) / np.var(S - S0)", "def calculateSNR(self):\n pass", "def observed_snr(psrsnr, psrra, psrdec):\n global beam_profile\n return lambda obsra,obsdec: psrsnr*beam_profile.gain_at_angular_offset(angsep_arcmin(psrra, psrdec, obsra, obsdec))", "def get_S_r(self):\n...
[ "0.7378384", "0.6761361", "0.6504994", "0.64850724", "0.6474928", "0.6267786", "0.6218195", "0.6095376", "0.6088404", "0.5869324", "0.58604723", "0.58211243", "0.5758803", "0.5722649", "0.5691067", "0.56659824", "0.56636083", "0.5644464", "0.56381714", "0.56173897", "0.561616...
0.0
-1