query stringlengths 10 3.6k | document stringlengths 19 61.4k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Returns the external energy of the snake. The external energy is computed via the provided ExternalEnergy subclass object. The external energy is the sum of the external energies at each control point which get multiplied by the inverse of the number of control points. | def LDVz(YKHO, D8fe):
vNEp = 0.0
if len(YKHO.controlpoints) > 0:
aM8h = float(1) / len(YKHO.controlpoints)
else:
aM8h = 1
if oyIN.equal(D8fe, YKHO.controlpoints).all():
u8R3 = YKHO.normals
else:
xzMX = zh6z()
xzMX.addControlPoints(*D8fe)
u8R3 = xzMX.no... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VYvU(YKHO):\n return YKHO.mc.energy(YKHO.chain)",
"def Nndf(YKHO):\n if not hasattr(YKHO, 'energy'):\n YKHO.energy = YKHO.calcEnergy()\n return YKHO.energy",
"def ut5U(YKHO):\n return YKHO.generic_getter(M6MN, 'E', 'convert_energy')",
"def ByFS(YKHO):\n return HnbY.TotalEnergy(YKHO)... | [
"0.6440535",
"0.6354821",
"0.63449776",
"0.6264083",
"0.61748064",
"0.6103495",
"0.60872054",
"0.60872054",
"0.6078869",
"0.60188574",
"0.6012361",
"0.59411526",
"0.5899463",
"0.5817837",
"0.57772756",
"0.57533556",
"0.57495403",
"0.5735712",
"0.57135314",
"0.56892604",
"0.56... | 0.6103102 | 6 |
Checks if the priority queue is empty | def FBfn(YKHO):
return len(YKHO) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return len(YKHO.priority_queue) == 0",
"def FBfn(YKHO):\n return YKHO.queue == []",
"def FBfn(YKHO):\n return len(YKHO.the_queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return len(YKHO... | [
"0.8808334",
"0.8068953",
"0.79964715",
"0.7991973",
"0.7991973",
"0.7919884",
"0.78870326",
"0.7833711",
"0.78051496",
"0.77755535",
"0.7770533",
"0.77371067",
"0.77360874",
"0.7720101",
"0.7705574",
"0.7686946",
"0.7686946",
"0.7654498",
"0.7635054",
"0.7558732",
"0.7543402... | 0.0 | -1 |
Returns minimum item in the form of a tuple | def min(YKHO):
if YKHO.is_empty():
return None
a1PO = (YKHO._data[0]._key, YKHO._data[0]._value)
return a1PO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def min(YKHO):\n XP5J = YKHO._find_min()\n ZfUD = XP5J.element()\n return (ZfUD._key, ZfUD._value)",
"def XcNI(YKHO):\n if YKHO.is_empty():\n return None\n else:\n XP5J = YKHO.first()\n return (XP5J.key(), XP5J.value())",
"def min(YKHO):\n if YKHO.is_empty():\n rai... | [
"0.78829014",
"0.740515",
"0.73494077",
"0.73041123",
"0.73041123",
"0.7193763",
"0.712665",
"0.7117007",
"0.7105118",
"0.70120853",
"0.7010575",
"0.6909707",
"0.6895533",
"0.68852603",
"0.6854779",
"0.6845468",
"0.6826304",
"0.67945486",
"0.6767135",
"0.6744884",
"0.67245466... | 0.7216957 | 5 |
Close the happybase connection. | def DDI8(YKHO) -> None:
YKHO.real_conn.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n YKHO._connection.close()",
"def ngVb(YKHO):\n YKHO.conn.close()",
"def ngVb(YKHO) -> None:\n YKHO.conn.close()",
"def ngVb(YKHO):\n YKHO._conn.close()",
"def DDI8(YKHO):\n YKHO.connection.close()",
"def ngVb(YKHO):\n YKHO.session.close()",
"def DDI8(YKHO):\n YKHO.... | [
"0.79916227",
"0.78213465",
"0.7813551",
"0.77950585",
"0.77862394",
"0.77458835",
"0.77411985",
"0.7738954",
"0.7738954",
"0.7738954",
"0.77326614",
"0.77326614",
"0.77274203",
"0.76888466",
"0.76772666",
"0.7673579",
"0.7671117",
"0.7671117",
"0.7671117",
"0.7671117",
"0.76... | 0.76711786 | 16 |
Computes a gaussian pyramid for an input image | def lBCn(VXjJ, ABDL=5):
XAAT = list(XuJu(VXjJ, max_layer=ABDL))
XAAT.reverse()
return XAAT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G39j(LNo8, exwG=3):\n WZcn = zGuA(7, 1)\n Ywea = []\n Ywea = [LNo8]\n for YRbF in range(exwG):\n m_kf = IxiL(Ywea[YRbF], WZcn)\n m_kf = Unzb(m_kf, 2)\n Ywea.append(m_kf)\n return Ywea",
"def eCtg(VXjJ: np.ndarray, bctv: int=4) -> x1iM[oyIN.ndarray]:\n WGAI = [VXjJ]\n ... | [
"0.72078294",
"0.7160451",
"0.7004107",
"0.68300813",
"0.6759211",
"0.66889745",
"0.6619591",
"0.65370846",
"0.653064",
"0.6460172",
"0.60098743",
"0.5983682",
"0.59755254",
"0.597127",
"0.5963547",
"0.5955024",
"0.59330815",
"0.59312946",
"0.59301037",
"0.5922019",
"0.590096... | 0.7812754 | 0 |
Convert unicode strings in JSON object to byte strings | def aD6D(input):
if isinstance(input, dict):
return {aD6D(H5ew): aD6D(BWXx) for H5ew, BWXx in input.items()}
elif isinstance(input, list):
return [aD6D(U6D_) for U6D_ in input]
elif isinstance(input, QMSQ):
return input.encode('utf-8')
else:
return input | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xhsS(YEnM, PjZe=qQXR.dumps):\n Aofo = PjZe(YEnM)\n if isinstance(Aofo, g9qP):\n return Aofo.encode('utf-8')\n return Aofo",
"def kOgP(JZXy):\n return qQXR.dumps(JZXy, ensure_ascii=False)",
"def nIC_(YKHO, nP0Q):\n Ol8d = YKHO.message_class()\n try:\n Ol8d = tBOI.Parse(nP0Q, ... | [
"0.71287656",
"0.6898229",
"0.67282796",
"0.6651127",
"0.6646716",
"0.66234213",
"0.6570793",
"0.65239626",
"0.65135884",
"0.648325",
"0.64821357",
"0.64820534",
"0.64238274",
"0.64228797",
"0.6404878",
"0.6377354",
"0.6371671",
"0.63629043",
"0.631347",
"0.628966",
"0.628889... | 0.6631976 | 5 |
Returns a JSON figure representation for the specified file Plotly uniquely identifies figures with a 'file_owner'/'file_id' pair. Since each file is given a corresponding unique url, you may also simply pass a valid plotly url as the first argument. | def m2zk(MjXo, WpAY=None, m6Me=False):
import plotly.tools
iXw9 = tgzD()['plotly_domain']
if WpAY is None:
bD7m = MjXo
if bD7m[:len(iXw9)] != iXw9:
raise RJN2.exceptions.PlotlyError("Because you didn't supply a 'file_id' in the call, we're assuming you're trying to snag a figure ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sCRM(Sd0C):\n with open(Sd0C, 'r') as eHNT:\n Ty9i = qQXR.loads(eHNT.read().encode().decode())\n LZpg = iEax.Figure(data=Ty9i['data'], layout=Ty9i['layout'])\n return LZpg",
"def qBTF():\n LZpg = {'data': [{'x': ['giraffes', 'orangutans', 'monkeys'], 'y': [20, 14, 23], 'type': 'bar'}]}\n ... | [
"0.6201225",
"0.58051383",
"0.55810076",
"0.5529109",
"0.544995",
"0.52864736",
"0.51116204",
"0.5072611",
"0.5001298",
"0.5000963",
"0.4995678",
"0.49639544",
"0.49576038",
"0.49263456",
"0.49240315",
"0.48255748",
"0.48229688",
"0.47934148",
"0.4782595",
"0.47803304",
"0.47... | 0.75329757 | 0 |
Return a static image of the plot described by `figure_or_data`. | def NMoC(cV4S, format='png', TVTK=None, H2v2=None, NXpY=None):
import plotly.tools
JI1i = Q8B8.tools.return_figure_from_figure_or_data(cV4S, True)
if format not in ['png', 'svg', 'jpeg', 'pdf', 'emf']:
raise RJN2.exceptions.PlotlyError('Invalid format. This version of your Plotly-Python package curr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kj9G(nPrm, sXTW=False):\n if sXTW:\n QrM1.ion()\n LZpg = QrM1.figure()\n LZpg.canvas.draw()\n LNo8 = GRIQ(nPrm)\n else:\n LZpg = QrM1.figure()\n LNo8 = GRIQ(nPrm)\n QrM1.show()\n return (LZpg, LNo8)",
"def f2ai(YKHO, nPrm):\n maxY = oyIN.shape(nPrm... | [
"0.6683185",
"0.6486511",
"0.64548653",
"0.63635045",
"0.6334618",
"0.6182145",
"0.60533667",
"0.6050799",
"0.5991241",
"0.59169155",
"0.5857147",
"0.5823233",
"0.5817258",
"0.5796308",
"0.57525367",
"0.57513285",
"0.5700331",
"0.5681536",
"0.56767875",
"0.56585234",
"0.56585... | 0.646978 | 2 |
Display a static image of the plot described by `figure_or_data` in an IPython Notebook. | def iA73(Emd4, cV4S, format='png', TVTK=None, H2v2=None, NXpY=None):
if format == 'pdf':
raise RJN2.exceptions.PlotlyError("Aw, snap! It's not currently possible to embed a pdf into an IPython notebook. You can save the pdf with the `image.save_as` or you can embed an png, jpeg, or svg.")
VXjJ = Emd4.ge... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kj9G(nPrm, sXTW=False):\n if sXTW:\n QrM1.ion()\n LZpg = QrM1.figure()\n LZpg.canvas.draw()\n LNo8 = GRIQ(nPrm)\n else:\n LZpg = QrM1.figure()\n LNo8 = GRIQ(nPrm)\n QrM1.show()\n return (LZpg, LNo8)",
"def K0fu(cV4S, **NFeY):\n from plotly.basedata... | [
"0.7266314",
"0.70956904",
"0.67559046",
"0.6501911",
"0.6487926",
"0.6376092",
"0.61677873",
"0.6130594",
"0.6120668",
"0.6101515",
"0.60979176",
"0.60885453",
"0.6067559",
"0.6052893",
"0.6052893",
"0.6052893",
"0.6011241",
"0.59689766",
"0.5952869",
"0.5939876",
"0.5936720... | 0.6874484 | 2 |
Return campaigns that have not been marked as deleted. | def oWb2(YKHO, **B2fa):
return YKHO.filter(is_deleted=False, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kz_Y(YKHO, gn9s):\n return YKHO.contactcampaignstatus_set.filter(seller_id=gn9s, status__in=[1, 3])",
"def mdu0(YKHO):\n return YKHO.filter(start__lte=rIAI.now() - qcWV.timedelta(days=1))",
"def AQWh(YKHO):\n B2fa = {}\n B2fa['expirationdate__lte'] = qcWV.utcnow().replace(tzinfo=h5YN)\n retu... | [
"0.59876066",
"0.5964393",
"0.58784187",
"0.5866484",
"0.581731",
"0.56766254",
"0.5648982",
"0.56252515",
"0.56014967",
"0.55676496",
"0.5481052",
"0.53891283",
"0.5374961",
"0.5356471",
"0.5351363",
"0.5335835",
"0.5324106",
"0.53224206",
"0.52535504",
"0.52466375",
"0.5245... | 0.51392394 | 28 |
Return true if this campaign has not been approved or has not yet started AND no contributions are associated with it. In all other cases, an admin needs to review the campaign before it may be deleted. | def WTwp(YKHO):
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n from .delivery import Delivery\n return Delivery.objects.filter(deadline__assignment_group=YKHO).count() == 0",
"def yWbd(YKHO):\n cdj0 = YKHO.context.get_personal_fundraising_campaign_url()\n g057 = cdj0 == YKHO.context.absolute_url()\n rnmk = 'create-personal-campaign-page' in ... | [
"0.65984696",
"0.6162966",
"0.6141656",
"0.6131104",
"0.6130167",
"0.6102289",
"0.60798293",
"0.6004878",
"0.59252405",
"0.58954984",
"0.58919406",
"0.588413",
"0.5877901",
"0.58376265",
"0.58272123",
"0.58170944",
"0.58153945",
"0.5807906",
"0.579944",
"0.5790465",
"0.577757... | 0.630697 | 1 |
Return the total amount raised (online + tickets) to date by this campaign. | def RGOW(YKHO):
return YKHO.stats.amount_raised | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xhoU(YKHO):\n return YKHO.stats.amount_raised_by_tickets",
"def DPso(YKHO):\n return YKHO.stats.amount_raised_online",
"def hG1L(YKHO):\n return YKHO.total_donated() + (YKHO.community_contribution or 0)",
"def Q7q2(YKHO):\n return YKHO.total_balance - YKHO.net_invested",
"def Z_4o(YKHO) -> ... | [
"0.7630368",
"0.7474192",
"0.70505553",
"0.68948686",
"0.6558963",
"0.6448289",
"0.64084613",
"0.619895",
"0.6127036",
"0.60888475",
"0.6073956",
"0.6016463",
"0.60155123",
"0.60035944",
"0.59825575",
"0.5981024",
"0.5970821",
"0.5960501",
"0.5947542",
"0.594348",
"0.59205407... | 0.67866254 | 4 |
Return the amount raised online to date by this campaign (excluding tickets). | def DPso(YKHO):
return YKHO.stats.amount_raised_online | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xhoU(YKHO):\n return YKHO.stats.amount_raised_by_tickets",
"def iMPG(YKHO):\n return YKHO.max_contributions - YKHO.num_tickets_total",
"def Q7q2(YKHO):\n return YKHO.total_balance - YKHO.net_invested",
"def xejd(YKHO):\n rg4j = rIAI.now()\n if YKHO.date_billing_next > rg4j:\n XMGn =... | [
"0.6648538",
"0.65222704",
"0.6517339",
"0.62456536",
"0.6216171",
"0.6207917",
"0.6100024",
"0.6017811",
"0.58511364",
"0.58508337",
"0.5834497",
"0.5765602",
"0.5745018",
"0.57433647",
"0.5703548",
"0.5685412",
"0.56764346",
"0.56647485",
"0.56386673",
"0.5617618",
"0.56143... | 0.7680387 | 0 |
Return the amount raised online to date by this campaign (excluding tickets). | def xhoU(YKHO):
return YKHO.stats.amount_raised_by_tickets | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DPso(YKHO):\n return YKHO.stats.amount_raised_online",
"def iMPG(YKHO):\n return YKHO.max_contributions - YKHO.num_tickets_total",
"def Q7q2(YKHO):\n return YKHO.total_balance - YKHO.net_invested",
"def xejd(YKHO):\n rg4j = rIAI.now()\n if YKHO.date_billing_next > rg4j:\n XMGn = (YK... | [
"0.76792353",
"0.6520958",
"0.65152824",
"0.62454665",
"0.621647",
"0.62060404",
"0.61002696",
"0.6016582",
"0.5852542",
"0.5847458",
"0.5835288",
"0.5765441",
"0.5743976",
"0.57388186",
"0.57017225",
"0.56852645",
"0.5676207",
"0.56661224",
"0.5640928",
"0.56180817",
"0.5614... | 0.66476005 | 1 |
Return number of tickets left unredeemed. | def FSHe(YKHO):
return YKHO._contributions_left[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CBp4(YKHO):\n return Gcr8.query.filter_by(assigned=YKHO.user).count()",
"def THz7(YKHO):\n return len(YKHO._ballots) * YKHO._number_of_votes_pr_voter - YKHO._number_of_blank_votes",
"def ZOP7(YKHO):\n UHFx = 0\n for Q6kx in YKHO.node:\n if Q6kx.energy < 0:\n UHFx += 1\n ret... | [
"0.6493252",
"0.6428032",
"0.6175619",
"0.61656725",
"0.61582017",
"0.6120342",
"0.60774404",
"0.6042892",
"0.6042448",
"0.5973437",
"0.5968522",
"0.59675795",
"0.5950691",
"0.5931682",
"0.5920631",
"0.5914511",
"0.5914287",
"0.5904884",
"0.5904233",
"0.5885647",
"0.5863499",... | 0.701578 | 0 |
Return number of online and ticket contributions made to this campaign. | def RKRT(YKHO):
return YKHO.stats.num_online_contributions + YKHO.stats.num_tickets_redeemed | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kdST(YKHO):\n exwG = sum([Z9rn.qty for Z9rn in YKHO.contribution_set.all()])\n return exwG",
"def Qpsk(YKHO, bNKA):\n return bNKA.observations.exclude(status='draft').exclude(status='pending').count()",
"def xz27(YKHO):\n if YKHO.is_complete:\n return (0, 0)\n Y_pW = YKHO.online_quota... | [
"0.6976142",
"0.6615978",
"0.6504466",
"0.6337855",
"0.62272394",
"0.6158342",
"0.6111951",
"0.60996264",
"0.6082669",
"0.6033576",
"0.6031653",
"0.6028697",
"0.5957099",
"0.59200794",
"0.5905668",
"0.588132",
"0.58618236",
"0.58588386",
"0.58588386",
"0.58567053",
"0.5841208... | 0.8378922 | 0 |
Return end date of the campaign; used when this campaign behaves like an event. | def izQJ(YKHO):
return YKHO.end_date | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KhBf(YKHO):\n return YKHO.__end_date",
"def KhBf(YKHO):\n return YKHO._end_date",
"def KhBf(YKHO):\n return YKHO._end_date",
"def KhBf(YKHO):\n return YKHO._end_date",
"def KhBf(YKHO) -> str:\n return YKHO._end_date",
"def KhBf(YKHO) -> str:\n return qe4Y.get(YKHO, 'end_date')",
"... | [
"0.83100796",
"0.8256867",
"0.8256867",
"0.8256867",
"0.8217568",
"0.8148739",
"0.8148739",
"0.7762649",
"0.7762649",
"0.76239663",
"0.7421777",
"0.74168694",
"0.73484606",
"0.72717685",
"0.72662055",
"0.72091925",
"0.71444035",
"0.7121332",
"0.71095306",
"0.70932186",
"0.708... | 0.78822595 | 7 |
Return the number of online contributions accepted excluding tickets. | def iMPG(YKHO):
return YKHO.max_contributions - YKHO.num_tickets_total | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RKRT(YKHO):\n return YKHO.stats.num_online_contributions + YKHO.stats.num_tickets_redeemed",
"def xz27(YKHO):\n if YKHO.is_complete:\n return (0, 0)\n Y_pW = YKHO.online_quota - YKHO.stats.num_online_contributions\n if Y_pW < 0:\n Y_pW = 0\n yNTE = YKHO.num_tickets_total - YKHO.s... | [
"0.7680878",
"0.68704367",
"0.67946506",
"0.67775667",
"0.66226083",
"0.65727556",
"0.62992626",
"0.6272155",
"0.5835012",
"0.57726115",
"0.57014626",
"0.56466216",
"0.5588915",
"0.55851907",
"0.55542594",
"0.5546944",
"0.5543755",
"0.5502432",
"0.5480795",
"0.5479391",
"0.54... | 0.68959504 | 1 |
Return HTML fragment to display badge image. | def yuVU(YKHO):
MKlR = '<img src="%s" alt="Campaign badge"/>' % YKHO.image.url
return BY_x(MKlR) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yuVU(YKHO):\n MKlR = '<img src=\"%s\" alt=\"%s\"/>' % (YKHO.image_resized_url, YKHO.title)\n return BY_x(MKlR)",
"def PeK4(YKHO):\n MKlR = '<img src=\"%s\" alt=\"%s\"/>' % (YKHO.image_avatar_url, YKHO.title)\n return BY_x(MKlR)",
"def VXjJ(YKHO, YEnM):\n return BY_x(f\"<img src='/{YEnM.image... | [
"0.65032226",
"0.63238186",
"0.6238921",
"0.6182968",
"0.6120444",
"0.6027751",
"0.5957812",
"0.59428513",
"0.5906134",
"0.58768463",
"0.5873083",
"0.58691084",
"0.58234966",
"0.5822494",
"0.5817191",
"0.58008146",
"0.57927096",
"0.5779642",
"0.57480925",
"0.56906426",
"0.565... | 0.8229253 | 0 |
Return a userfriendly version of the ticket code in the format AAABBBCCCC. | def IJKR(YKHO):
return u'%s-%s-%s' % (YKHO.code[:3], YKHO.code[3:6], YKHO.code[6:]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gz3z(y0cW, lxjK):\n while True:\n KoG3 = tuKI.sample(gQOp, 4)\n Wxnj = y0cW + ''.join(KoG3)\n if not lxjK.has_key(Wxnj):\n return Wxnj",
"def Etlz(YKHO):\n return '^\\\\d{%s}$' % YKHO._digits",
"def tYr5(YKHO, Wxnj):\n r8hN = YKHO.codeRe.match(Wxnj)\n if r8hN:\n ... | [
"0.6595918",
"0.6372422",
"0.6350186",
"0.6275939",
"0.62750477",
"0.6203088",
"0.619837",
"0.5990963",
"0.5935194",
"0.59275705",
"0.59174114",
"0.5891635",
"0.5859422",
"0.58105373",
"0.5809429",
"0.5787439",
"0.57846373",
"0.5770695",
"0.5770517",
"0.57554734",
"0.5737908"... | 0.7020354 | 0 |
When a ``Contribution`` or ``Ticket`` object is saved, schedule a recomputation of the campaign's statistics. | def P__L(vC92, KAOR, **B2fa):
if isinstance(KAOR, (IV9B, QgSC)):
_A61.objects.q_campaign_action(KAOR.campaign, 'recompute-campaign') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AmZh(YKHO):\n _YVN = [Ty9i for Ty9i in YKHO.action_register if Ty9i['action'] == 'contribution']\n for regZ in _YVN:\n YKHO.model.schedule.agents_by_type['Customer'][regZ['unique_id']].hour_wallet -= regZ['value']\n YKHO.model.schedule.agents_by_type['Customer'][regZ['unique_id']].contribut... | [
"0.6043927",
"0.56969786",
"0.5672916",
"0.56659484",
"0.56136096",
"0.545843",
"0.5456702",
"0.53531253",
"0.53505385",
"0.5321189",
"0.52938175",
"0.52388984",
"0.51704293",
"0.51602507",
"0.51519763",
"0.5143518",
"0.51280487",
"0.51014",
"0.51009095",
"0.5099541",
"0.5083... | 0.7159458 | 0 |
Opens a file in the Windows explorer (or equivalent). | def o4Te(nUeQ):
HywK.open(Hy7s.path.dirname(XP5J['paths'][nUeQ])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZWJt(pmON):\n if HwRy.platform == 'win32':\n Hy7s.startfile(pmON)\n elif HwRy.platform == 'darwin':\n Yn3K.Popen(['open', pmON])\n else:\n try:\n Yn3K.Popen(['xdg-open', pmON])\n except OSError:\n bo34.error('Presumably *nix system xdg-open failed for ... | [
"0.78888535",
"0.7886586",
"0.75610894",
"0.72731686",
"0.72630876",
"0.71721107",
"0.7157188",
"0.7046568",
"0.69904256",
"0.69589436",
"0.6947861",
"0.6946041",
"0.69299746",
"0.6867009",
"0.6840836",
"0.6695129",
"0.66920954",
"0.6644093",
"0.6509257",
"0.6484421",
"0.6483... | 0.7954632 | 0 |
return reward by given states and action, int | def xyVK(YKHO, DghZ, XeOP, rxHc):
if YKHO.__env.is_goal_state(rxHc):
return 0
else:
return -1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YPaw(YKHO, XeOP):\n Ylbp = YKHO.reward_table.get(YKHO.curr_state, XeOP)\n YKHO.curr_state = Ylbp['result']\n return Ylbp",
"def xyVK(YKHO, QTBn, XeOP, rxHc):\n assert XeOP in YKHO.get_possible_actions(QTBn), 'cannot do action %s from state %s' % (XeOP, QTBn)\n WKvO, LVAh = YKHO.__state_to_xy(r... | [
"0.7784248",
"0.7647302",
"0.74507815",
"0.74464077",
"0.73857564",
"0.7353268",
"0.7311232",
"0.73034924",
"0.729429",
"0.72918487",
"0.7206298",
"0.71789294",
"0.7168078",
"0.71667105",
"0.7133709",
"0.71108484",
"0.70563465",
"0.70400053",
"0.7011071",
"0.6977345",
"0.6955... | 0.7224208 | 10 |
return reward by given states and action, int | def xyVK(YKHO, DghZ, XeOP, rxHc):
if YKHO.__env.is_goal_state(rxHc):
return 1
else:
return 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YPaw(YKHO, XeOP):\n Ylbp = YKHO.reward_table.get(YKHO.curr_state, XeOP)\n YKHO.curr_state = Ylbp['result']\n return Ylbp",
"def xyVK(YKHO, QTBn, XeOP, rxHc):\n assert XeOP in YKHO.get_possible_actions(QTBn), 'cannot do action %s from state %s' % (XeOP, QTBn)\n WKvO, LVAh = YKHO.__state_to_xy(r... | [
"0.77840394",
"0.76465356",
"0.7449264",
"0.7445409",
"0.73868966",
"0.7353187",
"0.73110396",
"0.73030144",
"0.729337",
"0.72914207",
"0.72227204",
"0.7205519",
"0.71784055",
"0.71686685",
"0.71662515",
"0.7133114",
"0.7111013",
"0.7056227",
"0.70411074",
"0.69765913",
"0.69... | 0.70097053 | 19 |
Used by walls and posts to check if the obj has access right or not | def oq8n(gMWf, vGaq):
from apps.users.models import Dept, Subdept, Page
if hasattr(vGaq, 'person'):
return 1
if isinstance(gMWf, mv1M):
kJ0h = gMWf.erp_profile
Ep3_ = kJ0h.coord_relations.all()
CqjG = kJ0h.supercoord_relations.all()
n1Yn = kJ0h.core_relations.all()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m4il(YKHO, QePW, tTee, YEnM):\n if QePW.method in w0rQ.SAFE_METHODS:\n return True\n return YEnM.user_profile.id == QePW.user.id",
"def m4il(YKHO, QePW, tTee, YEnM):\n if QePW.method in w0rQ.SAFE_METHODS:\n return True\n return YEnM.id == QePW.user.id",
"def m4il(YKHO, QePW, tTee,... | [
"0.78731155",
"0.76566803",
"0.7574213",
"0.7505925",
"0.74852383",
"0.74852383",
"0.7450351",
"0.7431208",
"0.74274325",
"0.7408801",
"0.7387677",
"0.7382034",
"0.7358666",
"0.7354922",
"0.73333967",
"0.7323322",
"0.7317642",
"0.73099405",
"0.730365",
"0.73019105",
"0.727142... | 0.72223866 | 28 |
Split dataset into train and test sets | def FJfc(__n6, NI2E):
ppBc = __n6.skip(NI2E).shuffle(MKWZ)
ppBc = ppBc.padded_batch(Pp2K)
Zwka = __n6.take(NI2E)
Zwka = Zwka.padded_batch(Pp2K)
return (ppBc, Zwka) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F_Ph(YKHO):\n YKHO.train, YKHO.valid, bGrB, bGrB = bHtP(YKHO.data, YKHO.data, test_size=0.2)\n YKHO.valid, YKHO.test, bGrB, bGrB = bHtP(YKHO.valid, YKHO.valid, test_size=0.5)",
"def cTf9(onqj):\n XxFT, t4zr = bHtP(onqj, test_size=0.2, random_state=42)\n return (XxFT, t4zr)",
"def FJfc(YKHO, NI2... | [
"0.8617501",
"0.8584065",
"0.82917434",
"0.81249624",
"0.8105712",
"0.8009486",
"0.7884736",
"0.7842689",
"0.783094",
"0.78279555",
"0.7802652",
"0.7779635",
"0.77695936",
"0.7769015",
"0.77501905",
"0.7722257",
"0.771371",
"0.7698815",
"0.7692052",
"0.7691124",
"0.7685488",
... | 0.7879296 | 7 |
Overwrites the nil_slot (first row) of the input Tensor with zeros. The nil_slot is a dummy slot and should not be trained and influence the training algorithm. | def DLEy(a1PO, mWFP=None):
with ZylS.name_scope(mWFP, 'zero_nil_slot', [a1PO]) as mWFP:
a1PO = ZylS.convert_to_tensor(a1PO, name='t')
KCHu = ZylS.shape(a1PO)[1]
epBp = ZylS.zeros(ZylS.stack([1, KCHu]))
return ZylS.concat(axis=0, values=[epBp, ZylS.slice(a1PO, [1, 0], [-1, -1])], name... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DLEy(a1PO, mWFP=None):\n with ZylS.name_scope(mWFP, 'zero_nil_slot', [a1PO]) as mWFP:\n a1PO = ZylS.convert_to_tensor(a1PO, name='t')\n KCHu = ZylS.shape(a1PO)[1]\n epBp = ZylS.zeros(ZylS.pack([1, KCHu]))\n return ZylS.concat(0, [epBp, ZylS.slice(a1PO, [1, 0], [-1, -1])], name=mW... | [
"0.78309005",
"0.7585748",
"0.74005955",
"0.65641546",
"0.6203455",
"0.6191431",
"0.6104243",
"0.60961765",
"0.60934246",
"0.6091892",
"0.602161",
"0.5920386",
"0.5919561",
"0.5905201",
"0.5901274",
"0.58469564",
"0.58254486",
"0.58201325",
"0.5778825",
"0.57560945",
"0.57375... | 0.77145684 | 1 |
Predicts answers as onehot encoding. | def YEmv(YKHO, cepN, l633):
kdJa = {YKHO._stories: cepN, YKHO._queries: l633}
return YKHO._sess.run(YKHO.predict_op, feed_dict=kdJa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vzTG(Crrw, jTqs=10):\n svPB = Crrw.shape[0]\n ERVO = oyIN.zeros((svPB, jTqs))\n ERVO[oyIN.arange(svPB), Crrw[oyIN.arange(svPB)]] = 1\n return ERVO",
"def vzTG(nPrm):\n MnDN = nu0g()\n LVAh = MnDN.fit_transform(nPrm)\n return LVAh",
"def KLLm(Crrw, KndY=None):\n return nMvt.utils.to_... | [
"0.73097706",
"0.72380114",
"0.7203448",
"0.7167696",
"0.71570367",
"0.71362305",
"0.7084296",
"0.7066906",
"0.7024248",
"0.7024248",
"0.6995486",
"0.69870776",
"0.69763374",
"0.69596153",
"0.6957978",
"0.69162124",
"0.6912667",
"0.68752885",
"0.6870979",
"0.6868211",
"0.6863... | 0.0 | -1 |
Initialize name and age attributes. | def FIMM(YKHO, mWFP, ZJe_):
YKHO.name = mWFP
YKHO.age = ZJe_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, mWFP, ZJe_):\n YKHO.name = mWFP\n YKHO.age = ZJe_",
"def FIMM(YKHO, mWFP, ZJe_):\n YKHO.name = mWFP\n YKHO.age = ZJe_",
"def FIMM(YKHO, mWFP, ZJe_):\n YKHO.name = mWFP\n YKHO.age = ZJe_",
"def FIMM(YKHO, c9ua, zp3f, ZJe_):\n YKHO.first_name = c9ua\n YKHO.last_name = zp3... | [
"0.77159995",
"0.77159995",
"0.77159995",
"0.7641757",
"0.7606769",
"0.7606769",
"0.7606769",
"0.7606769",
"0.7606769",
"0.7606769",
"0.7606769",
"0.7606769",
"0.7504553",
"0.7349212",
"0.724779",
"0.72424275",
"0.71994966",
"0.7137731",
"0.69129884",
"0.6792457",
"0.67457414... | 0.7506191 | 14 |
Builds the dataloader based on input params. Returns a tuple (train_dl, validation_dl). | def Cc7Y(YKHO, dt0H: bool, H_so: int, RGnv=0.0):
if RGnv < 0 or RGnv > 1:
raise ValueError('validation_ratio must be in [0,1] interval')
if dt0H:
YKHO.data_folder = Hy7s.path.join(YKHO.data_folder, 'train')
else:
YKHO.data_folder = Hy7s.path.join(YKHO.data_folder, 'test')
RGn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JyoU(YKHO):\n ppBc = YKHO.data.get_train_data()\n if YKHO.args.use_dev:\n ppBc, sujI = YKHO.data.split_data(ppBc)\n Zwka = YKHO.data.get_test_data()\n EPL3 = YKHO.loader.build_dataset(ppBc, YKHO.args.train_max_seq_len)\n Pa1c = YKHO.loader.build_dataloader(EPL3, 'train')\n qby3 = YKHO.... | [
"0.7604848",
"0.7502306",
"0.7385591",
"0.7344805",
"0.7296502",
"0.7248106",
"0.7211502",
"0.70992357",
"0.7090084",
"0.69722074",
"0.69659674",
"0.6941678",
"0.69137573",
"0.68905264",
"0.6865357",
"0.68648815",
"0.6864441",
"0.6818865",
"0.67762184",
"0.6744316",
"0.673761... | 0.6697478 | 21 |
Whether the origin is inside the hull formed by the points. If not, they must all be on one hemisphere. We do not try to construct a reference frame based on the locations of such a problematic distribution of points. | def bIrM(LTIa):
b7Ss = Zxt2.spatial.Delaunay(LTIa.T)
return XTiz.all(b7Ss.find_simplex(hLRM().T) >= 0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EDs6(YKHO, LTIa):\n LTIa = oyIN.atleast_2d(LTIa) - YKHO.centroid\n return oyIN.logical_and(oyIN.linalg.norm(LTIa, axis=-1) <= YKHO.radius, oyIN.isclose(LTIa[:, 2], 0))",
"def jmow(LTIa, XP5J):\n from scipy.spatial import ConvexHull\n b7Ss = ConvexHull(LTIa)\n LdiU = oyIN.append(LTIa, XP5J, axi... | [
"0.6979389",
"0.6672889",
"0.65810275",
"0.6550029",
"0.6505384",
"0.64974886",
"0.6457747",
"0.6413353",
"0.63747317",
"0.6372016",
"0.631495",
"0.63140607",
"0.62676966",
"0.62370855",
"0.6229541",
"0.6211103",
"0.6172395",
"0.6153061",
"0.6151926",
"0.613876",
"0.61223644"... | 0.7826114 | 0 |
Area of a spherical triangle. | def cGOR(tXIo):
jzdc = T97B(tXIo[0], tXIo[1])
Fg_i = T97B(tXIo[0], tXIo[2])
Z9rn = T97B(tXIo[1], tXIo[2])
assert jzdc >= 0.0
assert Fg_i >= 0.0
assert Z9rn >= 0.0
KCHu = (jzdc + Fg_i + Z9rn) / 2.0
try:
return 4.0 * Za1I(PZyS(Uyfy(KCHu / 2.0) * Uyfy((KCHu - jzdc) / 2.0) * Uyfy((KC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x5JU(yzQ0, MKlR):\n return yzQ0 * MKlR / 2",
"def cGOR(zPAF: number, BsXG: number, t_of: number) -> FGW3:\n KCHu = (zPAF + BsXG + t_of) / 2\n f0tD = PZyS(KCHu * (KCHu - zPAF) * (KCHu - BsXG) * (KCHu - t_of))\n return PZyS(KCHu * (KCHu - zPAF) * (KCHu - BsXG) * (KCHu - t_of))",
"def RcLR(tXIo):\... | [
"0.7483566",
"0.7476309",
"0.7371156",
"0.7358916",
"0.7273443",
"0.72675914",
"0.72439116",
"0.7144872",
"0.71112204",
"0.7095793",
"0.7088404",
"0.7021179",
"0.6968845",
"0.6960981",
"0.69425887",
"0.69096375",
"0.6900818",
"0.6884549",
"0.6831978",
"0.6791188",
"0.67693007... | 0.7407778 | 2 |
The area of the polygon on the surface of the unit sphere formed by points. | def ZrLT(LTIa):
def f0tD(EmSm):
"""
Area of a spherical triangle. Vectorized version of
:func:`triangle_area`.
"""
BA7i = T97B(EmSm, XTiz.roll(EmSm, 1, axis=1))
assert XTiz.all(BA7i >= 0.0)
KCHu = XTiz.sum(BA7i, axis=1) / 2.0
Lx3t = Uyfy(KCHu / 2.0) *... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f0tD(YKHO):\n if len(YKHO.exterior) < 3:\n raise Exception(\"Cannot compute the polygon's area because it contains less than three points.\")\n _g9D = YKHO.to_shapely_polygon()\n return _g9D.area",
"def jFN1(ejx_, fofR):\n f0tD = 0\n r845 = len(ejx_) - 1\n for YRbF in range(len(ejx_)... | [
"0.8161267",
"0.7771358",
"0.7526702",
"0.7516967",
"0.7491069",
"0.74622905",
"0.7385302",
"0.7376176",
"0.7265697",
"0.7249031",
"0.72211623",
"0.7197891",
"0.71893305",
"0.71780336",
"0.7173488",
"0.7169627",
"0.7169627",
"0.71451944",
"0.7136546",
"0.7131657",
"0.71258885... | 0.7618879 | 2 |
Area of a spherical triangle. Vectorized version of | def f0tD(EmSm):
BA7i = T97B(EmSm, XTiz.roll(EmSm, 1, axis=1))
assert XTiz.all(BA7i >= 0.0)
KCHu = XTiz.sum(BA7i, axis=1) / 2.0
Lx3t = Uyfy(KCHu / 2.0) * XTiz.prod(Uyfy((KCHu[:, XTiz.newaxis] - BA7i) / 2.0), axis=1)
try:
return 4.0 * Za1I(PZyS(Lx3t))
except FloatingPointError:
de... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RcLR(tXIo):\n jzdc = oyIN.linalg.norm(tXIo[..., 0, :] - tXIo[..., 1, :])\n Fg_i = oyIN.linalg.norm(tXIo[..., 1, :] - tXIo[..., 2, :])\n Z9rn = oyIN.linalg.norm(tXIo[..., 2, :] - tXIo[..., 0, :])\n KCHu = (jzdc + Fg_i + Z9rn) / 2\n return oyIN.sqrt(KCHu * (KCHu - jzdc) * (KCHu - Fg_i) * (KCHu - Z... | [
"0.7628877",
"0.75684655",
"0.7464666",
"0.743782",
"0.74032724",
"0.7401987",
"0.73759526",
"0.7360038",
"0.7168495",
"0.7142045",
"0.7136769",
"0.70044446",
"0.69161654",
"0.68413365",
"0.68359244",
"0.6826652",
"0.6817193",
"0.6777027",
"0.6753502",
"0.6752417",
"0.67012",... | 0.72108924 | 8 |
Area of an individual triangle. | def DM04(QRFO):
try:
return 4.0 * Za1I(PZyS(QRFO))
except FloatingPointError:
return 0.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x5JU(tXIo):\n return 0.5 * L3jt(En6R(tXIo, False))",
"def x5JU(yzQ0, MKlR):\n return yzQ0 * MKlR / 2",
"def cGOR(P8oC, H2v2):\n f0tD = 1.0 / 2 * P8oC * H2v2\n return f0tD",
"def cGOR(P8oC, H2v2):\n return P8oC * H2v2 / 2",
"def cGOR(tXIo):\n jzdc = T97B(tXIo[0], tXIo[1])\n Fg_i = T... | [
"0.85250574",
"0.8342409",
"0.8313032",
"0.82943344",
"0.81999505",
"0.81915104",
"0.81385595",
"0.8096164",
"0.7912132",
"0.7795598",
"0.77606374",
"0.77399766",
"0.7735665",
"0.7692194",
"0.76676965",
"0.76151216",
"0.7612882",
"0.7588053",
"0.7586277",
"0.753021",
"0.75165... | 0.0 | -1 |
Initialize the weights specific to the BERT Model. This overrides the default initializations depending on the specified arguments. 1. If normal_init_linear_weights is set then weights of linear layer will be initialized using the normal distribution and bais will be set to the specified value. 2. If normal_init_embed_... | def By2C(yR_P):
if isinstance(yR_P, U78l.Linear):
yR_P.weight.data.normal_(mean=0.0, std=0.02)
if yR_P.bias is not None:
yR_P.bias.data.zero_()
if isinstance(yR_P, U78l.Embedding):
yR_P.weight.data.normal_(mean=0.0, std=0.02)
if yR_P.padding_idx is not None:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vB93(YKHO) -> None:\n U78l.init.kaiming_normal_(YKHO._U)\n U78l.init.kaiming_normal_(YKHO._W)\n U78l.init.kaiming_normal_(YKHO._V)\n U78l.init.normal_(YKHO._b)",
"def vTXJ(YKHO):\n for r8hN in YKHO.modules():\n if isinstance(r8hN, U78l.Conv2d):\n U78l.init.kaiming_normal_(r8h... | [
"0.77195024",
"0.76963615",
"0.76581746",
"0.7657839",
"0.7646313",
"0.7646313",
"0.7646313",
"0.7646313",
"0.7566213",
"0.7559697",
"0.75364864",
"0.75344884",
"0.752954",
"0.75010264",
"0.7444066",
"0.7413718",
"0.73886645",
"0.73864084",
"0.7367358",
"0.73563504",
"0.73521... | 0.67990863 | 65 |
Ends the thread associated with this scheduler. All remaining work in the scheduler queue is abandoned. | def duMC(YKHO) -> None:
with YKHO._condition:
if not YKHO._is_disposed:
YKHO._is_disposed = True
YKHO._condition.notify() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JCyR(YKHO) -> None:\n YKHO.event_queue.put(YKHO._SHUTDOWN_SIGNAL)\n YKHO.logger.warning('Stopping Scheduler.')\n if YKHO.executor:\n YKHO.executor.join(YKHO.timeout_interval.total_seconds())\n if YKHO.is_running:\n YKHO.logger.error(f'Timeout exceeded while attempting to close for {YK... | [
"0.72263944",
"0.7073435",
"0.6956972",
"0.6787734",
"0.67304295",
"0.6700066",
"0.6698206",
"0.6675045",
"0.66703165",
"0.66703165",
"0.6662836",
"0.66594595",
"0.66327274",
"0.6621435",
"0.661491",
"0.6613179",
"0.6612532",
"0.6607717",
"0.6599196",
"0.655751",
"0.655358",
... | 0.0 | -1 |
Create and return a `User` with an email, username and password. | def lYUQ(YKHO, jTXt=None, **nPrm):
CBIr = YKHO.model(**nPrm)
CBIr.set_password(jTXt)
CBIr.is_active = False
CBIr.save()
return CBIr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj=None, jTXt=None, **wdCM):\n if not D3lj:\n raise ValueError('The given email must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, username=D3lj, **wdCM)\n CBIr.set_password(jTXt)\n CBIr.save(using=YKHO._db)\n return CBIr",
"def lYUQ(YKHO, ... | [
"0.8711828",
"0.86917835",
"0.8683678",
"0.86736417",
"0.86486745",
"0.86486745",
"0.8618047",
"0.8614819",
"0.86066765",
"0.8605765",
"0.8605765",
"0.8605765",
"0.8605765",
"0.8605765",
"0.8605765",
"0.8605765",
"0.8605765",
"0.85976475",
"0.8597028",
"0.8596434",
"0.8593557... | 0.0 | -1 |
Create and return a `User` with superuser powers. Superuser powers means that this use is an admin that can do anything they want. | def Zp54(YKHO, NtEF, D3lj, jTXt):
if jTXt is None:
raise TypeError('Superusers must have a password.')
RE5S = YKHO.create_id_number()
CBIr = YKHO.create_user(username=NtEF, email=D3lj, password=jTXt, id_number=RE5S)
CBIr.is_superuser = True
CBIr.is_active = True
CBIr.is_staff = True
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RKcK(YKHO, *qIxc, **B2fa):\n z39Z = YKHO.create_user(*qIxc, **B2fa)\n z39Z.make_administrator()\n return z39Z",
"def Zp54(YKHO, NtEF, IJ4N, jTXt):\n CBIr = YKHO.create_user(NtEF, IJ4N, password=jTXt)\n CBIr.is_admin = True\n CBIr.save(using=YKHO._db)\n return CBIr",
"def Zp54(YKHO, D3l... | [
"0.74250114",
"0.73518306",
"0.7330265",
"0.73248947",
"0.73197466",
"0.7267141",
"0.7265804",
"0.7260273",
"0.72446865",
"0.72152406",
"0.7190953",
"0.7179229",
"0.7175211",
"0.7161783",
"0.714761",
"0.71412617",
"0.71252704",
"0.7116206",
"0.71146005",
"0.71044284",
"0.7102... | 0.6789379 | 85 |
Sends a message via slack. | def WdaX(YKHO, Ol8d: str):
YKHO.client.chat_postMessage(channel=f'@{YKHO.username}', text=Ol8d) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sczE(YKHO, Ol8d):\n YKHO.slack_client.api_call('chat.postMessage', channel=YKHO.slack_channel, text=Ol8d, username=YKHO.username, icon_emoji=YKHO.slack_icon_emoji)\n print('Slack Notification sent')",
"def WdaX(YwkQ, Ol8d):\n jjOm = bxbw()\n jjOm.chat_postMessage(channel=YwkQ, text=Ol8d, as_user=... | [
"0.8438318",
"0.7846754",
"0.77701837",
"0.75128984",
"0.74844927",
"0.7431097",
"0.7362141",
"0.73283106",
"0.7324978",
"0.72902596",
"0.72473115",
"0.7111263",
"0.7081036",
"0.7074857",
"0.7055605",
"0.7039744",
"0.70205283",
"0.6989841",
"0.6951224",
"0.69435513",
"0.69279... | 0.66010004 | 37 |
Output the vocabulary to json file. | def EtvL():
xYPl = _8D_()
LTeK = cUwf()
MEAL = x83d()
f1L0 = xYPl + LTeK + MEAL
wM3v = open(MOa8, 'w')
wM3v.write(qQXR.dumps(f1L0, encoding='utf-8', ensure_ascii=False, indent=4, sort_keys=True))
wM3v.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _oce(CtWL: Mapping, pmON: str):\n with open(pmON, 'w') as yvT9:\n qQXR.dump(CtWL, yvT9, indent=4, ensure_ascii=False)\n bo34.info('Vocabulary saved to \"%s\"', pmON)",
"def fStE():\n with open('../data/vocabulary.txt', 'w') as Axm9:\n ED_H = fE2r()\n t7hl = sum(ED_H.values()... | [
"0.74042374",
"0.73631066",
"0.7020417",
"0.68447953",
"0.66741705",
"0.66688913",
"0.65687704",
"0.6564157",
"0.6543154",
"0.64661026",
"0.63839054",
"0.63608855",
"0.63242173",
"0.62929857",
"0.61782324",
"0.61731356",
"0.61550665",
"0.60923743",
"0.6078099",
"0.6073033",
"... | 0.6537376 | 9 |
Configures the learning rate. | def PDzs(_lQg, Aak1):
z4eA = int(_lQg / vPBo.batch_size * vPBo.num_epochs_per_decay)
if vPBo.sync_replicas:
z4eA /= vPBo.replicas_to_aggregate
if vPBo.learning_rate_decay_type == 'exponential':
return ZylS.train.exponential_decay(vPBo.learning_rate, Aak1, z4eA, vPBo.learning_rate_decay_facto... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kVtO(YKHO, mVUw):\n YKHO.SGD.set_learning_rate(mVUw)",
"def NcuP(YKHO):\n b0Ix = YKHO.params.base_lr * (1 - float(YKHO.epoch) / YKHO.params.num_epoch) ** YKHO.params.power\n for Lwm5 in YKHO.opt.param_groups:\n Lwm5['lr'] = b0Ix\n print('Change learning rate into %f' % b0Ix)\n YKHO.summ... | [
"0.78593874",
"0.75907296",
"0.742758",
"0.7406107",
"0.739691",
"0.7320627",
"0.7320627",
"0.72974896",
"0.7253351",
"0.7229305",
"0.721023",
"0.72072744",
"0.71990186",
"0.71936136",
"0.7180078",
"0.7170698",
"0.7169669",
"0.7165654",
"0.71405464",
"0.71101654",
"0.71101654... | 0.0 | -1 |
Returns a string usable for lambdifying. | def RtaA(VN2L, **gCuF):
return RM_o(gCuF).doprint(VN2L) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n ZWCE = [YKHO.name]\n ZWCE += [zimS(SZFh) for SZFh in YKHO.transforms]\n return ' | '.join(ZWCE) + f' -> {YKHO.shape} {YKHO.dtype}'",
"def lsX7(YKHO):\n Aofo = u'{}({}'.format(YKHO.function.lower(), YKHO.metric_name)\n if YKHO.dimensions_str:\n Aofo += u'{{{}}}'.format(YKHO... | [
"0.595262",
"0.5826555",
"0.57832825",
"0.57720155",
"0.56565857",
"0.56236696",
"0.5618103",
"0.5592923",
"0.5571303",
"0.55488133",
"0.5536845",
"0.55026376",
"0.5499025",
"0.5492451",
"0.5413251",
"0.5371463",
"0.5345338",
"0.533052",
"0.5319168",
"0.53166324",
"0.52988034... | 0.6419241 | 0 |
Returns a list of variabels to restore for the specified list method. It is supposed that variable name starts with the method's scope (a prefix returned by _method_scope function.) | def D7T3(rrBf=None, IpKS=False):
if rrBf:
mlxI = {}
mK7E = Fz20.get_variables_to_restore(include=[rrBf])
for SRYB in mK7E:
if IpKS:
XuY2 = SRYB.op.name[len(rrBf) + 1:]
else:
XuY2 = SRYB.op.name
mlxI[XuY2] = SRYB
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lSnF(YKHO):\n return [YKHO.item]",
"def lSnF(YKHO):\n return []",
"def hjmx():\n d9X6 = ['DeInceptionV4']\n yUkU = [rrBf.strip() for rrBf in d9X6]\n mK7E = []\n for SRYB in Fz20.get_model_variables():\n em9o = False\n for mlB2 in yUkU:\n if SRYB.op.name.startswith... | [
"0.60258776",
"0.6006314",
"0.59230494",
"0.5592203",
"0.5555549",
"0.55382496",
"0.55180925",
"0.5517383",
"0.5485563",
"0.5485563",
"0.5485563",
"0.5480257",
"0.5478412",
"0.5476064",
"0.54620343",
"0.54337436",
"0.5365489",
"0.5339208",
"0.5336621",
"0.5335185",
"0.5325799... | 0.6136607 | 0 |
Return if pairs are equal. >>> Pair('A', 'B') == Pair('B', 'A') True >>> Pair('A', 'B') == Pair('A', 'A') False | def xa14(YKHO, Elif: 'Pair') -> bool:
return YKHO.names == Elif.names | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IzcV(YKHO, KoVV: 'CodonPair') -> bool:\n return YKHO.sequence == KoVV.sequence",
"def xa14(YKHO, Elif: 'PairwiseInfo') -> bool:\n return YKHO.their_did == Elif.their_did and YKHO.their_verkey == Elif.their_verkey and (YKHO.my_did == Elif.my_did) and (YKHO.my_verkey == Elif.my_verkey) and (YKHO.metadata... | [
"0.7250911",
"0.69399416",
"0.6566681",
"0.6540947",
"0.6491572",
"0.64901346",
"0.648855",
"0.6461358",
"0.6317612",
"0.63122255",
"0.6292389",
"0.6234777",
"0.62025297",
"0.61583334",
"0.6155708",
"0.61519843",
"0.61383545",
"0.61297846",
"0.6116349",
"0.6087816",
"0.607251... | 0.75284827 | 0 |
Return if a current pair is before other pair. >>> Pair('A', 'B') >> Pair('B', 'B') < Pair('A', 'C') False | def JWbp(YKHO, Elif: 'Pair') -> bool:
return YKHO.names < Elif.names | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JWbp(YKHO, PVCF):\n return YKHO.value < PVCF.value",
"def JWbp(YKHO, Elif):\n return YKHO.__le__(Elif) and YKHO.__ne__(Elif)",
"def D5g7(YKHO, WKvO, LVAh):\n return YKHO.le(WKvO, LVAh) and WKvO != LVAh",
"def JWbp(YKHO, Elif):\n LceK = sorted(list([YKHO.start, YKHO.end]))\n Nec0 = sorted(l... | [
"0.63696724",
"0.6363717",
"0.6354985",
"0.633129",
"0.63007474",
"0.6297404",
"0.62679976",
"0.62563485",
"0.62158",
"0.61886114",
"0.6167188",
"0.6164004",
"0.61614245",
"0.6158149",
"0.6157265",
"0.6147101",
"0.61470485",
"0.61470485",
"0.6146412",
"0.61447775",
"0.6129172... | 0.7353058 | 0 |
Return the literal of a pair. >>> repr(Pair('A', 'B')) "Pair('A', 'B')" | def wHJl(YKHO) -> str:
return 'Pair({!r}, {!r})'.format(*YKHO.names) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wR3N(q2Xo):\n bo34.info('format pair...')\n _hTO = q2Xo[0] + ', ' + q2Xo[1] + '\\n'\n bo34.debug('formatted_pair: ' + _hTO)\n return _hTO",
"def ZsIw(_Ntf):\n sZqf, GIN8 = _Ntf\n return '{letter}: {word}'.format(letter=sZqf, word=GIN8)",
"def S4k2(YKHO):\n OuqX = 'pair_coeff {} {} {:6.... | [
"0.63724804",
"0.62095463",
"0.58915025",
"0.5874253",
"0.57802963",
"0.56206805",
"0.56206805",
"0.5592388",
"0.55742466",
"0.55693716",
"0.55169034",
"0.55080456",
"0.5485911",
"0.5480038",
"0.5469646",
"0.5444116",
"0.5442278",
"0.54416555",
"0.5436006",
"0.5420553",
"0.54... | 0.7832186 | 0 |
Get WebDriver Instance based on the browser configuration | def A8YG(YKHO):
if YKHO.device == 'ios_mobile':
YKHO.driver = JA_f.Remote('http://localhost:4723/wd/hub', YKHO.capabilities)
YKHO.driver.implicitly_wait(10)
else:
print('Hello')
YKHO.driver = JA_f.Remote('http://localhost:4723/wd/hub', YKHO.capabilities)
YKHO.driver.impli... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DzFt():\n return ynfG._current_browser()",
"def iSDi(dXQ0: DriverInfo) -> cSpz:\n if dXQ0.get_driver_type() == 'chrome':\n xAU6 = cSpz.ChromeOptions()\n xAU6.add_argument('--start-maximized')\n return cSpz.Chrome(executable_path=Hy7s.path.join(dXQ0.get_driver_path(), 'chromedriver'... | [
"0.80602616",
"0.77521074",
"0.76748437",
"0.75982445",
"0.7462003",
"0.71285415",
"0.7035448",
"0.6954848",
"0.6950162",
"0.68926364",
"0.68895584",
"0.68115294",
"0.6806767",
"0.67666084",
"0.67464846",
"0.6675362",
"0.6666601",
"0.6663796",
"0.665917",
"0.6624525",
"0.6597... | 0.712765 | 6 |
Returns the number of seconds from the epoch to date. | def IMJE(_c1T):
g75m = _c1T - qtWj
return g75m.days * 86400 + g75m.seconds + float(g75m.microseconds) / 1000000 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IMJE(_c1T):\n g75m = _c1T - qtWj\n return g75m.days * 86400 + g75m.seconds + float(g75m.microseconds) / 1000000",
"def SWek(ppPa, qtWj=None):\n return ccOx(ppPa) / 10.0 ** 6",
"def mqoM():\n wzkt = qcWV.datetime.utcnow()\n qtWj = qcWV.datetime(1970, 1, 1)\n return (wzkt - qtWj).total_seco... | [
"0.83518755",
"0.80817693",
"0.7497906",
"0.70659727",
"0.6931502",
"0.6926723",
"0.68587184",
"0.68165326",
"0.68096346",
"0.6807531",
"0.6745652",
"0.6745652",
"0.67439824",
"0.67392236",
"0.66537803",
"0.6598786",
"0.653397",
"0.65287244",
"0.6505542",
"0.6488842",
"0.6436... | 0.8317224 | 2 |
splits a list into a list of smaller lists | def OBJS(list, zNig):
for YRbF in range(0, len(list), zNig):
yield list[YRbF:YRbF + zNig] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nJNG(Zuws, u99p):\n UUD3 = len(Zuws) / u99p\n hlel = []\n mrj1 = []\n ewCu = 0\n for HZUM in Zuws:\n ewCu += 1\n mrj1.append(HZUM)\n if ewCu >= UUD3:\n hlel.append(mrj1)\n ewCu = 0\n mrj1 = []\n if len(mrj1) > 0:\n hlel.append(mrj1)... | [
"0.7650407",
"0.76430386",
"0.751456",
"0.7372963",
"0.7360637",
"0.73501885",
"0.7316249",
"0.72931767",
"0.7151028",
"0.7146376",
"0.7102827",
"0.70866424",
"0.707408",
"0.7016894",
"0.70077163",
"0.6992714",
"0.69837546",
"0.69662946",
"0.69186676",
"0.6883406",
"0.6874468... | 0.6510708 | 49 |
Loop through the board and find position where there is empty square (0 = empty) and return position | def NEYy(iBIi):
for YRbF in range(len(iBIi)):
for r845 in range(len(iBIi[0])):
if iBIi[YRbF][r845] == 0:
return (YRbF, r845)
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AbU4(YKHO):\n NwL4 = len(YKHO.board)\n ulBT = len(YKHO.board[0])\n for YRbF in range(NwL4):\n for r845 in range(ulBT):\n if YKHO.board[YRbF][r845] == 0:\n return (YRbF, r845)",
"def VoH6(Cs6h):\n for WKvO in range(len(Cs6h.board)):\n for LVAh in range(len(C... | [
"0.82490176",
"0.79800963",
"0.7958425",
"0.78399754",
"0.78382415",
"0.7802007",
"0.7783275",
"0.76683545",
"0.7661243",
"0.758047",
"0.7540548",
"0.74784946",
"0.7398503",
"0.7355691",
"0.73444676",
"0.7339144",
"0.7170152",
"0.7149667",
"0.7123986",
"0.7098115",
"0.7083824... | 0.8234963 | 1 |
From pkl to Pytorch Geometric data object. Apply to both train/test. | def yLtf(PBJw, UXqs, mvm2, wwZP, nzCC=False, SmC1=None, fNq6=None, mrbZ=None, ANE7=None, vqlv=False, tYiq=8, kJiB=8, acCR=0.2, hr1G=0.4, PJWX=True):
seWJ = Hy7s.path.split(PBJw)[0]
with open(PBJw, 'rb') as eHNT:
d0Ns = t2lc.load(eHNT)
eHNT.close()
if SmC1 is None and fNq6 is None and (not nz... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nahs(YKHO):\n upAT = '{}/data/mini-imagenet-cache-{}.pkl'.format(YKHO.root_dir, YKHO.split)\n print('Loading pkl dataset: {} '.format(upAT))\n try:\n with open(upAT, 'rb') as eHNT:\n nPrm = LK4N.load(eHNT, encoding='bytes')\n UiEM = nPrm[b'image_data']\n vFN5 = ... | [
"0.57522",
"0.56354976",
"0.5600668",
"0.5519163",
"0.54569966",
"0.5378434",
"0.53473073",
"0.5345796",
"0.5262078",
"0.5237828",
"0.5207238",
"0.5172002",
"0.5168588",
"0.51627046",
"0.5157687",
"0.5148591",
"0.5078726",
"0.5068341",
"0.50632584",
"0.5057885",
"0.5033007",
... | 0.5128631 | 16 |
Splits a sequence into n, rest parts. | def Ltx0(exwG, Q6uT):
WhY1 = iter(Q6uT)
for bGrB in range(exwG - 1):
yield next(WhY1, None)
yield tuple(WhY1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z0az(Q6uT, exwG):\n while Q6uT:\n yield Q6uT[:exwG]\n Q6uT = Q6uT[exwG:]",
"def Z0az(Q6uT, exwG):\n while Q6uT:\n yield Q6uT[:exwG]\n Q6uT = Q6uT[exwG:]",
"def lpha(YKHO, exwG: Optional[int]=None) -> x1iM['Sequence']:\n if exwG is None:\n exwG = YKHO._size\n m... | [
"0.8332672",
"0.8214511",
"0.77115256",
"0.76877445",
"0.7528274",
"0.7262953",
"0.72250265",
"0.71357185",
"0.7105642",
"0.7104745",
"0.7104008",
"0.70958114",
"0.7084247",
"0.70595324",
"0.7048371",
"0.7037082",
"0.6997547",
"0.69730604",
"0.6964928",
"0.69627583",
"0.69528... | 0.0 | -1 |
Iterates over a sequence, splitting each item into n, rest parts. | def zX5F(exwG, Q6uT):
for RkSo in Q6uT:
yield tuple(Ltx0(exwG, RkSo)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z0az(Q6uT, exwG):\n while Q6uT:\n yield Q6uT[:exwG]\n Q6uT = Q6uT[exwG:]",
"def Z0az(Q6uT, exwG):\n while Q6uT:\n yield Q6uT[:exwG]\n Q6uT = Q6uT[exwG:]",
"def eHxA(Q6uT: Sequence[T], exwG: int) -> bDy6[bdIy[Kt_s]]:\n for YRbF in range(0, len(Q6uT), exwG):\n yiel... | [
"0.8275109",
"0.82731783",
"0.7613014",
"0.7569458",
"0.7540378",
"0.7495592",
"0.7417853",
"0.74165726",
"0.7384573",
"0.72644836",
"0.7263949",
"0.7259646",
"0.7255896",
"0.72489077",
"0.7246913",
"0.7246913",
"0.7245492",
"0.72364527",
"0.72245836",
"0.7189775",
"0.7187282... | 0.0 | -1 |
Splits a line of text by whitespace | def ns_z(zFiD):
KpBT = False
eOtH = ''
cXkO = 0
for YRbF, hcXw in enumerate(zFiD):
if hcXw == ' ':
if len(eOtH) > 0:
yield (cXkO, eOtH)
eOtH = ''
else:
if len(eOtH) == 0:
cXkO = YRbF
eOtH += hcXw
if l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Do7B(l5Ny):\n H4yH = l5Ny.split(' ')\n try:\n jzdc = H4yH[0]\n Fg_i = ' '.join(H4yH[1:])\n except:\n jzdc = l5Ny\n Fg_i = ''\n return (jzdc, Fg_i)",
"def v9Ur(YKHO, zFiD):\n return zFiD.split('\\t')",
"def eHxA(l5Ny):\n Nqlg = []\n for zFiD in l5Ny.splitline... | [
"0.7274361",
"0.7108683",
"0.6893651",
"0.6875034",
"0.6712784",
"0.6697598",
"0.6690229",
"0.6689724",
"0.66789424",
"0.6631158",
"0.6603243",
"0.65912807",
"0.6575334",
"0.65586406",
"0.65450513",
"0.65450513",
"0.65450513",
"0.6508846",
"0.6502125",
"0.64980966",
"0.642758... | 0.6802766 | 4 |
Tests the case that we have multiple space as sparator between our domain end its prefix. | def cMrM(YKHO):
for zrIJ in YKHO.domains:
aEqx = zrIJ
nPrm = f'0.0.0.0 {zrIJ}'
n5sN = fnT7(nPrm).get_converted()
YKHO.assertEqual(aEqx, n5sN)
for zrIJ in YKHO.domains:
aEqx = zrIJ
nPrm = f'127.0.0.1 {zrIJ}'
n5sN = fnT7(nPrm).g... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UB3o(YKHO):\n YKHO.assertEqual(['http://tomtom.foobar.org/'], UIV2(' http://tomtom.foobar.org/', YKHO.needScheme))\n YKHO.assertEqual(['http://www.foobi.org/saatoimia'], UIV2(' http://www.foobi.org/saatoimia', YKHO.needScheme))",
"def _S6O(YKHO):\n YKHO.assertEqual(['http://tomtom.foobar.org/']... | [
"0.6160518",
"0.6118312",
"0.60383373",
"0.5934921",
"0.59026897",
"0.5889135",
"0.5877281",
"0.58551514",
"0.5844301",
"0.58125246",
"0.5741223",
"0.5693972",
"0.56578445",
"0.5644912",
"0.5638032",
"0.561847",
"0.56051934",
"0.559284",
"0.55835885",
"0.5526262",
"0.5518055"... | 0.6070626 | 2 |
Return batch_dir & project_dir, which must be the same for all rows. | def a5rd(T8uQ):
fPRT = set((Mkmy.batch for Mkmy in T8uQ))
jLlw = set((Mkmy.hgsc_xfer_subdir for Mkmy in T8uQ))
assert len(fPRT) == 1, 'batch must be the same for all BAMs in worklist'
assert len(jLlw) == 1, 'hgsc_xfer_subdir must be the same for all BAMs in worklist'
lQ2J = list(fPRT)[0]
I7OS = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GOQM(YKHO):\n return Hy7s.path.expanduser(YKHO.sqlfluff_config.get_section((YKHO.templater_selector, YKHO.name, 'project_dir')) or Hy7s.getcwd())",
"def NE_9(YKHO):\n return YKHO.batch_subjects",
"def V83M(AGPF):\n jJWy = []\n for pmON in GkAb(AGPF).rglob('datacube-definition.prj'):\n jJ... | [
"0.6306784",
"0.6090127",
"0.56369096",
"0.5613657",
"0.5565796",
"0.5543564",
"0.5527856",
"0.5489418",
"0.5488515",
"0.5447049",
"0.5419612",
"0.5388157",
"0.5352392",
"0.5341177",
"0.5279018",
"0.5260714",
"0.523097",
"0.5213747",
"0.5176594",
"0.5175597",
"0.5171077",
"... | 0.624977 | 1 |
For each deployed package service, collect its local variables (e.g. network addresses) and Chef attributes. Return it all as a flat dictionary. | def IfZi(TifC):
Ty9i = {}
for ga2c in TifC.deployedpackageservice_set.all():
if ga2c.address:
for Zxma in qQXR.loads(ga2c.address):
for U78l in Zxma:
for jzdc in Zxma[U78l]:
if ':' in jzdc:
xjnC = 'ipv6'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EJht(YKHO, hxGQ):\n U5bT = {}\n oKv6 = {}\n for B5hb, kgDL in YKHO._sorted_data:\n for mWFP, BWXx in kgDL.items():\n if B5hb is None:\n if isinstance(BWXx, list):\n oKv6[mWFP] = BWXx\n else:\n U5bT[mWFP] = BWXx\n ... | [
"0.63497144",
"0.6161984",
"0.5963506",
"0.58469063",
"0.5801466",
"0.5736059",
"0.5721944",
"0.57171506",
"0.5698449",
"0.5690832",
"0.5675632",
"0.561076",
"0.55895954",
"0.55868036",
"0.55722237",
"0.55650455",
"0.5563132",
"0.55273116",
"0.5524288",
"0.5512308",
"0.550187... | 0.73809713 | 0 |
Clean up path remove repeated and trailing separators. | def eARt(YKHO, pmON):
wG94 = YKHO.remotepathsep * 2
while wG94 in pmON:
pmON = pmON.replace(wG94, YKHO.remotepathsep)
if pmON.endswith(YKHO.remotepathsep):
pmON = pmON[:-1]
return pmON | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KN0L(pmON):\n return vIwR.join(filter(None, vIwR.split(pmON, '/')), '/')",
"def NLPj(pmON):\n if pmON.endswith('/'):\n pmON = pmON[:-1]\n return pmON",
"def AWVE(pmON: str) -> str:\n eYPF = ''\n t1Qn = pmON\n while t1Qn != eYPF:\n eYPF = t1Qn\n t1Qn = cGF1(pmON, t1Qn.... | [
"0.7981345",
"0.7315837",
"0.730054",
"0.7190368",
"0.71864",
"0.71373034",
"0.70536107",
"0.7036191",
"0.703579",
"0.6994601",
"0.6941104",
"0.6900043",
"0.68013865",
"0.67445815",
"0.67303747",
"0.6725442",
"0.66509145",
"0.661992",
"0.6524637",
"0.65012586",
"0.64987904",
... | 0.76014835 | 1 |
The name of the account. | def n8Ek(YKHO) -> qe4Y.Input[str]:
return qe4Y.get(YKHO, 'account_name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n8Ek(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_name')",
"def n8Ek(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_name')",
"def n8Ek(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'account_name')",
"def n8Ek(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'account_name')"... | [
"0.93672127",
"0.93672127",
"0.8380181",
"0.8380181",
"0.8209886",
"0.7942903",
"0.7942903",
"0.77882177",
"0.7780345",
"0.77758217",
"0.77013725",
"0.76193964",
"0.74234724",
"0.74198335",
"0.7294379",
"0.71565515",
"0.715423",
"0.7146116",
"0.7146116",
"0.7138259",
"0.71382... | 0.8561575 | 4 |
The resource group name. | def TRLE(YKHO) -> qe4Y.Input[str]:
return qe4Y.get(YKHO, 'resource_group_name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TRLE(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_group_name')",
"def TRLE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'resource_group_name')",
"def TRLE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'resource_group_name')",
"def TRLE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.ge... | [
"0.9029376",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8728543",
"0.8571382",
"0.8531195",
"0.84228975",
"0.8322666",
"0.82459366",
"0.82459366",
"0.82459366",
"0.82459366"... | 0.83838797 | 47 |
The event hub type. | def zpfX(YKHO) -> h8nf[qe4Y.Input[uLKX[str, 'EventHubType']]]:
return qe4Y.get(YKHO, 'event_hub_type') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zpfX(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'event_hub_type')",
"def FRul(YKHO):\n return YKHO.event_type",
"def type(YKHO) -> str:\n return YKHO._event.get('type')",
"def hEKL(YKHO) -> int:\n return YKHO.data['args']['eventType']",
"def aihU(tvqc):\n return tvqc.type()... | [
"0.8826724",
"0.78366536",
"0.77429354",
"0.7308451",
"0.70576334",
"0.70576334",
"0.69872296",
"0.6939999",
"0.69243646",
"0.6844996",
"0.6731586",
"0.6699463",
"0.66621345",
"0.6596711",
"0.6580311",
"0.65459967",
"0.6535486",
"0.65285516",
"0.65057313",
"0.650167",
"0.6491... | 0.8569165 | 1 |
The kafka configuration name. | def hhVO(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'kafka_configuration_name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO._config_name",
"def Ks8p(YKHO):\n pass",
"def mWFP(YKHO):\n return YKHO._config.get(BiEj)",
"def Ejoh(YKHO):\n pass",
"def mWFP(YKHO) -> str:\n mWFP = YKHO._config['name']\n assert isinstance(mWFP, str)\n return mWFP",
"def mWFP(YKHO):\n return YKHO.c... | [
"0.7919919",
"0.7714666",
"0.76922506",
"0.73530555",
"0.72745216",
"0.7196145",
"0.7175958",
"0.7033129",
"0.6942212",
"0.6897144",
"0.6859585",
"0.68502206",
"0.6828225",
"0.67710125",
"0.67710125",
"0.6764214",
"0.6727961",
"0.66964835",
"0.6688361",
"0.6686322",
"0.667769... | 0.8920289 | 0 |
Get an existing KafkaConfiguration resource's state with the given name, id, and optional extra properties used to qualify the lookup. | def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None) -> 'KafkaConfiguration':
VKhi = qe4Y.ResourceOptions.merge(VKhi, qe4Y.ResourceOptions(id=id))
r6DL = sVGl.__new__(sVGl)
r6DL.__dict__['consumer_group'] = None
r6DL.__dict__['credentials'] = None
r6DL.__dict__['ev... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None, CLEu: Optional[pulumi.Input[str]]=None, Rpsx: Optional[pulumi.Input[str]]=None, JBZA: Optional[pulumi.Input[str]]=None, TDPX: Optional[pulumi.Input[str]]=None, LFGZ: Optional[pulumi.Input[bool]]=None, e3j0: Optional[pulumi.Inpu... | [
"0.571254",
"0.56839645",
"0.5649045",
"0.5545997",
"0.5395561",
"0.53015316",
"0.5293933",
"0.5233086",
"0.5203887",
"0.5176693",
"0.51328343",
"0.51226187",
"0.5111622",
"0.50390947",
"0.50277454",
"0.5009167",
"0.5006863",
"0.49989566",
"0.498836",
"0.4985318",
"0.49810046... | 0.6991278 | 0 |
The event hub type. | def zpfX(YKHO) -> qe4Y.Output[h8nf[str]]:
return qe4Y.get(YKHO, 'event_hub_type') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zpfX(YKHO) -> h8nf[qe4Y.Input[uLKX[str, 'EventHubType']]]:\n return qe4Y.get(YKHO, 'event_hub_type')",
"def FRul(YKHO):\n return YKHO.event_type",
"def type(YKHO) -> str:\n return YKHO._event.get('type')",
"def hEKL(YKHO) -> int:\n return YKHO.data['args']['eventType']",
"def aihU(tvqc):\n ... | [
"0.8569165",
"0.78366536",
"0.77429354",
"0.7308451",
"0.70576334",
"0.70576334",
"0.69872296",
"0.6939999",
"0.69243646",
"0.6844996",
"0.6731586",
"0.6699463",
"0.66621345",
"0.6596711",
"0.6580311",
"0.65459967",
"0.6535486",
"0.65285516",
"0.65057313",
"0.650167",
"0.6491... | 0.8826724 | 0 |
Gets or sets the name. | def mWFP(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W0tD(YKHO) -> str:\n return YKHO.name",
"def W0tD(YKHO) -> str:\n return YKHO.name",
"def W0tD(YKHO) -> str:\n return YKHO.name",
"def W0tD(YKHO) -> str:\n return YKHO.name",
"def W0tD(YKHO) -> str:\n return YKHO._name",
"def W0tD(YKHO) -> str:\n return YKHO._name",
"def W0tD(YKHO... | [
"0.84682375",
"0.84682375",
"0.84682375",
"0.8446795",
"0.84359616",
"0.84359616",
"0.8410739",
"0.8410739",
"0.8382522",
"0.83573955",
"0.8354863",
"0.8354863",
"0.8354863",
"0.834061",
"0.834061",
"0.8333269",
"0.8333269",
"0.8333269",
"0.8333269",
"0.8333269",
"0.8333269",... | 0.0 | -1 |
Gets or sets the type. | def type(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'type') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FRul(YKHO):\n return YKHO.type",
"def FRul(YKHO):\n return YKHO.type",
"def FRul(YKHO):\n return YKHO._type",
"def FRul(YKHO):\n return YKHO._type",
"def type(YKHO):\n return YKHO._getValue('type')",
"def FRul(YKHO):\n return YKHO._TYPE",
"def FRul(YKHO):\n return YKHO._type_ob... | [
"0.8533302",
"0.8533302",
"0.844054",
"0.844054",
"0.8312111",
"0.827963",
"0.8276462",
"0.82763165",
"0.81963736",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0.8196329",
"0... | 0.0 | -1 |
Removes None values and calculates total. | def oL3l(YKHO):
x0SS = YKHO._discard_value(None)
wjRY = float(x0SS.total())
return (x0SS, wjRY) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g0a5(YKHO):\n lTIZ = 0\n for WKvO in range(0, YKHO.tot_col):\n for LVAh in range(1, YKHO.tot_rows + 1):\n if YKHO.file_list[LVAh][WKvO].lower() == 'null':\n lTIZ += 1\n print('Total number of null fields: ' + str(lTIZ))\n dixj.append('Total number of null fields: ' ... | [
"0.643967",
"0.630446",
"0.623857",
"0.61401653",
"0.59882325",
"0.58802366",
"0.5832534",
"0.5767215",
"0.575754",
"0.5726268",
"0.5712807",
"0.5709221",
"0.57032585",
"0.5702384",
"0.5674893",
"0.5673708",
"0.5661226",
"0.5661226",
"0.56470007",
"0.561502",
"0.56132275",
... | 0.6093626 | 4 |
Maximum observed value with nonzero count. | def max(YKHO, mmsk=False):
for H5ew, BWXx in reversed(YKHO.items()):
if BWXx > 0 or mmsk:
return H5ew | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PtQX(WKvO):\n return oyIN.maximum(WKvO, 0)",
"def BfFQ(YKHO):\n bQ6z = max(YKHO.values)\n return bQ6z",
"def V9Vq(YKHO):\n return oyIN.nanmax(YKHO.pre_proc_data)",
"def max(YKHO):\n return YKHO._summarize(lambda Z9rn: Z9rn.max)",
"def bQ6z(YKHO) -> h8nf[int]:\n return YKHO._max_value"... | [
"0.72339207",
"0.7153924",
"0.70750475",
"0.7005094",
"0.6883958",
"0.68582416",
"0.6855111",
"0.68431324",
"0.6789454",
"0.677143",
"0.6757401",
"0.6757401",
"0.6755451",
"0.6726537",
"0.6688307",
"0.668016",
"0.66791415",
"0.6676345",
"0.66664433",
"0.66657513",
"0.66624486... | 0.6301381 | 54 |
Return a function that returns the quantile values for this histogram. | def kzqe(YKHO, Cwt5=0.5, Pq6x=None):
x0SS, wjRY = YKHO._prepare_for_stats()
if not wjRY:
return lambda vexM: None
HHp6 = min(x0SS.values())
if Pq6x is None:
Pq6x = HHp6
else:
Pq6x = min(Pq6x, HHp6)
UqYS = Cwt5 * Pq6x
DsaG = []
IJGg = 0.0
GOZd = E4S2.SortedDict... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ad33(vexM):\n\n def eHNT(WKvO):\n return oyIN.quantile(WKvO, vexM)\n return eHNT",
"def o7bE(YKHO):\n return YKHO._quantiles",
"def aM62(YKHO, lHyk):\n raise NotImplementedError()",
"def o7bE(YKHO, vexM: int):\n return YKHO.dist.quantiles(vexM)",
"def hpNL(YKHO, vexM):\n return... | [
"0.80293787",
"0.7256257",
"0.7218652",
"0.68410724",
"0.68255293",
"0.68255293",
"0.68155265",
"0.6805426",
"0.67468756",
"0.6687718",
"0.65817505",
"0.6576673",
"0.6563499",
"0.641699",
"0.6394667",
"0.63919884",
"0.63881975",
"0.63867414",
"0.63764435",
"0.63764435",
"0.63... | 0.7093726 | 3 |
Get the Predicted Sentiment Score and use it to predict the movie rating from a review statement. >>> predict_movie_rating(2.8) 3 >>> predict_movie_rating(1.2) 1 | def woTP(i8lz: float) -> int:
return int(round(i8lz)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DFCi(YKHO, dWdB):\n return dWdB",
"def YmAU(YKHO, C_dV):\n U44P = YKHO.model.predictAll(C_dV)\n wPRz = U44P.map(lambda WKvO: (WKvO.product, WKvO.rating))\n ep4l = wPRz.join(YKHO.movies_titles_RDD).join(YKHO.movies_rating_counts_RDD)\n ep4l = ep4l.map(lambda Mkmy: (Mkmy[1][0][1], Mkmy[1][0][0],... | [
"0.72985923",
"0.6987882",
"0.6894928",
"0.6873646",
"0.6873504",
"0.67712915",
"0.67529976",
"0.67254555",
"0.6649325",
"0.66354156",
"0.6469183",
"0.64388216",
"0.64029366",
"0.639634",
"0.63705754",
"0.63488793",
"0.63068867",
"0.6302692",
"0.62275255",
"0.6227454",
"0.622... | 0.6336712 | 16 |
Return a boolean indicating whether given items are in sorted order. | def mwCj(DumB):
for WKvO in range(len(DumB)):
if WKvO < len(DumB) - 1:
if DumB[WKvO + 1] < DumB[WKvO]:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mwCj(DumB):\n for d6pt, ZfUD in enumerate(DumB):\n if d6pt + 1 < len(DumB):\n if ZfUD > DumB[d6pt + 1]:\n return False\n return True",
"def mwCj(DumB):\n jvSB = 0\n _tIi = 1\n while _tIi < len(DumB):\n if DumB[jvSB] > DumB[_tIi]:\n return Fals... | [
"0.8218438",
"0.82054013",
"0.7429284",
"0.73970175",
"0.7260254",
"0.71971154",
"0.7079509",
"0.70403665",
"0.69723743",
"0.6970533",
"0.69469947",
"0.69445795",
"0.69440234",
"0.68967813",
"0.68493915",
"0.6838795",
"0.6747174",
"0.6713568",
"0.6712401",
"0.6677618",
"0.659... | 0.8400566 | 0 |
Return the name of color nearest (red, green, blue) | def UYdI(YKHO, Z5Q9, jlxe, pPPK):
UYdI = -1
KD0n = ''
for mWFP, LIAQ in YKHO.__byrgb.values():
Mkmy, Oa1e, Fg_i = YKHO.__byname[mWFP.lower()]
Zma6 = Z5Q9 - Mkmy
U8ov = jlxe - Oa1e
JKcT = pPPK - Fg_i
Ayfi = Zma6 * Zma6 + U8ov * U8ov + JKcT * JKcT
if UYdI == -1 ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UvvX(qfpW):\n Aofo = qrpq.match(qfpW)\n if Aofo is not None and len(Aofo.groups()) == 5:\n pAuv = int(Aofo.groups()[1])\n hIS6 = int(Aofo.groups()[2])\n oIza = int(Aofo.groups()[3])\n fk9A = oyIN.array([pAuv, hIS6, oIza])\n nW1_ = None\n uh8p = 99999.99\n ... | [
"0.72678334",
"0.7190744",
"0.68474764",
"0.68275344",
"0.66425115",
"0.6497939",
"0.62284756",
"0.62250465",
"0.6168186",
"0.6138532",
"0.609768",
"0.60545886",
"0.6016377",
"0.6004818",
"0.5997986",
"0.5997986",
"0.5997986",
"0.5997986",
"0.59737235",
"0.5970706",
"0.595265... | 0.76609373 | 0 |
Pi = inital P guess, default is 1 R = Rk, estimate o fthe covariance of the observation noise Q = Qk, process variance | def OtFR(nPrm, A3Vt=0.001, eQ6J=1, T8ck=1e-05):
exwG = len(nPrm)
Y8HB = XTiz.zeros(exwG)
V6IE = XTiz.zeros(exwG)
TVAu = XTiz.zeros(exwG)
sdRd = XTiz.zeros(exwG)
nMvt = XTiz.zeros(exwG)
Y8HB[0] = nPrm[0]
V6IE[0] = eQ6J
for G1Hx in range(1, exwG):
TVAu[G1Hx] = Y8HB[G1Hx - 1]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def llgD(YXbZ, P1dF):\n wFRH = oyIN.mean(YXbZ)\n ympj = float(len(YXbZ))\n Ei2p = oyIN.sum((YXbZ - wFRH) ** 2.0 / P1dF ** 2.0)\n ePYN = JEVk.cdf(Ei2p, ympj - 1)\n return ePYN",
"def xtyi(cDK5):\n return",
"def I8JS(YKHO):\n return YKHO.k * YKHO.theta ** 2",
"def fJO0(YKHO):\n WKvO = Y... | [
"0.6300771",
"0.6188772",
"0.6102053",
"0.6030487",
"0.59192693",
"0.58256674",
"0.5789539",
"0.57696795",
"0.57350904",
"0.57142544",
"0.5701306",
"0.5685996",
"0.56137735",
"0.56062406",
"0.5596753",
"0.5588853",
"0.55483705",
"0.5547888",
"0.5537384",
"0.5536567",
"0.55336... | 0.0 | -1 |
forward calculation y = f(XW^T) ( is dot calculation) | def KVH6(XcU5, EcVT):
return v9B7(oyIN.dot(me_w(EcVT), XcU5)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHNT(a1PO, LVAh):\n return EhIg * LVAh",
"def KVH6(YKHO, WKvO):\n LVAh = oyIN.zeros((WKvO.shape[0], YKHO.W.shape[0]))\n LVAh = oyIN.dot(WKvO, oyIN.transpose(YKHO.W)) + YKHO.b\n YKHO.x = oyIN.copy(WKvO)\n return LVAh",
"def KVH6(YKHO):\n YKHO.iteration_number += 1\n WKvO = YKHO.x\n Y... | [
"0.6725919",
"0.66577226",
"0.6639155",
"0.65898526",
"0.65378845",
"0.649657",
"0.64800054",
"0.64467686",
"0.64314675",
"0.6386233",
"0.6332034",
"0.6331523",
"0.6320647",
"0.631009",
"0.6289636",
"0.6281411",
"0.6267605",
"0.62455386",
"0.6214789",
"0.62100095",
"0.6202062... | 0.62065077 | 20 |
Get single comment object. | def NMoC(YKHO, QePW, id=None, format=None):
G9zw = YKHO.get_object(id)
geh0 = YKHO.serializer_class(G9zw)
return oGir(geh0.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def podV(YKHO, NBcv):\n return YKHO.get_object('comment', NBcv)",
"def AMX5(YKHO, id):\n try:\n return jY1u.objects.get(id=id)\n except jY1u.DoesNotExist:\n raise uhgT",
"def podV(YKHO, pQGt):\n xUwc = zyrs('commenting', collection='Comment', runtime=YKHO._runtime)\n Aofo = xUwc.fi... | [
"0.77895993",
"0.76242495",
"0.7579107",
"0.7341131",
"0.7299526",
"0.7256564",
"0.71464556",
"0.7142716",
"0.7120583",
"0.70872205",
"0.7013045",
"0.6915504",
"0.6903105",
"0.6840177",
"0.6778121",
"0.66668844",
"0.6615914",
"0.6615914",
"0.6598788",
"0.659172",
"0.65709716"... | 0.6247972 | 31 |
Get list of post on user wall. | def NMoC(YKHO, QePW, id, qoqK=20):
m8z6 = (T97t.objects.filter(user=mv1M.objects.get(id=id), target_type=DDS9.objects.get(model='user')) | T97t.objects.filter(target_id=id, target_type=DDS9.objects.get(model='user'))).order_by('-datetime')[:qoqK]
geh0 = YKHO.serializer_class(m8z6, many=True)
return oGir(geh... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Aide():\n uJjO = cuiw.get('user_id')\n zvy7 = T97t.query.join(xx7x, NCls.and_(T97t.user_id == xx7x.user_2, xx7x.active == True)).outerjoin(jY1u, NCls.and_(jY1u.post_id == T97t.post_id, jY1u.active == True)).filter(xx7x.user_1 == uJjO, T97t.active == True).order_by(T97t.post_id.desc()).all()\n _i1P = [... | [
"0.6937483",
"0.6712776",
"0.65800095",
"0.65489364",
"0.652871",
"0.65155303",
"0.65067804",
"0.650433",
"0.6501426",
"0.6470095",
"0.6432693",
"0.63773805",
"0.6315783",
"0.6301193",
"0.6254875",
"0.6248521",
"0.62245506",
"0.6192592",
"0.6190737",
"0.6178532",
"0.6171247",... | 0.0 | -1 |
Define the receiver queryset. | def TyU7(Fi3q):
ETu_ = set()
for YRbF in jY1u.objects.filter(post=Fi3q):
ETu_.add(YRbF.user.id)
ETu_.add(T97t.objects.get(id=Fi3q).user.id)
if T97t.objects.get(id=Fi3q).target_type == DDS9.objects.get(model='user'):
ETu_.add(T97t.objects.get(id=Fi3q).target_id)
return mv1M.objects.fi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k66M(YKHO):\n if YKHO.queryset is not None:\n SR0I = YKHO.queryset\n if hasattr(SR0I, '_clone'):\n SR0I = SR0I._clone()\n elif YKHO.model is not None:\n SR0I = YKHO.model._default_manager.all()\n else:\n raise rqaQ(\"'%s' must define 'queryset' or 'model'\" % YKH... | [
"0.702221",
"0.7011914",
"0.69471616",
"0.6886518",
"0.6886518",
"0.6876594",
"0.68659717",
"0.6835139",
"0.6781283",
"0.67741716",
"0.6745474",
"0.6722135",
"0.67013574",
"0.6527999",
"0.6514393",
"0.6450692",
"0.6437798",
"0.63605016",
"0.63409716",
"0.6329197",
"0.6314765"... | 0.0 | -1 |
Returns True if 'list1' and 'list2' have at least 1 element in common, False otherwise | def uM9x(Kt9y, I_KI):
for YRbF in range(len(Kt9y)):
for r845 in range(len(I_KI)):
if Kt9y[YRbF] == I_KI[r845]:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lx_T(Kt9y, I_KI):\n return len(list(set(Kt9y) & set(I_KI))) > 0",
"def UNQt(zznG, Wd5v):\n for YRbF in zznG:\n for r845 in Wd5v:\n if YRbF == r845:\n return True\n return False",
"def q6oC(Kt9y, I_KI):\n return all(map(lambda Z9rn: Z9rn in I_KI, Kt9y))",
"def ... | [
"0.7992433",
"0.7926499",
"0.7657093",
"0.7554909",
"0.7383712",
"0.7340888",
"0.7207706",
"0.71978486",
"0.7155412",
"0.7120226",
"0.7117233",
"0.71061814",
"0.7007421",
"0.6948971",
"0.6937587",
"0.69196266",
"0.69033265",
"0.6890824",
"0.6881718",
"0.6868015",
"0.6854923",... | 0.85858804 | 0 |
Returns True if 'theList' contains lists that have at least 1 element in common | def d9s4(yfR9):
for YRbF in range(len(yfR9)):
for r845 in range(YRbF + 1, len(yfR9)):
if uM9x(yfR9[YRbF], yfR9[r845]):
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ljac(j6bp):\n c9vM = set()\n for LihS in j6bp:\n if LihS in c9vM:\n return True\n else:\n c9vM.add(LihS)\n return False",
"def Zib3(YKHO, LTvD, u0vY):\n hHld = list(filter(lambda WKvO: WKvO, [set(vC9B[YRbF]).issuperset(set(u0vY[YRbF])) if YRbF < len(u0vY) else ... | [
"0.68542576",
"0.67728347",
"0.6663181",
"0.65460765",
"0.6490951",
"0.6427063",
"0.6423759",
"0.64092374",
"0.6401112",
"0.6388167",
"0.63820976",
"0.63018334",
"0.62606055",
"0.6225878",
"0.6222811",
"0.6217621",
"0.6199564",
"0.61939126",
"0.61794883",
"0.6162255",
"0.6141... | 0.64312077 | 5 |
Converts a list of strings to a string by concatenating all elements of the list | def Xwve(aPd6):
hlel = ''
for KCHu in aPd6:
hlel = hlel + KCHu
return hlel | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def whrw(list):\n vIwR = ''\n for WKvO in list:\n vIwR = vIwR + str(WKvO)\n return vIwR",
"def KCQd(JTgH):\n o9EA = ''\n for LihS in JTgH:\n o9EA += str(LihS)\n return o9EA",
"def hrsK(J5jX):\n return ' '.join((gTzM(ZfUD) for ZfUD in J5jX))",
"def hrsK(n_L_):\n return ' ... | [
"0.845377",
"0.7836319",
"0.7773371",
"0.7705512",
"0.7661951",
"0.7658474",
"0.7595569",
"0.7587454",
"0.7479857",
"0.7459654",
"0.74586385",
"0.7406689",
"0.7406689",
"0.7394045",
"0.7386286",
"0.7349678",
"0.7333463",
"0.733121",
"0.7291625",
"0.7260772",
"0.71728444",
"... | 0.652098 | 55 |
Tests homepage properly renders | def etaV(YKHO):
Aofo = YKHO.client.get('/')
YKHO.assertIn('<h1 class="title">Bark Park!</h1>', Aofo.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gk60(YKHO):\n geh0 = YKHO.client.get(nKyW('home'))\n YKHO.assertEqual(geh0.status_code, 200)",
"def gk60(YKHO):\n geh0 = YKHO.client.get(nKyW('home'))\n YKHO.assertEqual(geh0.status_code, 200)",
"def GvGQ(YKHO):\n geh0 = YKHO.client.get('/')\n YKHO.assertContains(geh0, 'Home Page', 1, 200... | [
"0.8286543",
"0.8286543",
"0.80288696",
"0.80261856",
"0.8022295",
"0.79548097",
"0.79130465",
"0.7811535",
"0.77317524",
"0.7719305",
"0.771608",
"0.77036077",
"0.76768106",
"0.7669529",
"0.76621985",
"0.76119643",
"0.7584721",
"0.75810295",
"0.75592273",
"0.7525854",
"0.752... | 0.8676804 | 0 |
Test adding new photo | def GQlf(YKHO):
Aofo = YKHO.client.post('/add_new_photo/2', data={'park_id': '2', 'user_id': 25, 'description': 'Taurus having a great time!', 'photo': 'http://s3-media3.fl.yelpcdn.com/bphoto/ZUhteyc0UWdWbgM-4VbZhw/o.jpg'}, follow_redirects=True)
YKHO.assertIn('<h1 class="title">Bark Park!</h1>', Aofo.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PP_1(YKHO):\n geh0 = YKHO.client.get('/images/photos/add')\n YKHO.assertEqual(geh0.status_code, 200)",
"def CW30(YKHO):\n nPrm = {'image': Yw_3.load_image()}\n GWE6 = w55X.objects.create(**nPrm)\n YKHO.assertTrue(GWE6.pk)",
"def kSV2(YKHO):\n C7_O = 'test1.png'\n with open(YKHO.img_url... | [
"0.8101235",
"0.8026537",
"0.7981487",
"0.7825003",
"0.7615926",
"0.75143087",
"0.74651533",
"0.7336449",
"0.7290538",
"0.7287154",
"0.72751683",
"0.7270891",
"0.7228573",
"0.7217122",
"0.7203814",
"0.717076",
"0.7156646",
"0.7147599",
"0.7129838",
"0.7117978",
"0.70968175",
... | 0.8562085 | 0 |
METADATA.json fonts propery only should have uniq values | def srtL(YKHO):
jUiS = {}
for WKvO in YKHO.metadata.get('fonts', None):
YKHO.assertFalse(WKvO.get('fullName', '') in jUiS)
jUiS[WKvO.get('fullName', '')] = WKvO
YKHO.assertEqual(len(set(jUiS.keys())), len(YKHO.metadata.get('fonts', None))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zkgm(YKHO):\n for WKvO in YKHO.metadata.get('fonts', None):\n YKHO.assertEqual(type(WKvO), type({}), msg='type(%s) is not dict' % WKvO)",
"def KegO(YKHO):\n YKHO.assertEqual(type(YKHO.metadata.get('fonts', '')), type([]))",
"def HbES(YKHO):\n for WKvO in YKHO.metadata.fonts:\n o9av =... | [
"0.7148735",
"0.7148274",
"0.68586934",
"0.68324167",
"0.6508626",
"0.6315923",
"0.6147427",
"0.61141056",
"0.59751123",
"0.5967416",
"0.587476",
"0.58441174",
"0.5834785",
"0.5795578",
"0.5712134",
"0.5657229",
"0.5657099",
"0.56292534",
"0.5613162",
"0.56095904",
"0.5574174... | 0.7460132 | 0 |
METADATA.json font key should be list | def KegO(YKHO):
YKHO.assertEqual(type(YKHO.metadata.get('fonts', '')), type([])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zkgm(YKHO):\n for WKvO in YKHO.metadata.get('fonts', None):\n YKHO.assertEqual(type(WKvO), type({}), msg='type(%s) is not dict' % WKvO)",
"def HbES(YKHO):\n for WKvO in YKHO.metadata.fonts:\n o9av = krdV.get_ttfont_from_metadata(YKHO.operator.path, WKvO)\n YKHO.assertIn(o9av.family... | [
"0.7041857",
"0.63672256",
"0.6113491",
"0.5998007",
"0.59016675",
"0.59016675",
"0.59016675",
"0.5668828",
"0.5668607",
"0.56112456",
"0.5580641",
"0.55714065",
"0.5561082",
"0.55486125",
"0.550653",
"0.5462129",
"0.5424566",
"0.54121506",
"0.54065496",
"0.53918576",
"0.5384... | 0.7776431 | 0 |
METADATA.json subsets should have at least 'menu' and 'latin' | def nTlH(YKHO):
YKHO.assertIn('menu', YKHO.metadata.get('subsets', []), msg='Subsets missing menu')
YKHO.assertIn('latin', YKHO.metadata.get('subsets', []), msg='Subsets missing latin') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sUqt(YKHO):\n YKHO.assertEqual(type(YKHO.metadata.get('subsets', '')), type([]))",
"def Zkgm(YKHO):\n for WKvO in YKHO.metadata.get('fonts', None):\n YKHO.assertEqual(type(WKvO), type({}), msg='type(%s) is not dict' % WKvO)",
"def xXbK(YKHO):\n yIVm = YKHO.resolver.getMetadata(objectId='urn... | [
"0.6309181",
"0.58442897",
"0.57330245",
"0.5654883",
"0.56103677",
"0.5445936",
"0.5444328",
"0.5162038",
"0.51150095",
"0.50701636",
"0.5030377",
"0.5029047",
"0.49769622",
"0.49525937",
"0.4951524",
"0.4943614",
"0.4925639",
"0.49054593",
"0.4902613",
"0.48843136",
"0.4879... | 0.7498523 | 0 |
Check metadata.json font.style `italic` matches font internal | def hwCe(YKHO):
kGys = YKHO.read_metadata_contents()
qBg8 = H1ja.get_family_metadata(kGys)
for yOSH in qBg8.fonts:
if yOSH.style != 'italic':
continue
o9av = krdV.get_ttfont_from_metadata(YKHO.operator.path, yOSH)
if not bool(o9av.macStyle & 2):
YKHO.fail('Met... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def skmY(YKHO):\n kGys = YKHO.read_metadata_contents()\n ej8u = H1ja.get_family_metadata(kGys)\n for yOSH in ej8u.fonts:\n YKHO.assertIn(yOSH.style, YKHO.CANONICAL_STYLE_VALUES)\n if YKHO.is_italic(yOSH):\n if yOSH.style != 'italic':\n bGrB = '%s: The font style is ... | [
"0.7558341",
"0.73380977",
"0.6939594",
"0.67242837",
"0.67035174",
"0.6615761",
"0.64679974",
"0.63273317",
"0.6287998",
"0.61372036",
"0.6129144",
"0.6017762",
"0.5974976",
"0.5882355",
"0.58799505",
"0.5876883",
"0.58353376",
"0.57994324",
"0.57427514",
"0.564695",
"0.5559... | 0.8031599 | 0 |
Check metadata.json font.style `italic` matches font internal | def C5AU(YKHO):
kGys = YKHO.read_metadata_contents()
qBg8 = H1ja.get_family_metadata(kGys)
for yOSH in qBg8.fonts:
if yOSH.style != 'normal':
continue
o9av = krdV.get_ttfont_from_metadata(YKHO.operator.path, yOSH)
if bool(o9av.macStyle & 2):
YKHO.fail('Metadat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hwCe(YKHO):\n kGys = YKHO.read_metadata_contents()\n qBg8 = H1ja.get_family_metadata(kGys)\n for yOSH in qBg8.fonts:\n if yOSH.style != 'italic':\n continue\n o9av = krdV.get_ttfont_from_metadata(YKHO.operator.path, yOSH)\n if not bool(o9av.macStyle & 2):\n Y... | [
"0.8031599",
"0.7558341",
"0.6939594",
"0.67242837",
"0.67035174",
"0.6615761",
"0.64679974",
"0.63273317",
"0.6287998",
"0.61372036",
"0.6129144",
"0.6017762",
"0.5974976",
"0.5882355",
"0.58799505",
"0.5876883",
"0.58353376",
"0.57994324",
"0.57427514",
"0.564695",
"0.55593... | 0.73380977 | 2 |
Test If font styles are canonical | def skmY(YKHO):
kGys = YKHO.read_metadata_contents()
ej8u = H1ja.get_family_metadata(kGys)
for yOSH in ej8u.fonts:
YKHO.assertIn(yOSH.style, YKHO.CANONICAL_STYLE_VALUES)
if YKHO.is_italic(yOSH):
if yOSH.style != 'italic':
bGrB = '%s: The font style is %s but it sh... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C5AU(YKHO):\n kGys = YKHO.read_metadata_contents()\n qBg8 = H1ja.get_family_metadata(kGys)\n for yOSH in qBg8.fonts:\n if yOSH.style != 'normal':\n continue\n o9av = krdV.get_ttfont_from_metadata(YKHO.operator.path, yOSH)\n if bool(o9av.macStyle & 2):\n YKHO.... | [
"0.7248282",
"0.6935411",
"0.6680462",
"0.6253085",
"0.62378496",
"0.62230104",
"0.606966",
"0.6040576",
"0.60307646",
"0.59415674",
"0.59023315",
"0.5703632",
"0.5693834",
"0.56794",
"0.5653981",
"0.55639493",
"0.5533116",
"0.5526273",
"0.5525132",
"0.5478395",
"0.54339075",... | 0.7875416 | 0 |
Test If filename is canonical | def _BFO(YKHO):
kGys = YKHO.read_metadata_contents()
Ffrn = H1ja.get_family_metadata(kGys)
for yOSH in Ffrn.fonts:
mBNc = YKHO.create_canonical_filename(yOSH)
if mBNc != yOSH.filename:
YKHO.fail('{} != {}'.format(mBNc, yOSH.filename)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yYzl(Ux0P):\n if Ux0P is None:\n return ''\n if Ux0P == '<' + Ux0P[1:-1] + '>':\n return Ux0P\n j_BG = Hy7s.path.realpath(Ux0P)\n j_BG = Hy7s.path.normcase(j_BG)\n return j_BG",
"def mBNc(Ux0P):\n import os, os.path\n pmON = WLIt(Ux0P)\n while True:\n pmON = os.pa... | [
"0.66859955",
"0.6648033",
"0.64460415",
"0.64346355",
"0.6421668",
"0.6241108",
"0.60469574",
"0.6042017",
"0.6038499",
"0.6029806",
"0.60270005",
"0.6008632",
"0.6005622",
"0.59906447",
"0.5974498",
"0.5968066",
"0.59679115",
"0.5967139",
"0.59447575",
"0.5929974",
"0.59103... | 0.70434004 | 0 |
Compute mask loss. Each proposal (out of `max_num_proposals`) predictes `num_classes` masks of shape [mask_height, mask_width]. However, only the one corresponding to the groundtruth class label `k` will be "selected" and contribute to the loss. | def TKOC(C3ST, hHfz, MEVF, wXVt, tY3b, aJr4, fE_y):
rMGc, jTqs, quhL, f2iY = YT3X.combined_static_and_dynamic_shape(hHfz)
Ep8u = len(fE_y)
eAFL = ZylS.reshape(ZylS.stack([hrZD.get() for hrZD in fE_y], axis=0), [rMGc, -1])
hHfz = ZylS.pad(hHfz, [[0, 0], [1, 0], [0, 0], [0, 0]])
hHfz = ZylS.batch_gath... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sikX(hHfz, pjZb):\n _6pB = pjZb['classes']\n bGrB, jTqs, quhL, f2iY = hHfz.shape.as_list()\n Ep8u, gPMf = _6pB.get_shape().as_list()\n if jTqs > 1:\n YJ8f = ZylS.batch_gather(hHfz, ZylS.reshape(ZylS.to_int32(_6pB) - 1, [-1, 1]))\n YJ8f = ZylS.reshape(ZylS.squeeze(YJ8f, axis=1), [Ep8u, gPM... | [
"0.67618287",
"0.6542938",
"0.6495758",
"0.63780904",
"0.63696027",
"0.6329117",
"0.6237516",
"0.61294407",
"0.5989295",
"0.59697896",
"0.59415644",
"0.5940343",
"0.59046674",
"0.5888546",
"0.58790874",
"0.5876182",
"0.5835143",
"0.583081",
"0.58214194",
"0.58172345",
"0.5802... | 0.7792567 | 0 |
Test that good requests give a 200 response code. | def aV5Y(YKHO):
YKHO.assertNot(isinstance(YKHO._request(YKHO._make_dummy_notification([E7Qx, r3kZ])), int)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def us5f(YKHO):\n pass",
"def Z5ZI(YKHO):\n YKHO.assertEquals(YKHO.response.status_code, 200)",
"def MEXE(d4y1):\n Mkmy = d4y1.get(path='/')\n assert Mkmy.status_code == 200",
"def mhoY():\n assert OFMJ().status_code == 200",
"def Z5ZI(YKHO):\n rX_l = Wgev('python')\n YKHO.assertEqual(... | [
"0.8366052",
"0.8109574",
"0.80699474",
"0.8015894",
"0.8006835",
"0.7980883",
"0.7931863",
"0.7882258",
"0.7840906",
"0.78161216",
"0.7730852",
"0.77084374",
"0.77072483",
"0.77072483",
"0.77072483",
"0.77072483",
"0.77072483",
"0.77072483",
"0.77072483",
"0.77072483",
"0.77... | 0.81243604 | 1 |
A strategy that maximizes the expected difference between my final score and my opponent's. | def wfXG(QTBn):
return r8IL(QTBn, ffDk, _oen, zmYF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def amIj(p1kx, qhbw):\n ftQ2, G1Hx = (qhbw // 10 + 1, 1)\n jjpt = p1kx > qhbw\n dMYj = (xi3E - p1kx) / (xi3E - qhbw)\n JBMS = DC_Y(3)(p1kx, qhbw)\n if xi3E - p1kx <= ftQ2:\n return 0\n while G1Hx < 4:\n if jjpt and p1kx >= xi3E - (3 * G1Hx - 1):\n return G1Hx\n G1H... | [
"0.73199487",
"0.7241234",
"0.7205493",
"0.70890564",
"0.69605625",
"0.6887661",
"0.68855035",
"0.6813677",
"0.6810658",
"0.6727644",
"0.6717349",
"0.6703362",
"0.66935116",
"0.6692651",
"0.6670782",
"0.66647583",
"0.6661858",
"0.66548085",
"0.6629679",
"0.6616435",
"0.656910... | 0.64628565 | 31 |
Plot scatter points with colorbar | def sUiY(YKHO, WKvO, LVAh, Z9rn, **B2fa):
WKvO, LVAh = YKHO.xy_unit_check(WKvO, LVAh)
YKHO.initialize_mwplot()
if isinstance(Z9rn, list):
qfpW = Z9rn[0]
bmgf = Z9rn[1]
YKHO.cbar_flag = True
if type(qfpW) == P6bq.quantity.Quantity:
qfpW = qfpW.to(YKHO._unit).value
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Du68():\n ywwl = 100\n WKvO = oyIN.random.rand(ywwl)\n LVAh = oyIN.random.rand(ywwl)\n Jw9H = oyIN.random.rand(ywwl)\n QrM1.scatter(WKvO, LVAh, c=Jw9H, alpha=0.5)\n QrM1.show()",
"def aY66(bOBl, OD19, S7Py, VoLU='', IICq='', jk7u=[0, 15], rTQi=[0, 15], InLe=True):\n if not InLe:\n ... | [
"0.6957231",
"0.68189776",
"0.6781912",
"0.6725077",
"0.667742",
"0.64773524",
"0.64616114",
"0.64443624",
"0.64385337",
"0.63356435",
"0.6334097",
"0.6324725",
"0.62319404",
"0.6228918",
"0.62105215",
"0.61905533",
"0.6189272",
"0.6186147",
"0.61778843",
"0.6163995",
"0.6151... | 0.6978989 | 0 |
Plot scatter points with colorbar | def sUiY(YKHO, XdG6, iSjc, Z9rn, **B2fa):
XdG6, iSjc = YKHO.radec_unit_check(XdG6, iSjc)
YKHO.initialize_mwplot()
if isinstance(Z9rn, list):
qfpW = Z9rn[0]
bmgf = Z9rn[1]
YKHO.cbar_flag = True
if type(qfpW) == P6bq.quantity.Quantity:
qfpW = qfpW.to(YKHO._unit).val... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sUiY(YKHO, WKvO, LVAh, Z9rn, **B2fa):\n WKvO, LVAh = YKHO.xy_unit_check(WKvO, LVAh)\n YKHO.initialize_mwplot()\n if isinstance(Z9rn, list):\n qfpW = Z9rn[0]\n bmgf = Z9rn[1]\n YKHO.cbar_flag = True\n if type(qfpW) == P6bq.quantity.Quantity:\n qfpW = qfpW.to(YKHO.... | [
"0.6979321",
"0.695779",
"0.6818265",
"0.67816675",
"0.6724479",
"0.66787285",
"0.6477698",
"0.64616954",
"0.64452255",
"0.64392376",
"0.6335047",
"0.63250786",
"0.6232152",
"0.62288815",
"0.6211692",
"0.6191022",
"0.6189807",
"0.61871344",
"0.6178614",
"0.6164259",
"0.615260... | 0.6336193 | 10 |
Test omitting default values on a perattribute basis. | def dVVT(EEBT):
aDxC = QXkI()
CQwJ, T6S7 = EEBT
ep2k = False
for hkS8, wEf2 in zip(CQwJ.__attrs_attrs__, T6S7):
if hkS8.default is not Td7z:
FYKK = jU8f(CQwJ, aDxC, **{hkS8.name: jRxN(omit_if_default=True)})
if hkS8.default == wEf2:
ep2k = True
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dNVu(YKHO, Emd4: Type) -> None:\n\n def hHld(sarX: yaml.Node, WmM4: Any) -> bool:\n if sarX.tag == 'tag:yaml.org,2002:null':\n return WmM4 is None\n if sarX.tag == 'tag:yaml.org,2002:int':\n return int(sarX.value) == int(WmM4)\n if sarX.tag == 'tag:yaml.org,2002:fl... | [
"0.64822626",
"0.63734543",
"0.62709045",
"0.61568123",
"0.61450404",
"0.6132429",
"0.6123386",
"0.6118186",
"0.61147857",
"0.61058146",
"0.6087637",
"0.6021508",
"0.597629",
"0.5975809",
"0.59272707",
"0.59240204",
"0.58996683",
"0.5897114",
"0.5894513",
"0.5894513",
"0.5856... | 0.58933437 | 20 |
initialize the density matrix from a mixture of states | def FIMM(YKHO, WErR, wspz):
tpio = oyIN.shape(wspz[0])[0]
x7oT = oyIN.zeros((tpio, tpio))
for JxU2, QTBn in zip(WErR, wspz):
x7oT += JxU2 * QTBn @ oyIN.conjugate(QTBn).T
YKHO.matrix_rep = x7oT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b9PO(wspz=None, DbyF=None):\n if wspz is None:\n eRWf = oyIN.prod(DbyF)\n XmUR = oyIN.eye(eRWf) / eRWf\n return XmUR\n XmUR = oyIN.eye(1, dtype=oyIN.complex128)\n for YRbF, KCHu in enumerate(wspz):\n if not hasattr(KCHu, '__len__'):\n Csk6 = DbyF[YRbF]\n ... | [
"0.7075864",
"0.6731913",
"0.65987694",
"0.64078385",
"0.62692213",
"0.62429947",
"0.62405705",
"0.62290657",
"0.6053602",
"0.6002356",
"0.59961176",
"0.59932816",
"0.59572536",
"0.59527314",
"0.59521174",
"0.5900468",
"0.58799344",
"0.586277",
"0.58547384",
"0.581713",
"0.58... | 0.6157623 | 8 |
Returns the record ID of this record. | def XXo0(YKHO):
UhTt, Wgp8 = YKHO.key().name().split(':', 1)
return Wgp8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CsEr(YKHO):\n return YKHO.metadata['recordId']",
"def CsEr(YKHO):\n return YKHO.metadata['recordId']",
"def id(YKHO):\n if YKHO._record is not None:\n return YKHO._record.id\n else:\n return 'NO_ID_ASSIGNED'",
"def id(YKHO, AIu6):\n return AIu6",
"def iQUI(YKHO, AIu6):\n ... | [
"0.90767133",
"0.90767133",
"0.8112223",
"0.80626",
"0.7980828",
"0.778776",
"0.778776",
"0.778776",
"0.778776",
"0.778776",
"0.778776",
"0.7763725",
"0.77412313",
"0.7713623",
"0.7700579",
"0.7700579",
"0.7693393",
"0.7693393",
"0.7684333",
"0.7667591",
"0.7667591",
"0.766... | 0.80693847 | 3 |
Returns True if this record was created in this repository. | def OIxi(YKHO):
return OIxi(YKHO.subdomain, YKHO.record_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _EYN(YKHO) -> bool:\n return YKHO._created",
"def L21s(YKHO):\n return YKHO._tag == 'created'",
"def L21s(YKHO) -> bool:\n return YKHO.state == L9Jq.OrderState.CREATED.choice_value",
"def _EYN(YKHO):\n return YKHO._created",
"def _EYN(YKHO):\n return YKHO._created",
"def _EYN(YKHO):\n ... | [
"0.7842449",
"0.7440019",
"0.72720444",
"0.7012648",
"0.7012648",
"0.7012648",
"0.7012648",
"0.7012648",
"0.696357",
"0.68221915",
"0.6810907",
"0.6745725",
"0.66951156",
"0.6673736",
"0.6614014",
"0.657334",
"0.6494026",
"0.64759755",
"0.64759755",
"0.6410897",
"0.64019424",... | 0.0 | -1 |
Returns True if this record was copied from another repository. | def DrId(YKHO):
return not YKHO.is_original() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DrId(UhTt, Wgp8):\n return not OIxi(UhTt, Wgp8)",
"def xa14(YKHO, Elif):\n if not isinstance(Elif, v5aP):\n return False\n return YKHO.to_dict() == Elif.to_dict()",
"def OIxi(YKHO):\n return OIxi(YKHO.subdomain, YKHO.record_id)",
"def Vdqg(YKHO, Elif):\n if not isinstance(Elif, v5aP... | [
"0.6556766",
"0.6091322",
"0.6068405",
"0.6007544",
"0.5956192",
"0.59438497",
"0.58938015",
"0.58595747",
"0.5846363",
"0.5781687",
"0.5763227",
"0.5747814",
"0.57412183",
"0.5724109",
"0.5717058",
"0.56910574",
"0.5673016",
"0.5662498",
"0.56571317",
"0.5656993",
"0.5655955... | 0.6484457 | 1 |