query stringlengths 9 9.05k | document stringlengths 10 222k | metadata dict | negatives listlengths 30 30 | negative_scores listlengths 30 30 | document_score stringlengths 4 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Find indices for GlobCurrent data | def getIndicesGlobCurrent(lons, lats):
if np.size(lons) == 1:
lon_0, lon_1 = int(np.floor(lons-5)), int(np.ceil(lons+5))
else:
lon_0, lon_1 = int(np.round(np.min(lons))), int(np.round(np.max(lons)))
if np.size(lats) == 1:
lat_0, lat_1 = int(np.floor(lats-5)), int(np.ceil(lats+5))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def global_index(self):\n raise NotImplementedError",
"def find_index(self):\n current = self.from_grid\n #find index of \"*\"\n for x in range(len(current)):\n for y in range(len(current[x])):\n if current[x][y] == \"*\":\n index = (x,y)\n... | [
"0.6453691",
"0.6447097",
"0.6393815",
"0.6322937",
"0.62833965",
"0.62550884",
"0.6188486",
"0.607216",
"0.6058025",
"0.6056138",
"0.60276705",
"0.60247624",
"0.5993477",
"0.59621423",
"0.591082",
"0.58894205",
"0.58742017",
"0.58617294",
"0.5855681",
"0.5849336",
"0.5847140... | 0.6648529 | 0 |
Check if the given pointindices (x, y) is an coast point. Method is by checking for [0, 0, U] or for [U, 0, 0], with center point as given point. Use direction ("x" or "y") to find coasts perpendicular to the given direction. If None, then check for both "x" and "y". | def checkCoast1d(fieldset, x, y, direction=None, time=0):
if direction == None:
coast_x = checkCoast1d(fieldset, x, y, direction="x")
coast_y = checkCoast1d(fieldset, x, y, direction="y")
return coast_x, coast_y
elif direction == "x":
dims_U = fieldset.U.data.shape
vect... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_cressman_point(test_data):\n xp, yp, z = test_data\n\n r = 40\n\n obs_tree = cKDTree(list(zip(xp, yp)))\n\n indices = obs_tree.query_ball_point([30, 30], r=r)\n\n dists = dist_2(30, 30, xp[indices], yp[indices])\n values = z[indices]\n\n truth = 1.05499444404\n\n value = cressman_p... | [
"0.56079865",
"0.5472101",
"0.5470431",
"0.54413205",
"0.54118884",
"0.5399358",
"0.538376",
"0.537354",
"0.536545",
"0.53183824",
"0.53023016",
"0.5268451",
"0.5259127",
"0.52537566",
"0.5193507",
"0.5190191",
"0.51871365",
"0.51795274",
"0.5173106",
"0.517213",
"0.51362944"... | 0.6268092 | 0 |
Search for gridpoints that represent coasts, i.e. groups of points with velocities [U, 0, 0] or [0, 0, U] (or V). Then calculate the new center value as + abs(U factor) + constant. Returns two fields (U and V) with 'imaginary'velocities at the coast. Function works for fieldsets with fields U and V with two spatial coo... | def createCoastVelocities(fieldset, factor=True, abs=True, constant=0):
vel_U = fieldset.U.data
vel_V = fieldset.V.data
dims_U = vel_U.shape
dims_V = vel_V.shape
lons_U = fieldset.U.grid.lon
lons_V = fieldset.V.grid.lon
lats_U = fieldset.U.grid.lat
lats_V = fieldset.V.grid.lat
if fa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_uvcircle(Grid):\n \n# center of circulation\n loc=-67.5;lac=41.5; \n dx=(Grid['lonc']-loc)*Grid['coslatc']\n dy=(Grid['latc']-lac)\n di=np.sqrt(dx*dx+dy*dy)\n an=np.angle(dx+1j*dy)\n# velocity is linearly increasing with distance \n# 0.1 m/s at 1 deg distance away from center \n# cyclon... | [
"0.62625813",
"0.5627278",
"0.5522596",
"0.54854137",
"0.5461496",
"0.54427856",
"0.5418968",
"0.53238946",
"0.5314341",
"0.5222691",
"0.5193673",
"0.51529855",
"0.51454973",
"0.51393944",
"0.5135866",
"0.5133861",
"0.50934976",
"0.50916505",
"0.5089288",
"0.5081203",
"0.5060... | 0.6652033 | 0 |
Returns a new fieldset that results from fieldset + coastfields | def addGlobCurrentCoast(fieldset, coastfields):
[field_coast_U, field_coast_V, lons, lats] = coastfields
new_fieldset = fieldset
if np.shape(fieldset.U.data)[0] == np.shape(fieldset.V.data)[0]:
nt = np.shape(fieldset.U.data)[0]
else:
print "addGlobCurrentCoast(): fieldset.U.data and fie... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_overall_make_fieldsets(self):\n original_fieldsets = self.form.fieldsets\n self.form.fieldsets = (\n ('Your Name', {\n 'position': 1,\n 'fields': [('first_name', 'last_name', )],\n }),\n (None, {\n 'classes': ('cou... | [
"0.59608716",
"0.56830096",
"0.5589279",
"0.55687743",
"0.5465725",
"0.5339843",
"0.5262904",
"0.5211968",
"0.5193837",
"0.51007813",
"0.49679595",
"0.49518123",
"0.48865175",
"0.48711562",
"0.48533636",
"0.48469108",
"0.48384425",
"0.48349166",
"0.4830901",
"0.47520772",
"0.... | 0.6512585 | 0 |
Remove particles that are on land. Particles on land are particles with velocities 0 at grid points around. For parameter 'method', use 'grid' or 'interpolated'; 'interpolated' is much faster than 'grid'. | def removeLandParticles(fieldset=None, particleset=None, show=False, filename=None, indices={}, method='interpolated'):
if particleset is None:
print "removeLandParticles(): no particles found, returning"
return
if filename is None and fieldset is None:
print "removeLandParticles(): no f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def partial_grid(grid, center, observable_depth):\n\n i, j = center\n offset = observable_depth\n\n mask = np.ones_like(grid, dtype=bool)\n mask[max(0, i - offset): i + offset + 1, max(0, j - offset): j + offset + 1] = False\n\n _grid = np.array(grid, copy=True)\n _grid[mask] = -1\n return _gr... | [
"0.5372824",
"0.52670705",
"0.5240516",
"0.51548034",
"0.51482475",
"0.5078057",
"0.50580955",
"0.50444806",
"0.49724826",
"0.49568388",
"0.4902441",
"0.48780218",
"0.48619974",
"0.4831152",
"0.48276758",
"0.48257577",
"0.48091936",
"0.48002025",
"0.47968534",
"0.4793621",
"0... | 0.7413898 | 0 |
end_of_day create a new object | def test_new_object(self):
now = datetime.now()
eod = end_of_day(now)
self.assertNotEqual(now, eod) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_get_end_date(self):\n # Creating booking object\n book_time = datetime.utcnow()\n duration = 3\n booking = Booking(1, \"dummy\", book_time, duration)\n\n # Checking end time is correct\n end_time = book_time + timedelta(hours=duration)\n assert (end_time ==... | [
"0.6230402",
"0.62222433",
"0.60563713",
"0.60062003",
"0.5962747",
"0.59249306",
"0.58717275",
"0.5871036",
"0.58601767",
"0.57668763",
"0.5766552",
"0.57464725",
"0.572293",
"0.5681296",
"0.5643679",
"0.5629241",
"0.56283325",
"0.5615122",
"0.5592825",
"0.55902797",
"0.5554... | 0.7671648 | 0 |
Move the values in the 'source' key to the 'dest' key for cases in the 'collection' collection in the 'db' where their caseReference.sourceId matches 'source_id'. If 'dry_run' is set, then don't actually change anything, but do report on which cases would be modified. | def move_notes(db, collection, source_id, source, dest, dry_run):
logging.info(f"Moving values from {source} to {dest} in collection: {collection}")
query = { "caseReference.sourceId": source_id }
if dry_run:
logging.info("Dry running notes movement")
cases = db[collection].find(query)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_sources(self):\n documents = self.get_docs_sources()\n \n for index,each_doc in enumerate(documents['docs']):\n if each_doc['found']:\n _,update_spec,action_buffer_index = self.doc_to_get[index]\n \n # maybe source already has ... | [
"0.48418257",
"0.48267162",
"0.4767849",
"0.47529653",
"0.4726292",
"0.4672278",
"0.46611947",
"0.4658583",
"0.4651802",
"0.46428964",
"0.4604029",
"0.45792472",
"0.45301268",
"0.45145127",
"0.4509432",
"0.45052227",
"0.4472048",
"0.4455405",
"0.44467258",
"0.44454837",
"0.44... | 0.73266536 | 0 |
Returns an XPath proxy instance bound with the schema. | def xpath_proxy(self) -> XMLSchemaProxy:
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __call__(self, proxy):\n def _lookup():\n try:\n return getattr(self, proxy)\n except AttributeError:\n raise UnboundProxyError(\"object '%s' unbound\" % proxy)\n return Proxy(_lookup)",
"def xpath(self, xpathable, xpath):\n return xpat... | [
"0.5465034",
"0.5431379",
"0.53132415",
"0.5214584",
"0.5208873",
"0.51903224",
"0.514993",
"0.5132828",
"0.5119877",
"0.5043704",
"0.5001081",
"0.49973828",
"0.4977126",
"0.4977126",
"0.4967177",
"0.4963712",
"0.49011484",
"0.48216784",
"0.47992742",
"0.47941312",
"0.4776151... | 0.78287786 | 0 |
Returns an XPath node for applying selectors on XSD schema/component. | def xpath_node(self) -> Union[SchemaElementNode, LazyElementNode]:
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xpath(self, expr=''):\n from xml.dom.ext import GetAllNs\n from xml import xpath\n \n dom = self.get_dom(self(method='xml'))\n context = xpath.Context.Context(dom,\n processorNss=GetAllNs(dom.documentElement))\n return xpath.Evalu... | [
"0.54756564",
"0.53884596",
"0.5173115",
"0.51697695",
"0.51697695",
"0.513531",
"0.5025182",
"0.49852687",
"0.4879712",
"0.48566383",
"0.4844469",
"0.47911754",
"0.47664222",
"0.4744899",
"0.4715904",
"0.47050932",
"0.46934196",
"0.46802264",
"0.46683142",
"0.4604508",
"0.45... | 0.54965353 | 0 |
Returns a dictionary with namespaces for XPath selection. | def _get_xpath_namespaces(self, namespaces: Optional[NamespacesType] = None) \
-> Dict[str, str]:
if namespaces is None:
namespaces = {k: v for k, v in self.namespaces.items() if k}
namespaces[''] = self.xpath_default_namespace
elif '' not in namespaces:
n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_namespaces():\r\n\r\n print 'Getting namespaces'\r\n tree = etree.parse('http://lesswrong.wikia.com/wiki/Special:AllPages', parser)\r\n options = tree.xpath('//select[@id=\"namespace\"]/option')\r\n namespaces = [option.get('value') for option in options]\r\n pprint(namespaces)\r\n return... | [
"0.71440285",
"0.7063469",
"0.70033437",
"0.6894667",
"0.6639034",
"0.6618696",
"0.660293",
"0.63747287",
"0.62754935",
"0.6164123",
"0.61408675",
"0.61350054",
"0.6121655",
"0.60935825",
"0.60908055",
"0.6069367",
"0.6019972",
"0.59668654",
"0.5963318",
"0.5877314",
"0.58627... | 0.75216925 | 0 |
Finds all XSD subelements matching the path. | def findall(self, path: str, namespaces: Optional[NamespacesType] = None) -> List[E]:
path = _REGEX_TAG_POSITION.sub('', path.strip()) # Strip tags positions from path
namespaces = self._get_xpath_namespaces(namespaces)
parser = XPath2Parser(namespaces, strict=False)
context = XPathSche... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find(self, path, root=None):\n\n root = root if root is not None else self.root\n return root.xpath(path, namespaces=self.nsmap) or []",
"def LoadAllSubElements(self, recursive=False):\n pass",
"def find(self, name=None, pattern=None, extension=None, **kwargs):\n elements = []\n ... | [
"0.63033974",
"0.5856821",
"0.574152",
"0.5709713",
"0.56698793",
"0.56010014",
"0.553056",
"0.5491378",
"0.5368071",
"0.5339534",
"0.5339094",
"0.53047115",
"0.52909917",
"0.5273632",
"0.52458805",
"0.5245865",
"0.5219145",
"0.5214773",
"0.5202568",
"0.51966524",
"0.51961464... | 0.63252014 | 0 |
Creates an iterator for the XSD element and its subelements. If tag is not `None` or '', only XSD elements whose matches tag are returned from the iterator. Local elements are expanded without repetitions. Element references are not expanded because the global elements are not descendants of other elements. | def iter(self, tag: Optional[str] = None) -> Iterator[E]:
def safe_iter(elem: Any) -> Iterator[E]:
if tag is None or elem.is_matching(tag):
yield elem
for child in elem:
if child.parent is None:
yield from safe_iter(child)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iterchildren(self, tag: Optional[str] = None) -> Iterator[E]:\n if tag == '*':\n tag = None\n for child in self:\n if tag is None or child.is_matching(tag):\n yield child",
"def iter_xsd_components(elem, start=0):\n counter = 0\n for child in elem:\n ... | [
"0.57244277",
"0.55467594",
"0.54912657",
"0.53314024",
"0.51527023",
"0.51527023",
"0.51076376",
"0.5094536",
"0.50437206",
"0.50437206",
"0.50437206",
"0.50437206",
"0.50437206",
"0.50437206",
"0.50437206",
"0.502445",
"0.502445",
"0.502445",
"0.5023664",
"0.49797943",
"0.4... | 0.7338833 | 0 |
Creates an iterator for the child elements of the XSD component. If tag is not `None` or '', only XSD elements whose name matches tag are returned from the iterator. | def iterchildren(self, tag: Optional[str] = None) -> Iterator[E]:
if tag == '*':
tag = None
for child in self:
if tag is None or child.is_matching(tag):
yield child | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iter(self, tag: Optional[str] = None) -> Iterator[E]:\n def safe_iter(elem: Any) -> Iterator[E]:\n if tag is None or elem.is_matching(tag):\n yield elem\n for child in elem:\n if child.parent is None:\n yield from safe_iter(child)\n ... | [
"0.7357695",
"0.614868",
"0.5988141",
"0.5920626",
"0.56678975",
"0.56479853",
"0.5637801",
"0.5637801",
"0.5619553",
"0.5590479",
"0.557138",
"0.557138",
"0.55427253",
"0.5399226",
"0.53812325",
"0.5371278",
"0.5337766",
"0.5332808",
"0.52959484",
"0.5264564",
"0.5233588",
... | 0.7396138 | 0 |
Returns a new instance of the collection with the given state. | def for_state(self, state):
return self.__class__(
self.session,
state=state,
term=self.term,
order=self.order,
direction=self.direction,
issues=self.issues,
categories=self.categories,
organizations=self.organizati... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fromState(state):",
"def state(self):\n return self",
"def __init__(self, state):\n self.state = state",
"def replicate(self, filter_state: FilterResult) -> \"FilterAlgorithmState\":\n\n return FilterAlgorithmState(filter_state)",
"def collection_create(self, name):\n try:\n... | [
"0.5944353",
"0.58211285",
"0.5713235",
"0.56935585",
"0.5673062",
"0.5651612",
"0.56309736",
"0.5571877",
"0.55388975",
"0.55272084",
"0.55093074",
"0.54950285",
"0.5480131",
"0.5463875",
"0.5460618",
"0.54582745",
"0.5411585",
"0.5408632",
"0.5400853",
"0.5388395",
"0.53804... | 0.6369786 | 0 |
Returns a new instance of the collection with the given term. | def for_term(self, term):
return self.__class__(
self.session,
state=self.state,
term=term,
order=self.order,
direction=self.direction,
issues=self.issues,
categories=self.categories,
organizations=self.organization... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_term(term):\n if term is None:\n return term\n elif isinstance(term, (six.string_types, int, float)):\n return term\n elif isinstance(term, dict):\n return {k: from_term(v) for k, v in term.items()}\n elif isinstance(term, list):\n return [from_term(t) for i, t in e... | [
"0.59653044",
"0.5890433",
"0.5600699",
"0.55818707",
"0.5450069",
"0.54487526",
"0.53918386",
"0.5377323",
"0.535883",
"0.53301984",
"0.5319298",
"0.5294664",
"0.52786493",
"0.52546275",
"0.52319443",
"0.5207968",
"0.5182739",
"0.51449627",
"0.511768",
"0.51073277",
"0.50831... | 0.7090461 | 0 |
Returns a new instance of the collection with the given organizations. | def for_organizations(self, organizations):
return self.__class__(
self.session,
state=self.state,
term=self.term,
order=self.order,
direction=self.direction,
issues=self.issues,
categories=self.categories,
organiza... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def organizations(self):\r\n return Organizations(self)",
"def organizations(self):\r\n return organizations.Organizations(self)",
"def organization(self, organization_id_or_name):\r\n return Organization(self, organization_id_or_name)",
"def organizations(self):\n self.elements('... | [
"0.74378234",
"0.6760645",
"0.61181533",
"0.59568536",
"0.59443873",
"0.59443873",
"0.59443873",
"0.592083",
"0.5690632",
"0.5593542",
"0.5578716",
"0.5358783",
"0.52849287",
"0.5226263",
"0.5206419",
"0.5165867",
"0.5146548",
"0.5114389",
"0.50956005",
"0.50931937",
"0.50738... | 0.7296705 | 1 |
Returns a new instance of the collection with the given categories. | def for_categories(self, categories):
return self.__class__(
self.session,
state=self.state,
term=self.term,
order=self.order,
direction=self.direction,
issues=self.issues,
categories=categories,
organizations=self.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_categories(self, categories):\r\n category, created = Categories.objects.get_or_create(name=categories)\r\n category.save()",
"def __init__(self, categories, **kwargs):\n with KWArgs(kwargs) as k:\n metadata = k.optional(\"metadata\")\n options = k.options(growt... | [
"0.6957448",
"0.61840683",
"0.6041799",
"0.6003293",
"0.59911835",
"0.59630954",
"0.5941857",
"0.59269565",
"0.59262526",
"0.5878812",
"0.5878812",
"0.5878812",
"0.5856799",
"0.5821118",
"0.5821118",
"0.5821118",
"0.5821118",
"0.5749909",
"0.5749631",
"0.5748209",
"0.57361764... | 0.7146387 | 0 |
Filters the given query by the state of the collection. | def filter_query(self, query):
if self.state:
query = query.filter(self.model_class.state == self.state)
if self.term:
term = '%{}%'.format(self.term)
query = query.filter(
or_(
*[column.ilike(term) for column in self.term_columns]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def filter_query(self, request, query, view):\n raise NotImplementedError('.filter_query() must be implemented.') # pragma: no cover",
"def filter_query(self, request, query, view):\n\n raise NotImplementedError('.filter_query() must be implemented.') # pragma: no cover",
"def filter(self, **qu... | [
"0.7057099",
"0.7044641",
"0.68369263",
"0.6756651",
"0.6695371",
"0.64820087",
"0.6429064",
"0.6407038",
"0.61632925",
"0.61632925",
"0.6138471",
"0.59885144",
"0.59711885",
"0.5953975",
"0.5924575",
"0.58932453",
"0.58861667",
"0.58177763",
"0.5811816",
"0.57960546",
"0.573... | 0.72080255 | 0 |
Orders the given query by the state of the collection. | def order_query(self, query):
direction = desc if self.direction == 'desc' else asc
if self.order in inspect(self.model_class).columns.keys():
attribute = getattr(self.model_class, self.order)
elif self.order == 'group.name':
attribute = func.coalesce(UserGroup.name, '')... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def order_by(self, *orderings):\n return OrderedQuery(self, orderings)",
"def sort_query(query, *args):\n\n return QuerySorter()(query, *args)",
"def pre_sort(self, qs):\n return qs",
"def get_sort_query(self, kind, order, is_number):\n pass",
"def filter_and_order(cls, *args, **kwa... | [
"0.6331785",
"0.6266559",
"0.62281746",
"0.6213185",
"0.6201246",
"0.61883336",
"0.61063623",
"0.6094907",
"0.6085527",
"0.60407215",
"0.5990269",
"0.5957123",
"0.5940655",
"0.5931854",
"0.58197206",
"0.5782822",
"0.5753226",
"0.5681607",
"0.56429625",
"0.56151074",
"0.558048... | 0.6702002 | 0 |
Add a new notice. A unique, URLfriendly name is created automatically for this notice using the title and optionally numbers for duplicate names. Returns the created notice. | def add(self, title, text, **optional):
issues = optional.pop('issues', None)
categories = optional.pop('categories', None)
organizations = optional.pop('organizations', None)
notice = self.model_class(
state='drafted',
name=self._get_unique_name(title),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_notice(benchmark, namespace, notice, warning):\n\n index = -1\n prev_element = None\n existing_notices = list(benchmark.findall(\"./{%s}notice\" % (namespace)))\n if existing_notices:\n prev_element = existing_notices[0]\n # insert before the first notice\n index = list(ben... | [
"0.56421316",
"0.55835366",
"0.5414869",
"0.5366009",
"0.53508157",
"0.51144105",
"0.5098821",
"0.50961304",
"0.5018316",
"0.49980038",
"0.49971575",
"0.4976071",
"0.48677492",
"0.48280174",
"0.4804101",
"0.480083",
"0.47970104",
"0.47577083",
"0.4755768",
"0.47501656",
"0.47... | 0.60044104 | 0 |
Model loader Load saved models from a given type. | def load_all_models(save_models_dir: str, model_type: str, model_i: int):
try:
with open(os.path.join(save_models_dir, f"{model_type}_{model_i}.pkl"), "rb") as save_model:
model = pickle.load(save_model)
except Exception as e:
logger.error(f"Error is: {e}")
return None
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_status(model_type):\n\n if model_type.lower() == 'random':\n pickle_object = FM().random_model \n elif model_type.lower() == 'ranking_paas':\n pickle_object = FM().ranking_paas\n elif model_type.lower() == 'ranking_mie':\n pickle_object = FM().ranking_mie\n else: \n ... | [
"0.7333444",
"0.71468955",
"0.71181244",
"0.70033467",
"0.700208",
"0.7000032",
"0.69691664",
"0.6930376",
"0.69231087",
"0.69230175",
"0.6812372",
"0.6803732",
"0.6788368",
"0.67628384",
"0.67308736",
"0.6721486",
"0.66604704",
"0.6575732",
"0.6533433",
"0.65247107",
"0.6520... | 0.7254576 | 1 |
Returns the previous player in the game | def previous_player(current_player, players):
if len(players) == 1:
return players[0]
if current_player != players[0]:
return players[players.index(current_player) - 1]
return players[-1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_prev_player(self):\r\n prev_cmd = self.get_last_cmd()\r\n if prev_cmd is None:\r\n return None # No previous player\r\n prev_player = prev_cmd.new_player\r\n return prev_player",
"def previous(self):\n return self._call_player_proxy('Prev', None)",
... | [
"0.8743923",
"0.8429462",
"0.7559695",
"0.73591363",
"0.7298681",
"0.72888225",
"0.7208502",
"0.71741015",
"0.7152836",
"0.71389943",
"0.71126753",
"0.70468056",
"0.70259404",
"0.700814",
"0.6993499",
"0.68413174",
"0.6834683",
"0.67986256",
"0.6794028",
"0.6794028",
"0.67642... | 0.84969294 | 1 |
Expand pool to fit all available disk space. | async def expand(self, job, id, options):
pool = await self.middleware.call('pool.get_instance', id)
if osc.IS_LINUX:
if options.get('passphrase'):
raise CallError('Passphrase should not be supplied for this platform.')
# FIXME: We have issues in ZoL where when po... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _grow(self):\n self.capacity *= self.factor\n temp = [None] * self.capacity\n for i in range(self.size):\n temp[i] = self.store[i]\n self.store = temp",
"def _shrink(self):\n self.capacity = round(self.capacity / self.factor)\n temp = [None] * self.capacit... | [
"0.6804026",
"0.6635278",
"0.5852176",
"0.58081007",
"0.565151",
"0.5614129",
"0.54635626",
"0.5400802",
"0.5358957",
"0.5342328",
"0.53351146",
"0.53071797",
"0.5278133",
"0.52552253",
"0.5240566",
"0.5223339",
"0.52175146",
"0.52050793",
"0.51675636",
"0.51647794",
"0.51304... | 0.6712329 | 1 |
Simplify operation IDs so that generated API clients have simpler function names. Should be called only after all routes have been added. | def use_route_names_as_operation_ids(app: FastAPI) -> None:
for route in app.routes:
if isinstance(route, APIRoute):
route.operation_id = route.name # in this case, 'read_items' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_operation_id(self):\n operation_id = self.yaml_parser.object.get('operationId', None)\n if not operation_id:\n operation_id = self.method + \"-\" + self.path.strip(\"/\").replace(\"/\", \"-\")\n\n return operation_id",
"def resolve_operation_id(self, operation):\n o... | [
"0.6171707",
"0.59890854",
"0.5863256",
"0.54752845",
"0.54752845",
"0.5408825",
"0.53644794",
"0.52820486",
"0.5240799",
"0.5228973",
"0.5227738",
"0.5208541",
"0.51458246",
"0.51408845",
"0.5099467",
"0.5098431",
"0.50983053",
"0.5063257",
"0.5009329",
"0.49899998",
"0.4952... | 0.72043145 | 0 |
Receives a path and returns it's chmods as string. | def getModeString(fullPath, stats):
bits = "rwx"
modes = ""
permissions = (
S_IRUSR,
S_IWUSR,
S_IXUSR,
S_IRGRP,
S_IWGRP,
S_IXGRP,
S_IROTH,
S_IWOTH,
S_IXOTH,
)
fileType = getFileType(f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _path_to_string(path):\n return '.'.join(path)",
"def _get_files(path, file, modality):\n p = Path(path)\n res = [p/o for o in file if not o.startswith('.') and is_mods(o, modality)]\n assert len(res)==len(modality) #TODO: Assert message\n return res",
"def as_string(path: pathlib.Path) -> s... | [
"0.5570423",
"0.5455322",
"0.53800666",
"0.5358871",
"0.5336771",
"0.5259064",
"0.5242445",
"0.5215047",
"0.5184774",
"0.51608336",
"0.515875",
"0.51563805",
"0.5105882",
"0.50807166",
"0.5036274",
"0.50117004",
"0.49904376",
"0.4986856",
"0.49816695",
"0.49706954",
"0.496668... | 0.55142456 | 1 |
Labels the SMT query as unsatisfiable, and associates the unsatisfiable query with an unsatisfiable core generated by an SMT solver. | def labelUnsat(self, unsatCore):
self.satisfiability = Satisfiability.UNSAT
self.model = None
self.unsatCore = unsatCore | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def labelUnknown(self):\n self.satisfiability = Satisfiability.UNKNOWN\n self.model = None\n self.unsatCore = []",
"def solve_nonlinear(self, params, unknowns, resids):\n pass",
"def solve_nonlinear(self, params, unknowns, resids):\n pass",
"def get_named_unsat_core(self):\... | [
"0.64571327",
"0.54575545",
"0.54575545",
"0.53879243",
"0.52592176",
"0.48020336",
"0.47973606",
"0.47750366",
"0.47278866",
"0.47255918",
"0.47174272",
"0.47083384",
"0.4634288",
"0.4633996",
"0.46068567",
"0.45700768",
"0.45576578",
"0.45564908",
"0.45518088",
"0.45495242",
... | 0.65997016 | 0 |
Labels the satisfiability of the SMT query as unknown. | def labelUnknown(self):
self.satisfiability = Satisfiability.UNKNOWN
self.model = None
self.unsatCore = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def solve_nonlinear(self, params, unknowns, resids):\n pass",
"def solve_nonlinear(self, params, unknowns, resids):\n pass",
"def get_do_not_apply_label(self):\n return ''",
"def get_do_not_apply_label(self):\n return ''",
"def labelUnsat(self, unsatCore):\n self.satisfia... | [
"0.5913613",
"0.5913613",
"0.5910422",
"0.5910422",
"0.573263",
"0.5664348",
"0.5634414",
"0.5607255",
"0.5458114",
"0.54357547",
"0.53771013",
"0.53338367",
"0.5321016",
"0.53009087",
"0.527438",
"0.52691513",
"0.5268452",
"0.5210211",
"0.519489",
"0.51827055",
"0.5167577",
... | 0.74336606 | 0 |
Writes the SMT query associated with this | def writeSmtQueryToFile(self, location):
try:
smtQueryFileHandler = open(location, "w")
except EnvironmentError as e:
errMsg = ("Error writing the SMT query to a file "
"located at %s: %s" % (location, e))
raise GameTimeError(errMsg)
else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def exec_write(self, query, *args):",
"def generate_write_queries(self, head_query, varenv):\n\n # for all nodes in the query\n # if they do not have a .prepare result\n # start generating a write\n # if we locate a prepare, stop the write (with an explicit left= or right=)\n # and recurse f... | [
"0.6180858",
"0.57234496",
"0.5668825",
"0.5640774",
"0.56084013",
"0.5572857",
"0.54307586",
"0.5393731",
"0.53180397",
"0.53005683",
"0.5267256",
"0.52662176",
"0.5254812",
"0.5243561",
"0.52368605",
"0.5227119",
"0.52221704",
"0.51445305",
"0.5116315",
"0.5104338",
"0.5094... | 0.6386386 | 0 |
Writes the model generated by an SMT solver in response to the SMT query, if the query is satisfiable, to a file. | def writeModelToFile(self, location):
try:
modelFileHandler = open(location, "w")
except EnvironmentError as e:
errMsg = ("Error writing the model generated by an SMT solver "
"in response to the SMT query to a file located at %s: "
"%s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def writeSmtQueryToFile(self, location):\n try:\n smtQueryFileHandler = open(location, \"w\")\n except EnvironmentError as e:\n errMsg = (\"Error writing the SMT query to a file \"\n \"located at %s: %s\" % (location, e))\n raise GameTimeError(err... | [
"0.6336504",
"0.62863714",
"0.60373837",
"0.5935583",
"0.5885754",
"0.58794343",
"0.5857451",
"0.57059985",
"0.56857896",
"0.56739074",
"0.5662743",
"0.56618273",
"0.56521016",
"0.5619461",
"0.5609239",
"0.5601789",
"0.559608",
"0.55819166",
"0.55435747",
"0.54989225",
"0.545... | 0.68798786 | 0 |
Writes the unsatisfiable core generated by an SMT solver in response to the SMT query, if the query is unsatisfiable, to a file. | def writeUnsatCoreToFile(self, location):
try:
unsatCoreFileHandler = open(location, "w")
except EnvironmentError as e:
errMsg = ("Error writing the unsatisfiable core generated by "
"an SMT solver in response to the SMT query to "
"a f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def writeSmtQueryToFile(self, location):\n try:\n smtQueryFileHandler = open(location, \"w\")\n except EnvironmentError as e:\n errMsg = (\"Error writing the SMT query to a file \"\n \"located at %s: %s\" % (location, e))\n raise GameTimeError(err... | [
"0.5623565",
"0.53614604",
"0.5350815",
"0.5134842",
"0.50617427",
"0.5050383",
"0.5020348",
"0.49455065",
"0.49153146",
"0.48937985",
"0.48869208",
"0.4885172",
"0.48750678",
"0.48267332",
"0.48059154",
"0.47965395",
"0.4773849",
"0.47550625",
"0.47455814",
"0.47355106",
"0.... | 0.6648244 | 0 |
Reads an SMT query from the file provided. | def readQueryFromFile(location):
try:
queryFileHandler = open(location, "r")
except EnvironmentError as e:
errMsg = ("Error reading the SMT query from the file "
"located at %s: %s" % (location, e))
raise GameTimeError(errMsg)
else:
with queryFileHandler:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_query(query_filename):\n with open(query_filename) as f:\n return f.read()",
"def get_data_query(file_name):\n with open(file_name, 'r') as graphql_query:\n return graphql_query.read()",
"def read_sql(name=\"total_trips.sql\"):\n template = pkg_resources.resource_filename(\"goje... | [
"0.6783295",
"0.64382994",
"0.64050734",
"0.6361269",
"0.6229351",
"0.6095629",
"0.60514474",
"0.580946",
"0.5685586",
"0.56677884",
"0.56527835",
"0.5537422",
"0.55240154",
"0.5509297",
"0.5446821",
"0.54104316",
"0.5400973",
"0.5363791",
"0.53474945",
"0.533303",
"0.533265"... | 0.7355643 | 0 |
Returns stopping policy function that stops after the first positive result | def stop_at_detection(lag=1):
def policy(model, hist):
# stop if there was a positive result after lag time
return (model.lastPositive>=0) and (model.lastPositive+lag <= model.t)
return policy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def early_stopping(stats, curr_patience, prev_val_loss):\n # TODO implement early stopping\n curr_val_loss = stats[-1][1]\n if (curr_val_loss > prev_val_loss):\n curr_patience += 1\n else:\n prev_val_loss = curr_val_loss\n curr_patience = 0\n #\n return curr_patience, prev_va... | [
"0.59165436",
"0.5888314",
"0.5854395",
"0.5854152",
"0.5776123",
"0.5749691",
"0.5729605",
"0.5707932",
"0.5645517",
"0.56339544",
"0.5606294",
"0.56059587",
"0.5591644",
"0.55859965",
"0.55793047",
"0.55564517",
"0.55279166",
"0.55258447",
"0.55114996",
"0.549019",
"0.54717... | 0.6552366 | 0 |
return a textual representation of the entry data only | def render_data(self):
if self.data:
#print "ENTRY DATA: %s" % type(self.data)
#make sure that data is buffered with a blank line at the end
#makes the resulting log easier to read.
#if there are more than one blanklines, can leave them
last_line = sel... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __str__(self):\n return str(self.get_data())",
"def get_entry_string(self):\n return f\"{self.get_time_string()} {self.mode} {self.radar}\"",
"def str_info(self):\n return \"\"",
"def __str__(self):\n text = []\n for varname, attrname, valuetype, label, widget, group, o... | [
"0.67490834",
"0.6598107",
"0.6548406",
"0.6514892",
"0.64904666",
"0.64832765",
"0.64832765",
"0.64832765",
"0.64832765",
"0.64832765",
"0.64513147",
"0.64097667",
"0.64029825",
"0.639567",
"0.63851684",
"0.63532424",
"0.6339132",
"0.63113874",
"0.631132",
"0.631132",
"0.630... | 0.72331303 | 0 |
return a textual representation of the entry include_path assumed to be false in some places | def render(self, include_path=False):
entry = u''
entry += self.render_first_line()
#in most cases we do not want to show the source path,
#(it can change easily and frequently, and is determined on read)
#but when merging and reviewing (summarize)
#it could be useful to... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def path_value(self, **kwargs):\n s = \"\"\n show_meta = kwargs.get(\"show_meta\", self.SHOW_META)\n show_path = show_meta and kwargs.get(\"show_path\", self.SHOW_PATH)\n if show_path:\n call_info = self.reflect.info\n if call_info:\n s = \"({}:{})\"... | [
"0.6073865",
"0.59078985",
"0.59055966",
"0.5872629",
"0.5806667",
"0.57593405",
"0.5674224",
"0.56213146",
"0.5606898",
"0.5604408",
"0.55976903",
"0.55813205",
"0.5559528",
"0.55567676",
"0.55490905",
"0.5538111",
"0.5521171",
"0.5509165",
"0.547973",
"0.54446316",
"0.54100... | 0.6861986 | 0 |
Checks whether address string is a valid email | def is_email(address):
try:
validate_email(address)
return True
except:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_valid_email_address (email):\n return valid_email.search(email)",
"def validate_email_address(self, address):\n if self._re_email.search(address.lower()) is None:\n return False\n return True",
"def is_valid_email_address(email_address):\n\t# requirements = re\n\treturn EMAIL_R... | [
"0.8579894",
"0.83430487",
"0.8325106",
"0.83130985",
"0.82888037",
"0.82589716",
"0.8232918",
"0.82295674",
"0.82024664",
"0.8115727",
"0.8113625",
"0.799093",
"0.7978891",
"0.79676896",
"0.7953716",
"0.7931554",
"0.78772515",
"0.7871603",
"0.7852359",
"0.78080815",
"0.78008... | 0.8467984 | 1 |
Run when form input is valid, creates Group and GroupLines | def form_valid(self, form):
print("CreateGroupView.form_valid()")
print("Is Authenticated:", self.request.user.is_authenticated)
print(self.request.user.id, "-", self.request.user)
print(form['group_guests'].value())
# Create Group
new_group = GuestGroup()
new_g... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fillgroupform(form):\n\n nodes = hl.getAllNodes()\n \n if request.method == 'POST':\n if form == \"CG\":\n if createNewGroup():\n return redirect(url_for('confirm', confirmed = 'New Group Created!'))\n else:\n abort(404)\n elif hl.getGr... | [
"0.63087726",
"0.5955202",
"0.58493495",
"0.5837585",
"0.58374566",
"0.5678385",
"0.5670113",
"0.5657248",
"0.56253767",
"0.56178963",
"0.5590104",
"0.5571982",
"0.5495585",
"0.5474161",
"0.54485196",
"0.5423718",
"0.5387716",
"0.53821075",
"0.5370997",
"0.5341854",
"0.529035... | 0.69897795 | 0 |
Insert data into sub categories table | def subcategories(data):
if data:
for i in data:
cat_obj = CategoriesModel.objects.get(id=i['catid'])
sub_category = SubCategories(cat_id=cat_obj, sub_categories=i['subcategory'])
sub_category.save() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def insert_data_category_into_bdd(self):\n for category in constant.LIST_CATEGORIES:\n data = Category(name=category)\n data.save()\n print(\"the category \" + str(category) + \" has been created\")",
"def insert_data(self, data):\n category_name = data[\"substitute... | [
"0.7204462",
"0.6926136",
"0.66130286",
"0.65771616",
"0.6556633",
"0.63741225",
"0.6267287",
"0.61916393",
"0.6180439",
"0.60956705",
"0.60709673",
"0.60558337",
"0.5942632",
"0.5905378",
"0.5899208",
"0.5864727",
"0.58323085",
"0.5827986",
"0.58080834",
"0.57869774",
"0.570... | 0.73317516 | 0 |
Return excel data as list of dictionaries by passing file path, sheet name | def excel_to_json(file_path, sheet=None):
df = pd.read_excel(file_path, sheet_name=sheet)
columns = [str(k) for k in df.columns]
data = [dict(zip(columns, row)) for row in df.values]
return data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def import_worksheet(filename, sheetname, range_start='A1'):\n app = xw.App(visible=False)\n book = xw.Book(filename)\n sheet = book.sheets(sheetname)\n excel_data = sheet.range(range_start).expand('table').value\n keys = [snake_case(key) for key in excel_data[0]]\n data = [dict(zip(keys, values)... | [
"0.71940315",
"0.711031",
"0.7037067",
"0.70054305",
"0.6992221",
"0.6910014",
"0.65725166",
"0.65684456",
"0.65371436",
"0.6528328",
"0.64255273",
"0.63627785",
"0.6355337",
"0.634849",
"0.63313866",
"0.63020587",
"0.6297277",
"0.62861073",
"0.62450606",
"0.6205042",
"0.6192... | 0.7360668 | 0 |
Tests if a bucket list method is returned by the create bucket list method. | def test_create_bucket_list_return(self):
bucket = BucketList("", "")
bucket = bucket.create_bucket_list("Name", "Completed")
self.assertIsInstance(bucket, BucketList) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_list(self):\n responses.add(\n responses.Response(\n method='GET',\n url='https://connection.keboola.com/v2/storage/buckets',\n json=list_response\n )\n )\n buckets_list = self.buckets.list()\n assert isinstance... | [
"0.6739929",
"0.67187655",
"0.6675662",
"0.6659142",
"0.6647164",
"0.6626575",
"0.6572039",
"0.64957124",
"0.6478472",
"0.6335926",
"0.6314513",
"0.6226394",
"0.6214371",
"0.6181248",
"0.6083129",
"0.60804033",
"0.59891117",
"0.5945942",
"0.5889968",
"0.5869719",
"0.5841527",... | 0.7260141 | 0 |
Tests if the create bucket list method checks for a name | def test_create_bucket_list_name(self):
bucket = BucketList("", "")
bucket = bucket.create_bucket_list("")
self.assertEqual(bucket, "Please provide a name for your bucket list", ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_name_attribute_is_set_in_bucket_creation_request(self):\n with self.client:\n response = self.client.post(\n '/bucketlists',\n headers=dict(Authorization='Bearer ' + self.get_user_token()),\n data=json.dumps({}),\n content_type=... | [
"0.74607044",
"0.69229776",
"0.6885278",
"0.68416893",
"0.67165226",
"0.6480752",
"0.64547694",
"0.6353446",
"0.63419205",
"0.6336656",
"0.6281703",
"0.62737566",
"0.61926365",
"0.6161144",
"0.6141224",
"0.60653865",
"0.60323185",
"0.6028917",
"0.6027308",
"0.6026181",
"0.602... | 0.8062514 | 0 |
Create a new dataset in the datastore. Expects at least the list of columns and the rows for the dataset. Raises ValueError if (1) the column identifier are not unique, (2) the row identifier are not uniqe, (3) the number of columns and values in a row do not match, (4) any of the column or row identifier have a negati... | def create_dataset(self, columns, rows, annotations=None):
# Validate (i) that each column has a unique identifier, (ii) each row
# has a unique identifier, and (iii) that every row has exactly one
# value per column.
_, max_row_id = validate_dataset(columns=columns, rows=rows)
#... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def validate_dataset(columns, rows):\n # Ensure that all column identifier are zero or greater, unique, and smaller\n # than the column counter (if given)\n col_ids = set()\n for col in columns:\n if col.identifier < 0:\n raise ValueError('negative column identifier \\'' + str(col.ide... | [
"0.63115865",
"0.5668364",
"0.55839676",
"0.5573226",
"0.5547572",
"0.54575896",
"0.5434287",
"0.54122645",
"0.5348226",
"0.5347828",
"0.534333",
"0.53149444",
"0.52904606",
"0.5279858",
"0.52452826",
"0.5234468",
"0.5161395",
"0.5150742",
"0.5138273",
"0.5134105",
"0.5133916... | 0.6792675 | 0 |
Delete dataset with given identifier. Returns True if dataset existed and False otherwise. | def delete_dataset(self, identifier):
# Delete the dataset directory if it exists. Otherwise return False
dataset_dir = self.get_dataset_dir(identifier)
if not os.path.isdir(dataset_dir):
return False
shutil.rmtree(dataset_dir)
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete(_id):\n dataset = ESDataset.get(id=_id, ignore=404)\n\n if not dataset:\n raise NoEntityError(f\"dataset {_id} does not exist.\")\n\n dataset.delete()\n\n return dataset.name",
"def delete(self, dataset_name=None, dataset_id=None, sure=False, really=False):\n if sure and real... | [
"0.72780275",
"0.6941223",
"0.67918926",
"0.6579435",
"0.653213",
"0.6508324",
"0.63839746",
"0.6360362",
"0.6333443",
"0.62904775",
"0.6264882",
"0.61432105",
"0.6113505",
"0.6040268",
"0.6035858",
"0.6006591",
"0.59987324",
"0.5995769",
"0.59760773",
"0.59754485",
"0.596989... | 0.8651671 | 0 |
Read a full dataset from the data store. Returns None if no dataset with the given identifier exists. | def get_dataset(self, identifier):
# Test if a subfolder for the given dataset identifier exists. If not
# return None.
dataset_dir = self.get_dataset_dir(identifier)
if not os.path.isdir(dataset_dir):
return None
# Load the dataset handle
return FileSystemDat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def read_one_data(data_id):\n \n read_data = None\n\n try:\n read_data = np.load(path.join(config[\"data-dir\"], \"{}.npy\".format(data_id)))\n except Exception as e:\n print(\"read_one_data failed: {}\", data_id)\n print(e)\n\n return read_data",
"def read_dataset(self, datas... | [
"0.6494438",
"0.64695215",
"0.6466319",
"0.6343276",
"0.6217975",
"0.6194125",
"0.6179974",
"0.6131615",
"0.61199605",
"0.6064252",
"0.6031895",
"0.6031143",
"0.6018112",
"0.59444046",
"0.5939876",
"0.59282994",
"0.5902588",
"0.5867879",
"0.5848785",
"0.5807659",
"0.5795266",... | 0.7446477 | 0 |
Validate that (i) each column has a unique identifier, (ii) each row has a unique identifier, and (iii) each row has exactly one value per column. Returns the maximum column and row identifiers. Raises ValueError in case of a schema violation. | def validate_dataset(columns, rows):
# Ensure that all column identifier are zero or greater, unique, and smaller
# than the column counter (if given)
col_ids = set()
for col in columns:
if col.identifier < 0:
raise ValueError('negative column identifier \'' + str(col.identifier) + '... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _validate_cardinality(self, columns):\n cards = [len(c.data) for c in columns]\n c = np.unique(cards)\n assert len(c) == 1, c\n return c[0]",
"def zero_one_card(df):\n unique_values = defaultdict()\n for col in df.columns:\n if df[col].nunique() < 2:\n uniq... | [
"0.65582913",
"0.57097125",
"0.5645253",
"0.5592956",
"0.5525453",
"0.5486932",
"0.54336977",
"0.5392633",
"0.5328242",
"0.5235871",
"0.52347654",
"0.5117688",
"0.5097444",
"0.50718284",
"0.50526744",
"0.5051733",
"0.5036936",
"0.50316507",
"0.5013451",
"0.5012474",
"0.499940... | 0.7747299 | 0 |
Decodes a TTBencoded TsRow into a list | def decode_timeseries_row(self, tsrow, tsct, convert_timestamp=False):
row = []
for i, cell in enumerate(tsrow):
if cell is None:
row.append(None)
elif isinstance(cell, list) and len(cell) == 0:
row.append(None)
else:
if... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def decode_vector_of_t(as_bytes: typing.List[int]) -> list:\n raise NotImplementedError()",
"def ConvertRow(self, row):\n i = 0\n data = []\n for entry in row['f']:\n data.append(self.Convert(entry['v'], self.schema[i]))\n i += 1\n return tuple(data)",
"def decode(self) -> ... | [
"0.6471226",
"0.6266855",
"0.5966229",
"0.596595",
"0.5830895",
"0.576911",
"0.57529914",
"0.57330656",
"0.57156235",
"0.56814665",
"0.5663433",
"0.5621345",
"0.5616479",
"0.55948603",
"0.5572626",
"0.5551195",
"0.55510676",
"0.5522743",
"0.5501273",
"0.548789",
"0.54706043",... | 0.6530264 | 0 |
Replace every selection with the passed text | def replace_text_in_selections(view, edit, text):
for region in view.sel():
view.replace(edit, region, text) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def replace_all(self):\n i = 0\n while self.textedit.textCursor().hasSelection():\n self.textedit.textCursor().insertText(self.ui.textToReplace.text())\n self.find()\n i += 1\n self.show_message(unicode(self.tr(\"Replaced {0} occurrence(s)\")).format(i))",
"d... | [
"0.6728019",
"0.66143185",
"0.63743323",
"0.63288164",
"0.63052166",
"0.63052166",
"0.6175502",
"0.6128122",
"0.6092176",
"0.5999907",
"0.59972286",
"0.5974457",
"0.5953426",
"0.5936799",
"0.5920587",
"0.5861925",
"0.5806814",
"0.5797064",
"0.5787387",
"0.57658786",
"0.575690... | 0.8218574 | 0 |
Initialize the person Store name, email and grade information for a person in the tutor system. | def __init__(self, first, last, email, grade):
self.first_name = first
self.last_name = last
self.email = email
self.grade = grade | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, name, surname):\n\t\t\n\t\tself.grades = {}\n\t\tself.attendance = 0\n\t\t\n\t\tif not (isinstance(name, str) and isinstance(surname, str)):\n\t\t\tname, surname = \"None\", \"None\"\n\t\tself.name, self.surname = name, surname",
"def __init__(self, first_name, last_name, address):\n\n ... | [
"0.6282435",
"0.60610855",
"0.5968653",
"0.5887228",
"0.58652633",
"0.58405566",
"0.5831563",
"0.58221096",
"0.5778295",
"0.5762195",
"0.573971",
"0.57379323",
"0.5706579",
"0.56968486",
"0.5680565",
"0.5665282",
"0.5664211",
"0.56603533",
"0.56509584",
"0.563306",
"0.562195"... | 0.6199268 | 1 |
Add a session to the list with the given timeslot | def add_session(self, timeslot):
new_session = Session(self, timeslot)
self.sessions.append(new_session) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def addLesson(self, lesson: Lesson, room: Room, timeslot):\r\n self.timeslotMap[timeslot].append((lesson, room))",
"def timeslot(self, timeslot: List[TimeslotTimeslot]):\n\n self._timeslot = timeslot",
"def addsession(update, context):\n\tupdate.message.reply_text('Ok, for this I will need two it... | [
"0.66463345",
"0.6495307",
"0.62784696",
"0.62281686",
"0.6107605",
"0.5836975",
"0.5642799",
"0.55887187",
"0.5567002",
"0.55501956",
"0.5466522",
"0.5436621",
"0.53633237",
"0.53624827",
"0.5360952",
"0.5330972",
"0.5297513",
"0.5292416",
"0.5276941",
"0.5265809",
"0.524237... | 0.8703622 | 0 |
Return list of unbooked sessions | def get_free_sessions(self):
return [session for session in self.sessions if not session.is_booked()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_booked_sessions(self):\n return [session for session in self.sessions if session.is_booked()]",
"def get_upcoming_sessions(self):\n return [session for session in self.sessions if not session.is_complete()]",
"def discard_all_sessions(self):\n\n url = f\"{self.server_and_port}/web_... | [
"0.7506324",
"0.6521086",
"0.6417666",
"0.6361292",
"0.59749126",
"0.5951704",
"0.5949197",
"0.5939681",
"0.58809847",
"0.5773013",
"0.569762",
"0.56947505",
"0.5688448",
"0.56856096",
"0.5665254",
"0.5663763",
"0.56465",
"0.5629003",
"0.5590512",
"0.55874026",
"0.55785835",
... | 0.7571655 | 0 |
Return list of booked sessions | def get_booked_sessions(self):
return [session for session in self.sessions if session.is_booked()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_sessions_list():\n sessions = Session.query.all()\n result = sessions_schema.dump(sessions).data\n return jsonify({'status': 'success', 'message': None, 'data': result}), 200",
"def sessions(self):\n return utils.listItems(self, '/status/sessions')",
"def sessions(self):\n return... | [
"0.69843096",
"0.67660904",
"0.65511835",
"0.65456074",
"0.6525037",
"0.6478125",
"0.63598436",
"0.63212067",
"0.6310096",
"0.6256466",
"0.6246224",
"0.6236297",
"0.62173337",
"0.61563414",
"0.61535907",
"0.61505413",
"0.6146497",
"0.60982054",
"0.60871315",
"0.60544795",
"0.... | 0.8323143 | 0 |
Set student attribute in given session and add to our list | def book_session(self, session, subject):
session.set_student(self)
session.set_subject(subject)
self.sessions.append(session) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_session_attr(typename, session):\n old_session = getattr(typename, 'session', None)\n setattr(typename, 'session', session)\n yield\n if old_session:\n setattr(typename, 'session', old_session)",
"def add_student(self, student):\n if student in self.students:\n raise ValueError('... | [
"0.6448581",
"0.5822519",
"0.56977004",
"0.5646973",
"0.56118375",
"0.5595988",
"0.5530288",
"0.549276",
"0.54567146",
"0.5429469",
"0.53711236",
"0.53679657",
"0.5367139",
"0.53647345",
"0.536465",
"0.5357857",
"0.5309213",
"0.53083396",
"0.5291754",
"0.52692086",
"0.5239687... | 0.74655104 | 0 |
Remove student attribute from session Before removing attribute, also makes sure that the student does not clear a session that is not theirs | def unbook_session(self, session):
confirm = input("Are you sure you want to unbook this session? (y/n) ")
if confirm.lower().startswith("y") and session in self.sessions:
session.remove_student()
session.remove_subject()
self.sessions.remove(session) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_student(self, student: 'Student') -> None:\n # Subtract HOUSEHOLD attributes to the schools' composition\n self.total -= 1\n self.composition -= student.household.attributes # TODO: zero self.composition?\n self.students.pop(student.idx)\n # after removing a Student, ... | [
"0.66668415",
"0.6557449",
"0.63176084",
"0.63006353",
"0.61543727",
"0.6127395",
"0.6107361",
"0.60523903",
"0.60341424",
"0.60104924",
"0.5999046",
"0.59474844",
"0.5924142",
"0.59238815",
"0.58887875",
"0.5784183",
"0.57742214",
"0.57742214",
"0.57742214",
"0.5719274",
"0.... | 0.7025717 | 0 |
Return list of all future sessions | def get_upcoming_sessions(self):
return [session for session in self.sessions if not session.is_complete()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_sessions(self):\n\n return self.all_sessions",
"def sessions(self):\n return list(Session.get_sessions(self))",
"def get_sessions_list():\n sessions = Session.query.all()\n result = sessions_schema.dump(sessions).data\n return jsonify({'status': 'success', 'message': None, 'data'... | [
"0.7341019",
"0.7246219",
"0.7138035",
"0.71369785",
"0.707692",
"0.7062906",
"0.7035229",
"0.7003215",
"0.6962804",
"0.69498193",
"0.6942686",
"0.6920242",
"0.6880573",
"0.67162657",
"0.671492",
"0.6666589",
"0.65806824",
"0.65542644",
"0.65472895",
"0.65286523",
"0.6470571"... | 0.7363348 | 0 |
This method returns the x,y coordinates of a selected unit. Mask is a set of bools from comaprison with feature layer. | def coordinates(self, mask):
y,x = mask.nonzero()
return list(zip(x,y)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_current_mask(self):\n return [self.input_fields[x].text() for x in range(0,int(self.mask_scale_x.text()) * int(self.mask_scale_y.text()))]",
"def _get_mask_coords(self, obj, shrink_factor):\n # split bounding box into x,y coordinates\n xmin, ymin, xmax, ymax = np.split(obj.b... | [
"0.63089466",
"0.63045764",
"0.6283175",
"0.5935",
"0.5889818",
"0.5846541",
"0.5845883",
"0.5841938",
"0.57962507",
"0.5744652",
"0.5744652",
"0.5744652",
"0.5744652",
"0.57196534",
"0.5709056",
"0.5706766",
"0.56831414",
"0.5679761",
"0.5674122",
"0.5668762",
"0.56581986",
... | 0.72940505 | 0 |
Categories should have slugs with length less than 50 characters | def test_slugs_max_length(self):
self.assertLessEqual(len(str(self.cat_short.slug)), 50)
self.assertLessEqual(len(str(self.cat_long.slug)), 50) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_slugs_truncate(self):\n self.assertFalse(str(self.cat_long.slug).endswith('a' * 8))\n self.assertTrue(str(self.cat_short.slug).endswith('-name'))",
"def test_slugs_max_length(self):\n self.assertLessEqual(len(str(self.art_short.slug)), 50)\n self.assertLessEqual(len(str(self.... | [
"0.7476717",
"0.70316297",
"0.69714576",
"0.6548173",
"0.64952236",
"0.6479612",
"0.6362701",
"0.633775",
"0.6154872",
"0.61501366",
"0.6114804",
"0.60608786",
"0.60397124",
"0.6029913",
"0.6025599",
"0.601337",
"0.5970098",
"0.59331834",
"0.5918301",
"0.5867624",
"0.57764196... | 0.7918103 | 0 |
Long category names should have slugs truncated | def test_slugs_truncate(self):
self.assertFalse(str(self.cat_long.slug).endswith('a' * 8))
self.assertTrue(str(self.cat_short.slug).endswith('-name')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_slug_from_category_name(sender, instance, *args, **kwargs):\n if not instance.slug:\n instance.slug = slugify(instance.name)",
"def format_category_name(category):\n\n category_words = category.name.rstrip().replace(',', '').replace(\"'\", '').split(\" \")\n return \"-\".join(category_... | [
"0.70472133",
"0.70039225",
"0.68681395",
"0.6810921",
"0.6712746",
"0.6702623",
"0.6614146",
"0.6605288",
"0.64601094",
"0.64261305",
"0.6404843",
"0.62993336",
"0.62987936",
"0.6279862",
"0.62286955",
"0.61836594",
"0.61456895",
"0.61318177",
"0.6101635",
"0.60771793",
"0.6... | 0.7624874 | 0 |
Articles should have correctly formed slugs | def test_slugify(self):
self.assertEqual(self.art_short.slug, 'short-article-title')
regex = r'[@:%._\+~#=]+'
self.assertNotRegex(self.art_short.slug, regex)
self.assertNotRegex(self.art_long.slug, regex) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_get_slug(self):\n\n test_slug = slugify(self.book.name.replace(\"ı\", \"i\"))\n self.assertEqual(test_slug, self.book.slug)",
"def test_slugify(self):\n self.assertEqual(self.cat_short.slug, 'short-blog-name')\n regex = r'[@:%._\\+~#=]+'\n self.assertNotRegex(self.cat_... | [
"0.67267954",
"0.66753334",
"0.6645523",
"0.664058",
"0.66159993",
"0.65931",
"0.65931",
"0.6567481",
"0.6314626",
"0.62887204",
"0.6284432",
"0.6282017",
"0.62660354",
"0.6252929",
"0.6217196",
"0.6211112",
"0.6207786",
"0.6181567",
"0.6162235",
"0.6100771",
"0.6085458",
"... | 0.70079607 | 0 |
Articles should have slugs with length less than 50 characters | def test_slugs_max_length(self):
self.assertLessEqual(len(str(self.art_short.slug)), 50)
self.assertLessEqual(len(str(self.art_long.slug)), 50) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_slugs_max_length(self):\n self.assertLessEqual(len(str(self.cat_short.slug)), 50)\n self.assertLessEqual(len(str(self.cat_long.slug)), 50)",
"def test_slugs_truncate(self):\n self.assertFalse(str(self.art_long.slug).endswith('a' * 8))\n self.assertTrue(str(self.art_short.slug... | [
"0.76559114",
"0.74870723",
"0.7414501",
"0.69171846",
"0.6849528",
"0.6618098",
"0.660207",
"0.6551077",
"0.65469575",
"0.6449877",
"0.6343855",
"0.63224226",
"0.62868595",
"0.62841666",
"0.62734646",
"0.62464947",
"0.6164744",
"0.61580855",
"0.6140765",
"0.6091456",
"0.6055... | 0.7775102 | 0 |
Long articles names should have slugs truncated | def test_slugs_truncate(self):
self.assertFalse(str(self.art_long.slug).endswith('a' * 8))
self.assertTrue(str(self.art_short.slug).endswith('-title')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_slugs_truncate(self):\n self.assertFalse(str(self.cat_long.slug).endswith('a' * 8))\n self.assertTrue(str(self.cat_short.slug).endswith('-name'))",
"def test_slugs_max_length(self):\n self.assertLessEqual(len(str(self.art_short.slug)), 50)\n self.assertLessEqual(len(str(self.... | [
"0.7516894",
"0.7008031",
"0.697247",
"0.685826",
"0.6737118",
"0.67175335",
"0.6687357",
"0.65376645",
"0.65212345",
"0.65052587",
"0.6501274",
"0.64850163",
"0.6465843",
"0.6413242",
"0.63671345",
"0.63646466",
"0.63421875",
"0.6321543",
"0.6312731",
"0.62839705",
"0.627418... | 0.7546125 | 0 |
Searches for note with given id | def _find_note(self, id):
for note in self.notes:
if note.id == id:
return note
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _find_note(self, note_id):\n for note in self.notes:\n if str(note.id) == str(note_id):\n return note\n return None",
"def get_note(note_id):\n return db.getdb().note.find_one({'id': note_id}, {'_id': False})",
"def retrieve_a_note(self, note_id):\n return ... | [
"0.766457",
"0.69753563",
"0.6817999",
"0.6726543",
"0.66758054",
"0.6488702",
"0.625625",
"0.62315583",
"0.6216551",
"0.6183598",
"0.6153343",
"0.6124569",
"0.61007494",
"0.590879",
"0.59087074",
"0.5879729",
"0.5863311",
"0.58456993",
"0.5831447",
"0.57738376",
"0.5761507",... | 0.7880106 | 0 |
Finds the note with given id and changes its tag to given value | def modify_tags(self, id, new_tag):
for note in self.notes:
if note.id == id:
note.memo = new_tag | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def modify_tags(self, note_id, tags):\n try:\n self._find_note(note_id).tags = tags\n except AttributeError:\n print(f\"Note with id {note_id} not found\")",
"async def update_note(note,tags=None):\n\n assert isinstance(note, dict), note\n\n id = note.pop('id')\n titl... | [
"0.76386344",
"0.646081",
"0.6064949",
"0.5790674",
"0.57474375",
"0.56743795",
"0.5656286",
"0.56312203",
"0.5612757",
"0.55719155",
"0.55554247",
"0.5545974",
"0.5522915",
"0.55220914",
"0.54743946",
"0.5433824",
"0.5376842",
"0.53707296",
"0.53453594",
"0.5341666",
"0.5339... | 0.8226698 | 0 |
Transform a list of values into a 2D numpy array (aka memory) of probaility distributions. Int > 1.0 at int index, 0.0 everywhere else None > Uniformly distributed 1.0/len(values) E.g. [2, 1, None] > nparray [ [0.0, 0.0, 1.0], [0.0, 1.0, 0.0], [0.333, 0.333, 0.333] ] | def values_to_distribution_memory(values):
length = len(values)
memory = np.zeros([length, length], dtype=np.float32)
uniform_density = 1.0 / float(length)
for i, val in enumerate(values):
if val != None:
memory[i][val] = 1.0
else:
memory[i].fill(uniform_density)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def init_probability_2d(self):\n retval = []\n for a in range(0,28):\n retval.append([])\n for b in range(0,28):\n #first element: # of '+', second element: # of '#', third element: # of ' ', fourth element: total test elements\n retval[a].append([0... | [
"0.58875805",
"0.58780354",
"0.58591986",
"0.5852818",
"0.5781113",
"0.5768675",
"0.57136494",
"0.5581939",
"0.55777764",
"0.5556252",
"0.5531253",
"0.55054337",
"0.5463911",
"0.5449123",
"0.5431423",
"0.5418147",
"0.53955215",
"0.53589773",
"0.5354096",
"0.53430945",
"0.5338... | 0.7262262 | 0 |
Transform a batch of value lists into a batch of 2D numpy arrays of probability distributions. | def batch_to_distribution_memories(batch):
batch_memory = []
for value_array in batch:
batch_memory.append(values_to_distribution_memory(value_array))
return batch_memory | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_output_distr(self, stat_list):\n out_probs = [[np.zeros(500) for _ in stat_list]\n for _ in range(self.task_count)]\n\n # for each task, get the posterior distribution for each predicted\n # output label\n for i in range(self.task_count):\n distr_v... | [
"0.5944898",
"0.5931941",
"0.5780346",
"0.57784325",
"0.5769501",
"0.56150985",
"0.55981135",
"0.5594025",
"0.5570464",
"0.55486155",
"0.5532592",
"0.54866505",
"0.547919",
"0.5440273",
"0.54136163",
"0.54115546",
"0.5351882",
"0.53459394",
"0.53335273",
"0.5332378",
"0.53182... | 0.6582107 | 0 |
Generate a batch of input/target memory pairs, where the task specifies the target transformation. | def next_batch(memory_dim, batch_length, task):
batch_inputs = []
batch_targets = []
difficulty = 0.0
for _ in xrange(batch_length):
# Values as integers
random_input = task.generate_random_input(difficulty, memory_dim)
target_output = task.run(random_input)
# Values as ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _generate_batch(self, tasks: List):\n x_batch = np.stack([np.random.uniform(low=self.domain_bounds[0], high=self.domain_bounds[1], size=(self.inner_update_k, 1)) for _ in range(len(tasks))])\n y_batch = np.stack([[tasks[t](x) for x in x_batch[t]] for t in range(len(tasks))])\n\n return x_b... | [
"0.67602646",
"0.62821877",
"0.6272537",
"0.6256587",
"0.62063193",
"0.6205409",
"0.61993766",
"0.6175688",
"0.6013194",
"0.60115963",
"0.5950067",
"0.59225327",
"0.591995",
"0.5843916",
"0.58352625",
"0.5783757",
"0.57717025",
"0.57453126",
"0.5719291",
"0.57161164",
"0.5708... | 0.72516173 | 0 |
Returns bool, dict If connected, the link quality described by certain attributes such as e.g. bandwidth, loss, ... | def _distance_2_link_quality(self, distance):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def link_compare(a, b):\n\n # wired > anything\n if not a.is_wifi() and not a.is_mobile() and (b.is_wifi() or b.is_mobile()):\n return 1\n\n # wifi > mobile unless wifi is going down.\n if a.is_wifi() and b.is_mobile():\n return a.is_going_down() == False\n\n # if its the same tech, si... | [
"0.56734544",
"0.5364302",
"0.5363487",
"0.53277194",
"0.5316986",
"0.51632226",
"0.51150185",
"0.50750095",
"0.5063632",
"0.5055853",
"0.50423884",
"0.5036152",
"0.50290453",
"0.50272113",
"0.5015694",
"0.50088686",
"0.5003489",
"0.49926737",
"0.49789357",
"0.49770847",
"0.4... | 0.547839 | 1 |
Decorator for creating detailed exception reports for thrown exceptions | def exception_report(storage_backend=LocalErrorStorage(), output_format="html", data_processor=None):
def _exception_reports(func, *args, **kwargs):
try:
return func(*args, **kwargs)
except Exception as e:
exc_type, exc_value, tb = sys.exc_info()
report_location... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def baseExceptionHandler(*args):\n\n\theader, frames, trcback = formatReport(*extractException(*args))\n\n\tLOGGER.error(\"!> {0}\".format(Constants.loggingSeparators))\n\tmap(lambda x: LOGGER.error(\"!> {0}\".format(x)), header)\n\n\tLOGGER.error(\"!> {0}\".format(Constants.loggingSeparators))\n\tmap(lambda x: LO... | [
"0.6473832",
"0.63471365",
"0.6306243",
"0.6265233",
"0.61674047",
"0.6141092",
"0.61109334",
"0.6041314",
"0.5974724",
"0.5960575",
"0.5930317",
"0.58954406",
"0.5895211",
"0.58894384",
"0.5864991",
"0.5863088",
"0.58472884",
"0.5835491",
"0.58277404",
"0.5821161",
"0.580382... | 0.68064094 | 0 |
Sets the first_blood of this LolStatsTeamGame. | def first_blood(self, first_blood):
self._first_blood = first_blood | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def first_blood_time(self):\n return self._get(\"first_blood_time\")",
"def first_dragon(self, first_dragon):\n\n self._first_dragon = first_dragon",
"def testHealthAssessStoolBlood(self):\n attr = self.session.create_visit_attr()\n\n self.util.boolTypeTest(self, attr, \"stool_blood... | [
"0.60557073",
"0.5681351",
"0.55310005",
"0.5415728",
"0.5312485",
"0.51903236",
"0.51887625",
"0.5128727",
"0.5063451",
"0.5005009",
"0.4954639",
"0.48793226",
"0.48769146",
"0.4840352",
"0.48239908",
"0.47986388",
"0.47905484",
"0.47419673",
"0.46520567",
"0.45982",
"0.4564... | 0.8534266 | 0 |
Sets the first_tower of this LolStatsTeamGame. | def first_tower(self, first_tower):
self._first_tower = first_tower | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_first_player(self):\n if self.player2.won_previous:\n self.current_player = self.player2\n else: self.current_player = self.player1",
"def first_dragon(self, first_dragon):\n\n self._first_dragon = first_dragon",
"def win_lead_first_per(self, win_lead_first_per):\n\n ... | [
"0.5722426",
"0.54752785",
"0.5368373",
"0.53639454",
"0.5320576",
"0.5305186",
"0.52253854",
"0.51467526",
"0.5044249",
"0.49692693",
"0.4900162",
"0.483934",
"0.48321927",
"0.48145148",
"0.4752699",
"0.47454262",
"0.46612203",
"0.46512696",
"0.46509352",
"0.46418312",
"0.46... | 0.82356125 | 0 |
Sets the first_inhibitor of this LolStatsTeamGame. | def first_inhibitor(self, first_inhibitor):
self._first_inhibitor = first_inhibitor | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_first(self, value):\n if value not in (\"player\", \"computer\", \"random\"):\n raise SettingsError(\"Invalid choice\")\n self._parser.set(\"settings\", \"first\", value)\n self._save()",
"def set_first_player(self):\n if self.player2.won_previous:\n self... | [
"0.5415943",
"0.53046834",
"0.5297736",
"0.52469283",
"0.5154944",
"0.5139734",
"0.5088791",
"0.50780153",
"0.5055948",
"0.49488014",
"0.4883022",
"0.4883022",
"0.4883022",
"0.4883022",
"0.4883022",
"0.4883022",
"0.4883022",
"0.4883022",
"0.4883022",
"0.48780453",
"0.487214",... | 0.79483885 | 0 |
Sets the first_baron of this LolStatsTeamGame. | def first_baron(self, first_baron):
self._first_baron = first_baron | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_first(self, value):\n if value not in (\"player\", \"computer\", \"random\"):\n raise SettingsError(\"Invalid choice\")\n self._parser.set(\"settings\", \"first\", value)\n self._save()",
"def first_dragon(self, first_dragon):\n\n self._first_dragon = first_dragon",... | [
"0.58588576",
"0.574671",
"0.57114863",
"0.568865",
"0.5643305",
"0.55048496",
"0.5204018",
"0.51128215",
"0.51126236",
"0.5111544",
"0.5055451",
"0.50145775",
"0.49689355",
"0.49310866",
"0.48516503",
"0.48468366",
"0.48454523",
"0.48272642",
"0.4815637",
"0.47890258",
"0.47... | 0.7734898 | 0 |
Sets the first_dragon of this LolStatsTeamGame. | def first_dragon(self, first_dragon):
self._first_dragon = first_dragon | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def first_tower(self, first_tower):\n\n self._first_tower = first_tower",
"def first_move(self, first_click_tile):\r\n\r\n self.is_new_game = False\r\n self.board.first_click(first_click_tile)\r\n self.timer.init_clock()",
"def set_first(self, value):\n if value not in (\"pla... | [
"0.61057764",
"0.53834397",
"0.5292142",
"0.5239713",
"0.5231786",
"0.51896995",
"0.5156879",
"0.48902693",
"0.4883831",
"0.48546508",
"0.4813426",
"0.48105118",
"0.48030978",
"0.47936913",
"0.47852638",
"0.47764242",
"0.46406764",
"0.46406764",
"0.46406764",
"0.46406764",
"0... | 0.832668 | 0 |
Sets the first_rift_herald of this LolStatsTeamGame. | def first_rift_herald(self, first_rift_herald):
self._first_rift_herald = first_rift_herald | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def first_tower(self, first_tower):\n\n self._first_tower = first_tower",
"def first_dragon(self, first_dragon):\n\n self._first_dragon = first_dragon",
"def win_lead_first_per(self, win_lead_first_per):\n\n self._win_lead_first_per = win_lead_first_per",
"def win_score_first(self, win_s... | [
"0.55247706",
"0.52692336",
"0.5091553",
"0.49929842",
"0.4949794",
"0.49266458",
"0.48470277",
"0.48406497",
"0.48360735",
"0.4816592",
"0.47601816",
"0.47193143",
"0.47181237",
"0.46854672",
"0.46474093",
"0.45820117",
"0.4576367",
"0.4572945",
"0.45689505",
"0.45416403",
"... | 0.8350589 | 0 |
Sets the opponent_id of this LolStatsTeamGame. | def opponent_id(self, opponent_id):
self._opponent_id = opponent_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def opponent(self, opponent):\n\n self._opponent = opponent",
"def team_id(self, team_id):\n\n self._team_id = team_id",
"def team_id(self, team_id):\n\n self._team_id = team_id",
"def team_id(self, team_id):\n\n self._team_id = team_id",
"def team_id(self, team_id):\n\n ... | [
"0.6789225",
"0.58932066",
"0.58932066",
"0.58932066",
"0.58932066",
"0.58176106",
"0.577607",
"0.577607",
"0.577607",
"0.55822515",
"0.55714047",
"0.5545982",
"0.53836364",
"0.53274184",
"0.53056467",
"0.515896",
"0.515896",
"0.5149077",
"0.51030314",
"0.5066528",
"0.5029886... | 0.7749755 | 0 |
Sets the opponent of this LolStatsTeamGame. | def opponent(self, opponent):
self._opponent = opponent | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def opponent_id(self, opponent_id):\n\n self._opponent_id = opponent_id",
"def getOpponent(self):\n return self.__opponent",
"def set_winner(game_ID, team):\n r.hset(\"state:\" + game_ID, \"winner\", team)\n return team",
"def opponent(self, player):\r\n # player = core.BLACK (can ... | [
"0.6250621",
"0.61585385",
"0.5938731",
"0.5897992",
"0.5837428",
"0.5817073",
"0.5674668",
"0.56597847",
"0.56057405",
"0.55226105",
"0.5506426",
"0.5496469",
"0.53635883",
"0.5348024",
"0.534702",
"0.53266686",
"0.53128606",
"0.5311798",
"0.5311798",
"0.5311798",
"0.5311798... | 0.76113045 | 0 |
Sets the day of this LolStatsTeamGame. | def day(self, day):
self._day = day | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setDay(self, *args):\n return _libsbml.Date_setDay(self, *args)",
"def time_of_day(self, value):\n self.time_of_day_value = value",
"def set_day(self, day):\n if day not in range(1, 31):\n raise ValueError(\"Day value must be in range [1..12] but is {}\".format(day))\n\n ... | [
"0.6518521",
"0.6135051",
"0.58721066",
"0.5782818",
"0.5665717",
"0.55951923",
"0.55936617",
"0.5545432",
"0.5542327",
"0.5506331",
"0.5506331",
"0.5506331",
"0.5506331",
"0.54740775",
"0.54513425",
"0.54499567",
"0.54499567",
"0.53745043",
"0.52961206",
"0.5266401",
"0.5262... | 0.6581926 | 1 |
Sets the date_time of this LolStatsTeamGame. | def date_time(self, date_time):
self._date_time = date_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_time(self, time):\n self._time = time",
"def set_time(self, set_time):\n\n self._set_time = set_time",
"def set_datetime(self, date):\n self.date = date",
"def set_imeastime(self, time):\n self.itime = time",
"def time(self, time):\n\n self._time = time",
"def t... | [
"0.6396593",
"0.6258508",
"0.609341",
"0.5962455",
"0.5854669",
"0.5854669",
"0.5854669",
"0.5854669",
"0.5854669",
"0.5802461",
"0.5700751",
"0.5691724",
"0.5673093",
"0.5639388",
"0.5613493",
"0.55931723",
"0.5573321",
"0.5571976",
"0.5528441",
"0.5471176",
"0.5449137",
"... | 0.6576918 | 0 |
Sets the match_name of this LolStatsTeamGame. | def match_name(self, match_name):
self._match_name = match_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def team_name(self, team_name):\n\n self._team_name = team_name",
"def name_match_mode(self, name_match_mode):\n\n self._name_match_mode = name_match_mode",
"def team_set_name(self, team_type: TeamType, team_name):\r\n\t\tself._teams[team_type].team_name = team_name\r\n\t\t_logger.info(\"Set the ... | [
"0.6923743",
"0.655273",
"0.6378976",
"0.61955917",
"0.5840895",
"0.5827799",
"0.57469743",
"0.56654584",
"0.56654584",
"0.5659704",
"0.56302327",
"0.56202686",
"0.5605257",
"0.55775946",
"0.55341536",
"0.55341536",
"0.55341536",
"0.55341536",
"0.55341536",
"0.5526221",
"0.54... | 0.72310615 | 0 |
Sets the kills of this LolStatsTeamGame. | def kills(self, kills):
self._kills = kills | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_kills_2v2v2(self, uuid):\n\n return self.template(uuid, \"kills_teams\")",
"def turret_kills(self, turret_kills):\n\n self._turret_kills = turret_kills",
"def unreal_kills(self, unreal_kills):\n\n self._unreal_kills = unreal_kills",
"def resetSkills(self):\r\n \"\"\" Reset... | [
"0.57312125",
"0.5616646",
"0.55320156",
"0.54984957",
"0.5389278",
"0.5247422",
"0.5222676",
"0.502147",
"0.5018823",
"0.49941632",
"0.493348",
"0.48499197",
"0.48079872",
"0.4758836",
"0.47323096",
"0.47223577",
"0.47015283",
"0.46665055",
"0.46418276",
"0.46343967",
"0.462... | 0.7075593 | 0 |
Sets the assists of this LolStatsTeamGame. | def assists(self, assists):
self._assists = assists | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_assists_per_turnover(self):\n bx = self.get_standard_stats()\n ratio = bx[\"assists\"]\n if bx[\"turnovers\"] > 0:\n ratio = bx[\"assists\"] / bx[\"turnovers\"]\n self.assists_per_turnover = \"%.2f\" % round(ratio, 2)",
"def set_assists_percentage(self):\n bx... | [
"0.6190171",
"0.5917101",
"0.54698205",
"0.52633846",
"0.5249889",
"0.5180262",
"0.517595",
"0.51485074",
"0.51292723",
"0.5117441",
"0.50788075",
"0.5064826",
"0.50613487",
"0.50538826",
"0.5014889",
"0.4975794",
"0.4968428",
"0.49354383",
"0.49354383",
"0.49354383",
"0.4935... | 0.67067623 | 0 |
Sets the deaths of this LolStatsTeamGame. | def deaths(self, deaths):
self._deaths = deaths | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_deaths(self, deaths):\n self.last_generation[\"deaths\"] = list()\n for death in deaths:\n self.last_generation[\"deaths\"].append(death)",
"def set_death(self, d, line_number=0):\n self.death = d\n self._death_line = line_number\n self._age_line = line_numbe... | [
"0.72646743",
"0.6233877",
"0.6189675",
"0.60779357",
"0.58751386",
"0.58027315",
"0.57565075",
"0.5556241",
"0.5522519",
"0.5502626",
"0.54663783",
"0.5448675",
"0.54305965",
"0.53893554",
"0.5377967",
"0.52349365",
"0.5197068",
"0.5177002",
"0.5142019",
"0.50229615",
"0.496... | 0.7439151 | 0 |
Sets the largest_killing_spree of this LolStatsTeamGame. | def largest_killing_spree(self, largest_killing_spree):
self._largest_killing_spree = largest_killing_spree | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def largest_multi_kill(self, largest_multi_kill):\n\n self._largest_multi_kill = largest_multi_kill",
"def killing_spree(self, killing_spree):\n\n self._killing_spree = killing_spree",
"def max_players(self, max_players):\n\n self._max_players = max_players",
"def non_heap_max(self, non_... | [
"0.65692127",
"0.53181964",
"0.52813274",
"0.5276609",
"0.5275508",
"0.5251135",
"0.5197423",
"0.51495624",
"0.5118947",
"0.5096044",
"0.50922614",
"0.5016843",
"0.4986851",
"0.49683028",
"0.49173167",
"0.49140057",
"0.49015263",
"0.48865104",
"0.48515078",
"0.48463422",
"0.4... | 0.84863275 | 0 |
Sets the largest_multi_kill of this LolStatsTeamGame. | def largest_multi_kill(self, largest_multi_kill):
self._largest_multi_kill = largest_multi_kill | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def largest_killing_spree(self, largest_killing_spree):\n\n self._largest_killing_spree = largest_killing_spree",
"def set_max(self, max):\n self.set_val((self.val[0], max))",
"def non_heap_max(self, non_heap_max):\n\n self._non_heap_max = non_heap_max",
"def max_players(self, max_player... | [
"0.6980803",
"0.56843364",
"0.56640726",
"0.56138706",
"0.5601809",
"0.55787",
"0.55180067",
"0.54477215",
"0.54407185",
"0.54407185",
"0.5433686",
"0.5403989",
"0.53264284",
"0.529558",
"0.529558",
"0.5291609",
"0.5284479",
"0.5258952",
"0.5254133",
"0.52397454",
"0.5230875"... | 0.8722704 | 0 |
Sets the killing_spree of this LolStatsTeamGame. | def killing_spree(self, killing_spree):
self._killing_spree = killing_spree | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def largest_killing_spree(self, largest_killing_spree):\n\n self._largest_killing_spree = largest_killing_spree",
"def kills(self, kills):\n\n self._kills = kills",
"def kills_per_min(self, kills_per_min):\n\n self._kills_per_min = kills_per_min",
"def reset_game(self):\n self.shi... | [
"0.5694161",
"0.5281896",
"0.50363606",
"0.46707574",
"0.45807952",
"0.45727634",
"0.4480516",
"0.44682366",
"0.445877",
"0.44495645",
"0.4447208",
"0.4408213",
"0.4360382",
"0.4304683",
"0.42538884",
"0.42424124",
"0.42357534",
"0.4232889",
"0.4232889",
"0.42328736",
"0.4228... | 0.788167 | 0 |
Sets the longest_time_spent_living of this LolStatsTeamGame. | def longest_time_spent_living(self, longest_time_spent_living):
self._longest_time_spent_living = longest_time_spent_living | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def max_time(self, max_time: str):\n\n self._max_time = max_time",
"def habit_longest_streak(self):\n # Clean up the console\n self.clear_console()\n # Prints the name of the application and instructions to the main menu\n self.back_to_menu_info()\n print(\"\"\"\n ... | [
"0.5565934",
"0.5539412",
"0.5406828",
"0.5274039",
"0.526848",
"0.5264393",
"0.5185174",
"0.51711977",
"0.5163331",
"0.51369023",
"0.51352847",
"0.50807106",
"0.49935538",
"0.4863525",
"0.4849407",
"0.48348057",
"0.48304814",
"0.48255908",
"0.48129472",
"0.48070338",
"0.4792... | 0.8304441 | 0 |
Sets the double_kills of this LolStatsTeamGame. | def double_kills(self, double_kills):
self._double_kills = double_kills | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def triple_kills(self, triple_kills):\n\n self._triple_kills = triple_kills",
"def unreal_kills(self, unreal_kills):\n\n self._unreal_kills = unreal_kills",
"def quadra_kills(self, quadra_kills):\n\n self._quadra_kills = quadra_kills",
"def largest_multi_kill(self, largest_multi_kill):\n... | [
"0.63616663",
"0.6212533",
"0.5628139",
"0.55983204",
"0.5499913",
"0.53454316",
"0.5332694",
"0.533266",
"0.52295756",
"0.5180936",
"0.50281614",
"0.4998556",
"0.49569044",
"0.48951286",
"0.48714644",
"0.4809804",
"0.47674337",
"0.47489727",
"0.47434387",
"0.47109708",
"0.46... | 0.8225638 | 0 |
Sets the triple_kills of this LolStatsTeamGame. | def triple_kills(self, triple_kills):
self._triple_kills = triple_kills | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def quadra_kills(self, quadra_kills):\n\n self._quadra_kills = quadra_kills",
"def double_kills(self, double_kills):\n\n self._double_kills = double_kills",
"def turret_kills(self, turret_kills):\n\n self._turret_kills = turret_kills",
"def penta_kills(self, penta_kills):\n\n self... | [
"0.6010563",
"0.5973593",
"0.5793319",
"0.57742023",
"0.55915105",
"0.49780855",
"0.49253473",
"0.4885209",
"0.48100984",
"0.4803795",
"0.46650612",
"0.46046567",
"0.44879353",
"0.43936083",
"0.4381536",
"0.4377907",
"0.43523517",
"0.43485743",
"0.43135196",
"0.42992046",
"0.... | 0.8270821 | 0 |
Sets the quadra_kills of this LolStatsTeamGame. | def quadra_kills(self, quadra_kills):
self._quadra_kills = quadra_kills | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def turret_kills(self, turret_kills):\n\n self._turret_kills = turret_kills",
"def unreal_kills(self, unreal_kills):\n\n self._unreal_kills = unreal_kills",
"def penta_kills(self, penta_kills):\n\n self._penta_kills = penta_kills",
"def inhibitor_kills(self, inhibitor_kills):\n\n ... | [
"0.64055157",
"0.62996614",
"0.5466938",
"0.5295116",
"0.52828294",
"0.50133866",
"0.5012549",
"0.4612037",
"0.46065795",
"0.4520254",
"0.4508782",
"0.4493452",
"0.44894803",
"0.4451328",
"0.44070798",
"0.4390482",
"0.436437",
"0.43136618",
"0.42984554",
"0.42852327",
"0.4233... | 0.835164 | 0 |
Sets the penta_kills of this LolStatsTeamGame. | def penta_kills(self, penta_kills):
self._penta_kills = penta_kills | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def turret_kills(self, turret_kills):\n\n self._turret_kills = turret_kills",
"def inhibitor_kills(self, inhibitor_kills):\n\n self._inhibitor_kills = inhibitor_kills",
"def quadra_kills(self, quadra_kills):\n\n self._quadra_kills = quadra_kills",
"def unreal_kills(self, unreal_kills):\n... | [
"0.6260243",
"0.6200644",
"0.6179255",
"0.5975691",
"0.59414315",
"0.57159525",
"0.5597028",
"0.5234778",
"0.51688904",
"0.51135945",
"0.5062269",
"0.505726",
"0.5042706",
"0.5018478",
"0.5002619",
"0.4990355",
"0.49813724",
"0.49808756",
"0.4965529",
"0.49062142",
"0.4839064... | 0.81840897 | 0 |
Sets the unreal_kills of this LolStatsTeamGame. | def unreal_kills(self, unreal_kills):
self._unreal_kills = unreal_kills | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def turret_kills(self, turret_kills):\n\n self._turret_kills = turret_kills",
"def quadra_kills(self, quadra_kills):\n\n self._quadra_kills = quadra_kills",
"def kills(self, kills):\n\n self._kills = kills",
"def inhibitor_kills(self, inhibitor_kills):\n\n self._inhibitor_kills = ... | [
"0.69077253",
"0.6435874",
"0.5753396",
"0.5718841",
"0.5385436",
"0.53294885",
"0.5306997",
"0.5249017",
"0.51994914",
"0.51691496",
"0.5120162",
"0.5116209",
"0.5073014",
"0.5062303",
"0.5030785",
"0.5029439",
"0.49893638",
"0.49107116",
"0.4894905",
"0.48876718",
"0.483974... | 0.7655946 | 0 |
Sets the total_damage_dealt of this LolStatsTeamGame. | def total_damage_dealt(self, total_damage_dealt):
self._total_damage_dealt = total_damage_dealt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def total_damage_dealt_to_champions(self, total_damage_dealt_to_champions):\n\n self._total_damage_dealt_to_champions = total_damage_dealt_to_champions",
"def magic_damage_dealt(self, magic_damage_dealt):\n\n self._magic_damage_dealt = magic_damage_dealt",
"def total_damage_taken(self, total_dama... | [
"0.7313242",
"0.6736841",
"0.6493701",
"0.6435351",
"0.6412331",
"0.57087266",
"0.5696347",
"0.5684266",
"0.56547225",
"0.56327397",
"0.55974543",
"0.55639935",
"0.5557575",
"0.55346996",
"0.5521134",
"0.5498188",
"0.54901236",
"0.54693204",
"0.54049015",
"0.5348864",
"0.5335... | 0.84173554 | 0 |
Sets the magic_damage_dealt of this LolStatsTeamGame. | def magic_damage_dealt(self, magic_damage_dealt):
self._magic_damage_dealt = magic_damage_dealt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def magic_damage_dealt_to_champions(self, magic_damage_dealt_to_champions):\n\n self._magic_damage_dealt_to_champions = magic_damage_dealt_to_champions",
"def true_damage_dealt(self, true_damage_dealt):\n\n self._true_damage_dealt = true_damage_dealt",
"def physical_damage_dealt(self, physical_da... | [
"0.696661",
"0.67270285",
"0.6476713",
"0.6390807",
"0.6226219",
"0.5870502",
"0.5628375",
"0.5625828",
"0.5503729",
"0.5500713",
"0.5447467",
"0.5419171",
"0.5341729",
"0.5324876",
"0.5247896",
"0.52377033",
"0.5202111",
"0.5166766",
"0.5155306",
"0.5124192",
"0.5081432",
... | 0.81532514 | 0 |
Sets the physical_damage_dealt of this LolStatsTeamGame. | def physical_damage_dealt(self, physical_damage_dealt):
self._physical_damage_dealt = physical_damage_dealt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def magic_damage_dealt(self, magic_damage_dealt):\n\n self._magic_damage_dealt = magic_damage_dealt",
"def total_damage_dealt(self, total_damage_dealt):\n\n self._total_damage_dealt = total_damage_dealt",
"def true_damage_dealt(self, true_damage_dealt):\n\n self._true_damage_dealt = true_d... | [
"0.7148835",
"0.681263",
"0.6801736",
"0.67789346",
"0.6089281",
"0.5985767",
"0.596009",
"0.5894784",
"0.566056",
"0.5613205",
"0.54890746",
"0.5480143",
"0.54429024",
"0.5409357",
"0.5385092",
"0.53787917",
"0.534559",
"0.5323002",
"0.52887297",
"0.52422076",
"0.5195981",
... | 0.81182486 | 0 |
Sets the true_damage_dealt of this LolStatsTeamGame. | def true_damage_dealt(self, true_damage_dealt):
self._true_damage_dealt = true_damage_dealt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def magic_damage_dealt(self, magic_damage_dealt):\n\n self._magic_damage_dealt = magic_damage_dealt",
"def true_damage_dealt_to_champions(self, true_damage_dealt_to_champions):\n\n self._true_damage_dealt_to_champions = true_damage_dealt_to_champions",
"def total_damage_dealt(self, total_damage_d... | [
"0.7024237",
"0.6772881",
"0.6640434",
"0.64330626",
"0.60908115",
"0.599867",
"0.59184337",
"0.59171736",
"0.5891586",
"0.5867376",
"0.5703856",
"0.56503475",
"0.5590954",
"0.55486196",
"0.55426043",
"0.55410355",
"0.53986585",
"0.5387495",
"0.5367935",
"0.5281027",
"0.52732... | 0.82996035 | 0 |
Sets the largest_critical_strike of this LolStatsTeamGame. | def largest_critical_strike(self, largest_critical_strike):
self._largest_critical_strike = largest_critical_strike | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clan_chest_max_level(self, clan_chest_max_level):\n\n self._clan_chest_max_level = clan_chest_max_level",
"def __setLuredMaxRounds(self, suitId, rounds):\n if self.__suitIsLured(suitId):\n self.currentlyLuredSuits[suitId][1] = rounds",
"def max_players(self, max_players):\n\n ... | [
"0.569888",
"0.5676793",
"0.5458749",
"0.53790236",
"0.5321908",
"0.52146226",
"0.51754504",
"0.5058571",
"0.5019249",
"0.50134516",
"0.49489745",
"0.49489745",
"0.49400276",
"0.49245152",
"0.49181187",
"0.4880492",
"0.48750713",
"0.48703313",
"0.4828774",
"0.4818368",
"0.481... | 0.8311558 | 0 |
Sets the total_damage_dealt_to_champions of this LolStatsTeamGame. | def total_damage_dealt_to_champions(self, total_damage_dealt_to_champions):
self._total_damage_dealt_to_champions = total_damage_dealt_to_champions | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def total_damage_dealt(self, total_damage_dealt):\n\n self._total_damage_dealt = total_damage_dealt",
"def magic_damage_dealt_to_champions(self, magic_damage_dealt_to_champions):\n\n self._magic_damage_dealt_to_champions = magic_damage_dealt_to_champions",
"def true_damage_dealt_to_champions(self... | [
"0.73679274",
"0.70976293",
"0.6694231",
"0.6605472",
"0.6058799",
"0.58941954",
"0.5876487",
"0.57978076",
"0.55502486",
"0.5424441",
"0.5418691",
"0.5391538",
"0.53550494",
"0.5319113",
"0.5283111",
"0.5268654",
"0.5243026",
"0.5221057",
"0.5201682",
"0.51904607",
"0.517316... | 0.8478791 | 0 |
Sets the magic_damage_dealt_to_champions of this LolStatsTeamGame. | def magic_damage_dealt_to_champions(self, magic_damage_dealt_to_champions):
self._magic_damage_dealt_to_champions = magic_damage_dealt_to_champions | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def true_damage_dealt_to_champions(self, true_damage_dealt_to_champions):\n\n self._true_damage_dealt_to_champions = true_damage_dealt_to_champions",
"def magic_damage_dealt(self, magic_damage_dealt):\n\n self._magic_damage_dealt = magic_damage_dealt",
"def physical_damage_dealt_to_champions(self... | [
"0.71770644",
"0.7071609",
"0.6858378",
"0.6697823",
"0.60695034",
"0.5647399",
"0.5357546",
"0.5354944",
"0.52696556",
"0.52458304",
"0.5212171",
"0.50096923",
"0.49551123",
"0.49399656",
"0.48440322",
"0.47519198",
"0.4750016",
"0.4746898",
"0.47460318",
"0.4726286",
"0.471... | 0.8479353 | 0 |
Sets the physical_damage_dealt_to_champions of this LolStatsTeamGame. | def physical_damage_dealt_to_champions(self, physical_damage_dealt_to_champions):
self._physical_damage_dealt_to_champions = physical_damage_dealt_to_champions | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def magic_damage_dealt_to_champions(self, magic_damage_dealt_to_champions):\n\n self._magic_damage_dealt_to_champions = magic_damage_dealt_to_champions",
"def true_damage_dealt_to_champions(self, true_damage_dealt_to_champions):\n\n self._true_damage_dealt_to_champions = true_damage_dealt_to_champi... | [
"0.78034467",
"0.74359363",
"0.72061217",
"0.6874971",
"0.62328494",
"0.6100102",
"0.5631323",
"0.5463596",
"0.5377505",
"0.53587437",
"0.5346134",
"0.5165128",
"0.5061283",
"0.4992109",
"0.49337628",
"0.4901481",
"0.4866304",
"0.4861426",
"0.48062065",
"0.4783141",
"0.476101... | 0.8226858 | 0 |
Sets the true_damage_dealt_to_champions of this LolStatsTeamGame. | def true_damage_dealt_to_champions(self, true_damage_dealt_to_champions):
self._true_damage_dealt_to_champions = true_damage_dealt_to_champions | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def magic_damage_dealt_to_champions(self, magic_damage_dealt_to_champions):\n\n self._magic_damage_dealt_to_champions = magic_damage_dealt_to_champions",
"def true_damage_dealt(self, true_damage_dealt):\n\n self._true_damage_dealt = true_damage_dealt",
"def total_damage_dealt_to_champions(self, t... | [
"0.77198553",
"0.71025556",
"0.69968516",
"0.68976027",
"0.5956086",
"0.55418825",
"0.55248135",
"0.53897387",
"0.5361901",
"0.5154018",
"0.5123562",
"0.5119237",
"0.5081986",
"0.5000916",
"0.49964744",
"0.49580693",
"0.4956659",
"0.4931309",
"0.4926352",
"0.4913904",
"0.4913... | 0.84636974 | 0 |
Sets the total_heal of this LolStatsTeamGame. | def total_heal(self, total_heal):
self._total_heal = total_heal | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def total_units_healed(self, total_units_healed):\n\n self._total_units_healed = total_units_healed",
"def heal_damage(self, heal):\n if self.hp + heal < self.max_hp:\n self.hp += heal\n else:\n self.hp = self.max_hp",
"def heal(self, amount: int) -> str:\n if ... | [
"0.6859413",
"0.6516858",
"0.5804191",
"0.5692934",
"0.5684895",
"0.5650968",
"0.5642232",
"0.56063056",
"0.55835277",
"0.5534968",
"0.5482959",
"0.5463433",
"0.53949636",
"0.52674735",
"0.52674735",
"0.52674735",
"0.52674735",
"0.52674735",
"0.52674735",
"0.52674735",
"0.526... | 0.8385051 | 0 |
Sets the total_units_healed of this LolStatsTeamGame. | def total_units_healed(self, total_units_healed):
self._total_units_healed = total_units_healed | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def total_heal(self, total_heal):\n\n self._total_heal = total_heal",
"def total_damage_taken(self, total_damage_taken):\n\n self._total_damage_taken = total_damage_taken",
"def total_minions_killed(self, total_minions_killed):\n\n self._total_minions_killed = total_minions_killed",
"def... | [
"0.6235971",
"0.5814958",
"0.5421527",
"0.53700215",
"0.53576297",
"0.5270323",
"0.52530295",
"0.5174288",
"0.5163912",
"0.5069691",
"0.50659233",
"0.50348693",
"0.5032647",
"0.500087",
"0.500087",
"0.500087",
"0.49982315",
"0.49738336",
"0.49677417",
"0.495717",
"0.49380636"... | 0.8190873 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.