query stringlengths 10 2k | document stringlengths 20 51.2k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Returns the sequence length in this tree sequence. This defines the genomic scale over which tree coordinates are defined. Given a | def sequence_length(self):
return self.get_sequence_length() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_tree_length(x):\n length = list(self.__plan_graph.objects(subject=x, predicate=AGORA.length)).pop()\n return length",
"def get_per_seq_length(self, sequence):\n\n used = tf.sign(tf.abs(sequence))\n length = tf.reduce_sum(used, reduction_indices=1)\n leng... | [
"0.70881295",
"0.707505",
"0.6852752",
"0.6581405",
"0.6574371",
"0.65720034",
"0.6485082",
"0.64120716",
"0.6380342",
"0.6372784",
"0.6359443",
"0.6355205",
"0.63446677",
"0.63123727",
"0.6308892",
"0.6306036",
"0.62965506",
"0.62855643",
"0.62820464",
"0.6249412",
"0.624549... | 0.6757051 | 3 |
Returns the number of distinct trees in this tree sequence. This | def num_trees(self):
return self._ll_tree_sequence.get_num_trees() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def count_unique(self) -> int:\n if self.root is None: # If tree is empty\n return 0\n\n q = Queue()\n return self.unique_helper(self.root, q)",
"def count_unique(self) -> int:\n # Binary Search Tree == empty\n if self.root is None:\n return 0\n\n ... | [
"0.8076972",
"0.78695005",
"0.7493347",
"0.7302242",
"0.7215609",
"0.71531236",
"0.7127944",
"0.70994",
"0.6979008",
"0.69272214",
"0.68818897",
"0.684839",
"0.6825718",
"0.6783786",
"0.67698747",
"0.6748462",
"0.6725928",
"0.66809595",
"0.6674762",
"0.6668384",
"0.6632538",
... | 0.7530799 | 2 |
Returns the breakpoints that separate trees along the chromosome, including the two extreme points 0 and L. This is equivalent to >>> iter([0] + [t.interval.right for t in self.trees()]) By default we return an iterator over the breakpoints as Python float objects; if ``as_array`` is True we return them as a numpy arra... | def breakpoints(self, as_array=False):
breakpoints = self.ll_tree_sequence.get_breakpoints()
if not as_array:
# Convert to Python floats for backward compatibility.
breakpoints = map(float, breakpoints)
return breakpoints | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def binary_trees(self):\n for ip in self.lower_contained_intervals():\n yield ip.upper_binary_tree()",
"def find_breaks(self, time=None):\n if time is None:\n time = self.time\n diff = np.diff(time)\n ind = np.where((diff >= 2.5*np.std(diff)+np.nanmean(diff)))[0... | [
"0.5284244",
"0.48869777",
"0.48465636",
"0.48159292",
"0.472253",
"0.47032624",
"0.47031304",
"0.4685331",
"0.46752793",
"0.46584305",
"0.4646784",
"0.4646784",
"0.4644145",
"0.46395525",
"0.4632271",
"0.46194962",
"0.46112263",
"0.4602534",
"0.45954868",
"0.4594559",
"0.459... | 0.73138636 | 0 |
Returns the tree covering the specified genomic location. The returned tree will have ``tree.interval.left`` <= ``position`` < ``tree.interval.right``. | def at(self, position, **kwargs):
tree = Tree(self, **kwargs)
tree.seek(position)
return tree | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_rand_tree(position):\n max_width = random.randint(50, 100)\n min_width = random.randint(5, 10)\n itter_width = random.randint(5, 20)\n itter_height = random.randint(5, 20)\n random_tree = Tree(max_width, min_width, itter_width,\n itter_height)\n random_tree.loc_trans... | [
"0.6250308",
"0.5743139",
"0.5281273",
"0.52278715",
"0.5220417",
"0.509073",
"0.50863886",
"0.5030011",
"0.5015903",
"0.49898323",
"0.49448988",
"0.49328783",
"0.49303725",
"0.492744",
"0.4915386",
"0.49112505",
"0.49106944",
"0.48689145",
"0.4857485",
"0.48550114",
"0.47906... | 0.57501644 | 1 |
Efficient access to the ``left`` column in the | def edges_left(self):
return self._edges_left | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def left(self):\n x, y = (self.loc[0] - 1, self.loc[1])\n\n if x < 0:\n return None # None\n\n return self.garden.cells[y][x]",
"def get_left(self):\n return self.left",
"def left(self):\n\t\treturn self._left",
"def left(self):\n return self.l",
"def _left(se... | [
"0.7469569",
"0.7296153",
"0.72578543",
"0.7213576",
"0.71540976",
"0.71256095",
"0.7085798",
"0.7085798",
"0.70628655",
"0.70070934",
"0.7004022",
"0.7004022",
"0.68328327",
"0.67451704",
"0.67451704",
"0.6740439",
"0.67277366",
"0.6709388",
"0.66557616",
"0.6649745",
"0.664... | 0.60548013 | 65 |
Efficient access to the ``right`` column in the | def edges_right(self):
return self._edges_right | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def right(self):\n\t\treturn self._right",
"def get_right(self):\n return self.right",
"def get_right(self):\n return self.__right",
"def getRight(self):\n return self.right",
"def right(self):\n return self._right",
"def right(self):\n return self._right",
"def _righ... | [
"0.75842315",
"0.7529348",
"0.7409027",
"0.73787165",
"0.73700565",
"0.73700565",
"0.72629035",
"0.71721977",
"0.7112459",
"0.71065307",
"0.71065307",
"0.70071214",
"0.6982764",
"0.6963648",
"0.6940631",
"0.6912781",
"0.68557644",
"0.68557644",
"0.68005884",
"0.6727461",
"0.6... | 0.6010289 | 68 |
Efficient access to the ``left`` column in the | def migrations_left(self):
return self._migrations_left | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def left(self):\n x, y = (self.loc[0] - 1, self.loc[1])\n\n if x < 0:\n return None # None\n\n return self.garden.cells[y][x]",
"def get_left(self):\n return self.left",
"def left(self):\n\t\treturn self._left",
"def left(self):\n return self.l",
"def _left(se... | [
"0.7469569",
"0.7296153",
"0.72578543",
"0.7213576",
"0.71540976",
"0.71256095",
"0.7085798",
"0.7085798",
"0.70628655",
"0.70070934",
"0.7004022",
"0.7004022",
"0.68328327",
"0.67451704",
"0.67451704",
"0.6740439",
"0.67277366",
"0.6709388",
"0.66557616",
"0.6649745",
"0.664... | 0.0 | -1 |
Efficient access to the ``right`` column in the | def migrations_right(self):
return self._migrations_right | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def right(self):\n\t\treturn self._right",
"def get_right(self):\n return self.right",
"def get_right(self):\n return self.__right",
"def getRight(self):\n return self.right",
"def right(self):\n return self._right",
"def right(self):\n return self._right",
"def _righ... | [
"0.75842315",
"0.7529348",
"0.7409027",
"0.73787165",
"0.73700565",
"0.73700565",
"0.72629035",
"0.71721977",
"0.7112459",
"0.71065307",
"0.71065307",
"0.70071214",
"0.6982764",
"0.6963648",
"0.6940631",
"0.6912781",
"0.68557644",
"0.68557644",
"0.68005884",
"0.6727461",
"0.6... | 0.6000813 | 71 |
Returns a simplified tree sequence that retains only the history of the nodes given in the list ``samples``. If ``map_nodes`` is true, also return a numpy array whose ``u``th element is the ID of the node in the simplified tree sequence that corresponds to node ``u`` in the | def simplify(
self,
samples=None,
*,
map_nodes=False,
reduce_to_site_topology=False,
filter_populations=None,
filter_individuals=None,
filter_sites=None,
filter_nodes=None,
update_sample_flags=None,
keep_unary=False,
keep_un... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def predict(tree, samples):\n ret = np.empty(samples.shape[0], dtype=float)\n ret.fill(-1)\n indices = np.arange(samples.shape[0])\n\n def tranverse(node, indices):\n nonlocal samples\n nonlocal ret\n\n if node['leaf']:\n ret[indices] = node['class']\n\n else:\n ... | [
"0.54556483",
"0.48020166",
"0.47507343",
"0.46915585",
"0.46181074",
"0.45964795",
"0.45849374",
"0.45764282",
"0.45518264",
"0.45434403",
"0.45379174",
"0.44951925",
"0.44686627",
"0.44523057",
"0.44497302",
"0.44371644",
"0.44355956",
"0.44289804",
"0.440221",
"0.43840438",
... | 0.6680991 | 0 |
Returns a copy of this tree sequence with the specified sites (and their associated mutations) entirely removed. The site IDs do not need to be in any particular order, and specifying the same ID multiple times does not have any effect (i.e., calling ``tree_sequence.delete_sites([0, 1, 1])`` has the same effect as call... | def delete_sites(self, site_ids, record_provenance=True):
tables = self.dump_tables()
tables.delete_sites(site_ids, record_provenance)
return tables.tree_sequence() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deduplicate_motif_sites(sites, length):\n for sites_by_region in sites:\n idx = 0\n if len(sites_by_region) > 1:\n while idx + 1 < len(sites_by_region):\n site_curr = sites_by_region[idx]\n site_next = sites_by_region[idx + 1]\n if site_n... | [
"0.58835953",
"0.5513648",
"0.550245",
"0.5346258",
"0.5169887",
"0.5104389",
"0.5094161",
"0.5076627",
"0.50510496",
"0.49479473",
"0.48994976",
"0.47457847",
"0.45468628",
"0.45371032",
"0.45204517",
"0.44975597",
"0.44626418",
"0.44420925",
"0.44187573",
"0.44008335",
"0.4... | 0.6735055 | 0 |
Returns a copy of this tree sequence with a potentially changed coordinate system, such that empty regions (i.e., those not covered by any edge) at the start of the tree sequence are trimmed away, and the leftmost edge starts at position 0. This affects the reported position of sites and edges. Additionally, sites and ... | def ltrim(self, record_provenance=True):
tables = self.dump_tables()
tables.ltrim(record_provenance)
return tables.tree_sequence() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reset_to_origin(self):\n if len(self.segments) == 0:\n return\n self.segments[0].reset_transforms()\n if len(self.segments) > 1:\n prev_pos = self.segments[0].point_at(self.segments[0].end_time)\n prev_rot = self.segments[0].tangent_rotation_matrix_at(self.... | [
"0.5765103",
"0.5764462",
"0.57621187",
"0.54664093",
"0.54638624",
"0.5430507",
"0.54285663",
"0.5423622",
"0.5400775",
"0.53695107",
"0.5329201",
"0.529854",
"0.5293973",
"0.5293118",
"0.526821",
"0.525046",
"0.5233268",
"0.52300954",
"0.5227516",
"0.5220577",
"0.51787937",... | 0.4907759 | 63 |
Returns a copy of this tree sequence with the ``sequence_length`` property reset so that the sequence ends at the end of the rightmost edge. Additionally, sites and their associated mutations at positions greater than the new ``sequence_length`` are thrown away. | def rtrim(self, record_provenance=True):
tables = self.dump_tables()
tables.rtrim(record_provenance)
return tables.tree_sequence() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reverse(self):\n self._sequence.reverse()",
"def trim(self, length):\n assert isinstance(length, int)\n assert length >= 0\n\n # Remove in reverse order to preserve self-consistency in case of an error.\n for index in range(len(self) - 1, length - 1, -1):\n self.... | [
"0.5687152",
"0.5331504",
"0.52956885",
"0.52764237",
"0.52640337",
"0.5251774",
"0.52448875",
"0.52399606",
"0.5231748",
"0.5208437",
"0.5161089",
"0.5152383",
"0.5151816",
"0.5143715",
"0.5140932",
"0.50989527",
"0.5073848",
"0.5062758",
"0.5049937",
"0.5038137",
"0.5009197... | 0.4987761 | 22 |
Create a text representation of a tree sequence. | def draw_text(
self,
*,
node_labels=None,
use_ascii=False,
time_label_format=None,
position_label_format=None,
order=None,
**kwargs,
):
return str(
drawing.TextTreeSequence(
self,
node_labels=node_lab... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def format_asciitree(self):\n import asciitree\n\n def child_iter(tree):\n return tree.subtrees()\n\n def text_str(tree):\n return ' %s%s %s' % (tree.label, tree.label_suffix,\n tree.token or '')\n return asciitree.draw_tree(self, ch... | [
"0.7323994",
"0.71808636",
"0.7077379",
"0.7054215",
"0.70220494",
"0.70220494",
"0.69136614",
"0.6895881",
"0.68495446",
"0.6809926",
"0.6797706",
"0.6745261",
"0.67298776",
"0.6662313",
"0.6637794",
"0.6623797",
"0.65969676",
"0.6596414",
"0.65940076",
"0.657434",
"0.655807... | 0.629089 | 44 |
Compute a windowed statistic from sample counts and a summary function. | def sample_count_stat(
self,
sample_sets,
f,
output_dim,
windows=None,
polarised=False,
mode=None,
span_normalise=True,
strict=True,
): # noqa: B950
# helper function for common case where weights are indicators of sample sets
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def weight_summaries(var):\n with tf.name_scope('Weight_summary'):\n mean = tf.reduce_mean(var)\n tf.summary.scalar('mean', mean)\n with tf.name_scope('stddev'):\n stddev = tf.sqrt(tf.reduce_mean(tf.square(var - mean)))\n tf.summary.scalar('stddev', stddev)\n tf.summary.scalar('m... | [
"0.60093343",
"0.5905205",
"0.58852583",
"0.5789706",
"0.5660945",
"0.56108487",
"0.56081504",
"0.5505882",
"0.55016416",
"0.55016416",
"0.5484182",
"0.54667526",
"0.54116845",
"0.5392763",
"0.5350943",
"0.53388166",
"0.53249454",
"0.5322494",
"0.53115094",
"0.5309349",
"0.52... | 0.5764825 | 4 |
Returns a list of (at most) num_chunks windows, which represent splitting up the specified list of windows into roughly equal work. Currently this is implemented by just splitting up into roughly equal numbers of windows in each chunk. | def _chunk_windows(windows, num_chunks):
if num_chunks <= 0 or int(num_chunks) != num_chunks:
raise ValueError("Number of chunks must be an integer > 0")
num_chunks = min(len(windows) - 1, num_chunks)
splits = np.array_split(windows[:-1], num_chunks)
chunks = []
for j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_chunks(sequence, window_size, step=1):\n k = len(sequence)\n for i in range(0, k - window_size + 1, step):\n end = i + window_size\n chunk = sequence[i:i + window_size]\n assert len(chunk) == window_size\n yield chunk, end",
"def get_chunks(sequence, window_size, step=1)... | [
"0.71422964",
"0.69719464",
"0.6838129",
"0.68195677",
"0.68195146",
"0.68004143",
"0.6731537",
"0.67168945",
"0.66992015",
"0.6667279",
"0.6657442",
"0.6653202",
"0.6601734",
"0.6600378",
"0.6592009",
"0.6563785",
"0.6553596",
"0.65448177",
"0.65265995",
"0.6516239",
"0.6510... | 0.8617322 | 0 |
The hostname with which this creential is associated, or the empty string if the credential did not contain this information | def hostname(self):
return self._hostname | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_hostname(self) -> str:\n return self._password",
"def hostname(self) -> Optional[str]:\n return pulumi.get(self, \"hostname\")",
"def get_hostname(self):\n return self.name",
"def get_hostname(self):\n prompt = self.session.find_prompt()\n backup_logger.info(f\"Gett... | [
"0.7645101",
"0.7624353",
"0.74502814",
"0.7393416",
"0.73751605",
"0.73732567",
"0.73651725",
"0.7354307",
"0.73497534",
"0.73225904",
"0.73097783",
"0.7247874",
"0.71687305",
"0.714695",
"0.7146689",
"0.71459687",
"0.7141178",
"0.713936",
"0.71261793",
"0.71012884",
"0.7101... | 0.7469239 | 2 |
Test API can get a pressure (GET request). | def test_api_can_get_all_pressures(self):
res = self.client().post('/pressures/', data=self.pressure)
self.assertEqual(res.status_code, 201)
res = self.client().get('/pressures/')
self.assertEqual(res.status_code, 200)
self.assertIn('120', str(res.data)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_api_can_get_pressure_by_id(self):\n rv = self.client().post('/pressures/', data=self.pressure)\n self.assertEqual(rv.status_code, 201)\n result_in_json = json.loads(rv.data.decode('utf-8').replace(\"'\", \"\\\"\"))\n result = self.client().get(\n '/pressures/{}'.form... | [
"0.74287456",
"0.69035894",
"0.679271",
"0.6711379",
"0.66008884",
"0.64996874",
"0.6453763",
"0.63089716",
"0.62877476",
"0.62439483",
"0.623059",
"0.6225948",
"0.6188776",
"0.6182968",
"0.6158279",
"0.61350673",
"0.6077457",
"0.6061102",
"0.604492",
"0.60390466",
"0.6008962... | 0.72923553 | 1 |
Split dataset into train and test sets (sublists) based on a test set size. | def train_test_split(X, y, test_size=0.33, random_state=None, shuffle=True):
copyX = copy.deepcopy(X)
copyY = copy.deepcopy(y)
if random_state is not None:
# TODO: seed your random number generator
#Seed random number generator
np.random.seed(random_state)
if shuffle:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def split_dataset(self, test_size=0.20):\n\t\t(self.training_data, self.test_data, self.training_labels, self.test_labels) = train_test_split(self.training_data, self.training_labels, test_size=test_size)",
"def split_data(dataset, test_size=0.5):\n shuffled_data = np.random.RandomState(seed=721).permutation(... | [
"0.8607917",
"0.8338694",
"0.8203456",
"0.81592894",
"0.78572524",
"0.78567135",
"0.7814443",
"0.77509254",
"0.77332777",
"0.77305245",
"0.7672609",
"0.76517165",
"0.7590971",
"0.7572896",
"0.75477827",
"0.75283635",
"0.75091434",
"0.7504746",
"0.7468718",
"0.7462873",
"0.743... | 0.6899936 | 88 |
Reinitializes the weights of a given layer | def reinitialize_weights(self, scope_name):
variables = tf.compat.v1.get_variables(scope_name)
init = tf.compat.v1.variables_initializer(variables)
self.sess.run(init) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize_weights(self):\n tf.nest.map_structure(\n weights_initializer.WeightsInitializer.initialize_layer_or_model,\n self._layer_nest)",
"def init_weights(layer):\r\n layer_name = layer.__class__.__name__\r\n if layer_name.find(\"Conv\") != -1:\r\n layer.weight.data.normal_(... | [
"0.77201146",
"0.7707208",
"0.76968217",
"0.7642865",
"0.75886583",
"0.7513413",
"0.75046635",
"0.74599314",
"0.745799",
"0.7447679",
"0.7416753",
"0.7395073",
"0.7389386",
"0.7324961",
"0.72788745",
"0.7222396",
"0.7214152",
"0.71888995",
"0.7171713",
"0.7171713",
"0.7151385... | 0.73675716 | 13 |
Return the filename prefix used to create temporary files. This does not contain the directory component. Using this function is preferred over reading the template variable directly. | def gettempprefix():
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_temp_file_name():\n tmpfile = tempfile.NamedTemporaryFile(prefix=\"TESS_\")\n h, t = ntpath.split(tmpfile.name)\n return t or ntpath.basename(h)",
"def generate_temp_filename(self):\n prefix = self.generate_filename_prefix()\n now = datetime.now()\n # Ok that might not be t... | [
"0.7465485",
"0.73095614",
"0.7293191",
"0.7280023",
"0.72516596",
"0.71074677",
"0.70155364",
"0.6996498",
"0.6980686",
"0.6783352",
"0.6763959",
"0.6762097",
"0.6750309",
"0.66816574",
"0.6665828",
"0.6657079",
"0.66191447",
"0.6604142",
"0.66011345",
"0.65929896",
"0.65741... | 0.72832686 | 3 |
Repeat RGB weights n times. Assumes channels are dim 1 | def cycle_rgb_weights(weights, n):
slices = [(c % 3, c % 3 + 1) for c in range(n)] # slice a:a+1 to keep dims
new_weights = torch.cat([
weights[:, a:b, :, :] for a, b in slices
], dim=1)
return new_weights | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def repeat_weights(weights, shape):\n weights_extra = weights.unsqueeze(-1)\n return weights_extra.expand(\n weights.shape[0], shape[-1]).reshape(shape)",
"def th_repeat(a, repeats, axis=0):\r\n assert len(a.size()) == 1\r\n return th_flatten(torch.transpose(a.repeat(repeats, 1), 0, 1))",
"d... | [
"0.6374748",
"0.60212135",
"0.58721536",
"0.5869762",
"0.5835722",
"0.5795249",
"0.57622373",
"0.5736886",
"0.57052183",
"0.5666517",
"0.5664537",
"0.5622474",
"0.55914694",
"0.55251247",
"0.5513397",
"0.5473197",
"0.54574776",
"0.5438003",
"0.54269195",
"0.5405664",
"0.53899... | 0.7687817 | 0 |
Transform pretrained weights to be used for a layer with a different number of channels. | def transfer_weights(pretrained, replacement, method='cycle'):
if method == 'cycle':
n = replacement.in_channels
weights = cycle_rgb_weights(pretrained.weight, n)
elif method == 'avg':
weights = avg_rgb_weights(pretrained.weight)
else:
raise NotImplementedError('`method` must... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def preprocess_weights_for_loading(layer,\n weights,\n original_keras_version=None,\n original_backend=None):\n if layer.__class__.__name__ == 'Bidirectional':\n num_weights_per_layer = len(weights) // 2\n ... | [
"0.6566449",
"0.6416752",
"0.6405843",
"0.6220448",
"0.62136054",
"0.62103534",
"0.6203234",
"0.6203234",
"0.6203234",
"0.62021506",
"0.62021506",
"0.6181938",
"0.6178246",
"0.6177943",
"0.6169187",
"0.6151193",
"0.61233854",
"0.6103436",
"0.60756034",
"0.6071058",
"0.6047321... | 0.6229688 | 3 |
Sequentially pass `x` trough model`s `encoder` and `decoder` (return logits!) | def forward(self, x):
x = self.encoder(x)
x = self.decoder(x)
return x | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def forward(self, x):\n if self.training:\n x = self.input_pert(x)\n x = self.encoder(x)\n x = self.decoder(x)\n return x",
"def forward(self, x):\n\n # Encoding path\n x1 = self.ins(x)\n\n # Apply Downsampling and encoding modules\n x2 = self.ds... | [
"0.72372735",
"0.7026445",
"0.6957911",
"0.6908719",
"0.6896771",
"0.6896771",
"0.6862132",
"0.681876",
"0.6763464",
"0.66641396",
"0.6644882",
"0.66277975",
"0.6615218",
"0.65477246",
"0.64433306",
"0.6436389",
"0.63802385",
"0.6358512",
"0.6333469",
"0.6326088",
"0.6308258"... | 0.68776786 | 6 |
Inference method. Switch model to `eval` mode, call `.forward(x)` and apply activation function (if activation is not `None`) with `torch.no_grad()` | def predict(self, x):
if self.training:
self.eval()
with torch.no_grad():
x = self.forward(x)
if self.activation:
x = self.activation(x)
return x | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def forward(self, X: Tensor) -> Tensor:\n if self.training:\n if self.transform_on_train:\n return self.transform(X)\n elif self.transform_on_eval:\n if fantasize.off() or self.transform_on_fantasize:\n return self.transform(X)\n return X",
... | [
"0.6525945",
"0.6514655",
"0.64784044",
"0.646009",
"0.64336044",
"0.6369017",
"0.63228065",
"0.6273746",
"0.62589246",
"0.62159204",
"0.6209716",
"0.6196244",
"0.61895347",
"0.6177664",
"0.6171579",
"0.6135619",
"0.60928357",
"0.60862035",
"0.6078511",
"0.6075441",
"0.607252... | 0.5842952 | 46 |
Calculate and round number of filters based on depth multiplier. | def round_filters(filters, global_params):
multiplier = global_params.width_coefficient
if not multiplier:
return filters
divisor = global_params.depth_divisor
min_depth = global_params.min_depth
filters *= multiplier
min_depth = min_depth or divisor
new_filters = max(min_depth, int(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _round_filters(self, filters):\n filters *= self.width_coefficient\n new_filters = max(\n self.depth_divisor,\n int(filters + self.depth_divisor / 2)\n // self.depth_divisor\n * self.depth_divisor,\n )\n # Make sure that round down does no... | [
"0.7922923",
"0.7729613",
"0.7729613",
"0.7627428",
"0.7392125",
"0.7350714",
"0.71560615",
"0.71530545",
"0.6495575",
"0.6465338",
"0.62081647",
"0.6183302",
"0.6182124",
"0.6107928",
"0.60913473",
"0.6085328",
"0.5929812",
"0.5849388",
"0.57838833",
"0.57515496",
"0.5698589... | 0.76761705 | 5 |
Chooses static padding if you have specified an image size, and dynamic padding otherwise. Static padding is necessary for ONNX exporting of models. | def get_same_padding_conv2d(image_size=None):
if image_size is None:
return Conv2dDynamicSamePadding
else:
return partial(Conv2dStaticSamePadding, image_size=image_size) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def padding_width(self):\n ...",
"def padding(img, n):\n img = np.pad(img, [(n, n), (n, n)], mode='constant', constant_values=0)\n\n return img",
"def run_padding(self):\n\n image_padded, mask, self.pad_to_right, self.pad_to_bottom = gen_padded_image_and_mask (os.path.join('utils_dfn/temp',... | [
"0.6626044",
"0.6484003",
"0.6459197",
"0.64129096",
"0.6412213",
"0.63379383",
"0.6336439",
"0.6320849",
"0.6320486",
"0.63104063",
"0.62709826",
"0.61524755",
"0.61199635",
"0.61042315",
"0.6089758",
"0.60401565",
"0.6025697",
"0.60239446",
"0.59902024",
"0.59886336",
"0.59... | 0.5829391 | 32 |
Map EfficientNet model name to parameter coefficients. | def get_global_params(width_coeff, depth_coeff, image_size, dropout_rate, drop_connect_rate):
global_params = GlobalParams(
batch_norm_momentum=0.99,
batch_norm_epsilon=1e-3,
dropout_rate=dropout_rate,
drop_connect_rate=drop_connect_rate,
num_classes=1000,
width_coef... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def efficientnet_params(model_name):\n params_dict = {\n # Coefficients: width,depth,res,dropout\n 'efficientnet-b0': (1.0, 1.0, 224, 0.2),\n 'efficientnet-b1': (1.0, 1.1, 240, 0.2),\n 'efficientnet-b2': (1.1, 1.2, 260, 0.3),\n 'efficientnet-b3': (1.2, 1.4, 300, 0.3),\n ... | [
"0.68057907",
"0.67349935",
"0.65481",
"0.6298889",
"0.6029276",
"0.5877488",
"0.5838003",
"0.5772829",
"0.57585347",
"0.57317084",
"0.5586488",
"0.55061686",
"0.54998165",
"0.54380655",
"0.5390309",
"0.53836536",
"0.5380048",
"0.53270173",
"0.5286134",
"0.52834225",
"0.52834... | 0.0 | -1 |
Map EfficientNet model name to parameter coefficients. | def efficientnet_params(model_name):
params_dict = {
# Coefficients: width,depth,res,dropout
'efficientnet-b0': (1.0, 1.0, 224, 0.2),
'efficientnet-b1': (1.0, 1.1, 240, 0.2),
'efficientnet-b2': (1.1, 1.2, 260, 0.3),
'efficientnet-b3': (1.2, 1.4, 300, 0.3),
'efficien... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def efficientnet_params(model_name):\n params_dict = {\n # Coefficients: width,depth,res,dropout\n 'efficientnet-b0': (1.0, 1.0, 224, 0.2),\n 'efficientnet-b1': (1.0, 1.1, 240, 0.2),\n 'efficientnet-b2': (1.1, 1.2, 260, 0.3),\n 'efficientnet-b3': (1.2, 1.4, 300, 0.3),\n ... | [
"0.67349935",
"0.65481",
"0.6298889",
"0.6029276",
"0.5877488",
"0.5838003",
"0.5772829",
"0.57585347",
"0.57317084",
"0.5586488",
"0.55061686",
"0.54998165",
"0.54380655",
"0.5390309",
"0.53836536",
"0.5380048",
"0.53270173",
"0.5286134",
"0.52834225",
"0.52834225",
"0.52664... | 0.68057907 | 0 |
Transform pretrained weights to be used for a layer with a different number of channels. | def transfer_weights(self, pretrained_layer, replacement_layer, rgb_str='rgb'):
weights = select_rgb_weights(pretrained_layer.weight, rgb_str)
replacement_layer.weight = nn.Parameter(weights)
return replacement_layer | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def preprocess_weights_for_loading(layer,\n weights,\n original_keras_version=None,\n original_backend=None):\n if layer.__class__.__name__ == 'Bidirectional':\n num_weights_per_layer = len(weights) // 2\n ... | [
"0.6566471",
"0.64196247",
"0.6406237",
"0.62300295",
"0.622139",
"0.62157774",
"0.62127167",
"0.62056726",
"0.62056726",
"0.62056726",
"0.62051094",
"0.62051094",
"0.6184129",
"0.6179241",
"0.61713153",
"0.61528987",
"0.61249983",
"0.610547",
"0.60770535",
"0.6071673",
"0.60... | 0.61791974 | 14 |
Returns the paths to save checkpoints and tensorboard runs. eg. saved/Mnist_LeNet//checkpoints saved/Mnist_LeNet//runs | def trainer_paths(config):
arch_datetime = arch_datetime_path(config)
return (
ensure_dir(join(arch_datetime, 'checkpoints')),
ensure_dir(join(arch_datetime, 'runs'))
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_train_paths(self):\n\n assert self.dataset_type_first_step == \"sequential\" or self.dataset_type_first_step == \"overlapped\", \\\n \"Error! dataset_type_first_step should be set to 'sequential' or to 'overlapped'\"\n\n assert self.dataset_type_incremental == \"sequential\" or sel... | [
"0.65838104",
"0.6400769",
"0.6385811",
"0.6364668",
"0.6316008",
"0.62987894",
"0.62445325",
"0.621004",
"0.61778367",
"0.6147715",
"0.6145997",
"0.61189115",
"0.61188114",
"0.60897434",
"0.60897434",
"0.60741055",
"0.6069007",
"0.60261154",
"0.60180205",
"0.5993303",
"0.597... | 0.60749155 | 15 |
Close the db at the end of the request | def close_db(exception):
db = getattr(g, '_database', None)
if db is not None:
db.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def after_request():\n db.close()",
"def close(self):\n\t\tself.db.close()",
"def close(self):\n self.db.close()",
"def close_db_connection(cls):\n db.close()",
"def close_db():\n if \"db\" in context:\n context[\"db\"].close()",
"def close(self):\n if getattr(self, \"_d... | [
"0.87896323",
"0.85572976",
"0.83507454",
"0.8246861",
"0.82282263",
"0.8187064",
"0.81634825",
"0.81634825",
"0.81634825",
"0.81437",
"0.807412",
"0.8052002",
"0.79919285",
"0.79718167",
"0.7959557",
"0.79430735",
"0.79430735",
"0.79430735",
"0.79430735",
"0.79430735",
"0.79... | 0.73467416 | 99 |
Check if a cell is on the board. | def is_cell_on_board(cell, board_shape): # TODO: Remove
return (0, 0) <= cell < board_shape | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def inBoard(self, row, col):\n return 0 <= row < self.rows and 0 <= col < self.cols",
"def is_on_board(x: int, y: int) -> bool:\n return x >= 0 and x < BOARDWIDTH and y < BOARDHEIGHT",
"def _check_occupied(self, col, row):\n if self.board[row - 1][col - 1] == EMPTY:\n return False\n... | [
"0.76910853",
"0.7657645",
"0.75842696",
"0.746275",
"0.74618644",
"0.734186",
"0.7332908",
"0.72954184",
"0.729383",
"0.7267042",
"0.72044545",
"0.7190748",
"0.7165279",
"0.71580917",
"0.7094958",
"0.70738655",
"0.70053196",
"0.7004408",
"0.70043606",
"0.6990636",
"0.6988504... | 0.8329117 | 0 |
create a csv file to store the paths of files for each patient | def create_csv_file(data_root, output_file):
image_folder = data_root + "/" + "training_set"
label_folder = data_root + "/" + "training_set_label"
filenames = os.listdir(label_folder)
filenames = [item for item in filenames if item[0] != '.']
file_list = []
for filename in filenames:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_csv_file(data_root, output_file, fields):\n filenames = []\n patient_names = os.listdir(data_root + '/' + fields[0])\n print(len(patient_names))\n for patient_name in patient_names:\n patient_image_names = []\n for field in fields:\n image_name = data_root + '/' + fi... | [
"0.7392785",
"0.67744476",
"0.65794116",
"0.6574338",
"0.6428384",
"0.6393453",
"0.6275458",
"0.6258241",
"0.62501264",
"0.62393457",
"0.6199792",
"0.6128413",
"0.60839975",
"0.6066582",
"0.6055135",
"0.60335743",
"0.60169286",
"0.6010963",
"0.5998775",
"0.5984609",
"0.596873... | 0.61792433 | 11 |
Probability of Data given Manifold Point. | def _prob_map(self, x):
d = self.manifold.shape[0]
n = x.shape[1]
maha = np.zeros(shape=(n, self.m))
for w in range(self.m):
mu = np.tile(self.manifold[:, w].reshape(d, 1),
(1, n))
maha[:, w] = np.sum((x-mu)**2, 0) / self.sigma**2
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pdf(self, point: np.ndarray) -> float:\n return self._probs.dot([rv.pdf(point) for rv in self._rvs])",
"def prob(x):\n\treturn 1. * bivariate_normal(x, (0., 1.2), (1., 1.), .8) + \\\n\t 1.05 * bivariate_normal(x, (.6, -1.), (1.3, .7), -.6)",
"def p(self) -> Probability:\n ...",
"def... | [
"0.6885045",
"0.684683",
"0.66341245",
"0.64240223",
"0.63605934",
"0.63585186",
"0.6352179",
"0.63496566",
"0.6333451",
"0.63301766",
"0.629046",
"0.6281379",
"0.62604076",
"0.6254101",
"0.62297946",
"0.6211499",
"0.61954534",
"0.61805916",
"0.61805916",
"0.6162209",
"0.6158... | 0.61209506 | 23 |
Sets the currency_code of this FinancialPictureRequest. | def currency_code(self, currency_code):
self._currency_code = currency_code | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def transaction_currency_code(self, transaction_currency_code):\n\n self._transaction_currency_code = transaction_currency_code",
"def card_currency(self, card_currency):\n\n self._card_currency = card_currency",
"def currency(self, currency):\n\n self._currency = currency",
"def currenc... | [
"0.6916932",
"0.6612169",
"0.63192475",
"0.63192475",
"0.63192475",
"0.63192475",
"0.62636936",
"0.62291163",
"0.60598695",
"0.60213137",
"0.59329015",
"0.59329015",
"0.59329015",
"0.5923597",
"0.59179676",
"0.5885963",
"0.57881767",
"0.5673538",
"0.565479",
"0.56119514",
"0.... | 0.79800946 | 3 |
Sets the end_date of this FinancialPictureRequest. | def end_date(self, end_date):
self._end_date = end_date | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def end_date(self, end_date):\n self._end_date = end_date",
"def end_date(self, end_date):\n if end_date is None:\n raise ValueError(\"Invalid value for `end_date`, must not be `None`\")\n\n self._end_date = end_date",
"def end_date(self, end_date):\n if end_date is None:... | [
"0.80469143",
"0.7914269",
"0.7619964",
"0.7609227",
"0.75703055",
"0.7388909",
"0.7354335",
"0.7252231",
"0.7180591",
"0.70913726",
"0.70444953",
"0.6945165",
"0.6945165",
"0.6925181",
"0.6920145",
"0.6770719",
"0.65614974",
"0.65506613",
"0.64535624",
"0.6382337",
"0.634564... | 0.81056213 | 7 |
Sets the start_date of this FinancialPictureRequest. | def start_date(self, start_date):
self._start_date = start_date | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def start_date(self, start_date):\n \n self._start_date = start_date",
"def start_date(self, start_date):\n if start_date is None:\n raise ValueError(\"Invalid value for `start_date`, must not be `None`\")\n\n self._start_date = start_date",
"def start_date(self, start_da... | [
"0.8025688",
"0.7890178",
"0.7888901",
"0.7790549",
"0.7747043",
"0.7541381",
"0.746598",
"0.7451152",
"0.7143373",
"0.67212874",
"0.6606009",
"0.65931255",
"0.6555651",
"0.6555651",
"0.6501789",
"0.6501789",
"0.64537543",
"0.63510484",
"0.631541",
"0.62873614",
"0.61024606",... | 0.79406655 | 9 |
Sets the show_category_breakdown of this FinancialPictureRequest. | def show_category_breakdown(self, show_category_breakdown):
self._show_category_breakdown = show_category_breakdown | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def categories_display(self, categories_display):\n\n self._categories_display = categories_display",
"def set_charge_category(self, charge_category):\n self.single_selection_from_kendo_dropdown(self.charge_category_kendo_dropdown_locator, charge_category)\n self.wait_for_ajax_spinner_load()... | [
"0.55974096",
"0.5501269",
"0.5431379",
"0.54157156",
"0.54157156",
"0.54157156",
"0.54157156",
"0.54157156",
"0.5349273",
"0.5253395",
"0.49177074",
"0.49130473",
"0.48501343",
"0.48117313",
"0.48035136",
"0.4756651",
"0.47337344",
"0.47198582",
"0.47196952",
"0.46970704",
"... | 0.8166357 | 0 |
Sets the household_id of this FinancialPictureRequest. | def household_id(self, household_id):
self._household_id = household_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def picture_id(self, picture_id):\n\n self._picture_id = picture_id",
"def loan_id(self, loan_id):\n\n self._loan_id = loan_id",
"def bank_id(self, bank_id):\n\n self._bank_id = bank_id",
"def refund_request_break_up_id(self, refund_request_break_up_id):\n\n self._refund_request_b... | [
"0.581157",
"0.57030547",
"0.5650919",
"0.54646546",
"0.53638244",
"0.5327329",
"0.52430874",
"0.5198833",
"0.51795435",
"0.51694554",
"0.5104876",
"0.50914276",
"0.50630426",
"0.50630426",
"0.5011367",
"0.50078005",
"0.4996283",
"0.498451",
"0.49745065",
"0.4960317",
"0.4957... | 0.780031 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, FinancialPictureRequest):
return False
return self.to_dict() == other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False",
"def __eq__(self, other):\n if i... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
if not isinstance(other, FinancialPictureRequest):
return True
return self.to_dict() != other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)",
"def __eq__(self, other):\n ... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
Turn a number of months in the future into a concrete date. | def get_month_delta(months):
today = datetime.today()
cur_year = today.year
cur_day = today.day
cur_month = today.month
cur_time = today.time
if cur_month - months <= 0:
cut_month = (cur_month - months) % 12
diff_years = (cur_month - months) // 12
cut_year = cur_year + ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def date_add_months(date, num_months):\n\tyear, month, day = date.timetuple()[:3]\n\n\tmonth += num_months\n\t\n\tif num_months > 0:\n\t\twhile month > 12:\n\t\t\tmonth -= 12\n\t\t\tyear += 1\n\telif num_months < 0:\n\t\twhile month < 1:\n\t\t\tmonth += 12\n\t\t\tyear -= 1\n\n\tmonth_max_days = calendar.monthrange... | [
"0.6520391",
"0.6349453",
"0.6120877",
"0.60327196",
"0.60113925",
"0.6004791",
"0.5981941",
"0.5958959",
"0.5951333",
"0.59417564",
"0.59299946",
"0.5873544",
"0.58632916",
"0.58071935",
"0.58041006",
"0.57977015",
"0.57852304",
"0.5742703",
"0.57373935",
"0.5705355",
"0.569... | 0.5651351 | 22 |
returns a dictionary containing all keys/values of __dict__ of the instance | def to_dict(self):
my_dict = self.__dict__.copy()
my_dict["__class__"] = self.__class__.__name__
my_dict["created_at"] = datetime.isoformat(self.created_at)
my_dict["updated_at"] = datetime.isoformat(self.updated_at)
return my_dict | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def as_dict(self):\n return {k: v for k, v in vars(self).items()}",
"def dict(cls):\n if cls._dict is None:\n cls._dict = {attr: getattr(cls, attr) for attr in cls.keys()}\n return cls._dict",
"def as_dict(self):\n return self.__dict__",
"def attributes(self):\n return d... | [
"0.8071886",
"0.80406255",
"0.80328685",
"0.8028978",
"0.80134267",
"0.80134267",
"0.80134267",
"0.80134267",
"0.80134267",
"0.80134267",
"0.80134267",
"0.7946372",
"0.7856889",
"0.7856648",
"0.78149813",
"0.77974623",
"0.779462",
"0.77706295",
"0.7718883",
"0.7703186",
"0.77... | 0.0 | -1 |
Represents raw documents as a Domain; a domain contains the tfidf weighted cooccurrence matrices of the labeled and unlabeled documents (with consistent Vocabulary). | def as_domain(labeled_docs, labels, issource, domain, unlabeled_docs=None, unlabeled_y=None, tokken_pattern=r"(?u)\b\w\w+\b", min_df=1):
if issource:
counter = CountVectorizer(token_pattern=tokken_pattern, min_df=min_df)
v = counter.fit(labeled_docs).vocabulary_
tfidf = TfidfVectorizer(subli... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, documents_path):\n self.documents = []\n self.vocabulary = []\n self.likelihoods = []\n self.documents_path = documents_path\n self.term_doc_matrix = None \n self.document_topic_prob = None # P(z | d)\n self.topic_word_prob = None # P(w | z)\n ... | [
"0.55177164",
"0.532483",
"0.53110534",
"0.5309066",
"0.52573663",
"0.52449435",
"0.5205308",
"0.5171874",
"0.5132251",
"0.51252466",
"0.5084443",
"0.50789124",
"0.5076497",
"0.50449795",
"0.5018901",
"0.49906158",
"0.49721056",
"0.49612966",
"0.48982418",
"0.48972565",
"0.48... | 0.613163 | 0 |
tests that the endpoint will correctly retrieve issues resolved in a release from the GroupLink and GroupResolution model but will not return the groups twice if they appear in both | def test_does_not_return_duplicate_groups(self):
repo = Repository.objects.create(
organization_id=self.org.id,
name=self.project.name,
)
commit = Commit.objects.create(
organization_id=self.org.id,
repository_id=repo.id,
key='a' * 40,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_shows_issues_from_groupresolution(self):\n GroupResolution.objects.create(\n group=self.group,\n release=self.release,\n type=GroupResolution.Type.in_release,\n )\n response = self.client.get(self.path)\n\n assert response.status_code == 200, re... | [
"0.78239423",
"0.75734323",
"0.7388709",
"0.6468655",
"0.6451129",
"0.628309",
"0.6230137",
"0.6230137",
"0.59780496",
"0.59780496",
"0.5959293",
"0.5912394",
"0.586184",
"0.5860263",
"0.5786",
"0.57264304",
"0.5712603",
"0.5679398",
"0.5674802",
"0.5664668",
"0.5576779",
"... | 0.7576254 | 1 |
Page error on one iteration, no results for that page should print. | def test_repeated_pageset_one_iteration_one_page_error(self):
test_page_set = _MakePageSet()
measurement_results = SummarySavingPageMeasurementResults()
measurement_results.WillMeasurePage(test_page_set.pages[0])
measurement_results.Add('a', 'seconds', 3)
measurement_results.DidMeasurePage()
me... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_repeated_pageset_one_iteration_one_page_fails(self):\n test_page_set = _MakePageSet()\n\n measurement_results = SummarySavingPageMeasurementResults()\n measurement_results.WillMeasurePage(test_page_set.pages[0])\n measurement_results.Add('a', 'seconds', 3)\n measurement_results.DidMeasurePa... | [
"0.63939047",
"0.62474793",
"0.62365466",
"0.6147043",
"0.61051977",
"0.6099422",
"0.6091826",
"0.60235256",
"0.59854174",
"0.5981817",
"0.58998466",
"0.5878424",
"0.58761185",
"0.58725035",
"0.5859526",
"0.58584183",
"0.5845222",
"0.58384657",
"0.5829947",
"0.57729685",
"0.5... | 0.6588589 | 0 |
Fetch a gecore repository and return it as a GraphQL object. | def get_repository(name: str = None):
try:
local_dir = os.environ['GE_REPO_DIR']
except KeyError:
local_dir = "./"
local_path = os.path.join(local_dir, name)
local_repo = gecore.github_repo.load_repository(local_path)
repo = Repository()
repo.url = local_repo.url
repo.name = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fusion_api_get_repository(self, uri=None, param='', api=None, headers=None):\n return self.repository.get(uri=uri, param=param, api=api, headers=headers)",
"async def repository(self, *args, **kwargs):\n\n return await self._makeApiCall(self.funcinfo[\"repository\"], *args, **kwargs)",
"d... | [
"0.60677654",
"0.5898291",
"0.55818206",
"0.5486008",
"0.53939545",
"0.52923006",
"0.52787745",
"0.52214175",
"0.51677865",
"0.51539177",
"0.50999504",
"0.49853808",
"0.49659643",
"0.49562952",
"0.49556997",
"0.49391717",
"0.4920574",
"0.4912152",
"0.49095082",
"0.48923907",
... | 0.49604502 | 13 |
Sets all internal attributes back to None. This is sometimes needed, for example when the profile_likelihood is called multiple times for different scale parameters, but the scale parameter is not a part of hyperparam. This happens in double_profile_likelihood (see _find_optimal_eta function in ``DoubleProfileLikelihoo... | def reset_attributes(self):
self.ell = None
self.ell_jacobian = None
self.ell_hessian = None
self.ell_hyperparam = None
self.ell_jacobian_hyperparam = None
self.ell_hessian_hyperparam = None
self.Y = None
self.Cinv = None
self.C = None
s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _reset(self):\n\n # Checking one attribute is enough, because they are all set together\n # in partial_fit\n if hasattr(self, 'scale_'):\n del self.scale_\n del self.n_samples_seen_\n del self.mean_\n del self.var_",
"def _reset(self):\n\n ... | [
"0.8025891",
"0.80200756",
"0.80200756",
"0.7999312",
"0.69166785",
"0.68267775",
"0.68135697",
"0.6720833",
"0.6680802",
"0.66568094",
"0.664883",
"0.6643365",
"0.6638756",
"0.6608072",
"0.6581462",
"0.65437484",
"0.653752",
"0.65286833",
"0.6526879",
"0.64902693",
"0.647320... | 0.7658895 | 4 |
ell is the log likelihood probability. dell_deta is d(ell)/d(eta), which is the derivative of ell with respect to eta when the optimal value of sigma is substituted in the likelihood function per given eta. | def _likelihood_der1_eta(self, hyperparam):
# Get eta
eta = self._hyperparam_to_eta(hyperparam)
# Include derivative w.r.t scale
if (not numpy.isscalar(hyperparam)) and \
(hyperparam.size > self.scale_index):
# Set scale of the covariance object
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _core_calc_degrad(self,bd,Ld) :\n\t\tdegrad = np.dot(Ld,bd) # Do matrix multiplication \n\t\tdegrad = np.exp(degrad) # Exponentiate to convert log to real\n\t\treturn degrad",
"def d_beta_d_EDOT(self):\n eTheta = self.eTheta()\n a1 = (self.a1()).decompose()\n sinOmg = np.sin(self.omega()... | [
"0.6194956",
"0.5892976",
"0.58652955",
"0.5839284",
"0.5833242",
"0.56382203",
"0.5621809",
"0.56214774",
"0.55912405",
"0.55669016",
"0.55669016",
"0.5566127",
"0.55534786",
"0.55189806",
"0.5486393",
"0.5479628",
"0.5476858",
"0.5461322",
"0.545591",
"0.54455996",
"0.54387... | 0.6015106 | 1 |
Returns mu for kmeans on X. | def cluster_centers(X, k, bounds):
mu = random_plane_points(k, bounds)
kmeans = sklearn.cluster.KMeans(init=mu)
kmeans.fit(X)
# Restart if a mean has no associated points
if len(set(kmeans.labels_)) < k:
return cluster_centers(X, k, bounds)
return kmeans.cluster_centers_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mean(self):\n return self.mu",
"def calculate_mu(return_data):\n return np.array(return_data.mean())",
"def calculate_mean_mu(self, xi, xf, l):\n\n return self.mu",
"def mu(self):\n return self._mu",
"def mu(self):\n return self.generic_getter(get_chemical_potential, \"mu... | [
"0.6927351",
"0.68577313",
"0.68336385",
"0.6756964",
"0.66601235",
"0.64136386",
"0.6362138",
"0.63528264",
"0.6281075",
"0.62509024",
"0.6217873",
"0.6193976",
"0.6143498",
"0.6133636",
"0.6130865",
"0.6109486",
"0.61090434",
"0.60924506",
"0.60055816",
"0.59776765",
"0.593... | 0.0 | -1 |
Leaky ReLU implementation with derivative for activation function. | def relu(values, deriv=False):
alpha = 0.1
if deriv:
return np.where(values > 0, 1, alpha)
return np.where(values > 0, values, values * alpha) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_leaky_relu_activation(self):\n self.assertEqual(\n [-0.0050, 0.5000], list(af.LeakyRelu(0.01).output(np.array([-0.5, 0.5]))))\n self.assertEqual([0.01, 1], list(af.LeakyRelu(\n 0.01).derivative(np.array([-0.5, 0.5]))))",
"def grad_ReLU(self):\n y = self.x\n ... | [
"0.76360875",
"0.74475724",
"0.72775584",
"0.719363",
"0.7039446",
"0.6928463",
"0.6893579",
"0.6892061",
"0.6800971",
"0.67576665",
"0.6749533",
"0.6749533",
"0.6745946",
"0.6740473",
"0.667955",
"0.66254467",
"0.6602828",
"0.66026133",
"0.65865725",
"0.65564847",
"0.6549283... | 0.61886245 | 62 |
Return a unique version of the name indicated by incrementing a numeral at the end. Stop when the name no longer appears in the indicated list of elements. | def GetUniqueName( name, elems ):
digits = []
for c in reversed( name ):
if c.isdigit():
digits.append( c )
else:
break
stem = name[0:len( name ) - len( digits )]
val = ''.join( digits )[::-1] or 0
i = int( val )
while True:
i += 1
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unique_name(name, nlist, max=1000):\n out = name\n if name in nlist:\n for i in range(1, max+1):\n out = \"%s_%i\" % (name, i)\n if out not in nlist:\n break\n return out",
"def create_id(elements: Iterable) -> str:\r\n i = 1\r\n while str(i) in ele... | [
"0.7059048",
"0.6539179",
"0.6503504",
"0.64329684",
"0.6357792",
"0.63444585",
"0.6311142",
"0.62842697",
"0.62330544",
"0.6209509",
"0.61816657",
"0.60640204",
"0.6054472",
"0.59599507",
"0.59309864",
"0.5866971",
"0.58655614",
"0.5832725",
"0.5830949",
"0.5816138",
"0.5800... | 0.7630242 | 0 |
Initializes the agent and constructs the components of its graph. | def __init__(self,
sess,
num_actions,
observation_shape=dqn_agent.NATURE_DQN_OBSERVATION_SHAPE,
observation_dtype=dqn_agent.NATURE_DQN_DTYPE,
stack_size=dqn_agent.NATURE_DQN_STACK_SIZE,
number_of_gammas=8,
gamma_max... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def agent_init(self):\n pass",
"def _init_agents(self):\n self.agents = [Agent(e=0.1, a=0.1, row=self.row, col=self.col) for i in range(2)]",
"def __init__(self, agent: AEA) -> None:\n self._agent = agent\n super().__init__()",
"def initialization_step(self):\n # Update whe... | [
"0.7611508",
"0.7070868",
"0.68830186",
"0.68610984",
"0.6847924",
"0.6831212",
"0.68264514",
"0.6692013",
"0.66477036",
"0.6600996",
"0.6577",
"0.654692",
"0.6533985",
"0.65184265",
"0.6506129",
"0.64924616",
"0.64807445",
"0.6409464",
"0.63989496",
"0.63731956",
"0.6370439"... | 0.0 | -1 |
Get unique ID for the entity. | def unique_id(self) -> Optional[str]:
return self._device.device_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def entity_id(self) -> str:\n return self._entity_id",
"def entity_id(self):\n return self._entity_id",
"def entity_id(self):\n return self._entity_id",
"def entity_id(self):\n return self._entity_id",
"def entity_id(self):\n return self._entity_id",
"def entity_id(self... | [
"0.7967252",
"0.7798798",
"0.7798798",
"0.7798798",
"0.7798798",
"0.7798798",
"0.7609492",
"0.7609492",
"0.757372",
"0.75242037",
"0.74914914",
"0.74914914",
"0.7483857",
"0.7467522",
"0.74634236",
"0.7450082",
"0.7450082",
"0.7450082",
"0.7450082",
"0.7450082",
"0.7450082",
... | 0.0 | -1 |
Sample "length" letters from the "letters" set at random. Sampling with replacement since Python doesn't have a helper for it. | def SampleLetters(letters, length):
chosen_letters = [None]*length
for i in xrange(length):
index = random.randint(0, len(letters)-1)
chosen_letters[i] = letters[index]
return ''.join(chosen_letters) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def random_letter(letters):\n return random.choice(letters)",
"def genrate_letters():\n lt = []\n letter = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n for l in letter:\n lt.append(l)\n text_signature = ''.join([random.choice(lt) for x in range(26)])\n return text_signature... | [
"0.711622",
"0.70421904",
"0.6915822",
"0.686984",
"0.68674105",
"0.6841954",
"0.6827628",
"0.6730802",
"0.6676226",
"0.6670744",
"0.6661909",
"0.665187",
"0.66370744",
"0.6534375",
"0.6531977",
"0.65249056",
"0.6519144",
"0.6512519",
"0.6488118",
"0.6458661",
"0.6452403",
... | 0.86969054 | 0 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2ID2 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2ID2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF2IUS2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _it... | [
"0.7889486",
"0.7883611",
"0.77751386",
"0.77720207",
"0.7758687",
"0.7752369",
"0.77410835",
"0.7697943",
"0.76963896",
"0.76595765",
"0.7642227",
"0.76384133",
"0.76260424",
"0.7619771",
"0.7616943",
"0.7616656",
"0.7592361",
"0.7592058",
"0.75579387",
"0.7554376",
"0.75534... | 0.7315404 | 30 |
New() > itkStatisticsLabelMapFilterLM2ID2 Create a new object of the class itkStatisticsLabelMapFilterLM2ID2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM2ID2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2IF2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2IUL2.__New_orig__()\n import itkTemplate\n ... | [
"0.83149797",
"0.8200963",
"0.8135466",
"0.8090839",
"0.73438203",
"0.725997",
"0.721282",
"0.72081983",
"0.71405476",
"0.7132342",
"0.7059641",
"0.7042538",
"0.7017669",
"0.7016017",
"0.70073396",
"0.6974631",
"0.69630873",
"0.69624627",
"0.6949204",
"0.6938305",
"0.6908284"... | 0.8477198 | 0 |
itkStatisticsLabelMapFilterLM2ID2_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2ID2 | def itkStatisticsLabelMapFilterLM2ID2_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2ID2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkStatisticsLabelMapFilterLM2IF2_cast(*args):\n return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2IF2_cast(*args)",
"def itkLabelStatisticsImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _itkLabelStatisticsImageFilterPython.itk... | [
"0.80322564",
"0.79823023",
"0.7893789",
"0.78591686",
"0.7851117",
"0.78283685",
"0.78102875",
"0.7797543",
"0.7742517",
"0.7737263",
"0.7732647",
"0.76894057",
"0.7674775",
"0.76598394",
"0.76478344",
"0.76477337",
"0.7639166",
"0.7605115",
"0.7604473",
"0.7592416",
"0.7589... | 0.79866123 | 1 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2IF2 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2IF2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF2IUS2_cast(obj)",
"def itkLabelStatisticsImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _it... | [
"0.7969627",
"0.79379797",
"0.78636104",
"0.7848087",
"0.7834876",
"0.7793344",
"0.77817255",
"0.7710296",
"0.7700479",
"0.7698948",
"0.76746225",
"0.767108",
"0.7662454",
"0.7640752",
"0.7637111",
"0.76050115",
"0.7588835",
"0.75759166",
"0.75755924",
"0.75699484",
"0.756347... | 0.74307334 | 27 |
New() > itkStatisticsLabelMapFilterLM2IF2 Create a new object of the class itkStatisticsLabelMapFilterLM2IF2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM2IF2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2ID2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2IUL2.__New_orig__()\n import itkTemplate\n ... | [
"0.843711",
"0.831192",
"0.8250166",
"0.81894773",
"0.7441643",
"0.7362913",
"0.72992975",
"0.72771376",
"0.72669464",
"0.7254058",
"0.72335607",
"0.71993315",
"0.71802956",
"0.716803",
"0.7120768",
"0.7075302",
"0.7069684",
"0.7050837",
"0.70298636",
"0.7017997",
"0.70105153... | 0.8474006 | 0 |
itkStatisticsLabelMapFilterLM2IF2_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2IF2 | def itkStatisticsLabelMapFilterLM2IF2_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2IF2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF2IUS2_cast(obj)",
"def itkLabelStatisticsImageFilterIF2IUC2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageF... | [
"0.8240036",
"0.81565195",
"0.8092138",
"0.8091814",
"0.80504936",
"0.8036776",
"0.8022948",
"0.80178344",
"0.7998775",
"0.799767",
"0.7939651",
"0.78813887",
"0.78631645",
"0.7859602",
"0.78509605",
"0.7848506",
"0.78350013",
"0.7834007",
"0.7830703",
"0.78172",
"0.78123486"... | 0.830871 | 0 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2IUC2 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2IUC2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF2IUC2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUC2 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF2IUC2_cast(obj)",
"def itkLabelStatisticsImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageF... | [
"0.79995143",
"0.7970562",
"0.7954223",
"0.7944408",
"0.78935796",
"0.7881661",
"0.7859761",
"0.7828644",
"0.7778846",
"0.7772676",
"0.77660704",
"0.77628636",
"0.77424854",
"0.7741022",
"0.7737679",
"0.7735271",
"0.7735079",
"0.77134985",
"0.76954186",
"0.7690367",
"0.768285... | 0.738999 | 28 |
New() > itkStatisticsLabelMapFilterLM2IUC2 Create a new object of the class itkStatisticsLabelMapFilterLM2IUC2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named parame... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM2IUC2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2IUL2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2ID2.__New_orig__()\n import itkTemplate\n ... | [
"0.8266667",
"0.8216114",
"0.8195583",
"0.8179952",
"0.75897044",
"0.7574842",
"0.75570375",
"0.75075126",
"0.7507078",
"0.74742097",
"0.7426614",
"0.74248356",
"0.73668313",
"0.73328125",
"0.7325878",
"0.7308328",
"0.7296205",
"0.72733915",
"0.7259532",
"0.7214819",
"0.72035... | 0.841422 | 0 |
itkStatisticsLabelMapFilterLM2IUC2_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2IUC2 | def itkStatisticsLabelMapFilterLM2IUC2_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2IUC2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF2IUC2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUC2 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF2IUC2_cast(obj)",
"def itkLabelStatisticsImageFilterIUC2IUC2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImage... | [
"0.82951206",
"0.8225397",
"0.8137655",
"0.8119718",
"0.8037062",
"0.8034538",
"0.80275446",
"0.802311",
"0.7973156",
"0.7955765",
"0.7936762",
"0.7934085",
"0.78934395",
"0.7834485",
"0.7834229",
"0.78226155",
"0.7797496",
"0.7789052",
"0.7770355",
"0.7747886",
"0.7740493",
... | 0.8007747 | 8 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2IUL2 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2IUL2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF2IUS2_cast(obj)",
"def itkLabelStatisticsImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _it... | [
"0.796422",
"0.79400086",
"0.7858524",
"0.7846437",
"0.7772459",
"0.776349",
"0.7759474",
"0.77357113",
"0.77243006",
"0.7716981",
"0.771351",
"0.7691365",
"0.76873094",
"0.76839733",
"0.7681749",
"0.76623",
"0.76515454",
"0.7646948",
"0.7635785",
"0.7624264",
"0.7603963",
... | 0.7292119 | 33 |
New() > itkStatisticsLabelMapFilterLM2IUL2 Create a new object of the class itkStatisticsLabelMapFilterLM2IUL2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named parame... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM2IUL2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2ID2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2IF2.__New_orig__()\n import itkTemplate\n i... | [
"0.83719987",
"0.8353688",
"0.83438087",
"0.8249253",
"0.7390369",
"0.73350155",
"0.7332469",
"0.73305076",
"0.73084134",
"0.7277089",
"0.72720915",
"0.724737",
"0.72352374",
"0.7234086",
"0.72299886",
"0.7211963",
"0.72058827",
"0.7197542",
"0.7177051",
"0.7108383",
"0.70950... | 0.84165066 | 0 |
itkStatisticsLabelMapFilterLM2IUL2_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2IUL2 | def itkStatisticsLabelMapFilterLM2IUL2_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2IUL2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF2IUS2_cast(obj)",
"def itkLabelStatisticsImageFilterIF2IUC2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageF... | [
"0.8109462",
"0.8087342",
"0.7959405",
"0.7931951",
"0.79213774",
"0.7914747",
"0.79120654",
"0.78809094",
"0.7880701",
"0.7877047",
"0.7847917",
"0.7829567",
"0.7816172",
"0.7809503",
"0.7800542",
"0.7768508",
"0.77645403",
"0.7755753",
"0.77151895",
"0.7714144",
"0.77087164... | 0.79258984 | 4 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2IUS2 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2IUS2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF2IUS2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _it... | [
"0.81024134",
"0.8047374",
"0.7970441",
"0.7958731",
"0.7852455",
"0.7840161",
"0.7805677",
"0.78020257",
"0.77427644",
"0.77178043",
"0.76828396",
"0.76563084",
"0.7651613",
"0.76381195",
"0.76212406",
"0.7607131",
"0.7606177",
"0.76005995",
"0.75785935",
"0.7578361",
"0.753... | 0.7208546 | 38 |
New() > itkStatisticsLabelMapFilterLM2IUS2 Create a new object of the class itkStatisticsLabelMapFilterLM2IUS2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named parame... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM2IUS2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2ID2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM2IF2.__New_orig__()\n import itkTemplate\n i... | [
"0.83128744",
"0.8290446",
"0.8277999",
"0.8246717",
"0.7611095",
"0.75362366",
"0.75296354",
"0.7465429",
"0.73758674",
"0.7362777",
"0.72344404",
"0.7175453",
"0.712361",
"0.7119744",
"0.7110731",
"0.7095538",
"0.70795894",
"0.70573217",
"0.7056422",
"0.70488024",
"0.704586... | 0.8524355 | 0 |
itkStatisticsLabelMapFilterLM2IUS2_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM2IUS2 | def itkStatisticsLabelMapFilterLM2IUS2_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM2IUS2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF2IUS2 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF2IUS2_cast(obj)",
"def itkLabelStatisticsImageFilterIUS2IUS2_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImage... | [
"0.84179366",
"0.83198357",
"0.8196904",
"0.81874895",
"0.81357634",
"0.81238323",
"0.80747724",
"0.7987555",
"0.7945181",
"0.79352325",
"0.7921101",
"0.7917869",
"0.7908805",
"0.78945106",
"0.7892162",
"0.78200763",
"0.78003806",
"0.7769035",
"0.7768409",
"0.7742416",
"0.771... | 0.800646 | 7 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3ID3 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3ID3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUS3_cast(obj)",
"def itkLabelStatisticsImageFilterIF3IUS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _it... | [
"0.78746724",
"0.7806193",
"0.7788405",
"0.77664065",
"0.7766264",
"0.77562404",
"0.7748925",
"0.77394336",
"0.7712964",
"0.76995265",
"0.76903844",
"0.76802397",
"0.76707464",
"0.7670672",
"0.7636043",
"0.76334107",
"0.7594262",
"0.7591532",
"0.75692934",
"0.75567245",
"0.75... | 0.7105998 | 50 |
New() > itkStatisticsLabelMapFilterLM3ID3 Create a new object of the class itkStatisticsLabelMapFilterLM3ID3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM3ID3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3IF3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3IUL3.__New_orig__()\n import itkTemplate\n ... | [
"0.830836",
"0.8233023",
"0.81926125",
"0.80854815",
"0.7328166",
"0.7291087",
"0.7219771",
"0.72168946",
"0.71895605",
"0.718792",
"0.7182443",
"0.71772534",
"0.7129246",
"0.7107215",
"0.7088811",
"0.7075875",
"0.7061216",
"0.705",
"0.70428354",
"0.70381165",
"0.7036405",
... | 0.84180504 | 0 |
itkStatisticsLabelMapFilterLM3ID3_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3ID3 | def itkStatisticsLabelMapFilterLM3ID3_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3ID3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF3IUS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUS3_cast(obj)",
"def itkLabelStatisticsImageFilterIF3ISS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageF... | [
"0.7970248",
"0.7948215",
"0.78978103",
"0.787343",
"0.78452116",
"0.7826121",
"0.78125185",
"0.7803605",
"0.77999204",
"0.7786435",
"0.7785385",
"0.7762021",
"0.7758428",
"0.7758285",
"0.77030486",
"0.7692565",
"0.76852316",
"0.7679389",
"0.7679331",
"0.76758236",
"0.7660305... | 0.77853906 | 10 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3IF3 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3IF3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUS3_cast(obj)",
"def itkLabelStatisticsImageFilterIF3IUS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _it... | [
"0.7903801",
"0.7828535",
"0.78152126",
"0.77919126",
"0.77743787",
"0.77660066",
"0.7756794",
"0.7742873",
"0.7735136",
"0.7714363",
"0.769529",
"0.7681349",
"0.76777726",
"0.7664961",
"0.764623",
"0.7626223",
"0.7623737",
"0.7619647",
"0.76012045",
"0.7563395",
"0.75621504"... | 0.7199921 | 46 |
New() > itkStatisticsLabelMapFilterLM3IF3 Create a new object of the class itkStatisticsLabelMapFilterLM3IF3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named paramete... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM3IF3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3ID3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3IUL3.__New_orig__()\n import itkTemplate\n ... | [
"0.84244514",
"0.8371655",
"0.83343613",
"0.8204109",
"0.7419824",
"0.7391108",
"0.7330909",
"0.72832495",
"0.7271859",
"0.72548074",
"0.7238793",
"0.72264016",
"0.71852905",
"0.71848875",
"0.7158346",
"0.7141554",
"0.71120065",
"0.70819885",
"0.70806676",
"0.707839",
"0.7071... | 0.84859085 | 0 |
itkStatisticsLabelMapFilterLM3IF3_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3IF3 | def itkStatisticsLabelMapFilterLM3IF3_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3IF3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF3IUS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUS3_cast(obj)",
"def itkLabelStatisticsImageFilterIF3ISS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageF... | [
"0.8183547",
"0.81490386",
"0.80808717",
"0.8077727",
"0.80179656",
"0.801392",
"0.80080426",
"0.7986556",
"0.79754573",
"0.7971581",
"0.79590684",
"0.792633",
"0.7921499",
"0.7904749",
"0.7891881",
"0.7881111",
"0.78731006",
"0.78704345",
"0.78598285",
"0.78560084",
"0.78542... | 0.80415666 | 4 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3IUC3 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3IUC3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUS3_cast(obj)",
"def itkLabelStatisticsImageFilterIF3IUS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _it... | [
"0.7926932",
"0.79046494",
"0.78756726",
"0.7874102",
"0.78557414",
"0.7844755",
"0.78278685",
"0.78096086",
"0.78084457",
"0.78066444",
"0.7806421",
"0.7805399",
"0.7796776",
"0.7793947",
"0.77919614",
"0.7771127",
"0.7754985",
"0.7754543",
"0.7750137",
"0.7709179",
"0.77051... | 0.71956325 | 51 |
New() > itkStatisticsLabelMapFilterLM3IUC3 Create a new object of the class itkStatisticsLabelMapFilterLM3IUC3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named parame... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM3IUC3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3IUL3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3ID3.__New_orig__()\n import itkTemplate\n ... | [
"0.83513415",
"0.82990634",
"0.8298198",
"0.82282394",
"0.76425415",
"0.7634017",
"0.7618364",
"0.7594554",
"0.75652784",
"0.7564233",
"0.75337833",
"0.7499229",
"0.7432661",
"0.7429808",
"0.7393292",
"0.7385338",
"0.738532",
"0.737719",
"0.7338854",
"0.7338269",
"0.7333622",... | 0.84821355 | 0 |
itkStatisticsLabelMapFilterLM3IUC3_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3IUC3 | def itkStatisticsLabelMapFilterLM3IUC3_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3IUC3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF3IUC3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUC3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUC3_cast(obj)",
"def itkLabelStatisticsImageFilterIUC3IUC3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImage... | [
"0.8228992",
"0.819717",
"0.81199324",
"0.8094365",
"0.8073759",
"0.8054705",
"0.8033871",
"0.7992083",
"0.7992069",
"0.7982148",
"0.7953072",
"0.79519296",
"0.795049",
"0.7925125",
"0.78680915",
"0.78651774",
"0.7854555",
"0.784731",
"0.77988744",
"0.77656406",
"0.7742157",
... | 0.7847866 | 17 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3IUL3 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3IUL3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUS3_cast(obj)",
"def itkLabelStatisticsImageFilterIF3IUS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _it... | [
"0.7916572",
"0.7838236",
"0.7818444",
"0.78019893",
"0.7798857",
"0.7784221",
"0.7777885",
"0.77615976",
"0.7747122",
"0.77400374",
"0.7714035",
"0.770931",
"0.7707281",
"0.76991034",
"0.7699046",
"0.7684993",
"0.7681988",
"0.76484656",
"0.76474726",
"0.7610261",
"0.7607464"... | 0.7116041 | 53 |
New() > itkStatisticsLabelMapFilterLM3IUL3 Create a new object of the class itkStatisticsLabelMapFilterLM3IUL3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named parame... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM3IUL3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3IF3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3IUC3.__New_orig__()\n import itkTemplate\n ... | [
"0.8408801",
"0.8403816",
"0.83928597",
"0.82670087",
"0.7416696",
"0.7387512",
"0.7367312",
"0.73617774",
"0.73593974",
"0.733866",
"0.73210454",
"0.73122424",
"0.72755694",
"0.72555023",
"0.7247642",
"0.72439194",
"0.72281337",
"0.7180347",
"0.7174794",
"0.71392065",
"0.712... | 0.8471255 | 0 |
itkStatisticsLabelMapFilterLM3IUL3_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3IUL3 | def itkStatisticsLabelMapFilterLM3IUL3_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3IUL3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF3IUS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUS3_cast(obj)",
"def itkLabelStatisticsImageFilterIF3IUC3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageF... | [
"0.8075284",
"0.8013753",
"0.79702145",
"0.7963826",
"0.79406196",
"0.7926435",
"0.79235977",
"0.79133207",
"0.78997725",
"0.7899132",
"0.7866896",
"0.78468806",
"0.7843746",
"0.7837917",
"0.78277737",
"0.78152484",
"0.77882504",
"0.77715206",
"0.77664316",
"0.7764315",
"0.77... | 0.7748822 | 22 |
cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3IUS3 | def cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3IUS3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUS3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIUS3IUS3 *\":\n return _itkLabelStatisticsImageFilterPytho... | [
"0.79419917",
"0.7921383",
"0.79113805",
"0.7822166",
"0.7796499",
"0.7794385",
"0.7781663",
"0.7765385",
"0.7759478",
"0.77053577",
"0.7691052",
"0.7687384",
"0.76737773",
"0.76462674",
"0.76293683",
"0.76066554",
"0.7589703",
"0.75808007",
"0.758016",
"0.7567709",
"0.756757... | 0.7007735 | 59 |
New() > itkStatisticsLabelMapFilterLM3IUS3 Create a new object of the class itkStatisticsLabelMapFilterLM3IUS3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named parame... | def New(*args, **kargs):
obj = itkStatisticsLabelMapFilterLM3IUS3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3IUL3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkStatisticsLabelMapFilterLM3IF3.__New_orig__()\n import itkTemplate\n ... | [
"0.83877236",
"0.8384198",
"0.8359203",
"0.8356041",
"0.76132643",
"0.75560904",
"0.75331825",
"0.75012666",
"0.7398515",
"0.73075897",
"0.7299103",
"0.7291086",
"0.72425735",
"0.7227306",
"0.7226949",
"0.7176567",
"0.7166465",
"0.7166379",
"0.7158915",
"0.7154076",
"0.713735... | 0.8517691 | 0 |
itkStatisticsLabelMapFilterLM3IUS3_cast(itkLightObject obj) > itkStatisticsLabelMapFilterLM3IUS3 | def itkStatisticsLabelMapFilterLM3IUS3_cast(*args):
return _itkStatisticsLabelMapFilterPython.itkStatisticsLabelMapFilterLM3IUS3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkLabelStatisticsImageFilterIF3IUS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImageFilterIF3IUS3 *\":\n return _itkLabelStatisticsImageFilterPython.itkLabelStatisticsImageFilterIF3IUS3_cast(obj)",
"def itkLabelStatisticsImageFilterIUS3IUS3_cast(obj: 'itkLightObject') -> \"itkLabelStatisticsImage... | [
"0.82974064",
"0.82337",
"0.8110016",
"0.8107313",
"0.8085476",
"0.80550754",
"0.80165243",
"0.80102754",
"0.79560566",
"0.7906318",
"0.78976",
"0.789029",
"0.78818434",
"0.7876664",
"0.7803715",
"0.77962756",
"0.77938676",
"0.77792716",
"0.77745014",
"0.775447",
"0.7745547",... | 0.7802924 | 15 |
Constructor for Data Source | def __init__(self, arr_src, points=[], overwrite=False,
none_for_empty=False):
self.buf = arr_src
self.length = len(arr_src)
self.overwrite = overwrite
self.none_for_empty = none_for_empty
# for circular queue
self.front = self.length - 1
self.re... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self):\r\n super(DataSource, self).__init__()",
"def __init__(self, baseurl, destpath=os.curdir):\n DataSource.__init__(self, destpath=destpath)\n self._baseurl = baseurl",
"def __init__(self, data_source_identifier, verbose=True):\n pass",
"def __init__(self, connection=... | [
"0.7828085",
"0.716437",
"0.7113742",
"0.699929",
"0.6905378",
"0.6870615",
"0.6784253",
"0.6682163",
"0.6662866",
"0.6558462",
"0.6540082",
"0.6535546",
"0.6505649",
"0.6493378",
"0.6457465",
"0.6454973",
"0.64448667",
"0.6407493",
"0.6378136",
"0.6378136",
"0.6378136",
"0... | 0.0 | -1 |
Return the limits of this current data source. The return value | def get_limits(self):
return np.copy(self.limits) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def limits(self):\n return self._limits",
"def get_limits(self):\n return self._get(limits.Limits)",
"def get_limits(self):\n raise NotImplementedError(\"Limits are not available for Cloud Databases\")",
"def getLimits(self):\n lims = [x * self.getSign() + self.getOffset() for x i... | [
"0.8172409",
"0.8122592",
"0.79562265",
"0.75243556",
"0.7483359",
"0.7483359",
"0.7467206",
"0.7200444",
"0.7105098",
"0.7105098",
"0.7033486",
"0.7025889",
"0.6957004",
"0.6943616",
"0.69337356",
"0.6903789",
"0.6898122",
"0.68860286",
"0.68400735",
"0.6786382",
"0.67836565... | 0.7361298 | 7 |
Mostly internal routine to update the limits. Shouldn't need to be called explicitly in most cases. | def update_limits(self):
if len(self) == 0:
self.limits = np.array([[0.0, 0.0], [0.0, 0.0]])
else:
x_min, x_max = self.buf[self.rear][0], self.buf[self.front][0]
y_min, y_max = self.slmm.get_minmax()
self.limits = np.array([[x_min, y_min], [x_max, y_max]]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _update_limits(self):\n if self.pos_x > self.max_x:\n self.max_x = self.pos_x\n if self.pos_y > self.max_y:\n self.max_y = self.pos_y\n if self.pos_x < self.min_x:\n self.min_x = self.pos_x\n if self.pos_y < self.min_y:\n self.min_y = self... | [
"0.7696917",
"0.69790447",
"0.6935479",
"0.6849071",
"0.68075407",
"0.67520756",
"0.65528816",
"0.65270364",
"0.6411282",
"0.6374493",
"0.6373981",
"0.6368561",
"0.63575464",
"0.6353822",
"0.63386905",
"0.63137823",
"0.6308148",
"0.62820834",
"0.6241366",
"0.6221955",
"0.6209... | 0.7623476 | 1 |
Get the earliest data point. Will return `None` if there are no points recorded. | def peek_rear(self):
if len(self) == 0:
if self.none_for_empty:
return None
raise ValueError("Buffer is empty")
return self.buf[self.rear] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def take_min(self):\n return self.get_first()",
"def min(self):\n return self.get_first()",
"def get_start_point(self):\n return self.first_point",
"def Min(data):\n return data.min()",
"def soleDataPoint(self):\n dps = self.datapoints()\n if dps:\n return d... | [
"0.71477854",
"0.69227517",
"0.69204915",
"0.67510766",
"0.674332",
"0.6699315",
"0.6699315",
"0.6686909",
"0.6682598",
"0.66810185",
"0.66086686",
"0.6603871",
"0.6574601",
"0.6572769",
"0.6564813",
"0.6564813",
"0.65636766",
"0.65425545",
"0.6493747",
"0.647854",
"0.6455310... | 0.0 | -1 |
Get the entire set of data points as an `ndarray`. | def get_points(self):
n = len(self)
arr = np.zeros((n, 2), dtype=float)
if n == 0:
return arr
if self.front >= self.rear:
arr[:n, :] = self.buf[self.rear:self.front + 1, :]
else:
m = self.length - self.rear
arr[0:m, :] = self.buf[se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_data():\n data = [np.array([32.,595.]),\n np.array([30.,599.]),\n np.array([18.,622.]),\n np.array([51.,606.]),\n np.array([38.,578.])]\n return data",
"def data(self) -> List[ndarray]:\n return self._data",
"def points(self):\n return sel... | [
"0.69115734",
"0.6813838",
"0.67840606",
"0.66500556",
"0.66073716",
"0.6595007",
"0.6577874",
"0.6574232",
"0.65414363",
"0.64643794",
"0.6428469",
"0.6422628",
"0.64204234",
"0.64163786",
"0.6402079",
"0.6391589",
"0.63884735",
"0.63715506",
"0.63715506",
"0.63127846",
"0.6... | 0.5613908 | 97 |
Check if the input is iterable, stolen from numpy.iterable() | def iterable(x):
try:
iter(x)
return True
except TypeError:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _is_iterable(items):\n return isinstance(items, (list, tuple, set, np.ndarray))",
"def is_iterable(thing):\n\n try:\n iter(thing)\n except TypeError:\n return False\n return True",
"def isiterable(x):\n try:\n iter(x)\n except TypeError:\n return False\n ret... | [
"0.8514692",
"0.8378008",
"0.8367926",
"0.836383",
"0.8277029",
"0.825061",
"0.82478803",
"0.8200864",
"0.8187323",
"0.8165894",
"0.8161609",
"0.8106836",
"0.80705196",
"0.79937494",
"0.79414344",
"0.7856003",
"0.7830106",
"0.7799483",
"0.77749383",
"0.7731699",
"0.7640094",
... | 0.8218224 | 7 |
Make y axis point right. Work on top left 3x3 subset of MV matrix. This was deduced by watching behaviour of MV matrix while manually | def rotateYRight(self):
MV = self.MV
MV[:3, 0] = 0, 1, 0 # 1st col is right vector, make it point along y axis
# set middle middle and middle right values to zero:
MV[1, 1] = 0
MV[1, 2] = 0
a = MV[0, 1] # grab top middle value
b = np.sqrt(1 - a**2) # calc new comp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reverse_y():\n plt.ylim(plt.ylim()[::-1])",
"def move_right(self):\n self.yaw_motor.step_forward()",
"def move_south(self):\n self.vertical = (self.vertical * 2)[3:7]\n self.horizontal[1] = self.vertical[0]\n self.horizontal[3] = self.vertical[2]",
"def go_right(self):\n ... | [
"0.5996635",
"0.5766922",
"0.56875473",
"0.5680989",
"0.5680989",
"0.56360394",
"0.56265175",
"0.5579821",
"0.557396",
"0.5554407",
"0.5542256",
"0.5520235",
"0.55156887",
"0.5471287",
"0.5463062",
"0.54264283",
"0.5424246",
"0.5413427",
"0.54133105",
"0.53778315",
"0.5369613... | 0.7368374 | 1 |
Translate along view normal vector | def zoom(self, dr):
d = self.getDistance()
vn = self.getViewNormal()
vn *= dr*d
GL.glTranslate(vn[0], vn[1], vn[2]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _normal_vector(o, p0_3d, p1_3d):\n # The vector between middle point of v1-v2 and object center location\n # is the normal vector I'm looking for\n vn = p0_3d.lerp(p1_3d, 0.5) - o.matrix_world.translation\n # normalize so I can to length computation on it\n vn.normalize()\n return vn",
"def... | [
"0.71389234",
"0.7042153",
"0.6895338",
"0.6679227",
"0.6607681",
"0.65221083",
"0.6485948",
"0.64289105",
"0.64289105",
"0.6360593",
"0.6329387",
"0.63027",
"0.6276381",
"0.6269661",
"0.6251185",
"0.6249649",
"0.62177056",
"0.6216836",
"0.6203873",
"0.62004495",
"0.61948925"... | 0.0 | -1 |
Return sid of point at window coords x, y (bottom left origin), or first or multiple sids that fall within a square 2pb+1 pix on a side, centered on x, y. pb is the pixel border to include around x, y | def pick(self, x, y, pb=2, multiple=False):
width = self.size().width()
height = self.size().height()
#print('coords: %d, %d' % (x, y))
# constrain to within border 1 pix smaller than widget, for glReadPixels call
if not (pb <= x < width-pb and pb <= y < height-pb): # cursor out ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pick(self, x, y, pb=2, multiple=False):\n width = self.size().width()\n height = self.size().height()\n #print('coords: %d, %d' % (x, y))\n # constrain to within border 1 pix smaller than widget, for glReadPixels call\n if not (pb <= x < width-pb and pb <= y < height-pb): # c... | [
"0.57835656",
"0.56045663",
"0.5473757",
"0.5418922",
"0.5393609",
"0.53634036",
"0.53576416",
"0.5310728",
"0.5287273",
"0.52721727",
"0.5265623",
"0.52653956",
"0.5256703",
"0.52531713",
"0.52523524",
"0.52469856",
"0.52390695",
"0.52195984",
"0.51793253",
"0.5175167",
"0.5... | 0.57835656 | 1 |
Throws ValueError if input is missing. | def _incomplete_error(self, option_name):
msg = "'{}' must be specified for the '{}' section.".format(option_name, self._SECTION_NAME)
raise ValueError(msg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def validate_input(self, *args):\n return",
"def isInputValid(self, input):\r\n pass",
"def _check_for_incomplete_input(self):\n pass",
"def _ensure_required_inputs(self):\n for name, input_type in self._input_types.items():\n if not input_type.optional and self._input_... | [
"0.67622846",
"0.6646409",
"0.66236454",
"0.6564131",
"0.6536347",
"0.65363103",
"0.64271027",
"0.6414682",
"0.63591206",
"0.62719816",
"0.6259142",
"0.62388355",
"0.6207933",
"0.6190121",
"0.61776894",
"0.6176333",
"0.6161045",
"0.61298144",
"0.6111981",
"0.610898",
"0.61020... | 0.0 | -1 |
Check that no resident is matched to an unacceptable hospital. | def _check_resident_matching(self):
errors = []
for resident in self.residents:
if (
resident.matching is not None
and resident.matching not in resident.prefs
):
errors.append(
ValueError(
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _check_resident_unhappy(resident, hospital):\n\n return resident.matching is None or resident.prefers(\n hospital, resident.matching\n )",
"def _check_hospital_unhappy(resident, hospital):\n\n return len(hospital.matching) < hospital.capacity or any(\n [hospital.prefers(resident, match... | [
"0.8114748",
"0.79789793",
"0.74247664",
"0.72080266",
"0.62878865",
"0.62212086",
"0.59998053",
"0.59579456",
"0.5930203",
"0.58925563",
"0.56671387",
"0.56647104",
"0.5644606",
"0.56050926",
"0.5599546",
"0.55936617",
"0.55907387",
"0.5530802",
"0.55128145",
"0.5486639",
"0... | 0.57943666 | 10 |
Check that no hospital is matched to an unacceptable resident. | def _check_hospital_matching(self):
errors = []
for hospital in self.hospitals:
for resident in hospital.matching:
if resident not in hospital.prefs:
errors.append(
ValueError(
f"{hospital} has {resident... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _check_resident_unhappy(resident, hospital):\n\n return resident.matching is None or resident.prefers(\n hospital, resident.matching\n )",
"def _check_hospital_unhappy(resident, hospital):\n\n return len(hospital.matching) < hospital.capacity or any(\n [hospital.prefers(resident, match... | [
"0.8121348",
"0.79856",
"0.75545937",
"0.7358393",
"0.6186264",
"0.6103592",
"0.6094365",
"0.6025647",
"0.59108216",
"0.57657677",
"0.57086307",
"0.5663699",
"0.56443065",
"0.5628587",
"0.5606618",
"0.5602197",
"0.55814576",
"0.55708045",
"0.5556007",
"0.5551364",
"0.55445755... | 0.632186 | 4 |
Update image and position of sprite. | def update(self):
if self.is_moving_up:
self.dirty = 1
if self.is_moving_down:
self.dirty = 1
if self.is_moving_right:
self.dirty = 1
if self.is_moving_left:
self.dirty = 1
self.rect.x += self.moveX
self.logic.wall_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_image(self):\n if self.updated_sprite_list:\n self.image = self.increment_sprite_index(True)\n self.updated_sprite_list = False\n self.update_count_down = self.update_frames\n self.redraw = True\n elif self.update_frames == 0:\n return... | [
"0.7552532",
"0.74615955",
"0.7450382",
"0.73135924",
"0.730193",
"0.7291682",
"0.72894883",
"0.72291064",
"0.7205237",
"0.71447015",
"0.7120906",
"0.7028086",
"0.70193225",
"0.70078045",
"0.6972788",
"0.6912426",
"0.6899747",
"0.6893896",
"0.67640364",
"0.6747291",
"0.672846... | 0.0 | -1 |
getDICECode() appends the DICE Code associated with the type in the typesAndIndicesResults variable, which comes from the getTypesAndIndices() method. This method returns a list of tuples | def getDICECode(self, typesAndIndicesResults):
DICECodeResults = list()
typesList = [tuples[0] for tuples in typesAndIndicesResults]
i = 0
# CALL THESE JUST ONCE BEFORE LOOP(S)
append = DICECodeResults.append
# - - - - - - - - - - - - - - - - - -
while i < len(typesAndIndicesResults):
for DICECode... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getTypesAndIndices(self, findAllResults = None):\n\t\tresultsIndices = [i for i,j in findAllResults]\n\t\ttypesAndIndicesResults = list()\n\n\n\t\t#=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=#\n\t\t# (1) Iterate through the (INDEX, LOCATION) formatted tuple t... | [
"0.5339413",
"0.52583724",
"0.5206474",
"0.5144311",
"0.50455976",
"0.5027874",
"0.49873924",
"0.49261376",
"0.49255216",
"0.49134162",
"0.48892394",
"0.48654506",
"0.48537362",
"0.4844996",
"0.48395124",
"0.48009878",
"0.47640264",
"0.47577673",
"0.4728271",
"0.47259763",
"0... | 0.80273175 | 0 |
Returns the set of all tags referred to in this document. | def tags_used(self):
return set([query.all_referenced_tags for query in self.snippets]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tag_set(self):\n tag_set = set()\n for tag_token in self.tags:\n tag_set.add(tag_token['tag'])\n return tag_set",
"def get_tags(self) -> Set[Text]:\r\n return {tag for tag in self.tags}",
"def tags(self) -> \"IterableList[TagReference]\":\n return TagReference.... | [
"0.80746084",
"0.79332286",
"0.7893869",
"0.7770048",
"0.7585213",
"0.74556935",
"0.7408252",
"0.7406492",
"0.7406492",
"0.7406492",
"0.7406492",
"0.7406492",
"0.7406492",
"0.7406492",
"0.7406492",
"0.72961414",
"0.7226713",
"0.71228105",
"0.7081927",
"0.704197",
"0.7029526",... | 0.81019205 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.