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
17,601
[ 0.04685737192630768, -0.013900835067033768, 0.05449625849723816, -0.038194429129362106, -0.0029960486572235823, 0.0042207613587379456, -0.0029683716129511595, -0.008586827665567398, -0.016481727361679077, 0.017339717596769333, 0.009257998317480087, 0.018100839108228683, -0.021851088851690292...
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 histogram_shift_abc(self): a = self.a b = self.b c = self.c RV = (c-a)/(a+b+c)*4144.68 # add a mask: only show results with 2b>a+c mask = 2*b>a+c a = a[mask] b = b[mask] c = c[mask] RV = RV[mask] font = {'weight': 'bold...
17,602
[ 0.06821255385875702, -0.002214708598330617, 0.016014225780963898, -0.003654912579804659, 0.052338723093271255, -0.029594965279102325, -0.014666448347270489, 0.0019339214777573943, -0.008662283420562744, -0.017614712938666344, 0.013168917037546635, -0.009322132915258408, 0.04193088039755821, ...
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": "data", "annotation": null, "type_comment": null}}], "kwarg": null...
def extract_common_fields(self, data): return dict( email=data.get("email"), username=data.get("username"), first_name=data.get("first_name"), last_name=data.get("last_name"), name=data.get("name"), )
17,603
[ -0.016094302758574486, -0.02444501407444477, 0.010865086689591408, -0.003373503452166915, 0.042658496648073196, -0.005627278704196215, 0.007680591195821762, 0.03315082937479019, 0.00007580001692986116, -0.04178791493177414, 0.046392831951379776, -0.06547689437866211, 0.04602627083659172, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "cern"}}, "targets": [{"_type": "Name", "_fields": {"id": "id", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_ty...
class CernProvider(OAuth2Provider): id = "cern" name = "Cern" account_class = CernAccount def get_auth_params(self, request, action): data = super(CernProvider, self).get_auth_params(request, action) data["scope"] = "read:user" return data def extract_uid(self, data): ...
17,604
[ 0.06179976835846901, -0.015221134759485722, 0.027478668838739395, 0.025713583454489708, -0.01129872351884842, -0.002703467383980751, 0.026607021689414978, 0.03316616639494896, -0.017879657447338104, 0.029614204540848732, -0.025103431195020676, -0.021104751154780388, 0.017062488943338394, -...
9
{"_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, *args, **kwargs): suggested_pk = kwargs.pop('for_pk', None) super(BaseSuggestionForm, self).__init__(*args, **kwargs) self.helper = FormHelper() self.helper.form_class = 'form-horizontal' self.helper.form_action = 'main' self.helper.html5_required = Tr...
17,605
[ 0.009265446104109287, -0.0009539967868477106, -0.0194814745336771, 0.04162895306944847, 0.03159866854548454, 0.014138546772301197, -0.03872257471084595, 0.057777926325798035, 0.05384448170661926, 0.011975152418017387, 0.008740986697375774, -0.029806766659021378, 0.010713172145187855, -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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def get_response(self): if self.is_valid(): res = {'success': True} else: res = { 'success': False, 'errors': self.errors, } return HttpResponse( json.dumps(res, ensure_ascii=False, cls=PromiseAwareJSONEncoder), ...
17,606
[ 0.01423613540828228, 0.0036750552244484425, 0.030855411663651466, 0.0068044960498809814, -0.03928420692682266, -0.016230449080467224, 0.0017701097531244159, -0.01574127748608589, -0.04169243574142456, 0.010222422890365124, -0.006603810470551252, 0.009908851236104965, 0.04522951692342758, 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": "master", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, master, app): CNCRibbon.ButtonGroup.__init__(self, master, N_("Probe"), app) self.tab = StringVar() # --- col, row = 0, 0 b = Ribbon.LabelRadiobutton( self.frame, image=Utils.icons["probe32"], text=_("Probe"), co...
17,607
[ -0.002412541536614299, -0.00903208926320076, 0.024886349216103554, 0.009959204122424126, -0.02232074737548828, -0.006139954552054405, -0.0041720205917954445, -0.02901463769376278, -0.04319542646408081, -0.03811086714267731, -0.011422764509916306, -0.00029227466438896954, 0.07911387085914612,...
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": "master", "annotation":...
class ProbeTabGroup(CNCRibbon.ButtonGroup): def __init__(self, master, app): CNCRibbon.ButtonGroup.__init__(self, master, N_("Probe"), app) self.tab = StringVar() # --- col, row = 0, 0 b = Ribbon.LabelRadiobutton( self.frame, image=Utils.icons["probe3...
17,608
[ -0.0020400951616466045, 0.007764183916151524, 0.047952622175216675, 0.007157107815146446, -0.04342830553650856, -0.029753118753433228, -0.012812500819563866, -0.02442362904548645, -0.05255362018942833, 0.03271820768713951, 0.006067565642297268, 0.008422382175922394, 0.006537251174449921, 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": "master", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, master, app): CNCRibbon.ButtonGroup.__init__(self, master, "Probe:Autolevel", app) self.label["background"] = Ribbon._BACKGROUND_GROUP2 self.grid3rows() # --- col, row = 0, 0 b = Ribbon.LabelButton( self.frame, self, ...
17,609
[ -0.010340667329728603, 0.014852280728518963, 0.05786796659231186, 0.009302872233092785, -0.02992827817797661, -0.030027708038687706, -0.020383046939969063, -0.04049266129732132, -0.04909331351518631, 0.02360207587480545, -0.0015349427703768015, 0.0015652377624064684, 0.009346372447907925, ...
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": "master", "annotation":...
class AutolevelGroup(CNCRibbon.ButtonGroup): def __init__(self, master, app): CNCRibbon.ButtonGroup.__init__(self, master, "Probe:Autolevel", app) self.label["background"] = Ribbon._BACKGROUND_GROUP2 self.grid3rows() # --- col, row = 0, 0 b = Ribbon.LabelButton( ...
17,610
[ 0.03975164517760277, -0.011783523485064507, 0.02063729800283909, -0.004617257043719292, -0.01377110555768013, -0.006301539018750191, -0.0033782445825636387, -0.010738106444478035, -0.028110092505812645, 0.025864381343126297, 0.005753017961978912, 0.0031491562258452177, 0.03851263225078583, ...
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": "master", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "ProbeCommon", app) lframe = tkExtra.ExLabelFrame( self, text=_("Common"), foreground="DarkBlue") lframe.pack(side=TOP, fill=X) frame = lframe.frame # ---- row = 0 col = 0 ...
17,611
[ 0.04130948707461357, -0.021650152280926704, 0.011041184887290001, -0.03290089964866638, 0.009587363339960575, 0.00785849429666996, -0.004132258240133524, -0.005373245570808649, -0.0034151708241552114, 0.004256684798747301, 0.022043077275156975, -0.017799491062760353, 0.06784500181674957, 0...
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}, "targets": [{"_type": "Name", "_fields": {"id": "probeFeed", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, ...
class ProbeCommonFrame(CNCRibbon.PageFrame): probeFeed = None tlo = None probeCmd = None def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "ProbeCommon", app) lframe = tkExtra.ExLabelFrame( self, text=_("Common"), foreground="DarkBlue") lfr...
17,612
[ 0.015382756479084492, 0.008774952031672001, -0.006125847343355417, -0.026444515213370323, -0.04515111818909645, -0.011380846612155437, -0.0197968240827322, -0.036562301218509674, -0.005467725917696953, -0.03488708287477493, 0.03214823454618454, 0.013016179203987122, 0.014385603368282318, -...
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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def tloSet(self, event=None): try: CNC.vars["TLO"] = float(ProbeCommonFrame.tlo.get()) cmd = f"G43.1Z{ProbeCommonFrame.tlo.get()}" self.sendGCode(cmd) except Exception: pass self.app.mcontrol.viewParameters()
17,613
[ 0.00432625412940979, -0.006396939512342215, -0.014844396151602268, -0.027591213583946228, -0.020895101130008698, 0.048835910856723785, -0.012141747400164604, 0.005378404166549444, 0.02410869672894478, 0.004037164617329836, 0.06448706984519958, -0.03114096075296402, 0.009714743122458458, 0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"va...
def probeUpdate(): try: CNC.vars["fastprbfeed"] = float( ProbeCommonFrame.fastProbeFeed.get()) CNC.vars["prbfeed"] = float(ProbeCommonFrame.probeFeed.get()) CNC.vars["prbcmd"] = str( ProbeCommonFrame.probeCmd.get().split()[0]) retur...
17,614
[ 0.028993744403123856, 0.009709207341074944, -0.014139869250357151, -0.0032050583977252245, -0.02275894209742546, 0.0018360154936090112, 0.007273936178535223, 0.0021659245248883963, -0.015567881055176258, -0.003974846098572016, -0.0033564658369868994, 0.014025118201971054, 0.02075717598199844...
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 updateTlo(self): try: if self.focus_get() is not ProbeCommonFrame.tlo: state = ProbeCommonFrame.tlo.cget("state") state = ProbeCommonFrame.tlo["state"] = NORMAL ProbeCommonFrame.tlo.set(str(CNC.vars.get("TLO", ""))) state = ProbeCom...
17,615
[ 0.034493301063776016, -0.046258654445409775, -0.00144087930675596, -0.043223243206739426, -0.012869137339293957, 0.014236326329410076, -0.012994566932320595, 0.0027437852695584297, 0.03695173189043999, -0.022640148177742958, 0.027694985270500183, -0.009219118393957615, 0.07520794123411179, ...
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 loadConfig(self): ProbeCommonFrame.fastProbeFeed.set(Utils.getFloat("Probe", "fastfeed")) ProbeCommonFrame.probeFeed.set(Utils.getFloat("Probe", "feed")) ProbeCommonFrame.tlo.set(Utils.getFloat("Probe", "tlo")) cmd = Utils.getStr("Probe", "cmd") for p in PROBE_CMD: ...
17,616
[ 0.03216920047998428, 0.01748202182352543, 0.03835777938365936, -0.018494438380002975, -0.04166596010327339, 0.02063334919512272, 0.0013181030517444015, -0.006623490247875452, -0.03242587298154831, 0.0005365098477341235, 0.056296102702617645, -0.004220781847834587, 0.01699720323085785, -0.0...
12
{"_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": "master", "annotation":...
class ProbeFrame(CNCRibbon.PageFrame): def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "Probe:Probe", app) # ---------------------------------------------------------------- # Record point # ----------------------------------------------------------------...
17,617
[ 0.023290706798434258, 0.0033953252714127302, 0.046492405235767365, -0.01855839230120182, -0.031182844191789627, 0.008010816760361195, -0.002533049788326025, -0.01566559635102749, -0.046136368066072464, 0.02424013800919056, 0.023602239787578583, 0.014923854731023312, 0.009420126676559448, 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": "master", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "Probe:Probe", app) # ---------------------------------------------------------------- # Record point # ---------------------------------------------------------------- recframe = tkExtra.ExLabelFrame( ...
17,618
[ 0.015592938289046288, -0.024302957579493523, -0.03806879371404648, 0.060970138758420944, -0.04507685452699661, 0.033288296312093735, -0.011732246726751328, 0.0021477832924574614, 0.0008720969781279564, 0.039145033806562424, 0.013728292658925056, 0.008735048584640026, 0.04370027408003807, 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 warnMessage(self): if self.warn: ans = messagebox.askquestion( _("Probe connected?"), _( "Please verify that the probe is connected.\n\n" + "Show this message again?" ), icon="warning", ...
17,619
[ 0.006112643983215094, 0.0026379721239209175, 0.0151300560683012, -0.0038330317474901676, -0.06178316846489906, 0.0034920373000204563, -0.00027705810498446226, -0.028214145451784134, 0.012237916700541973, -0.02980545349419117, 0.011574871838092804, -0.011461207643151283, 0.012155826203525066,...
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 updateProbe(self): try: self._probeX["text"] = CNC.vars.get("prbx") self._probeY["text"] = CNC.vars.get("prby") self._probeZ["text"] = CNC.vars.get("prbz") except Exception: return if self.probeautogotonext: self.probeautogotonext ...
17,620
[ 0.023970456793904305, -0.0017957722302526236, 0.008745796047151089, 0.002122733509168029, -0.04182422161102295, -0.002766595920547843, -0.04732387885451317, -0.014607626013457775, 0.008410451002418995, 0.004966458771377802, 0.01782693713903427, -0.026264216750860214, 0.026344699785113335, ...
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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def probe(self, event=None): if self.probeautogoto.get() == 1: self.probeautogotonext = True if ProbeCommonFrame.probeUpdate(): messagebox.showerror( _("Probe Error"), _("Invalid probe feed rate"), parent=self.winfo_toplevel(), ...
17,621
[ 0.005249969661235809, 0.011839000508189201, 0.06297129392623901, 0.0006053229444660246, -0.07527082413434982, 0.016720551997423172, -0.05174868926405907, 0.011456411331892014, -0.011392646469175816, 0.019398674368858337, 0.006036402191966772, -0.018562646582722664, 0.004870923236012459, -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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def probeCenter(self, event=None): self.warnMessage() cmd = f"G91 {CNC.vars['prbcmd']} F{CNC.vars['prbfeed']}" try: diameter = abs(float(self.diameter.get())) except Exception: diameter = 0.0 if diameter < 0.001: messagebox.showerror( ...
17,622
[ 0.03838997706770897, 0.043962717056274414, 0.0009940953459590673, -0.01173242088407278, -0.06331250071525574, 0.0686788409948349, 0.002705745166167617, -0.015170232392847538, -0.04932905733585358, 0.0010279574198648334, 0.043833717703819275, -0.01348035130649805, -0.010558533482253551, -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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def orientDelete(self, event=None): marker = self.scale_orient.get() - 1 if marker < 0 or marker >= len(self.app.gcode.orient): return self.app.gcode.orient.clear(marker) self.orientUpdateScale() self.changeMarker(marker + 1) self.orientSolve() self.ev...
17,623
[ 0.01117309182882309, 0.06070118024945259, -0.013250268064439297, 0.008632850833237171, -0.02725467085838318, 0.007164273876696825, -0.0283924862742424, -0.03167363256216049, -0.024502743035554886, -0.004323040600866079, 0.02871001698076725, -0.04223150759935379, -0.026659302413463593, -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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def orientSolve(self, event=None): try: phi, xo, yo = self.app.gcode.orient.solve() self.angle_orient["text"] = "%*f" % (CNC.digits, math.degrees(phi)) self.xo_orient["text"] = "%*f" % (CNC.digits, xo) self.yo_orient["text"] = "%*f" % (CNC.digits, yo) ...
17,624
[ 0.049604326486587524, 0.056629832834005356, 0.0151820108294487, 0.0032682572491467, -0.03291875123977661, 0.009966105222702026, 0.03496785834431648, -0.00921432301402092, -0.014955811202526093, 0.001899414579384029, 0.031162375584244728, -0.019878987222909927, 0.018042774870991707, -0.0137...
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 orientClearFields(self): self.x_orient.delete(0, END) self.y_orient.delete(0, END) self.xm_orient.delete(0, END) self.ym_orient.delete(0, END) self.angle_orient["text"] = "" self.xo_orient["text"] = "" self.yo_orient["text"] = "" self.err_orient["text"...
17,625
[ 0.03802395612001419, 0.04458761587738991, -0.0012220414355397224, 0.016308555379509926, -0.06060696393251419, 0.031183667480945587, 0.0068214270286262035, -0.011278931051492691, -0.03173692524433136, 0.0226584542542696, 0.04652401804924011, -0.00989578478038311, 0.020659178495407104, -0.00...
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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def orientClear(self, event=None): if self.scale_orient.cget("to") == 0: return ans = messagebox.askquestion( _("Delete all markers"), _("Do you want to delete all orientation markers?"), parent=self.winfo_toplevel(), ) if ans != messagebox...
17,626
[ 0.03957009315490723, 0.013521503657102585, 0.005085092503577471, -0.006986755877733231, -0.036935530602931976, 0.048791058361530304, 0.02588069997727871, -0.0031931153498589993, -0.03791703283786774, -0.013418187387287617, 0.037322964519262314, 0.015109989792108536, -0.025222059339284897, ...
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": "marker", "annotation": null, "type_comment": null}}], "kwarg": nu...
def changeMarker(self, marker): marker = int(marker) - 1 if marker < 0 or marker >= len(self.app.gcode.orient): self.orientClearFields() self.event_generate("<<OrientChange>>", data=-1) return xm, ym, x, y = self.app.gcode.orient[marker] d = CNC.digit...
17,627
[ 0.028238803148269653, 0.03729753568768501, 0.0033438941463828087, -0.0011970940977334976, -0.05220061168074608, 0.059187255799770355, 0.01717439852654934, -0.04377944394946098, -0.058602821081876755, 0.010041643865406513, 0.024692349135875702, -0.005565408617258072, -0.024652501568198204, ...
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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def orientUpdate(self, event=None): marker = self.scale_orient.get() - 1 if marker < 0 or marker >= len(self.app.gcode.orient): self.orientClearFields() return xm, ym, x, y = self.app.gcode.orient[marker] try: x = float(self.x_orient.get()) exc...
17,628
[ -0.009245290420949459, 0.06248707324266434, 0.051542192697525024, -0.006985196843743324, -0.03329268842935562, -0.014199416153132915, -0.019141487777233124, -0.0379454679787159, 0.002999897813424468, -0.05916021764278412, -0.0016378146829083562, -0.00473715690895915, 0.010131247341632843, ...
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": "gcode", "annotation": null, "type_comment": null}}, {"_type": "ar...
def recordCoords(self, gcode="G0", point=False): x = CNC.vars["wx"] y = CNC.vars["wy"] z = CNC.vars["wz"] coords = f"X{x} Y{y}" if self.recz.get() == 1: coords += f" Z{z}" if point: self.recordAppend(f"G0 Z{CNC.vars['safe']}") self.record...
17,629
[ 0.02674267254769802, 0.006453703157603741, 0.03869044408202171, -0.0004190458566881716, -0.03154719993472099, -0.006317066494375467, 0.02005700394511223, -0.07422871142625809, 0.010829256847500801, -0.0386141799390316, 0.029869429767131805, -0.04397796839475632, -0.024836113676428795, 0.00...
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": "line", "annotation": null, "type_comment": null}}], "kwarg": null...
def recordAppend(self, line): hasblock = None for bid, block in enumerate(self.app.gcode): if block._name == "recording": hasblock = bid eblock = block if hasblock is None: hasblock = -1 eblock = Block("recording") ...
17,630
[ 0.05290834605693817, 0.03919237479567528, 0.0878908708691597, -0.010925248265266418, -0.010130807757377625, 0.03400474786758423, 0.021741854026913643, -0.013519060797989368, -0.009736983105540276, 0.019351745024323463, -0.008100572042167187, -0.024946775287389755, -0.024376407265663147, -0...
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 recordCircle(self): r = float(self.recsiz.get()) x = CNC.vars["wx"] - r y = CNC.vars["wy"] z = CNC.vars["wz"] coords = f"X{x} Y{y}" if self.recz.get() == 1: coords += f" Z{z}" self.recordAppend(f"G0 {coords}") self.recordAppend(f"G02 {coo...
17,631
[ 0.00892742071300745, 0.025640543550252914, 0.04704434424638748, -0.02145882323384285, -0.0483924001455307, -0.0030795475468039513, -0.03306859731674194, -0.026080723851919174, -0.022256651893258095, 0.030785158276557922, 0.01942298747599125, -0.015970317646861076, 0.01942298747599125, 0.03...
13
{"_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": "master", "annotation":...
class AutolevelFrame(CNCRibbon.PageFrame): def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "Probe:Autolevel", app) lframe = LabelFrame(self, text=_("Autolevel"), foreground="DarkBlue") lframe.pack(side=TOP, fill=X) row, col = 0, 0 # Empty ...
17,632
[ 0.02457144297659397, -0.006459260359406471, 0.03328252583742142, -0.0430033914744854, -0.07049648463726044, -0.02964729815721512, -0.0249080378562212, -0.03220542147755623, 0.0018176136072725058, -0.010838362388312817, 0.03839877247810364, -0.045750007033348083, -0.010286347009241581, -0.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": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setValues(self): probe = self.app.gcode.probe self.probeXmin.set(str(probe.xmin)) self.probeXmax.set(str(probe.xmax)) self.probeXbins.delete(0, END) self.probeXbins.insert(0, probe.xn) self.probeXstep["text"] = str(probe.xstep()) self.probeYmin.set(str(probe....
17,633
[ 0.030619235709309578, 0.021742230281233788, 0.027717413380742073, -0.02084166556596756, -0.032992154359817505, 0.002967935986816883, -0.008891300298273563, -0.025072894990444183, -0.04785863682627678, 0.03542225435376167, 0.010213559493422508, 0.004202640149742365, 0.008097944781184196, 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": "master", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "Probe:Autolevel", app) lframe = LabelFrame(self, text=_("Autolevel"), foreground="DarkBlue") lframe.pack(side=TOP, fill=X) row, col = 0, 0 # Empty col += 1 Label(lframe, text=_("Min"))....
17,634
[ 0.026254354044795036, -0.04503631591796875, 0.04162829741835594, -0.0447586253285408, -0.05069109797477722, -0.010331341065466404, -0.005724206566810608, -0.018769338726997375, 0.04877251386642456, -0.02292207069694996, 0.0020684769842773676, -0.019551919773221016, 0.04902495816349983, -0....
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 saveConfig(self): Utils.setFloat("Probe", "xmin", self.probeXmin.get()) Utils.setFloat("Probe", "xmax", self.probeXmax.get()) Utils.setInt("Probe", "xn", self.probeXbins.get()) Utils.setFloat("Probe", "ymin", self.probeYmin.get()) Utils.setFloat("Probe", "ymax", self.probeYma...
17,635
[ 0.022059321403503418, -0.016066625714302063, 0.03295983001589775, -0.04680502414703369, -0.0695876032114029, -0.011126525700092316, -0.009118197485804558, -0.04587512090802193, 0.017784358933568, -0.006735325790941715, 0.009124655276536942, -0.01662198267877102, 0.046675872057676315, 0.014...
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 loadConfig(self): self.probeXmin.set(Utils.getFloat("Probe", "xmin")) self.probeXmax.set(Utils.getFloat("Probe", "xmax")) self.probeYmin.set(Utils.getFloat("Probe", "ymin")) self.probeYmax.set(Utils.getFloat("Probe", "ymax")) self.probeZmin.set(Utils.getFloat("Probe", "zmin")...
17,636
[ 0.030461568385362625, 0.06313759088516235, 0.022994235157966614, -0.002832436701282859, -0.05093235895037651, 0.0010758431162685156, -0.007872886024415493, -0.0077055152505636215, 0.004329121671617031, 0.05628824234008789, 0.037594158202409744, -0.02025192230939865, -0.012134416028857231, ...
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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def clear(self, event=None): ans = messagebox.askquestion( _("Delete autolevel information"), _("Do you want to delete all autolevel in formation?"), parent=self.winfo_toplevel(), ) if ans != messagebox.YES: return self.app.gcode.probe.clea...
17,637
[ 0.03544933721423149, 0.0018438722472637892, 0.007291050627827644, -0.018723241984844208, -0.060443032532930374, 0.0079885832965374, -0.026726510375738144, -0.02923762798309326, 0.006824805401265621, -0.0006695394986309111, 0.021131565794348717, -0.015184182673692703, 0.008664088323712349, ...
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": "verbose", "annotation": null, "type_comment": null}}], "kwarg": n...
def change(self, verbose=True): probe = self.app.gcode.probe error = False try: probe.xmin = float(self.probeXmin.get()) probe.xmax = float(self.probeXmax.get()) probe.xn = max(2, int(self.probeXbins.get())) self.probeXstep["text"] = f"{probe.xstep...
17,638
[ 0.014868870377540588, -0.008390113711357117, 0.014844047836959362, 0.0030888898763805628, -0.05058891326189041, -0.029737740755081177, 0.01098409853875637, -0.0058054374530911446, -0.04272007569670677, 0.007651634979993105, 0.001639857655391097, 0.016457531601190567, 0.025617152452468872, ...
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": "master", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, master, app): CNCRibbon.ButtonGroup.__init__(self, master, "Probe:Camera", app) self.label["background"] = Ribbon._BACKGROUND_GROUP2 self.grid3rows() self.switch = BooleanVar() self.edge = BooleanVar() self.freeze = BooleanVar() # --- ...
17,639
[ 0.007468115538358688, -0.0014426341513171792, 0.015170379541814327, -0.005487093236297369, -0.05915338918566704, -0.020740658044815063, 0.016957305371761322, -0.019311117008328438, -0.03490050137042999, -0.05072403326630592, -0.011719765141606331, -0.00011052749323425815, 0.01880584843456745...
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": "master", "annotation":...
class CameraGroup(CNCRibbon.ButtonGroup): def __init__(self, master, app): CNCRibbon.ButtonGroup.__init__(self, master, "Probe:Camera", app) self.label["background"] = Ribbon._BACKGROUND_GROUP2 self.grid3rows() self.switch = BooleanVar() self.edge = BooleanVar() self...
17,640
[ 0.03003724291920662, 0.004260866437107325, 0.027950288727879524, -0.032149042934179306, -0.023068305104970932, 0.001039595459587872, 0.0318509079515934, -0.00921117328107357, -0.03922978416085243, 0.008956515230238438, 0.0054565174505114555, 0.01429812517017126, 0.009484464302659035, 0.000...
12
{"_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": "master", "annotation":...
class CameraFrame(CNCRibbon.PageFrame): def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "Probe:Camera", app) # ========== lframe = LabelFrame(self, text=_("Camera"), foreground="DarkBlue") lframe.pack(side=TOP, fill=X, expand=YES) # ---- ...
17,641
[ 0.00259308866225183, 0.04348859563469887, 0.012533803470432758, 0.006377245765179396, -0.04533199220895767, -0.011521232314407825, -0.027780774980783463, 0.0006916796555742621, -0.011813320219516754, -0.0460849292576313, -0.0031009966041892767, -0.03434950113296509, 0.0057054441422224045, ...
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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def switchCommand(self, event=None): wx = CNC.vars["wx"] wy = CNC.vars["wy"] dx = self.app.canvas.cameraDx dy = self.app.canvas.cameraDy z = self.app.canvas.cameraZ if self.switch.get(): self.switchButton.config(image=Utils.icons["endmill32"]) self...
17,642
[ 0.025514664128422737, -0.011605056934058666, 0.0787779912352562, -0.0347563810646534, -0.060529716312885284, -0.03376871719956398, 0.033204335719347, -0.031464166939258575, -0.0057848915457725525, -0.007095898501574993, -0.022410575300455093, -0.022304754704236984, 0.030311889946460724, -0...
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 saveConfig(self): Utils.setStr("Camera", "aligncam_anchor", self.location.get()) Utils.setFloat("Camera", "aligncam_d", self.diameter.get()) Utils.setFloat("Camera", "aligncam_scale", self.scale.get()) Utils.setFloat("Camera", "aligncam_dx", self.dx.get()) Utils.setFloat("Cam...
17,643
[ 0.02359727770090103, 0.004098963923752308, 0.028566522523760796, -0.018282575532794, -0.03228681534528732, -0.0047799102030694485, 0.01860145665705204, -0.02365042455494404, -0.041481249034404755, 0.023863011971116066, -0.006792853586375713, 0.016821032389998436, 0.004955959506332874, -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": "master", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "Probe:Camera", app) # ========== lframe = LabelFrame(self, text=_("Camera"), foreground="DarkBlue") lframe.pack(side=TOP, fill=X, expand=YES) # ---- row = 0 Label(lframe, text=_("Locati...
17,644
[ 0.03470374271273613, -0.0030423293355852365, 0.0680997371673584, -0.028043918311595917, -0.0661139041185379, -0.028915749862790108, 0.03451000154018402, -0.0383363738656044, -0.027850179001688957, 0.016540583223104477, -0.022837145254015923, -0.005182554945349693, 0.015923036262392998, -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": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def loadConfig(self): self.location.set(Utils.getStr("Camera", "aligncam_anchor")) self.diameter.set(Utils.getFloat("Camera", "aligncam_d")) self.scale.set(Utils.getFloat("Camera", "aligncam_scale")) self.dx.set(Utils.getFloat("Camera", "aligncam_dx")) self.dy.set(Utils.getFloat(...
17,645
[ 0.03537820279598236, 0.01426761131733656, 0.041536882519721985, -0.0013707343023270369, -0.044410932809114456, -0.02518216334283352, 0.046281348913908005, -0.027235057204961777, -0.04121754318475723, 0.045300520956516266, -0.0013878416502848268, -0.007247855421155691, -0.03982613980770111, ...
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def updateValues(self, *args): self.app.canvas.cameraAnchor = self.cameraAnchor() try: self.app.canvas.cameraRotation = float(self.rotation.get()) except ValueError: pass try: self.app.canvas.cameraXCenter = float(self.xcenter.get()) except Val...
17,646
[ 0.0025725101586431265, 0.021209968253970146, 0.02182839997112751, 0.00920205656439066, -0.04106854274868965, -0.026386482641100883, 0.00256105768494308, -0.018003277480602264, -0.0400836318731308, 0.009265044704079628, 0.005187967326492071, 0.005391248501837254, 0.04507690668106079, -0.000...
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": "master", "annotation":...
class ToolGroup(CNCRibbon.ButtonGroup): def __init__(self, master, app): CNCRibbon.ButtonGroup.__init__(self, master, "Probe:Tool", app) self.label["background"] = Ribbon._BACKGROUND_GROUP2 b = Ribbon.LabelButton( self.frame, self, "<<ToolCalibrate>>", ...
17,647
[ 0.02785426750779152, 0.023906076326966286, -0.01903591863811016, -0.016638802364468575, -0.029871748760342598, 0.022083835676312447, 0.04625023156404495, -0.003780066967010498, 0.0051169199869036674, -0.02863522805273533, 0.01616154983639717, -0.015846995636820793, 0.0005691116093657911, -...
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 registerCamera(self): if self.spindleX is None: messagebox.showwarning( _("Spindle position is not registered"), _("Spindle position must be registered before camera"), parent=self, ) return self.dx.set(str(self.spin...
17,648
[ 0.014636507257819176, 0.008943184278905392, 0.018395675346255302, 0.013739156536757946, -0.051221709698438644, -0.030388638377189636, 0.002663250081241131, -0.004711087793111801, -0.035845495760440826, 0.027090270072221756, 0.010889464057981968, 0.009343354031443596, 0.021997202187776566, ...
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": "master", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, master, app): CNCRibbon.ButtonGroup.__init__(self, master, "Probe:Tool", app) self.label["background"] = Ribbon._BACKGROUND_GROUP2 b = Ribbon.LabelButton( self.frame, self, "<<ToolCalibrate>>", image=Utils.icons["calibrate32"], ...
17,649
[ 0.007774636149406433, 0.012741200625896454, 0.017931059002876282, -0.03139626979827881, -0.03496894612908363, 0.0005954464431852102, -0.013106588274240494, -0.018729498609900475, 0.0021297361236065626, 0.021828526630997658, 0.04823116213083267, -0.01248407643288374, 0.021097751334309578, 0...
14
{"_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": "master", "annotation":...
class ToolFrame(CNCRibbon.PageFrame): def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "Probe:Tool", app) lframe = LabelFrame( self, text=_("Manual Tool Change"), foreground="DarkBlue") lframe.pack(side=TOP, fill=X) # --- Tool policy --- ...
17,650
[ 0.027326790615916252, 0.007474919781088829, 0.028355946764349937, -0.018849797546863556, -0.03358297422528267, -0.005646814592182636, -0.011016028001904488, -0.029520517215132713, -0.023399749770760536, 0.022492466494441032, 0.009438440203666687, 0.005558794364333153, 0.03523503988981247, ...
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": "master", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, master, app): CNCRibbon.PageFrame.__init__(self, master, "Probe:Tool", app) lframe = LabelFrame( self, text=_("Manual Tool Change"), foreground="DarkBlue") lframe.pack(side=TOP, fill=X) # --- Tool policy --- row, col = 0, 0 Label(lframe, t...
17,651
[ 0.017677776515483856, -0.017090298235416412, 0.029827909544110298, -0.041550785303115845, -0.043206408619880676, 0.00996711477637291, -0.01599545031785965, -0.006645855959504843, 0.05682523921132088, -0.014166254550218582, 0.018892789259552956, -0.03821283578872681, 0.050523191690444946, -...
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 saveConfig(self): Utils.setInt( "Probe", "toolpolicy", TOOL_POLICY.index(self.toolPolicy.get()) ) Utils.setInt( "Probe", "toolwait", TOOL_WAIT.index(self.toolWait.get()) ) Utils.setFloat("Probe", "toolchangex", self.changeX.get...
17,652
[ 0.017407488077878952, 0.005842285696417093, 0.0010657993843778968, -0.029167091473937035, -0.03686131164431572, 0.01710735820233822, -0.014992812648415565, -0.0318409688770771, 0.03295963257551193, 0.011152524501085281, 0.03724329173564911, -0.022878022864460945, -0.0031598820351064205, 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 set(self): self.policyChange() self.waitChange() try: CNC.vars["toolchangex"] = float(self.changeX.get()) CNC.vars["toolchangey"] = float(self.changeY.get()) CNC.vars["toolchangez"] = float(self.changeZ.get()) except Exception: messageb...
17,653
[ 0.02850898914039135, -0.0030322649981826544, 0.010915483348071575, -0.04095317795872688, -0.04932082071900368, -0.002720489865168929, -0.009608038701117039, -0.04065816476941109, 0.02858944796025753, -0.017137577757239342, 0.007837960496544838, -0.011780408211052418, 0.04763120040297508, -...
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 loadConfig(self): self.changeX.set(Utils.getFloat("Probe", "toolchangex")) self.changeY.set(Utils.getFloat("Probe", "toolchangey")) self.changeZ.set(Utils.getFloat("Probe", "toolchangez")) self.probeX.set(Utils.getFloat("Probe", "toolprobex")) self.probeY.set(Utils.getFloat(...
17,654
[ 0.03294474259018898, -0.030464768409729004, 0.015572773292660713, -0.016910012811422348, -0.062145210802555084, 0.0048201438039541245, -0.006819926202297211, -0.007719524670392275, 0.03843958303332329, -0.01487983949482441, 0.039679571986198425, -0.04293757677078247, 0.0030680550262331963, ...
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": "dummy", "annotation": null, "type_comment": null}}], "kwarg": nul...
def setProbeParams(self, dummy=None): print("probe chg handler") CNC.vars["toolchangex"] = float(self.changeX.get()) CNC.vars["toolchangey"] = float(self.changeY.get()) CNC.vars["toolchangez"] = float(self.changeZ.get()) CNC.vars["toolprobex"] = float(self.probeX.get()) C...
17,655
[ 0.015407898463308811, 0.0479532890021801, 0.032320939004421234, -0.010027676820755005, -0.029152218252420425, 0.0062879277393221855, -0.02181135304272175, 0.0010092041920870543, -0.00017081378609873354, 0.03966180607676506, 0.030102834105491638, -0.02462359145283699, 0.03171360120177269, 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 check4Errors(self): if CNC.vars["tooldistance"] <= 0.0: messagebox.showerror( _("Probe Tool Change Error"), _("Invalid tool scanning distance entered"), parent=self.winfo_toplevel(), ) return True return False
17,656
[ 0.04983650892972946, 0.010225201956927776, -0.006296157371252775, -0.0077370088547468185, -0.027460932731628418, 0.023489510640501976, -0.00507022300735116, -0.008935700170695782, -0.0013712304644286633, -0.016684817150235176, 0.005718000698834658, -0.01754448562860489, 0.05729503557085991, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Probe configuration and probing"}}], "func": {"_type": "Name", "_fields": {"id": "_", "ctx": {"_ty...
class ProbePage(CNCRibbon.Page): __doc__ = _("Probe configuration and probing") _name_ = "Probe" _icon_ = "measure" # ----------------------------------------------------------------------- # Add a widget in the widgets list to enable disable during the run # -----------------------------------...
17,657
[ -0.01305421069264412, 0.04452291876077652, 0.044155195355415344, -0.04664440453052521, -0.045852385461330414, -0.014765542931854725, -0.017254753038287163, -0.025273969396948814, -0.01296935137361288, 0.012545053847134113, 0.0396859310567379, -0.03555610403418541, -0.009171891026198864, 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": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def calibrate(self, event=None): self.set() if self.check4Errors(): return lines = [] lines.append("g53 g0 z[toolchangez]") lines.append("g53 g0 x[toolchangex] y[toolchangey]") lines.append("g53 g0 x[toolprobex] y[toolprobey]") lines.append("g53 g0 z[t...
17,658
[ 0.014791173860430717, 0.010652870871126652, 0.03548888862133026, 0.010268201120197773, -0.022931283339858055, 0.02633126638829708, 0.007091573439538479, -0.011993011459708214, -0.028415929526090622, -0.008171130903065205, -0.009399591945111752, 0.007234273478388786, 0.08566968142986298, 0....
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 register(self): self._register( (ProbeTabGroup, AutolevelGroup, CameraGroup, ToolGroup), (ProbeCommonFrame, ProbeFrame, AutolevelFrame, CameraFrame, ToolFrame), ) self.tabGroup = CNCRibbon.Page.groups["Probe"] self.tabGroup.tab.set("Probe") ...
17,659
[ 0.04924183711409569, -0.006447266321629286, 0.019434865564107895, 0.004386965185403824, -0.03191220387816429, 0.03150142729282379, -0.0056770602241158485, 0.012503011152148247, 0.024364184588193893, -0.018497781828045845, 0.0044126384891569614, -0.027958478778600693, 0.055660221725702286, ...
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": "a", "annotation": null, "type_comment": null}}, {"_type": "arg", ...
def tabChange(self, a=None, b=None, c=None): tab = self.tabGroup.tab.get() self.master._forgetPage() # Remove all page tabs with ":" and add the new ones self.ribbons = [x for x in self.ribbons if ":" not in x[0].name] self.frames = [x for x in self.frames if ":" not in x[0].nam...
17,660
[ 0.022214964032173157, 0.01610853150486946, 0.04249818995594978, -0.01749294251203537, -0.05340176820755005, 0.025413058698177338, -0.01479924377053976, -0.02858969196677208, 0.030371181666851044, 0.03895667567849159, 0.02380327880382538, 0.012320182286202908, 0.06941371411085129, 0.0351146...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "lines", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pos", "annotation": null, "type_comment": null}}, {"_type": "arg...
def ExpandMacroDefinition(lines, pos, name_pattern, macro, expander): pattern_match = name_pattern.search(lines, pos) while pattern_match is not None: # Scan over the arguments height = 1 start = pattern_match.start() end = pattern_match.end() assert lines[end - 1] == '(' last_match = end ...
17,661
[ 0.016676180064678192, 0.030808109790086746, 0.07537028938531876, -0.028692098334431648, 0.009414988569915295, -0.010957913473248482, 0.02284787781536579, -0.03214321285486221, 0.004550052806735039, 0.07678095996379852, 0.03806300461292267, -0.012393777258694172, 0.0033314574975520372, 0.05...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "lines", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def Validate(lines): # Because of simplified context setup, eval and with is not # allowed in the natives files. if EVAL_PATTERN.search(lines): raise Error("Eval disallowed in natives.") if WITH_PATTERN.search(lines): raise Error("With statements disallowed in natives.") # Pass lines through unchange...
17,662
[ 0.029084060341119766, 0.033702753484249115, 0.09155076742172241, 0.02572293020784855, -0.03255951404571533, 0.02688903734087944, -0.01928648166358471, -0.007728311698883772, 0.022773368284106255, 0.03976193442940712, 0.037406858056783676, -0.006750840228050947, 0.022556152194738388, 0.0128...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "lines", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "macros", "annotation": null, "type_comment": null}}], "kwarg": n...
def ExpandMacros(lines, macros): # We allow macros to depend on the previously declared macros, but # we don't allow self-dependecies or recursion. for name_pattern, macro in reversed(macros): def expander(s): return ExpandMacros(s, macros) lines = ExpandMacroDefinition(lines, 0, name_pattern, macro...
17,663
[ 0.056300003081560135, 0.02967989258468151, 0.04738292098045349, -0.0017703028861433268, -0.06574162095785141, 0.011020681820809841, 0.014042217284440994, 0.0009589140536263585, 0.001715663936920464, -0.0041252425871789455, 0.0352749228477478, -0.007403581403195858, -0.00899903941899538, 0....
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": "args", "annotation": n...
class TextMacro: def __init__(self, args, body): self.args = args self.body = body def expand(self, mapping): result = self.body for key, value in mapping.items(): result = result.replace(key, value) return result
17,664
[ 0.04849349334836006, 0.015371065586805344, 0.021826107054948807, -0.021120086312294006, -0.054827503859996796, -0.00440506124868989, 0.01901211217045784, -0.00794776901602745, -0.011498041450977325, 0.03877058997750282, 0.02118060179054737, -0.014120401814579964, -0.008154531940817833, 0.0...
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": "args", "annotation": n...
class PythonMacro: def __init__(self, args, fun): self.args = args self.fun = fun def expand(self, mapping): args = [] for arg in self.args: args.append(mapping[arg]) return str(self.fun(*args))
17,665
[ -0.011728523299098015, 0.030973542481660843, 0.046053070574998856, -0.012112493626773357, 0.0070394412614405155, -0.021839721128344536, -0.01796511933207512, -0.009919213131070137, -0.0005817720084451139, 0.06069045513868332, 0.027157116681337357, 0.0028303207363933325, 0.0392347052693367, ...
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "lines", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def ReadMacros(lines): constants = [] macros = [] for line in lines.split('\n'): hash = line.find('#') if hash != -1: line = line[:hash] line = line.strip() if len(line) is 0: continue const_match = CONST_PATTERN.match(line) if const_match: name = const_match.group(1) value = c...
17,666
[ 0.008364371955394745, 0.016172731295228004, 0.054537639021873474, -0.015701329335570335, -0.008968734182417393, 0.009083563461899757, -0.03996042534708977, -0.04564142972230911, 0.01080599520355463, 0.04665675759315491, 0.056278202682733536, 0.025987572968006134, 0.03991207480430603, -0.01...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "lines", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def ExpandInlineConstants(lines): pos = 0 while True: const_match = INLINE_CONSTANT_PATTERN.search(lines, pos) if const_match is None: # no more constants return lines name = const_match.group(1) replacement = const_match.group(2) name_pattern = re.compile("\\b%s\\b" % name) # r...
17,667
[ 0.02946619875729084, 0.03808879479765892, 0.05911345034837723, -0.0010820680763572454, -0.06124080717563629, 0.013567577116191387, -0.02749725803732872, -0.016645459458231926, 0.016702039167284966, 0.042343515902757645, 0.050739798694849014, 0.00794931035488844, 0.0582534521818161, 0.02942...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "lines", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def ExpandInlineMacros(lines): pos = 0 while True: macro_match = INLINE_MACRO_PATTERN.search(lines, pos) if macro_match is None: # no more macros return lines name = macro_match.group(1) args = [match.strip() for match in macro_match.group(2).split(',')] end_macro_match = INLINE_MACR...
17,668
[ 0.04470491409301758, 0.02951500006020069, -0.016464978456497192, -0.002899388549849391, -0.013404821045696735, -0.02960369922220707, 0.04359615966677666, -0.0410238541662693, -0.0013810902601107955, 0.053929734975099564, 0.052288781851530075, 0.012163017876446247, 0.038429372012615204, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "blob_file", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg"...
def PutInt(blob_file, value): assert(value >= 0 and value < (1 << 28)) if (value < 1 << 6): size = 1 elif (value < 1 << 14): size = 2 elif (value < 1 << 22): size = 3 else: size = 4 value_with_length = (value << 2) | (size - 1) byte_sequence = bytearray() for i in xrange(size): byte...
17,669
[ 0.043167680501937866, 0.042805496603250504, 0.03854984790086746, -0.047400690615177155, 0.0066437930800020695, -0.026507264003157616, 0.059171635657548904, -0.0038991256151348352, -0.0043433657847344875, 0.006162769161164761, 0.039930667728185654, -0.006904112175107002, 0.03882148489356041, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "source", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "target", "annotation": null, "type_comment": null}}, {"_type": ...
def JS2C(source, target, native_type, compression_type, raw_file, startup_blob): sources = PrepareSources(source) sources_bytes = CompressMaybe(sources, compression_type) metadata = BuildMetadata(sources, sources_bytes, native_type) # Optionally emit raw file. if raw_file: output = open(raw_file, "w") ...
17,670
[ 0.017958655953407288, 0.0431053563952446, 0.029988324269652367, -0.05333801358938217, -0.000038026402762625366, -0.03406307473778725, 0.010553142987191677, -0.04170894995331764, 0.0075371419079601765, 0.018954452127218246, 0.062036916613578796, -0.017649617046117783, 0.03099556639790535, 0...
7
{"_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(): parser = optparse.OptionParser() parser.add_option("--raw", action="store", help="file to write the processed sources array to.") parser.add_option("--startup_blob", action="store", help="file to write the startup blob to.") parser.set_usage("""js2c out.cc typ...
17,671
[ -0.002946429653093219, 0.013534990139305592, -0.05532072111964226, -0.02199709229171276, 0.010960280895233154, -0.013283533044159412, 0.03223033249378204, -0.027704091742634773, 0.0013775515835732222, -0.006625366862863302, 0.031202634796500206, 0.024271145462989807, 0.03588193655014038, -...
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": "stmt", "annotation": n...
class Timer(timeit.Timer): def __init__(self, stmt, setup='pass', timer=timeit.default_timer, globals=globals()): # copy of timeit.Timer.__init__ # similarity index 95% self.timer = timer stmt = timeit.reindent(stmt, 8) setup = timeit.reindent(setup, 4) src = timeit....
17,672
[ 0.012874266132712364, -0.0029264953918755054, -0.03206421062350273, -0.03310525417327881, 0.01670300029218197, 0.0024507951457053423, 0.04154929146170616, -0.02373584359884262, -0.012052996084094048, -0.008970344439148903, 0.035279884934425354, 0.02655823342502117, 0.03081495501101017, -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": "stmt", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, stmt, setup='pass', timer=timeit.default_timer, globals=globals()): # copy of timeit.Timer.__init__ # similarity index 95% self.timer = timer stmt = timeit.reindent(stmt, 8) setup = timeit.reindent(setup, 4) src = timeit.template % {'stmt': stmt, 'setup...
17,673
[ -0.019198598340153694, 0.0025618567597121, -0.006259397137910128, -0.028681118041276932, 0.014177067205309868, -0.003626012708991766, -0.016057221218943596, -0.014165389351546764, -0.001979417633265257, -0.016080578789114952, 0.01840449683368206, -0.02639223448932171, 0.03636522963643074, ...
12
{"_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": "kw", "annota...
class Function(py.__.test.item.Function): def __init__(self, *args, **kw): super(Function, self).__init__(*args, **kw) self.benchtime = None self.benchtitle = None def execute(self, target, *args): # get func source without first 'def func(...):' line src = getsource(ta...
17,674
[ -0.0076510305516421795, -0.00011984898446826264, 0.09188958257436752, -0.03642122074961662, 0.0250830240547657, 0.0023342398926615715, 0.03788836672902107, -0.01839078590273857, 0.014491270296275616, -0.022303171455860138, 0.014594228006899357, -0.026897650212049484, -0.03503129631280899, ...
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": "colitems", "annotation...
class BenchSession(TerminalSession): def header(self, colitems): super(BenchSession, self).header(colitems) def footer(self, colitems): super(BenchSession, self).footer(colitems) self.out.write('\n') self.print_bench_results() def print_bench_results(self): self.o...
17,675
[ 0.019016776233911514, -0.003339747665449977, 0.008693384006619453, -0.06142064556479454, -0.004432326648384333, -0.009224908426404, -0.003511016722768545, -0.006384203676134348, 0.0005204514018259943, -0.02487536147236824, 0.023292599245905876, 0.025914788246154785, 0.019630983471870422, -...
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": "target", "annotation": null, "type_comment": null}}], "kwarg": nu...
def execute(self, target, *args): # get func source without first 'def func(...):' line src = getsource(target) src = '\n'.join( src.splitlines()[1:] ) # extract benchmark title if target.func_doc is not None: self.benchtitle = target.func_doc else: ...
17,676
[ -0.010284828953444958, -0.010500079952180386, -0.02234417013823986, -0.0024990190286189318, 0.007911810651421547, 0.02725820802152157, 0.0036304027307778597, -0.020905660465359688, -0.014437610283493996, -0.002711645793169737, 0.023751182481646538, -0.040929313749074936, 0.03626727685332298,...
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": "name", "annotation": n...
class Instance(object): def __init__(self, name=None, state="creating", units=None): self.name = name self.state = state self.units = units or [] for unit in self.units: unit.instance = self def to_dict(self): return {"name": self.name, "state": self.state} ...
17,677
[ 0.011402986012399197, -0.03620902821421623, 0.06722307205200195, -0.03823506832122803, -0.005604087375104427, 0.00037562157376669347, 0.01091595645993948, -0.0254554133862257, -0.007058682385832071, 0.002660804893821478, -0.006380087696015835, -0.022494273260235786, -0.033325809985399246, ...
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 print_bench_results(self): self.out.write('==============================\n') self.out.write(' *** BENCHMARKING RESULTS *** \n') self.out.write('==============================\n') self.out.write('\n') # benchname, time, benchtitle results = [] for item, outc...
17,678
[ -0.013202457688748837, -0.025387519970536232, 0.009263014420866966, -0.005282165948301554, 0.0023468078579753637, 0.016550391912460327, 0.022690244019031525, 0.0030669686384499073, -0.02848702296614647, -0.055743709206581116, 0.03681545332074165, -0.033479347825050354, 0.012327025644481182, ...
12
{"_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": "mongo_uri", "annotatio...
class MongoDBStorage(object): def __init__(self, mongo_uri=None, dbname=None): self.mongo_uri = mongo_uri or "mongodb://localhost:27017/" self.dbname = dbname or "feaas" client = pymongo.MongoClient(self.mongo_uri) self.db = client[self.dbname] self.collection_name = "instan...
17,679
[ -0.006939580198377371, -0.008592146448791027, -0.001767826615832746, 0.0034847590140998363, 0.018585382029414177, 0.01917216181755066, -0.0016001749318093061, 0.042248211801052094, -0.029219284653663635, -0.003131492994725704, 0.0372665636241436, -0.039398133754730225, 0.0013778868597000837,...
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": "check_liveness", "annotation": null, "type_comment": null}}], "kw...
def retrieve_instance(self, check_liveness=False, **query): if check_liveness: query["state"] = {"$nin": ["removed", "terminating"]} instance = self.db[self.collection_name].find_one(query) if not instance: raise InstanceNotFoundError() del instance["_id"] ...
17,680
[ 0.0025614623446017504, -0.0023683125618845224, 0.047235503792762756, 0.0006165932863950729, -0.03097526915371418, 0.014619946479797363, -0.022833267226815224, 0.05386796593666077, -0.006911787670105696, -0.017817316576838493, 0.01774599961936474, -0.02931120991706848, -0.005613227374851704, ...
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": "limit", "annotation": null, "type_comment": null}}], "kwarg": {"_...
def retrieve_units(self, limit=None, **query): cursor = self.db.units.find(query) if limit: cursor = cursor.limit(limit) units = [] for unit in cursor: unit["instance"] = Instance(name=unit["instance_name"]) del unit["instance_name"] del un...
17,681
[ 0.030050838366150856, 0.009539282880723476, 0.030026854947209358, 0.010522590018808842, -0.025398114696145058, 0.012986854650080204, 0.046647150069475174, -0.021153103560209274, -0.01094829011708498, 0.026357440277934074, 0.03669416159391403, -0.009053624235093594, -0.04799020662903786, -0...
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 get_scale_job(self): job = self.db.scale_jobs.find_one({"state": "pending"}) if not job: return job["state"] = "processing" self.db.scale_jobs.update({"_id": job["_id"]}, {"$set": {"state": job["state"]}}) return job
17,682
[ 0.02799297869205475, 0.03955014795064926, 0.03523989021778107, -0.013357055373489857, -0.06365916132926941, -0.044191960245370865, -0.010651304386556149, 0.0013735978864133358, -0.056080687791109085, -0.05807003751397133, -0.015251673758029938, -0.04180000349879265, 0.029627086594700813, -...
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": "limit", "annotation": null, "type_comment": null}}], "kwarg": {"_...
def retrieve_binds(self, limit=None, **query): binds = [] cursor = self.db.binds.find(query) if limit: cursor = cursor.limit(limit) for item in cursor: instance = Instance(name=item["instance_name"]) binds.append(Bind(app_host=item["app_host"], ...
17,683
[ 0.0068668182939291, 0.0148280905559659, -0.010968079790472984, -0.001466627698391676, 0.002756730420514941, 0.0064196218736469746, 0.047708794474601746, 0.031186064705252647, 0.0029259000439196825, -0.03419875726103783, 0.019806092604994774, -0.016475657001137733, 0.02506653405725956, -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": "storage", "annotation"...
class MultiLocker(object): def __init__(self, storage): self.db = storage.db def init(self, lock_name): try: self.db.multi_locker.insert({"_id": lock_name, "state": 0}) except pymongo.errors.DuplicateKeyError: pass def destroy(self, lock_name): self...
17,684
[ 0.021409133449196815, 0.028812533244490623, 0.02461339719593525, -0.059847377240657806, -0.03041466511785984, 0.052198488265275955, -0.011150320991873741, -0.025401541963219643, -0.00517785781994462, 0.04026002436876297, 0.021499576047062874, -0.051681675016880035, -0.01775265485048294, -0...
11
{"_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(): skip = set([ 'test/sanity/code-smell/%s' % os.path.basename(__file__), # facts is grandfathered in but will break namespacing # the only way to fix it is to deprecate and eventually remove it # six will break namespacing but because it is bundled we should not be overridi...
17,685
[ -0.004748022649437189, -0.017354022711515427, 0.050471480935811996, -0.022315707057714462, -0.012795921415090561, -0.013116412796080112, -0.00036741537041962147, 0.011294359341263771, 0.017330283299088478, 0.049521878361701965, 0.04591337963938713, -0.060442328453063965, 0.022980431094765663...
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": "api_version", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, api_version, idp): if api_version not in ['v1']: raise errors.AnsibleFilterError("|failed api version {0} unknown".format(api_version)) self._idp = copy.deepcopy(idp) if 'name' not in self._idp: raise errors.AnsibleFilterError("|failed identity provid...
17,686
[ -0.015976084396243095, -0.02570917271077633, 0.053123075515031815, 0.024626437574625015, -0.005091153085231781, -0.018176108598709106, 0.015676604583859444, 0.025801319628953934, 0.03575325757265091, 0.034670524299144745, 0.010487545281648636, -0.037481024861335754, 0.024280885234475136, -...
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": "api_version", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, api_version, idp): IdentityProviderBase.__init__(self, api_version, idp) self._allow_additional = False self._required += [['attributes'], ['url'], ['insecure']] self._optional += [['ca'], ['bindDN', 'bind_dn'], ['b...
17,687
[ -0.007158452179282904, -0.03291294723749161, 0.051349662244319916, 0.009167143143713474, -0.004185247700661421, -0.017560400068759918, -0.01463556382805109, 0.011374996975064278, 0.01942683383822441, 0.03662304952740669, 0.03550774231553078, -0.04472609981894493, 0.0193244069814682, -0.008...
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": "api_version", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, api_version, idp): IdentityProviderOauthBase.__init__(self, api_version, idp) self._required += [['claims'], ['urls']] self._optional += [['ca'], ['extraScopes'], ['extraAuthorizeParameters']] if 'claims' in self._i...
17,688
[ -0.025086145848035812, -0.011130938306450844, -0.0058042858727276325, -0.05611155927181244, -0.02044479362666607, -0.03085928037762642, -0.029156412929296494, -0.025646844878792763, 0.00539414444938302, 0.04979848861694336, 0.007029519882053137, -0.047264955937862396, 0.056693028658628464, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "project_path", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlya...
def fetch(project_path): ASTs=[] for (dirpath,__,files) in os.walk(project_path): python_files = [x for x in files if x.endswith('.py')] for pfile in python_files: path = os.path.join(dirpath,pfile) ast_root = getAST(path) if ast_root: ASTs.ap...
17,689
[ -0.027591634541749954, 0.009110231883823872, -0.007862254977226257, -0.050100602209568024, -0.005128050688654184, -0.017426295205950737, -0.02248627506196499, -0.022985465824604034, 0.005003252997994423, 0.03746199607849121, 0.034058425575494766, -0.03176668658852577, 0.030790993943810463, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def getAST(path): try: with open(path) as f: root = ast.parse(f.read()) except: # if the program wont compile maybe its written for Python 2.x try: subprocess.call(["2to3","-w",module.name]) with open(path) as f: root = ast.parse(f.read()) ...
17,690
[ 0.03315082937479019, -0.0012546054786071181, 0.007653162814676762, -0.010809333063662052, 0.0016208481974899769, 0.011587340384721756, 0.045598942786455154, -0.0076973047107458115, 0.010241001844406128, 0.045907940715551376, 0.0009442302980460227, -0.014511764980852604, -0.012701932340860367...
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 _init_options(self): self._current = None self.json_kwargs = self.options.copy() self.json_kwargs.pop("stream", None) self.json_kwargs.pop("fields", None) if self.options.get("indent"): # Prevent trailing spaces self.json_kwargs["separators"] = (",", "...
17,691
[ 0.09147811681032181, 0.04565201699733734, -0.014535533264279366, -0.011500043794512749, 0.000574254197999835, 0.022010017186403275, -0.013828339986503124, -0.011880839243531227, 0.012065798044204712, -0.02924514375627041, 0.04406355321407318, -0.003296606708317995, 0.016515672206878662, -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": "obj", "annotation": null, "type_comment": null}}], "kwarg": null,...
def end_object(self, obj): # self._current has the field data indent = self.options.get("indent") if not self.first: self.stream.write(",") if not indent: self.stream.write(" ") if indent: self.stream.write("\n") json.dump(self....
17,692
[ 0.007064725272357464, 0.06221552938222885, -0.01325641106814146, -0.0003988266980741173, 0.008201973512768745, 0.042778920382261276, -0.025800606235861778, 0.03227947652339935, 0.0008033970952965319, 0.00894865207374096, 0.0128773283213377, -0.009603431448340416, -0.028626495972275734, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "response", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs"...
def check_result(response): if response: self._log_response(cmd, r) if "return" in response: return response["return"] if "error" in response: raise VAgentError("Get an error message when waiting for sync" ...
17,693
[ -0.011494310572743416, -0.009596563875675201, -0.014060582965612411, -0.02102617919445038, 0.013963539153337479, 0.030428653582930565, 0.02012043632566929, -0.02367871254682541, 0.037372685968875885, 0.019063735380768776, -0.009326997213065624, 0.012378488667309284, 0.0000962015037657693, ...
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": "o", "annotation": null, "type_comment": null}}], "kwarg": null, "...
def default(self, o): # See "Date Time String Format" in the ECMA-262 specification. if isinstance(o, datetime.datetime): r = o.isoformat() if o.microsecond: r = r[:23] + r[26:] if r.endswith("+00:00"): r = r[:-6] + "Z" retu...
17,694
[ 0.009605730883777142, 0.006546922959387302, -0.009468591772019863, -0.029741395264863968, 0.009158536791801453, 0.02145339548587799, 0.01823359727859497, 0.04014015197753906, 0.014119410887360573, 0.0031303593423217535, 0.029979899525642395, -0.038852229714393616, 0.022753240540623665, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "di", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "indent", "annotation": null, "type_comment": null}}], "kwarg": null...
def _dump_dict(di, indent=0): for k, v in six.iteritems(di): o = "%s%s: " % (" " * indent, k) if isinstance(v, dict): _log_output(o, indent) _dump_dict(v, indent + 2) elif isinstance(v, list): _log_ou...
17,695
[ 0.0017212849343195558, 0.01220911368727684, -0.03288454934954643, -0.010547873564064503, 0.014520839788019657, -0.015081257559359074, 0.03634713217616081, -0.023637644946575165, -0.015091265551745892, 0.005714265629649162, -0.06092547997832298, -0.02776072360575199, 0.011318448930978775, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "User", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", ...
class Notification(models.Model): recipient = models.ForeignKey(User) body = models.TextField(default='', blank=True, null=True) ntype = models.CharField(max_length=1, choices=notification_types) date_created = models.DateTimeField(default=datetime.now) def __unicode__(self): return 'Notifi...
17,696
[ -0.00020790078269783407, -0.0114340391010046, 0.0055986992083489895, -0.02805265597999096, -0.020727556198835373, 0.025385072454810143, 0.07297132909297943, -0.022308746352791786, 0.013391701504588127, 0.02400825545191765, -0.01740383356809616, -0.031107470393180847, -0.017844844609498978, ...
16
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "User", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", ...
class NotificationSetting(models.Model): owner = models.ForeignKey(User, unique=True) modules = models.ManyToManyField(Module) ntype = models.CharField( max_length=1, choices=notification_types, verbose_name='Type') next_date = models.DateField(null=True, blank=True) last_datetime = models.D...
17,697
[ 0.01582145318388939, -0.012729905545711517, 0.01657027192413807, -0.014794503338634968, 0.03551536425948143, 0.03264846280217171, 0.04792435094714165, 0.008188859559595585, -0.023384515196084976, 0.01408847514539957, -0.009237204678356647, 0.009825561195611954, -0.014216843992471695, -0.04...
15
{"_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": "now", "annotation": null, "type_comment": null}}], "kwarg": null,...
def update_date(self, now): if isinstance(now, datetime): today = now.date() self.last_datetime = now elif isinstance(now, date): today = now else: raise ValueError('now must be datetime or date') if self.ntype == 'd': self.next...
17,698
[ 0.0243078600615263, 0.03425409644842148, 0.02716624177992344, 0.0048365904949605465, -0.02846761792898178, -0.004917926155030727, 0.029025351628661156, -0.0014284644275903702, 0.005022501107305288, 0.007511965464800596, 0.029164785519242287, 0.03706600144505501, 0.030442923307418823, -0.01...
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": "inputs", "annotation": null, "type_comment": null}}, {"_type": "a...
def _AccumulateNTemplate(self, inputs, init, shape, validate_shape): var = gen_state_ops.temporary_variable( shape=shape, dtype=inputs[0].dtype.base_dtype) ref = state_ops.assign(var, init, validate_shape=validate_shape) update_ops = [ state_ops.assign_add( ref, tensor, use_locki...
17,699
[ 0.03386783227324486, -0.01737695373594761, 0.04297473281621933, -0.04693746939301491, -0.018410710617899895, 0.026237724348902702, 0.031701866537332535, -0.012663517147302628, 0.009666853584349155, 0.022016551345586777, 0.001478333375416696, 0.02813294529914856, 0.017992286011576653, -0.02...
13
{"_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": "inputs", "annotation":...
class AccumulateNBenchmark(test.Benchmark): def _AccumulateNTemplate(self, inputs, init, shape, validate_shape): var = gen_state_ops.temporary_variable( shape=shape, dtype=inputs[0].dtype.base_dtype) ref = state_ops.assign(var, init, validate_shape=validate_shape) update_ops = [ state_ops...
17,700
[ 0.024158760905265808, -0.020068088546395302, 0.005847054533660412, -0.044487472623586655, 0.022832974791526794, 0.0004504271491896361, -0.009393814019858837, -0.005580764263868332, -0.02158650942146778, 0.011240849271416664, -0.029303262010216713, 0.03002847731113434, -0.0007698338595218956,...
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": "size", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _GenerateOrderedInputs(self, size, n): inputs = self._GenerateUnorderedInputs(size, 1) queue = data_flow_ops.FIFOQueue( capacity=1, dtypes=[inputs[0].dtype], shapes=[inputs[0].get_shape()]) for _ in xrange(n - 1): op = queue.enqueue(inputs[-1]) with ops.control_dependencies([op]): ...