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
1,901
[ 0.021193852648139, 0.013156522065401077, 0.03653150796890259, -0.013066885992884636, 0.006906924769282341, -0.01512850634753704, 0.008674738928675652, -0.0048552644439041615, -0.01688138023018837, 0.019281623885035515, -0.006379070691764355, -0.010507290251553059, -0.01683158427476883, -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": "project_name", "annotation": null, "type_comment": null}}], "kwar...
def get_requirement(self, project_name): # type: (str) -> InstallRequirement for name in project_name, project_name.lower(): if name in self.requirements: return self.requirements[name] if name in self.requirement_aliases: return self.requirements[...
1,902
[ 0.018733862787485123, -0.0023710045497864485, 0.053902432322502136, -0.04594054073095322, 0.006626039277762175, 0.022885115817189217, 0.009473374113440514, 0.001023177639581263, -0.019468314945697784, -0.002581228269264102, 0.00833976175636053, -0.024481752887368202, 0.013166924938559532, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "wagtail.wagtailsearch.backends.db"}}, "targets": [{"_type": "Name", "_fields": {"id": "backend_path", "ctx": {"_type": "Store", "_fields"...
class TestDBBackend(BackendTests, TestCase): backend_path = 'wagtail.wagtailsearch.backends.db' @unittest.expectedFailure def test_callable_indexed_field(self): super(TestDBBackend, self).test_callable_indexed_field() @unittest.expectedFailure def test_update_index_command(self): s...
1,903
[ 0.032506853342056274, -0.0362597219645977, 0.0551050566136837, -0.017819371074438095, -0.020681269466876984, -0.056644000113010406, 0.034315790981054306, 0.009888401255011559, 0.0396885983645916, 0.033694811165332794, -0.011825582943856716, -0.029914945363998413, -0.03145388886332512, -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_int_seeding_gives_determinisic_balloon_initialization(self): arena1 = balloon_arena.BalloonArena(features.PerciatelliFeatureConstructor) arena2 = balloon_arena.BalloonArena(features.PerciatelliFeatureConstructor) arena1.reset(201) arena2.reset(201) balloon_state1 = arena1.get_simulator_sta...
1,904
[ 0.018357086926698685, -0.016120759770274162, 0.05529077723622322, 0.005806903354823589, -0.008149558678269386, -0.02842741645872593, 0.011421729810535908, -0.0018470274517312646, 0.02217119000852108, 0.03429948911070824, -0.02046993561089039, -0.03333910182118416, -0.023748965933918953, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class BalloonArenaTest(parameterized.TestCase): # TODO(joshgreaves): Patch PerciatelliFeatureConstructor, it's too slow. def test_int_seeding_gives_determinisic_balloon_initialization(self): arena1 = balloon_arena.BalloonArena(features.PerciatelliFeatureConstructor) arena2 = balloon_arena.BalloonArena(fea...
1,905
[ 0.036127153784036636, -0.0298936627805233, 0.051521170884370804, -0.01143710408359766, -0.005135855637490749, -0.05615563690662384, 0.037563569843769073, 0.003929810598492622, 0.03664209693670273, 0.025340503081679344, -0.008665909990668297, -0.04152048006653786, -0.00591165479272604, -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_different_seeds_gives_different_initialization(self): arena1 = balloon_arena.BalloonArena(features.PerciatelliFeatureConstructor) arena2 = balloon_arena.BalloonArena(features.PerciatelliFeatureConstructor) arena1.reset(201) arena2.reset(202) balloon_state1 = arena1.get_simulator_state().ba...
1,906
[ 0.03583121672272682, -0.04425422474741936, 0.056046441197395325, -0.010615666396915913, -0.014947500079870224, -0.05711602792143822, 0.03339790180325508, 0.00025298274704255164, 0.03243527188897133, 0.034253571182489395, -0.010448543354868889, -0.035349901765584946, -0.017621470615267754, ...
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_array_seeding_gives_determinisic_balloon_initialization(self): arena1 = balloon_arena.BalloonArena(features.PerciatelliFeatureConstructor) arena2 = balloon_arena.BalloonArena(features.PerciatelliFeatureConstructor) arena1.reset(jax.random.PRNGKey(201)) arena2.reset(jax.random.PRNGKey(201)) ...
1,907
[ -0.001532420632429421, -0.01813364401459694, 0.041671086102724075, 0.004415791016072035, -0.029304184019565582, -0.029761221259832382, 0.04548869654536247, 0.005316424183547497, 0.029115991666913033, 0.041886162012815475, -0.03425094485282898, -0.023618096485733986, -0.007688987534493208, ...
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": "seed", "annotation": {"_type": "Name", "_fields": {"id": "int", "...
def test_balloon_is_initialized_within_200km(self, seed: int): arena = balloon_arena.BalloonArena(features.PerciatelliFeatureConstructor) arena.reset(seed) balloon_state = arena.get_simulator_state().balloon_state distance = units.relative_distance(balloon_state.x, balloon_state.y) self.assertLess...
1,908
[ 0.03256167098879814, -0.006627596914768219, 0.029994461685419083, 0.00035589770413935184, -0.01305217482149601, -0.025842389091849327, 0.018586087971925735, 0.007885007187724113, 0.01756444200873375, 0.015678327530622482, -0.020066162571310997, 0.004391110502183437, -0.023248981684446335, ...
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": "seed", "annotation": {"_type": "Name", "_fields": {"id": "int", "...
def test_balloon_is_initialized_within_valid_pressure_range(self, seed: int): arena = balloon_arena.BalloonArena(features.PerciatelliFeatureConstructor) arena.reset(seed) balloon_state = arena.get_simulator_state().balloon_state self.assertBetween(balloon_state.pressure, constan...
1,909
[ 0.0479913204908371, 0.004146728664636612, -0.010896221734583378, 0.003413274185732007, -0.013710175640881062, -0.025365537032485008, -0.0012899665161967278, 0.030616728588938713, -0.009611963294446468, 0.028196614235639572, -0.013059483841061592, -0.0042380536906421185, -0.008584556169807911...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, **kwargs): self.ERROR_MSG = "" self.b_key = "file-list" self.DeviceProxy = "" self.A10WW_file = "" for keys, value in kwargs.items(): setattr(self,keys, value)
1,910
[ 0.02980884350836277, 0.00080343201989308, 0.022180788218975067, -0.03812815621495247, -0.03400488197803497, -0.04574408382177353, 0.02786847949028015, -0.007603801786899567, -0.010969121009111404, 0.058890052139759064, 0.03208877146244049, -0.02653447911143303, -0.005211696960031986, -0.05...
15
{"_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": "Dict", "_fields": {"k...
def main(): # Collect examples examples = {} for sub in os.listdir(EXAMPLES_DIR): dirname = os.path.join(EXAMPLES_DIR, sub) if os.path.isdir(dirname): examples[sub] = {} for fname in os.listdir(dirname): filename = os.path.join(dirname, fname) ...
1,911
[ 0.03264395147562027, 0.004053163342177868, -0.010478643700480461, 0.0008192418608814478, -0.011058056727051735, -0.019131585955619812, -0.005534494761377573, 0.024422837421298027, -0.007100551854819059, 0.015534847974777222, -0.0021973992697894573, 0.010210800915956497, -0.013851268216967583...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, **kwargs): self.ERROR_MSG = "" self.b_key = "oper" self.DeviceProxy = "" self.file_list = [] for keys, value in kwargs.items(): setattr(self,keys, value)
1,912
[ 0.04019567370414734, 0.024317827075719833, -0.02073250710964203, 0.018249504268169403, 0.002535890555009246, -0.009959843009710312, -0.013071945868432522, 0.022458359599113464, 0.003816362237557769, 0.04246712103486061, -0.0046570198610424995, -0.016267556697130203, 0.005851198919117451, -...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def __init__(self, **kwargs): self.ERROR_MSG = "" self.required=[] self.b_key = "auth-portal-image" self.a10_url="/axapi/v3/file/auth-portal-image/oper" self.DeviceProxy = "" self.oper = {} for keys, value in kwargs.items(): setattr(self,keys, value)
1,913
[ 0.010341852903366089, 0.045555051416158676, 0.02254616469144821, -0.01716701313853264, -0.0248482096940279, 0.02660655602812767, 0.029313484206795692, 0.022488323971629143, 0.025958744809031487, 0.0068135918118059635, 0.02436235174536705, 0.03741113096475601, 0.004485518205910921, 0.026514...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "child_process_killed", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "child_pid", "annotation": null, "type_comment": n...
def _parent_of_ignores_sigterm(child_process_killed, child_pid, process_done, setup_done): child = multiprocessing.Process(target=TestHelpers._ignores_sigterm, args=[child_pid, setup_done]) child.start() if setup_done.acq...
1,914
[ 0.0442003570497036, 0.0440874844789505, -0.022822553291916847, -0.023635227233171463, -0.030881555750966072, 0.029978586360812187, 0.02557661011815071, 0.008578210137784481, 0.049843914806842804, 0.019458992406725883, 0.020440971478819847, 0.016829093918204308, -0.0007999745430424809, 0.04...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "child_pid", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "setup_done", "annotation": null, "type_comment": null}}], "k...
def _ignores_sigterm(child_pid, setup_done): def signal_handler(signum, frame): pass signal.signal(signal.SIGTERM, signal_handler) child_pid.value = os.getpid() setup_done.release() while True: time.sleep(1)
1,915
[ 0.045979928225278854, 0.05521409213542938, -0.006388752721250057, -0.009246094152331352, 0.052207622677087784, 0.015056219883263111, 0.01283715758472681, 0.02569817565381527, -0.00869729369878769, 0.016129959374666214, 0.014901123940944672, -0.0490102618932724, 0.03373929485678673, 0.00663...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "targets": [{"_type": "Name", "_fields": {"id": "Nothing", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_ty...
class MergeTool: Nothing = 0x0 CanDiff = 0x1 CanMerge = 0x2 Both = CanDiff | CanMerge def __init__(self, capabilities=Nothing, suffix="", command=""): self._caps = capabilities self._suffix = suffix self._command = command @property def capabilities(self): r...
1,916
[ -0.000700626929756254, 0.017392821609973907, -0.02823355235159397, -0.03483329340815544, -0.07924455404281616, -0.015867970883846283, 0.021145381033420563, -0.0006336168735288084, -0.0005837316857650876, -0.0014101885026320815, 0.0277332104742527, -0.005837316624820232, 0.00617087772116065, ...
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": "image_viewer", "annotation": null, "type_comment": null}}], "kwar...
def attach(self, image_viewer): image = image_viewer.image imin, imax = skimage.dtype_limits(image) itype = 'float' if np.issubdtype(image.dtype, float) else 'int' self.add_widget(Slider('sigma', 0, 5, update_on='release')) self.add_widget(Slider('low threshold', imin, imax, valu...
1,917
[ 0.0716998353600502, 0.035257160663604736, 0.045831941068172455, 0.003189030336216092, -0.010918576270341873, 0.004940626211464405, 0.0011432792525738478, 0.03833949565887451, -0.008594970218837261, 0.0033224006183445454, 0.09721208363771439, 0.006140958052128553, 0.008114838041365147, -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 clear(self): with self.lock: # Copy pointers to all values, then wipe the mapping values = list(itervalues(self._container)) self._container.clear() if self.dispose_func: for value in values: self.dispose_func(value)
1,918
[ 0.08107485622167587, 0.009622696787118912, -0.020478028804063797, 0.03430447727441788, 0.02123389020562172, -0.011785623617470264, 0.020792003720998764, 0.04939844831824303, 0.0012428106274455786, -0.020594315603375435, 0.05656168982386589, 0.0015669588465243578, 0.00021185922378208488, -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": "key", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def __setitem__(self, key, value): evicted_value = _Null with self.lock: # Possibly evict the existing value of 'key' evicted_value = self._container.get(key, _Null) self._container[key] = value # If we didn't evict an existing value, we might have to evi...
1,919
[ 0.008472690358757973, -0.033212192356586456, 0.010103140957653522, -0.00740771321579814, 0.034569330513477325, -0.011743016541004181, 0.00042557832784950733, 0.010847682133316994, -0.022373933345079422, -0.0007451301789842546, 0.018688926473259926, -0.02603066712617874, -0.001317083952017128...
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": "headers", "annotation": null, "type_comment": null}}], "kwarg": {...
def __init__(self, headers=None, **kwargs): super(HTTPHeaderDict, self).__init__() self._container = OrderedDict() if headers is not None: if isinstance(headers, HTTPHeaderDict): self._copy_from(headers) else: self.extend(headers) i...
1,920
[ -0.036416489630937576, -0.02461460791528225, 0.004847436677664518, -0.008887514472007751, 0.0313229076564312, -0.015307003632187843, 0.007029931992292404, -0.018339524045586586, -0.02293425053358078, 0.052852485328912735, 0.02544165775179863, -0.021030720323324203, 0.004719440825283527, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "gateway", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "gameid", "annotation": null, "type_comment": null}}], "kwarg":...
def downloadwig(gateway, gameid): if gateway == 'Kalimdor': baseurl = 'http://asialadders.battle.net/war3/ladder/w3xp-game-detail.aspx' else: baseurl = 'http://classic.battle.net/war3/ladder/w3xp-game-detail.aspx' fullurl = baseurl + '?Gateway=' + gateway + '&GameID=' + str(gameid) if c...
1,921
[ 0.006973725743591785, -0.00828798022121191, 0.07334674149751663, -0.021279610693454742, 0.011098851449787617, -0.002883185865357518, 0.00037238531513139606, -0.007363600190728903, -0.052670806646347046, 0.04590459540486336, 0.05221804976463318, -0.020914888009428978, -0.01769527792930603, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"va...
def main(): try: gateway = sys.argv[1] assert gateway in ['Azeroth', 'Northrend', 'Lordaeron', 'Kalimdor'] dbname = gateway + '.db' except: print('usage: %s [gateway] [starting gameid]' % sys.argv[0]) sys.exit(1) dbopen(dbname) try: # start from user-specified g...
1,922
[ -0.027547687292099, -0.008740869350731373, 0.06448715925216675, -0.017237644642591476, 0.012448764406144619, -0.03793909400701523, 0.010077571496367455, -0.05672266334295273, 0.01026354730129242, 0.023874660953879356, 0.06560301035642624, -0.03954313322901726, 0.02056196518242359, -0.01663...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "gameid", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "html", "annotation": null, "type_comment": null}}], "kwarg": nu...
def parsegame(gameid, html): container = BeautifulSoup(html, "html.parser").find("table", class_="mainTable") basicinfo = container.find_all("td", class_="playerStatsDataLeft") gamedate = int(parse(''.join(basicinfo[0].strings)).strftime('%s')) # convert the date to unix epoch gamemap = basicinfo[1].st...
1,923
[ -0.025111857801675797, -0.003569884691387415, 0.05606134235858917, -0.03978141024708748, 0.01100845541805029, 0.010983292944729328, 0.0241053719073534, -0.0014869277365505695, -0.02815648354589939, 0.015625715255737305, 0.016103796660900116, -0.028710050508379936, 0.015336350537836552, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def setUpClass(cls): cls._trello = TrelloClient(os.environ['TRELLO_API_KEY'], token=os.environ['TRELLO_TOKEN']) for b in cls._trello.list_boards(): if b.name == os.environ['TRELLO_TEST_BOARD_NAME']: cls._board = b break ...
1,924
[ 0.008825127966701984, -0.021604442968964577, 0.014115787111222744, 0.01691022701561451, 0.002239417750388384, -0.019273903220891953, -0.012337506748735905, 0.0016899181064218283, 0.040027864277362823, 0.008736765943467617, 0.03375418111681938, -0.011542251333594322, -0.011409708298742771, ...
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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _add_card(self, name, description=None): try: card = self._list.add_card(name, description) self.assertIsNotNone(card, msg="card is None") self.assertIsNotNone(card.id, msg="id not provided") self.assertEqual(card.name, name) return card ex...
1,925
[ 0.027515923604369164, 0.009855343960225582, 0.02514471299946308, -0.04584340378642082, -0.032208945602178574, 0.03448135405778885, -0.005375361535698175, 0.03606216236948967, 0.04149618744850159, 0.015449918806552887, 0.06520829349756241, -0.033246349543333054, -0.006026826798915863, -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_delete_checklist(self): name = "Card with checklist, test deletion" card = self._list.add_card(name) card.fetch(eager=True) checklist = self._add_checklist(card, 'ChecklistsToDelete', ['item1', 'item2']) checklist.delete() card._checklists = card.fetch_checklists...
1,926
[ 0.03916491940617561, 0.015632949769496918, 0.03616786375641823, -0.05475977063179016, -0.028370438143610954, 0.04919743910431862, -0.01490908395498991, 0.03596467524766922, 0.03685363009572029, 0.028218045830726624, 0.04787670075893402, -0.03677743300795555, -0.009448346681892872, -0.02186...
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_delete_checklist_remaining(self): name = "Card with checklist, test deletion" card = self._list.add_card(name) card.fetch(eager=True) name = 'ChecklistsToDelete' checklist_delete = self._add_checklist(card, name, ['item1', 'item2']) name_keep = 'ChecklistsToKee...
1,927
[ 0.02770628035068512, 0.013533997349441051, 0.01060852687805891, -0.04267050698399544, -0.04449080303311348, 0.03153598681092262, -0.011843725107610226, 0.009538808837532997, 0.039289962500333786, 0.02218629978597164, 0.05380502715706825, -0.015637973323464394, 0.01735188625752926, -0.03413...
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_delete_checklist_item(self): name = "Testing checklist item delete" card = self._list.add_card(name, "Description goes here") name = 'Checklist' checklist = self._add_checklist(card, name, ['item1', 'item2']) checklist.delete_checklist_item('item2') checklists ...
1,928
[ 0.019348805770277977, 0.005583825521171093, 0.007097253110259771, -0.04197238013148308, -0.030994988977909088, 0.013168257661163807, -0.004571991506963968, -0.020202090963721275, 0.033139731734991074, 0.022854192182421684, 0.030095580965280533, 0.006405400577932596, 0.018680015578866005, -...
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_checklist_rename(self): name = "Testing checklist rename" description = "Description goes here" card = self._list.add_card(name, description) name = 'ToBeRenamed' new_name = "Renamed" checklist = self._add_checklist(card, name, ['item1', 'item2']) checkl...
1,929
[ 0.006790625397115946, -0.0019230713369324803, 0.03940253332257271, -0.03951524198055267, 0.00947869848459959, 0.0029416652396321297, 0.0028740407433360815, 0.012905006296932697, 0.024367356672883034, -0.024953436106443405, 0.024029234424233437, -0.0012686635600402951, -0.007421787362545729, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class StartIndexTest(unittest.TestCase): def setUp(self): self.start_index = gdata.data.StartIndex() def testToAndFromString(self): self.start_index.text = '1' self.assert_(self.start_index.text == '1') new_start_index = parse(self.start_index.ToString(), gdata.data.StartIndex) self.as...
1,930
[ 0.011042858473956585, -0.002604768378660083, 0.036068398505449295, -0.035771943628787994, -0.039897575974464417, 0.017144842073321342, -0.008813288062810898, -0.008844168856739998, 0.0365377813577652, 0.04049048200249672, 0.05054516717791557, -0.00604948541149497, -0.0013734092935919762, -...
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_clear_checklist(self): name = "Testing checklist clear" card = self._list.add_card(name, "Description goes here") name = 'Checklist' checklist = self._add_checklist(card, name, ['item1', 'item2', 'item3']) checklist.clear() checklists = card.fetch_checklists() ...
1,931
[ 0.03771812096238136, -0.005747975781559944, 0.0386682003736496, -0.002522161928936839, 0.018692797049880028, 0.001966959796845913, -0.019357852637767792, -0.016840144991874695, 0.039214495569467545, 0.008348816074430943, 0.0622776560485363, -0.03529542312026024, -0.014975614845752716, 0.00...
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 GDataEntryTest(unittest.TestCase): def testIdShouldBeCleaned(self): entry = parse(XML_ENTRY_1, gdata.data.GDEntry) tree = parse(XML_ENTRY_1, atom.core.XmlElement) self.assert_(tree.get_elements('id', 'http://www.w3.org/2005/Atom')[0].text != entry.get_id()) self.assertEqual(entry.get_i...
1,932
[ 0.020388668403029442, 0.012011146172881126, 0.039812855422496796, -0.028283949941396713, -0.002269613090902567, -0.0434689074754715, -0.015768133103847504, 0.007525190245360136, 0.055356692522764206, -0.0024644718505442142, 0.00990835390985012, -0.045644596219062805, -0.03691941499710083, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class ItemsPerPageTest(unittest.TestCase): def setUp(self): self.items_per_page = gdata.data.ItemsPerPage() def testToAndFromString(self): self.items_per_page.text = '10' self.assert_(self.items_per_page.text == '10') new_items_per_page = parse(self.items_per_page.ToString(), gdata.data.It...
1,933
[ -0.025343798100948334, -0.003785969689488411, 0.04977560043334961, -0.014411884360015392, 0.0028124775271862745, 0.00677394587546587, -0.025631794705986977, -0.0018389852484688163, -0.0012644898379221559, 0.06475148350000381, 0.04857560992240906, -0.04243165999650955, -0.015923872590065002, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class LinkFinderTest(unittest.TestCase): def setUp(self): self.entry = parse(XML_ENTRY_1, gdata.data.GDEntry) def testLinkFinderGetsLicenseLink(self): self.assertEquals(isinstance(self.entry.FindLicenseLink(), str), True) self.assertEquals(self.entry.FindLicenseLink(), 'h...
1,934
[ -0.002663626568391919, 0.024538755416870117, 0.049976009875535965, 0.007564396131783724, 0.027634937316179276, 0.03584285452961922, -0.0016452257987111807, -0.028509153053164482, 0.004708017222583294, 0.04992744326591492, 0.04822757840156555, -0.05390998348593712, 0.020276952534914017, 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 testFindAclLink(self): entry = gdata.data.GDEntry() self.assert_(entry.get_acl_link() is None) self.assert_(entry.find_acl_link() is None) entry.link.append(atom.data.Link( rel=gdata.data.ACL_REL, href='http://example.com/acl')) self.assertEqual(entry.get_acl_link().href, 'http://exampl...
1,935
[ 0.02072249911725521, -0.03036246821284294, 0.03331628069281578, -0.019714996218681335, 0.007653585635125637, -0.0048743668012320995, 0.006422829814255238, -0.006577389780431986, 0.011231365613639355, -0.03590373322367668, 0.03604111820459366, -0.019245591014623642, -0.00554126501083374, -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 BatchEntryTest(unittest.TestCase): def testCorrectConversionFromAndToString(self): batch_entry = parse(test_data.BATCH_ENTRY, gdata.data.BatchEntry) self.assertEquals(batch_entry.batch_id.text, 'itemB') self.assertEquals(batch_entry.id.text, 'http://www.google.com/base/feeds/...
1,936
[ 0.012676329351961613, -0.008273216895759106, 0.020868435502052307, -0.00589205976575613, 0.040021974593400955, -0.011384363286197186, -0.014970582909882069, -0.014043611474335194, 0.059743285179138184, 0.008122583851218224, 0.0641927495598793, -0.03617504611611366, -0.027925003319978714, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class GDataFeedTest(unittest.TestCase): def testCorrectConversionToElementTree(self): test_feed = parse(test_data.GBASE_FEED, gdata.data.GDFeed) self.assert_(test_feed.total_results is not None) self.assert_(test_feed.get_elements('totalResults', 'http://a9.com/-/spec/opensearchrss/1.0/') is not...
1,937
[ -0.005584723316133022, -0.02111276425421238, 0.028492890298366547, -0.04780733212828636, 0.03206617757678032, -0.00720496429130435, -0.010281963273882866, 0.00687799695879221, 0.015659412369132042, -0.019326120615005493, 0.059508100152015686, -0.03283688798546791, -0.016161540523171425, 0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class BatchFeedTest(unittest.TestCase): def setUp(self): self.batch_feed = gdata.data.BatchFeed() self.example_entry = gdata.data.BatchEntry( id=atom.data.Id(text='http://example.com/1'), text='This is a test') def testConvertRequestFeed(self): batch_feed = parse(test_data.BATCH_FEED_REQUEST, ...
1,938
[ 0.02151777222752571, -0.029549969360232353, 0.024510623887181282, -0.015011574141681194, 0.010522296652197838, -0.005571671761572361, 0.0026364889927208424, -0.00888983253389597, 0.019660549238324165, -0.04218382388353348, 0.0366949588060379, -0.002663105260580778, 0.0034926454536616802, -...
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 testCorrectConversionFromAndToString(self): batch_entry = parse(test_data.BATCH_ENTRY, gdata.data.BatchEntry) self.assertEquals(batch_entry.batch_id.text, 'itemB') self.assertEquals(batch_entry.id.text, 'http://www.google.com/base/feeds/items/' '2173859253842...
1,939
[ 0.024718232452869415, -0.00975504145026207, 0.004432779736816883, -0.03520475700497627, 0.0201420821249485, -0.010170523077249527, -0.008959189057350159, -0.02544386312365532, 0.005746521055698395, -0.0358133502304554, 0.0454103909432888, -0.032091569155454636, -0.010907856747508049, 0.006...
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 testConvertResultFeed(self): batch_feed = parse(test_data.BATCH_FEED_RESULT, gdata.data.BatchFeed) self.assertEquals(len(batch_feed.entry), 4) for entry in batch_feed.entry: self.assert_(isinstance(entry, gdata.data.BatchEntry)) if entry.id.text == ('http://www.google.com/base/feeds/items/'...
1,940
[ 0.0031817194540053606, -0.01952379383146763, 0.006912509445101023, -0.04061966389417648, 0.02614731900393963, -0.009796574711799622, -0.02489890530705452, -0.01689981482923031, 0.029776964336633682, -0.0203560683876276, 0.0640389695763588, -0.039024468511343, -0.0016847796505317092, 0.0144...
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 testConvertRequestFeed(self): batch_feed = parse(test_data.BATCH_FEED_REQUEST, gdata.data.BatchFeed) self.assertEquals(len(batch_feed.entry), 4) for entry in batch_feed.entry: self.assert_(isinstance(entry, gdata.data.BatchEntry)) self.assertEquals(batch_feed.title.text, 'My Batch Feed') ...
1,941
[ 0.004987053573131561, 0.0018463735468685627, 0.018846917897462845, -0.0412815622985363, 0.0183473601937294, 0.007413878105580807, 0.0027660122141242027, 0.011381948366761208, 0.012341325171291828, -0.04841160029172897, 0.02260494790971279, -0.006357996258884668, -0.015179716050624847, -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 testAddInsert(self): first_entry = gdata.data.BatchEntry( id=atom.data.Id(text='http://example.com/1'), text='This is a test1') self.batch_feed.AddInsert(first_entry) self.assertEquals(self.batch_feed.entry[0].batch_operation.type, gdata.data.BATCH_INSERT) self.assertE...
1,942
[ 0.00568308774381876, -0.031682468950748444, 0.0267313402146101, -0.02429147996008396, 0.025541163980960846, -0.0022419930901378393, 0.00645075086504221, 0.005623579025268555, -0.005079073831439018, 0.006194863002747297, 0.03441987186670303, -0.04127528518438339, -0.01788833737373352, 0.016...
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 testAddBatchEntry(self): try: self.batch_feed.AddBatchEntry(batch_id_string='a') self.fail('AddBatchEntry with neither entry or URL should raise Error') except gdata.data.MissingRequiredParameters: pass new_entry = self.batch_feed.AddBatchEntry( id_url_string='http://example.c...
1,943
[ -0.015622328035533428, -0.002159101888537407, 0.04451733082532883, -0.028172913938760757, 0.005226545501500368, -0.0018926168559119105, -0.013776990585029125, 0.0166882686316967, -0.014969009906053543, -0.007352694869041443, 0.023909153416752815, -0.04614489525556564, -0.005464375950396061, ...
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 testAddQuery(self): # Try querying with an existing batch entry delete_entry = gdata.data.BatchEntry( id=atom.data.Id(text='http://example.com/1')) self.batch_feed.AddQuery(entry=delete_entry) self.assertEquals(self.batch_feed.entry[0].batch_operation.type, gdata.data.B...
1,944
[ 0.008358744904398918, 0.015289419330656528, 0.01178724691271782, -0.03377499431371689, -0.0010696359677240252, 0.027949374169111252, -0.011373559944331646, 0.03681247681379318, 0.035067059099674225, 0.008336076512932777, 0.03851256147027016, -0.05113851651549339, -0.03565642237663269, -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 testAddDelete(self): # Try deleting an entry delete_entry = gdata.data.BatchEntry( id=atom.data.Id(text='http://example.com/1'), text='This is a test') self.batch_feed.AddDelete(entry=delete_entry) self.assertEquals(self.batch_feed.entry[0].batch_operation.type, gdata.d...
1,945
[ 0.018950222060084343, 0.020679214969277382, 0.032129500061273575, 0.030251653864979744, -0.027732590213418007, 0.009412134066224098, 0.0024288916029036045, -0.05390794202685356, 0.04138132929801941, 0.028557009994983673, 0.03359513729810715, -0.025694439187645912, 0.02583184279501438, -0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class ExtendedPropertyTest(unittest.TestCase): def testXmlBlobRoundTrip(self): ep = gdata.data.ExtendedProperty(name='blobby') ep.SetXmlBlob('<some_xml attr="test"/>') extension = ep.GetXmlBlob() self.assertEquals(extension.tag, 'some_xml') self.assert_(extension.namespace is None) self.asser...
1,946
[ 0.007683458272367716, 0.00868257973343134, 0.0158338975161314, -0.013542435131967068, 0.004420024808496237, 0.02523866854608059, 0.01201117318123579, 0.026064028963446617, 0.018016759306192398, 0.009464500471949577, 0.02391374669969082, -0.0060001565143466, -0.04339660704135895, 0.00895407...
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 testAddUpdate(self): # Try updating an entry delete_entry = gdata.data.BatchEntry( id=atom.data.Id(text='http://example.com/1'), text='This is a test') self.batch_feed.AddUpdate(entry=delete_entry) self.assertEquals(self.batch_feed.entry[0].batch_operation.type, gdata.d...
1,947
[ -0.03914143517613411, -0.006625335663557053, -0.030207674950361252, -0.03918428346514702, 0.03057188168168068, 0.00230976240709424, -0.025365877896547318, -0.02093113400042057, 0.027186907827854156, 0.014761055819690228, 0.042912036180496216, -0.031535957008600235, -0.0006537631852552295, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class FeedLinkTest(unittest.TestCase): def testCorrectFromStringType(self): link = parse( '<feedLink xmlns="http://schemas.google.com/g/2005" countHint="5"/>', gdata.data.FeedLink) self.assert_(isinstance(link, gdata.data.FeedLink)) self.assertEqual(link.count_hint, '5')
1,948
[ 0.021720463410019875, 0.024860771372914314, 0.024456337094306946, 0.01677209883928299, -0.03542362526059151, 0.020245470106601715, 0.007951878011226654, -0.0508158914744854, 0.046414703130722046, 0.013179777190089226, 0.05267152935266495, -0.026002701371908188, 0.02194647118449211, -0.0205...
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 testXmlBlobRoundTrip(self): ep = gdata.data.ExtendedProperty(name='blobby') ep.SetXmlBlob('<some_xml attr="test"/>') extension = ep.GetXmlBlob() self.assertEquals(extension.tag, 'some_xml') self.assert_(extension.namespace is None) self.assertEquals(extension.attributes['attr'], 'test') ...
1,949
[ 0.032665807753801346, 0.004337056539952755, 0.007195001468062401, -0.03747918829321861, 0.009269517846405506, 0.026624010875821114, -0.01721034198999405, -0.005051542539149523, 0.04058782756328583, 0.021697817370295525, 0.05756001174449921, -0.07174945622682571, -0.0006004974129609764, 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 test_parsing_etags_and_edit_url(self): feed = atom.core.parse(SIMPLE_V2_FEED_TEST_DATA, gdata.data.GDFeed) # General parsing assertions. self.assertEqual(feed.get_elements('title')[0].text, 'Elizabeth Bennet\'s Contacts') self.assertEqual(len(feed.entry), 2) for entry in f...
1,950
[ 0.020285945385694504, -0.03384963795542717, 0.005861112382262945, -0.057830438017845154, 0.01201423816382885, 0.040118973702192307, -0.015852119773626328, -0.010881943628191948, 0.03592352569103241, 0.03709157556295395, 0.05463617667555809, -0.06583993136882782, 0.002115602372214198, 0.015...
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 SimpleV2FeedTest(unittest.TestCase): def test_parsing_etags_and_edit_url(self): feed = atom.core.parse(SIMPLE_V2_FEED_TEST_DATA, gdata.data.GDFeed) # General parsing assertions. self.assertEqual(feed.get_elements('title')[0].text, 'Elizabeth Bennet\'s Contacts') self.asse...
1,951
[ 0.009554379619657993, 0.0012132154079154134, 0.024359719827771187, -0.03803327679634094, 0.01351563073694706, 0.020372148603200912, -0.026202162727713585, -0.010541402734816074, 0.03598026931285858, 0.04274466261267662, 0.07164468616247177, -0.03779638931155205, -0.009120089933276176, -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 test_constructor_defauls(self): feed = gdata.data.GDFeed() self.assert_(feed.etag is None) self.assertEqual(feed.link, []) self.assertEqual(feed.entry, []) entry = gdata.data.GDEntry() self.assert_(entry.etag is None) self.assertEqual(entry.link, []) link = atom.data.Link() self....
1,952
[ 0.02302969992160797, 0.026570824906229973, 0.06676136702299118, 0.010957679711282253, 0.02189059555530548, 0.021221991628408432, -0.05551891028881073, -0.02912142686545849, 0.013409228064119816, -0.019983835518360138, 0.028477584943175316, -0.0771123468875885, -0.027536587789654732, 0.0216...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class DataClassSanityTest(unittest.TestCase): def test_basic_element_structure(self): conf.check_data_classes(self, [ gdata.data.TotalResults, gdata.data.StartIndex, gdata.data.ItemsPerPage, gdata.data.ExtendedProperty, gdata.data.GDEntry, gdata.data.GDFeed, gdata.data.BatchId, gd...
1,953
[ 0.01827644743025303, 0.006126621272414923, 0.0760139748454094, 0.0037010433152318, 0.036577966064214706, 0.017950529232621193, -0.03224075585603714, 0.012579159811139107, 0.006743983831256628, 0.07526186108589172, 0.015618966892361641, -0.006574757397174835, -0.0437982901930809, -0.0262990...
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": "root", "annotation": null, "type_comment": null}}], "kwarg": null...
def isValid(self, root): if not root: return True, 0, 0 l, r = root.left, root.right val = root.val if l: isLValid, lmin, lmax = self.isValid(l) else: isLValid, lmin, lmax = True, val - 1, val - 1 if not isLValid: return ...
1,954
[ 0.048940509557724, 0.02799152210354805, 0.05113492161035538, -0.009562281891703606, -0.008866959251463413, -0.004471754189580679, -0.053278304636478424, -0.014774012379348278, 0.05241074413061142, -0.04036698862910271, 0.04347999393939972, -0.03692227229475975, -0.05256384238600731, -0.031...
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_member_values(self): self.assertEqual( gdata.data.TotalResults._qname, ('{http://a9.com/-/spec/opensearchrss/1.0/}totalResults', '{http://a9.com/-/spec/opensearch/1.1/}totalResults')) self.assertEqual( gdata.data.RecurrenceException._qname, '{http://schemas.goo...
1,955
[ 0.04059721529483795, -0.01595439948141575, -0.001621069386601448, -0.02939710021018982, -0.027961846441030502, 0.014916401356458664, -0.017645949497818947, -0.023668894544243813, -0.0174409132450819, -0.005209207069128752, -0.010213377885520458, 0.007669644430279732, -0.01896587200462818, ...
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": "year", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, year, mode=None, modes=None, mass=None, masses=None, sample_pattern=None, # i.e. PowhegJimmy_AUET2CT10_ggH{0:d}_tautauInclusive ggf_weight=True, vbf_weight=True, suffix=None, label=N...
1,956
[ 0.024240585044026375, -0.0003758083039429039, 0.003288059262558818, 0.013314111158251762, -0.009058182127773762, 0.021299879997968674, -0.022338569164276123, -0.0031615954358130693, 0.01906062662601471, -0.00027295108884572983, 0.013314111158251762, 0.015297063626348972, -0.00814764201641082...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 100}}, {"_type": "Constant", "_fields": {"kind": null, "value": 155}}, {"_type": "Constant", "_fiel...
class Higgs(MC, Signal): MASSES = range(100, 155, 5) MODES = ['Z', 'W', 'gg', 'VBF'] MODES_COMBINED = [['Z', 'W'], ['gg'], ['VBF']] MODES_DICT = { 'gg': ('ggf', 'PowPyth_', 'PowPyth8_AU2CT10_'), 'VBF': ('vbf', 'PowPyth_', 'PowPyth8_AU2CT10_'), 'Z': ('zh', 'Pyth8_AU2CTEQ6L1_', 'Py...
1,957
[ -0.003478729398921132, -0.006012879777699709, 0.013259351253509521, 0.009459888562560081, -0.006354760844260454, -0.0016829719534143806, -0.02623673900961876, -0.03138257935643196, 0.015028675086796284, 0.019060758873820305, 0.005068300757557154, -0.004296424798667431, 0.013280498795211315, ...
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": "sample", "annotation": null, "type_comment": null}}, {"_type": "a...
def histfactory(self, sample, category, systematics=False, rec=None, weights=None, mva=False, uniform=False, nominal=None): if not systematics: return if len(self.modes) != 1: raise TypeError( 'histfactory sample only valid ...
1,958
[ 0.034679096192121506, -0.045174431055784225, -0.013021019287407398, 0.021108446642756462, 0.01498398743569851, 0.03407711908221245, -0.05030431970953941, 0.03219267353415489, 0.046613942831754684, -0.018739799037575722, 0.0270889550447464, -0.025989694520831108, 0.0034908109810203314, -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": "isample", "annotation": null, "type_comment": null}}], "kwarg": n...
def xsec_kfact_effic(self, isample): # use yellowhiggs for cross sections xs, _ = yellowhiggs.xsbr( self.energy, self.masses[isample], Higgs.MODES_DICT[self.modes[isample]][0], 'tautau') log.debug("{0} {1} {2} {3} {4} {5}".format( self.samples[isample], ...
1,959
[ 0.0207001231610775, 0.002026463160291314, -0.029829539358615875, -0.006417928263545036, -0.00753367505967617, 0.05335240438580513, -0.01703818514943123, 0.019314181059598923, 0.005998331122100353, 0.009142130613327026, 0.004469344858080149, 0.01753407157957554, -0.013007509522140026, -0.02...
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": "mode", "annotation": null, "type_comment": null}}], "kwarg": {"_t...
def __init__(self, mode=None, **kwargs): self.energy = 8 if mode is not None: self.modes = [mode] self.masses = [125] self.samples = [self.SAMPLES[mode]] else: self.masses = [125] * 5 self.modes = ['ggf', 'vbf', 'zh', 'wh', 'tth'] ...
1,960
[ 0.015937402844429016, -0.02950502745807171, -0.026653483510017395, 0.00047200231347233057, -0.007480422966182232, 0.06067671254277229, -0.0269269198179245, 0.013749916106462479, 0.017382705584168434, -0.03583311289548874, 0.015260323882102966, 0.0002203355688834563, -0.011210869066417217, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "ggf"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "vbf"}}, {"_type": "Constant", "_...
class InclusiveHiggs(MC, Signal): # for overlap study SAMPLES = { 'ggf': 'PowPyth8_AU2CT10_ggH125p5_inclusive.mc12b', 'vbf': 'PowPyth8_AU2CT10_VBFH125p5_inclusive.mc12b', 'zh': 'Pyth8_AU2CTEQ6L1_ZH125p5_inclusive.mc12b', 'wh': 'Pyth8_AU2CTEQ6L1_WH125p5_inclusive.mc12b', '...
1,961
[ 0.027965931221842766, -0.03659482300281525, -0.009701007045805454, 0.009441100992262363, 0.014268862083554268, 0.03254028409719467, -0.0523451529443264, 0.021247349679470062, 0.051409490406513214, -0.014697708189487457, 0.029629331082105637, -0.024756086990237236, -0.00668609282001853, 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": "isample", "annotation": null, "type_comment": null}}], "kwarg": n...
def xsec_kfact_effic(self, isample): # use yellowhiggs for cross sections xs, _ = yellowhiggs.xs( self.energy, self.masses[isample], self.modes[isample]) log.debug("{0} {1} {2} {3} {4}".format( self.samples[isample], self.masses[isample], self.mode...
1,962
[ -0.025423673912882805, -0.038774095475673676, 0.014477924443781376, 0.011664158664643764, -0.015266178175807, -0.04134839400649071, -0.004332900512963533, 0.038175422698259354, 0.001899541588500142, -0.03202904015779495, -0.0006176939932629466, 0.0008393903844989836, 0.020714107900857925, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "address", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "amount", "annotation": null, "type_comment": null}}, {"_type":...
def add_transaction_to_database(address, amount, ip, transaction): database.faucet.insert({ 'address': address, 'ip': ip, 'amount': amount, 'transaction': transaction, 'created_at': int(time.time()) })
1,963
[ -0.043791260570287704, -0.08162672817707062, 0.031648825854063034, 0.05660314857959747, -0.009909014217555523, -0.07086935639381409, -0.005297888536006212, 0.03615029901266098, 0.009285733103752136, -0.023222988471388817, 0.014416258782148361, 0.022184187546372414, 0.003982073161751032, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "address", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def send_to_address(address): list1, list2, list3, list4 = random.uniform(0.01, 0.5), random.uniform(0.01, 0.2), random.uniform(0.01, 0.5), random.uniform(0.01, 2) all_ = [list1, list2, list3, list4] random.shuffle(all_) amount = Decimal(str(all_[0])[0:7]) bitcoind = bitcoinrpc.connect_to_local() ...
1,964
[ -0.01586206443607807, -0.021973727270960808, 0.03466808795928955, 0.02715509943664074, 0.020195575430989265, -0.02256251871585846, -0.003971403930336237, 0.05515806004405022, 0.022279899567365646, -0.009538434445858002, 0.02077259123325348, 0.0114578977227211, 0.04390035197138786, -0.05525...
12
{"_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 index(): bitcoind = bitcoinrpc.connect_to_local() balance = bitcoind.getbalance('') if balance < Decimal('2'): return render_template("base.html", balance=False) if request.method == 'GET': form = MyForm() elif request.method == 'POST': form = MyForm(request.form) ...
1,965
[ -0.01826573722064495, -0.01637233793735504, 0.03578896448016167, -0.006490771658718586, 0.00025910494150593877, -0.01805535890161991, -0.004219929687678814, -0.0021053242962807417, -0.006756837945431471, 0.020926397293806076, -0.00829135812819004, -0.010859203524887562, 0.01758510433137417, ...
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": "pj", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def __init__(self, pj, config_param): super().__init__() self.pj = pj self.config_param = config_param hbox = QVBoxLayout(self) self.label = QLabel("") hbox.addWidget(self.label) self.lw = QListWidget() #self.lw.setEnabled(False) self.lw.setMax...
1,966
[ -0.019094448536634445, 0.015038767829537392, -0.011625445447862148, -0.08685706555843353, -0.01510174386203289, -0.024699348956346512, 0.053101710975170135, 0.0012666131369769573, -0.002199451206251979, 0.024623777717351913, 0.027835574001073837, -0.017784539610147476, 0.019170019775629044, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "filename", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Name", "_fields": {"id": "VECTOR_FILENAME"...
def _get_test_vectors_nessie(filename=VECTOR_FILENAME): vectors = {} with open(VECTOR_FILENAME) as vector_file: for line in vector_file: line = line.strip() if "Set " in line: name = line[:-1] # colone at lineend if "key=" in line: _, ...
1,967
[ 0.04630230739712715, 0.05349036678671837, -0.014796201139688492, -0.024224694818258286, 0.08457639068365097, 0.010992130264639854, 0.0039411806501448154, -0.007158887572586536, -0.053583718836307526, -0.031482767313718796, 0.014889552257955074, -0.0050409771502017975, 0.0321362279355526, 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": "key", "annotation": null, "type_comment": null}}], "kwarg": null,...
def __getattr__(self, key): # Do we need to load now? if key == 'data' and 'data' not in self.__dict__: self._read() try: return self.__dict__[key] except KeyError: raise AttributeError("ABFField has no attribute '{}'".format(key))
1,968
[ 0.02995849773287773, -0.003860180964693427, -0.003320753574371338, -0.02540610358119011, 0.012434897013008595, -0.0066227987408638, 0.047020621597766876, 0.006523020099848509, 0.02836204133927822, -0.005528353154659271, 0.030507279559969902, -0.00022703508147969842, -0.0033675245940685272, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "vector", "annotation": null, "type_comment": null}}], "kwarg": nu...
def test_vectors_nessie(name, vector): (key, plain, cipher, decrypted, i100, i1000) = map( binascii.unhexlify, vector[1:]) cam = camellia.new(key, camellia.MODE_ECB) cipher_result = cam.encrypt(plain) decrypted_result = cam.decrypt(cipher) i100_result = plain for i in range(100): ...
1,969
[ -0.021770324558019638, -0.051500674337148666, 0.01857719197869301, -0.035717472434043884, -0.004444727208465338, 0.02513451874256134, 0.03754211962223053, -0.02164488099515438, 0.032820846885442734, -0.04178442806005478, 0.027187246829271317, -0.0483531579375267, -0.026274923235177994, -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": "callbacks", "annotatio...
class SessionFactory: def __init__(self, callbacks, settings): self.settings = settings self.callbacks = callbacks def create_session(self): cache_dir = self.addon_dir('libspotify/cache') settings_dir = self.addon_dir('libspotify/settings') ...
1,970
[ 0.0010738116689026356, -0.06402648240327835, 0.008384979330003262, -0.04819601774215698, -0.005316946189850569, 0.00980596337467432, 0.044766865670681, 0.0029417891055345535, 0.01809699274599552, -0.02999332919716835, -0.0001428507239324972, -0.014080658555030823, 0.003473190125077963, -0....
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 create_session(self): cache_dir = self.addon_dir('libspotify/cache') settings_dir = self.addon_dir('libspotify/settings') self.session = Session( self.callbacks, app_key=appkey, user_agent="spotlight", settings_location...
1,971
[ 0.018526142463088036, 0.005568870343267918, 0.053676191717386246, -0.006471743807196617, 0.017947200685739517, 0.02933305874466896, -0.028395725414156914, -0.05127771571278572, -0.015383315272629261, 0.02330930531024933, 0.05472379922866821, -0.04074648767709732, -0.00490033021196723, 0.04...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class RulesTest(unittest.TestCase): def testPawn(self): b = chess.Board.new() m = chess.Move.on_board((1, 0), (3, 0), b) self.assertTrue(m.is_valid(b)) m = chess.Move.on_board((1, 0), (1, 1), b) self.assertFalse(m.is_valid(b)) m = chess.Move.on_board((2, 0), (2, 1), b...
1,972
[ 0.03740258887410164, 0.00741580780595541, 0.07371804863214493, 0.0032678733114153147, 0.021665029227733612, 0.017342377454042435, -0.0277995727956295, -0.014391585253179073, -0.022545091807842255, 0.017420029267668724, 0.06062066927552223, -0.014546889811754227, -0.00669105164706707, 0.023...
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 testPawn(self): b = chess.Board.new() m = chess.Move.on_board((1, 0), (3, 0), b) self.assertTrue(m.is_valid(b)) m = chess.Move.on_board((1, 0), (1, 1), b) self.assertFalse(m.is_valid(b)) m = chess.Move.on_board((2, 0), (2, 1), b) self.assertFalse(m.is_valid(b)...
1,973
[ 0.026028629392385483, 0.018847867846488953, 0.06152697280049324, -0.000691998575348407, -0.003407265292480588, 0.025060731917619705, -0.023360367864370346, -0.03743414208292961, -0.04897044599056244, 0.05302515998482704, 0.04598827287554741, -0.012811579741537571, 0.0032699285075068474, 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 testCastle(self): board = """ bR __ __ __ bK bB bN bR bp __ bp bp __ bp bp bp __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ bp __ __ __ __ __ __ wp __ __ __ bp __ __ __ __ wp wp wp wp wp wp wp wR wN wB wQ wK wB wN wR """ b ...
1,974
[ 0.02703705243766308, 0.002313322154805064, 0.057772815227508545, -0.00935747753828764, -0.021059207618236542, 0.02355974353849888, -0.026984957978129387, -0.020928971469402313, -0.04813533276319504, 0.020303837954998016, 0.05917936936020851, -0.008686760440468788, -0.01967870257794857, 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 testBishop(self): board = """ bR bN bB bQ bK bB bN bR bp __ bp bp __ bp bp bp __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ bp __ __ __ __ __ __ __ __ __ __ bp __ __ __ __ __ wp wp wp wp wp wp wR wN wB wQ wK wB wN wR """ b ...
1,975
[ 0.014567499980330467, 0.012412864714860916, 0.059896137565374374, 0.007541222032159567, 0.0024341274984180927, 0.017901085317134857, -0.01857864484190941, -0.06255216896533966, -0.053635500371456146, 0.05444857105612755, 0.028403237462043762, -0.022223906591534615, 0.004807274788618088, 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 testBadCastle(self): board = """ bR __ __ __ bK bB bN bR bp __ bp bp __ bp bp bp __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ bp __ __ __ __ __ __ wp __ __ __ bp __ __ __ __ wp wp wp wp wp wp wp wR wN wB wQ wK wB wN wR """ ...
1,976
[ 0.058907486498355865, -0.004973315168172121, 0.06242275983095169, -0.012889341451227665, 0.02133132703602314, 0.000814738217741251, 0.0047669257037341595, -0.011670978739857674, -0.03416740521788597, 0.025352587923407555, 0.04058544710278511, -0.027030333876609802, 0.005522576626390219, 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 testEnPassant(self): board = """ __ __ __ bK __ __ __ __ __ __ bp __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ wp __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ wK __ __ __ __ """ ...
1,977
[ 0.015540982596576214, 0.005812125746160746, 0.05037595331668854, 0.021397186443209648, 0.024570873007178307, -0.0021960767917335033, 0.023915985599160194, -0.027681587263941765, -0.030905649065971375, 0.04498572647571564, 0.05415415018796921, -0.04405377432703972, 0.0011342461220920086, 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 testBadInCheck(self): board = """ __ __ __ __ __ __ __ __ __ __ __ bK __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ wp __ __ __ __ wB __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ wK __ bR __ __ """ ...
1,978
[ 0.02275594137609005, 0.015439282171428204, 0.0478290319442749, 0.006006964016705751, 0.041784290224313736, 0.020602500066161156, 0.004612265154719353, -0.011887995526194572, -0.045411136001348495, 0.04916391521692276, 0.05807990953326225, -0.026017583906650543, -0.005194701254367828, 0.038...
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 testInCheck(self): board = """ __ __ __ bK __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ wB __ __ wp __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ wK __ __ __ __ """ b...
1,979
[ 0.036453697830438614, 0.02298601344227791, 0.028829069808125496, 0.008901629596948624, 0.006665321066975594, 0.030349012464284897, 0.003762480104342103, -0.02343452163040638, -0.020382177084684372, 0.04308164492249489, 0.050581686198711395, -0.04607169330120087, 0.011723489500582218, 0.048...
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 testBadCheck(self): board = """ __ __ __ __ __ __ __ __ __ __ __ bK __ bR __ __ __ __ __ __ __ __ __ __ __ __ __ wp __ __ __ __ wB __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ wK __ __ __ __ """ ...
1,980
[ 0.029393957927823067, 0.021670091897249222, 0.0472593754529953, -0.0016780642326921225, 0.011853017844259739, 0.02249719388782978, -0.0004895016318187118, -0.01476060226559639, -0.03181164339184761, 0.03140445426106453, 0.04570696875452995, -0.022509919479489326, -0.004790833685547113, 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 testCheckmate(self): board = """ __ __ __ bK __ __ __ __ __ __ __ wQ __ __ __ __ __ __ __ __ __ __ __ __ wB __ __ wp __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ wK __ __ __ __ """ ...
1,981
[ -0.0020383354276418686, 0.00615884130820632, 0.0072328029200434685, 0.000034652901376830414, 0.02406550757586956, 0.011605361476540565, 0.0032684598118066788, 0.003391746198758483, 0.0011123174335807562, -0.017358727753162384, -0.016997087746858597, -0.0431995615363121, 0.037303730845451355,...
7
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "users.User"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}...
class MoneyLog(AbstractDateTimeModel): user = models.ForeignKey('users.User') task = models.ForeignKey('task.Task', default=None, null=True) reason = models.CharField(max_length=255) debit = models.DecimalField(max_digits=7, decimal_places=2, default=0) credit = models.DecimalField(max_digits=7, dec...
1,982
[ 0.02339482307434082, -0.01397512573748827, 0.054253339767456055, -0.02753845974802971, 0.012122070416808128, 0.041848164051771164, -0.023214664310216904, -0.022339610382914543, -0.042054060846567154, 0.0213487409055233, 0.04542559012770653, -0.0599154531955719, -0.020113371312618256, 0.010...
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 testStalemate(self): board = """ __ __ __ bK __ __ __ __ __ __ __ wQ __ __ __ __ __ __ __ __ __ __ __ __ wB __ __ wp __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ wK __ __ __ __ """ ...
1,983
[ -0.021658116951584816, 0.0363362617790699, 0.011160102672874928, 0.0161930900067091, -0.013937503099441528, 0.05552557855844498, 0.0008738994365558028, 0.030927343294024467, -0.01733771525323391, 0.024822670966386795, 0.010200636461377144, -0.03956814482808113, 0.045942142605781555, -0.021...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cxt", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def get_registry_client(cxt): global _CLIENT_CREDS, _CLIENT_KWARGS, _CLIENT_HOST, _CLIENT_PORT kwargs = _CLIENT_KWARGS.copy() if CONF.use_user_token: kwargs['auth_token'] = cxt.auth_token if _CLIENT_CREDS: kwargs['creds'] = _CLIENT_CREDS return client.RegistryClient(_CLIENT_HOST, _CL...
1,984
[ 0.0031495667062699795, 0.036377061158418655, 0.013531898148357868, 0.028493059799075127, -0.013047792948782444, 0.06984949111938477, 0.036031272262334824, 0.01622905768454075, -0.01069066021591425, -0.009820424020290375, -0.013601056300103664, -0.03840569406747818, 0.05016253888607025, -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": "Global", "_fields": {"names": ["_CLIENT_CREDS"]}}, {"_type": "...
def configure_registry_admin_creds(): global _CLIENT_CREDS if CONF.auth_url or os.getenv('OS_AUTH_URL'): strategy = 'keystone' else: strategy = CONF.auth_strategy _CLIENT_CREDS = { 'user': CONF.admin_user, 'password': CONF.admin_password, 'username': CONF.admin_...
1,985
[ -0.020510729402303696, 0.012595304287970066, 0.06473620235919952, -0.01744547300040722, 0.00859659444540739, 0.06115376576781273, 0.03156078979372978, 0.0396086685359478, 0.041450344026088715, 0.017268873751163483, 0.0671076774597168, -0.037968818098306656, -0.004206844139844179, 0.0362028...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestPeriodClosingVoucher(unittest.TestCase): def test_closing_entry(self): year_start_date = get_fiscal_year(today())[1] make_journal_entry("_Test Bank - _TC", "Sales - _TC", 400, "_Test Cost Center - _TC", posting_date=now(), submit=True) make_journal_entry("_Test Account Cost for Goods Sold - _TC", ...
1,986
[ -0.0016687025781720877, 0.009554533287882805, 0.05986616760492325, -0.024013282731175423, 0.02571038156747818, 0.04305553436279297, 0.046556636691093445, 0.04177268594503403, 0.02800881490111351, 0.016837360337376595, 0.06104211136698723, -0.021140240132808685, -0.005569023545831442, 0.036...
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_closing_entry(self): year_start_date = get_fiscal_year(today())[1] make_journal_entry("_Test Bank - _TC", "Sales - _TC", 400, "_Test Cost Center - _TC", posting_date=now(), submit=True) make_journal_entry("_Test Account Cost for Goods Sold - _TC", "_Test Bank - _TC", 600, "_Test Cost Center - _TC...
1,987
[ 0.029634013772010803, 0.022113431245088577, -0.008366789668798447, -0.035596683621406555, -0.004976362455636263, 0.02853562869131565, -0.004626111593097448, 0.0047241817228496075, 0.011269668117165565, 0.005038006696850061, 0.04667020961642265, -0.05110858753323555, 0.05402267351746559, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "data", "annotation": n...
class callback_translator_server_class: def __init__(self, data, routine_name, routine_handler, argtypes_d, restype_d, memsync_d): # Store my own name self.name = routine_name # Store handler self.handler = routine_handler # Store handle on data self.data = data # Get handle on log self.log = sel...
1,988
[ -0.014250627718865871, 0.03885611891746521, 0.06761117279529572, 0.00390845350921154, -0.01283571682870388, 0.05154590308666229, 0.021230008453130722, 0.038576945662498474, 0.03814548999071121, 0.011503289453685284, 0.06613915413618088, -0.003876729169860482, -0.005104465875774622, -0.0013...
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 make_period_closing_voucher(self): pcv = frappe.get_doc({ "doctype": "Period Closing Voucher", "closing_account_head": "_Test Account Reserves and Surplus - _TC", "company": "_Test Company", "fiscal_year": get_fiscal_year(today())[0], "posting_date": today(), "remarks": "test" }) pcv.insert(...
1,989
[ -0.0014848597347736359, 0.040947191417217255, 0.02895185351371765, -0.05417700111865997, -0.013753877021372318, 0.023140519857406616, 0.01654890738427639, -0.02366458810865879, 0.008967388421297073, 0.03866458311676979, 0.01663042977452278, -0.028276387602090836, -0.01971660740673542, 0.00...
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 TestManager(unittest.TestCase): def setUp(self): self.spec = ArgumentSpec() self.patcher1 = patch('time.sleep') self.patcher1.start() def tearDown(self): self.patcher1.stop() def test_provision_one_module_default_level(self, *args): # Configure the arguments ...
1,990
[ 0.03301634639501572, 0.014310957863926888, 0.013962194323539734, -0.0066672093234956264, 0.002043176908046007, 0.020321328192949295, -0.00020562556164804846, 0.01884489320218563, 0.048315469175577164, 0.02797088958323002, 0.04052640125155449, -0.04803645610809326, 0.04608337953686714, -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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def __call__(self, *args): # Log status self.log.out('[callback-server] Trying to call callback routine "%s" ...' % self.name) # Log status self.log.out('[callback-server] ... parameters are "%r". Packing and pushing to client ...' % (args,)) try: # Handle memory mem_package_list = self.data.client_...
1,991
[ -0.007339704316109419, 0.02584223635494709, 0.061817776411771774, -0.03926076740026474, -0.01510741375386715, 0.02068304270505905, 0.032597772777080536, -0.011336343362927437, 0.02940508723258972, 0.046826042234897614, 0.010676984675228596, -0.01319874357432127, -0.019410597160458565, 0.03...
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def test_provision_one_module_default_level(self, *args): # Configure the arguments that would be sent to the Ansible module set_module_args(dict( module='gtm', password='password', server='localhost', user='admin' )) # Configure the param...
1,992
[ 0.023403752595186234, -0.0025754477828741074, 0.03002827800810337, -0.03194590285420418, -0.0209195539355278, 0.03728474676609039, -0.0031406572088599205, -0.00982238445430994, 0.022510312497615814, 0.04959677904844284, 0.027979904785752296, -0.048114974051713943, 0.0154935447499156, 0.003...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def test_provision_all_modules(self, *args): modules = [ 'afm', 'am', 'sam', 'asm', 'avr', 'fps', 'gtm', 'lc', 'ltm', 'pem', 'swg', 'ilx', 'apm', ] for module in modules: # Configure the arguments that would be sent to the Ansible module ...
1,993
[ 0.03976249322295189, 0.03673404082655907, 0.013466810807585716, -0.02669527195394039, -0.011321655474603176, 0.013235471211373806, -0.04643631353974342, -0.008706809021532536, -0.011812377721071243, 0.04253857955336571, 0.027620632201433182, -0.03569651395082474, -0.00915546901524067, -0.0...
16
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "options", "annotation"...
class Core(cmd.Cmd): def __init__(self, options): cmd.Cmd.__init__(self) self.__options = options self.__binary = None self.__gadgets = [] self.__offset = 0 self.prompt = '(ROPgadget)> ' def __checksBeforeManipulations(self): if self.__binary == Non...
1,994
[ 0.033370424062013626, 0.06448035687208176, -0.005439294036477804, -0.030488302931189537, -0.011796911247074604, 0.01777307130396366, -0.03263576701283455, -0.023622076958417892, -0.015187639743089676, -0.0008953643264248967, 0.03820221126079559, -0.04653775319457054, -0.007600883953273296, ...
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 __getAllgadgets(self): if self.__checksBeforeManipulations() == False: return False G = Gadgets(self.__binary, self.__options, self.__offset) execSections = self.__binary.getExecSections() # Find ROP/JOP/SYS gadgets self.__gadgets = [] for section in ex...
1,995
[ 0.03346072509884834, 0.027929799631237984, -0.012073103338479996, -0.02081664279103279, 0.011460849083960056, 0.01796863041818142, -0.011295746080577374, -0.02922310121357441, -0.015299476683139801, 0.003996850457042456, 0.003296885872259736, -0.02684287540614605, -0.011557158082723618, -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 __lookingForGadgets(self): if self.__checksBeforeManipulations() == False: return False arch = self.__binary.getArchMode() print("Gadgets information\n============================================================") for gadget in self.__gadgets: vaddr = gadget...
1,996
[ 0.04417918249964714, 0.02979009598493576, 0.0071760318242013454, -0.05089244246482849, -0.007484545931220055, 0.04741240665316582, 0.0051244148053228855, -0.015721864998340607, -0.035071853548288345, 0.039045512676239014, 0.0026192825753241777, -0.02322492189705372, 0.017721034586429596, 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": "string", "annotation": null, "type_comment": null}}], "kwarg": nu...
def __lookingForAString(self, string): if self.__checksBeforeManipulations() == False: return False dataSections = self.__binary.getDataSections() arch = self.__binary.getArchMode() print("Strings information\n============================================================") ...
1,997
[ 0.03834867477416992, 0.06516097486019135, 0.017304565757513046, -0.04966507852077484, -0.01695016399025917, 0.0765995904803276, -0.023133857175707817, -0.03932633623480797, -0.01530036423355341, 0.011450831778347492, 0.04296811670064926, -0.012978424318134785, 0.03189612552523613, 0.007143...
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": "opcodes", "annotation": null, "type_comment": null}}], "kwarg": n...
def __lookingForOpcodes(self, opcodes): if self.__checksBeforeManipulations() == False: return False execSections = self.__binary.getExecSections() arch = self.__binary.getArchMode() print("Opcodes information\n============================================================") ...
1,998
[ 0.05229881778359413, 0.04576146602630615, 0.03554382547736168, -0.02520512416958809, -0.010356861166656017, 0.051281895488500595, 0.024055033922195435, -0.017977718263864517, -0.028207464143633842, 0.04363077133893967, 0.027481092140078545, -0.01844986155629158, 0.026004133746027946, 0.022...
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": "memstr", "annotation": null, "type_comment": null}}], "kwarg": nu...
def __lookingForMemStr(self, memstr): if self.__checksBeforeManipulations() == False: return False sections = self.__binary.getExecSections() sections += self.__binary.getDataSections() arch = self.__binary.getArchMode() print("Memory bytes information\n===========...
1,999
[ 0.06080804020166397, 0.04299558326601982, 0.014327923767268658, -0.015698112547397614, -0.016265086829662323, 0.012260828167200089, 0.0062662516720592976, 0.008947569876909256, 0.020363841205835342, 0.04786211624741554, -0.011481238529086113, -0.018178626894950867, 0.02187577448785305, 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": "s", "annotation": null, "type_comment": null}}, {"_type": "arg", ...
def do_binary(self, s, silent=False): # Do not split the filename with spaces since it might contain # whitespaces if len(s) == 0: if not silent: return self.help_binary() return False binary = s self.__options.binary = binary se...
2,000
[ 0.036170102655887604, 0.07074728608131409, 0.026969658210873604, -0.02680487371981144, 0.004579623695462942, 0.020062459632754326, -0.027038317173719406, -0.00976345594972372, -0.01289435289800167, 0.03375326842069626, 0.03487929329276085, -0.025953488424420357, 0.01840088702738285, -0.025...
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 analyze(self): try: self.__offset = int(self.__options.offset, 16) if self.__options.offset else 0 except ValueError: print("[Error] The offset must be in hexadecimal") return False if self.__options.console: if self.__options.binary: ...