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 |
|---|---|---|---|---|---|---|
Distribution parameter for the pretransformed standard deviation. | def scale(self):
return self.distribution.scale | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _std_trans(self, std_pre):\r\n std = 1e-6 + P.Log()(P.Exp()(std_pre) + 1)\r\n return std",
"def standard_deviation(self):\r\n\t\treturn self.variance()**(1/2)",
"def standard_dev(self):\n return self.variance()**0.5",
"def _normal_distribution_cdf(x, stddev):\n return 0.5 * (1.0 +... | [
"0.6970744",
"0.68152267",
"0.6750245",
"0.6715451",
"0.67093676",
"0.67046535",
"0.6591583",
"0.6577151",
"0.6558361",
"0.6517757",
"0.6469663",
"0.6462433",
"0.64435154",
"0.640829",
"0.6385738",
"0.6332624",
"0.6315336",
"0.63020015",
"0.6285902",
"0.6239123",
"0.62386453"... | 0.0 | -1 |
Approximate the variance of a LogitNormal. This approximation is based on combining ideas from [(Monahan and Stefanski, 1989)][1] and [(Owen, 1980)][2]. | def variance_approx(self, name='variance_approx'):
with self._name_and_control_scope(name):
loc = tf.convert_to_tensor(self.loc)
scale = tf.convert_to_tensor(self.scale)
monahan_stefanski_answer = approx_variance_sigmoid(
loc, scale,
MONAHAN_MIX_PROB[self.num_probit_terms_appro... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def variance(self):\n return (math.exp(self.sigma ** 2) - 1.0) \\\n * math.exp(2.0 * self.mu + self.sigma ** 2)",
"def variance(self):\n sum_sqdif = 0 # initialize sum of squared differences\n # Calculate sum of squared differences\n for site in self.sites:\n sqd... | [
"0.71934026",
"0.69066364",
"0.6740264",
"0.67263234",
"0.6711386",
"0.6691668",
"0.6672213",
"0.6672213",
"0.6672213",
"0.65908116",
"0.6567752",
"0.6515543",
"0.6468219",
"0.6468219",
"0.64399284",
"0.6366568",
"0.63561547",
"0.63533825",
"0.63195145",
"0.62992144",
"0.6288... | 0.0 | -1 |
Approximate the stdandard deviation of a LogitNormal. This approximation is based on combining ideas from [(Monahan and Stefanski, 1989)][1] and [(Owen, 1980)][2]. | def stddev_approx(self, name='stddev_approx'):
with self._name_and_control_scope(name):
return tf.math.sqrt(self.variance_approx()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def std(x):\n return sqrt(TinyStatistician.var(x))",
"def calculate_std(self) -> float:\n\n if self.data:\n return np.std(self.data)\n else:\n return self.sigma",
"def standard_deviation(self):\r\n\t\treturn self.variance()**(1/2)",
"def _std(self, data):\n v... | [
"0.73168117",
"0.7177263",
"0.717405",
"0.7168393",
"0.7120614",
"0.71140736",
"0.70866567",
"0.70866317",
"0.70795673",
"0.70732534",
"0.70605516",
"0.70129853",
"0.7005696",
"0.70009995",
"0.6994271",
"0.6976339",
"0.6937043",
"0.6877999",
"0.6875169",
"0.68533826",
"0.6809... | 0.0 | -1 |
Calculate the batched KL divergence KL(a || b) with a and b LogitNormal. This is the same as the KL divergence between the underlying Normal distributions. | def _kl_logitnormal_logitnormal(a, b, name=None):
return kullback_leibler.kl_divergence(
a.distribution,
b.distribution,
name=(name or 'kl_logitnormal_logitnormal')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kl_divergence_from_logits(self, logits_a, logits_b):\n distribution1 = tf.contrib.distributions.Categorical(logits=logits_a)\n distribution2 = tf.contrib.distributions.Categorical(logits=logits_b)\n return tf.contrib.distributions.kl_divergence(distribution1, distribution2)",
"def kl_div... | [
"0.7751688",
"0.75365585",
"0.7323522",
"0.72360706",
"0.7178734",
"0.7074885",
"0.6985749",
"0.6899835",
"0.6863307",
"0.6835172",
"0.6734603",
"0.67287874",
"0.67233074",
"0.66882527",
"0.6680728",
"0.6673041",
"0.6654507",
"0.66541153",
"0.661721",
"0.661398",
"0.6610608",... | 0.7155944 | 5 |
Approximates `E_{N(m,s)}[sigmoid(X)]` by GaussHermite quadrature. | def logit_normal_mean_gh(loc, scale, deg):
# We want to integrate
# A = \int_-inf^inf sigmoid(x) * Normal(loc, scale).pdf(x) dx
# To bring it into the right form for Gauss-Hermite quadrature,
# we make the substitution y = (x - loc) / scale, to get
# A = (1/sqrt(2*pi)) * \int_-inf^inf [
# sigmoid(y * ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _sigmoid_m(self, X):\n result = np.zeros((X.shape[0], X.shape[1]), dtype='float32')\n for i in range(X.shape[0]):\n for j in range(X.shape[1]):\n result[i, j] = 1.0 / (1.0 + np.exp(-X[i, j]))\n return result",
"def sigmoid(X):\n g = 1/(1 + np.exp(-X))\n return... | [
"0.716628",
"0.70648474",
"0.6867594",
"0.6756916",
"0.6713589",
"0.6713589",
"0.67103815",
"0.6710222",
"0.66765493",
"0.66386306",
"0.6616396",
"0.6610632",
"0.6589122",
"0.65878576",
"0.6582305",
"0.6576923",
"0.65768343",
"0.6555066",
"0.6542998",
"0.6534883",
"0.6533769"... | 0.0 | -1 |
Approxmates `Var_{N(m,s)}[sigmoid(X)]` by GaussHermite quadrature. | def logit_normal_variance_gh(loc, scale, deg):
# Since we have to compute sigmoids for variance anyway, we inline
# computing the mean by Gauss-Hermite quadrature at the same grid of points.
grid, weights = onp.polynomial.hermite_e.hermegauss(deg)
grid = tf.cast(grid, dtype=loc.dtype)
weights = tf.cast(weight... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _sigmoid_m(self, X):\n result = np.zeros((X.shape[0], X.shape[1]), dtype='float32')\n for i in range(X.shape[0]):\n for j in range(X.shape[1]):\n result[i, j] = 1.0 / (1.0 + np.exp(-X[i, j]))\n return result",
"def sigmoid_grad(self, X):\n var=self.sigmoi... | [
"0.68293375",
"0.68078506",
"0.67023134",
"0.6519628",
"0.6356588",
"0.63293844",
"0.6315896",
"0.63112134",
"0.6298844",
"0.6298844",
"0.62948805",
"0.62928694",
"0.6282234",
"0.6271928",
"0.62662894",
"0.62606734",
"0.625079",
"0.6218714",
"0.62142336",
"0.62119055",
"0.620... | 0.0 | -1 |
Retrieve a environment variable that MUST be set! | def getenv_or_raise_exception(varname) -> str:
env = os.getenv(varname)
if env is None:
raise EnvironmentError(f"Environment variable {varname} is not set!")
return env | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_required_env_variable(var_name):\n try:\n return os.environ[var_name]\n except KeyError:\n error_msg = 'Set the {0} environment variable'.format(var_name)\n raise ImproperlyConfigured(error_msg)",
"def get_env_variable(self, var_name, optional=False):\n try:\n return ... | [
"0.80456585",
"0.7954612",
"0.770418",
"0.767664",
"0.7477886",
"0.7398008",
"0.73702854",
"0.73362535",
"0.7322809",
"0.72890496",
"0.7287969",
"0.7271799",
"0.72652197",
"0.7263149",
"0.72630733",
"0.7259647",
"0.7251927",
"0.72381186",
"0.7231698",
"0.7230719",
"0.7216367"... | 0.7076361 | 29 |
Swaps an exact amount of input tokens for as many output tokens as possible, along the route determined by the path. The first element of path is the input token, the last is the output token, and any intermediate elements represent intermediate pairs to trade through (if for example, a direct pair does not exist) | def swap_exact_tokens_for_tokens(amount, min_out, path, to, deadline, gas=None, gas_price=None):
func = router.functions.swapExactTokensForTokens(amount, min_out, path, to, deadline)
params = _create_transaction_params(gas=gas, gas_price=gas_price)
txn_receipt = _send_transaction(func, params)
return t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def first_pass(tokens, graph):\n\n ret = []\n\n paths = nx.shortest_path(graph)\n\n for token in tokens:\n\n qubits = token[\"qubits\"]\n\n if len(qubits) == 1:\n ret.append(token)\n continue\n\n elif len(qubits) == 2:\n path = paths[qubits[0]][qubits[... | [
"0.6057398",
"0.558036",
"0.5489441",
"0.52986455",
"0.5191313",
"0.5141412",
"0.51348406",
"0.5131591",
"0.50562567",
"0.5006296",
"0.49379188",
"0.48372295",
"0.48281512",
"0.4812948",
"0.47946662",
"0.47725174",
"0.47646663",
"0.47614488",
"0.47593433",
"0.4741701",
"0.474... | 0.5538849 | 2 |
Applies dynamic threshold filter for an individual channel to colored original microscopic img. | def color_thresh(orig_img, thresh_img):
new_img = orig_img
for i in range(orig_img.shape[0]):
for j in range(orig_img.shape[1]):
if thresh_img[i,j] == 255:
new_img[i,j] = 0
return new_img | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def apply_filter(self, image):\n pass",
"def pipeline_image_threshold_filter(img, plot=False):\n combined_thresholds = combined_threshold(img, plot)\n remove_shadow = de_shadow_lab(img)\n orange_lane = orange_lane_detection_hsv(img)\n white_lane = white_lane_detection_luv(img)\n white_lane_... | [
"0.6847227",
"0.6562355",
"0.65563065",
"0.64268196",
"0.63908863",
"0.6323414",
"0.6248836",
"0.61741453",
"0.6157798",
"0.61565566",
"0.61267936",
"0.6095938",
"0.60914886",
"0.6077635",
"0.6062792",
"0.599685",
"0.5985913",
"0.5983311",
"0.5977697",
"0.5969789",
"0.596211"... | 0.61690366 | 8 |
Get reader for spaceseparated tokenized text. | def get_plain_text_reader(encoding: str = "utf-8"):
def reader(files: List[str]) -> Iterable[List[str]]:
for path in files:
if path.endswith(".gz"):
with gzip.open(path, 'r') as f_data:
for line in f_data:
yield str(line, 'utf-8').stri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def read_token(self):\n self._skip_white_space()\n return self._get_token()",
"def reader(self):\n @contextmanager\n def generator(data):\n \"\"\"\n Args:\n data (str): could be a filename or the text to tokenize.\n Returns:\n ... | [
"0.65288097",
"0.64297795",
"0.62165225",
"0.61543",
"0.57624024",
"0.5523032",
"0.54725957",
"0.54187953",
"0.54032326",
"0.53924114",
"0.5383776",
"0.5379123",
"0.5376866",
"0.5355587",
"0.532768",
"0.53103393",
"0.5306975",
"0.5298942",
"0.5298942",
"0.5298942",
"0.5285644... | 0.48860154 | 70 |
Computes Area Under the Curve (AUC) from prediction scores. | def compute_AUCs(gt, pred):
AUROCs = []
gt_np = gt.cpu().numpy()
pred_np = pred.cpu().numpy()
for i in range(N_CLASSES):
AUROCs.append(roc_auc_score(gt_np[:, i], pred_np[:, i]))
return AUROCs | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compute_AUC_scores(y_true, y_pred, labels):\n aucRocMetricsList=[]\n AUROC_avg = roc_auc_score(y_true, y_pred)\n aucRocMetricsList.append(AUROC_avg)\n print('The average AUROC is {AUROC_avg:.4f}'.format(AUROC_avg=AUROC_avg))\n for y, pred, label in zip(y_true.transpose(), y_p... | [
"0.75513005",
"0.7328731",
"0.729816",
"0.7131566",
"0.7079285",
"0.70748883",
"0.6976278",
"0.6962717",
"0.6958427",
"0.69362026",
"0.6791622",
"0.67662936",
"0.67662936",
"0.6736841",
"0.67178506",
"0.67091495",
"0.6661926",
"0.6657716",
"0.6635108",
"0.6622957",
"0.6618519... | 0.6798318 | 10 |
Computes Area Under the Curve (AUC) from prediction scores. | def compute_AUCs_modified(gt, pred):
AUROCs = []
for i in range(N_CLASSES):
if len(np.unique(gt[:, i])) == 1:
AUROCs.append('AUC Not Defined')
else:
AUROCs.append(roc_auc_score(gt[:, i], pred[:, i]))
return AUROCs | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compute_AUC_scores(y_true, y_pred, labels):\n aucRocMetricsList=[]\n AUROC_avg = roc_auc_score(y_true, y_pred)\n aucRocMetricsList.append(AUROC_avg)\n print('The average AUROC is {AUROC_avg:.4f}'.format(AUROC_avg=AUROC_avg))\n for y, pred, label in zip(y_true.transpose(), y_p... | [
"0.75518095",
"0.7329645",
"0.72977364",
"0.7132092",
"0.70792156",
"0.70747983",
"0.6976212",
"0.6963394",
"0.6956987",
"0.69363064",
"0.6798291",
"0.67924654",
"0.6765796",
"0.6765796",
"0.67365736",
"0.6717737",
"0.67090386",
"0.6662723",
"0.665797",
"0.6636436",
"0.662256... | 0.6549403 | 26 |
Returns a list of filenames for all jpg images in a directory. | def get_imlist(path):
return [
os.path.join(path, f) for f in os.listdir(path) if f.endswith('.bmp')
] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def return_images(directory):\r\n allfiles = os.listdir(directory)\r\n image_list = [im for im in allfiles if '.jpg' in str(im)]\r\n image_list = [directory + im for im in image_list]\r\n return image_list",
"def list_images(img_dir) -> Iterable[str]:\n extensions = (\".png\", \".jpg\", \".jpeg\",... | [
"0.8268214",
"0.8205231",
"0.7809487",
"0.7695878",
"0.76406604",
"0.7620575",
"0.76000166",
"0.75661105",
"0.7563402",
"0.7471962",
"0.7468112",
"0.74164265",
"0.74075896",
"0.7395013",
"0.73891944",
"0.73766965",
"0.73611706",
"0.7331022",
"0.731641",
"0.7314658",
"0.729228... | 0.68536085 | 43 |
Returns a list of filenames for all jpg images in a directory. | def get_imlist2(path):
return [
os.path.join(path, f) for f in os.listdir(path) if f.endswith('.ppm')
] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def return_images(directory):\r\n allfiles = os.listdir(directory)\r\n image_list = [im for im in allfiles if '.jpg' in str(im)]\r\n image_list = [directory + im for im in image_list]\r\n return image_list",
"def list_images(img_dir) -> Iterable[str]:\n extensions = (\".png\", \".jpg\", \".jpeg\",... | [
"0.8268033",
"0.8205244",
"0.7809327",
"0.7695793",
"0.76400334",
"0.7620122",
"0.7600265",
"0.75665325",
"0.75639623",
"0.7471566",
"0.7467612",
"0.7415963",
"0.7407699",
"0.73947144",
"0.73893106",
"0.7375901",
"0.73619336",
"0.7331938",
"0.7316614",
"0.73151964",
"0.729353... | 0.0 | -1 |
Histogram equalization of a grayscale image. | def histeq(im, nbr_bins=256):
# get image histogram
imhist, bins = np.histogram(im.flatten(), nbr_bins, normed=True)
cdf = imhist.cumsum() # cumulative distribution function
cdf = 255 * cdf / cdf[-1] # normalize
# use linear interpolation of cdf to find new pixel values
im2 = np.interp(im.flat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def histogram_equalize(im_orig):\n if im_orig.ndim == 3:\n return _histogram_equalize_rgb(im_orig)\n return _histogram_equalize_grayscale(im_orig)",
"def _histogram_equalize_grayscale(im_orig):\n image = im_orig.copy()\n\n hist_orig = utils.get_histogram(image)\n\n im_eq = _histogram_equali... | [
"0.8051371",
"0.78602386",
"0.7781646",
"0.77133626",
"0.76831156",
"0.7614875",
"0.7575445",
"0.75605583",
"0.7506881",
"0.74961966",
"0.7410651",
"0.7396367",
"0.7364272",
"0.731037",
"0.7306447",
"0.7301145",
"0.7206093",
"0.7176516",
"0.7123569",
"0.70726925",
"0.7040459"... | 0.69058084 | 23 |
Create a public and private room as a normal user. Then get the `joiner` into those rooms. | def _create_rooms_and_inject_memberships(
self, creator: str, token: str, joiner: str
) -> Tuple[str, str]:
# TODO: Duplicates the same-named method in UserDirectoryInitialPopulationTest.
public_room = self.helper.create_room_as(
creator,
is_public=True,
#... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_room(self, request):\n user = request.user\n target_user = User.objects.get(pk=request.POST.get('target_user'))\n\n if user == target_user:\n room = create_room([user])\n else:\n room = create_room([user, target_user])\n return room",
"def test_joi... | [
"0.69373167",
"0.67757064",
"0.6648526",
"0.6581857",
"0.6510292",
"0.65099484",
"0.6481674",
"0.64421",
"0.64210093",
"0.64045256",
"0.6390629",
"0.6260489",
"0.62409157",
"0.62133515",
"0.6171231",
"0.6056367",
"0.6009911",
"0.5991533",
"0.5941459",
"0.5938977",
"0.5917363"... | 0.76757044 | 0 |
Return the string uuid of the scene object with the given ID | def get_object_uuid(remote, object_id):
cmd = mmapi.StoredCommands()
cmd_key = cmd.AppendSceneCommand_GetObjectUUID(object_id)
remote.runCommand(cmd)
byte_vec = mmapi.vectorub()
cmd.GetSceneCommandResult_GetObjectUUID(cmd_key, byte_vec)
return vectorub_to_string(byte_vec) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uuid(self) -> str:\n return self.obj.uuid",
"def id(self):\n return self.raw_resource.uuid",
"def id_str(self):\n if hasattr(self, 'id'):\n return str(self.id)\n else:\n return 'obj%s' % id(self)",
"def get_uuid():\n return str(uuid4())",
"def get_ob... | [
"0.6962405",
"0.66605645",
"0.6609836",
"0.6589816",
"0.6572826",
"0.65366185",
"0.6523799",
"0.65123564",
"0.6487986",
"0.64819413",
"0.64632785",
"0.64624923",
"0.64499074",
"0.64352256",
"0.64189637",
"0.64189637",
"0.64189637",
"0.6406108",
"0.6392856",
"0.6380188",
"0.63... | 0.72126347 | 0 |
Appends a vertex to mesh and returns new VertexID | def append_vertex(remote, objectid, position, normal=(0,1,0), color=(1,1,1) ):
cmd1 = mmapi.StoredCommands()
key1 = cmd1.AppendSceneCommand_AppendVertex(objectid, to_vec3f(position), to_vec3f(normal), to_vec3f(color) )
remote.runCommand(cmd1)
result_val = mmapi.any_result()
cmd1.GetSceneCommandResul... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_vertex(self, vertex_id):\n pass # TODO",
"def add_vertex(self, vertex):\n if vertex.id not in self.vertices.keys():\n self.vertices[vertex.id] = vertex",
"def add_vertex(self, vertex_id):\n # add new vertex in vertices\n self.vertices[vertex_id] = set()\n\n ... | [
"0.80709076",
"0.76697075",
"0.76047057",
"0.7455064",
"0.7451413",
"0.743773",
"0.7335737",
"0.7288854",
"0.7236845",
"0.7217596",
"0.7217596",
"0.7217596",
"0.7217596",
"0.72047186",
"0.7151318",
"0.7144556",
"0.7136652",
"0.70935565",
"0.70498914",
"0.70258474",
"0.7003929... | 0.7128527 | 17 |
returns tuple of indices | def get_triangle(remote, objectid, triangleid):
cmd1 = mmapi.StoredCommands()
key1 = cmd1.AppendSceneCommand_GetTriangleIndices(objectid, triangleid)
remote.runCommand(cmd1)
t = mmapi.vec3i()
cmd1.GetSceneCommandResult_GetTriangleIndices(key1, t)
return (t.i, t.j, t.k) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def indices(self):\n return tuple([slice(*r) for r in self.location])",
"def indices(self):\n i, j, _edge = self.indicesAndEdge()\n return i, j",
"def mainIndices(self):\n return self.i1, self.i2",
"def _pair_indices(self):\n indices_src = []\n indices_dst = []\n for i in... | [
"0.79469585",
"0.7730821",
"0.7680482",
"0.7427501",
"0.7331705",
"0.72241014",
"0.7044014",
"0.7022923",
"0.7016513",
"0.69965166",
"0.69717383",
"0.6946335",
"0.69203836",
"0.689657",
"0.6873804",
"0.67988515",
"0.6780859",
"0.6780321",
"0.6772755",
"0.6771032",
"0.6764663"... | 0.0 | -1 |
Calculates the distance between two instances in the dataset. Handles discrete and continuous attributes. Continuous attributes are accomodated by scaling the distance difference within the context of the observed attribute range. If a respective data point is missing from either instance, it is left out of the distanc... | def calculate_distance(a,b,data):
d=0 #distance
for i in range(data.numAttributes):
if a[i]!=data.labelMissingData and b[i]!=data.labelMissingData:
if not data.attributeInfo[i][0]: #Discrete Attribute
if a[i] != b[i]:
d+=1
else: #Contin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def euclidean_dist(self, example1, example2, length):\n dist = 0\n for i in xrange(example1.size - 1):\n nominal = isinstance(self.attributes[i], NominalAttribute)\n if not nominal:\n dist += (example1[i] - example2[i])**2\n elif nominal and (example2[i... | [
"0.6836114",
"0.67980963",
"0.6625845",
"0.65274733",
"0.64986324",
"0.64781815",
"0.6364983",
"0.6363879",
"0.63337547",
"0.6307268",
"0.62636316",
"0.6254964",
"0.62251836",
"0.62251836",
"0.6219149",
"0.6213366",
"0.62130404",
"0.6198941",
"0.6193942",
"0.6184225",
"0.6178... | 0.7644777 | 0 |
Tokenizes the words/labels and creates a row for each token | def tokenize_and_explode(args, df):
df['token'] = df.word.apply(args.tokenizer.tokenize)
df = df.explode('token', ignore_index=True)
df['token2word'] = df['token'].apply(
args.tokenizer.convert_tokens_to_string).str.strip().str.lower()
df = convert_token_to_idx(df, args.tokenizer)
df = check... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_tokens(dataframe):\n\n tokenize_dict = {}\n iterator = dataframe.to_dict('dict')['line']\n\n for key, val in iterator.items():\n tokenize_dict[key] = nltk.word_tokenize(val)\n\n for key, val in tokenize_dict.items():\n l = []\n for i in range(len(val)):\n if val[i] == '<':\n val... | [
"0.68083507",
"0.66688037",
"0.6604246",
"0.6570247",
"0.6481441",
"0.6476231",
"0.6454087",
"0.6427057",
"0.6308667",
"0.63019574",
"0.62480766",
"0.62153554",
"0.61135906",
"0.61134857",
"0.6090096",
"0.6089497",
"0.600865",
"0.60019755",
"0.59597033",
"0.5956387",
"0.59557... | 0.70356774 | 0 |
Tokenize the podcast transcript and return as dataframe | def tokenize_podcast_transcript(args):
DATA_DIR = os.path.join(os.getcwd(), 'data', args.project_id)
story_file = os.path.join(DATA_DIR, 'podcast-transcription.txt')
# Read all words and tokenize them
with open(story_file, 'r') as fp:
data = fp.readlines()
data = [item.split(' ') for i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tokenization(dataframe):\n nlp = English()\n tokenizer = nlp.Defaults.create_tokenizer(nlp)\n stemmer = SnowballStemmer(\"english\")\n\n dataframe.loc[:, \"tokens\"] = dataframe.loc[:, \"content\"].apply(\n lambda cell: [\n token.lemma_\n for token in tokenizer(cell)\n ... | [
"0.6135854",
"0.61020344",
"0.60738087",
"0.6041756",
"0.5852875",
"0.58042336",
"0.58004117",
"0.5773896",
"0.5725972",
"0.57019305",
"0.5623516",
"0.5575491",
"0.5523398",
"0.5501278",
"0.54967743",
"0.54735434",
"0.54647934",
"0.54431635",
"0.54266506",
"0.5402718",
"0.539... | 0.75719166 | 0 |
Adds a subgroup to the subgroups of this group | def add_subgroup(self, new_subgroup):
self.subgroups[new_subgroup.get_title()] = new_subgroup | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AddSubGroup(self, group_info):\n name = group_info[2]\n self._groups_to_load[name] = group_info",
"def add_to_group(self, group):\n\n if not self.in_group(group):\n self.secondary_groups.append(group)\n return self",
"def addgroup(self, abspath=None, sourcetre... | [
"0.77542186",
"0.7137962",
"0.68662685",
"0.6685126",
"0.66832966",
"0.66406167",
"0.6542597",
"0.6434963",
"0.641457",
"0.63807136",
"0.6332244",
"0.63297766",
"0.62664104",
"0.62264407",
"0.6162447",
"0.6125176",
"0.6019776",
"0.60005337",
"0.5980813",
"0.59318715",
"0.5931... | 0.8411583 | 0 |
Example view demonstrating rendering a simple HTML page. | def index():
context = make_context()
context['name'] = 'Lunchbox'
context['id'] = 'home'
context['now'] = datetime.now().strftime('%B %-d, %Y')
return make_response(render_template('index.html', **context)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def view_html_page():\n\n return render_template(\"moby.html\")",
"def get(self):\n self.render('view.html')",
"def hello():\n\n return render_template(\"index.html\")",
"def hello():\n return render_template(\"hello.html\")",
"def home_demo(request):\n\n return render(request, \"home_de... | [
"0.8219491",
"0.7518685",
"0.7275588",
"0.72625965",
"0.719314",
"0.71239555",
"0.70753264",
"0.706307",
"0.7049487",
"0.7029247",
"0.7028411",
"0.70061994",
"0.70061994",
"0.70061994",
"0.70061994",
"0.70061994",
"0.70049",
"0.6983187",
"0.69558996",
"0.6952718",
"0.6947157"... | 0.0 | -1 |
Remove a main phrase from the model, including its connections to any variant and distractor phrases. | def remove_phrase(self, phrase: Phrase):
# first check if phrase is registered in this phrase model
if phrase.phrase_string not in self.phrase_index:
raise ValueError(f"{phrase.phrase_string} is not registered as a main phrase")
# remove phrase from the type index
self.phrase... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _remove_phrase_words(self, phrase: Phrase) -> None:\n for wi, word in enumerate(re.finditer(r\"\\w+\", phrase.phrase_string)):\n if wi == 0:\n del self.first_word_in_phrase[word.group(0)][phrase.phrase_string]\n if len(self.first_word_in_phrase[word.group(0)].key... | [
"0.68471515",
"0.6615437",
"0.64937496",
"0.6267024",
"0.62447923",
"0.61653745",
"0.6090596",
"0.6070405",
"0.5833603",
"0.5811001",
"0.56443936",
"0.5519056",
"0.5467042",
"0.54595965",
"0.5424587",
"0.5412508",
"0.5353161",
"0.5318664",
"0.5268705",
"0.5266291",
"0.5255596... | 0.789589 | 0 |
Add variants of a phrase. If the phrase is not registered, add it to the set. | def add_variants(self, variants: List[Union[Phrase, Dict[str, Union[str, List[str]]]]],
add_new_phrases: bool = True) -> None:
for phrase in variants:
main_phrase = as_phrase_object(phrase, ngram_size=self.ngram_size, skip_size=self.skip_size)
if main_phrase.phrase_s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_phrase(self, phrase: Phrase) -> None:\n self.phrase_string_map[phrase.phrase_string] = phrase\n self.phrase_type[phrase.phrase_string].add(\"phrase\")\n self.phrase_index[phrase.phrase_string] = phrase\n self.phrase_length_index[len(phrase.phrase_string)].add(phrase.phrase_strin... | [
"0.6755706",
"0.66085523",
"0.63850135",
"0.6210947",
"0.5903168",
"0.58097917",
"0.57118857",
"0.5710488",
"0.5625607",
"0.55922294",
"0.55713147",
"0.5564688",
"0.5517705",
"0.54692674",
"0.54534006",
"0.54359645",
"0.5411803",
"0.5406683",
"0.53957784",
"0.5387728",
"0.538... | 0.6737923 | 1 |
Add distractors of a phrase. If the phrase is not registered, add it to the set. | def add_distractors(self, distractors: List[Union[Phrase, Dict[str, Union[str, List[str]]]]],
add_new_phrases: bool = True) -> None:
for phrase in distractors:
main_phrase = as_phrase_object(phrase, ngram_size=self.ngram_size, skip_size=self.skip_size)
if main_phr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_phrase(self, phrase: Phrase) -> None:\n self.phrase_string_map[phrase.phrase_string] = phrase\n self.phrase_type[phrase.phrase_string].add(\"phrase\")\n self.phrase_index[phrase.phrase_string] = phrase\n self.phrase_length_index[len(phrase.phrase_string)].add(phrase.phrase_strin... | [
"0.63022715",
"0.61095077",
"0.6097657",
"0.59699",
"0.5944906",
"0.58905",
"0.5827371",
"0.5812443",
"0.5762549",
"0.5745022",
"0.57382375",
"0.5705276",
"0.570388",
"0.5692979",
"0.56419325",
"0.5624541",
"0.56185365",
"0.5580855",
"0.55380785",
"0.5490947",
"0.54858613",
... | 0.59345305 | 5 |
Remove a list of distractors of a phrase. | def remove_distractors(self, distractors: Union[List[Union[str, Phrase]], None] = None,
distractors_of_phrase: Union[str, None] = None):
if distractors:
for distractor in distractors:
distractor = as_phrase_object(distractor, ngram_size=self.ngram_size, ski... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_distractor(self, distractor_phrase: Phrase) -> None:\n if distractor_phrase.phrase_string not in self.is_distractor_of:\n raise ValueError(f\"{distractor_phrase.phrase_string} is not registered as a distractor\")\n self.phrase_type[distractor_phrase.phrase_string].remove(\"distr... | [
"0.7137204",
"0.66343224",
"0.6520249",
"0.64954495",
"0.64467293",
"0.6235131",
"0.62148863",
"0.6210169",
"0.6145112",
"0.6075165",
"0.5984302",
"0.5957185",
"0.59329885",
"0.5890647",
"0.58580595",
"0.5841176",
"0.58236974",
"0.58055604",
"0.57980496",
"0.5768811",
"0.5763... | 0.7151391 | 0 |
Remove the individual words of a phrase from the index. Only use this is you are removing the phrase from the phrase model. | def _remove_phrase_words(self, phrase: Phrase) -> None:
for wi, word in enumerate(re.finditer(r"\w+", phrase.phrase_string)):
if wi == 0:
del self.first_word_in_phrase[word.group(0)][phrase.phrase_string]
if len(self.first_word_in_phrase[word.group(0)].keys()) == 0:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_phrase(self, phrase: Phrase):\n # first check if phrase is registered in this phrase model\n if phrase.phrase_string not in self.phrase_index:\n raise ValueError(f\"{phrase.phrase_string} is not registered as a main phrase\")\n # remove phrase from the type index\n ... | [
"0.76377296",
"0.76152223",
"0.72068584",
"0.71518326",
"0.7144012",
"0.6991352",
"0.6895787",
"0.6746399",
"0.66762483",
"0.6665244",
"0.66270334",
"0.6419221",
"0.64071685",
"0.63650334",
"0.6349355",
"0.6334151",
"0.62883615",
"0.62873375",
"0.62589294",
"0.62449133",
"0.6... | 0.81385 | 0 |
Remove the individual words of a phrase from the index. Only use this is you are removing the phrase from the phrase model. | def _remove_phrase_tokens(self, phrase: Phrase, tokenizer: Tokenizer = None) -> None:
tokenizer = self._get_tokenizer(tokenizer)
if tokenizer is None:
return None
tokens = tokenizer.tokenize(phrase.phrase_string)
for ti, token in enumerate(tokens):
if ti == 0:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _remove_phrase_words(self, phrase: Phrase) -> None:\n for wi, word in enumerate(re.finditer(r\"\\w+\", phrase.phrase_string)):\n if wi == 0:\n del self.first_word_in_phrase[word.group(0)][phrase.phrase_string]\n if len(self.first_word_in_phrase[word.group(0)].key... | [
"0.8140978",
"0.7640592",
"0.76159734",
"0.72088367",
"0.71512973",
"0.71428704",
"0.69940907",
"0.6894296",
"0.6746109",
"0.6663952",
"0.662843",
"0.6418077",
"0.6406447",
"0.6364664",
"0.63487303",
"0.6333689",
"0.62900984",
"0.6287811",
"0.6259546",
"0.6244742",
"0.6183634... | 0.6679526 | 9 |
Selects an operator from the list of operators, using a distribution inferred from the given weights. | def select_operator(operators, weights, rnd_state):
return rnd_state.choice(np.arange(0, len(operators)),
p=weights / np.sum(weights)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def weightedChoice(weights, objects, apply_softmax=False, alpha=None):\n if apply_softmax: weights = softmax(weights)\n if alpha: weights = normalize([w**alpha for w in weights])\n cs = np.cumsum(weights) #An array of the weights, cumulatively summed.\n idx = sum(cs < np.random.rand()) #Find the index ... | [
"0.6278937",
"0.6252741",
"0.6217252",
"0.6114562",
"0.60919577",
"0.60646176",
"0.59656805",
"0.5854948",
"0.5743487",
"0.5616089",
"0.5587286",
"0.5557915",
"0.55525804",
"0.5546773",
"0.550097",
"0.54868436",
"0.54589206",
"0.5448171",
"0.54452556",
"0.54335755",
"0.543250... | 0.7873721 | 0 |
Display the precomputed boxes for an image. | def display_precomputed_boxes(self, sample_index, all_boxes):
image_rois = [class_detections[sample_index]
for class_detections in all_boxes]
image_rois_list = []
image_classes = []
for class_index, class_rois in enumerate(image_rois):
if len(class_rois) > ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def draw_boxes(self, image, boxes):\n return draw_boxes(image, boxes, self.labels)",
"def vis_all_boxes(im_array, boxes):\r\n import matplotlib.pyplot as plt\r\n from ..fio.load_ct_img import windowing_rev, windowing\r\n\r\n im = windowing_rev(im_array+config.PIXEL_MEANS, config.WINDOWING)\r\n ... | [
"0.6686026",
"0.65880567",
"0.655059",
"0.6498399",
"0.6445345",
"0.64277697",
"0.6418899",
"0.63916814",
"0.6375766",
"0.6336964",
"0.6328146",
"0.6313622",
"0.6256885",
"0.6245395",
"0.62312466",
"0.6220251",
"0.6174179",
"0.6172322",
"0.6150824",
"0.6145233",
"0.6131338",
... | 0.7142396 | 0 |
Transform all_boxes from for a single image to a list of boxes and the categories detected in them. | def get_display_boxes(all_boxes):
display_boxes = []
display_classes = []
for class_id, class_boxes in enumerate(all_boxes):
for box in class_boxes:
display_boxes.append(box)
display_classes.append(class_id)
return np.asarray(display_boxes), np... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_faceboxes(self,img,threshold):\n faces = self.mark_detector.extract_cnn_facebox(img,threshold)\n \n\n\n faceboxes = []\n for face in faces:\n start = (face[0],face[1])\n end = (face[2],face[3])\n box = Box.setStartEnd(start,end)\n\n f... | [
"0.6687351",
"0.6678887",
"0.6643411",
"0.6441767",
"0.64227706",
"0.6420449",
"0.64066",
"0.63468003",
"0.6284043",
"0.62721276",
"0.62676823",
"0.6256613",
"0.6240929",
"0.62398416",
"0.62162465",
"0.621582",
"0.6207231",
"0.61962044",
"0.61950135",
"0.6176585",
"0.61677414... | 0.0 | -1 |
Returns a deep copy of this object. | def copy(self):
return deepcopy(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deepcopy(self):\n return self.copy()",
"def deepcopy(self):\n return copy.deepcopy(self)",
"def deepcopy(self):\n return copymod.deepcopy(self)",
"def clone(self):\n return deepcopy(self)",
"def clone(self):\n return deepcopy(self)",
"def clone(self):\n retur... | [
"0.9076541",
"0.90516406",
"0.8961223",
"0.8882065",
"0.8882065",
"0.8882065",
"0.8882065",
"0.8844651",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
"0.8838913",
... | 0.8862749 | 13 |
Get the bounding box (if any) of the underlying image for which the original WCS is defined. | def bounding_box(self):
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bounding_box(self):\n if self._owcs.pixel_bounds is None:\n if self._owcs.pixel_shape is not None:\n nx, ny = self._owcs.pixel_shape\n elif self._owcs.array_shape is not None:\n ny, nx = self._owcs.array_shape\n else:\n return... | [
"0.79075176",
"0.79075176",
"0.77993053",
"0.76774806",
"0.7591193",
"0.75648165",
"0.7552372",
"0.7552142",
"0.74631596",
"0.74207133",
"0.74207133",
"0.7418518",
"0.73710287",
"0.736168",
"0.7304402",
"0.7218551",
"0.7217512",
"0.71934825",
"0.71739525",
"0.7164734",
"0.714... | 0.7500371 | 8 |
Get the bounding box (if any) of the underlying image for which the original WCS is defined. | def bounding_box(self):
if self._owcs.pixel_bounds is None:
if self._owcs.pixel_shape is not None:
nx, ny = self._owcs.pixel_shape
elif self._owcs.array_shape is not None:
ny, nx = self._owcs.array_shape
else:
return None
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_bounding_box(current_building_contour):\n x, y, w, h, = cv.boundingRect(current_building_contour[0])\n return x, y, w, h",
"def getbbox(self):\r\n img_ = (self._instance > 0)\r\n rows = np.any(img_, axis=1)\r\n cols = np.any(img_, axis=0)\r\n rmin, rmax = np.argm... | [
"0.7800127",
"0.7676845",
"0.759099",
"0.75645465",
"0.75534976",
"0.75534457",
"0.75016695",
"0.746449",
"0.74221104",
"0.74221104",
"0.74194735",
"0.73718536",
"0.73623616",
"0.7304689",
"0.7220538",
"0.7217526",
"0.7195104",
"0.7175127",
"0.71661234",
"0.71509445",
"0.7143... | 0.7907331 | 1 |
Get the bounding box (if any) of the underlying image for which the original WCS is defined. | def bounding_box(self):
if self._owcs.pixel_bounds is None:
if self._owcs.pixel_shape is not None:
nx, ny = self._owcs.pixel_shape
elif self._owcs.array_shape is not None:
ny, nx = self._owcs.array_shape
else:
return None
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_bounding_box(current_building_contour):\n x, y, w, h, = cv.boundingRect(current_building_contour[0])\n return x, y, w, h",
"def getbbox(self):\r\n img_ = (self._instance > 0)\r\n rows = np.any(img_, axis=1)\r\n cols = np.any(img_, axis=0)\r\n rmin, rmax = np.argm... | [
"0.779941",
"0.767734",
"0.75904334",
"0.75639623",
"0.75530136",
"0.7552058",
"0.75009394",
"0.746344",
"0.74212253",
"0.74212253",
"0.7419271",
"0.7371703",
"0.73619217",
"0.7304424",
"0.72198784",
"0.7217764",
"0.71945894",
"0.71744186",
"0.716526",
"0.7150314",
"0.7144206... | 0.7908031 | 0 |
Gets the full details for a given site ID. Returns 404 if the site doesn't exist or if the user isn't allowed to view this site. | def get_site(site_id):
log = current_app.log
db = request.db
user_id = SiteService.get_current_uid()
Site = db.tables.Site
site = Site.query.filter_by(site_id=site_id).first_or_404()
is_owner = (site.site_owner == user_id)
if not (site.public or is_owner):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get(name, tenant_name, client, logger):\n utils.explicit_tenant_name_message(tenant_name, logger)\n graceful_msg = 'Requested site with name `{0}` was not found in this ' \\\n 'tenant'.format(name)\n with handle_client_error(404, graceful_msg, logger):\n logger.info('Getting i... | [
"0.61485666",
"0.6079623",
"0.6028128",
"0.6016743",
"0.5955107",
"0.5952292",
"0.580815",
"0.580265",
"0.57868224",
"0.5739803",
"0.5716589",
"0.5658824",
"0.5651515",
"0.5621241",
"0.55298364",
"0.55078477",
"0.5451567",
"0.5445467",
"0.54401964",
"0.5413573",
"0.53908974",... | 0.76891375 | 0 |
Counts the number of lines until the end of the current input section. This function counts the number of lines from the current position in the input file until the next END statement, then returns the lines in between and the line number of the END statement. | def count_lines(inFile, outFile):
bodyLines = []
# Begin iteratin lines, starting at line 'lineNum'
for line_ in inFile:
line_ = line_.rstrip('\n').strip()
if (not line_) or (line_[0] == '!'):
continue
elif line_.upper() in cases:
print("Error: encountere... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def countLines(file_name, start, end):\r\n\r\n with open(file_name, \"r\") as file:\r\n counter_lines = 0\r\n\r\n for line in islice(file, start, end):\r\n counter_lines += 1\r\n\r\n return counter_lines",
"def get_linecount(self):\n self._update_linetab(len(self.input))\n ... | [
"0.7074074",
"0.6467001",
"0.62460583",
"0.6155641",
"0.61463195",
"0.61297745",
"0.6121752",
"0.60866773",
"0.6068752",
"0.60267895",
"0.6010579",
"0.59893054",
"0.59571594",
"0.59510034",
"0.594611",
"0.594611",
"0.5925568",
"0.5897414",
"0.58842427",
"0.58490944",
"0.58489... | 0.7052146 | 1 |
Move all zeros to end preserving the order of the other elements. | def move_zeros(array):
zero_count = [x for x in array if x is not False].count(0)
output = [str(x) if type(x) == bool else x for x in array]
for i in range(zero_count):
output.remove(0)
output.append(0)
output = [False if x == 'False' else True if x == 'True' else x for x in output]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def moveZeroes(self, arr: List[int]) -> None: \n n = len(arr)\n p = 0 # 1 + index of last non-zero \n\n for i in range(n):\n if arr[i] != 0:\n arr[p], arr[i] = arr[i], arr[p]\n p += 1",
"def moveZeroes(self, arr: List[int]) -> None:\n ... | [
"0.8006721",
"0.7911105",
"0.78466475",
"0.77641964",
"0.75393814",
"0.75125796",
"0.74570197",
"0.74422294",
"0.7439704",
"0.742724",
"0.7421882",
"0.7418416",
"0.74133617",
"0.7408576",
"0.73860794",
"0.73729116",
"0.73495305",
"0.73492014",
"0.7346823",
"0.731671",
"0.7308... | 0.59174085 | 89 |
checks to see if plugin ends with one of the approved extensions | def plugin_valid(self, filepath):
plugin_valid = False
for extension in self.extensions:
if filepath.endswith(".{}".format(extension)):
plugin_valid = True
break
return plugin_valid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_extension(f):\n parts = f.split('.')\n last = parts[len(parts) - 1]\n return last in allowed_extensions",
"def _valid_extension(self, filename):\n return any(filename.endswith(ext)\n for ext in self.config['document-extensions'])",
"def match_extensions(filename):\n ... | [
"0.6643597",
"0.64637184",
"0.6393964",
"0.6255777",
"0.6175332",
"0.6064237",
"0.6024348",
"0.6024348",
"0.5965252",
"0.59599537",
"0.5956545",
"0.59295714",
"0.59280384",
"0.5886788",
"0.5886743",
"0.5876405",
"0.58606535",
"0.5846253",
"0.580625",
"0.57732165",
"0.5737895"... | 0.69509757 | 0 |
Generates a safe filename that is unlikely to collide with existing objects in Google Cloud Storage. ``filename.ext`` is transformed into ``filenameYYYYMMDDHHMMSS.ext`` | def _safe_filename(filename):
filename = secure_filename(filename)
print("filename==", filename)
date = datetime.datetime.utcnow().strftime("%Y-%m-%d-%H%M%S")
basename, extension = filename.rsplit('.', 1)
return "{0}-{1}.{2}".format(basename, date, extension) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generate_filename(filename: str) -> str:\n return f\"{str(uuid.uuid4())}.{get_extension(filename)}\"",
"def _safe_filename(filename):\n date = datetime.datetime.utcnow().strftime(\"%Y-%m-%d-%H%M%S\")\n basename, extension = filename.rsplit('.', 1)\n return \"{0}-{1}.{2}\".format(basename, date, e... | [
"0.8052555",
"0.769056",
"0.76828915",
"0.76665646",
"0.7511504",
"0.7307701",
"0.7244965",
"0.72310835",
"0.7231079",
"0.7216042",
"0.713338",
"0.709492",
"0.7083384",
"0.7058259",
"0.7026907",
"0.6966633",
"0.6957989",
"0.6943588",
"0.69244134",
"0.6912957",
"0.687451",
"... | 0.7339441 | 5 |
Uploads student groups to CERS. | def upload_groups(self, files: [str]):
self.driver.get("https://reporting.smarterbalanced.org/admin-groups/import")
try:
WebDriverWait(self.driver, 20).until(
EC.presence_of_element_located((By.XPATH, '//*[@id="maincontent"]/admin/div[1]/div[3]'))
)
excep... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def post(self):\n status = ErrorCode.SUCCESS\n try:\n data = DotDict(json_decode(self.request.body))\n logging.info(\"[UWEB] add group request: %s, cid: %s\",\n data, self.current_user.cid)\n except Exception as e:\n status = ErrorCode.I... | [
"0.6017303",
"0.5888294",
"0.57306933",
"0.57162195",
"0.5711353",
"0.5700324",
"0.5668645",
"0.56438005",
"0.56438005",
"0.559475",
"0.5395406",
"0.53644395",
"0.53344285",
"0.53139085",
"0.530605",
"0.5291008",
"0.52417743",
"0.52227694",
"0.52111983",
"0.5175355",
"0.51753... | 0.60769033 | 0 |
Initializes the highpass filter coefficients. | def init_highpass(self, highpass_cutoff, highpass_order):
if highpass_cutoff > 0:
self._highpass_cutoff = highpass_cutoff
self._highpass_order = highpass_order
logging.info('High-pass filtering the data with the 3dB point at %gHz.',
highpass_cutoff)
self._highpass_sos = sc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize_filter(self):\n shape = self.filter_size + (self.input_shape[-1], self.channels)\n self.filter = self.filter_initializer(shape)",
"def init_layers_hpm(self):\n\n self.lin_layers_hpm.append(nn.Linear(8, self.noFeatures_hpm))\n for _ in range(self.noLayers_hpm):\n ... | [
"0.60921943",
"0.6053334",
"0.59129524",
"0.5837251",
"0.5715381",
"0.56990236",
"0.5681693",
"0.56816494",
"0.56448364",
"0.5632115",
"0.561021",
"0.5579306",
"0.5579232",
"0.5563127",
"0.5558202",
"0.55387926",
"0.5531059",
"0.5520201",
"0.5490982",
"0.54672945",
"0.5467294... | 0.6667231 | 0 |
Initializes the lowpass filter coefficients. | def init_lowpass(self, lowpass_cutoff, lowpass_order):
if lowpass_cutoff > 0 or self._fs_out < self._fs_in:
nyquist = self._fs_out / 2
if lowpass_cutoff > nyquist or (self._fs_out < self._fs_in and
lowpass_cutoff == 0):
lowpass_cutoff = 0.75 * nyquist
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize_filter(self):\n shape = self.filter_size + (self.input_shape[-1], self.channels)\n self.filter = self.filter_initializer(shape)",
"def lowpass_filter_reset(self, data):\n zi = scipy.signal.sosfilt_zi(self._lowpass_sos)\n self._lowpass_state = data[0, :] * np.repeat(zi[:, :, np.... | [
"0.6199591",
"0.6034029",
"0.5824562",
"0.582344",
"0.5774787",
"0.5757367",
"0.5736853",
"0.56851816",
"0.5682234",
"0.5672591",
"0.56473774",
"0.56473774",
"0.5644635",
"0.56355757",
"0.56104755",
"0.5572046",
"0.5557288",
"0.55498",
"0.55118257",
"0.55012107",
"0.55012107"... | 0.6687078 | 0 |
Checks that the data is two dimensional. | def check_dims(self, data):
if np.ndim(data) != 2:
raise ValueError('Input data must be a two dimensional numpy array. '
'Data received has shape (%g, %g).' % data.shape) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def enforce_2D(self,):\n for data in (self.data_obs,self.data_fcst):\n shp = data.shape\n if len(shp) == 2:\n pass \n elif len(shp) == 3:\n if shp[0] == 0:\n data = data[0,:,:]\n elif len(shp) == 4:\n ... | [
"0.73666555",
"0.7062117",
"0.67359895",
"0.6722009",
"0.6599858",
"0.65813726",
"0.6474425",
"0.632633",
"0.62990165",
"0.61806625",
"0.61378306",
"0.6115785",
"0.6101256",
"0.6100023",
"0.609897",
"0.60955924",
"0.6053809",
"0.6048571",
"0.6045201",
"0.602571",
"0.6016193",... | 0.7089087 | 1 |
Resets the saved state of the lowpass filter to initial value. | def lowpass_filter_reset(self, data):
zi = scipy.signal.sosfilt_zi(self._lowpass_sos)
self._lowpass_state = data[0, :] * np.repeat(zi[:, :, np.newaxis],
data.shape[1], axis=2)
logging.info('Resetting the low-pass filter state.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def highpass_filter_reset(self, data):\n zi = scipy.signal.sosfilt_zi(self._highpass_sos)\n print('Zi shape: ', zi.shape, data.shape)\n self._highpass_state = data[0, :] * np.repeat(zi[:, :, np.newaxis],\n data.shape[1], axis=2)\n logging.info('Resetting... | [
"0.7355055",
"0.70554733",
"0.7019291",
"0.7019291",
"0.7019291",
"0.7019291",
"0.7019291",
"0.7019291",
"0.7019291",
"0.7019291",
"0.7019291",
"0.7019291",
"0.7019291",
"0.6990414",
"0.68769234",
"0.68476164",
"0.6782124",
"0.671572",
"0.66996545",
"0.66396195",
"0.6509349",... | 0.81522 | 0 |
Shifts the array by the amount specified. Returns the exact size which will be used in the context filled array snipping off pre and post context. | def shift(self, arr, shift_amt, pre_context, post_context):
result = arr[pre_context - shift_amt:arr.shape[0] - post_context -
shift_amt, :]
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _shift(self, arr: np.ndarray, num: int = 1, fill_value: int = 0) -> np.ndarray:\n result = np.empty_like(arr)\n if num > 0:\n result[:num] = fill_value\n result[num:] = arr[:-num]\n elif num < 0:\n result[num:] = fill_value\n result[:num] = arr[-... | [
"0.60650986",
"0.5540114",
"0.549799",
"0.5392648",
"0.53299296",
"0.52849865",
"0.5262103",
"0.52593243",
"0.5223807",
"0.51782805",
"0.5147112",
"0.5131179",
"0.5109844",
"0.5059196",
"0.50228685",
"0.5018626",
"0.50144625",
"0.5013178",
"0.5004431",
"0.4991307",
"0.4985897... | 0.66797286 | 0 |
Returns the daemon's routing id. | def daemonId(self):
return self._did | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_route_id(self):\n\n return self.route_id",
"def transit_router_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"transit_router_id\")",
"def transit_router_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"transit_router_id\")",
"def transit_router_id(self) ->... | [
"0.70236605",
"0.67029995",
"0.67029995",
"0.6511662",
"0.6511662",
"0.6421444",
"0.63769895",
"0.636534",
"0.636534",
"0.63165843",
"0.62729603",
"0.6259995",
"0.623582",
"0.61720383",
"0.612863",
"0.6118391",
"0.60815644",
"0.60395426",
"0.6038037",
"0.59974986",
"0.5989187... | 0.65892357 | 3 |
Return the name of the device if any. | def name(self):
return self._name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def device_name(self) -> Optional[str]:\n return pulumi.get(self, \"device_name\")",
"def device_name(self) -> Optional[str]:\n return pulumi.get(self, \"device_name\")",
"def name(self):\n return self._device.name",
"def name(self):\n return self._device.name",
"def name(self):... | [
"0.89734465",
"0.89734465",
"0.8584627",
"0.8584627",
"0.8584627",
"0.8502048",
"0.84944665",
"0.84194607",
"0.83955586",
"0.83955586",
"0.8379756",
"0.83165",
"0.8306566",
"0.8161454",
"0.81564134",
"0.8090303",
"0.8087526",
"0.8073198",
"0.8006941",
"0.7999654",
"0.79544145... | 0.0 | -1 |
Return the icon to use for device if any. | def icon(self):
return self._icon | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def icon(self):\n if self.device_class:\n return None\n\n return ICONS.get(self.tesla_device.type)",
"def icon(self):\n if not self.device_class:\n return ICONS.get(self.entity_type)\n return None",
"def icon(self):\n return self._sensor[CONF_ICON]",
"... | [
"0.86804223",
"0.8535765",
"0.8172909",
"0.8081788",
"0.7985847",
"0.79603845",
"0.79403204",
"0.7939179",
"0.78972405",
"0.78954154",
"0.78848714",
"0.7862705",
"0.7856938",
"0.78168106",
"0.77871066",
"0.778283",
"0.7768684",
"0.7768159",
"0.7752732",
"0.7743169",
"0.773476... | 0.76574725 | 40 |
Return the state attributes of the device. | def device_state_attributes(self):
return self._state_attrs | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def device_state_attributes(self):\r\n return self.attributes",
"def device_state_attributes(self):\r\n return self._attributes",
"def device_state_attributes(self):\n return self.attr",
"def device_state_attributes(self):\n return self.attr",
"def device_state_attributes(self):... | [
"0.92739",
"0.92050403",
"0.91485494",
"0.91485494",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.91482216",
"0.9137126",
"0.91097206",
"0.90478605",
... | 0.9150762 | 3 |
creates input dictionary for initializing BucketGrid | def preprocess_soildata(pbu, psoil, soiltype, cmask, spatial=True):
# create dict for initializing soil bucket.
# copy pbu into sdata and make each value np.array(np.shape(cmask))
data = pbu.copy()
data.update((x, y*cmask) for x, y in data.items())
if spatial:
for key in psoil.keys():
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_param_grid ( param_grid: Dict ):\n \n return (\n dict ( zip ( param_grid.keys(), instance ) )\n for instance in product ( * param_grid.values() )\n ) # End create_param_grid",
"def create_param_grid ( param_grid: Dict ):\n \n return (\n ... | [
"0.6446676",
"0.6446676",
"0.6374634",
"0.637214",
"0.6358418",
"0.6346081",
"0.6320255",
"0.6320255",
"0.6291068",
"0.61023164",
"0.60573155",
"0.6052129",
"0.6013475",
"0.59874916",
"0.59821045",
"0.59764963",
"0.5971755",
"0.59610194",
"0.5950691",
"0.59452564",
"0.5938756... | 0.0 | -1 |
Creates a JSONoriented Flask app. All error responses that you don't specifically manage yourself will have application/json content | def make_json_app(import_name, **kwargs):
def make_json_error(ex):
response = jsonify(message=str(ex))
response.status_code = (ex.code
if isinstance(ex, HTTPException)
else 500)
return response
app = Flask(import_name, **kw... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_json_app(import_name, **kwargs):\n\n def make_json_error(ex):\n \"\"\"This is an error handler for handling exceptions for the app. It allows\n us to simply handle all the exceptions here as opposed to writing try catches\n everywhere. The ResourceExceptions defined in the app will... | [
"0.8140003",
"0.8090276",
"0.77563775",
"0.70049465",
"0.69091845",
"0.674112",
"0.66742253",
"0.65706575",
"0.6546808",
"0.6541503",
"0.65002114",
"0.64109004",
"0.6404402",
"0.63604534",
"0.63249665",
"0.6312997",
"0.63054514",
"0.6276694",
"0.62707996",
"0.61979383",
"0.61... | 0.7813924 | 3 |
Check parsing default arguments. | def test_parse_arguments_default(self):
self.assertEqual(self.args.python, sys.executable)
self.assertEqual(self.args.pip_packages, [])
self.assertEqual(self.args.number_of_threads, multiprocessing.cpu_count())
self.assertEqual(self.args.cmake_installer,
CMAKE_INSTALLER_URL_BY_HOST_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_defaultValues(self):\n argV = []\n self.usage.parseOptions(argV)\n self.failUnlessEqual(self.usage.opts['fooint'], 392)\n self.assert_(isinstance(self.usage.opts['fooint'], int))\n self.failUnlessEqual(self.usage.opts['foofloat'], 4.23)\n self.assert_(isinstance(s... | [
"0.7749109",
"0.7552549",
"0.74684346",
"0.7454808",
"0.732558",
"0.7318325",
"0.7290239",
"0.72705925",
"0.72633696",
"0.71757084",
"0.71113497",
"0.70579845",
"0.7041866",
"0.7015393",
"0.69624096",
"0.695318",
"0.6952976",
"0.6943805",
"0.6855645",
"0.6851293",
"0.6828953"... | 0.70984864 | 11 |
The set of arguments for constructing a VpnConnection resource. | def __init__(__self__, *,
customer_gateway_id: pulumi.Input[str],
type: pulumi.Input[str],
enable_acceleration: Optional[pulumi.Input[bool]] = None,
local_ipv4_network_cidr: Optional[pulumi.Input[str]] = None,
local_ipv6_network_cidr: ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(__self__,\n resource_name: str,\n args: VpnConnectionArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...",
"def __init__(__self__,\n resource_name: str,\n args: AzureVpcPeeringConnectionArgs,\n ... | [
"0.731037",
"0.6585123",
"0.6437607",
"0.63939846",
"0.608996",
"0.58944416",
"0.57473135",
"0.57381666",
"0.57175004",
"0.5688007",
"0.56475073",
"0.5645246",
"0.56362313",
"0.562427",
"0.55721486",
"0.5561829",
"0.55560964",
"0.55440426",
"0.55417305",
"0.55265874",
"0.5523... | 0.0 | -1 |
The IPv6 CIDR on the customer gateway (onpremises) side of the VPN connection. | def local_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "local_ipv6_network_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remote_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"remote_ipv6_network_cidr\")",
"def local_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"local_ipv6_network_cidr\")",
"def remote_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]... | [
"0.7698268",
"0.7500608",
"0.7466994",
"0.7466994",
"0.6763591",
"0.6640303",
"0.663614",
"0.66028136",
"0.66028136",
"0.65861887",
"0.65861887",
"0.64010787",
"0.63971716",
"0.6322801",
"0.6322801",
"0.6321898",
"0.6273063",
"0.6273063",
"0.6245937",
"0.6192169",
"0.6169089"... | 0.71545017 | 4 |
The IPv6 CIDR on the customer gateway (onpremises) side of the VPN connection. | def remote_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "remote_ipv6_network_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remote_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"remote_ipv6_network_cidr\")",
"def local_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"local_ipv6_network_cidr\")",
"def local_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]:... | [
"0.7697552",
"0.75004095",
"0.71541446",
"0.71541446",
"0.67635435",
"0.66408044",
"0.6637233",
"0.66024804",
"0.66024804",
"0.6587067",
"0.6587067",
"0.6401154",
"0.63963246",
"0.6323707",
"0.6323707",
"0.63223755",
"0.6274057",
"0.6274057",
"0.62456626",
"0.6193318",
"0.616... | 0.74659806 | 3 |
The ID of the EC2 Transit Gateway. | def transit_gateway_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "transit_gateway_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def transit_gateway_id(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"transit_gateway_id\")",
"def customer_gateway_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"customer_gateway_id\")",
"def customer_gateway_id(self) -> pulumi.Input[str]:\n return pulumi.... | [
"0.77109563",
"0.68374014",
"0.6774071",
"0.6565198",
"0.6506538",
"0.6476742",
"0.64519715",
"0.64101785",
"0.63700527",
"0.6362188",
"0.6362188",
"0.6325209",
"0.6325209",
"0.6286719",
"0.6286719",
"0.62769836",
"0.62769836",
"0.6203282",
"0.62010425",
"0.6183842",
"0.61305... | 0.7535274 | 2 |
The CIDR block of the inside IP addresses for the first VPN tunnel. Valid value is a size /30 CIDR block from the 169.254.0.0/16 range. | def tunnel1_inside_cidr(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "tunnel1_inside_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel1_inside_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel1_inside_cidr\")",
"def cidr_block(self):\n return self._cidr_block",
"def tunnel2_inside_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel2_inside_cidr\")",
"def cidr_block(self) ->... | [
"0.7016427",
"0.665906",
"0.6612509",
"0.6580405",
"0.64314246",
"0.6408931",
"0.6408931",
"0.640357",
"0.63860875",
"0.63860875",
"0.63762784",
"0.63627714",
"0.63627714",
"0.63372546",
"0.63333577",
"0.6328523",
"0.6313496",
"0.6307534",
"0.6307534",
"0.6288141",
"0.627249"... | 0.6781747 | 2 |
The CIDR block of the inside IP addresses for the second VPN tunnel. Valid value is a size /30 CIDR block from the 169.254.0.0/16 range. | def tunnel2_inside_cidr(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "tunnel2_inside_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel2_inside_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel2_inside_cidr\")",
"def tunnel1_inside_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel1_inside_cidr\")",
"def destination_cidr_blocks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[st... | [
"0.714804",
"0.683305",
"0.6685314",
"0.6685314",
"0.6553096",
"0.65196973",
"0.65196973",
"0.65155077",
"0.65117997",
"0.6508004",
"0.647947",
"0.64355105",
"0.6369866",
"0.6369866",
"0.6323649",
"0.6323649",
"0.6299725",
"0.62226546",
"0.62139523",
"0.6212417",
"0.6211695",... | 0.6861374 | 1 |
The ID of the Virtual Private Gateway. | def vpn_gateway_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "vpn_gateway_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vpn_gateway_id(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"vpn_gateway_id\")",
"def virtual_network_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"virtual_network_id\")",
"def virtual_network_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.g... | [
"0.75304264",
"0.7052303",
"0.68057877",
"0.6775752",
"0.674715",
"0.67387176",
"0.6720474",
"0.6720474",
"0.6675814",
"0.6650204",
"0.6526526",
"0.6495952",
"0.6495952",
"0.6495952",
"0.6495952",
"0.64949185",
"0.64949185",
"0.6464663",
"0.6464448",
"0.6392832",
"0.63854206"... | 0.7328799 | 1 |
Amazon Resource Name (ARN) of the VPN Connection. | def arn(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "arn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vpc_connection_arn(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"vpc_connection_arn\")",
"def vpc_connector_arn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"vpc_connector_arn\")",
"def connection_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"connec... | [
"0.74765694",
"0.68732995",
"0.62345016",
"0.61736417",
"0.5940908",
"0.59168863",
"0.59168863",
"0.59168863",
"0.59168863",
"0.59168863",
"0.5881076",
"0.5881076",
"0.5881076",
"0.5881076",
"0.5881076",
"0.5881076",
"0.5881076",
"0.5881076",
"0.5881076",
"0.5881076",
"0.5881... | 0.0 | -1 |
The ARN of the core network. | def core_network_arn(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "core_network_arn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def core_network_arn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"core_network_arn\")",
"def core_network_attachment_arn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"core_network_attachment_arn\")",
"def core_network_attachment_arn(self) -> Optional[pulumi.Input[str]]:\n ... | [
"0.8138904",
"0.705585",
"0.6750378",
"0.652826",
"0.652826",
"0.652826",
"0.652826",
"0.652826",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.6471019... | 0.8075296 | 1 |
The ARN of the core network attachment. | def core_network_attachment_arn(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "core_network_attachment_arn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def core_network_attachment_arn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"core_network_attachment_arn\")",
"def core_network_arn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"core_network_arn\")",
"def core_network_arn(self) -> pulumi.Output[str]:\n retur... | [
"0.8120596",
"0.7073153",
"0.7000953",
"0.6442897",
"0.6442897",
"0.6442897",
"0.6442897",
"0.6442897",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"0.6340023",
"... | 0.80989397 | 1 |
The IPv6 CIDR on the customer gateway (onpremises) side of the VPN connection. | def local_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "local_ipv6_network_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remote_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"remote_ipv6_network_cidr\")",
"def local_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"local_ipv6_network_cidr\")",
"def remote_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]... | [
"0.7698268",
"0.7500608",
"0.7466994",
"0.7466994",
"0.6763591",
"0.6640303",
"0.663614",
"0.66028136",
"0.66028136",
"0.65861887",
"0.65861887",
"0.64010787",
"0.63971716",
"0.6322801",
"0.6322801",
"0.6321898",
"0.6273063",
"0.6273063",
"0.6245937",
"0.6192169",
"0.6169089"... | 0.71545017 | 5 |
The IPv6 CIDR on the customer gateway (onpremises) side of the VPN connection. | def remote_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "remote_ipv6_network_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remote_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"remote_ipv6_network_cidr\")",
"def local_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"local_ipv6_network_cidr\")",
"def local_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]:... | [
"0.7697552",
"0.75004095",
"0.71541446",
"0.71541446",
"0.67635435",
"0.66408044",
"0.6637233",
"0.66024804",
"0.66024804",
"0.6587067",
"0.6587067",
"0.6401154",
"0.63963246",
"0.6323707",
"0.6323707",
"0.63223755",
"0.6274057",
"0.6274057",
"0.62456626",
"0.6193318",
"0.616... | 0.74659806 | 2 |
A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. | def tags_all(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
return pulumi.get(self, "tags_all") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.... | [
"0.7442823",
"0.7442823",
"0.74370617",
"0.74370617",
"0.74370617",
"0.74370617",
"0.71592355",
"0.7096149",
"0.70815766",
"0.7057144",
"0.6929948",
"0.6916225",
"0.6825148",
"0.6796402",
"0.6753723",
"0.67007154",
"0.66302156",
"0.66302156",
"0.66302156",
"0.66302156",
"0.66... | 0.0 | -1 |
When associated with an EC2 Transit Gateway (`transit_gateway_id` argument), the attachment ID. See also the `ec2.Tag` resource for tagging the EC2 Transit Gateway VPN Attachment. | def transit_gateway_attachment_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "transit_gateway_attachment_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def transit_gateway_attachment_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"transit_gateway_attachment_id\")",
"def transport_transit_gateway_attachment_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"transport_transit_gateway_attachment_id\")",
"def transport_... | [
"0.81986785",
"0.8013972",
"0.8013972",
"0.7929556",
"0.7701944",
"0.75006163",
"0.7461611",
"0.55723244",
"0.55583113",
"0.55149126",
"0.5506228",
"0.55059326",
"0.55059326",
"0.54744273",
"0.5458855",
"0.53405225",
"0.5332205",
"0.53238535",
"0.5311848",
"0.52732617",
"0.52... | 0.81563026 | 1 |
The ID of the EC2 Transit Gateway. | def transit_gateway_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "transit_gateway_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def transit_gateway_id(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"transit_gateway_id\")",
"def customer_gateway_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"customer_gateway_id\")",
"def customer_gateway_id(self) -> pulumi.Input[str]:\n return pulumi.... | [
"0.77109563",
"0.68374014",
"0.6774071",
"0.6565198",
"0.6506538",
"0.6476742",
"0.64519715",
"0.64101785",
"0.63700527",
"0.6362188",
"0.6362188",
"0.6325209",
"0.6325209",
"0.6286719",
"0.6286719",
"0.62769836",
"0.62769836",
"0.6203282",
"0.62010425",
"0.6183842",
"0.61305... | 0.7535274 | 1 |
The bgp asn number of the first VPN tunnel. | def tunnel1_bgp_asn(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "tunnel1_bgp_asn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel1_bgp_asn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel1_bgp_asn\")",
"def tunnel2_bgp_asn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel2_bgp_asn\")",
"def tunnel2_bgp_asn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"tunnel... | [
"0.79078877",
"0.7381477",
"0.7231047",
"0.6346366",
"0.5860934",
"0.56776386",
"0.55632526",
"0.5531178",
"0.54982203",
"0.54764783",
"0.546485",
"0.54383606",
"0.54009765",
"0.53906286",
"0.5361961",
"0.5357477",
"0.53533304",
"0.53370494",
"0.5328448",
"0.5314291",
"0.5302... | 0.768812 | 1 |
The CIDR block of the inside IP addresses for the first VPN tunnel. Valid value is a size /30 CIDR block from the 169.254.0.0/16 range. | def tunnel1_inside_cidr(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "tunnel1_inside_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel1_inside_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel1_inside_cidr\")",
"def cidr_block(self):\n return self._cidr_block",
"def tunnel2_inside_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel2_inside_cidr\")",
"def cidr_block(self) ->... | [
"0.7017714",
"0.66601926",
"0.66141486",
"0.65811837",
"0.64329946",
"0.64102334",
"0.64102334",
"0.6404313",
"0.63873947",
"0.63873947",
"0.637777",
"0.63640887",
"0.63640887",
"0.6339063",
"0.6334525",
"0.632987",
"0.631518",
"0.6308903",
"0.6308903",
"0.6289872",
"0.627341... | 0.6782638 | 1 |
The bgp asn number of the second VPN tunnel. | def tunnel2_bgp_asn(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "tunnel2_bgp_asn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel2_bgp_asn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel2_bgp_asn\")",
"def tunnel1_bgp_asn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel1_bgp_asn\")",
"def tunnel1_bgp_asn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"tunnel... | [
"0.82047236",
"0.7711151",
"0.73844504",
"0.65112305",
"0.54744256",
"0.5451773",
"0.54355806",
"0.5380673",
"0.5361815",
"0.53596795",
"0.5310258",
"0.5307778",
"0.52834463",
"0.52610624",
"0.5260827",
"0.5240159",
"0.52191377",
"0.5197666",
"0.51772213",
"0.5164431",
"0.515... | 0.7964547 | 1 |
The CIDR block of the inside IP addresses for the second VPN tunnel. Valid value is a size /30 CIDR block from the 169.254.0.0/16 range. | def tunnel2_inside_cidr(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "tunnel2_inside_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel2_inside_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel2_inside_cidr\")",
"def tunnel1_inside_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel1_inside_cidr\")",
"def destination_cidr_blocks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[st... | [
"0.714804",
"0.683305",
"0.6685314",
"0.6685314",
"0.6553096",
"0.65196973",
"0.65196973",
"0.65155077",
"0.65117997",
"0.6508004",
"0.647947",
"0.64355105",
"0.6369866",
"0.6369866",
"0.6323649",
"0.6323649",
"0.6299725",
"0.62226546",
"0.62139523",
"0.6212417",
"0.6211695",... | 0.6861374 | 2 |
The ID of the Virtual Private Gateway. | def vpn_gateway_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "vpn_gateway_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vpn_gateway_id(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"vpn_gateway_id\")",
"def virtual_network_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"virtual_network_id\")",
"def virtual_network_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.g... | [
"0.7529674",
"0.70554924",
"0.68088126",
"0.67748487",
"0.6750356",
"0.6737894",
"0.67246073",
"0.67246073",
"0.6678295",
"0.66497326",
"0.6525514",
"0.649866",
"0.649866",
"0.649866",
"0.649866",
"0.6493885",
"0.6493885",
"0.6468063",
"0.646742",
"0.6395016",
"0.6388723",
... | 0.7327829 | 2 |
Amazon Resource Name (ARN) of the VPN Connection. | def arn(self) -> pulumi.Output[str]:
return pulumi.get(self, "arn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vpc_connection_arn(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"vpc_connection_arn\")",
"def vpc_connector_arn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"vpc_connector_arn\")",
"def connection_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"connec... | [
"0.74765694",
"0.68732995",
"0.62345016",
"0.61736417",
"0.5940908",
"0.59168863",
"0.59168863",
"0.59168863",
"0.59168863",
"0.59168863",
"0.58728045",
"0.5836918",
"0.5815152",
"0.57553536",
"0.5742637",
"0.5639502",
"0.5639502",
"0.5636392",
"0.56177837",
"0.5571834",
"0.5... | 0.5881076 | 19 |
The ARN of the core network. | def core_network_arn(self) -> pulumi.Output[str]:
return pulumi.get(self, "core_network_arn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def core_network_arn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"core_network_arn\")",
"def core_network_attachment_arn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"core_network_attachment_arn\")",
"def core_network_attachment_arn(self) -> Optional[pulumi.Input[s... | [
"0.8075296",
"0.705585",
"0.6750378",
"0.652826",
"0.652826",
"0.652826",
"0.652826",
"0.652826",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.64710194",
"0.6471019... | 0.8138904 | 0 |
The ARN of the core network attachment. | def core_network_attachment_arn(self) -> pulumi.Output[str]:
return pulumi.get(self, "core_network_attachment_arn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def core_network_attachment_arn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"core_network_attachment_arn\")",
"def core_network_arn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"core_network_arn\")",
"def core_network_arn(self) -> pulumi.Output[str]:\n ... | [
"0.809629",
"0.70719075",
"0.69999784",
"0.6438654",
"0.6438654",
"0.6438654",
"0.6438654",
"0.6438654",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
"0.6335734",
... | 0.8118196 | 0 |
The IPv6 CIDR on the customer gateway (onpremises) side of the VPN connection. | def local_ipv6_network_cidr(self) -> pulumi.Output[str]:
return pulumi.get(self, "local_ipv6_network_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remote_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"remote_ipv6_network_cidr\")",
"def remote_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"remote_ipv6_network_cidr\")",
"def remote_ipv6_network_cidr(self) -> Optional[pulumi.... | [
"0.7698268",
"0.7466994",
"0.7466994",
"0.71545017",
"0.71545017",
"0.6763591",
"0.6640303",
"0.663614",
"0.66028136",
"0.66028136",
"0.65861887",
"0.65861887",
"0.64010787",
"0.63971716",
"0.6322801",
"0.6322801",
"0.6321898",
"0.6273063",
"0.6273063",
"0.6245937",
"0.619216... | 0.7500608 | 1 |
The IPv6 CIDR on the customer gateway (onpremises) side of the VPN connection. | def remote_ipv6_network_cidr(self) -> pulumi.Output[str]:
return pulumi.get(self, "remote_ipv6_network_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def local_ipv6_network_cidr(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"local_ipv6_network_cidr\")",
"def remote_ipv6_network_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"remote_ipv6_network_cidr\")",
"def remote_ipv6_network_cidr(self) -> Optional[pulumi.In... | [
"0.7500608",
"0.7466994",
"0.7466994",
"0.71545017",
"0.71545017",
"0.6763591",
"0.6640303",
"0.663614",
"0.66028136",
"0.66028136",
"0.65861887",
"0.65861887",
"0.64010787",
"0.63971716",
"0.6322801",
"0.6322801",
"0.6321898",
"0.6273063",
"0.6273063",
"0.6245937",
"0.619216... | 0.7698268 | 0 |
A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. | def tags_all(self) -> pulumi.Output[Mapping[str, str]]:
return pulumi.get(self, "tags_all") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")",
"def tags(self) -> Mapping[str, str]:\n return pulumi.... | [
"0.7442348",
"0.7442348",
"0.7436567",
"0.7436567",
"0.7436567",
"0.7436567",
"0.7157839",
"0.7095276",
"0.708116",
"0.7056308",
"0.6929604",
"0.6916034",
"0.6824019",
"0.6797285",
"0.6752278",
"0.670053",
"0.6629713",
"0.6629713",
"0.6629713",
"0.6629713",
"0.6629713",
"0.... | 0.6410202 | 56 |
When associated with an EC2 Transit Gateway (`transit_gateway_id` argument), the attachment ID. See also the `ec2.Tag` resource for tagging the EC2 Transit Gateway VPN Attachment. | def transit_gateway_attachment_id(self) -> pulumi.Output[str]:
return pulumi.get(self, "transit_gateway_attachment_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def transit_gateway_attachment_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"transit_gateway_attachment_id\")",
"def transport_transit_gateway_attachment_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"transport_transit_gateway_attachment_id\")",
"def t... | [
"0.81563026",
"0.8013972",
"0.8013972",
"0.7929556",
"0.7701944",
"0.75006163",
"0.7461611",
"0.55723244",
"0.55583113",
"0.55149126",
"0.5506228",
"0.55059326",
"0.55059326",
"0.54744273",
"0.5458855",
"0.53405225",
"0.5332205",
"0.53238535",
"0.5311848",
"0.52732617",
"0.52... | 0.81986785 | 0 |
The ID of the EC2 Transit Gateway. | def transit_gateway_id(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "transit_gateway_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def transit_gateway_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"transit_gateway_id\")",
"def transit_gateway_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"transit_gateway_id\")",
"def customer_gateway_id(self) -> pulumi.Output[str]:\n return ... | [
"0.7535274",
"0.7535274",
"0.68374014",
"0.6774071",
"0.6565198",
"0.6506538",
"0.6476742",
"0.64519715",
"0.64101785",
"0.63700527",
"0.6362188",
"0.6362188",
"0.6325209",
"0.6325209",
"0.6286719",
"0.6286719",
"0.62769836",
"0.62769836",
"0.6203282",
"0.62010425",
"0.618384... | 0.77109563 | 0 |
The bgp asn number of the first VPN tunnel. | def tunnel1_bgp_asn(self) -> pulumi.Output[str]:
return pulumi.get(self, "tunnel1_bgp_asn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel1_bgp_asn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"tunnel1_bgp_asn\")",
"def tunnel2_bgp_asn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel2_bgp_asn\")",
"def tunnel2_bgp_asn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self,... | [
"0.768812",
"0.7381477",
"0.7231047",
"0.6346366",
"0.5860934",
"0.56776386",
"0.55632526",
"0.5531178",
"0.54982203",
"0.54764783",
"0.546485",
"0.54383606",
"0.54009765",
"0.53906286",
"0.5361961",
"0.5357477",
"0.53533304",
"0.53370494",
"0.5328448",
"0.5314291",
"0.530293... | 0.79078877 | 0 |
The CIDR block of the inside IP addresses for the first VPN tunnel. Valid value is a size /30 CIDR block from the 169.254.0.0/16 range. | def tunnel1_inside_cidr(self) -> pulumi.Output[str]:
return pulumi.get(self, "tunnel1_inside_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel1_inside_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"tunnel1_inside_cidr\")",
"def tunnel1_inside_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"tunnel1_inside_cidr\")",
"def cidr_block(self):\n return self._cidr_block",
"def t... | [
"0.6781747",
"0.6781747",
"0.665906",
"0.6612509",
"0.6580405",
"0.64314246",
"0.6408931",
"0.6408931",
"0.640357",
"0.63860875",
"0.63860875",
"0.63762784",
"0.63627714",
"0.63627714",
"0.63372546",
"0.63333577",
"0.6328523",
"0.6313496",
"0.6307534",
"0.6307534",
"0.6288141... | 0.7016427 | 0 |
The bgp asn number of the second VPN tunnel. | def tunnel2_bgp_asn(self) -> pulumi.Output[str]:
return pulumi.get(self, "tunnel2_bgp_asn") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel2_bgp_asn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"tunnel2_bgp_asn\")",
"def tunnel1_bgp_asn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"tunnel1_bgp_asn\")",
"def tunnel1_bgp_asn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self,... | [
"0.7964547",
"0.7711151",
"0.73844504",
"0.65112305",
"0.54744256",
"0.5451773",
"0.54355806",
"0.5380673",
"0.5361815",
"0.53596795",
"0.5310258",
"0.5307778",
"0.52834463",
"0.52610624",
"0.5260827",
"0.5240159",
"0.52191377",
"0.5197666",
"0.51772213",
"0.5164431",
"0.5154... | 0.82047236 | 0 |
The CIDR block of the inside IP addresses for the second VPN tunnel. Valid value is a size /30 CIDR block from the 169.254.0.0/16 range. | def tunnel2_inside_cidr(self) -> pulumi.Output[str]:
return pulumi.get(self, "tunnel2_inside_cidr") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tunnel2_inside_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"tunnel2_inside_cidr\")",
"def tunnel2_inside_cidr(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"tunnel2_inside_cidr\")",
"def tunnel1_inside_cidr(self) -> pulumi.Output[str]:\n ret... | [
"0.68614393",
"0.68614393",
"0.6832952",
"0.66854405",
"0.66854405",
"0.6553591",
"0.65191305",
"0.65191305",
"0.6515359",
"0.65115356",
"0.6507346",
"0.6478744",
"0.64339286",
"0.6368983",
"0.6368983",
"0.6322598",
"0.6322598",
"0.6298821",
"0.6221771",
"0.6213176",
"0.62114... | 0.7148601 | 0 |
The ID of the Virtual Private Gateway. | def vpn_gateway_id(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "vpn_gateway_id") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vpn_gateway_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"vpn_gateway_id\")",
"def vpn_gateway_id(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"vpn_gateway_id\")",
"def virtual_network_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, ... | [
"0.7328799",
"0.7328799",
"0.7052303",
"0.68057877",
"0.6775752",
"0.674715",
"0.67387176",
"0.6720474",
"0.6720474",
"0.6675814",
"0.6650204",
"0.6526526",
"0.6495952",
"0.6495952",
"0.6495952",
"0.6495952",
"0.64949185",
"0.64949185",
"0.6464663",
"0.6464448",
"0.6392832",
... | 0.75304264 | 0 |
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 _chunk(self, l, n):\n for i in range(0, len(l) + 1, n):\n yield l[i:i + n]",
"def chunks(self, l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]",
"def __chunks(l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]",
"def get_chunks(self, ... | [
"0.8038813",
"0.79248375",
"0.7923423",
"0.7885103",
"0.78773195",
"0.7815877",
"0.77655786",
"0.77556044",
"0.77441615",
"0.7731815",
"0.77288336",
"0.772473",
"0.77028215",
"0.76889825",
"0.76889825",
"0.7664208",
"0.76570904",
"0.7655856",
"0.7655856",
"0.76458347",
"0.764... | 0.7448925 | 57 |
Loads and returns a Database instance | def connect(filename=DATABASE_FILENAME):
if not path.exists(filename):
raise FileNotFoundError("Database file not found: " + filename)
with open(filename, 'r', encoding="utf-8") as f:
return Database(json.load(f)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_database() -> Database:\n db_config = DatabaseConfig(DB_NAME)\n return connect_to_db(db_config)",
"def get_database(self, database, instance=None):\n return self._get(_database.Database, database)",
"def db(self) -> Database:\n return self.impl.db",
"def get_db():\n db = getatt... | [
"0.8056525",
"0.7815495",
"0.76620543",
"0.75747436",
"0.7544898",
"0.7515659",
"0.75067353",
"0.75053966",
"0.7499105",
"0.7479438",
"0.74680483",
"0.74615663",
"0.7446763",
"0.7435681",
"0.7427458",
"0.74121463",
"0.7408707",
"0.73980874",
"0.7334929",
"0.7312327",
"0.72952... | 0.71119285 | 57 |
Gets the value of the "Overwrite original file" option. | def overwrite_original_file(self):
return self.__overwrite_original_file | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def overwrite_original_file(self, value):\n self.__overwrite_original_file = value",
"def save_original(self, filename):\n return self.form.save_original(filename)",
"def save_original(self, filename):\n return self.form.save_original(filename)",
"def get_save_name():\n if ARGV.get(FI... | [
"0.66568184",
"0.5718603",
"0.5718603",
"0.56595886",
"0.56218517",
"0.56051457",
"0.56011146",
"0.55300474",
"0.55206215",
"0.5513702",
"0.54207796",
"0.54207796",
"0.54207796",
"0.54207796",
"0.5414083",
"0.53494525",
"0.5336415",
"0.5252106",
"0.5177206",
"0.5125673",
"0.5... | 0.70325786 | 0 |
Check if the invited user is already a registered. | def find_invited_user(email, default=None):
User = apps.get_model(settings.AUTH_USER_MODEL)
try:
return User.objects.get(email=email)
except User.DoesNotExist:
return default | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_registered(self):\n if self.user == getpass.getuser():\n return True\n else:\n return False",
"def registered(cls, username):\n if any(usr['username'] == username for usr in cls.getall().values()):\n return True\n return False",
"def is_user_r... | [
"0.7315683",
"0.71799815",
"0.7079114",
"0.686534",
"0.6810188",
"0.6780732",
"0.66541135",
"0.6634678",
"0.66094506",
"0.65907896",
"0.6580747",
"0.6577193",
"0.65472037",
"0.6544452",
"0.65441126",
"0.6527143",
"0.65217596",
"0.65051585",
"0.6502127",
"0.6448439",
"0.642082... | 0.0 | -1 |
Create 3D array for rgb image. | def make_cube(r, g, b):
ny, nx = r.shape
R = np.zeros([ny, nx, 3])
R[:,:,0] = r
G = np.zeros_like(R)
G[:,:,1] = g
B = np.zeros_like(R)
B[:,:,2] = b
RGB = R + G + B
return R, G, B, RGB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_rgb_image_as_3d_array(filename):\n image = np.asarray(Image.open(filename))\n image_shape = image.shape\n image_dim = len(image_shape)\n assert(image_dim == 2 or image_dim == 3)\n if(image_dim == 2):\n image = np.expand_dims(image, axis = 0)\n else:\n # transpose rgb imag... | [
"0.74162394",
"0.6640752",
"0.6635472",
"0.65799415",
"0.6535928",
"0.6494625",
"0.641184",
"0.63740444",
"0.6344131",
"0.634196",
"0.6316698",
"0.6267741",
"0.6144522",
"0.6131094",
"0.6129697",
"0.6104402",
"0.6077437",
"0.60736644",
"0.6044527",
"0.59690326",
"0.5963764",
... | 0.57001495 | 45 |
Return an ast.Node object for each type (ast.Class and ast.Interface types) from which an ast.Class might inherit methods, properties, and signals. | def get_inheritable_types(self, node):
assert isinstance(node, ast.Class)
parent_chain = self.get_class_hierarchy(node)
types = []
for p in parent_chain:
types += [self._transformer.lookup_typenode(t) for t in p.interfaces]
types += [t for t in parent_chain if t is ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find_all(m, cls):\n return [node for node in ast.walk(m) if isinstance(node, cls)]",
"def node_catalogue():\r\n\r\n classes = node_subclasses(Node)\r\n\r\n catalogue = {}\r\n\r\n for node_class in classes:\r\n try:\r\n name = node_class.identifier()\r\n except AttributeEr... | [
"0.6476253",
"0.6236125",
"0.6189793",
"0.6180551",
"0.6113858",
"0.608823",
"0.60774124",
"0.59592044",
"0.5929762",
"0.58727276",
"0.58634746",
"0.58412206",
"0.5833649",
"0.58295995",
"0.5811424",
"0.578187",
"0.5775951",
"0.5770975",
"0.57596993",
"0.57578236",
"0.5748804... | 0.6806227 | 0 |
datatype convert to float32 | def data_convert2float32 (self, data):
data = data.astype(np.float32)
return data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ts_float32(val):\n return np.float64(val)",
"def read_float32(self):\n return self.read(BitTypes.FLOAT_LE_32.value)",
"def to_float32(elem):\n return elem.astype(np.float32)",
"def to_float32(n):\n return np.cast[\"float32\"](n)",
"def _convert_samples_to_float32(samples):\n floa... | [
"0.79080874",
"0.77705127",
"0.7767106",
"0.76942176",
"0.722258",
"0.7135558",
"0.7007537",
"0.69296086",
"0.6889001",
"0.6867257",
"0.6835214",
"0.67052007",
"0.6675407",
"0.66346425",
"0.663234",
"0.6590175",
"0.6585737",
"0.6519432",
"0.6484751",
"0.6446361",
"0.6402827",... | 0.81877494 | 0 |
Determines if the current value is numeric or a string | def get_data_type(col_val):
dtype = ""
original_col_val = col_val
digits_only = col_val.replace('-', '',1).replace(',', '', -1).replace(".", "")
if digits_only.isdigit():
try:
int(original_col_val)
dtype = TYPE_INT
except ValueError:
dtype = TYPE_FLOA... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_numeric(value):\n return isinstance(value, int) or isinstance(value, float)",
"def isnumeric(self):\n return isnumeric(self)",
"def is_valid_numeric(inString):\r\n return is_int(inString) or is_float(inString)",
"def is_numeric(val):\n if \\\n isinstance(val, int) or \\\n isins... | [
"0.7764652",
"0.7659122",
"0.7444794",
"0.7422251",
"0.7313301",
"0.72892016",
"0.72480965",
"0.7234602",
"0.7198991",
"0.7166092",
"0.7144032",
"0.71439517",
"0.712564",
"0.71012694",
"0.7098821",
"0.7090567",
"0.70714295",
"0.7044127",
"0.7040214",
"0.7008136",
"0.6997629",... | 0.0 | -1 |
get the month based on the `month_num`. | def last_n_months(self, month_num=1):
return [
timezone.now() - datetime.timedelta(days=month_num*30),
timezone.now()
] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getMonth(num):\n\n months = {\n '01': 'January',\n '02': 'February',\n '03': 'March',\n '04': 'April',\n '05': 'May',\n '06': 'June',\n '07': 'July',\n '08': 'August',\n '09... | [
"0.8243086",
"0.8069375",
"0.75774485",
"0.71641046",
"0.70633733",
"0.702604",
"0.7004925",
"0.698622",
"0.6948402",
"0.69278157",
"0.68902194",
"0.688973",
"0.68791807",
"0.6855659",
"0.68505776",
"0.6814611",
"0.6734037",
"0.6732107",
"0.67114365",
"0.6708598",
"0.6577796"... | 0.0 | -1 |
Test an authenticated user can successfully disike an article | def test_a_user_can_dislike_an_article(self):
article = self.create_article()
slug = article.data['data']['slug']
dislike = self.client.post('/api/articles/{}/dislike/'.format(slug),
HTTP_AUTHORIZATION='Bearer ' +
self.token,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_delete_of_an_escalated_article_with_user(self):\n token = self.user1.token()\n self.client.credentials(\n HTTP_AUTHORIZATION='Bearer ' + token)\n resp = self.delete_article()\n self.assertEqual(resp.status_code, status.HTTP_403_FORBIDDEN)\n self.assertEqual(re... | [
"0.76599693",
"0.7488533",
"0.7343842",
"0.7274393",
"0.71432763",
"0.71315646",
"0.70924294",
"0.6965053",
"0.67695296",
"0.6756026",
"0.67477727",
"0.67469674",
"0.6741063",
"0.6728192",
"0.6694407",
"0.66331565",
"0.65973914",
"0.65883726",
"0.65408677",
"0.65358084",
"0.6... | 0.75322706 | 1 |
Test an unauthenticated user cannot dislike article | def test_an_unauthenticated_user_cannot_dislike_article(self):
article = self.create_article()
slug = article.data['data']['slug']
dislike = self.client.post('/api/articles/{}/dislike/'.format(slug),
format='json')
self.assertEqual(
dislik... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_unauthenticated_user_disliking(self):\n self.like_dislike(self.like_url(6))",
"def test_unauthenticated_user_liking(self):\n self.like_dislike(self.dislike_url(5))",
"def test_an_unauthenticated_user_cannot_like_article(self):\n article = self.create_article()\n\n slug = ar... | [
"0.8480901",
"0.846532",
"0.8088589",
"0.7826586",
"0.7767736",
"0.7251882",
"0.7167571",
"0.70204264",
"0.6927487",
"0.6915274",
"0.68563825",
"0.67614573",
"0.66728544",
"0.66494817",
"0.65903574",
"0.65135556",
"0.65135556",
"0.65135556",
"0.65135556",
"0.6446287",
"0.6409... | 0.8569785 | 0 |
Randomly selects neighbor from equally minimal neighbors. | def random_minimum_neighbor(conflicts):
np.random.seed(None)
min_conflict = np.min(conflicts)
min_conflict_locs = np.where(conflicts == min_conflict)[0]
# print("choices: {}".format(len(min_conflict_locs)))
return np.random.choice(min_conflict_locs, 1)[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def random_neighbors(self) -> int:\n return self.__random_neighbors",
"def randomNeighbor(s):\n s=random.randint( int(pow(10,-5)), int(pow(10,5)))\n return s",
"def random(self):\n adj = self.adjacent()\n self.switch(random.choice([pos for pos in adj if self.in_grid(pos) and pos ... | [
"0.70631695",
"0.69951177",
"0.6891632",
"0.68835306",
"0.6824488",
"0.68015665",
"0.67509687",
"0.67185",
"0.66712016",
"0.6635483",
"0.6635483",
"0.6620281",
"0.660575",
"0.6396343",
"0.6359101",
"0.6322195",
"0.6259466",
"0.62402123",
"0.6239448",
"0.61812615",
"0.617055",... | 0.6946225 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.