Search is not available for this dataset
id int64 0 10.8M | vector listlengths 1.54k 1.54k | ast_depth int64 3 164 | ast_data stringlengths 297 510k | full_path stringlengths 0 319 | code stringlengths 60 56.5k |
|---|---|---|---|---|---|
10,701 | [
0.06113491207361221,
-0.015245835296809673,
0.05941707268357277,
0.002609917661175132,
0.010528088547289371,
-0.04898371919989586,
-0.00807764008641243,
0.007142932619899511,
0.03887877240777016,
0.007692388724535704,
0.03635253757238388,
-0.0645705983042717,
-0.0334978923201561,
-0.017393... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "acc", "annotation": null, "type_comment": null}}], "kwarg": null,... | def apicalls_values(self, acc):
q = APICountBatch.all().filter("account_key =", acc.key().name())
values = {"success": "true"}
res = q.fetch(1000)
values['total'] = q.count() or 1
values['entry'] = []
for ii in res:
ent = {'date':ii.date.strftime("%Y-%m-%d"),
'count':str(ii.c... | |
10,702 | [
0.036200378090143204,
-0.007968833670020103,
0.07890082150697708,
-0.0065688188187778,
0.0049688019789755344,
-0.05120053514838219,
-0.02982531115412712,
0.02970031090080738,
0.016375171020627022,
-0.0089938435703516,
0.04067542403936386,
-0.03645038232207298,
-0.056650590151548386,
-0.043... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "acc", "annotation": null, "type_comment": null}}], "kwarg": null,... | def points_values(self, acc):
q = PointBatch.all().filter("account_key =", acc.key().name())
values = {"success": "true"}
res = q.fetch(1000)
values['total'] = q.count() or 1
values['entry'] = []
for ii in res:
ent = {'date':ii.date.strftime("%Y-%m-%d"),
'count':str(ii.counte... | |
10,703 | [
0.040767520666122437,
0.0034737703390419483,
-0.0003067823708988726,
-0.0024267921689897776,
0.0033348193392157555,
0.03725174441933632,
-0.011284098029136658,
0.020099395886063576,
0.016286328434944153,
-0.03003922663629055,
0.03179711475968361,
-0.05971653386950493,
0.011057899333536625,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class PerAccountClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
account_key = context['account_key']
account_ref = accounts_dao.get(account_key)
return Badges.all().filter('creator =', account_ref)
def execute(self, context, obj):
if not obj['result']:
return None
... | |
10,704 | [
0.04793431982398033,
0.038479994982481,
0.01015014760196209,
-0.008725372143089771,
0.018257012590765953,
0.02781074121594429,
-0.032537903636693954,
0.021769249811768532,
-0.006074625998735428,
-0.028893129900097847,
0.01780417561531067,
-0.07373491674661636,
0.022973131388425827,
0.00014... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class AllAccountsClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
return Accounts.all()
def execute(self, context, obj):
if not obj['result']:
return None
acc = obj['result']
if acc:
context['account_key'] = acc.key().name()
return "peraccount" | |
10,705 | [
0.00248719728551805,
0.005198662634938955,
0.004124043975025415,
-0.020570382475852966,
-0.032568734139204025,
0.03214511647820473,
-0.009836655110120773,
-0.003619440598413348,
0.004027483984827995,
-0.014751867391169071,
0.03608227148652077,
-0.027908938005566597,
0.018277863040566444,
-... | 18 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class PerBadgeClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
start_time = datetime.datetime.strptime(context['start_time'], "%Y-%m-%d %H:%M:%S")
end_time = datetime.datetime.strptime(context['end_time'], "%Y-%m-%d %H:%M:%S")
return Logs.all().filter("account =", context['account_... | |
10,706 | [
0.009016449563205242,
0.002746864687651396,
0.010430434718728065,
0.0006828904733993113,
-0.026712685823440552,
0.01619655452668667,
0.03910188749432564,
0.022893089801073074,
0.03462120518088341,
-0.0010558977955952287,
0.037045180797576904,
-0.0043307114392519,
0.008324760012328625,
-0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "... | def execute(self, context, obj):
# Create a counter initialized the count to 0
# This way we'll at least know when its a sum of 0
# rather than having nothing to signify that it ran
def tx():
batch_key = context['account_key'] + '-' + \
context['badgeid'] + '-' + \
... | |
10,707 | [
-0.019010143354535103,
-0.057256441563367844,
-0.02314114384353161,
0.017980530858039856,
-0.026192311197519302,
-0.021107034757733345,
0.037693824619054794,
0.02918069437146187,
-0.01995186135172844,
-0.030486542731523514,
0.035559263080358505,
0.009680858813226223,
-0.02118237130343914,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def tx():
batch = BadgeBatch.get_by_key_name(batch_key)
if not batch:
# For whatever reason it was not already created in previous state
end_time = datetime.datetime.strptime(context['end_time'], "%Y-%m-%d %H:%M:%S")
batch = BadgeBatch(key_name=batch_key,
badge... | |
10,708 | [
-0.00344956130720675,
-0.06857309490442276,
-0.007173892576247454,
0.01645037531852722,
-0.015554385259747505,
-0.03932798653841019,
0.028886714950203896,
0.0273575596511364,
-0.02305680699646473,
-0.03259013965725899,
0.0273575596511364,
-0.0037900374736636877,
-0.0242634080350399,
-0.040... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"... | def tx():
batch_key = context['account_key'] + '-' + \
context['badgeid'] + '-' + \
context['end_time']
batch = BadgeBatch.get_by_key_name(batch_key)
if not batch:
end_time = datetime.datetime.strptime(context['end_time'], "%Y-%m-%d %H:%M:%S")
batch... | |
10,709 | [
0.029397085309028625,
0.026133408769965172,
0.023565664887428284,
-0.020433975383639336,
-0.012682742439210415,
-0.01330668106675148,
-0.011974813416600227,
0.022317787632346153,
0.00445155892521143,
-0.03294873237609863,
0.025053516030311584,
-0.053274720907211304,
0.0011556354584172368,
... | 16 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class APICallsPerAccountClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
start_time = datetime.datetime.strptime(context['start_time'],
"%Y-%m-%d %H:%M:%S")
end_time = datetime.datetime.strptime(context['end_time'],
... | |
10,710 | [
0.04861028119921684,
0.025801196694374084,
0.020668577402830124,
0.009574752300977707,
0.012290667742490768,
-0.00611656391993165,
-0.024834515526890755,
0.027481380850076675,
0.014500225894153118,
-0.027895674109458923,
0.022682497277855873,
-0.08244414627552032,
0.022763052955269814,
0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class APICallsAllAccountsClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
return Accounts.all()
def execute(self, context, obj):
if not obj['result']:
return None
acc = obj['result']
if acc:
context['account_key'] = acc.key().name()
return "apicallsperacco... | |
10,711 | [
-0.0007452753488905728,
-0.042171068489551544,
0.019679002463817596,
0.029076628386974335,
-0.023014849051833153,
-0.050460897386074066,
0.04944022744894028,
0.04769762232899666,
-0.014899282716214657,
-0.03786434233188629,
0.03634578734636307,
-0.011470083147287369,
-0.0204880703240633,
-... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def tx():
batch = APICountBatch.get_by_key_name(batch_key)
if not batch:
# Initialize counter
end_time = datetime.datetime.strptime(context['end_time'], "%Y-%m-%d %H:%M:%S")
batch = APICountBatch(key_name=batch_key,
account_key=context['account_key'],
... | |
10,712 | [
0.02357413060963154,
0.007192209362983704,
0.012122982181608677,
0.01556012686342001,
-0.015752078965306282,
-0.00018735960475169122,
0.0213426873087883,
0.04796405881643295,
0.011979018338024616,
-0.021138736978173256,
0.02089879661798477,
-0.012416908517479897,
0.015200216323137283,
-0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "... | def execute(self, context, obj):
if not obj['result']:
return None
batch_key = context['account_key'] + '-' + \
context['end_time']
def tx():
batch = APICountBatch.get_by_key_name(batch_key)
if not batch:
# Initialize counter
end_time = datetime.datetime.str... | |
10,713 | [
0.02979036048054695,
0.036334697157144547,
0.022780194878578186,
-0.002911434043198824,
0.014406627975404263,
0.003749358933418989,
-0.044606007635593414,
0.018383219838142395,
0.006629548035562038,
-0.03837979957461357,
0.02851785160601139,
-0.05980795621871948,
0.01199794840067625,
-0.02... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class PointsAllAccountsClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
return Accounts.all()
def execute(self, context, obj):
if not obj['result']:
return None
acc = obj['result']
if acc:
context['account_key'] = acc.key().name()
return "pointsperaccount" | |
10,714 | [
0.007717054337263107,
-0.028941890224814415,
0.013719208538532257,
0.025981925427913666,
-0.014506183564662933,
-0.04470488429069519,
0.0538901761174202,
0.04411758854985237,
-0.02397337555885315,
-0.014964273199439049,
0.048040721565485,
-0.011246697045862675,
-0.016608698293566704,
-0.00... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "batch_key", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "count", "annotation": null, "type_comment": null}}], "kwarg"... | def tx(batch_key, count):
batch = APICountBatch.get_by_key_name(batch_key)
if not batch:
batch = APICountBatch(key_name=batch_key,
account_key=context_account[batch_key],
date=context_datetime[batch_key])
batch.put()
batch.counter += count
... | |
10,715 | [
0.010246001183986664,
0.028991665691137314,
0.034975625574588776,
-0.03341246768832207,
0.0005094759981147945,
-0.002479068236425519,
-0.02842990681529045,
0.009220180101692677,
-0.00006821635906817392,
-0.03600144386291504,
0.0415213406085968,
-0.047969359904527664,
-0.007687554229050875,
... | 18 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class PointsPerAccountClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
start_time = datetime.datetime.strptime(context['start_time'],
"%Y-%m-%d %H:%M:%S")
end_time = datetime.datetime.strptime(context['end_time'],
... | |
10,716 | [
0.01215724553912878,
0.014843633398413658,
0.03969421237707138,
0.002427279483526945,
-0.03454778343439102,
-0.010888508521020412,
0.012103636749088764,
0.04009925574064255,
0.0098401615396142,
-0.0314265675842762,
0.02232501469552517,
-0.011365029029548168,
0.010423899628221989,
-0.023873... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "... | def execute(self, context, obj):
if not obj['result']:
return None
batch_key = context['account_key'] + '-' + \
context['end_time']
end_time = datetime.datetime.strptime(context['end_time'], "%Y-%m-%d %H:%M:%S")
context['points'] = obj['result'].points
if not context['points']... | |
10,717 | [
-0.028009366244077682,
-0.017307348549365997,
0.04269299656152725,
0.013970160856842995,
-0.036340828984975815,
-0.044764354825019836,
0.049850691109895706,
0.04499450698494911,
-0.026559416204690933,
-0.03698525205254555,
0.04428103566169739,
0.011006968095898628,
-0.03005770966410637,
-0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "batch_key", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "count", "annotation": null, "type_comment": null}}], "kwarg"... | def tx(batch_key, count):
batch = PointBatch.get_by_key_name(batch_key)
if not batch:
batch = PointBatch(key_name=batch_key,
account_key=context_account[batch_key],
date=context_datetime[batch_key])
batch.put()
batch.counter += int(count)
... | |
10,718 | [
-0.019994892179965973,
-0.01795758493244648,
0.046138305217027664,
0.015517694875597954,
-0.04845619946718216,
-0.052799202501773834,
0.04157571122050285,
0.037330303341150284,
-0.019445916637778282,
-0.056312642991542816,
0.029107877984642982,
-0.000240939058130607,
-0.029034681618213654,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def tx():
batch = PointBatch.get_by_key_name(batch_key)
if not batch:
# Initialize counter
batch = PointBatch(key_name=batch_key,
account_key=context['account_key'],
date=end_time)
batch.put() | |
10,719 | [
0.030631188303232193,
0.018074654042720795,
-0.00568140996620059,
0.013716465793550014,
-0.0023198621347546577,
0.0224103182554245,
-0.03308618813753128,
0.012860594317317009,
0.01525928732007742,
-0.03689256310462952,
0.029775317758321762,
-0.058469533920288086,
0.01734265871345997,
-0.02... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class BadgePointsAllAccountsClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
return Accounts.all()
def execute(self, context, obj):
if not obj['result']:
return None
acc = obj['result']
if acc:
context['account_key'] = acc.key().name()
return "peraccount" | |
10,720 | [
0.020999424159526825,
0.01933586411178112,
-0.00031361260334961116,
0.002094517694786191,
-0.010101904161274433,
0.0270509235560894,
-0.013465187512338161,
0.01048765704035759,
0.015996690839529037,
-0.025339143350720406,
0.041299670934677124,
-0.058875538408756256,
0.002233147621154785,
-... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class BadgePointsPerAccountClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
account_key = context['account_key']
account_ref = accounts_dao.get(account_key)
return Badges.all().filter('creator =', account_ref)
def execute(self, context, obj):
if not obj['result']:
ret... | |
10,721 | [
-0.008191079832613468,
0.0029722265899181366,
0.00986087042838335,
-0.019964618608355522,
-0.030456973239779472,
0.00001066744516720064,
-0.028999703004956245,
-0.000919143611099571,
0.009879086166620255,
-0.028975414112210274,
0.04391244798898697,
-0.03113703429698944,
-0.001785157597623765... | 18 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"... | class PerBadgePointsClass(DatastoreContinuationFSMAction):
def getQuery(self, context, obj):
start_time = datetime.datetime.strptime(context['start_time'], "%Y-%m-%d %H:%M:%S")
end_time = datetime.datetime.strptime(context['end_time'], "%Y-%m-%d %H:%M:%S")
return Logs.all().filter("account =", context['ac... | |
10,722 | [
-0.005183747038245201,
-0.003067505545914173,
0.018472522497177124,
-0.008548522368073463,
-0.030029095709323883,
-0.01084955409169197,
0.016737107187509537,
0.024912837892770767,
0.03509393706917763,
-0.014770304784178734,
0.04604632779955864,
-0.0025308127515017986,
0.0008853827021084726,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "... | def execute(self, context, obj):
# Create a counter initialized the count to 0
# This way we'll at least know when its a sum of 0
# rather than having nothing to signify that it ran
end_time = datetime.datetime.strptime(context['end_time'], "%Y-%m-%d %H:%M:%S")
def tx():
batch_key = context['a... | |
10,723 | [
-0.008852271363139153,
-0.0646873489022255,
0.006685968954116106,
0.017052840441465378,
-0.022254379466176033,
-0.052136074751615524,
0.012074570171535015,
0.02573011815547943,
-0.009799650870263577,
-0.036205608397722244,
0.043567415326833725,
-0.011290115304291248,
-0.03190920874476433,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"... | def tx():
batch_key = context['account_key'] + '-' + \
context['badgeid'] + '-' + \
context['end_time']
batch = BadgePointsBatch.get_by_key_name(batch_key)
if not batch:
batch = BadgePointsBatch(key_name=batch_key,
badgeid=context['ba... | |
10,724 | [
-0.03422136232256889,
-0.05101054534316063,
-0.000900483806617558,
0.010204491205513477,
-0.031196925789117813,
-0.037531569600105286,
0.013871915638446808,
0.03681713715195656,
-0.0009198330226354301,
-0.036555178463459015,
0.045461781322956085,
-0.0064060864970088005,
-0.041056107729673386... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def tx():
batch = BadgePointsBatch.get_by_key_name(batch_key)
if not batch:
end_time = datetime.datetime.strptime(context['end_time'], "%Y-%m-%d %H:%M:%S")
batch = BadgePointsBatch(key_name=batch_key,
badgeid=context['badgeid'],
account_key=conte... | |
10,725 | [
0.01922980509698391,
0.01981615275144577,
0.07486101984977722,
-0.011649169959127903,
0.02182648703455925,
-0.02204187959432602,
0.01602284424006939,
-0.016680989414453506,
0.010793580673635006,
0.06729833781719208,
-0.007700298447161913,
-0.011457709595561028,
0.011248299852013588,
-0.041... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def get_example_tree():
t = Tree("((a,b),c);")
right_c0_r0 = TextFace("right_col0_row0")
right_c0_r1 = TextFace("right_col0_row1")
right_c1_r0 = TextFace("right_col1_row0")
right_c1_r1 = TextFace("right_col1_row1")
right_c1_r2 = TextFace("right_col1_row2")
top_c0_r0 = TextFace("top_col0_ro... | |
10,726 | [
0.01141930278390646,
0.01055032666772604,
-0.020311644300818443,
-0.0308992899954319,
0.017390180379152298,
0.02172972820699215,
0.033330291509628296,
-0.010699599049985409,
0.0033079725690186024,
-0.014500701799988747,
-0.011952416971325874,
0.0067012435756623745,
0.0012974663404747844,
0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "optimizer", "annotation": null, "type_comment": null}}, {"_type":... | def update_op(self, optimizer, g, *args):
if isinstance(g, ops.Tensor):
update_op = optimizer._apply_dense(g, self._v, *args) # pylint: disable=protected-access
if self._v.constraint is not None:
with ops.control_dependencies([update_op]):
return self._v.assign(self._v.constraint(self... | |
10,727 | [
0.02345154620707035,
0.044377539306879044,
0.011624299921095371,
-0.002687626052647829,
0.026856528595089912,
0.02356429398059845,
0.03653029352426529,
-0.006590109784156084,
0.016562653705477715,
-0.010333336889743805,
0.0028567477129399776,
0.029900720342993736,
-0.013631210662424564,
0.... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "optimizer", "annotation": null, "type_comment": null}}, {"_type":... | def update_op(self, optimizer, g, *args):
# pylint: disable=protected-access
update_op = optimizer._resource_apply_dense(g, self._v.op.inputs[0], *args)
if self._v.constraint is not None:
with ops.control_dependencies([update_op]):
return self._v.assign(self._v.constraint(self._v))
else:
... | |
10,728 | [
0.022590454667806625,
0.020124057307839394,
-0.002823806833475828,
-0.02267776057124138,
0.013510619290173054,
0.030731748789548874,
0.03012060560286045,
-0.013521532528102398,
-0.004062462132424116,
-0.010072941891849041,
0.011546231806278229,
-0.011491665616631508,
0.000701177108567208,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "optimizer", "annotation": null, "type_comment": null}}, {"_type":... | def update_op(self, optimizer, g, *args):
# pylint: disable=protected-access
if isinstance(g, ops.IndexedSlices):
if self._v.constraint is not None:
raise RuntimeError(
"Cannot use a constraint function on a sparse variable.")
return optimizer._resource_apply_sparse_duplicate_ind... | |
10,729 | [
0.032708026468753815,
0.01368818897753954,
-0.008971313014626503,
-0.014993899501860142,
0.06789690256118774,
-0.009330383501946926,
0.012687145732343197,
0.05026981979608536,
0.011838434264063835,
-0.06149892508983612,
0.02345925010740757,
-0.0006899179425090551,
0.002255069324746728,
-0.... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "verb", "annotation": null, "type_comment": null}}, {"_type": "arg... | def make_request(self, verb, resource, headers=None, data='',
expected_status=None, params=None):
if headers is None:
headers = {}
response = super(ElasticTranscoderConnection, self).make_request(
verb, resource, headers=headers, data=data, params=params)
... | |
10,730 | [
0.012822186574339867,
-0.035914674401283264,
0.041185785084962845,
-0.004850154276937246,
-0.01750761829316616,
0.02524694800376892,
0.04011901095509529,
0.056225184351205826,
-0.047439999878406525,
-0.010631119832396507,
0.007922354154288769,
0.022590475156903267,
-0.02744324505329132,
-0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v... | def __init__(self, **kwargs):
region = kwargs.get('region')
if not region:
region = RegionInfo(self, self.DefaultRegionName,
self.DefaultRegionEndpoint)
else:
del kwargs['region']
kwargs['host'] = region.endpoint
super(Elast... | |
10,731 | [
0.018296392634510994,
-0.004172341898083687,
-0.01873107999563217,
0.00030337568023242056,
-0.030744263902306557,
0.027082350105047226,
0.0018029653001576662,
-0.015767302364110947,
0.0017519224202260375,
0.027424830943346024,
0.03358948975801468,
-0.0014045017305761576,
-0.00357299973256886... | 17 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "what", "annotation": null, "type_comment": null}}], "kwarg": null... | def changed(self, what):
if self.instance:
self.text = "Ref: X:X:X:XXXX:XXX:X:XXXXXX:X:X:X"
if what[0] != self.CHANGED_CLEAR:
service = self.source.service
marker = (service.flags & eServiceReference.isMarker == eServiceReference.isMarker)
bouquet = (service.flags & eServiceReference.flagDirectory =... | |
10,732 | [
-0.0035126113798469305,
0.01911057159304619,
0.0021784945856779814,
-0.008756964467465878,
-0.08022509515285492,
0.0044276099652051926,
0.008468341082334518,
-0.030581826344132423,
-0.038810670375823975,
-0.0025315978564321995,
0.022156471386551857,
-0.017059501260519028,
-0.0117537379264831... | 18 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class ODShowReference(VariableText, Renderer):
def __init__(self):
Renderer.__init__(self)
VariableText.__init__(self)
GUI_WIDGET = eLabel
def connect(self, source):
Renderer.connect(self, source)
self.changed((self.CHANGED_DEFAULT,))
def changed(self, what):
if self.instance:
self.text = "Ref:... | |
10,733 | [
0.01829896867275238,
-0.0033043159637600183,
0.024491166695952415,
-0.02163044363260269,
0.0009663992095738649,
-0.021256256848573685,
-0.06291176378726959,
-0.0015035391552373767,
-0.020701011642813683,
0.02851066365838051,
0.024406673386693,
-0.10718657821416855,
0.017876500263810158,
-0... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def languages(self):
# And we now have the old best_matches code that webob ditched!
al = self.accept_language
try:
items = [i for i, q in sorted(al._parsed, key=lambda iq: -iq[1])]
for index, item in enumerate(items):
if al._match(item, self.language):
... | |
10,734 | [
-0.0003769249888136983,
0.011101281270384789,
0.06179841235280037,
-0.054238785058259964,
-0.039979975670576096,
-0.009472581557929516,
0.009887438267469406,
0.017424017190933228,
-0.01472744345664978,
0.008673596195876598,
0.009779882617294788,
0.0033092573285102844,
0.0230169128626585,
0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def runTest(self):
sampleRuns = ["2889,2885,2881",
"2887,2883,2879",
"3187,3177,3167"]
sampleTransmissionRuns = ["2871",
"2869",
"3172"]
beamRuns = "2866,2867+2868,2878"
transm... | |
10,735 | [
-0.011446766555309296,
0.033565111458301544,
0.032139215618371964,
-0.010937518440186977,
0.004028718918561935,
0.03134705498814583,
-0.05658312886953354,
-0.03553420305252075,
-0.026775136590003967,
0.01636384055018425,
0.009189100004732609,
0.003162996843457222,
0.01175797451287508,
0.00... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ns", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "depth", "annotation": null, "type_comment": null}}], "kwarg": null,... | def print_namespace(ns, depth):
attributes = ("name", "alias_of", "declarations", "namespaces")
# [(method, arg),...]
methods = [(gcc.NamespaceDecl.unalias, None),
(gcc.NamespaceDecl.lookup, "foo")]
for attr in attributes:
try:
indent_print(depth, (attr, ns.__getattribute__(attr)))
except E... | |
10,736 | [
0.02899721823632717,
0.042665302753448486,
0.07280153036117554,
-0.013110444881021976,
0.011597701348364353,
0.012979933060705662,
-0.05040105804800987,
-0.04515688121318817,
-0.02043093740940094,
0.03955676406621933,
0.014403692446649075,
-0.00939087476581335,
0.008364582434296608,
-0.011... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "ns", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "depth", "annotation": null, "type_comment": null}}], "kwarg": null,... | def dump_namespaces(ns, depth):
# ignore builtin's they would just make stdout.txt painful.
if ns.is_builtin == False:
print_namespace(ns, depth)
# aliases of namespaces in particular will occur
# within declarations, but we don't want to call
# declarations on them (here).
if ns.alias_of == None:
... | |
10,737 | [
0.021622434258461,
0.02003171294927597,
0.015839029103517532,
-0.03931351378560066,
-0.016645751893520355,
0.05622059851884842,
-0.002236950444057584,
0.001737009733915329,
0.02772398106753826,
0.05108484625816345,
-0.0027283693198114634,
-0.07021893560886383,
0.0037637578789144754,
-0.000... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def main():
module = AnsibleModule(
argument_spec=dict(
desc=dict(type='str'),
),
)
results = dict(msg="you just ran me.mycoll2.module1", desc=module.params.get('desc'))
module.exit_json(**results) | |
10,738 | [
0.024734677746891975,
-0.009373276494443417,
0.018669618293642998,
-0.06262528151273727,
0.026260560378432274,
-0.014002213254570961,
-0.03608262538909912,
0.012764837592840195,
-0.03356940671801567,
0.007154976949095726,
0.03590311110019684,
-0.015258821658790112,
-0.011136375367641449,
-... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "host", "annotation": null, "type_comment": null}}, {"_type": "arg... | def __init__(self, host="193.54.21.49", port=23456):
#membre publique
self.nomAction=[]
#membres privés
#On définit un dictionnaire qui permettra la communication client/serveur avec des messages très courts
self.__message={"TOP":"1","SOLDE":"2","OPERATIONS":"3","ACHATS":"4 ","VENTES":"5 ","HISTO":"6 ","ASK... | |
10,739 | [
0.018632398918271065,
0.040877923369407654,
0.09427191317081451,
-0.02609480544924736,
-0.025575270876288414,
0.00481159845367074,
0.02493765950202942,
-0.02873970754444599,
-0.028645247220993042,
0.004950338043272495,
-0.017534291371703148,
-0.017451638355851173,
0.01873866654932499,
0.00... | 17 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {... | class Migration(migrations.Migration):
dependencies = [
('schools', '0008_meetingreport'),
]
operations = [
migrations.CreateModel(
name='SchoolGIS',
fields=[
('code', models.IntegerField(serialize=False, primary_key=True)),
('name', ... | |
10,740 | [
0.0031985363457351923,
0.017197653651237488,
0.05294303223490715,
0.014346097595989704,
-0.02373351901769638,
-0.0008848021971061826,
0.023531638085842133,
-0.01820705272257328,
-0.01935524493455887,
-0.020541291683912277,
0.011242193169891834,
-0.02008706144988537,
0.011355750262737274,
-... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "group_tbl"}}, "targets": [{"_type": "Name", "_fields": {"id": "GROUP_TABLE_NAME", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comm... | class SObjectGroupWdg(Widget):
GROUP_TABLE_NAME = 'group_tbl'
ADD_LABEL = 'Add'
def __init__(my, item_cls, container_cls, grouping_cls, name="SObjectGroupWdg"):
my.item_cls = item_cls
my.item_sobj = my.container_sobj = None
my.container_cls = container_cls
my.grouping_cls ... | |
10,741 | [
0.005847863387316465,
0.047811105847358704,
0.05278973653912544,
0.0284647885710001,
-0.020117461681365967,
-0.03387634456157684,
0.013062145560979843,
0.01147250086069107,
-0.021456822752952576,
0.009165824390947819,
0.014340625144541264,
-0.039829056710004807,
0.009882855229079723,
-0.02... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "my", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}... | def init(my):
# List the items
search = Search(my.item_cls.SEARCH_TYPE)
my._order_search(search)
items = search.get_sobjects()
if items:
my.item_sobj = items[0]
#select = MultiSelectWdg("item_ids")
#select.set_search_for_... | |
10,742 | [
0.01808278262615204,
0.011412695981562138,
0.06289663165807724,
-0.0013378214789554477,
-0.05031730607151985,
-0.00618504686281085,
0.003537935670465231,
-0.004146612714976072,
-0.021760206669569016,
-0.03056066296994686,
-0.008026929572224617,
-0.017245851457118988,
0.015825605019927025,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "my", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}... | def _get_target_span(my):
# get the target span
search = Search(my.container_cls.SEARCH_TYPE)
my._order_search(search)
groups = search.get_sobjects()
if groups:
my.container_sobj = groups[0]
target_span = SpanWdg(css='med')
group_table = Table... | |
10,743 | [
0.02385624684393406,
0.042585793882608414,
0.016166197136044502,
0.0008936123922467232,
-0.02886902168393135,
-0.04260857775807381,
-0.014537044800817966,
0.03429193049669266,
-0.03700338676571846,
-0.0028567116241902113,
0.019766278564929962,
-0.06963198632001877,
0.0023582822177559137,
-... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "my", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}... | def get_items(my):
if not my.item_sobj:
return []
search = Search( my.item_cls.SEARCH_TYPE )
query = "%s in (select %s from %s where \
%s = '%s')" % (my.item_sobj.get_primary_key(), \
my.item_sobj.get_foreign_key(), \
SearchType.get(my.grouping_cls... | |
10,744 | [
0.028592541813850403,
0.026819895952939987,
0.04070178046822548,
0.057139039039611816,
-0.008201362565159798,
-0.03787015378475189,
0.02385013923048973,
-0.020650168880820274,
-0.0184631384909153,
-0.006031598895788193,
0.02884577587246895,
-0.023965245112776756,
0.004284852184355259,
-0.0... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "my", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "group", "annotation": nu... | class ItemInContainerWdg(HtmlElement):
def __init__(my, group, item_sobj, item_cls, grouping_cls):
my.group = group
my.item_cls = item_cls
my.item_sobj = item_sobj
my.grouping_cls = grouping_cls
super(ItemInContainerWdg, my).__init__('div')
def init(my):
ass... | |
10,745 | [
0.015664376318454742,
0.03653842210769653,
0.04302104562520981,
0.005713548511266708,
-0.007519843056797981,
0.030008653178811073,
0.014509289525449276,
0.024987567216157913,
0.0228424072265625,
-0.008350797928869724,
0.03842427581548691,
-0.05195527896285057,
0.023019205778837204,
0.00461... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "remove_cmd"}}, "targets": [{"_type": "Name", "_fields": {"id": "REMOVE_CMD", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment":... | class SObjectGroupCmd(Command):
REMOVE_CMD = 'remove_cmd'
def get_title(my):
return "Associate sobjects by grouping"
def check(my):
my.add = WebContainer.get_web().get_form_value(\
SObjectGroupWdg.ADD_LABEL) != ''
my.remove = WebContainer.get_web().get_form... | |
10,746 | [
0.016934005543589592,
0.019163521006703377,
0.025272134691476822,
0.04727087914943695,
-0.011630852706730366,
-0.02299107052385807,
0.03567224368453026,
-0.013325542211532593,
-0.0046716718934476376,
0.00266124214977026,
0.01078028604388237,
-0.026831507682800293,
-0.003872655099257827,
-0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "my", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}... | def get_display(my):
#my.init()
item_table = Table(css='minimal')
item_table.add_style('margin-left','30px')
for item in my.items:
item_table.add_row()
space_td = item_table.add_blank_cell()
item_td = item_table.add_cell(item.get_... | |
10,747 | [
0.03965461254119873,
0.0249775443226099,
0.04058298468589783,
0.02785106748342514,
-0.0236734077334404,
-0.017550593242049217,
0.06304066628217697,
0.02214822918176651,
-0.014533394016325474,
-0.04312494397163391,
0.027033217251300812,
-0.007531945127993822,
0.014091313816606998,
-0.036913... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "my", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "item_value", "annotation": null, "type_comment": null}}, {"_type": ... | def create_grouping(my, item_value, container_value):
grouping = my._get_existing_grouping(item_value, container_value)
if grouping:
return grouping
sobject = SObjectFactory.create( my.grouping_search_type )
sobject.set_value( my.item_foreign_key, item_value)
sobject.... | |
10,748 | [
0.025735611096024513,
0.0462338887155056,
0.006891230121254921,
0.03280225396156311,
-0.0017588298069313169,
0.022214820608496666,
0.026963504031300545,
0.008438624441623688,
0.0007733056554570794,
0.012441802769899368,
0.03503250703215599,
-0.0310481246560812,
0.0190573837608099,
0.015899... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "my", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}... | def check(my):
my.add = WebContainer.get_web().get_form_value(\
SObjectGroupWdg.ADD_LABEL) != ''
my.remove = WebContainer.get_web().get_form_value(\
SObjectGroupCmd.REMOVE_CMD) != ''
if my.add or my.remove:
if my.grouping_search_type and my.item_foreign_key an... | |
10,749 | [
-0.0007917898474261165,
0.05161023139953613,
0.058849453926086426,
-0.0038135184440761805,
-0.00949840061366558,
-0.029178494587540627,
0.009861592203378677,
-0.00952302385121584,
0.0018805970903486013,
0.03553128242492676,
0.019600069150328636,
0.0035211178474128246,
-0.025534261018037796,
... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "POLYGONS"}}, "targets": [{"_type": "Name", "_fields": {"id": "POLYGONS", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": nul... | class PointsInPolygonWeighted(GeoAlgorithm):
POLYGONS = 'POLYGONS'
POINTS = 'POINTS'
OUTPUT = 'OUTPUT'
FIELD = 'FIELD'
WEIGHT = 'WEIGHT'
# =========================================================================
# def getIcon(self):
# return QIcon(os.path.dirname(__file__) + "/icon... | |
10,750 | [
0.015759509056806564,
0.04064294323325157,
0.0259812343865633,
-0.0013425161596387625,
-0.02374904416501522,
-0.022907396778464317,
0.02798166684806347,
0.06362352520227432,
0.020504439249634743,
0.022578058764338493,
0.01800389774143696,
-0.0505475252866745,
0.033226706087589264,
-0.04149... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "my", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}... | def execute(my):
web = WebContainer.get_web()
if my.add:
my.description = "Add items for [%s]" % my.grouping_search_type
item_ids = web.get_form_values("item_ids")
container_ids = web.get_form_values("container_ids")
for item_id in item_ids:
... | |
10,751 | [
-0.01036758255213499,
0.03584591671824455,
0.05779927223920822,
-0.018739406019449234,
-0.0011323343496769667,
-0.01671772636473179,
0.015758724883198738,
-0.004739928990602493,
0.0064408606849610806,
0.03994110971689224,
0.03167296573519707,
-0.014099911786615849,
0.006570455152541399,
-0... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "progress", "annotation": null, "type_comment": null}}], "kwarg": ... | def processAlgorithm(self, progress):
polyLayer = dataobjects.getObjectFromUri(
self.getParameterValue(self.POLYGONS))
pointLayer = dataobjects.getObjectFromUri(
self.getParameterValue(self.POINTS))
fieldName = self.getParameterValue(self.FIELD)
fieldIdx =... | |
10,752 | [
-0.0013414015993475914,
0.05543746054172516,
0.032297708094120026,
0.029726622626185417,
-0.023090779781341553,
-0.02327442727982998,
-0.01699363812804222,
-0.00014902336988598108,
0.03364446386694908,
0.048434317111968994,
0.007364317774772644,
0.0015173983993008733,
0.00917631946504116,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def defineCharacteristics(self):
self.name = 'Count points in polygon(weighted)'
self.group = 'Vector analysis tools'
self.addParameter(ParameterVector(self.POLYGONS, 'Polygons',
[ParameterVector.VECTOR_TYPE_POLYGON]))
self.addParameter(ParameterVector(self.POI... | |
10,753 | [
0.0006725307321175933,
-0.00039825416752137244,
-0.06391597539186478,
-0.05278317257761955,
0.008062739856541157,
0.027099594473838806,
0.023913560435175896,
0.03830564394593239,
-0.03320310637354851,
0.021154772490262985,
0.027783187106251717,
-0.05644528195261955,
-0.005508419591933489,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "^http://(?:www\\.)?13\\.cl/(?:[^/?#]+/)*(?P<id>[^/?#]+)"}}, "targets": [{"_type": "Name", "_fields": {"id": "_VALID_URL", "ctx": {"_type"... | class Canal13clIE(InfoExtractor):
_VALID_URL = r'^http://(?:www\.)?13\.cl/(?:[^/?#]+/)*(?P<id>[^/?#]+)'
_TEST = {
'url': 'http://www.13.cl/t13/nacional/el-circulo-de-hierro-de-michelle-bachelet-en-su-regreso-a-la-moneda',
'md5': '4cb1fa38adcad8fea88487a078831755',
'info_dict': {
... | |
10,754 | [
0.012744919396936893,
0.0069435760378837585,
-0.06165655329823494,
-0.025249367579817772,
0.005488731898367405,
-0.0009077748982235789,
-0.019177496433258057,
0.01009373553097248,
-0.004848479758948088,
0.04655502364039421,
0.02909689024090767,
-0.052855342626571655,
0.0195622481405735,
-0... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}], "kwarg": null,... | def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
display_id = mobj.group('id')
webpage = self._download_webpage(url, display_id)
title = self._html_search_meta(
'twitter:title', webpage, 'title', fatal=True)
description = self._html_search_meta(
... | |
10,755 | [
0.06278456747531891,
0.0032917812932282686,
0.0019649178721010685,
-0.041438739746809006,
-0.04129952937364578,
0.0018663094379007816,
0.01216943934559822,
-0.0661720559000969,
-0.01424601674079895,
-0.016682226210832596,
0.0506267249584198,
-0.020185723900794983,
-0.030278587713837624,
-0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "step", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "old_name", "annotation": null, "type_comment": null}}, {"_type": ... | def change_assignment_name(step, old_name, new_name):
name_id = '#course-grading-assignment-name'
index = get_type_index(old_name)
f = world.css_find(name_id)[index]
assert_not_equal(index, -1)
for __ in xrange(len(old_name)):
f._element.send_keys(Keys.END, Keys.BACK_SPACE)
f._element.se... | |
10,756 | [
0.028298819437623024,
0.04280644282698631,
0.034490786492824554,
-0.0312412828207016,
-0.034976933151483536,
0.021799813956022263,
-0.0005505124572664499,
-0.02385953813791275,
-0.010592867620289326,
0.0447254404425621,
0.026661274954676628,
-0.06197083368897438,
-0.027889434248209,
0.0191... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "_step", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [... | def cannot_edit_fail(_step):
range_css = 'span.letter-grade'
ranges = world.css_find(range_css)
assert_equal(len(ranges), 2)
assert_not_equal(ranges.last.value, 'Failure')
# try to change the grade range -- this should throw an exception
try:
ranges.last.value = 'Failure'
except (In... | |
10,757 | [
0.00664809625595808,
0.01928005740046501,
0.03024277463555336,
-0.04172532632946968,
-0.009715115651488304,
-0.010119430720806122,
0.024813398718833923,
0.023184586316347122,
0.007514486089348793,
0.06912633776664734,
0.0029081811662763357,
-0.00926459301263094,
0.02705446071922779,
-0.030... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def _set_args(self):
self.argparser.add_argument('rpath', help='Optional, upload as rpath', nargs='?')
self.argparser.add_argument('-startpath', help='Upload in first writable subdirectory', metavar='STARTPATH', default='.')
self.argparser.add_argument('-force', action='store_true')
... | |
10,758 | [
0.012182463891804218,
0.005015394184738398,
0.03519793227314949,
-0.0026616102550178766,
-0.021628692746162415,
0.028954340144991875,
0.03950128331780434,
-0.027188224717974663,
-0.0023351276759058237,
0.02256149984896183,
0.061291661113500595,
0.004082587081938982,
-0.029824960976839066,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "_step", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "grace_period", "annotation": null, "type_comment": null}}], "kwa... | def i_change_grace_period(_step, grace_period):
grace_period_css = '#course-grading-graceperiod'
ele = world.css_find(grace_period_css).first
# Sometimes it takes a moment for the JavaScript
# to populate the field. If we don't wait for
# this to happen, then we can end up with
# an invalid va... | |
10,759 | [
-0.006343281362205744,
0.000949291861616075,
0.03221305459737778,
-0.027586044743657112,
0.018709221854805946,
-0.003715440398082137,
0.03098086267709732,
0.044358961284160614,
0.0120201725512743,
-0.00302704656496644,
0.003413678612560034,
-0.043554265052080154,
0.03168497234582901,
0.018... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def _probe(self):
if not self.args['just_run']:
try:
Phpproxy._probe(self)
except ProbeSucceed:
pass
if not self.args['just_install']:
self.pid = Popen([executable, self._get_local_proxy_path(), self.args['lhost'], str(self... | |
10,760 | [
0.0025907973758876324,
0.02143678441643715,
-0.002126541454344988,
-0.038012903183698654,
0.005075657274574041,
-0.02918892353773117,
0.039433714002370834,
0.05728108063340187,
0.024826787412166595,
0.01641409657895565,
-0.0030986748170107603,
-0.04352165758609772,
0.03237951546907425,
-0.... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def _prepare(self):
if not self.args['just_run']:
Phpproxy._prepare(self)
else:
if not url_validator.match(self.args['just_run']):
raise ProbeException(self.name, '\'%s\': %s' % (self.args['just_run'], WARN_NOT_URL) )
self.args['u... | |
10,761 | [
-0.028523391112685204,
0.009251588024199009,
0.04005842283368111,
0.02183576673269272,
0.017313765361905098,
0.0018682709196582437,
0.009470394812524319,
-0.022273380309343338,
0.026324106380343437,
0.058123983442783356,
0.027244215831160545,
-0.034470438957214355,
0.01774015836417675,
0.0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class AbspathTest(unittest.TestCase):
def platforminfo(self):
return SystemHost().platform
def test_abspath_to_uri_cygwin(self):
if sys.platform != 'cygwin':
return
self.assertEqual(path.abspath_to_uri(self.platforminfo(), '/cygdrive/c/foo/bar.html'),
... | |
10,762 | [
0.03927641734480858,
-0.0024981307797133923,
-0.0231305081397295,
-0.0010577065404504538,
0.031071903184056282,
-0.01915981061756611,
0.03602331504225731,
0.02401554398238659,
0.00637464364990592,
0.021623557433485985,
-0.03088054433465004,
-0.02176707610487938,
0.005935116205364466,
-0.04... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def _stringify_result(self):
Phpproxy._stringify_result(self)
rpath = ' '
if self.args['rpath']:
rpath = '\'%s\' ' % self.args['rpath']
self._result.append(self.pid)
self._output = """Proxy daemon spawned, set \'http://%s:%i\' as HTTP p... | |
10,763 | [
0.013205303810536861,
0.023990605026483536,
-0.02150079421699047,
-0.0061430842615664005,
-0.050447750836610794,
0.0615239180624485,
0.009226260706782341,
0.014729440212249756,
0.03827792778611183,
0.05905737727880478,
-0.004220461472868919,
-0.048958517611026764,
0.008667798712849617,
0.0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a... | def main():
argument_spec = dict(
confirm=dict(default=False, type='bool')
)
argument_spec.update(nxos_argument_spec)
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
warnings = list()
check_args(module, warnings)
results = dict(changed=False, warnings=... | |
10,764 | [
0.001962378853932023,
0.05051082745194435,
0.013924718834459782,
0.001145261456258595,
-0.007953276857733727,
0.012202287092804909,
0.056445952504873276,
0.024736609309911728,
0.04528127610683441,
0.03610881045460701,
0.02067955583333969,
-0.021156856790184975,
0.01940329745411873,
0.04111... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def test_stop_cygpath_subprocess(self):
if sys.platform != 'cygwin':
return
# Call cygpath to ensure the subprocess is running.
path.cygpath("/cygdrive/c/foo.txt")
self.assertTrue(path._CygPath._singleton.is_running())
# Stop it.
path._CygPath.stop_cygpath_s... | |
10,765 | [
0.007758619263768196,
-0.008120889775454998,
0.013303365558385849,
-0.026425596326589584,
0.04987252503633499,
-0.018274517729878426,
0.0070290472358465195,
0.029967792332172394,
0.02358781173825264,
-0.00018427977920509875,
0.011139807291328907,
-0.005429021082818508,
0.02463437058031559,
... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def _get_access_token(self) -> str:
if self.authenticator != 'oauth':
raise InternalException('Can only get access tokens for oauth')
missing = any(
x is None for x in
(self.oauth_client_id, self.oauth_client_secret, self.token)
)
if missing:
... | |
10,766 | [
0.044857922941446304,
-0.03810686618089676,
-0.017965536564588547,
-0.021290229633450508,
-0.040099646896123886,
0.011611003428697586,
-0.0009728790610097349,
-0.008738754317164421,
0.01806720905005932,
0.04554929584264755,
0.002813787432387471,
-0.017711356282234192,
0.03824920952320099,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def auth_args(self):
# Pull all of the optional authentication args for the connector,
# let connector handle the actual arg validation
result = {}
if self.password:
result['password'] = self.password
if self.authenticator:
result['authenticator'] = self.a... | |
10,767 | [
0.028628317639231682,
-0.031220372766256332,
0.041935741901397705,
0.006642139982432127,
0.03006320632994175,
-0.018179098144173622,
-0.014892742969095707,
0.007567874155938625,
0.018641965463757515,
0.0058436947874724865,
0.04112572595477104,
-0.015205178409814835,
0.017750946804881096,
0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "sql", "annotation": null, "type_comment": null}}], "kwarg": null,... | def exception_handler(self, sql):
try:
yield
except snowflake.connector.errors.ProgrammingError as e:
msg = str(e)
logger.debug('Snowflake query id: {}'.format(e.sfqid))
logger.debug('Snowflake error: {}'.format(msg))
if 'Empty SQL statement'... | |
10,768 | [
0.03770361840724945,
0.006077504251152277,
0.014264816418290138,
-0.03808149695396423,
0.04521915316581726,
0.025002790614962578,
0.02321837656199932,
-0.02311341091990471,
-0.005578917916864157,
-0.0029731488320976496,
0.020258348435163498,
-0.014506236650049686,
0.0396769717335701,
0.053... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "connection", "annotation": null, "type_comment": null}}], "kwarg":... | def open(cls, connection):
if connection.state == 'open':
logger.debug('Connection is already open, skipping open.')
return connection
try:
creds = connection.credentials
handle = snowflake.connector.connect(
account=creds.account,
... | |
10,769 | [
0.023341024294495583,
0.003956931643188,
0.04096587747335434,
0.0023912100587040186,
-0.033495884388685226,
0.023384328931570053,
-0.046075787395238876,
0.018555898219347,
0.005678277928382158,
-0.048674046993255615,
0.028948932886123657,
-0.05746482312679291,
0.015524595975875854,
0.03654... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "connection", "annotation": null, "type_comment": null}}], "kwarg"... | def cancel(self, connection):
handle = connection.handle
sid = handle.session_id
connection_name = connection.name
sql = 'select system$abort_session({})'.format(sid)
logger.debug("Cancelling query '{}' ({})".format(connection_name, sid))
_, cursor = self.add_query(sq... | |
10,770 | [
0.025557929649949074,
-0.016534749418497086,
0.040627576410770416,
-0.030278822407126427,
0.010028988122940063,
0.0009985383367165923,
0.016430098563432693,
-0.024139337241649628,
-0.03704620897769928,
0.0016802188474684954,
-0.0009927244391292334,
-0.003654039930552244,
0.011453394778072834... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "column_names", "annotation": null, "type_comment": null}}, {"_type... | def process_results(cls, column_names, rows):
# Override for Snowflake. The datetime objects returned by
# snowflake-connector-python are not pickleable, so we need
# to replace them with sane timezones
fixed = []
for row in rows:
fixed_row = []
for col in... | |
10,771 | [
-0.021498195827007294,
-0.023042898625135422,
0.022264163941144943,
-0.03028130531311035,
0.038681432604789734,
-0.03727715462446213,
-0.017681116238236427,
0.002783020492643118,
0.012600189074873924,
0.02790680155158043,
0.00807458907365799,
-0.033421777188777924,
-0.009600143879652023,
-... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class TestUserNodes:
@pytest.fixture()
def user_one(self):
user_one = AuthUserFactory()
user_one.social['twitter'] = 'RheisenDennis'
user_one.save()
return user_one
@pytest.fixture()
def user_two(self):
return AuthUserFactory()
@pytest.fixture()
def pub... | |
10,772 | [
0.019940204918384552,
0.018070094287395477,
0.06158747151494026,
-0.01128950621932745,
-0.0247818436473608,
-0.024231135845184326,
-0.009304664097726345,
-0.012345029041171074,
0.0028897810261696577,
-0.004408529493957758,
-0.010222510434687138,
-0.04859994724392891,
0.03460279479622841,
0... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "sql", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def add_query(self, sql, auto_begin=True,
bindings=None, abridge_sql_log=False):
connection = None
cursor = None
if bindings:
# The snowflake connector is more strict than, eg., psycopg2 -
# which allows any iterable thing to be passed as a binding.
... | |
10,773 | [
-0.03236493840813637,
0.00006936451245564967,
0.0026102757547050714,
-0.02983526699244976,
0.0319681279361248,
-0.04999824985861778,
-0.028570428490638733,
0.026759976521134377,
-0.04235962778329849,
0.015054036863148212,
0.025891952216625214,
-0.04627814516425133,
-0.032166533172130585,
0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs... | class TestUserNodesPreprintsFiltering:
@pytest.fixture()
def user(self):
return AuthUserFactory()
@pytest.fixture()
def no_preprints_node(self, user):
return ProjectFactory(creator=user)
@pytest.fixture()
def valid_preprint_node(self, user):
return ProjectFactory(creat... | |
10,774 | [
-0.013799866661429405,
-0.020360248163342476,
0.00766872800886631,
-0.030418647453188896,
0.01751570776104927,
-0.03951605036854744,
-0.008386270143091679,
-0.007899366319179535,
0.022999776527285576,
0.03515954688191414,
0.03298129513859749,
-0.019578641280531883,
-0.0016248797765001655,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "app", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def test_user_nodes(
self, app, user_one, user_two,
public_project_user_one,
public_project_user_two,
private_project_user_one,
private_project_user_two,
deleted_project_user_one,
folder, deleted_folder, registration):
# test... | |
10,775 | [
-0.03608301281929016,
-0.020385194569826126,
-0.03493558242917061,
-0.015978574752807617,
0.03537502512335777,
-0.05927575007081032,
-0.02084904909133911,
0.02153262495994568,
-0.05400245264172554,
0.0447986014187336,
0.028636924922466278,
-0.048924464732408524,
-0.01977485790848732,
0.010... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "app", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def test_filter_true(
self, app, user, valid_preprint_node,
valid_preprint, url_base):
expected_ids = [valid_preprint_node._id]
res = app.get('{}true'.format(url_base), auth=user.auth)
actual_ids = [n['id'] for n in res.json['data']]
assert set(expected_ids) == s... | |
10,776 | [
-0.034129898995161057,
-0.012718580663204193,
-0.042207226157188416,
-0.016526462510228157,
0.02534741349518299,
-0.050899963825941086,
-0.017616258934140205,
0.00613812543451786,
-0.05156666412949562,
0.04315599054098129,
0.031283605843782425,
-0.06374675780534744,
-0.006840083282440901,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "app", "annotation": null, "type_comment": null}}, {"_type": "arg"... | def test_filter_false(
self, app, user, abandoned_preprint_node,
no_preprints_node, orphaned_preprint_node, url_base):
expected_ids = [
abandoned_preprint_node._id,
no_preprints_node._id,
orphaned_preprint_node._id]
res = app.get('{}false'.form... | |
10,777 | [
-0.02335190586745739,
0.0005384227843023837,
0.0016715021338313818,
0.03172880783677101,
-0.03491409868001938,
0.030198214575648308,
-0.039112892001867294,
0.008113184943795204,
0.0006476585986092687,
0.004850329365581274,
-0.007844296284019947,
-0.060230959206819534,
0.011334671638906002,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "get"}}]}}, "targets": [{"_type": "Name", "_fields": {"id"... | class RegionViewSet(CORSMixin, MarketplaceView, ReadOnlyModelViewSet):
cors_allowed_methods = ['get']
authentication_classes = []
permission_classes = [AllowAny]
serializer_class = RegionSerializer
paginate_by = len(REGIONS_CHOICES_SLUG)
def get_queryset(self, *args, **kwargs):
return R... | |
10,778 | [
-0.007301194127649069,
-0.006089419592171907,
-0.026068419218063354,
0.0093836123123765,
-0.008584248833358288,
0.014245983213186264,
-0.06464153528213501,
0.007642323616892099,
-0.021445346996188164,
0.016649166122078896,
0.004014638252556324,
-0.07181034982204437,
0.013013843446969986,
0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "get"}}]}}, "targets": [{"_type": "Name", "_fields": {"id"... | class CategoryViewSet(CORSMixin, MarketplaceView, ReadOnlyModelViewSet):
cors_allowed_methods = ['get']
authentication_classes = []
permission_classes = [AllowAny]
serializer_class = CategorySerializer
paginate_by = len(CATEGORY_CHOICES_DICT)
def get_queryset(self, *args, **kwargs):
ret... | |
10,779 | [
0.06168774142861366,
0.005198346450924873,
0.008146349340677261,
0.0003376826934982091,
-0.04901447892189026,
0.026563497260212898,
-0.030067529529333115,
-0.014687557704746723,
0.04045373201370239,
-0.00016253028297796845,
-0.03625728562474251,
-0.06945116817951202,
-0.00955740362405777,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "CarrierSerializer", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "serializer_class", "ctx": {"_type": "Store", "... | class CarrierViewSet(RegionViewSet):
serializer_class = CarrierSerializer
paginate_by = len(CARRIERS)
def get_queryset(self, *args, **kwargs):
return sorted(CARRIERS, key=operator.attrgetter('name'))
def get_object(self, *args, **kwargs):
return CARRIER_MAP.get(self.kwargs['pk'], None) | |
10,780 | [
-0.024851825088262558,
0.04900817200541496,
0.01225204300135374,
0.0310879647731781,
-0.044162992388010025,
-0.019473444670438766,
-0.01614673249423504,
0.001104799215681851,
0.011689863167703152,
0.02540821023285389,
0.000012247876838955563,
-0.07543642073869705,
-0.004462664481252432,
-0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "Webapp", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "model", "ctx": {"_type": "Store", "_fields": {}}}}], "typ... | class RefreshManifestViewSet(GenericViewSet, CORSMixin):
model = Webapp
permission_classes = [AllowAppOwner]
cors_allowed_methods = ('post',)
slug_lookup = 'app_slug'
def detail_post(self, request, **kwargs):
obj = self.get_object()
self.check_object_permissions(request, obj)
... | |
10,781 | [
-0.01829666830599308,
0.013337641023099422,
-0.0055678654462099075,
0.017072685062885284,
-0.0053691258653998375,
-0.02071939967572689,
-0.039470329880714417,
0.01822095923125744,
-0.001339126843959093,
0.00755210779607296,
0.02075725607573986,
-0.052038248628377914,
-0.007293430622667074,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}], "kwarg": {... | def detail_post(self, request, **kwargs):
obj = self.get_object()
self.check_object_permissions(request, obj)
if obj.is_packaged:
return Response(
status=400,
data={'reason': 'App is a packaged app.'})
_update_manifest(obj.pk, True, {})
... | |
10,782 | [
0.03673499450087547,
-0.03623320907354355,
0.010872053913772106,
0.0015863790176808834,
0.08697643131017685,
0.002289403462782502,
0.02203681692481041,
0.007683614734560251,
0.000162362091941759,
0.06163617968559265,
-0.020081937313079834,
-0.02010284550487995,
0.00671140244230628,
0.01552... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": ... | class EnumeratedField(ChoiceField):
def from_native(self, value):
for k, v in self.choices:
if value == v:
return k
def to_native(self, key):
for k, v in self.choices:
if key == k:
return v | |
10,783 | [
0.000335036515025422,
-0.012845487333834171,
0.024230504408478737,
-0.019594622775912285,
-0.03372355177998543,
-0.03363503888249397,
-0.007590012159198523,
0.012613140046596527,
-0.007573415990918875,
-0.0021588937379419804,
-0.006577641703188419,
-0.04388044774532318,
-0.013000384904444218... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "HyperlinkedIdentityField", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fi... | class PriceCurrencySerializer(ModelSerializer):
resource_uri = HyperlinkedIdentityField(view_name='price-currency-detail')
tier = HyperlinkedRelatedField(view_name='price-tier-detail')
currency = ChoiceField(choices=ALL_CURRENCIES.items())
carrier = SlugChoiceField(choices_dict=CARRIER_MAP,
... | |
10,784 | [
-0.0018490055808797479,
-0.0011893452610820532,
0.008139537647366524,
-0.03150716796517372,
-0.005668606609106064,
-0.010124108754098415,
-0.021478094160556793,
0.03526387736201286,
-0.0014492961345240474,
0.015049200505018234,
0.01765429973602295,
-0.04677997902035713,
0.001370332553051412,... | 6 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "HyperlinkedIdentityField", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fi... | class PriceTierSerializer(ModelSerializer):
resource_uri = HyperlinkedIdentityField(view_name='price-tier-detail')
active = BooleanField()
name = CharField()
method = EnumeratedField(PAYMENT_METHOD_CHOICES)
price = DecimalField()
class Meta:
model = Price
fields = ['resource_uri... | |
10,785 | [
0.030758002772927284,
-0.019837938249111176,
-0.03216494992375374,
-0.009946024976670742,
0.011320503428578377,
0.004805261269211769,
0.007510926574468613,
-0.01883143000304699,
-0.010384343564510345,
0.027662720531225204,
-0.012532641179859638,
-0.03911309689283371,
0.0408230759203434,
-0... | 15 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def uris(self):
# This translates KnowledgeRepository.uri to a consistent format
# across all KnowledgeRepository instances: a dictionary of form
# {<mountpoint>: <uri>}
# It assumes that self.uri is either a string or a dictionary mapping
# of form:
# {<mountpoint>: <Kno... | |
10,786 | [
0.0018733417382463813,
-0.003522670129314065,
-0.026664964854717255,
-0.039958059787750244,
-0.04954878240823746,
0.005450169090181589,
-0.053014833480119705,
0.060695286840200424,
0.012239494360983372,
-0.03186403959989548,
0.00861097127199173,
-0.04249851778149605,
-0.025818144902586937,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Prices"}}, {"_type... | class PriceCurrencyViewSet(ModelViewSet):
permission_classes = [GroupPermission('Prices', 'Edit')]
authentication_classes = [RestOAuthAuthentication]
serializer_class = PriceCurrencySerializer
model = PriceCurrency
filter_fields = ('tier', 'provider', 'currency', 'price')
def post_save(self, ob... | |
10,787 | [
0.016099128872156143,
0.024279098957777023,
0.027266565710306168,
-0.019288131967186928,
-0.0003549099201336503,
-0.0006016427068971097,
-0.04576041176915169,
-0.001460391329601407,
-0.018766509369015694,
0.07169920951128006,
0.02555944211781025,
-0.03670316934585571,
0.01383481826633215,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}, {"_type": "arg... | def post(self, path, revision=None):
if path is None:
raise ValueError('path is None')
path = self._kp_path(path)
if not self.has_post(path, revision=revision) \
and path in self.config.aliases:
path = self.config.aliases[path]
if path in self.... | |
10,788 | [
0.018549425527453423,
0.03041853755712509,
0.054618921130895615,
-0.04203556105494499,
-0.007273769937455654,
0.014158905483782291,
0.048274725675582886,
0.014589554630219936,
-0.03751899674534798,
0.06062700226902962,
0.008171831257641315,
-0.056593604385852814,
0.023864267393946648,
-0.0... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []... | def revisions(self):
# This method provides a mapping from uri to revision for this
# repository and/or any nested repositories. This is most useful
# when checking if an update is required server side.
if isinstance(self.uri, str):
return {self.uri: self.revision}
e... | |
10,789 | [
-0.03228874132037163,
0.001230059890076518,
0.009023110382258892,
-0.00037462738691829145,
0.020920367911458015,
-0.008184372447431087,
-0.039084117859601974,
-0.004941608756780624,
-0.03946876525878906,
0.06752641499042511,
0.008830788545310497,
-0.017362410202622414,
-0.0004597699735313654... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "kp", "annotation": null, "type_comment": null}}, {"_type": "arg",... | def add(self, kp, path=None, update=False, **kwargs):
assert isinstance(kp, KnowledgePost), \
'One can only add KnowledgePost objects to a KnowledgeRepository.'
path = path or kp.path
if not path:
raise ValueError(
'Post path not provided for Knowledge Pos... | |
10,790 | [
0.02649773098528385,
-0.0016418927116319537,
0.02050446718931198,
-0.009080874733626842,
0.021846413612365723,
0.03373058885335922,
0.018878212198615074,
0.04414772242307663,
0.025838131085038185,
0.07614970207214355,
-0.008756761439144611,
-0.018434688448905945,
0.04799159988760948,
-0.03... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "prefix", "annotation": null, "type_comment": null}}, {"_type": "a... | def dir(self, prefix=None, status=None):
if prefix is None or isinstance(prefix, str):
prefixes = [prefix]
else:
prefixes = prefix
assert all([prefix is None or isinstance(prefix, str) for prefix
in prefixes]), 'All path prefixes must be strings.'
... | |
10,791 | [
-0.026876091957092285,
0.028813866898417473,
0.0020378227345645428,
-0.008593609556555748,
-0.01342751458287239,
0.008820034563541412,
-0.004578519146889448,
-0.018429921939969063,
0.0071824039332568645,
0.0883793756365776,
0.02226334623992443,
-0.008793706074357033,
0.028013480827212334,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}, {"_type": "arg... | def _kp_path(self, path, rel='/'):
if path is None:
return None
path = os.path.relpath(os.path.abspath(os.path.join(rel, path)), rel)
if os.name == 'nt':
path = path.replace(os.path.sep, os.path.altsep)
assert all([not segment.endswith(
KP_EXTENSION) f... | |
10,792 | [
0.014447370544075966,
0.039536572992801666,
0.014458764344453812,
-0.015974143519997597,
0.00744016794487834,
0.01698819361627102,
0.012214181013405323,
0.010015172883868217,
-0.03096841648221016,
0.04532463848590851,
0.03096841648221016,
-0.0013765165349468589,
-0.00669387262314558,
-0.00... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "kp", "annotation": null, "type_comment": null}}, {"_type": "arg",... | def _kp_save(self, kp, path, update=False):
if not update and self.has_post(path):
raise ValueError('A knowledge post with the same path already'
' exists. To update it, set the update flag.')
kp.uuid = self._kp_uuid(path) or kp.uuid
kp.path = path
... | |
10,793 | [
0.022608935832977295,
0.01597537286579609,
0.009199270978569984,
-0.028047362342476845,
-0.023222951218485832,
0.022137459367513657,
0.013267125934362411,
0.023420315235853195,
-0.04484507814049721,
0.0636383444070816,
-0.0011019388912245631,
-0.03379279375076294,
0.03078850358724594,
0.01... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "revision_dict", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "uri", "annotation": null, "type_comment": null}}], "kwar... | def add_revisions(revision_dict, uri):
if isinstance(uri, str):
revision_dict[uri] = \
KnowledgeRepository.for_uri(uri).revision
elif isinstance(uri, dict):
for u in uri.values():
add_revisions(revisi... | |
10,794 | [
0.01619255542755127,
-0.004578679800033569,
-0.030130309984087944,
-0.0027521816082298756,
-0.004819081164896488,
-0.007261780556291342,
-0.012114020064473152,
0.010246073827147484,
0.007162304129451513,
0.042155906558036804,
0.00921815074980259,
-0.01615939661860466,
0.05141826719045639,
... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "uri_dict", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "uri", "annotation": null, "type_comment": null}}, {"_type": "... | def add_uris(uri_dict, uri, parent=''):
if isinstance(uri, str):
uri_dict[parent] = uri
elif isinstance(uri, dict):
for mountpoint, u in uri.items():
add_uris(uri_dict, u, parent=posixpath.join(
p... | |
10,795 | [
-0.01758592203259468,
-0.005873860791325569,
0.028752880170941353,
0.033154454082250595,
-0.0001243355800397694,
-0.057791050523519516,
-0.027020780369639397,
0.025166412815451622,
0.015568533912301064,
0.008563712239265442,
-0.013225102797150612,
-0.00908843707293272,
0.02634831704199314,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "resource_group_name", "annotation": {"_type": "Name", "_fields": {"id": "str", "ctx": {"_type": "Load", "_fields": {}}}}, "type_comment": null}}, {"_type... | def build_post_request(
resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version = kwargs.pop("api_version", _params.p... | |
10,796 | [
-0.03210437297821045,
-0.001011660322546959,
-0.05761195719242096,
-0.07916146516799927,
0.02147621288895607,
0.0033655839506536722,
0.0060684350319206715,
-0.001890468643978238,
-0.0014949667965993285,
0.01379217579960823,
0.04261036962270737,
-0.03098047524690628,
-0.011452758684754372,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "(?P<mainurl>https?://html5-player\\.libsyn\\.com/embed/episode/id/(?P<id>[0-9]+))"}}, "targets": [{"_type": "Name", "_fields": {"id": "_V... | class LibsynIE(InfoExtractor):
_VALID_URL = r'(?P<mainurl>https?://html5-player\.libsyn\.com/embed/episode/id/(?P<id>[0-9]+))'
_TESTS = [{
'url': 'http://html5-player.libsyn.com/embed/episode/id/3377616/',
'md5': '443360ee1b58007bc3dcf09b41d093bb',
'info_dict': {
'id': '3377... | |
10,797 | [
-0.006996840704232454,
-0.05058389902114868,
0.054896559566259384,
-0.007125995587557554,
0.01230904832482338,
-0.029716918244957924,
0.0031614936888217926,
0.02318054437637329,
0.00865901168435812,
0.002476409776136279,
0.030008921399712563,
-0.05211130157113075,
-0.024685483425855637,
-0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "filenames", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs... | def post(filenames):
client = httpclient.AsyncHTTPClient()
boundary = uuid4().hex
headers = {"Content-Type": "multipart/form-data; boundary=%s" % boundary}
producer = partial(multipart_producer, boundary, filenames)
response = yield client.fetch(
"http://localhost:8888/post",
method=... | |
10,798 | [
-0.018057232722640038,
0.000134069865453057,
-0.03460869938135147,
-0.05712347477674484,
0.0030429004691541195,
-0.01708924025297165,
0.00887923501431942,
-0.006244145333766937,
0.0016999611398205161,
0.030688930302858353,
0.04491004720330238,
-0.019682502374053,
0.003495526500046253,
-0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}], "kwarg": null,... | def _real_extract(self, url):
m = re.match(self._VALID_URL, url)
video_id = m.group('id')
url = m.group('mainurl')
webpage = self._download_webpage(url, video_id)
formats = [{
'url': media_url,
} for media_url in set(re.findall('var\s+mediaURL(?:Libsyn)?\s*=\... | |
10,799 | [
0.0047128754667937756,
-0.034164175391197205,
0.006270851008594036,
-0.044224243611097336,
0.011885127052664757,
-0.02755390852689743,
0.023391887545585632,
0.01343197375535965,
0.009180926717817783,
-0.02363671362400055,
0.027709705755114555,
-0.03363001346588135,
-0.015791194513440132,
-... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "filenames", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs... | def put(filenames):
client = httpclient.AsyncHTTPClient()
for filename in filenames:
mtype = mimetypes.guess_type(filename)[0] or "application/octet-stream"
headers = {"Content-Type": mtype}
producer = partial(raw_producer, filename)
url_path = quote(os.path.basename(filename))
... | |
10,800 | [
0.058174554258584976,
-0.008457249961793423,
0.037108100950717926,
-0.03340436518192291,
0.032743826508522034,
-0.022989092394709587,
0.03345154598355293,
0.014626205898821354,
-0.02213982865214348,
-0.007159763481467962,
0.06477993726730347,
0.006062798202037811,
-0.018955091014504433,
0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "filename", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "write", "annotation": null, "type_comment": null}}], "kwarg":... | def raw_producer(filename, write):
with open(filename, "rb") as f:
while True:
# 16K at a time.
chunk = f.read(16 * 1024)
if not chunk:
# Complete.
break
yield write(chunk) |