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
Sets the url of this SystemPricingPlan.
def bD7m(YKHO, bD7m: str): YKHO._url = bD7m
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def U2Rp(YKHO, bD7m):\n if bD7m is not None:\n YKHO.url = bD7m", "def U2Rp(YKHO, bD7m):\n YKHO.url = bD7m", "def U2Rp(YKHO, bD7m):\n YKHO.data['url'] = bD7m", "def bD7m(YKHO, bD7m):\n YKHO._url = bD7m", "def bD7m(YKHO, bD7m):\n YKHO._url = bD7m", "def bD7m(YKHO, bD7m):\n YKHO._ur...
[ "0.72602975", "0.7247476", "0.6971461", "0.68381965", "0.68381965", "0.68381965", "0.68381965", "0.68381965", "0.68381965", "0.68381965", "0.6829573", "0.6806772", "0.6786114", "0.6721674", "0.6410444", "0.6406323", "0.6265399", "0.6223721", "0.6166425", "0.6149508", "0.59500...
0.6811395
13
Gets the name of this SystemPricingPlan.
def mWFP(YKHO) -> str: return YKHO._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dRB8(YKHO):\n return YKHO.carrier_page.get_created_rate_plan_name()", "def zYuB(YKHO) -> str:\n return qe4Y.get(YKHO, 'pricing_plan')", "def mWFP(YKHO) -> str:\n return qe4Y.get(YKHO, 'name')", "def mWFP(YKHO) -> str:\n return qe4Y.get(YKHO, 'name')", "def mWFP(YKHO) -> str:\n return qe4...
[ "0.68579113", "0.66418684", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", "0.6535016", ...
0.0
-1
Sets the name of this SystemPricingPlan.
def mWFP(YKHO, mWFP: str): if mWFP is None: raise ValueError('Invalid value for `name`, must not be `None`') YKHO._name = mWFP
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO._name = mWFP", "def zPdd(YKHO, mWFP)...
[ "0.68536186", "0.68536186", "0.68536186", "0.68536186", "0.68536186", "0.6847046", "0.6804992", "0.6793774", "0.67734396", "0.67734396", "0.6761828", "0.6747207", "0.67204374", "0.67204374", "0.6715378", "0.67119384", "0.66846526", "0.6683237", "0.66376007", "0.66376007", "0....
0.0
-1
Gets the station_id of this SystemPricingPlan.
def zW8g(YKHO) -> str: return YKHO._station_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FgcN(YKHO, gnAD=None):\n Oj45 = YKHO.statuslist()\n if gnAD and Oj45 and isinstance(gnAD, str):\n for cG7t in Oj45:\n OZqz = cG7t[1]\n if OZqz and OZqz.strip() == gnAD.strip():\n return int(cG7t[0])\n try:\n XnDZ = int(gnAD)\n if XnDZ <= 0 or X...
[ "0.6419159", "0.6277508", "0.6226161", "0.61381686", "0.60457224", "0.5944842", "0.5885266", "0.5801082", "0.5770962", "0.57461613", "0.57111776", "0.570185", "0.56796706", "0.56689006", "0.5625254", "0.55995065", "0.55462503", "0.5522918", "0.551214", "0.5481365", "0.5481365...
0.767478
0
Gets the region_id of this SystemPricingPlan.
def M5Bl(YKHO) -> str: return YKHO._region_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def M5Bl(YKHO):\n return YKHO._region_id", "def zn0c(YKHO) -> str:\n return qe4Y.get(YKHO, 'region')", "def zn0c(YKHO) -> str:\n return qe4Y.get(YKHO, 'region')", "def zn0c(YKHO) -> str:\n return qe4Y.get(YKHO, 'region')", "def zn0c(YKHO) -> str:\n return qe4Y.get(YKHO, 'region')", "def zn...
[ "0.7869836", "0.7196491", "0.7196491", "0.7196491", "0.7196491", "0.7196491", "0.7196491", "0.7066304", "0.6920374", "0.6920374", "0.69067657", "0.69067657", "0.69067657", "0.69067657", "0.6900928", "0.68993765", "0.6835453", "0.6763405", "0.6715095", "0.670472", "0.6695933",...
0.7810146
1
Gets the fare of this SystemPricingPlan.
def a5zG(YKHO) -> cfTE: return YKHO._fare
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iIu0(YKHO):\n return YKHO.price_per_km * YKHO.current_fare_distance", "def iIu0(YKHO):\n return YKHO.price_per_km * YKHO.current_fare_distance + YKHO.flagfall", "def iIu0(YKHO):\n return super().get_fare() * YKHO.fanciness_rating + YKHO.flagfall", "def iIu0(YKHO):\n return super().get_fare() ...
[ "0.7339358", "0.7178417", "0.58556604", "0.5797454", "0.5314207", "0.53105354", "0.52045435", "0.52041924", "0.5195407", "0.51943845", "0.5111202", "0.5071918", "0.5070142", "0.5033235", "0.501305", "0.4968674", "0.4942486", "0.49332312", "0.4929381", "0.48798487", "0.4857186...
0.7377667
0
Gets the is_taxable of this SystemPricingPlan.
def Nc_r(YKHO) -> bool: return YKHO._is_taxable
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Nc_r(YKHO, Nc_r: bool):\n if Nc_r is None:\n raise ValueError('Invalid value for `is_taxable`, must not be `None`')\n YKHO._is_taxable = Nc_r", "def WmYO(YKHO):\n return YKHO.tax_group_enabled", "def uZGL(YKHO):\n return YKHO._tax_included", "def j8ci(YKHO) -> oAt_:\n return YKHO._t...
[ "0.70530134", "0.6534206", "0.5821342", "0.5570908", "0.5390608", "0.53857136", "0.53839934", "0.53603625", "0.5262618", "0.52387893", "0.51762414", "0.5150666", "0.511448", "0.5096038", "0.5096038", "0.5096038", "0.5096038", "0.5096038", "0.5096038", "0.5006914", "0.49855852...
0.8099373
0
Gets the description of this SystemPricingPlan.
def JBZA(YKHO) -> str: return YKHO._description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zYuB(YKHO) -> str:\n return qe4Y.get(YKHO, 'pricing_plan')", "def t5do(YKHO):\n return gTEQ('PrlVmCfg_GetDescription', YKHO.handle)", "def dQFs(YKHO):\n return YKHO._PricingStructure", "def t5do(YKHO):\n return gTEQ('PrlVmDev_GetDescription', YKHO.handle)", "def Ved8(YKHO):\n finE = YKHO...
[ "0.64014554", "0.611778", "0.60153925", "0.595008", "0.5860324", "0.584641", "0.57809955", "0.57052994", "0.5687516", "0.5687516", "0.56778204", "0.56759316", "0.56431085", "0.56431085", "0.56431085", "0.56431085", "0.56431085", "0.56431085", "0.56431085", "0.56431085", "0.56...
0.55457073
85
Sets the description of this SystemPricingPlan.
def JBZA(YKHO, JBZA: str): if JBZA is None: raise ValueError('Invalid value for `description`, must not be `None`') YKHO._description = JBZA
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AqxA(YKHO, HOap):\n gTEQ('PrlVirtNet_SetDescription', YKHO.handle, HOap)", "def AqxA(YKHO, JBZA):\n YKHO.__description = JBZA", "def AqxA(YKHO, JBZA):\n YKHO.__description = JBZA", "def AqxA(YKHO, JBZA):\n YKHO._description = JBZA", "def AqxA(YKHO, JBZA):\n YKHO.description = JBZA", "d...
[ "0.6527118", "0.62742925", "0.62721616", "0.6254355", "0.6242052", "0.6221194", "0.6200435", "0.6198992", "0.6181731", "0.6099166", "0.6099166", "0.6099166", "0.6099166", "0.6099166", "0.6099166", "0.6099166", "0.6099166", "0.6099166", "0.6099166", "0.6099166", "0.6099166", ...
0.54344213
77
There're better ways to generate unique colors, but this isn't awful.
def ZsXr(): return QrM1.cm.gist_ncar(oyIN.random.random())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AOYf(exwG=1):\n if exwG == 1:\n Z9rn = 'xkcd:red'\n elif exwG == 2:\n Z9rn = 'xkcd:green'\n elif exwG == 3:\n Z9rn = 'xkcd:yellow'\n elif exwG == 4:\n Z9rn = 'xkcd:blue'\n elif exwG == 5:\n Z9rn = 'xkcd:orange'\n elif exwG == 6:\n Z9rn = 'xkcd:purple'...
[ "0.75671417", "0.7559066", "0.73581594", "0.7342885", "0.7284416", "0.72475344", "0.71007663", "0.70980465", "0.7076487", "0.7062553", "0.7052646", "0.7016977", "0.7002936", "0.6940305", "0.68936247", "0.689139", "0.68225217", "0.6811759", "0.6808282", "0.67745733", "0.672468...
0.7694945
0
Sets up the window, labels, and buttons
def FIMM(YKHO): EceD.__init__(YKHO, 'Panel Demo - v2') gVFd = YKHO.addPanel(row=0, column=0, background='gray') gVFd.addLabel(text='Label 1', row=0, column=0, background='gray') gVFd.addTextField(text='Text1', row=0, column=1) gVFd.addLabel(text='Label 2', row=1, column=0, background='gray') gVF...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zvL6(YKHO):\n YKHO.main_menu_window = hSph.MainMenuFrame(YKHO.uiCoordinator)\n YKHO.menu_window = YKHO.main_menu_window._mf\n YKHO.score_window = YKHO.main_menu_window._hf\n YKHO.instructions_window = YKHO.main_menu_window._if\n YKHO.menu_window.playButton.focus_set()", "def PhKb(YKHO):\n Y...
[ "0.7338894", "0.73091507", "0.7220953", "0.7183713", "0.7181529", "0.7172431", "0.7150464", "0.7139911", "0.7128393", "0.7095331", "0.7059243", "0.70444375", "0.7004803", "0.699745", "0.6985808", "0.69846314", "0.6972527", "0.6971511", "0.6968496", "0.6929337", "0.6918298", ...
0.0
-1
Returns the the mean value for the X coordinate of the Celestial Intermediate Pole
def H4fn(YKHO): return YKHO._get_mean_pole('x')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tW3I(YKHO):\n return oyIN.mean(YKHO.getx())", "def jjpA(YKHO):\n __n6 = TTda.datasets.CIFAR10('../../data/CIFAR_data/', train=True, download=False)\n nPrm = ht2j.FloatTensor(__n6.data).permute(0, 3, 1, 2)\n JBMS = nPrm.mean(0) / 255\n return JBMS", "def jjpA(YKHO):\n __n6 = TTda.datasets....
[ "0.765549", "0.72366863", "0.7181417", "0.714671", "0.70938015", "0.70391196", "0.7017316", "0.69678825", "0.69647753", "0.69323975", "0.69323975", "0.6927154", "0.690455", "0.68969023", "0.68544084", "0.6849889", "0.6842303", "0.6762883", "0.67407936", "0.672624", "0.6725845...
0.7843564
0
Returns the the mean value for the X coordinate of the Celestial Intermediate Pole
def THQL(YKHO): return YKHO._get_mean_pole('y')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def H4fn(YKHO):\n return YKHO._get_mean_pole('x')", "def tW3I(YKHO):\n return oyIN.mean(YKHO.getx())", "def jjpA(YKHO):\n __n6 = TTda.datasets.CIFAR10('../../data/CIFAR_data/', train=True, download=False)\n nPrm = ht2j.FloatTensor(__n6.data).permute(0, 3, 1, 2)\n JBMS = nPrm.mean(0) / 255\n r...
[ "0.7843088", "0.76558596", "0.72365224", "0.7181977", "0.7146993", "0.7094605", "0.7039346", "0.70179075", "0.6968901", "0.6965423", "0.6933342", "0.6933342", "0.6928232", "0.6905942", "0.6897282", "0.68553925", "0.6850613", "0.6843467", "0.6763293", "0.67414874", "0.6727069"...
0.0
-1
Returns True if name is starts with 'quercus' >>> is_an_oak('Quercus robur') True >>> is_an_oak('Fraxinus excelsior') False >>> is_an_oak('Pinus sylvestris') False >>> is_an_oak('Quercus cerris') True >>> is_an_oak('Quercus petraea') True >>> is_an_oak('quercus petraea') True >>> is_an_oak('quercusss petraea') True >>>...
def RWlH(mWFP): return mWFP.lower().startswith('quercus')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RWlH(mWFP):\n if 'quercus' in mWFP.lower():\n return True\n else:\n return False", "def BYxH(YKHO, y0cW: str) -> bool:\n GIN8 = y0cW\n if len(GIN8) == 0:\n return True\n or8S = ord(GIN8[0]) - ord('a')\n if YKHO.children[or8S] is None:\n return False\n return Y...
[ "0.81078863", "0.596858", "0.5902439", "0.5723506", "0.5721118", "0.5692583", "0.55943537", "0.5560043", "0.55600005", "0.5557466", "0.55319005", "0.54667026", "0.54667026", "0.543691", "0.5436086", "0.54211706", "0.538166", "0.5380922", "0.53764695", "0.537089", "0.53395647"...
0.8140336
0
Builds the camera that views the world.
def txjP(GPtr, pAIe): return yDvq.Camera(origin=iArr.Point(*GPtr.origin), view_direction=iArr.Vector(*GPtr.view_direction), view_up=iArr.Vector(*GPtr.view_up), vertical_field_of_view=GPtr.vertical_field_of_view, aspect_ratio=pAIe)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ml5B(YKHO) -> None:\n YKHO.world.camera.update(cam_base_pos=(0, -3, 0), cam_dist=1.2 * YKHO.world.env_dim, cam_yaw=0, cam_pitch=-60)", "def _NCN(YKHO, EcVT):\n raise NotImplementedError", "def ml5B(YKHO) -> None:\n YKHO.world.camera.update(cam_base_pos=(3.0, 0, 2), cam_dist=2.5, cam_yaw=90, cam_pi...
[ "0.6975224", "0.6935482", "0.68473405", "0.6802627", "0.6686634", "0.667848", "0.66521096", "0.65996784", "0.65864193", "0.6582034", "0.6526087", "0.64171714", "0.6409535", "0.6393944", "0.6331509", "0.62964714", "0.6291957", "0.62834793", "0.6270255", "0.6267055", "0.6217760...
0.71547115
0
Takes state as an input and returns all indexes that are blank
def xBHi(YKHO, yvGc): return [YRbF for YRbF, wEf2 in enumerate(yvGc) if oyIN.isnan(wEf2)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def a0dL(YKHO, QTBn):\n for YRbF in range(3):\n for r845 in range(3):\n if QTBn[YRbF][r845] == 0:\n return (YRbF, r845)", "def Dn0W(QTBn):\n JnVq = []\n for YRbF, rdlD in enumerate(QTBn):\n for r845, fvDH in enumerate(rdlD):\n if QTBn[YRbF][r845] == 0:\...
[ "0.7609425", "0.74684733", "0.7295883", "0.72697216", "0.6574164", "0.64868176", "0.64562005", "0.6417252", "0.6342151", "0.63298976", "0.63008446", "0.6279216", "0.6252824", "0.62334824", "0.62222075", "0.61555976", "0.61473954", "0.6135472", "0.613546", "0.61247045", "0.607...
0.69159746
5
Takes the current state as input and returns all possible (unused) values that can be placed on the board
def BbPm(YKHO, yvGc): zcTP = [wEf2 for wEf2 in yvGc if not oyIN.isnan(wEf2)] lcVl = [wEf2 for wEf2 in YKHO.all_possible_numbers if wEf2 not in zcTP and wEf2 % 2 != 0] abah = [wEf2 for wEf2 in YKHO.all_possible_numbers if wEf2 not in zcTP and wEf2 % 2 == 0] return (lcVl, abah)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Yi8B(HSQX):\n for WKvO, LVAh in Hs6x.product(range(len(HSQX)), range(len(HSQX[0]))):\n if HSQX[WKvO][LVAh] == 0:\n yield (WKvO, LVAh)", "def QgJH(HSQX):\n YSgr = [QyVM + 1 for QyVM, wEf2 in enumerate(HSQX) if wEf2.isnumeric()]\n return YSgr", "def xASv(YKHO, QTBn):\n LaFS = []...
[ "0.66364133", "0.6348604", "0.6346642", "0.633989", "0.62093145", "0.62093145", "0.62093145", "0.6202773", "0.61473435", "0.6129042", "0.61221147", "0.6099413", "0.6082561", "0.60523844", "0.60521907", "0.6047348", "0.60175395", "0.6010056", "0.59699154", "0.59649056", "0.593...
0.66009694
2
Constructor. Applying this physics to sprites makes them walk with constant speed in a maze, taking random turns at corners and intersections.
def FIMM(YKHO, iBLD, yIRy='walls', A7xA=True, HeJM=False, nW4q=False): super(SRey, YKHO).__init__(iBLD, maze_layer=yIRy) YKHO._prevent_backtracking = A7xA YKHO._allow_wall_backtracking = HeJM YKHO._only_turn_at_wall = nW4q
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, oeNL):\n a9eO.sprite.Sprite.__init__(YKHO)\n YKHO.x = oeNL[0]\n YKHO.y = oeNL[1]\n YKHO.d1 = None\n YKHO.d2 = None\n YKHO.idle = True\n YKHO.walk = False\n YKHO.fall = False\n YKHO.climb = False\n YKHO.climb_mobility = True\n YKHO.action_contact = False\n YKHO.wat...
[ "0.6771346", "0.67226666", "0.63556546", "0.63545966", "0.6282586", "0.6235785", "0.61915535", "0.61843497", "0.6175315", "0.6166205", "0.61566705", "0.615593", "0.6154472", "0.61151844", "0.60828704", "0.60795134", "0.60164917", "0.60024416", "0.60024416", "0.5991384", "0.59...
0.6447269
2
Update a sprite's velocity.
def m73n(YKHO, Jqc7, U6jq=1): if oyIN.isinf(Jqc7.mass): return dQgj, p8Jz, CK7V = YKHO._get_pos_vel(Jqc7, updates_per_env_step=U6jq) GSgv = YKHO._get_nearest_point(dQgj) if CK7V: taR9 = YKHO._maze.valid_directions(GSgv[0], GSgv[1]) YKHO._update_valid_directions(taR9, p8Jz) el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QdZT(YKHO):\n YKHO.y -= YKHO.speed_factor\n YKHO.rect.y = YKHO.y", "def QdZT(YKHO):\n YKHO.rect.y += YKHO.speed", "def HTml(YKHO):\n YKHO.position.data += YKHO.velocity.data", "def gT1I(YKHO, RA_F):\n YKHO.velocity += RA_F", "def gT1I(YKHO, RA_F):\n YKHO.velocity += RA_F", "def QdZT...
[ "0.716601", "0.71603477", "0.7129178", "0.7085528", "0.7085528", "0.70793784", "0.7033087", "0.6986844", "0.69459826", "0.6886964", "0.6738221", "0.67259884", "0.6628196", "0.6573966", "0.65471244", "0.6529225", "0.6518309", "0.6503265", "0.6483479", "0.64792", "0.64789265", ...
0.0
-1
Update a sprite's velocity.
def m73n(YKHO, Jqc7, U6jq=1): bGrB, p8Jz, CK7V = YKHO._get_pos_vel(Jqc7, updates_per_env_step=U6jq) if CK7V or oyIN.all(p8Jz == 0.0): if len(YKHO._step_velocities) > 0: Micv = YKHO._step_velocities.pop(0) if oyIN.any(oyIN.sign(Micv) != oyIN.sign(p8Jz)): Jqc7.veloc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QdZT(YKHO):\n YKHO.y -= YKHO.speed_factor\n YKHO.rect.y = YKHO.y", "def QdZT(YKHO):\n YKHO.rect.y += YKHO.speed", "def HTml(YKHO):\n YKHO.position.data += YKHO.velocity.data", "def gT1I(YKHO, RA_F):\n YKHO.velocity += RA_F", "def gT1I(YKHO, RA_F):\n YKHO.velocity += RA_F", "def QdZT...
[ "0.716601", "0.71603477", "0.7129178", "0.7085528", "0.7085528", "0.70793784", "0.7033087", "0.6986844", "0.69459826", "0.6886964", "0.6738221", "0.67259884", "0.6628196", "0.6573966", "0.65471244", "0.6529225", "0.6518309", "0.6503265", "0.6483479", "0.64792", "0.64789265", ...
0.619311
47
Initialize with an authenticated GirderClient object.
def FIMM(YKHO, gigf): YKHO.gc = gigf
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, YHPk, zb3C, Cxz5=None):\n YKHO.client_auth_type = YHPk\n YKHO.client_id = zb3C\n YKHO.client_secret = Cxz5", "def FIMM(YKHO, zb3C, Cxz5):\n YKHO.__client_id = zb3C\n YKHO.__client_secret = Cxz5", "def x0hE():\n return i9zE(**_EdE.AUTH_ARGS)", "def FIMM(YKHO, a98m, zb3C, vSyi=...
[ "0.7123619", "0.7068855", "0.7024159", "0.6915871", "0.68627447", "0.6855996", "0.6804162", "0.67682815", "0.6758574", "0.67232066", "0.6714399", "0.6692747", "0.66813767", "0.66793954", "0.66695136", "0.6667709", "0.6642822", "0.6624552", "0.6549367", "0.6507862", "0.6504878...
0.0
-1
Get all jobs for a specified user id. Returns a dictionary of jobIds to status strings.
def RrK5(YKHO, QTiD): NArs = {'userId': QTiD, 'limit': 1000000} try: _hkX = YKHO.gc.get(bJV4.JOB_LIST_PATH, parameters=NArs) except c1Bu as e: if tTpl.status == 400: print('Error. invalid user id:', QTiD) return {} raise hlel = {} for oCfW in _hkX: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NMoC(YKHO, uJjO):\n CBIr = Nc2H.find_by_id(uJjO)\n SYSq = [oCfW.json() for oCfW in CBIr.posted_jobs]\n return {'jobs': SYSq}", "def NMoC(YKHO, uJjO):\n CBIr = Nc2H.find_by_id(uJjO)\n print('Getting volunteered jobs')\n SYSq = [oCfW.json() for oCfW in CBIr.volunteered_jobs]\n return {'job...
[ "0.7135464", "0.70370615", "0.7006307", "0.6649863", "0.6532708", "0.6477202", "0.64576656", "0.63616496", "0.6334338", "0.6294558", "0.6268663", "0.62054867", "0.61927176", "0.6145753", "0.61340797", "0.61102533", "0.6108519", "0.6094817", "0.60814357", "0.6068171", "0.60551...
0.8477317
0
Used to calculcate a softmax score with true sequence length (without padding), rather than maxsequence length.
def Ibo7(cCrA, ZHfW): M6pt = ZylS.exp(ZylS.subtract(cCrA, ZylS.reduce_max(cCrA, 2, keep_dims=True))) * ZylS.expand_dims(ZHfW, axis=1) UUZ1 = ZylS.reduce_sum(M6pt, 2, keep_dims=True) _mSQ = ZylS.div(M6pt + 1e-05 / ZHfW.get_shape()[-1].value, UUZ1 + 1e-05) return _mSQ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N93T(YKHO, cCrA):\n MvhI = oyIN.sum(oyIN.exp(cCrA), axis=1, keepdims=True)\n N93T = oyIN.exp(cCrA) / MvhI\n return N93T", "def N93T(WKvO):\n j1LR = oyIN.exp(oyIN.asarray(WKvO))\n return j1LR / j1LR.sum(0)", "def anMS(YKHO, WKvO):\n uw5A = oyIN.exp(WKvO - oyIN.max(WKvO))\n return oyIN.n...
[ "0.65781754", "0.64430475", "0.64190376", "0.64110726", "0.63797617", "0.6353563", "0.6272577", "0.6120602", "0.6109203", "0.6074914", "0.6065824", "0.60382015", "0.60382015", "0.60330963", "0.60167086", "0.6000531", "0.5999311", "0.59955674", "0.5994814", "0.59929574", "0.59...
0.0
-1
Return a humanreadable representation of the platform.
def dsUz(a9EH, Tl0b, iJKf=None): sWfS = f'{AFZk[a9EH]} {Tl0b}' if iJKf is None or iJKf == WmM4.architecture: return sWfS return f'{sWfS} ({iJKf})'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def a9EH(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'platform')", "def zm07(YKHO):\n return a9EH.uname()._asdict()", "def zm07(YKHO):\n return YKHO.msg.platform_info", "def a9EH():\n return 'micaz'", "def a9EH(YKHO, OuqX=True):\n iJKf = YKHO.arch('docker')\n JOxC = YKHO.osversion(...
[ "0.77333045", "0.7601142", "0.746394", "0.7429397", "0.72815746", "0.7197434", "0.71833473", "0.7169291", "0.68724775", "0.67809016", "0.67544687", "0.6692626", "0.6669631", "0.66588914", "0.6622722", "0.65381676", "0.65114045", "0.6507363", "0.64888215", "0.6473264", "0.6464...
0.7122758
8
Return the variable bindings.
def NMoC(YKHO): return dict(((Es0b, getattr(YKHO, Es0b)) for Es0b in YKHO.variables))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def krED(YKHO):\n return YKHO.__bindings", "def NBNq(YKHO):\n return YKHO.local_vars.keys() + YKHO.parent.get_bindable_vars()", "def NBNq(YKHO):\n return YKHO.linkable_vars + YKHO.local_vars.keys() + YKHO.external_vars.keys()", "def kc1W(YKHO):\n return YKHO._.vars", "def jbKh(YKHO):\n retur...
[ "0.76239204", "0.7491372", "0.7436962", "0.688778", "0.68423265", "0.68334407", "0.6769187", "0.67664224", "0.66989326", "0.6618196", "0.661297", "0.6599133", "0.6576731", "0.6538502", "0.6532232", "0.6528781", "0.65230155", "0.6504959", "0.6495707", "0.64903307", "0.6476681"...
0.0
-1
Convert a scipy sparse matrix to a torch sparse tensor.
def FXf_(On0F): On0F = On0F.tocoo().astype(oyIN.float32) _0VL = ht2j.from_numpy(oyIN.vstack((On0F.row, On0F.col)).astype(oyIN.int64)) hkxX = ht2j.from_numpy(On0F.data) ROpF = ht2j.Size(On0F.shape) return ht2j.sparse.FloatTensor(_0VL, hkxX, ROpF)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TWjY(YKHO, SppC: sp.csr_matrix):\n SppC = SppC.tocoo()\n WKvO = ht2j.sparse.FloatTensor(ht2j.LongTensor(oyIN.array([SppC.row, SppC.col])), ht2j.FloatTensor(SppC.data.astype(oyIN.float32)), SppC.shape).to(YKHO.device)\n return WKvO", "def FXf_(On0F):\n _0VL = ht2j.from_numpy(oyIN.vstack((On0F.row,...
[ "0.8300053", "0.81481105", "0.80453056", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8029408", "0.8012812", "0.79967237", "0.79967237", "0.79845846", "0.79845846...
0.8031889
3
Function to calculate precision
def rhd_(Y8eF, aMgO): HRJ_ = wXuO(Y8eF, aMgO) ytgA = uBv5(Y8eF, aMgO) rhd_ = HRJ_ / (HRJ_ + ytgA) return rhd_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VvxU(YKHO):\n ...", "def rhd_(YKHO):\n hG7h, g1pg = (len(YKHO.__true_positives), len(YKHO.__false_positives))\n return float(hG7h) / (hG7h + g1pg)", "def rhd_(Y8eF, aMgO):\n COti = CdMZ.sum(CdMZ.round(CdMZ.clip(Y8eF * aMgO, 0, 1)))\n ftZB = CdMZ.sum(CdMZ.round(CdMZ.clip(aMgO, 0, 1)))\n rh...
[ "0.8027367", "0.7843842", "0.76082224", "0.75625396", "0.7515702", "0.75062746", "0.7463843", "0.74412477", "0.7425824", "0.7424389", "0.7424389", "0.74091244", "0.7351832", "0.73496675", "0.73496675", "0.73496675", "0.73496675", "0.73496675", "0.73496675", "0.7331656", "0.73...
0.74265987
8
Function to calculate recall
def AOzf(Y8eF, aMgO): HRJ_ = wXuO(Y8eF, aMgO) FYKK = Rw7j(Y8eF, aMgO) AOzf = HRJ_ / (HRJ_ + FYKK) return AOzf
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AOzf(Y8eF, aMgO):\n COti = CdMZ.sum(CdMZ.round(CdMZ.clip(Y8eF * aMgO, 0, 1)))\n z5jX = CdMZ.sum(CdMZ.round(CdMZ.clip(Y8eF, 0, 1)))\n AOzf = COti / (z5jX + CdMZ.epsilon())\n return AOzf", "def kwZA(jAlD, C3Jt, qA7F):\n if jAlD + qA7F == 0:\n return 0\n else:\n return jAlD / (jA...
[ "0.73509765", "0.73286057", "0.7304889", "0.7281222", "0.7193735", "0.71856743", "0.715", "0.7133006", "0.7073006", "0.70617235", "0.7029137", "0.7029137", "0.7029137", "0.7029137", "0.7029137", "0.7029137", "0.6990209", "0.6990209", "0.6990209", "0.6990209", "0.6990209", "...
0.7632226
0
This function calculates precision at k for a single sample
def _sei(Y8eF, aMgO, G1Hx): if G1Hx == 0: return 0 aMgO = aMgO[:G1Hx] UZha = set(aMgO) hJ1R = set(Y8eF) CR5D = UZha.intersection(hJ1R) return len(CR5D) / len(aMgO[:G1Hx])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx] != 0\n if Mkmy.size != G1Hx:\n raise ValueError('Relevance score length < k')\n return oyIN.mean(Mkmy)", "def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx] != 0\n if Mkmy.size != G1Hx...
[ "0.7684773", "0.76707965", "0.7594704", "0.7451169", "0.72854686", "0.7158137", "0.7127954", "0.69888824", "0.68721014", "0.6825236", "0.6816785", "0.679297", "0.6790948", "0.67357737", "0.6705404", "0.6705404", "0.6705404", "0.6705404", "0.6705404", "0.6705404", "0.6693689",...
0.0
-1
This function calculates average precision at k for a single sample
def yYKJ(Y8eF, aMgO, G1Hx): DcX8 = [] for YRbF in range(1, G1Hx + 1): DcX8.append(_sei(Y8eF, aMgO, YRbF)) if len(DcX8) == 0: return 0 return sum(DcX8) / len(DcX8)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx] != 0\n if Mkmy.size != G1Hx:\n raise ValueError('Relevance score length < k')\n return oyIN.mean(Mkmy)", "def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx] != 0\n if Mkmy.size != G1Hx...
[ "0.80753726", "0.8022022", "0.7806911", "0.76421416", "0.75518405", "0.75518405", "0.72296304", "0.7221995", "0.71388716", "0.7082228", "0.7057399", "0.70227844", "0.6948657", "0.6886971", "0.6846957", "0.684183", "0.679091", "0.6790285", "0.67477626", "0.6692914", "0.6654795...
0.63502294
32
This function calculates msle
def zVvD(Y8eF, aMgO): P1dF = 0 for Spep, cEY3 in zip(Y8eF, aMgO): P1dF += (oyIN.log(1 + Spep) - oyIN.log(1 + cEY3)) ** 2 return P1dF / len(Y8eF)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IOWY(n5sN, PjQx):\n return oyIN.mean(jdgt(n5sN, PjQx))", "def IOWY(YKHO, _mSQ=None) -> float:\n return float(oyIN.average((oyIN.log1p(YKHO.true) - oyIN.log1p(YKHO.predicted)) ** 2, axis=0, weights=_mSQ))", "def zKx6(nPrm):\n \"\"\" return (tau, sigma ) \"\"\"\n H_Nd, pNSh, QPxx = BWz1(nPrm)\n ...
[ "0.71351606", "0.6998792", "0.64508975", "0.6421097", "0.631412", "0.6209827", "0.6180435", "0.6177251", "0.6163286", "0.6070666", "0.6043474", "0.6015264", "0.6004101", "0.59740937", "0.59182835", "0.58421826", "0.58277386", "0.58172446", "0.58111274", "0.56907165", "0.56599...
0.0
-1
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(xlyK):\n return kO5c.DummyRequest(dbsession=xlyK)", "def fiHr(xlyK, NKcE='GET'):\n QePW = kO5c.DummyRequest()\n QePW.method = NKcE\n QePW.dbsession = xlyK\n return QePW", "def x7NM():\n Tz0H = i48E.create_engine('sqlite://', echo=False)\n zqhD = i48E.orm.sessionmaker(bind=Tz0H)\n ...
[ "0.7389984", "0.7044507", "0.7007096", "0.6650564", "0.6430617", "0.642395", "0.6312381", "0.6236324", "0.6187528", "0.6135779", "0.6092923", "0.60252666", "0.601007", "0.5996697", "0.59935075", "0.59873295", "0.598082", "0.59670746", "0.59432584", "0.59218264", "0.59095174",...
0.7496093
1
Test user table is initially empty.
def ppKD(ouvA): xDcj = ouvA.query(mv1M).all() assert not len(xDcj)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Kjvs(YKHO):\n print('(' + YKHO.test_users_table_populated.__name__ + ')', YKHO.test_users_table_populated.__doc__)\n VJz2(YKHO, oC59, M2RP)", "def bcve(YKHO):\n YKHO.assertEqual(len(YKHO.table), 0)", "def qxDg(YKHO):\n YKHO.assertGreater(len(YKHO.auth.table(YKHO.dataset, YKHO.table)), 0)", "d...
[ "0.80662715", "0.75051826", "0.70792514", "0.70621544", "0.6977453", "0.6619576", "0.65743417", "0.6460425", "0.64493716", "0.6446938", "0.6433255", "0.6417728", "0.6410845", "0.6366613", "0.6363971", "0.6363443", "0.6357945", "0.6348592", "0.63421077", "0.63346565", "0.63239...
0.8134076
0
Test category table is initially empty.
def Rlc3(ouvA): xDcj = ouvA.query(qZuN).all() assert not len(xDcj)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BxwQ(YKHO):\n YKHO.mycursor.execute('CREATE TABLE IF NOT EXISTS category( CAT_id int PRIMARY KEY AUTO_INCREMENT, CAT_nom VARCHAR(50) UNIQUE)')", "def f7fk(YKHO):\n YKHO.category.fill_tab_categories(YKHO.list_categories, YKHO.mycursor, YKHO.my_database)", "def IWRi(YKHO):\n FY...
[ "0.6893134", "0.6714606", "0.66215974", "0.6571056", "0.6555345", "0.6529772", "0.65202373", "0.65094924", "0.6491573", "0.6488568", "0.6437267", "0.64030796", "0.63756543", "0.6283144", "0.62645805", "0.62645805", "0.6257553", "0.61895454", "0.61831445", "0.6147816", "0.6131...
0.73502403
0
Test new category is added to database.
def UF_P(ouvA): nFrr = qZuN(label='test_label', desc='test_desc') ouvA.add(nFrr) xDcj = ouvA.query(qZuN).all() assert len(xDcj) == 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XnPT(YKHO):\n pass", "def zr7r(ouvA):\n nFrr = qZuN(label='test_label', desc='test_desc')\n ouvA.add(nFrr)\n Ghho = ouvA.query(qZuN).all()\n assert Ghho[0].label == 'test_label'\n assert Ghho[0].desc == 'test_desc'", "def osVu(YKHO):\n YKHO.signup('Bo', 'Theo', 'Bo_theo5@example.com', ...
[ "0.8505927", "0.8468428", "0.84142816", "0.8100773", "0.806951", "0.80331504", "0.7986526", "0.7824989", "0.7784528", "0.77238196", "0.76007456", "0.75589174", "0.7555016", "0.7540984", "0.7518726", "0.75098276", "0.7472101", "0.7418315", "0.74041235", "0.7375576", "0.7375328...
0.8491344
1
Test new category has correct data.
def zr7r(ouvA): nFrr = qZuN(label='test_label', desc='test_desc') ouvA.add(nFrr) Ghho = ouvA.query(qZuN).all() assert Ghho[0].label == 'test_label' assert Ghho[0].desc == 'test_desc'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XnPT(YKHO):\n pass", "def MT4f(YKHO):\n pass", "def XnPT(YKHO):\n Ylbp = YKHO.client().post('/categories/', data=YKHO.category)\n YKHO.assertEqual(Ylbp.status_code, 201)\n YKHO.assertIn('Stews', str(Ylbp.data))", "def IHFO(YKHO):\n nPrm = YKHO.data1\n YKHO.assertTrue(isinstance(nPrm,...
[ "0.79987293", "0.79971606", "0.7935051", "0.7805785", "0.77763546", "0.7674307", "0.76527995", "0.75710493", "0.7533571", "0.7459611", "0.7359067", "0.73568296", "0.73508", "0.7350425", "0.73455584", "0.7285688", "0.7285679", "0.72461265", "0.72412574", "0.7132548", "0.713212...
0.76691216
6
Test that when given bad credentials login doesn't happen.
def JxZz(fiHr): from .views.default import login_view fiHr.POST['username'] = 'testme' fiHr.POST['password'] = 'badpassword' Aofo = login_view(fiHr) assert Aofo == {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ImCN(YKHO):\n nPrm = {'username': 'nonexistentuser', 'password': 'nopasswordlol'}\n geh0 = YKHO.login(nPrm)\n lYY4 = 'Unable to log in with provided credentials.'\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD_REQUEST)\n try:\n if lYY4 not in geh0.data['non_field_errors']:\n ...
[ "0.84575164", "0.8239737", "0.80381596", "0.8020892", "0.7999747", "0.797898", "0.79210055", "0.78722525", "0.7872042", "0.78218514", "0.7821175", "0.7792445", "0.77526766", "0.77523285", "0.7746808", "0.77321005", "0.7724763", "0.7715742", "0.76280653", "0.7597343", "0.75956...
0.0
-1
Test not found view.
def jcJ7(fiHr): from .views.notfound import notfound_view Aofo = notfound_view(fiHr) assert Aofo == {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BPod(YKHO):\n geh0 = YKHO.app.test_client().get('/test/99999')\n YKHO.assertEqual(geh0.status_code, 404)\n YKHO.assert_template_used('test/test_not_found.html')", "def YOXQ(YKHO):\n geh0 = YKHO.client.get('')\n mFeZ = YKHO.client.get(gxEw('index'))\n YKHO.assertEqual(geh0.status_code, 200)\...
[ "0.78799075", "0.76413864", "0.7450421", "0.7395706", "0.73952", "0.7368605", "0.73390234", "0.7312305", "0.72942597", "0.7281673", "0.7269199", "0.7257694", "0.7231467", "0.7219845", "0.7217617", "0.7215786", "0.7214846", "0.7214846", "0.72122866", "0.72095376", "0.71826357"...
0.8412927
0
Create an instance of webtests TestApp for testing routes. With the alchemy scaffold we need to add to our test application the setting for a database to be used for the models. We have to then set up the database by starting a database session. Finally we have to create all of the necessary tables that our app normall...
def vY7J(QePW): from webtest import TestApp from pyramid.config import Configurator def b8V_(ePNl, **gCuF): GPtr = Configurator(settings=gCuF) GPtr.include('pyramid_jinja2') GPtr.include('.models') GPtr.include('.routes') GPtr.include('.security') GPtr.scan()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def P4t4():\n P4t4 = LUif({'TESTING': True, 'DATABASE_NAME': 'AAPI_DB_Test'})\n with P4t4.app_context():\n JawI()\n yield P4t4", "def P4t4():\n cmRX = '{0}_test'.format(gCuF.SQLALCHEMY_DATABASE_URI)\n NArs = {'DEBUG': False, 'TESTING': True, 'WTF_CSRF_ENABLED': False, 'SQLALCHEMY_DATABASE_U...
[ "0.79217637", "0.77648544", "0.776342", "0.76743466", "0.7642728", "0.76154333", "0.758443", "0.7572592", "0.7569738", "0.75545216", "0.75386405", "0.75386405", "0.7538617", "0.7523063", "0.752093", "0.74964994", "0.7477891", "0.7463496", "0.7462033", "0.7460362", "0.7442908"...
0.7455166
20
Test category view when logged in is accessible.
def qeMw(vY7J, rc3f, JbAL): geh0 = vY7J.get('/category/1', params=JbAL) assert geh0.status_code == 200
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MDiD(YKHO):\n ETXm.objects.create(user=YKHO.user, access_level=4).save()\n YKHO.client.login(username='hodor', password='hodor')\n geh0 = YKHO.client.get('/categories/')\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertTemplateUsed(geh0, 'view_categories.html')", "def Ci56(YKHO):\n im...
[ "0.77672637", "0.767011", "0.74551517", "0.6985046", "0.6771906", "0.67545414", "0.66753054", "0.66686755", "0.6535825", "0.64381534", "0.6408908", "0.6344637", "0.63318187", "0.6314524", "0.6299448", "0.6283847", "0.6274063", "0.6269872", "0.62551993", "0.6201729", "0.619182...
0.7629735
2
Test attribute view renders attributes when authenticated.
def mEyr(vY7J, JbAL, rc3f): geh0 = vY7J.get('/attribute/1/1', params=JbAL) assert len(geh0.html.find_all('img')) == 2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FsUK(vY7J, rc3f, JbAL):\n geh0 = vY7J.get('/attribute/1/1', params=JbAL)\n assert geh0.status_code == 200", "def tH9u(YKHO) -> None:\n with KT5P(S2Xd.feature_id, False):\n YKHO.request.user = mv1M.objects.get(username='doc')\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._cre...
[ "0.82022816", "0.62329197", "0.6162242", "0.6030842", "0.6015802", "0.6015802", "0.5912258", "0.5852004", "0.5787744", "0.57713014", "0.57514656", "0.57492363", "0.5701504", "0.56685317", "0.56685317", "0.5663633", "0.5661887", "0.5593452", "0.5568887", "0.553334", "0.5518278...
0.72004664
1
Test display view renders the string when authenticated.
def GO1r(vY7J, rc3f, JbAL): geh0 = vY7J.get('/display/1/1/1', params=JbAL) lBTM = geh0.html.find_all('h1')[1] assert 'user name, category attribute' in lBTM
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HrfG(vY7J, rc3f, JbAL):\n geh0 = vY7J.get('/display/1/1/1', params=JbAL)\n assert geh0.status_code == 200", "def W8mS():\n return TvZl('signin.html')", "def FLww(XEsj):\n assert tHyA(XEsj).is_displayed", "def kE_y(YKHO):\n XjpS(YKHO, 1, 0)\n MC83 = YKHO.client.login(username='test', pas...
[ "0.81064683", "0.72645694", "0.6638245", "0.65006596", "0.64065534", "0.6370784", "0.6370784", "0.6337652", "0.6303511", "0.62649786", "0.62337077", "0.6223609", "0.6220222", "0.6186955", "0.61747265", "0.61747265", "0.61728495", "0.61692464", "0.61653346", "0.61597276", "0.6...
0.7386137
1
Initializes a ContactCard. (See ALLOWED_FIELDS)
def FIMM(YKHO, **B2fa): YKHO._card = QIu_.vCard() YKHO.__dict__.update(((H5ew, False) for H5ew in YKHO._modifiable_fields)) YKHO.__dict__.update(((H5ew, BWXx) for H5ew, BWXx in B2fa.items() if H5ew in YKHO._modifiable_fields))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, zQCf: str=None, eHMM: str=None, Q4FJ: CardEmbossing=None, Sm7k: str=None, TirB: PersonalIdentityDocumentInfo=None, feEG: str=None, oTSd: str=None, EE3v: str=None, Lqmv: str=None, fWjm: ContactInformation=None):\n YKHO.swagger_types = {'cardholder_type': str, 'full_name': str, 'card_data': UK4Y, '...
[ "0.6912477", "0.6501165", "0.6398207", "0.6378437", "0.61819184", "0.61819184", "0.61124605", "0.60882276", "0.60364264", "0.6030689", "0.5984563", "0.59647304", "0.5950613", "0.5935758", "0.59223443", "0.5912796", "0.5876132", "0.5868386", "0.58650243", "0.585614", "0.581965...
0.5873739
17
Return an iterator over the datafile. Actually, this is just iter(self.data).
def Vs4Q(YKHO): return iter(YKHO.data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vs4Q(YKHO):\n YKHO.f.seek(YKHO.pos)\n nPrm = YKHO.f.read(_rLh)\n while nPrm:\n while YKHO.dataptr < len(nPrm):\n YKHO.dataptr += 1\n yield nPrm[YKHO.dataptr - 1]\n YKHO.pos = YKHO.f.tell()\n YKHO.dataptr = 0\n nPrm = YKHO.f.read(_rLh)", "def Vs4Q(YKH...
[ "0.8007798", "0.7909604", "0.7610233", "0.75247914", "0.7520424", "0.7500663", "0.7438878", "0.7428555", "0.7261322", "0.7239807", "0.7205083", "0.71390575", "0.7115563", "0.7085227", "0.69514453", "0.69372493", "0.69335586", "0.6904566", "0.68777376", "0.6869749", "0.6834051...
0.7600291
5
Returns joined game directory path relative to Steamapps
def gUvR(YKHO, NtEF=False): if not YKHO.common and (not NtEF): raise RuntimeError("Can't determine this game's directory without username") if YKHO.common: AeXe = 'common' else: AeXe = 'username' pulF = YKHO.dir if _j8t or n4gK: pulF = pulF.lower() return Hy7s.pat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def L9nx(u5xJ: int) -> str:\n for pmON in D33o():\n try:\n bo34.info(f'searching for {u5xJ} in {pmON}..')\n with open(f'{pmON}appmanifest_{u5xJ}.acf', 'r') as nUeQ:\n TaGr = KG2U.parse(nUeQ, f'appmanifest_{u5xJ}.acf').as_dict()['appstate']['installdir']\n ...
[ "0.7248746", "0.67371076", "0.66656584", "0.66290104", "0.65411127", "0.6503396", "0.63814026", "0.6321212", "0.63178587", "0.6286332", "0.62717813", "0.62651", "0.6227697", "0.62151647", "0.6207184", "0.619172", "0.6173946", "0.6172356", "0.6172356", "0.6136663", "0.6135941"...
0.7005897
1
Used to return file names to show on product images upload.
def ZWCE(YKHO): return [zFiD.split(',')[0] for zFiD in YKHO.lines]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iumf(YKHO):\n pass", "def suGl(YKHO):\n return YKHO.filename", "def QsMt(YKHO):\n return YKHO.files", "def I3lW(YKHO):\n return YKHO.filenames", "def DbLT(YKHO):\n return [Hy7s.path.basename(mWFP) for mWFP in YKHO.meta['sources']]", "def VbPg(YKHO):\n Hy7s.chdir(YKHO.dataDir)\n i...
[ "0.73308", "0.7283138", "0.7244023", "0.7095753", "0.69480413", "0.6941661", "0.68573475", "0.6848893", "0.6830801", "0.6765065", "0.67344683", "0.67254275", "0.66919965", "0.66325176", "0.6631117", "0.6627996", "0.6620066", "0.6620066", "0.6615844", "0.6611067", "0.6607284",...
0.0
-1
Check unique userdomain ourselves because we don't have 'user' field in the form
def eUMT(YKHO, VMhS): if YKHO._meta.model.objects.filter(user=YKHO.request.user, domain=VMhS.get('domain')).exists(): YKHO._errors['domain'] = YKHO.error_class([W1Os('Shop with this name already exists')]) del VMhS['domain']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eUMT(YKHO, VMhS):\n if YKHO.instance:\n if YKHO._meta.model.objects.exclude(id=YKHO.instance.id).filter(user=YKHO.request.user, domain=VMhS.get('domain')).exists():\n YKHO._errors['domain'] = YKHO.error_class([W1Os('Shop with this name already exists')])\n del VMhS['domain']", ...
[ "0.7264526", "0.6611884", "0.6572336", "0.6514388", "0.6477734", "0.6449061", "0.6434357", "0.641448", "0.6400104", "0.6385208", "0.6373068", "0.6369826", "0.6368132", "0.6323487", "0.63063514", "0.6302026", "0.6301711", "0.6301711", "0.62871826", "0.6253782", "0.6231434", ...
0.7373279
0
The boundary conidtions on the right side, for unknown and nu.
def LZUg(YKHO): return YKHO.__bcRight
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dqhu(YKHO):\n ut5U = YKHO.__mesh.get_edge_list()\n wfPR = YKHO.__mesh.edge_iterator(21)\n YKHO.edge_center_value[wfPR[0]:wfPR[1] + 1] = 0.0\n RFYS = YKHO.__mesh.edge_iterator(2)\n Fg_i = oyIN.sin(oyIN.pi * YKHO.y_e[RFYS[0]:RFYS[1] + 1])\n YKHO.edge_center_value[RFYS[0]:RFYS[1] + 1] = Fg_i\n ...
[ "0.68701345", "0.6751893", "0.6673425", "0.66722554", "0.6550806", "0.65174586", "0.65043485", "0.64497966", "0.640456", "0.6402061", "0.6401766", "0.63807136", "0.6354826", "0.63105524", "0.62552804", "0.6248912", "0.6231945", "0.6226551", "0.62262386", "0.6209225", "0.61424...
0.6336245
14
The boundary conidtions on the right side, for unknown and nu.
def LZUg(YKHO): return YKHO.__bcRight
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dqhu(YKHO):\n ut5U = YKHO.__mesh.get_edge_list()\n wfPR = YKHO.__mesh.edge_iterator(21)\n YKHO.edge_center_value[wfPR[0]:wfPR[1] + 1] = 0.0\n RFYS = YKHO.__mesh.edge_iterator(2)\n Fg_i = oyIN.sin(oyIN.pi * YKHO.y_e[RFYS[0]:RFYS[1] + 1])\n YKHO.edge_center_value[RFYS[0]:RFYS[1] + 1] = Fg_i\n ...
[ "0.6871974", "0.67528176", "0.6674659", "0.66735184", "0.65518904", "0.65167886", "0.65053695", "0.6450479", "0.64052886", "0.64036", "0.64015543", "0.6382531", "0.6357096", "0.63098747", "0.6255503", "0.62505674", "0.6230625", "0.62277824", "0.6225297", "0.6211151", "0.61433...
0.6335336
13
Split string into words, remove whitespace and punctuation
def JgZ3(KCHu): if Ot66(KCHu): KCHu = iCQO('--', ' ', KCHu) KCHu = KCHu.lower().split() vwCE = [] for GIN8 in KCHu: vwCE.append(ykip(GIN8)) return vwCE
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HPLn(KCHu):\n KCHu = ZbWC.sub('\\\\W+', ' ', KCHu)\n KCHu = ZbWC.sub('[_0-9]+', ' ', KCHu)\n return KCHu.split()", "def HPLn(KCHu):\n KCHu = ZbWC.sub('\\\\W+', ' ', KCHu)\n KCHu = ZbWC.sub('[_0-9]+', ' ', KCHu)\n return KCHu.split()", "def vGQR(l5Ny):\n wAJt = ZbWC.compile('\\\\W*')\n ...
[ "0.81911534", "0.81911534", "0.81272066", "0.7758041", "0.7716366", "0.76931524", "0.7605431", "0.75545245", "0.7552954", "0.7484845", "0.74509096", "0.7412249", "0.7400704", "0.7386869", "0.7384062", "0.7382043", "0.73162496", "0.7292556", "0.729119", "0.7284273", "0.7280315...
0.7360942
16
Returns a predefined model by name.
def YrZb(mWFP, **B2fa): FYrf = {'standard_lstm_lm_200': E6Ea, 'standard_lstm_lm_650': WWqJ, 'standard_lstm_lm_1500': eg50, 'awd_lstm_lm_1150': N9Ip, 'awd_lstm_lm_600': gUCZ, 'big_rnn_lm_2048_512': xCCH, 'elmo_2x1024_128_2048cnn_1xhighway': cFk7, 'elmo_2x2048_256_2048cnn_1xhighway': _2Mr, 'elmo_2x4096_512_2048cnn_2x...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def u5_9(Emd4, mWFP):\n ZGE9 = QQNo.camelize(mWFP)\n C3ST = Emd4.models[ZGE9]\n return C3ST", "def YrZb(*, mWFP: str) -> laHg.Optional[laHg.Type]:\n return getattr(DJqJ.models, mWFP, None)", "def YrZb(ZGE9):\n LCet = 'strain.models.strain_' + ZGE9.lower()\n iwaC = ANWz.import_module(LCet)\n ...
[ "0.86676157", "0.81161493", "0.80618334", "0.79889643", "0.79149187", "0.7579886", "0.7560434", "0.7511144", "0.7403472", "0.7376161", "0.736167", "0.7312168", "0.7291965", "0.7262628", "0.7163371", "0.7163224", "0.71504134", "0.7129951", "0.7081742", "0.7073349", "0.7051597"...
0.73746216
10
Override the equality operator to allow work log objects to be compared.
def xa14(YKHO, Elif): return YKHO.__dict__ == Elif.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xa14(YKHO, Elif):\n if not isinstance(Elif, q7A8):\n return False\n return YKHO.__dict__ == Elif.__dict__", "def TGo6(YKHO) -> None:\n YKHO.assertTrue(YKHO.log1 == YKHO.log1copy)\n YKHO.assertTrue(YKHO.log1.__eq__(YKHO.log1copy))", "def xa14(YKHO, Elif):\n if not isinstance(Elif, vRMz...
[ "0.75836176", "0.75681394", "0.71252966", "0.70719105", "0.70597893", "0.70597893", "0.7045603", "0.7045603", "0.7045603", "0.7045603", "0.7045603", "0.7045603", "0.7045603", "0.7045603", "0.7045603", "0.7045603", "0.7045603", "0.70316994", "0.6963948", "0.6963948", "0.696394...
0.6735336
53
Check whether `x` is an iterable object except for string.
def GfZ5(WKvO: Any) -> bool: return isinstance(WKvO, g760.abc.Iterable) and (not isinstance(WKvO, (str, bytes)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UWwS(WKvO):\n if isinstance(WKvO, aZbN):\n return False\n return isinstance(WKvO, g760.Iterable)", "def GfZ5(WKvO):\n if isinstance(WKvO, jKi7.string_types):\n return False\n return hasattr(WKvO, '__iter__')", "def kUz6(WKvO):\n try:\n iter(WKvO)\n except TypeError:\n...
[ "0.8749865", "0.8497222", "0.81624997", "0.81380945", "0.8030398", "0.80031663", "0.79605573", "0.77676135", "0.77502674", "0.77227896", "0.77054363", "0.7680664", "0.76372164", "0.7596562", "0.7523219", "0.73999214", "0.7363047", "0.7308817", "0.72310627", "0.7088277", "0.70...
0.8509569
1
Check whether `x` is list like, e.g., Tuple, List, or Numpy object.
def uje1(WKvO: Any) -> bool: return isinstance(WKvO, (list, tuple))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def S7ID(WKvO):\n return type(WKvO) == list", "def zvUs(WKvO):\n if not isinstance(WKvO, list):\n return False\n if len(WKvO) == 0:\n return True\n return all((isinstance(ZfUD, list) for ZfUD in WKvO))", "def j5rG(ZfUD):\n return isinstance(ZfUD, list)", "def S7ID(nPrm):\n try...
[ "0.84266996", "0.7743655", "0.76795244", "0.7461792", "0.7425574", "0.73612356", "0.7346784", "0.727173", "0.7267359", "0.72502166", "0.72377133", "0.7194669", "0.71141255", "0.71111417", "0.70947355", "0.7062882", "0.701223", "0.68991894", "0.689695", "0.6881133", "0.6863590...
0.8683242
0
Check whether `x` is a list of complex objects (not integers).
def jyXW(WKvO: Any) -> bool: return (uje1(WKvO) or (isinstance(WKvO, oyIN.ndarray) and WKvO.dtype == 'O')) and len(WKvO) > 0 and (not OjXW(WKvO[0]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WRWI(WKvO):\n if not isinstance(WKvO, list):\n return False\n if len(WKvO) == 0:\n return True\n for ocQ8 in WKvO:\n if not zvUs(ocQ8):\n return False\n return True", "def s4me(WKvO):\n return isinstance(WKvO, list) and len(WKvO) == 4 and e8Ll(WKvO[0]) and e8Ll(...
[ "0.69231665", "0.66148293", "0.65774804", "0.6557322", "0.6544302", "0.6241429", "0.62252635", "0.6146695", "0.60614073", "0.60234874", "0.5992401", "0.59593034", "0.59149426", "0.5873439", "0.58418334", "0.58106965", "0.5804771", "0.5746204", "0.57441247", "0.5719728", "0.57...
0.68031645
1
Accesseur de l'attribut _total
def h4aS(YKHO): return str(round(YKHO._total, 2))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wjRY(YKHO):\n return YKHO._total", "def xG7B(YKHO):\n return YKHO.total", "def XAXL(YKHO):\n pass", "def wjRY(YKHO, wjRY):\n YKHO._total = wjRY", "def wjRY(YKHO, wjRY):\n YKHO._total = wjRY", "def wjRY(YKHO, wjRY):\n YKHO._total = wjRY", "def wjRY(YKHO, wjRY):\n YKHO._total = w...
[ "0.80544007", "0.7829412", "0.77574813", "0.77258986", "0.77258986", "0.77258986", "0.77258986", "0.77258986", "0.77258986", "0.77258986", "0.77258986", "0.7628028", "0.7603728", "0.75854206", "0.7486081", "0.744265", "0.7435703", "0.74002254", "0.73932624", "0.735011", "0.73...
0.7358333
19
Mutateur de l'attribut _total_elle
def _gKB(YKHO, qNQF): YKHO._total_elle = qNQF
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sb9b(YKHO):\n YKHO.lblImporte.setText('Saldo Restante: $%.2f' % YKHO.total_a_pagar)", "def L7wS(YKHO, qNQF):\n YKHO._total = qNQF", "def QV2i(YKHO):\n return str(round(YKHO._total_elle, 2))", "def H66H(YKHO, qNQF):\n YKHO._total_annee_precedente_elle = qNQF", "def vf4y(YKHO, qNQF):\n YKH...
[ "0.75833607", "0.7484871", "0.7394798", "0.696404", "0.6904356", "0.6874531", "0.6832365", "0.68305427", "0.678836", "0.67741424", "0.6773135", "0.67472005", "0.67386746", "0.6695214", "0.6663005", "0.6646944", "0.6641274", "0.65819174", "0.65514565", "0.6544768", "0.6544768"...
0.81075287
0
Generate a random string of fixed length
def TJC9(FVpJ=10): KoG3 = vIwR.ascii_lowercase return ''.join((tuKI.choice(KoG3) for YRbF in range(FVpJ)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YzjY(u54L: int):\n FLLz = vIwR.ascii_letters + vIwR.digits\n return ''.join(tuKI.choices(FLLz, k=u54L))", "def e7Tf(u54L=6):\n exwG = int(u54L / 2 + 1)\n WKvO = MRxC.hexlify(Hy7s.urandom(exwG))\n KCHu = WKvO[:u54L]\n return KCHu.decode('utf-8')", "def e7Tf(u54L):\n return ''.join((tuKI...
[ "0.8680464", "0.8573714", "0.85486245", "0.85297275", "0.85209286", "0.84331024", "0.8432044", "0.84157014", "0.84120053", "0.8389201", "0.8345882", "0.8343962", "0.83406156", "0.83348686", "0.83240855", "0.82986933", "0.82911193", "0.8281826", "0.82818025", "0.82811046", "0....
0.7761017
97
Update a series of existing messages
def CLxw(XKE6): def WoLu(A97Q, DGJ3): def g4h1(qVAL): Jyyj, Oz57 = qVAL map(mVML(A97Q, Jyyj), Oz57) map(g4h1, DGJ3) return A97Q u8sp = ((WoLu(A97Q, DGJ3), DGJ3) for A97Q, DGJ3 in XKE6) return u8sp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def V0Ud(YKHO, SGPK):\n return", "def V0Ud(YKHO, SGPK):\n return", "def V0Ud(YKHO, SGPK):\n return", "def V0Ud(YKHO, SGPK):\n return", "def V0Ud(YKHO, SGPK):\n return", "def V0Ud(YKHO, SGPK):\n return", "def V0Ud(YKHO, SGPK):\n return", "def V0Ud(YKHO, SGPK):\n return", "def...
[ "0.7310525", "0.7310525", "0.7310525", "0.7310525", "0.7310525", "0.7310525", "0.7310525", "0.7310525", "0.7310525", "0.7310525", "0.72571653", "0.72571653", "0.72571653", "0.72571653", "0.72571653", "0.72571653", "0.72571653", "0.72571653", "0.72571653", "0.72571653", "0.725...
0.0
-1
Export the queryset of objects as commaseparated value (CSV), using the model's to_csv() method.
def sIxo(YKHO): fEXb = [] Sno3 = [] MOPg = YKHO.queryset.model.csv_headers.copy() if hasattr(YKHO.queryset.model, 'get_custom_fields'): for dCAY in YKHO.queryset.model().get_custom_fields(): MOPg.append(dCAY.name) Sno3.append(dCAY.name) fEXb.append(','.join(MOPg)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TIVs(YKHO, QePW, SR0I):\n V_D6 = YKHO.get_table_fields()\n NSNj = [Jyyj.name for Jyyj in V_D6]\n Kbdz = [Jyyj.verbose_name.encode('utf-8') for Jyyj in V_D6]\n geh0 = igJ6(content_type='text/csv')\n geh0['Content-Disposition'] = 'attachment; filename=%s.csv' % QMSQ(YKHO.model._meta).replace('.', ...
[ "0.82700646", "0.79243326", "0.785673", "0.78357446", "0.77470887", "0.71963537", "0.6911402", "0.68625903", "0.6862561", "0.67439365", "0.66723526", "0.66660285", "0.66279894", "0.66100514", "0.6597877", "0.6575114", "0.656509", "0.64982337", "0.6478382", "0.6445977", "0.642...
0.83472526
0
Encapsulate any data which contains a comma within double quotes.
def lp_d(nPrm): m6_J = [] FiiE = list(nPrm) FiiE[3] = '=' + str(FiiE[3]) + '*12' for BWXx in FiiE: if BWXx is None or BWXx is False: m6_J.append('') continue if isinstance(BWXx, (qcWV.date, qcWV.datetime)): BWXx = BWXx.isoformat() if not isinst...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def M6hN(XkN1):\n if ',' in XkN1:\n XkN1 = '\"' + XkN1 + '\"'\n return XkN1", "def w3bN(vIwR):\n vIwR = str(vIwR)\n vIwR = vIwR.replace('\"', '\\\\\"')\n if ',' not in vIwR and '\\n' not in vIwR:\n return vIwR\n return '\"' + vIwR + '\"'", "def eHNT(nPrm: Dict):\n if Jyyj in ...
[ "0.6295174", "0.62139606", "0.6090001", "0.6015809", "0.5908498", "0.5893587", "0.58921415", "0.5880803", "0.58636075", "0.58345276", "0.5809084", "0.57992554", "0.5795957", "0.5795206", "0.57568413", "0.5732317", "0.5732317", "0.5667389", "0.56346375", "0.5614579", "0.561000...
0.5347689
38
get all processes in a list
def um3r(): HCmI = 'ps -do pid:1,cmd' P3Cm = {} with Hy7s.popen(HCmI) as yvT9: next(yvT9.__iter__()) for zFiD in yvT9: XP5J = zFiD.rstrip('\n').split(' ', 2) if XP5J[1][0] == '[': continue P3Cm[XP5J[0]] = XP5J[1] return P3Cm
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def um3r():\n yield from O0k5.process_iter()", "def sI5v(YKHO):\n zJsh, wIbz = YKHO.RunCmdOnDevice(['/bin/ps', '--no-headers', '-A', '-o', 'pid,ppid,args:4096,state'], quiet=True)\n assert wIbz == '', wIbz\n Sjm9 = []\n for vC9B in zJsh.split('\\n'):\n if vC9B == '':\n continue\n...
[ "0.7614332", "0.72756803", "0.7230724", "0.71371156", "0.70869774", "0.7040173", "0.6863143", "0.68533826", "0.68258727", "0.68209374", "0.678037", "0.6773393", "0.66728896", "0.6625193", "0.6593684", "0.65855896", "0.6559334", "0.64931774", "0.64349556", "0.6412724", "0.6407...
0.6547949
17
Returns the memory page size on this system. Page size will never change, so get it once and cache it.
def GBmG(YKHO): if 'pagesize' not in YKHO.last_values: cZGs = lWrn.run_cmd('/bin/pagesize') YKHO.last_values['pagesize'] = int(cZGs) return YKHO.last_values['pagesize']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZGo4(YKHO):\n return YKHO.xlist('get-memsize')[1][0] * 1024", "def f0f2(YKHO):\n return wzZh.ipmap_memory_size(YKHO.map)", "def _p7a():\n YUNn = O0k5.virtual_memory()\n return round(YUNn.total / YUNn.used / 100, 3)", "def f0f2(YKHO):\n return wzZh.ipset_memory_size(YKHO.set)", "def llBc(...
[ "0.84326565", "0.7994035", "0.78275037", "0.7810594", "0.7724722", "0.7705939", "0.76578695", "0.74798596", "0.7428407", "0.73964155", "0.7385116", "0.72748303", "0.724388", "0.71809214", "0.71197736", "0.7118014", "0.70714355", "0.70684624", "0.7053598", "0.7052469", "0.7048...
0.7243294
13
This method returns the data type for float numbers from the input string. In case the input string is None or it is empty, a low float value is returned.
def float(KCHu): if KCHu is None or KCHu == '': eHNT = float(-ANdr) else: eHNT = float(KCHu) return eHNT
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hGcZ(KCHu):\n try:\n float(KCHu)\n return 'FLOAT'\n except:\n return KCHu", "def wuav(WKvO, Ywqg=None):\n try:\n int(WKvO)\n if WKvO[0] == '0' and len(WKvO) > 1:\n return str\n else:\n return int if len(WKvO) < 9 else str\n except:\n...
[ "0.7635821", "0.7387642", "0.73489845", "0.73446506", "0.7303018", "0.7278938", "0.72603136", "0.71921295", "0.71516633", "0.7151644", "0.71133614", "0.710979", "0.7107568", "0.7075993", "0.7016265", "0.6970984", "0.69571024", "0.68779683", "0.68752104", "0.6833263", "0.67672...
0.6502958
47
r"""Check that the units on the passed in arrays are compatible; return the magnitudes.
def ZSe8(n5sN, yRKV): try: if hasattr(yRKV, 'units'): if not hasattr(n5sN, 'units'): n5sN = rYO3.Quantity(n5sN, 'dimensionless') n5sN = n5sN.to(yRKV.units) elif hasattr(n5sN, 'units'): n5sN = n5sN.to('dimensionless') except r0HG: raise ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RWNd(xYyZ: list):\n if len(xYyZ) < 2:\n return\n N8OZ = oyIN.asarray([oyIN.shape(ufWC) for ufWC in xYyZ]).astype(float)\n JBMS = oyIN.mean(N8OZ, axis=0)\n for YRbF in range(len(N8OZ)):\n N8OZ[YRbF, :] = N8OZ[YRbF, :] - JBMS\n if not oyIN.sum(oyIN.abs(N8OZ)) <= 1e-05:\n raise...
[ "0.60291326", "0.59873295", "0.59666526", "0.591283", "0.59020066", "0.5896654", "0.58876365", "0.5793808", "0.578346", "0.57649297", "0.57343066", "0.57128197", "0.5646205", "0.56034285", "0.54478925", "0.5436073", "0.5413892", "0.5392646", "0.5388471", "0.5380874", "0.53420...
0.49460346
66
Check that arrays are almost equal, including units.
def t_0o(n5sN, yRKV, SOnQ=7): n5sN, yRKV = ZSe8(n5sN, yRKV) XTiz.testing.assert_array_almost_equal(n5sN, yRKV, SOnQ)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Qhng(n5sN, yRKV):\n n5sN, yRKV = ZSe8(n5sN, yRKV)\n XTiz.testing.assert_array_equal(n5sN, yRKV)", "def KRqq(jzdc, Fg_i, EdL8=0.0001, hy6N=0.0001, _0qL=True):\n jzdc = mnmn(jzdc)\n Fg_i = mnmn(Fg_i)\n if len(jzdc) == 0 and len(Fg_i) == 0:\n return True\n if not _0qL:\n jzdc, Fg...
[ "0.7447105", "0.70785916", "0.70329785", "0.68776125", "0.6864121", "0.6837699", "0.68330085", "0.67987525", "0.6760304", "0.67587006", "0.6690534", "0.6684772", "0.6684772", "0.665663", "0.6621213", "0.6619038", "0.66172236", "0.66080946", "0.6576756", "0.65416765", "0.65241...
0.7569934
0
Check that arrays are equal, including units.
def Qhng(n5sN, yRKV): n5sN, yRKV = ZSe8(n5sN, yRKV) XTiz.testing.assert_array_equal(n5sN, yRKV)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wMKs(YKHO, jzdc, Fg_i):\n YKHO.checkArrayAttrs(jzdc, Fg_i)\n oyIN.testing.assert_array_equal(jzdc, Fg_i)\n if len(jzdc.set_arrays) > 1:\n for YRbF, kZX9 in enumerate(jzdc.set_arrays):\n oyIN.testing.assert_array_equal(kZX9, Fg_i.set_arrays[YRbF])\n else:\n oyIN.testing.asse...
[ "0.74932903", "0.71501815", "0.71476245", "0.7057142", "0.70403886", "0.69055694", "0.68923753", "0.68751323", "0.6859004", "0.68136066", "0.6797591", "0.6795477", "0.6774892", "0.6767964", "0.67270464", "0.6704331", "0.6704331", "0.6679936", "0.6658721", "0.6639561", "0.6608...
0.7578366
0
Hide the ticklabels on an axes.
def yqyn(aNZO): aNZO.xaxis.set_ticklabels([]) aNZO.yaxis.set_ticklabels([])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def I5eQ(YKHO):\n for WKvO in 'xy':\n jDK_ = getattr(YKHO, WKvO + 'axis')\n weUZ = getattr(YKHO, '_share' + WKvO)\n if weUZ is not None:\n ABDL = getattr(YKHO.figure, '_share' + WKvO)\n if ABDL > 0:\n jDK_.label.set_visible(False)\n if ABDL > ...
[ "0.8511003", "0.7878751", "0.7807032", "0.7714514", "0.7621796", "0.7611741", "0.75133324", "0.7498455", "0.7425349", "0.73274493", "0.7242701", "0.69682276", "0.68379915", "0.6622227", "0.6578706", "0.6483394", "0.64826995", "0.6445603", "0.6346425", "0.63249016", "0.6299427...
0.8863266
0
Determines whether `f` is heading out of bounds.
def k61b(eHNT: SwimmingFish, TVTK: int) -> bool: return SpEv(eHNT) < -TVTK / 2 and eHNT.dx < 0 or (lM6D(eHNT) > TVTK / 2 and eHNT.dx > 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BbUM(YKHO):\n return YKHO.rect.right <= 0", "def ivGM(eHNT):\n\n @zaGL(eHNT)\n def rrIw(yOAJ, jNOo, *qIxc, **B2fa):\n WKvO, LVAh, epBp = jNOo\n if not (0 <= WKvO < 16 and 0 <= epBp < 16 and (0 <= LVAh < aDh9)):\n E4N8('Coordinates %s are OOB in %s() of %s, ignoring call' % (...
[ "0.6660436", "0.6562338", "0.6401819", "0.61970454", "0.60221624", "0.5935669", "0.58295214", "0.5808516", "0.57209086", "0.5712146", "0.5707718", "0.5669163", "0.5609287", "0.5571251", "0.55454415", "0.5516191", "0.5482109", "0.54669034", "0.54557556", "0.5450912", "0.544392...
0.6845657
0
Finds the x coordinate of the left edge of a fish.
def SpEv(eHNT: SwimmingFish) -> float: if eHNT.dx > 0: return eHNT.posn.x else: return eHNT.posn.x - eHNT.fish.size
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LFlW(YKHO):\n return YKHO.points['topLeft'].x", "def LFlW(YKHO):\n return YKHO.points['topLeft'].x", "def LFlW(YKHO):\n WKvO, LVAh = (YKHO.loc[0] - 1, YKHO.loc[1])\n if WKvO < 0:\n return None\n return YKHO.garden.cells[LVAh][WKvO]", "def BTm8(YKHO, WKvO=1):\n YKHO.x -= WKvO\n ...
[ "0.7301792", "0.7301792", "0.721165", "0.710895", "0.7108425", "0.6952581", "0.6705541", "0.66770905", "0.6617342", "0.65757537", "0.6570477", "0.6512245", "0.64900225", "0.6489691", "0.6486581", "0.64571416", "0.6450955", "0.6427716", "0.64027894", "0.63981867", "0.63929224"...
0.87858367
0
Finds the x coordinate of the right edge of a fish.
def lM6D(eHNT: SwimmingFish) -> float: if eHNT.dx > 0: return eHNT.posn.x + eHNT.fish.size else: return eHNT.posn.x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SpEv(eHNT: SwimmingFish) -> float:\n if eHNT.dx > 0:\n return eHNT.posn.x\n else:\n return eHNT.posn.x - eHNT.fish.size", "def _tIi(YKHO):\n return YKHO.points['topRight'].x", "def _tIi(YKHO):\n return YKHO.points['topRight'].x", "def YJQD(YKHO, WKvO=1):\n YKHO.x += WKvO\n ...
[ "0.74938285", "0.7032446", "0.7032446", "0.6569234", "0.65316516", "0.651489", "0.64163005", "0.62499994", "0.6153083", "0.6143145", "0.6111873", "0.60932356", "0.6076977", "0.6071054", "0.60610944", "0.60007656", "0.60007656", "0.59890544", "0.5977792", "0.59737504", "0.5945...
0.8522208
0
Determines whether `p` is directly above `f`.
def ykpb(XP5J: Posn, eHNT: SwimmingFish) -> bool: return XP5J.y > eHNT.posn.y and SpEv(eHNT) <= XP5J.x <= lM6D(eHNT)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dGBI(WKvO: float, LVAh: float) -> bool:\n return not KQVf(WKvO, LVAh) and WKvO < LVAh", "def BHcV(WKvO: float, LVAh: float) -> bool:\n return not KQVf(WKvO, LVAh) and WKvO > LVAh", "def jmxi(YKHO, Elif):\n return YKHO.__f > Elif.get_f()", "def S8eX(YKHO, XP5J):\n return YKHO.begin <= XP5J < Y...
[ "0.6382848", "0.61952317", "0.60438246", "0.5982676", "0.5938308", "0.5912637", "0.58335614", "0.5830815", "0.58229244", "0.5743607", "0.57263404", "0.56490135", "0.56434375", "0.5631621", "0.5618267", "0.5615411", "0.5603845", "0.5593953", "0.5562807", "0.5538966", "0.551651...
0.7774571
0
Tries to feed all the fishes with food dropped at position `click`.
def cEXo(k8wH: Posn, r1Hx: FishList): if r1Hx is not None: OmLO(k8wH, r1Hx.first) cEXo(k8wH, r1Hx.rest)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IpxT(WKvO, LVAh):\n cEXo(y3rJ(WKvO, LVAh), ix4j.fishes)", "def OmLO(k8wH: Posn, eHNT: SwimmingFish):\n if ykpb(k8wH, eHNT):\n sOdQ(eHNT.fish)", "def QUSx(YKHO, pvZU, Cs6h, RJ8k, apVC):\n sdCG = RJ8k['head']\n n95u = Cs6h.node(sdCG[0], sdCG[1])\n pan_ = None\n ZJbS = []\n ni2m = ...
[ "0.7104014", "0.6486478", "0.5593556", "0.52382886", "0.51975065", "0.5114598", "0.50277764", "0.5016825", "0.5011668", "0.498321", "0.497314", "0.49579293", "0.49493226", "0.49408573", "0.49015456", "0.489851", "0.4896407", "0.48950163", "0.48861074", "0.48861074", "0.488168...
0.6315944
2
Find (and set) the appendix letter
def A3mT(YKHO, SKw2): for nL_U in Otq9(SKw2): l5Ny = Y6as.get_node_text(nL_U) if YKHO.appendix_letter: bo34.warning('Found two appendix headers: %s and %s', YKHO.appendix_letter, l5Ny) YKHO.appendix_letter = mIy_.headers.parseString(l5Ny).appendix return YKHO.appendix_letter
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VjSd(sZqf):\n if sZqf not in RMfx:\n sZqf = Ldo_(sZqf)\n return RMfx.find(sZqf) + 1", "def nQIF(YKHO, sZqf):\n for YRbF in range(0, len(YKHO._word)):\n if YKHO._word[YRbF] == sZqf:\n YKHO.new_string[YRbF] = sZqf\n if sZqf not in YKHO._word:\n YKHO.letters_wrong += ...
[ "0.6238258", "0.6102256", "0.59258825", "0.58711624", "0.57959664", "0.57638294", "0.56799877", "0.5676638", "0.557988", "0.557988", "0.5565665", "0.5565665", "0.5426993", "0.5415571", "0.54114985", "0.54114985", "0.54114985", "0.5410943", "0.5406885", "0.54008454", "0.540084...
0.7323634
0
Verify that the query fragment and/or design are in the query history. If reverse is True, verify the opposite. Return the size of the history; 1 if we fail to determine it.
def QsV6(x0hE, vBtp, L42E=None, gxEw=False, NzQY='beeswax'): _hkX = x0hE.get('/%(server_name)s/query_history' % {'server_name': NzQY}) dtX3 = gxEw and LNHv or lU6q dtX3(vBtp in _hkX.content, _hkX.content) if L42E: dtX3(L42E in _hkX.content, _hkX.content) if _hkX.context: try: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yh1v(C3ST, FLXQ):\n if not C3ST.get('~' * FLXQ):\n FLXQ = len([Z9rn for Z9rn in C3ST if Z9rn.startswith('~') and Z9rn.endswith('~')][0])\n print('#' * 57)\n print('# WARNING: the model was trained with history length:{0} #'.format(FLXQ))\n print('# Falling back to model h...
[ "0.5621582", "0.54270166", "0.5357599", "0.52575916", "0.5242772", "0.5210896", "0.5204662", "0.5203705", "0.51053447", "0.5076154", "0.5009991", "0.49987993", "0.49759695", "0.49759695", "0.4972389", "0.4966538", "0.49533468", "0.49365112", "0.4918171", "0.48912013", "0.4881...
0.8131922
0
Softmax Function Subtract max for numerical stability
def N93T(epBp): epBp -= oyIN.max(epBp) M6pt = oyIN.exp(epBp) UUZ1 = oyIN.sum(M6pt, axis=1).reshape(-1, 1) + 1e-07 return M6pt / UUZ1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N93T(WKvO):\n uw5A = oyIN.exp(WKvO - oyIN.max(WKvO))\n return uw5A / uw5A.sum()", "def N93T(WKvO):\n uw5A = oyIN.exp(WKvO - oyIN.max(WKvO))\n return uw5A / uw5A.sum(axis=0)", "def N93T(WKvO):\n uw5A = oyIN.exp(WKvO - oyIN.max(WKvO))\n return uw5A / uw5A.sum(axis=0)", "def N93T(WKvO):\n ...
[ "0.8152991", "0.8079076", "0.80757797", "0.80667955", "0.80667955", "0.80667955", "0.80667955", "0.8042965", "0.8034646", "0.8034646", "0.80252635", "0.7989922", "0.7975356", "0.7973275", "0.7970623", "0.7970623", "0.7970623", "0.7970623", "0.7970623", "0.7970623", "0.7970623...
0.7722469
59
Tests adding a flow request with null profile. It tests that the request is added but its status is set to PENDING
def cuJE(YKHO): IXbv = {'flow_id': 'f_44444', 'profile': None, 'start_validity': '2017-10-23T10:00:00+02:00', 'expire_validity': '2018-10-23T10:00:00+02:00'} Ylbp = YKHO._add_flow_request(flow_request=IXbv) YKHO.assertEqual(Ylbp.status_code, 201) IXbv = Ylbp.json() yFgu = qSMx.objects.get(name='Dest...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qhHK(YKHO):\n IXbv = {'flow_id': 'f_44444', 'start_validity': '2017-10-23T10:00:00+02:00', 'expire_validity': '2018-10-23T10:00:00+02:00'}\n Ylbp = YKHO._add_flow_request(flow_request=IXbv)\n YKHO.assertEqual(Ylbp.status_code, 201)\n IXbv = Ylbp.json()\n yFgu = qSMx.objects.get(name='Destination...
[ "0.80036163", "0.7232278", "0.7049326", "0.7048891", "0.63334006", "0.6172055", "0.61487865", "0.59809506", "0.582963", "0.57931393", "0.5763863", "0.5751336", "0.5673823", "0.5630929", "0.56178033", "0.55690885", "0.5566032", "0.5539675", "0.55045915", "0.54282176", "0.54181...
0.8205824
0
Tests adding a flow request without profile. It tests that the request is added but its status is set to PENDING
def qhHK(YKHO): IXbv = {'flow_id': 'f_44444', 'start_validity': '2017-10-23T10:00:00+02:00', 'expire_validity': '2018-10-23T10:00:00+02:00'} Ylbp = YKHO._add_flow_request(flow_request=IXbv) YKHO.assertEqual(Ylbp.status_code, 201) IXbv = Ylbp.json() yFgu = qSMx.objects.get(name='Destination 1') Y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cr2K(YKHO):\n IXbv = YKHO.flow_request.copy()\n IXbv.update({'process_id': '22222', 'status': AfaD.ACTIVE})\n Ylbp = YKHO._add_flow_request(flow_request=IXbv)\n YKHO.assertEqual(Ylbp.status_code, 201)\n Hdl3 = Ylbp.json()\n YKHO.assertEqual(Hdl3['flow_id'], IXbv['flow_id'])\n YKHO.assertNo...
[ "0.7803305", "0.76301026", "0.74845064", "0.6945466", "0.6928897", "0.67383623", "0.6580541", "0.65189177", "0.6186129", "0.6147419", "0.61275727", "0.6079337", "0.6047433", "0.6040039", "0.601013", "0.59942967", "0.5922391", "0.5886359", "0.5867241", "0.5838824", "0.5804633"...
0.80373293
0
Tests failure when adding flow request with a client not authenticated (i.e., the request doesn't include the oauth2 header)
def SZOG(YKHO): Ylbp = YKHO.client.post('/v1/flow_requests/', data=qQXR.dumps(YKHO.flow_request), content_type='application/json') YKHO.assertEqual(Ylbp.status_code, 401) YKHO.assertEqual(Ylbp.json(), {'errors': ['not_authenticated']})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dL2g(YKHO, x0hE):\n sxkB(x0hE, status=401)", "def clSF(YKHO):\n MOPg = YKHO._get_oauth_header(client_name=sXh5)\n Ylbp = YKHO.client.get('/v1/flow_requests/33333/', **MOPg)\n YKHO.assertEqual(Ylbp.status_code, 404)\n YKHO.assertDictEqual(Ylbp.json(), {'errors': ['not_found']})", "def gV1_(YK...
[ "0.72295207", "0.7026418", "0.7016032", "0.69895214", "0.69852763", "0.69654834", "0.69632566", "0.69137406", "0.68774265", "0.6830494", "0.68187094", "0.6762043", "0.6760029", "0.6758737", "0.6725911", "0.67148423", "0.67016965", "0.66967964", "0.66926056", "0.6655485", "0.6...
0.7570188
0
Tests failure when adding flow request with a client which is not authorized (i.e., id doesn't have the correct oauth2 scope)
def AZUp(YKHO): Ylbp = YKHO._add_flow_request(client_name=YB0G) YKHO.assertEqual(Ylbp.status_code, 403)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tJq4(YKHO):\n YKHO.client.login(username='duck', password='duck')\n Ylbp = YKHO.client.get('/v1/flow_requests/consents_confirmed/?success=true&consent_confirm_id=aaaaa')\n YKHO.assertEqual(Ylbp.status_code, 400)\n YKHO.assertEqual(Ylbp.content.decode('utf-8'), HWyn['INVALID_DATA'])", "def g8_x(YK...
[ "0.7205315", "0.7151344", "0.7092073", "0.70476425", "0.70019186", "0.6802155", "0.66410387", "0.65857315", "0.65610665", "0.6554746", "0.64975345", "0.6463687", "0.6459357", "0.64566725", "0.64548993", "0.6403187", "0.64009964", "0.63896275", "0.63676745", "0.6350549", "0.63...
0.6729807
6
Test that, if the consent manager returns a 400 status (meaning that the consent is already present), the Flow Request is not confirmed
def KtuR(YKHO): Ylbp = YKHO._add_flow_request(flow_request=YKHO.flow_request) oxta = Ylbp.json()['confirm_id'] TAVV = Ylbp.json()['process_id'] RJDY = 'http://127.0.0.1/' YKHO.client.login(username='mouse', password='duck') Ylbp = YKHO.client.get('/v1/flow_requests/confirm/?confirm_id={}&callbac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tJq4(YKHO):\n YKHO.client.login(username='duck', password='duck')\n Ylbp = YKHO.client.get('/v1/flow_requests/consents_confirmed/?success=true&consent_confirm_id=aaaaa')\n YKHO.assertEqual(Ylbp.status_code, 400)\n YKHO.assertEqual(Ylbp.content.decode('utf-8'), HWyn['INVALID_DATA'])", "def ewt7(YK...
[ "0.8356095", "0.8189732", "0.7774097", "0.77730256", "0.73073184", "0.7107737", "0.68566835", "0.68218076", "0.6663273", "0.6648389", "0.6569843", "0.6542843", "0.6463835", "0.6227492", "0.622404", "0.62090856", "0.6193876", "0.6142819", "0.61140966", "0.60695136", "0.6018724...
0.6848969
7
Tests wrong method that accessing to /v1/flow_requests/confirm/ using the wrong HTTP method is not supported
def NTb6(YKHO): YKHO.client.login(username='duck', password='duck') for NKcE in ('post', 'put', 'head', 'options', 'delete', 'trace'): EpVc = getattr(YKHO.client, NKcE) Ylbp = EpVc('/v1/flow_requests/confirm/') YKHO.assertEqual(Ylbp.status_code, 405)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NWYd(YKHO):\n QePW = zVa7.get_request('GET', {})\n WKvO = YKHO.start_request_tests(QePW)\n YKHO.assertEqual(WKvO.status_code, 405)\n qQXR.dump(WKvO.to_dict(), HwRy.stdout, indent=2)", "def pV7Y(YKHO):\n MOPg = YKHO._get_oauth_header()\n Ylbp = YKHO.client.delete('/v1/flow_requests/p_11111/'...
[ "0.71129644", "0.70722127", "0.69622916", "0.69186807", "0.691428", "0.69025284", "0.6882624", "0.68372715", "0.6773238", "0.6747209", "0.6723123", "0.6642933", "0.6612381", "0.64792246", "0.64236444", "0.64158463", "0.6365028", "0.635337", "0.63471687", "0.63368326", "0.6334...
0.8439886
0
Tests the behavior when a user try to call the /flow_requests/confirm view with a consent_confirm_id of a consent not confirmed. It uses flow_request with 'no_consent' and consent with id 'not_confirmed' (status PE) (check test data)
def MRDF(YKHO): YKHO.client.login(username='duck', password='duck') Ylbp = YKHO.client.get('/v1/flow_requests/consents_confirmed/?success=true&consent_confirm_id={}'.format(EglJ)) YKHO.assertEqual(Ylbp.status_code, 302) IXbv = AfaD.objects.get(flow_id='f_11111') YKHO.assertEqual(IXbv.status, AfaD.PE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ewt7(YKHO):\n Ylbp = YKHO._add_flow_request()\n oxta = Ylbp.json()['confirm_id']\n TAVV = Ylbp.json()['process_id']\n RJDY = 'http://127.0.0.1/'\n YKHO.client.login(username='duck', password='duck')\n Ylbp = YKHO.client.get('/v1/flow_requests/confirm/?confirm_id={}&callback_url={}&action=add'...
[ "0.7789282", "0.7765866", "0.7722447", "0.76400965", "0.71172243", "0.71041226", "0.6917201", "0.68550384", "0.67745274", "0.67180014", "0.6712531", "0.6682571", "0.62548494", "0.6171562", "0.61652446", "0.6082453", "0.6078937", "0.6016138", "0.5980007", "0.59257776", "0.5916...
0.7704632
3
Tests that getting the flow request by channel id, using non admin REST client is forbidden
def qfN9(YKHO): Z9rn = QgdJ.objects.get(confirmation_id=fNQa) MOPg = YKHO._get_oauth_header(client_name=sXh5) Ylbp = YKHO.client.get('/v1/flow_requests/search/?channel_id={}'.format(Z9rn.channel.channel_id), **MOPg) YKHO.assertEqual(Ylbp.status_code, 403)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Eyrj(YKHO):\n MOPg = YKHO._get_oauth_header(client_name=WWo6)\n Ylbp = YKHO.client.get('/v1/flow_requests/search/?channel_id=unknown', **MOPg)\n YKHO.assertEqual(Ylbp.status_code, 404)\n YKHO.assertEqual(Ylbp.json(), {'errors': ['not_found']})", "def k6di(YKHO, eJTR, qMjG):\n return oYRq", "...
[ "0.7692033", "0.66722816", "0.6641957", "0.6613594", "0.6613594", "0.64904636", "0.64061844", "0.6208693", "0.6166558", "0.60622394", "0.60141236", "0.5930949", "0.5894965", "0.5872548", "0.5847991", "0.58454376", "0.58320206", "0.58320206", "0.58252585", "0.5823541", "0.5802...
0.7511905
1
Test that if the channel id is not found, it returns a 404 error
def Eyrj(YKHO): MOPg = YKHO._get_oauth_header(client_name=WWo6) Ylbp = YKHO.client.get('/v1/flow_requests/search/?channel_id=unknown', **MOPg) YKHO.assertEqual(Ylbp.status_code, 404) YKHO.assertEqual(Ylbp.json(), {'errors': ['not_found']})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _yWd(YKHO) -> None:\n YwkQ = YKHO.make_request('GET', '/_synapse/admin/v1/event_reports/123', access_token=YKHO.admin_user_tok)\n YKHO.assertEqual(404, YwkQ.code, msg=YwkQ.json_body)\n YKHO.assertEqual(kt4f.NOT_FOUND, YwkQ.json_body['errcode'])\n YKHO.assertEqual('Event report not found', YwkQ.json...
[ "0.71299934", "0.67744297", "0.6734397", "0.66709024", "0.643966", "0.6421132", "0.6370583", "0.6366984", "0.634215", "0.62995946", "0.629602", "0.6259611", "0.62463063", "0.6243145", "0.6234977", "0.6234891", "0.6213043", "0.62075526", "0.61702245", "0.61638546", "0.6162266"...
0.7665547
0
Calculate the residual sum of squares
def CTaE(Zohj, tjUW, rKYz, GZMX=None, FyDk=None, pU3u=None, oVM8=None): if GZMX is None: pImw = oVM8(Zohj) if pImw <= 0: return 1.0 - 100 * pImw AjGp = Zohj[oyIN.newaxis, :] rGNu = vPFj(FyDk, pU3u, AjGp)[0] wHcb, QIaO, MHxz = aJJu.svd(rGNu, full_matrices=False) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ed_d(YKHO) -> eQHC.NDArray[oyIN.float64]:\n return YKHO.data - YKHO.theory", "def E5KX(YKHO):\n VC3Q = YKHO.I - YKHO.E\n return VC3Q", "def TN1P(_JTT, hlel, yzQ0):\n EcVT = iD49(_JTT)\n LVAh = TtaC(hlel)\n a0GJ = oyIN.ones((EcVT.shape[0], 1))\n mvSs = oyIN.concatenate((a0GJ, EcVT), axi...
[ "0.735632", "0.7171395", "0.71091104", "0.7106706", "0.7095984", "0.70876205", "0.70765406", "0.7014331", "0.68075097", "0.68059653", "0.67989266", "0.6765046", "0.669938", "0.6659923", "0.6648715", "0.6619461", "0.65916556", "0.65833104", "0.65340805", "0.6529239", "0.652731...
0.0
-1
Drop vertex or edge class from database.
def e2wR(YKHO, Emd4, i6Bn=False): if i6Bn: YKHO.client.command('DROP CLASS {} UNSAFE'.format(Emd4.registry_name)) else: YKHO.client.command('DROP CLASS {}'.format(Emd4.registry_name))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ReNU(YKHO):\n vVja(YKHO.name, YKHO.cursor, print_info=False)", "def OfVt():\n p9bx.db.reflect()\n p9bx.db.drop_all()\n print('Dropped the database')", "def PkTX(Emd4):\n NCls.session.remove()\n NCls.drop_all()", "def KjEW(OaeV):\n OaeV.obj = YIkF()\n OaeV.obj.connect()", "def gh...
[ "0.66206926", "0.6331877", "0.6190306", "0.61555487", "0.5968846", "0.59642357", "0.595685", "0.5944796", "0.59434813", "0.59434813", "0.593298", "0.5900156", "0.5900156", "0.58820736", "0.5858272", "0.5837346", "0.5837346", "0.5837346", "0.5837346", "0.5837346", "0.5837346",...
0.0
-1
Drop all registry classes from database.
def AEnW(YKHO, nqEK): for Emd4 in reversed(list(nqEK.values())): YKHO.drop_class(Emd4, ignore_instances=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PkTX(Emd4):\n NCls.session.remove()\n NCls.drop_all()", "def LnXF(Emd4):\n Emd4.dbm().modelclass_deleteall(Emd4)", "def LHwS():\n CNDk('models', silent=True)\n for STHt, VcfD in P4t4.blueprints.items():\n CNDk('%s.models' % VcfD.import_name, silent=True)\n NCls.drop_all()", "def ...
[ "0.7330591", "0.7313894", "0.7256648", "0.7116607", "0.695387", "0.69320095", "0.6901476", "0.68040967", "0.6734259", "0.6734259", "0.6725226", "0.67062515", "0.67009777", "0.6668985", "0.6668985", "0.6668985", "0.6668985", "0.6668985", "0.6668985", "0.6668985", "0.6668985", ...
0.8052791
0
Get edges incoming to vertex or class.
def w9mg(YKHO, Br5Q, *aVKx): J2us = YKHO.client.command('SELECT inE({0}) FROM {1}'.format(','.join(YKHO.coerce_class_names(aVKx)), YKHO.coerce_class_names(Br5Q))) return [YKHO.get_edge(tTpl) for tTpl in J2us[0].oRecordData['inE']] if J2us else []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mC4V(YKHO):\n kXUa = []\n for CBRg in YKHO.vertices():\n for j9ly in YKHO.out_vertices(CBRg):\n kXUa.append(YKHO[CBRg][j9ly])\n return kXUa", "def mC4V(YKHO):\n return YKHO.graph.edges", "def mC4V(YKHO):\n return [D70y(YKHO.vertices[YRbF - 1], YKHO.vertices[YRbF]) for YRbF ...
[ "0.7035939", "0.69899637", "0.6746813", "0.6744376", "0.66994214", "0.6671893", "0.66608536", "0.6650307", "0.6650307", "0.6650307", "0.6650307", "0.6650307", "0.6650307", "0.66453147", "0.66453147", "0.66453147", "0.6634539", "0.661742", "0.66148525", "0.65614337", "0.652874...
0.6221021
35
Get class name(s) for vertexes/edges.
def r_nw(KndY): return [getattr(wEf2, 'registry_name', wEf2) for wEf2 in KndY] if hasattr(KndY, '__iter__') and (not isinstance(KndY, str)) else getattr(KndY, 'registry_name', KndY)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tGDF(YKHO):\n raise NotImplementedError", "def Um9M(YKHO):\n return hPFK.VertexInfluenceMap_className(YKHO)", "def KndY(YKHO):\n return str(YKHO._classes)", "def fIGK(YKHO):\n return [YKHO.__class__.__name__]", "def pnQ7(YKHO):\n exwG = type(YKHO).__name__\n return exwG", "def Um9M(...
[ "0.64434874", "0.6325503", "0.600156", "0.59852576", "0.59610564", "0.59561753", "0.5941298", "0.59305745", "0.5925605", "0.5922054", "0.59104776", "0.59055775", "0.5898682", "0.5874623", "0.5868447", "0.5868447", "0.5823224", "0.5752447", "0.5735938", "0.57156855", "0.571568...
0.0
-1
Missing files (after registration) should cause workers to fail
def AZmi(): with YrRi(2) as pBlK: qIxc = A2en(pBlK.copy_to_s3()) qIxc['validation_mode'] = 'SINGLE' hDmM = qIxc['name'] W_Fz.run(url_info=W_Fz.register_url(), json_body=qIxc) W_Fz.run(url_info=W_Fz.query_url(hDmM), json_body={}) W_Fz.run(url_info=W_Fz.register_url(), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ua3b(YKHO):\n Ux0P = '/%s' % qxeD.uuid4()\n while Hy7s.path.exists(Ux0P):\n Ux0P = '/%s' % qxeD.uuid4()\n with YKHO.assertRaises(Exception):\n YKHO.app.log_filenames([Ux0P])\n YKHO.assertEqual(YKHO.get_track_count(), 0)", "def oZVf(YKHO, pmON):\n return None", "def AGkc(YKHO):\...
[ "0.6224492", "0.6176687", "0.6166789", "0.6033904", "0.60183793", "0.5974054", "0.5968201", "0.5962807", "0.5959395", "0.5944138", "0.5920553", "0.5909032", "0.59021455", "0.58476967", "0.58468276", "0.5807812", "0.5805506", "0.5805107", "0.5794332", "0.57740134", "0.5770905"...
0.6050192
3
Set negative values of input data to 0 and return the result.
def oeNL(WKvO): WKvO[WKvO < 0.0] = 0.0 return WKvO
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tbib(nPrm):\n return sfxH.negative(nPrm)", "def uIi9(YKHO):\n YKHO.device.re_zero_to_datum()\n return 'OK'", "def uI5I(YKHO):\n for G1Hx in range(len(YKHO)):\n YKHO[G1Hx] *= 0 if YKHO[G1Hx] < 0 else 1\n YKHO.finalized = True\n return YKHO", "def sbx9(YKHO):\n raise NotImplemen...
[ "0.7171659", "0.67465186", "0.6679918", "0.6657102", "0.6595147", "0.6541346", "0.6463043", "0.6438898", "0.6352611", "0.6323751", "0.63031906", "0.62768525", "0.6253981", "0.624678", "0.6225372", "0.61416477", "0.6112663", "0.6110124", "0.6088016", "0.6039796", "0.60369754",...
0.58368194
30
Create an index vector which has value 1 where input data is nonzero.
def pdhd(WKvO): CXCD = oyIN.zeros_like(WKvO) CXCD[WKvO] = 1 return CXCD
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jYhb(jzdc):\n return oyIN.nonzero(jzdc)[0]", "def i0gq(d6pt, zNig):\n P6bq = oyIN.zeros(zNig, int)\n if d6pt != -1:\n P6bq[d6pt] = 1\n return P6bq", "def waS5(YKHO):\n eeYG = YKHO.__seqvector.vec.nonzero()[1]\n eeYG = list(set(eeYG))\n eeYG.sort()\n return eeYG", "def eafL(...
[ "0.7260545", "0.6994269", "0.65032923", "0.63989884", "0.62178046", "0.6208965", "0.62019014", "0.6119893", "0.610957", "0.6089341", "0.6071668", "0.60635054", "0.6033314", "0.6026115", "0.6012771", "0.60099775", "0.5991233", "0.598233", "0.5979951", "0.59490275", "0.59478056...
0.68579584
2
Return the maximum value on descriptor i.
def max(YKHO, YRbF): WKvO = YKHO.val(YRbF, 0) CWnC = len(YKHO) a1PO = 1 while a1PO < CWnC: LVAh = YKHO.val(YRbF, a1PO) if WKvO < LVAh: WKvO = LVAh a1PO += 1 return WKvO
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KO11(YKHO):\n return YKHO.elem.index(max(YKHO))", "def max(YKHO):\n try:\n wEf2 = T_0W._max_vals[YKHO.key]\n except KeyError:\n if YKHO.kind == 'u':\n wEf2 = int((1 << YKHO.bits) - 1)\n else:\n wEf2 = int((1 << YKHO.bits - 1) - 1)\n T_0W._max_vals[YK...
[ "0.75129414", "0.745958", "0.745958", "0.7133811", "0.7133811", "0.7097262", "0.7096167", "0.7072438", "0.7036915", "0.7028971", "0.7026346", "0.7010698", "0.6992908", "0.696696", "0.69639707", "0.69639707", "0.69506174", "0.6946569", "0.69345224", "0.6916649", "0.68550754", ...
0.8042447
0
Return a copy of self as a bold font
def nzpg(YKHO): return I4qd(YKHO.name[0:2] + 'B', YKHO.size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BgOT(YKHO):\n RovI()\n Jcbn = eA0O.QFont('Sans Serif', 12, eA0O.QFont.Bold)\n return Jcbn", "def zcD9(YKHO):\n return I4qd(YKHO.name[0:2] + 'IB', YKHO.size)", "def BgOT(YKHO):\n RovI()\n Jcbn = eA0O.QFont('Sans Serif', 12, eA0O.QFont.Bold)\n return Jcbn", "def JSRs(YKHO, qfpW=None):\...
[ "0.7818072", "0.7815741", "0.769006", "0.74989736", "0.72884196", "0.7212081", "0.70323277", "0.69860613", "0.696149", "0.69497114", "0.68953425", "0.68757", "0.6830494", "0.6825216", "0.6821684", "0.6813583", "0.6749268", "0.66490203", "0.66382146", "0.6511029", "0.6493915",...
0.8787394
0
return a copy of the current font face as bold and italic
def zcD9(YKHO): return I4qd(YKHO.name[0:2] + 'IB', YKHO.size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nzpg(YKHO):\n return I4qd(YKHO.name[0:2] + 'B', YKHO.size)", "def BgOT(YKHO):\n RovI()\n Jcbn = eA0O.QFont('Sans Serif', 12, eA0O.QFont.Bold)\n return Jcbn", "def A6cA(YKHO):\n return I4qd(YKHO.name[0:2] + 'I', YKHO.size)", "def BgOT(YKHO):\n RovI()\n Jcbn = eA0O.QFont('Sans Serif', ...
[ "0.6503098", "0.646432", "0.6424326", "0.63638306", "0.6275204", "0.62321734", "0.6177523", "0.6177523", "0.609761", "0.6002326", "0.57882345", "0.57882345", "0.57882345", "0.5769333", "0.57120836", "0.5703144", "0.56701016", "0.5650212", "0.5640166", "0.5640166", "0.5640166"...
0.7222017
0
By default, all fields are simply stripped of leading and trailing whitespace.
def tCel(YKHO, nPrm): return nPrm
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VjK8(Emd4):\n V_D6 = [(H5ew, BWXx) for H5ew, BWXx in Emd4.base_fields.iteritems() if isinstance(BWXx, LRGF)]\n for vXX7, eIGU in V_D6:\n\n def Kp68(iDrk):\n return lambda BWXx: iDrk(BWXx and BWXx.strip())\n petB = Kp68(getattr(eIGU, 'clean'))\n setattr(eIGU, 'clean', petB)...
[ "0.7429343", "0.73146516", "0.7300088", "0.64653206", "0.6434441", "0.63852054", "0.63713187", "0.6226918", "0.616805", "0.6107152", "0.6086296", "0.60737866", "0.60654396", "0.60541695", "0.6051646", "0.6050548", "0.60501707", "0.6029225", "0.59660363", "0.59535", "0.5946430...
0.0
-1
If no faculty is given, the default faculty name, defined in the profile, is returned. Otherwise, the given faculty name is stripped of whitespace.
def q8Nl(YKHO, nPrm): if nPrm is None or nPrm.strip() is '': return z39Z.defaults['faculty'] else: return nPrm
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def APBu(YKHO):\n return YKHO.full_name or YKHO.user.username", "def W0tD(uJjO):\n try:\n g3Gt = Lasp.objects.get(user_id=uJjO)\n except Lasp.DoesNotExist:\n RKD7.exception(f'Could not find UserProfile for id {uJjO}')\n return None\n return g3Gt.name or None", "def xhO_(YKHO):\...
[ "0.59731066", "0.58593225", "0.5853738", "0.5839221", "0.58199376", "0.5815639", "0.5814192", "0.5807551", "0.5753702", "0.5753702", "0.57436156", "0.57262427", "0.57232404", "0.5659521", "0.56554073", "0.565193", "0.5642841", "0.56406915", "0.5618331", "0.560163", "0.558794"...
0.7850038
0
If the date is given, it is a datetime.datetime object. It is AP formatted and returned. If the date is not given, None is returned.
def pbww(YKHO, nPrm): return '%s/%s' % (nPrm.month, nPrm.day)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VVJU(u6Tw: datetime) -> str:\n return str(u6Tw.date()) if u6Tw else F8DU.DEFAULT", "def slWZ(_c1T):\n return _c1T", "def F2p1(YKHO, _c1T):\n return ITS7.strftime('%a, %b %d, %Y', ITS7.strptime(_c1T, '%Y%m%d'))", "def pbww(YKHO, nPrm):\n if YKHO.datetime_formatting == 'rfc-2822':\n retu...
[ "0.7156662", "0.6726074", "0.65687203", "0.6202237", "0.6198814", "0.6147038", "0.6144651", "0.6117162", "0.61095154", "0.60733175", "0.602699", "0.5985386", "0.5980702", "0.5980702", "0.59769696", "0.5960169", "0.5941677", "0.59405905", "0.5933722", "0.5933309", "0.5916234",...
0.5460939
75
Remove trailing zeros (and the trailing decimal point that might be left) from the hours, which is a float.
def kbaZ(YKHO, nPrm): return QMSQ('%f' % nPrm).rstrip('0').rstrip('.')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xHKl(kc_n):\n return kc_n / 24", "def V8or(K4nN):\n NDyv.assert_is_geq(K4nN, 0)\n return '{0:03d}'.format(int(XTiz.round(K4nN)))", "def md6A(jmHs):\n ROt1 = jmHs.split(':')[0]\n if int(ROt1) >= 24:\n nY_a = int(ROt1) % 24\n return jmHs.replace(ROt1, f'{nY_a:02}')\n return jm...
[ "0.60905784", "0.5748976", "0.5713018", "0.5689071", "0.55027246", "0.5477129", "0.54370457", "0.5431138", "0.54268163", "0.5401181", "0.5371905", "0.535964", "0.53177106", "0.5313104", "0.53107476", "0.5304056", "0.5301728", "0.5299804", "0.52817905", "0.5264034", "0.525151"...
0.70133984
0