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
14,901
[ 0.028677964583039284, 0.042941611260175705, 0.0006466353661380708, -0.011501319706439972, 0.03457929566502571, 0.034905754029750824, 0.021772149950265884, 0.04954608157277107, 0.03786897659301758, -0.019926413893699646, 0.07588862627744675, 0.01872103475034237, 0.019675293937325478, 0.0069...
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": "type", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __exit__(self, type, value, traceback): self._assert_active(deactive_ok=True, prepared_ok=True) if self.session.transaction is None: return if type is None: try: self.commit() except: with util.safe_reraise(): ...
14,902
[ 0.049352675676345825, 0.007071742322295904, 0.03584050014615059, -0.014608657918870449, 0.007237875834107399, -0.0026899755466729403, 0.007188035640865564, -0.004308391362428665, 0.033603236079216, 0.01669086329638958, 0.06747228652238846, 0.028840746730566025, -0.008301129564642906, 0.016...
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": "invalidate", "annotation": null, "type_comment": null}}], "kwarg"...
def close(self, invalidate=False): self.session.transaction = self._parent if self._parent is None: for connection, transaction, autoclose in \ set(self._connections.values()): if invalidate: connection.invalidate() if a...
14,903
[ 0.01779256947338581, 0.024672919884324074, -0.003518718760460615, -0.035354744642972946, 0.0015721656382083893, -0.025280317291617393, 0.0031286226585507393, -0.00892770104110241, -0.01611698791384697, -0.03799378499388695, -0.02091333642601967, 0.01779256947338581, 0.0698717013001442, 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": "engine", "annotation": null, "type_comment": null}}, {"_type": "a...
def _connection_for_bind(self, engine, execution_options=None, **kw): if self.transaction is not None: return self.transaction._connection_for_bind( engine, execution_options) else: conn = engine.contextual_connect(**kw) if execution_options: ...
14,904
[ 0.02256285399198532, 0.05608845129609108, 0.01089321170002222, -0.002165605314075947, -0.033861663192510605, -0.032007500529289246, -0.003044884419068694, -0.01578356884419918, 0.028878599405288696, -0.05863792821764946, -0.026537718251347542, -0.02085934206843376, 0.03235515579581261, -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": "key", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def _add_bind(self, key, bind): try: insp = inspect(key) except sa_exc.NoInspectionAvailable: if not isinstance(key, type): raise sa_exc.ArgumentError( "Not an acceptable bind target: %s" % key) else: self.__binds[ke...
14,905
[ 0.007149113807827234, 0.009039179421961308, 0.021588481962680817, 0.028571907430887222, 0.07290254533290863, 0.00007320746226469055, 0.019047938287258148, -0.002353377640247345, 0.005421666894108057, 0.02082754671573639, 0.020275253802537918, -0.013721388764679432, -0.044870659708976746, 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 _autoflush(self): if self.autoflush and not self._flushing: try: self.flush() except sa_exc.StatementError as e: # note we are reraising StatementError as opposed to # raising FlushError with "chaining" to remain compatible ...
14,906
[ 0.023871976882219315, 0.04947326332330704, -0.009504931978881359, -0.005407222080975771, -0.0036873118951916695, 0.07533770054578781, 0.0026832479052245617, -0.024097539484500885, 0.00215223734267056, 0.054886750876903534, 0.05137800797820091, -0.006491172593086958, -0.007324499078094959, ...
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": "state", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _expire_state(self, state, attribute_names): self._validate_persistent(state) if attribute_names: state._expire_attributes(state.dict, attribute_names) else: # pre-fetch the full cascade since the expire is going to # remove associations cascad...
14,907
[ 0.0426434651017189, 0.032163504511117935, 0.04409069940447807, 0.030940840020775795, -0.004675435367971659, 0.03865109756588936, 0.027572281658649445, 0.022606775164604187, 0.018227647989988327, 0.01307500060647726, 0.04291794076561928, 0.020398497581481934, 0.013336999341845512, -0.030666...
14
{"_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": "states", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _register_newly_persistent(self, states): pending_to_persistent = self.dispatch.pending_to_persistent or None for state in states: mapper = _state_mapper(state) # prevent against last minute dereferences of the object obj = state.obj() if obj is not N...
14,908
[ 0.030730074271559715, 0.0322578102350235, -0.0029036414343863726, 0.02930251508951187, -0.023717505857348442, 0.011351593770086765, -0.0012381564592942595, 0.02106274850666523, 0.04836167395114899, 0.028926841914653778, 0.08495225012302399, -0.007958012633025646, 0.0025389252696186304, -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": "states", "annotation": null, "type_comment": null}}, {"_type": "a...
def _expunge_states(self, states, to_transient=False): for state in states: if state in self._new: self._new.pop(state) elif self.identity_map.contains_state(state): self.identity_map.safe_discard(state) self._deleted.pop(state, None) ...
14,909
[ 0.04826949164271355, 0.040955934673547745, -0.0023634186945855618, 0.04635118320584297, 0.004082405008375645, 0.04807766154408455, -0.007691226899623871, 0.032011810690164566, 0.05217805132269859, 0.04810164123773575, 0.054959602653980255, -0.013056501746177673, 0.013104460202157497, -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": "states", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _remove_newly_deleted(self, states): persistent_to_deleted = self.dispatch.persistent_to_deleted or None for state in states: if self._enable_transaction_accounting and self.transaction: self.transaction._deleted[state] = True if persistent_to_deleted is not ...
14,910
[ 0.043278470635414124, 0.015971021726727486, 0.001592100947163999, 0.015170804224908352, 0.0049985856749117374, 0.01581542380154133, 0.04930233582854271, 0.015682054683566093, 0.010614005848765373, 0.03772139921784401, 0.006574015133082867, -0.025562526658177376, 0.0026201591826975346, 0.02...
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": "state", "annotation": null, "type_comment": null}}], "kwarg": nul...
def _save_or_update_state(self, state): self._save_or_update_impl(state) mapper = _state_mapper(state) for o, m, st_, dct_ in mapper.cascade_iterator( 'save-update', state, halt_on=self._contains_state): self._save_or_update_impl(st_)
14,911
[ 0.05904857814311981, 0.027333995327353477, -0.022864002734422684, -0.013935196213424206, 0.02278577908873558, 0.00676086125895381, 0.035000029951334, -0.015041518956422806, -0.026819946244359016, 0.06137297675013542, 0.01353289745748043, -0.03251918405294418, 0.00017495824431534857, 0.0215...
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": "state", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _merge(self, state, state_dict, load=True, _recursive=None, _resolve_conflict_map=None): mapper = _state_mapper(state) if state in _recursive: return _recursive[state] new_instance = False key = state.key if key is None: if not load: ...
14,912
[ 0.0665791928768158, 0.06340660154819489, 0.009716075845062733, 0.01097378320991993, -0.009302505291998386, 0.019794734194874763, -0.005789987742900848, 0.027896184474229813, 0.012769699096679688, 0.010854811407625675, 0.029641112312674522, -0.06431305408477783, -0.0000016127437447721604, -...
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": "state", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _delete_impl(self, state, obj, head): if state.key is None: if head: raise sa_exc.InvalidRequestError( "Instance '%s' is not persisted" % state_str(state)) else: return to_attach = self._before_attach(s...
14,913
[ 0.06685598939657211, 0.039785031229257584, 0.00957721658051014, 0.01861872710287571, -0.007922482676804066, 0.027689998969435692, 0.009839116595685482, 0.01591639220714569, 0.01796397753059864, -0.009208175353705883, 0.013892618007957935, -0.016154484823346138, 0.03392798826098442, -0.0244...
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": "state", "annotation": null, "type_comment": null}}], "kwarg": nul...
def _save_impl(self, state): if state.key is not None: raise sa_exc.InvalidRequestError( "Object '%s' already has an identity - " "it can't be registered as pending" % state_str(state)) obj = state.obj() to_attach = self._before_attach(state, obj) ...
14,914
[ 0.05657845735549927, 0.05030214414000511, -0.003278458258137107, 0.011853988282382488, -0.010118839330971241, 0.04393420368432999, 0.021612055599689484, 0.004209024831652641, 0.0035819660406559706, 0.016503959894180298, 0.008509675040841103, -0.03142738714814186, 0.02328421175479889, -0.02...
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": "state", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _update_impl(self, state, revert_deletion=False): if state.key is None: raise sa_exc.InvalidRequestError( "Instance '%s' is not persisted" % state_str(state)) if state._deleted: if revert_deletion: if not state._attached: ...
14,915
[ 0.018393877893686295, 0.03676566109061241, 0.0073741222731769085, -0.0003607658145483583, 0.01078223716467619, 0.016913529485464096, -0.032059479504823685, 0.011820689775049686, 0.005468450020998716, -0.021895894780755043, 0.018471209332346916, -0.04639897122979164, 0.03736221790313721, 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": "state", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _before_attach(self, state, obj): if state.session_id == self.hash_key: return False if state.session_id and state.session_id in _sessions: raise sa_exc.InvalidRequestError( "Object '%s' is already attached to session '%s' " "(this is '%s')" %...
14,916
[ 0.019960280507802963, 0.037497054785490036, 0.008285929448902607, 0.022204270586371422, -0.01772751286625862, 0.013587352819740772, -0.005912910681217909, 0.02185645140707493, 0.026389310136437416, -0.016695277765393257, 0.033345676958560944, 0.02261940762400627, 0.030047012493014336, -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": "state", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _after_attach(self, state, obj): state.session_id = self.hash_key if state.modified and state._strong_obj is None: state._strong_obj = obj self.dispatch.after_attach(self, obj) if state.key: self.dispatch.detached_to_persistent(self, obj) else: ...
14,917
[ 0.039010800421237946, 0.033487554639577866, 0.037989694625139236, 0.00689825089648366, -0.03153817728161812, 0.00803538877516985, 0.04984842240810394, 0.01130176056176424, 0.023427365347743034, 0.011359777301549911, 0.01101747527718544, -0.005607367027550936, 0.0004677640681620687, 0.02251...
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": "mapper", "annotation": null, "type_comment": null}}, {"_type": "a...
def _bulk_save_mappings( self, mapper, mappings, isupdate, isstates, return_defaults, update_changed_only, render_nulls): mapper = _class_to_mapper(mapper) self._flushing = True transaction = self.begin( subtransactions=True) try: if isupd...
14,918
[ 0.015797235071659088, 0.019268319010734558, 0.000988910673186183, 0.005992054473608732, 0.014454406686127186, 0.02042112499475479, 0.007423560135066509, 0.019141636788845062, 0.01705138571560383, 0.025615083053708076, 0.043629251420497894, 0.012079120613634586, -0.024398935958743095, 0.005...
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": "objects", "annotation": null, "type_comment": null}}], "kwarg": n...
def _flush(self, objects=None): dirty = self._dirty_states if not dirty and not self._deleted and not self._new: self.identity_map._modified.clear() return flush_context = UOWTransaction(self) if self.dispatch.before_flush: self.dispatch.before_flus...
14,919
[ -0.019565310329198837, 0.0015711537562310696, 0.04234299808740616, 0.021225396543741226, -0.01744169183075428, -0.03154165297746658, 0.039259977638721466, -0.010353983379900455, 0.027639368548989296, 0.06204844266176224, 0.0042175911366939545, 0.018368754535913467, 0.0016493070870637894, -...
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__(self): Gtk.Box.__init__(self) self.set_spacing(4) self.set_border_width(2) self.__progress = Gtk.ProgressBar() self.__progress.set_size_request(100, -1) self.__progress.hide() self.__warnbtn = WarnButton() self.__status = Gtk.Statusbar() ...
14,920
[ 0.02176813594996929, 0.04402894154191017, 0.04200641065835953, -0.07882684469223022, 0.027433816343545914, -0.019577061757445335, 0.0217292420566082, -0.015998737886548042, 0.035627659410238266, 0.03669078275561333, 0.0029705921187996864, 0.03220491483807564, -0.013600223697721958, -0.0248...
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 Runner: def __init__(self): self.hard = False self.include_metrics = False self.list_file_types = False self.localize_output = False self.repo = "." self.responsibilities = False self.grading = False self.timeline = False self.useweeks = False def output(self): if not self.localize_output: ...
14,921
[ 0.03525011986494064, 0.014008996076881886, 0.05221180245280266, -0.029370764270424843, -0.024297868832945824, -0.006601267959922552, 0.03704514354467392, -0.014633351936936378, 0.007446750532835722, 0.026457101106643677, 0.018886780366301537, 0.0702400878071785, -0.06066662818193436, -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 output(self): if not self.localize_output: localization.disable() terminal.skip_escapes(not sys.stdout.isatty()) terminal.set_stdout_encoding() previous_directory = os.getcwd() os.chdir(self.repo) absolute_path = basedir.get_basedir_git() os.chdir(absolute_path) format.output_header() outputa...
14,922
[ 0.004469574429094791, 0.03832683712244034, 0.026962339878082275, -0.07428502291440964, -0.01539625134319067, -0.0040065529756248, -0.005030239932239056, 0.009827394969761372, -0.0027529303915798664, 0.04790224879980087, 0.023232968524098396, 0.009588009677827358, -0.018848439678549767, 0.0...
32
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def main(): terminal.check_terminal_encoding() terminal.set_stdin_encoding() argv = terminal.convert_command_line_to_utf8() __run__ = Runner() try: __opts__, __args__ = optval.gnu_getopt(argv[1:], "f:F:hHlLmrTwx:", ["exclude=", "file-types=", "format=", "hard:t...
14,923
[ 0.01411426067352295, -0.022716084495186806, 0.0656646266579628, -0.004076275043189526, -0.008889561519026756, -0.007879957556724548, 0.031216949224472046, -0.0221708994358778, -0.06073776260018349, 0.05795125663280487, 0.0018311688909307122, -0.01616375707089901, 0.008238366805016994, 0.02...
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": "label", "annotation": null, "type_comment": null}}, {"_type": "ar...
def __init__(self, label=None, validators=None, coerce=text_type, choices=None, allow_blank=False, blank_text=None, **kwargs): super(Select2MultipleField, self).__init__( label, validators, coerce, choices, **kwargs ) self.allow_blank = allow_blank self.blank...
14,924
[ 0.012512832880020142, -0.006460430100560188, 0.06246525049209595, 0.009032237343490124, 0.036054763942956924, -0.020166432484984398, -0.017693541944026947, 0.025619160383939743, -0.0012008980847895145, 0.011332026682794094, 0.000034799191780621186, -0.039665184915065765, 0.016209807246923447...
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 iter_choices(self): # moved the query here so it updates choices = db.session.query(Puppyscript.id, Puppyscript.name).all() if self.allow_blank: yield (u'__None', self.blank_text, self.data is []) for value, label in choices: yield (value, label, self.coerce(...
14,925
[ 0.0025599512737244368, 0.011331886984407902, 0.023473631590604782, -0.009466757997870445, 0.020086949691176414, -0.02359633892774582, -0.041106466203927994, 0.029645737260580063, 0.0335477851331234, 0.013620351441204548, 0.032001689076423645, 0.01971883326768875, 0.02196435071527958, -0.01...
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": "valuelist", "annotation": null, "type_comment": null}}], "kwarg":...
def process_formdata(self, valuelist): if valuelist: if valuelist[0] == '__None': self.data = [] else: try: self.data = [] for value in valuelist[0].split(','): self.data.append(self.coerce(va...
14,926
[ 0.050150856375694275, 0.015756074339151382, -0.03116484358906746, -0.0018190104747191072, 0.045358046889305115, 0.02704348973929882, -0.026765646412968636, -0.012653482146561146, -0.0004435375449247658, 0.0058578792959451675, 0.059180788695812225, 0.010702785104513168, 0.008752088062465191, ...
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": "value", "annotation": null, "type_comment": null}}], "kwarg": nul...
def process_data(self, value): if not value: self.data = [] else: try: self.data = [] for v in value: self.data.append(self.coerce(v[0])) except (ValueError, TypeError): self.data = []
14,927
[ 0.028791332617402077, 0.030984513461589813, -0.009665161371231079, -0.05202971771359444, 0.05202971771359444, 0.005503367632627487, -0.035370875149965286, -0.01699715293943882, -0.01263412181288004, 0.07167501747608185, 0.024008331820368767, -0.012564127333462238, -0.004441774450242519, -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": "value", "annotation": ...
class Tree(object): def __init__(self, value, left=None, right=None): self.value = value self.left = left self.right = right assert self._is_sorted() def height(self): return 1 + max(self.left.height() if self.left else 0, self.right.height() if self.rig...
14,928
[ 0.0651259645819664, 0.014524496160447598, 0.013564004562795162, -0.008896254003047943, -0.06297072023153305, 0.01698428951203823, 0.0364517979323864, -0.013774843886494637, -0.02501961588859558, -0.0012269684812054038, 0.011613739654421806, -0.06845254451036453, -0.007145114708691835, -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": "model", "annotation": null, "type_comment": null}}], "kwarg": nul...
def delete_screenshots(self, model): cascaded_captures = Capture.query.filter_by(payload=model.id).all() for capture in cascaded_captures: try: os.remove("uploads/{}.png".format(capture.screenshot)) os.remove("uploads/small_{}.png".format(capture.screenshot)) ...
14,929
[ 0.05429458990693092, 0.002775926608592272, -0.0035891325678676367, -0.014566034078598022, 0.050589676946401596, 0.03762248903512955, -0.04042322561144829, -0.028845379129052162, -0.013507488183677197, 0.029176173731684685, 0.02915412187576294, -0.02796325646340847, -0.015701765194535255, 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 _is_sorted(self): left_value_ok = (self.value > self.left.value if self.left is not None else True) if not left_value_ok: return False right_value_ok = (self.value < self.right.value if self.right is not None else True) if not right_value_ok: ...
14,930
[ 0.0830112025141716, 0.007601382676512003, 0.009857865050435066, -0.028057876974344254, 0.018553299829363823, -0.006985978223383427, -0.022393878549337387, -0.028057876974344254, -0.009282347746193409, 0.024547792971134186, 0.031864266842603683, -0.010091491043567657, -0.025277161970734596, ...
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": {"_type": "arg", "_fields": {"arg": "values", "annotation": null, "type_comm...
def add_mutable(self, *values): def add_to(attr, value): if getattr(self, attr) is None: setattr(self, attr, Tree(value)) else: getattr(self, attr).add_mutable(value) for value in values: if value <= self.value: add_to(...
14,931
[ 0.054586488753557205, 0.03153034672141075, -0.007414927706122398, -0.023349134251475334, 0.008705215528607368, 0.00810796394944191, 0.005172419361770153, 0.015224266797304153, -0.007043054327368736, 0.08284886181354523, 0.055352773517370224, -0.016283541917800903, -0.009139067493379116, -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": "parent", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _delete(self, parent): def replace_with(tree): self.value = tree.value self.left = tree.left self.right = tree.right if self.left is None and self.right is None: if parent.right == self: parent.right = None else: ...
14,932
[ 0.046925608068704605, 0.03156222775578499, 0.031979963183403015, -0.009021923877298832, 0.023045068606734276, -0.0038031323347240686, -0.020039694383740425, -0.01582752913236618, -0.02826675958931446, 0.04657749459147453, 0.014226210303604603, -0.024042991921305656, -0.0016839957097545266, ...
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": "value", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _find_with_parent(self, value, parent = None): if value < self.value: if self.left is None: raise Exception("Not found!") return self.left._find_with_parent(value, self) elif value > self.value: if self.right is None: raise Exceptio...
14,933
[ 0.05585485324263573, 0.013139801099896431, 0.013642708770930767, -0.025188185274600983, 0.03387671709060669, -0.008463829755783081, -0.008731333538889885, 0.005804838612675667, -0.03304210677742958, 0.06467179208993912, 0.014306118711829185, -0.020918820053339005, -0.005130728241056204, -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": "value", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _find_predecessor(self, value, parent=None): if self.left is None: return None, self def find_last_rightie(tree, parent): if tree.right is None: return tree, parent else: return find_last_rightie(tree.right, tree) return f...
14,934
[ 0.04479425027966499, 0.009635417722165585, -0.01486777700483799, 0.0056440276093780994, 0.011526703834533691, -0.007594976108521223, -0.0031441887840628624, 0.007809759583324194, 0.013280767016112804, 0.04572497680783272, 0.010184308513998985, 0.004444821272045374, -0.010607908479869366, -...
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": "value", "annotation": null, "type_comment": null}}], "kwarg": nul...
def add_immutable(self, value): if value == self.value: return self if value < self.value: return Tree(self.value, self.left.add_immutable(value) if self.left is not None else Tree(value), self.right) else: ...
14,935
[ 0.06321694701910019, 0.013839321210980415, -0.0002332959556952119, -0.011437756009399891, 0.036484379321336746, 0.0041754478588700294, -0.025737984105944633, 0.018763741478323936, -0.010576589033007622, 0.05530876666307449, 0.021674729883670807, 0.00142213876824826, -0.02712070196866989, -...
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": "value", "annotation": null, "type_comment": null}}], "kwarg": nul...
def del_immutable(self, value): if value < self.value: return Tree(self.value, self.left.del_immutable(value) if self.left is not None else None, self.right) elif value > self.value: return Tree(self.value, self.left, ...
14,936
[ 0.02835904061794281, 0.0190909281373024, 0.028520828112959862, -0.0452311672270298, 0.01775040291249752, 0.00927967019379139, -0.03506166860461235, -0.004111136309802532, -0.005038525443524122, 0.07913721352815628, 0.004160250537097454, -0.021355953067541122, -0.017796628177165985, -0.0101...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "l", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},...
def _as_balanced(l): size = len(l) if size == 1: return Tree(l[0]) elif size == 2: return Tree(l[0], None, Tree(l[1])) else: middle = size // 2 return Tree(l[middle], Tree._as_balanced(l[0:middle]), ...
14,937
[ 0.01760740764439106, 0.03928666561841965, 0.008882008492946625, -0.016533512622117996, -0.05418696254491806, -0.010151665657758713, 0.017428424209356308, -0.015258261002600193, -0.039599888026714325, -0.004166937433183193, 0.02001248486340046, -0.047877829521894455, 0.002528128447011113, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "ABCMeta", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "__metaclass__", "ctx": {"_type": "Store", "_fields": {}}...
class BuildStepBase(object): __metaclass__ = ABCMeta def _get_userscript_header(self, path): with open(path, 'r') as f: content = f.read() header = re.search('// ==UserScript==(.*)// ==/UserScript==', content, flags=re.IGNORECASE | re.DOTALL) if header is not ...
14,938
[ 0.017243456095457077, -0.01812450960278511, -0.02558485046029091, 0.0014410072471946478, 0.04759972169995308, -0.0539158396422863, -0.007923752069473267, 0.04174129292368889, 0.06654807180166245, 0.030184632167220116, 0.00004545609044726007, -0.07501532882452011, -0.02117958851158619, -0.0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "req", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}], "kwarg": null,...
def proxy(req, path): # call the router via app.py status, content_type, body = request( path, req.GET, req.POST, req.encoding) # set some sensible defaults, in case the request failed if status is None: status = 500 if content_type is None: content_type = "text/plain" if body ...
14,939
[ 0.0026697830762714148, -0.009198562242090702, 0.0160781592130661, -0.06179150566458702, -0.02219071425497532, -0.004287112969905138, -0.008526656776666641, 0.013604596257209778, 0.014330016449093819, 0.0466885007917881, 0.008954773657023907, -0.056701675057411194, 0.00803907960653305, 0.03...
10
{"_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 get_candidate(module): candidate = '' if module.params['src']: if module.params['replace'] != 'config': candidate = module.params['src'] if module.params['replace'] == 'config': candidate = 'config replace {0}'.format(module.params['replace_src']) elif module.params['line...
14,940
[ 0.05165189132094383, 0.0737706646323204, 0.04701274633407593, -0.0786169096827507, -0.008051191456615925, 0.010220612399280071, 0.03744451329112053, 0.02284363843500614, 0.03187340125441551, 0.02785556949675083, -0.013016524724662304, -0.023319978266954422, 0.042787812650203705, -0.0022496...
9
{"_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": "config", "annotation": null, "type_comment": null}}, {"_type": ...
def get_running_config(module, config=None, flags=None): contents = module.params['running_config'] if not contents: if config: contents = config else: contents = get_config(module, flags=flags) return contents
14,941
[ 0.02305581420660019, 0.03983940929174423, 0.02731659822165966, -0.041677817702293396, -0.04349460080265999, 0.0019424955826252699, -0.0020384714007377625, 0.0256944727152586, 0.022233936935663223, 0.0330481082201004, 0.00997607409954071, 0.02331535518169403, 0.005590926855802536, -0.031058...
8
{"_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": "commands", "annotation": null, "type_comment": null}}, {"_type"...
def execute_show_commands(module, commands, output='text'): cmds = [] for command in to_list(commands): cmd = {'command': command, 'output': output, } cmds.append(cmd) body = run_commands(module, cmds) return body
14,942
[ 0.06495817750692368, 0.03337477147579193, -0.03147678077220917, -0.05728091672062874, -0.002672380767762661, 0.06721870601177216, -0.0014608126366510987, -0.015546458773314953, 0.03633904829621315, 0.01927846297621727, 0.01862802729010582, -0.011995724402368069, 0.02076060138642788, 0.0303...
8
{"_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": "result", "annotation": null, "type_comment": null}}], "kwarg": ...
def save_config(module, result): result['changed'] = True if not module.check_mode: cmd = {'command': 'copy running-config startup-config', 'output': 'text'} run_commands(module, [cmd]) else: module.warn('Skipping command `copy running-config startup-config` ' 'du...
14,943
[ 0.020181236788630486, -0.0315900519490242, 0.016389964148402214, -0.059727128595113754, -0.03938257694244385, 0.029396947473287582, 0.03737611696124077, 0.011286327615380287, 0.025967303663492203, -0.004088742192834616, 0.06014708802103996, 0.01035892404615879, -0.016646604984998703, 0.000...
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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class CheckpointConvertTest(test.TestCase): def setUp(self): self._old_ckpt_path = tempfile.mktemp() self._new_ckpt_path = tempfile.mktemp() ops.reset_default_graph() def tearDown(self): for file_name in glob.glob(self._old_ckpt_path + "*"): os.remove(file_name) for file_name in glob.glo...
14,944
[ 0.03769311681389809, -0.025271253660321236, -0.006697832141071558, -0.047549858689308167, -0.020770404487848282, 0.015462016686797142, 0.03809688985347748, 0.003544863313436508, -0.008591988123953342, -0.006365315522998571, 0.012528746388852596, 0.015711404383182526, -0.004824458155781031, ...
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 testReplacementDictsContainUniqueAndNonEmptyVariableNames(self): for old_name in checkpoint_convert.RNN_NAME_REPLACEMENTS: new_name = checkpoint_convert.RNN_NAME_REPLACEMENTS[old_name] self.assertTrue(old_name) self.assertTrue(new_name) self.assertNotEqual(old_name, new_name) for old...
14,945
[ 0.02032667212188244, -0.021788066253066063, 0.01626858487725258, -0.04891445115208626, -0.026425881311297417, 0.027537023648619652, 0.021232495084404945, 0.007470021955668926, 0.07787663489580154, -0.023321926593780518, 0.0701952576637268, -0.008925377391278744, -0.018007764592766762, -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 testConversionFromV2WithoutConvertedVariableNamesSucceeds(self): variables.Variable(10.0, name="a") with session.Session() as sess: saver = saver_lib.Saver() sess.run(variables.global_variables_initializer()) saver.save(sess, self._old_ckpt_path) new_var_map, conversion_map = checkpoi...
14,946
[ 0.022339753806591034, -0.028547119349241257, 0.003027639351785183, -0.058355990797281265, -0.04506254196166992, 0.02724030613899231, 0.03783000260591507, 0.012887886725366116, 0.05858130380511284, -0.010527735576033592, 0.05047004669904709, 0.003402221715077758, -0.028231682255864143, 0.00...
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 testConversionFromV2WithConvertedVariableNamesSucceeds(self): variables.Variable(10.0, name="a") for old_name in checkpoint_convert.RNN_NAME_REPLACEMENTS: variables.Variable(20.0, name=old_name) with session.Session() as sess: saver = saver_lib.Saver() sess.run(variables.global_variabl...
14,947
[ 0.008153724484145641, -0.027091406285762787, 0.026397982612252235, -0.05341765657067299, -0.04160551354289055, 0.003646460361778736, 0.037134118378162384, 0.03457561880350113, 0.05800860747694969, -0.016881318762898445, 0.049352750182151794, 0.004175495821982622, -0.05160040408372879, -0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testConversionToV1Succeeds(self): variables.Variable(10.0, name="a") variables.Variable( 20.0, name=list(checkpoint_convert.RNN_NAME_REPLACEMENTS.keys())[-1]) with session.Session() as sess: saver = saver_lib.Saver() sess.run(variables.global_variables_initializer()) saver.sav...
14,948
[ 0.012829111889004707, -0.02140536904335022, 0.000669547647703439, 0.011922105215489864, -0.01462297048419714, 0.002044545253738761, 0.04688218981027603, 0.010082895867526531, 0.0013819261221215129, 0.021042564883828163, 0.01612457074224949, -0.014804371632635593, 0.010329803451895714, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "directory", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs...
def change_cwd(directory): current_dir = os.path.abspath(os.path.dirname(__file__)) new_dir = os.path.join(current_dir, directory) old_cwd = os.getcwd() os.chdir(new_dir) try: yield finally: os.chdir(old_cwd)
14,949
[ 0.02568870782852173, -0.0000773169012973085, 0.06525206565856934, -0.01957562007009983, 0.019678650423884392, -0.015111004933714867, -0.03411423787474632, 0.00826526153832674, 0.02825300022959709, 0.033931076526641846, -0.005981439258903265, -0.009455826133489609, -0.016999879851937294, -0...
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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class WebdesignTest(unittest.TestCase): def test_words(self): self.assertEqual(words(7), 'lorem ipsum dolor sit amet consectetur adipisicing') def test_paragraphs(self): self.assertEqual( paragraphs(1), [ 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' ...
14,950
[ 0.0312720462679863, -0.05257672071456909, 0.03762565925717354, -0.07279490679502487, -0.0231233648955822, 0.002330936724320054, -0.007723534479737282, -0.010770433582365513, -0.013522090390324593, -0.0013662329874932766, -0.011921877972781658, 0.0008370114956051111, 0.010888529941439629, -...
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_testcase_ordering(self): with change_cwd(".."): suite = DiscoverRunner().build_suite(["test_discovery_sample/"]) self.assertEqual( suite._tests[0].__class__.__name__, 'TestDjangoTestCase', msg="TestDjangoTestCase should be the firs...
14,951
[ 0.03929891809821129, 0.011640520766377449, -0.007365845143795013, 0.0025993920862674713, -0.013650861568748951, -0.0254859309643507, -0.020330380648374557, 0.01958460919559002, 0.046518851071596146, 0.08253204822540283, 0.00493938522413373, -0.016601523384451866, 0.02604796178638935, -0.00...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "argument_spec", "annotation": null, "type_comment": null}}], "kwa...
def __init__(self, argument_spec): self.spec = argument_spec self.module = None self.netconf = None self.init_module() # module input info self.as_number = self.module.params['as_number'] self.bgp_instance = self.module.params['bgp_instance'] self.peer_ad...
14,952
[ -0.03041522391140461, 0.019881118088960648, 0.012384258210659027, -0.007919294759631157, -0.02148529700934887, -0.006411366630345583, -0.05317316949367523, -0.005940807517617941, 0.019998759031295776, 0.1030096486210823, -0.02220183052122593, -0.021945161744952202, 0.06681938469409943, -0....
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cmd", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "bot", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def command_listcommands(cmd, bot, args, msg, event): if len(args) == 0: return "Commands:%s%s" % (os.linesep, ', '.join([command.name for command in bot.modules.list_commands()])) elif len(args) == 1: module = bot.modules.find_module_by_name(args[0]) if module is None: retur...
14,953
[ 0.003870646469295025, -0.01985032856464386, -0.05697055533528328, 0.018621550872921944, -0.01113718468695879, -0.0025036323349922895, -0.05134052410721779, 0.009316361509263515, -0.00974084809422493, 0.061528198421001434, 0.011818597093224525, -0.009489507414400578, 0.03185882791876793, 0....
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cmd", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "bot", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def command_read(cmd, bot, args, msg, event): if len(args) == 0: return "No message id/link supplied." else: message = [] for msg_id in args: if msg_id.isdigit(): m_id = int(msg_id) elif msg_id.split("#")[-1].isdigit(): m_id = int(msg...
14,954
[ 0.02662714570760727, 0.04768972471356392, 0.06033646687865257, -0.02337348274886608, 0.008467569947242737, 0.0063866060227155685, 0.025040553882718086, -0.0030323443934321404, -0.03584777191281319, 0.014060880057513714, -0.022913601249456406, 0.037411369383335114, 0.017820412293076515, -0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}, "targets": [{"_type": "Name", "_fields": {"id": "initial", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"...
class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='StoredFile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ...
14,955
[ -0.016995148733258247, -0.005163999740034342, -0.020563319325447083, -0.05069582164287567, -0.009870393201708794, 0.06028817594051361, -0.0008703207713551819, -0.02423575334250927, -0.008306422270834446, 0.05190065875649452, -0.01676344871520996, -0.020632829517126083, 0.07497791945934296, ...
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": "pattern_fn", "annotati...
class RegexReplaceTest(test.TestCase, parameterized.TestCase): @parameterized.parameters( (as_string, as_tensor), (as_tensor, as_string), (as_tensor, as_tensor)) @test_util.run_deprecated_v1 def testRegexReplaceDelegation(self, pattern_fn, rewrite_fn): with self.cached_session(): inpu...
14,956
[ 0.0003024877514690161, 0.011513694189488888, -0.03256671130657196, -0.043768662959337234, 0.011004514060914516, -0.03668171539902687, -0.018403206020593643, 0.0076740640215575695, 0.003299275878816843, 0.03948739916086197, 0.014537597075104713, 0.004559235647320747, 0.005200905725359917, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "node", "annotation": n...
class ConvertConstant(NodeTransformer): # Note: update PRIMITIVE_TYPES, ITERABLE_TYPES # and _is_constant() of tools when new types are supported def convert(self, node, value): new_node = ast.Constant(value=value) copy_lineno(node, new_node) return new_node def visit_NameConst...
14,957
[ 0.038444582372903824, -0.014298645779490471, 0.07410264015197754, -0.06843513995409012, -0.051385387778282166, -0.008076196536421776, 0.013271410018205643, -0.04652078077197075, 0.006806910969316959, 0.05502203851938248, 0.01846662349998951, -0.029659949243068695, 0.004790813662111759, -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(): previous_generated_files = set() current_path = os.path.dirname(os.path.realpath(__file__)) for root, _, filenames in os.walk(current_path): for filename in fnmatch.filter(filenames, 'gen-*.html'): previous_generated_files.add(os.path.join(root, filename)) generated_file...
14,958
[ 0.03487841412425041, 0.025333626195788383, 0.02371479757130146, -0.008246568962931633, 0.01609368622303009, 0.010785187594592571, -0.01189944613724947, -0.0036134582478553057, -0.010690580122172832, 0.006364942528307438, 0.0007778789731673896, -0.04200546443462372, 0.007374082691967487, -0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Create a new HBAC rule."}}], "func": {"_type": "Name", "_fields": {"id": "_", "ctx": {"_type": "Lo...
class hbacrule_add(LDAPCreate): __doc__ = _('Create a new HBAC rule.') msg_summary = _('Added HBAC rule "%(value)s"') def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): assert isinstance(dn, DN) # HBAC rules are enabled by default entry_attrs['ipaenabledfl...
14,959
[ 0.033222876489162445, 0.039862774312496185, 0.03378399461507797, 0.02246810868382454, 0.05494282767176628, 0.0024724272079765797, -0.015886660665273666, 0.019475478678941727, -0.04900432750582695, 0.033830754458904266, 0.006943838205188513, -0.0701865404844284, 0.0270038153976202, 0.014203...
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": "ldap", "annotation": null, "type_comment": null}}, {"_type": "arg...
def pre_callback(self, ldap, dn, *keys, **options): assert isinstance(dn, DN) kw = dict(seealso=keys[0]) _entries = api.Command.selinuxusermap_find(None, **kw) if _entries['count']: raise errors.DependentEntry(key=keys[0], label=self.api.Object['selinuxusermap'].label_singula...
14,960
[ 0.06366363912820816, 0.0371071919798851, 0.02502995729446411, -0.003330780193209648, 0.0012325569987297058, 0.04119279980659485, -0.04004793241620064, 0.03378482908010483, 0.004526156932115555, 0.018991339951753616, 0.028307421132922173, -0.0815325602889061, 0.008406923152506351, -0.003616...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Delete an HBAC rule."}}], "func": {"_type": "Name", "_fields": {"id": "_", "ctx": {"_type": "Load"...
class hbacrule_del(LDAPDelete): __doc__ = _('Delete an HBAC rule.') msg_summary = _('Deleted HBAC rule "%(value)s"') def pre_callback(self, ldap, dn, *keys, **options): assert isinstance(dn, DN) kw = dict(seealso=keys[0]) _entries = api.Command.selinuxusermap_find(None, **kw) ...
14,961
[ 0.03145871311426163, 0.020667506381869316, 0.014931744895875454, -0.00482671894133091, 0.06080610305070877, 0.017125176265835762, -0.012972907163202763, 0.0028590832371264696, -0.03995092213153839, 0.02514820359647274, 0.03882488235831261, -0.05118785426020622, 0.03539985045790672, 0.01469...
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": "ldap", "annotation": null, "type_comment": null}}, {"_type": "arg...
def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): assert isinstance(dn, DN) try: (dn, entry_attrs) = ldap.get_entry(dn, attrs_list) except errors.NotFound: self.obj.handle_not_found(*keys) if is_all(options, 'usercategory') and 'memberu...
14,962
[ 0.047020453959703445, 0.02581331692636013, 0.04068403318524361, -0.004647098481655121, 0.0015373420901596546, 0.037433985620737076, -0.009270815178751945, -0.008505066856741905, -0.003913499880582094, 0.01775834709405899, 0.027847519144415855, -0.060932524502277374, 0.01340936403721571, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Modify an HBAC rule."}}], "func": {"_type": "Name", "_fields": {"id": "_", "ctx": {"_type": "Load"...
class hbacrule_mod(LDAPUpdate): __doc__ = _('Modify an HBAC rule.') msg_summary = _('Modified HBAC rule "%(value)s"') def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): assert isinstance(dn, DN) try: (dn, entry_attrs) = ldap.get_entry(dn, attrs_list) ...
14,963
[ -0.006252365652471781, 0.061884086579084396, 0.03085382655262947, -0.014577826485037804, 0.03660997375845909, 0.028494026511907578, -0.018569637089967728, 0.0102166086435318, -0.009108385071158409, 0.027038449421525, 0.03131696581840515, -0.017963146790862083, 0.009891308844089508, 0.03444...
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": "cn", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def execute(self, cn): ldap = self.obj.backend dn = self.obj.get_dn(cn) entry_attrs = {'ipaenabledflag': 'TRUE'} try: ldap.update_entry(dn, entry_attrs) except errors.EmptyModlist: pass except errors.NotFound: self.obj.handle_not_foun...
14,964
[ 0.042770229279994965, 0.046046532690525055, 0.029286129400134087, 0.018822021782398224, 0.01181251835078001, 0.035147812217473984, -0.020961647853255272, 0.009299571625888348, 0.013550964184105396, -0.012258273549377918, 0.021674856543540955, -0.006886920891702175, 0.0037136997561901808, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Enable an HBAC rule."}}], "func": {"_type": "Name", "_fields": {"id": "_", "ctx": {"_type": "Load"...
class hbacrule_enable(LDAPQuery): __doc__ = _('Enable an HBAC rule.') msg_summary = _('Enabled HBAC rule "%(value)s"') has_output = output.standard_value def execute(self, cn): ldap = self.obj.backend dn = self.obj.get_dn(cn) entry_attrs = {'ipaenabledflag': 'TRUE'} t...
14,965
[ 0.04846486076712608, 0.04599545896053314, 0.0394873209297657, 0.011268080212175846, -0.003548320150002837, 0.04809560254216194, -0.024255508556962013, 0.004266638774424791, 0.013858642429113388, -0.01891283504664898, -0.00010619718523230404, -0.0349639356136322, 0.020597565919160843, 0.018...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Disable an HBAC rule."}}], "func": {"_type": "Name", "_fields": {"id": "_", "ctx": {"_type": "Load...
class hbacrule_disable(LDAPQuery): __doc__ = _('Disable an HBAC rule.') msg_summary = _('Disabled HBAC rule "%(value)s"') has_output = output.standard_value def execute(self, cn): ldap = self.obj.backend dn = self.obj.get_dn(cn) entry_attrs = {'ipaenabledflag': 'FALSE'} ...
14,966
[ -0.006956963334232569, 0.061488423496484756, 0.03058837726712227, -0.015182876959443092, 0.03450653702020645, 0.028829656541347504, -0.019679857417941093, 0.00798659399151802, -0.008454102091491222, 0.029141327366232872, 0.029675623401999474, -0.01937931776046753, 0.010891822166740894, 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": "cn", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def execute(self, cn): ldap = self.obj.backend dn = self.obj.get_dn(cn) entry_attrs = {'ipaenabledflag': 'FALSE'} try: ldap.update_entry(dn, entry_attrs) except errors.EmptyModlist: pass except errors.NotFound: self.obj.handle_not_fou...
14,967
[ -0.008533810265362263, 0.04909490793943405, 0.03846447914838791, -0.026836736127734184, 0.04068576171994209, 0.0337272509932518, -0.017781604081392288, -0.010891091078519821, -0.027788715437054634, 0.023187484592199326, 0.0267914030700922, -0.04102575406432152, 0.025318102911114693, 0.0253...
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": "cn", "annotation": null, "type_comment": null}}], "kwarg": {"_typ...
def execute(self, cn, **options): ldap = self.obj.backend dn = self.obj.get_dn(cn) (dn, entry_attrs) = ldap.get_entry(dn, ['accesstime']) try: entry_attrs.setdefault('accesstime', []).remove( options['accesstime'] ) ldap.update_entry(...
14,968
[ -0.008381873369216919, 0.04580357298254967, 0.03558481112122536, -0.02525300718843937, 0.03743865713477135, 0.03547177091240883, -0.013858633115887642, -0.011914355680346489, -0.03081454709172249, 0.024009574204683304, 0.02880244515836239, -0.04218631237745285, 0.0269485991448164, 0.028938...
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": "cn", "annotation": null, "type_comment": null}}], "kwarg": {"_typ...
def execute(self, cn, **options): ldap = self.obj.backend dn = self.obj.get_dn(cn) (dn, entry_attrs) = ldap.get_entry(dn, ['accesstime']) entry_attrs.setdefault('accesstime', []).append( options['accesstime'] ) try: ldap.update_entry(dn, entry_at...
14,969
[ 0.021992022171616554, 0.017900237813591957, 0.014559142291545868, 0.006333279423415661, 0.012804009020328522, 0.01642000488936901, -0.025608018040657043, 0.02266870066523552, -0.01174670085310936, 0.0011861682869493961, 0.00685136066749692, -0.07257367670536041, 0.013089482672512531, -0.00...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Add users and groups to an HBAC rule."}}], "func": {"_type": "Name", "_fields": {"id": "_", "ctx":...
class hbacrule_add_user(LDAPAddMember): __doc__ = _('Add users and groups to an HBAC rule.') member_attributes = ['memberuser'] member_count_out = ('%i object added.', '%i objects added.') def pre_callback(self, ldap, dn, found, not_found, *keys, **options): assert isinstance(dn, DN) t...
14,970
[ 0.034210968762636185, 0.026568805798888206, 0.0024356599897146225, -0.00013704078446608037, 0.06359530985355377, 0.012960392981767654, -0.008379564620554447, 0.018289795145392418, -0.05161811411380768, 0.026233622804284096, 0.013530203141272068, -0.04238942265510559, 0.02569733001291752, 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": "ldap", "annotation": null, "type_comment": null}}, {"_type": "arg...
def pre_callback(self, ldap, dn, found, not_found, *keys, **options): assert isinstance(dn, DN) try: (dn, entry_attrs) = ldap.get_entry(dn, self.obj.default_attributes) except errors.NotFound: self.obj.handle_not_found(*keys) if 'usercategory' in entry_attrs and \...
14,971
[ 0.028490865603089333, 0.010039637796580791, 0.040075063705444336, -0.01465244498103857, 0.004221448674798012, 0.009001234546303749, -0.039428018033504486, 0.00543204927816987, -0.050511278212070465, -0.00974220596253872, 0.00162935396656394, -0.049384165555238724, -0.0016750124050304294, -...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Add target hosts and hostgroups to an HBAC rule."}}], "func": {"_type": "Name", "_fields": {"id": ...
class hbacrule_add_host(LDAPAddMember): __doc__ = _('Add target hosts and hostgroups to an HBAC rule.') member_attributes = ['memberhost'] member_count_out = ('%i object added.', '%i objects added.') def pre_callback(self, ldap, dn, found, not_found, *keys, **options): assert isinstance(dn, DN...
14,972
[ 0.043158434331417084, 0.02459760569036007, 0.01642092876136303, -0.01904512383043766, 0.060547951608896255, 0.007489655166864395, -0.022626642137765884, -0.005631319712847471, -0.07699140161275864, 0.036153074353933334, 0.022491490468382835, -0.037369437515735626, 0.01911269873380661, 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}}, {"_type": "arg", "_fields": {"arg": "ldap", "annotation": null, "type_comment": null}}, {"_type": "arg...
def pre_callback(self, ldap, dn, found, not_found, *keys, **options): assert isinstance(dn, DN) try: (dn, entry_attrs) = ldap.get_entry(dn, self.obj.default_attributes) except errors.NotFound: self.obj.handle_not_found(*keys) if 'hostcategory' in entry_attrs and \...
14,973
[ 0.023315897211432457, 0.004283077083528042, 0.03832051903009415, -0.01774180307984352, -0.020190857350826263, 0.026839878410100937, -0.04237642139196396, 0.004670936614274979, -0.0014267689548432827, 0.015791423618793488, 0.022761812433600426, -0.07132182270288467, 0.030718473717570305, -0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Add services to an HBAC rule."}}], "func": {"_type": "Name", "_fields": {"id": "_", "ctx": {"_type...
class hbacrule_add_service(LDAPAddMember): __doc__ = _('Add services to an HBAC rule.') member_attributes = ['memberservice'] member_count_out = ('%i object added.', '%i objects added.') def pre_callback(self, ldap, dn, found, not_found, *keys, **options): assert isinstance(dn, DN) try...
14,974
[ 0.027474235743284225, 0.02034282125532627, 0.01903996616601944, -0.019817108288407326, 0.05430847406387329, 0.02187424711883068, -0.023371387273073196, 0.011748550459742546, -0.05270847678184509, 0.048365626484155655, 0.021417103707790375, -0.05462847277522087, 0.03487993776798248, 0.00670...
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": "ldap", "annotation": null, "type_comment": null}}, {"_type": "arg...
def pre_callback(self, ldap, dn, found, not_found, *keys, **options): assert isinstance(dn, DN) try: (dn, entry_attrs) = ldap.get_entry(dn, self.obj.default_attributes) except errors.NotFound: self.obj.handle_not_found(*keys) if 'servicecategory' in entry_attrs an...
14,975
[ -0.04957454279065132, -0.020111992955207825, 0.07331056892871857, -0.010173570364713669, -0.05117907375097275, -0.047859352082014084, -0.010934339836239815, -0.008313141763210297, -0.009053163230419159, 0.05059812217950821, 0.0054222154431045055, 0.004550788085907698, -0.01990451104938984, ...
6
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def _0(): gw(1,0,101) gw(2,0,1) gw(4,0,101) gw(3,0,2) gw(0,2,32) gw(1,2,32) return 1
14,976
[ -0.01538584753870964, -0.01655295118689537, 0.0451754666864872, -0.010788596235215664, -0.04944535717368126, -0.016168661415576935, 0.020353155210614204, -0.02295779064297676, 0.044236090034246445, 0.023256683722138405, -0.004373081959784031, 0.0009553885320201516, -0.015542409382760525, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Global", "_fields": {"names": ["t0"]}}, {"_type": "Expr", "_fi...
def _4(): global t0 sa(gr(3,0)+1) sa(gr(3,0)+1) gw(3,0,gr(3,0)+1) sa(tm(sp(),gr(1,0))) v0=sp() v1=sp() sa(v0) sa(v1) sa(td(sp(),gr(1,0))) sa(sp()+2) v0=sp() t0=gr(sp(),v0) t0=t0-32 return 5
14,977
[ 0.013502644374966621, -0.008778087794780731, 0.08726049214601517, -0.02051415853202343, -0.07016992568969727, 0.005936507135629654, -0.00006456678966060281, -0.014187362045049667, 0.04401369020342827, 0.028812944889068604, 0.006939619779586792, -0.021198878064751625, -0.012331776320934296, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def _11(): sa(sp()-1) sa(sr()); sa(0) v0=sp() v1=sp() sa(v0) sa(v1) sa(tm(sr(),gr(1,0))) v0=sp() v1=sp() sa(v0) sa(v1) sa(td(sp(),gr(1,0))) sa(sp()+4) v0=sp() v1=sp() gw(v1,v0,sp()) sa(sr()); return 12
14,978
[ -0.030507927760481834, -0.013937024399638176, 0.06636812537908554, -0.022240081802010536, -0.05388889089226723, -0.016620201990008354, 0.021930214017629623, -0.0040353285148739815, -0.007500217761844397, 0.029324796050786972, 0.008894624188542366, 0.0046268948353827, -0.019676627591252327, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Global", "_fields": {"names": ["t0"]}}, {"_type": "Global", "_...
def _15(): global t0 global t1 global t2 t0=gr(3,1)-gr(5,0) t1=gr(gr(3,1),2) gw(4,1,gr(gr(3,1),2)) t1=(1)if(t1>gr(1,1))else(0) t1=(0)if(t1!=0)else(1) t2=t0*t1 return (16)if((t2)!=0)else(23)
14,979
[ -0.015463762916624546, -0.007178102154284716, 0.060172684490680695, -0.016403084620833397, -0.048452187329530716, -0.0016893775900825858, 0.012589718215167522, -0.01759476214647293, 0.032806169241666794, 0.021646464243531227, -0.0044582742266356945, -0.008972627110779285, 0.00482278736308217...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Global", "_fields": {"names": ["t0"]}}, {"_type": "Expr", "_fi...
def _19(): global t0 sa(sr()+4) sa(gr(5,1)) v0=sp() v1=sp() sa(v0) sa(v1) v0=sp() t0=gr(sp(),v0) t0=t0+gr(6,1) gw(6,1,t0) sa(sp()-1) sa((1)if(sr()<0)else(0)) return 18
14,980
[ 0.011761756613850594, -0.012410097755491734, 0.04772355407476425, -0.021099280565977097, -0.05305122956633568, 0.010232516564428806, 0.018336782231926918, -0.027540409937500954, 0.025299403816461563, 0.022156357765197754, 0.002188151702284813, -0.01818174496293068, -0.009302287362515926, 0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def _26(): sa(sr()); sa(tm(sr(),gr(1,0))) v0=sp() v1=sp() sa(v0) sa(v1) sa(td(sp(),gr(1,0))) sa(sp()+2) v0=sp() sa(gr(sp(),v0)) sa(sp()-88) return 8
14,981
[ 0.0026662948075681925, 0.000707012542989105, 0.062284648418426514, -0.029720300808548927, -0.06251217424869537, 0.011838349513709545, 0.027985431253910065, -0.02320742979645729, 0.03958914801478386, 0.04220566898584366, 0.010338113643229008, -0.020206959918141365, -0.0019997211638838053, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def _28(): sa(sr()); sa(32) v0=sp() v1=sp() sa(v0) sa(v1) sa(tm(sr(),gr(1,0))) v0=sp() v1=sp() sa(v0) sa(v1) sa(td(sp(),gr(1,0))) sa(sp()+2) v0=sp() v1=sp() gw(v1,v0,sp()) sa(sp()+gr(3,0)) sa((1)if(sr()<gr(4,0))else(0)) return 2
14,982
[ -0.0032887435518205166, -0.010518442839384079, 0.06914492696523666, -0.024386180564761162, -0.04758211597800255, -0.004688319284468889, 0.019569840282201767, -0.023597296327352524, 0.035541266202926636, 0.03302237391471863, 0.001180729828774929, -0.019763601943850517, 0.00012683114618994296,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def _27(): sa(sr()); sa(gr(3,0)) sa(gr(3,0)) gw(3,0,gr(3,0)+1) sa(tm(sp(),gr(1,0))) v0=sp() v1=sp() sa(v0) sa(v1) sa(td(sp(),gr(1,0))) sa(sp()+2) v0=sp() v1=sp() gw(v1,v0,sp()) return 9
14,983
[ -0.004093893337994814, 0.011117478832602501, 0.047924138605594635, -0.0002338796475669369, -0.031036827713251114, -0.015236958861351013, -0.005123763345181942, 0.0002310810814378783, -0.004061909858137369, -0.021620873361825943, 0.0288107730448246, -0.04610747471451759, -0.010196353308856487...
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 tdf37341(UITestCase): def test_tdf37341_goalSeek(self): with self.ui_test.load_file(get_url_for_data_file("tdf37341.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyV...
14,984
[ -0.005624423734843731, 0.012668924406170845, 0.0596432164311409, 0.0007757826242595911, -0.02627141773700714, -0.011492101475596428, 0.007100383285433054, -0.0002621553430799395, -0.010150917805731297, -0.028980081900954247, 0.020551664754748344, -0.0328984409570694, -0.006156952586025, -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_tdf37341_goalSeek(self): with self.ui_test.load_file(get_url_for_data_file("tdf37341.ods")) as calc_doc: xCalcDoc = self.xUITest.getTopFocusWindow() gridwin = xCalcDoc.getChild("grid_window") gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "F111"})) ...
14,985
[ 0.01321830227971077, 0.029393663629889488, 0.07071665674448013, 0.0003676577180158347, -0.03149140626192093, 0.012118883430957794, 0.027523387223482132, 0.010924686677753925, -0.008251961320638657, 0.001773918978869915, 0.03048044443130493, -0.005051640793681145, 0.006564921699464321, -0.0...
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": "spawn_count", "annotation": null, "type_comment": null}}, {"_type...
def spawn_locusts(self, spawn_count=None, stop_timeout=None, wait=False): if spawn_count is None: spawn_count = self.num_clients if self.num_requests is not None: self.stats.max_requests = self.num_requests bucket = self.weight_locusts(spawn_count, stop_timeout) ...
14,986
[ 0.009352381341159344, 0.007532686926424503, 0.08260564506053925, -0.00995693076401949, -0.019696222618222237, -0.007472231984138489, 0.044422298669815063, -0.02778509631752968, 0.0004685258900281042, -0.008566467091441154, 0.037240251898765564, -0.022126512601971626, -0.008923150599002838, ...
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": "locust_classes", "annotation": null, "type_comment": null}}, {"_t...
def __init__(self, locust_classes, options): self.options = options self.locust_classes = locust_classes self.hatch_rate = options.hatch_rate self.num_clients = options.num_clients self.num_requests = options.num_requests self.host = options.host self.locusts = Gr...
14,987
[ 0.01291587296873331, 0.030376920476555824, 0.06332944333553314, -0.0038002715446054935, -0.03317977860569954, 0.031917229294776917, 0.04224487766623497, -0.003415194107219577, -0.01095892209559679, 0.027877075597643852, 0.03353329375386238, 0.0010250316699966788, 0.005959229543805122, 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}}, {"_type": "arg", "_fields": {"arg": "locust_count", "annotation": null, "type_comment": null}}, {"_typ...
def start_hatching(self, locust_count=None, hatch_rate=None, wait=False): if self.state != STATE_RUNNING and self.state != STATE_HATCHING: self.stats.clear_all() self.stats.start_time = time() self.exceptions = {} events.locust_start_hatching.fire() # Dyn...
14,988
[ 0.0004728146595880389, 0.00048004291602410376, 0.06656141579151154, 0.009027698077261448, -0.03368889540433884, 0.00804125051945448, 0.05785346403717995, 0.048764538019895554, -0.0014550104970112443, -0.0319473035633564, 0.0341787151992321, -0.02176988311111927, 0.017361482605338097, -0.03...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"...
def hatch(): sleep_time = 1.0 / self.hatch_rate while True: if not bucket: logger.info("All locusts hatched: %s" % ", ".join(["%s: %d" % (name, count) for name, count in six.iteritems(occurence_count)])) events.hatch_complete.fire(user_coun...
14,989
[ -0.008349587209522724, 0.04150905832648277, 0.0701298639178276, -0.047019895166158676, -0.005905263591557741, -0.007760727312415838, 0.037331487983465195, -0.02853192202746868, -0.01991012506186962, 0.041109077632427216, -0.03933138772845268, 0.036553747951984406, 0.01516591664403677, -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": "locust_classes", "annotation": null, "type_comment": null}}, {"_t...
def __init__(self, locust_classes, options): super(LocalLocustRunner, self).__init__(locust_classes, options) # register listener thats logs the exception for the local runner def on_locust_error(locust_instance, exception, tb): formatted_tb = "".join(traceback.format_tb(tb)) ...
14,990
[ -0.010063433088362217, 0.033158399164676666, 0.07306087762117386, -0.033673569560050964, 0.00566104706376791, -0.013874541968107224, 0.049269258975982666, -0.023112528026103973, -0.021590426564216614, 0.015665939077734947, -0.014822928234934807, 0.016719700768589973, 0.005798621568828821, ...
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": "locust_classes", "anno...
class LocalLocustRunner(LocustRunner): def __init__(self, locust_classes, options): super(LocalLocustRunner, self).__init__(locust_classes, options) # register listener thats logs the exception for the local runner def on_locust_error(locust_instance, exception, tb): formatted_t...
14,991
[ 0.032662227749824524, 0.06321404874324799, 0.04566822201013565, -0.0344536192715168, -0.012220727279782295, 0.004472344648092985, 0.024478264153003693, 0.00229598768055439, -0.015509036369621754, 0.01555811520665884, 0.012932376936078072, -0.016220685094594955, -0.012331156060099602, -0.01...
20
{"_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": "kwargs", "an...
class MasterLocustRunner(DistributedLocustRunner): def __init__(self, *args, **kwargs): super(MasterLocustRunner, self).__init__(*args, **kwargs) class SlaveNodesDict(dict): def get_by_state(self, state): return [c for c in six.itervalues(self) if c.state == stat...
14,992
[ 0.02469808980822563, 0.07911299914121628, 0.04123765230178833, -0.03710894286632538, -0.02192913368344307, -0.012930030934512615, 0.028455957770347595, 0.004919839557260275, -0.005599717143923044, 0.01053191814571619, -0.004107077140361071, -0.007676433306187391, -0.008801321499049664, -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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, *args, **kwargs): super(MasterLocustRunner, self).__init__(*args, **kwargs) class SlaveNodesDict(dict): def get_by_state(self, state): return [c for c in six.itervalues(self) if c.state == state] @property def r...
14,993
[ 0.03377984091639519, 0.034681301563978195, 0.08163252472877502, -0.0003182901709806174, -0.008833089843392372, 0.011850488372147083, 0.05338666960597038, 0.02030796930193901, -0.01834227703511715, -0.01025414653122425, 0.032001953572034836, -0.02495300956070423, -0.003834349801763892, -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": "locust_count", "annotation": null, "type_comment": null}}, {"_typ...
def start_hatching(self, locust_count, hatch_rate): num_slaves = len(self.clients.ready) + len(self.clients.running) if not num_slaves: logger.warning("You are running in distributed mode but have no slave servers connected. " "Please connect slaves prior to swarmi...
14,994
[ 0.041434530168771744, 0.057722240686416626, 0.027330227196216583, -0.021520357578992844, -0.02282538264989853, 0.02157055027782917, 0.0035668581258505583, 0.035612113773822784, -0.015007782727479935, 0.006857653148472309, 0.046278178691864014, -0.019675755873322487, -0.025774236768484116, ...
19
{"_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 client_listener(self): while True: msg = self.server.recv() if msg.type == "client_ready": id = msg.node_id self.clients[id] = SlaveNode(id) logger.info("Client %r reported as ready. Currently %i clients ready to swarm." % (id, len(self...
14,995
[ 0.033570170402526855, 0.05797017365694046, 0.003219925332814455, -0.01532200537621975, 0.006451370660215616, 0.024054396897554398, 0.006785459816455841, 0.0028714360669255257, -0.00978073850274086, 0.013467236422002316, 0.006572334095835686, -0.037579234689474106, -0.005503825843334198, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "state", "annotation": ...
class SlaveNodesDict(dict): def get_by_state(self, state): return [c for c in six.itervalues(self) if c.state == state] @property def ready(self): return self.get_by_state(STATE_INIT) @property def hatc...
14,996
[ 0.03209635987877846, 0.035585615783929825, 0.045575398951768875, -0.03866858780384064, -0.0037611054722219706, 0.0077612013556063175, 0.03412777557969093, 0.017756959423422813, -0.011853905394673347, 0.00041561858961358666, 0.010730652138590813, 0.0052607678808271885, -0.005401174537837505, ...
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}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "an...
class SlaveLocustRunner(DistributedLocustRunner): def __init__(self, *args, **kwargs): super(SlaveLocustRunner, self).__init__(*args, **kwargs) self.client_id = socket.gethostname() + "_" + md5(str(time() + random.randint(0,10000)).encode('utf-8')).hexdigest() self.client = rpc.Clie...
14,997
[ 0.025568610057234764, 0.01133738923817873, 0.06574785709381104, 0.005771586671471596, -0.010752192698419094, 0.003604428144171834, 0.04977390542626381, 0.05597313493490219, 0.023677973076701164, -0.04586401581764221, 0.054429758340120316, -0.01580675132572651, -0.04295732453465462, -0.0099...
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 worker(self): while True: msg = self.client.recv() if msg.type == "hatch": self.client.send(Message("hatching", None, self.client_id)) job = msg.data self.hatch_rate = job["hatch_rate"] #self.num_clients = job["num_clien...
14,998
[ 0.02799377217888832, 0.044745367020368576, 0.055590469390153885, -0.03444623947143555, -0.017322387546300888, -0.001653444254770875, 0.03893814608454704, 0.019617976620793343, -0.018960321322083473, -0.0002937345125246793, 0.006905378773808479, 0.00038699281867593527, -0.004234430380165577, ...
15
{"_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): super(SlaveLocustRunner, self).__init__(*args, **kwargs) self.client_id = socket.gethostname() + "_" + md5(str(time() + random.randint(0,10000)).encode('utf-8')).hexdigest() self.client = rpc.Client(self.master_host, self.master_port) self.gr...
14,999
[ 0.0041230591014027596, 0.015690699219703674, 0.02977832406759262, 0.007541737053543329, 0.008695464581251144, 0.001674423459917307, -0.017670253291726112, 0.07558739185333252, -0.005373943131417036, 0.013686856254935265, -0.008458646945655346, -0.04345303401350975, 0.0030376440845429897, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def script_keystone_client(): ksclient.Client(auth_url='http://no.where', insecure=False, password='password', tenant_id='', tenant_name='tenant_name', username='username').AndReturn( FakeKeystone('abcd1234'))
15,000
[ 0.03180399164557457, 0.024380605667829514, 0.052025049924850464, -0.03396352380514145, -0.03769361972808838, 0.026135224848985672, -0.002777634421363473, -0.004012309014797211, 0.015521624125540257, -0.0007883512880653143, 0.03315369784832001, -0.008024618029594421, -0.005260787438601255, ...
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 stats_reporter(self): while True: data = {} events.report_to_master.fire(client_id=self.client_id, data=data) try: self.client.send(Message("stats", data, self.client_id)) except: logger.error("Connection lost to master server. ...