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
calculation of unbiased RMSE
def h9N_(iAxY, oug5): return oyIN.sqrt(iAxY ** 2 - oug5 ** 2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kmMN(YKHO, k8N0, NVe0):\n return (sum((NVe0 - YKHO.predict(k8N0)) ** 2) / len(oyIN.array(NVe0).flatten())) ** 0.5", "def iAxY(amsI):\n amsI.obsp['kruskel_matrix'], amsI.uns['kruskel_score'], amsI.uns['rmse_score'] = CTjy(amsI)\n return float(amsI.uns['rmse_score'])", "def CTjy(PjQx, aJu6):\n re...
[ "0.76349115", "0.7584979", "0.7558768", "0.7527173", "0.74988925", "0.74555385", "0.7424516", "0.7388044", "0.7386663", "0.7378913", "0.73603475", "0.7324536", "0.7314777", "0.7308255", "0.72951305", "0.72826284", "0.72790134", "0.7277161", "0.72747064", "0.7230456", "0.72228...
0.0
-1
Shortcut function to evaluate the cost of a solution without the overhead of also determining constraint satisfaction.
def eval(YKHO, GERS): xvmK = 0 for PsCT in GERS: Ctv7 = YKHO.depot_location for YPaw in PsCT.gen_steps(): if type(YPaw) is fiWz: xvmK += Ctv7.distances[YPaw.delivery_location.id] Ctv7 = YPaw.delivery_location else: xvmK += C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TrEF(YKHO, WKvO: numpy.ndarray, sSN_: float) -> float:\n return YKHO._evaluate(WKvO)", "def JWaK(YKHO, WKvO: numpy.ndarray, sSN_: float) -> float:\n return YKHO._evaluate_with_cost(WKvO, sSN_)", "def b7La(YKHO, GERS):\n GERS = YKHO.__expand_solution(GERS)\n return (GERS['data']['total_cost'], G...
[ "0.72469985", "0.6967516", "0.6963127", "0.682035", "0.6803556", "0.67640036", "0.67279845", "0.6709536", "0.6699184", "0.66966134", "0.6693963", "0.6664227", "0.6656638", "0.66460806", "0.66266197", "0.66217154", "0.661718", "0.66050035", "0.6592119", "0.6539187", "0.6493206...
0.0
-1
Gets the id of this VoicemailMessagesTopicVoicemailMessage.
def id(YKHO): return YKHO._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ynMe(YKHO):\n return YKHO.messageid", "def KREW(YKHO) -> int:\n assert YKHO.is_set('message_id'), 'message_id is not set'\n return YWvJ(int, YKHO.get('message_id'))", "def KREW(YKHO) -> int:\n assert YKHO.is_set('message_id'), 'message_id is not set.'\n return YWvJ(int, YKHO.get('message_id'...
[ "0.6265434", "0.62349814", "0.6232394", "0.61684424", "0.6014861", "0.6014861", "0.5982485", "0.5875004", "0.58341235", "0.58230036", "0.58230036", "0.5690911", "0.56302017", "0.5594681", "0.5578684", "0.5500984", "0.548694", "0.5406636", "0.5379447", "0.52930135", "0.5279917...
0.0
-1
Gets the audio_recording_size_bytes of this VoicemailMessagesTopicVoicemailMessage.
def Oigf(YKHO): return YKHO._audio_recording_size_bytes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Oigf(YKHO, Oigf):\n YKHO._audio_recording_size_bytes = Oigf", "def klGB(YKHO):\n return len(YKHO.audio_data)", "def DuCy(YKHO):\n return YKHO.audio.duration_seconds", "def BmpO(YKHO):\n if YKHO.force_auto_sync:\n YKHO.get('RecordSize')\n return YKHO._RecordSize", "def Yj4U(YKHO):\...
[ "0.6855709", "0.65282625", "0.620633", "0.61582637", "0.6146692", "0.6137477", "0.609486", "0.60023487", "0.6001046", "0.59301406", "0.59024894", "0.58859575", "0.58574915", "0.5832506", "0.5831185", "0.5829651", "0.5814086", "0.57902056", "0.57863253", "0.5781345", "0.573752...
0.8114743
0
Gets the created_date of this VoicemailMessagesTopicVoicemailMessage.
def a0GP(YKHO): return YKHO._created_date
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uVt6(YKHO):\n return YKHO._payload.get_created_date()", "def a0GP(YKHO) -> qcWV:\n return YKHO._created_date", "def laTD(YKHO):\n return YKHO.properties.get('createdDateTime', qcWV.datetime.min)", "def JjkJ(YKHO):\n return YKHO._date_created", "def a0GP(YKHO) -> str:\n return qe4Y.get(YK...
[ "0.6945729", "0.68346006", "0.6779684", "0.6544891", "0.6544041", "0.6544041", "0.65050226", "0.65050226", "0.65050226", "0.6482936", "0.6482936", "0.6482936", "0.6482936", "0.6371912", "0.6371912", "0.6371912", "0.63644505", "0.63214034", "0.63214034", "0.63194656", "0.62678...
0.678864
3
Gets the modified_date of this VoicemailMessagesTopicVoicemailMessage.
def lOhs(YKHO): return YKHO._modified_date
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KK98(YKHO):\n return YKHO._date_modified", "def H89G(YKHO, YEnM):\n return YKHO.get_version(YEnM).modified", "def mfCm(YKHO) -> qcWV:\n return YKHO._modified_at", "def Q8ne(YKHO):\n return YKHO._modified_time", "def wgS4(YKHO):\n return YKHO.__modified_time", "def mfCm(YKHO):\n retu...
[ "0.67309785", "0.654131", "0.644373", "0.6407292", "0.6392685", "0.6262329", "0.62338805", "0.6190502", "0.6176888", "0.6176888", "0.6176888", "0.6176888", "0.6103387", "0.6056832", "0.6030508", "0.6030508", "0.59542334", "0.5945726", "0.5922465", "0.59171826", "0.58972013", ...
0.68314624
0
Gets the caller_address of this VoicemailMessagesTopicVoicemailMessage.
def PU3w(YKHO): return YKHO._caller_address
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eP85(YKHO):\n return YKHO._data.get('message_from')", "def gQJ5(YKHO):\n D3lj = None\n if YKHO.is_msg_received():\n or8S = YKHO.data.index('MSG')\n nPrm = YKHO.data[or8S:]\n D3lj = nPrm.split()[1]\n return D3lj", "def YWSV(YKHO) -> str:\n return YKHO._sender_email_addres...
[ "0.6392611", "0.62205744", "0.6110958", "0.60786194", "0.5952532", "0.58436245", "0.5814234", "0.5806843", "0.5780464", "0.57749873", "0.5760392", "0.5754805", "0.5705388", "0.5679437", "0.56791615", "0.5663959", "0.56466126", "0.5574944", "0.5569276", "0.5519691", "0.5510509...
0.66366965
0
Sets the caller_address of this VoicemailMessagesTopicVoicemailMessage.
def PU3w(YKHO, PU3w): YKHO._caller_address = PU3w
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cBjY(YKHO, cBjY):\n YKHO._sender_address = cBjY", "def YWSV(YKHO, YWSV: str):\n YKHO._sender_email_address = YWSV", "def hMFr(YKHO, PObu):\n YKHO.__caller_uid = PObu", "def vC92(YKHO, vC92):\n if vC92 is None:\n raise ValueError('Invalid value for `sender`, must not be `None`')\n YK...
[ "0.6239755", "0.6135955", "0.5786665", "0.5769225", "0.5690111", "0.56724966", "0.56474817", "0.5346102", "0.5344089", "0.5334231", "0.5333048", "0.5319889", "0.52714413", "0.51621825", "0.51379293", "0.5108904", "0.5108904", "0.50936437", "0.50722015", "0.49829674", "0.49593...
0.6763818
0
Gets the caller_name of this VoicemailMessagesTopicVoicemailMessage.
def wpF7(YKHO): return YKHO._caller_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NPe5(YKHO) -> str:\n return YKHO._conversation_topic", "def yH5S(YKHO) -> str:\n return YKHO._sender_name", "def O7Jy(YKHO):\n return YKHO._conn.topic_name", "def O7Jy(YKHO) -> str:\n return qe4Y.get(YKHO, 'topic_name')", "def VGX7(YKHO) -> str:\n return YKHO.__dict__['originator_topic']...
[ "0.6454285", "0.6354249", "0.62487054", "0.620897", "0.6170213", "0.6037739", "0.58457434", "0.58353394", "0.5799932", "0.5796177", "0.5766743", "0.5743554", "0.57177186", "0.5671068", "0.5668057", "0.5664487", "0.56621575", "0.56598854", "0.565852", "0.5633721", "0.5628744",...
0.6808929
0
Gets the action of this VoicemailMessagesTopicVoicemailMessage.
def XeOP(YKHO): return YKHO._action
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AMEM(YKHO):\n return YKHO.__action", "def AMEM(YKHO):\n return YKHO._action", "def AMEM(YKHO):\n return YKHO._action", "def AMEM(YKHO):\n return YKHO._action", "def XeOP(YKHO) -> laHg.Optional[str]:\n return YKHO._values.get('action')", "def AMEM(YKHO):\n return YKHO.action", "def...
[ "0.63795626", "0.63721836", "0.63721836", "0.63721836", "0.6365713", "0.63222146", "0.62666285", "0.62304175", "0.62304175", "0.62304175", "0.62304175", "0.62304175", "0.62304175", "0.620168", "0.61959434", "0.6166645", "0.6166645", "0.6166645", "0.6166645", "0.6166645", "0.6...
0.61081266
22
Gets the note of this VoicemailMessagesTopicVoicemailMessage.
def fytP(YKHO): return YKHO._note
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jmE9(YKHO):\n return YKHO.note", "def jmE9(YKHO):\n return YKHO.note", "def jmE9(YKHO):\n return YKHO.note", "def jmE9(YKHO):\n return YKHO.note", "def jmE9(YKHO):\n return YKHO.__note", "def fytP(YKHO):\n return YKHO._note", "def TQbh(YKHO) -> str:\n return YKHO.__note", "de...
[ "0.63212585", "0.63212585", "0.63212585", "0.63212585", "0.6273194", "0.61217415", "0.6042621", "0.5862375", "0.5862375", "0.5815727", "0.58094907", "0.57556325", "0.5748915", "0.5741467", "0.5741467", "0.5741467", "0.5741467", "0.5727878", "0.5727878", "0.5727878", "0.572787...
0.6283008
4
Gets the modified_by_user_id of this VoicemailMessagesTopicVoicemailMessage.
def XYCS(YKHO): return YKHO._modified_by_user_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XYCS(YKHO, XYCS):\n YKHO._modified_by_user_id = XYCS", "def YgMu(YKHO):\n return YKHO.properties.get('ModifiedBy', mv1M(YKHO.context, oudJ('ModifiedBy', YKHO.resource_path)))", "def YgMu(YKHO):\n bD7m = YKHO._data.get('related', {}).get('modified_by')\n return YKHO._tower._get_object_by_url('Us...
[ "0.64062226", "0.63628626", "0.634992", "0.6170818", "0.611434", "0.6104332", "0.5917015", "0.5891656", "0.5886212", "0.58226234", "0.580495", "0.571834", "0.5629641", "0.5584378", "0.53819275", "0.5376909", "0.5376909", "0.53130287", "0.52267313", "0.52218366", "0.52218366",...
0.75216794
0
Sets the modified_by_user_id of this VoicemailMessagesTopicVoicemailMessage.
def XYCS(YKHO, XYCS): YKHO._modified_by_user_id = XYCS
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dFAY(YKHO, YgMu):\n try:\n from zcrmsdk.src.com.zoho.crm.api.users import User\n except Exception:\n from ..users import User\n if YgMu is not None and (not isinstance(YgMu, User)):\n raise pDrJ(Byma.DATA_TYPE_ERROR, 'KEY: modified_by EXPECTED TYPE: User', None, None)\n YKHO.__...
[ "0.7043542", "0.6834603", "0.6834603", "0.6834603", "0.6834603", "0.6834603", "0.6834603", "0.6834603", "0.6628834", "0.6422157", "0.6422157", "0.6422157", "0.6318386", "0.59261006", "0.57456076", "0.5595274", "0.55020946", "0.5450526", "0.5430001", "0.5430001", "0.54224944",...
0.78496826
0
Gets the copied_to of this VoicemailMessagesTopicVoicemailMessage.
def JdDG(YKHO): return YKHO._copied_to
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ykpc(YKHO):\n return YKHO._copied_from", "def O2YH(YKHO):\n return YKHO._clipboard", "def dOjr(YKHO):\n return YKHO._copy_destination_name", "def Ob6z(Ol8d: 'helics_message_object') -> 'char const *':\n return RznI.helicsMessageGetOriginalDestination(Ol8d)", "def fkgX(YKHO):\n return YKH...
[ "0.579807", "0.57755744", "0.55215144", "0.50923824", "0.5019891", "0.49908513", "0.49881196", "0.4983221", "0.49699238", "0.49699238", "0.49546695", "0.4952364", "0.49397725", "0.49338177", "0.48926094", "0.48884568", "0.483617", "0.48138645", "0.47950265", "0.47608465", "0....
0.6670374
0
Sets the copied_from of this VoicemailMessagesTopicVoicemailMessage.
def ykpc(YKHO, ykpc): YKHO._copied_from = ykpc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JdDG(YKHO, JdDG):\n YKHO._copied_to = JdDG", "def Dbo5(YKHO, y3do):\n YKHO.message.mail_from = y3do", "def ykpc(YKHO):\n return YKHO._copied_from", "def rmvF(YKHO):\n FUjE = YKHO.messages.toPlainText()\n if FUjE:\n BBLH = q22J.clipboard()\n BBLH.setText(FUjE)", "def jth9(YK...
[ "0.5987645", "0.5513286", "0.52963024", "0.5233929", "0.52037084", "0.5092912", "0.50854355", "0.5046765", "0.5046765", "0.49516618", "0.4895346", "0.48650357", "0.48650357", "0.48650357", "0.4837789", "0.47807294", "0.47807294", "0.4779021", "0.47724032", "0.47524375", "0.47...
0.7091412
0
Returns the string representation of the model
def gTzM(YKHO): return EyO9(YKHO.to_dict())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zAg0(YKHO):\n return str(YKHO.__model)", "def zAg0(YKHO):\n return str(YKHO.model)", "def zAg0(YKHO):\n return YKHO.text", "def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\...
[ "0.86418265", "0.85103965", "0.7853324", "0.77442306", "0.7712258", "0.76979405", "0.765959", "0.7637644", "0.76218504", "0.7607561", "0.7606604", "0.7606604", "0.7606604", "0.75990754", "0.7585653", "0.758149", "0.7570811", "0.7567585", "0.75392604", "0.75392604", "0.7527967...
0.0
-1
Returns true if both objects are not equal
def Vdqg(YKHO, Elif): return not YKHO == Elif
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)", "def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif", "def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif", "def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True", "def Vdqg(...
[ "0.8392633", "0.8354901", "0.82950056", "0.8132309", "0.81149805", "0.8099986", "0.809911", "0.8097883", "0.8097883", "0.8092252", "0.8092252", "0.8092252", "0.8092252", "0.8085141", "0.8085141", "0.8085141", "0.8085141", "0.8085141", "0.8066694", "0.80594814", "0.805757", ...
0.0
-1
Returns `model_fn` closure for TPUEstimator.
def VPYM(fh1F, dt0H, b0Ix, H0j9, USzt, ND3i, as3x, WLUQ=False): def JnVv(bySB, Crrw, Tuqy, NArs): """The `model_fn` for TPUEstimator.""" ZylS.logging.info('*** Current mode: %s ***' % Tuqy) ZylS.logging.info('*** Features ***') for mWFP in sorted(bySB.keys()): ZylS.loggi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rNzv(QjBU):\n\n def Csmj(bySB, Crrw, Tuqy, NArs):\n \"\"\"Model function.\"\"\"\n del Crrw, NArs\n qqWV = C3ST.BaseModel(QjBU, mode=Tuqy, features=bySB)\n if Tuqy == QUnY.ModeKeys.INFER:\n xnXT = qqWV.predicted_ids\n xnXT = ZylS.transpose(xnXT, [2, 1, 0])\n ...
[ "0.67876256", "0.67231953", "0.6708339", "0.6708339", "0.6704804", "0.6642739", "0.66179776", "0.6606682", "0.64987177", "0.64855075", "0.64845395", "0.64673865", "0.6446065", "0.6385782", "0.63442314", "0.6340337", "0.63192046", "0.62871474", "0.6259095", "0.6225923", "0.622...
0.5521504
74
The `model_fn` for TPUEstimator.
def JnVv(bySB, Crrw, Tuqy, NArs): ZylS.logging.info('*** Current mode: %s ***' % Tuqy) ZylS.logging.info('*** Features ***') for mWFP in sorted(bySB.keys()): ZylS.logging.info(' name = %s, shape = %s' % (mWFP, bySB[mWFP].shape)) QdZh = bySB['input_ids_1'] kEMg = bySB['input_mask_1'] if d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZPn8(YKHO, bySB, Crrw, ND3i):\n oYbx = gnPz.fn_args(YKHO._model_fn)\n B2fa = {}\n GPtr = jth9.deepcopy(YKHO._config)\n NArs = jth9.deepcopy(YKHO._params)\n if 'labels' in oYbx:\n B2fa['labels'] = Crrw\n elif Crrw is not None:\n raise ValueError('model_fn does not take labels, bu...
[ "0.72362834", "0.7198053", "0.71058893", "0.70971304", "0.7038464", "0.7038464", "0.697475", "0.69312525", "0.6887504", "0.67796916", "0.66569746", "0.6626366", "0.66256857", "0.6591902", "0.65852433", "0.65476555", "0.6534668", "0.6486356", "0.6484161", "0.64805233", "0.6425...
0.0
-1
Test myaccount view. 1. Check if "response.status_code" is "302". 2. Check if suitables templates are used.
def SxX6(YKHO): geh0 = YKHO.client.get(gxEw('myaccount')) YKHO.assertEqual(geh0.status_code, 302) with YKHO.assertTemplateUsed('user/myaccount.html'), YKHO.assertTemplateUsed('webapp/base.html'): eoaG('user/myaccount.html')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def khDc(YKHO):\n YKHO.client.force_login(YKHO.user)\n geh0 = YKHO.client.get(gxEw('account'))\n YKHO.assertEquals(geh0.status_code, 200)\n YKHO.assertTemplateUsed(geh0, 'account.html')", "def AkJo(YKHO):\n geh0 = YKHO.client.get('/myaccount/')\n YKHO.assertEqual(geh0.status_code, 302)", "def...
[ "0.78349435", "0.75621915", "0.75074714", "0.7456508", "0.7452333", "0.7444026", "0.74266356", "0.7408005", "0.73397505", "0.7261719", "0.7238283", "0.72082984", "0.7198289", "0.71821964", "0.71799207", "0.71490794", "0.71402913", "0.71387595", "0.7134159", "0.7125495", "0.71...
0.8617552
0
Test signup view. 1. Check if "response.status_code" is "200". 2. Check if suitables templates are used.
def fbc7(YKHO): geh0 = YKHO.client.get(gxEw('signup')) YKHO.assertEqual(geh0.status_code, 200) with YKHO.assertTemplateUsed('registration/signup.html'), YKHO.assertTemplateUsed('webapp/base.html'): eoaG('registration/signup.html')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TMgz(YKHO):\n geh0 = YKHO.client.get(gxEw('userena_signup'))\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertTemplateUsed(geh0, 'userena/signup_form.html')\n YKHO.failUnless(isinstance(geh0.context['form'], H6V6.SignupForm))", "def jKDB(YKHO):\n geh0 = YKHO.client.get(gxEw('account_sign...
[ "0.84574604", "0.8401567", "0.832184", "0.80394965", "0.7942791", "0.78402793", "0.7793254", "0.77930635", "0.77471423", "0.77317905", "0.7730364", "0.7709296", "0.7690962", "0.7676832", "0.7663594", "0.7625337", "0.7604258", "0.76029754", "0.7568311", "0.7553369", "0.7536199...
0.85272485
0
Ensure 'Not open source' license option builds correctly
def pJ8S(YKHO): kCnE = lfdS.bake_cookiecutter_template(output_dir=YKHO.tmpdir, extra_context={'license': 'Not open source'}) YKHO.assertFalse(Hy7s.path.exists(Hy7s.path.join(kCnE, 'LICENSE'))) hGN5 = lfdS.read_template_file(kCnE, 'setup.py') YKHO.assertTrue('License ::' not in hGN5) YKHO.assertIsNon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yvr0():\n QXuz = Hy7s.path.normpath(Hy7s.path.join(Hy7s.path.dirname(Hy7s.path.realpath(xAKo)), '../../../Cargo.toml'))\n BfDw.run_cmd('cargo deny --manifest-path {} check licenses'.format(QXuz))", "def rPUp() -> None:\n Bbab('adding license text', lambda kZnE, l5Ny: kZnE + l5Ny if not l5Ny.startswi...
[ "0.7159579", "0.6976323", "0.6702331", "0.6693014", "0.6552542", "0.65047354", "0.6491454", "0.6444097", "0.6431591", "0.6424159", "0.64119035", "0.6376631", "0.63608617", "0.63252574", "0.6227896", "0.6224024", "0.6224024", "0.6224024", "0.6224024", "0.6224024", "0.6224024",...
0.7686578
0
get index position of an entry from self.entries
def Vn7Z(YKHO, dHtL): UHFx = 0 for bTKY in YKHO.entries: if bTKY == dHtL: return UHFx UHFx += 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sIqi(YKHO, Tl1c=None):\n if Tl1c is None:\n return -1\n for d6pt, bTKY in enumerate(YKHO.contents):\n if bTKY.thread_id == Tl1c:\n return d6pt\n return -1", "def Vn7Z(YKHO) -> int:\n return YKHO._index", "def B34W(YKHO, H5ew: Hashable) -> int:\n l4XF, FMLJ = YKHO.loc...
[ "0.7202741", "0.7041087", "0.7026501", "0.6956022", "0.69543636", "0.6950519", "0.6938597", "0.69068533", "0.69019157", "0.68527085", "0.68367755", "0.6833008", "0.68172693", "0.67888314", "0.67570394", "0.67510235", "0.6731338", "0.6717638", "0.6704729", "0.6689389", "0.6661...
0.7611298
0
Takes a datetime object and returns a formatted time stamp.
def dMgB(auAJ): WE0c = '%Y-%m-%d' if isinstance(auAJ, qcWV.datetime): WE0c += 'T%H:%M:%S.000Z' return auAJ.strftime(WE0c) elif isinstance(auAJ, qcWV.date): return auAJ.strftime(WE0c)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZOUZ(VwNh: datetime.datetime) -> str:\n return VwNh.strftime('%Y-%m-%d %H:%M:%S')", "def Zb98(JRYC):\n return JRYC.strftime('%Y-%m-%d %H:%M:%SZ')", "def Zb98(JRYC, format='%Y-%m-%d %H:%M'):\n return JRYC.strftime(format)", "def arZs(qcWV):\n return qcWV.strftime('%b %d %Y')", "def Zb98(JRYC...
[ "0.7834118", "0.7642627", "0.7520556", "0.75034267", "0.7481834", "0.7451886", "0.73314524", "0.7326563", "0.7325245", "0.730023", "0.72900355", "0.72758454", "0.7275443", "0.72506267", "0.7239398", "0.72262883", "0.7223748", "0.72138876", "0.72063273", "0.71811527", "0.71787...
0.0
-1
Compute rowwise softmax of X using native pytorch We subtract the maximum element in order to avoid overflows. Softmax is invariant to this shift.
def wrRT(WKvO): re6M = WKvO.max(dim=1)[0] epBp = WKvO - re6M[:, None] M6pt = ht2j.exp(epBp) UUZ1 = M6pt.sum(dim=1) U5bT = M6pt / UUZ1[:, None] return U5bT
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N93T(WKvO):\n GF7e = oyIN.max(WKvO, axis=1, keepdims=True)\n hkxX = oyIN.exp(WKvO - GF7e)\n hkxX /= oyIN.sum(hkxX, axis=1, keepdims=True)\n ICX2 = None\n return (hkxX, ICX2)", "def N93T(YKHO, WKvO, yvT9):\n yvT9[:] = YKHO.ng.reciprocal(YKHO.ng.sum(YKHO.ng.exp(WKvO - YKHO.ng.max(WKvO, axis=0...
[ "0.76746523", "0.7659102", "0.7652212", "0.7585456", "0.75578374", "0.7557657", "0.7557581", "0.7552864", "0.7552119", "0.75428504", "0.7537441", "0.7536921", "0.75265276", "0.7526046", "0.751839", "0.74982893", "0.74953955", "0.749072", "0.7487449", "0.7487062", "0.7487062",...
0.0
-1
The default response is application/json so our endpoint returns appropriately with a json based response.
def E5Kv(YKHO, sEAN, nPrm): return nEWO.json_result('id', 'A large number of responses go here')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qQXR(YKHO):\n return geh0", "def qQXR(YKHO):\n return geh0", "def qQXR(YKHO):\n return geh0", "def FnVX():\n geh0.content_type = 'application/json'", "def qQXR(YKHO):\n return YKHO.response.json()", "def qQXR(YKHO):\n return YKHO.response.json()", "def NULH(YKHO):\n return oGir...
[ "0.7978942", "0.7978942", "0.7978942", "0.7617155", "0.7563627", "0.73774153", "0.7377295", "0.7368386", "0.73343706", "0.7227535", "0.70674783", "0.70646113", "0.69897556", "0.69861835", "0.6969067", "0.6903539", "0.6900428", "0.6877853", "0.68254226", "0.6815372", "0.678354...
0.0
-1
Get file path of netcdf for the passed version as in the file name.
def qFFa(DpZH): PFLj = Hy7s.path.join(Hy7s.path.dirname(xAKo), 'definition_files') return Hy7s.path.join(PFLj, 'ESA-CCI-SOILMOISTURE-LAND_AND_RAINFOREST_MASK-fv{}.nc'.format(DpZH))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mVdj(YKHO, DpZH):\n return Hy7s.path.join(YKHO.path, '{:0{length}}'.format(DpZH, length=YKHO.version_num_length))", "def shAH(YKHO, DpZH):\n pmON = YKHO.path / str(DpZH)\n return pmON", "def XuzF(YKHO, mWFP: str, DpZH: str) -> h8nf[str]:\n Ux0P = YKHO.filenames.get((mWFP, DpZH))\n if Ux0P:\n...
[ "0.68731076", "0.6836353", "0.67456937", "0.66850126", "0.6598848", "0.64830834", "0.64310944", "0.63665986", "0.6349833", "0.6305759", "0.62946105", "0.62946105", "0.6279228", "0.6256189", "0.61439824", "0.61401755", "0.61397886", "0.6131838", "0.6125938", "0.6107622", "0.60...
0.6550223
5
Returns a task as a dictionary that can be easily dumped to YAML/json.
def MNRr(D5gV): return dict(name=D5gV.name, state=D5gV.state, **D5gV.directives)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WYhE(D5gV):\n pB3N = D5gV.payload\n if pB3N and D5gV.content_type == 'application/json':\n pB3N = qQXR.loads(pB3N)\n return dict(task_id=D5gV.task_id, queue_name=D5gV.queue_name, eta=ltVJ(D5gV.eta), source=D5gV.source, created=ltVJ(D5gV.created), lease_attempts=D5gV.lease_attempts, last_lease=l...
[ "0.7742849", "0.7636824", "0.75804204", "0.75307393", "0.7451102", "0.7422642", "0.7083378", "0.70524496", "0.6986262", "0.697702", "0.6836267", "0.68169767", "0.6800779", "0.6783848", "0.674837", "0.674479", "0.6707837", "0.6676999", "0.6674015", "0.6663375", "0.6628364", ...
0.8161431
0
Allow relations if a model in the auth app is involved.
def j7eD(YKHO, BzZr, RL4V, **MDDt): return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def j7eD(YKHO, BzZr, RL4V, **MDDt):\n if BzZr._meta.app_label in ['auth', 'admin', 'sessions', 'contenttypes'] and RL4V._meta.app_label in ['auth', 'admin', 'sessions', 'contenttypes']:\n return True\n elif BzZr._meta.app_label not in ['auth', 'admin', 'sessions', 'contenttypes'] or RL4V._meta.app_lab...
[ "0.78841025", "0.781458", "0.7158269", "0.71039176", "0.7083407", "0.6811982", "0.66926587", "0.66334206", "0.65149105", "0.64071804", "0.6397388", "0.6363309", "0.636049", "0.6316254", "0.62260854", "0.6195696", "0.6123617", "0.6086993", "0.6072045", "0.59980845", "0.5964396...
0.6792545
6
Normalizes a PSF (2d or 3d array), to have the flux in a 1xFWHM aperture equal to one. It also allows to crop the array and center the PSF at the center of the array(s).
def Bw73(qw7D, rXfu='fit', zNig=None, gwAu=None, pMS0=None, C3ST='gauss', ndsM='vip-fft', GoGv='lanczos4', jmRH=True, ZLkU=True, hjzP=False, PJWX=True, dsE5=False): def v0NS(dYOR, rXfu, gwAu, pMS0, hjzP, PJWX): """ 2d case """ vHO5, UV8M = pmzJ(dYOR, verbose=False) vMmj, tN6a = dcHn(dYOR) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NkkI(YKHO):\n nPrm = YKHO.psf_kernel_map.data\n if YKHO.psf_kernel_map.geom.is_image:\n jDK_ = (0, 1)\n else:\n jDK_ = (1, 2)\n with oyIN.errstate(divide='ignore', invalid='ignore'):\n nPrm = oyIN.nan_to_num(nPrm / nPrm.sum(axis=jDK_, keepdims=True))\n YKHO.psf_kernel_ma...
[ "0.66394556", "0.6594581", "0.642228", "0.6381772", "0.63623726", "0.6327994", "0.63146627", "0.629734", "0.6249252", "0.6244875", "0.6238824", "0.6201508", "0.61646205", "0.61449623", "0.6129896", "0.61266714", "0.610137", "0.60949486", "0.6094922", "0.60809", "0.6075102", ...
0.69429135
0
Returns ArgumentParser instance with arguments
def yl6v(): wvEv = j1Jz.ArgumentParser(add_help=False) wvEv.add_argument('--patch', '-p', dest='patch', required=True, help='Patch number') wvEv.add_argument('--debug', action='store_true', dest='debug', help='Turn on debug') return wvEv
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TOpa(YKHO):\n wvEv = YKHO._new_argument_parser()\n YKHO._add_base_arguments(wvEv)\n YKHO._add_required_arguments(wvEv)\n return wvEv", "def xuJu():\n return j1Jz.ArgumentParser()", "def EpPs():\n wvEv = WDqQ(description=__doc__, formatter_class=JXf6)\n wvEv.add_argument('-t', '--token'...
[ "0.786579", "0.7680569", "0.7594339", "0.7588092", "0.74307275", "0.74166644", "0.73875815", "0.73839027", "0.7375343", "0.73643327", "0.72652364", "0.72351044", "0.72311646", "0.7225812", "0.7216938", "0.7213983", "0.7211613", "0.71996355", "0.71964765", "0.71927154", "0.719...
0.0
-1
The name of the resource group. The name is case insensitive.
def TRLE(YKHO) -> qe4Y.Input[str]: return qe4Y.get(YKHO, 'resource_group_name')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TRLE(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_group_name')", "def TRLE(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_group_name')", "def IXKo(YKHO) -> str:\n return qe4Y.get(YKHO, 'group_name')", "def TRLE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'resource_group_name')", ...
[ "0.8590243", "0.8590243", "0.8364527", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "0.8202957", "...
0.80886495
49
Get an existing StorageTarget resource's state with the given name, id, and optional extra properties used to qualify the lookup.
def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None) -> 'StorageTarget': VKhi = qe4Y.ResourceOptions.merge(VKhi, qe4Y.ResourceOptions(id=id)) r6DL = Avv6.__new__(Avv6) r6DL.__dict__['allocation_percentage'] = None r6DL.__dict__['blob_nfs'] = None r6DL.__dict__['clf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None, E4qv: Optional[pulumi.Input[str]]=None, KcEq: Optional[pulumi.Input[str]]=None, mWFP: Optional[pulumi.Input[str]]=None, bIwZ: Optional[pulumi.Input[int]]=None, dJ1p: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType[...
[ "0.64016527", "0.60670227", "0.5600926", "0.5463614", "0.5435514", "0.54301786", "0.5412128", "0.53730655", "0.53452", "0.53273106", "0.5316254", "0.5277872", "0.5268351", "0.5241392", "0.52365667", "0.52255046", "0.52220297", "0.5196487", "0.5189364", "0.5187103", "0.5166723...
0.73442185
0
Return True if entity is on.
def Debg(YKHO) -> bool: return YKHO.coordinator.data[GMAI][YKHO._device.index].status == coJ4
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Debg(YKHO) -> bool:\n return YWvJ(bool, getattr(YKHO._device, YKHO.entity_description.key))", "def Debg(YKHO) -> bool:\n return YKHO.coordinator.data[YKHO.entity_description.key]", "def Debg(YKHO) -> bool:\n return YKHO.entity_description.value(YKHO.coordinator.data)", "def Debg(YKHO):\n retu...
[ "0.8761978", "0.8430723", "0.8366511", "0.82468796", "0.82126695", "0.8134813", "0.8096393", "0.80831903", "0.7992399", "0.79445326", "0.79259515", "0.7771376", "0.77453554", "0.7722858", "0.7674012", "0.76664525", "0.75941235", "0.75862557", "0.7550175", "0.7550175", "0.7444...
0.7203274
62
Add dynamics of single observable statistics.
def Enia(MPlV, wvEv, W061, iPqd, Aznl='master'): try: xuug = xtda(wvEv.experiment, W061, cset=iPqd) except zn3Q: return (None, None) Tk9y = 'master' Bewq = 'all' if Aznl != 'master': for bSg6 in iPqd: if Aznl == repr(bSg6): Tk9y = Aznl ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jUTG(YKHO, rlTz):\n with YKHO.lock:\n if rlTz.count > 0:\n B3XY = (YKHO.mean * YKHO.count + rlTz.mean * rlTz.count) / (YKHO.count + rlTz.count)\n YKHO.partial_variance = YKHO.partial_variance + rlTz.partial_variance + (YKHO.mean - B3XY) * YKHO.mean * YKHO.count + (rlTz.mean - B3...
[ "0.5941674", "0.56809527", "0.5583201", "0.55563176", "0.55476356", "0.5515173", "0.54911935", "0.5474189", "0.5468086", "0.5436501", "0.54353774", "0.5433066", "0.54133815", "0.54090995", "0.5353169", "0.5323352", "0.53011185", "0.5292519", "0.52835906", "0.52791643", "0.523...
0.56113213
2
Generates sleep intervals based on the exponential backoff algorithm. This implements the `Truncated Exponential Backoff`_ algorithm.
def veA5(RqgG, PtQX, pSDG=2, bHg_=ECJ5): h7D2 = RqgG while True: yield h7D2 h7D2 = min(h7D2 * pSDG + tuKI.uniform(0, bHg_), PtQX)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def u31W(YRbF):\n Mkmy = ajWY(0, 2 ** YRbF - 1)\n return Mkmy * (512 / A3Vt)", "def IxzA(YRbF):\n return 1.5 ** YRbF + tuKI.random()", "def u31W(T0bq: int):\n ITS7.sleep(2 ** T0bq)", "def oeqx(zKor):\n ITS7.sleep(zKor)\n return zKor * 2", "def Kb5K(N5MO, bhkl, wCJR):\n pqCk = 2.0 ** (w...
[ "0.7273101", "0.7011885", "0.69846636", "0.6959692", "0.6881038", "0.68671274", "0.6804683", "0.679013", "0.668512", "0.6682245", "0.6648488", "0.6627432", "0.65447223", "0.64843875", "0.6482553", "0.64608854", "0.6453726", "0.643625", "0.641708", "0.6408227", "0.6401131", ...
0.6803714
7
Returns the first_name plus the last_name, with a space in between.
def xpqj(YKHO): eHMM = '%s %s' % (YKHO.first_name, YKHO.last_name) return eHMM.strip()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e1yb(c9ua, zp3f):\n eHMM = c9ua + ' ' + zp3f\n return eHMM", "def xpqj(YKHO):\n return (YKHO.first_name + ' ' + YKHO.last_name).strip()", "def zFMy(YKHO):\n return (YKHO.first_name or '') + (YKHO.first_name and ' ' or '') + (YKHO.last_name or '')", "def e1yb(c9ua, zp3f):\n eHMM = c9ua.titl...
[ "0.82872856", "0.8179012", "0.81130326", "0.80760396", "0.8034134", "0.8032392", "0.8030516", "0.80072623", "0.8006718", "0.8005418", "0.8000916", "0.7995176", "0.79901665", "0.79793483", "0.79790914", "0.79603624", "0.7952844", "0.7944558", "0.7944558", "0.79419315", "0.7941...
0.77470917
59
Filter Rides such that only active and pickup_date is less than or equal to current date
def yD4a(Emd4): return Emd4.objects.filter(FYrf.Q(is_active=True))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WZHJ(YKHO, *qIxc, **B2fa):\n exwG = wzkt()\n kY59 = T8ck(valid_from__isnull=True) | T8ck(valid_from__lte=exwG)\n lCtI = T8ck(valid_to__isnull=True) | T8ck(valid_to__gte=exwG)\n deVW = YKHO.filter(kY59, lCtI, active=True)\n return deVW.exclude(uses_remaining=0)", "def WZHJ(YKHO, *qIxc, **B2fa):...
[ "0.60382295", "0.60034966", "0.5979588", "0.5960248", "0.59289104", "0.58840054", "0.58494467", "0.580123", "0.5791176", "0.5760131", "0.57237464", "0.57210743", "0.5694826", "0.56680036", "0.5661197", "0.560481", "0.5595632", "0.5595128", "0.5592187", "0.55139846", "0.548095...
0.0
-1
Get the handler name.
def UxLt(YKHO, Asoz: str) -> str: return f'{YKHO.handler_prefix}{Asoz}'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rv5g(DCgT):\n if '__self__' in dir(DCgT) and 'name' in dir(DCgT.__self__):\n return DCgT.__self__.name + '.' + DCgT.__name__\n else:\n return DCgT.__name__", "def rv5g(Emd4) -> str:\n raise NotImplementedError('Instances of SettingsHandler must implement the \"handler_name\" property')...
[ "0.84506994", "0.7945584", "0.7628854", "0.7628854", "0.75738657", "0.7276751", "0.68442935", "0.67816085", "0.67816085", "0.67710006", "0.67710006", "0.6738929", "0.67238957", "0.67238957", "0.65734303", "0.65719837", "0.6566093", "0.65018255", "0.65018255", "0.64904785", "0...
0.81554496
1
Converts 3d image to grayscale
def IeP5(vxQ4): Y0mG = oyIN.sum(oyIN.abs(vxQ4), axis=0) Grnf = oyIN.percentile(Y0mG, 99) jN4Q = oyIN.min(Y0mG) Y0mG = oyIN.clip((Y0mG - jN4Q) / (Grnf - jN4Q), 0, 1) Y0mG = oyIN.expand_dims(Y0mG, axis=0) return Y0mG
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Qx_8(LNo8: pygame.Surface):\n ezWE = a9eO.surfarray.pixels3d(LNo8)\n ezWE = ezWE.dot([0.298, 0.587, 0.114])[:, :, None].repeat(3, axis=2)\n return a9eO.surfarray.make_surface(ezWE)", "def zI1D(LNo8):\n return oyIN.dot(LNo8[..., :3], [0.299, 0.587, 0.114])", "def tmqJ(VXjJ):\n return VXjJ.con...
[ "0.78024673", "0.7321851", "0.7122168", "0.7063838", "0.7063838", "0.7038039", "0.7037037", "0.70243996", "0.6985248", "0.69680357", "0.69680357", "0.6956165", "0.6956165", "0.6956165", "0.6956165", "0.6956165", "0.69387245", "0.6938232", "0.69069296", "0.69069296", "0.690692...
0.0
-1
Normalizes an angle in radians to be in the pi to +pi range
def qUQm(YylR): YylR = round(YylR, 8) while round(YylR, 8) > round(epAf.pi, 8): YylR -= round(2 * epAf.pi, 8) YylR = round(YylR, 8) while round(YylR, 8) < round(-epAf.pi, 8): YylR += round(2 * epAf.pi, 8) return round(YylR, 8)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NkkI(YylR):\n HBfW = epAf.fmod(YylR, epAf.pi)\n if HBfW < 0.0:\n HBfW += epAf.pi\n return HBfW", "def zeLp(YylR):\n return (YylR % (2.0 * epAf.pi) + 2.0 * epAf.pi) % (2.0 * epAf.pi)", "def qUQm(YylR):\n YylR %= oyIN.pi * 2\n if YylR > oyIN.pi:\n YylR -= oyIN.pi * 2\n retu...
[ "0.85941833", "0.8334868", "0.83311385", "0.83180445", "0.83180445", "0.82825017", "0.8224027", "0.8224027", "0.8217287", "0.821297", "0.821297", "0.81926054", "0.81926054", "0.8169131", "0.80450785", "0.8037197", "0.7996394", "0.797474", "0.7968787", "0.7892929", "0.78094196...
0.80384713
15
Tokenize a command line based on whitespace while observing quotes
def pjGW(zFiD): def pD6w(RuAX): """Action: add current symbol to last token in list.""" RuAX.memory[-1] = RuAX.memory[-1] + RuAX.input_symbol def TaV7(RuAX): """Action: start a new token.""" if RuAX.memory[-1] != '': RuAX.memory.append('') def bgyR(RuAX): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n_81(zFiD):\n hUZ1 = URgV.shlex(zFiD, posix=True)\n hUZ1.whitespace_split = True\n hUZ1.commenters = ''\n Ylbp = []\n try:\n while True:\n Ylbp.append(next(hUZ1))\n except ValueError:\n pass\n except StopIteration:\n pass\n if hUZ1.token:\n Ylbp.ap...
[ "0.7419093", "0.7000539", "0.68283767", "0.67307305", "0.67105734", "0.6701093", "0.6620545", "0.65808874", "0.64539576", "0.64117", "0.63870865", "0.6383712", "0.6303236", "0.62810445", "0.6247452", "0.6213515", "0.62045085", "0.6189871", "0.61368674", "0.6135378", "0.609695...
0.0
-1
Unescape string from ^ escaping. ^ inside double quotes is ignored
def XaR8(vIwR): if vIwR == None: return None Aofo = u'' D5jQ = False lxYQ = False for Z9rn in vIwR: if D5jQ: Aofo += Z9rn if Z9rn == '"': D5jQ = False elif lxYQ: Aofo += Z9rn lxYQ = False elif Z9rn == '^'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rtow(str):\n return h29v.sub(ASxf, str[1:-1])", "def jqlv(vIwR):\n ATYb = ['\\\\', '{', '}', '\"']\n for tTpl in ATYb:\n vIwR = vIwR.replace('\\\\' + tTpl, tTpl)\n return vIwR.strip('\"')", "def rtow(KCHu):\n if not (KCHu[0] == '\"' and KCHu[-1] == '\"'):\n KCHu = KCHu.encode('...
[ "0.7600436", "0.71659386", "0.69576395", "0.6901946", "0.6884772", "0.68635356", "0.686083", "0.6850504", "0.68342876", "0.6805729", "0.6776163", "0.6733031", "0.66877675", "0.6661685", "0.66362035", "0.66254634", "0.6614144", "0.66099125", "0.66042477", "0.6591683", "0.65570...
0.7447691
1
Returns whether the Trend data is a partial result.
def FWeY(YKHO) -> bool: return YKHO.is_partial
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def h3DM(YKHO):\n return YKHO.kusto_response is not None", "def b59n(YKHO):\n return 'end' in YKHO.result and ('sum_received' in YKHO.result['end'] or 'sum' in YKHO.result['end'])", "def heUP(YKHO):\n if YKHO.offset is not None and YKHO.offset > 0:\n return True\n if YKHO.bytes is not None a...
[ "0.76872563", "0.7025349", "0.67509997", "0.6675027", "0.66574186", "0.6510297", "0.6504972", "0.6418247", "0.6398439", "0.63380533", "0.6291999", "0.6279583", "0.6279583", "0.6279583", "0.6230201", "0.62009484", "0.6179831", "0.6144435", "0.60958517", "0.6088803", "0.6050036...
0.6736756
3
Produce `n`character chunks from `s`.
def eHxA(KCHu, exwG): for yKcO in range(0, len(KCHu), exwG): yield KCHu[yKcO:yKcO + exwG]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Pkyy(KCHu, exwG):\n if HwRy.version_info.major == 3:\n for YRbF in range(0, len(KCHu), exwG):\n yield KCHu[YRbF:YRbF + exwG]\n else:\n for YRbF in Ni9Y(0, len(KCHu), exwG):\n yield KCHu[YRbF:YRbF + exwG]", "def eHxA(KCHu, exwG):\n for YRbF in range(0, len(KCHu), e...
[ "0.8380982", "0.8316958", "0.8268771", "0.79397076", "0.7887814", "0.76254725", "0.74587375", "0.7293239", "0.7286109", "0.7197271", "0.7154905", "0.71542245", "0.71394026", "0.70742273", "0.7068679", "0.7029804", "0.70244753", "0.702208", "0.69925416", "0.6985252", "0.695644...
0.8198745
3
Persist the object to the DB Either returns True if the object was saved or returns False if there was an error and rolls back the transaction.
def xkzz(YKHO): YKHO._session.add(YKHO) return YKHO.safe_commit()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xkzz(YKHO):\n try:\n NCls.session.add(YKHO)\n NCls.session.commit()\n return True\n except cQ7A:\n NCls.session.rollback()\n return False", "def FAgT(YKHO) -> bool:\n raise NotImplementedError()", "def xkzz(YKHO):\n try:\n NCls.session.add(YKHO)\n ...
[ "0.8279606", "0.7479089", "0.7451372", "0.74055797", "0.74055797", "0.7384937", "0.73552126", "0.7348775", "0.7223789", "0.7194086", "0.7176831", "0.7164253", "0.71305966", "0.71305966", "0.71305966", "0.71305966", "0.71305966", "0.71305966", "0.71305966", "0.71305966", "0.71...
0.7331371
8
return Mahalanobis norm of `x` w.r.t. the statistical model
def CkYf(YKHO, WKvO): return sum(YKHO.transform_inverse(WKvO) ** 2) ** 0.5
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n5mE(EcVT, fuBA):\n if EcVT.ndim != 2:\n Gbs2 = EcVT.ndim\n raise ValueError('Vector ndim must be 2. Vector ndim is ' + str(Gbs2) + '. Check with np.array().ndim. X vector Error.')\n elif fuBA.ndim != 2:\n Gbs2 = fuBA.dim\n raise ValueError('Vector ndim must be 2. Vector ndim ...
[ "0.7363013", "0.7111673", "0.70862025", "0.6867664", "0.6770532", "0.671495", "0.6670166", "0.66118056", "0.65569437", "0.65383106", "0.65034074", "0.6479141", "0.64551866", "0.6451017", "0.6422833", "0.6417203", "0.6400133", "0.6372729", "0.635958", "0.6274445", "0.6273243",...
0.6406819
16
return Mahalanobis norm of `x` w.r.t. the statistical model
def CkYf(YKHO, WKvO): return oyIN.sum(YKHO.transform_inverse(WKvO) ** 2) ** 0.5
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n5mE(EcVT, fuBA):\n if EcVT.ndim != 2:\n Gbs2 = EcVT.ndim\n raise ValueError('Vector ndim must be 2. Vector ndim is ' + str(Gbs2) + '. Check with np.array().ndim. X vector Error.')\n elif fuBA.ndim != 2:\n Gbs2 = fuBA.dim\n raise ValueError('Vector ndim must be 2. Vector ndim ...
[ "0.7363013", "0.7111673", "0.70862025", "0.6867664", "0.6770532", "0.671495", "0.6670166", "0.66118056", "0.65569437", "0.65383106", "0.65034074", "0.6479141", "0.64551866", "0.6451017", "0.6422833", "0.6417203", "0.6406819", "0.6400133", "0.6372729", "0.6274445", "0.6273243"...
0.635958
19
True if the job was a permanent failure.
def ZmKI(YKHO): return not YKHO.is_timeout and YKHO.status_code != 503
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QGvq(YKHO):\n jGRS = False\n tg2u = Hy7s.path.join(Hy7s.environ['PRODAGENT_JOB_DIR'], 'FrameworkJobReport.xml')\n Dfm4 = FHRp(tg2u)\n for sWfS in Dfm4:\n if not sWfS.wasSuccess():\n jGRS = True\n return jGRS", "def lvau(YKHO):\n return YKHO._status == WqeS.SUCCEED and YKHO...
[ "0.7816706", "0.71556574", "0.71032137", "0.70465523", "0.7014058", "0.70115393", "0.6997346", "0.6806985", "0.67603076", "0.6752033", "0.6745101", "0.67203504", "0.67067707", "0.66699535", "0.66699535", "0.66699535", "0.66699535", "0.66699535", "0.66630906", "0.65730834", "0...
0.69316816
7
Return result of a + b.
def H2v5(jzdc, Fg_i): return jzdc + Fg_i
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def H2v5(YKHO, jzdc, Fg_i):\n return jzdc + Fg_i", "def H2v5(jzdc, Fg_i):\n Aofo = jzdc + Fg_i\n return Aofo", "def H2v5(jzdc, Fg_i):\n Aofo = jzdc + Fg_i\n return Aofo", "def H2v5(jzdc, Fg_i):\n Aofo = jzdc + Fg_i\n return Aofo", "def H2v5(jzdc, Fg_i):\n SKE2 = jzdc + Fg_i\n ret...
[ "0.87628627", "0.869689", "0.869689", "0.869689", "0.8522576", "0.8518791", "0.84301805", "0.8371321", "0.826996", "0.8268718", "0.82280684", "0.82280684", "0.82222867", "0.8208847", "0.81917596", "0.8188897", "0.81715834", "0.81687313", "0.8125464", "0.8125464", "0.8125464",...
0.81745833
16
Generate xy grid line segments for a unitsquare grid centered at the origin.
def QMUH() -> oyIN.array: Cs6h = [] for WKvO in oyIN.linspace(-0.5, 0.5, 11): Cs6h.append([WKvO, -0.5, 1.0]) Cs6h.append([WKvO, +0.5, 1.0]) for LVAh in oyIN.linspace(-0.5, 0.5, 11): Cs6h.append([-0.5, LVAh, 1.0]) Cs6h.append([+0.5, LVAh, 1.0]) return oyIN.transpose(Cs6h)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e24l(hGvF, hLRM='upper'):\n LECP, pMBr = hGvF\n return [oyIN.arange(LECP + 1)[::-1] / LECP, oyIN.arange(pMBr + 1) / pMBr]", "def alKd(YKHO):\n Aw8L = YKHO.gridSize * YKHO.worldSize\n t6as = '#202020'\n YKHO.vGrid = []\n for YRbF in range(0, YKHO.worldSize + 1):\n zFiD = YKHO.canvas.c...
[ "0.6646327", "0.65107644", "0.6335238", "0.6271652", "0.62640464", "0.62637246", "0.62379605", "0.62268794", "0.6202701", "0.62000823", "0.61816055", "0.6162981", "0.61370987", "0.61298716", "0.61258334", "0.61114067", "0.61020696", "0.60889244", "0.6085306", "0.60714597", "0...
0.73753256
0
Main application page, this route renders the users profiles.
def z39Z(H5C9: str): VA73 = BlJI(H5C9) if VA73 is None: eTsH(404) EvMt = NuwO() ZQRG = MrNt(user=c5ow, prof_owner=VA73, user_num=5) PenU = VA73.quotes PenU.reverse() return dict(quote_input=EvMt, rec_users=ZQRG, user=VA73, quotes=PenU)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SGll():\n return TvZl('user_profile_page.html')", "def QyAW():\n return TvZl('user_profile_page.html')", "def vJua():\n return TvZl('profile.html')", "def QhXp():\n DW23 = mv1M.query.all()\n rPXJ = TvZl('profiles.html', users=DW23, title='Profiles')\n return rPXJ", "def fRKm():\n r...
[ "0.78415287", "0.7745388", "0.7669976", "0.7644833", "0.76046807", "0.7432784", "0.7425023", "0.74188405", "0.7349778", "0.7311413", "0.72989494", "0.727384", "0.7232841", "0.7206227", "0.717302", "0.71675736", "0.7162318", "0.7158779", "0.71231073", "0.709102", "0.70848244",...
0.0
-1
returns the label names for classification
def Te1x(YKHO): return YKHO.label_list
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lLvL():\n import labels as uxlI\n Ylbp = [\"don't care\"]\n for UXqs in uxlI.labels:\n if UXqs.trainId != 255 and UXqs.trainId != -1:\n Ylbp.append(UXqs.name)\n return Ylbp", "def Y949(__n6):\n return dD7q(__n6).classes", "def Te1x(YKHO) -> list:\n return []", "def Te1...
[ "0.80302066", "0.8003651", "0.79719913", "0.7944625", "0.7929626", "0.7929626", "0.78867716", "0.7863161", "0.78566843", "0.78334606", "0.7817836", "0.78084576", "0.78084576", "0.78084576", "0.78084576", "0.78084576", "0.78084576", "0.78084576", "0.78084576", "0.78084576", "0...
0.78833294
7
Verifies detection and repair of missing Followed records.
def tv2D(YKHO): def rsH7(YsJ5, UkL3, mn17): gpXh = fQqW.CreateSortKey(UkL3, mn17) YKHO._validator.ValidateCreateDBObject(fQqW, user_id=YsJ5, sort_key=gpXh, date_updated=fQqW._TruncateToDay(mn17), viewpoint_id=UkL3) kELS = A2Q_._CreateViewpointInvalidation(UkL3) YKHO._validator.Valid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bQ8R(YKHO):\n yxzR = kJm3('0 @I1@ INDI\\n1 FAMS @FmissingS@\\n1 FAMC @FmissingC@\\n0 @F1@ FAM\\n1 WIFE @ImissingW@\\n1 HUSB @ImissingH@\\n1 CHIL @ImissingC@')\n QyVM, fdC6, E2B1 = XLpq(yxzR)\n YKHO.assertTrue(len([WKvO for WKvO in E2B1 if WKvO.story == 'US26']) == 5)\n YKHO.assertTrue(QyVM['@I1@']....
[ "0.6039676", "0.60042375", "0.5960314", "0.5747306", "0.571504", "0.5671526", "0.56411535", "0.5607761", "0.55954915", "0.55913913", "0.5586729", "0.5572965", "0.55597097", "0.5534776", "0.55270606", "0.5497661", "0.5439237", "0.54387534", "0.5427099", "0.5412867", "0.5385656...
0.722736
0
Verifies detection of activities that refer to some missing posts.
def H0O2(YKHO): YKHO._CreateTestViewpoint('vp1', YKHO._user.user_id, []) YKHO._CreateTestEpisode('vp1', 'ep1', YKHO._user.user_id) YKHO._CreateTestPhotoAndPosts('ep1', YKHO._user.user_id, {'photo_id': 'p10'}) YKHO._RunAsync(nmsT.CreateShareNew, YKHO._client, YKHO._user.user_id, 'vp1', 'a1', ITS7.time() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PuV5(YKHO):\n YKHO._CreateTestViewpoint('vp1', YKHO._user.user_id, [])\n YKHO._CreateTestEpisode('vp1', 'ep1', YKHO._user.user_id)\n YKHO._RunAsync(nmsT.CreateShareNew, YKHO._client, YKHO._user.user_id, 'vp1', 'a1', ITS7.time() + 1, 0, [{'new_episode_id': 'ep1', 'photo_ids': ['p10', 'p11']}], [YKHO._u...
[ "0.70197886", "0.6453705", "0.601507", "0.59354705", "0.59060687", "0.5784737", "0.5757926", "0.5694991", "0.5694419", "0.56514907", "0.5624357", "0.5565505", "0.55334514", "0.55255216", "0.55225754", "0.55158347", "0.54774094", "0.54658437", "0.5451518", "0.5450873", "0.5432...
0.6854516
1
Renders the home page.
def kZiy(QePW): assert isinstance(QePW, eu5F) qeR5 = E1cg.objects.values('media_id').annotate(the_count=kbH2('media_id')).order_by('-the_count')[:9] if len(qeR5) > 8: sV3k = Dua8.objects.filter(id__in=qeR5.values('media_id')) else: sV3k = Dua8.objects.all()[:9] L03z = WB9G(QePW.POST ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kZiy():\n return TvZl('home.html')", "def C_QL():\n return TvZl('home.html')", "def kZiy():\n return TvZl('homepage.html')", "def kZiy():\n return TvZl('home.html')", "def kZiy():\n return TvZl('home.html')", "def kZiy():\n return TvZl('pages/home.html')", "def kZiy():\n leAC =...
[ "0.86085397", "0.85661966", "0.8562984", "0.84564984", "0.8353822", "0.8353445", "0.832796", "0.83265287", "0.83265287", "0.8311966", "0.83088946", "0.83046836", "0.8296962", "0.82942903", "0.82942903", "0.82872546", "0.8279762", "0.8279762", "0.8279762", "0.8279762", "0.8279...
0.0
-1
Renders the contact page.
def kSgn(QePW): assert isinstance(QePW, eu5F) tQOT = QePW.GET.get('mediaid', '') if tQOT == '': return ltde('Not found') N0U_ = E1cg.objects.filter(media=tQOT) qoQs = Dua8.objects.get(id=tQOT) AKDG = E1cg.objects.filter(media=tQOT).aggregate(gjQi('rate')) TqfQ, W56S, Rthp, xXCp, NZmi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Mxk0():\n bo34.info('User visited the contact page.')\n return TvZl('contact.html')", "def Mxk0():\n return TvZl('contact.html')", "def Mxk0():\n return TvZl('contact.html')", "def Mxk0():\n return TvZl('contact.html')", "def Mxk0():\n return TvZl('contact.html')", "def Mxk0():\n ...
[ "0.85942996", "0.856412", "0.856412", "0.8553042", "0.84771496", "0.84180754", "0.84098697", "0.8347894", "0.8342256", "0.8328687", "0.82468224", "0.82289207", "0.81830716", "0.81830716", "0.81830716", "0.81830716", "0.81830716", "0.81830716", "0.81830716", "0.81830716", "0.8...
0.0
-1
Compile the keras model with the given hyperparameters.
def m5Rz(C3ST, b0Ix, H0zq, WMj5): K0do = EW5f(lr=b0Ix, momentum=H0zq, decay=WMj5) C3ST.compile(loss='categorical_crossentropy', optimizer=K0do, metrics=['accuracy']) return C3ST
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KkVz(UwBq):\n print('hyperparameters', UwBq)\n w0fi = X6a0(shape=eval(UwBq['input_shape']))\n WKvO = w0fi\n for TVFO in qQXR.loads(UwBq['cnn'].replace(\"'\", '\"')):\n WKvO = yHwh(TVFO['filters'], eval(TVFO['kernel']), activation=TVFO['activation'], padding=TVFO['padding'], kernel_regularize...
[ "0.79807043", "0.72828823", "0.71578467", "0.71470624", "0.71071774", "0.70540214", "0.7018538", "0.6981408", "0.6968107", "0.69617265", "0.69568646", "0.6857369", "0.6856913", "0.68049", "0.6785416", "0.6751442", "0.6736353", "0.6733616", "0.67316073", "0.6683478", "0.667420...
0.71567464
3
Return a full name, neatly formatted.
def e1yb(j5sA, vxW9): eHMM = j5sA + ',' + ' ' + vxW9 return eHMM.title()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eHMM(YKHO):\n return '%s %s' % (YKHO.first_name, YKHO.last_name)", "def xpqj(YKHO):\n eHMM = '%s %s' % (YKHO.first_name, YKHO.last_name)\n return eHMM.strip()", "def xpqj(YKHO):\n eHMM = '%s %s' % (YKHO.first_name, YKHO.last_name)\n return eHMM.strip()", "def eHMM(YKHO):\n return '%s %s...
[ "0.86529046", "0.8640114", "0.8640114", "0.86111355", "0.8605745", "0.86024046", "0.85998344", "0.8597777", "0.85873055", "0.85823303", "0.8579586", "0.8579586", "0.8579586", "0.8579586", "0.8579586", "0.8579586", "0.8579586", "0.8579586", "0.8579586", "0.8579586", "0.8579586...
0.0
-1
players that have played less than 15 games that season and that do not start the next game (earliest inning is less than 3) categorical columns (like Date, name, park, venue, etc.) categorical columns that are over 60 percent NaN
def sqbC(YKHO): YKHO.dataframe = YKHO.dataframe[(YKHO.dataframe['Games_played_to_date'] > 30) & (YKHO.dataframe.earliest_inning <= 3)].reset_index(drop=True) YdD0 = YKHO.dataframe['Game_date'] lEdF = ['Unnamed: 0', 'Rank', 'next_game_HIT', 'H_total_next_game', 'AB_next_game', 'Walks_next_game', 'AB_vs_first...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QRHv(jQ3Z):\n up7G = jQ3Z[jQ3Z['lapop10'].notna()]\n return up7G", "def uxVY():\n kQLE = ja1s('t_original_regular_season_compact_results')\n CuzF = kQLE[kQLE['num_ot'] == 0].groupby(['season', 'w_team_id']).size().reset_index()\n CuzF.rename(columns={'w_team_id': 'team_id', 0: 'wins_no_ot'}, i...
[ "0.6188842", "0.6134159", "0.6063088", "0.6012933", "0.60102683", "0.593807", "0.5896318", "0.5882614", "0.5833285", "0.58119524", "0.5729175", "0.57279575", "0.5718966", "0.5664478", "0.56405", "0.5623946", "0.55938375", "0.5576275", "0.5573958", "0.5560207", "0.5550325", ...
0.62627584
0
Compare two WifiBox instance
def qGZL(c2BJ, BHYc): zkd9 = 10 BZgl = abs(c2BJ._Data) tJi_ = abs(c2BJ._PWR) X9Rj = abs(BHYc._Data) lIY7 = abs(BHYc._PWR) if str(c2BJ._Encryption).find('WEP') != -1: BZgl = BZgl * zkd9 tJi_ = tJi_ * zkd9 if str(BHYc._Encryption).find('WEP') != -1: X9Rj = X9Rj * zkd9 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q8L5(YKHO, wGB6, QFOH):\n JvJa = MtGJ(wGB6)\n n0qj = MtGJ(QFOH)\n U5bT = fVk2(JvJa, n0qj, eps=0.0)\n return U5bT", "def xa14(YKHO, Elif):\n if not isinstance(Elif, YR_i):\n return False\n return YKHO.__dict__ == Elif.__dict__", "def xa14(YKHO, Elif):\n return YKHO._mask == Elif....
[ "0.6225794", "0.6194824", "0.60961103", "0.6088518", "0.6042313", "0.6034559", "0.6005421", "0.59848166", "0.5969872", "0.59666467", "0.59057575", "0.5898655", "0.58963907", "0.5894251", "0.5871833", "0.5828202", "0.57940376", "0.57911247", "0.57824415", "0.57800746", "0.5776...
0.57661265
21
Return the list values divided by the sum of all value. Dependency pandas
def E_nh(yvak): if isinstance(yvak, (list, tuple, rLdf.core.series.Series)): yvak = oyIN.array(yvak) try: vFY_ = sum(yvak) hlel = yvak / vFY_ return (hlel, vFY_) except TypeError: print('The data provided is not appropriate. Double check you in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XAwH(yv6U):\n KCHu = sum(yv6U)\n return [YRbF / float(KCHu) for YRbF in yv6U]", "def NkkI(ezWE: list) -> list:\n wjRY = sum(ezWE)\n return list(map(lambda WKvO: WKvO / wjRY, ezWE))", "def VQvZ(xzK9):\n return float(sum(xzK9)) / max(1, len(xzK9))", "def cpCA(bM03):\n return sum(bM03) / l...
[ "0.68528", "0.67577904", "0.67155075", "0.6643044", "0.660908", "0.6464192", "0.6454131", "0.6432924", "0.64325935", "0.6415292", "0.6409669", "0.6401395", "0.6371269", "0.636483", "0.6354635", "0.6354635", "0.6351859", "0.6342186", "0.63416386", "0.6310084", "0.6278082", "...
0.0
-1
Return the list values zscored (value avg) / stdev. Dependency numPy pandas
def YMKv(yvak): if isinstance(yvak, (list, tuple, rLdf.core.series.Series)): yvak = oyIN.array(yvak) try: qqgr = oyIN.average(yvak) ee6l = oyIN.std(yvak) hlel = (yvak - qqgr) / ee6l return (hlel, qqgr, ee6l) except TypeError: print(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def M1Jx(hkxX):\n return Dz7Y.stdev(hkxX)", "def M1Jx(bOBl):\n M1Jx = [NhpO(YAgj) for bGrB, YAgj in bOBl.iteritems()]\n return M1Jx", "def hfS_(nPrm, BWXx=None):\n M1Jx = oyIN.std(nPrm, ddof=1)\n JBMS = oyIN.mean(nPrm)\n Ylbp = [(WKvO - JBMS) / M1Jx for WKvO in nPrm]\n if BWXx == None:\n ...
[ "0.6952294", "0.6860926", "0.6748497", "0.6701718", "0.66583717", "0.66402274", "0.6622325", "0.6610884", "0.65995586", "0.650839", "0.6501519", "0.64544654", "0.64315575", "0.6411485", "0.64086676", "0.63953483", "0.63835275", "0.6366533", "0.6344047", "0.63401306", "0.63344...
0.66015697
8
Return the list values standardized based on method chosen. Dependency numPy pandas avg_standardize() max_standardize() sum_standardize() zsc_standardize()
def dNYQ(yvak, CGcg): if CGcg not in ('a', 'm', 's', 'z'): print("The t parameter has to be one of 'a', 'm', 's', 'z'. See help for details") return None if CGcg == 'a': return mrsj(yvak) if CGcg == 'm': return BdMN(yvak) if CGcg == 's': return E_nh(yvak) if C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hWT_(jQ3Z):\n return (jQ3Z - jQ3Z.mean()) / jQ3Z.std()", "def KlFC(YKHO):\n xvDN = {'Times': [0, 1, 2, 3, 4, 5], 'Values': [1, 0, 9, 10, 8, 4]}\n abSd = rLdf.DataFrame(xvDN)\n jyrs = abSd.iloc[:, -1].mean()\n ExoH = abSd.iloc[:, -1].std()\n dZO0 = {'Times': [0, 1, 2, 3, 4, 5], 'Values': [(1...
[ "0.75493526", "0.7479489", "0.74285907", "0.72755283", "0.71900666", "0.7063507", "0.7053784", "0.70470583", "0.69887084", "0.6985375", "0.6970815", "0.6963442", "0.6955367", "0.694975", "0.6948638", "0.69354784", "0.6933811", "0.69299597", "0.691872", "0.6910953", "0.6902028...
0.6909841
20
Updates the weights of the target network.
def gByt(YKHO) -> None: YKHO.target_model.set_weights(YKHO.online_model.get_weights())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gByt(YKHO):\n YKHO.target_q_net.set_weights(YKHO.q_net.get_weights())", "def d_j7(YKHO):\n return ZylS.get_default_session().run(YKHO.update_weights_op)", "def qH2k(YKHO):\n for gEmA in YKHO.layers:\n if gEmA.__class__.__name__ == 'Layer':\n gEmA.update_weights()", "def MyUA(YK...
[ "0.82525927", "0.79704314", "0.78929985", "0.7829693", "0.7801604", "0.7779843", "0.77433544", "0.771763", "0.76996565", "0.7675535", "0.7587271", "0.7566348", "0.75630987", "0.7553589", "0.7549136", "0.75323945", "0.7527804", "0.7527804", "0.7527804", "0.7527804", "0.7516384...
0.8460828
0
Set up a Configurator instance. This Configurator instance sets up a pointer to the location of the database. It also includes the models from your app's model package. Finally it tears everything down, including the inmemory SQLite database. This configuration will persist for the entire duration of your PyTest run.
def wOGa(QePW): GPtr = kO5c.setUp(settings={'sqlalchemy.url': 'postgres://postgres:postgres@localhost:5432/testjournals'}) GPtr.include('learning_journal.models') GPtr.include('learning_journal.routes') def mTtn(): kO5c.tearDown() QePW.addfinalizer(mTtn) return GPtr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Cu_7(YKHO):\n QePW = iSgA.DummyRequest()\n YKHO.config = iSgA.setUp(request=QePW)\n YKHO.config.include('pyramid_chameleon')\n yield\n iSgA.tearDown()", "def wOGa(QePW):\n gCuF = {'sqlalchemy.url': 'sqlite:///:memory:'}\n GPtr = kO5c.setUp(settings=gCuF)\n GPtr.include('learning_journ...
[ "0.694893", "0.68981016", "0.6681007", "0.66594416", "0.66515756", "0.66079134", "0.66079134", "0.65257514", "0.65169376", "0.65169376", "0.65130746", "0.6508591", "0.6504482", "0.6477851", "0.6455021", "0.6455021", "0.6441173", "0.64355534", "0.6432031", "0.6380335", "0.6370...
0.63838327
19
Create a session for interacting with the test database. This uses the dbsession_factory on the configurator instance to create a new database session. It binds that session to the available engine and returns a new session for every call of the dummy_request object.
def ouvA(wOGa, QePW): eO9i = wOGa.registry['dbsession_factory'] cuiw = eO9i() eHpk = cuiw.bind i_Aq.metadata.drop_all(eHpk) i_Aq.metadata.create_all(eHpk) def mTtn(): cuiw.transaction.rollback() i_Aq.metadata.drop_all(eHpk) QePW.addfinalizer(mTtn) return cuiw
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PG2U(vY7J, QePW):\n eO9i = vY7J.app.registry['dbsession_factory']\n cuiw = eO9i()\n eHpk = cuiw.bind\n\n def mTtn():\n cuiw.transaction.rollback()\n QePW.addfinalizer(mTtn)\n return cuiw", "def Dbxd(g4pi, cuiw) -> DMju:\n if cuiw != None:\n return cuiw\n bo34 = G9jH.getL...
[ "0.7504063", "0.72824466", "0.72809464", "0.7268542", "0.7211933", "0.72109944", "0.7186933", "0.7186933", "0.71731186", "0.71596694", "0.71535116", "0.71535116", "0.71507466", "0.70558935", "0.7029918", "0.69900995", "0.69841164", "0.6973105", "0.69509274", "0.69509274", "0....
0.69217354
20
Instantiate a fake HTTP Request, complete with a database session. This is a functionlevel fixture, so every new request will have a new database session.
def fiHr(ouvA): return kO5c.DummyRequest(dbsession=ouvA)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fiHr(ouvA):\n gE0D = kO5c.DummyRequest(dbsession=ouvA)\n return gE0D", "def fiHr(X9bi):\n return kO5c.DummyRequest(dbsession=X9bi)", "def wxei(ouvA):\n wxei = kO5c.DummyRequest(db=ouvA)\n wxei.POST.update({'oauth_consumer_key': 'TEST_OAUTH_CONSUMER_KEY', 'oauth_timestamp': 'TEST_TIMESTAMP', ...
[ "0.7676021", "0.75177795", "0.71325105", "0.6987535", "0.691939", "0.6361696", "0.6259365", "0.6162909", "0.61604476", "0.6155232", "0.61380506", "0.6137302", "0.6102396", "0.60978305", "0.60849684", "0.60756505", "0.60664487", "0.6035414", "0.59910834", "0.5979476", "0.59682...
0.7496196
3
Will get the csrf token.
def MUsr(vY7J): wUvS = vY7J.get('/journal/new-entry') eOtH = wUvS.html.find('input', {'name': 'csrf_token'})['value'] return eOtH
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IpuJ(YKHO):\n eOtH = YKHO.__token\n if eOtH is None:\n return YKHO.new_csrf_token()\n return eOtH", "def f_WM(YKHO):\n return YKHO.get_cookie_value('csrftoken')", "def v9f4(YKHO) -> str:\n geh0: cuzp[str, str] = YKHO.get_json('/csrfhandler')\n return geh0['token']", "def f_WM(YKH...
[ "0.8938745", "0.85274106", "0.8387445", "0.8295841", "0.8146951", "0.7909998", "0.78379864", "0.7796653", "0.77695477", "0.77689356", "0.7692943", "0.7638234", "0.7638234", "0.7619287", "0.7576728", "0.7462616", "0.7368932", "0.7229974", "0.7190083", "0.7166231", "0.71451885"...
0.7607564
14
Test after updating we get redirected to detail view.
def tVdG(vY7J, zTKZ, MUsr): zTKZ['csrf_token'] = MUsr geh0 = vY7J.post('/journal/1/edit-entry', zTKZ) assert geh0.location == 'http://localhost/journal/1'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsIF(YKHO):\n Mkmy = YKHO.simulate_post(gxEw(YKHO.update_view, args=YKHO.reverse_object_args), YKHO.newdata)\n YKHO.assertRedirects(Mkmy, gxEw(YKHO.detail_view, args=YKHO.reverse_object_args))\n YKHO.assertObjectMatchesData(YKHO.cls.objects.get(id=YKHO.ob.id), YKHO.newdata)", "def rbdD(YKHO):\n M...
[ "0.80160695", "0.7807547", "0.77403384", "0.72633266", "0.7250097", "0.7231374", "0.7180146", "0.71375835", "0.7136257", "0.7103568", "0.70931643", "0.70798343", "0.707699", "0.7069437", "0.7035971", "0.69682676", "0.69480324", "0.694199", "0.6929685", "0.69254917", "0.692152...
0.7431663
3
Test whether both authorized and unauthroized user can access a detail route.
def TC7y(vY7J, MC83, erK4): geh0 = vY7J.get('/journal/5') erK4 F5og = vY7J.get('/journal/5') assert 'ID: 5' in geh0.ubody and F5og.ubody
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rlPF(YKHO):\n YKHO.client.credentials(HTTP_AUTHORIZATION='JWT ' + YKHO.token)\n geh0 = YKHO.client.get(gxEw('test_challenge:user-detail', kwargs={'pk': '{}'.format(YKHO.test_user.pk)}))\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)", "def aQ4K(YKHO):\n YKHO.client.force_authenticate(user...
[ "0.711102", "0.69001985", "0.6763551", "0.6612475", "0.65391016", "0.6469113", "0.64682907", "0.6412908", "0.63978136", "0.6370014", "0.6349313", "0.63233495", "0.6287084", "0.6252509", "0.62381876", "0.62206525", "0.6184976", "0.6171875", "0.614463", "0.6144195", "0.6107348"...
0.6119587
20
Test if we can login with a wrong username.
def IgV4(vY7J): geh0 = vY7J.post('/login', {'username': 'notmyusername', 'password': 'secret'}) assert 'Error: Username/Password does not match!' in geh0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HE1B(YKHO):\n O_hj, JBvl = YKHO.user_login()\n YKHO.assertEqual(JBvl, 400)\n YKHO.assertEqual(O_hj['status'], 'error')", "def _r7T(YKHO):\n dsbO = mv1M.login('testuserbad', 'pass123')\n YKHO.assertFalse(dsbO)", "def cEkh(YKHO):\n YKHO.assertFalse(mv1M.authenticate('badusername', 'password...
[ "0.80559814", "0.7987514", "0.7831659", "0.78221893", "0.78211933", "0.7801133", "0.77699786", "0.7715151", "0.768587", "0.76838493", "0.76226175", "0.7612859", "0.75972766", "0.75906074", "0.7588746", "0.7547535", "0.7529912", "0.75297225", "0.7518105", "0.7506256", "0.74835...
0.74651635
21
Report if `M` is not a Hermitian matrix given its type.
def rA9Z(E3D9, mWFP): from scipy.linalg import norm J87D = E3D9 - E3D9.T.conj() PRuj = norm(J87D, 1) yJiH = 10 * oyIN.finfo(E3D9.dtype).eps yJiH = max(yJiH, yJiH * norm(E3D9, 1)) if PRuj > yJiH: qmLP.warn(f'Matrix {mWFP} of the type {E3D9.dtype} is not Hermitian: condition: {PRuj} < {yJi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xXUF(YKHO):\n ORsB = oyIN.array([[1, 1], [1, -1]]) / oyIN.sqrt(2)\n with trZe.raises(ValueError, match='must be a square matrix'):\n B2Ja.Hermitian(ORsB[1:], wires=0).matrix()\n o6bB = ORsB.copy()\n o6bB[0, 1] = 2\n with trZe.raises(ValueError, match='must be Hermitian'):\n B2Ja.He...
[ "0.62543434", "0.6106726", "0.6081207", "0.6054562", "0.6052798", "0.6045742", "0.58973837", "0.5884457", "0.5789323", "0.5773263", "0.5659392", "0.5657487", "0.5645426", "0.56335115", "0.56268454", "0.5579313", "0.552393", "0.549373", "0.5486978", "0.54695976", "0.54440236",...
0.70080036
0
If the input array is 2D return it, if it is 1D, append a dimension, making it a column vector.
def U6h4(wc14): if wc14.ndim == 2: return wc14 else: p06G = oyIN.array(wc14, copy=False) p06G.shape = (wc14.shape[0], 1) return p06G
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iVRZ(he6J):\n return he6J[:, ywwl.newaxis]", "def iVRZ(iArr):\n if isinstance(iArr, list) or isinstance(iArr, tuple):\n aVaK = oyIN.array(iArr)\n return aVaK.reshape(3, -1)\n elif isinstance(iArr, oyIN.ndarray):\n if iArr.ndim > 1:\n return iArr\n else:\n ...
[ "0.7154159", "0.69108814", "0.6698482", "0.6687465", "0.6457461", "0.6427453", "0.6277777", "0.6222245", "0.617904", "0.6140582", "0.6052936", "0.6039446", "0.60146576", "0.6007897", "0.59939444", "0.599309", "0.5963844", "0.592289", "0.59109426", "0.58364505", "0.58228666", ...
0.59782106
16
Testing when the authorised user has not joined the channel they are trying to post to
def Gxb0(bD7m, sLQ1, z1dU, QceP): _hkX = g5ap(bD7m, z1dU['token'], QceP['channel_id'], 'Hello') assert _hkX.status_code == s09c.code G4JS.delete(bD7m + '/clear')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GfdN(r8hN):\n return r8hN.channel == OaeV.channel and r8hN.author == OaeV.author", "def tieA(uinz, qz3b):\n bD7m = gxEw('channel-reports', kwargs={'channel_name': qz3b.name})\n _hkX = uinz.get(bD7m)\n assert _hkX.status_code in (jGRS.HTTP_401_UNAUTHORIZED, jGRS.HTTP_403_FORBIDDEN)\n assert _hk...
[ "0.6786477", "0.6519999", "0.6456005", "0.6439877", "0.6439429", "0.6425256", "0.638982", "0.63077825", "0.6278356", "0.6273801", "0.6271669", "0.6267886", "0.6243371", "0.6238326", "0.6216162", "0.6173263", "0.61689574", "0.61666125", "0.615014", "0.6143545", "0.6141796", ...
0.6539667
1
Testing invalid token for users which have logged out
def bUoM(bD7m, sLQ1, z1dU, WPN9, DpYB, QceP): wJ7q = G4JS.post(f'{bD7m}/auth/logout', json={'token': sLQ1['token']}).json() assert wJ7q['is_success'] wJ7q = G4JS.post(f'{bD7m}/auth/logout', json={'token': z1dU['token']}).json() assert wJ7q['is_success'] wJ7q = G4JS.post(f'{bD7m}/auth/logout', json={...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GSK3(YKHO):\n YKHO.client.login(email=YKHO.user.email, code='invalid_token')\n YKHO.assertNotIn('_auth_user_id', YKHO.client.session)\n YKHO.client.login(email=YKHO.user.email, code=None)\n YKHO.assertNotIn('_auth_user_id', YKHO.client.session)", "def c4jH(YKHO):\n geh0 = YKHO.app.post('/api/1...
[ "0.82969415", "0.80239505", "0.7989942", "0.79663366", "0.79278696", "0.7902081", "0.78770095", "0.78700054", "0.7833057", "0.7793206", "0.7721689", "0.769664", "0.7525718", "0.74376416", "0.74293923", "0.7418595", "0.7415008", "0.74085355", "0.7407114", "0.7397622", "0.73786...
0.0
-1
Testing invalid token for users which have logged out
def cROv(bD7m, sLQ1, z1dU, WPN9, DpYB, Cf3F): wJ7q = G4JS.post(f'{bD7m}/auth/logout', json={'token': sLQ1['token']}).json() assert wJ7q['is_success'] == True wJ7q = G4JS.post(f'{bD7m}/auth/logout', json={'token': z1dU['token']}).json() assert wJ7q['is_success'] == True wJ7q = G4JS.post(f'{bD7m}/auth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GSK3(YKHO):\n YKHO.client.login(email=YKHO.user.email, code='invalid_token')\n YKHO.assertNotIn('_auth_user_id', YKHO.client.session)\n YKHO.client.login(email=YKHO.user.email, code=None)\n YKHO.assertNotIn('_auth_user_id', YKHO.client.session)", "def c4jH(YKHO):\n geh0 = YKHO.app.post('/api/1...
[ "0.82969415", "0.80239505", "0.7989942", "0.79663366", "0.79278696", "0.7902081", "0.78770095", "0.78700054", "0.7833057", "0.7793206", "0.7721689", "0.769664", "0.7525718", "0.74376416", "0.74293923", "0.7418595", "0.7415008", "0.74085355", "0.7407114", "0.7397622", "0.73786...
0.0
-1
Testing invalid token for users which have logged out
def J2Rd(bD7m, sLQ1, z1dU, WPN9, DpYB, QceP, Cf3F): wJ7q = G4JS.post(f'{bD7m}/auth/logout', json={'token': sLQ1['token']}).json() assert wJ7q['is_success'] == True wJ7q = G4JS.post(f'{bD7m}/auth/logout', json={'token': z1dU['token']}).json() assert wJ7q['is_success'] == True wJ7q = G4JS.post(f'{bD7m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GSK3(YKHO):\n YKHO.client.login(email=YKHO.user.email, code='invalid_token')\n YKHO.assertNotIn('_auth_user_id', YKHO.client.session)\n YKHO.client.login(email=YKHO.user.email, code=None)\n YKHO.assertNotIn('_auth_user_id', YKHO.client.session)", "def c4jH(YKHO):\n geh0 = YKHO.app.post('/api/1...
[ "0.82969415", "0.80239505", "0.7989942", "0.79663366", "0.79278696", "0.7902081", "0.78770095", "0.78700054", "0.7833057", "0.7793206", "0.7721689", "0.769664", "0.7525718", "0.74376416", "0.74293923", "0.7418595", "0.7415008", "0.74085355", "0.7407114", "0.7397622", "0.73786...
0.0
-1
Testing when message based on message_id is called for editing but the requester is not a flockr owner
def Mm6b(bD7m, sLQ1, z1dU, WPN9, DpYB, QceP, Cf3F): G4JS.delete(f'{bD7m}/clear') JQ64 = {'token': z1dU['token'], 'message_id': Cf3F['message_id'], 'message': 'lets edit!'} P1dF = G4JS.put(f'{bD7m}/message/edit', json=JQ64) assert P1dF.status_code == s09c.code JQ64 = {'token': WPN9['token'], 'message...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def d0eA(YKHO):\n LuKW.objects.create(user=YKHO.jon_doe, content='I am the original content.')\n NuG0 = {'content': 'I wanna change you!'}\n WEtw = YKHO.jane_doe_client.patch('/api/messages/1/', NuG0, format='json')\n SqJ0 = YKHO.jon_doe_client.patch('/api/messages/1/', NuG0, format='json')\n YKHO.a...
[ "0.7010186", "0.68055964", "0.6681587", "0.65420717", "0.646669", "0.63734007", "0.6364077", "0.6124404", "0.6105113", "0.6095998", "0.60181826", "0.6010478", "0.5985449", "0.5964999", "0.5958973", "0.5958793", "0.59421754", "0.59027296", "0.589031", "0.5889058", "0.58660525"...
0.67875224
2
Testing when the authorised user has not joined the channel they are trying to post to
def vYq7(bD7m, sLQ1, z1dU, QceP): mcQd = int(qcWV.now(tz=rIAI.utc).timestamp()) _hkX = BYT9(bD7m, z1dU['token'], QceP['channel_id'], 'Hello', mcQd + 7) assert _hkX.status_code == s09c.code G4JS.delete(bD7m + '/clear')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GfdN(r8hN):\n return r8hN.channel == OaeV.channel and r8hN.author == OaeV.author", "def Gxb0(bD7m, sLQ1, z1dU, QceP):\n _hkX = g5ap(bD7m, z1dU['token'], QceP['channel_id'], 'Hello')\n assert _hkX.status_code == s09c.code\n G4JS.delete(bD7m + '/clear')", "def tieA(uinz, qz3b):\n bD7m = gxEw('...
[ "0.67853874", "0.6538649", "0.6519181", "0.64548886", "0.6439922", "0.64397466", "0.642403", "0.63889545", "0.630668", "0.62795264", "0.62725705", "0.6271272", "0.6267667", "0.62416595", "0.62368655", "0.61713547", "0.6170127", "0.6166007", "0.6149361", "0.61448175", "0.61418...
0.6214983
15
Testing invalid token for users which have logged out
def CEps(bD7m, sLQ1, z1dU, WPN9, DpYB, QceP, Cf3F): mcQd = int(qcWV.now(tz=rIAI.utc).timestamp()) wJ7q = G4JS.post(f'{bD7m}/auth/logout', json={'token': sLQ1['token']}).json() assert wJ7q['is_success'] wJ7q = G4JS.post(f'{bD7m}/auth/logout', json={'token': z1dU['token']}).json() assert wJ7q['is_succ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GSK3(YKHO):\n YKHO.client.login(email=YKHO.user.email, code='invalid_token')\n YKHO.assertNotIn('_auth_user_id', YKHO.client.session)\n YKHO.client.login(email=YKHO.user.email, code=None)\n YKHO.assertNotIn('_auth_user_id', YKHO.client.session)", "def c4jH(YKHO):\n geh0 = YKHO.app.post('/api/1...
[ "0.82969415", "0.80239505", "0.7989942", "0.79663366", "0.79278696", "0.7902081", "0.78770095", "0.78700054", "0.7833057", "0.7793206", "0.7721689", "0.769664", "0.7525718", "0.74376416", "0.74293923", "0.7418595", "0.7415008", "0.74085355", "0.7407114", "0.7397622", "0.73786...
0.0
-1
create a new rule
def t4PY(): if not Oa1e.user.is_authenticated: eTsH(401, 'Unauthorized') from .api import admin_read_rule Aofo = Y4lh.create() if 'success' in Aofo and Aofo['success'] and ('dn' in Aofo): Aofo['location'] = nKyW('api.admin_read_rule', dn=Aofo['dn'].lstrip('/')) return pz3A(Aofo)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CTbz(YKHO):\n pass", "def eLpg(YKHO, **B2fa):\n bD7m = '/rules'\n _hkX, TBsA = YKHO.client.post(bD7m, data=B2fa)\n eD8c = TBsA.get('rule')\n return YKHO.resource_class(YKHO, eD8c, loaded=True)", "def FIMM(YKHO, eD8c):\n YKHO.rule = eD8c", "def a0cO(YKHO, mWFP: str, eD8c: Dict[str, Any])...
[ "0.7512382", "0.73968714", "0.7345261", "0.7327596", "0.7320328", "0.72647154", "0.71172976", "0.70347196", "0.69995624", "0.6974522", "0.69723654", "0.69236076", "0.683191", "0.68085206", "0.67530704", "0.67467666", "0.67301595", "0.67096865", "0.6682562", "0.66757536", "0.6...
0.71924335
6
get a temporary password reset link for user. The reset link can only be requested by users with admin privilege or for current_user's username
def culB(NtEF): if not Oa1e.user.is_authenticated: eTsH(401, 'Unauthorized') H5ew = YJv1.get_pwreset_key(NtEF) bD7m = nKyW('auth.pwreset', key=H5ew).lstrip('/') return pz3A({'url': '%s%s' % (QePW.url_root, bD7m), 'key': '%s' % H5ew})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OMac(Emd4, eOtH, PObu, *qIxc, **B2fa):\n CBIr = B2fa.get('user', None)\n uJjO = B2fa.get('user_id', None)\n if not CBIr and (not uJjO):\n raise QwI0('Please provide user or user id param.')\n if not CBIr:\n CBIr = x7_4.get_user(uJjO)\n qm1k = DAt9('reset-password')\n U4ZT = 'Som...
[ "0.6968246", "0.67385614", "0.6694239", "0.6686256", "0.6421913", "0.6402526", "0.6317088", "0.62825924", "0.6226909", "0.62156487", "0.61907345", "0.61896324", "0.61513627", "0.61025256", "0.6094827", "0.60501915", "0.6006108", "0.59985137", "0.5981271", "0.5976235", "0.5963...
0.0
-1
Update attributes for a single group. Note, for list attributes, the full list is updated with the provided value. For incremental add/removal from a list, use the /incr function
def jXDs(uOe2): if not Oa1e.user.is_authenticated: eTsH(401, 'Unauthorized') return pz3A(LS1M.update(uOe2))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YJlv(YKHO, hkS8, QdZT=None):\n if QdZT in [None, '']:\n return\n AttP, x0O7 = Hy7s.path.split(hkS8)\n try:\n zlDd = YKHO.ds.getncattr(hkS8)\n except AttributeError as err:\n try:\n zlDd = YKHO.ds[AttP].getncattr(x0O7)\n except AttributeError as err:\n ...
[ "0.6941077", "0.6916842", "0.6685613", "0.65377057", "0.6446565", "0.64427316", "0.6433272", "0.6344751", "0.6318733", "0.6306788", "0.62944645", "0.6283501", "0.627378", "0.62413716", "0.623761", "0.6214503", "0.62135035", "0.6138213", "0.61313593", "0.60777146", "0.60775304...
0.6211586
17
Convert a string representating the cycletime of the format YYYYMMDDTHHMMZ into a datetime object.
def NHNc(DT1T: str, Od51: str='%Y%m%dT%H%MZ') -> qcWV: return qcWV.strptime(DT1T, Od51)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OLXh(WKvO):\n _c1T, ITS7 = WKvO.strip('Z').split('T')\n lO87, x0eS, CjKC = _c1T.split('-')\n Wave, O66n, C6wh = ITS7.split(':')\n if '.' in C6wh:\n C6wh, s9gV = C6wh.split('.')\n if len(s9gV) < 6:\n s9gV = s9gV + '0' * (6 - len(s9gV))\n elif len(s9gV) > 6:\n ...
[ "0.67914027", "0.67213523", "0.66923356", "0.661213", "0.6610364", "0.66099995", "0.6592957", "0.6584239", "0.6534094", "0.6534094", "0.65242064", "0.65130883", "0.65013343", "0.649563", "0.64648616", "0.6462615", "0.6461421", "0.6461084", "0.6459242", "0.6436666", "0.6427060...
0.7914243
0
Convert a datetime object into a string representing the cycletime of the format YYYYMMDDTHHMMZ.
def FO_M(agr1: datetime, Od51: str='%Y%m%dT%H%MZ') -> str: return qcWV.strftime(agr1, Od51)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DgV6(qcWV):\n return qcWV.strftime('%c')", "def hLAQ(Emd4, BWXx: datetime.datetime) -> str:\n return qcWV.datetime.utcfromtimestamp(BWXx.timestamp()).isoformat() + 'Z'", "def pTGH(qSq0):\n return qSq0.strftime('%Y/%m/%d %H:%M')", "def yiBg():\n ITS7 = qcWV.datetime.now()\n laoI = ITS7.strf...
[ "0.72934985", "0.7087923", "0.7014739", "0.69831526", "0.697545", "0.69265467", "0.67991483", "0.6760773", "0.6730916", "0.66603065", "0.66404516", "0.6639454", "0.6618042", "0.6572866", "0.6526763", "0.6504785", "0.64908594", "0.6490415", "0.64607334", "0.64607334", "0.64598...
0.79081416
0
Add or replace bounds for the forecast period and time coordinates on a cube.
def bPwi(tk32: Cube, pQ4c: Optional[int]=None): if pQ4c is None: tO9_ = 'A period must be specified when relabelling a diagnostic to have a particular period.' raise ValueError(tO9_) elif pQ4c < 1: tO9_ = f'Only periods of one hour or greater are supported. The period supplied was {pQ4c}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UKDe(YKHO):\n t0qN = GOfB(interval_in_minutes=60)\n tk32 = YKHO.cube\n tk32.coord('time').guess_bounds()\n tk32.coord('forecast_period').guess_bounds()\n Aofo = t0qN.enforce_time_coords_dtype(tk32.copy())\n YKHO.assertIsInstance(Aofo, Ty8a.cube.Cube)\n YKHO.assertEqual(Aofo.coord('time').p...
[ "0.63499385", "0.62927216", "0.6016937", "0.59509146", "0.58720464", "0.5853152", "0.5817737", "0.5758275", "0.5676188", "0.5665027", "0.5659934", "0.5629985", "0.56272674", "0.5613235", "0.56016296", "0.55142295", "0.54961", "0.54911166", "0.54890597", "0.5483727", "0.546815...
0.5166795
48
Route the incoming request based on type (LaunchRequest, IntentRequest, etc.) The JSON body of the request is provided in the event parameter.
def DCgT(tvqc, QpfX): bo34.debug('event.session.application.applicationId={0}'.format(tvqc['session']['application']['applicationId'])) "\n Uncomment this if statement and populate with your skill's application ID to\n prevent someone else from configuring a skill that sends requests to this\n function...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cfQO(tvqc, QpfX):\n print('Incoming request...')\n if tvqc['session']['new']:\n pass\n if tvqc['request']['type'] == 'LaunchRequest':\n return sjFK(tvqc['request'], tvqc['session'])\n if tvqc['request']['type'] == 'IntentRequest':\n return E97p(tvqc['request'], tvqc['session'])...
[ "0.69202006", "0.67627186", "0.65836424", "0.6490504", "0.64574534", "0.63771427", "0.6286547", "0.62714726", "0.6270669", "0.6245852", "0.6218758", "0.6215384", "0.61945516", "0.6179513", "0.6153107", "0.61451805", "0.6133141", "0.6131098", "0.60520643", "0.600974", "0.59820...
0.58081996
27
Method to create first genesis block and append it to the blockchain.
def H4OB(YKHO): R1kZ = n3Kt(qcWV.datetime.now(), 'First Block', '0') R1kZ.mine_block(YKHO.difficulty) YKHO.chain.append(R1kZ)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RsZu(YKHO):\n BZTK = n3Kt(0, [], ITS7.time(), '0')\n BZTK.hash = BZTK.compute_hash()\n YKHO.chain.append(BZTK)", "def tBOj(YKHO):\n cb0j = n3Kt(None, None)\n if n3Kt.isValidBlock(cb0j):\n YKHO.blocks.append(cb0j)", "def NOel(YKHO):\n PXsK = YKHO.create_coinbase_transaction(dest_key...
[ "0.8668002", "0.8309279", "0.8283189", "0.8105638", "0.8063389", "0.80318004", "0.7987304", "0.7885074", "0.78684574", "0.7793673", "0.77474153", "0.74997747", "0.7499588", "0.74976724", "0.7484441", "0.7483397", "0.74831504", "0.7477924", "0.7383888", "0.7361032", "0.7344648...
0.7807518
9
Stop the motion of an axis using the current acceleration.
def uctm(YKHO, jDK_, OLCN=''): oUZx = str(jDK_) + 'ST' YKHO.pass_command(oUZx, OLCN)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def anrA(YKHO, jDK_):\n YKHO.springfield.stop(jDK_)", "def JCyR(YKHO):\n YKHO.vel_x = 0", "def VPax(YKHO, jDK_):\n Ol8d = 'stop ' + str(jDK_) + '\\r\\n'\n ENp2 = YKHO._ser.write(Ol8d.encode())\n geh0 = YKHO._ser.readline().decode().split('\\r\\n')\n if ENp2 != len(Ol8d) or geh0[-1] != '> ':\n...
[ "0.7018594", "0.69796294", "0.6872407", "0.68062663", "0.67387843", "0.66979384", "0.66959983", "0.66278577", "0.65393263", "0.64471674", "0.6429652", "0.64116955", "0.6407853", "0.64065874", "0.6395915", "0.63910204", "0.63871926", "0.63785017", "0.6348491", "0.6348491", "0....
0.67036647
5
Test build KDTree raises exception on api call returning data that contains invalid x coordinate.
def MrkR(YKHO): P1dF = _HWm('lat', 'lat') YKHO.assert_raise_error(P1dF, sANZ, YKHO.sf_data_api_invalid_coordinate)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tzMJ(YKHO):\n _fDg = sANZ(ULVa)\n YKHO.assert_true(isinstance(_fDg, plLA))", "def dUU1(YKHO):\n P1dF = MsjQ(YKHO.http_get_return_404_url, 404)\n YKHO.assert_raise_error(P1dF, sANZ, YKHO.http_get_return_404_url)", "def o3P4(YKHO):\n Ak9A = YKHO.numByLoc.keys()\n YKHO.xyArray = oyIN.asarray...
[ "0.6846455", "0.6162007", "0.60790277", "0.5957026", "0.58859026", "0.5879859", "0.58042455", "0.57986224", "0.5773457", "0.5757694", "0.5732984", "0.57298803", "0.5652501", "0.559578", "0.55922025", "0.55671877", "0.5563805", "0.554854", "0.55468214", "0.55243725", "0.552427...
0.75924087
0
Yield items from any nested iterable; >>> l = [1, 2, 3, [3, 4, 5, [7, 8]]] >>> f = list(flatten(l)) [1, 2, 3, 3, 4, 5, 7, 8]
def PWgb(DumB): for WKvO in DumB: if isinstance(WKvO, iu5r) and (not isinstance(WKvO, (str, bytes))): yield from PWgb(WKvO) else: yield WKvO
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PWgb(vC9B):\n for YRbF in vC9B:\n if isinstance(YRbF, (list, tuple)):\n yield from PWgb(YRbF)\n else:\n yield YRbF", "def MKPt(vC9B):\n if isinstance(vC9B, EeFr):\n yield list(vC9B)\n else:\n for geyT in vC9B:\n if isinstance(geyT, iu5r) a...
[ "0.8591009", "0.82927537", "0.8166328", "0.81265163", "0.80791396", "0.8074898", "0.8034776", "0.80042255", "0.7999583", "0.7980103", "0.7976165", "0.7963919", "0.7948097", "0.7935685", "0.7930438", "0.7927333", "0.78978956", "0.7884071", "0.7838652", "0.782481", "0.7819771",...
0.7312151
60
This method returns the temperature controller status as an integer. If this integer equals 0, it's because the temperature controller is off. Otherwise, if the value returned equals 1, this means the temperature controller is on.
def Lkzw(YKHO): YKHO.board_socket.send(bytearray.fromhex('10 00 01 09')) ycBG = YKHO.board_socket.recv(1024) return ycBG[3]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zSOT(YKHO):\n return YKHO.exec_action('get_sensor_temperature_status')", "def QTBn(YKHO):\n return Kb4M.temperature_status[YKHO._id]['temperature']", "def kR92(YKHO):\n _hkX = YKHO.ctrl.http_get_request(YKHO.ctrl.get_operational_url() + '/lumina-controller-status:system-status')\n Mkmy = {}\n ...
[ "0.76340735", "0.71336687", "0.69687617", "0.6962203", "0.69343567", "0.6922931", "0.6921941", "0.6819646", "0.68065387", "0.6802224", "0.67376405", "0.669501", "0.66874385", "0.6683879", "0.66566026", "0.660035", "0.65997726", "0.65201193", "0.6485493", "0.64735526", "0.6466...
0.7958086
0
Method used to turn on/off the temperature controller. For turning the controller on, the argument should be the integer 1. To turn the controller off, the argument should be 0.
def kevX(YKHO, jGRS): if jGRS in (0, 1): YKHO.board_socket.send(bytearray.fromhex('20 00 02 09 0' + str(jGRS))) ycBG = YKHO.board_socket.recv(1024)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Xg4P(YKHO, Sn5V, BWXx=None):\n RKD7.debug('Turn on temperture controller %d', Sn5V)\n YKHO.status.TemperatureControllers[Sn5V]['error_code'] = '\\x01'", "def jY15(YKHO):\n for Vq3K in YKHO.tempctrls:\n Vq3K.on = True\n YKHO._on = True", "def jY15(YKHO, **B2fa):\n YKHO._PiZone.SetSelec...
[ "0.7534517", "0.7176025", "0.7146562", "0.70924675", "0.7001304", "0.69343394", "0.67317456", "0.6725196", "0.66895044", "0.6586379", "0.65632963", "0.65383315", "0.64931536", "0.64611214", "0.6424268", "0.63959426", "0.6392513", "0.6375417", "0.6334124", "0.63233495", "0.632...
0.64303035
14
This method returns the voltage signal to the heater in the B/D frontend as a floatingpoint number.
def oI0e(YKHO): YKHO.board_socket.send(bytearray.fromhex('10 00 01 0B')) ycBG = YKHO.board_socket.recv(1024) return BlNT.unpack('<d', ycBG[3:])[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def m8jn(YKHO) -> float:\n YKHO.__send_message('SOUR:VOLT:IMM?')\n return float(YKHO.__read_message())", "def m8jn(YKHO):\n return float(YKHO.query('VOLT?'))", "def m8jn(YKHO) -> float:\n YKHO.psu._PSU__send_message('MEAS:VOLT?')\n return float(YKHO.psu._PSU__read_message())", "def m8jn(YKHO):...
[ "0.7954032", "0.78711104", "0.78519005", "0.7847175", "0.78082174", "0.7801927", "0.7773177", "0.7719336", "0.7703632", "0.76288944", "0.7544887", "0.75329983", "0.75329983", "0.75329983", "0.75329983", "0.75329983", "0.753136", "0.75139135", "0.74746954", "0.74590456", "0.73...
0.0
-1
Assert that the two character sets are equal. If either set are an iterable of numbers, convert them to chars first.
def bsSz(YKHO, cntZ, CsFy, *qIxc, **B2fa): wJxF = set() for Z9rn in cntZ: wJxF.add(chr(Z9rn) if isinstance(Z9rn, int) else Z9rn) Hm5Q = set() for Z9rn in CsFy: Hm5Q.add(chr(Z9rn) if isinstance(Z9rn, int) else Z9rn) return YKHO.assertEqual(wJxF, Hm5Q, *qIxc, **B2fa)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oBNC(aDxC, c7Gu):\n Raji, wuXr = c7Gu\n wuXr.__args__ = (QMSQ,)\n DwRD = aDxC.structure(Raji, wuXr)\n assert len(DwRD) == len(Raji)\n for tTpl in Raji:\n assert unve(tTpl) in DwRD", "def XkO2(YKHO):\n YKHO.assertEqual(YKHO.default_char_set, YKHO.reference_char_set)", "def SjMt(YVv6...
[ "0.6307351", "0.62551683", "0.6192146", "0.6143444", "0.6120943", "0.61150527", "0.60611594", "0.60040516", "0.5954485", "0.5890704", "0.58772504", "0.5772194", "0.57261515", "0.57057923", "0.5687191", "0.5682084", "0.56758654", "0.5625567", "0.5619685", "0.5613154", "0.56023...
0.83277893
0
Displays statistics on the most frequent times of travel.
def dWJR(jQ3Z): print('\nCalculating The Most Frequent Times of Travel...\n') SWox = ITS7.time() sve5 = jQ3Z['month'].mode()[0] print('Most Popular Month:', sve5) StUT = jQ3Z['day_of_week'].mode()[0] print('Most Popular Day:', StUT) jQ3Z['hour'] = jQ3Z['Start Time'].dt.hour pRsb = jQ3Z['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dWJR(jQ3Z):\n print('\\nCalculating The Most Frequent Times of Travel...\\n')\n SWox = ITS7.time()\n print('The most common month of travel is: {} '.format(jQ3Z.Month.mode()[0]))\n print('The most common day of travel is: {} '.format(jQ3Z.Day.mode()[0]))\n print('The most common hour of travel i...
[ "0.79996175", "0.7920857", "0.7891767", "0.78612196", "0.785926", "0.7838814", "0.779974", "0.77848285", "0.7735119", "0.7723049", "0.771342", "0.7708436", "0.770453", "0.77017164", "0.7689714", "0.7685842", "0.7680146", "0.76788265", "0.76721054", "0.7661351", "0.7660023", ...
0.75550747
54
Displays statistics on the most popular stations and trip.
def Huc_(jQ3Z): print('\nCalculating The Most Popular Stations and Trip...\n') SWox = ITS7.time() CuPk = jQ3Z['Start Station'].value_counts().idxmax() print('Most Common Start Station:', CuPk) nG3J = jQ3Z['End Station'].value_counts().idxmax() print('\nMost Common End Station:', nG3J) eQBt =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n SWox = ITS7.time()\n v6Be(jQ3Z)\n BeYU(jQ3Z)\n O6Ct(jQ3Z)\n print('\\nThis took %s seconds.' % (ITS7.time() - SWox))\n print('-' * 40)", "def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations ...
[ "0.7665365", "0.76264536", "0.7610902", "0.75852126", "0.7576492", "0.7567089", "0.75577486", "0.7538181", "0.75294757", "0.7502035", "0.74997437", "0.7496321", "0.74872565", "0.74840283", "0.7475714", "0.7472988", "0.7437631", "0.74366206", "0.7433223", "0.7428372", "0.74269...
0.7222683
69
Displays statistics on the total and average trip duration.
def kDMA(jQ3Z): print('\nCalculating Trip Duration...\n') SWox = ITS7.time() T62R = sum(jQ3Z['Trip Duration']) print('Total Travel Time:', round(T62R / 86400, 2), 'days.') Zwp9 = jQ3Z['Trip Duration'].mean() print('Mean Travel Time:', round(Zwp9 / 60, 2), 'minutes.') print('\nThis took %s se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kDMA(dMlt):\n print('\\nCalculating Trip Duration...\\n')\n SWox = ITS7.time()\n qZ1g = dMlt['Trip Duration'].sum()\n print('The total travel time is ', qZ1g, ' seconds.')\n NPSF = dMlt['Trip Duration'].mean()\n print('The average travel time is ', NPSF, ' seconds.')\n print('\\nThis took ...
[ "0.8251978", "0.81471264", "0.80965656", "0.80127156", "0.7987783", "0.79834235", "0.7978646", "0.79705906", "0.7965226", "0.79636025", "0.79616374", "0.79614663", "0.79523134", "0.7948989", "0.79445267", "0.7937707", "0.7923821", "0.792045", "0.79198813", "0.7918623", "0.791...
0.7812562
89
Tests virtualenv creation when a .venv file exists at the project root and contains an absolute path.
def gJkh(BTpp): with zHG9(), BTpp(chdir=True) as XP5J: with bxBA(prefix='pipenv-', suffix='-test_venv') as pEzh: if 'PIPENV_VENV_IN_PROJECT' in Hy7s.environ: del Hy7s.environ['PIPENV_VENV_IN_PROJECT'] qaEx = Hy7s.path.join(XP5J.path, '.venv') with open(qaE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yq5K(abwZ, BTpp):\n with BTpp(chdir=True) as XP5J:\n qaEx = Hy7s.path.join(XP5J.path, '.venv')\n with open(qaEx, 'w') as eHNT:\n eHNT.write(abwZ)\n with zHG9(), bxBA(prefix='pipenv-', suffix='temp_workon_home') as o8jY:\n Hy7s.environ['WORKON_HOME'] = o8jY.name\n ...
[ "0.7924466", "0.7833628", "0.7748418", "0.75150067", "0.7432641", "0.7431453", "0.74261045", "0.736216", "0.7346438", "0.7345734", "0.7262353", "0.7245864", "0.7235294", "0.7149542", "0.69942087", "0.6961683", "0.69086087", "0.6675799", "0.66756123", "0.66649944", "0.6662672"...
0.756172
3