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
Make a scatter plot of each pair of features
def study_correlation(data: np.array, labels: np.array)->None: n_rows = np.size(data, 0) n_cols = np.size(data, 1) fig, ax = plt.subplots(n_cols, n_cols) for i in range(n_cols): for j in range(n_cols): if i != j: ax[i][j].scatter(data[:,j], data[:,i], c = labels) else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scatterPlot(data_dict, features_list, name=\"image.png\", f1_name=\"feature 1\", f2_name=\"feature 2\"):\n data = featureFormat(data_dict, features_list)\n poi, finance_features = targetFeatureSplit(data)\n for i, p in enumerate(poi):\n non_poi = plt.scatter(finance_features[i][0], finance_feat...
[ "0.7326375", "0.72491765", "0.7218078", "0.7092583", "0.6977761", "0.69051635", "0.6867794", "0.68295604", "0.6779518", "0.6753869", "0.6745397", "0.673456", "0.6669277", "0.66529715", "0.65777224", "0.6543814", "0.64943355", "0.6435228", "0.64345634", "0.6421264", "0.6406161...
0.0
-1
sets the current value of the widget
def set_default_value(self, default_value): self._chb_bool.setChecked(bool(default_value))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_value(self, value):\n if self.notebook:\n self.widget.value = value\n else:\n if hasattr(self.widget, \"setValue\"):\n self.widget.setValue(value)\n elif hasattr(self.widget, \"setCurrentText\"):\n self.widget.setCurrentText(value...
[ "0.7883242", "0.7879992", "0.7800755", "0.7773592", "0.77141327", "0.7594535", "0.75249976", "0.74916637", "0.74769056", "0.7328806", "0.731728", "0.728861", "0.7220398", "0.71889466", "0.7178837", "0.7137731", "0.7073094", "0.7061875", "0.70599294", "0.70363075", "0.7027781"...
0.0
-1
Seek current file to next byte after a delimiter bytestring This seeks the file to the next byte following the delimiter. It does not return anything. Use ``file.tell()`` to see location afterwards.
def seek_delimiter(file, delimiter, blocksize): if file.tell() == 0: return last = b'' while True: current = file.read(blocksize) if not current: return full = last + current try: i = full.index(delimiter) file.seek(file.tell() - ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_delimiter_position(self, byte_data):\n\n # Find line delimiter.\n for delimiter, delimiter_str in ((b\"\\r\\n\", \"\\r\\n\"),\n (b\"\\n\", \"\\n\"),\n (b\"\\r\", \"\\r\")):\n pos = byte_data.find(delim...
[ "0.5966974", "0.58046436", "0.55704606", "0.54566735", "0.54178035", "0.54062945", "0.53535044", "0.5340305", "0.53359973", "0.531412", "0.5304874", "0.528317", "0.52717334", "0.5265855", "0.52260786", "0.5221168", "0.52211565", "0.51817477", "0.51549596", "0.5100815", "0.498...
0.7784415
0
Called when the user specifies an intent for this skill
def on_intent(intent_request, session): print("on_intent requestId=" + intent_request['requestId'] + ", sessionId=" + session['sessionId']) intent = intent_request['intent'] intent_name = intent_request['intent']['name'] # Dispatch to your skill's intent handlers if intent_name == "StartIntent": ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_intent(intent_request, session):\n\n intent = intent_request['intent']\n intent_name = intent_request['intent']['name']\n\n # Dispatch to your skill's intent handlers\n\n if intent_name not in skillmap:\n intent_name = \"NullSkill\"\n\n if intent_name in skillmap:\n try:\n ...
[ "0.7143966", "0.6956116", "0.6949057", "0.6905333", "0.68928874", "0.67641324", "0.6754843", "0.6720773", "0.67161995", "0.6699252", "0.6691263", "0.6670276", "0.6645522", "0.6642719", "0.6638686", "0.6607724", "0.6594981", "0.6575682", "0.6570076", "0.65620786", "0.65609014"...
0.6722764
7
Get the string value of a config item, returning None if the value\ is "None"
def read_config(config, section, item): value = config.get(section, item) if value == "None": return None return value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_config(item: str) -> Union[str, int]:\n file = load_config_file(\"config.json\")\n\n value = file.get(item)\n\n if value is None:\n raise Exception(f\"Your config is out of date! Missing a value for {item}\")\n return value", "def get_item(self, key):\n return self.config[key] i...
[ "0.67985845", "0.6747702", "0.6738554", "0.6655566", "0.6612734", "0.6555997", "0.6535131", "0.6505249", "0.6497613", "0.6485368", "0.6459843", "0.64332193", "0.64330655", "0.6391925", "0.63310325", "0.6320904", "0.6319391", "0.628734", "0.6286437", "0.6280959", "0.62767285",...
0.73921996
0
Get the integer value of a config item, returning None if the value\ is "None"
def read_config_int(config, section, item): value = read_config(config, section, item) if value is None: return value return int(value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _getint(\n parser: configparser.ConfigParser,\n key: str,\n section: str = \"wpwatcher\",\n ) -> int:\n try:\n return parser.getint(section, key)\n except ValueError as err:\n raise ValueError(\n f\"Could not read int value in config fi...
[ "0.7431964", "0.7313776", "0.7288933", "0.71721596", "0.7074228", "0.690416", "0.68237036", "0.680126", "0.67072004", "0.66927516", "0.662101", "0.6606317", "0.6581621", "0.65049773", "0.64954185", "0.6485508", "0.6388351", "0.6381325", "0.6373475", "0.6350135", "0.6325861", ...
0.79471374
0
Generate a unique file name with a given extension in a given folder
def generate_unique_folder_name(folder, filename, extension): new_file_path = os.path.join(folder, "{}{}".format(filename, extension)) count = 2 while os.path.exists(new_file_path): new_file_path = os.path.join( folder, "{}_{}{}".format(filename, count, extension)) count += 1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generateFilename(folder, prefix, ext):\n filename = os.path.basename(os.path.normpath(folder))\n if prefix:\n filename = \"{0}-{1}\".format(prefix, filename)\n path = getIncrementedFilename(os.path.join(folder, filename), ext)\n return path", "def generate_filename(filename: str) -> str:\n...
[ "0.82401055", "0.8172587", "0.8163002", "0.78911734", "0.776703", "0.76928383", "0.7683016", "0.76110697", "0.748056", "0.7458569", "0.7343265", "0.7240057", "0.7235643", "0.7173044", "0.7144841", "0.71235543", "0.71194607", "0.70785904", "0.7068501", "0.706414", "0.70498544"...
0.83766705
0
Compute selfattention. Includes all the data wrangling on the input before attention computation.
def __init__( self, query_dim: int, name: str = "exact", how: str = "basic", cross_attention_dim: int = None, num_heads: int = 8, head_dim: int = 64, dropout: float = 0.0, bias: bool = False, slice_size: int = 4, **kwargs, ) -> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def self_attention(self, hidden):\n mul1 = self.attention1(hidden)\n mul2 = self.attention2(mul1)\n return self.softmax(mul2)", "def self_attention_model(self):\n inputs = self.prepare_inputs()\n \n features = self.prepare_features(inputs)\n support_history_contex...
[ "0.7063808", "0.68290347", "0.66480005", "0.6423792", "0.6329536", "0.63061756", "0.62070477", "0.61862975", "0.6149697", "0.61320645", "0.61175334", "0.6095804", "0.59934425", "0.5922844", "0.5843007", "0.5800211", "0.57910246", "0.5703278", "0.5662401", "0.5630917", "0.5547...
0.0
-1
Singular selfattention block. These can be stacked to form a tranformer block.
def __init__( self, how: str, query_dim: int, name: str = "exact", cross_attention_dim: int = None, num_heads: int = 8, head_dim: int = 64, dropout: float = 0.0, bias: bool = False, slice_size: int = 4, **kwargs, ) -> None: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def self_attention_layer(hparams, prefix):\n return transformer_layers.SelfAttention(\n num_heads=hparams.get(prefix + \"num_heads\"),\n num_memory_heads=hparams.get(prefix + \"num_memory_heads\"),\n key_value_size=hparams.d_kv,\n shared_kv=hparams.get(prefix + \"shared_kv\", False),\n at...
[ "0.6058732", "0.5995703", "0.59923095", "0.5854757", "0.5846478", "0.5801337", "0.55062133", "0.52087206", "0.503198", "0.49266076", "0.48349294", "0.479015", "0.47663292", "0.47548798", "0.4752128", "0.4748688", "0.46960863", "0.46929747", "0.4663664", "0.46499547", "0.46330...
0.4219113
95
Return a random parameter set for the model.
def random(): pars = dict( scale=10**np.random.uniform(1, 3), gamma=np.random.uniform(0, 6), q_0=10**np.random.uniform(-3, -1), ) return pars
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_random_individual():\r\n return [ random.random() for _ in range(PARAMETERS_COUNT) ]", "def get_random_fit_parameters(self):\n all_random = self.par_obj.get_random_all()\n return np.asarray([all_random[p] for p in self.fit_parameters])", "def generate_params(self, randomize=True):\n ...
[ "0.71404666", "0.6880614", "0.68059534", "0.6634644", "0.6539095", "0.63720685", "0.6308819", "0.62558764", "0.62219083", "0.6213681", "0.61988467", "0.6198028", "0.61554956", "0.6154143", "0.61520594", "0.6131589", "0.61241823", "0.6102374", "0.606971", "0.606971", "0.602846...
0.5939913
27
Compute the embeddings of g with a sentence embedding algorithm (average weighted by the word estimated frequencies)
def _get_emb_wavg(g, lang, a=0.001): emb = np.zeros(emb_dims[lang]) known_words_count = 0 words = g.split() for w in words: if w in models[lang]: emb += a / (a + word_freqs[lang][w]) * models[lang][w] known_words_count += 1 emb /= len(w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_embeddings(vectors, text, generate_missing=False, k=300):\r\n embeddings = text.apply(lambda x: get_average_vec(x, vectors, generate_missing=generate_missing, k=k))\r\n return list(embeddings)", "def compute_user_input_embedding(txt, model):\r\n embeddings = []\r\n tokens = txt.split(\" \")\r...
[ "0.7166899", "0.68677586", "0.66370195", "0.6629657", "0.6576097", "0.64722365", "0.6452334", "0.6338862", "0.63319784", "0.63172877", "0.6285265", "0.6279344", "0.6274509", "0.624932", "0.6236681", "0.62097955", "0.6200014", "0.61913866", "0.61293215", "0.6097888", "0.609710...
0.69361633
1
check if 2 grids are equal return boolean value
def grid_equal (grid1, grid2): s=0 for h in range(4): for m in range(4): if grid1[h][m]==grid2[h][m]: s+=1 else: () if s==16: return True else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def grid_equal (grid1, grid2):\r\n if grid1 == grid2:\r\n return True\r\n else:\r\n return False", "def grid_equal (grid1, grid2):\r\n if grid1 == grid2:\r\n return True\r\n return False", "def grid_equal (grid1, grid2):\r\n for i in range (4):\r\n for j in range (4):...
[ "0.8933384", "0.8914656", "0.87099695", "0.8558586", "0.8200414", "0.80762106", "0.79177386", "0.7875002", "0.784008", "0.75213224", "0.7462791", "0.7448489", "0.7448489", "0.74154866", "0.7414818", "0.73950034", "0.7244226", "0.7191573", "0.7164593", "0.7132306", "0.71306413...
0.8585009
3
Generating a random string of a certain length
def random_string(strlen=10): return "".join([random.choice(string.ascii_letters) for _ in range(strlen)])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _generate_random_string(length: int):\n\tall_chars = string.ascii_letters + string.digits\n\treturn ''.join(random.choices(all_chars, k=length))", "def random_string(length=8):\n return \"\".join([random.choice(string.letters + string.digits) for x in range(length)])", "def generate_random_string(length...
[ "0.8629314", "0.8460166", "0.84415084", "0.8422601", "0.8399298", "0.8396366", "0.8358719", "0.8357691", "0.8325175", "0.83042765", "0.83022517", "0.82769215", "0.82764375", "0.82697237", "0.82623994", "0.82453644", "0.82451224", "0.8218574", "0.819958", "0.81819075", "0.8181...
0.7948902
43
Sets the QBPM source
def set_source(self, source): self.qbpm = self.sources[source] self.title = self.qbpm.address self.setWindowTitle(self.title)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_source(self, source):\n self.data['source'] = source", "def _set_source(self, source):\n if source != self._source:\n self._source = source\n self._channel = \"\"\n self._channel_name = \"\"\n self._is_forced_val = True\n self._forced_c...
[ "0.71029407", "0.69254607", "0.67641836", "0.6762444", "0.67098093", "0.67098093", "0.67098093", "0.67098093", "0.67098093", "0.67098093", "0.67098093", "0.6520315", "0.64509386", "0.63291866", "0.6263617", "0.61766976", "0.5899179", "0.5895596", "0.5881952", "0.5879499", "0....
0.7650714
0
Sets all log arrays to a current value.
def reset_logs(self): # reset log arrays try: bc = self.petra.BeamCurrent except: bc = numpy.nan try: pac = self.tserver.read_attribute('PosAndAvgCurr').value except: pac = numpy.array([numpy.nan, numpy.nan, numpy.nan]) serv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear_logging_arr(self):\n self.log_arr = []", "def log_elements(self, log_elements):\n\n self._log_elements = log_elements", "def _wipe_log(self):\n self.temp_log.clear()\n self.temp_log = [[], []] # init a 2D array", "def reset_logger():\n for log in ALL_LEVELS:\n ...
[ "0.6752328", "0.64241666", "0.6055851", "0.5979368", "0.5926505", "0.5659023", "0.5599223", "0.55467343", "0.5533408", "0.5506867", "0.5502828", "0.54892516", "0.5484629", "0.54787904", "0.54655725", "0.5448269", "0.5432319", "0.54243636", "0.5422054", "0.5410817", "0.5402471...
0.706452
0
Generate a timestamp in unix time.
def timestamp(self): return time.time()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unix_timestamp():\n return int(time.time())", "def _create_timestamp():\n return (datetime.utcnow() - datetime(1970,1,1)).total_seconds()", "def _make_timestamp(self):\r\n\t\tlogger.debug(\"Get a timestamp\")\r\n\t\treturn time.mktime(datetime.today().timetuple())", "def getUnixTimeStamp():\n ...
[ "0.84039915", "0.79616773", "0.78908014", "0.78824633", "0.763705", "0.75831497", "0.7578303", "0.7521564", "0.743377", "0.7401188", "0.7394048", "0.73796374", "0.7373691", "0.7341028", "0.7296443", "0.7271982", "0.72546285", "0.7226719", "0.7202087", "0.7163073", "0.7117735"...
0.0
-1
Configure Heatzy API using Home Assistant configuration and fetch all Heatzy devices.
async def async_setup_platform(hass, config, add_devices, discovery_info=None): # retrieve platform config username = config.get(CONF_USERNAME) password = config.get(CONF_PASSWORD) session = aiohttp_client.async_get_clientsession(hass) store = storage.Store(hass, STORAGE_VERSION, STORAGE_KEY) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup(hass, base_config):\n from pyhusmow import API as HUSMOW_API\n\n config = base_config.get(DOMAIN)\n\n if hass.data.get(DOMAIN) is None:\n hass.data[DOMAIN] = { 'devices': [] }\n\n api = HUSMOW_API()\n api.login(config.get(CONF_USERNAME), config.get(CONF_PASSWORD))\n\n robots = ap...
[ "0.62153625", "0.61709046", "0.61675733", "0.6046003", "0.6033546", "0.6017969", "0.60002464", "0.5992273", "0.5990323", "0.5985458", "0.5971451", "0.596242", "0.59595805", "0.5925293", "0.59210336", "0.5850367", "0.5831101", "0.582566", "0.5823615", "0.58009064", "0.5798444"...
0.68286645
0
Return pandas.Series view of a numpy ndarray.
def pandas_series(arr, nan_to_null=False): import pandas as pd return pd.Series(arr, copy=False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def as_series(self, arraylike: Iterable) -> pd.Series:\n return pd.Series(arraylike, index=self.data.index)", "def to_series(self) -> pd.Series:\n df = self.to_dataframe(\"* values *\")\n dims = self.dims_list\n if len(dims) == 1:\n dims = dims[0]\n return df.set_ind...
[ "0.75008994", "0.6564477", "0.6380644", "0.63323957", "0.6261605", "0.6144519", "0.61209697", "0.60778224", "0.59853053", "0.5960021", "0.57288134", "0.5726076", "0.56944275", "0.56930923", "0.5679621", "0.56723833", "0.5619051", "0.560027", "0.55883527", "0.5580834", "0.5561...
0.7094817
1
Return xnd.xnd view of a numpy ndarray.
def xnd_xnd(arr, nan_to_null=False): import numpy as np import xnd xd = xnd.xnd.from_buffer(arr) if nan_to_null and issubclass(arr.dtype.type, (np.floating, np.complexfloating)): isnan = np.isnan(arr) if isnan.any(): raise NotImplementedError...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_x(self):\n return self.x[:self.nump, :]", "def xarray(shape, yx=[0, 0], dtype=int):\n\n y, x = np.indices(shape, dtype)[-2:]\n y -= yx[0]\n x -= yx[1]\n\n return x", "def xvec(self):\n return np.array([self.x, self.y])", "def get_X():\n metadata = get_dataset_metadata(['shape...
[ "0.64285505", "0.6316943", "0.60496306", "0.60137516", "0.5971376", "0.5949019", "0.59254515", "0.5917849", "0.5917849", "0.58760124", "0.5871833", "0.5835483", "0.5809457", "0.57799095", "0.5735253", "0.5714293", "0.5669488", "0.562255", "0.5617021", "0.5584969", "0.5580597"...
0.7452788
0
Add floating IP address info to each load balancer.
def add_floating_ip_info(request, loadbalancers): floating_ips = neutron.tenant_floating_ip_list(request) for lb in loadbalancers: floating_ip = {} associated_ip = next((fip for fip in floating_ips if fip['port_id'] == lb['vip_port_id']), None) if associated...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_host_floating_ips(self):\n\n admin_context = context.get_admin_context()\n try:\n floating_ips = objects.FloatingIPList.get_by_host(admin_context,\n self.host)\n except exception.NotFound:\n return\n\n ...
[ "0.61381817", "0.598348", "0.5813492", "0.57341975", "0.5732378", "0.57311445", "0.5620384", "0.56031364", "0.56030154", "0.55562806", "0.5500934", "0.54350865", "0.5413562", "0.53627616", "0.5329677", "0.5325784", "0.5312544", "0.52665913", "0.52376854", "0.52365977", "0.523...
0.791662
0
Get a specific load balancer.
def get(self, request, loadbalancer_id): conn = get_sdk_connection(request) loadbalancer = conn.load_balancer.find_load_balancer(loadbalancer_id) loadbalancer_dict = _get_sdk_object_dict(loadbalancer) if request.GET.get('full') and neutron.floating_ip_supported(request): add_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_by_name(self, name):\n # type: (str) -> BoundLoadBalancer\n return super(LoadBalancersClient, self).get_by_name(name)", "def get_by_id(self, id):\n # type: (int) -> BoundLoadBalancer\n response = self._client.request(\n url=\"/load_balancers/{load_balancer_id}\".for...
[ "0.7596832", "0.7442695", "0.7356759", "0.7177657", "0.68116236", "0.679781", "0.66738933", "0.66738933", "0.66738933", "0.6588301", "0.65760267", "0.6567069", "0.65401405", "0.65263754", "0.65174973", "0.65174973", "0.6469322", "0.6401889", "0.6350912", "0.6279801", "0.62671...
0.60634357
27
Delete a specific load balancer.
def delete(self, request, loadbalancer_id): conn = get_sdk_connection(request) conn.load_balancer.delete_load_balancer(loadbalancer_id, ignore_missing=True, cascade=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_balancer(self):\n response = self.client.delete_load_balancer(\n LoadBalancerArn=self.get_balancer_arn()\n )\n assert response['ResponseMetadata']['HTTPStatusCode'] == 200", "def delete(self, load_balancer):\n # type: (LoadBalancer) -> BoundAction\n self._...
[ "0.82724464", "0.82108885", "0.8187755", "0.8121004", "0.8085591", "0.7962943", "0.7837547", "0.7503282", "0.7202904", "0.703992", "0.6937303", "0.6915725", "0.6653849", "0.6465005", "0.6410816", "0.64020866", "0.639109", "0.63578004", "0.63545287", "0.62534803", "0.6184379",...
0.82243186
1
List of l7 policies for the current project. The listing result is an object with property "items".
def get(self, request): listener_id = request.GET.get('listenerId') conn = get_sdk_connection(request) l7_policy_list = _sdk_object_to_list(conn.load_balancer.l7_policies( listener_id=listener_id)) return {'items': l7_policy_list}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_policies(self):\n client = self.connect(VAULT_TOKEN)\n return client.list_policies()", "def list_policies(self):\n return self.con.list_policies(\n Scope='Local'\n )", "def policies(self):\n return self._data.get('policies')", "def get_policies():\r\n ...
[ "0.6722187", "0.65311736", "0.6373706", "0.63244754", "0.62876815", "0.6092863", "0.60870045", "0.5978494", "0.5967257", "0.59443367", "0.59313726", "0.59175843", "0.5906889", "0.57505", "0.5695921", "0.5676561", "0.56026983", "0.5592071", "0.55879027", "0.5582659", "0.552007...
0.6377883
2
Get a specific l7 rule.
def get(self, request, l7_rule_id, l7_policy_id): conn = get_sdk_connection(request) l7_rule = conn.load_balancer.find_l7_rule(l7_rule_id, l7_policy_id) return _get_sdk_object_dict(l7_rule)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self, request, l7_policy_id):\n conn = get_sdk_connection(request)\n l7_rule_list = _sdk_object_to_list(conn.load_balancer.l7_rules(\n l7_policy_id))\n return {'items': l7_rule_list}", "def _get_rule(self, rule):\n for kbrule in self.rules:\n if rule == k...
[ "0.6342875", "0.6327162", "0.6327162", "0.6327162", "0.626276", "0.60649276", "0.6019014", "0.586598", "0.57333195", "0.5679398", "0.5677424", "0.5655824", "0.5578348", "0.54845756", "0.5439656", "0.54331386", "0.54331386", "0.54331386", "0.54331386", "0.54331386", "0.5433138...
0.6893091
0
List of flavors for the current project. The listing result is an object with property "items".
def get(self, request): conn = get_sdk_connection(request) flavor_list = _sdk_object_to_list( conn.load_balancer.flavors() ) return {'items': flavor_list}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def flavors(self, **query):\n return self._list(_flavor.Flavor, **query)", "def flavors(self, details=True):\n flv = _flavor.FlavorDetail if details else _flavor.Flavor\n return list(self._list(flv, paginated=True))", "def get_flavors(self):\n url = '%s/flavors/detail' % self.catalo...
[ "0.7929881", "0.7803592", "0.753317", "0.7511129", "0.74612117", "0.7406494", "0.7216703", "0.7184782", "0.7026092", "0.69466203", "0.6821883", "0.67784643", "0.67026675", "0.64647514", "0.634294", "0.6315438", "0.62778443", "0.6210606", "0.61748344", "0.5977018", "0.5964815"...
0.59515756
22
Get a specific flavor profile.
def get(self, request, flavor_profile_id): conn = get_sdk_connection(request) flavor_profile = conn.load_balancer.find_flavor_profile( flavor_profile_id) return _get_sdk_object_dict(flavor_profile)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_flavor(self, flavor):\n return self._get(_flavor.Flavor, flavor)", "def get_flavor(self, flavor):\n return self._get(_flavor.Flavor, flavor)", "def extract_profile(self, profile_name):\r\n for galaxy in self.galaxies:\r\n try:\r\n return galaxy.__dict__[pr...
[ "0.70800406", "0.70800406", "0.6608732", "0.65897906", "0.65892553", "0.6582866", "0.6535673", "0.6515353", "0.6513358", "0.650227", "0.6494548", "0.6455354", "0.64349127", "0.6364045", "0.6280376", "0.62767255", "0.61917675", "0.6031149", "0.6012957", "0.5986818", "0.5954201...
0.73463917
0
Apply weight decay to model but skip normalization layers
def get_params_no_wd_on_norm(model: torch.nn.Module, weight_decay: float): identify_parameters(model, {"no_wd": NORM_TYPES}) return [ {'params': filter(lambda p: not hasattr(p, "no_wd"), model.parameters()), 'weight_decay': weight_decay}, {'params': filter(lambda p: hasattr(p, "no_wd"), model.p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weights_decay(self):\n for param_group in self.optimizer.param_groups:\n for param in param_group['params']:\n param.data = param.data.add(-1.*self.weights_decay * param_group['lr'], param.data)", "def weight_decay(norm=2):\n costs = []\n for var in tf.trainable_variabl...
[ "0.71072173", "0.68164504", "0.6769262", "0.6569943", "0.65347654", "0.6472984", "0.6462484", "0.6434204", "0.63893384", "0.63893384", "0.6361233", "0.6322696", "0.6299259", "0.62983096", "0.6295976", "0.62950975", "0.6277828", "0.62734276", "0.6248075", "0.6245152", "0.62375...
0.6118455
34
Freeze layers Use something like "Optim([p for p in self.parameters() if p.requires_grad])" to be sure.
def freeze_layers(model: torch.nn.Module) -> None: for param in model.parameters(): param.requires_grad = False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def freeze(self):\n # Freeze.\n self.frozen = True\n for param in self.parameters():\n param.requires_grad = False", "def freeze(net):\n for p in net.parameters():\n p.requires_grad_(False)\n return net", "def freeze(self) -> None:\n self._set_requires_grad(F...
[ "0.81244445", "0.7906594", "0.7817452", "0.77810276", "0.77772146", "0.7741114", "0.75260144", "0.74844164", "0.7275591", "0.72513753", "0.72420335", "0.72120607", "0.7188146", "0.7182077", "0.71006244", "0.70756257", "0.6945032", "0.69055736", "0.6816937", "0.67694926", "0.6...
0.7607175
6
Unfreeze layers Use something like "Optim([p for p in self.parameters() if p.requires_grad])" to be sure.
def unfreeze_layers(model: torch.nn.Module) -> None: for param in model.parameters(): param.requires_grad = True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unfreeze(net):\n for p in net.parameters():\n p.requires_grad_(True)\n return net", "def unfreeze(self) -> None:\n self._set_requires_grad(True)", "def __freeze(self):\r\n features_layer = self._model._net\r\n for param in features_layer.parameters():\r\n param....
[ "0.8058317", "0.77148205", "0.75488114", "0.7465948", "0.7341107", "0.73213917", "0.71995574", "0.7171278", "0.7010951", "0.69333744", "0.67284983", "0.66955847", "0.66885394", "0.6636516", "0.65704834", "0.6559106", "0.65190375", "0.6514125", "0.6377716", "0.63764316", "0.63...
0.7979869
1
Decorator to register a function.
def func(self, name=None): def wrapper(fn): if name is not None: _name = name else: _name = fn.__name__ if _name in self._funcs: raise Error("Function already defined: {0}".format(_name)) self._funcs[_name] = fn ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def register(func):\n PLUGINS[func.__name__] = func\n return func", "def register():\n PLUGINS = dict()\n def decorator(func):\n @functools.wraps(func)\n def wrapper(self, *args, **kwargs):\n value = func(*args, **kwargs)\n PLUGINS[func.__na...
[ "0.77684337", "0.77622724", "0.770239", "0.7590892", "0.7471522", "0.73292935", "0.7305722", "0.71508795", "0.7030437", "0.7004087", "0.69368225", "0.69157964", "0.69127834", "0.6910814", "0.6866557", "0.6815186", "0.6791787", "0.67418504", "0.67139775", "0.6705746", "0.66958...
0.65539324
27
Creates a list of Document tuples from all the lines of a file.
def create_document_list(lines_of_file): document = [] documents = [] for line in lines_of_file: document.append(line.rstrip()) # Either a newline of the last line if line == '\n' or line == lines_of_file[-1]: documents.append(create_document(document)) doc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_file(filename):\n\n all_documents = []\n document = []\n with tf.gfile.GFile(filename, \"r\") as reader:\n for line in reader:\n line = line.strip()\n line = tokenization.convert_to_unicode(line)\n line = line.replace(u\"\\u2018\", \"'\").replace(u\"\\u2019\", \"'\")\n sents = sp...
[ "0.67407095", "0.6698694", "0.6641464", "0.6508077", "0.6484047", "0.6472933", "0.6400455", "0.63404316", "0.6309761", "0.62904716", "0.6286486", "0.62785584", "0.6264917", "0.6254483", "0.6235207", "0.6192921", "0.6180794", "0.6166221", "0.6134856", "0.6134638", "0.613246", ...
0.765414
0
Computes the accuracy for the specified values of k
def accuracy(output, target, topk=(1,)): corrrect_ks = correct(output, target, topk) batch_size = target.size(0) return [correct_k.float().mul_(100.0 / batch_size) for correct_k in corrrect_ks]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_accuracy(self, k=None):\n k = 1 if k is None else k\n n_correct = 0\n \n for query, answer in tqdm(zip(self.test_queries, self.results)):\n correct_set = self.correct_answers[query]\n is_correct = False\n for candidate in answer[:k]:\n ...
[ "0.77260184", "0.7489935", "0.7489935", "0.7489935", "0.7247535", "0.72364694", "0.7115022", "0.7100411", "0.70968854", "0.7088704", "0.708722", "0.7086801", "0.7082005", "0.7082005", "0.7077323", "0.70487505", "0.70470345", "0.70419353", "0.70381933", "0.7036596", "0.7030457...
0.70382833
19
Computes the accuracy for the specified values of k
def correct(output, target, topk=(1,)): maxk = max(topk) _, pred = output.topk(maxk, 1, True, True) pred = pred.t() correct = pred.eq(target.view(1, -1).expand_as(pred)) res = [] for k in topk: correct_k = correct[:k].view(-1).sum(0, keepdim=True) res.append(correct_k) return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_accuracy(self, k=None):\n k = 1 if k is None else k\n n_correct = 0\n \n for query, answer in tqdm(zip(self.test_queries, self.results)):\n correct_set = self.correct_answers[query]\n is_correct = False\n for candidate in answer[:k]:\n ...
[ "0.77260184", "0.7489935", "0.7489935", "0.7489935", "0.7247535", "0.72364694", "0.7115022", "0.7100411", "0.70968854", "0.7088704", "0.708722", "0.7086801", "0.7082005", "0.7082005", "0.7077323", "0.70487505", "0.70470345", "0.70419353", "0.70382833", "0.70382833", "0.703819...
0.0
-1
Duration of current playing media in seconds.
def media_duration(self) -> int | None: if self._device.movie.title_length: return self._device.movie.title_length return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def media_duration(self):\n return self._table.active_track_total_time.total_seconds()", "def media_duration(self):\n if (self._playing_localfile or self._playing_spotify or self._slave_mode or self._playing_mediabrowser or self._playing_mass) and self._state != STATE_UNAVAILABLE:\n retu...
[ "0.8430437", "0.83350956", "0.8319396", "0.8277547", "0.8223884", "0.8222846", "0.8074198", "0.7930464", "0.77950245", "0.7728481", "0.76677555", "0.7623571", "0.7617211", "0.7516809", "0.75139743", "0.74583423", "0.74476355", "0.74476355", "0.74476355", "0.74476355", "0.7447...
0.7382464
26
Extract features from a document and returns a dictionary of these features keyed by their abbreviation and document label.
def extract_features(self, doc): features = dict() bow = self.vectorize_doc_simple(doc) charcount = self.char_count(doc) wordcount = self.word_count(doc) sentencecount = self.sentence_count(doc) paragraphcount = self.paragraph_count(doc) # extract characters f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extract_features(document):\n document_words = set(document)\n features = {}\n global word_features\t\n for word in word_features:\n features['contains(%s)' % word] = (word in document_words)\n return features", "def extract(self, document):\n f_num = len(self.feature_list)\n ...
[ "0.7853346", "0.6725468", "0.65909344", "0.6505441", "0.64868176", "0.647813", "0.64510643", "0.6434799", "0.6289131", "0.62880605", "0.624365", "0.6175479", "0.61572194", "0.6059686", "0.60497266", "0.60189444", "0.60106367", "0.59182346", "0.58369625", "0.5827985", "0.57658...
0.7537927
1
Tokenize a document. Keep only words, removing punctuation at the beginning and end of words.
def tokenize_doc_simple(self, doc): tokens = [word.strip(string.punctuation) for word in doc.split()] # remove the empty string return [token for token in tokens if token]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tokenize(document):\n import string\n\n # tokenize the given document\n words = nltk.tokenize.word_tokenize(document)\n words = [word.lower() for word in words]\n\n # filter words from punctuations and stopwords\n loop_words = words.copy()\n for word in loop_words:\n if word in [ch...
[ "0.8227771", "0.8193158", "0.8051627", "0.7967829", "0.7953061", "0.7902189", "0.78303736", "0.76840335", "0.76825297", "0.7679195", "0.7653767", "0.7576863", "0.74793774", "0.7414197", "0.7373444", "0.7307454", "0.729784", "0.729193", "0.72611386", "0.7250653", "0.7248001", ...
0.778516
7
Read a yaml file and return the parsed content.
def read_yaml_file(filepath: str) -> Dict: return yaml.safe_load(read_file(filepath))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_yaml(file):\n with open(file, mode='r') as stream:\n out = yaml.load(stream)\n\n return out", "def load_yaml(file_path):\n with open(file_path) as fin:\n content = yaml.load(fin, Loader=yaml.FullLoader)\n return content", "def read_yaml(yaml_path):\n with open(yaml_path) a...
[ "0.8014979", "0.7949382", "0.77922755", "0.774342", "0.7583202", "0.7482794", "0.7443623", "0.7398513", "0.73887277", "0.7377563", "0.7222817", "0.7197957", "0.71976435", "0.71863604", "0.71715176", "0.71444213", "0.7141516", "0.7065104", "0.7051608", "0.70509076", "0.7035553...
0.72598
10
return every valid neighbors of a current_node in the maze
def neighbors(current_node, maze): UP, DOWN, LEFT, RIGHT = -1, 1, -1, 1 neighbors = [] pos = [(0, UP), (0, DOWN), (LEFT, 0), (RIGHT, 0)] diag = [(LEFT, UP), (RIGHT, DOWN), (LEFT, DOWN), (RIGHT, UP)] if not args.disable_diagonal: pos += diag for new_position in pos: node_position ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_neighbors(current_row, current_col, grid_size):\n neighbors = []\n for row_offset, col_offset in [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1),\n (1, -1), (1, 0), (1, 1)]:\n new_row = current_row + row_offset\n new_col = current_col + col_offset\n ...
[ "0.7035998", "0.6925164", "0.6904916", "0.6853418", "0.68220633", "0.6815321", "0.68057096", "0.67877156", "0.67551005", "0.6739377", "0.67376566", "0.6728888", "0.66979206", "0.66303045", "0.6626632", "0.6601675", "0.6586584", "0.654938", "0.6547735", "0.6547735", "0.6544422...
0.81023574
0
Returns the minimax action using self.depth and self.evaluationFunction
def getAction(self, gameState): "*** YOUR CODE HERE ***" util.raiseNotDefined()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getAction(self, gameState: GameState):\n _max = float(\"-inf\")\n action = None\n for move in gameState.getLegalActions(0):\n util = minimax(self.evaluationFunction, 1, 0,\n gameState.generateSuccessor(0, move), self.depth)\n if util > _max o...
[ "0.7482665", "0.7383559", "0.71806973", "0.7110041", "0.70884514", "0.70694935", "0.70683014", "0.7048308", "0.70055133", "0.69651455", "0.69642085", "0.69604385", "0.6945924", "0.68998593", "0.6895832", "0.688605", "0.6826282", "0.6767276", "0.6758028", "0.6751636", "0.67054...
0.0
-1
Divides the spectrum through by the fs.
def filter_spectrum(spectrum): # avoid division by 0 spectrum.hs[1:] /= spectrum.fs[1:] spectrum.hs[0] = 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_spectrum_cepstrum(self, y, fs):\n # Hay algunos audios que son estereo, se toma un lado\n y = y[:, 0] if y.ndim > self.mono else y\n n = len(y)\n j = int(n / 2)\n y = np.fft.fft(y)\n freq = np.fft.fftfreq(len(y), 1.0 / fs)\n freq = freq[range(j)]\n ...
[ "0.6571094", "0.6275561", "0.6207565", "0.6141873", "0.59809256", "0.59307575", "0.5916026", "0.5749751", "0.56853336", "0.5669645", "0.56214225", "0.5612345", "0.5609088", "0.5586527", "0.5556964", "0.5552352", "0.5520748", "0.55170345", "0.5514901", "0.5493947", "0.5457422"...
0.61427295
3
Define one date in the future.
def future_time(): ten_days_after = datetime.now() + timedelta(days=10) time_format = '%Y-%m-%d %H:%M:%S' return ten_days_after.strftime(time_format)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_future_date(start_date, days=0, months=0, years=0, date_format=app_constant.DATE_FORMAT):\n start_date = _get_date_time(date_time=start_date, datetime_format=date_format)\n return start_date + relativedelta(days=days, months=months, years=years)", "def _check_date_not_in_future(self, date):\n ...
[ "0.65682036", "0.6554335", "0.622335", "0.6184901", "0.60949814", "0.60834247", "0.6056583", "0.5903512", "0.58875835", "0.5861576", "0.58432394", "0.58335775", "0.5824634", "0.5816423", "0.575367", "0.5736773", "0.5723092", "0.56997883", "0.5678214", "0.56462055", "0.564517"...
0.5526946
30
Create and configure an instance of the Flask application.
def create_app(config_name="development"): app = Flask(__name__, instance_relative_config=True) cors = CORS(app, resources={r"/*": {"origins": "*", "methods": ["GET", "HEAD", "POST", "OPTIONS", "PUT", "PATCH", "DELETE"], "expose_headers": "Authorization"}}) app.config.from_mapping( # a default secre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_app():\n\n # 1 Create Flask application\n app = Flask(\n import_name=__name__,\n template_folder=\"templates\",\n static_folder=\"static\"\n )\n\n # 2 Update the apps configuration\n app = config_selector(app)\n register_error_handlers(app)\n\n cache.init_app(app...
[ "0.8524236", "0.8516853", "0.8504485", "0.83319825", "0.82396483", "0.82314265", "0.8200104", "0.81300336", "0.80288595", "0.8026753", "0.8019436", "0.79989535", "0.7984679", "0.7978355", "0.7973289", "0.7970172", "0.7959833", "0.79556865", "0.7952428", "0.7946338", "0.793713...
0.7763739
46
returns artist email if it is unique
def get_artist_email(): artist_email = input('Please enter artist\'s email: ') while controls_utils.artist_email_not_unique(artist_email): print('Artist\'s email must be unique. ') artist_email = input('Please enter artist\'s email: ') return artist_email
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_artist(self):\n artists = FileRecord.query(FileRecord.artist).distinct().filter(\n FileRecord.album == self.name).filter(\n FileRecord.year == self.year).all()\n\n if len(artists) > 1:\n return \"Various Artists\"\n elif len(artists) == 1:\n ...
[ "0.66312927", "0.6207215", "0.61675626", "0.6128956", "0.612181", "0.6059138", "0.6052142", "0.6011615", "0.60024756", "0.59820944", "0.5937926", "0.5915206", "0.58750767", "0.5872202", "0.58694685", "0.5866588", "0.58505774", "0.5826908", "0.58094186", "0.57954603", "0.57947...
0.76967454
0
Normalize a vector (for calculating cosine similarity.
def _normalize(self, x, axis, eps=1e-5): return x / ( tf.sqrt(tf.reduce_sum(tf.square(x), axis=axis, keep_dims=True)) + 1e-5)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize(vector):\n return vector / np.linalg.norm(vector)", "def normalize(v):\n return v / np.linalg.norm(v)", "def normalize(v):\n return np.array(v) / np.linalg.norm(v)", "def normalize_vector(vector):\n v = np.divide(vector, np.linalg.norm(vector))\n return np.round(v, decimals=4...
[ "0.8803346", "0.8468425", "0.8328639", "0.8240705", "0.8160744", "0.81024045", "0.80699617", "0.8045861", "0.802314", "0.7918608", "0.7895016", "0.7883872", "0.77897096", "0.77769303", "0.7729332", "0.77097964", "0.76954436", "0.76358235", "0.7630583", "0.7563585", "0.7552590...
0.0
-1
Return an informal string representation of the object.
def __str__(self): return 'Perspective(%s)' % self.id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n return str(self.__dict__['_obj'])", "def __str__(self):\n return str(self.obj)", "def toString(self) -> str:\n raise NotImplementedError", "def __str__(self):\n return repr(self)", "def __str__(self):\n return str(self.__dict__)", "def __str...
[ "0.80847096", "0.8001744", "0.79144704", "0.7883036", "0.78566706", "0.78566706", "0.78477925", "0.7843149", "0.7843149", "0.7843149", "0.7843149", "0.7843149", "0.7838221", "0.7834304", "0.7831096", "0.7798156", "0.7782031", "0.7761507", "0.77494353", "0.7741063", "0.7724563...
0.0
-1
Return a triangle strip rasterized into a boolean mask. Mask is guaranteed to be identical to the region drawn by gouraud_triangle_strip, which is not necessarily exactly the case for draw_mask() (which uses a slightly different algorithm internally).
def mask_triangle_strip(triangle_strip, shape): triangle_strip = numpy.asarray(triangle_strip, dtype=numpy.float32, order='C') assert triangle_strip.ndim == 2 and triangle_strip.shape[1] == 2 and len(triangle_strip) > 2 num_vertices = len(triangle_strip) out = numpy.zeros(tuple(shape), dtype=bool, order...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gouraud_triangles(triangle_strip, vertex_vals, shape):\n triangle_strip = numpy.asarray(triangle_strip)\n vertex_vals = numpy.asarray(vertex_vals)\n assert triangle_strip.ndim == 2 and triangle_strip.shape[1] == 2 and len(triangle_strip) > 2\n unpack_out = False\n if vertex_vals.ndim == 1:\n ...
[ "0.660964", "0.572978", "0.56846446", "0.56614095", "0.5645633", "0.5615826", "0.56016004", "0.55722696", "0.5571411", "0.5390756", "0.5227696", "0.52020264", "0.5185661", "0.5173398", "0.5168185", "0.51425934", "0.5140048", "0.513411", "0.51229304", "0.5054843", "0.504088", ...
0.77402407
0
Learning Rate Schedule Learning rate is scheduled to be reduced after 80, 120, 160, 180 epochs. Called automatically every epoch as part of callbacks during training. Arguments
def lr_schedule(epoch): lr = 1e-3 return lr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rnn_learning_rate_schedule(dataset):\n model, prefix = make_rnn(non_negative=True)\n # model.set_params(**{prefix + \"val\": 0.1})\n\n # base = no schedule\n print(\"Baseline RNN\")\n # model.set_params(**{prefix + \"history_file\": \"nn_default.csv\"})\n cross_validate(dataset, model)\n #...
[ "0.75243855", "0.7498762", "0.7486336", "0.74821293", "0.7470275", "0.7470275", "0.7470275", "0.7470275", "0.7409489", "0.73660445", "0.73545766", "0.73487324", "0.73358494", "0.72681165", "0.72652465", "0.72286415", "0.72238004", "0.7197262", "0.71913254", "0.7099314", "0.70...
0.70873344
20
returns True if n is a 'bouncy' number.
def bouncy(n): diffs = [int(b)-int(a) for a,b in zip(str(n)[:-1],str(n)[1:])] return sum([abs(x) for x in diffs])>abs(sum(diffs))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Happy(n, b):\r\n n = ToBase(b, n)\r\n seen = set()\r\n while n not in seen:\r\n seen.add(n) \r\n v = 0\r\n while n:\r\n d = n % 10\r\n n = n // 10\r\n v += d * d\r\n n = ToBase(b, v) \r\n if n == 1:\r\n return True\r\n return False", "def i...
[ "0.6266255", "0.5925547", "0.5884278", "0.58818424", "0.5877583", "0.58409125", "0.5840892", "0.58336264", "0.5791553", "0.5779341", "0.57189405", "0.5716756", "0.56896675", "0.56802714", "0.56628543", "0.56577027", "0.5654589", "0.5652041", "0.565071", "0.5629876", "0.561209...
0.71531487
0
Remove words that can't be used in Scrabble, such as those with hyphens and those larger than the size of the board.
def remove_unsuitable_words(words): max_length = Board.SIZE return [word for word in words if word and "-" not in word and len(word) <= max_length]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filterPossibleWords(self): \r\n filledInSpaces = []\r\n for i in range(len(self.currentBoard)):\r\n if self.currentBoard[i] != '_':\r\n filledInSpaces.append( (i, self.currentBoard[i]) )\r\n \r\n self.wordList = list(filter(lambda word: self.viableWor...
[ "0.7085279", "0.6904262", "0.69013506", "0.6823802", "0.6685156", "0.65086526", "0.64731383", "0.6419102", "0.6413617", "0.6413319", "0.64127964", "0.6403451", "0.63925976", "0.6373155", "0.6363011", "0.63588434", "0.63422495", "0.6331452", "0.6307014", "0.62975794", "0.62825...
0.785968
0
Returns whether the word is valid for Scrabble.
def has_word(self, word): return word in self.word_set
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_word(word):\r\n if word in word_master:\r\n valid = True\r\n else:\r\n valid = False\r\n return valid", "def _validate_word(self, word):\n return type(word) == type('a') and set(self._letters) == set(list(word))", "def validate(self, word):\n\n return self.valid_w...
[ "0.7237801", "0.72094524", "0.7141523", "0.7141523", "0.7127949", "0.7076911", "0.6911597", "0.68200195", "0.6792604", "0.6788924", "0.67557687", "0.6748976", "0.67393297", "0.6687153", "0.664011", "0.65905243", "0.6589049", "0.6581067", "0.6578082", "0.65561926", "0.6527474"...
0.5978243
88
Checks to see if market is open today. Uses the pandas_market_calendars package as mcal
def check_market_status(): today_ny = datetime.datetime.now(pytz.timezone('America/New_York')) ndq = mcal.get_calendar('NASDAQ') open_days = ndq.schedule(start_date=today_ny - pd.Timedelta('10 days'), end_date=today_ny) if today_ny.date() in open_days.index: return open_days else: re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_market_status():\n # today = datetime.datetime.now(pytz.timezone('America/New_York')).date()\n today_utc = pd.to_datetime('now').date()\n ndq = mcal.get_calendar('NASDAQ')\n open_days = ndq.schedule(start_date=today_utc - pd.Timedelta('10 days'), end_date=today_utc)\n if today_utc in open_...
[ "0.7844019", "0.7299794", "0.71417683", "0.64564335", "0.62261474", "0.6127471", "0.6050444", "0.596668", "0.57297295", "0.5713947", "0.5685722", "0.5678899", "0.5610287", "0.55595165", "0.54880613", "0.5486532", "0.5417402", "0.540892", "0.53961575", "0.53872633", "0.5376947...
0.7893472
0
Checks to see if market is open today. Uses the pandas_market_calendars package as mcal
def check_market_status(): # today = datetime.datetime.now(pytz.timezone('America/New_York')).date() today_utc = pd.to_datetime('now').date() ndq = mcal.get_calendar('NASDAQ') open_days = ndq.schedule(start_date=today_utc - pd.Timedelta('10 days'), end_date=today_utc) if today_utc in open_days.index...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_market_status():\n today_ny = datetime.datetime.now(pytz.timezone('America/New_York'))\n ndq = mcal.get_calendar('NASDAQ')\n open_days = ndq.schedule(start_date=today_ny - pd.Timedelta('10 days'), end_date=today_ny)\n if today_ny.date() in open_days.index:\n return open_days\n else:...
[ "0.7893472", "0.7299794", "0.71417683", "0.64564335", "0.62261474", "0.6127471", "0.6050444", "0.596668", "0.57297295", "0.5713947", "0.5685722", "0.5678899", "0.5610287", "0.55595165", "0.54880613", "0.5486532", "0.5417402", "0.540892", "0.53961575", "0.53872633", "0.5376947...
0.7844019
1
Reusable testing fixture of an empty queue
def empty_queue(): return Queue()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_can_instantiate_empty_queue(empty_queue):\n assert isinstance(empty_queue, Queue)", "def test_new_queue_is_empty(self):\n queue = Queue_()\n self.assertTrue(queue.empty())\n self.assertEqual(queue.size(), 0)", "def test_is_empty(self):\n queue = Queue()\n self.assertEqual...
[ "0.76867115", "0.76418126", "0.75509125", "0.7411466", "0.7367593", "0.73285353", "0.7225664", "0.7208283", "0.71876943", "0.70914227", "0.7088747", "0.70658374", "0.7015026", "0.7012121", "0.6988108", "0.69504595", "0.6944517", "0.6920395", "0.68839234", "0.68803716", "0.686...
0.6902824
19
Test that the front property is none prior to enqueuing
def test_default_value_of_front(empty_queue): assert empty_queue.front is None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def i_am_at_the_front(self):\n return self is self.queue[0]", "def empty_queue(queue):\n return queue.front is None", "def test_enquque_enqueue_check_first_node_val():\n queue = Queue()\n anode = queue.enqueue('a')\n bnode = queue.enqueue('b')\n assert queue._queue.first_node is anode", ...
[ "0.7659449", "0.7099113", "0.6992859", "0.6959401", "0.69548464", "0.6852271", "0.67845005", "0.67837906", "0.6695713", "0.6672456", "0.6582717", "0.6582628", "0.657398", "0.65670973", "0.656031", "0.6504475", "0.64835936", "0.6478431", "0.6462574", "0.64194036", "0.64177316"...
0.7998886
0
Applies random color mask to given input image.
def random_colour_masks(image: np.array): colours = [ [0, 255, 0], [0, 0, 255], [255, 0, 0], [0, 255, 255], [255, 255, 0], [255, 0, 255], [80, 70, 180], [250, 80, 190], [245, 145, 50], [70, 150, 250], [50, 190, 190], ] r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def apply_mask(im, mask, color=(1, 0, 0)):\n masked = np.zeros(im.shape)\n for x, y in mask: masked[x][y] = color\n return masked", "def addMaskImage(img):\r\n [h, w, c] = img.shape\r\n h_start = np.random.randint(h/2,h-1)\r\n w_start = np.random.randint(w/2, w-1)\r\n img[h_start:h-1, :,0]= ...
[ "0.69744325", "0.68479043", "0.6653597", "0.6587677", "0.653253", "0.644138", "0.6433334", "0.6425598", "0.63975954", "0.6355787", "0.6343776", "0.6325185", "0.63067794", "0.62949806", "0.62843984", "0.62772554", "0.62622845", "0.6229754", "0.62034327", "0.61940217", "0.61221...
0.71775967
0
Saves json formatted data (given as "data") as save_path
def save_json(data, save_path): # type check when save json files class NumpyEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, np.integer): return int(obj) elif isinstance(obj, np.floating): return float(obj) elif is...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save(self, data, outpath):\n with open(path, \"wt\") as open_file:\n json.dump(data, open_file, indent=4)", "def save_json(data: Any, path: Path, **kwargs) -> None:\n with path.open('w', encoding='utf-8') as f:\n json.dump(data, f, **kwargs)", "def save_json(self, data, json_pat...
[ "0.8350723", "0.810539", "0.80899954", "0.80587053", "0.79977053", "0.7936967", "0.7900499", "0.7774422", "0.7683282", "0.7648291", "0.76434964", "0.7640131", "0.7575379", "0.7549546", "0.7540306", "0.75122535", "0.75041455", "0.74606955", "0.74468064", "0.7430145", "0.742535...
0.80796874
3
Saves a dict as yaml file.
def save_yaml(dict_file, yaml_path): with open(yaml_path, "w") as file: documents = yaml.dump(dict_file, file)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save(dikt):\n with open(SAVE_FILE_NAME, 'w') as save_file:\n yaml.safe_dump(dikt, save_file)", "def save_yaml_to_file(i):\n\n import yaml\n\n fn = i['yaml_file']\n d = i['dict']\n\n try:\n # If using just dump and keys are in unicode,\n # pyyaml adds warning and makes prod...
[ "0.82348216", "0.79898936", "0.79564303", "0.7664049", "0.74451005", "0.7425517", "0.7238184", "0.7232736", "0.72081083", "0.7199662", "0.7193838", "0.70849293", "0.7078301", "0.7078301", "0.70539814", "0.7035597", "0.69795805", "0.6960351", "0.69413203", "0.6937528", "0.6903...
0.83138406
0
Takes date such as July 17, 2016 and write it as 7/17/2016
def problem3_4(month, day, year): months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] print(str(months.index(month) + 1) + '/' + str(day) + '/' + str(year)) pass # replace this pass (a do-nothing) statement wi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def date_string(date):\n day = date.day\n month = date.month\n year = date.year\n formatted_string = str(month) + \"/\"\n formatted_string += str(day) + \"/\"\n formatted_string += str(year)\n return formatted_string", "def format_date(self, data):\n return '%s/%s' % (data.month, data...
[ "0.6909023", "0.6763842", "0.67396307", "0.6571736", "0.654792", "0.6516972", "0.6480043", "0.6430749", "0.6418388", "0.63615215", "0.6358372", "0.6338991", "0.63172853", "0.63078296", "0.6228896", "0.6220297", "0.6166231", "0.6139386", "0.61119187", "0.6099875", "0.6098876",...
0.0
-1
Concatenate each sample in samples vertically, along axis 0. Return the resulting array.
def get_concatenated_col(samples): return np.concatenate([sample for sample in samples], axis=0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_concatenated_row(samples):\n return np.concatenate([sample for sample in samples], axis=1)", "def concatonate(data):\n tmp = np.array(data)\n tmp = np.reshape(tmp, (tmp.shape[0] * tmp.shape[1], -1))\n return tmp", "def wrap(self, samples):\n\n rows, cols = samples.shape[:2]\n ...
[ "0.6825311", "0.60100585", "0.5970394", "0.5881012", "0.57274216", "0.5629702", "0.55640787", "0.5547741", "0.55183864", "0.5463207", "0.5458389", "0.5414258", "0.5409394", "0.5360371", "0.5326923", "0.5292973", "0.5278876", "0.5277933", "0.5271905", "0.5263208", "0.52608395"...
0.69898236
0
Get indices for both in and out.
def test_get_group_parameters_in_out(self): # a simple case mconv = MaskConv2d(4, 8, 3) mconv.mask.data.zero_() mconv.mask.data[:8:2, :4:2] = 1 mconv.mask.data[1:8:2, 1:4:2] = 1 G = 2 wg, ind_in, ind_out = get_group_parameters(mconv, G) # this is the cor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mainIndices(self):\n return self.i1, self.i2", "def indices(self):\n i, j, _edge = self.indicesAndEdge()\n return i, j", "def _pair_indices(self):\n indices_src = []\n indices_dst = []\n for i in range(self.walk_len):\n for j in range(max(i - self.l, 0), i):\n indi...
[ "0.71830064", "0.7163642", "0.6850365", "0.6820391", "0.6769883", "0.6667969", "0.6615591", "0.6613186", "0.6566644", "0.65619266", "0.64914614", "0.64861345", "0.6473798", "0.6473602", "0.6456915", "0.6420172", "0.63870794", "0.6321075", "0.62937117", "0.6284025", "0.6264944...
0.0
-1
Calculate $L_{[\alpha]}$ defined in A.4.2
def loglik(alpha,gamma_list,M,k): psi_sum_gamma=np.array(list(map(lambda x: psi(np.sum(x)),gamma_list))).reshape((M,1)) # M*1 psi_gamma=psi(np.array(gamma_list)) # M*k matrix L=M*gammaln(np.sum(alpha)-np.sum(gammaln(alpha)))+np.sum((psi_gamma-psi_sum_gamma)*(alpha.reshape((1,k))-1)) return L
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Schechter_L(L, phi_s, L_s, alpha):\n\treturn phi_s * (L / L_s)**alpha * n.e**(-L / L_s) / L_s", "def schechter(l,alpha):\n return exp(-l)*(l**alpha)", "def L(self) -> float:\n return self._L", "def lam(E):\n return (12398.4/E)*1e-10", "def lam(freq):\n return C / freq", "def lam2E(l):...
[ "0.7002556", "0.6639709", "0.65837806", "0.6575743", "0.64959073", "0.6424821", "0.639708", "0.6372368", "0.61680377", "0.6160679", "0.61485964", "0.6147725", "0.6124117", "0.60756975", "0.6075618", "0.60664946", "0.6062244", "0.6040444", "0.6026329", "0.59982175", "0.5996513...
0.0
-1
Route for about page
def about(): return render_template("about.html")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def about():\n\n return render_template('about_page.html', title='About')", "def about_page(request):\r\n return render(request, 'ez_main/about_page.html')", "def about():\n return render_template('about.html', title='About')", "def about():\r\n return render_template(\"/home/about.html\")", ...
[ "0.7621832", "0.76206046", "0.75473946", "0.7490696", "0.74887675", "0.7482635", "0.7462329", "0.74558496", "0.7434953", "0.7434953", "0.742596", "0.74079967", "0.739474", "0.7373236", "0.7358702", "0.73492396", "0.73404014", "0.7339424", "0.73348397", "0.733223", "0.73315126...
0.71797997
60
Route for portfolio page
def portfolio(): projects = get_projects() for project in projects: unicode_body = project["description"].decode("utf-8") html_body = markdown.markdown(unicode_body) safe_html_body = Markup(html_body) project["description"] = safe_html_body context = { "projects": pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def portfolio_detail():\n return render_template('portfolio/portfolio.html')", "def index():\n user_id = session[\"user_id\"]\n portfolio_table = port(user_id, db)\n \n if not isinstance(portfolio_table, dict): \n return apology(\"Error in portfolio\")\n \n return render_templa...
[ "0.741904", "0.682747", "0.6723062", "0.6384752", "0.61415625", "0.5986398", "0.59322387", "0.5888061", "0.5699231", "0.5657952", "0.5657952", "0.5646889", "0.5646889", "0.5637941", "0.56177706", "0.55944157", "0.55935967", "0.55660856", "0.55186224", "0.5513043", "0.5486756"...
0.57415605
8
Hash a password for storing.
def hash_password(password): secret_key = current_app.config.get('SECRET_KEY') return sha256_crypt.encrypt(password+secret_key)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hash_password(self):\n self.__password = self.str_to_hash(self.__password)", "def hash_password(self, password):\n self.password = pwd_context.encrypt(password)", "def hash_password(self, password):\n self.password_hash = generate_password_hash(password)", "def hash_passwd(password, ...
[ "0.847967", "0.8346137", "0.82644516", "0.80417943", "0.7999399", "0.7979167", "0.7971465", "0.7947968", "0.7919728", "0.78821445", "0.78162515", "0.77411246", "0.766462", "0.76507545", "0.76267356", "0.75862885", "0.75638247", "0.755944", "0.7549114", "0.75445807", "0.751968...
0.77545875
11
Adds a reply to the saved tweet
def add_tweet_reply(tweet_id, user, text): reply = {'user': user, 'text': text} return db.tweets.update( {'id_str': tweet_id}, {'$push': {'replies': reply}}, True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post_reply(self, comment):\n\t\tpass", "def reply_to_tweet():\n\n print('retrieving and replying to tweets...')\n all_mentions = api.mentions_timeline()\n\n # The content of the reply that the bot will send.\n rap_message = ' yo yo yo yo'\n\n for mention in reversed(all_mentions):\n\n #...
[ "0.6981421", "0.6746584", "0.6701164", "0.65988404", "0.6539125", "0.6533228", "0.6533228", "0.65100837", "0.64546037", "0.63149333", "0.61954737", "0.61765563", "0.6176331", "0.6119121", "0.6108011", "0.61018324", "0.6095213", "0.60768723", "0.6070904", "0.60695225", "0.6035...
0.7729473
0
Retrieve the package version from a version file in the package root.
def get_version(version_file='_version.py'): filename = os.path.join(os.path.dirname(__file__), 'mysql', 'toolkit', version_file) with open(filename, 'rb') as fp: return fp.read().decode('utf8').split('=')[1].strip(" \n'")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_package_version():\n file = join(get_root(), 'VERSION')\n\n if exists(file):\n with open(file) as file:\n return file.read()\n\n return ''", "def version(version_file=default_version_file, osp_package=default_osp_package):\n\n if os.path.exists(version_file):\n (vers...
[ "0.82083994", "0.79166496", "0.7905469", "0.78713244", "0.7859571", "0.77846795", "0.7602372", "0.7586115", "0.74854106", "0.7465679", "0.74269176", "0.7425969", "0.73595", "0.73451763", "0.73451763", "0.73243105", "0.7304623", "0.7293676", "0.72596014", "0.72576624", "0.7250...
0.7251652
20
Init weights for layers w.r.t. the original paper.
def init_weights(layer): layer_name = layer.__class__.__name__ if layer_name.find("Conv") != -1: layer.weight.data.normal_(0.0, 0.02) elif layer_name.find("BatchNorm") != -1: layer.weight.data.normal_(1.0, 0.02) layer.bias.data.fill_(0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_weight(self):\n init_layer(self.conv1)\n init_layer(self.conv2)\n init_bn(self.norm1)\n init_bn(self.norm2)", "def init_weights_(self):\n raise NotImplementedError", "def _initialize_weights(self):\n pass", "def InitWeights(self):\n self.w = -1 + 2 * ...
[ "0.82513165", "0.80982757", "0.7947735", "0.7918258", "0.789947", "0.78225183", "0.7789866", "0.77599233", "0.7729536", "0.77148426", "0.7694638", "0.7681479", "0.75926", "0.758782", "0.75208837", "0.75208837", "0.7514062", "0.7504722", "0.745847", "0.7440574", "0.7439219", ...
0.7682653
11
Serialize a dictionary in ASCII format so it can be saved as a JSON.
def serialize_dict(dict_raw): dict_serialized = {} for (key, value) in dict_raw.items(): if isinstance(value, list): dict_serialized[unidecode.unidecode(str(key))] = serialize_list(value) elif isinstance(value, dict): dict_serialized[unidecode.unidecode(str(key))] = seria...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render_dict(dict):\n\t\treturn str.encode(str(dict))", "def json_dump_dict(dictionary):\n\n print(json.dumps(dictionary, indent=4, ensure_ascii=False).encode(\"utf8\").decode())\n\n return", "def _encode_dict(source: dict) -> bytes:\n result_data = b\"d\"\n\n for key, value in source.items():\n...
[ "0.7061157", "0.7013211", "0.69041735", "0.68785775", "0.6877814", "0.6866466", "0.66716117", "0.66401255", "0.657604", "0.6553952", "0.65533924", "0.65360534", "0.65342987", "0.6444075", "0.64398867", "0.64307606", "0.6405841", "0.63786936", "0.63319206", "0.63100606", "0.62...
0.64071923
17
Serialize a dictionary in ASCII format so it can be saved as a JSON.
def serialize_dict(dict_raw): dict_serialized = {} for (key, value) in dict_raw.items(): if isinstance(value, list): dict_serialized[unidecode.unidecode(str(key))] = serialize_list(value) elif isinstance(value, dict): dict_serialized[unidecode.unidecode(str(key))] = seria...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render_dict(dict):\n\t\treturn str.encode(str(dict))", "def json_dump_dict(dictionary):\n\n print(json.dumps(dictionary, indent=4, ensure_ascii=False).encode(\"utf8\").decode())\n\n return", "def _encode_dict(source: dict) -> bytes:\n result_data = b\"d\"\n\n for key, value in source.items():\n...
[ "0.7061157", "0.7013211", "0.69041735", "0.68785775", "0.6877814", "0.6866466", "0.66716117", "0.66401255", "0.657604", "0.6553952", "0.65533924", "0.65360534", "0.65342987", "0.6444075", "0.64398867", "0.64307606", "0.6405841", "0.63786936", "0.63319206", "0.63100606", "0.62...
0.64071923
16
NamespacedSecretValueFromSource represents the source of a secret value specifying the secret namespace
def __init__(__self__, *, key: pulumi.Input[str], name: pulumi.Input[str], namespace: pulumi.Input[str]): pulumi.set(__self__, "key", key) pulumi.set(__self__, "name", name) pulumi.set(__self__, "namespace", namespace)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_read_namespaced_secret_list_secrets(self):\n pass", "def with_secrets(self, kind, source):\n\n if kind == \"vault\" and isinstance(source, list):\n source = {\"project\": self.metadata.project, \"secrets\": source}\n\n self.spec.secret_sources.append({\"kind\": kind, \"so...
[ "0.59473646", "0.5696055", "0.5174699", "0.51217335", "0.50821006", "0.4958822", "0.49460042", "0.4842285", "0.48152435", "0.4800192", "0.47857296", "0.47815993", "0.47815993", "0.4763838", "0.47042915", "0.4678266", "0.4670401", "0.46503252", "0.4626925", "0.4620032", "0.459...
0.0
-1
NamespacedSecretValueFromSource represents the source of a secret value specifying the secret namespace
def secret_key_ref(self) -> Optional[pulumi.Input['KongClusterPluginConfigfromSecretkeyrefArgs']]: return pulumi.get(self, "secret_key_ref")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_read_namespaced_secret_list_secrets(self):\n pass", "def with_secrets(self, kind, source):\n\n if kind == \"vault\" and isinstance(source, list):\n source = {\"project\": self.metadata.project, \"secrets\": source}\n\n self.spec.secret_sources.append({\"kind\": kind, \"so...
[ "0.5949338", "0.5698462", "0.5173703", "0.51239806", "0.5084041", "0.4960605", "0.4948402", "0.48452848", "0.48160204", "0.48015705", "0.47868904", "0.47846815", "0.47846815", "0.4765582", "0.47045544", "0.4679642", "0.4669411", "0.46515924", "0.46274808", "0.46227512", "0.45...
0.0
-1
Compute Avearage Precision by specific points.
def compute_average_precision_with_recall_thresholds(precision, recall, recall_thresholds): average_precision = 0. for t in recall_thresholds: p = np.max(precision[recall >= t]) if np.sum(recall >= t) != 0 else 0 average_precision = average_precision + p / recall_thresholds.size return avera...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_ap(recall, precision):\r\n # correct AP calculation\r\n # first append sentinel values at the end\r\n mrec = np.concatenate(([0.0], recall, [1.0]))\r\n mpre = np.concatenate(([0.0], precision, [0.0]))\r\n\r\n # compute the precision envelope\r\n for i in range(mpre.size - 1, 0, -1):\r...
[ "0.66100794", "0.6577447", "0.65722466", "0.65719897", "0.65719897", "0.655016", "0.6462591", "0.64016", "0.6366907", "0.6323557", "0.6271285", "0.62440175", "0.6242835", "0.62273157", "0.62116534", "0.6123814", "0.61196554", "0.6109983", "0.6104779", "0.6103254", "0.60513586...
0.55497384
51
Utility function to remove the mentions of a tweet
def filter_mentions(text): return re.sub("@\S+", "", text)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_mentions(self, tweet):\n self.mentions = [tag.strip('@') for tag in tweet.split() if tag.startswith('@')]\n\n for mention in self.mentions:\n tweet = tweet.replace('@'+mention, '')\n\n tweet = self.clean_unnecessary_whitespaces(tweet)\n\n return tweet", "def remov...
[ "0.79290164", "0.7508654", "0.7406142", "0.7201672", "0.71950674", "0.7100096", "0.7082122", "0.6989875", "0.682823", "0.669109", "0.6633016", "0.6630143", "0.6630143", "0.6600098", "0.6590049", "0.6569289", "0.65582734", "0.65017426", "0.6500325", "0.64841795", "0.6472505", ...
0.6877281
8
Utility function to remove the hashtags of a tweet
def filter_hashtags(text): return re.sub("#\S+", "", text)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_hashtags(self, tweet):\n self.hashtags = [tag.strip('#') for tag in tweet.split()\n if tag.startswith('#')]\n\n for hashtag in self.hashtags:\n tweet = tweet.replace('#'+hashtag, '')\n\n tweet = self.clean_unnecessary_whitespaces(tweet)\n ret...
[ "0.83352834", "0.82897705", "0.8258624", "0.81216484", "0.8066127", "0.79043067", "0.77698106", "0.7378569", "0.7372086", "0.7284799", "0.7242865", "0.7160358", "0.70418864", "0.7014188", "0.70004624", "0.6944577", "0.6852631", "0.6833698", "0.6810304", "0.6810304", "0.679989...
0.814754
3
Sets the app_id of this SharedSecretsStore.
def app_id(self, app_id): self._app_id = app_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def app_id(self, app_id):\n self._app_id = app_id", "def setAppID(self, appid):\n\t\tself.config.APP_ID = appid", "def application_id(self, application_id):\n\n self._application_id = application_id", "async def slashtagset_appid(self, ctx: commands.Context, id: int = None):\n app_id = i...
[ "0.8030798", "0.7907268", "0.72013015", "0.711682", "0.6553479", "0.65487945", "0.63896734", "0.6226906", "0.6072402", "0.59553057", "0.5932596", "0.58469903", "0.5838617", "0.58236474", "0.5753086", "0.5753086", "0.5690268", "0.5654728", "0.5654728", "0.5654728", "0.55475783...
0.79765457
1
Sets the client_cert of this SharedSecretsStore.
def client_cert(self, client_cert): self._client_cert = client_cert
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def client_x509_cert_url(self, client_x509_cert_url):\n\n self._client_x509_cert_url = client_x509_cert_url", "def client_certificate_id(self, client_certificate_id):\n\n self._client_certificate_id = client_certificate_id", "def client_id(self, client_id):\n\n self._client_id = client_id"...
[ "0.6916911", "0.6538688", "0.6388087", "0.6388087", "0.6388087", "0.6388087", "0.6272879", "0.61620885", "0.6154874", "0.59240377", "0.5855223", "0.5651909", "0.5651909", "0.5648323", "0.5564449", "0.55489093", "0.5483793", "0.5316402", "0.523795", "0.52187634", "0.5173961", ...
0.81401896
0
Sets the name of this SharedSecretsStore.
def name(self, name): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, name):\n self.settings[\"name\"] = name", "def secret_name(self, secret_name: str):\n\n self._secret_name = secret_name", "def shelve_name(self, name):\n self._shelve_name = name", "def set_name(self, name):\n self._name = name", "def set_name(self, name: str)...
[ "0.73212576", "0.71116155", "0.6988818", "0.6972575", "0.6960363", "0.6937334", "0.691553", "0.69111425", "0.69111425", "0.69111425", "0.69111425", "0.69111425", "0.69111425", "0.69111425", "0.69104666", "0.69104666", "0.69104666", "0.69104666", "0.69043744", "0.68998176", "0...
0.6839273
70
Sets the type of this SharedSecretsStore.
def type(self, type): self._type = type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self._type = type", "def store_type(self, store_type):\n self._store_type = store_type\n return self", "def type(self, type: str):\n\n self._...
[ "0.69865614", "0.69865614", "0.6970417", "0.6913803", "0.68001395", "0.66712594", "0.66691405", "0.66691405", "0.6597078", "0.6597078", "0.64600086", "0.6454499", "0.6168693", "0.6141458", "0.61176693", "0.61176693", "0.6116815", "0.6116815", "0.6116815", "0.6110614", "0.6095...
0.65563184
21
Sets the url of this SharedSecretsStore.
def url(self, url): self._url = url
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_url(self, url):\n self.data['url'] = url", "def set_url(self, url):\n self.url = url", "def url(self, url: str):\n self._url = url", "def store_url(self, store_url):\n\n self._store_url = store_url", "def url(self, url: str):\n\n self._url = url", "def url(self,...
[ "0.70520306", "0.70318425", "0.69399863", "0.6880719", "0.6862457", "0.6862457", "0.6862457", "0.6843707", "0.6843637", "0.65952307", "0.6276108", "0.6260229", "0.6252505", "0.61756766", "0.6124769", "0.6035442", "0.6019111", "0.6013907", "0.6000633", "0.5908933", "0.5842441"...
0.6770199
12
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, SharedSecretsStore): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, SharedSecretsStore): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Creates plot with images. Where rows are used for the same class image. And columns for their type (result, prediction, original)
def plot_images_compare(data: Dict[str, List[np.ndarray]]): keys = list(data.keys()) values_from_dict = data[keys[0]] image_side_length = int( np.sqrt(values_from_dict[0].shape[0]) ) original_image_size = (image_side_length, image_side_length) fig, axs = plt.subplots(len(values_from_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_images(images, labels, nrows, ncols, cls_true=None, cls_pred=None, grey=False):\n fig, axes = plt.subplots(nrows, ncols, figsize=(16, 2*nrows))\n\n for i, ax in enumerate(axes.flat): \n if grey:\n ax.imshow(images[i,:,:,0], cmap='binary')\n else:\...
[ "0.7649335", "0.735037", "0.72868603", "0.7196872", "0.7194054", "0.7137262", "0.703004", "0.7000643", "0.6995581", "0.69252497", "0.6898943", "0.67749876", "0.67674804", "0.67645246", "0.676132", "0.6727807", "0.67059255", "0.664461", "0.66353214", "0.66317147", "0.65761757"...
0.61709094
69
Returns a hash of attributes which have changed from the old_version to the new_version. Restricts the attributes compared to the list of interesting_attrs passed in.
def changed_attrs(old_version, new_version, interesting_attrs): # Use an OrderedDict so that we preserve the order from interesting_attrs changed = OrderedDict() for attr in interesting_attrs: if attr in old_version and attr not in new_version: changed[attr] = [old_version[attr], None] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def changed_attrs_by_version(model, interesting_attrs):\n changed = OrderedDict()\n history = reversion.get_for_object(model).order_by(\"revision__date_created\")\n for index, version in enumerate(history):\n # We're only interested in changes\n if index > 0:\n try:\n ...
[ "0.7093283", "0.63105875", "0.62489676", "0.61689854", "0.6082315", "0.60821235", "0.60707515", "0.5973482", "0.5956527", "0.5847145", "0.57240915", "0.5629343", "0.5622167", "0.5589115", "0.5551084", "0.55124044", "0.55024457", "0.5489399", "0.54752064", "0.5451373", "0.5446...
0.84187317
0
String for representing the Model object.
def __str__(self): return self.title+","+str(self.pubDate)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n return super().__str__() + self.model.__str__()", "def __str__(self):\n return \"DataModel(name={},attributes={},description={})\".format(\n self.name, {a.name: str(a) for a in self.attributes}, self.description\n )", "def __str__(self):\n \n res =...
[ "0.82368803", "0.79901737", "0.7849152", "0.78468513", "0.77520275", "0.7625378", "0.7625378", "0.76225406", "0.76225406", "0.75483394", "0.7522958", "0.7470355", "0.7469358", "0.7447144", "0.7447144", "0.74314755", "0.7427648", "0.7389925", "0.7351721", "0.73424315", "0.7322...
0.0
-1
Returns a string value for a config variable, or None if not set.
def GetString(self, variable): if self.Sets(variable): return self.variables[variable.upper().strip()]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cfg_var(interp, var):\n w_value = interp.config.get_ini_w(var)\n if w_value is None:\n return interp.space.w_False\n return w_value", "def get_config_var(name):\n return get_config_vars().get(name)", "def getvar(self, varname):\n try:\n val = self.get(MAIN_SECTION, varname)\n...
[ "0.7182849", "0.70875996", "0.6717473", "0.6669555", "0.6665964", "0.6635166", "0.6518067", "0.65158284", "0.6501173", "0.64894617", "0.64217395", "0.64074254", "0.6387465", "0.63096094", "0.6267826", "0.6263532", "0.62586856", "0.625052", "0.6237317", "0.62276757", "0.621502...
0.5959438
43
Returns true when the argument variable exists in the environment.
def Sets(self, variable): return variable and variable.upper().strip() in self.variables
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def f_exists(self, varname):\r\n return (varname in self.locals_ptr)", "def exists(_env):\n return True", "def exists(_env):\n return True", "def is_variable_argument(argument):\n return argument.startswith('$')", "def __contains__(self, arg):\n # All arguments should have a default ...
[ "0.70682716", "0.6971023", "0.6971023", "0.67672014", "0.669797", "0.6645906", "0.64890975", "0.6474025", "0.6400325", "0.638707", "0.6369442", "0.6353606", "0.63420814", "0.62766147", "0.62375486", "0.60980934", "0.6093553", "0.6081184", "0.6072323", "0.6056279", "0.6051318"...
0.5517185
78
Initialize test instance of Experiment.
def setUpClass(cls): with patch('builtins.input', side_effect=['yes', 12]): experiment = Experiment(cls.experiment_path) cls.experiment = experiment
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def experiment_init(self):\n pass", "def test_init(self):\n ex = Experiment(note=\"Test\")\n self.assertEqual(ex.note, \"Test\")", "def experiment_init(self):\n raise NotImplementedError(\"this needs to be implemented!\")", "def experiments_init(self):\n pass", "def testI...
[ "0.8037063", "0.7854648", "0.7742019", "0.75038755", "0.7142286", "0.7097471", "0.70263934", "0.6920931", "0.687136", "0.67655665", "0.6673125", "0.6617886", "0.65934014", "0.65845007", "0.65828156", "0.65226084", "0.6496784", "0.6473188", "0.64485556", "0.6413083", "0.639458...
0.7030414
6
Close the connection to the target service
def close(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __close_conn(self, target_host_socket):\n self.__client.close()\n target_host_socket.close()\n logging.info(\"Client <> Target closed\")", "def close(self):\n # PEP 249\n rpc.close_service(self.service)", "def close(self):\n self._fuzz_data_logger.log_info('Closing...
[ "0.7467594", "0.7347478", "0.72398525", "0.7159583", "0.71161234", "0.7093461", "0.70887727", "0.70562834", "0.7048429", "0.7014073", "0.69654804", "0.6948941", "0.69411314", "0.6928845", "0.6926914", "0.6926892", "0.69196796", "0.6909735", "0.6899867", "0.6899867", "0.687879...
0.0
-1
Gets the org_osgi_service_http_port of this OrgApacheFelixHttpProperties.
def org_osgi_service_http_port(self) -> ConfigNodePropertyInteger: return self._org_osgi_service_http_port
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_osgi_service_http_port(self, org_osgi_service_http_port: ConfigNodePropertyInteger):\n\n self._org_osgi_service_http_port = org_osgi_service_http_port", "def org_osgi_service_http_port_secure(self) -> ConfigNodePropertyInteger:\n return self._org_osgi_service_http_port_secure", "def http_...
[ "0.7790098", "0.7288815", "0.7039664", "0.67900485", "0.6491036", "0.60745955", "0.60351413", "0.59992224", "0.59904534", "0.59720314", "0.5818158", "0.58160275", "0.5801879", "0.5762016", "0.574524", "0.5720933", "0.57059526", "0.5704483", "0.56686753", "0.56686753", "0.5668...
0.8615427
0
Gets the org_apache_felix_https_enable of this OrgApacheFelixHttpProperties.
def org_apache_felix_https_enable(self) -> ConfigNodePropertyBoolean: return self._org_apache_felix_https_enable
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_https_enable(self, org_apache_felix_https_enable: ConfigNodePropertyBoolean):\n\n self._org_apache_felix_https_enable = org_apache_felix_https_enable", "def org_apache_felix_http_enable(self) -> ConfigNodePropertyBoolean:\n return self._org_apache_felix_http_enable", "def ssl...
[ "0.7603655", "0.75992036", "0.71969306", "0.6964928", "0.6936268", "0.65614307", "0.6375908", "0.6164546", "0.61568934", "0.6152722", "0.61299866", "0.6089969", "0.6079245", "0.601473", "0.601473", "0.601473", "0.59988993", "0.59673375", "0.59638715", "0.5962215", "0.5954415"...
0.85261726
0
Sets the org_apache_felix_https_enable of this OrgApacheFelixHttpProperties.
def org_apache_felix_https_enable(self, org_apache_felix_https_enable: ConfigNodePropertyBoolean): self._org_apache_felix_https_enable = org_apache_felix_https_enable
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_https_enable(self) -> ConfigNodePropertyBoolean:\n return self._org_apache_felix_https_enable", "def org_apache_felix_http_enable(self, org_apache_felix_http_enable: ConfigNodePropertyBoolean):\n\n self._org_apache_felix_http_enable = org_apache_felix_http_enable", "def org_a...
[ "0.8136003", "0.76533747", "0.71942407", "0.660614", "0.641866", "0.6278179", "0.6207656", "0.5907832", "0.5796303", "0.5711775", "0.5693404", "0.5615877", "0.55515367", "0.5484993", "0.54585", "0.5448439", "0.54113436", "0.5392003", "0.5331021", "0.5329439", "0.53120404", ...
0.8648538
0
Gets the org_osgi_service_http_port_secure of this OrgApacheFelixHttpProperties.
def org_osgi_service_http_port_secure(self) -> ConfigNodePropertyInteger: return self._org_osgi_service_http_port_secure
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_osgi_service_http_port_secure(self, org_osgi_service_http_port_secure: ConfigNodePropertyInteger):\n\n self._org_osgi_service_http_port_secure = org_osgi_service_http_port_secure", "def org_osgi_service_http_port(self) -> ConfigNodePropertyInteger:\n return self._org_osgi_service_http_port"...
[ "0.8041079", "0.73605776", "0.6599958", "0.6271645", "0.5999975", "0.5816937", "0.5653822", "0.548991", "0.538606", "0.533217", "0.52493024", "0.5232341", "0.5231198", "0.51890486", "0.5150243", "0.51197034", "0.5117032", "0.51090634", "0.51061124", "0.50903594", "0.5063207",...
0.87491316
0
Sets the org_apache_felix_https_keystore of this OrgApacheFelixHttpProperties.
def org_apache_felix_https_keystore(self, org_apache_felix_https_keystore: ConfigNodePropertyString): self._org_apache_felix_https_keystore = org_apache_felix_https_keystore
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_https_keystore_password(self, org_apache_felix_https_keystore_password: ConfigNodePropertyString):\n\n self._org_apache_felix_https_keystore_password = org_apache_felix_https_keystore_password", "def org_apache_felix_https_keystore(self) -> ConfigNodePropertyString:\n return se...
[ "0.7405001", "0.73176366", "0.71479774", "0.6775409", "0.6479913", "0.6442294", "0.64015", "0.6395185", "0.61719656", "0.6078306", "0.5978191", "0.5883635", "0.5568888", "0.5498542", "0.54875296", "0.5455014", "0.5426308", "0.5398574", "0.52989024", "0.52585626", "0.5252955",...
0.87118006
0
Gets the org_apache_felix_https_keystore_password of this OrgApacheFelixHttpProperties.
def org_apache_felix_https_keystore_password(self) -> ConfigNodePropertyString: return self._org_apache_felix_https_keystore_password
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_https_keystore_key_password(self) -> ConfigNodePropertyString:\n return self._org_apache_felix_https_keystore_key_password", "def org_apache_felix_https_keystore(self) -> ConfigNodePropertyString:\n return self._org_apache_felix_https_keystore", "def org_apache_felix_https_tr...
[ "0.8432024", "0.76437056", "0.7640304", "0.7439353", "0.74166167", "0.6717892", "0.6566634", "0.6566634", "0.6566634", "0.6566634", "0.6566634", "0.6363457", "0.6363457", "0.62986064", "0.6176542", "0.6176542", "0.6176542", "0.61742383", "0.61737776", "0.61724514", "0.6039477...
0.8565362
0
Sets the org_apache_felix_https_keystore_password of this OrgApacheFelixHttpProperties.
def org_apache_felix_https_keystore_password(self, org_apache_felix_https_keystore_password: ConfigNodePropertyString): self._org_apache_felix_https_keystore_password = org_apache_felix_https_keystore_password
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_https_keystore_key_password(self, org_apache_felix_https_keystore_key_password: ConfigNodePropertyString):\n\n self._org_apache_felix_https_keystore_key_password = org_apache_felix_https_keystore_key_password", "def org_apache_felix_https_truststore_password(self, org_apache_felix_htt...
[ "0.84450406", "0.7953192", "0.77732706", "0.77033174", "0.7521615", "0.69492775", "0.66947025", "0.62231314", "0.61650646", "0.5896635", "0.58570546", "0.5851839", "0.5844085", "0.58408326", "0.57956064", "0.57908815", "0.5745984", "0.5738571", "0.56980807", "0.568943", "0.56...
0.8701457
0
Gets the org_apache_felix_https_keystore_key_password of this OrgApacheFelixHttpProperties.
def org_apache_felix_https_keystore_key_password(self) -> ConfigNodePropertyString: return self._org_apache_felix_https_keystore_key_password
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_https_keystore_password(self) -> ConfigNodePropertyString:\n return self._org_apache_felix_https_keystore_password", "def org_apache_felix_https_keystore_key_password(self, org_apache_felix_https_keystore_key_password: ConfigNodePropertyString):\n\n self._org_apache_felix_https...
[ "0.8246096", "0.7540886", "0.74562603", "0.71693903", "0.7051459", "0.6594238", "0.6594238", "0.6594238", "0.6594238", "0.6594238", "0.6435226", "0.6179337", "0.6179337", "0.6176817", "0.6120665", "0.6120665", "0.5972059", "0.5957054", "0.5957054", "0.5957054", "0.594349", ...
0.85293865
0
Sets the org_apache_felix_https_keystore_key_password of this OrgApacheFelixHttpProperties.
def org_apache_felix_https_keystore_key_password(self, org_apache_felix_https_keystore_key_password: ConfigNodePropertyString): self._org_apache_felix_https_keystore_key_password = org_apache_felix_https_keystore_key_password
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_https_keystore_password(self, org_apache_felix_https_keystore_password: ConfigNodePropertyString):\n\n self._org_apache_felix_https_keystore_password = org_apache_felix_https_keystore_password", "def org_apache_felix_https_keystore_key_password(self) -> ConfigNodePropertyString:\n ...
[ "0.83636683", "0.77204597", "0.75510556", "0.74462825", "0.74085593", "0.65828377", "0.6568399", "0.64200974", "0.56827635", "0.5659243", "0.56300586", "0.5608953", "0.5599103", "0.55898595", "0.55827683", "0.55731165", "0.55346453", "0.5491213", "0.5483355", "0.54719245", "0...
0.86609757
0
Gets the org_apache_felix_https_truststore_password of this OrgApacheFelixHttpProperties.
def org_apache_felix_https_truststore_password(self) -> ConfigNodePropertyString: return self._org_apache_felix_https_truststore_password
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_https_keystore_password(self) -> ConfigNodePropertyString:\n return self._org_apache_felix_https_keystore_password", "def org_apache_felix_https_truststore_password(self, org_apache_felix_https_truststore_password: ConfigNodePropertyString):\n\n self._org_apache_felix_https_tru...
[ "0.78597236", "0.77476144", "0.75877327", "0.75450873", "0.6826835", "0.66835874", "0.6557051", "0.64088917", "0.62436783", "0.62436783", "0.62436783", "0.62436783", "0.62436783", "0.6234889", "0.5930628", "0.58993256", "0.5873901", "0.5842707", "0.5795168", "0.5795168", "0.5...
0.8648619
0
Sets the org_apache_felix_https_truststore_password of this OrgApacheFelixHttpProperties.
def org_apache_felix_https_truststore_password(self, org_apache_felix_https_truststore_password: ConfigNodePropertyString): self._org_apache_felix_https_truststore_password = org_apache_felix_https_truststore_password
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_https_truststore_password(self) -> ConfigNodePropertyString:\n return self._org_apache_felix_https_truststore_password", "def org_apache_felix_https_keystore_password(self, org_apache_felix_https_keystore_password: ConfigNodePropertyString):\n\n self._org_apache_felix_https_key...
[ "0.7959347", "0.7848941", "0.76877695", "0.7361418", "0.7188636", "0.6766721", "0.6673765", "0.6661396", "0.61153615", "0.60215497", "0.5852127", "0.5751099", "0.573106", "0.56800723", "0.5657671", "0.5624573", "0.5621727", "0.56202614", "0.5533228", "0.5517369", "0.55138314"...
0.8830454
0
Gets the org_apache_felix_http_context_path of this OrgApacheFelixHttpProperties.
def org_apache_felix_http_context_path(self) -> ConfigNodePropertyString: return self._org_apache_felix_http_context_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def org_apache_felix_http_context_path(self, org_apache_felix_http_context_path: ConfigNodePropertyString):\n\n self._org_apache_felix_http_context_path = org_apache_felix_http_context_path", "def context_path(cls, project, session, context):\n return google.api_core.path_template.expand(\n ...
[ "0.7498199", "0.5649405", "0.56400687", "0.5468961", "0.54251987", "0.5295678", "0.49479493", "0.487287", "0.48724696", "0.48695433", "0.48502514", "0.4791241", "0.47069758", "0.46779948", "0.46779948", "0.46779948", "0.46779948", "0.46648368", "0.4656904", "0.4656904", "0.46...
0.84528947
0