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
21,601
[ 0.014474046416580677, -0.003256135154515505, -0.010986830107867718, -0.06150944530963898, -0.007342059630900621, -0.014736637473106384, -0.01014653779566288, -0.016207151114940643, 0.0018079428700730205, 0.05680380389094353, 0.0020560917910188437, -0.014957214705646038, 0.018612489104270935,...
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}}, {"_type": "arg", "_fields": {"arg": "node", "annotation": n...
class CallFunc(Node): def __init__(self, node, args, star_args = None, dstar_args = None, lineno=None): self.node = node self.args = args self.star_args = star_args self.dstar_args = dstar_args self.lineno = lineno def getChildren(self): children = [] chi...
21,602
[ -0.007744540926069021, 0.010110339149832726, -0.017409304156899452, -0.04224487766623497, 0.021228529512882233, -0.0001145436181104742, -0.024527916684746742, -0.013452161103487015, -0.024549134075641632, 0.06369619816541672, -0.04807980731129646, 0.01234882976859808, 0.012104823254048824, ...
8
{"_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 getChildNodes(self): nodelist = [] nodelist.append(self.node) nodelist.extend(flatten_nodes(self.args)) if self.star_args is not None: nodelist.append(self.star_args) if self.dstar_args is not None: nodelist.append(self.dstar_args) return tuple...
21,603
[ 0.031577788293361664, 0.012239806354045868, 0.050142254680395126, -0.007746568415313959, -0.027573689818382263, -0.02680017054080963, -0.029143478721380234, -0.007240368518978357, -0.027710191905498505, 0.019906748086214066, -0.04161078855395317, -0.027573689818382263, 0.06634065508842468, ...
8
{"_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 getChildren(self): children = [] children.append(self.name) children.extend(flatten(self.bases)) children.append(self.doc) children.append(self.code) children.append(self.decorators) return tuple(children)
21,604
[ -0.020235762000083923, 0.04222938045859337, -0.003025144338607788, -0.07141793519258499, 0.02046060562133789, -0.000037327252357499674, -0.034319035708904266, -0.035995129495859146, -0.049424316734075546, 0.018355267122387886, -0.005707915872335434, -0.019704319536685944, 0.01132385153323412...
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}}, {"_type": "arg", "_fields": {"arg": "name", "annotation": n...
class Class(Node): def __init__(self, name, bases, doc, code, decorators = None, lineno=None): self.name = name self.bases = bases self.doc = doc self.code = code self.decorators = decorators self.lineno = lineno def getChildren(self): children = [] ...
21,605
[ -0.0009020608849823475, 0.0223167035728693, -0.022932620719075203, -0.06931112706661224, 0.04619373008608818, 0.014453504234552383, 0.0008577918633818626, 0.002390525536611676, -0.012030900456011295, 0.059743888676166534, 0.01605488732457161, 0.0036595698911696672, 0.009254143573343754, 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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class Compare(Node): def __init__(self, expr, ops, lineno=None): self.expr = expr self.ops = ops self.lineno = lineno def getChildren(self): children = [] children.append(self.expr) children.extend(flatten(self.ops)) return tuple(children) def getChi...
21,606
[ 0.021486328914761543, 0.02629547007381916, -0.004584678914397955, -0.035583507269620895, 0.034345101565122604, 0.008875236846506596, -0.041837453842163086, 0.010299403220415115, -0.040702249854803085, 0.04734835773706436, -0.03841120004653931, 0.010939246043562889, 0.006078505422919989, -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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Decorators(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(no...
21,607
[ 0.01664889231324196, 0.046616896986961365, 0.04432635009288788, -0.03376437723636627, 0.038048550486564636, 0.01330850925296545, -0.008775132708251476, -0.017051858827471733, -0.0320676751434803, 0.05090107023715973, 0.007847248576581478, -0.03257668390870094, -0.01555663999170065, 0.02706...
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}}, {"_type": "arg", "_fields": {"arg": "leftright", "annotatio...
class Div(Node): def __init__(self, leftright, lineno=None): self.left = leftright[0] self.right = leftright[1] self.lineno = lineno def getChildren(self): return self.left, self.right def getChildNodes(self): return self.left, self.right def __repr__(self): ...
21,608
[ 0.03556009754538536, 0.04418132081627846, -0.01362583227455616, -0.0493423230946064, 0.03339013084769249, -0.044963289052248, 0.004999722354114056, -0.029753968119621277, -0.04253918305039406, 0.0641215592622757, -0.012511524371802807, 0.00485554663464427, 0.016167234629392624, -0.04074065...
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}}, {"_type": "arg", "_fields": {"arg": "items", "annotation": ...
class Dict(Node): def __init__(self, items, lineno=None): self.items = items self.lineno = lineno def getChildren(self): return tuple(flatten(self.items)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.items)) return tuple(nodelist...
21,609
[ 0.011371927335858345, 0.04811118543148041, -0.0005950427148491144, -0.05191946029663086, 0.022934267297387123, -0.0035940578673034906, -0.03139709681272507, 0.004995713941752911, -0.022997738793492317, 0.034655287861824036, -0.033407021313905716, -0.0033983548637479544, 0.017084337770938873,...
8
{"_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 getChildNodes(self): nodelist = [] nodelist.append(self.expr) if self.locals is not None: nodelist.append(self.locals) if self.globals is not None: nodelist.append(self.globals) return tuple(nodelist)
21,610
[ -0.0011581487488001585, 0.034542474895715714, 0.00902385450899601, -0.06707032769918442, 0.013525289483368397, 0.008614633232355118, -0.009517018683254719, 0.013777117244899273, -0.026735791936516762, 0.04591672867536545, -0.0021733324974775314, -0.006867573130875826, 0.026567906141281128, ...
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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class Exec(Node): def __init__(self, expr, locals, globals, lineno=None): self.expr = expr self.locals = locals self.globals = globals self.lineno = lineno def getChildren(self): children = [] children.append(self.expr) children.append(self.locals) ...
21,611
[ 0.010113779455423355, 0.028451010584831238, 0.04951159656047821, -0.03684534132480621, 0.016286708414554596, 0.004891352728009224, -0.019896484911441803, -0.012068184092640877, -0.030095702037215233, 0.059379737824201584, 0.0040850271470844746, -0.03445306420326233, -0.011502154171466827, ...
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}}, {"_type": "arg", "_fields": {"arg": "leftright", "annotatio...
class FloorDiv(Node): def __init__(self, leftright, lineno=None): self.left = leftright[0] self.right = leftright[1] self.lineno = lineno def getChildren(self): return self.left, self.right def getChildNodes(self): return self.left, self.right def __repr__(self...
21,612
[ 0.01231817901134491, 0.03816395625472069, -0.0016601545503363013, -0.06383056193590164, 0.013135657645761967, -0.024233218282461166, -0.018421277403831482, -0.03258718177676201, 0.006030308548361063, 0.024748342111706734, 0.009389812126755714, 0.006461444776505232, 0.01843247562646866, -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}}, {"_type": "arg", "_fields": {"arg": "assign", "annotation":...
class For(Node): def __init__(self, assign, list, body, else_, lineno=None): self.assign = assign self.list = list self.body = body self.else_ = else_ self.lineno = lineno def getChildren(self): children = [] children.append(self.assign) children....
21,613
[ 0.007893700152635574, 0.0451805517077446, -0.003686234587803483, -0.026136798784136772, 0.020000239834189415, -0.02121465466916561, -0.011004968546330929, -0.007684133015573025, -0.016776127740740776, 0.01871059462428093, -0.024610720574855804, 0.008613752201199532, 0.010112963616847992, -...
8
{"_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 getChildNodes(self): nodelist = [] nodelist.append(self.assign) nodelist.append(self.list) nodelist.append(self.body) if self.else_ is not None: nodelist.append(self.else_) return tuple(nodelist)
21,614
[ 0.024349426850676537, 0.04748764634132385, 0.047153521329164505, -0.059265587478876114, 0.028212757781147957, -0.0019068671390414238, -0.039113618433475494, -0.013135326094925404, -0.03802770748734474, 0.04019952565431595, 0.025560634210705757, -0.01994314230978489, 0.008201747201383114, 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}}, {"_type": "arg", "_fields": {"arg": "modname", "annotation"...
class From(Node): def __init__(self, modname, names, level, lineno=None): self.modname = modname self.names = names self.level = level self.lineno = lineno def getChildren(self): return self.modname, self.names, self.level def getChildNodes(self): return () ...
21,615
[ 0.006611471995711327, 0.023650793358683586, -0.031326550990343094, -0.06540519744157791, 0.014813997782766819, -0.006235209293663502, -0.04057186096906662, -0.02065144293010235, -0.01946890354156494, 0.04207691177725792, -0.007675757631659508, -0.01899588853120804, 0.01557727251201868, -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}}, {"_type": "arg", "_fields": {"arg": "decorators", "annotati...
class Function(Node): def __init__(self, decorators, name, argnames, defaults, flags, doc, code, lineno=None): self.decorators = decorators self.name = name self.argnames = argnames self.defaults = defaults self.flags = flags self.doc = doc self.code = code ...
21,616
[ 0.020599376410245895, 0.020900096744298935, -0.01921391300857067, -0.028009995818138123, 0.005157899111509323, -0.006299027241766453, -0.006846768781542778, -0.030072081834077835, -0.017935847863554955, 0.037826381623744965, -0.011223330162465572, -0.01757068745791912, 0.02906251884996891, ...
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": "decorators", "annotation": null, "type_comment": null}}, {"_type"...
def __init__(self, decorators, name, argnames, defaults, flags, doc, code, lineno=None): self.decorators = decorators self.name = name self.argnames = argnames self.defaults = defaults self.flags = flags self.doc = doc self.code = code self.lineno = lineno...
21,617
[ 0.04416774585843086, 0.00586513988673687, -0.011650635860860348, -0.011923697777092457, -0.012765638530254364, -0.0047160047106444836, -0.030742205679416656, 0.016429217532277107, -0.009449075907468796, 0.024825867265462875, -0.03888855129480362, -0.0350884385406971, 0.07049544900655746, -...
8
{"_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 getChildren(self): children = [] children.append(self.decorators) children.append(self.name) children.append(self.argnames) children.extend(flatten(self.defaults)) children.append(self.flags) children.append(self.doc) children.append(self.code) ...
21,618
[ -0.0056213499046862125, 0.04238809272646904, 0.03450404480099678, -0.04469893500208855, 0.0059470199048519135, -0.06805656105279922, 0.02052571438252926, -0.03278224170207977, 0.006558713503181934, 0.048754237592220306, 0.012845562770962715, 0.012834236025810242, 0.00999099388718605, -0.04...
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}}, {"_type": "arg", "_fields": {"arg": "assign", "annotation":...
class GenExprFor(Node): def __init__(self, assign, iter, ifs, lineno=None): self.assign = assign self.iter = iter self.ifs = ifs self.lineno = lineno self.is_outmost = False def getChildren(self): children = [] children.append(self.assign) childre...
21,619
[ 0.023343736305832863, 0.05077779293060303, -0.005350467283278704, -0.08478114753961563, 0.01582416146993637, -0.011961082927882671, -0.012250297702848911, -0.001601008465513587, -0.022641358897089958, 0.01769372634589672, 0.023054523393511772, -0.012849383987486362, -0.01042721327394247, -...
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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class Getattr(Node): def __init__(self, expr, attrname, lineno=None): self.expr = expr self.attrname = attrname self.lineno = lineno def getChildren(self): return self.expr, self.attrname def getChildNodes(self): return self.expr, def __repr__(self): re...
21,620
[ 0.00042037127423100173, 0.040719207376241684, 0.04142430052161217, -0.028710566461086273, 0.033646225929260254, -0.027630889788269997, 0.01128151174634695, 0.011545922607183456, -0.024061350151896477, 0.036400504410266876, 0.019863834604620934, -0.014355283230543137, -0.00928190816193819, ...
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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class GenExprInner(Node): def __init__(self, expr, quals, lineno=None): self.expr = expr self.quals = quals self.lineno = lineno def getChildren(self): children = [] children.append(self.expr) children.extend(flatten(self.quals)) return tuple(children) ...
21,621
[ -0.018730657175183296, 0.027933957055211067, 0.010369914583861828, -0.05552224814891815, 0.019465193152427673, 0.01805013231933117, -0.007593801710754633, 0.010964023880660534, -0.0220036618411541, 0.035884223878383636, 0.02923019602894783, 0.03458798676729202, 0.029964732006192207, -0.026...
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}}, {"_type": "arg", "_fields": {"arg": "test", "annotation": n...
class IfExp(Node): def __init__(self, test, then, else_, lineno=None): self.test = test self.then = then self.else_ = else_ self.lineno = lineno def getChildren(self): return self.test, self.then, self.else_ def getChildNodes(self): return self.test, self.th...
21,622
[ -0.045395102351903915, 0.020673565566539764, 0.028914079070091248, -0.0503549799323082, 0.008479609154164791, -0.0044705611653625965, 0.01140994019806385, -0.01551351509988308, -0.042392488569021225, 0.0657016858458519, -0.022419530898332596, 0.02129632979631424, 0.023954201489686966, 0.00...
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}}, {"_type": "arg", "_fields": {"arg": "tests", "annotation": ...
class If(Node): def __init__(self, tests, else_, lineno=None): self.tests = tests self.else_ = else_ self.lineno = lineno def getChildren(self): children = [] children.extend(flatten(self.tests)) children.append(self.else_) return tuple(children) def...
21,623
[ 0.02787582017481327, 0.04999557137489319, -0.034618642181158066, -0.03235733136534691, 0.013680942356586456, -0.01740182936191559, 0.0009109493112191558, 0.025552835315465927, -0.011563532054424286, 0.054189279675483704, 0.02240755409002304, 0.00944612082093954, 0.0005454132333397865, -0.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}}, {"_type": "arg", "_fields": {"arg": "name", "annotation": n...
class Keyword(Node): def __init__(self, name, expr, lineno=None): self.name = name self.expr = expr self.lineno = lineno def getChildren(self): return self.name, self.expr def getChildNodes(self): return self.expr, def __repr__(self): return "Keyword(%s...
21,624
[ 0.015042978338897228, 0.039004452526569366, -0.013299512676894665, -0.049621712416410446, -0.0016289108898490667, -0.033438775688409805, -0.04072556644678116, -0.048772331327199936, -0.008901732973754406, 0.04801236093044281, -0.02020631916821003, -0.009823758155107498, 0.01860814169049263, ...
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}}, {"_type": "arg", "_fields": {"arg": "argnames", "annotation...
class Lambda(Node): def __init__(self, argnames, defaults, flags, code, lineno=None): self.argnames = argnames self.defaults = defaults self.flags = flags self.code = code self.lineno = lineno self.varargs = self.kwargs = None if flags & CO_VARARGS: ...
21,625
[ 0.03521871939301491, 0.01903482712805271, 0.020160198211669922, -0.04203524440526962, 0.023643486201763153, 0.022035814821720123, -0.027394717559218407, 0.03288223594427109, -0.0559898316860199, 0.025658434256911278, 0.026001403108239174, -0.020717523992061615, -0.022721754387021065, 0.019...
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}}, {"_type": "arg", "_fields": {"arg": "leftright", "annotatio...
class LeftShift(Node): def __init__(self, leftright, lineno=None): self.left = leftright[0] self.right = leftright[1] self.lineno = lineno def getChildren(self): return self.left, self.right def getChildNodes(self): return self.left, self.right def __repr__(sel...
21,626
[ 0.008863274939358234, 0.01883854903280735, 0.0015344477724283934, -0.027908960357308388, 0.0030552679672837257, -0.016690867021679878, 0.02599021978676319, -0.053942788392305374, -0.0076313563622534275, 0.04408743605017662, 0.002913542790338397, -0.02195650339126587, 0.04609339311718941, -...
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": "argnames", "annotation": null, "type_comment": null}}, {"_type": ...
def __init__(self, argnames, defaults, flags, code, lineno=None): self.argnames = argnames self.defaults = defaults self.flags = flags self.code = code self.lineno = lineno self.varargs = self.kwargs = None if flags & CO_VARARGS: self.varargs = 1 ...
21,627
[ -0.014521664008498192, 0.035187482833862305, -0.013497637584805489, -0.04618844762444496, 0.03737207129597664, -0.014482652768492699, -0.04864611104130745, 0.0015665158862248063, -0.039186060428619385, 0.07060903310775757, -0.03038918972015381, 0.02477167546749115, 0.004437446128576994, -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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class List(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelist...
21,628
[ -0.01043642871081829, 0.03370840102434158, 0.007521255407482386, -0.0412406362593174, 0.022267308086156845, 0.0026063621044158936, -0.011693631298840046, -0.01891842857003212, -0.016382062807679176, 0.06258562952280045, 0.007889083586633205, 0.0017101248959079385, 0.021937910467386246, -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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class ListComp(Node): def __init__(self, expr, quals, lineno=None): self.expr = expr self.quals = quals self.lineno = lineno def getChildren(self): children = [] children.append(self.expr) children.extend(flatten(self.quals)) return tuple(children) d...
21,629
[ -0.018994010984897614, 0.025197971612215042, 0.02042137086391449, -0.029603684321045876, 0.008963149972259998, -0.044214460998773575, -0.00150041445158422, -0.05403739959001541, 0.013599262572824955, 0.04702422767877579, 0.009766742587089539, 0.03529064729809761, 0.02719852514564991, -0.05...
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}}, {"_type": "arg", "_fields": {"arg": "assign", "annotation":...
class ListCompFor(Node): def __init__(self, assign, list, ifs, lineno=None): self.assign = assign self.list = list self.ifs = ifs self.lineno = lineno def getChildren(self): children = [] children.append(self.assign) children.append(self.list) chi...
21,630
[ 0.00043930509127676487, 0.016808439046144485, 0.011199990287423134, -0.04383045807480812, 0.0363224633038044, 0.017890673130750656, 0.016864806413650513, -0.014069035649299622, 0.0025505763478577137, 0.03406780958175659, 0.03206116706132889, -0.029220305383205414, 0.017721574753522873, -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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class SetComp(Node): def __init__(self, expr, quals, lineno=None): self.expr = expr self.quals = quals self.lineno = lineno def getChildren(self): children = [] children.append(self.expr) children.extend(flatten(self.quals)) return tuple(children) de...
21,631
[ 0.02416106127202511, 0.022483838722109795, 0.01754283532500267, -0.05226586014032364, 0.013406442478299141, 0.04453704133629799, -0.035221658647060394, -0.028807420283555984, -0.0016446406953036785, 0.03581095486879349, 0.028263455256819725, -0.048186130821704865, 0.0022551834117621183, 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}}, {"_type": "arg", "_fields": {"arg": "leftright", "annotatio...
class Mod(Node): def __init__(self, leftright, lineno=None): self.left = leftright[0] self.right = leftright[1] self.lineno = lineno def getChildren(self): return self.left, self.right def getChildNodes(self): return self.left, self.right def __repr__(self): ...
21,632
[ 0.05047499015927315, 0.0392720028758049, -0.021318502724170685, -0.021482648327946663, 0.043498773127794266, -0.013141963630914688, 0.009843649342656136, -0.022159751504659653, -0.011818534694612026, 0.017122512683272362, 0.006304244045168161, 0.002975151874125004, -0.00047769141383469105, ...
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}}, {"_type": "arg", "_fields": {"arg": "key", "annotation": nu...
class DictComp(Node): def __init__(self, key, value, quals, lineno=None): self.key = key self.value = value self.quals = quals self.lineno = lineno def getChildren(self): children = [] children.append(self.key) children.append(self.value) children...
21,633
[ -0.01842021383345127, 0.0489562451839447, -0.015272756107151508, -0.05070061981678009, -0.008589147590100765, 0.01300696562975645, 0.0009800255065783858, -0.008062991313636303, -0.005109879188239574, 0.02646898478269577, 0.022164931520819664, 0.014836662448942661, -0.02339736931025982, -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}}, {"_type": "arg", "_fields": {"arg": "doc", "annotation": nu...
class Module(Node): def __init__(self, doc, node, lineno=None): self.doc = doc self.node = node self.lineno = lineno def getChildren(self): return self.doc, self.node def getChildNodes(self): return self.node, def __repr__(self): return "Module(%s, %s)"...
21,634
[ -0.005323910154402256, 0.03570760786533356, 0.048899393528699875, -0.03478671610355377, 0.011165821924805641, -0.032599594444036484, -0.007165695074945688, -0.00828227773308754, -0.037595439702272415, 0.04977424070239067, 0.01763509213924408, -0.03925304487347603, -0.010175862349569798, 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}}, {"_type": "arg", "_fields": {"arg": "leftright", "annotatio...
class Mul(Node): def __init__(self, leftright, lineno=None): self.left = leftright[0] self.right = leftright[1] self.lineno = lineno def getChildren(self): return self.left, self.right def getChildNodes(self): return self.left, self.right def __repr__(self): ...
21,635
[ 0.015107502229511738, 0.0044605727307498455, 0.051740437746047974, -0.029950346797704697, 0.026708299294114113, 0.02065427042543888, -0.05826864391565323, 0.005045023746788502, -0.03056788071990013, 0.03114130347967148, 0.028935829177498817, -0.010222375392913818, -0.015162639319896698, -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}}, {"_type": "arg", "_fields": {"arg": "leftright", "annotatio...
class Power(Node): def __init__(self, leftright, lineno=None): self.left = leftright[0] self.right = leftright[1] self.lineno = lineno def getChildren(self): return self.left, self.right def getChildNodes(self): return self.left, self.right def __repr__(self): ...
21,636
[ 0.018318776041269302, 0.01231855433434248, 0.018231021240353584, -0.040191613137722015, 0.030823808163404465, -0.011106443591415882, -0.027401378378272057, 0.0062689702026546, -0.03161359950900078, 0.018154235556721687, -0.03929213061928749, -0.00457695173099637, 0.029419735074043274, -0.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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Or(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelist) ...
21,637
[ 0.006970210000872612, 0.025638960301876068, 0.013909849338233471, -0.04601969197392464, 0.008106435649096966, -0.03315944969654083, -0.06216122955083847, 0.014184989035129547, -0.06676727533340454, 0.02735094167292118, -0.020910630002617836, 0.03387277573347092, -0.03199774771928787, -0.00...
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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Printnl(Node): def __init__(self, nodes, dest, lineno=None): self.nodes = nodes self.dest = dest self.lineno = lineno def getChildren(self): children = [] children.extend(flatten(self.nodes)) children.append(self.dest) return tuple(children) de...
21,638
[ 0.021715253591537476, 0.012862864881753922, 0.009630030952394009, -0.04096553474664688, 0.004267243202775717, -0.03564431890845299, -0.06671082973480225, 0.027369046583771706, -0.06788462400436401, 0.025510532781481743, -0.025510532781481743, 0.02662564069032669, -0.017411330714821815, -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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Print(Node): def __init__(self, nodes, dest, lineno=None): self.nodes = nodes self.dest = dest self.lineno = lineno def getChildren(self): children = [] children.extend(flatten(self.nodes)) children.append(self.dest) return tuple(children) def ...
21,639
[ 0.0007560328231193125, 0.020265186205506325, 0.003072689985856414, -0.07303236424922943, 0.009663191623985767, -0.02341610938310623, -0.015279821120202541, 0.010704507119953632, -0.015312193892896175, 0.04128573089838028, -0.027797188609838486, -0.00833052396774292, 0.008098521269857883, -...
8
{"_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 getChildNodes(self): nodelist = [] if self.expr1 is not None: nodelist.append(self.expr1) if self.expr2 is not None: nodelist.append(self.expr2) if self.expr3 is not None: nodelist.append(self.expr3) return tuple(nodelist)
21,640
[ 0.026612499728798866, 0.005919131450355053, 0.032757073640823364, -0.06576579809188843, 0.02709483727812767, -0.028038544580340385, -0.017416613176465034, 0.022334367036819458, -0.011282525025308132, 0.06660465151071548, 0.010181535966694355, 0.0050252326764166355, -0.0023579534608870745, ...
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}}, {"_type": "arg", "_fields": {"arg": "expr1", "annotation": ...
class Raise(Node): def __init__(self, expr1, expr2, expr3, lineno=None): self.expr1 = expr1 self.expr2 = expr2 self.expr3 = expr3 self.lineno = lineno def getChildren(self): children = [] children.append(self.expr1) children.append(self.expr2) chi...
21,641
[ -0.0025367725174874067, 0.013145782984793186, -0.0018009822815656662, -0.04696941748261452, 0.03856904059648514, 0.009879530407488346, -0.018961427733302116, 0.005055875983089209, -0.01264095213264227, 0.02453475631773472, -0.0015283739194273949, -0.028775330632925034, 0.022535627707839012, ...
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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Set(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelist)...
21,642
[ 0.03089885786175728, 0.012838711962103844, 0.032897185534238815, -0.03530377149581909, 0.02514023892581463, 0.018801460042595863, -0.029910437762737274, 0.021680770441889763, -0.06712658703327179, 0.03036167286336422, 0.03089885786175728, -0.011420544236898422, -0.027955086901783943, 0.036...
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}}, {"_type": "arg", "_fields": {"arg": "leftright", "annotatio...
class RightShift(Node): def __init__(self, leftright, lineno=None): self.left = leftright[0] self.right = leftright[1] self.lineno = lineno def getChildren(self): return self.left, self.right def getChildNodes(self): return self.left, self.right def __repr__(se...
21,643
[ 0.02994406595826149, 0.036932457238435745, -0.00021551370446104556, -0.07126861065626144, 0.027499211952090263, -0.001138588530011475, -0.037365175783634186, 0.02328021265566349, -0.023020582273602486, 0.06001794710755348, -0.036067020148038864, -0.0019053102005273104, -0.009146571159362793,...
8
{"_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 getChildNodes(self): nodelist = [] nodelist.append(self.expr) if self.lower is not None: nodelist.append(self.lower) if self.upper is not None: nodelist.append(self.upper) return tuple(nodelist)
21,644
[ 0.02702184021472931, 0.013717351481318474, -0.05317666754126549, -0.0928114503622055, 0.02330607920885086, 0.019012311473488808, -0.04155459627509117, -0.0007270248024724424, -0.022872572764754295, 0.07485194504261017, 0.010001590475440025, -0.029829304665327072, -0.01101310271769762, 0.02...
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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class Slice(Node): def __init__(self, expr, flags, lower, upper, lineno=None): self.expr = expr self.flags = flags self.lower = lower self.upper = upper self.lineno = lineno def getChildren(self): children = [] children.append(self.expr) children....
21,645
[ 0.020840585231781006, 0.029427863657474518, -0.0502086766064167, -0.05762043595314026, 0.024088211357593536, -0.01424571592360735, -0.042119503021240234, -0.011964408680796623, -0.026479100808501244, 0.018001405522227287, -0.0019288997864350677, -0.022613829001784325, -0.005364558193832636, ...
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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Sliceobj(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(node...
21,646
[ -0.007107803598046303, 0.033482447266578674, -0.029441460967063904, -0.0384305901825428, 0.021338874474167824, -0.012865176424384117, -0.03535861894488335, -0.02550356276333332, -0.028843561187386513, 0.045275524258613586, -0.010927152819931507, 0.02224603481590748, 0.01357647217810154, -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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Stmt(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelist...
21,647
[ -0.0005211546085774899, 0.03513364866375923, 0.026498548686504364, -0.0514150969684124, 0.011546424590051174, -0.007827619090676308, -0.003229922614991665, -0.014600568450987339, -0.014095206744968891, 0.04337324574589729, 0.011315715499222279, -0.028849581256508827, -0.01661103032529354, ...
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}}, {"_type": "arg", "_fields": {"arg": "leftright", "annotatio...
class Sub(Node): def __init__(self, leftright, lineno=None): self.left = leftright[0] self.right = leftright[1] self.lineno = lineno def getChildren(self): return self.left, self.right def getChildNodes(self): return self.left, self.right def __repr__(self): ...
21,648
[ 0.0009619552292861044, 0.03664591535925865, -0.03128514066338539, -0.05942920222878456, 0.011601049453020096, 0.004232603125274181, -0.012742307968437672, -0.002456584945321083, -0.003790234448388219, 0.05411031097173691, -0.008386678993701935, -0.013370523229241371, 0.011538228020071983, ...
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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class Subscript(Node): def __init__(self, expr, flags, subs, lineno=None): self.expr = expr self.flags = flags self.subs = subs self.lineno = lineno def getChildren(self): children = [] children.append(self.expr) children.append(self.flags) childr...
21,649
[ 0.00498127331957221, 0.04201348498463631, 0.020460225641727448, -0.04640838876366615, -0.00984299648553133, 0.007531685754656792, -0.037937380373477936, 0.010156105272471905, -0.0031282398849725723, 0.03850666806101799, -0.004597004037350416, -0.052055731415748596, 0.030787115916609764, 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}}, {"_type": "arg", "_fields": {"arg": "body", "annotation": n...
class TryExcept(Node): def __init__(self, body, handlers, else_, lineno=None): self.body = body self.handlers = handlers self.else_ = else_ self.lineno = lineno def getChildren(self): children = [] children.append(self.body) children.extend(flatten(self.h...
21,650
[ 0.05673734471201897, 0.038270946592092514, -0.0015249276766553521, -0.04946675896644592, -0.004636114928871393, -0.021354563534259796, 0.01302461139857769, 0.0033760282676666975, 0.01043753046542406, 0.03688819706439972, -0.0003336650552228093, 0.013269937597215176, -0.05736181512475014, -...
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}}, {"_type": "arg", "_fields": {"arg": "body", "annotation": n...
class TryFinally(Node): def __init__(self, body, final, lineno=None): self.body = body self.final = final self.lineno = lineno def getChildren(self): return self.body, self.final def getChildNodes(self): return self.body, self.final def __repr__(self): ...
21,651
[ -0.03230340778827667, 0.026786191388964653, 0.0022689299657940865, -0.025576096028089523, 0.06370437145233154, -0.0471322126686573, -0.036856651306152344, -0.017484860494732857, -0.01576201245188713, 0.037636034190654755, -0.03341095522046089, 0.023402024060487747, 0.05143933370709419, -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}}, {"_type": "arg", "_fields": {"arg": "nodes", "annotation": ...
class Tuple(Node): def __init__(self, nodes, lineno=None): self.nodes = nodes self.lineno = lineno def getChildren(self): return tuple(flatten(self.nodes)) def getChildNodes(self): nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelis...
21,652
[ 0.012798728421330452, 0.02131221815943718, 0.012696156278252602, -0.044220004230737686, -0.004903519991785288, 0.0016568255377933383, 0.0010015033185482025, -0.025734219700098038, -0.017608223482966423, 0.03519365191459656, 0.007174354046583176, 0.028856972232460976, 0.003456112463027239, ...
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}}, {"_type": "arg", "_fields": {"arg": "test", "annotation": n...
class While(Node): def __init__(self, test, body, else_, lineno=None): self.test = test self.body = body self.else_ = else_ self.lineno = lineno def getChildren(self): children = [] children.append(self.test) children.append(self.body) children.ap...
21,653
[ -0.008052864111959934, -0.02889522910118103, 0.05459018424153328, -0.027086379006505013, -0.013949021697044373, -0.048096876591444016, -0.002398756332695484, -0.011606791988015175, 0.03835691139101982, 0.023549843579530716, -0.012093789875507355, -0.0006058490253053606, 0.040188949555158615,...
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": "router_ports", "annotation": null, "type_comment": null}}], "kwar...
def _generate_radvd_conf(self, router_ports): radvd_conf = utils.get_conf_file_name(cfg.CONF.ra_confs, self._router_id, 'radvd.conf', True) buf = six.StringIO() ...
21,654
[ 0.007949494756758213, 0.024351755157113075, 0.015574300661683083, -0.08156214654445648, 0.022988056764006615, 0.01781466230750084, -0.019719509407877922, -0.019210828468203545, -0.024784674867987633, 0.04253439977765083, 0.021126501262187958, -0.030823910608887672, 0.009811051189899445, 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}}, {"_type": "arg", "_fields": {"arg": "expr", "annotation": n...
class With(Node): def __init__(self, expr, vars, body, lineno=None): self.expr = expr self.vars = vars self.body = body self.lineno = lineno def getChildren(self): children = [] children.append(self.expr) children.append(self.vars) children.append...
21,655
[ 0.02568654529750347, 0.024044066667556763, 0.019595686346292496, -0.0286521315574646, 0.02285783179104328, -0.015113087370991707, -0.00303972652181983, 0.0453050434589386, 0.02600591629743576, 0.031412407755851746, 0.009221835061907768, -0.0010522130178287625, -0.01830679550766945, 0.00204...
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": "router_ports", "annotation": null, "type_comment": null}}], "kwar...
def enable(self, router_ports): for p in router_ports: if netaddr.IPNetwork(p['subnet']['cidr']).version == 6: break else: # Kill the daemon if it's running self.disable() return LOG.debug("Enable IPv6 RA for router %s", self._rout...
21,656
[ 0.04432058334350586, 0.023689374327659607, 0.009043270722031593, -0.03503197431564331, 0.009539651684463024, -0.012095730751752853, 0.006441547069698572, 0.009277197532355785, 0.048702433705329895, 0.04224376752972603, 0.04874807596206665, 0.005642772652208805, 0.012517940253019333, 0.0391...
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": "radvd_conf", "annotation": null, "type_comment": null}}], "kwarg"...
def _spawn_radvd(self, radvd_conf): def callback(pid_file): # we need to use -m syslog and f.e. not -m stderr (the default) # or -m stderr_syslog so that radvd 2.0+ will close stderr and # exit after daemonization; otherwise, the current thread will # be locked wa...
21,657
[ 0.012846703641116619, 0.01443926990032196, 0.005404109135270119, 0.014704697765409946, -0.007463828660547733, -0.01996016688644886, -0.010192425921559334, 0.0041327103972435, 0.039155904203653336, -0.012666212394833565, 0.04274448752403259, -0.03970799222588539, -0.010893154889345169, -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": "io", "annotation": nul...
class _ConverterHTMLParser(HTMLParser): def __init__(self, io): HTMLParser.__init__(self) self._io = io self._tag_stack = [] def handle_starttag(self, tag, attrs): attrs_dict = dict(attrs) self._tag_stack.append({'tag': tag}) class_attr = dict(attrs).get('class', None) if class_attr is ...
21,658
[ 0.050820279866456985, 0.003406168892979622, -0.000725625897757709, 0.0013136134948581457, -0.038357213139534, -0.00909925065934658, -0.01755719631910324, -0.02357093058526516, 0.01712159439921379, -0.0055569554679095745, 0.02191322110593319, -0.02228832244873047, 0.018912404775619507, -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": "tag", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def handle_starttag(self, tag, attrs): attrs_dict = dict(attrs) self._tag_stack.append({'tag': tag}) class_attr = dict(attrs).get('class', None) if class_attr is not None: if class_attr == 'doc-family extensions': self._io.write('{{^is_apps}}\n') self._tag_stack[-1]['close'] = True...
21,659
[ 0.06738193333148956, -0.011506636627018452, -0.00835318025201559, 0.0029911459423601627, -0.005799692589789629, -0.041597794741392136, -0.014167365618050098, -0.010098015889525414, 0.053840626031160355, 0.007101072929799557, 0.020427903160452843, -0.0384211540222168, -0.01010381244122982, ...
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": "tag", "annotation": null, "type_comment": null}}], "kwarg": null,...
def handle_endtag(self, tag): self._io.write('</' + tag + '>') if len(self._tag_stack) == 0: return if self._tag_stack[-1]['tag'] == tag: if self._tag_stack[-1].get('close', False): self._io.write('\n{{/is_apps}}') self._tag_stack.pop()
21,660
[ -0.031234219670295715, 0.030422639101743698, 0.03383127599954605, 0.007582472171634436, -0.003115885891020298, 0.0027811091858893633, -0.004292676225304604, -0.012022972106933594, -0.013750476762652397, 0.03005163185298443, 0.028474848717451096, -0.015582327730953693, -0.035222552716732025, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "page", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "x", "annotation": null, "type_comment": null}}, {"_type": "arg", ...
def draw_line (page, x, y, label): HPDF_Page_BeginText (page) HPDF_Page_MoveTextPos (page, x, y - 10) HPDF_Page_ShowText (page, label) HPDF_Page_EndText (page) HPDF_Page_MoveTo (page, x, y - 15) HPDF_Page_LineTo (page, x + 220, y - 15) HPDF_Page_Stroke (page)
21,661
[ -0.035465750843286514, -0.018273834139108658, 0.04942511394619942, -0.007843894883990288, 0.016598183661699295, 0.008008820936083794, -0.005063237156718969, 0.006521185860037804, 0.009367813356220722, 0.015041278675198555, 0.018418969586491585, -0.022667471319437027, -0.025979191064834595, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Global", "_fields": {"names": ["pdf"]}}, {"_type": "Assign", "...
def main (): global pdf page_title = "Line Example" DASH_MODE1= [3] DASH_MODE2= [3, 7] DASH_MODE3= [8, 7, 2, 7] fname=os.path.realpath(sys.argv[0]) fname=fname[:fname.rfind('.')]+'.pdf' pdf = HPDF_New (error_handler, NULL) if (not pdf): printf ("error: canno...
21,662
[ -0.023624081164598465, 0.02111431024968624, 0.03605780750513077, -0.0048813889734447, -0.011892628856003284, 0.005353410262614489, -0.0019183052936568856, -0.006412579212337732, -0.01582997664809227, 0.03794589266180992, 0.029357409104704857, -0.01696973480284214, -0.03221256285905838, 0.0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "page", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "x", "annotation": null, "type_comment": null}}, {"_type": "arg", ...
def draw_line2 (page, x, y, label): HPDF_Page_BeginText (page) HPDF_Page_MoveTextPos (page, x, y) HPDF_Page_ShowText (page, label) HPDF_Page_EndText (page) HPDF_Page_MoveTo (page, x + 30, y - 25) HPDF_Page_LineTo (page, x + 160, y - 25) HPDF_Page_Stroke (page)
21,663
[ 0.005785573273897171, -0.03037286549806595, 0.011604621075093746, -0.025217734277248383, 0.0010704983724281192, -0.004008615389466286, 0.023142293095588684, 0.00684003159403801, 0.012653500773012638, -0.043338797986507416, -0.02684684470295906, -0.014427668415009975, 0.03336328640580177, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "maxsize", "annotation": {"_type": "Name", "_fields": {"id": "int", "ctx": {"_type": "Load", "_fields": {}}}}, "type_comment": null}}], "kwarg": null, "va...
def async_lru_cache(maxsize: int = 128) -> TCallable: cache = OrderedDict() awaiting: dict[Any, TResult] = dict() async def run_and_cache( func: TCallable, args: Any, kwargs: Any ) -> TResult: result = await func(*args, **kwargs) key = functools._make_key(args, kwargs, False) ...
21,664
[ 0.03884861618280411, 0.033786382526159286, 0.0014888914301991463, -0.021531661972403526, -0.024394914507865906, 0.022104311734437943, 0.036809977144002914, 0.03172484040260315, -0.0071123200468719006, -0.05337103456258774, -0.023100724443793297, 0.0032097063958644867, 0.024967564269900322, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "AsyncFunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "func", "annotation": {"_type": "Name", "_fields": {"id": "TCallable", "ctx": {"_type": "Load", "_fields": {}}}}, "type_comment": null}}, {"_type": "...
async def run_and_cache( func: TCallable, args: Any, kwargs: Any ) -> TResult: result = await func(*args, **kwargs) key = functools._make_key(args, kwargs, False) cache[key] = result if len(cache) > maxsize: cache.popitem(False) cache.move_to_end(key) ...
21,665
[ -0.004690664354711771, -0.010014086961746216, -0.009150234051048756, -0.0384276807308197, 0.0012510730884969234, 0.0031390308868139982, 0.026564840227365494, 0.04811163246631622, 0.02887578308582306, -0.012049917131662369, 0.0007097896304912865, 0.03393784910440445, 0.035544503480196, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "AsyncFunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": {"_type": "Name", "_fields": {"id": "Any", "ctx": {"_type": "Load", "_fields": {}}}}, "type_comment": null}}, "va...
async def wrapper(*args: Any, **kwargs: Any) -> TResult: key = functools._make_key(args, kwargs, False) if key in cache: return cache[key] if key in awaiting: task = awaiting[key] return await asyncio.wait_for(task, timeout=None) ...
21,666
[ 0.019564907997846603, -0.033350031822919846, -0.0012318030931055546, -0.015357401221990585, 0.0035127149894833565, 0.008248928934335709, 0.02024032361805439, 0.019122013822197914, 0.03642815351486206, 0.00726348627358675, -0.025245044380426407, 0.0030338342767208815, 0.04849705845117569, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "func", "annotation": {"_type": "Name", "_fields": {"id": "TCallable", "ctx": {"_type": "Load", "_fields": {}}}}, "type_comment": null}}], "kwarg": null, ...
def decorator(func: TCallable) -> TCallable: @functools.wraps(func) async def wrapper(*args: Any, **kwargs: Any) -> TResult: key = functools._make_key(args, kwargs, False) if key in cache: return cache[key] if key in awaiting: task = aw...
21,667
[ 0.03468882665038109, 0.03545094653964043, -0.005762008484452963, -0.002930173184722662, -0.011444116942584515, -0.004366834182292223, 0.019335763528943062, -0.040417030453681946, 0.002833371516317129, 0.03210744634270668, 0.031001141294836998, -0.06067471578717232, -0.03343501314520836, -0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "lm.issue"}}, "targets": [{"_type": "Name", "_fields": {"id": "_name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}...
class LMIssue(models.Model): _name = "lm.issue" _parent_name = "parent_id" _inherit = "lm.tree.mixin" _description = "LMIssue" name = fields.Char(required=True) parent_id = fields.Many2one(comodel_name="lm.issue") complete_chain_ids = fields.Many2many( string="Complete Chain", ...
21,668
[ -0.020123913884162903, -0.01878305710852146, 0.03552712872624397, 0.01906009390950203, 0.05580618232488632, -0.0026526220608502626, -0.026063570752739906, 0.054121799767017365, 0.05336826294660568, -0.02506623975932598, 0.027880927547812462, -0.03820883855223656, 0.02921070158481598, -0.01...
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": "url_name", "annotation": null, "type_comment": null}}, {"_type": ...
def test_access(self, url_name, role, has_access): if role is not None: role().add_users(self.user) url = reverse(url_name) response = self.client.get(url) if has_access: self.assertEqual(response.status_code, 200) else: self.assertEqual(resp...
21,669
[ 0.07394631206989288, 0.03198981657624245, 0.07472711056470871, -0.00461877416819334, 0.025330057367682457, -0.02110455371439457, -0.01590305007994175, -0.01027095876634121, 0.039223697036504745, -0.0004076233017258346, -0.024319609627127647, -0.028659937903285027, 0.014582579955458641, -0....
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": "orm", "annotation": null, "type_comment": null}}], "kwarg": null,...
def forwards(self, orm): # Adding field 'Report.accepted_at' db.add_column(u'fixmystreet_report', 'accepted_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True), keep_default=False) # Adding field 'HistoricalReport.accepted_at'...
21,670
[ 0.02537194825708866, 0.026356397196650505, -0.019398128613829613, -0.023134563118219376, 0.042398449033498764, 0.01486742403358221, -0.001048075151629746, 0.025573313236236572, 0.039668839424848557, 0.027117108926177025, 0.024812601506710052, 0.00079567008651793, 0.007428118959069252, 0.00...
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": "url_name", "annotation": null, "type_comment": null}}], "kwarg": ...
def test_require_login(self, url_name): url = reverse(url_name) # Log out then try to retrieve the page self.client.logout() response = self.client.get(url) # Expect a redirect to the login page redirect_url = "{login_url}?next={original_url}".format( login_...
21,671
[ -0.008057894185185432, 0.014478480443358421, 0.02579929493367672, -0.05482642725110054, -0.003245378378778696, -0.04182152450084686, -0.040979478508234024, -0.0017440253868699074, 0.0032102931290864944, 0.026009807363152504, -0.0029032977763563395, 0.017565974965691566, 0.0057861292734742165...
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": {"_type": "arg", "_fields": {"arg": "opts", "anno...
class TestFlowlist: def mkmaster(self, **opts): if "verbosity" not in opts: opts["verbosity"] = 1 o = options.Options(**opts) return console.master.ConsoleMaster(o, proxy.DummyServer()) def test_new_request(self): m = self.mkmaster() x = flowlist.FlowListBox(...
21,672
[ -0.016688980162143707, -0.02119489759206772, 0.013037264347076416, -0.0405532605946064, 0.014948542229831219, -0.033014923334121704, -0.028807977214455605, -0.021675385534763336, 0.015140737406909466, 0.02769751287996769, 0.033164408057928085, -0.00405479222536087, -0.006929717026650906, -...
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": "values", "annotation":...
class TextbookList(List): def from_json(self, values): textbooks = [] for title, book_url in values: try: textbooks.append(Textbook(title, book_url)) except: # If we can't get to S3 (e.g. on a train with no internet), don't break ...
21,673
[ 0.0923721194267273, 0.02650618739426136, 0.03330967202782631, -0.011963171884417534, 0.02066158503293991, 0.03228230029344559, -0.030227554962038994, 0.028857726603746414, -0.05374294891953468, -0.015330667607486248, 0.028378287330269814, -0.02088988944888115, -0.011906095780432224, -0.008...
8
{"_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 end_page(self): # The last page should be the last element in the table of contents, # but it may be nested. So recurse all the way down the last element last_el = self.table_of_contents[-1] while last_el.getchildren(): last_el = last_el[-1] return int(last_el.at...
21,674
[ 0.005740719381719828, -0.012652771547436714, 0.0034426478669047356, -0.048565711826086044, 0.01991860195994377, -0.04342849552631378, -0.0018982129404321313, -0.008133924566209316, 0.011760893277823925, 0.00992957130074501, 0.036911845207214355, -0.002772253006696701, -0.026970380917191505, ...
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": "values", "annotation": null, "type_comment": null}}], "kwarg": nu...
def from_json(self, values): textbooks = [] for title, book_url in values: try: textbooks.append(Textbook(title, book_url)) except: # If we can't get to S3 (e.g. on a train with no internet), don't break # the rest of the courseware...
21,675
[ -0.00044679443817585707, -0.03342558071017265, 0.006988011300563812, -0.018660668283700943, 0.013342962600290775, -0.021991539746522903, -0.03276330232620239, -0.035081278532743454, 0.006992880720645189, 0.004484988283365965, 0.03338662534952164, 0.02545876055955887, -0.0028999028727412224, ...
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": "values", "annotation": null, "type_comment": null}}], "kwarg": nu...
def to_json(self, values): json_data = [] for val in values: if isinstance(val, Textbook): json_data.append((val.title, val.book_url)) elif isinstance(val, tuple): json_data.append(val) else: continue return json...
21,676
[ -0.018246393650770187, 0.027056176215410233, 0.018246393650770187, 0.0015570977702736855, 0.05146827921271324, 0.036903075873851776, 0.021186785772442818, -0.04579263553023338, 0.005057362373918295, 0.021916186437010765, 0.02783116325736046, -0.0795045867562294, 0.009208673611283302, -0.01...
9
{"_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": "xml_data", "annotation": null, "type_comment": null}}, {"_type": "...
def from_xml(cls, xml_data, system, org=None, course=None): instance = super(CourseDescriptor, cls).from_xml(xml_data, system, org, course) # bleh, have to parse the XML here to just pull out the url_name attribute # I don't think it's stored anywhere in the instance. course_file = Stri...
21,677
[ -0.013455708511173725, 0.005583095829933882, 0.0109551465138793, -0.023470746353268623, -0.003047359874472022, 0.01032201200723648, 0.01427430659532547, -0.038934580981731415, -0.004908391740173101, 0.018866131082177162, 0.03177184611558914, -0.02921372465789318, -0.014376631937921047, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "List", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "help...
class CourseFields(object): lti_passports = List(help="LTI tools passports as id:client_key:client_secret", scope=Scope.settings) textbooks = TextbookList(help="List of pairs of (title, url) for textbooks used in this course", default=[], scope=Scope.content) wiki_slug = String(...
21,678
[ 0.003487614681944251, 0.04732788726687431, 0.007696416229009628, -0.010068444535136223, 0.0030734955798834562, -0.012508084997534752, 0.03763693943619728, -0.0527367889881134, 0.03371548652648926, 0.04209928587079048, 0.019167795777320862, -0.06098536401987076, 0.002432597102597356, -0.015...
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": "xml_object", "annotation": null, "type_comment": null}}, {"_type":...
def definition_from_xml(cls, xml_object, system): textbooks = [] for textbook in xml_object.findall("textbook"): textbooks.append((textbook.get('title'), textbook.get('book_url'))) xml_object.remove(textbook) # Load the wiki tag if it exists wiki_slug = None ...
21,679
[ 0.014493308961391449, 0.02485489472746849, 0.04239320009946823, 0.011394516564905643, 0.006864685565233231, -0.04267295077443123, 0.02360677160322666, -0.062147997319698334, 0.036582961678504944, 0.014773061498999596, 0.024962492287158966, -0.06993801891803741, 0.00888750795274973, -0.0471...
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": "resource_fs", "annotation": null, "type_comment": null}}], "kwarg...
def definition_to_xml(self, resource_fs): xml_object = super(CourseDescriptor, self).definition_to_xml(resource_fs) if len(self.textbooks) > 0: textbook_xml_object = etree.Element('textbook') for textbook in self.textbooks: textbook_xml_object.set('title', textbo...
21,680
[ 0.005920795723795891, -0.009232519194483757, 0.04588480666279793, -0.039501022547483444, 0.006345654837787151, -0.028607193380594254, -0.02049129083752632, -0.009510312229394913, 0.014706668443977833, -0.005155504215508699, -0.012026786804199219, -0.033487629145383835, 0.019358333200216293, ...
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 _sorting_dates(self): # utility function to get datetime objects for dates used to # compute the is_new flag and the sorting_score announcement = self.announcement if announcement is not None: announcement = announcement try: start = dateutil.parser....
21,681
[ 0.01043318398296833, -0.0013287673937156796, 0.0034221061505377293, -0.006734792608767748, -0.026479607447981834, -0.010176046751439571, 0.0015250393189489841, -0.050420671701431274, 0.028295977041125298, 0.01630355976521969, 0.017802610993385315, -0.0022704622242599726, 0.007363956887274980...
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 start_date_text(self): def try_parse_iso_8601(text): try: result = Date().from_json(text) if result is None: result = text.title() else: result = result.strftime("%b %d, %Y") except ValueError: ...
21,682
[ 0.004068655893206596, -0.007801653817296028, -0.025068866088986397, -0.01546904444694519, 0.01568961888551712, 0.003629902843385935, -0.0015967736253514886, -0.05650564655661583, 0.03774715214967728, -0.01656232960522175, 0.0003800129343289882, 0.023707052692770958, -0.0005927961901761591, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "text", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def try_parse_iso_8601(text): try: result = Date().from_json(text) if result is None: result = text.title() else: result = result.strftime("%b %d, %Y") except ValueError: result = text.title()...
21,683
[ -0.02905694581568241, -0.01644081249833107, 0.013227018527686596, -0.014515192247927189, -0.0030660522170364857, 0.044568147510290146, -0.018592195585370064, 0.000585571164265275, 0.007171275094151497, 0.040106020867824554, 0.01665329560637474, -0.006288146134465933, -0.02746332809329033, ...
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 forum_posts_allowed(self): date_proxy = Date() try: blackout_periods = [(date_proxy.from_json(start), date_proxy.from_json(end)) for start, end in self.discussion_blackouts] now =...
21,684
[ 0.011040367186069489, 0.028356531634926796, -0.03339396044611931, -0.006606379523873329, 0.00394861027598381, 0.005525430664420128, -0.013307210057973862, -0.027474982663989067, 0.015983344987034798, 0.03192470967769623, 0.018554532900452614, -0.05045825615525246, 0.020538020879030228, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "json_file", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs...
def clean_json(json_file): conditions = [ u'', u'brak uwag', u'brak zarzut\u00f3w', u'brak m\u0119\u017c\xf3w zaufania w obwodzie', u'brak zarz\u0105dze\u0144' ] clean_data_arr = [] for obj in json_file[u'records']: clean_data = {k: v for k, v in obj.i...
21,685
[ 0.02744322456419468, 0.04539673402905464, 0.002225244417786598, -0.002016855403780937, -0.004791488870978355, 0.031989891082048416, 0.02529812976717949, 0.008160687051713467, -0.012509167194366455, 0.007548635359853506, 0.02637067623436451, -0.011961235664784908, -0.02093799039721489, 0.05...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def getregentry(): return codecs.CodecInfo( name='cp037', encode=Codec().encode, decode=Codec().decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamreader=StreamReader, streamwriter=StreamWriter, )
21,686
[ 0.029955681413412094, 0.02785055711865425, -0.006938442587852478, -0.0194784514605999, 0.035254787653684616, 0.03189142793416977, -0.014953644014894962, -0.03481924533843994, -0.009400470182299614, 0.0464579239487648, 0.01044093444943428, -0.07496179640293121, 0.012092368677258492, 0.02760...
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}}, {"_type": "arg", "_fields": {"arg": "obj", "annotation": nu...
class K(object): def __init__(self, obj, *args): self.obj = obj def __lt__(self, other): return mycmp(self.obj, other.obj) < 0 def __gt__(self, other): return mycmp(self.obj, other.obj) > 0 def __eq__(self, other): return mycmp(self.obj, ot...
21,687
[ 0.010819487273693085, 0.010032816790044308, -0.02211540937423706, -0.04389842227101326, -0.016076883301138878, -0.0024098705034703016, -0.009733661077916622, -0.010420612059533596, 0.06603599339723587, -0.016542237251996994, 0.03862440586090088, -0.04066310077905655, 0.02588256262242794, -...
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": "List", "_fields": {"c...
def converter(): jsons = [] for file_name in glob.glob('./*.json'): jsons.append(open(file_name, "r+b")) # single_json_file = open('sejmik_warszawa.json', 'r+b') # destined_file = open('sejmik_warszawa_json.json', 'r+b') for json_file in jsons: json_to_clean = json.load(json_file) ...
21,688
[ 0.016547121107578278, 0.06434366852045059, 0.09107103198766708, -0.04591798037290573, -0.011620106175541878, 0.007452391088008881, 0.004642980173230171, -0.012475022114813328, -0.020686713978648186, -0.001431421609595418, -0.05705438181757927, 0.0001379746972816065, 0.011721345596015453, 0...
10
{"_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 = [ ('reports', '0013_incident_location_id'), ] operations = [ migrations.AddField( model_name='incident', name='parsed_case', field=models.BooleanField(default=False), ), migrations.Add...
21,689
[ -0.006258637178689241, 0.03254491463303566, 0.06659632921218872, -0.016881704330444336, -0.03901401907205582, -0.008845171891152859, 0.00893378909677267, -0.009814429096877575, 0.013370221480727196, -0.01483241654932499, -0.03879247233271599, -0.06504552066326141, 0.01714755780994892, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "base.module.configuration"}}, "targets": [{"_type": "Name", "_fields": {"id": "_name", "ctx": {"_type": "Store", "_fields": {}}}}], "type...
class base_module_configuration(osv.osv_memory): _name = "base.module.configuration" def start(self, cr, uid, ids, context=None): todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', ('type','=','recurring'), ('state', '=', 'open')]) if not todo_ids: # When...
21,690
[ 0.009894200600683689, 0.02619650401175022, 0.0069214277900755405, -0.019822247326374054, 0.006994760129600763, 0.032153330743312836, 0.019032515585422516, 0.03725273907184601, -0.06836813688278198, 0.025722665712237358, -0.027640582993626595, -0.04384135082364082, 0.03567327558994293, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "Tcl"}}, "targets": [{"_type": "Name", "_fields": {"id": "lang", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_t...
class TclLexer(Lexer): lang = "Tcl" def __init__(self): self._properties = SilverCity.PropertySet() self._lexer = SilverCity.find_lexer_module_by_id( ScintillaConstants.SCLEX_TCL) self._keyword_lists = [ SilverCity.WordList(' '.join(sorted(keywords + v8_6_keyword...
21,691
[ 0.002308072056621313, 0.009859481826424599, 0.03569985553622246, -0.001307698548771441, -0.0051241712644696236, -0.043928634375333786, 0.007463602814823389, 0.05454074963927269, -0.020095281302928925, 0.02568984590470791, -0.011866501532495022, -0.02704458497464657, 0.005607109982520342, -...
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": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def start(self, cr, uid, ids, context=None): todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', ('type','=','recurring'), ('state', '=', 'open')]) if not todo_ids: # When there is no wizard todo it will display message data_obj = self.pool.get('ir.model...
21,692
[ 0.03972247242927551, 0.0455118864774704, 0.038233768194913864, -0.045677300542593, 0.01357558649033308, -0.04761498048901558, -0.010663156397640705, -0.010751769877970219, -0.05921744182705879, 0.023972902446985245, -0.013150242157280445, 0.0035829388070851564, 0.03795020282268524, -0.0121...
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": "xxx_todo_changeme", "annotation": null, "type_comment": null}}, {...
def _findScannableFiles(self, xxx_todo_changeme, dirname, names): (files, searchedDirs, skipRareImports) = xxx_todo_changeme if sys.platform.startswith("win"): cpath = dirname.lower() else: cpath = dirname if cpath in searchedDirs: ...
21,693
[ -0.02267787978053093, -0.03612350672483444, 0.024825874716043472, 0.016677947714924812, 0.02546614222228527, -0.04866036772727966, 0.031806860119104385, 0.018134040758013725, 0.05679796636104584, -0.005602344870567322, 0.0030541815795004368, 0.0052383216097950935, 0.00010141341772396117, -...
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 ws_connect(self, path, cookie_header, compression_options=None): # type: (str, str, Optional[Any]) -> Generator[Any, Callable[[HTTPRequest, Optional[Any]], Any], None] request = HTTPRequest(url='ws://127.0.0.1:%d%s' % (self.get_http_port(), path)) request.headers.add('Cookie', cookie_header)...
21,694
[ -0.013490770943462849, -0.01592613197863102, 0.002854470396414399, -0.010075600817799568, 0.006348931230604649, -0.005165231879800558, -0.019584838300943375, 0.010035955347120762, 0.014295006170868874, 0.013592716306447983, 0.02006058394908905, -0.028454085811972618, 0.008382175117731094, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "email", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def _get_queue_events_data(email): # type: (str) -> Dict[str, Dict[str, str]] user_profile = UserProfile.objects.filter(email=email).first() events_query = { 'queue_id': None, 'narrow': [], 'handler_id': 0, 'user_profile_email': user_profile.email,...
21,695
[ 0.004685236606746912, -0.026224080473184586, 0.006616723723709583, -0.006738131865859032, 0.01672116294503212, -0.04039568081498146, -0.031146613880991936, 0.023729702457785606, 0.021698880940675735, -0.011599961668252945, 0.024082887917757034, -0.04679717868566513, 0.0038436600007116795, ...
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": "ws", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def _websocket_auth(self, ws, queue_events_data, cookies): # type: (Any, Dict[str, Dict[str, str]], SimpleCookie) -> Generator[str, str, None] auth_queue_id = ':'.join((queue_events_data['response']['queue_id'], '0')) message = { "req_id": auth_queue_id, "type": "auth", ...
21,696
[ -0.0183932613581419, -0.04130146652460098, 0.011454101651906967, 0.012287827208638191, 0.046534694731235504, -0.02085595764219761, -0.0009443541639484465, 0.03806917741894722, 0.047843001782894135, -0.01021634042263031, 0.0032354951836168766, -0.013262644410133362, 0.0007972497260197997, 0...
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_tornado_connect(self): # type: () -> Generator[str, Any, None] user_profile = UserProfile.objects.filter(email='hamlet@zulip.com').first() cookies = self._get_cookies(user_profile) cookie_header = self.get_cookie_header(cookies) ws = yield self.ws_connect('/sockjs/366/v8...
21,697
[ 0.024894198402762413, -0.04403997212648392, -0.028601346537470818, 0.002742233220487833, -0.0014041113900020719, 0.04101325199007988, 0.0018682380905374885, -0.015203997492790222, 0.03413860499858856, -0.0014862318057566881, 0.0030589832458645105, -0.03732956573367119, 0.0147464694455266, ...
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": "request_id", "annotation": null, "type_comment": null}}, {"_type"...
def _check_message_sending(self, request_id, ack_resp, msg_resp, profile, queue_events_data): # type: (str, str, str, UserProfile, Dict[str, Dict[str, str]]) -> None self.assertEqual(ack_resp[0], 'a') self.assertEqual( ujson.loads(ack_resp[1:]), [ { ...
21,698
[ -0.0008589533972553909, -0.0457845963537693, 0.012995054014027119, -0.0020624727476388216, 0.02524190954864025, -0.005837929900735617, -0.015607191249728203, 0.01934819296002388, 0.03916893154382706, 0.00732448510825634, -0.015147770754992962, -0.02367987670004368, 0.013080375269055367, -0...
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_tornado_auth(self): # type: () -> Generator[str, TornadoTestCase, None] user_profile = UserProfile.objects.filter(email='hamlet@zulip.com').first() cookies = self._get_cookies(user_profile) cookie_header = self.get_cookie_header(cookies) ws = yield self.ws_connect('/sock...
21,699
[ 0.04295075684785843, -0.0627133771777153, 0.01667965017259121, 0.022832412272691727, 0.02803656831383705, -0.020329145714640617, -0.0037779537960886955, 0.03006552904844284, 0.04353046044707298, -0.02168617956340313, 0.028115617111325264, -0.036073364317417145, -0.01461116224527359, 0.0189...
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_sending_private_message(self): # type: () -> Generator[str, Any, None] user_profile = UserProfile.objects.filter(email='hamlet@zulip.com').first() cookies = self._get_cookies(user_profile) cookie_header = self.get_cookie_header(cookies) queue_events_data = self._get_queu...
21,700
[ 0.0474526509642601, -0.0175026785582304, 0.01451830193400383, 0.03300869092345238, -0.022473100572824478, -0.05845554918050766, 0.06550759822130203, 0.007094532251358032, -0.032435182482004166, 0.02967383712530136, 0.01695040985941887, -0.0003083280462305993, 0.02359887957572937, -0.073664...
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": "form", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, form, field, name): self.form = form self.field = field self.name = name self.html_name = form.add_prefix(name) self.html_initial_name = form.add_initial_prefix(name) self.html_initial_id = form.add_initial_prefix(self.auto_id) if self.field.lab...