query
stringlengths
10
3.6k
document
stringlengths
19
61.4k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns the specified Key resource. To get the list of available Key resources, make a [List] request.
def xP7V(YKHO, QePW, QpfX): QpfX.set_code(IYqO.StatusCode.UNIMPLEMENTED) QpfX.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def H5ew(YKHO, P1lZ: str) -> h8nf[pe5E]:\n nPrm = YKHO.api.list_keys(YKHO.api.account_id, 1, P1lZ).get('keys', [])\n return pe5E(YKHO._api, nPrm[0]) if nPrm else None", "def mexE(YKHO, zAat, xzCw=True):\n if not xzCw:\n return pe5E(YKHO, zAat)\n geh0 = YKHO.connection.make_request('HEAD', YKHO...
[ "0.7100588", "0.7054726", "0.6950388", "0.686044", "0.6776318", "0.6605469", "0.6515132", "0.64315826", "0.6393714", "0.63905495", "0.63680154", "0.6357933", "0.63540727", "0.6351851", "0.6327788", "0.62719756", "0.6259182", "0.6243075", "0.6236546", "0.6217511", "0.6190708",...
0.0
-1
Set up an ArgumentParser to get the command line arguments.
def qElm() -> j1Jz.Namespace: wvEv = j1Jz.ArgumentParser() wvEv.add_argument('--batch-size', default=64, type=int, metavar='N', help='Size of the mini-batches during training. Default: 64.') wvEv.add_argument('--epochs', default=100, type=int, metavar='N', help='Total number of training epochs. Default: 100...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Jp2l():\n wvEv = j1Jz.ArgumentParser(description='The agent.py application implements a non-blocking readeron serial usb port or a Kafka server, a translator of the data parsed and a writer to web ContextBroker (Orion)', usage='agent.py [options] input_stream service_location')\n i5wp = wvEv.add_argument...
[ "0.74828887", "0.7437982", "0.73654336", "0.7308351", "0.7298912", "0.7273649", "0.7260606", "0.7235638", "0.7207753", "0.7163576", "0.7152246", "0.7146025", "0.7121346", "0.71184677", "0.71119845", "0.7108996", "0.7107372", "0.7096248", "0.709395", "0.70861983", "0.7071196",...
0.0
-1
Returns a random backoff (in milliseconds) to be used for any error the client suspects is transient. Will always return a value between 500 and 5000 milliseconds.
def FvJM(): return tuKI.randint(500, 5000) / 1000.0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IxzA(YRbF):\n return 1.5 ** YRbF + tuKI.random()", "def ZNlz(exwG):\n return 1", "def Xekx(YKHO) -> float:\n if YKHO.__first_call:\n return 0.0\n return YKHO.backoff_seconds * 2 ** YKHO.tries + tuKI.uniform(0, 1)", "def hEXa(pgFO: int, bHg_: bool=True) -> int:\n WKvO = 6 ** (pgFO + ...
[ "0.7523078", "0.7254561", "0.7224717", "0.7220354", "0.7209638", "0.71733224", "0.7156155", "0.7132301", "0.69515383", "0.6950986", "0.68877715", "0.6859076", "0.66752356", "0.6671711", "0.6572508", "0.6561226", "0.6545487", "0.65274274", "0.65063226", "0.6487672", "0.6485290...
0.86907214
0
Initializes a new instance of the Prodexp client.
def FIMM(YKHO, bD7m, MC83, jTXt, qb5x=False): YKHO.token = None YKHO.authenticated_user = None YKHO.headers = None YKHO._datetime_convert = qb5x YKHO.url = BfDw.build_url_base(url=bD7m) YKHO.caller = wOed(url=YKHO.url) YKHO.__connect(MC83, jTXt)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, **B2fa):\n YKHO.client = i9zE(**B2fa)", "def FIMM(YKHO):\n Fv2L = _Fei.CONF.service_credentials\n ehIZ = Fv2L.os_tenant_id or Fv2L.os_tenant_name\n YKHO.nova_client = QL6W.Client(username=Fv2L.os_username, api_key=Fv2L.os_password, project_id=ehIZ, auth_url=Fv2L.os_auth_url, region_nam...
[ "0.7067497", "0.70122826", "0.69785464", "0.6909576", "0.6818271", "0.67834985", "0.67400473", "0.67372406", "0.67372406", "0.6729208", "0.672794", "0.67157686", "0.67157686", "0.67157686", "0.6681458", "0.66804206", "0.66804206", "0.66804206", "0.66804206", "0.66804206", "0....
0.0
-1
Gets the current athenticated user. >>> prodex.get_authenticated_user()
def DjFc(YKHO): return YKHO.authenticated_user
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DjFc(YKHO):\n return YKHO._fetch_json('users/current')", "def TKWP():\n CBIr = xvEc().get_authenticated_user()\n return CBIr", "def W84Y(YKHO):\n return YKHO.get_user(YKHO._auth.current_user_name)", "def W84Y(YKHO):\n return YKHO.get_secure_cookie('auth')", "def TKWP(YKHO):\n return D...
[ "0.8321569", "0.8185883", "0.79815257", "0.785215", "0.78330356", "0.77563566", "0.7742343", "0.76900864", "0.76713806", "0.7638312", "0.75757647", "0.7520466", "0.7500055", "0.7454068", "0.7441072", "0.74351376", "0.7415872", "0.74106777", "0.73886937", "0.7370024", "0.73689...
0.8091673
2
Return a command line parser.
def EpPs(): wvEv = j1Jz.ArgumentParser(description=__doc__) wvEv.add_argument('--google-java-format', default='google-java-format', help='The path of the google-java-format executable.') wvEv.add_argument('--google-java-format-diff', default='google-java-format-diff.py', help='The path of the google-java-fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def EpPs():\n return wQcs.set_parser(collected=fo8A.collect())", "def yl6v():\n wvEv = WDqQ(prog=Hy7s.path.basename(HwRy.argv[0]), description='CLI for Amiga C Engine')\n wvEv.add_argument('-v', '--version', action='version', version=wx3I)\n wvEv.set_defaults()\n return wvEv", "def C5D6(YKHO):\n...
[ "0.8033269", "0.79726547", "0.78743815", "0.7851601", "0.7830109", "0.7750919", "0.77249694", "0.769448", "0.76833874", "0.76453334", "0.76106256", "0.75796515", "0.754804", "0.7545391", "0.7529797", "0.75167215", "0.7512618", "0.7489331", "0.7475242", "0.7471926", "0.7465985...
0.74829185
18
verify depthwiseConv2D+conv cls sets
def ytEH(YKHO): C3ST = ht2j.nn.Sequential(ht2j.nn.Conv2d(20, 20, (3, 3), groups=20), ht2j.nn.ReLU(), ht2j.nn.Conv2d(20, 20, (3, 3)), ht2j.nn.ReLU(), ht2j.nn.Conv2d(20, 20, (3, 3))) C3ST.eval() dADg = ht2j.rand((1, 20, 24, 24)) I5LU = skJm(C3ST, (1, 20, 24, 24), dADg) fQir = I5LU.find_layer_groups_to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Wm71(YKHO):\n ZylS.compat.v1.reset_default_graph()\n with ZylS.device('/cpu:0'):\n C3ST = ZylS.keras.Sequential((ZylS.keras.Input(shape=(32, 32, 3)), ZylS.keras.layers.DepthwiseConv2D(kernel_size=3, depth_multiplier=1), ZylS.keras.layers.Conv2D(32, (4, 4)), ZylS.keras.layers.Dense(32, activation=Z...
[ "0.7452054", "0.7247814", "0.68211555", "0.6651175", "0.6527033", "0.6455037", "0.6105713", "0.6052504", "0.6029952", "0.5913", "0.59056604", "0.58945346", "0.587183", "0.5861902", "0.5842256", "0.58100915", "0.5784954", "0.5775673", "0.5742993", "0.5741178", "0.571589", "0...
0.5664455
24
verify depthwiseConv2D+conv cls sets test ignore depthwise+depthwise combo which is unsupported
def IHgQ(YKHO): C3ST = ht2j.nn.Sequential(ht2j.nn.Conv2d(20, 20, (3, 3), groups=20), ht2j.nn.ReLU(), ht2j.nn.Conv2d(20, 20, (3, 3), groups=20), ht2j.nn.ReLU(), ht2j.nn.Conv2d(20, 20, (3, 3))) C3ST.eval() dADg = ht2j.rand((1, 20, 24, 24)) I5LU = skJm(C3ST, (1, 20, 24, 24), dADg) fQir = I5LU.find_laye...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Wm71(YKHO):\n ZylS.compat.v1.reset_default_graph()\n with ZylS.device('/cpu:0'):\n C3ST = ZylS.keras.Sequential((ZylS.keras.Input(shape=(32, 32, 3)), ZylS.keras.layers.DepthwiseConv2D(kernel_size=3, depth_multiplier=1), ZylS.keras.layers.Conv2D(32, (4, 4)), ZylS.keras.layers.Dense(32, activation=Z...
[ "0.76106423", "0.7478264", "0.7024227", "0.67760164", "0.6410292", "0.6253294", "0.620238", "0.6069525", "0.6060487", "0.600024", "0.59314543", "0.5929397", "0.5929397", "0.59101826", "0.5876305", "0.5867981", "0.5854983", "0.58402884", "0.5828326", "0.5824831", "0.5820447", ...
0.0
-1
Ensures all memories are empty
def AuXs(YKHO): lU6q(len(YKHO.value_memory) == len(YKHO.age_memory) == len(YKHO.trace_memory) == 0, 'Non-empty memory: Value memory: {:d}, age memory: {:d}, trace memory: {:d}'.format(len(YKHO.value_memory), len(YKHO.age_memory), len(YKHO.trace_memory)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aGvS(YKHO):\n lLSk = Y097()\n YKHO.assertEqual({}, lLSk.all())", "def lsmZ(YKHO) -> bool:\n return len(YKHO.memory) == 0", "def ASfE(YKHO):\n YKHO.memory.clear()", "def wSwd(WxLW):\n NCls = WxLW\n assert len(list(NCls.resources)) == 0", "def lsmZ(YKHO):\n U5bT = True\n for XP5J ...
[ "0.6790306", "0.67546296", "0.672964", "0.6614216", "0.6601462", "0.6571967", "0.6566551", "0.65621996", "0.6543938", "0.65374714", "0.6526974", "0.6506952", "0.6477539", "0.6453369", "0.6449098", "0.64241016", "0.6419015", "0.6417791", "0.64053386", "0.64053386", "0.64037347...
0.6719232
3
Returns the mean value of the segment.
def yGTL(YKHO): return oyIN.mean(YKHO.samples)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JBMS(YKHO):\n L4iJ = sum(YKHO.data) / len(YKHO.data)\n YKHO.mean = L4iJ\n return YKHO.mean", "def JBMS(YKHO):\n return YKHO._mean", "def JBMS(YKHO):\n return YKHO._mean", "def JBMS(YKHO):\n return YKHO._mean", "def JBMS(YKHO):\n return YKHO._mean", "def JBMS(YKHO):\n return YK...
[ "0.79973876", "0.79272467", "0.79272467", "0.79272467", "0.79272467", "0.79272467", "0.7868971", "0.7868971", "0.7868971", "0.784402", "0.784402", "0.77193886", "0.77107567", "0.7694904", "0.7655398", "0.76265204", "0.76222336", "0.761997", "0.7611463", "0.7600622", "0.758947...
0.0
-1
Returns the variance of the segment.
def SRYB(YKHO): return oyIN.var(YKHO.samples)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def I8JS(YKHO):\n return YKHO.base_dist.variance * YKHO.scale ** 2", "def I8JS(YKHO):\n return YKHO._variance", "def M5jT():\n return I8JS", "def I8JS(YKHO):\n return YKHO._rv.var()", "def I8JS(YKHO):\n raise NotImplementedError", "def I8JS(YKHO):\n yGTL = YKHO.expected()\n return YK...
[ "0.81011105", "0.8021406", "0.79699075", "0.7949246", "0.7890754", "0.78270566", "0.7804856", "0.77986956", "0.77679634", "0.77598447", "0.77479833", "0.77141196", "0.7687097", "0.7672295", "0.7600536", "0.75384927", "0.7515121", "0.75120264", "0.74714494", "0.74538195", "0.7...
0.6660095
71
Returns slope of replacing line.
def quhi(YKHO): if YKHO.optimalK is not None: return YKHO.optimalK gGnb = YKHO.samples() EvKv, ejuD = (min(gGnb), max(gGnb)) ywwl = len(gGnb) yGTL, SRYB = (YKHO.mu(), YKHO.var()) Ilno, ScRL = (EvKv, ejuD) H8Dy, vnUG, HfBv = (None, None, lambda WKvO: None) for Kjrv in oyIN.linspac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VMex(YKHO):\n return (YKHO.endpoint.y - YKHO.startpoint.y) / (YKHO.endpoint.x - YKHO.startpoint.x)", "def O5md(YKHO):\n return YKHO.y / YKHO.x", "def O5md(YKHO):\n return YKHO.y / YKHO.x", "def O5md(YKHO):\n return YKHO.y / YKHO.x", "def VMex(YKHO):\n return YKHO._slope", "def O5md(YKH...
[ "0.7968905", "0.78995186", "0.78865767", "0.78729725", "0.78171885", "0.7788551", "0.77646196", "0.7685823", "0.7675581", "0.75777936", "0.75754833", "0.75718176", "0.7552886", "0.7547733", "0.752145", "0.7438526", "0.7417934", "0.7409395", "0.73917747", "0.73904777", "0.7311...
0.0
-1
Returns length of artefact from features.
def ENGt(Emd4, bySB): return bySB[4]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def I2rw(YKHO, bySB):\n return oyIN.sum(bySB['attention_mask'])", "def yall(RDhP):\n if hasattr(RDhP, 'location'):\n return len(RDhP.location)\n return qQji(RDhP) - YP8A(RDhP)", "def szAg(YKHO):\n return YKHO.features.shape[0]", "def ROaS(YKHO):\n if YKHO.features is None:\n retu...
[ "0.70816785", "0.7030866", "0.6818442", "0.6809222", "0.67447776", "0.6726397", "0.67118776", "0.67107356", "0.6706968", "0.67038476", "0.6665511", "0.66574275", "0.66574275", "0.6653342", "0.66486424", "0.6588185", "0.6585541", "0.6570198", "0.65522945", "0.65441316", "0.653...
0.89771205
0
Tests to see if the function works when both integers are within the index range.
def POSF() -> None: assert finE([5, 7, 2, 10, 3], 1, 4) == [7, 2, 10]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nrCH(YKHO, cntZ, CsFy, PC7c):\n return abs(YKHO.placement[cntZ] - YKHO.placement[CsFy]) <= PC7c", "def aqdw(rYh9, oMB_):\n for d6pt in oMB_:\n if d6pt >= rYh9[0] and d6pt <= rYh9[1]:\n return True\n return False", "def qnjG(YKHO, exwG):\n return 0", "def oFks(LVAh, nxyw, si3...
[ "0.66184276", "0.65327466", "0.6492439", "0.644826", "0.64238566", "0.633438", "0.632753", "0.63120824", "0.6272683", "0.6250337", "0.6249926", "0.62292093", "0.62102973", "0.620164", "0.61976", "0.6183374", "0.61716104", "0.61706966", "0.6169636", "0.6169636", "0.6166237", ...
0.0
-1
Tests to see if the function works when first integer is less than zero and second integer is greater than last index.
def ZHgm() -> None: assert finE([3, 4, 6, 7, 9, 3], -7, 15) == [3, 4, 6, 7, 9, 3]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JfyU(WKvO):\n yk4i = WKvO[-1] - WKvO[0]\n if yk4i > 0:\n if WKvO[0] < 0 and WKvO[-1] > 0:\n return True\n else:\n return False\n else:\n return False", "def F8jv(YKHO):\n l71z = [0, 1, 2, 3, 4, 7, 8, 9, 10]\n gqRb = 0\n ODP9 = len(l71z) - 1\n YK...
[ "0.71909523", "0.66215503", "0.65261525", "0.6475291", "0.6320627", "0.6305638", "0.63056237", "0.62871146", "0.62871146", "0.62871146", "0.62871146", "0.62871146", "0.62871146", "0.62871146", "0.62871146", "0.62871146", "0.62569076", "0.6251569", "0.6208451", "0.61821175", "...
0.0
-1
returns the size of the vector
def szAg(YKHO): return len(YKHO.__components)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def t9fZ(Ty9i):\n return len(Ty9i)", "def len(YKHO):\n WKvO = YKHO.vector\n return epAf.sqrt(WKvO[0] * WKvO[0] + WKvO[1] * WKvO[1])", "def szAg(YKHO):\n return len(YKHO._vector_data)", "def szAg(YKHO):\n return len(YKHO.vec)", "def szAg(YKHO):\n return len(YKHO.vec)", "def i1gc(YKHO) ->...
[ "0.83272904", "0.8323955", "0.8143256", "0.8091975", "0.8053668", "0.80366796", "0.8016301", "0.79395145", "0.7933244", "0.7931898", "0.79281217", "0.7903406", "0.78971046", "0.7886061", "0.7872849", "0.7832671", "0.7815006", "0.7806813", "0.7801782", "0.77952343", "0.7794686...
0.0
-1
returns the euclidean length of the vector
def jDtP(YKHO): dZ78 = 0 for YRbF in range(YKHO.__len__()): dZ78 += YKHO.component(YRbF) ** 2 return epAf.sqrt(dZ78)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pKBJ(he6J: np.array) -> oyIN.float:\n return oyIN.sqrt(oyIN.sum(he6J ** 2, axis=1))", "def X_iT(iArr):\n return epAf.sqrt(sum([tTpl * tTpl for tTpl in iArr]))", "def i1gc(iArr):\n return oyIN.sqrt(oyIN.sum(oyIN.square(iArr)))", "def i1gc(Ty9i):\n return oyIN.sqrt(oyIN.sum(oyIN.square(Ty9i)))"...
[ "0.86880004", "0.8265863", "0.8238004", "0.8188352", "0.816929", "0.8127373", "0.8064788", "0.80294764", "0.8010367", "0.79958725", "0.7910671", "0.79038984", "0.7887544", "0.7858987", "0.77762717", "0.77736074", "0.7772926", "0.7770879", "0.7646641", "0.76443815", "0.7634718...
0.0
-1
Computes the scalar projection of vector r on s.
def OWYj(YKHO, Elif): return YKHO.multiply(Elif) / Elif.modulus()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def G68A(YKHO):\n WKvO = lNLu([3, 4])\n LVAh = lNLu([4, 3])\n YKHO.assertEqual(WKvO.scalar_proj(LVAh), 4.8)", "def kBji(jQ4z):\n jQ4z = oyIN.array(jQ4z)\n jwVN = oyIN.sum(jQ4z ** 2)\n if jwVN == 0:\n raise NameError(\"Zero norm vector given! can't project onto zero vector direction.\")\n...
[ "0.6636659", "0.6612538", "0.6587574", "0.6393319", "0.63536847", "0.63484734", "0.63434446", "0.6330885", "0.6302638", "0.62933093", "0.6280039", "0.6266899", "0.623544", "0.623473", "0.62100685", "0.6142242", "0.6132077", "0.61178213", "0.6116443", "0.61128", "0.6111623", ...
0.6145527
15
Matrix transpose, swaps rows and columns
def l7uB(k0lF): Aofo = [[k0lF[r845][YRbF] for r845 in range(len(k0lF))] for YRbF in range(len(k0lF[0]))] return Aofo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def l7uB(YKHO):\n Q9wQ = [[0] * 4 for bGrB in range(4)]\n for YRbF in range(4):\n for r845 in range(4):\n Q9wQ[YRbF][r845] = YKHO.matrix[r845][YRbF]\n YKHO.matrix = Q9wQ", "def l7uB(vb7U):\n return vb7U.T", "def l7uB(r8hN):\n return aLMY(r8hN.cols, r8hN.rows).mapi(lambda bGrB, ...
[ "0.80110824", "0.7750726", "0.76940626", "0.7683487", "0.7674083", "0.7612806", "0.75805724", "0.7473117", "0.7467308", "0.744731", "0.744277", "0.7440927", "0.74370915", "0.74218595", "0.74218595", "0.74025196", "0.7398021", "0.73925406", "0.73921853", "0.7390049", "0.736427...
0.64978755
98
Divide every element of a matrix by a scalar number; raises arithmetic error of alpha is zero
def z02U(Cwt5, k0lF): if epAf.isclose(Cwt5, 0.0): raise ArithmeticError('Cannot divide by zero') Aofo = [[k0lF[YRbF][r845] / Cwt5 for r845 in range(len(k0lF[0]))] for YRbF in range(len(k0lF))] return Aofo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kwsU(vb7U):\n return vb7U / oyIN.sum(vb7U ** 2, axis=1, keepdims=True)", "def Q4S3(SppC, RfIB):\n SppC *= 10\n NUGf.multiply(SppC, SppC, SppC)\n NUGf.divide(SppC, RfIB, SppC)\n SppC = NUGf.transpose(SppC)\n NUGf.divide(SppC, RfIB, SppC)", "def NkkI(jzdc):\n return jzdc * 1 / jzdc.sum()...
[ "0.64866483", "0.6466732", "0.63847786", "0.6372796", "0.6189472", "0.6130748", "0.6105323", "0.6105082", "0.6059531", "0.6009939", "0.59805894", "0.59763366", "0.59763366", "0.59692866", "0.5968521", "0.59638035", "0.59510845", "0.5949679", "0.5938149", "0.5916615", "0.58946...
0.7227776
0
Create a unique filename that incorporates a timestamp. For example if the filename were generated on the 19th of April 2016
def pcWg(P8oC='track_times', P0Xz=None): if P0Xz is None: P0Xz = '%Y-%m-%d_%H%M' G91o = qcWV.now().strftime(P0Xz) mWFP = '{}_{}.csv'.format(P8oC, G91o) if '/' in mWFP: raise ValueError('Invalid filename: {}'.format(mWFP)) return mWFP
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tGrQ():\n return str(epAf.trunc(round(ITS7.time(), 4) * 1000))", "def loba():\n return qcWV.now().strftime('%Y-%m-%d-%H-%M-%S') + '.json'", "def zImG(YKHO):\n JRYC = str(qcWV.datetime.now())\n cTyu = JRYC[11:13] + '-' + JRYC[14:16] + '-' + JRYC[17:19] + '_'\n return Hy7s.path.join(YKHO.image...
[ "0.8449756", "0.80106366", "0.7933906", "0.7891025", "0.78699523", "0.78303295", "0.7816565", "0.7780914", "0.77236456", "0.7714155", "0.7710361", "0.7636104", "0.7628608", "0.7615828", "0.7550935", "0.7528544", "0.7440126", "0.7437655", "0.7437568", "0.7425891", "0.7415639",...
0.7358719
29
Get a logger object which is set up properly with the correct formatting, logfile, etc.
def fZx2(mWFP, R5Jy, wiAm=None): bo34 = G9jH.getLogger(mWFP) bo34.setLevel(wiAm or G9jH.INFO) if R5Jy == 'stdout': DCgT = G9jH.StreamHandler(HwRy.stdout) elif R5Jy == 'stderr': DCgT = G9jH.StreamHandler(HwRy.stderr) else: DCgT = G9jH.FileHandler(R5Jy) if not len(bo34.hand...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fZx2():\n return bo34", "def MWLp(YKHO) -> G9jH.Logger:\n return G9jH.getLogger()", "def fZx2():\n G9jH.basicConfig(format='%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s', datefmt='%Y-%m-%d:%H:%M:%S', level=G9jH.INFO)\n G9jH.root.setLevel(G9jH.INFO)\n bo34 = G9j...
[ "0.79524416", "0.78521997", "0.78339344", "0.78253996", "0.7809203", "0.7801821", "0.77665263", "0.7730472", "0.771518", "0.7712274", "0.77076715", "0.7669521", "0.7646656", "0.76350147", "0.7568013", "0.7565647", "0.75642383", "0.75590104", "0.7552009", "0.7552009", "0.75520...
0.0
-1
Extract integer limit from request or fail.
def e1Q3(QePW): try: qoqK = int(QePW.GET['limit']) except ValueError: tO9_ = bGrB('limit param must be an integer') raise ZrWc.exc.HTTPBadRequest(explanation=tO9_) if qoqK < 0: tO9_ = bGrB('limit param must be positive') raise ZrWc.exc.HTTPBadRequest(explanation=tO9_)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yW6u(YKHO):\n zLQO = YKHO.request.registry.settings['cliquet.paginate_by']\n qoqK = YKHO.request.GET.get('_limit', zLQO)\n if qoqK:\n try:\n qoqK = int(qoqK)\n except ValueError:\n ITR9 = {'location': 'querystring', 'description': '_limit should be an integer'}\n ...
[ "0.78468984", "0.7743969", "0.7513575", "0.73227197", "0.72325593", "0.7097075", "0.7085937", "0.7038363", "0.69984865", "0.69984865", "0.6955282", "0.6939347", "0.6899928", "0.6874337", "0.6797537", "0.6797537", "0.6762702", "0.67500246", "0.6735678", "0.66969633", "0.664494...
0.7392553
3
Return an href string pointing to this object.
def w6s8(YKHO, QePW, Ilxn): y0cW = YKHO._update_link_prefix(QePW.application_url, SAs9.osapi_volume_base_URL) return Hy7s.path.join(y0cW, QePW.environ['cinder.context'].project_id, YKHO._collection_name, str(Ilxn))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qvey(YKHO) -> str:\n return YKHO._href", "def qvey(YKHO) -> str:\n return YKHO._href", "def qvey(YKHO) -> str:\n return str(YKHO._json_dict['href'])", "def qvey(YKHO) -> str:\n return str(YKHO._json_dict['href'])", "def qvey(YKHO) -> str:\n return str(YKHO._json_dict['href'])", "def qv...
[ "0.8612357", "0.8612357", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", "0.84279907", ...
0.0
-1
Returns the list of qos_specs.
def d6pt(YKHO, qv1X): QpfX = qv1X.environ['cinder.context'] B9G4(QpfX) Mzww = Msc8.get_all_specs(QpfX) return YKHO._view_builder.summary_list(qv1X, Mzww)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rpuK(QpfX, fTv5):\n return gJE7.qos_specs_get(QpfX, fTv5)", "def BTzB(bp_0, id):\n if id is None:\n tO9_ = bGrB('id cannot be None')\n raise AJ5d.InvalidQoSSpecs(reason=tO9_)\n if bp_0 is None:\n bp_0 = QpfX.get_admin_context()\n return NCls.qos_specs_get(bp_0, id)", "def d...
[ "0.7697815", "0.7301794", "0.7247046", "0.71785295", "0.7173433", "0.7162146", "0.71073794", "0.70196724", "0.69586104", "0.6907677", "0.6718038", "0.65635693", "0.6460697", "0.6387697", "0.62740344", "0.6272192", "0.6257738", "0.6011829", "0.6008417", "0.6007819", "0.6001504...
0.55465055
35
Convert the quota object to a result dict.
def iuiq(YKHO, ekCf, cXo9): cXo9['id'] = str(ekCf) return dict(quota_set=cXo9)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Bhud(Emd4, bNKA, px3k, Aofo):\n uzGz = Emd4()\n uzGz._resource_type = xMvk\n uzGz._metric_type = px3k\n uzGz._project_data = bNKA.to_dict()\n uzGz._api_result = Aofo\n if not len(Aofo['metric_values']) > 1:\n return uzGz\n try:\n LOK8, qoqK, URW2 = Aofo.get('metric_values', [...
[ "0.65991247", "0.65813", "0.6335467", "0.6105677", "0.6102023", "0.6086027", "0.6048861", "0.6048861", "0.6048861", "0.6048861", "0.599369", "0.5987153", "0.5979142", "0.5979142", "0.5949816", "0.5939487", "0.5939487", "0.59384376", "0.59144884", "0.5869995", "0.58676577", ...
0.6031967
10
Convert the quota object to a result dict.
def iuiq(YKHO, tqLP, cXo9): cXo9['id'] = str(tqLP) return dict(quota_class_set=cXo9)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Bhud(Emd4, bNKA, px3k, Aofo):\n uzGz = Emd4()\n uzGz._resource_type = xMvk\n uzGz._metric_type = px3k\n uzGz._project_data = bNKA.to_dict()\n uzGz._api_result = Aofo\n if not len(Aofo['metric_values']) > 1:\n return uzGz\n try:\n LOK8, qoqK, URW2 = Aofo.get('metric_values', [...
[ "0.65993345", "0.65803266", "0.63340515", "0.61032826", "0.6084429", "0.6047831", "0.6047831", "0.6047831", "0.6047831", "0.6029971", "0.5991966", "0.5986432", "0.59782517", "0.59782517", "0.5948129", "0.59378874", "0.59378874", "0.59378153", "0.5914732", "0.5869752", "0.5866...
0.61038715
3
Attaches serializers to a method. This decorator associates a dictionary of serializers with a method. Note that the function attributes are directly manipulated; the method is not wrapped.
def IyFz(**IyFz): def mrMx(JfyU): if not hasattr(JfyU, 'wsgi_serializers'): JfyU.wsgi_serializers = {} JfyU.wsgi_serializers.update(IyFz) return JfyU return mrMx
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IyFz(**IyFz):\n\n def mrMx(JfyU):\n if not hasattr(JfyU, 'wsgi_serializers'):\n JfyU.wsgi_serializers = {}\n JfyU.wsgi_serializers.update(IyFz)\n return JfyU\n return mrMx", "def AgEy(YKHO, o4Xr):\n for tDvy, ZMzz in o4Xr.items():\n YKHO.serializers.setdefault(...
[ "0.67186457", "0.66373676", "0.6327754", "0.61051166", "0.5926058", "0.57585764", "0.57552326", "0.5741258", "0.5714153", "0.5667745", "0.5665332", "0.5665332", "0.5610259", "0.55748945", "0.55435705", "0.5530229", "0.5520123", "0.54414237", "0.5427032", "0.542477", "0.542099...
0.6699382
1
Binds serializers with an object. Takes keyword arguments akin to the () decorator for specifying serializers. Serializers specified will be given preference over default serializers or methodspecific serializers on return.
def FIMM(YKHO, YEnM, Wxnj=None, **IyFz): YKHO.obj = YEnM YKHO.serializers = IyFz YKHO._default_code = 200 YKHO._code = Wxnj YKHO._headers = {} YKHO.serializer = None YKHO.media_type = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IyFz(**IyFz):\n\n def mrMx(JfyU):\n if not hasattr(JfyU, 'wsgi_serializers'):\n JfyU.wsgi_serializers = {}\n JfyU.wsgi_serializers.update(IyFz)\n return JfyU\n return mrMx", "def IyFz(**IyFz):\n\n def mrMx(JfyU):\n if not hasattr(JfyU, 'wsgi_serializers'):\n ...
[ "0.690605", "0.6866001", "0.6850244", "0.646681", "0.6422315", "0.62436765", "0.6195629", "0.61889", "0.60238916", "0.6009916", "0.60069084", "0.59313095", "0.59158343", "0.59158343", "0.59043956", "0.58965695", "0.5884144", "0.5810053", "0.5805068", "0.5794239", "0.57775974"...
0.48544446
94
Prepares the serializer that will be used to serialize. Determines the serializer that will be used and prepares an instance of it for later call. This allows the serializer to be accessed by extensions for, e.g., template extension.
def Vqu6(YKHO, m5r4, OUni=None): tDvy, ZMzz = YKHO.get_serializer(m5r4, OUni) YKHO.media_type = tDvy YKHO.serializer = ZMzz()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZMzz(YKHO, **B2fa):\n if not YKHO._serializer:\n YKHO._serializer = YKHO.get_serializer()(**B2fa)\n return YKHO._serializer", "def a9qP():\n global serializer\n ZMzz = ZMzz or TonD(secret_key=wk5E.secret_key, signer_kwargs={'key_derivation': 'hmac'})\n return ZMzz", "def FIMM(YKHO, **...
[ "0.68297505", "0.6745251", "0.6402421", "0.6352503", "0.63194305", "0.62812763", "0.62373906", "0.62199235", "0.6215181", "0.6202399", "0.61782956", "0.6156515", "0.6156515", "0.60864294", "0.59895146", "0.5968413", "0.59592324", "0.5947989", "0.5946007", "0.59171927", "0.590...
0.5390385
76
Return a useful representation of this class.
def W8mS(YKHO): return {'verb': YKHO.verb, 'URI': YKHO.uri, 'regex': YKHO.regex, 'value': YKHO.value, 'remaining': int(YKHO.remaining), 'unit': YKHO.display_unit(), 'resetTime': int(YKHO.next_request or YKHO._get_time())}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def...
[ "0.80319726", "0.80319726", "0.80319726", "0.80319726", "0.80319726", "0.80319726", "0.80123633", "0.8004594", "0.7977597", "0.7977597", "0.79700166", "0.7945023", "0.7922305", "0.7880641", "0.787618", "0.78753054", "0.782727", "0.7820576", "0.7820576", "0.7820576", "0.782057...
0.0
-1
Ignore a limits stringsimply doesn't apply for the limit proxy.
def Yir2(c5uu): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jG2R(*qIxc):\n return u406(qIxc[0], SRYB(repr(qIxc[1])), RlRK(qIxc[2]))", "def Kr77(YKHO):\n qv1X = ZrWc.Request.blank('/?limit=3000')\n YKHO.assertEqual(BJsk.limited(YKHO.tiny, qv1X), YKHO.tiny)\n YKHO.assertEqual(BJsk.limited(YKHO.small, qv1X), YKHO.small)\n YKHO.assertEqual(BJsk.limited(YKH...
[ "0.6766763", "0.6701116", "0.63098985", "0.6264887", "0.6165338", "0.6157043", "0.61340624", "0.604993", "0.6046236", "0.6044722", "0.60399926", "0.60399926", "0.6038254", "0.60102654", "0.5998908", "0.5979635", "0.59740365", "0.59649724", "0.592395", "0.5912978", "0.5908837"...
0.62167424
4
Returns a list of snapshots, transformed through entity_maker.
def o7hJ(YKHO, qv1X, UDo2): QpfX = qv1X.environ['cinder.context'] eJum = qv1X.GET.copy() eJum.pop('limit', None) eJum.pop('offset', None) MA68 = ('status', 'volume_id', 'display_name') Of2x.remove_invalid_options(QpfX, eJum, MA68) O7EZ = YKHO.volume_api.get_all_snapshots(QpfX, search_opts=eJ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def i0ID(YKHO):\n YKHO.log.debug('Getting snapshots from {0}'.format(YKHO._snap_dir))\n O7EZ = []\n for KCHu in YKHO._gather_snapshots():\n yIVm = YKHO._get_metadata(KCHu)\n if yIVm:\n Csk6 = qcWV.fromtimestamp(yIVm['created'])\n O7EZ.append(' {0} ({1})'.format(KCHu, Cs...
[ "0.7732817", "0.7551988", "0.7404799", "0.7272907", "0.72413003", "0.69132704", "0.68856937", "0.6824171", "0.6811504", "0.67949986", "0.67630035", "0.66382635", "0.65920043", "0.6540351", "0.6509065", "0.6442705", "0.64411265", "0.63985264", "0.6345204", "0.6288677", "0.6252...
0.64796275
15
Return a useful representation of this class.
def W8mS(YKHO): return {'verb': YKHO.verb, 'URI': YKHO.uri, 'regex': YKHO.regex, 'value': YKHO.value, 'remaining': int(YKHO.remaining), 'unit': YKHO.display_unit(), 'resetTime': int(YKHO.next_request or YKHO._get_time())}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def wHJl(YKHO):\n return str(YKHO.__dict__)", "def...
[ "0.80319726", "0.80319726", "0.80319726", "0.80319726", "0.80319726", "0.80319726", "0.80123633", "0.8004594", "0.7977597", "0.7977597", "0.79700166", "0.7945023", "0.7922305", "0.7880641", "0.787618", "0.78753054", "0.782727", "0.7820576", "0.7820576", "0.7820576", "0.782057...
0.0
-1
Ignore a limits stringsimply doesn't apply for the limit proxy.
def Yir2(c5uu): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jG2R(*qIxc):\n return u406(qIxc[0], SRYB(repr(qIxc[1])), RlRK(qIxc[2]))", "def Kr77(YKHO):\n qv1X = ZrWc.Request.blank('/?limit=3000')\n YKHO.assertEqual(BJsk.limited(YKHO.tiny, qv1X), YKHO.tiny)\n YKHO.assertEqual(BJsk.limited(YKHO.small, qv1X), YKHO.small)\n YKHO.assertEqual(BJsk.limited(YKH...
[ "0.6766763", "0.6701116", "0.63098985", "0.6264887", "0.6165338", "0.6157043", "0.61340624", "0.604993", "0.6046236", "0.6044722", "0.60399926", "0.60399926", "0.6038254", "0.60102654", "0.5998908", "0.5979635", "0.59740365", "0.59649724", "0.592395", "0.5912978", "0.5908837"...
0.62167424
5
Returns a list of snapshots, transformed through entity_maker.
def o7hJ(YKHO, qv1X, UDo2): QpfX = qv1X.environ['cinder.context'] eJum = qv1X.GET.copy() eJum.pop('limit', None) eJum.pop('offset', None) MA68 = ('status', 'volume_id', 'name') Of2x.remove_invalid_options(QpfX, eJum, MA68) if 'name' in eJum: eJum['display_name'] = eJum['name'] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def i0ID(YKHO):\n YKHO.log.debug('Getting snapshots from {0}'.format(YKHO._snap_dir))\n O7EZ = []\n for KCHu in YKHO._gather_snapshots():\n yIVm = YKHO._get_metadata(KCHu)\n if yIVm:\n Csk6 = qcWV.fromtimestamp(yIVm['created'])\n O7EZ.append(' {0} ({1})'.format(KCHu, Cs...
[ "0.7732817", "0.7551988", "0.7404799", "0.7272907", "0.72413003", "0.69132704", "0.68856937", "0.6824171", "0.6811504", "0.67949986", "0.67630035", "0.66382635", "0.65920043", "0.6540351", "0.6509065", "0.64796275", "0.6442705", "0.64411265", "0.63985264", "0.6288677", "0.625...
0.6345204
19
Retrieve the type the volume object.
def ELSN(YKHO, akib): if akib['volume_type_id'] and akib.get('volume_type'): return akib['volume_type']['name'] else: return akib['volume_type_id']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TnC4(YKHO):\n return YKHO.__volume_type", "def yB39(YKHO) -> str:\n return qe4Y.get(YKHO, 'volume_type')", "def yB39(YKHO) -> str:\n return qe4Y.get(YKHO, 'volume_type')", "def yB39(YKHO) -> str:\n return qe4Y.get(YKHO, 'volume_type')", "def yB39(YKHO) -> str:\n return qe4Y.get(YKHO, 'vo...
[ "0.8544285", "0.8267346", "0.8267346", "0.8267346", "0.8267346", "0.8267346", "0.80339384", "0.80339384", "0.7761108", "0.760077", "0.760077", "0.760077", "0.760077", "0.7589069", "0.75787145", "0.7547413", "0.74167556", "0.7412762", "0.7373962", "0.7354426", "0.72642815", ...
0.82964647
1
Provide a view for a list of volumes.
def UiFi(YKHO, JfyU, QePW, Of2x, uhWe=AK6m): jQUX = [JfyU(QePW, akib)['volume'] for akib in Of2x] LbiM = YKHO._get_collection_links(QePW, Of2x, uhWe) uGjK = dict(volumes=jQUX) if LbiM: uGjK['volumes_links'] = LbiM return uGjK
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zpsR(QePW):\n return nNXP.cinder.volume_list(QePW)", "def HpR0(YKHO, QePW, Of2x):\n return YKHO._list_view(YKHO.detail, QePW, Of2x, coll_name=YKHO._collection_name + '/detail')", "def UiFi(YKHO, JfyU, QePW, Of2x, YNZl, uhWe=AK6m):\n jQUX = [JfyU(QePW, akib)['volume'] for akib in Of2x]\n LbiM = ...
[ "0.76497114", "0.761595", "0.75049555", "0.74594283", "0.72939926", "0.7286605", "0.7227424", "0.7227424", "0.72109914", "0.72101164", "0.7153784", "0.7153784", "0.7102637", "0.707737", "0.7032868", "0.7022398", "0.68835235", "0.68370074", "0.6824927", "0.6824255", "0.6820485...
0.752923
2
Builder for absolute limits absolute_limits should be given as a dict of limits.
def zMni(YKHO, ZQNq): mxGu = {'ram': ['maxTotalRAMSize'], 'instances': ['maxTotalInstances'], 'cores': ['maxTotalCores'], 'gigabytes': ['maxTotalVolumeGigabytes'], 'volumes': ['maxTotalVolumes'], 'snapshots': ['maxTotalSnapshots'], 'key_pairs': ['maxTotalKeypairs'], 'floating_ips': ['maxTotalFloatingIps'], 'metadat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AZbz(gtI8, qIxc):\n c5uu = gtI8.limits.get().absolute\n ZLJ_ = ['Name', 'Value']\n BfDw.print_list(c5uu, ZLJ_)", "def vJPk(YKHO, JhlG):\n if not YKHO._primitive:\n raise ValueError('do not clip non primitive vars')\n wEf2 = YKHO()\n if abs(wEf2) > JhlG:\n if wEf2 < 0:\n ...
[ "0.70988166", "0.6014259", "0.59061897", "0.5900796", "0.5840823", "0.5772529", "0.5768561", "0.57592845", "0.57391995", "0.5611543", "0.5611543", "0.55623865", "0.5537008", "0.5532709", "0.5513129", "0.55074453", "0.55074453", "0.5490069", "0.5448455", "0.54263276", "0.54079...
0.8039481
0
Return a representation of the selector.
def wHJl(YKHO): return 'Selector' + repr(YKHO.chain)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zAg0(YKHO):\n return YKHO.__selector", "def PKko(YKHO) -> dict:\n return laHg.cast(dict, YKHO._properties.get('selector'))", "def PKko(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'selector')", "def PKko(YKHO) -> '_meta.v1.outputs.LabelSelector':\n return qe4Y.get(YKHO, 'selector')", "...
[ "0.76734287", "0.7016633", "0.6655088", "0.6533279", "0.6371069", "0.6371069", "0.6371069", "0.6223337", "0.6173481", "0.61555886", "0.6151499", "0.6151499", "0.6151499", "0.6119041", "0.6119041", "0.6119041", "0.6084612", "0.6084612", "0.60399705", "0.60386103", "0.6017718",...
0.7490481
1
Return a representation of the selector.
def wHJl(YKHO): return repr(YKHO.value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zAg0(YKHO):\n return YKHO.__selector", "def wHJl(YKHO):\n return 'Selector' + repr(YKHO.chain)", "def PKko(YKHO) -> dict:\n return laHg.cast(dict, YKHO._properties.get('selector'))", "def PKko(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'selector')", "def PKko(YKHO) -> '_meta.v1.outpu...
[ "0.76734287", "0.7490481", "0.7016633", "0.6655088", "0.6533279", "0.6371069", "0.6371069", "0.6371069", "0.6223337", "0.6173481", "0.61555886", "0.6151499", "0.6151499", "0.6151499", "0.6119041", "0.6119041", "0.6119041", "0.6084612", "0.6084612", "0.60399705", "0.60386103",...
0.0
-1
Initialize an element. Initializes an element in the template. Keyword arguments specify attributes to be set on the element; values must be callables. See TemplateElement.set() for more information.
def FIMM(YKHO, TZ9E, tqKV=None, PKko=None, tAZL=None, **dDGN): if PKko is None: PKko = esAs() elif not callable(PKko): PKko = esAs(PKko) if tAZL is not None and (not callable(tAZL)): tAZL = esAs(tAZL) YKHO.tag = TZ9E YKHO.selector = PKko YKHO.subselector = tAZL YKHO.a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, azoT, U6D_=None):\n YKHO.attributes = azoT\n YKHO.element = U6D_", "def FIMM(YKHO: object, APv5: Optional[TypeVar('Element')]=None, *qIxc: list, **B2fa: dict) -> None:\n if APv5 is not None:\n YKHO._initializeFromXML(xml_element=APv5)\n else:\n for Jyyj in YKHO.__slots__:...
[ "0.7040194", "0.6801053", "0.6801053", "0.6586763", "0.6555461", "0.6537486", "0.6519487", "0.63981456", "0.63730156", "0.63277", "0.6281033", "0.62677395", "0.62192464", "0.6094751", "0.60792226", "0.6069729", "0.6063114", "0.60043734", "0.5987992", "0.5968504", "0.5919162",...
0.5731197
43
Return a representation of the template element.
def wHJl(YKHO): return '<%s.%s %r at %#x>' % (YKHO.__class__.__module__, YKHO.__class__.__name__, YKHO.tag, id(YKHO))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zAg0(YKHO):\n isDe = '<' + YKHO.tag_name\n for LwG6 in YKHO.kwargs:\n isDe += ' {}=\"{}\"'.format(LwG6, YKHO.kwargs[LwG6])\n isDe += '>'\n isDe += YKHO.text\n for aUGN in YKHO.children:\n isDe += aUGN\n isDe += '</{}>'.format(YKHO.tag_name)\n return isDe", "def zAg0(YKHO):\...
[ "0.7151076", "0.7137857", "0.698478", "0.6981541", "0.6955818", "0.69285244", "0.6841092", "0.68389696", "0.67695194", "0.6723868", "0.65937203", "0.65845", "0.65834475", "0.6581725", "0.65602595", "0.651324", "0.64854366", "0.6483663", "0.6482273", "0.6454999", "0.6450119", ...
0.63449275
30
Return string representation of the template tree. Returns a representation of the template rooted at this element as a string, suitable for inclusion in debug logs.
def J_Es(YKHO): kGys = [YKHO.tag, '!selector=%r' % YKHO.selector] if YKHO.text is not None: kGys.append('!text=%r' % YKHO.text) for H5ew, BWXx in YKHO.attrib.items(): kGys.append('%s=%r' % (H5ew, BWXx)) if len(YKHO) == 0: return '<%s/>' % ' '.join([str(YRbF) for YRbF in kGys]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zAg0(YKHO):\n\n def UtCB(tk5Y):\n if isinstance(tk5Y, kbcK):\n return UtCB(YKHO._unpacked_nodes[tk5Y])\n elif isinstance(tk5Y, x34Y):\n return [UtCB(exwG) for exwG in tk5Y]\n elif isinstance(tk5Y, C4w_):\n return {G1Hx: UtCB(Ty9i) for G1Hx, Ty9i in tk5Y....
[ "0.7537497", "0.734829", "0.73077923", "0.72699094", "0.7269732", "0.7264137", "0.7209703", "0.7199992", "0.7188542", "0.7184735", "0.71805507", "0.7174417", "0.7157352", "0.7153667", "0.71144754", "0.70893276", "0.7081315", "0.7080292", "0.70783794", "0.7037496", "0.70326096...
0.69048786
33
Return a copy of this master template.
def jth9(YKHO): jbXL = YKHO.__class__(YKHO.root, YKHO.version, YKHO.nsmap) jbXL.slaves = YKHO.slaves[:] return jbXL
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZfFT(YKHO):\n xUwc = jth9.deepcopy(YKHO.master_collection)\n return xUwc", "def jth9(YKHO):\n return YKHO._copy()", "def jth9(YKHO):\n return U7YL.copy(YKHO)", "def jth9(YKHO):\n return cFqH(base_dict=YKHO.base_dict, parent=YKHO.parent, name=YKHO.name + '-copy')", "def jth9(YKHO):\n r...
[ "0.6704266", "0.66654754", "0.6633822", "0.66239595", "0.65812546", "0.65686625", "0.6528597", "0.65158343", "0.6501652", "0.64928067", "0.6473998", "0.6473998", "0.6473998", "0.6473998", "0.6473998", "0.6473998", "0.647185", "0.64625424", "0.6444381", "0.6436864", "0.6382724...
0.8555722
0
Get the most recent backup snapshot of the provided image. Returns name of most recent backup snapshot or None if there are no backup snapshots.
def qe6F(YKHO, xJBT): _uKo = YKHO.get_backup_snaps(xJBT, sort=True) if not _uKo: return None return _uKo[0]['name']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IV0u(YKHO, xJBT, mWFP, RjST):\n zjyu = YKHO.get_backup_snaps(xJBT)\n na1r.debug(bGrB(\"Looking for snapshot of backup base '%s'\") % mWFP)\n if not zjyu:\n na1r.debug(bGrB(\"Backup base '%s' has no snapshots\") % mWFP)\n return None\n zjyu = [vZa6['name'] for vZa6 in zjyu if vZa6['bac...
[ "0.73695594", "0.6800731", "0.6683409", "0.6562737", "0.6501218", "0.6145799", "0.6022169", "0.58638364", "0.5857893", "0.58484954", "0.57879305", "0.57572204", "0.5687052", "0.5632766", "0.5626256", "0.562487", "0.5622504", "0.5611053", "0.56062484", "0.5600553", "0.55815595...
0.8423869
0
Delete the given backup from Ceph object store.
def PTpj(YKHO, JKMw): na1r.debug(bGrB('Delete started for backup=%s') % JKMw['id']) ikNL = False try: YKHO._try_delete_base_image(JKMw['id'], JKMw['volume_id']) except YKHO.rbd.ImageNotFound: tO9_ = bGrB('RBD image for backup %(backup)s of volume %(volume)s not found. Deleting backup met...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PTpj(YKHO, JKMw):\n zhBi = {'Total number of objects deleted': '1'}\n PuTN, RsH_ = XzN7(JKMw, 'restore')\n Z5cL = JKMw['volume_id']\n na1r.debug(bGrB('Delete started for backup: %(backup)s, mode: %(mode)s.'), {'backup': JKMw['id'], 'mode': RsH_})\n try:\n yvT9, XObx = BfDw.execute('dsmc',...
[ "0.8279135", "0.8088491", "0.79510945", "0.7576809", "0.7540437", "0.7475259", "0.74630064", "0.7403269", "0.7330877", "0.7289829", "0.7270614", "0.7257102", "0.7240873", "0.7216426", "0.7173908", "0.71502614", "0.7077276", "0.693543", "0.6907082", "0.6903481", "0.6869025", ...
0.77443606
3
True if backup is image type.
def KN2d(RsH_): return RsH_ == 'image'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ETKF(YKHO):\n return True", "def ETKF(YKHO):\n return (YKHO.content_type or '').startswith('image/')", "def ETKF(YKHO):\n return False", "def VWoz(YKHO):\n return YKHO.ext[1:].lower() in YKHO.FORMATS", "def oKLT(YKHO):\n return 'image/' in YKHO.mime_type", "def RTvJ(pmON):\n npjt = ...
[ "0.7654511", "0.75347", "0.7408126", "0.725777", "0.71853364", "0.71181726", "0.70872605", "0.7050418", "0.70245683", "0.70245683", "0.7000899", "0.7000899", "0.680574", "0.6750275", "0.66443276", "0.66378576", "0.6623247", "0.65862215", "0.6544188", "0.65151423", "0.6488179"...
0.8077373
0
Remove a iSCSI target and logical unit.
def IgFm(YKHO, Huo2, a9vH, uK4j, VkPj, **B2fa): raise NotImplementedError()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UBuy(YKHO, y9Ye, XNHl):\n try:\n DhMC = YKHO._conn_wmi.WT_IDMethod(HostName=XNHl, Method=4, Value=y9Ye)[0]\n DhMC.Delete_()\n except qeUG.x_wmi as exc:\n YXxD = bGrB('delete_iscsi_target: error when deleting the iscsi target associated with target name: %(target)s . WMI exception: %(...
[ "0.69929284", "0.69884884", "0.6711778", "0.6679938", "0.66540104", "0.6572564", "0.6400982", "0.61579", "0.6098136", "0.6063807", "0.6037059", "0.6037059", "0.6004229", "0.5996217", "0.59878635", "0.59738374", "0.58686626", "0.580431", "0.57913333", "0.57801306", "0.57257", ...
0.75736755
0
Initialize the LVM object. The LVM object is based on an LVM VolumeGroup, one instantiation for each VolumeGroup you have/use.
def FIMM(YKHO, br0e, F1HG, kHWx=False, w57T=None, yVYE='default', ZaUd=yc1d.execute): super(PDH1, YKHO).__init__(execute=ZaUd, root_helper=F1HG) YKHO.vg_name = br0e YKHO.pv_list = [] YKHO.lv_list = [] YKHO.vg_size = 0.0 YKHO.vg_free_space = 0.0 YKHO.vg_lv_count = 0 YKHO.vg_uuid = None ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, br0e: str, F1HG: str, kHWx: bool=False, w57T: Optional[list]=None, yVYE: Optional[str]='default', ZaUd: Optional[Callable]=None, oP92=None, OwX1: Optional[bool]=False):\n super(PDH1, YKHO).__init__(execute=ZaUd, root_helper=F1HG)\n YKHO.vg_name = br0e\n YKHO.pv_list = []\n YKHO.vg_size =...
[ "0.7208019", "0.69354683", "0.6784758", "0.65633595", "0.6163982", "0.6040509", "0.5918988", "0.5870376", "0.58681977", "0.5815135", "0.57862127", "0.5783363", "0.5754984", "0.5737943", "0.56891215", "0.5658085", "0.5650471", "0.5629264", "0.56237334", "0.5576958", "0.5576079...
0.7750674
0
Ensure that logical volume/snapshot logical volume is activated.
def BeOH(YKHO, mWFP, tHUz=False): if tHUz and (not YKHO.supports_snapshot_lv_activation): return ZUD9 = YKHO.vg_name + '/' + YKHO._mangle_lv_name(mWFP) HCmI = ['lvchange', '-a', 'y', '--yes'] if YKHO.supports_lvchange_ignoreskipactivation: HCmI.append('-K') HCmI.append(ZUD9) try:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KBYD(YKHO, akib, DHvX):\n if akib['status'] not in ['available', 'in-use']:\n tO9_ = bGrB('Volume status must be available/in-use.')\n raise AJ5d.InvalidVolume(reason=tO9_)\n if not DHvX and 'in-use' == akib['status']:\n tO9_ = bGrB('Volume status is in-use.')\n raise AJ5d.Inv...
[ "0.67336947", "0.6709144", "0.6557018", "0.6431884", "0.6382005", "0.6360986", "0.6347229", "0.63385165", "0.63383067", "0.62709993", "0.6265595", "0.625237", "0.62450635", "0.6214", "0.6201619", "0.61941487", "0.6189296", "0.6183626", "0.6163162", "0.6163162", "0.6163162", ...
0.0
-1
Return a version of this context with admin flag set.
def MRKc(YKHO, mK4e=None, f2Tp=False): QpfX = jth9.copy(YKHO) QpfX.is_admin = True if 'admin' not in QpfX.roles: QpfX.roles.append('admin') if mK4e is not None: QpfX.read_deleted = mK4e return QpfX
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dp9S(YKHO):\n return YKHO._admin", "def rdLF(gaZx=False):\n QpfX = K1Ja(None, project=None, is_admin=True, show_deleted=gaZx, overwrite=False)\n return QpfX", "def dp9S(YKHO):\n return YKHO._admin", "def zy8Y(gaZx=False, tvN0=False):\n QpfX = K1Ja(user_id=None, project=None, is_admin=True,...
[ "0.768759", "0.76865095", "0.7675419", "0.72167313", "0.7093423", "0.7051435", "0.70065624", "0.697568", "0.6912028", "0.6685495", "0.6685495", "0.6685495", "0.6685495", "0.6685495", "0.66436744", "0.65998256", "0.65796447", "0.6511104", "0.6508022", "0.64928126", "0.64755356...
0.61169773
51
Get a service or raise if it does not exist.
def yzTR(QpfX, liCf): return gJE7.service_get(QpfX, liCf)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rVwF(YKHO, mWFP):\n if mWFP in YKHO.services:\n return YKHO.services[mWFP]\n else:\n raise xiIb(mWFP)", "def rVwF(YKHO, mWFP):\n for zVa7 in YKHO.services:\n if zVa7.name == mWFP:\n return zVa7\n raise tYlr(mWFP)", "def yzTR(YKHO, S1_y):\n try:\n Mkmy =...
[ "0.774401", "0.7521637", "0.74812514", "0.7266784", "0.7098163", "0.70835257", "0.6919642", "0.6884143", "0.6883407", "0.68748826", "0.68711025", "0.6860936", "0.68488616", "0.68239367", "0.67955506", "0.6754291", "0.6697646", "0.6692009", "0.6682662", "0.6661225", "0.6636424...
0.6944889
6
Get all volume services sorted by volume count.
def I8zQ(QpfX): return gJE7.service_get_all_volume_sorted(QpfX)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pi1E(YKHO, qoqK=None, gpXh='id', G852='asc', V_D6=None):\n return YKHO._get_services_collection(qoqK, gpXh, G852, fields=V_D6)", "def U1_J(QpfX, _5yy=None, qoqK=None, u2qj=None, pbwn=None, KUnM=None, vgXP=None):\n xDcj = yBEd(QpfX, _5yy, qoqK, u2qj, pbwn, KUnM, vgXP, FYrf.Volume)\n if xDcj is None:\...
[ "0.63261974", "0.6207132", "0.6191072", "0.614415", "0.59242934", "0.5922328", "0.591782", "0.59162086", "0.5894405", "0.58878744", "0.58421", "0.583783", "0.5829149", "0.57871765", "0.5784433", "0.57757753", "0.5759068", "0.57310104", "0.5715024", "0.57022905", "0.5681943", ...
0.7798061
0
Return count of export devices.
def eNIr(QpfX, KcEq): return gJE7.iscsi_target_count_by_host(QpfX, KcEq)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def C_sb(YKHO):\n return len(YKHO._devices)", "def t7Fy(YKHO):\n return YKHO.transfer_area.BusModules", "def m0SM(YKHO) -> str:\n return qe4Y.get(YKHO, 'device_count')", "def tbhc():\n return oXiX()", "def NvMk(YKHO):\n return YKHO._total_devices", "def m0SM() -> int:\n return _uqo._one...
[ "0.669533", "0.6663239", "0.64867437", "0.6419218", "0.6394444", "0.60776967", "0.6041244", "0.6027335", "0.5971459", "0.58721876", "0.58075845", "0.5807532", "0.5801963", "0.577401", "0.57495373", "0.5724661", "0.5721906", "0.5708261", "0.57028806", "0.566838", "0.5666195", ...
0.0
-1
Get all volumes belonging to a project.
def n4MM(QpfX, ekCf, _5yy, qoqK, gpXh, G852, KUnM=None): return gJE7.volume_get_all_by_project(QpfX, ekCf, _5yy, qoqK, gpXh, G852, filters=KUnM)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N7FV(YKHO, bNKA, SGCG=None):\n udry = Or87(YKHO, YKHO.IDX_CMN)\n udry.printMsg(udry.MSG_LVL_DEBUG, 'Retrieving all volumes for project [' + bNKA + '].')\n if SGCG is None:\n udry.printMsg(udry.MSG_LVL_DEBUG, 'Retrieving project URI for project [' + bNKA + '].')\n eTH_ = YKHO.get_project_...
[ "0.8289481", "0.7532883", "0.7308679", "0.7253429", "0.7247321", "0.7216498", "0.72125804", "0.718046", "0.7152533", "0.7134419", "0.70991623", "0.7073906", "0.7038356", "0.7038356", "0.7038356", "0.7017838", "0.70114636", "0.6997316", "0.69878274", "0.69831926", "0.6946795",...
0.747375
2
Get all snapshots for a volume.
def O9eL(QpfX, Z5cL): return gJE7.snapshot_get_all_for_volume(QpfX, Z5cL)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def l82C(YKHO, akib):\n XeOP = 'ReadSnapshots'\n nPrm = {'Filters': {'VolumeIds': [akib.id]}}\n geh0 = YKHO._call_api(XeOP, nPrm)\n if geh0.status_code == 200:\n return YKHO._to_snapshots(geh0.json()['Snapshots'])\n return geh0.json()", "def l82C(YKHO, akib, zn0c=None):\n geh0 = YKHO.con...
[ "0.8361704", "0.82668114", "0.81596446", "0.81538284", "0.80754286", "0.7820002", "0.74294144", "0.73971534", "0.73621005", "0.7278556", "0.7099351", "0.7029777", "0.6993561", "0.6967685", "0.6948598", "0.69040674", "0.6886804", "0.6857962", "0.68294674", "0.680846", "0.67905...
0.8150329
4
Get volume type by id.
def jsO7(QpfX, id, qEa8=False): return gJE7.volume_type_get(QpfX, id, qEa8)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TnC4(bp_0, id):\n if id is None:\n tO9_ = bGrB('id cannot be None')\n raise AJ5d.InvalidVolumeType(reason=tO9_)\n if bp_0 is None:\n bp_0 = QpfX.get_admin_context()\n return NCls.volume_type_get(bp_0, id)", "def TnC4(YKHO, EhYO):\n bD7m = 'types/%s' % str(EhYO)\n _hkX, TBs...
[ "0.84785026", "0.8137755", "0.8085881", "0.8072778", "0.787026", "0.7661392", "0.75059843", "0.74737656", "0.74468255", "0.72132045", "0.71302384", "0.7072725", "0.70371944", "0.7021344", "0.6963033", "0.68592685", "0.67439646", "0.67326796", "0.67326796", "0.67293763", "0.67...
0.8197179
1
Get all the volumes inside the window. Specifying a project_id will filter for a certain project.
def cY5G(QpfX, _9an, Os4s=None, ekCf=None): return gJE7.volume_get_active_by_window(QpfX, _9an, Os4s, ekCf)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n4MM(QpfX, ekCf, _5yy, qoqK, gpXh, G852, KUnM=None):\n return gJE7.volume_get_all_by_project(QpfX, ekCf, _5yy, qoqK, gpXh, G852, filters=KUnM)", "def N7FV(YKHO, bNKA, SGCG=None):\n udry = Or87(YKHO, YKHO.IDX_CMN)\n udry.printMsg(udry.MSG_LVL_DEBUG, 'Retrieving all volumes for project [' + bNKA + ']....
[ "0.7459853", "0.74020064", "0.72439134", "0.71213293", "0.70451427", "0.7004954", "0.67222863", "0.66820526", "0.66602015", "0.66588193", "0.66583943", "0.6631921", "0.6613275", "0.65886736", "0.6520548", "0.65012294", "0.65000117", "0.6491571", "0.64732474", "0.64710623", "0...
0.0
-1
Get all specification for a given qos_specs.
def rpuK(QpfX, fTv5): return gJE7.qos_specs_get(QpfX, fTv5)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ycvi(QpfX, KUnM=None, _5yy=None, qoqK=None, vgXP=None, u2qj=None, pbwn=None):\n xDcj = yBEd(QpfX, _5yy, qoqK, u2qj, pbwn, KUnM, vgXP, FYrf.QualityOfServiceSpecs)\n if xDcj is None:\n return []\n usx6 = xDcj.all()\n return y2_2(usx6)", "def WnB5(QpfX, fTv5):\n ZtUf(QpfX, fTv5, None)\n ...
[ "0.7673314", "0.7299021", "0.7263095", "0.7255974", "0.6966832", "0.68914336", "0.67475224", "0.66466355", "0.6426564", "0.64099956", "0.63958424", "0.6379243", "0.6370146", "0.63185084", "0.62548167", "0.6205181", "0.62002665", "0.6128755", "0.6005886", "0.59971946", "0.5987...
0.7544724
1
Get all specification for a given qos_specs.
def d0p4(QpfX, mWFP): return gJE7.qos_specs_get_by_name(QpfX, mWFP)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ycvi(QpfX, KUnM=None, _5yy=None, qoqK=None, vgXP=None, u2qj=None, pbwn=None):\n xDcj = yBEd(QpfX, _5yy, qoqK, u2qj, pbwn, KUnM, vgXP, FYrf.QualityOfServiceSpecs)\n if xDcj is None:\n return []\n usx6 = xDcj.all()\n return y2_2(usx6)", "def rpuK(QpfX, fTv5):\n return gJE7.qos_specs_get(Q...
[ "0.7673896", "0.75454956", "0.7299435", "0.72637606", "0.72566324", "0.6967472", "0.6891917", "0.66469085", "0.6427432", "0.64110374", "0.63966644", "0.6378839", "0.63706446", "0.63185203", "0.62556374", "0.6205766", "0.620082", "0.6129485", "0.60063493", "0.59981656", "0.598...
0.6747756
7
Get all associated volume types for a given qos_specs.
def WnB5(QpfX, fTv5): return gJE7.qos_specs_associations_get(QpfX, fTv5)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WnB5(QpfX, fTv5):\n return sPTs(QpfX, fTv5)", "def n4Io(QpfX, uFSx):\n try:\n XByT = NCls.qos_specs_associations_get(QpfX, uFSx)\n except BKOP.DBError as e:\n na1r.exception(bGrB('DB error: %s') % tTpl)\n tO9_ = bGrB('Failed to get all associations of qos specs %s') % uFSx\n ...
[ "0.7249379", "0.721296", "0.71996665", "0.7031446", "0.6913758", "0.68337816", "0.65778595", "0.64669573", "0.62700427", "0.6165853", "0.61638975", "0.6133971", "0.61068463", "0.60322887", "0.59813005", "0.5855271", "0.5850988", "0.56488967", "0.55900717", "0.5587288", "0.557...
0.5958502
15
Indicates if the request context is an administrator.
def dLqG(QpfX): if not QpfX: qmLP.warn(bGrB('Use of empty request context is deprecated'), DeprecationWarning) raise Exception('die') return QpfX.is_admin
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RefD(YKHO) -> bool:\n return YKHO._permission in ['ADMIN']", "def _Kb1(YKHO):\n return YKHO.role == mv1M.ROLE_ADMINISTRATOR", "def MtA2(YKHO, YEnM):\n if YKHO.context.get('request'):\n return tgBb.has_admin_permission(YEnM, YKHO.context['request'])\n return False", "def _Kb1(YKHO):\n ...
[ "0.8221996", "0.8200306", "0.8127705", "0.81011176", "0.806369", "0.8030169", "0.7997367", "0.79914474", "0.7970894", "0.790589", "0.7901541", "0.785845", "0.7836617", "0.7811639", "0.78085333", "0.77975255", "0.77959675", "0.7785845", "0.77855784", "0.77855784", "0.7777789",...
0.7378456
51
Indicates if the request context is a normal user.
def YNIk(QpfX): if not QpfX: return False if QpfX.is_admin: return False if not QpfX.user_id or not QpfX.project_id: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YNIk(QpfX):\n if QpfX.is_admin:\n return False\n if QpfX.is_domain_owner:\n return False\n if not QpfX.user_id:\n return False\n return True", "def SS4R(BaHi):\n if BaHi in cA0K:\n return False\n return True", "def eTTr(YKHO):\n return YKHO._is_user", "def...
[ "0.7534016", "0.7260212", "0.70494044", "0.703956", "0.6983143", "0.6941876", "0.6870931", "0.6833363", "0.68329906", "0.68329906", "0.68159646", "0.6771919", "0.67687094", "0.67091906", "0.66970056", "0.66710716", "0.6618756", "0.6616459", "0.6612297", "0.6600111", "0.653508...
0.7066794
2
Create a new instance type. In order to pass in extra specs, the values dict should contain a
def L0Oi(QpfX, hkxX): if not hkxX.get('id'): hkxX['id'] = str(qxeD.uuid4()) cuiw = KfiN() with cuiw.begin(): try: vztC(QpfX, hkxX['name'], cuiw) raise AJ5d.VolumeTypeExists(id=hkxX['name']) except AJ5d.VolumeTypeNotFoundByName: pass try: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OdgU(YKHO, **o8Kj):\n pass", "def fP9s(vOsx: typing.Type, vIwR: str) -> laHg.Any:\n ...", "def gXBk(*dZB7, **phn5):\n return r2F4(*dZB7, **phn5)", "def eLpg(Emd4, **cmPJ):\n if Emd4.__name__ == 'Square':\n GREo = Emd4(1, 0, 0)\n if Emd4.__name__ == 'Rectangle':\n GREo = Emd4(...
[ "0.7038514", "0.69669473", "0.68051475", "0.6747511", "0.67019755", "0.65953976", "0.6593698", "0.6593698", "0.6593698", "0.6593698", "0.6593698", "0.6593698", "0.6593698", "0.6593698", "0.6593698", "0.654786", "0.6542631", "0.64971524", "0.649169", "0.6477186", "0.6469624", ...
0.0
-1
Convert specs list to a dict.
def uQ3o(Mzww): Aofo = {} for Cqok in Mzww: if not Cqok['deleted']: Aofo.update({Cqok['key']: Cqok['value']}) return Aofo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MYZ5(R45m):\n V2VF = dict()\n V2VF['margins'] = j5kc(R45m)\n V2VF['pages'] = Tatw(R45m)\n V2VF['spacing'] = GIYT(R45m)\n V2VF['size'] = KzYn(R45m)\n V2VF['font'] = rEB3(R45m)\n return V2VF", "def Cqok(YKHO):\n Csk6 = dict()\n Csk6['name'] = YKHO.name\n Csk6['spec_list'] = [jzdc....
[ "0.70745397", "0.67926764", "0.6779161", "0.6456357", "0.64476395", "0.6330359", "0.6200323", "0.6147228", "0.6106699", "0.6091669", "0.6032175", "0.6016536", "0.59569955", "0.58638203", "0.5845379", "0.5817501", "0.58163077", "0.5805539", "0.5783127", "0.5725563", "0.571119"...
0.5980352
12
Convert qos specs query results to list. Qos specs query results are a list of quality_of_service_specs refs, some are root entry of a qos specs (key == 'QoS_Specs_Name') and the rest are children entry, a.k.a detailed specs for a qos specs. This function converts query results to a dict using spec name as key.
def y2_2(usx6): Aofo = [] for rdlD in usx6: if rdlD['key'] == 'QoS_Specs_Name': mS46 = {} mS46['name'] = rdlD['value'] mS46.update(dict(id=rdlD['id'])) if rdlD.specs: V2VF = uQ3o(rdlD.specs) mS46.update(dict(consumer=V2VF['c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def y2_2(usx6):\n Aofo = []\n for rdlD in usx6:\n if rdlD['key'] == 'QoS_Specs_Name':\n mS46 = {'name': rdlD['value'], 'id': rdlD['id'], 'created_at': rdlD['created_at']}\n if rdlD.specs:\n V2VF = uQ3o(rdlD.specs)\n mS46['consumer'] = V2VF.pop('consu...
[ "0.6423665", "0.6317004", "0.6287564", "0.5805853", "0.5770652", "0.57591665", "0.5626725", "0.55967116", "0.5525913", "0.5488369", "0.5459713", "0.5454212", "0.5436645", "0.54340935", "0.5388434", "0.53677267", "0.5344831", "0.53119314", "0.52562505", "0.52416116", "0.521459...
0.6576894
0
Returns a list of all qos_specs.
def Ycvi(QpfX, qEa8=False, KUnM=None): KUnM = KUnM or {} mK4e = 'yes' if qEa8 else 'no' usx6 = b3ms(QpfX, FYrf.QualityOfServiceSpecs, read_deleted=mK4e).options(KjpJ('specs')).all() return y2_2(usx6)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ycvi(QpfX, KUnM=None, _5yy=None, qoqK=None, vgXP=None, u2qj=None, pbwn=None):\n xDcj = yBEd(QpfX, _5yy, qoqK, u2qj, pbwn, KUnM, vgXP, FYrf.QualityOfServiceSpecs)\n if xDcj is None:\n return []\n usx6 = xDcj.all()\n return y2_2(usx6)", "def rpuK(QpfX, fTv5):\n return gJE7.qos_specs_get(Q...
[ "0.7503117", "0.73578453", "0.72234267", "0.7096657", "0.6934864", "0.6874479", "0.68467975", "0.6831432", "0.6798621", "0.6537659", "0.6307066", "0.6272008", "0.6256124", "0.61812", "0.6159694", "0.61571276", "0.61195993", "0.60058016", "0.59932315", "0.5993218", "0.59838676...
0.73740685
1
Make updates to a existing qos specs. Perform add, update or delete key/values to a qos specs.
def MPq_(QpfX, fTv5, Mzww): cuiw = KfiN() with cuiw.begin(): ZtUf(QpfX, fTv5, cuiw) Q1pI = None for H5ew in Mzww.keys(): try: Q1pI = dGKw(QpfX, fTv5, H5ew, cuiw) except AJ5d.QoSSpecsKeyNotFound: Q1pI = FYrf.QualityOfServiceSpecs() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MPq_(QpfX, fTv5, Mzww):\n return gJE7.qos_specs_update(QpfX, fTv5, Mzww)", "def MPq_(QpfX, fTv5, hkxX):\n Mzww = hkxX.get('specs', {})\n if 'consumer' in hkxX:\n Mzww = Mzww.copy()\n Mzww['consumer'] = hkxX['consumer']\n Q1pI = None\n for H5ew in Mzww.keys():\n try:\n ...
[ "0.8046879", "0.7839476", "0.68182796", "0.6779773", "0.6692541", "0.66068417", "0.6596316", "0.6418193", "0.6418193", "0.6378408", "0.63005996", "0.62995815", "0.6192709", "0.6151362", "0.6139495", "0.6027549", "0.60193276", "0.5998617", "0.5988192", "0.59568954", "0.5905154...
0.7602002
2
Return the encryption key id for a given volume.
def uOAN(QpfX, Z5cL, cuiw=None): C6of = PWo8(QpfX, Z5cL) d8qb = DL5D(QpfX, C6of['volume_type_id']) return {'encryption_key_id': C6of['encryption_key_id'], 'control_location': d8qb['control_location'], 'cipher': d8qb['cipher'], 'key_size': d8qb['key_size'], 'provider': d8qb['provider']}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Tg52(YKHO) -> laHg.Optional[lTJ4.aws_kms.IKey]:\n return YKHO._values.get('volume_encryption_key')", "def CrhM(YKHO) -> laHg.Optional[lTJ4.aws_kms.Key]:\n return YKHO._values.get('volume_kms_key_id')", "def CrhM(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'volume_kms_key_id')", "def...
[ "0.7614142", "0.75540286", "0.74278116", "0.7335355", "0.73261446", "0.73261446", "0.7070918", "0.70277536", "0.69559807", "0.69163156", "0.69163156", "0.68508065", "0.68508065", "0.68508065", "0.68508065", "0.68508065", "0.68508065", "0.68508065", "0.68508065", "0.68508065", ...
0.610407
70
Convert volume_type from UUID back to int.
def XEpr(kzlU): e5kH = PnAT() e5kH.bind = kzlU Of2x = TQJD('volumes', e5kH, autoload=True) Ev9e = TQJD('volume_types', e5kH, autoload=True) XLKm = TQJD('volume_type_extra_specs', e5kH, autoload=True) Jsak = [Of2x.c.volume_type_id, Ev9e.c.id, XLKm.c.volume_type_id] for iVRZ in Jsak: B...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ELSN(YKHO, akib):\n if akib['volume_type_id'] and akib.get('volume_type'):\n return akib['volume_type']['name']\n else:\n return akib['volume_type_id']", "def l3GQ(kN9s):\n if kN9s == 'uuid' or kN9s == '':\n return 'uuid'\n else:\n return '{0}_uuid'.format(kN9s)", "d...
[ "0.6586657", "0.6213094", "0.62002546", "0.61706346", "0.5888341", "0.57936776", "0.57757586", "0.57597643", "0.57167333", "0.5688175", "0.5685675", "0.5650675", "0.56497645", "0.56497645", "0.56497645", "0.56497645", "0.56497645", "0.56445426", "0.5580505", "0.5568311", "0.5...
0.0
-1
Add source volume id column to volumes.
def XYqQ(kzlU): e5kH = PnAT() e5kH.bind = kzlU Of2x = TQJD('volumes', e5kH, autoload=True) ThP9 = OciN('source_volid', FgBH(36)) Of2x.create_column(ThP9) Of2x.update().values(source_volid=None).execute()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zENI(YKHO, JZXy, Of2x):\n bD7m = '{}/audio/sources/{}/volume'.format(YKHO.base_url, JZXy)\n return YKHO.request('PUT', bD7m, json=Of2x)", "def yNeN(YKHO):\n A07C = (YKHO._frame.data['id'] / YKHO._rays_per_source).astype(int)\n YKHO._frame.data['source_id'] = A07C", "def UBGL(YKHO, UBGL):\n Y...
[ "0.6656649", "0.6205991", "0.6164317", "0.6164317", "0.60991275", "0.5937728", "0.5853824", "0.5836778", "0.5795821", "0.5789093", "0.57025594", "0.56733257", "0.56113976", "0.5497637", "0.54626435", "0.54303753", "0.54128754", "0.54128754", "0.54110235", "0.540562", "0.53835...
0.56375515
12
Get the path for the migrate repository.
def SkpD(): global _REPOSITORY pmON = Hy7s.path.join(Hy7s.path.abspath(Hy7s.path.dirname(xAKo)), 'migrate_repo') assert Hy7s.path.exists(pmON) if nqE9 is None: nqE9 = mY2R(pmON) return nqE9
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n3vd(YKHO) -> str:\n return YKHO.__get_path__('repos')", "def SkpD():\n global _REPOSITORY\n pmON = Hy7s.path.join(Hy7s.path.abspath(Hy7s.path.dirname(xAKo)), 'migrate_repo')\n assert Hy7s.path.exists(pmON)\n if nqE9 is None:\n nqE9 = mY2R(pmON)\n return nqE9", "def a_7F():\n re...
[ "0.73012066", "0.70835567", "0.7014124", "0.6958101", "0.6923065", "0.67973864", "0.67777944", "0.66905326", "0.65916204", "0.65873265", "0.65873265", "0.6575967", "0.6573392", "0.65634024", "0.6554335", "0.6541527", "0.65227467", "0.6520525", "0.6518835", "0.6513413", "0.651...
0.70570874
2
Stores (i.e., registers) a key with the key manager. This method stores the specified key and returns its UUID that identifies it within the key manager. If the specified context does not permit the creation of keys, then a NotAuthorized exception should be raised.
def yuQF(YKHO, bp_0, H5ew, N850=None, **B2fa): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yuQF(YKHO, bp_0, H5ew, **B2fa):\n if bp_0 is None:\n raise AJ5d.NotAuthorized()\n if H5ew != YKHO._generate_key():\n raise AJ5d.KeyManagerError(reason='cannot store arbitrary keys')\n return YKHO.key_id", "def yuQF(YKHO, bp_0, H5ew, **B2fa):\n if bp_0 is None:\n raise AJ5d.No...
[ "0.70389074", "0.7013671", "0.63249046", "0.6030947", "0.60156906", "0.60139966", "0.59886086", "0.5982625", "0.57187074", "0.5555007", "0.5555007", "0.54749495", "0.54650396", "0.5406848", "0.5403415", "0.53911996", "0.5386156", "0.538362", "0.53716934", "0.53520125", "0.533...
0.6876243
2
Get the actual backend. May be a module or an instance of a class. Doesn't matter to us. We do this synchronized as it's possible multiple greenthreads started very quickly trying to do DB calls and eventlet can switch threads before self.__backend gets assigned.
def SyDd(YKHO): if YKHO.__backend: return YKHO.__backend dor7 = SAs9.database.backend YKHO.__use_tpool = SAs9.database.use_tpool if YKHO.__use_tpool: from eventlet import tpool YKHO.__tpool = tpool xsy9 = YKHO.__backend_mapping.get(dor7, dor7) AmJG = mCgp.import_module(xs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JLXL(YKHO):\n assert YKHO.backend_class is not None, \"'{0}' should either include a `backend_class` attribute, or override the `get_backend()` method.\".format(YKHO.__class__.__name__)\n return YKHO.backend_class()", "def JLXL(YKHO):\n return YKHO._backend", "def DDLl():\n return p5cf", "def...
[ "0.8443981", "0.8343206", "0.8331597", "0.8291856", "0.8240146", "0.8240146", "0.81890434", "0.8155696", "0.8089843", "0.8076578", "0.8004421", "0.7998152", "0.7867233", "0.7744399", "0.7744399", "0.7744399", "0.76625735", "0.7599143", "0.75986505", "0.753926", "0.7477621", ...
0.88747865
0
Return a SQLAlchemy session.
def KfiN(kvdF=True, _Xcb=False, tj3b=False): global _MAKER if BlAi is None: eHpk = PWOV(sqlite_fk=tj3b) BlAi = ZZtq(eHpk, kvdF, _Xcb) cuiw = BlAi() return cuiw
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KfiN(YKHO):\n DMju = fKRS(bind=YKHO.engine)\n return DMju()", "def Dbxd(YKHO):\n cuiw = i48E.orm.sessionmaker(bind=YKHO.db_engine)\n faRV = cuiw()\n return faRV", "def cuiw(YKHO) -> 'Session':\n from sqlalchemy.orm import Session\n return Session(YKHO._instance)", "def KfiN():\n e...
[ "0.8806586", "0.8465929", "0.8465362", "0.84646034", "0.8435048", "0.8414641", "0.8400429", "0.83672935", "0.8284893", "0.8284893", "0.8252355", "0.8222578", "0.8181498", "0.8170009", "0.8162468", "0.8122264", "0.8033007", "0.7984771", "0.79740113", "0.7957282", "0.7943422", ...
0.74437726
67
Return a SQLAlchemy sessionmaker using the given engine.
def ZZtq(eHpk, kvdF=True, _Xcb=False): return i48E.orm.sessionmaker(bind=eHpk, class_=DMju, autocommit=kvdF, expire_on_commit=_Xcb, query_cls=_aLO)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gte4(Emd4, eHpk):\n DMju = FJ3D(bind=eHpk)\n cuiw = DMju()\n return cuiw", "def ZZtq(eHpk, kvdF=True, _Xcb=False):\n return i48E.orm.sessionmaker(bind=eHpk, autocommit=kvdF, expire_on_commit=_Xcb)", "def ZZtq(eHpk, kvdF=True, _Xcb=False):\n return i48E.orm.sessionmaker(bind=eHpk, autocommit=...
[ "0.804251", "0.79818785", "0.79818785", "0.7792247", "0.7675621", "0.7675621", "0.7624718", "0.7460497", "0.73871595", "0.73130375", "0.73032665", "0.72697926", "0.72643876", "0.7206741", "0.71893", "0.7183507", "0.71424514", "0.7114613", "0.7114075", "0.7098276", "0.7086716"...
0.80069214
1
Returns lazy logger. Creates a passthrough logger that does not create the real logger until it is really needed and delegates all calls to the real logger once it is created.
def g6Is(mWFP='unknown', DpZH='unknown'): return mgoA(mWFP, DpZH)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lmAE(mWFP=None):\n\n class LazyLogger:\n\n def FIMM(YKHO, mWFP=None):\n YKHO.__name = mWFP or yZqf()\n YKHO.__real_logger = None\n\n @property\n def VRxn(YKHO):\n if YKHO.__real_logger is None:\n if not jiCv:\n raise Exc...
[ "0.69414717", "0.65643215", "0.6456646", "0.6368855", "0.6321618", "0.62872845", "0.6226573", "0.6183326", "0.6169493", "0.616535", "0.61281353", "0.6085573", "0.6075163", "0.6039343", "0.603407", "0.6012899", "0.60080963", "0.6007979", "0.6004961", "0.5986513", "0.5981178", ...
0.7151057
1
Parse a URL using urlparse.urlsplit(), splitting query and fragments. This function papers over Python issue9374 when needed. The parameters are the same as urlparse.urlsplit.
def NoPH(bD7m, ht58='', nEK5=True): ht58, RYr6, pmON, xDcj, vBtp = hfK9.urlsplit(bD7m, ht58, nEK5) if nEK5 and '#' in pmON: pmON, vBtp = pmON.split('#', 1) if '?' in pmON: pmON, xDcj = pmON.split('?', 1) return hfK9.SplitResult(ht58, RYr6, pmON, xDcj, vBtp)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TLhg(bD7m):\n ht58, RYr6, pmON, xDcj, vBtp = NoPH(bD7m)\n xDcj = _Ibt(xDcj)\n return (ht58, RYr6, pmON, xDcj, vBtp)", "def NoPH(bD7m, ht58='', nEK5=True):\n ht58, RYr6, pmON, xDcj, vBtp = hfK9.urlsplit(bD7m, ht58, nEK5)\n if nEK5 and '#' in pmON:\n pmON, vBtp = pmON.split('#', 1)\n i...
[ "0.7986438", "0.79584354", "0.740024", "0.72036874", "0.71876013", "0.71876013", "0.71660924", "0.6960886", "0.6925111", "0.6919562", "0.6767884", "0.6767035", "0.67426986", "0.6714855", "0.66926134", "0.6600504", "0.65552324", "0.65411055", "0.6520307", "0.65020746", "0.6502...
0.80140126
0
Return whether an object is a class of the correct type and is not prefixed with an underscore.
def EyMX(YKHO, Emd4): return tq_1.isclass(Emd4) and (not Emd4.__name__.startswith('_')) and issubclass(Emd4, YKHO.modifier_class_type)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def G_RE(YKHO, **B2fa):\n if not YKHO._isKeyDict(_l=['_cn', '_o'], **B2fa):\n B2fa['msg'] = \"you must define the '_o' and '_cn' keys, stupid!\"\n YKHO.error(**B2fa)\n return False\n return B2fa['_o'].getClassname() == B2fa['_cn']", "def EyMX(YKHO, YEnM):\n return tq_1.isclass(YEnM)...
[ "0.71096104", "0.70844054", "0.70844054", "0.7037132", "0.68296874", "0.6771588", "0.6712046", "0.6699759", "0.6637099", "0.64534014", "0.63893193", "0.6351931", "0.6337367", "0.6332098", "0.63292825", "0.6269612", "0.62233734", "0.62199396", "0.62117547", "0.62077737", "0.62...
0.6809181
5
Interpret a string as a boolean and return either 1 or 0.
def C3rY(U4ZT): return DeMF(U4ZT) and 1 or 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UcEP(KCHu):\n return KCHu == 'True' or KCHu == 'true' or KCHu == '1' or (KCHu == 1)", "def M0mR(KCHu):\n if KCHu == 'True':\n return True\n elif KCHu == 'False':\n return False", "def hDhI(KCHu):\n if KCHu is None:\n return False\n if type(KCHu) is bool:\n return ...
[ "0.86785144", "0.8458446", "0.84566736", "0.8428115", "0.83988863", "0.8384402", "0.8370064", "0.8341188", "0.83083606", "0.82946944", "0.8290699", "0.8280734", "0.8274777", "0.8271623", "0.82710594", "0.8239511", "0.823499", "0.82224786", "0.81916296", "0.8150022", "0.814776...
0.7836335
57
Interpret a string as a boolean. A caseinsensitive match is performed such that strings matching 't', 'true', 'on', 'y', 'yes', or '1' are considered True and, when `strict=False`, anything else returns the value specified by 'default'. Useful for JSONdecoded stuff and config file parsing. If `strict=True`, unrecognize...
def DeMF(U4ZT, U3Fm=False, WmM4=False): if not isinstance(U4ZT, jKi7.string_types): U4ZT = str(U4ZT) eQfd = U4ZT.strip().lower() if eQfd in IOJ8: return True elif eQfd in Fgjm: return False elif U3Fm: N_9S = ', '.join(("'%s'" % KCHu for KCHu in sorted(IOJ8 + Fgjm))) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lIW9(KCHu, WmM4=False):\n KCHu = (KCHu or '').lower()\n if KCHu in IOJ8:\n return True\n elif KCHu in Fgjm:\n return False\n else:\n return WmM4", "def DeMF(U4ZT, U3Fm=False, WmM4=False):\n if not isinstance(U4ZT, jKi7.string_types):\n U4ZT = jKi7.text_type(U4ZT)\n ...
[ "0.78503984", "0.7659054", "0.7657794", "0.7531335", "0.741974", "0.74148726", "0.74145204", "0.7376653", "0.73632926", "0.7362981", "0.7361147", "0.73329365", "0.7329418", "0.7309917", "0.72846854", "0.7276775", "0.72613484", "0.7239976", "0.7237335", "0.72303265", "0.722924...
0.761922
3
Normalize string. Convert to lowercase, remove nonword characters, and convert spaces to hyphens. Inspired by Django's `slugify` filter.
def OTm7(BWXx, Fi_Q=None, UAju='strict'): BWXx = gjz_(BWXx, Fi_Q, UAju) BWXx = zVCt.normalize('NFKD', BWXx).encode('ascii', 'ignore').decode('ascii') BWXx = rzQO.sub('', BWXx).strip().lower() return VOne.sub('-', BWXx)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NkkI(vIwR: str) -> str:\n return Zf5h.only_word_characters(vIwR.replace(' ', '_')).lower()", "def I3lj(vIwR):\n return vIwR.lower().replace(' ', '')", "def eIIt(vIwR):\n return vIwR.replace(' ', '-').replace('\\n', '-').replace('.', '').replace(',', '').lower()", "def bez7(YKHO, BWXx):\n BWXx...
[ "0.81086427", "0.7936849", "0.7898516", "0.78895146", "0.7869683", "0.7860679", "0.7827263", "0.7827263", "0.77961785", "0.77937657", "0.77925456", "0.7761805", "0.7753816", "0.77317965", "0.77273357", "0.7724046", "0.7720108", "0.77200645", "0.77171016", "0.7710749", "0.7706...
0.0
-1
Return the difference between two timing objects. Compute the difference in seconds between two date, time, or datetime objects (as a float, to microsecond resolution).
def KNvb(h3Aq, DOuq): RA_F = DOuq - h3Aq return z0YJ(RA_F)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TAxb(YKHO, n2Q1, SpII):\n yk4i = abs(YKHO.time(SpII) - YKHO.time(n2Q1))\n return yk4i.seconds", "def OTVr(Emd4, SWox, C7pn):\n yk4i = C7pn - SWox\n return float(yk4i.seconds) + float(yk4i.microseconds) / 1000000.0", "def hMTB(CVHG, PzA3):\n return PzA3 - CVHG", "def hMTB(CVHG, PzA3):\n ...
[ "0.8018219", "0.77933455", "0.7686291", "0.7665158", "0.750173", "0.74814713", "0.73757523", "0.7367767", "0.7182115", "0.7107154", "0.7107154", "0.7072164", "0.70150536", "0.69858056", "0.69769514", "0.6971529", "0.6964733", "0.69304794", "0.6918327", "0.69090295", "0.687399...
0.62455195
82
Whether or not roles contains 'admin' role according to policy setting.
def gmaE(Tf5Y): DbxN() XeOP = 'context_is_admin' LU8G = ('rule:%s' % XeOP,) pan_ = {'project_id': ''} Vt89 = {'roles': Tf5Y} return Qabx.enforce(LU8G, pan_, Vt89)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yxKr(Tf5Y):\n for Mkmy in Tf5Y:\n if Mkmy.id in gCuF.admin_roles:\n return True\n return False", "def _Kb1():\n return SAs9.patrole.rbac_test_role == SAs9.identity.admin_role", "def _Kb1(OaeV):\n for LmAn in OaeV.author.roles:\n if LmAn.id == 294283611870461953:\n ...
[ "0.8026457", "0.7998904", "0.77189887", "0.76973104", "0.76867354", "0.7577107", "0.74564534", "0.742186", "0.7205778", "0.7169919", "0.7154586", "0.7138908", "0.6964089", "0.6957023", "0.69534016", "0.6938692", "0.6937787", "0.6931869", "0.69125617", "0.6887205", "0.6853277"...
0.75981665
5
Ensure that the host exists and can accept the volume.
def EmAe(YKHO, QpfX, rlUa, Z5cL, KcEq, Hw_J, y8J8, xVEK=None): def gXmz(YKHO, QpfX, aTqo, y8J8): sVuG = {'volume_state': {'migration_status': None}} YKHO._set_volume_state_and_notify('migrate_volume_to_host', sVuG, QpfX, aTqo, y8J8) try: v38h = YKHO.driver.host_passes_filters(QpfX, KcEq...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VKEh(YKHO, akib):\n try:\n YKHO._select_ds_for_volume(akib)\n except O9yk.VimException as excep:\n tO9_ = bGrB('Not able to find a suitable datastore for the volume: %s.') % akib['name']\n na1r.exception(tO9_)\n raise O9yk.VimFaultException([TFH0], tO9_)\n na1r.debug(bGrB('...
[ "0.75142914", "0.7012389", "0.6949686", "0.6785813", "0.6592035", "0.6564302", "0.65306294", "0.642781", "0.63973707", "0.63711596", "0.6347456", "0.63319904", "0.6319288", "0.6283314", "0.62553805", "0.6234933", "0.61976326", "0.6194039", "0.61337584", "0.61307514", "0.61055...
0.0
-1
Ensure that the host exists and can accept the volume.
def EPS2(YKHO, QpfX, rlUa, Z5cL, y8J8, xVEK=None): def bdmR(YKHO, QpfX, aTqo, y8J8): sVuG = {'volume_state': {'status': 'error'}} YKHO._set_volume_state_and_notify('manage_existing', sVuG, QpfX, aTqo, y8J8) C6of = NCls.volume_get(QpfX, Z5cL) try: YKHO.driver.host_passes_filters(QpfX...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VKEh(YKHO, akib):\n try:\n YKHO._select_ds_for_volume(akib)\n except O9yk.VimException as excep:\n tO9_ = bGrB('Not able to find a suitable datastore for the volume: %s.') % akib['name']\n na1r.exception(tO9_)\n raise O9yk.VimFaultException([TFH0], tO9_)\n na1r.debug(bGrB('...
[ "0.7513506", "0.7011488", "0.69478416", "0.67860246", "0.6591434", "0.6563433", "0.65310645", "0.64282036", "0.63965726", "0.63703424", "0.6347311", "0.63335615", "0.6318418", "0.6282421", "0.6254458", "0.6234337", "0.61973745", "0.6192946", "0.6133845", "0.6131098", "0.61045...
0.55693656
85
Decode the JSON file. Broken out for testing.
def u7gK(YKHO, nVrR): try: return qQXR.load(nVrR) except ValueError as e: na1r.exception(bGrB("Could not decode scheduler options: '%s'") % tTpl) return {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _AW0(qaEx):\n with open(qaEx, 'r') as nUeQ:\n return qQXR.loads(nUeQ.read())", "def QmYR(YKHO):\n with open(YKHO.filename) as nUeQ:\n cfoS = nUeQ.read()\n nUeQ.close()\n return qQXR.loads(cfoS)", "def x8I_(YKHO, nPrm):\n return qQXR.loads(g5Ba.decompress(nPrm).decode('utf8'...
[ "0.76069874", "0.7538672", "0.7307889", "0.72360003", "0.71327835", "0.7082829", "0.7049071", "0.698769", "0.6982604", "0.6969565", "0.69680566", "0.69635695", "0.6949339", "0.69308525", "0.6916256", "0.69071645", "0.6882395", "0.68768555", "0.6869987", "0.68505234", "0.68167...
0.0
-1
Stop serving this API.
def JCyR(YKHO): YKHO.server.stop()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CuqS(YKHO):\n YKHO.__api.stop()\n YKHO.__last_mode = 'stopped'", "def JCyR(YKHO):\n YKHO.stop_request = True", "def ZKHi(YKHO):\n try:\n bD7m = f'http://127.0.0.1:{YKHO.port}/api/kytos/core/_shutdown'\n Kf9k(bD7m)\n except VugH:\n pass", "def JCyR(YKHO):\n YKHO.serv...
[ "0.8033069", "0.7974783", "0.755994", "0.7541164", "0.7382386", "0.7378261", "0.73634756", "0.73311573", "0.73195714", "0.7288124", "0.72578996", "0.7250092", "0.7237886", "0.7227755", "0.7226614", "0.7197331", "0.71784145", "0.71676403", "0.7118425", "0.7118425", "0.7114427"...
0.75061435
4
Assert two dicts are equivalent. This is a 'deep' match in the sense that it handles nested dictionaries appropriately.
def bp0t(YKHO, AjzU, _sQW, jEht=False, D1sU=0.001): def m6q4(tO9_): t880 = AjzU MR87 = _sQW OmXF = 'Dictionaries do not match. %(msg)s d1: %(d1str)s d2: %(d2str)s' % {'msg': tO9_, 'd1str': t880, 'd2str': MR87} raise AssertionError(OmXF) U4jc = set(AjzU.keys()) BAMo = set(_sQ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pI4C(YKHO):\n jzdc = 'a'\n Fg_i = 'b'\n YKHO.assertTrue(hjJW({}, {}))\n YKHO.assertTrue(hjJW({jzdc: 1}, {jzdc: 1}))\n YKHO.assertTrue(hjJW({jzdc: 1, Fg_i: 2}, {jzdc: 1, Fg_i: 2}))\n YKHO.assertTrue(hjJW({Fg_i: 2, jzdc: 1}, {jzdc: 1, Fg_i: 2}))\n YKHO.assertFalse(hjJW({jzdc: 1}, {}))\n Y...
[ "0.8040615", "0.8026662", "0.802142", "0.79011714", "0.7862967", "0.78272796", "0.780934", "0.7780966", "0.77517843", "0.7730531", "0.77122337", "0.7681215", "0.7664303", "0.7663133", "0.76303566", "0.7557426", "0.75161004", "0.7514362", "0.74947506", "0.746989", "0.7424814",...
0.76147604
15
Test that attaching volume reserved for another instance fails.
def b5H5(YKHO): OaeV = QpfX.RequestContext('admin', 'fake', True) akib = NCls.volume_create(OaeV, {'status': 'available', 'host': 'test', 'provider_location': '', 'size': 1}) TJdH = YKHO.start_service('volume', host='test') hkxX = {'status': 'attaching', 'instance_uuid': xOu7.get_fake_uuid()} NCls.v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RnNZ(YKHO):\n OaeV = QpfX.RequestContext('admin', 'fake', True)\n akib = NCls.volume_create(OaeV, {'status': 'available', 'host': 'test', 'provider_location': '', 'size': 1})\n SQvy = {'initiator': 'iqn.2012-07.org.fake:01'}\n TJdH = YKHO.start_service('volume', host='test')\n YKHO.volume_api.re...
[ "0.8537491", "0.8060426", "0.80193967", "0.79246753", "0.76608616", "0.76427424", "0.7520679", "0.7505855", "0.7461547", "0.73958", "0.718863", "0.7115925", "0.71130025", "0.7104403", "0.70525247", "0.703044", "0.70097345", "0.6996646", "0.69946206", "0.6984783", "0.69762707"...
0.8554422
0
Replacement for db.service_get_by_host_and_topic. We stub the db.service_get_by_host_and_topic method to return something for a specific host, and raise an exception for anything else. We don't use the returned data (the code under test just use the call to check for existence of a host, so the content returned doesn't...
def bbhH(QpfX, KcEq, rlUa): if KcEq == 'host_ok': return {} raise AJ5d.ServiceNotFound(service_id=KcEq)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uoj3(QpfX, KcEq, rlUa):\n return gJE7.service_get_by_host_and_topic(QpfX, KcEq, rlUa)", "def VI19(YKHO, KcEq):\n if str(YKHO.conf.connect_by_host) == 'True' or KcEq == '':\n return nQ3j(result=KcEq)\n D8Ke = ''\n try:\n if KcEq in YKHO.hosts:\n D8Ke = YKHO.hosts[KcEq].add...
[ "0.758696", "0.6352862", "0.63410497", "0.60743815", "0.60553145", "0.6020252", "0.5997633", "0.59884465", "0.59509677", "0.59178376", "0.5908306", "0.5897447", "0.58876026", "0.58638936", "0.58600694", "0.57758063", "0.5729418", "0.5728087", "0.5723276", "0.56945544", "0.569...
0.82933295
0
Test successful manage volume execution. Tests for correct operation when valid arguments are passed in the request body. We ensure that cinder.volume.api.API.manage_existing got called with the correct arguments, and that we return the correct HTTP code to the caller.
def IKNV(YKHO, B1ls): TBsA = {'volume': {'host': 'host_ok', 'ref': 'fake_ref'}} Ylbp = YKHO._get_resp(TBsA) YKHO.assertEqual(Ylbp.status_int, 202, Ylbp) YKHO.assertEqual(B1ls.call_count, 1) qIxc = B1ls.call_args[0] YKHO.assertEqual(qIxc[1], TBsA['volume']['host']) YKHO.assertEqual(qIxc[2], T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NPQQ(YKHO, fu0N, zSc_):\n Ylbp = YKHO._get_resp(fSTu)\n YKHO.assertEqual(zSc_.call_count, 1)\n YKHO.assertEqual(len(zSc_.call_args[0]), 3, zSc_.call_args)\n YKHO.assertEqual(zSc_.call_args[0][1], fSTu)\n YKHO.assertEqual(fu0N.call_count, 1)\n YKHO.assertEqual(len(fu0N.call_args[0]), 3)\n Y...
[ "0.68980205", "0.6733443", "0.6672363", "0.6648577", "0.6600166", "0.6535547", "0.64957756", "0.6459358", "0.64001536", "0.6400061", "0.63520586", "0.6180184", "0.61225224", "0.6114497", "0.61075014", "0.61041975", "0.6102176", "0.6038132", "0.60380507", "0.6023973", "0.60183...
0.80558604
0
Return 404 if the volume does not exist.
def DH48(YKHO): Ylbp = YKHO._get_resp(Iw40) YKHO.assertEqual(Ylbp.status_int, 404, Ylbp)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gow0(YKHO, QpfX, Z5cL):\n qjHC = iaSE.get(Z5cL, None)\n if not qjHC:\n raise AJ5d.NotFound\n return qjHC", "def MRE5(YKHO):\n TBsA = {'volume': {'ref': 'fake_ref'}}\n Ylbp = YKHO._get_resp(TBsA)\n YKHO.assertEqual(Ylbp.status_int, 400)", "def m3fC(YKHO):\n YKHO.driver.do_setup(N...
[ "0.70013547", "0.69938505", "0.69470096", "0.6815802", "0.6749542", "0.67436796", "0.67196923", "0.6707635", "0.6701539", "0.66693157", "0.66567117", "0.6550059", "0.6540349", "0.65190655", "0.6494421", "0.64874613", "0.64575416", "0.63962203", "0.62871325", "0.6270078", "0.6...
0.6110917
30
Return 400 if the volume exists but is attached.
def S0Ya(YKHO): Ylbp = YKHO._get_resp(qlVB) YKHO.assertEqual(Ylbp.status_int, 400, Ylbp)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Mqu1(YKHO):\n TBsA = {'volume': {'host': 'host_ok'}}\n Ylbp = YKHO._get_resp(TBsA)\n YKHO.assertEqual(Ylbp.status_int, 400)\n pass", "def MRE5(YKHO):\n TBsA = {'volume': {'ref': 'fake_ref'}}\n Ylbp = YKHO._get_resp(TBsA)\n YKHO.assertEqual(Ylbp.status_int, 400)", "def seXX(YKHO):\n ...
[ "0.7539997", "0.74936837", "0.6877355", "0.6774026", "0.67673427", "0.6592954", "0.65502334", "0.65338075", "0.6504369", "0.6479083", "0.64678323", "0.64517593", "0.6427514", "0.64089465", "0.6386353", "0.6372049", "0.6369457", "0.63664913", "0.6327411", "0.6319702", "0.63080...
0.7063187
2
Return 400 if the volume exists but has snapshots.
def gOiD(YKHO): Ylbp = YKHO._get_resp(kzBA) YKHO.assertEqual(Ylbp.status_int, 400, Ylbp)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Mqu1(YKHO):\n TBsA = {'volume': {'host': 'host_ok'}}\n Ylbp = YKHO._get_resp(TBsA)\n YKHO.assertEqual(Ylbp.status_int, 400)\n pass", "def MRE5(YKHO):\n TBsA = {'volume': {'ref': 'fake_ref'}}\n Ylbp = YKHO._get_resp(TBsA)\n YKHO.assertEqual(Ylbp.status_int, 400)", "def seXX(YKHO):\n ...
[ "0.733694", "0.7275162", "0.70468503", "0.6840276", "0.677327", "0.6764266", "0.66233975", "0.6543667", "0.6533184", "0.65248835", "0.64396876", "0.6434955", "0.6405708", "0.63889897", "0.63164526", "0.6270722", "0.6260549", "0.6241059", "0.61974716", "0.6190096", "0.61858124...
0.7057626
2
Test offset key works with a medium sized number.
def vBkf(YKHO): qv1X = ZrWc.Request.blank('/?offset=10') YKHO.assertEqual(BJsk.limited(YKHO.tiny, qv1X), []) YKHO.assertEqual(BJsk.limited(YKHO.small, qv1X), YKHO.small[10:]) YKHO.assertEqual(BJsk.limited(YKHO.medium, qv1X), YKHO.medium[10:]) YKHO.assertEqual(BJsk.limited(YKHO.large, qv1X), YKHO.lar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def D1bJ(YKHO, vgXP: long) -> Swre:\n ...", "def rp1Q(YKHO, H5ew):\n gI7J = {'mchunk_size': 'size', 'mchunk_prev_size': 'prev_size'}\n wEf2 = YKHO.malloc_chunk\n Chpu = [gI7J[H5ew] if H5ew in gI7J else H5ew for H5ew in wEf2.keys()]\n try:\n return Chpu.index(H5ew) * imkg.gdblib.arch.ptrsize...
[ "0.62795204", "0.616259", "0.61570054", "0.6119335", "0.6041672", "0.60250306", "0.6010389", "0.5965471", "0.59077334", "0.59058696", "0.59058696", "0.59047663", "0.5895166", "0.5895166", "0.5892251", "0.5892251", "0.58898664", "0.58898664", "0.5883513", "0.5883513", "0.58800...
0.0
-1
Test offset key works with a number over 1000 (max_limit).
def bf1K(YKHO): qv1X = ZrWc.Request.blank('/?offset=1001') YKHO.assertEqual(BJsk.limited(YKHO.tiny, qv1X), []) YKHO.assertEqual(BJsk.limited(YKHO.small, qv1X), []) YKHO.assertEqual(BJsk.limited(YKHO.medium, qv1X), []) YKHO.assertEqual(BJsk.limited(YKHO.large, qv1X), YKHO.large[1001:2001])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def y95b(YKHO):\n gQVb = [1, 10, 25, 67, 99, 200]\n JaKZ = 0\n zpoV = []\n zpoV.append([{'Seek': None, 'Filter': [{'Low': 'A', 'High': 'Z'}, {'Low': 0, 'High': 100}]}])\n for vgXP in gQVb:\n for WE7e in YKHO.buckets:\n if not JaKZ:\n JaKZ = YKHO.create_index_using_re...
[ "0.66912484", "0.6561103", "0.6554489", "0.65246755", "0.6479261", "0.63569295", "0.6335894", "0.63276124", "0.630432", "0.6241358", "0.6231319", "0.62129515", "0.62104416", "0.6147391", "0.60943013", "0.60464555", "0.6027219", "0.6027219", "0.6027219", "0.6027219", "0.602721...
0.6802715
0
Test request with no offset or limit.
def jL6X(YKHO): qv1X = ZrWc.Request.blank('/') YKHO.assertEqual(BJsk.limited(YKHO.tiny, qv1X), YKHO.tiny) YKHO.assertEqual(BJsk.limited(YKHO.small, qv1X), YKHO.small) YKHO.assertEqual(BJsk.limited(YKHO.medium, qv1X), YKHO.medium) YKHO.assertEqual(BJsk.limited(YKHO.large, qv1X), YKHO.large[:1000])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FkBV(YKHO):\n qv1X = ZrWc.Request.blank('/?offset=0')\n YKHO.assertEqual(BJsk.limited(YKHO.tiny, qv1X), YKHO.tiny)\n YKHO.assertEqual(BJsk.limited(YKHO.small, qv1X), YKHO.small)\n YKHO.assertEqual(BJsk.limited(YKHO.medium, qv1X), YKHO.medium)\n YKHO.assertEqual(BJsk.limited(YKHO.large, qv1X), YK...
[ "0.7283082", "0.71709454", "0.6985844", "0.6942317", "0.68450737", "0.6831711", "0.67784905", "0.6778287", "0.6778287", "0.66536194", "0.65191966", "0.6510367", "0.643376", "0.6427049", "0.64046955", "0.6390556", "0.6371794", "0.6363646", "0.62861115", "0.6262528", "0.624105"...
0.6181637
24
Test request with both limit and offset.
def f3Xa(YKHO): DumB = range(2000) qv1X = ZrWc.Request.blank('/?offset=1&limit=3') YKHO.assertEqual(BJsk.limited(DumB, qv1X), DumB[1:4]) qv1X = ZrWc.Request.blank('/?offset=3&limit=0') YKHO.assertEqual(BJsk.limited(DumB, qv1X), DumB[3:1003]) qv1X = ZrWc.Request.blank('/?offset=3&limit=1500') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pZtp(YKHO):\n YKHO.request.GET = {'page': 1, 'page_size': 100}\n vgXP, qoqK = YKHO.paginator.get_offset_limit(VNUm(YKHO.request), 500)\n YKHO.assertEqual(vgXP, 0)\n YKHO.assertEqual(qoqK, 100)\n YKHO.request.GET = {'page': 2, 'page_size': 100}\n vgXP, qoqK = YKHO.paginator.get_offset_limit(VN...
[ "0.80404097", "0.77451223", "0.76549065", "0.7393697", "0.72638613", "0.72154933", "0.7169676", "0.7164434", "0.70906806", "0.70671", "0.70356", "0.70134485", "0.7003455", "0.6984918", "0.694818", "0.69020694", "0.68751353", "0.68651366", "0.68460745", "0.6777973", "0.6744101...
0.7873403
1