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
Process requests to add new category
def mqe5(): if 'username' not in sGQh: Dwep('Please login to add category') return vKnz(nKyW('showCategories')) if QePW.method == 'POST': mWFP = QePW.form['name'] JBZA = QePW.form['description'] if not mWFP: Dwep("Add CategoryError: Name can't be empty") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kISC():\n Zvjk = QePW.get_json()\n mWFP = Zvjk['name']\n Tz44 = Zvjk['picture']\n JBZA = Zvjk['description']\n Ghho = mqe5(mWFP, Tz44, JBZA, Oa1e.user.id)\n return pz3A(category=Ghho.serialize)", "def r4l4(QePW: HttpRequest) -> igJ6:\n if QePW.method == 'POST':\n L03z = OUpT(QePW....
[ "0.7432951", "0.69306815", "0.68379563", "0.6816585", "0.6750593", "0.6732125", "0.6676255", "0.657299", "0.6532126", "0.65211046", "0.6496525", "0.64803165", "0.64336693", "0.6420921", "0.64061916", "0.6383398", "0.6363358", "0.63617665", "0.63411766", "0.6331797", "0.632594...
0.62543315
26
Serve all items of the category
def MYp2(VMw8): Ghho = cuiw.query(qZuN).filter_by(id=VMw8).first() if not Ghho: Dwep('Attempt to view non-existent category') return vKnz(nKyW('showCategories')) DumB = cuiw.query(kLxY).filter_by(category_id=VMw8).all() if 'username' not in sGQh or sGQh['user_id'] != Ghho.user_id: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list(YKHO, QePW):\n Km6r = y6m0.objects.all()\n ZMzz = zHcI(Km6r, many=True, context={'request': QePW})\n return oGir(ZMzz.data)", "def Km6r(QePW):\n M4Ho = iTcg.objects.all()\n if QePW.method == 'GET':\n if M4Ho:\n NESr = zHcI(M4Ho, many=True)\n return oGir(NESr.d...
[ "0.6862961", "0.6838752", "0.6832472", "0.6808409", "0.6759815", "0.65026784", "0.650165", "0.64309716", "0.64139295", "0.6298917", "0.6262579", "0.62359995", "0.6208312", "0.6195548", "0.6193358", "0.61109006", "0.6095865", "0.6091328", "0.6034134", "0.60246116", "0.5992183"...
0.6250752
11
Gets the ith bit (zeroindexed).
def SMHM(mLGw, YRbF): return 1 if mLGw & 1 << YRbF else 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SMHM(mLGw, YRbF):\n return mLGw & 1 << YRbF != 0", "def OP2O(YKHO, d6pt):\n ahpf, yjzm = divmod(d6pt, llJG._UNSIGNED_INT)\n return YKHO.bits[ahpf] & 1 << yjzm", "def ySI9(YB8B, P2GO):\n return YB8B >> 7 - P2GO & 1", "def KFD6(wEf2, or8S):\n return wEf2 >> or8S & 1", "def S3pE(YKHO, YRbF)...
[ "0.7826954", "0.7410046", "0.7386657", "0.73263216", "0.7222269", "0.7176076", "0.7137559", "0.71253127", "0.6973061", "0.6967496", "0.6958228", "0.69483864", "0.694268", "0.68543786", "0.6816369", "0.6688558", "0.66808105", "0.6567417", "0.6564154", "0.6555715", "0.653013", ...
0.81653005
0
This method assumes a list of full paths to the desired files's parent folders and returns NiftiImageTupleList whose item is a nested list with each sublist belonging to its parent folder
def iw2M(Emd4, FS3z: FilePathList, Pu1k: Union[str, Collection[str]], P5zS: bool=False, **B2fa): CNwg = [] for ytgA in FS3z: VqRE = zjv5(ytgA, modality=Pu1k, presort=True) CNwg.append(VqRE) return Emd4(items=CNwg, path=pmON, **B2fa)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RV21(ESlo):\n iXTm = []\n for dir, AeXe, RRlC in Hy7s.walk(ESlo):\n for nUeQ in RRlC:\n iXTm.append(Hy7s.path.join(dir, nUeQ))\n return sorted(iXTm)", "def mRZU(Kp4Y):\n if not qJi5.Exists(Kp4Y):\n print(\"Image directory '\" + Kp4Y + \"' not found.\")\n return Non...
[ "0.633106", "0.6182086", "0.60495406", "0.6004823", "0.58684045", "0.5851099", "0.58083504", "0.58037215", "0.5783839", "0.5763506", "0.5748211", "0.5731935", "0.57069534", "0.5659177", "0.5637448", "0.56329757", "0.56315774", "0.5613083", "0.56036484", "0.5602641", "0.559801...
0.0
-1
Resets the position and orientation of the mocap bodies to the same values as the bodies they're welded to.
def Oj6e(YKHO): if YKHO.sim.model.eq_type is None or YKHO.sim.model.eq_obj1id is None or YKHO.sim.model.eq_obj2id is None: return for eKr7, pcnF, dUyC in zip(YKHO.sim.model.eq_type, YKHO.sim.model.eq_obj1id, YKHO.sim.model.eq_obj2id): if eKr7 != voT3.const.EQ_WELD: continue e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Oj6e(sg14):\n if sg14.model.eq_type is None or sg14.model.eq_obj1id is None or sg14.model.eq_obj2id is None:\n return\n for eKr7, pcnF, dUyC in zip(sg14.model.eq_type, sg14.model.eq_obj1id, sg14.model.eq_obj2id):\n if eKr7 != voT3.const.EQ_WELD:\n continue\n e7r9 = sg14.mo...
[ "0.6893635", "0.6499374", "0.6466375", "0.63432604", "0.63174415", "0.6309813", "0.6250218", "0.6250218", "0.6250218", "0.6227424", "0.5993534", "0.59932613", "0.5980894", "0.5974436", "0.5955571", "0.59437466", "0.59390795", "0.5894605", "0.58935535", "0.5870204", "0.5842682...
0.7228065
0
Given a set of observations known to belong to different states, construct an object that will estimate the probability that new observations belong to each state (i.e. the p_observations_given_state matrix)
def FIMM(YKHO, saMh, jsTm=True, WpkM=1): YKHO.continuous = jsTm saMh = [XTiz.asarray(cbZA) for cbZA in saMh] if jsTm: YKHO.state_distributions = [SdIb.gaussian_kde(cbZA) for cbZA in saMh] else: JCoA = max((cbZA.max() for cbZA in saMh)) U0wC = [XTiz.bincount(cbZA, minlength=JCoA) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xp6Y(YKHO, QTBn):\n CsWX = YKHO.latent_variable_markov_chain.index_dict[QTBn]\n return oyIN.random.choice(YKHO.observation_states, p=YKHO.emission_probabilities[CsWX, :])", "def FIMM(YKHO, _omM, Mwgh, ouh5, CGbr, Q1EH):\n YKHO.latent_variable_markov_chain = hL9B(transition_matrix=CGbr, states=['z{in...
[ "0.68669397", "0.6462204", "0.6262085", "0.6136685", "0.6117178", "0.60850716", "0.60375464", "0.59944856", "0.5964485", "0.5952044", "0.59156275", "0.5894562", "0.5868372", "0.5867635", "0.58412325", "0.5838576", "0.5836713", "0.58103794", "0.5797326", "0.5746525", "0.571440...
0.63312227
2
Given a set of state sequences, estimate the initial and transition probabilities for each state (i.e. the p_initial and p_transition matrices needed for HMM inference).
def ua8T(SYi8, WpkM=1, BSyd=True, Y4uC=1): SYi8 = XTiz.asarray(SYi8) exwG, a1PO = SYi8.shape KCHu = SYi8.max() + 1 WTt5 = XTiz.bincount(SYi8[:, 0], minlength=KCHu) + WpkM arXL = WTt5 / (exwG + KCHu * WpkM) VaTa = [] for YRbF in range(a1PO - 1): GYrd = SYi8[:, YRbF] YfHz = SYi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aefV(YJY3, MeGp):\n XP5J = oyIN.zeros(YJY3)\n for a1PO in MeGp:\n XP5J[a1PO.transitions()[0][0]] += 1.0\n return XP5J / len(MeGp)", "def A5g3(YJY3):\n _Fcw = oyIN.random.rand(YJY3, 1)\n _Fcw /= oyIN.sum(_Fcw, 0)\n assert oyIN.isclose(oyIN.sum(_Fcw, 0), 1.0)\n return _Fcw", "def ...
[ "0.6737312", "0.6540201", "0.643304", "0.64260924", "0.6414045", "0.6372045", "0.6327534", "0.63086444", "0.62992555", "0.62833136", "0.6242119", "0.61996263", "0.61793613", "0.6153507", "0.6136968", "0.6071576", "0.6045001", "0.6036908", "0.6011966", "0.5985723", "0.5974724"...
0.7366758
0
Given list of ``Tag`` instances, creates a string representation of the list suitable for editing by the user, such that submitting the given string representation back without changing it will give the same list of tags. Tag names which contain DELIMITER will be double quoted. Adapted from Taggit's _edit_string_for_ta...
def fRxz(dJ1p): ZWCE = [] TDw3 = gCuF.TAGGIT_SELECTIZE['DELIMITER'] for TZ9E in dJ1p: mWFP = TZ9E.name if TDw3 in mWFP or ' ' in mWFP: ZWCE.append('"%s"' % mWFP) else: ZWCE.append(mWFP) return TDw3.join(sorted(ZWCE))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yxFS(dJ1p):\n ZWCE = []\n CEk5 = False\n for TZ9E in dJ1p:\n mWFP = TZ9E.name\n if u',' in mWFP:\n ZWCE.append('\"%s\"' % mWFP)\n continue\n elif u' ' in mWFP:\n if not CEk5:\n CEk5 = True\n ZWCE.append(mWFP)\n if CEk5:\n ...
[ "0.74842143", "0.61348253", "0.60322964", "0.60187674", "0.5813906", "0.5634633", "0.5617626", "0.55532956", "0.55511045", "0.5493373", "0.54873353", "0.5473861", "0.5438646", "0.54261506", "0.54241925", "0.53745574", "0.53239423", "0.52918303", "0.52737874", "0.5259001", "0....
0.64570826
1
Returns the home page
def d6pt(): _hkX = Yxsy(TvZl('index.html', title='Home')) return _hkX
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kZiy() -> ImMB:\n return vja_()", "def vja_(YKHO) -> str:\n return YKHO._home_page", "def kZiy():\n return TvZl('home_page.html')", "def snQx(YKHO):\n return YKHO.home_url", "def kZiy():\n return TvZl('index.html', title='Home Page', year=qcWV.now().year)", "def C_QL():\n return TvZ...
[ "0.8479578", "0.83854204", "0.83666545", "0.8302552", "0.83024085", "0.8274201", "0.8258742", "0.8161644", "0.8155251", "0.8131846", "0.812928", "0.8122866", "0.8116592", "0.81114167", "0.81114167", "0.81114167", "0.81114167", "0.81114167", "0.81114167", "0.81114167", "0.8111...
0.0
-1
Return True if this is the last page in the pagination
def ogNq(Voci, GRQa, USOo): if GRQa <= Voci * USOo: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QiG9(YKHO):\n return YKHO.page == YKHO.last_page", "def _U5a(YKHO):\n if YKHO.countable:\n return False\n if YKHO.is_last_page:\n return False\n if int(YKHO.current_page + 1) * YKHO.page_size > YKHO.maximum_skip:\n return True\n return False", "def QiG9(Z9JV):\n e5kH ...
[ "0.9250832", "0.7880705", "0.7795402", "0.7709388", "0.76870424", "0.7639691", "0.7639691", "0.7639691", "0.75295895", "0.7466775", "0.72136486", "0.7156705", "0.71144503", "0.70103765", "0.69874054", "0.68787843", "0.67651737", "0.66790384", "0.66790384", "0.6663726", "0.664...
0.77416354
3
Read file and return content as a stripped list.
def Nwr9(Ux0P): with open(Ux0P, encoding='utf-8') as zZcM: return [zFiD.strip() for zFiD in zZcM.readlines()]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Nwr9(gIsw):\n with open(gIsw) as Gcbu:\n hGN5 = Gcbu.readlines()\n hGN5 = [WKvO.strip() for WKvO in hGN5]\n return hGN5", "def lXJo(AesY):\n with open(AesY, 'r') as eHNT:\n return [vC9B.strip() for vC9B in eHNT.readlines()]", "def kGys(VqRE):\n eHNT = open(VqRE, 'r')\n uCmi ...
[ "0.7674723", "0.7563142", "0.72854227", "0.72751176", "0.72298235", "0.7206775", "0.7123672", "0.7109992", "0.7086859", "0.7061591", "0.70553654", "0.7049348", "0.7041807", "0.70393634", "0.6996994", "0.6992688", "0.69166696", "0.6877113", "0.6812788", "0.6768067", "0.6765748...
0.67492896
22
Fuck m. It could mean minutes or months.
def VvKo(YKHO): with YKHO.assertRaises(ValueError): gnPz.parse_relative_time_string('+3m')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Shk4(YKHO):\n return YKHO.time_base * 60.0 * 24.0 * 365.0 / 12", "def AACM(YKHO):\n return YKHO.time_base * 60.0 * 24.0 * 365.0 / 12", "def O66n(input=None):\n return NMoC(input).minutes", "def cpvk(YKHO):\n return '%02d' % YKHO._month", "def Pd0P(YKHO):\n return YKHO._fmon", "def IfOg...
[ "0.6905258", "0.68023515", "0.6735644", "0.66758174", "0.6309507", "0.6303951", "0.62606466", "0.62517", "0.6237802", "0.62091005", "0.61038035", "0.60716474", "0.60693926", "0.60643584", "0.60643584", "0.6048454", "0.6048005", "0.6045694", "0.6035083", "0.5966593", "0.592882...
0.59682554
19
Gets the absolute URL of the detail page for a given Study instance.
def hlzF(YKHO): return gxEw('trait_browser:source:studies:pk:detail', kwargs={'pk': YKHO.pk})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hlzF(YKHO):\n return ('publication_detail', (), {'slug': YKHO.slug})", "def aJ4B(YKHO, YEnM):\n QePW = YKHO.context.get('request')\n return gxEw('exam-detail', args=[YEnM.id], request=QePW)", "def gmFE(YKHO):\n if YKHO._data.get('details_url'):\n pmON = YKHO._data.get('details_url')\n ...
[ "0.6810438", "0.6689379", "0.6567158", "0.64550245", "0.64396584", "0.64053893", "0.63963675", "0.6392365", "0.63474274", "0.63005847", "0.62952244", "0.6280981", "0.62611544", "0.62428", "0.62371224", "0.6232598", "0.62293047", "0.6219801", "0.62155926", "0.6194746", "0.6167...
0.7098282
0
Return a queryset of the current archived TaggedTraits from this study.
def NZEJ(YKHO): return XLL2.get_model('tags', 'TaggedTrait').objects.archived().filter(trait__source_dataset__source_study_version__study=YKHO).current()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wDze(YKHO):\n Ro3c = XLL2.get_model('tags', 'TaggedTrait').objects.archived().filter(trait=YKHO)\n return XLL2.get_model('tags', 'Tag').objects.filter(pk__in=Ro3c.values_list('tag__pk', flat=True))", "def JyRx(YKHO):\n return XLL2.get_model('tags', 'TaggedTrait').objects.current().non_archived().fil...
[ "0.77290195", "0.75084317", "0.72397757", "0.71252674", "0.65865415", "0.64593077", "0.64155614", "0.62145716", "0.61490464", "0.60586834", "0.6027033", "0.58406144", "0.5763332", "0.56548536", "0.5611018", "0.5603707", "0.5603707", "0.5603707", "0.55999005", "0.5566254", "0....
0.8213264
0
Return a queryset of the current nonarchived TaggedTraits from this study.
def JyRx(YKHO): return XLL2.get_model('tags', 'TaggedTrait').objects.current().non_archived().filter(trait__source_dataset__source_study_version__study=YKHO)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NZEJ(YKHO):\n return XLL2.get_model('tags', 'TaggedTrait').objects.archived().filter(trait__source_dataset__source_study_version__study=YKHO).current()", "def YBKw(YKHO):\n return XLL2.get_model('tags', 'TaggedTrait').objects.filter(trait__source_dataset__source_study_version__study=YKHO).current()", ...
[ "0.775637", "0.73766696", "0.708502", "0.68280214", "0.6783516", "0.6571693", "0.6464671", "0.6396007", "0.63075525", "0.611397", "0.6077231", "0.60213524", "0.59917337", "0.590065", "0.5870306", "0.58424973", "0.5763946", "0.57431793", "0.56793123", "0.56793123", "0.56793123...
0.82755035
0
Return a queryset of SourceTraits that are new in this version compared to past versions.
def Lpfd(YKHO): iKiR = YKHO.get_previous_version() XmIU = XLL2.get_model('trait_browser', 'SourceTrait') if iKiR is not None: umWR = XmIU.objects.filter(source_dataset__source_study_version=YKHO) vT0O = XmIU.objects.filter(source_dataset__source_study_version=iKiR).values_list('i_dbgap_varia...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zp6c(YKHO):\n return YKHO.study.sourcestudyversion_set.filter(i_version__lte=YKHO.i_version, i_date_added__lt=YKHO.i_date_added).order_by('-i_version', '-i_date_added')", "def yDEX(YKHO):\n iKiR = YKHO.get_previous_version()\n GTHl = XLL2.get_model('trait_browser', 'SourceDataset')\n if iKiR is n...
[ "0.6562757", "0.6290495", "0.6281095", "0.6281095", "0.6224384", "0.61902857", "0.6117538", "0.60669696", "0.59755343", "0.59755343", "0.59755343", "0.59755343", "0.59755343", "0.59755343", "0.59033275", "0.58881015", "0.5698667", "0.5668605", "0.5618832", "0.5610577", "0.560...
0.7811303
0
Gets the absolute URL of the detail page for a given SourceDataset instance.
def hlzF(YKHO): return gxEw('trait_browser:source:datasets:detail', kwargs={'pk': YKHO.pk})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hlzF(YKHO):\n return gxEw('source-detail', args=[str(YKHO.id)])", "def hlzF(YKHO):\n return gxEw('trait_browser:source:studies:pk:detail', kwargs={'pk': YKHO.pk})", "def hlzF(YKHO):\n return ('publication_detail', (), {'slug': YKHO.slug})", "def gmFE(YKHO):\n if YKHO._data.get('details_url'):...
[ "0.7320892", "0.71635264", "0.6769658", "0.66936725", "0.6665065", "0.66157633", "0.66050607", "0.658594", "0.65774614", "0.65592086", "0.6530993", "0.6519312", "0.6510253", "0.65062296", "0.65050864", "0.64783823", "0.64783823", "0.6441861", "0.6411554", "0.6410512", "0.6402...
0.75452507
0
Gets a list of trait_flavor_names for harmonized traits in this trait set version.
def mTh6(YKHO): return YKHO.harmonizedtrait_set.values_list('trait_flavor_name', flat=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HvRk(YKHO):\n return '{}_{}'.format(YKHO.i_trait_name, YKHO.harmonized_trait_set_version.harmonized_trait_set.i_flavor)", "def HiHB(YKHO):\n return YKHO.__class_traits__.keys()", "def RzcW(YKHO, **yIVm):\n return YKHO.traits(**yIVm).keys()", "def jdb0(Emd4):\n return Emd4.dbdriver.list_flavor...
[ "0.67714554", "0.6423445", "0.62995416", "0.6120722", "0.60873955", "0.5738161", "0.5715752", "0.57114977", "0.5705768", "0.56979", "0.56829286", "0.564801", "0.5582354", "0.55700886", "0.5551664", "0.5513089", "0.54857224", "0.54564124", "0.5443423", "0.5440488", "0.54381365...
0.8556329
0
Gets the absolute URL of the detail page for a given HarmonizedTraitSet instance.
def hlzF(YKHO): return gxEw('trait_browser:harmonized:traits:detail', kwargs={'pk': YKHO.pk})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hlzF(YKHO):\n return YKHO.harmonized_trait_set_version.get_absolute_url()", "def hlzF(YKHO):\n return gxEw('trait_browser:source:traits:detail', kwargs={'pk': YKHO.pk})", "def hlzF(YKHO):\n return gxEw('trait_browser:source:studies:pk:detail', kwargs={'pk': YKHO.pk})", "def hlzF(YKHO):\n retu...
[ "0.72508293", "0.70623827", "0.6548072", "0.64680207", "0.59867966", "0.59867966", "0.59520835", "0.59289813", "0.592246", "0.5918289", "0.58953965", "0.58434725", "0.5838052", "0.5814749", "0.57711065", "0.57669204", "0.57653147", "0.575038", "0.57430536", "0.5742923", "0.57...
0.7418204
0
Get a queryset of all the SourceTraits components for this harmonization unit (age, batch, or source).
def xtW8(YKHO): return YKHO.component_source_traits.all() | YKHO.component_batch_traits.all() | YKHO.component_age_traits.all()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Lpfd(YKHO):\n iKiR = YKHO.get_previous_version()\n XmIU = XLL2.get_model('trait_browser', 'SourceTrait')\n if iKiR is not None:\n umWR = XmIU.objects.filter(source_dataset__source_study_version=YKHO)\n vT0O = XmIU.objects.filter(source_dataset__source_study_version=iKiR).values_list('i_d...
[ "0.6352468", "0.60128826", "0.57998437", "0.56801885", "0.5599534", "0.5557096", "0.5557096", "0.52780604", "0.52433515", "0.5181923", "0.5181923", "0.5181923", "0.5181923", "0.5181923", "0.5181923", "0.5181923", "0.5181923", "0.5181923", "0.49282494", "0.49022794", "0.490198...
0.71494865
0
Gets the absolute URL of the detail page for a given SourceTrait instance.
def hlzF(YKHO): return gxEw('trait_browser:source:traits:detail', kwargs={'pk': YKHO.pk})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hlzF(YKHO):\n return gxEw('source-detail', args=[str(YKHO.id)])", "def hlzF(YKHO):\n return gxEw('trait_browser:source:studies:pk:detail', kwargs={'pk': YKHO.pk})", "def hlzF(YKHO):\n return gxEw('trait_browser:harmonized:traits:detail', kwargs={'pk': YKHO.pk})", "def hlzF(YKHO):\n return gxE...
[ "0.7119291", "0.7097896", "0.6950301", "0.6894759", "0.6431965", "0.63921607", "0.636551", "0.635845", "0.62975645", "0.62486935", "0.6246613", "0.62231576", "0.6212547", "0.6189846", "0.6181484", "0.6181484", "0.61728066", "0.6160209", "0.6159289", "0.615591", "0.6154543", ...
0.7710777
0
Return queryset of archived tags linked to this trait.
def wDze(YKHO): Ro3c = XLL2.get_model('tags', 'TaggedTrait').objects.archived().filter(trait=YKHO) return XLL2.get_model('tags', 'Tag').objects.filter(pk__in=Ro3c.values_list('tag__pk', flat=True))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def diFv(YKHO):\n HtoD = XLL2.get_model('tags', 'TaggedTrait').objects.non_archived().filter(trait=YKHO)\n return XLL2.get_model('tags', 'Tag').objects.filter(pk__in=HtoD.values_list('tag__pk', flat=True))", "def NZEJ(YKHO):\n return XLL2.get_model('tags', 'TaggedTrait').objects.archived().filter(trait_...
[ "0.7533448", "0.74357784", "0.6842906", "0.6513351", "0.6450949", "0.63617426", "0.6330386", "0.630018", "0.6280889", "0.62478477", "0.6202606", "0.610521", "0.60856485", "0.6033715", "0.60267216", "0.60267216", "0.60267216", "0.60267216", "0.60267216", "0.60267216", "0.60267...
0.8736017
0
Return queryset of nonarchived tags linked to this trait.
def diFv(YKHO): HtoD = XLL2.get_model('tags', 'TaggedTrait').objects.non_archived().filter(trait=YKHO) return XLL2.get_model('tags', 'Tag').objects.filter(pk__in=HtoD.values_list('tag__pk', flat=True))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JyRx(YKHO):\n return XLL2.get_model('tags', 'TaggedTrait').objects.current().non_archived().filter(trait__source_dataset__source_study_version__study=YKHO)", "def wDze(YKHO):\n Ro3c = XLL2.get_model('tags', 'TaggedTrait').objects.archived().filter(trait=YKHO)\n return XLL2.get_model('tags', 'Tag').o...
[ "0.80429226", "0.7348492", "0.6551791", "0.6469715", "0.64208716", "0.63318914", "0.63318914", "0.6299178", "0.6227882", "0.6208177", "0.6100119", "0.6100119", "0.6100119", "0.6100119", "0.6100119", "0.6100119", "0.6100119", "0.6100119", "0.60505265", "0.60505265", "0.6050489...
0.8711702
0
Gets the absolute URL of the detail page for a given HarmonizedTrait instance. In this special case, goes to the detail page for the related trait set.
def hlzF(YKHO): return YKHO.harmonized_trait_set_version.get_absolute_url()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hlzF(YKHO):\n return gxEw('trait_browser:harmonized:traits:detail', kwargs={'pk': YKHO.pk})", "def hlzF(YKHO):\n return gxEw('trait_browser:source:traits:detail', kwargs={'pk': YKHO.pk})", "def hlzF(YKHO):\n return gxEw('trait_browser:source:studies:pk:detail', kwargs={'pk': YKHO.pk})", "def hlz...
[ "0.76464415", "0.71848196", "0.64087236", "0.62061286", "0.6132978", "0.61097914", "0.6106136", "0.6106136", "0.6096563", "0.6088155", "0.60717404", "0.59662586", "0.5956779", "0.59459764", "0.593614", "0.5929176", "0.5916748", "0.5908745", "0.5904925", "0.58962184", "0.58962...
0.6393083
3
Build personalization instance from a dict
def XNod(YKHO, **B2fa): SjOE = dmKJ() okyX = set(P2iJ.PERSONALIZATION_KEYS).intersection(set(B2fa.keys())) if okyX: for H5ew in okyX: ZfUD = B2fa.get(H5ew) if ZfUD: if H5ew in P2iJ.EMAIL_KEYS and (not isinstance(ZfUD, list)): ZfUD = ZfUD.sp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)", "def eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)", "def fz1O(SjOE):\n MOSS = dmKJ()\n for aUT8 in SjOE['to_list']:\n SjOE.add_to(aUT8)\n for W3H0 in SjOE['cc_list']:\n SjOE.add_to(W3H0)\n for Nxk3 in SjOE['bcc_list']:\n SjOE.add_b...
[ "0.63244694", "0.63244694", "0.6232753", "0.6030198", "0.5900351", "0.58583313", "0.5845706", "0.58420676", "0.58329755", "0.5826959", "0.58106136", "0.579965", "0.5711809", "0.57004213", "0.57004213", "0.57004213", "0.57004213", "0.57004213", "0.57004213", "0.57004213", "0.5...
0.6677979
0
Update prefix with operator with best price.
def IIlB(YKHO, y0cW: str, seET: Operator): Vb75: h8nf[uS0y] = YKHO.lookup(y0cW) if Vb75: CkaT = Vb75.price_for_prefix(y0cW) if CkaT: if seET.has_better_price_for_prefix(y0cW, CkaT): YKHO.add_prefix(prefix=y0cW, operator=seET) else: YKHO.add_prefix(prefix=y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DDSA(YKHO, seET: Operator):\n if not isinstance(seET, uS0y):\n raise TypeError(f'operator expected to be of type `Operator` but got type {type(seET)}')\n for y0cW in seET.rates.keys():\n YKHO._update_prefix(prefix=y0cW, operator=seET)", "def QdZT(YKHO, hI0L, akib):\n if hI0L > YKHO.hig...
[ "0.6310741", "0.57850754", "0.57514006", "0.54723537", "0.54526275", "0.5421909", "0.53711325", "0.5362892", "0.5342558", "0.52658045", "0.5223748", "0.5185856", "0.51810634", "0.51768", "0.5171346", "0.5168897", "0.5147008", "0.50996333", "0.50994164", "0.50994164", "0.50835...
0.7551244
0
Find if a given number a prefix in cache.
def neBz(YKHO, FGW3: str) -> h8nf[str]: if FGW3 in YKHO.data: return FGW3 else: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BYxH(YKHO, y0cW):\n U5bT = True\n ZbOB = YKHO.trie\n for YRbF, Npgh in enumerate(y0cW):\n ZbOB = ZbOB.get(Npgh, {})\n if ZbOB:\n continue\n else:\n break\n if YRbF == len(y0cW) - 1:\n U5bT = True\n else:\n U5bT = False\n return U5bT", ...
[ "0.6720833", "0.6547649", "0.6462857", "0.64407134", "0.6428188", "0.6415573", "0.62809837", "0.6258059", "0.61898506", "0.6167757", "0.6164689", "0.6134488", "0.61225975", "0.6088009", "0.60353285", "0.6033145", "0.6019844", "0.59988034", "0.5941386", "0.59368086", "0.591884...
0.53415996
84
Updates `PrefixCache` with data from given operator.
def DDSA(YKHO, seET: Operator): if not isinstance(seET, uS0y): raise TypeError(f'operator expected to be of type `Operator` but got type {type(seET)}') for y0cW in seET.rates.keys(): YKHO._update_prefix(prefix=y0cW, operator=seET)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IIlB(YKHO, y0cW: str, seET: Operator):\n Vb75: h8nf[uS0y] = YKHO.lookup(y0cW)\n if Vb75:\n CkaT = Vb75.price_for_prefix(y0cW)\n if CkaT:\n if seET.has_better_price_for_prefix(y0cW, CkaT):\n YKHO.add_prefix(prefix=y0cW, operator=seET)\n else:\n YKHO.add_pr...
[ "0.7683273", "0.6553203", "0.64049375", "0.52432764", "0.51866513", "0.51246953", "0.5072463", "0.5072463", "0.5058224", "0.50360274", "0.5033406", "0.49451602", "0.49146992", "0.48742005", "0.4850131", "0.4843754", "0.47898152", "0.47546908", "0.47544464", "0.47422978", "0.4...
0.68408626
1
Yield successive nsized chunks from l.
def eHxA(qw7D, zNig: int): for YRbF in range(0, len(qw7D), zNig): yield qw7D[YRbF:YRbF + zNig]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xJ0H(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B) + 1, exwG):\n yield vC9B[YRbF:YRbF + exwG]", "def eHxA(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield vC9B[YRbF:YRbF + exwG]", "def I7IE(vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield ...
[ "0.8038813", "0.79248375", "0.7923423", "0.7885103", "0.78773195", "0.7815877", "0.77655786", "0.77556044", "0.77441615", "0.7731815", "0.77288336", "0.772473", "0.77028215", "0.76889825", "0.76889825", "0.7664208", "0.76570904", "0.7655856", "0.7655856", "0.76458347", "0.764...
0.0
-1
Return a list of cleaned word tokens from the raw review
def NaK2(Slbv): QgKW = rKuS(Slbv).get_text().lower() QgKW = ZbWC.sub('(:\\))', ' SM1', QgKW) QgKW = ZbWC.sub('(:\\()', ' SM2', QgKW) QgKW = ZbWC.sub('(!)', ' SM3', QgKW) QgKW = ZbWC.sub('(\\?)', ' SM4', QgKW) QgKW = ZbWC.sub('not\\s\\b(.*?)\\b', 'not_\\1', QgKW) E7mV = ZbWC.sub('[^a-zA-Z\\_(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wr3U(Slbv):\n eOtH = lLeP(Rt_s(Slbv))\n return [eOtH.split() for eOtH in oGub(eOtH) if eOtH not in vDyF]", "def zHX6(Slbv):\n V22M = Slbv.lower().split()\n V22M = [yzQ0 for yzQ0 in V22M]\n return V22M", "def OTws(przZ):\n b0j5 = M9Fq('\\\\w+')\n s2mk = b0j5.tokenize(przZ.lower())\n ...
[ "0.7750979", "0.7179433", "0.717803", "0.7157436", "0.7142787", "0.6961613", "0.69389796", "0.67973894", "0.67853844", "0.6727003", "0.66734666", "0.6642047", "0.66097176", "0.6597971", "0.6580113", "0.65595573", "0.6555122", "0.6553047", "0.65236735", "0.65034825", "0.650111...
0.6859479
7
Get the latest version of an artifact from Pulse.
def nSSr(QaO6, B5PH, NtEF, jTXt, oUZx, mWFP, Ux0P, EtM5): N5z6 = gd1d.ServerProxy(QaO6 + 'xmlrpc') eOtH = N5z6.RemoteApi.login(NtEF, jTXt) NtVn = N5z6.RemoteApi.getLatestBuildsForProject(eOtH, B5PH, '', True, 100) jvvj = [Fg_i for Fg_i in NtVn if Fg_i['status'] == 'success'] if not jvvj: rai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def svgl():\n try:\n return GtGV.success({'version': DpZH.latest_version()})\n except DpZH.Error as e:\n return (GtGV.error(str(tTpl)), 200)", "async def get_latest_version(YKHO, sKYw: str) -> h8nf[str]:\n return None", "def oJou(YKHO):\n QTBn = YKHO.coordinator.data\n try:\n ...
[ "0.6555443", "0.6440459", "0.6415911", "0.63127923", "0.62560815", "0.6184736", "0.61423135", "0.6134404", "0.6098685", "0.6094916", "0.60846007", "0.60613364", "0.6056806", "0.6047666", "0.6035648", "0.60355157", "0.603404", "0.5991332", "0.58877105", "0.5863567", "0.5862828...
0.58272386
22
Preprocess requests by attempting to extract face image, and transforming to fit the model's input Returns list of NDArray Processed images in the model's expected input shape
def biH0(YKHO, QePW): e5N9 = [] GhuM = YKHO.signature['inputs'][0]['data_shape'] [H2v2, TVTK] = GhuM[2:] _N6A = YKHO.signature['inputs'][0]['data_name'] for or8S, nPrm in enumerate(QePW): VXjJ = nPrm.get(_N6A) if VXjJ is None: VXjJ = nPrm.get('body') if VXjJ is No...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def biH0(YKHO, QePW):\n e5N9 = []\n _N6A = YKHO.signature['inputs'][0]['data_name']\n GhuM = YKHO.signature['inputs'][0]['data_shape']\n for or8S, nPrm in enumerate(QePW):\n VXjJ = nPrm.get(_N6A)\n if VXjJ is None:\n VXjJ = nPrm.get('body')\n if VXjJ is None:\n ...
[ "0.73400545", "0.6653662", "0.65381366", "0.65293646", "0.6363785", "0.6331957", "0.6321112", "0.6304423", "0.62506974", "0.6235382", "0.6233115", "0.6188294", "0.61358917", "0.61200666", "0.6102832", "0.60749215", "0.6074793", "0.6067623", "0.6028816", "0.6026498", "0.602559...
0.81999916
0
Unmutes everyone that you have muted
def mUyx(): UGFg = set(a1PO.mutes.users.ids(screen_name=WLin)['ids']) BNIk = set([]) for uJjO in UGFg: if uJjO not in BNIk: a1PO.mutes.users.destroy(user_id=uJjO) print('unmuted %d' % uJjO)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def unmute(YKHO, OaeV, CBIr: Redeemed):\n if mS46 == None or mS46 == OaeV.message.author:\n await OaeV.send('You cannot unmute yourself!')\n return\n await CBIr.remove_roles(ZOrr.utils.get(OaeV.guild.roles, name='Muted'))\n await OaeV.send(f'{CBIr.mention} has been unmuted')", "async...
[ "0.7793159", "0.7562203", "0.7182035", "0.71422404", "0.71150947", "0.70955354", "0.7093954", "0.709301", "0.7084421", "0.7016341", "0.7013622", "0.68202204", "0.68122566", "0.67613274", "0.6734327", "0.6710592", "0.665197", "0.6545975", "0.6484686", "0.6455824", "0.64350253"...
0.8222266
0
Generate one random control character.
def KWew(): vQ4U = ('0000', '001F') return [sfxF(hcXw) for hcXw in range(int(vQ4U[0], 16), int(vQ4U[1], 16) + 1)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VR0L() -> chr:\n return chr(int(tuKI.randrange(32, 126, 1)))", "def R71E():\n return chr(tuKI.randrange(32, 126, 1))", "def wAgY():\n return chr(ajWY(97, 122))", "def R71E(ASFv):\n hcXw = ASFv[icr8.randrange(len(ASFv))]\n return hcXw", "def CbOq():\n mLGw = tuKI.randint(0, 26 + 26 + 1...
[ "0.78689873", "0.77449274", "0.72392774", "0.713114", "0.69535005", "0.68568593", "0.68473285", "0.6614242", "0.6555148", "0.65427595", "0.65427595", "0.6520578", "0.6508524", "0.643668", "0.636383", "0.63543737", "0.63341427", "0.62676865", "0.6259865", "0.6254233", "0.62498...
0.69967866
4
Extend `unichr` for all possible Unicode values (n).
def sfxF(exwG): try: return mYtf(exwG) except ValueError: CZ9a = BlNT.pack('i', exwG) return CZ9a.decode('utf-32')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Oxsx(Tqds):\n if VOoL:\n return mYtf(Tqds)\n return chr(Tqds)", "def CMS7():\n for mLGw in range(300, 320):\n yield mYtf(mLGw)", "def X1fc(Aoz5):\n try:\n return mYtf(Aoz5)\n except ValueError:\n KCHu = '\\\\U%08x' % Aoz5\n return KCHu.decode('unicode-escap...
[ "0.68852764", "0.6683728", "0.6391506", "0.59930366", "0.586188", "0.58399165", "0.58334017", "0.5817205", "0.56382495", "0.5589591", "0.55534005", "0.54915816", "0.5490308", "0.5472899", "0.5450932", "0.5440723", "0.54287136", "0.5352844", "0.53169405", "0.5304779", "0.52560...
0.7051785
0
Test ``create_engine`` with invalid adapter.
def m9Rs(): eHpk = y2U9('shillelagh://') with trZe.raises(jvnz) as zK6_: TQJD('dummy://', PnAT(bind=eHpk), autoload=True) assert str(zK6_.value) == 'Unsupported table: dummy://'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def txzs():\n if not vAK3():\n print('Binding new engine')\n tAzW(y2U9('sqlite:///:memory:', echo=True))", "def Jrq6(YKHO):\n GPtr = {'url': 'sqlite://', 'connect_args': {'check_same_thread': 'false', 'poolclass': 'pool.StaticPool'}}\n eHpk = YKHO.configurator.setup_engine(GPtr)\n YKHO....
[ "0.68235004", "0.66725576", "0.6549929", "0.6455361", "0.62477577", "0.6210242", "0.61840785", "0.61660314", "0.6095915", "0.60754657", "0.60633755", "0.6048799", "0.59452164", "0.5927696", "0.58780146", "0.5844836", "0.5800548", "0.57547444", "0.5749329", "0.57365346", "0.57...
0.83949554
0
Store Pandas DataFrame to csv file and upload it to bucket if ext_filename is set
def fNRN(YKHO, jQ3Z, LrLT, eIhl=True): GkAb(Hy7s.path.dirname(LrLT)).mkdir(parents=True, exist_ok=True) if jQ3Z is not None and len(jQ3Z) > 0: jQ3Z.to_csv(LrLT, header=eIhl, index_label='id') G9jH.info('Stored data to {}'.format(LrLT)) else: open(LrLT, 'a').close() G9jH.info(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qkDo(jQ3Z, nUeQ, WE7e=gCuF.ASSETS.BUCKET):\n UXEK = uwwb().name\n jQ3Z.to_csv(UXEK, compression='gzip', index=False)\n wilN(WE7e, UXEK, nUeQ)", "def aVpL(YKHO, WE7e, H5ew, jQ3Z, Rrsh=None, **B2fa):\n ZOua = jQ3Z.to_csv(**B2fa)\n if Rrsh == 'gzip':\n ZOua = YKHO._gzip_str(ZOua)\n elif...
[ "0.73861694", "0.7355157", "0.7178081", "0.70948577", "0.68517673", "0.6824397", "0.6741467", "0.669252", "0.66792345", "0.6650497", "0.64886904", "0.6458609", "0.6369256", "0.6365549", "0.6350224", "0.6322278", "0.6280271", "0.6247275", "0.6216646", "0.62012947", "0.62007916...
0.6855781
4
Assert that an invalid response_type redirects back to the redirect_uri and provides the expected error response.
def fGGK(YKHO): sYft = YKHO.valid_params.copy() sYft['response_type'] = 'invalid_code' t3eI = jKi7.text_type(qxeD.uuid4()) geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft) YKHO.assertValidRedirect(response=geh0, expected_status_code=302, redirect_uri=sYft['redir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q3XZ(YKHO):\n _hkX = YKHO.r(VrQA(E4zG.HTTP_201_CREATED, redirect_url='http://google.com/'))\n YKHO.assertIsInstance(_hkX, CwzH.wrappers.Response)\n YKHO.assertEqual(302, _hkX.status_code)\n YKHO.assertEqual('http://google.com/', _hkX.location)", "def YnSG(YKHO, x4rM):\n YKHO._mock_response(x4r...
[ "0.75191337", "0.72961164", "0.7171664", "0.70651674", "0.6875958", "0.67515904", "0.6627203", "0.6615773", "0.65987235", "0.6589537", "0.6552112", "0.6536879", "0.6508044", "0.6480439", "0.63691235", "0.6355215", "0.6341384", "0.6288093", "0.62804973", "0.62268054", "0.61819...
0.7701483
0
Assert that an nonexistent response_type redirects back to the redirect_uri and provides the expected error response.
def ove6(YKHO): sYft = YKHO.valid_params.copy() del sYft['response_type'] t3eI = jKi7.text_type(qxeD.uuid4()) geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft) YKHO.assertValidRedirect(response=geh0, expected_status_code=302, redirect_uri=sYft['redirect_uri'], er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fGGK(YKHO):\n sYft = YKHO.valid_params.copy()\n sYft['response_type'] = 'invalid_code'\n t3eI = jKi7.text_type(qxeD.uuid4())\n geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft)\n YKHO.assertValidRedirect(response=geh0, expected_status_code=302, redirect_uri=s...
[ "0.7420597", "0.7164122", "0.6910888", "0.6648324", "0.6642587", "0.6474151", "0.64672065", "0.6405829", "0.6382179", "0.6363759", "0.63207835", "0.6319008", "0.62895614", "0.6289121", "0.62787527", "0.6247881", "0.6192791", "0.61116356", "0.61116356", "0.60881925", "0.608715...
0.73475444
1
Assert that a nonexistent client redirects back to the redirect_uri and provides the expected error response.
def gV1_(YKHO): sYft = YKHO.valid_params.copy() del sYft['client_id'] t3eI = jKi7.text_type(qxeD.uuid4()) geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft) YKHO.assertValidRedirect(response=geh0, expected_status_code=302, redirect_uri=sYft['redirect_uri'], error=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q3XZ(YKHO):\n _hkX = YKHO.r(VrQA(E4zG.HTTP_201_CREATED, redirect_url='http://google.com/'))\n YKHO.assertIsInstance(_hkX, CwzH.wrappers.Response)\n YKHO.assertEqual(302, _hkX.status_code)\n YKHO.assertEqual('http://google.com/', _hkX.location)", "def g8_x(YKHO):\n sYft = YKHO.valid_params.copy...
[ "0.7657027", "0.7071766", "0.6945941", "0.6851474", "0.68442667", "0.6824086", "0.6791853", "0.67458946", "0.67314863", "0.66679996", "0.6664417", "0.6653209", "0.6645142", "0.6616033", "0.65255606", "0.6516541", "0.6504525", "0.6504525", "0.6461596", "0.64065444", "0.6398890...
0.6766306
7
Assert that an invalid client redirects back to the redirect_uri and provides the expected error response.
def g8_x(YKHO): sYft = YKHO.valid_params.copy() sYft['client_id'] = 'invalid_client' t3eI = jKi7.text_type(qxeD.uuid4()) geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft) YKHO.assertValidRedirect(response=geh0, expected_status_code=302, redirect_uri=sYft['redirec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q3XZ(YKHO):\n _hkX = YKHO.r(VrQA(E4zG.HTTP_201_CREATED, redirect_url='http://google.com/'))\n YKHO.assertIsInstance(_hkX, CwzH.wrappers.Response)\n YKHO.assertEqual(302, _hkX.status_code)\n YKHO.assertEqual('http://google.com/', _hkX.location)", "def oVSa(YKHO):\n sYft = YKHO.valid_params.copy...
[ "0.7972389", "0.7369733", "0.72958344", "0.71539176", "0.7042015", "0.70395124", "0.69947994", "0.6865802", "0.68044996", "0.6787957", "0.67493385", "0.6748754", "0.6746671", "0.66689926", "0.6647042", "0.66368335", "0.65603876", "0.65603876", "0.6511094", "0.64935255", "0.64...
0.7174641
3
Assert that an invalid scope redirects back to the redirect_uri and provides the expected error response.
def chRC(YKHO): sYft = YKHO.valid_params.copy() sYft['scope'] = 'invalid_scope' t3eI = jKi7.text_type(qxeD.uuid4()) geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft) YKHO.assertValidRedirect(response=geh0, expected_status_code=302, redirect_uri=sYft['redirect_uri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oVSa(YKHO):\n sYft = YKHO.valid_params.copy()\n sYft['redirect_uri'] = 'not_a_valid_uri'\n t3eI = jKi7.text_type(qxeD.uuid4())\n geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft)\n YKHO.assertEqual(400, geh0.status_code)\n YKHO.assertIsNotNone(geh0.json)\n...
[ "0.75373936", "0.7251968", "0.7147685", "0.7066093", "0.6928313", "0.6903567", "0.66213906", "0.65763414", "0.65235853", "0.6513123", "0.6497357", "0.626261", "0.61775184", "0.61602324", "0.61488956", "0.6142485", "0.6129963", "0.6106142", "0.60907656", "0.5985967", "0.598029...
0.7770297
0
Assert that a nonexistent scope redirects back to the redirect_uri and provides the expected error response.
def H2WX(YKHO): sYft = YKHO.valid_params.copy() del sYft['scope'] t3eI = jKi7.text_type(qxeD.uuid4()) geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft) YKHO.assertValidRedirect(response=geh0, expected_status_code=302, redirect_uri=sYft['redirect_uri'], error='inv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def chRC(YKHO):\n sYft = YKHO.valid_params.copy()\n sYft['scope'] = 'invalid_scope'\n t3eI = jKi7.text_type(qxeD.uuid4())\n geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft)\n YKHO.assertValidRedirect(response=geh0, expected_status_code=302, redirect_uri=sYft['re...
[ "0.75156254", "0.7148414", "0.7028421", "0.7019475", "0.7017566", "0.67602414", "0.6492892", "0.6403846", "0.6372125", "0.62288857", "0.6219358", "0.6178828", "0.6163945", "0.61515033", "0.6126656", "0.6096851", "0.60844594", "0.6039896", "0.6037854", "0.6014855", "0.5999588"...
0.72937465
1
Assert that a nonexistent redirect_uri returns a 400 message with the appropriate error message encoded in the body of the response.
def huL3(YKHO): sYft = YKHO.valid_params.copy() del sYft['redirect_uri'] t3eI = jKi7.text_type(qxeD.uuid4()) geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft) YKHO.assertEqual(400, geh0.status_code) YKHO.assertIsNotNone(geh0.json) YKHO.assertEqual('invali...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oVSa(YKHO):\n sYft = YKHO.valid_params.copy()\n sYft['redirect_uri'] = 'not_a_valid_uri'\n t3eI = jKi7.text_type(qxeD.uuid4())\n geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **sYft)\n YKHO.assertEqual(400, geh0.status_code)\n YKHO.assertIsNotNone(geh0.json)\n...
[ "0.7718685", "0.7033793", "0.6927159", "0.69097126", "0.69086397", "0.6898485", "0.6685903", "0.66302705", "0.65627855", "0.652894", "0.6524669", "0.649647", "0.6418248", "0.6401584", "0.6385468", "0.6310627", "0.6294222", "0.62791204", "0.6268177", "0.6264218", "0.62368065",...
0.7158007
1
This test ensures that a failed authorize request against the oauth endpoint succeeds with expected values.
def YnSG(YKHO, x4rM): YKHO._mock_response(x4rM, valid=False) t3eI = jKi7.text_type(qxeD.uuid4()) geh0 = YKHO.get_json(path='/openid/authorize_return', expect_errors=True, state=t3eI, **YKHO.valid_params) vSyi = YKHO.valid_params['sb_redirect_uri'] YKHO.assertValidRedirect(response=geh0, expected_sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jaf2(YKHO):\n t3eI = jKi7.text_type(qxeD.uuid4())\n geh0 = YKHO.get_json(path='/openid/authorize', expect_errors=True, state=t3eI, **YKHO.valid_params)\n YKHO.assertEqual(303, geh0.status_code)\n Rci7 = geh0.headers.get('Location')\n eQlZ = KVWQ.urlparse(Rci7)\n SGPK = KVWQ.parse_qs(eQlZ[4])\...
[ "0.7597083", "0.7115931", "0.694993", "0.68572766", "0.68270195", "0.6803584", "0.6794347", "0.676999", "0.67678714", "0.6765921", "0.67112833", "0.6678244", "0.6673607", "0.6663366", "0.66527706", "0.6631267", "0.6621901", "0.6595489", "0.65829533", "0.65740633", "0.6573677"...
0.64417315
33
If the oauth response to storyboard is valid, but does not include a first name, it should error.
def JC8k(YKHO, x4rM): YKHO._mock_response(x4rM, valid=True) t3eI = jKi7.text_type(qxeD.uuid4()) sYft = YKHO.valid_params.copy() del sYft['openid.sreg.fullname'] geh0 = YKHO.get_json(path='/openid/authorize_return', expect_errors=True, state=t3eI, **sYft) vSyi = YKHO.valid_params['sb_redirect_uri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def amiU(YKHO):\n nPrm = YKHO.user_data.copy()\n nPrm.pop('first_name')\n geh0 = YKHO.client.post(YKHO.url, nPrm, format='json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD_REQUEST)\n YKHO.assertEqual(geh0.data.get('message').get('first_name')[0], 'This field is required.')", "def aBwH(...
[ "0.6980607", "0.67532706", "0.6614332", "0.6510425", "0.64004356", "0.6313224", "0.6111399", "0.6058819", "0.59927726", "0.5954338", "0.5952154", "0.59172636", "0.59120643", "0.5908101", "0.59018046", "0.5901233", "0.59007126", "0.58297175", "0.58180857", "0.57916963", "0.578...
0.56890607
27
If the oauth response to storyboard is valid, but does not include a first name, it should error.
def n0cv(YKHO, x4rM): YKHO._mock_response(x4rM, valid=True) t3eI = jKi7.text_type(qxeD.uuid4()) sYft = YKHO.valid_params.copy() del sYft['openid.sreg.email'] geh0 = YKHO.get_json(path='/openid/authorize_return', expect_errors=True, state=t3eI, **sYft) vSyi = YKHO.valid_params['sb_redirect_uri'] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def amiU(YKHO):\n nPrm = YKHO.user_data.copy()\n nPrm.pop('first_name')\n geh0 = YKHO.client.post(YKHO.url, nPrm, format='json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD_REQUEST)\n YKHO.assertEqual(geh0.data.get('message').get('first_name')[0], 'This field is required.')", "def aBwH(...
[ "0.69797575", "0.6752162", "0.6614019", "0.6509065", "0.6398914", "0.63115096", "0.6110045", "0.60614777", "0.5992452", "0.5954809", "0.59498775", "0.5918439", "0.5910095", "0.5906559", "0.59022", "0.5900585", "0.59002507", "0.58284384", "0.5816681", "0.579075", "0.57799935",...
0.0
-1
This test ensures that the access token request may execute properly with a valid token.
def nERW(YKHO): with P8oC.HybridSessionManager(): dZ03 = bb7c.authorization_code_save({'user_id': 2, 'state': 'test_state', 'code': 'test_valid_code'}) m5r4 = 'application/x-www-form-urlencoded' geh0 = YKHO.app.post('/v1/openid/token', params={'code': dZ03.code, 'grant_type': 'authorization_code'}, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NfJg(YKHO):\n pass", "def N7Pk(YKHO):\n pass", "def S_CB(YKHO):\n x0hE = FeDH.Client(YKHO.consumer, None)\n _hkX, hGN5 = x0hE.request(YKHO._uri('request_token'), 'GET')\n YKHO.assertEqual(int(_hkX['status']), 200)", "def cV2t(YKHO):\n x0hE = FeDH.Client(YKHO.consumer, None)\n _hkX, h...
[ "0.8008994", "0.79901123", "0.7986423", "0.7827258", "0.76730573", "0.7581791", "0.7542795", "0.7538852", "0.7517634", "0.7500351", "0.7455751", "0.7445823", "0.7411423", "0.73875546", "0.7371738", "0.7253156", "0.72491294", "0.72450924", "0.72399", "0.7238495", "0.72369736",...
0.82178074
0
This test ensures that invalid grant_type parameters get the appropriate error response.
def Kvli(YKHO): with P8oC.HybridSessionManager(): dZ03 = bb7c.authorization_code_save({'user_id': 2, 'state': 'test_state', 'code': 'test_valid_code', 'expires_in': 300}) m5r4 = 'application/x-www-form-urlencoded' geh0 = YKHO.app.post('/v1/openid/token', params={'code': dZ03.code, 'grant_type': 'inv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def z8GU(YKHO):\n QePW = YKHO.generateValidTokenRequest(arguments={'grant_type': b'grantType\\xff\\xff'}, authentication=YKHO._VALID_CLIENT)\n Aofo = YKHO._TOKEN_RESOURCE.render_POST(QePW)\n YKHO.assertFailedTokenRequest(QePW, Aofo, ZAzL('grant_type'), msg='Expected the token resource to reject a request ...
[ "0.772801", "0.72654927", "0.726257", "0.70829815", "0.68463784", "0.677205", "0.6727337", "0.6633874", "0.651238", "0.6486372", "0.6486188", "0.64548945", "0.6451076", "0.6325722", "0.62595737", "0.6252418", "0.6246032", "0.6237852", "0.6236558", "0.6236232", "0.61953956", ...
0.8002551
0
This test ensures that invalid grant_type parameters get the appropriate error response.
def Z7bA(YKHO): m5r4 = 'application/x-www-form-urlencoded' geh0 = YKHO.app.post('/v1/openid/token', params={'code': 'invalid_access_token', 'grant_type': 'invalid_grant_type'}, content_type=m5r4, expect_errors=True) YKHO.assertEqual(400, geh0.status_code) YKHO.assertIsNotNone(geh0.json) YKHO.assertE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Kvli(YKHO):\n with P8oC.HybridSessionManager():\n dZ03 = bb7c.authorization_code_save({'user_id': 2, 'state': 'test_state', 'code': 'test_valid_code', 'expires_in': 300})\n m5r4 = 'application/x-www-form-urlencoded'\n geh0 = YKHO.app.post('/v1/openid/token', params={'code': dZ03.code, 'grant_ty...
[ "0.8002551", "0.772801", "0.72654927", "0.70829815", "0.68463784", "0.677205", "0.6727337", "0.6633874", "0.651238", "0.6486372", "0.6486188", "0.64548945", "0.6451076", "0.6325722", "0.62595737", "0.6252418", "0.6246032", "0.6237852", "0.6236558", "0.6236232", "0.61953956", ...
0.726257
3
This test ensures that an invalid refresh token can be converted into a valid access token.
def eIrQ(YKHO): m5r4 = 'application/x-www-form-urlencoded' F1zQ = YKHO.app.post('/v1/openid/token', params={'refresh_token': 'invalid_refresh_token', 'grant_type': 'refresh_token'}, content_type=m5r4, expect_errors=True) YKHO.assertEqual(401, F1zQ.status_code) YKHO.assertIsNotNone(F1zQ.json) YKHO.as...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dJBO(YKHO):\n YKHO.legacy_client._client._expires_at = 1\n YKHO.legacy_client.token['refresh_token'] = 'invalidrefreshtoken'\n geh0 = YKHO.legacy_client.request('GET', TDhU(zDeW, cRR7))\n YKHO.assertEquals(geh0.content, l3V7)", "def KBmc(YKHO):\n YKHO.legacy_client._client.access_token = 'inva...
[ "0.77855164", "0.7776032", "0.76719224", "0.76533115", "0.73654115", "0.7338942", "0.7290583", "0.7267676", "0.7238647", "0.71473265", "0.7119978", "0.7110751", "0.70527965", "0.7029916", "0.69989884", "0.69802237", "0.69181126", "0.6860301", "0.68478835", "0.6846695", "0.682...
0.8209073
0
Test retrieving all players
def kL8N(YKHO): mVZ4.objects.create(name='Mayita', victories=0, defeats=0) mVZ4.objects.create(name='Moiso', victories=0, defeats=0) Ylbp = YKHO.client.get(TyuQ) Bwa6 = mVZ4.objects.all().order_by('-name') ZMzz = ri_y(Bwa6, many=True) YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK) YKHO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _Vsh(YKHO):\n pass", "def TEzy(YKHO):\n pass", "def E2px(YKHO):\n oyg0 = mVZ4(first_name='George', last_name='Smith')\n oyg0.save()\n geh0 = YKHO.client.get(gxEw('players'))\n YKHO.assertQuerysetEqual(geh0.context['players'], [])", "def dPXt(YKHO, all=False):\n if all:\n retur...
[ "0.7851354", "0.7392498", "0.7249521", "0.7195039", "0.7023699", "0.69242185", "0.6841736", "0.68325335", "0.6792121", "0.6791838", "0.67904574", "0.6744118", "0.67069584", "0.6672156", "0.6652354", "0.6647714", "0.6608296", "0.6586247", "0.6585509", "0.6544839", "0.6533784",...
0.80052656
0
Test creating a new player with invalid payload
def YUiy(YKHO): pB3N = {'name': ''} Ylbp = YKHO.client.post(TyuQ, pB3N) YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NPHI(YKHO):\n Ylbp = YKHO.client().post('api/v1/players/new', headers={'Content-Type': 'application/json'}, data=qQXR.dumps(YKHO.player))\n zgjV = qQXR.loads(Ylbp.data)\n YKHO.assertTrue(zgjV.get('jwt_token'))\n YKHO.assertEqual(Ylbp.status_code, 201)", "def iPMl(YKHO):\n pB3N = {'name': 'Mayi...
[ "0.7495499", "0.74699783", "0.738127", "0.718221", "0.69524", "0.67708266", "0.6658256", "0.66042596", "0.6594715", "0.6582349", "0.6539508", "0.6506546", "0.6504157", "0.6490392", "0.6451788", "0.64410824", "0.6428347", "0.64130753", "0.6399742", "0.6389613", "0.63864726", ...
0.8654237
0
Return a new nonisomorphic binary construction tree. The more details of the operation is introduced by "Global partial orders from sequential data." return BinaryConstructionTree
def Tl5N(YKHO): mh0W = [Q6kx for Q6kx, tjON in YKHO.tree.out_degree().items() if tjON == 0] def lpha(Q6kx): aIQR = E3D9.tree.predecessors(Q6kx)[0] if E3D9.tree.predecessors(aIQR) != []: dibv = E3D9.tree.predecessors(aIQR)[0] else: dibv = None E3D9.tree.no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def g1Rt():\n J_Es = bBBw(5)\n J_Es.left = bBBw(3)\n J_Es.left.left = bBBw(2)\n J_Es.left.left.left = bBBw(1)\n J_Es.left.right = bBBw(4)\n J_Es.right = bBBw(7)\n J_Es.right.left = bBBw(6)\n J_Es.right.right = bBBw(8)\n J_Es.right.right.right = bBBw(9)\n return J_Es", "def WMUD():\n...
[ "0.65642774", "0.6500897", "0.6352472", "0.63450235", "0.63373", "0.62749153", "0.61108404", "0.6084624", "0.6027772", "0.59640837", "0.59385914", "0.5929737", "0.58415216", "0.577208", "0.5737982", "0.56831825", "0.56814563", "0.56281656", "0.5611284", "0.5605383", "0.557073...
0.56648934
17
Return a float value of inclusion probability. f(pv, s) = product_{v in s}(pv) product_{v not in s}(1 pv)
def ao51(E3D9, KCHu): eHNT = 1 fU_G = eSrk(E3D9, KCHu) for Ty9i, XP5J in fU_G.items(): eHNT *= XP5J return eHNT
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eSrk(E3D9, KCHu):\n IlMD = {}\n cAlv = [YRbF for YRbF in E3D9.tree.nodes() if not (YRbF.__contains__('parallel') or YRbF.__contains__('series'))]\n G_JE = list(set(KCHu).intersection(cAlv))\n exwG = len(G_JE)\n ywwl = len(cAlv)\n I2Si = float(exwG) / ywwl\n for YRbF in KCHu:\n if YR...
[ "0.65426224", "0.61161095", "0.61135066", "0.5821492", "0.57806534", "0.5777198", "0.5777198", "0.5770672", "0.57525903", "0.5751081", "0.5734077", "0.5697218", "0.5689497", "0.5657795", "0.5614329", "0.55981725", "0.5575849", "0.5567694", "0.5567694", "0.5539852", "0.5490724...
0.63304335
1
Sets the integration direction.
def Fwu0(YKHO, wGZt, hriu): if hriu is None: return if wGZt > hriu: YKHO._integration_direction = 'decreasing' else: YKHO._integration_direction = 'increasing'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zWQZ(YKHO, EaBz=2):\n pass", "def sM7_(YKHO, *qIxc, **B2fa):\n return UiY4.coordsys_setdirection(YKHO, *qIxc, **B2fa)", "def XSoh(YKHO, XSoh):\n YKHO._direction = XSoh", "def oivB(YKHO, bPBo):\n YKHO.__direction = bPBo", "def oivB(YKHO, dir):\n if dir == 0:\n YKHO.direction = [0, ...
[ "0.7542952", "0.7146989", "0.69682", "0.69272983", "0.69205153", "0.68018293", "0.68018293", "0.67248225", "0.67248225", "0.6560766", "0.649372", "0.6449591", "0.6381216", "0.6296564", "0.6294324", "0.6231282", "0.61218536", "0.60626364", "0.60610044", "0.6020907", "0.6015768...
0.76403767
0
Returns true if we reached the temperature end point.
def IGOl(YKHO, Kt_s, hriu): if hriu is None: return False if YKHO._integration_direction == 'increasing': if Kt_s > hriu: return True elif YKHO._integration_direction == 'decreasing': if Kt_s < hriu: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def J1ea(YKHO):\n return True if YKHO.t >= YKHO.max_ep_len else False", "def WYaJ(YKHO, **B2fa):\n d6pt = YKHO.get('_index')\n if d6pt and d6pt >= len(YKHO.steps) - 1:\n return True\n return False", "def znKc(YKHO):\n jvSB = YKHO.robot.drivetrain.get_gyro_angle()\n return epAf.fabs(YKH...
[ "0.68749845", "0.6486663", "0.64634204", "0.640316", "0.6394104", "0.6357551", "0.6345655", "0.63410616", "0.6326322", "0.63182914", "0.62896657", "0.62468636", "0.6238003", "0.6207513", "0.62044257", "0.6198576", "0.6184775", "0.61823577", "0.6150872", "0.61056906", "0.60730...
0.83553135
0
Convert an infix expression into a postfix expression. Assumes valid inputs.
def XtMr(EP60): xpjC = lJj5() Ylbp = [] tmh_ = EP60.split() eRdl = {'(': 4, '^': 3, '~': 3, '*': 2, '/': 2, '+': 1, '-': 1} for eOtH in tmh_: if eOtH[0] in '0123456789': Ylbp.append(eOtH) if not xpjC.is_empty() and xpjC.peek() == '^': Ylbp.append(xpjC....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XtMr(VN2L):\n eRdl = {'*': 2, '/': 2, '+': 1, '-': 1}\n IPme = S9Ut()\n hEAh = []\n Q4kH = VN2L.split()\n RUgX = {'*', '/', '+', '-'}\n for WKvO in Q4kH:\n if str.isdigit(WKvO):\n hEAh.append(WKvO)\n elif IPme.empty() or IPme.peek() == '(':\n IPme.push(WKvO...
[ "0.8245655", "0.81716263", "0.81700593", "0.80590487", "0.8047456", "0.79754585", "0.7934097", "0.7881377", "0.78311", "0.78090227", "0.77986723", "0.7725289", "0.7692288", "0.7676367", "0.76296026", "0.7615798", "0.7514298", "0.740857", "0.72536755", "0.72062165", "0.7127465...
0.81546026
3
To test for an invalid postfix expression. You may assume that what is passed in is a string that only contains numbers and operators. These are separated into valid tokens by spaces so you can use split and join as necessary.
def GHCA(zdZF): VN2L = zdZF.split() UHFx = 0 if zdZF == '': return False for eOtH in VN2L: if eOtH[0] in '0123456789': UHFx += 1 elif eOtH == '~': pass else: UHFx -= 1 if UHFx < 0: return False if UHFx == 1: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xzCw(vIwR):\n s2mk = vIwR.split()\n ryLn = True\n Maem = ['+', '-', '*', '/', '^', 'sqrt']\n for YRbF in Ni9Y(len(s2mk)):\n if s2mk[YRbF] in Maem or s2mk[YRbF] == '(':\n if ryLn:\n if s2mk[YRbF] == '-':\n s2mk[YRbF] = 'u-'\n elif s2...
[ "0.7520136", "0.6987341", "0.69246596", "0.6914398", "0.67455107", "0.6717881", "0.6708455", "0.67051095", "0.66992074", "0.6603976", "0.6578779", "0.6534092", "0.646224", "0.6458865", "0.6412046", "0.63550186", "0.63059497", "0.62621725", "0.6261374", "0.6159734", "0.6157778...
0.7960342
0
Returns the position of the set
def MZFS(YKHO): return (YKHO.target, min(YKHO.points), max(YKHO.points))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WvVc(YKHO):\n return [YKHO.row - 1, YKHO.col - 1]", "def dQgj(YKHO) -> int:\n return YKHO.__pos", "def Iuzb(YKHO) -> AzJI[int]:\n return YKHO.position.copy()", "def dQgj(YKHO) -> int:\n return YKHO._position", "def dQgj(YKHO) -> int:\n return YKHO._position", "def TwAD(YKHO) -> tuple:\...
[ "0.6859874", "0.6829911", "0.6805826", "0.67513704", "0.67513704", "0.6703119", "0.66213673", "0.6594951", "0.65801644", "0.65507245", "0.65507245", "0.65316844", "0.65316015", "0.652383", "0.64963824", "0.64877045", "0.64877045", "0.64877045", "0.64748806", "0.6474069", "0.6...
0.0
-1
Testing {% ageid %} with yesterday
def dwP6(YKHO): YKHO.assertEqual(He5b(YKHO.now - fCoM(1)), 'age2')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VkTt(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(2)), 'age3')", "def tGEC(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(4)), 'age5')", "def CuSk(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(3)), 'age4')", "def KOt3(YKHO):\n YKHO.assertEqual(He5b(YKHO.now), 'age1')", "def ZJe_(YKHO):\n...
[ "0.6852591", "0.68312496", "0.6746986", "0.63439506", "0.55546343", "0.5394519", "0.5380408", "0.53524274", "0.532431", "0.53095055", "0.5292067", "0.5264989", "0.52530444", "0.5232551", "0.5178952", "0.5160872", "0.5160872", "0.51382077", "0.5128389", "0.51267356", "0.512673...
0.71235526
0
Testing {% ageid %} with two days ago
def VkTt(YKHO): YKHO.assertEqual(He5b(YKHO.now - fCoM(2)), 'age3')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dwP6(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(1)), 'age2')", "def CuSk(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(3)), 'age4')", "def tGEC(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(4)), 'age5')", "def KOt3(YKHO):\n YKHO.assertEqual(He5b(YKHO.now), 'age1')", "def i1ns(YKHO, El...
[ "0.7187669", "0.71045613", "0.69863856", "0.6409827", "0.6115783", "0.6011794", "0.59129065", "0.58910406", "0.5766613", "0.57489073", "0.570259", "0.5692219", "0.56637126", "0.5635098", "0.56275165", "0.5569759", "0.5563165", "0.5558488", "0.55378413", "0.5536425", "0.551116...
0.74781424
0
Testing {% ageid %} with three days ago
def CuSk(YKHO): YKHO.assertEqual(He5b(YKHO.now - fCoM(3)), 'age4')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VkTt(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(2)), 'age3')", "def tGEC(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(4)), 'age5')", "def dwP6(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(1)), 'age2')", "def KOt3(YKHO):\n YKHO.assertEqual(He5b(YKHO.now), 'age1')", "def ZJe_(YKHO):\n...
[ "0.72407234", "0.71853626", "0.69618046", "0.6308967", "0.5874855", "0.5764519", "0.57058084", "0.5670079", "0.5669819", "0.56191695", "0.55904025", "0.5588826", "0.5547945", "0.55410856", "0.54885393", "0.5463492", "0.54514664", "0.5433101", "0.5414855", "0.5414855", "0.5396...
0.7658383
0
Testing {% ageid %} with four days ago
def tGEC(YKHO): YKHO.assertEqual(He5b(YKHO.now - fCoM(4)), 'age5')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CuSk(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(3)), 'age4')", "def VkTt(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(2)), 'age3')", "def dwP6(YKHO):\n YKHO.assertEqual(He5b(YKHO.now - fCoM(1)), 'age2')", "def KOt3(YKHO):\n YKHO.assertEqual(He5b(YKHO.now), 'age1')", "def ZJe_(YKHO):\n...
[ "0.74405986", "0.7243347", "0.7164045", "0.64622", "0.61869997", "0.5989337", "0.5977138", "0.59006375", "0.58485234", "0.58320135", "0.5765161", "0.57545257", "0.5669327", "0.56675255", "0.5645776", "0.56452954", "0.5626133", "0.56260896", "0.5614728", "0.5614728", "0.560904...
0.76875675
0
Set a limit to indicate the list should be truncated.
def h6ei(YKHO, qoqK, tpM7=False): YKHO.limit = {'limit': qoqK, 'type': 'limit', 'truncated': tpM7}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def h6ei(YKHO, qoqK):\n YKHO.limit = qoqK\n YKHO._prune()", "def qoqK(YKHO, qoqK):\n YKHO._limit = qoqK", "def qoqK(YKHO, qoqK):\n raise NotImplementedError('This should have been implemented.')", "def qoqK(YKHO, qoqK):\n YKHO._limit = qoqK", "def qoqK(YKHO, qoqK):\n YKHO._limit = qoqK", ...
[ "0.75690305", "0.74136245", "0.7268453", "0.7227085", "0.7227085", "0.7227085", "0.7150918", "0.7135207", "0.70293975", "0.701623", "0.6900221", "0.68999344", "0.6751625", "0.6742927", "0.6742424", "0.66420597", "0.6582306", "0.64915013", "0.6447758", "0.6411383", "0.6300985"...
0.79677534
0
Set the hybrid weights and normalize.
def sNuA(YKHO, _mSQ): YKHO._weights = _mSQ YKHO.normalize_weights()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FWlN(YKHO):\n V3oS = sum(YKHO.weights)\n YKHO.norm_weights = YKHO.weights / float(V3oS)", "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 FWlN(YKHO):\n YKHO.new_w...
[ "0.72134966", "0.6985224", "0.69822764", "0.6975164", "0.6933884", "0.6900587", "0.6896751", "0.6887905", "0.68712306", "0.6845061", "0.68007916", "0.6796026", "0.6750444", "0.67392725", "0.6735572", "0.6713388", "0.6695148", "0.6688466", "0.6679644", "0.6679555", "0.66673744...
0.68913823
7
Normalize weight vector. Negative weights set to zero, and whole vector sums to 1.0.
def FWlN(YKHO): YKHO.new_weight = [] for YRbF in YKHO._weights: if any((YRbF < 0 for YRbF in YKHO._weights)): YKHO.new_weight = [0, 1] elif all((YRbF == 0 for YRbF in YKHO._weights)): YRbF = 1 / len(YKHO._weights) YKHO.new_weight.append(YRbF) else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FWlN(YKHO):\n V3oS = sum(YKHO.weights)\n YKHO.norm_weights = YKHO.weights / float(V3oS)", "def NkkI(YKHO, _mSQ):\n i9Rn = sum(_mSQ)\n NR_G = [-1] * YKHO.numParticles\n for YRbF in range(len(_mSQ)):\n NR_G[YRbF] = _mSQ[YRbF] / i9Rn\n return NR_G", "def FWlN(YKHO, yzQ0):\n exwG = ...
[ "0.81079364", "0.789293", "0.7727452", "0.77199495", "0.76464504", "0.7522993", "0.7492114", "0.74709684", "0.7452147", "0.74076146", "0.73972994", "0.7382311", "0.72835106", "0.7223835", "0.72054964", "0.71810776", "0.7152016", "0.7151621", "0.71274734", "0.7124058", "0.7097...
0.8004195
1
Verify user's email address.
def AF1G(YKHO, _Yba): return YKHO.post('verify', _Yba)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Bt7w(YKHO, nPrm):\n CBIr = dsjM.User.objects.filter(username__iexact=nPrm, is_active=True)\n if CBIr:\n return nPrm\n raise IyFz.ValidationError('Email address not verified for any user account')", "def Hjll(PObu, eOtH):\n return True", "def Bt7w(YKHO, Jyyj):\n print('Validating email...
[ "0.734524", "0.7308401", "0.72833353", "0.72769487", "0.7266312", "0.7222744", "0.719752", "0.7192644", "0.7154709", "0.71305126", "0.7122744", "0.7122744", "0.711976", "0.7107592", "0.70995986", "0.70905817", "0.7075895", "0.7061155", "0.7052013", "0.70404774", "0.70316905",...
0.0
-1
Normalize time in arbitrary timezone to UTC naive object.
def yv9l(E3oo): vgXP = E3oo.utcoffset() if vgXP is None: return E3oo return E3oo.replace(tzinfo=None) - vgXP
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uTy1(_c1T, rIAI):\n FEXa = FXGE.timezone(rIAI)\n oL7g = _c1T.replace(tzinfo=FEXa)\n zbgu = FXGE.timezone('UTC')\n oL7g = oL7g.astimezone(zbgu)\n return oL7g", "def yv9l(E3oo):\n vgXP = E3oo.utcoffset()\n if vgXP is None:\n return E3oo\n return E3oo.replace(tzinfo=None) - vgXP",...
[ "0.7121004", "0.70751613", "0.68719333", "0.6638765", "0.6492223", "0.6492223", "0.64689595", "0.6383807", "0.63305354", "0.6259214", "0.6201917", "0.61943454", "0.6189186", "0.61438674", "0.6071864", "0.6052293", "0.6044807", "0.6037905", "0.60008335", "0.60007656", "0.59903...
0.7118167
1
Return the difference between two timing objects.
def KNvb(h3Aq, DOuq): RA_F = DOuq - h3Aq return z0YJ(RA_F)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WbTE(YKHO):\n return YKHO.t2 - YKHO.t1", "def AYMe(YKHO, jzdc, Fg_i):\n g75m = jzdc - Fg_i\n return g75m.days * 24 * 60 + g75m.seconds // 60", "def TAxb(oF7G, tOwQ):\n return abs(int((tOwQ - oF7G).total_seconds()))", "def N8Pq(n2Q1, SpII):\n RI88 = str(SpII - n2Q1)\n r8hN = ZbWC.match('...
[ "0.7564027", "0.73061734", "0.7275471", "0.7021707", "0.6927145", "0.6924693", "0.69082826", "0.6850764", "0.6742648", "0.6573544", "0.6448123", "0.6372256", "0.6367635", "0.6340591", "0.62391603", "0.6200217", "0.61754555", "0.61506987", "0.61456347", "0.6129372", "0.6069111...
0.0
-1
Return the total seconds of datetime.timedelta object.
def z0YJ(RA_F): try: return RA_F.total_seconds() except AttributeError: return RA_F.days * 24 * 3600 + RA_F.seconds + float(RA_F.microseconds) / 10 ** 6
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def z0YJ(g75m):\n return (g75m.microseconds + (g75m.seconds + g75m.days * 24 * 3600) * 10 ** 6) / 10 ** 6", "def z0YJ(YKHO):\n return ((YKHO.days * 86400 + YKHO.seconds) * 10 ** 6 + YKHO.microseconds) / 10 ** 6", "def Zhzg(g75m):\n return (g75m.microseconds + (g75m.seconds + g75m.days * 24 * 3600) * 1...
[ "0.7660376", "0.76501614", "0.7579259", "0.74830866", "0.7447662", "0.7263316", "0.72183", "0.71539515", "0.70629454", "0.70629454", "0.7046123", "0.70381135", "0.6981377", "0.6980456", "0.6966398", "0.6944039", "0.68772465", "0.682706", "0.6801305", "0.67495024", "0.674575",...
0.75388104
3
Check if vocab file doesn't exist, create from corpus file
def kuY7(AsxV, ee9X, sbk5=True, G2sS=None, l3At=None, wb39=None): if ZylS.gfile.Exists(AsxV): BfDw.print_out('# Vocab file %s exist' % AsxV) CtWL, jXxl = fGR1(AsxV) if sbk5: if not wb39: wb39 = GUeh if not G2sS: G2sS = hUw6 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Y5QF(x6A0, IznC):\n pmON = Hy7s.path.join('data', IznC)\n if not Hy7s.path.isfile(pmON):\n rYip, iYe1 = CtWL.build_dictionary(x6A0)\n CtWL.save_dictionary(rYip, iYe1, pmON)\n return pmON", "def K218(Bq4s, Il9b):\n gLiZ = set()\n for nYt1 in Bq4s:\n with xDSY.open(nYt1, 'r'...
[ "0.6977475", "0.6754829", "0.67372584", "0.6708775", "0.66447884", "0.65663725", "0.6565397", "0.65651417", "0.64246404", "0.63713026", "0.6286252", "0.62843806", "0.62478554", "0.6221544", "0.6218052", "0.62025714", "0.6173772", "0.6173772", "0.6156694", "0.61282647", "0.610...
0.61879635
16
Return device specific attributes.
def GWuV(YKHO): C3ST = YKHO.data.wiserSmart.getWiserDeviceInfo(YKHO.appliance_id).get('modelId') return {'name': YKHO.appliance_name, 'identifiers': {(Sugg, YKHO.unique_id)}, 'manufacturer': YhHo, 'model': C3ST}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def azoT(YKHO, jf3N=0):\n return lDLs.Device(jf3N).get_attributes()", "def GWuV(YKHO) -> h8nf[cuzp[str, ImMB]]:\n return {r2U0: YKHO.name, 'identifiers': {(Sugg, YKHO._device.device_id)}}", "def R1i3(YKHO):\n o8Kj = {PlJk: v7XK, XwgO: YKHO.unique_id}\n return o8Kj", "def jjN6(YKHO, begE: str) -> ...
[ "0.80724686", "0.7450437", "0.742771", "0.7409806", "0.7293218", "0.72523683", "0.72523683", "0.719905", "0.7175151", "0.7155777", "0.7155777", "0.71476424", "0.7145971", "0.71375567", "0.7095317", "0.7051197", "0.703671", "0.7035435", "0.7017325", "0.7013673", "0.70050514", ...
0.66067904
77
Return the polling state.
def KZ_I(YKHO): return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ja6o(YKHO):\n IOKn = YKHO._alarm()\n return IOKn.state", "def bGIA(YKHO):\n return YKHO.pipeline.get_state(Jc3d.CLOCK_TIME_NONE)[1]", "def QTBn(YKHO):\n return YKHO.status", "def OEQv(YKHO):\n return YKHO.state", "def jGRS(YKHO):\n return YKHO.state", "def ja6o(YKHO):\n return YK...
[ "0.70800793", "0.69442177", "0.6918493", "0.6845751", "0.68327427", "0.67729336", "0.67729336", "0.6728276", "0.6668334", "0.6641413", "0.6641413", "0.6641413", "0.6641413", "0.6641413", "0.66395515", "0.66395515", "0.66395515", "0.66395515", "0.66395515", "0.66395515", "0.66...
0.0
-1
Convert an adjacency graph in scipy sparse matrix format into an iGraph format.
def FCK6(_0VL, SppC): Oa1e = kkMa.Graph.Adjacency((SppC > 0).tolist()) Oa1e.es['weight'] = SppC[SppC.nonzero()] return Oa1e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def c1rT(yvY1):\n return jHsn.to_scipy_sparse_matrix(yvY1).astype('float32')", "def yHf3(pNZh):\n bOOl = [D70y[0] for D70y in pNZh.edges()]\n H_RK = [D70y[1] for D70y in pNZh.edges()]\n hkxX = [1 for D70y in pNZh.edges()]\n kRap = max(max(bOOl) + 1, max(H_RK) + 1)\n k0lF = o7sj.coo_matrix((hkxX...
[ "0.7428788", "0.698894", "0.6937286", "0.6890723", "0.6840507", "0.6761767", "0.6671198", "0.6508733", "0.64971626", "0.6486387", "0.64698505", "0.6466938", "0.6412773", "0.6366936", "0.6302056", "0.61876756", "0.615492", "0.6137109", "0.61366796", "0.60860234", "0.6081462", ...
0.79616356
0
Reads in a file as a dataframe, expects genes as rownames, cells as colnames
def AW6o(FYKK): jQ3Z = rLdf.read_table(FYKK, index_col=0).T return jQ3Z
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZAQi(IznC, WfCS):\n jQ3Z = rLdf.read_csv(IznC, header=None, sep='\\\\s+', comment='#', names=WfCS, dtype=oyIN.float64).iloc[1:]\n return jQ3Z", "def a_nM(nUeQ):\n import pandas\n Aofo = pandas.read_table(nUeQ, comment='#', names=['seqid', 'source', 'type', 'start', 'end', 'score', 'strand', 'phas...
[ "0.68378675", "0.6703915", "0.65640306", "0.64664686", "0.6444617", "0.6426337", "0.64188665", "0.6380153", "0.6320563", "0.63187337", "0.6276507", "0.62567705", "0.62567705", "0.62567705", "0.6245474", "0.62407905", "0.62309635", "0.62281895", "0.61989623", "0.61345327", "0....
0.0
-1
Return datasource metadata for a dataproduct.
def XbPU(YKHO, HKDl, cuiw): yIVm = {} if HKDl.type == 'group': return yIVm wDWA = HKDl.data_set_view.data_set m5Tx = wDWA.data_source if m5Tx.connection_type == 'database': EX6H = None Fp1v = YKHO.dataset_info(m5Tx.gdi_oid, wDWA.data_set_name) if 'error' not in Fp1v: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aw0o(YKHO, _E99, djZW):\n yIVm = {}\n w0rQ = YKHO.permission.dataproduct_permissions(djZW, _E99) or {}\n cuiw = YKHO.config_models.session()\n ktsU = YKHO.config_models.model('ows_layer')\n xDcj = cuiw.query(ktsU).filter_by(name=djZW)\n HKDl = xDcj.first()\n if HKDl is not None:\n y...
[ "0.74106634", "0.6391926", "0.60912377", "0.60485494", "0.57594264", "0.5758313", "0.5735054", "0.56168944", "0.55876154", "0.55693054", "0.5500405", "0.54809636", "0.5465075", "0.54416764", "0.5426445", "0.53999317", "0.5371702", "0.53709596", "0.5331371", "0.53281933", "0.5...
0.61659366
2
Split comma separated values into list.
def d3Em(YKHO, BWXx): if BWXx: return [KCHu.strip() for KCHu in BWXx.split(',')] else: return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RfT6(KCHu):\n return KCHu.strip().split(',')", "def aRD2(KCHu):\n return KCHu.split(',')", "def WOxh(YKHO, BWXx):\n if not BWXx:\n return []\n return BWXx.split(',')", "def pkI8(aLNT):\n YBMh = []\n for D8Af in aLNT:\n for ZfUD in D8Af.split(','):\n YBMh.append(...
[ "0.78025526", "0.76226556", "0.7475591", "0.72795135", "0.7144818", "0.69944984", "0.69677824", "0.6933669", "0.6908274", "0.68442553", "0.6830242", "0.6824286", "0.67987007", "0.67562747", "0.6737418", "0.6710399", "0.67035455", "0.66600406", "0.6642529", "0.6638843", "0.660...
0.8507184
0
Initialize some callbacks inline Use this constructor to provide credentials and certificate callbacks inline, instead of defining your own class for these ones. You can e.g. also pass in one of the credential objects as 'credentials' instead of creating a function which returns a hardcoded object.
def FIMM(YKHO, Vt89=None, VQa0=None): if Vt89 is not None: YKHO.credentials = Vt89 if VQa0 is not None: YKHO.certificate = VQa0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, qv1X, JS7J):\n YKHO.req = qv1X\n YKHO.credentials_fn = JS7J", "def FIMM(YKHO, hl9o=None, ZGAZ=5, db6b=DF_w):\n YKHO.set_cred(hl9o)\n YKHO.try_count = 1\n YKHO.max_tries = ZGAZ\n YKHO.callback = db6b", "def FIMM(YKHO, NtEF=None, jTXt=None, IUUE=None, falt=None, ZUyI=None, gCuF=N...
[ "0.65539837", "0.64415884", "0.6256035", "0.6152882", "0.61327577", "0.6122212", "0.60726905", "0.5963776", "0.5948654", "0.5945171", "0.5938793", "0.59084725", "0.59006447", "0.58869493", "0.5884443", "0.5865886", "0.58515286", "0.5847019", "0.57956296", "0.5794808", "0.5778...
0.7311035
0
This method returns database object.
def GGod(YKHO): YKHO.logger.info('in get_db()') try: return YKHO.client[YKHO.db_name] except Exception as e: YKHO.logger.error(f'Error occurred while getting client {tTpl}')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NCls(YKHO) -> FfT0:\n return YKHO.impl.db", "def NCls(YKHO):\n return VCLV(YKHO)", "def VmlM(YKHO):\n return pths(SZpq.ClientStorage((YKHO.server, YKHO.port)))", "def GGod(YKHO):\n return YKHO._db", "def GGod():\n return FfT0(gCuF.COUCH_DATABASE)", "def v0Hh(YKHO):\n return YKHO.db"...
[ "0.86168927", "0.8025105", "0.79949725", "0.7977423", "0.79444736", "0.7923698", "0.77936614", "0.77742386", "0.7715764", "0.77024984", "0.7693181", "0.76827276", "0.76591754", "0.76430446", "0.7642511", "0.7626138", "0.7614707", "0.7599347", "0.7566285", "0.7554123", "0.7538...
0.70857936
78
Compute softmax probabilities for all actions.
def N93T(o4D3, ajwV, rNcn, UqYS): fUYa = oyIN.array((o4D3, ajwV, rNcn)) mLGw = oyIN.exp(fUYa * UqYS) OCOs = oyIN.exp(fUYa * UqYS).sum() return mLGw / OCOs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N93T(g4y1):\n BFeB = oyIN.exp(g4y1)\n BFeB /= oyIN.sum(BFeB, axis=0)[oyIN.newaxis, :]\n return BFeB", "def N93T(WKvO):\n ROpF = WKvO.shape\n BFeB = oyIN.exp(WKvO - oyIN.max(WKvO, axis=len(ROpF) - 1, keepdims=True))\n BFeB /= oyIN.sum(BFeB, axis=len(ROpF) - 1, keepdims=True)\n return BFeB...
[ "0.7465903", "0.73197216", "0.71343404", "0.71002626", "0.70893115", "0.70893115", "0.6964765", "0.6963534", "0.69254", "0.6904407", "0.6894728", "0.6893124", "0.68816084", "0.68766975", "0.68731517", "0.6869365", "0.6868904", "0.6868904", "0.6868904", "0.6868904", "0.6868904...
0.0
-1
Checks to see if the user is a librarian for certain routes
def _4nh(eHNT): @zaGL(eHNT) def SzLu(*qIxc, **B2fa): if c5ow.lflag == 0: Dwep('You are not a librarian! Please sign in to a librarian account') return vKnz(nKyW('main')) return eHNT(*qIxc, **B2fa) return SzLu
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sZ8d(QePW):\n _4nh = mv1M.objects.filter(is_student=False, is_lecturer=False, is_parent=False, is_superuser=False)\n ZP0S = 'Librarian'\n QpfX = {'librarian': _4nh, 'user_type': ZP0S}\n return _1tc(QePW, 'library/librarians_list.html', QpfX)", "def bwQw(QePW):\n bo34.debug('right_user_check')\...
[ "0.62187976", "0.55780613", "0.5519553", "0.54693735", "0.5451162", "0.5360155", "0.53441876", "0.53240615", "0.53006685", "0.5292587", "0.5280629", "0.5270738", "0.5257878", "0.52497697", "0.5249029", "0.52322376", "0.5221979", "0.521075", "0.52094173", "0.5189399", "0.51697...
0.60173243
1
Initializes the Backtest. A Queue is used to hold the Events. The Signals, Orders, and Fills are counted.
def FIMM(YKHO, _vpc, ZO7p, o4P_, g70z, kepv, KhBf, mGPM, Ejae, HVIF, OuMq, KbQ7=None): YKHO.csv_dir = _vpc YKHO.symbol_list = ZO7p YKHO.initial_capital = o4P_ YKHO.heartbeat = g70z YKHO.start_date = kepv YKHO.end_date = KhBf YKHO.data_handler_class = mGPM YKHO.execution_handler_class = E...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO):\n YKHO._events = g760.deque()\n YKHO._alarms = 0\n YKHO._alarm_active = True\n YKHO._kq = EfUA.kqueue()\n YKHO._kq_events = {}\n YKHO.traceback = ()\n YKHO.event_count = 0\n YKHO._no_tb = False", "def nqzW(YKHO, gGq6=None, **B2fa):\n YKHO.queue = gGq6 if gGq6 else g5js(...
[ "0.7210904", "0.7131795", "0.7033969", "0.6756145", "0.673009", "0.67163557", "0.6671295", "0.6656317", "0.6647535", "0.6618624", "0.6594603", "0.6594603", "0.6594603", "0.6594603", "0.6594603", "0.65499914", "0.6525102", "0.6469497", "0.6469497", "0.6403421", "0.63916034", ...
0.0
-1
Initializes the Backtest. A Queue is used to hold the Events. The Signals, Orders, and Fills are counted.
def FIMM(YKHO, _vpc, ZO7p, o4P_, g70z, kepv, mGPM, Ejae, HVIF, OuMq, KbQ7=None): YKHO.csv_dir = _vpc YKHO.symbol_list = ZO7p YKHO.initial_capital = o4P_ YKHO.heartbeat = g70z YKHO.start_date = kepv YKHO.data_handler_class = mGPM YKHO.execution_handler_class = Ejae YKHO.portfolio_class = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO):\n YKHO._events = g760.deque()\n YKHO._alarms = 0\n YKHO._alarm_active = True\n YKHO._kq = EfUA.kqueue()\n YKHO._kq_events = {}\n YKHO.traceback = ()\n YKHO.event_count = 0\n YKHO._no_tb = False", "def nqzW(YKHO, gGq6=None, **B2fa):\n YKHO.queue = gGq6 if gGq6 else g5js(...
[ "0.72095853", "0.71329", "0.70346403", "0.6754693", "0.67315227", "0.6717928", "0.6671912", "0.66584927", "0.6648384", "0.662001", "0.65959483", "0.65959483", "0.65959483", "0.65959483", "0.65959483", "0.6550823", "0.652473", "0.6470759", "0.6470759", "0.64041936", "0.639307"...
0.0
-1
Get player's opponent piece.
def xzj7(YKHO, oyg0): if oyg0 == aM69.BLACK: return aM69.WHITE else: return aM69.BLACK
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LFD6(YKHO):\n return YKHO.__opponent", "def Yx99(YKHO):\n for VmPb in YKHO.__state.board.find_workers():\n oyg0 = YKHO.__state.board.get_player_id(VmPb[0], VmPb[1])\n if not oyg0 == YKHO.__pid:\n return oyg0", "def xzj7(YKHO):\n if YKHO.side == 'X':\n return 'O'\n ...
[ "0.7492938", "0.7264806", "0.7049177", "0.7040058", "0.68809295", "0.6790353", "0.6682499", "0.6642669", "0.6617875", "0.6548825", "0.65392536", "0.639095", "0.63774604", "0.63774604", "0.63543737", "0.6320625", "0.6320233", "0.6275478", "0.62690526", "0.62504077", "0.6211759...
0.70919555
2
Compute player's score (number of player's pieces minus opponent's).
def p1kx(YKHO, oyg0, iBIi): kgrb = 0 SiwD = 0 for YRbF in YKHO.squares(): if iBIi[YRbF] == oyg0: kgrb += yQki[YRbF] else: SiwD += yQki[YRbF] return kgrb - SiwD
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OA_s(YKHO, oyg0, iBIi):\n kgrb = 0\n SiwD = 0\n for YRbF in YKHO.squares():\n if iBIi[YRbF] == oyg0:\n kgrb += 1\n else:\n SiwD += 1\n return kgrb - SiwD", "def p1kx(oyg0, iBIi):\n j47j, nhLb = (0, 0)\n RUgX = VlLD.opponent(oyg0)\n for MuIv in VlLD.squ...
[ "0.77100617", "0.76665014", "0.7596806", "0.755954", "0.74644375", "0.7270104", "0.72659296", "0.7192504", "0.71761346", "0.70750165", "0.70623815", "0.7020574", "0.6970311", "0.69272745", "0.69137883", "0.68977886", "0.6897169", "0.68841004", "0.68778896", "0.68595576", "0.6...
0.7846785
0
Compute player's score (number of player's pieces minus opponent's).
def OA_s(YKHO, oyg0, iBIi): kgrb = 0 SiwD = 0 for YRbF in YKHO.squares(): if iBIi[YRbF] == oyg0: kgrb += 1 else: SiwD += 1 return kgrb - SiwD
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def p1kx(YKHO, oyg0, iBIi):\n kgrb = 0\n SiwD = 0\n for YRbF in YKHO.squares():\n if iBIi[YRbF] == oyg0:\n kgrb += yQki[YRbF]\n else:\n SiwD += yQki[YRbF]\n return kgrb - SiwD", "def p1kx(oyg0, iBIi):\n j47j, nhLb = (0, 0)\n RUgX = VlLD.opponent(oyg0)\n fo...
[ "0.7845445", "0.7665763", "0.7595392", "0.7558798", "0.74634653", "0.72690827", "0.72640866", "0.7191977", "0.7175509", "0.7073882", "0.70610803", "0.7019335", "0.696953", "0.69266623", "0.6912282", "0.6897905", "0.68971044", "0.68832207", "0.68773335", "0.68591225", "0.68503...
0.7709773
1
Clip the values of x from eps to 1eps and renormalize them so that they sum to 1.
def ZTUB(WKvO, SGf8=1e-05): WKvO = oyIN.clip(WKvO, SGf8, 1 - SGf8) return WKvO / WKvO.sum()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mopz(WKvO, SGf8=0.01):\n WKvO = ht2j.clamp(WKvO, min=SGf8)\n WKvO = WKvO / ht2j.sum(WKvO, dim=1, keepdim=True)\n return WKvO", "def jnV4(WKvO):\n yJiH = 1e-10\n Htse = WKvO.shape\n WKvO = WKvO.flatten()\n GOZd = (oyIN.sum(WKvO ** 2) + yJiH) ** (-0.5)\n WKvO = WKvO * GOZd\n WKvO = o...
[ "0.716385", "0.71209276", "0.7078646", "0.6867248", "0.68503493", "0.68422705", "0.6825308", "0.6799856", "0.6776279", "0.6757192", "0.66739017", "0.66679573", "0.6650903", "0.650148", "0.6492298", "0.64902186", "0.64388424", "0.642077", "0.6390071", "0.63312405", "0.6331007"...
0.76624894
0
Returns a (mid_row, mid_peg) tuple between (start_row, start_peg) and (end_row, end_peg).
def x1fj(NUEI, LaFX, QZHG, FyCz): if NUEI + 2 == QZHG: DYsQ = NUEI + 1 elif NUEI == QZHG + 2: DYsQ = NUEI - 1 elif NUEI == QZHG: DYsQ = NUEI if LaFX + 2 == FyCz: WVdf = LaFX + 1 elif LaFX == FyCz + 2: WVdf = LaFX - 1 elif LaFX == FyCz: WVdf = LaFX ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def K5Si(YKHO):\n kjot = 0\n bwGk = 0\n nDaj = 0\n NE3T = 0\n if YKHO.selectionMode == wkmx:\n kjot = YKHO.penRow\n bwGk = YKHO.penCol\n nDaj = YKHO.penRow\n NE3T = YKHO.penCol\n elif YKHO.selectionMode == YPiL:\n kjot = 0\n bwGk = 0\n nDaj = YKHO....
[ "0.6485405", "0.59999824", "0.599718", "0.57569534", "0.57080907", "0.5679897", "0.5622903", "0.5562309", "0.5506314", "0.5498558", "0.54762554", "0.54337853", "0.53962946", "0.5344107", "0.53079104", "0.52601105", "0.5217689", "0.5206089", "0.51990014", "0.51918226", "0.5168...
0.84714884
0
Compare two waypoints to see whether they are the same (within 0.5 m and 0.5 m/s)
def pAi5(YKHO, CB6B, to8X, m_nV=0.5, yew8=0.5): gzVs = lambda jzdc, Fg_i: epAf.sqrt((jzdc.x - Fg_i.x) ** 2 + (jzdc.y - Fg_i.y) ** 2 + (jzdc.z - Fg_i.z) ** 2) Pd83 = gzVs(CB6B.pose.pose.position, to8X.pose.pose.position) if Pd83 < m_nV: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VEfH(YKHO, lCHq, ANJu) -> bool:\n return abs(lCHq.x - ANJu.x) <= YKHO.dirt_pos_tolerance and abs(lCHq.y - ANJu.y) <= YKHO.dirt_pos_tolerance", "def kUBT(DsmF, AhhR):\n if DsmF.is_power_onoff() and AhhR.is_power_onoff():\n return True\n if DsmF.number_windows() != AhhR.number_windows():\n ...
[ "0.66216546", "0.65738994", "0.6439483", "0.6387838", "0.6352702", "0.63003606", "0.6274246", "0.6252439", "0.6230331", "0.62167144", "0.6209074", "0.62022907", "0.61987966", "0.61629647", "0.6139927", "0.61213946", "0.6107632", "0.6103632", "0.6090313", "0.6084919", "0.60797...
0.73450947
0
Self attention layer with memory layernorm > attn > dropout > residual
def KVH6(YKHO, CK9p, QpfX, KnQa, Wbi9, LMsQ, oCuQ=None, f5O7=False, Ic25=None): assert QpfX is None, 'This model does not have an context encoder' ee8p = True if YKHO.training and YKHO.death_rate > 0: ee8p = ht2j.rand(1)[0].item() >= YKHO.death_rate if ee8p: xDcj = YKHO.preprocess_attn(C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KVH6(YKHO, WKvO: torch.Tensor, rzeQ: torch.Tensor=None, zdnc: torch.Tensor=None, olv8: bool=False, Lh35=None):\n uuHL = WKvO\n if YKHO.layer_norm_first:\n WKvO = YKHO.self_attn_layer_norm(WKvO)\n WKvO, Fw3A, Lh35 = YKHO.self_attn(query=WKvO, key=WKvO, value=WKvO, key_padding_mask=zdnc, need...
[ "0.65101606", "0.6506882", "0.6454085", "0.644183", "0.64174455", "0.63672817", "0.633365", "0.63287926", "0.63155437", "0.6293508", "0.62866867", "0.6259745", "0.6250611", "0.62303746", "0.61847997", "0.6182898", "0.61732996", "0.61547047", "0.6128263", "0.60605913", "0.6054...
0.0
-1
initialize wight from uniform distribution
def wOp_(YKHO, zNig): return oyIN.random.uniform(YKHO.r_min, YKHO.r_max, size=zNig)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ixt2():\n return oyIN.random.uniform(-1, 1)", "def vB93(YKHO):\n YKHO.w = oyIN.random.randn(YKHO.D) / oyIN.sqrt(YKHO.D)", "def a7rK(YKHO):\n if YKHO.lowerBoundUsed == False and YKHO.upperBoundUsed == False:\n YKHO._distribution = GIhX.BasicWeibullDistribution(YKHO.k, YKHO.lambdaVar, YKHO.lo...
[ "0.75663126", "0.75101614", "0.7399138", "0.7150266", "0.7104282", "0.6855432", "0.6811932", "0.680855", "0.68040025", "0.67960006", "0.6785514", "0.6735542", "0.6665591", "0.6612042", "0.66110617", "0.66074973", "0.660375", "0.66020495", "0.66020495", "0.6600997", "0.6600997...
0.71774215
3
Gets the uuid of this ConnectionEndPoint.
def qxeD(YKHO) -> str: return YKHO._uuid
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qxeD(YKHO) -> str:\n return YKHO.__uuid", "def qxeD(YKHO):\n return YKHO.__uuid", "def qxeD(YKHO):\n return YKHO._uuid", "def qxeD(YKHO):\n return YKHO._uuid", "def qxeD(YKHO):\n return YKHO._uuid", "def qxeD(YKHO):\n return YKHO.__uuid", "def qxeD(YKHO):\n return YKHO.__uuid",...
[ "0.7309623", "0.72664577", "0.7230148", "0.718938", "0.718938", "0.7181145", "0.7181145", "0.71802694", "0.70388645", "0.6739499", "0.6739499", "0.6739499", "0.67321247", "0.66511244", "0.66511244", "0.66511244", "0.6575948", "0.6560892", "0.6525945", "0.64700735", "0.6458992...
0.73261946
2
Gets the name of this ConnectionEndPoint.
def mWFP(YKHO) -> x1iM[ITT0]: return YKHO._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mWFP(YKHO):\n return '{} {}'.format(YKHO._device, YKHO._endpoint)", "def sS_K(YKHO):\n return YKHO.socket_.getpeername()", "def W0tD(YKHO):\n return 'Socket/IP'", "def XpKg(YKHO):\n return YKHO._fd.getsockname()", "def veRb(YKHO):\n return YKHO.sock.getpeername()", "def Q0HP(YKHO):\n ...
[ "0.756051", "0.7227606", "0.7097569", "0.7072862", "0.7072641", "0.70398873", "0.70217276", "0.6980249", "0.6921586", "0.690786", "0.689965", "0.6873805", "0.68566614", "0.67906415", "0.6777492", "0.67392117", "0.6666829", "0.6663832", "0.6663832", "0.6663832", "0.66534466", ...
0.0
-1
Sets the name of this ConnectionEndPoint.
def mWFP(YKHO, mWFP: List[NameAndValue]): YKHO._name = mWFP
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WZrJ(YKHO, mWFP):\n YKHO._name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO.__name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO.__name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO.__name = mWFP", "def S55X(YKHO, mWFP):\n YKHO.__name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP", "def WZrJ(YKH...
[ "0.71360976", "0.71320254", "0.71320254", "0.7090261", "0.7078964", "0.7067687", "0.7067687", "0.7067687", "0.7067687", "0.7067687", "0.70375973", "0.70223016", "0.6999807", "0.6930449", "0.6930449", "0.6898523", "0.68954396", "0.68885785", "0.68592894", "0.68592894", "0.6801...
0.0
-1
Gets the operational_state of this ConnectionEndPoint.
def F45e(YKHO) -> str: return YKHO._operational_state
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VLTN(YKHO):\n return YKHO._conn_state", "def gjfm(YKHO):\n return YKHO.connection_state", "def QTBn(YKHO):\n return uU3x(YKHO._impl)", "def uRKJ(YKHO):\n return YKHO._connection_status", "def jGRS(YKHO) -> h8nf[qe4Y.Input[uLKX[str, 'PrivateEndpointServiceConnectionStatus']]]:\n return qe...
[ "0.68319815", "0.68308073", "0.6515286", "0.64101964", "0.6124702", "0.6124702", "0.6124702", "0.6124702", "0.6071668", "0.5983941", "0.5983941", "0.5983941", "0.59587127", "0.59099543", "0.5899447", "0.58726335", "0.5847335", "0.5847335", "0.5847335", "0.5847335", "0.5847335...
0.75950426
0
Gets the lifecycle_state of this ConnectionEndPoint.
def pwxl(YKHO) -> str: return YKHO._lifecycle_state
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pwxl(YKHO):\n return YKHO._lifecycle_state", "def pwxl(YKHO):\n return YKHO._lifecycle_state", "def pwxl(YKHO):\n return YKHO._lifecycle_state", "def pwxl(YKHO):\n return YKHO._lifecycle_state", "def pwxl(YKHO):\n return YKHO._lifecycle_state", "def gjfm(YKHO):\n return YKHO.connect...
[ "0.77957743", "0.77957743", "0.77957743", "0.77957743", "0.77957743", "0.6779853", "0.637915", "0.6131513", "0.612186", "0.59888816", "0.5882657", "0.5882657", "0.5882657", "0.5882657", "0.5882657", "0.57937056", "0.57937056", "0.57503927", "0.57503927", "0.57503927", "0.5750...
0.7214624
5
Gets the termination_direction of this ConnectionEndPoint.
def vZ4h(YKHO) -> str: return YKHO._termination_direction
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vZ4h(YKHO, vZ4h: str):\n BbPm = ['BIDIRECTIONAL', 'SINK', 'SOURCE', 'UNDEFINED_OR_UNKNOWN']\n if vZ4h not in BbPm:\n raise ValueError('Invalid value for `termination_direction` ({0}), must be one of {1}'.format(vZ4h, BbPm))\n YKHO._termination_direction = vZ4h", "def Iyzh(YKHO):\n return Y...
[ "0.6747025", "0.6339703", "0.6330633", "0.6314831", "0.6202958", "0.61843795", "0.61089504", "0.6067965", "0.60548645", "0.5998903", "0.5955845", "0.59224766", "0.58646476", "0.5852054", "0.5817432", "0.5813375", "0.5800287", "0.57266474", "0.5713044", "0.57085085", "0.570361...
0.8100644
0
Sets the termination_direction of this ConnectionEndPoint.
def vZ4h(YKHO, vZ4h: str): BbPm = ['BIDIRECTIONAL', 'SINK', 'SOURCE', 'UNDEFINED_OR_UNKNOWN'] if vZ4h not in BbPm: raise ValueError('Invalid value for `termination_direction` ({0}), must be one of {1}'.format(vZ4h, BbPm)) YKHO._termination_direction = vZ4h
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Dfvh(YKHO, oc6O):\n YKHO.__termination = oc6O", "def vZ4h(YKHO) -> str:\n return YKHO._termination_direction", "def XSoh(YKHO, XSoh):\n YKHO._direction = XSoh", "def oivB(YKHO, XSoh: str) -> None:\n if XSoh == 'forward':\n YKHO._bond.setDirection(YKHO._deviceId, o5oX.FORWARD)\n elif...
[ "0.640824", "0.63931453", "0.56420517", "0.5394109", "0.53315324", "0.52557427", "0.52557427", "0.52557427", "0.5211987", "0.51994586", "0.5056376", "0.5056376", "0.5051297", "0.5051297", "0.5045381", "0.5027594", "0.4985935", "0.4943825", "0.49381512", "0.49232072", "0.48966...
0.7977831
0
Gets the termination_state of this ConnectionEndPoint.
def UNdt(YKHO) -> str: return YKHO._termination_state
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oc6O(YKHO):\n return YKHO.__termination", "def lQ8S(YKHO):\n return YKHO.manager.get_ssl_termination(YKHO)", "def wOXs(YKHO):\n return YKHO._terminating_on", "def amYg(YKHO):\n return YKHO._terminated", "def amYg(YKHO):\n return YKHO._terminated", "def gjfm(YKHO):\n return YKHO.conn...
[ "0.65559936", "0.6262929", "0.62271124", "0.6188171", "0.6188171", "0.6125202", "0.60600793", "0.6005115", "0.5923498", "0.56676537", "0.5665788", "0.56531096", "0.5590717", "0.557181", "0.5468976", "0.5463126", "0.5419899", "0.5410675", "0.5404743", "0.5395988", "0.5296206",...
0.7544638
0