query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns the initial decoder state, conditioned on the final encoder state of the last encoder layer.
def init_hidden(self, encoder_final): batch_size = encoder_final.size(0) # for multiple layers: is the same for all layers if self.bridge and encoder_final is not None: h = torch.tanh( self.bridge_layer(encoder_final)).unsqueeze(0).repeat( self.num_la...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decode_init(self, encoder_states, mask_inference_inputs, eps=1e-20):\n last_encoder_state = encoder_states[-1]\n batch_size, _ = last_encoder_state.shape\n decoder_state = self.enc2dec_step(last_encoder_state)\n decoder_state = self.apply_attention(\n decoder_state, encod...
[ "0.6743705", "0.6447022", "0.61649275", "0.6119748", "0.6107639", "0.61058736", "0.60962725", "0.6022419", "0.6016178", "0.6002896", "0.595372", "0.5868256", "0.5856354", "0.5853624", "0.5808155", "0.57553834", "0.56870514", "0.5676322", "0.5672354", "0.5671428", "0.5671428",...
0.5851378
14
Returns the "id" of the current thread.
def get_ident(): return coro.current().id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def current_thread_id():\r\n return current_thread().ident", "def current_thread_id():\n\tcurrent_thread = threading.current_thread()\n\n\tif hasattr(current_thread, '_thread_id'):\n\t\treturn current_thread._thread_id\n\n\tfor thread_id, thread in threading._active.items():\n\t\tif thread is current_thread:\...
[ "0.92730576", "0.87312263", "0.8492488", "0.844913", "0.79631126", "0.7931598", "0.77298343", "0.7718697", "0.769951", "0.76614016", "0.7557081", "0.7331665", "0.71841836", "0.713091", "0.7095348", "0.7066501", "0.7025072", "0.7025072", "0.702347", "0.6972786", "0.69664276", ...
0.7060726
16
This method does nothing, because coro uses a dynamic stack.
def stack_size(size=None): return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\r\n self.stack = []", "def __init__(self):\n self.stack = []", "def __init__(self):\n self.stack = []", "def __init__(self):\n self.stack = []", "def __init__(self):\n self.stack = []", "def __init__(self):\n self.stack = []", "def __init__(...
[ "0.67682666", "0.6729835", "0.6729835", "0.6729835", "0.6729835", "0.6729835", "0.6729835", "0.6729835", "0.6729835", "0.6729835", "0.6729835", "0.6729835", "0.6702008", "0.67010707", "0.67010707", "0.66143113", "0.6555489", "0.65180534", "0.63080966", "0.62619895", "0.6232",...
0.0
-1
Given a path prefix and file name, generates a longer path to store files in S3 in order to make bucket paths not guessable/enumerable.
def generate_upload_path(path_prefix: str, filename: str) -> str: path_prefix = path_prefix.strip('/') filename = filename.lstrip('/') if not path_prefix or not filename: raise ValueError return f'{path_prefix}/{get_random_string(35)}/{filename}'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_s3_url(bucket_name, dirpath, filename):\n return util.join_all(S3_DOMAIN, bucket_name, dirpath, filename)", "def append_prefix_to_filename(full_path, prefix=None):\n\n if prefix is None:\n prefix = \"temp\"\n\n file_name = Path(full_path).name\n\n root = Path(full_path).parts\n\n ...
[ "0.69741446", "0.67936856", "0.6787164", "0.67542547", "0.6721969", "0.6648083", "0.66265625", "0.65278494", "0.64852035", "0.64823323", "0.64311904", "0.64224553", "0.63610274", "0.6320479", "0.6289435", "0.61421186", "0.612233", "0.6094634", "0.6064469", "0.6029931", "0.600...
0.7221527
0
Parse and return command line arguments
def getargs(): parser = argparse.ArgumentParser(description="Scan a (La)TeX or \ Markdown file to find lines that are missing terminating punctuation.") parser.add_argument('infile', type=str, default=None, help="Name of (La)TeX or Markdown file to scan.") return parser.parse_args()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _parse_command_line_arguments():\n parser = ArgumentParser(\n description=(\n 'Command-line tool to generate a list of unique from a TS file from FermiFAST'\n ),\n )\n parser.add_argument(\n 'ts-file',\n type=str,\n help=(\n 'A file containing t...
[ "0.77873486", "0.766208", "0.7589848", "0.7579883", "0.7570548", "0.7559789", "0.75154674", "0.7514136", "0.74962956", "0.74847674", "0.7482853", "0.7480004", "0.7461753", "0.7447", "0.7430193", "0.7428477", "0.7404743", "0.74023384", "0.73999476", "0.7397319", "0.73756504", ...
0.0
-1
Creates an instance of this model from a dictionary
def from_dictionary(cls, dictionary): if dictionary is None: return None # Extract variables from the dictionary id = dictionary.get('id') callback_url = dictionary.get('callbackUrl') publish_permissions = dictionary.get('publishPermis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(cls, dictionary):\n return cls(**dictionary)", "def create(cls, dictionary):\n return cls(**dictionary)", "def from_dictionary(cls,\r\n dictionary):\r\n if dictionary is None:\r\n return None\r\n\r\n # Extract variables from the dictionar...
[ "0.8168118", "0.8168118", "0.81387204", "0.80260164", "0.8004128", "0.79881746", "0.79450303", "0.7879887", "0.7842279", "0.7836853", "0.78155565", "0.7809863", "0.7801973", "0.7801407", "0.7801407", "0.7801407", "0.7801407", "0.7801407", "0.7801407", "0.7801407", "0.7801407"...
0.0
-1
Yield successive nsized chunks from l.
def chunks(l, n): for i in range(0, len(l), n): yield l[i:i + n]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __chunks(self, l, n):\n for i in range(0, len(l), n):\n yield l[i:i+n]", "def _chunks(self, l, n):\n for i in xrange(0, len(l), n):\n yield l[i:i+n]", "def chunk(self, l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]", "def chunks(l, n):\n ...
[ "0.80763406", "0.79780173", "0.7848591", "0.7818154", "0.7764843", "0.7764843", "0.7740603", "0.76803994", "0.7677509", "0.7673566", "0.765864", "0.7655856", "0.7655856", "0.7655856", "0.76458347", "0.7615106", "0.75838816", "0.7557435", "0.7549177", "0.7549177", "0.7549177",...
0.7448925
68
Resize images to the given shape.
def resize_images(x, output_shape, mode='bilinear', align_corners=True): return ResizeImages(output_shape, mode, align_corners).apply((x,))[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resize(self, shape):\n # As an inplace operation, this requires implementation in each format.\n raise NotImplementedError(\n '{}.resize is not implemented'.format(type(self).__name__))", "def resize(self, shape: tuple):\n assert isinstance(shape, tuple), \\\n f'Inp...
[ "0.73262316", "0.6993179", "0.6955667", "0.6903927", "0.6753105", "0.6667534", "0.66444224", "0.66399944", "0.6597205", "0.6526392", "0.6449475", "0.6354132", "0.63237", "0.6305996", "0.63027763", "0.63013643", "0.6296425", "0.6296425", "0.6283862", "0.62778676", "0.6231584",...
0.6543536
9
Task has been rejected by the customer.
def REJECTED(self): return "rejected"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_rejected(self):\n return self._state == \"rejected\"", "def fail(self, task_id):\n pass", "def reject(self):\n self.rejected = True", "def reject(self):\n self.rejected = timezone.now()\n self.save()", "def reject(self, request):\n # mark as not approved and...
[ "0.6781759", "0.6625108", "0.65970176", "0.64926386", "0.6398086", "0.6378454", "0.6282694", "0.6276628", "0.6274751", "0.6064653", "0.6052766", "0.5975738", "0.59745836", "0.5972002", "0.5937025", "0.59281707", "0.59108967", "0.5871742", "0.58637416", "0.5837621", "0.5820129...
0.6752258
1
Performs multiheaded attention from `from_tensor` to `to_tensor`. This is an implementation of multiheaded attention based on "Attention is all you Need". If `from_tensor` and `to_tensor` are the same, then this is selfattention. Each timestep in `from_tensor` attends to the corresponding sequence in `to_tensor`, and r...
def attention_layer(from_tensor, to_tensor, attention_mask=None, num_attention_heads=1, size_per_head=512, query_act=None, key_act=None, value_act=None, attenti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attention_layer(from_tensor,\n to_tensor,\n attention_mask=None,\n num_attention_heads=1,\n size_per_head=512,\n query_act=None,\n key_act=None,\n value_act=None,\n ...
[ "0.79350567", "0.70490795", "0.6230568", "0.61982495", "0.61479646", "0.6138235", "0.5672837", "0.54814863", "0.54606295", "0.5369567", "0.53660136", "0.5314974", "0.528275", "0.52228254", "0.5210224", "0.5169689", "0.51476973", "0.5118552", "0.509575", "0.50700426", "0.50647...
0.7947181
0
Reshapes a >= rank 2 tensor to a rank 2 tensor (i.e., a matrix).
def reshape_to_matrix(input_tensor): ndims = input_tensor.shape.ndims if ndims < 2: raise ValueError("Input tensor must have at least rank 2. Shape = %s" % (input_tensor.shape)) if ndims == 2: return input_tensor width = input_tensor.shape[-1] output_tensor ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reshape_to_matrix(input_tensor):\n \"\"\"把一个rank >= 2的tensor变成一个rank为2的矩阵\"\"\"\n ndims = input_tensor.shape.ndims\n if ndims < 2:\n raise ValueError(\"Input tensor must have at least rank 2. Shape = %s\" %\n (input_tensor.shape))\n if ndims == 2:\n return input_tensor\n\n width ...
[ "0.8056062", "0.7719459", "0.76339686", "0.75891525", "0.7577096", "0.75013775", "0.72042274", "0.71878314", "0.71878314", "0.71363693", "0.70127475", "0.6995799", "0.69731414", "0.6626832", "0.6601237", "0.6557156", "0.65529305", "0.65057254", "0.64744866", "0.64299166", "0....
0.7507519
5
Reshapes a rank 2 tensor back to its original rank >= 2 tensor.
def reshape_from_matrix(output_tensor, orig_shape_list): if len(orig_shape_list) == 2: return output_tensor output_shape = get_shape_list(output_tensor) orig_dims = orig_shape_list[0:-1] width = output_shape[-1] return tf.reshape(output_tensor, orig_dims + [width])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reshape_from_matrix(output_tensor, orig_shape_list):\n \"\"\"把rank为2的tensor变回rank >= 2的tensor\"\"\"\n if len(orig_shape_list) == 2:\n return output_tensor\n\n output_shape = get_shape_list(output_tensor)\n\n orig_dims = orig_shape_list[0:-1]\n width = output_shape[-1]\n\n return tf.reshape(output_tens...
[ "0.7410044", "0.725626", "0.6899436", "0.6862811", "0.66999114", "0.6680788", "0.66638684", "0.66573614", "0.66116285", "0.6584382", "0.65419245", "0.65072364", "0.6502149", "0.64449567", "0.641807", "0.6350139", "0.6346788", "0.6298768", "0.62649465", "0.6215438", "0.6208489...
0.6648785
8
Creates a `truncated_normal_initializer` with the given range.
def create_initializer(initializer_range=0.02): return tf.truncated_normal_initializer(stddev=initializer_range)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_initializer(initializer_range=0.02):\n return tf.truncated_normal_initializer(stddev=initializer_range)", "def create_initializer(initializer_range=0.02):\n return tf.truncated_normal_initializer(stddev=initializer_range)", "def create_initializer(initializer_range=0.02):\r\n return tf.truncated...
[ "0.81536674", "0.81536674", "0.81501657", "0.80486375", "0.69347703", "0.66249484", "0.6277882", "0.62120473", "0.620507", "0.61929166", "0.61074364", "0.6001233", "0.5956818", "0.58036447", "0.5752769", "0.5725072", "0.57016426", "0.5669703", "0.5632291", "0.5621129", "0.561...
0.81749
1
Retrieve the current page.
def current_page(self) -> int: return self._current_page
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def current_page(self):\n self._ensure(running = True)\n return self.page", "def get_current_page(self):\n return self.__current_page", "def get_current_page(self):\n return self.pages[self.current_page - 1]", "def get_current_page(self):\r\n\r\n return self.get_req('/lol-p...
[ "0.884799", "0.8805074", "0.8607393", "0.85820764", "0.85403985", "0.84997636", "0.7740124", "0.75954115", "0.7589455", "0.74572766", "0.7147315", "0.71253645", "0.7095955", "0.7054744", "0.69801205", "0.6688891", "0.66538835", "0.66538835", "0.6634272", "0.6547868", "0.65106...
0.7939637
7
Set up dummy test data
def setUp(self): self.create_test_users() self.create_test_task()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_test_data(self, *args, **kwargs) -> None:\n pass", "def setUpTestData(cls):\n pass", "def setUpTestData(cls):\n data_gen.run()", "def setUpTestData(cls):\n data_gen.run()", "def test_init():\n D = Dataset()", "def setUp(self):\n self.datasets = gen_gp_test_data...
[ "0.77889407", "0.77377623", "0.7683974", "0.7683974", "0.74990636", "0.74445426", "0.74364847", "0.7431926", "0.73816353", "0.73596257", "0.73596257", "0.72980726", "0.72764343", "0.72262526", "0.72160274", "0.7202552", "0.7173922", "0.71633613", "0.7133999", "0.71105736", "0...
0.67386305
67
Get the unique identifier of the device.
def unique_id(self): return self._light.deviceId
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unique_id(self) -> str:\n return self._info.device_identification", "def unique_id(self):\n return self.device.id", "def unique_id(self):\n return self._device_id", "def unique_id(self):\n return self.device_id", "def get_device_id(self) -> str:\n return self.__device...
[ "0.8811725", "0.8664173", "0.8659191", "0.8610989", "0.85261697", "0.8487325", "0.8423728", "0.819653", "0.809402", "0.80872387", "0.8031839", "0.78121656", "0.78121656", "0.7803513", "0.77352136", "0.77024", "0.7687146", "0.7617827", "0.7436963", "0.74233097", "0.7423109", ...
0.81192577
8
Return the ID of this light.
def device_id(self): return self.unique_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unique_id(self):\n return self.config_entry.entry_id + \"_light\"", "def get_id(self):\n return self.info['id']", "def get_id(self):\n return id", "def getId(self):\n return self.__id", "def getId(self):\n return self.__id", "def getId(self):\n return self.__...
[ "0.77788675", "0.7452496", "0.7440733", "0.7415968", "0.7415968", "0.7415968", "0.7404513", "0.73704785", "0.73704785", "0.73704785", "0.73704785", "0.73704785", "0.73704785", "0.73704785", "0.73704785", "0.73704785", "0.73704785", "0.73704785", "0.73704785", "0.73591083", "0...
0.0
-1
Create the REST request for the ee list
def url_get_ees(self): return build_url(self._mlops_server, self._mlops_port, self._prefix, MLOpsRestHandles.EES)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _getRequestWithList(self , viewName , listName , alist , query={}):\n qstring = {'f': 'json' , 'v': self._apiVersion , 'c': self._appName}\n qstring.update(query)\n url = '%s:%d/%s/%s' % (self._baseUrl , self._port , self._serverPath ,\n viewName)\n data = StringIO()\n ...
[ "0.68658596", "0.63588786", "0.6346989", "0.60780394", "0.6069563", "0.60488653", "0.5989666", "0.5966903", "0.58086663", "0.5775098", "0.5768617", "0.5768617", "0.5768617", "0.57361597", "0.5717268", "0.571653", "0.5716026", "0.5671152", "0.56631345", "0.5638195", "0.5608945...
0.6239705
3
Test if API gets invalid tafseer id or (Ayah & Sura ids) should return 404 NOT FUND status
def test_not_found_tafseer_404(self): tafseer_text_url = reverse('ayah-tafseer', kwargs={'tafseer_id': 0, 'sura_index': 0, 'ayah_number': 0}) response = self.client.get(tafseer_text_url)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_retrieve_with_bad_id(self):\n resp = self.api_client.get('/api/users/100000/')\n data = json.loads(resp.content)\n # Ensure request was successful\n self.assertEqual(resp.status_code, 404)\n # Ensure the returned json keys match the expected\n self.assertEqual(dat...
[ "0.75248516", "0.7348978", "0.72221684", "0.7165705", "0.7063052", "0.70531106", "0.7046796", "0.70110273", "0.6993285", "0.69822866", "0.6975207", "0.6969306", "0.6944052", "0.6908277", "0.6846373", "0.6839235", "0.683863", "0.6827727", "0.68256253", "0.6804085", "0.6739076"...
0.68325025
17
Returns an error value for the spline. IN this case the error is calculated by a weighted combination of the norm and the residuals spline the smoothing spline to get the weight of norm_weight the weight to apply to the norm residual_weight the weight to apply to the residuals
def get_norm_penalized_residuals(self, spline, norm_weight = 10, residual_weight = 1): from scipy.linalg import norm #the exponent is a magic number and subject to change err = (norm_weight*norm(spline(self.xRange))**5) + (residual_weight*sqrt(spline.get_residual())) return err
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fit_loss(self, smoothingFactor=None, weight = None):\n\n if smoothingFactor == None:\n smoothingFactor = self.smoothingFactor\n\n spline = self.fit_univariate_spline(smoothingFactor=smoothingFactor, weight=weight)\n err = self.lossFunction(spline)\n \n return err",...
[ "0.68150145", "0.55882967", "0.5520562", "0.5506345", "0.53344226", "0.5323764", "0.52877355", "0.52815753", "0.5230165", "0.5222921", "0.52167284", "0.5182036", "0.5178518", "0.5143595", "0.5128114", "0.51175684", "0.50943184", "0.5093424", "0.50747377", "0.5072058", "0.5071...
0.74479
0
Read multiple lines from stdin until the terminator character is found, then yield a single spaceseparated long line.
def read_long_line(stdin, terminator): while True: lines = [] while True: line = stdin.readline() # ends with \n if not line: # EOF return line = line.strip() if not line: continue elif line[-1] == terminat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iterate_stdin():\n\n while True:\n try:\n line = sys.stdin.readline()\n except KeyboardInterrupt:\n raise StopIteration\n\n if not line:\n raise StopIteration\n\n yield line.strip()", "def read_lines(prompt=\"\"):\n if os.isatty(sys.stdin.fil...
[ "0.73065424", "0.71408707", "0.7039613", "0.6865694", "0.66012496", "0.6562868", "0.6238281", "0.62161154", "0.61854196", "0.6167288", "0.61577946", "0.6117685", "0.6062449", "0.60212076", "0.5869537", "0.5857031", "0.5763517", "0.5727217", "0.5624837", "0.5610447", "0.560799...
0.8688719
0
generate rooms and test their specs
def test_room_creation(self): self.office = Office('TopOffice') self.living = LivingSpace('WoodWing') office_size = self.office.capacity living_size = self.living.capacity self.assertEquals(office_size, 6) self.assertEquals(living_size, 4) self.assertIsInstance(se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_rooms(self):\n self.zero()\n self.one()\n self.two()\n self.three()\n self.four()\n self.five()\n self.six()", "def test_01_BuildObjects(self):\n self.assertEqual(self.m_pyhouse_obj.House.Rooms, {})", "def generate_rooms(x, y):\n rooms = []\...
[ "0.6872442", "0.6599707", "0.6440705", "0.6414775", "0.63902885", "0.6200632", "0.61914206", "0.6151599", "0.6134024", "0.6049728", "0.601498", "0.59383976", "0.59009767", "0.58949405", "0.586758", "0.58570915", "0.5854027", "0.5849055", "0.58326906", "0.5830122", "0.5827826"...
0.6013458
11
Exports data to csv. Saves all data from DataFrame to csv. Filename is saved with an index and incremented if a file with the same filename already exists.
def export_data(export_data_df: pd.DataFrame): # Initialize running variable and filename i = 0 filename = '../output/franzBagging{}.csv'.format(i) # Assert filename does not exist while os.path.isfile(filename): filename = '../output/franzBagging{}.csv'.format(i) i += 1 # Ass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def saveFile(df):\n df = df.reset_index(drop=True)\n df.index += 1\n df.index.name = 'Index'\n df.to_csv('todo.csv')\n return(df)", "def write_to_csv(dataframe, file_name, index=False):\n index_label = False\n if index:\n index_label = \"instance\"\n\n dataframe.to_csv(\n pa...
[ "0.7748513", "0.7606373", "0.7490994", "0.72700554", "0.7247242", "0.72449356", "0.72205365", "0.7127581", "0.7124272", "0.71212816", "0.7071183", "0.70400196", "0.70353234", "0.70242023", "0.7019557", "0.7014041", "0.7004611", "0.69747263", "0.69701445", "0.6969594", "0.6947...
0.0
-1
Make a DELETE request to the specified path.
def delete(self, path: str, data: dict = None) -> Response: return self.client.delete(reverse(path), data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(self, path):\n\n return self.make_request(path, \"DELETE\", {}, None)", "def delete(self, path):\n return self._request('DELETE', path)", "def delete(self, path, **kwargs):\n return self.request(path, \"DELETE\", **kwargs)", "def DELETE(self, path, **kwargs):\n return s...
[ "0.9045138", "0.8933153", "0.88356644", "0.8559965", "0.854526", "0.8520718", "0.841037", "0.83926535", "0.83378863", "0.8278339", "0.8162955", "0.78593755", "0.785717", "0.7781788", "0.7723859", "0.77202725", "0.76078486", "0.75890833", "0.75570816", "0.7545852", "0.7508954"...
0.83577305
8
Compute the shortest distance from line segment to triangle. Implementation adapted from RealTime Collision Detection by Christer Ericson published by Morgan Kaufmann Publishers, Copyright 2005 Elsevier Inc.
def line_segment_to_triangle( segment_start, segment_end, triangle_points, epsilon=1e-6): segment_direction, segment_length = convert_segment_to_line( segment_start, segment_end) distance, closest_point_segment, closest_point_triangle, t_closest = _line_to_triangle( segment_start, segme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def distance_segment2segment(line_1, line_2):\n d1 = distance_point2segment(line_1[:2], line_2)\n d2 = distance_point2segment(line_1[2:4], line_2)\n d3 = distance_point2segment(line_2[:2], line_1)\n d4 = distance_point2segment(line_2[2:4], line_1)\n return min(d1, d2, d3, d4)", "def _perpendicular...
[ "0.66264385", "0.65712476", "0.64932", "0.64697117", "0.6451191", "0.63198566", "0.6291476", "0.6254618", "0.6205987", "0.61339855", "0.6117549", "0.61107665", "0.6090444", "0.603854", "0.6036289", "0.6031113", "0.6027024", "0.6015235", "0.60150945", "0.6012733", "0.59958816"...
0.5623495
55
Sets the to_schema_ref of this SchemaLineageDependencyDef.
def to_schema_ref(self, to_schema_ref): if to_schema_ref is None: raise ValueError("Invalid value for `to_schema_ref`, must not be `None`") self._to_schema_ref = to_schema_ref
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def schema(self, schema):\n\n self._schema = schema", "def schema(self, schema):\n\n self._schema = schema", "def from_schema_ref(self, from_schema_ref):\n if from_schema_ref is None:\n raise ValueError(\"Invalid value for `from_schema_ref`, must not be `None`\")\n\n self...
[ "0.63609457", "0.63609457", "0.62910986", "0.6081481", "0.6073744", "0.60602117", "0.58112055", "0.58112055", "0.57712865", "0.567756", "0.562947", "0.54562837", "0.5343668", "0.5289556", "0.51271105", "0.50960237", "0.5006027", "0.49561667", "0.4947497", "0.48429483", "0.482...
0.76474684
0
Gets the column_data_dependencies of this SchemaLineageDependencyDef.
def column_data_dependencies(self): return self._column_data_dependencies
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def column_control_dependencies(self):\n return self._column_control_dependencies", "def column_data_dependencies(self, column_data_dependencies):\n\n self._column_data_dependencies = column_data_dependencies", "def dependencies(self):\n return self._dependencies", "def dependencies(self...
[ "0.7000053", "0.6958285", "0.5939516", "0.5939516", "0.5892246", "0.5864863", "0.5860467", "0.5856393", "0.57775164", "0.5763182", "0.5759971", "0.5715157", "0.57128406", "0.56986517", "0.5698498", "0.56879264", "0.5675296", "0.5648692", "0.5603569", "0.55336654", "0.5520542"...
0.83185923
0
Gets the column_control_dependencies of this SchemaLineageDependencyDef.
def column_control_dependencies(self): return self._column_control_dependencies
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def column_data_dependencies(self):\n return self._column_data_dependencies", "def column_control_dependencies(self, column_control_dependencies):\n\n self._column_control_dependencies = column_control_dependencies", "def dependencies(self):\n return self._dependencies", "def dependencie...
[ "0.7339746", "0.71862763", "0.60655934", "0.60655934", "0.59986335", "0.59572524", "0.5900236", "0.5778384", "0.57605904", "0.56941044", "0.56499666", "0.56135446", "0.5597786", "0.5593996", "0.5570969", "0.5549985", "0.54674226", "0.54492307", "0.54303765", "0.53099555", "0....
0.8433751
0
Returns the string representation of the model
def to_str(self): return pformat(self.to_dict())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _repr_model_(self):\n return str(self)", "def __str__(self):\n\n return str(self.model)", "def get_model_string(self):\n raise NotImplementedError()", "def __str__(self):\n return self.model", "def serialize_model(self):\n return dill.dumps(self.model)", "def __str_...
[ "0.8602374", "0.85093755", "0.8237104", "0.8050309", "0.80128866", "0.79348034", "0.78766525", "0.77898884", "0.7786461", "0.7745792", "0.7627315", "0.76055235", "0.757999", "0.7514394", "0.75038797", "0.75035286", "0.74850684", "0.7440529", "0.74325883", "0.74239755", "0.740...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n return not self == other", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other):\n return self.__dict__ != other.__dict__", "def __eq__(self, other):\n return not self.__ne__(other)", ...
[ "0.8410411", "0.8391477", "0.8172175", "0.81410587", "0.80920255", "0.8088807", "0.80676955" ]
0.0
-1
Just call the superclass constructor
def __init__(self, lower, upper): super().__init__(lower, upper, enforce="resample")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _constructor(self):\n pass", "def __init__(self, *args):\n super().__init__(args)", "def __init__(self, *args, **kwars):\n super().__init__(*args, **kwargs)", "def __init__ (self, args):\n super().__init__(args)", "def __init__ (self, args):\n super().__init__(args)",...
[ "0.7995198", "0.7978282", "0.79743075", "0.7856583", "0.7856583", "0.779357", "0.77753973", "0.77412915", "0.7709625", "0.7704053", "0.76916975", "0.76916975", "0.76916975", "0.76916975", "0.76916975", "0.76916975", "0.76916975", "0.76916975", "0.76916975", "0.76916975", "0.7...
0.0
-1
Use the ncut method to segment the image [image, slic_label/[slic_param], [ncut_param]]
def _ncut_seg(self, data_list): img = data_list[0] param = data_list[1] param_cut = data_list[2] if param_cut is None: threahold = 0.001 else: threahold = param_cut[0] # Check if the param is the super pixel label or the num of super pixel ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _ncutb_seg(self, data_list):\n img = data_list[0]\n param = data_list[1]\n param_cut = data_list[2]\n if param_cut is None:\n threahold = 0.2\n else:\n threahold = param_cut[0]\n # Check if the param is the super pixel label or the num of super pi...
[ "0.82579136", "0.6584294", "0.62561136", "0.6128766", "0.61003196", "0.6022437", "0.59895116", "0.58898365", "0.56298953", "0.56265247", "0.55546033", "0.5545411", "0.5481424", "0.5473425", "0.5369277", "0.5338481", "0.5329542", "0.5225671", "0.5194463", "0.5187856", "0.51688...
0.84380835
0
Getter method for time_taken, mapped from YANG variable /brocade_mpls_rpc/show_mpls_te_path/output/time_taken (uint32)
def _get_time_taken(self): return self.__time_taken
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_taken(self) -> str:\n return pulumi.get(self, \"time_taken\")", "def time_taken(self) -> str:\n return pulumi.get(self, \"time_taken\")", "def _set_time_taken(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedC...
[ "0.7037632", "0.7037632", "0.69721377", "0.5593105", "0.5558783", "0.5479426", "0.54118145", "0.5398868", "0.530049", "0.52935416", "0.52400225", "0.5218835", "0.5172954", "0.5141623", "0.5141623", "0.50951463", "0.5090908", "0.50860345", "0.5084601", "0.50813264", "0.5068462...
0.6382457
3
Setter method for time_taken, mapped from YANG variable /brocade_mpls_rpc/show_mpls_te_path/output/time_taken (uint32)
def _set_time_taken(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="time-taken", rest_name="time-taken", parent=self, path_helper=self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_taken(self) -> str:\n return pulumi.get(self, \"time_taken\")", "def time_taken(self) -> str:\n return pulumi.get(self, \"time_taken\")", "def time_clock(self, timetaken):\n self.runtime = str(timetaken)", "def _get_time_taken(self):\n return self.__time_taken", "def utime(...
[ "0.68541026", "0.68541026", "0.604696", "0.5993175", "0.56026983", "0.55106485", "0.53783166", "0.52987176", "0.5275599", "0.5275599", "0.52738386", "0.52248496", "0.51976144", "0.51447314", "0.5134963", "0.5127316", "0.50827336", "0.50489366", "0.5039824", "0.50394624", "0.5...
0.7732661
0
Getter method for hop_taken, mapped from YANG variable /brocade_mpls_rpc/show_mpls_te_path/output/hop_taken (uint16)
def _get_hop_taken(self): return self.__hop_taken
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_hop_taken(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name=\"hop-taken\", rest_name=\"hop-taken\", parent=self, path_helper...
[ "0.7598698", "0.48589265", "0.48098987", "0.48098987", "0.45419097", "0.43104193", "0.42403197", "0.4216664", "0.42106968", "0.41906384", "0.41680405", "0.41439357", "0.4085608", "0.4063864", "0.4040444", "0.3948588", "0.39463547", "0.39205167", "0.3866411", "0.3863233", "0.3...
0.6195767
1
Setter method for hop_taken, mapped from YANG variable /brocade_mpls_rpc/show_mpls_te_path/output/hop_taken (uint16)
def _set_hop_taken(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="hop-taken", rest_name="hop-taken", parent=self, path_helper=self._path_hel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_hop_taken(self):\n return self.__hop_taken", "def _set_time_taken(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_n...
[ "0.59014827", "0.5428579", "0.4714599", "0.4714599", "0.44799864", "0.4414862", "0.43087447", "0.43055034", "0.42851034", "0.42698094", "0.42380065", "0.418498", "0.40653345", "0.40113392", "0.40032542", "0.398479", "0.39773607", "0.39583087", "0.39524162", "0.39424503", "0.3...
0.8141858
0
Getter method for cost, mapped from YANG variable /brocade_mpls_rpc/show_mpls_te_path/output/cost (uint32)
def _get_cost(self): return self.__cost
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_path_cost(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name=\"path-cost\", rest_name=\"path-cost\", parent=self, path...
[ "0.67872703", "0.66098523", "0.6526303", "0.6495615", "0.6404038", "0.6260626", "0.6117497", "0.6092946", "0.60564685", "0.60564685", "0.60564685", "0.60564685", "0.60524166", "0.5980637", "0.5918299", "0.5918299", "0.5918299", "0.5918299", "0.5913324", "0.5913324", "0.591332...
0.59332836
14
Setter method for cost, mapped from YANG variable /brocade_mpls_rpc/show_mpls_te_path/output/cost (uint32)
def _set_cost(self, v, load=False): if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="cost", rest_name="cost", parent=self, path_helper=self._path_helper, ext...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_path_cost(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name=\"path-cost\", rest_name=\"path-cost\", parent=self, path...
[ "0.7572083", "0.684028", "0.684028", "0.684028", "0.684028", "0.6838596", "0.6838596", "0.6838596", "0.6838596", "0.64126664", "0.6302033", "0.6240639", "0.62242436", "0.60881877", "0.608143", "0.608143", "0.608143", "0.60541785", "0.6038169", "0.6038169", "0.6038169", "0.6...
0.66166544
9
Get and return GitHub Username
def gh_user(cls): return raw_input('GitHub Username: ')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_GitHubUser(self) -> str:\r\n return self.githubUser", "def get_gituser(self, username):\n githubsync = self.githubsync_set.get()\n return Github(githubsync.token, user_agent=\"Open-Initiative/0.1\").get_user(username)", "def get_name(username):\n url = 'https://api.github.com/us...
[ "0.84950024", "0.7952435", "0.77493376", "0.75765675", "0.7441986", "0.72807914", "0.7258975", "0.7258975", "0.7258975", "0.7258975", "0.7258975", "0.7258975", "0.7258975", "0.7258975", "0.7255911", "0.7234983", "0.7200481", "0.7197794", "0.71479374", "0.7147323", "0.7147323"...
0.8289895
1
Return absolute path to the home directory
def home(cls): return os.path.expanduser('~')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def homedir():\r\n return op.expanduser(\"~\")", "def get_home_dir(self):\n\t\ttry:\n\t\t\thome_dir = os.path.expanduser(\"~\")\n\t\texcept Exception as e:\n\t\t\tprint(\"Couldn't get home directory! :(\")\n\t\t\tprint(e)\n\t\t\tsys.exit(1)\n\t\telse:\n\t\t\treturn home_dir", "def getHomeDir():\n return ...
[ "0.8793736", "0.8680327", "0.8547432", "0.8539934", "0.8481545", "0.8325295", "0.81403303", "0.806908", "0.7895169", "0.7753658", "0.77350813", "0.7726023", "0.77186394", "0.7714769", "0.7711299", "0.77110237", "0.7689011", "0.7659874", "0.7615073", "0.75798166", "0.7523263",...
0.8512762
4
The integral of the critic gradient
def loss(advantage, predicted_output): ################################ # YOUR IMPLEMENTATION HERE # ################################ # diffs = K.sum((advantage + predicted_output) - predicted_output, -1) # losses = K.mean(K.square(diffs)) # losses = K.mean(K.sum(K.sq...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _integral(self, i: int, j: int) -> float:\n return sleplet._integration_methods.integrate_region_mesh(\n self.mesh.region,\n self.mesh.vertices,\n self.mesh.faces,\n self.mesh.basis_functions[i],\n self.mesh.basis_functions[j],\n )", "def i...
[ "0.6898079", "0.6749048", "0.6703502", "0.6562909", "0.6520086", "0.63415414", "0.63316643", "0.6275197", "0.6225936", "0.61240566", "0.6121413", "0.6112295", "0.6090336", "0.60739785", "0.60736865", "0.60609376", "0.60587066", "0.6056156", "0.60457855", "0.5986699", "0.59802...
0.0
-1
Builds an LSTM A2C network fitting the environment's state/action spaces.
def build_a2c_networks(env, *_, lr, layer_nodes=[64, 64], time_steps): state_size = env.observation_space.shape[0] nA = env.action_space.n actor = Sequential() actor.add(LSTM(layer_nodes[0]*4,return_sequences = True, input_shape=(time_steps, state_size))) actor.add(Dropout(0.2)) actor.add(LSTM(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network(self):\n\n \"\"\"\n state = Input((self.env_dim*5,))\n action = Input((self.act_dim,))\n output = LSTM(256, dropout=0.1,\n return_sequences=True, stateful=False,\n kernel_initializer='random_normal')(state)\n output = BatchNor...
[ "0.7332351", "0.7237043", "0.66621006", "0.63804114", "0.6304403", "0.62330675", "0.61572105", "0.6102606", "0.60704464", "0.6047545", "0.604733", "0.6034814", "0.602743", "0.6018011", "0.6010806", "0.6005275", "0.60034543", "0.5993607", "0.59679586", "0.59657085", "0.5959363...
0.7468287
0
Return a standardized name (hPa or Pa) for the input pressure units.
def pres_units(units): hpa = ['mb', 'millibar', 'millibars', 'hpa', 'hectopascal', 'hectopascals'] pa = ['pascal', 'pascals', 'pa'] if units.lower() in hpa: return 'hPa' elif units.lower() in pa: return 'Pa' else: raise ValueError('Unknown units ' + units)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unit_of_measurement(self):\n return \"hPa\"", "def pressure_text(value):\n return \"{}pa\".format(value)", "def get_units(name):\r\n from ..prms import Helper\r\n\r\n help = Helper()\r\n\r\n if name in help.prms_parameter_names:\r\n return help.prms_parameter_names[name][\"Uni...
[ "0.69518864", "0.6666996", "0.65808296", "0.6539278", "0.6388959", "0.6331159", "0.63141257", "0.62581396", "0.62246317", "0.6107828", "0.60258496", "0.5940142", "0.59356654", "0.59205776", "0.59205776", "0.5903154", "0.58903015", "0.5815064", "0.58124214", "0.57931864", "0.5...
0.7612201
0
Return the mean of a DataArray along dimension, preserving attributes.
def dim_mean(data, dimname, lower=None, upper=None, minfrac=0.5): def one_variable(var, dimname, dimvals, minfrac): try: axis = get_coord(var, dimname, 'dim') except ValueError: # Dimension isn't in the data variable return var attrs = var.attrs ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mean(self, dim=None, keepdim=False):\n return array_funcs.mean(self, dim, keepdim)", "def mean(data, axis=None, keepdims=False, exclude=False):\n return _make.mean(data, axis, keepdims, exclude)", "def mean(arr):\n return np.mean(arr, axis=0)", "def getMean(self):\r\n\t\treturn np.mean(self.data...
[ "0.79575694", "0.7856288", "0.76279545", "0.7515352", "0.7470971", "0.7463404", "0.74191326", "0.74111", "0.7400824", "0.7395103", "0.7348767", "0.72883934", "0.724989", "0.72175395", "0.70933336", "0.70654535", "0.70504713", "0.70488715", "0.7032951", "0.70249", "0.7013037",...
0.6814022
33
approx_equal(float1, float2[, tol=1e18, rel=1e7]) > True|False approx_equal(obj1, obj2[, args, kwargs]) > True|False Return True if x and y are approximately equal, otherwise False. If x and y are floats, return True if y is within either absolute error tol or relative error rel of x. You can disable either the absolut...
def approx_equal(x, y, *args, **kwargs): ## {{{ http://code.activestate.com/recipes/577124/ (r1) if not (type(x) is type(y) is float): # Skip checking for __approx_equal__ in the common case of two floats. methodname = '__approx_equal__' # Allow the objects to specify what they consider ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def approx_equal(x, y, *args, **kwargs):\n if not (type(x) is type(y) is float):\n # Skip checking for __approx_equal__ in the common case of two floats.\n methodname = '__approx_equal__'\n # Allow the objects to specify what they consider \"approximately equal\",\n # giving preceden...
[ "0.807153", "0.75346935", "0.75331587", "0.73015535", "0.71033525", "0.7087324", "0.69064987", "0.68824667", "0.6815377", "0.6710594", "0.66212696", "0.65738624", "0.6516791", "0.64791584", "0.64261365", "0.6412364", "0.64018065", "0.64002174", "0.6384089", "0.6367304", "0.63...
0.8180621
0
Get predictions for a all networks.
def _predict_all(self, inputs): if len(inputs) != self.num_networks: print('[Error] Number of inputs {} does not match number of ' 'networks {}'.format(len(inputs), self.num_networks)) return False predictions = [] for x, network in zip(inputs, self.networks): prediction...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def train(self,networks):\n return self.predict(networks)", "def train(self,networks):\n return self.predict(networks)", "def predict(self, all_data):\n prediction_list = []\n for i, x in enumerate(all_data):\n prediction_list.append(self.predict_single(x))\n retur...
[ "0.70428", "0.70428", "0.64909637", "0.6386974", "0.636126", "0.6325797", "0.63207906", "0.6301658", "0.6290749", "0.6281448", "0.6191211", "0.6169418", "0.61319214", "0.6097762", "0.6093117", "0.6060824", "0.60601413", "0.60574865", "0.60253423", "0.6019559", "0.5980499", ...
0.75410193
0
Get predictions for a single network.
def _predict_single(self, input, index): if index < 0 or index > len(self.networks): print('[Error] Index {} is not valid'.format(index)) return False return self.networks[index](self.session, input).tolist()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_prediction(self):\n pass", "def get_predictions(self):\n if not prediction_save:\n raise Exception(\"The predictions have not been saved.\")\n else:\n return self.predictions", "def _predict(self):\n\n resource_package = __name__\n resource_path ...
[ "0.70818835", "0.7025065", "0.69648", "0.6913179", "0.6885364", "0.6880766", "0.68336356", "0.6827111", "0.679202", "0.6754007", "0.67413175", "0.6710654", "0.6703142", "0.6694783", "0.66856194", "0.66646177", "0.6619566", "0.66164607", "0.6603069", "0.6598251", "0.658041", ...
0.6200149
77
Resets all networks. Stored fitnesses are set to 0 and all network weights will be initialized again.
def reset(self): self._reset_fitness_for_all() self._reinitialize_all() self.current_step = 0 return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_network(self):\n # Loop through places and reset the network \n for place in self.places.values():\n place.reset()\n # Loop through transitions and reset number of firings\n for t in self.transitions.values():\n t.reset()", "def reset(self):\n\n ...
[ "0.77497226", "0.7716329", "0.76286", "0.7339673", "0.73081315", "0.72971374", "0.7220128", "0.7217339", "0.7124254", "0.697282", "0.6890606", "0.68596125", "0.6857456", "0.6855735", "0.683567", "0.68018335", "0.67947364", "0.6785966", "0.6733964", "0.6719299", "0.6696295", ...
0.6532338
33
dados os valores de x e seus respectivos valores f(x), a funcao faz o ajuste pelo metodo dos minimos quadrados feito a mao e pela solucao do scipy, retornando resultados e tempos
def benchmark(xvalues, yvalues): startPy = time() funcPy = minQuad(xvalues, yvalues, 4) endPy = time() execPy = endPy - startPy startSciPy = time() funcScipy = curve_fit(func, xvalues,yvalues) endSciPy = time() execSciPy = endSciPy - startSciPy return funcPy,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bvp_minimize_function(x):\n # perhaps penalize in try/catch?\n if all([self.intoptions['constraints']=='positive',\n np.any(x < 0)]): return np.ones(3)\n self.bvpint.setInput(x[:-1], cs.INTEGRATOR_X0)\n self.bvpint.setInput(paramset + [x[-1]], cs.IN...
[ "0.65584975", "0.65335804", "0.6505075", "0.63945407", "0.62515885", "0.6210376", "0.6182568", "0.6166365", "0.61522824", "0.60877734", "0.60668576", "0.6033462", "0.5967885", "0.5963477", "0.5960898", "0.59391505", "0.59357035", "0.592672", "0.5867176", "0.5860214", "0.58591...
0.0
-1
Implementing get begin date functionality
def get_begin_date(self, lower_case_d): begin_date = "" self.switch_to_detail_frame() try: if lower_case_d is True: begin_date = self.get_text_from_element(self.begin_date_with_lower_case_d_inputbox_locator, is_a_input_field=True) else: beg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_date(obj):\n return _start_date(obj)", "def start_date(self): \n return self._start_date", "def get_begin_date_text(self):\n begin_date = \"\"\n try:\n begin_date = self.get_text_from_element(self.begin_date_text_locator)\n except:\n pass\n ...
[ "0.73549384", "0.7211743", "0.6901282", "0.6780334", "0.67280424", "0.67057914", "0.6671474", "0.6585234", "0.6553649", "0.6544424", "0.6544424", "0.6544424", "0.6544424", "0.6539152", "0.6536301", "0.65274096", "0.6492789", "0.6454979", "0.6454066", "0.6443806", "0.64192164"...
0.6764064
4
Implementing set begin date functionality
def set_begin_date(self, begin_date, current_date, future_date, previous_date, lower_case_d, num_of_days_to_add): self.switch_to_detail_frame() if begin_date == "": if current_date: begin_date = self.get_date(current_date=True) elif future_date: be...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_date(self, value):\n self._start_date = value", "def start_date(self, start_date):\n self._start_date = start_date", "def start_dt(self):\n pass", "def start(self, date: datetime.datetime):\r\n self.rent_start=date", "def start_date(self, start_date):\n\n self._...
[ "0.7151127", "0.69779944", "0.68723494", "0.6733931", "0.67310214", "0.67310214", "0.67310214", "0.67310214", "0.67310214", "0.67310214", "0.67310214", "0.66327965", "0.6620116", "0.65366983", "0.65050846", "0.64950526", "0.642886", "0.6382754", "0.6362263", "0.6360014", "0.6...
0.73368347
0
Implementing is end date column present functionality
def is_end_date_column_present(self): return self.is_element_present(self.end_date_column_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_end_date(self, value):\n dh = DateHelper()\n if value >= materialized_view_month_start(dh).date() and value <= dh.today.date():\n return value\n error = \"Parameter end_date must be from {} to {}\".format(dh.last_month_start.date(), dh.today.date())\n raise seria...
[ "0.66509175", "0.6640713", "0.64046776", "0.6365478", "0.63646936", "0.6331032", "0.6302082", "0.6302082", "0.6302082", "0.6302082", "0.6302082", "0.6301965", "0.62946296", "0.62261045", "0.6219408", "0.6215965", "0.6215965", "0.6215965", "0.6215965", "0.6215965", "0.6215965"...
0.7492092
0
Implementing is begin date greater than end date warning message shown functionality
def is_begin_date_greater_than_end_date_warning_message_shown(self): return self.is_element_present(self.begin_date_greater_than_end_date_warning_message_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_start_end_date(self):\n if self.date_to and self.date_from:\n if self.date_to < self.date_from:\n raise ValidationError(_('End Date should be greater \\\n than Start Date.'))", "def _check_dates(self):\n sedt = self.start_d...
[ "0.7028146", "0.694482", "0.6734844", "0.6684593", "0.66090846", "0.65722704", "0.6572014", "0.6562932", "0.6560969", "0.6526389", "0.6425524", "0.6400269", "0.63680005", "0.6318086", "0.6278862", "0.6170269", "0.61524165", "0.61367834", "0.61367834", "0.6118129", "0.60899675...
0.7892359
0
Implementing get first row account name functionality
def get_first_row_account_name(self): return self.get_text_from_element(self.first_row_account_name_span_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_second_row_in_account_name(self):\n global in_account_name\n in_account_name = self.get_text_from_element(self.second_row_in_account_name_span_locator)\n return in_account_name", "def get_second_row_account_name(self):\n global report_account_name\n report_account_name ...
[ "0.6917376", "0.67598873", "0.6614222", "0.65650856", "0.6481941", "0.6470235", "0.63899714", "0.63887006", "0.63326204", "0.63249624", "0.6314386", "0.63131225", "0.6312974", "0.62964976", "0.6294075", "0.6282645", "0.62586176", "0.6246363", "0.6210309", "0.6203978", "0.6180...
0.8349446
0
Implementing verify first row exchange rate impact column value functionality
def verify_first_row_exchange_rate_impact_column_value(self): is_verified = False exchange_rate_impact = self.get_text_from_element(self.first_row_exchange_rate_impact_locator) if exchange_rate_impact == "Increase" or exchange_rate_impact == "Decrease" or exchange_rate_impact == "No Change": ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_first_row_actual_rate_change_in_rp_currency_column_value(self):\n is_verified = False\n actual_rate_change_in_rp_currency = self.get_text_from_element(self.first_row_actual_rate_change_in_rp_currency_locator)\n if actual_rate_change_in_rp_currency == \"Increase\" or actual_rate_chan...
[ "0.6716573", "0.5978566", "0.59625334", "0.5851296", "0.5778669", "0.57685286", "0.57673544", "0.5715693", "0.5688573", "0.5679909", "0.56265736", "0.55980533", "0.55916977", "0.5505773", "0.5474763", "0.5406909", "0.5347446", "0.5339039", "0.5322412", "0.5307823", "0.5286624...
0.7611579
0
Applies the Grayscale transform This will return an image with only one color channel
def grayscale(img): return cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) # Or use BGR2GRAY if you read an image with cv2.imread() # return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_gray(self):\n # should be applied on undistorted images\n # converting grayscale \n color_change_spec = 'cv2.COLOR_'+self._colorspec+'2GRAY'\n self._gray = np.asarray([cv2.cvtColor(img, eval(color_change_spec)) for img in self._undistorted])", "def to_grayscale(self):\n ...
[ "0.7300585", "0.71724874", "0.71425533", "0.6967702", "0.6880687", "0.68671525", "0.68504685", "0.6848536", "0.6721721", "0.6708983", "0.66990715", "0.66777635", "0.6639206", "0.6623693", "0.6578747", "0.65692717", "0.6564359", "0.65395314", "0.65273327", "0.65156716", "0.649...
0.0
-1
group conv2d to calculate cross correlation, fast version
def xcorr_fast(x, kernel): batch = kernel.size()[0] pk = kernel.view(-1, x.size()[1], kernel.size()[2], kernel.size()[3]) px = x.view(x.size()[0] // batch, -1, x.size()[2], x.size()[3]) po = F.conv2d(px, pk, groups=batch) po = po.view(-1, 1, po.size()[2], po.size()[3]) return po
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xcorr(self, z, x):\n batch_size_x, channel_x, w_x, h_x = x.shape\n x = torch.reshape(x, (1, batch_size_x * channel_x, w_x, h_x))\n\n # group convolution\n out = F.conv2d(x, z, groups=batch_size_x)\n\n batch_size_out, channel_out, w_out, h_out = out.shape\n xcorr_out = ...
[ "0.6605678", "0.6574228", "0.650071", "0.64270777", "0.63711274", "0.6312816", "0.62773484", "0.627053", "0.6245356", "0.6093257", "0.60770816", "0.60609686", "0.60063076", "0.5969085", "0.59133726", "0.5910879", "0.58539236", "0.58315057", "0.5807061", "0.5805199", "0.578042...
0.6574968
1
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments.
def __init__(self, *args, **kwds): if args or kwds: super(GetGroupStateRequest, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.group_name is None: self.group_name = '' else: self.group_name = ''
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, *args, **kwds):\n if args or kwds:\n super(BasicSafetyMessage, self).__init__(*args, **kwds)\n #message fields cannot be None, assign default values for those that are\n if self.header is None:\n self.header = std_msgs.msg.Header()\n if self.communication_header is ...
[ "0.80609167", "0.8058781", "0.7873343", "0.7873343", "0.7873343", "0.7873343", "0.7603102", "0.7600479", "0.7525326", "0.7501786", "0.7501786", "0.7457768", "0.745011", "0.74440193", "0.74262977", "0.7391193", "0.73554695", "0.7332777", "0.7325416", "0.7318436", "0.7291783", ...
0.6601009
98
serialize message with numpy array types into buffer
def serialize_numpy(self, buff, numpy): try: _x = self.group_name length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) if python3: buff.write(struct.pack('<I%sB'%length, length, *_x)) else: buff.write(struct.pack('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serialize_numpy(self, buff, numpy):\n self.serialize(buff)", "def serialize_numpy(self, buff, numpy):\n try:\n pass\n except struct.error as se: self._check_types(struct.error(\"%s: '%s' when writing '%s'\" % (type(se), str(se), str(locals().get('_x', self)))))\n except TypeError as te: ...
[ "0.79519945", "0.7893365", "0.785495", "0.77772063", "0.7765444", "0.77629846", "0.7758146", "0.7753108", "0.7752819", "0.7736317", "0.7675474", "0.7673923", "0.7667761", "0.7663843", "0.760332", "0.7587286", "0.7566181", "0.75634706", "0.7555974", "0.7554196", "0.7543482", ...
0.7491588
30
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments.
def __init__(self, *args, **kwds): if args or kwds: super(GetGroupStateResponse, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.member is None: self.member = False if self.activated is None: self.activated = Fals...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, *args, **kwds):\n if args or kwds:\n super(BasicSafetyMessage, self).__init__(*args, **kwds)\n #message fields cannot be None, assign default values for those that are\n if self.header is None:\n self.header = std_msgs.msg.Header()\n if self.communication_header is ...
[ "0.8061476", "0.805977", "0.78739434", "0.78739434", "0.78739434", "0.78739434", "0.7602214", "0.7601209", "0.752492", "0.7502104", "0.7502104", "0.745884", "0.74493873", "0.7444202", "0.74263966", "0.7391641", "0.73548776", "0.7332668", "0.73253167", "0.7317944", "0.7290621"...
0.0
-1
serialize message with numpy array types into buffer
def serialize_numpy(self, buff, numpy): try: _x = self buff.write(_struct_5B.pack(_x.member, _x.activated, _x.connected, _x.root, _x.joining)) _x = self.route_uplink length = len(_x) if python3 or type(_x) == unicode: _x = _x.encode('utf-8') length = len(_x) if py...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serialize_numpy(self, buff, numpy):\n self.serialize(buff)", "def serialize_numpy(self, buff, numpy):\n try:\n pass\n except struct.error as se: self._check_types(struct.error(\"%s: '%s' when writing '%s'\" % (type(se), str(se), str(locals().get('_x', self)))))\n except TypeError as te: ...
[ "0.79519945", "0.7893365", "0.785495", "0.77772063", "0.7765444", "0.77629846", "0.7758146", "0.7753108", "0.7752819", "0.7736317", "0.7675474", "0.7673923", "0.7667761", "0.7663843", "0.760332", "0.7587286", "0.7566181", "0.75634706", "0.7555974", "0.7554196", "0.7543482", ...
0.0
-1
receive the current temperature in degree celcius tempearture as float
def temperature(self): t = self._i2c.readfrom_mem(self._addr, 0x0E, 2) return (t[0] + t[1]*256) * 0.0625;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def temperature(self):\n \n self.connection.send(b'T')\n data = self.connection.receive()\n if data is not None:\n return (data[0] - 127) / 2.4 + 25;", "def temperature():\n return float(open('/sys/class/thermal/thermal_zone0/temp','r').read().strip())/1000.0", "def c2...
[ "0.77549446", "0.77325034", "0.76947033", "0.764416", "0.7603499", "0.75365114", "0.75256443", "0.7513744", "0.7484086", "0.74672395", "0.74638194", "0.7453806", "0.74430186", "0.7426482", "0.7378199", "0.73648393", "0.73427796", "0.73384595", "0.7320649", "0.7302916", "0.729...
0.7599314
5
Create and return the ``OptionParser`` which will be used to parse the arguments to this command.
def create_parser(self, prog_name, subcommand): return OptionParser(prog=prog_name, usage=self.usage(subcommand), version = self.get_version(), option_list = self.option_list, conflict_handler = "resolve")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetOptionParser(self):\n parser = optparse.OptionParser(add_help_option=False)\n parser.add_option('-j', '--jobs', dest='parallelism',\n default=1, action='store', type='int')\n parser.add_option('-p', '--precise', dest='precise',\n default=False, action='stor...
[ "0.778278", "0.76339245", "0.7579653", "0.75703436", "0.75348574", "0.7529239", "0.74236417", "0.7398949", "0.73944557", "0.7382797", "0.7376188", "0.736306", "0.7360745", "0.7352807", "0.7345606", "0.7338332", "0.7326651", "0.7324221", "0.73156744", "0.7280091", "0.72701627"...
0.7588769
2
Open a file if not already a filelike object, and strip lines that start with . Returns a new filelike object (StringIO instance).
def filter_file(fileobject: StringOrIO) -> TextIO: if not hasattr(fileobject, "read"): assert isinstance(fileobject, str) with open(fileobject, encoding="utf-8") as f: return filter_file(f) assert not isinstance(fileobject, (str, Traversable)) stream = StringIO() for line ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_lines(f):\n lines = f.read().splitlines()\n lines = [line for line in lines if line.strip()]\n content = '\\n'.join(lines)\n sio = io.StringIO()\n sio.write(content)\n sio.seek(0)\n return sio", "def clean_lines(f):\n lines = f.read().splitlines()\n lines = [line for line in ...
[ "0.71632576", "0.71632576", "0.6746584", "0.6305808", "0.61724156", "0.60448563", "0.5857662", "0.5848304", "0.5830227", "0.56605035", "0.565989", "0.5604819", "0.55996275", "0.55912876", "0.5558779", "0.5540533", "0.55226123", "0.54198056", "0.5408661", "0.54082805", "0.5405...
0.6247665
4
Converts a JSON list to a Python list.
def to_list(self, value): if value is not None: return list(value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Decode_Json_List( data ):\n output = []\n for item in data:\n if isinstance( item , unicode ):\n item = item.encode( 'ascii' )\n elif isinstance( item , list ):\n item = Decode_List( item )\n elif isinstance( item , dict ):\n item = Decode_Dict( item ...
[ "0.7534829", "0.73841614", "0.702956", "0.6967599", "0.6897695", "0.6735111", "0.67181337", "0.67031884", "0.66734284", "0.66607064", "0.6625779", "0.6621877", "0.66007257", "0.65968966", "0.654975", "0.6542791", "0.6535705", "0.65009576", "0.6497008", "0.64967203", "0.646890...
0.0
-1
Converts a JSON integer timestamp to a Python datetime object.
def to_datetime(self, value): if value is not None: return to_datetime(value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_python(self, val):\n return datetime.datetime.fromtimestamp(val)", "def deserialize(self, value):\n timestamp = json.loads(value)\n return datetime.utcfromtimestamp(timestamp).replace(tzinfo=timezone.utc)", "def timestamp_to_datetime(timestamp):\n return datetime.fromtimestamp(ti...
[ "0.7257413", "0.7018671", "0.6970393", "0.6961741", "0.6826599", "0.68195385", "0.66709757", "0.6556204", "0.6545267", "0.65108365", "0.6464225", "0.6443458", "0.6408187", "0.6384175", "0.6377359", "0.63362855", "0.63332146", "0.6323889", "0.630083", "0.6286578", "0.62836474"...
0.0
-1
Converts a JSON integer timestamp to a Python date object.
def to_date(self, value): if value is not None: return to_date(value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def json_date_to_python(json_date):\n return datetime.datetime.strptime(json_date, '%Y-%m-%d').date()", "def from_json(self, value):\n return datetime.strptime(value, \"%m/%d/%Y\")", "def to_python(self, val):\n return datetime.datetime.fromtimestamp(val)", "def _date_parse(self, timesta...
[ "0.72617126", "0.6850854", "0.67109764", "0.651217", "0.63939965", "0.63788956", "0.6349602", "0.6307672", "0.6296344", "0.6160339", "0.61407566", "0.6125634", "0.6122191", "0.60920113", "0.6077886", "0.60735923", "0.60200423", "0.6010328", "0.5970435", "0.5921378", "0.591397...
0.0
-1
Fingerprint for reference structure. Returns kissim.encoding.Fingerprint Fingerprint.
def _fingerprint(self): return self._fingerprints.data[self._reference_structure_id]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fingerprint(self):\n return self._fingerprint", "def fingerprint(self):\n return bip32.fingerprint(self.xpub)", "def fingerprint(self):\n self._fingerprint = None", "def fingerprint(self) -> Optional[str]:\n return pulumi.get(self, \"fingerprint\")", "def fingerprint(self):\...
[ "0.67527175", "0.63180685", "0.6086843", "0.60440046", "0.60021746", "0.5965484", "0.58572793", "0.57971656", "0.56299984", "0.561593", "0.5553979", "0.5542449", "0.5494918", "0.5433045", "0.542516", "0.5375573", "0.5364551", "0.53511417", "0.5346488", "0.5343654", "0.5328318...
0.7898133
0
Set the workflow and call all other functions.
def main(): # read FASTA file(s) and extract filenames, sequences, scaffold names filenames, sequences, scaffolds = read_fasta(args.fasta) # read BED file and create scaffold query list queries = read_bed(args.bed) if args.bed else [] # generate alignments list alignments = [] for scaffold...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def workflow(self, workflow):\n\n self._workflow = workflow", "def workflows():\n pass", "def workflows(self, workflows):\n\n self._workflows = workflows", "def __init__(self, workflow):\n\n # Check if the workflow name is actually a path\n self.wf_ispath = os.path.exists(workf...
[ "0.72801983", "0.70779973", "0.624204", "0.62411964", "0.60531074", "0.6045751", "0.60202557", "0.60139155", "0.59941465", "0.5969522", "0.592763", "0.59094006", "0.5886741", "0.5868727", "0.5786188", "0.57797295", "0.57562566", "0.5740676", "0.5714349", "0.57047", "0.5695673...
0.0
-1
3x3 convolution with padding
def conv3x3(in_planes, out_planes, stride=1): return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conv3x3(in_planes, out_planes, stride=1, padding=1, groups=1, dilation=1, zero_init=False):\n conv = nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=padding, groups=groups, bias=False, dilation=dilation)\n if zero_init:\n conv.weight.data.zero_()\n return conv", "def co...
[ "0.73706514", "0.7335249", "0.7216377", "0.72037584", "0.72037584", "0.7199952", "0.7192902", "0.7183875", "0.7178802", "0.7172082", "0.71645725", "0.71645725", "0.716185", "0.7156602", "0.7156602", "0.7156602", "0.7156602", "0.7156602", "0.7156602", "0.7156602", "0.7156602",...
0.7111188
30
Crea un nuevo slug.
def alta(): # Requerimos que el usuario esté autenticado. if not 'REMOTE_USER' in bottle.request.environ: bottle.abort(401, "Sorry, access denied.") usuario = bottle.request.environ['REMOTE_USER'].decode('utf8') # Data va a contener todo lo que el template # requiere para hacer la página ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_slug(self):\n # Don't overwrite any existing slugs by default.\n if not self.slug:\n self.slug = slugify(self.title)", "def create_unique_slug(sender, instance, created, **kwargs):\n if created:\n instance.slug = slugify(f\"{instance.pk} {instance.name}\")\n ...
[ "0.75982594", "0.75672954", "0.75079435", "0.75079435", "0.75079435", "0.72112554", "0.6943326", "0.69258004", "0.67341846", "0.6545765", "0.647571", "0.64690965", "0.64394534", "0.6438046", "0.6423986", "0.6419812", "0.6401102", "0.639086", "0.6388326", "0.6357106", "0.62725...
0.0
-1
Decorator makes sure URL is accessed over https.
def secure_required(view_func): def _wrapped_view_func(request, *args, **kwargs): if not request.is_secure(): if getattr(settings, 'HTTPS_SUPPORT', True): request_url = request.build_absolute_uri(request.get_full_path()) secure_url = request_url.replace('http://',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_https():\n\tdef condition(client):\n\t\treturn client.request.uri.scheme == u'https'\n\treturn condition", "def ssl_required(f):\n\n @wraps(f)\n def wrapper(*args, **kwargs):\n from flask import current_app as app\n\n if app.config.get(\"SSL\"):\n if request.is_secure:\n ...
[ "0.74746877", "0.724111", "0.6969953", "0.6850603", "0.68306816", "0.65986323", "0.65041465", "0.64391613", "0.63759524", "0.63759524", "0.63759524", "0.63759524", "0.6250014", "0.6240232", "0.6179718", "0.61789465", "0.6178173", "0.6178173", "0.6178144", "0.6177833", "0.6177...
0.6836712
6
Turn 'part,states' to (part, StateTuple(state))
def make_tuple(line): # Node State: CLOUD, DOWN, DRAIN, FAIL, FAILING, FUTURE, UNKNOWN # Partition States: UP, DOWN, DRAIN, INACTIVE item, states = line.split(",") state = states.split("+") state_tuple = StateTuple(state[0], set(state[1:])) return (item, state_tuple)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _CreateStateTuple( self ):\n return ( self.stateIndex, self.assemblyAddr[ 0 ], self.axialValue.subPinIndex )", "def _CreateStateTuple( self ):\n return ()", "def result(self, state, action):\n s = list(state)\n blank = state.index(0)\n s[action], s[blank] = s[blank], s[action]\...
[ "0.6556151", "0.61120784", "0.59561026", "0.59097415", "0.5725116", "0.56447953", "0.55850893", "0.55396104", "0.5525993", "0.5516378", "0.5500252", "0.54994917", "0.54558396", "0.54442376", "0.5389052", "0.53647494", "0.5329663", "0.53105235", "0.53035533", "0.52634317", "0....
0.72064483
0
Save the entire BayesOptimizer object (can be up to a gig in size).
def save(self, temp=False): s = self.sim.name t = time.asctime() d = t[4:7]+t[8:10]+'_'+t[11:16]+'.p' if temp: fname = 'tmp_files/TEMP_'+s+'.p' else: fname = 'experiment_results/'+s+'_'+d # pickle fails when saving BayesOptimizer ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_estimator(self):\n saver = tf.train.Saver()\n # Add the relevant operations and tensors to collection\n tf.add_to_collection('states', self.states)\n tf.add_to_collection('greedy', self.greedy)\n saver.save(self.sess, os.path.join(self.save_path, 'model.ckpt'))", "def ...
[ "0.71689606", "0.71689606", "0.71689606", "0.71689606", "0.71689606", "0.71689606", "0.65276957", "0.6523939", "0.646956", "0.6465628", "0.6453543", "0.6358657", "0.6300432", "0.6278616", "0.6271676", "0.6265632", "0.62421036", "0.62421036", "0.6215075", "0.62125987", "0.6144...
0.6283072
13
Compute softmax values (probabilities from 0 to 1) for each possible label.
def softmax(x): x = x.reshape(-1) e_x = np.exp(x - np.max(x)) return e_x / e_x.sum(axis=0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def softmax():\r\n\r\n\treturn activations.softmax", "def _softmax(x_input):\n x_exp = np.exp(x_input.T - np.max(x_input.T, axis=0))\n return (x_exp / x_exp.sum(axis=0)).T", "def softmax(inputs):\n return np.exp(inputs) / float(sum(np.exp(inputs)))", "def _softmax(self, x: np.ndarray) -> np.ndarray:...
[ "0.70713663", "0.70703274", "0.70506865", "0.69998956", "0.69830513", "0.6961848", "0.69609827", "0.6951485", "0.6927915", "0.6923798", "0.6922116", "0.6921853", "0.6920827", "0.69169915", "0.6915306", "0.6908515", "0.6879728", "0.6877522", "0.6876452", "0.6865455", "0.686383...
0.68209636
35
Remove the record from the database.
def delete(self, commit=True): db.session.delete(self) if commit: self.commit() return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_from_db(self):\n db.session.delete(self)\n db.session.commit()", "def remove(self):\n Log.debug('Removing %s object from database.' % self.__name__)\n cursor = Database.db_connection.cursor()\n table = self.__name__\n sql = \"DELETE FROM \" + table + \"\"\"\n ...
[ "0.7986587", "0.79039675", "0.7800496", "0.76819706", "0.76208484", "0.75360703", "0.74741846", "0.7472961", "0.7441007", "0.7441007", "0.74103063", "0.7352668", "0.73351264", "0.7325083", "0.7325083", "0.7325083", "0.7325083", "0.7325083", "0.7325083", "0.7325083", "0.732508...
0.6602324
69
Returns a template at the /states_list route
def states_list(): states = sorted([v for v in storage.all().values()]) return render_template('7-states_list.html', states=states)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def states_list_route():\n storage.close()\n return (render_template(\"7-states_list.html\",\n states=storage.all(\"State\").values()))", "def states_list():\n return render_template('8-cities_by_states.html', slist=storage.all(\"State\"))", "def states_list():\n state_li...
[ "0.8461848", "0.7914161", "0.7752013", "0.76735955", "0.7623537", "0.7554199", "0.7475335", "0.7364196", "0.70618427", "0.65134794", "0.63702595", "0.6252269", "0.62299466", "0.62150365", "0.6202699", "0.6102859", "0.60686505", "0.60199004", "0.59970474", "0.5911268", "0.5901...
0.7339487
8
Find Smith normal form for Rightlow 2x2 matrix.
def _second(self): self._second_one_loop() A = self._A if A[2, 1] == 0: return True elif A[2, 1] % A[1, 1] == 0: self._second_finalize() self._Ps += self._L self._L = [] return True else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def L_2_norm(matrix):\n return np.linalg.norm(matrix)", "def squareFrobeniusNormOfSparse(M):\n rows, cols = M.nonzero()\n norm = 0\n for i in range(len(rows)):\n norm += M[rows[i],cols[i]] ** 2\n return norm", "def normalize(matrix):\n matrix_nm = np.zeros_like(matrix)\n for i in ra...
[ "0.6584769", "0.6140458", "0.600851", "0.58407867", "0.58182895", "0.58042294", "0.57919747", "0.5683669", "0.5625365", "0.55541855", "0.5523921", "0.5483562", "0.5480094", "0.5458438", "0.5431917", "0.5416937", "0.53984404", "0.53897405", "0.53509337", "0.53451884", "0.53428...
0.0
-1
Set zero at A[2, 1]. This is possible only when A[2,1] is dividable by A[1,1].
def _second_finalize(self): A = self._A L = np.eye(3, dtype="int_") L[2, 1] = -A[2, 1] // A[1, 1] self._L.append(L.copy()) self._A[:] = np.dot(L, self._A)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_zero(self, i, j, a, b, r, s, t):\n L = np.eye(3, dtype=\"int_\")\n L[i, i] = s\n L[i, j] = t\n L[j, i] = -b // r\n L[j, j] = a // r\n self._L.append(L.copy())\n self._A[:] = np.dot(L, self._A)", "def setZeroes(self, matrix: List[List[int]]) -> None:\n ...
[ "0.69789594", "0.619946", "0.61011076", "0.6035703", "0.6028277", "0.60033476", "0.6000291", "0.59995383", "0.5991889", "0.5985874", "0.5985874", "0.5972338", "0.5970703", "0.59675306", "0.59176916", "0.5909999", "0.58642846", "0.5853904", "0.5833055", "0.5826692", "0.5822741...
0.54565
42
Calculate extended greatest commond divisor.
def xgcd(vals): _xgcd = Xgcd(vals) return _xgcd.run()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def greatest_common_divisor(*args):\n args = list(args)\n if len(args) == 1:\n return args[0]\n else:\n temp = gcd(args.pop(), args.pop())\n args.append(temp)\n return greatest_common_divisor(*args)", "def greatest_common_divisor(a, b):\n return (greatest_common_divisor(b,...
[ "0.7272267", "0.70606065", "0.70133257", "0.69582313", "0.6950891", "0.6817488", "0.677352", "0.6730594", "0.6638816", "0.66350186", "0.6613187", "0.6526428", "0.64744204", "0.6457318", "0.6452175", "0.643901", "0.643901", "0.6405988", "0.63740087", "0.6371224", "0.63646555",...
0.0
-1
Returns the Project data for ``Butter``
def butter_data(self): return { '_id': self.uuid, 'name': self.name, 'template': self.template.name, 'data': self.metadata, 'created': self.created, 'modified': self.modified, }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_project_data(self, obj):\n return obj.project_data", "def get_project_data(project_id: int = 409874):\n result = client.projects.get_project(project_id)\n return result[\"data\"]", "def project_info(self):\n try:\n return self._project_info\n except AttributeError:...
[ "0.6805501", "0.61572695", "0.61272514", "0.6102095", "0.60378635", "0.6019162", "0.5959822", "0.59096056", "0.58533883", "0.58426327", "0.5840689", "0.58046097", "0.579401", "0.5750162", "0.5715959", "0.5715118", "0.5679876", "0.5668307", "0.56619", "0.5644885", "0.563111", ...
0.53025043
67
Initialize the attention layer
def __init__(self, attention_size, return_attention=False): super(Attention, self).__init__() self.return_attention = return_attention self.attention_size = attention_size self.attention_vector = Parameter(torch.FloatTensor(attention_size)) torch.nn.init.uniform(self.attention_ve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_up_attention(self, dim):\n self.attention = True\n self.attention_dim = dim\n for i in range(self.max_steps):\n #TODO: maybe change this initialisation - needs researching what's best\n #weight to multiply each input by, different weights for each time step\n ...
[ "0.68460685", "0.6670281", "0.65760756", "0.6486228", "0.6472854", "0.63625085", "0.633494", "0.6303324", "0.63026226", "0.62785715", "0.6266117", "0.62615174", "0.62434363", "0.6238304", "0.6237235", "0.62074935", "0.62065977", "0.61913985", "0.61718386", "0.6156258", "0.614...
0.6509924
3
Apply `rew' to rewrite the temps in this instruction. If `rew' is a dictionary, then it will be used to look up the new mapping of a temporary (if one exists), defaulting to no change if there is no mapping. If `rew' is a function, then every temporary t will be mapped to `rew(t)'.
def rewrite_temps(self, rew): if isinstance(rew, dict): lookup = lambda t: rew.get(t, t) else: lookup = rew if self._istemp(self.dest): self.dest = lookup(self.dest) if self._istemp(self.arg1): self.arg1 = lookup(self.arg1) if self._istemp(self.arg2): self.arg2 = lookup(self.arg2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def register_rewriter(\n self,\n func_name: str,\n backend: str = Backend.DEFAULT.value,\n ir: IR = IR.DEFAULT,\n extra_checkers: Optional[Union[Checker, List[Checker]]] = None,\n **kwargs):\n\n return self._registry.register_object(func_name...
[ "0.48250377", "0.47542197", "0.47288996", "0.45611423", "0.45418534", "0.45000046", "0.44972262", "0.43803805", "0.4366196", "0.43139985", "0.42948836", "0.4281893", "0.42248997", "0.42150655", "0.42090374", "0.4193545", "0.41893196", "0.4186689", "0.4177272", "0.41621488", "...
0.7168536
0
Convert a Python int in range to a 64bit word in two's complement representation
def twoc(x): return x & full_mask
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast_longlong(value):\n value = value & 0xFFFFFFFFFFFFFFFF\n if value & 0x8000000000000000:\n value = ~value + 1 & 0xFFFFFFFFFFFFFFFF\n return -value\n else:\n return value", "def int64_t(n):\n return int(n).to_bytes(8, byteorder='little', signed=True)", "def uint64_t(n):\n...
[ "0.71643746", "0.6899585", "0.6877552", "0.68586534", "0.6771195", "0.66196483", "0.65630937", "0.655346", "0.654331", "0.6532394", "0.6512729", "0.65005004", "0.6464899", "0.6409273", "0.63792825", "0.6365835", "0.63345635", "0.63114285", "0.6270698", "0.62668467", "0.626602...
0.0
-1
Test the server properly handle /taxon resources
def test_route(setup): # create a taxon taxon first_taxon = api.create_resource('/taxon', { 'sp': api.get_random_name(), 'genus_id': setup.genus.id }, user=setup.user) second_taxon = api.create_resource('/taxon', { 'sp': api.get_random_name(), 'genus_id': setup.genus.id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_api_resources(self):\n pass", "def test_get_api_resources(self):\n pass", "def test_get_api_resources(self):\n pass", "def test_serve_roots(self):\n pass", "def test_serve_root_instances(self):\n pass", "def test_virt_links(self):\n resp = self.clien...
[ "0.6270858", "0.6270858", "0.6270858", "0.62576425", "0.62399817", "0.6074904", "0.60111135", "0.60031325", "0.600151", "0.59738916", "0.5972673", "0.59228", "0.5920861", "0.5917515", "0.590461", "0.5882649", "0.58653146", "0.58518094", "0.58349407", "0.58308953", "0.5820974"...
0.70184374
0
Given two sorted lists L and R, return their merge.
def merge(L, R): i = 0 j = 0 answer = [] while i < len(L) and j < len(R): if L[i] < R[j]: answer.append(L[i]) i += 1 else: answer.append(R[j]) j += 1 if i < len(L): answer.extend(L[i:]) if j < len(R): answer.extend(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def merge(l: list, r: list) -> list:\n if len(l) < 1:\n return r\n if len(r) < 1:\n return l\n if l[0] <= r[0]:\n return [l[0]] + merge(l[1:], r)\n return [r[0]] + merge(l, r[1:])", "def merge(l,r,key):\n result = []\n l_ptr = 0\n r_ptr = 0\n while (l_ptr < len(l) or ...
[ "0.8368466", "0.7913439", "0.7763523", "0.7698709", "0.7646828", "0.7482784", "0.7456637", "0.7450289", "0.7409055", "0.73811007", "0.7335227", "0.72828615", "0.7215047", "0.7209028", "0.71932316", "0.7181124", "0.71803224", "0.7177353", "0.717572", "0.7143888", "0.70485276",...
0.83554995
1
Create a heatmap from a numpy array and two lists of labels.
def heatmap(data, row_labels, col_labels, ax=None, cbar_kw={}, cbarlabel="", **kwargs): plt.figure(figsize=(3,len(data[0])*2)) if not ax: ax = plt.gca() # Plot the heatmap #ax.figure(figsize=(3,len(data))) data = np.transpose(data) im = ax.imshow(data, **kwargs) # Crea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def heatmap(data, row_labels, col_labels, ax=None,\r\n cbar_kw={}, cbarlabel=\"\", **kwargs):\r\n\r\n if not ax:\r\n ax = plt.gca()\r\n\r\n # Plot the heatmap\r\n im = ax.imshow(data, **kwargs)\r\n\r\n # We want to show all ticks...\r\n ax.set_xticks(np.arange(data.shape[1]))\r\n ...
[ "0.68181986", "0.6713618", "0.66837937", "0.66761607", "0.66761607", "0.66082054", "0.65200794", "0.6483312", "0.6395992", "0.63565475", "0.6190447", "0.6170368", "0.6020642", "0.5996789", "0.5981317", "0.5900491", "0.5864067", "0.5855121", "0.58276665", "0.581948", "0.580386...
0.64338195
8
Checks if the surrounding cells of a cell are taken
def check_surrounding(self, cell): surr = lambda x, y: [[a, b] for a in range(x-1, x+2) for b in range (y-1, y+2) if (-1 < a < self.__lines and -1 < b < self.__columns and ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __isolated_cell(self, x, y):\n if ((x+1 >= self.n_col) or not (x+1, y) in self.empty) and \\\n ((y+1 >= self.n_row) or not (x, y+1) in self.empty):\n return True\n return False", "def inBounds(self, cell):\n \n if cell[0] < 0 or cell[1] < 0 or cell[0] > self....
[ "0.77247417", "0.72598666", "0.72422975", "0.7200696", "0.71665716", "0.7052039", "0.6979026", "0.6969965", "0.6951049", "0.69280356", "0.6900199", "0.688418", "0.6868023", "0.6820678", "0.67219263", "0.6717739", "0.6706946", "0.6695597", "0.6636851", "0.6570812", "0.6557684"...
0.80300105
0
Accessor for the current profile instance.
def profile(self) -> Profile: return self._profile
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_profile(cls):\n if cls.__profile is None:\n cls.__profile = Profile()\n return cls.__profile", "def getProfile(self):\n return self.get('SOR.profile')", "def instance_profile(self) -> Optional['pulumi_aws.iam.InstanceProfile']:\n return pulumi.get(self, \"instance...
[ "0.7985383", "0.7925469", "0.7662512", "0.7576443", "0.750851", "0.7152728", "0.7127381", "0.7104736", "0.7024122", "0.6912809", "0.6872943", "0.6817802", "0.674606", "0.67304605", "0.6728047", "0.6716492", "0.6716196", "0.6716196", "0.6664352", "0.6606847", "0.6588923", "0...
0.80983883
0
Sell `num` positions from our portfolio. The shares must be already updated with the proper current price, before executing the sell operation. If num is greater than the number of shares, then sell all. If no positions, return 0, 0. If trying to sell more shares than owned, return 0, 0.
def sell(self, num_shares_to_sell, sell_price): num_shares_i_have = self.num_shares() if num_shares_i_have == 0. or num_shares_to_sell > num_shares_i_have: return 0., 0. # if num_shares_i_have == num_shares_to_sell: # return self.sell_all(sell_price) # Sort posit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sell_position(self, position: share, num_shares: float,\n sell_price: float):\n # Get the reference in the actual book, not the selling book.\n position = self.book[self.book.index(position)]\n\n # Adjust how many shares can I sell.\n if num_shares > position.nu...
[ "0.72514355", "0.6194432", "0.6117755", "0.6072181", "0.6035055", "0.5858909", "0.5830695", "0.57229406", "0.5703873", "0.5695773", "0.5596144", "0.5591306", "0.55804044", "0.5560942", "0.55604124", "0.5537815", "0.5526296", "0.5519679", "0.5503587", "0.5493404", "0.54854214"...
0.7412483
0
Sell the number of shares specified from position. If the nr of shares to sell is lower than the nr of shares available, then those are removed from the position. If as a result the position has zero shares, the position is removed If the nr. of shares to sell is greater than the nr of shares available the position is ...
def sell_position(self, position: share, num_shares: float, sell_price: float): # Get the reference in the actual book, not the selling book. position = self.book[self.book.index(position)] # Adjust how many shares can I sell. if num_shares > position.num_: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sell(self, num_shares_to_sell, sell_price):\n num_shares_i_have = self.num_shares()\n if num_shares_i_have == 0. or num_shares_to_sell > num_shares_i_have:\n return 0., 0.\n # if num_shares_i_have == num_shares_to_sell:\n # return self.sell_all(sell_price)\n\n ...
[ "0.6664675", "0.64651686", "0.5908793", "0.5864633", "0.5764831", "0.57138145", "0.5702681", "0.567454", "0.5670855", "0.56248534", "0.5562766", "0.5553618", "0.5444388", "0.54115725", "0.5388069", "0.5388069", "0.53646064", "0.5357356", "0.53217876", "0.53125745", "0.5295902...
0.74282724
0
The name of the Key Vault secret representing the full certificate PFX.
def azure_key_vault_certificate_secret_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "azure_key_vault_certificate_secret_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def key_vault_secret_name(self) -> str:\n return pulumi.get(self, \"key_vault_secret_name\")", "def secret_name(self) -> str:\n return pulumi.get(self, \"secret_name\")", "def secret_name(self) -> str:\n return pulumi.get(self, \"secret_name\")", "def secret_name(self) -> str:\n r...
[ "0.8052698", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7771249", "0.7653024", "0.7347643", "0.7090775", "0.70433295", "0.70433295", "0.6983512", "0.6975652", ...
0.7414655
15
The ID of the Key Vault containing the SSL certificate.
def azure_key_vault_certificate_vault_id(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "azure_key_vault_certificate_vault_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def key_vault_id(self) -> str:\n return pulumi.get(self, \"key_vault_id\")", "def key_vault_id(self) -> str:\n return pulumi.get(self, \"key_vault_id\")", "def certificate_id(self) -> Optional[str]:\n return pulumi.get(self, \"certificate_id\")", "def cert_id(self) -> Optional[str]:\n ...
[ "0.77844423", "0.778324", "0.7509024", "0.7403866", "0.7280797", "0.72579366", "0.71897376", "0.69583523", "0.69583523", "0.6821013", "0.67470217", "0.67415076", "0.6452873", "0.64377654", "0.64377654", "0.6383485", "0.6341691", "0.6317071", "0.6307222", "0.6296232", "0.62939...
0.69993573
7
Is the rule is enabled or disabled? Defaults to `true`.
def enabled(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "enabled")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enabled(self) -> pulumi.Input[bool]:\n return pulumi.get(self, \"enabled\")", "def enabled(self) -> pulumi.Input[bool]:\n return pulumi.get(self, \"enabled\")", "def enabled(self) -> pulumi.Input[bool]:\n return pulumi.get(self, \"enabled\")", "def enabled(self) -> pulumi.Input[bool]...
[ "0.71063024", "0.71063024", "0.71063024", "0.71063024", "0.71063024", "0.71063024", "0.71063024", "0.7039645", "0.7005692", "0.69764805", "0.69764805", "0.69764805", "0.69763553", "0.69763553", "0.6972781", "0.6935464", "0.6935464", "0.6935464", "0.6935464", "0.6935464", "0.6...
0.68171024
78
The rate limit duration in minutes. Defaults to `1`.
def rate_limit_duration_in_minutes(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "rate_limit_duration_in_minutes")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_duration(self):\n return self.config.get('duration', 10)", "def time_limit_in_seconds(self) -> Optional[int]:\n return pulumi.get(self, \"time_limit_in_seconds\")", "def rate_limit_threshold(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"rate_limit_threshold\")",...
[ "0.690484", "0.6589954", "0.6571856", "0.6554559", "0.63507295", "0.63357824", "0.6233046", "0.6223407", "0.62156314", "0.6214564", "0.62106603", "0.61586195", "0.6064928", "0.6048613", "0.6006894", "0.5983833", "0.5983833", "0.5976452", "0.59578824", "0.59577715", "0.594606"...
0.8428554
0
Should the result of the condition be negated.
def negation_condition(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "negation_condition")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def negate_condition(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"negate_condition\")", "def negated(self) -> Optional[bool]:\n return pulumi.get(self, \"negated\")", "def not_(self):\n self.negate = True\n return self", "def neg(context: TreeContext, bool_fu...
[ "0.75697815", "0.73482853", "0.71974736", "0.69968677", "0.68526566", "0.68101203", "0.66833985", "0.66173947", "0.6572114", "0.655488", "0.652144", "0.6509304", "0.65064216", "0.65055275", "0.6494117", "0.6485805", "0.6461189", "0.6451723", "0.64127576", "0.6411727", "0.6392...
0.7344329
2
Specifies the name of the `backend_pool_load_balancing` block within this resource to use for this `Backend Pool`.
def load_balancing_name(self) -> pulumi.Input[str]: return pulumi.get(self, "load_balancing_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_load_balancer(loadBalancerName=None):\n pass", "def __init__(__self__,\n resource_name: str,\n args: LoadBalancerPoolArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...", "def backend_pool_name(self) -> pulumi.Input[str]:\n retu...
[ "0.60476494", "0.58804834", "0.5737362", "0.55820614", "0.5581527", "0.5568482", "0.5556765", "0.5549419", "0.5549419", "0.5549419", "0.55486655", "0.544495", "0.53354365", "0.53275526", "0.5323279", "0.53199774", "0.52781075", "0.52781075", "0.52760524", "0.5265281", "0.5253...
0.69281495
0
Specifies the name of the Backend Pool.
def name(self) -> pulumi.Input[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backend_pool_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"backend_pool_name\")", "def backend_pool_names(self) -> Optional[Sequence[str]]:\n return pulumi.get(self, \"backend_pool_names\")", "def backend(self) -> str:\n return self.__class__.BACKEND_NAME", "def elasti...
[ "0.80591375", "0.66915023", "0.6363781", "0.6238145", "0.6168791", "0.6167884", "0.61374784", "0.6089829", "0.6035182", "0.6011111", "0.6005886", "0.59005034", "0.59005034", "0.58752096", "0.57722837", "0.5719934", "0.56724924", "0.56695056", "0.56655693", "0.5643162", "0.562...
0.0
-1
The ID of the FrontDoor.
def id(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_id(self):\n return 3", "def get_ID(self):\n return self.carla_ID", "def ID(self):\n\t\treturn self._id", "def get_id(self):\n\t\treturn self._id", "def get_id(self):\r\n return self.__id", "def get_id(self):\r\n return self.__id", "def get_id(self):\n return i...
[ "0.7089344", "0.70476687", "0.70402545", "0.70277715", "0.70236456", "0.70236456", "0.70014125", "0.699697", "0.69834554", "0.6968127", "0.6968127", "0.6968127", "0.6968127", "0.6968127", "0.6968127", "0.6968127", "0.6968127", "0.6968127", "0.69555414", "0.69360775", "0.69195...
0.0
-1
The value to use as the host header sent to the backend.
def host_header(self) -> pulumi.Input[str]: return pulumi.get(self, "host_header")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def host(self) -> str:\n return self.headers.get('host')", "def host(self):\n return self.get_header(\"host\")", "def host(self):\n return self.get('host')", "def hostname(self):\n return self._parameters.host", "def host_name(self):\n return self._host_name", "def host...
[ "0.8238232", "0.82328105", "0.76467824", "0.7498087", "0.74005294", "0.74005294", "0.7353827", "0.7351954", "0.7344473", "0.72848606", "0.72625047", "0.7253796", "0.72514784", "0.7231681", "0.7231681", "0.72289795", "0.72258604", "0.72201496", "0.72201496", "0.72172076", "0.7...
0.7701999
2