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
16,301
[ -0.011339073069393635, 0.003345079952850938, 0.035844724625349045, 0.021951420232653618, -0.0035748539958149195, -0.029069066047668457, -0.013743683695793152, -0.042278390377759933, -0.025798795744776726, 0.01634066179394722, -0.018862832337617874, -0.06382369995117188, -0.001299157505854964...
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": "app", "annotation": null, "type_comment": null}}], "kwarg": null,...
def has_app(self, app): if "origin" in app: return app["origin"] in self._apps elif "slug" in app: for origin, app_obj in self._apps.iteritems(): if "slug" in app_obj["data"] and \ app_obj["data"]["slug"] == app["slug"]: retu...
16,302
[ 0.011480874381959438, -0.0116575937718153, 0.043213799595832825, 0.004871566314250231, -0.01069741789251566, -0.04354367405176163, -0.010326307266950607, -0.054476719349622726, -0.030277933925390244, 0.032799132168293, -0.031244000419974327, -0.04554649442434311, 0.004356134682893753, -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": "app_data", "annotation": null, "type_comment": null}}], "kwarg": ...
def add_app(self, app_data): if app_data["origin"] in self._apps: return self._apps[app_data["origin"]] = {"data": app_data, "entries": []} app_entries = self._apps[app_data["origin"]]["entries"] if app_data["type"] == "app": if "categories" in app_data: ...
16,303
[ -0.017312221229076385, 0.024752439931035042, 0.031706303358078, 0.03932243958115578, -0.049753233790397644, -0.04474479705095291, 0.00222482206299901, -0.03783232346177101, 0.0025326753966510296, 0.03863947093486786, -0.007704093586653471, -0.020354535430669785, -0.0011059435782954097, 0.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": "main_win", "annotation": null, "type_comment": null}}, {"_type": ...
def __init__(self, main_win, apps_obj): Gtk.EventBox.__init__(self, hexpand=True, vexpand=True) style = self.get_style_context() style.add_class('app-grid') self._win = main_win self._apps = apps_obj self._num_apps = 0 self._sw = ScrolledWindow(hexpand=True, vex...
16,304
[ -0.017115537077188492, 0.004877329804003239, 0.03388288989663124, 0.0032805686350911856, -0.025744032114744186, -0.05314194783568382, -0.02661449834704399, -0.053925368934869766, -0.006773313507437706, 0.0033458536490797997, -0.01545077096670866, -0.07029012590646744, 0.012599995359778404, ...
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": "main_win", "annotation...
class AppGrid(Gtk.EventBox): def __init__(self, main_win, apps_obj): Gtk.EventBox.__init__(self, hexpand=True, vexpand=True) style = self.get_style_context() style.add_class('app-grid') self._win = main_win self._apps = apps_obj self._num_apps = 0 self._sw =...
16,305
[ 0.004038690123707056, 0.006952603347599506, 0.028082337230443954, 0.0003223304229322821, 0.00006957431469345465, -0.06412463635206223, 0.007916698232293129, -0.05443425104022026, -0.034114107489585876, 0.03379274159669876, -0.004709230270236731, -0.06699219346046448, 0.009035293944180012, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "app", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def new_entry(self, app, sort_by="title", reverse=False): if "colour" not in app: if (self._num_apps % 2) == 0: app["colour"] = "#f2914a" else: app["colour"] = "#f5a269" self._num_apps += 1 entry = AppGridEntry(app, self._win, self._ap...
16,306
[ -0.0020872603636235, 0.00887564942240715, -0.003057395573705435, 0.0024413149803876877, -0.009555638767778873, -0.044010136276483536, 0.04182189702987671, 0.005399012938141823, 0.04527808353304863, -0.0016015537548810244, -0.040104031562805176, -0.0027940913569182158, 0.008303027600049973, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "media_dir", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []...
class DesktopButton(Gtk.Button): _ADD_IMG_PATH = "{}/icons/desktop-add.png".format(media_dir()) _RM_IMG_PATH = "{}/icons/desktop-rm.png".format(media_dir()) def __init__(self, app, apps_obj): Gtk.Button.__init__(self, hexpand=False) self._app = app self._apps = apps_obj se...
16,307
[ -0.009231901727616787, 0.020418304949998856, 0.035638466477394104, 0.03778010234236717, -0.028049178421497345, -0.04358122870326042, -0.0018674327293410897, 0.003139678156003356, 0.04773974046111107, 0.01978413015604019, -0.018723709508776665, 0.0011338448384776711, -0.00035899673821404576, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "app", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def __init__(self, app, apps_obj): Gtk.Button.__init__(self, hexpand=False) self._app = app self._apps = apps_obj self.get_style_context().add_class('desktop-button') self.props.margin_right = 21 self.connect("clicked", self._desktop_cb) self.refresh() s...
16,308
[ 0.034017398953437805, 0.025385426357388496, 0.02568708173930645, 0.007581981830298901, -0.030699193477630615, 0.0029483872931450605, 0.04336870461702347, 0.018261726945638657, 0.00016424243221990764, 0.01814570650458336, -0.0032369899563491344, -0.0028019105084240437, -0.024480460211634636, ...
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 refresh(self): img = self.get_image() if img: img.destroy() if self._is_on_desktop(): self.set_image(Gtk.Image.new_from_file(self._RM_IMG_PATH)) self.set_tooltip_text(_("Remove from desktop")) else: self.set_image(Gtk.Image.new_from_fi...
16,309
[ -0.0035879486240446568, 0.021694021299481392, 0.03661608695983887, 0.00034546630922704935, 0.00474927993491292, -0.030699534341692924, -0.008459004573523998, -0.017785295844078064, -0.01090641412883997, 0.03697250410914421, -0.0008390691364184022, -0.05113421007990837, -0.004603742156177759,...
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": "app", "annotation": nu...
class AppGridEntry(Gtk.EventBox): def __init__(self, app, window, apps_obj): Gtk.EventBox.__init__(self) self.props.valign = Gtk.Align.START self._apps = apps_obj self._app = app self._cmd = app['launch_command'] self._window = window self._entry = entry =...
16,310
[ -0.02663535438477993, 0.04168914631009102, 0.02200944907963276, 0.032392531633377075, -0.01841401308774948, -0.0637994036078453, 0.014796174131333828, -0.04007623717188835, 0.011340746656060219, 0.04592302441596985, 0.0008134535746648908, -0.02638893760740757, 0.01947808265686035, -0.01592...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "app", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def __init__(self, app, window, apps_obj): Gtk.EventBox.__init__(self) self.props.valign = Gtk.Align.START self._apps = apps_obj self._app = app self._cmd = app['launch_command'] self._window = window self._entry = entry = Gtk.HBox() self.modify_bg(Gt...
16,311
[ -0.013238384388387203, 0.027262184768915176, 0.013269388116896152, 0.014364835806190968, 0.0027799573726952076, -0.013713767752051353, -0.01897398568689823, 0.028895022347569466, 0.008913432247936726, 0.052829526364803314, -0.012349625118076801, -0.03691452741622925, 0.022839056327939034, ...
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": "cmd", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def _launch_app(self, cmd, args): try: os.execvp(cmd, [cmd] + args) except: pass # The execvp should not return, so if we reach this point, # there was an error. message = KanoDialog( _("Error"), _("Unable to start the application....
16,312
[ 0.0007404872449114919, 0.012842186726629734, 0.03601633012294769, -0.004217063542455435, -0.003868420608341694, -0.011817479506134987, 0.03553126007318497, -0.021949345245957375, -0.02236165478825569, 0.03999388962984085, 0.0010550238657742739, -0.03089885786175728, -0.02296799048781395, -...
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": "new_app_data", "annotation": null, "type_comment": null}}], "kwar...
def refresh(self, new_app_data): old_app_data = self._app self._app = new_app_data if old_app_data["icon"] != new_app_data["icon"]: self._icon.set_from_pixbuf(get_app_icon(new_app_data['icon']).get_pixbuf()) if "colour" in new_app_data and old_app_data["colour"] != new_app_...
16,313
[ -0.01659964956343174, 0.0254520196467638, -0.0001498599594924599, 0.041574735194444656, 0.003920169547200203, -0.022241435945034027, 0.056859906762838364, 0.010952046141028404, 0.0101435836404562, 0.004321492277085781, -0.012283973395824432, 0.018065350130200386, 0.016169244423508644, -0.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 _setup_desc_button(self): if self._more_btn: return self._more_btn = more_btn = Gtk.Button(hexpand=False) more = Gtk.Image.new_from_file("{}/icons/more.png".format(media_dir())) more_btn.set_image(more) more_btn.props.margin_right = 21 more_btn.get_style_...
16,314
[ -0.01007477380335331, 0.02790110558271408, -0.008966605179011822, 0.021915867924690247, -0.009658508002758026, -0.014681831933557987, 0.036158934235572815, 0.0021783674601465464, 0.01662815921008587, 0.006024613510817289, 0.021488351747393608, 0.013658041134476662, 0.015750624239444733, -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 _setup_remove_button(self): if self._remove_btn: return self._remove_btn = remove_btn = Gtk.Button(hexpand=False) bin_open_img = "{}/icons/trashbin-open.png".format(media_dir()) self._res_bin_open = Gtk.Image.new_from_file(bin_open_img) bin_closed_img = "{}/icons...
16,315
[ -0.019779959693551064, 0.014318249188363552, -0.014821583405137062, 0.04626390337944031, -0.0027710150461643934, -0.005033341236412525, 0.08297516405582428, 0.007678522728383541, 0.011383919045329094, 0.018077190965414047, 0.0026706159114837646, 0.0364970788359642, 0.0036652362905442715, -...
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 _setup_update_button(self): if self._update_btn: return self._update_btn = update_btn = Gtk.Button(hexpand=False) img = Gtk.Image.new_from_file("{}/icons/update.png".format(media_dir())) update_btn.set_image(img) update_btn.props.margin_right = 21 update_...
16,316
[ 0.0014720881590619683, 0.024253256618976593, -0.03269966319203377, 0.03472680225968361, 0.0012435826938599348, 0.0047179218381643295, -0.022576041519641876, 0.021996859461069107, 0.008150783367455006, 0.0351853221654892, -0.004787303041666746, -0.033785630017519, 0.013103998266160488, -0.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": "widget", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _show_more_cb(self, widget): kdialog = KanoDialog( self._app["title"], self._app['description'] if "description" in self._app else self._app['tagline'], { _("OK, GOT IT"): { "return_value": 0, "color": "green" ...
16,317
[ 0.013806764036417007, 0.025176363065838814, 0.008955427445471287, 0.019727231934666634, -0.02513037994503975, 0.005785390269011259, 0.031729117035865784, 0.024923449382185936, -0.016071487218141556, 0.052422016859054565, -0.01796833612024784, -0.026509905233979225, -0.01845117099583149, -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": "widget", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _update_cb(self, widget): confirmation = KanoDialog( title_text=_("Updating {}").format(self._app["title"]), description_text=_( "This application will be updated " "Do you wish to proceed?" ), button_dict={ _("Y...
16,318
[ -0.0022709222976118326, 0.02789246290922165, -0.000774333777371794, 0.021105734631419182, -0.03604969009757042, -0.009960810653865337, -0.042079903185367584, 0.022070568054914474, 0.010514493100345135, 0.03958010673522949, -0.0028670907486230135, -0.052013300359249115, 0.0086560919880867, ...
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 _uninstall_cb(self, event): confirmation = KanoDialog( title_text=_("Removing {}").format(self._app["title"]), description_text=_( "This application will be uninstalled and " "removed from apps. Do you wish to proceed?" ), butto...
16,319
[ 0.041257668286561966, 0.009165112860500813, -0.024205747991800308, -0.013686099089682102, -0.008608052507042885, 0.017861122265458107, -0.010255779139697552, 0.035769153386354446, -0.0036179618909955025, -0.011639634147286415, 0.042922984808683395, 0.023595914244651794, -0.010859749279916286...
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 _maybe_pause_protocol(self): size = self.get_write_buffer_size() if size <= self._high_water: return if not self._protocol_paused: self._protocol_paused = True try: self._protocol.pause_writing() except Exception as exc: ...
16,320
[ 0.011360886506736279, 0.022413332015275955, 0.024120034649968147, -0.016326775774359703, -0.017056751996278763, -0.03793816268444061, 0.027985820546746254, -0.024099472910165787, 0.0003367140598129481, 0.045320168137550354, -0.06806250661611557, -0.01589495874941349, -0.006086556240916252, ...
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": "report_install", "annotation": null, "type_comment": null}}], "kw...
def _install_app(self, report_install=True): installer = AppInstaller(self._app['id'], self._apps, None, self._window) installer.set_report_install(report_install) if not installer.install(): return # We need to reload the application informa...
16,321
[ 0.02780982479453087, -0.011036660522222519, 0.057760655879974365, -0.022224588319659233, 0.011502096429467201, 0.01630190946161747, 0.0024624494835734367, 0.0031213327310979366, 0.010379231534898281, 0.025715360417962074, 0.0291130468249321, 0.03439575061202049, -0.06478874385356903, 0.033...
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": "high", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _set_write_buffer_limits(self, high=None, low=None): if high is None: if low is None: high = 64*1024 else: high = 4*low if low is None: low = high // 4 if not high >= low >= 0: raise ValueError('high (%r) must be...
16,322
[ 0.04085255786776543, 0.04805907979607582, -0.014658721163868904, -0.00544291315600276, -0.001006105332635343, 0.015735018998384476, 0.00023635433171875775, 0.04770811274647713, -0.007598435040563345, -0.00918363593518734, 0.04527474194765091, 0.022181114181876183, -0.011096405796706676, 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 _maybe_resume_protocol(self): if (self._protocol_paused and self.get_write_buffer_size() <= self._low_water): self._protocol_paused = False try: self._protocol.resume_writing() except Exception as exc: self._loop.call_exception_...
16,323
[ 0.01650257408618927, -0.00020329837570898235, 0.02245946042239666, -0.04175521433353424, 0.009120592847466469, 0.0035538249649107456, -0.0009062698809430003, 0.013046723790466785, 0.028017321601510048, 0.020165061578154564, 0.022929741069674492, 0.0062062786892056465, 0.021704161539673805, ...
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": null, "vararg": null, "defaults": [], "kwonlyargs...
class SpecsTest(test.TestCase): def testSimpleConv(self): with self.test_session(): inputs = constant_op.constant(_rand(1, 18, 19, 5)) spec = "net = Cr(64, [5, 5])" outputs = specs.create_net(spec, inputs) self.assertEqual(outputs.get_shape().as_list(), [1, 18, 19, 64]) variables.gl...
16,324
[ -0.0062199244275689125, -0.04079557582736015, 0.016616174951195717, -0.028419388458132744, -0.005102630238980055, -0.00990604143589735, 0.014642606489360332, 0.014668071642518044, 0.04950474202632904, 0.015788549557328224, 0.005869775079190731, 0.008753731846809387, -0.004924372304230928, ...
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 testSimpleConv(self): with self.test_session(): inputs = constant_op.constant(_rand(1, 18, 19, 5)) spec = "net = Cr(64, [5, 5])" outputs = specs.create_net(spec, inputs) self.assertEqual(outputs.get_shape().as_list(), [1, 18, 19, 64]) variables.global_variables_initializer().run() ...
16,325
[ -0.03807089477777481, 0.03179878368973732, 0.016762148588895798, -0.03357907757163048, 0.02280145324766636, -0.005371693521738052, 0.013530231080949306, 0.008401616476476192, 0.05299796909093857, -0.0011469199089333415, 0.02369159832596779, -0.005974254570901394, 0.0218428336083889, 0.0182...
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 testUnary(self): # This is just a quick and dirty check that these ops exist # and work as unary ops. with self.test_session(): inputs = constant_op.constant(_rand(17, 55)) spec = "net = Do(0.5) | Bn | Unit(1) | Relu | Sig | Tanh | Smax" outputs = specs.create_net(spec, inputs) s...
16,326
[ 0.012895065359771252, -0.015034547075629234, 0.010535817593336105, -0.04739179089665413, -0.013664244674146175, 0.003803882747888565, 0.004631235264241695, 0.014827709645032883, 0.06034502759575844, 0.011492444202303886, -0.0004690216446761042, -0.0009024929604493082, -0.03229260444641113, ...
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 testAdd(self): with self.test_session(): inputs = constant_op.constant(_rand(17, 55)) spec = "net = Fs(10) + Fr(10)" outputs = specs.create_net(spec, inputs) self.assertEqual(outputs.get_shape().as_list(), [17, 10]) variables.global_variables_initializer().run() result = outp...
16,327
[ 0.02816499024629593, 0.004979887045919895, 0.050749730318784714, -0.014561397023499012, -0.02490290440618992, 0.01969744823873043, -0.002496883971616626, 0.012791542336344719, 0.06679642200469971, 0.01812887005507946, 0.02107168920338154, 0.004192127846181393, -0.022917890921235085, 0.0044...
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 testAbbrevPower(self): with self.test_session(): inputs = constant_op.constant(_rand(1, 64, 64, 5)) spec = "C3 = Cr([3, 3]); M2 = Mp([2, 2]); net = (C3(5) | M2)**3" outputs = specs.create_net(spec, inputs) self.assertEqual(outputs.get_shape().as_list(), [1, 8, 8, 5]) variables.glob...
16,328
[ 0.03397136926651001, -0.0038734690751880407, 0.03792335465550423, -0.02269119955599308, -0.0077600241638720036, 0.012497171759605408, -0.014656369574368, 0.03295065835118294, 0.0626559779047966, 0.008669503964483738, 0.03439012169837952, 0.0012791608460247517, -0.043655041605234146, 0.0131...
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 testMpPower(self): with self.test_session(): inputs = constant_op.constant(_rand(1, 64, 64, 5)) spec = "M2 = Mp([2, 2]); net = M2**3" outputs = specs.create_net(spec, inputs) self.assertEqual(outputs.get_shape().as_list(), [1, 8, 8, 5]) variables.global_variables_initializer().run(...
16,329
[ 0.028226587921380997, -0.002665652660652995, 0.04922054335474968, -0.021463248878717422, -0.03229839354753494, 0.02438942901790142, -0.00002387171844020486, 0.018164396286010742, 0.06940013915300369, 0.028764894232153893, 0.02096635103225708, -0.0004309040668886155, -0.026915328577160835, ...
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 testAbbrevPower2(self): with self.test_session(): inputs = constant_op.constant(_rand(1, 64, 64, 5)) spec = "C3 = Cr(_1=[3, 3]); M2 = Mp([2, 2]);" spec += "net = (C3(_0=5) | M2)**3" outputs = specs.create_net(spec, inputs) self.assertEqual(outputs.get_shape().as_list(), [1, 8, 8, 5...
16,330
[ 0.009696794673800468, -0.021044107154011726, 0.04951554536819458, -0.0390622653067112, -0.001894657383672893, 0.007131614256650209, 0.01837576925754547, 0.01683528535068035, 0.05688786134123802, 0.009387322701513767, 0.002993283560499549, -0.001963428920134902, -0.010886543430387974, -0.01...
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 testConc(self): with self.test_session(): inputs = constant_op.constant(_rand(10, 20)) spec = "net = Conc(1, Fs(20), Fs(10))" outputs = specs.create_net(spec, inputs) self.assertEqual(outputs.get_shape().as_list(), [10, 30]) variables.global_variables_initializer().run() resu...
16,331
[ 0.008316736668348312, 0.020588703453540802, 0.03654106333851814, -0.05663984268903732, -0.013741734437644482, -0.057500194758176804, -0.02095913141965866, 0.0017162230797111988, 0.018712656572461128, -0.04108181223273277, -0.006249501835554838, -0.018497569486498833, -0.0004051571013405919, ...
7
{"_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 testParams(self): params = "x = 3; y = Ui(-10, 10); z = Lf(1, 100); q = Nt(0.0, 1.0)" bindings = specs.eval_params(params, {}) self.assertTrue("x" in bindings) self.assertEqual(bindings["x"], 3) self.assertTrue("y" in bindings) self.assertTrue("z" in bindings) self.assertTrue("q" in bind...
16,332
[ 0.0041803037747740746, -0.012507175095379353, 0.031062450259923935, -0.07645386457443237, 0.005413232836872339, -0.008139784447848797, -0.00352090154774487, 0.023701678961515427, 0.027014026418328285, 0.00923776626586914, 0.018316049128770828, 0.03790796548128128, -0.013151242397725582, -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 testImport(self): with self.test_session(): inputs = constant_op.constant(_rand(10, 20)) spec = ("S = Import('from tensorflow.python.ops" + " import math_ops; f = math_ops.sigmoid')") spec += "; net = S | S" outputs = specs.create_net(spec, inputs) self.assertEqual(ou...
16,333
[ 0.023760182783007622, 0.006903114262968302, 0.0015237362822517753, -0.03704110160470009, 0.009758646599948406, 0.0009546502260491252, -0.003508802503347397, -0.01334826648235321, 0.054793890565633774, -0.011711723171174526, 0.0189919825643301, 0.01868218556046486, 0.02538999170064926, 0.00...
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 DISABLED_testVar(self): with self.test_session() as sess: with specs.ops: # pylint: disable=undefined-variable v = Var("test_var", shape=[2, 2], initializer=init_ops.constant_initializer(42.0)) inputs = constant_op.constant(_rand(10, 100)) output...
16,334
[ 0.053622711449861526, 0.05148213729262352, 0.019549664109945297, -0.0060897949151694775, 0.008325203321874142, -0.012789246626198292, -0.008013601414859295, -0.017531022429466248, 0.005090635269880295, -0.016081394627690315, 0.001864533987827599, 0.01390017755329609, 0.04004768282175064, 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 DISABLED_testSpecsOps(self): # pylint: disable=undefined-variable with self.assertRaises(NameError): _ = Cr with specs.ops: self.assertIsNotNone(Cr) self.assertTrue(callable(Cr(64, [3, 3]))) with self.assertRaises(NameError): _ = Cr
16,335
[ 0.017712658271193504, 0.03813620284199715, -0.002791294362396002, -0.001331751816906035, 0.034483399242162704, 0.024512849748134613, -0.027039946988224983, 0.019987046718597412, 0.02513313665986061, 0.012750357389450073, 0.02025124430656433, -0.021491818130016327, 0.017264673486351967, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "func", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def administration_required(func): @wraps(func) def wrapper(*args, **kwargs): if ( ('cur_user' in kwargs) == False): return {"success":'false', "reason":"Cannot get cur_user"} cur_user = kwargs['cur_user'] if ((cur_user.user_group == 'admin') or (cur_user.user_group == 'root'...
16,336
[ 0.03401046618819237, -0.014543240889906883, 0.010722445324063301, -0.0077357664704322815, 0.019642120227217674, 0.00024237333855126053, 0.011025148443877697, 0.00014672731049358845, 0.022332821041345596, -0.018686920404434204, 0.02811782993376255, 0.016682349145412445, 0.01800079271197319, ...
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 DISABLED_testShared(self): with self.test_session(): with specs.ops: # pylint: disable=undefined-variable f = Shared(Fr(100)) g = f | f | f | f inputs = constant_op.constant(_rand(10, 100)) _ = g.funcall(inputs) self.assertEqual(len(variables.global_variables()), ...
16,337
[ 0.016144590452313423, 0.025281548500061035, 0.0025208317674696445, 0.0004929000861011446, 0.04736347123980522, 0.017620474100112915, -0.015536210499703884, 0.028458641842007637, 0.03575919568538666, 0.011626808904111385, 0.006568245589733124, -0.02850370854139328, 0.01928788423538208, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "func", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def administration_or_self_required(func): @wraps(func) def wrapper(*args, **kwargs): if ( (not ('cur_user' in kwargs)) or (not ('user' in kwargs))): return {"success":'false', "reason":"Cannot get cur_user or user"} cur_user = kwargs['cur_user'] user = kwargs['user'] ...
16,338
[ -0.00608826894313097, 0.022302886471152306, -0.01855364441871643, 0.001141196466051042, 0.042748142033815384, 0.005097155459225178, -0.05246671661734581, 0.04548927769064903, 0.025553738698363304, 0.006597984116524458, 0.0026845016982406378, -0.023243028670549393, 0.022563407197594643, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def wrapper(*args, **kwargs): if ( ('cur_user' in kwargs) == False): return {"success":'false', "reason":"Cannot get cur_user"} cur_user = kwargs['cur_user'] if ((cur_user.user_group == 'admin') or (cur_user.user_group == 'root')): return func(*args, **kwargs) els...
16,339
[ -0.010163232684135437, 0.019390378147363663, -0.02027074620127678, -0.004922816064208746, 0.043216027319431305, 0.0036607696674764156, -0.050192106515169144, 0.04261425510048866, 0.02837235853075981, 0.006368736270815134, -0.0005303797661326826, -0.02774829976260662, 0.014676510356366634, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def wrapper(*args, **kwargs): if ( (not ('cur_user' in kwargs)) or (not ('user' in kwargs))): return {"success":'false', "reason":"Cannot get cur_user or user"} cur_user = kwargs['cur_user'] user = kwargs['user'] if ((cur_user.user_group == 'admin') or (cur_user.user_group ==...
16,340
[ 0.01923540234565735, 0.020489107817411423, -0.024059178307652473, -0.020942827686667442, 0.02698448859155178, 0.0012604204239323735, -0.02483528107404709, 0.051151126623153687, 0.0538734570145607, 0.013719105161726475, -0.008328177034854889, -0.0019462263444438577, -0.003925287630409002, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "func", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def token_required(func): @wraps(func) def wrapper(*args, **kwargs): if ( ('cur_user' in kwargs) == False): return {"success":'false', "reason":"Cannot get cur_user"} return func(*args, **kwargs) return wrapper
16,341
[ 0.03244449570775032, 0.03094404749572277, -0.04275193065404892, 0.009964940138161182, 0.06132270768284798, -0.022071825340390205, -0.004107207991182804, 0.04475253075361252, 0.020908433943986893, 0.000738672271836549, 0.015754716470837593, 0.014656562358140945, -0.009839902631938457, 0.015...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "to_address", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "username", "annotation": null, "type_comment": null}}], "kw...
def send_activated_email(to_address, username): email_from_address = settings.get('EMAIL_FROM_ADDRESS') if (email_from_address in ['\'\'', '\"\"', '']): return #text = 'Dear '+ username + ':\n' + ' Your account in docklet has been activated' text = '<html><h4>Dear '+ username + ':</h4>' tex...
16,342
[ 0.0376991406083107, 0.039404358714818954, -0.016487613320350647, 0.016245655715465546, 0.03827522695064545, 0.006262066774070263, 0.022352179512381554, 0.056456536054611206, 0.015957612544298172, 0.004551087971776724, 0.025071311742067337, 0.002350435359403491, 0.005170381627976894, 0.0100...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "username", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs"...
def send_remind_activating_email(username): #admin_email_address = env.getenv('ADMIN_EMAIL_ADDRESS') nulladdr = ['\'\'', '\"\"', ''] email_from_address = settings.get('EMAIL_FROM_ADDRESS') admin_email_address = settings.get('ADMIN_EMAIL_ADDRESS') if (email_from_address in nulladdr or admin_email_add...
16,343
[ -0.022180616855621338, 0.00439890380948782, -0.009428919292986393, 0.017034627497196198, 0.03027179464697838, 0.009067513979971409, 0.029171394184231758, 0.01438072044402361, 0.019418828189373016, 0.01633339188992977, -0.005863407161086798, 0.016829650849103928, 0.016009744256734848, -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": "username", "annotation": null, "type_comment": null}}, {"_type": ...
def auth_local(self, username, password): password = hashlib.sha512(password.encode('utf-8')).hexdigest() user = User.query.filter_by(username = username).first() if (user == None): return {"success":'false', "reason": "User did not exist"} if (user.password != password): ...
16,344
[ 0.0005108909099362791, 0.04053653031587601, -0.006219776347279549, 0.017817068845033646, 0.02166123501956463, 0.008471205830574036, 0.04239382594823837, 0.06288885325193405, 0.017817068845033646, 0.013551769778132439, 0.01719077117741108, -0.007207814138382673, 0.02310819737613201, -0.0013...
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": "username", "annotation": null, "type_comment": null}}, {"_type": ...
def auth_pam(self, username, password): user = User.query.filter_by(username = username).first() pamresult = PAM.authenticate(username, password) if (pamresult == False or (user != None and user.auth_method != 'pam')): return {"success":'false', "reason": "Wrong password or wrong log...
16,345
[ 0.01837371103465557, -0.004396029748022556, 0.029102154076099396, 0.01992783136665821, 0.016644125804305077, 0.003866500686854124, 0.03639649227261543, 0.027548033744096756, -0.0043208301067352295, 0.040407124906778336, 0.011894033290445805, 0.003380838083103299, 0.02616938017308712, 0.025...
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": "form", "annotation": null, "type_comment": null}}], "kwarg": null...
def auth_external(self, form): if (env.getenv('EXTERNAL_LOGIN') != 'True'): failed_result = {'success': 'false', 'reason' : 'external auth disabled'} return failed_result result = external_receive.external_auth_receive_request(form) if (result['success'] != 'True'): ...
16,346
[ 0.01899149641394615, 0.055445194244384766, 0.024295233190059662, 0.009794015437364578, 0.03145365044474602, -0.016041360795497894, 0.012559767812490463, 0.0644257515668869, -0.005705041345208883, -0.03815653175115585, 0.05683349072933197, 0.02468569204211235, -0.037418998777866364, -0.0123...
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": "username", "annotation": null, "type_comment": null}}, {"_type": ...
def set_nfs_quota(self, username, quota): if not data_quota == "True": return nfspath = "/users/%s/data" % username try: cmd = data_quota_cmd % (nfspath,quota+"GB") sys_run(cmd.strip('"')) except Exception as e: logger.error(e)
16,347
[ 0.0065504503436386585, 0.008523478172719479, 0.03312055021524429, -0.025031140074133873, -0.013837497681379318, 0.003128892509266734, -0.024465538561344147, 0.05534999072551727, 0.036803536117076874, 0.007464619819074869, 0.03314685821533203, 0.009371879510581493, -0.01734948717057705, 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}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def usageRelease(self, *args, **kwargs): cur_user = kwargs['cur_user'] cpu = kwargs['cpu'] memory = kwargs['memory'] disk = kwargs['disk'] usage = UserUsage.query.filter_by(username = cur_user.username).first() if usage == None: new_usage = UserUsage(cur_user....
16,348
[ -0.022369753569364548, 0.026115549728274345, 0.01582336239516735, 0.0018189281690865755, 0.006289669778198004, -0.00788250844925642, 0.01856561191380024, 0.02413179539144039, -0.002752459840849042, -0.0425223708152771, 0.0064763762056827545, 0.002424265258014202, 0.011517447419464588, 0.03...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def change_default_group(*args, **kwargs): form = kwargs['form'] default_group = form.get('defaultgroup') quotafile = open(fspath+"/global/sys/quotainfo",'r') quotas = json.loads(quotafile.read()) quotafile.close() quotas['default'] = default_group quotafile = ope...
16,349
[ 0.020161651074886322, 0.0302738044410944, -0.005150055047124624, 0.0009993112180382013, -0.007988224737346172, -0.013157075271010399, -0.011127126403152943, 0.038744453340768814, -0.01173485815525055, -0.020537568256258965, 0.018845943734049797, 0.0004636302764993161, -0.01069482322782278, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def quotaadd(*args, **kwargs): form = kwargs.get('form') quotaname = form.get("quotaname") default_value = form.get("default_value") hint = form.get("hint") if (quotaname == None): return { "success":'false', "reason": "Empty quota name"} if (default_value == ...
16,350
[ 0.009187055751681328, 0.03718112036585808, 0.029821855947375298, 0.014670428819954395, -0.0156203992664814, 0.008555746637284756, 0.005958358757197857, 0.03422298654913902, 0.010016776621341705, -0.027080168947577477, -0.0033098652493208647, 0.0006053806864656508, -0.003369990037754178, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def groupadd(*args, **kwargs): form = kwargs.get('form') groupname = form.get("groupname") if (groupname == None): return {"success":'false', "reason": "Empty group name"} groupfile = open(fspath+"/global/sys/quota",'r') groups = json.loads(groupfile.read()) g...
16,351
[ 0.02429899014532566, 0.030494797974824905, 0.013347682543098927, 0.014216833747923374, -0.006248577497899532, 0.02018914557993412, -0.04370589926838875, 0.035684872418642044, 0.012317117303609848, -0.04226559028029442, 0.03710034862160683, 0.0050348700024187565, -0.008350061252713203, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def groupdel(*args, **kwargs): name = kwargs.get('name', None) if (name == None): return {"success":'false', "reason": "Empty group name"} groupfile = open(fspath+"/global/sys/quota",'r') groups = json.loads(groupfile.read()) groupfile.close() for group in gro...
16,352
[ -0.001441247295588255, -0.014859057031571865, 0.01642500050365925, -0.0021328721195459366, 0.038325000554323196, 0.017712552100419998, 0.03737383335828781, 0.01484745740890503, 0.039160169661045074, -0.020670443773269653, -0.010567213408648968, -0.009708845056593418, -0.007035142742097378, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def chlxcsetting(*args, **kwargs): form = kwargs['form'] lxcsetting = {} lxcsetting['cpu'] = form['lxcCpu'] lxcsetting['memory'] = form['lxcMemory'] lxcsetting['disk'] = form['lxcDisk'] lxcsettingfile = open(fspath+"/global/sys/lxc.default", 'w') lxcsettingfile.wr...
16,353
[ 0.05893160030245781, 0.027901845052838326, 0.011344333179295063, -0.009060733020305634, 0.022813329473137856, 0.014234247617423534, 0.012001646682620049, 0.039552170783281326, 0.014744232408702374, 0.012692959979176521, 0.027743183076381683, -0.0337270088493824, 0.0030259110499173403, 0.02...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def cloud_account_del(*args, **kwargs): form = kwargs.get('form') cloudname = form['cloudname'] accountfile = open(fspath+"/global/sys/cloudaccount", 'r') account = json.loads(accountfile.read()) accountfile.close() for acc in account: if acc['cloudname'] == c...
16,354
[ 0.044918160885572433, 0.019619792699813843, 0.009953455999493599, -0.001268773223273456, 0.037495605647563934, -0.01538744755089283, 0.03819745033979416, 0.023650093004107475, 0.020693831145763397, 0.013856146484613419, -0.005737061612308025, -0.018343709409236908, 0.012633232399821281, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def cloud_account_add(*args, **kwargs): form = kwargs.get('form') accountfile = open(fspath+"/global/sys/cloudaccount", 'r') account = json.loads(accountfile.read()) accountfile.close() account.append( { 'cloudname' : form['cloudname'], 'userna...
16,355
[ 0.04639318212866783, 0.03788924962282181, 0.009856324642896652, -0.0197015181183815, 0.02451002597808838, 0.0023319029714912176, 0.05102359503507614, 0.010006590746343136, 0.02773795835673809, 0.004157354589551687, 0.019768303260207176, -0.032457418739795685, 0.027359509840607643, 0.036130...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def cloud_account_modify(*args, **kwargs): form = kwargs.get('form') cloudname = form['cloudname'] accountfile = open(fspath+"/global/sys/cloudaccount", 'r') account = json.loads(accountfile.read()) accountfile.close() for acc in account: if acc['cloudname'] =...
16,356
[ -0.0020110970363020897, -0.045500461012125015, 0.03604716807603836, -0.0174262598156929, -0.0010201568948104978, 0.041189342737197876, -0.00015815679216757417, -0.010323306545615196, 0.04381237179040909, 0.014218893833458424, 0.04028037190437317, -0.04347475245594978, 0.02117900922894478, ...
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": null, "vararg": null, "defaults": [], "kwonlyargs...
class ConnectorsApiTests(CatmaidApiTestCase): def test_list_connector_empty(self): self.fake_authentication() response = self.client.post( '/%d/connector/table/list' % self.test_project_id, { 'iDisplayStart': 0, 'iDisplayLength': 25, ...
16,357
[ -0.029345208778977394, -0.03342295438051224, 0.01785227470099926, -0.021226124837994576, 0.0010816343128681183, 0.03293750807642937, -0.03303459659218788, -0.02377471514046192, 0.028350044041872025, 0.023701898753643036, 0.0204615481197834, -0.02497619390487671, 0.02031591348350048, -0.035...
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 test_list_connector_outgoing_with_sorting_and_paging(self): self.fake_authentication() response = self.client.post( '/%d/connector/table/list' % self.test_project_id, { 'iDisplayStart': 1, 'iDisplayLength': 2, 'iSortingCols'...
16,358
[ -0.03774269297719002, -0.028785988688468933, 0.01469234935939312, -0.01709916442632675, -0.003496467834338546, 0.013494929298758507, -0.020272329449653625, -0.002525060437619686, 0.050866421312093735, 0.02164936251938343, 0.0015776015352457762, -0.027828052639961243, 0.0384850949048996, -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 test_list_connector_empty(self): self.fake_authentication() response = self.client.post( '/%d/connector/table/list' % self.test_project_id, { 'iDisplayStart': 0, 'iDisplayLength': 25, 'iSortingCols': 1, '...
16,359
[ -0.031950946897268295, -0.011071260087192059, 0.03320151939988136, -0.0023509569000452757, 0.008367813192307949, 0.03597240149974823, -0.02100229077041149, -0.0019126429688185453, 0.050562433898448944, 0.017900375649333, 0.019285816699266434, -0.044996149837970734, 0.009029882028698921, -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 test_list_connector_incoming_with_connecting_skeletons(self): self.fake_authentication() response = self.client.post( '/%d/connector/table/list' % self.test_project_id, { 'iDisplayStart': 0, 'iDisplayLength': 25, 'iSortingCo...
16,360
[ -0.04427840933203697, -0.02646583691239357, 0.019684916362166405, -0.03509380295872688, -0.0036181786563247442, 0.029021333903074265, -0.029982808977365494, -0.031323812901973724, 0.02995750680565834, 0.025479061529040337, 0.01750894822180271, -0.02577003464102745, 0.03306964784860611, -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 test_list_connector_outgoing_with_sorting(self): self.fake_authentication() response = self.client.post( '/%d/connector/table/list' % self.test_project_id, { 'iDisplayStart': 0, 'iDisplayLength': 25, 'iSortingCols': 1, ...
16,361
[ -0.03055974841117859, -0.04090145602822304, 0.024729611352086067, 0.002134593203663826, -0.02281639538705349, 0.015848668292164803, -0.0365837961435318, -0.017270652577280998, 0.04126341640949249, 0.010871721431612968, 0.02325591817498207, -0.08175120502710342, 0.008454347029328346, -0.022...
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 test_one_to_many_skeletons_connector_list(self): self.fake_authentication() response = self.client.post( '/%d/connector/list/one_to_many' % self.test_project_id, { 'skid': 373, 'skids[0]': 235, 'relation': 'presynaptic_to' ...
16,362
[ -0.03217265382409096, -0.040462229400873184, 0.027825679630041122, 0.00299644167535007, -0.03085845150053501, 0.012611275538802147, -0.033208850771188736, -0.021810682490468025, 0.03753054887056351, 0.009344727732241154, 0.024224264547228813, -0.08779874444007874, 0.002359875477850437, -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 test_many_to_many_skeletons_connector_list(self): self.fake_authentication() response = self.client.post( '/%d/connector/list/many_to_many' % self.test_project_id, { 'skids1[0]': 373, 'skids2[0]': 235, 'relation': 'presynapt...
16,363
[ 0.0047261095605790615, -0.030595501884818077, 0.0068514784798026085, -0.007624340243637562, -0.027970226481556892, 0.011641993187367916, 0.011108350940048695, 0.00820091925561428, 0.040385082364082336, 0.024375807493925095, 0.03341706097126007, -0.010090136900544167, 0.041734520345926285, ...
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 test_create_connector(self): self.fake_authentication() connector_count = Connector.objects.all().count() response = self.client.post( '/%d/connector/create' % self.test_project_id, {'x': 111, 'y': 222, 'z': 333, 'confidence': 3}) self.assertEqual(resp...
16,364
[ 0.005152552388608456, -0.0289279967546463, 0.013174214400351048, -0.001002707751467824, -0.02017589472234249, 0.03274470195174217, -0.011469858698546886, 0.004925524350255728, 0.04516873508691788, -0.00583034660667181, 0.02247907966375351, -0.0611199326813221, 0.005675704218447208, -0.0653...
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 test_connector_skeletons(self): self.fake_authentication() response = self.client.post( '/%d/connector/skeletons' % self.test_project_id, { 'connector_ids[0]': 356, 'connector_ids[1]': 2463 }) self.assertEqual(response....
16,365
[ -0.028413623571395874, -0.04507271945476532, -0.0017861264059320092, 0.0011807613773271441, -0.00019019334285985678, 0.0429629310965538, -0.016056299209594727, -0.010028337128460407, 0.05559425428509712, 0.016124799847602844, 0.023166555911302567, -0.033975787460803986, 0.006644458509981632,...
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 test_connector_info(self): self.fake_authentication() response = self.client.post( '/%d/connector/info' % self.test_project_id, {'pre[0]': 235, 'post[0]': 373}) self.assertEqual(response.status_code, 200) parsed_response = json.loads(response.content) ...
16,366
[ 0.016472671180963516, -0.02014046534895897, -0.02357497066259384, -0.02768341824412346, -0.01776871085166931, 0.06013626605272293, -0.006985656451433897, 0.030431022867560387, 0.029990369454026222, 0.03227140009403229, 0.06754961609840393, -0.03011997416615486, 0.021177297458052635, -0.024...
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 test_delete_connector(self): self.fake_authentication() connector_id = 356 connector = Connector.objects.get(id=connector_id) connector_count = Connector.objects.all().count() treenode_connector_count = TreenodeConnector.objects.all().count() response = self.client.po...
16,367
[ -0.0013141793897375464, -0.022308532148599625, -0.0001315567351412028, 0.006008583586663008, 0.005567615851759911, 0.02064617909491062, -0.0005789686110801995, 0.0218643918633461, 0.0415969118475914, 0.004165401216596365, 0.018691960722208023, -0.005662788636982441, 0.023069916293025017, -...
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 test_connector_user_info(self): self.fake_authentication() response = self.client.get( '/%d/connector/user-info' % (self.test_project_id,), { 'treenode_id': 415, 'connector_id': 421, 'relation_name': 'presynaptic_to' ...
16,368
[ -0.033859070390462875, -0.040371447801589966, -0.010000205598771572, -0.008696407079696655, -0.017194265499711037, 0.03579160198569298, -0.018610574305057526, 0.008815535344183445, 0.05892907455563545, 0.009305287152528763, 0.026089219376444817, -0.028140883892774582, 0.013210066594183445, ...
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 test_connector_detail(self): self.fake_authentication() response = self.client.get( '/%d/connectors/%d/' % (self.test_project_id, 421)) self.assertEqual(response.status_code, 200) parsed_response = json.loads(response.content) expected_result = { ...
16,369
[ 0.037684716284275055, 0.008615151047706604, 0.026633957400918007, -0.008328952826559544, 0.01580515131354332, 0.012686175294220448, 0.0034869457595050335, 0.0400443896651268, -0.012802990153431892, -0.0021902925800532103, 0.005323871038854122, -0.04985690116882324, -0.023374803364276886, 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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class MemorySeekTestMixin: def testInit(self): buf = self.buftype("1234567890") bytesIo = self.ioclass(buf) def testRead(self): buf = self.buftype("1234567890") bytesIo = self.ioclass(buf) self.assertEqual(buf[:1], bytesIo.read(1)) self.assertEqual(buf[1:5], by...
16,370
[ 0.02661321870982647, 0.006229641381651163, 0.013807845301926136, -0.002762762364000082, 0.04387004300951958, -0.008204747922718525, -0.02472761832177639, 0.05971863120794296, 0.011021214537322521, 0.008103307336568832, 0.035683196038007736, -0.025563010945916176, -0.052128493785858154, 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 testRead(self): buf = self.buftype("1234567890") bytesIo = self.ioclass(buf) self.assertEqual(buf[:1], bytesIo.read(1)) self.assertEqual(buf[1:5], bytesIo.read(4)) self.assertEqual(buf[5:], bytesIo.read(900)) self.assertEqual(self.EOF, bytesIo.read())
16,371
[ 0.003920177463442087, 0.018022172152996063, 0.00798226147890091, 0.002743532881140709, 0.009992608800530434, -0.006051736883819103, -0.004124168306589127, 0.05794530734419823, 0.0064449370838701725, -0.02871249057352543, 0.04545750096440315, -0.02039911225438118, -0.014864744618535042, -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 testSeek(self): buf = self.buftype("1234567890") bytesIo = self.ioclass(buf) bytesIo.read(5) bytesIo.seek(0) self.assertEqual(buf, bytesIo.read()) bytesIo.seek(3) self.assertEqual(buf[3:], bytesIo.read()) self.assertRaises(TypeError, bytesIo.seek, 0....
16,372
[ 0.01397012360394001, -0.00927165150642395, 0.02596062421798706, 0.001561458921059966, 0.015586398541927338, -0.0028410095255821943, -0.006236438639461994, 0.031423382461071014, 0.02374294586479664, -0.004720398224890232, 0.03633484989404678, -0.016137685626745224, -0.03828941658139229, -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 testTell(self): buf = self.buftype("1234567890") bytesIo = self.ioclass(buf) self.assertEqual(0, bytesIo.tell()) bytesIo.seek(5) self.assertEqual(5, bytesIo.tell()) bytesIo.seek(10000) self.assertEqual(10000, bytesIo.tell())
16,373
[ 0.054921530187129974, 0.015967752784490585, 0.029862994328141212, -0.014472248032689095, 0.03292465955018997, -0.04568943753838539, 0.003718154737725854, 0.039660315960645676, -0.0006189564592204988, -0.00390656478703022, 0.01449579931795597, 0.02100772224366665, -0.02276228927075863, 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 test_write(self): buf = self.buftype("hello world\n") memio = self.ioclass(buf) self.write_ops(memio, self.buftype) self.assertEqual(memio.getvalue(), buf) memio = self.ioclass() self.write_ops(memio, self.buftype) self.assertEqual(memio.getvalue(), buf) ...
16,374
[ 0.05058782547712326, 0.011493957601487637, 0.05226927995681763, -0.05414290353655815, 0.034373778849840164, -0.002037264872342348, -0.013391600921750069, -0.030914781615138054, 0.016574358567595482, -0.0002743626828305423, 0.04340560361742973, 0.014352433383464813, -0.03442182019352913, -0...
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": "f", "annotation": null, "type_comment": null}}, {"_type": "arg", ...
def write_ops(self, f, t): self.assertEqual(f.write(t("blah.")), 5) self.assertEqual(f.seek(0), 0) self.assertEqual(f.write(t("Hello.")), 6) self.assertEqual(f.tell(), 6) self.assertEqual(f.seek(5), 5) self.assertEqual(f.tell(), 5) self.assertEqual(f.write(t(" wor...
16,375
[ 0.01804135926067829, 0.004070703871548176, 0.06434968113899231, -0.005011850502341986, 0.015553344041109085, -0.05022922530770302, 0.02563566341996193, 0.005734807346016169, 0.0051649087108671665, 0.018223725259304047, 0.030325114727020264, -0.010440540499985218, -0.039130859076976776, 0.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 test_writelines(self): buf = self.buftype("1234567890") memio = self.ioclass() self.assertEqual(memio.writelines([buf] * 100), None) self.assertEqual(memio.getvalue(), buf * 100) memio.writelines([]) self.assertEqual(memio.getvalue(), buf * 100) memio = self....
16,376
[ 0.0213796254247427, 0.021955033764243126, 0.026826826855540276, -0.007691294886171818, -0.007863917388021946, -0.0039831059984862804, 0.027440596371889114, 0.054676603525877, 0.022377001121640205, 0.0057668727822601795, 0.021162249147892, -0.005709331948310137, -0.03391074761748314, -0.018...
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 test_truncate(self): buf = self.buftype("1234567890") memio = self.ioclass(buf) self.assertRaises(ValueError, memio.truncate, -1) memio.seek(6) self.assertEqual(memio.truncate(), 6) self.assertEqual(memio.getvalue(), buf[:6]) self.assertEqual(memio.truncate(4...
16,377
[ 0.03231930732727051, 0.02048187516629696, 0.01763933338224888, 0.006343800108879805, 0.003332523163408041, -0.0038938927464187145, 0.042209796607494354, 0.048543862998485565, 0.024648340418934822, 0.007995459251105785, 0.03416241705417633, -0.010604367591440678, -0.04226171597838402, -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 test_init(self): buf = self.buftype("1234567890") memio = self.ioclass(buf) self.assertEqual(memio.getvalue(), buf) memio = self.ioclass(None) self.assertEqual(memio.getvalue(), self.EOF) memio.__init__(buf * 2) self.assertEqual(memio.getvalue(), buf * 2) ...
16,378
[ 0.028784828260540962, 0.02707533724606037, 0.0037992203142493963, -0.008195505477488041, 0.04105294868350029, 0.005452148150652647, 0.0035572517663240433, 0.04047473892569542, 0.0066054267808794975, -0.01154535636305809, 0.03703061491250992, -0.024624226614832878, -0.04012278467416763, 0.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 test_read(self): buf = self.buftype("1234567890") memio = self.ioclass(buf) self.assertEqual(memio.read(0), self.EOF) self.assertEqual(memio.read(1), buf[:1]) self.assertEqual(memio.read(4), buf[1:5]) self.assertEqual(memio.read(900), buf[5:]) self.assertEqua...
16,379
[ 0.033591657876968384, 0.03996652737259865, 0.020399581640958786, -0.00823529064655304, 0.030547333881258965, 0.018057793378829956, 0.02479694038629532, 0.028908081352710724, 0.011806517839431763, 0.028439722955226898, 0.03416409716010094, -0.019189657643437386, -0.03892573341727257, 0.0421...
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 test_readline(self): buf = self.buftype("1234567890\n") memio = self.ioclass(buf * 2) self.assertEqual(memio.readline(0), self.EOF) self.assertEqual(memio.readline(), buf) self.assertEqual(memio.readline(), buf) self.assertEqual(memio.readline(), self.EOF) me...
16,380
[ 0.02614719048142433, 0.03377779573202133, 0.02509244717657566, -0.009753109887242317, 0.027162866666913033, -0.004905853420495987, 0.016849832609295845, 0.0009513840195722878, -0.0004089567519258708, 0.022227715700864792, 0.01634199358522892, -0.03804884850978851, -0.032527729868888855, 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_readlines(self): buf = self.buftype("1234567890\n") memio = self.ioclass(buf * 10) self.assertEqual(memio.readlines(), [buf] * 10) memio.seek(5) self.assertEqual(memio.readlines(), [buf[5:]] + [buf] * 9) memio.seek(0) self.assertEqual(memio.readlines(15)...
16,381
[ 0.03209470584988594, 0.027745064347982407, -0.008911621756851673, -0.019676346331834793, 0.02465656027197838, 0.009149693883955479, 0.04311037436127663, 0.03345879539847374, 0.019830770790576935, 0.001011806889437139, 0.028311289846897125, -0.03518321365118027, -0.030344555154442787, -0.01...
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 test_iterator(self): buf = self.buftype("1234567890\n") memio = self.ioclass(buf * 10) self.assertEqual(iter(memio), memio) self.assertTrue(hasattr(memio, '__iter__')) self.assertTrue(hasattr(memio, '__next__')) i = 0 for line in memio: self.asser...
16,382
[ 0.03395940735936165, 0.012638231739401817, -0.00867671612650156, -0.0005691564292646945, 0.008633114397525787, -0.026285529136657715, 0.016792841255664825, 0.03455737233161926, 0.02665925770998001, -0.027830271050333977, 0.05311919376254082, 0.0035722157917916775, -0.044324129819869995, 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 test_getvalue(self): buf = self.buftype("1234567890") memio = self.ioclass(buf) self.assertEqual(memio.getvalue(), buf) memio.read() self.assertEqual(memio.getvalue(), buf) self.assertEqual(type(memio.getvalue()), type(buf)) memio = self.ioclass(buf * 1000) ...
16,383
[ 0.01974172331392765, 0.002176580484956503, 0.0139621552079916, 0.0012407895410433412, 0.013395288959145546, 0.005064824130386114, 0.02533644437789917, 0.029501676559448242, 0.01918718032538891, -0.010209749452769756, 0.04022283852100372, -0.013259734027087688, -0.025780078023672104, -0.016...
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 test_tell(self): buf = self.buftype("1234567890") memio = self.ioclass(buf) self.assertEqual(memio.tell(), 0) memio.seek(5) self.assertEqual(memio.tell(), 5) memio.seek(10000) self.assertEqual(memio.tell(), 10000) memio.close() self.assertRais...
16,384
[ 0.04492168128490448, 0.027192655950784683, -0.01501465030014515, 0.0014580594142898917, 0.027388285845518112, 0.020736845210194588, 0.009359702467918396, 0.002257393905892968, 0.03646065667271614, -0.021177014335989952, 0.06294415146112442, -0.009170184843242168, -0.009188525378704071, 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 test_flags(self): memio = self.ioclass() self.assertEqual(memio.writable(), True) self.assertEqual(memio.readable(), True) self.assertEqual(memio.seekable(), True) self.assertEqual(memio.isatty(), False) self.assertEqual(memio.closed, False) memio.close() ...
16,385
[ 0.012408633716404438, 0.00892497505992651, 0.04143912345170975, -0.000006833706720499322, 0.011460202746093273, 0.01439668983221054, 0.03462987765669823, 0.01403190940618515, -0.005508193280547857, -0.020950589329004288, 0.049075204879045486, -0.009703174233436584, -0.017631081864237785, -...
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 test_relative_seek(self): buf = self.buftype("1234567890") memio = self.ioclass(buf) self.assertEqual(memio.seek(-1, 1), 0) self.assertEqual(memio.seek(3, 1), 3) self.assertEqual(memio.seek(-4, 1), 0) self.assertEqual(memio.seek(-1, 2), 9) self.assertEqual(me...
16,386
[ 0.0012945240596309304, 0.01356238778680563, 0.034881509840488434, -0.018249740824103355, 0.004157942719757557, 0.006537308916449547, 0.020522035658359528, 0.03897402063012123, 0.029599318280816078, -0.006022770889103413, 0.03205006569623947, -0.015739507973194122, -0.03485771641135216, 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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_subclassing(self): buf = self.buftype("1234567890") def test1(): class MemIO(self.ioclass): pass m = MemIO(buf) return m.getvalue() def test2(): class MemIO(self.ioclass): def __init__(me, a, b): ...
16,387
[ 0.008378421887755394, -0.008035555481910706, -0.032042477279901505, 0.01840260624885559, 0.020260320976376534, 0.016108514741063118, -0.009456894360482693, 0.030421651899814606, 0.02670622058212757, -0.011189932003617287, -0.004429217893630266, -0.04872451350092888, 0.04418620467185974, -0...
16
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def comments_factory(request): # XXX prefetching on these? type = request.matchdict['type'] identifier = request.matchdict['identifier'] try: sqla_column = commentables[type] entity = model.session.query(sqla_column.parententity).filter(sqla_column == identifier)...
16,388
[ 0.03822869807481766, -0.006070873700082302, -0.012509331107139587, -0.01621962897479534, 0.029176952317357063, 0.054586172103881836, 0.0023792425636202097, 0.02745390310883522, -0.039928775280714035, -0.03673538938164711, 0.014691858552396297, -0.026167361065745354, 0.016024349257349968, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "UnsupportedOperation", "value": {"_type": "Name", "_fields": {"id": "io", "ctx": {"_type": "Load", "_fields": ...
class CStringIOPickleTest(PyStringIOPickleTest): UnsupportedOperation = io.UnsupportedOperation class ioclass(io.StringIO): def __new__(cls, *args, **kwargs): return pickle.loads(pickle.dumps(io.StringIO(*args, **kwargs))) def __init__(self, *args, **kwargs): pass
16,389
[ 0.03648547828197479, 0.03957956284284592, -0.026980441063642502, 0.030396312475204468, 0.01331695169210434, 0.015123898163437843, -0.0018873931840062141, 0.010284746065735817, 0.008960477076470852, -0.010526084341108799, 0.019010072574019432, -0.05485197901725769, 0.047228146344423294, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "elements", "annotation": null, "type_comment": null}}, {"_type...
def comments_pregenerator(request, elements, kw): resource = None comment = kw.get('comment', None) if comment: kw['comment_id'] = comment.id if 'resource' not in kw: resource = comment.discussion.resource if not resource: resource =...
16,390
[ 0.03706945478916168, -0.0036077075637876987, 0.007954530417919159, 0.007696098648011684, 0.007112042512744665, -0.03628382086753845, 0.018390005454421043, -0.00928803812712431, -0.02489214949309826, 0.050818026065826416, -0.012146294116973877, -0.07690929621458054, 0.0544980950653553, -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}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, config, url_prefix, sqla_column, parent_router=None, rel=None): self.config = config self.url_prefix = url_prefix self.sqla_column = sqla_column self.sqla_table = sqla_column.parententity self.parent_router = parent_router self.sqla_rel = rel a...
16,391
[ -0.01365579105913639, -0.006033678539097309, -0.008392621763050556, 0.006928654387593269, 0.018432946875691414, -0.03613094985485077, -0.004596382845193148, -0.004178530070930719, -0.0132646095007658, 0.007995513267815113, 0.001074267434887588, -0.017413504421710968, 0.02467999793589115, -...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def factory(request): # This yields the "context", which should be the row object try: return contextualize( model.session.query(sqla_column.parententity) .filter(sqla_column == request.matchdict[match_key]) .one()) except NoResultFound...
16,392
[ -0.003503875806927681, 0.014399039559066296, -0.02509421668946743, -0.03916450962424278, 0.006909128278493881, -0.031515706330537796, -0.032041698694229126, -0.002843645866960287, 0.04777763411402702, 0.0021902648732066154, -0.012338902801275253, -0.028513167053461075, -0.030332224443554878,...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def resource_to_request(module): request = { u'name': module.params.get('name'), u'description': module.params.get('description'), u'initialNodeCount': module.params.get('initial_node_count'), u'nodeConfig': ClusterNodeConfig(module.params.get('node_config', {}), module).to_request()...
16,393
[ -0.02913801185786724, 0.015572572126984596, -0.0012039905413985252, -0.03384438902139664, 0.015076556243002415, -0.025216031819581985, -0.025954285636544228, 0.026415696367621422, 0.037397243082523346, 0.019356129691004753, -0.0025060304906219244, -0.04434145614504814, -0.023128153756260872,...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "response", "annotation": null, "type_comment": null}}], "kwarg"...
def response_to_hash(module, response): return { u'name': response.get(u'name'), u'description': response.get(u'description'), u'initialNodeCount': module.params.get('initial_node_count'), u'nodeConfig': ClusterNodeConfig(module.params.get('node_config', {}), module).to_request(), ...
16,394
[ 0.011921966448426247, 0.06205276772379875, -0.033998433500528336, 0.005355878733098507, -0.0013410805258899927, 0.02895495668053627, 0.030688650906085968, 0.007458265405148268, 0.04840836301445961, 0.015130428597331047, 0.03251240774989128, -0.009867426007986069, -0.030035700649023056, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "status", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "op_result", "annotation": null, "type_comment": null}}, {"_type...
def wait_for_completion(status, op_result, module): op_id = navigate_hash(op_result, ['name']) op_uri = async_op_url(module, {'op_id': op_id}) while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], 'message') time.sleep(1.0) if status not in ['PENDING', 'RUNNING', 'D...
16,395
[ -0.002599429339170456, 0.0007290905341506004, -0.016608435660600662, -0.05187228322029114, 0.06694548577070236, 0.016771262511610985, 0.004378904588520527, 0.0012132124975323677, -0.00944982748478651, 0.03326339274644852, -0.004969155415892601, -0.041870005428791046, -0.029750963672995567, ...
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": "request", "annotation"...
class ClusterNodeConfig(object): def __init__(self, request, module): self.module = module if request: self.request = request else: self.request = {} def to_request(self): return remove_nones_from_dict({ u'machineType': self.request.get('machi...
16,396
[ 0.02081989124417305, -0.006807714235037565, -0.023301148787140846, -0.03473760560154915, 0.033981893211603165, -0.0021773979533463717, -0.05874408408999443, 0.04980148375034332, 0.016713852062821388, 0.00855844933539629, 0.008142806589603424, -0.05587237700819969, 0.008445092476904392, 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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def to_request(self): return remove_nones_from_dict({ u'machineType': self.request.get('machine_type'), u'diskSizeGb': self.request.get('disk_size_gb'), u'oauthScopes': self.request.get('oauth_scopes'), u'serviceAccount': self.request.get('service_account'), ...
16,397
[ 0.024470167234539986, 0.02223847061395645, -0.02675793692469597, -0.025883201509714127, 0.03169234097003937, -0.007014706265181303, 0.003392403945326805, 0.008332417346537113, -0.005831570364534855, 0.003939113579690456, 0.0021083371248096228, -0.044880662113428116, -0.024649599567055702, ...
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": "request", "annotation"...
class ClusterMasterAuth(object): def __init__(self, request, module): self.module = module if request: self.request = request else: self.request = {} def to_request(self): return remove_nones_from_dict({ u'username': self.request.get('username...
16,398
[ 0.01695292443037033, -0.012124246917665005, -0.015085753984749317, -0.04179495573043823, 0.040360573679208755, 0.0008207515929825604, -0.04671637713909149, 0.04988190904259682, 0.02205982431769371, 0.01517231110483408, 0.016742713749408722, -0.06494293361902237, 0.01320621743798256, 0.0071...
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 from_response(self): return remove_nones_from_dict({ u'machineType': self.request.get(u'machineType'), u'diskSizeGb': self.request.get(u'diskSizeGb'), u'oauthScopes': self.request.get(u'oauthScopes'), u'serviceAccount': self.request.get(u'serviceAccount'), ...
16,399
[ 0.027947964146733284, -0.024168208241462708, -0.023434489965438843, -0.018431872129440308, 0.03630789741873741, -0.0044717853888869286, -0.03879809007048607, 0.053983818739652634, 0.022189393639564514, 0.023745764046907425, 0.008387724868953228, -0.04766939952969551, 0.022622954100370407, ...
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 from_response(self): return remove_nones_from_dict({ u'username': self.request.get(u'username'), u'password': self.request.get(u'password'), u'clusterCaCertificate': self.request.get(u'clusterCaCertificate'), u'clientCertificate': self.request.get(u'clientCert...
16,400
[ 0.034493982791900635, -0.026184068992733955, -0.03241090476512909, -0.015029520727694035, 0.02920789085328579, -0.01290164515376091, -0.04775400459766388, 0.05675828084349632, 0.01967724971473217, 0.01636224240064621, 0.002987425308674574, -0.036397870630025864, 0.016339844092726707, 0.012...
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 to_request(self): return remove_nones_from_dict({ u'username': self.request.get('username'), u'password': self.request.get('password'), u'clusterCaCertificate': self.request.get('cluster_ca_certificate'), u'clientCertificate': self.request.get('client_certific...