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
13,301
[ 0.0170346237719059, 0.001262645935639739, 0.016268393024802208, -0.01775413192808628, 0.04074106365442276, -0.05572928860783577, 0.018772659823298454, -0.02661251090466976, -0.0015184455551207066, -0.0003363940923009068, 0.0020872787572443485, -0.02322988212108612, 0.023958735167980194, -0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}], "kwarg": {...
def __init__(self, request, *args, fields=None, head=None, filename=None, **kwargs): if filename: headers = kwargs.setdefault('headers', {}) v = 'attachment; filename="{}"'.format(filename) headers['Content-Disposition'] = v super().__init__(*args, **kwargs) s...
13,302
[ 0.019231263548135757, -0.0019317117985337973, 0.027852175757288933, -0.003212118521332741, 0.02257068268954754, -0.007839345373213291, 0.017964178696274757, -0.025483792647719383, 0.02037992887198925, -0.014257661066949368, -0.025081168860197067, 0.009390635415911674, 0.007413036655634642, ...
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": "msg", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def send(self, msg, ac_id=None): if isinstance(msg, PprzMessage): if "telemetry" in msg.msg_class: if ac_id is None: print("ac_id needed to send telemetry message.") else: IvySendMsg("%d %s %s" % (ac_id, msg.name, msg.payload_to...
13,303
[ -0.003896488109603524, 0.020763523876667023, 0.04538693279027939, -0.04581284895539284, 0.011213633231818676, 0.013083681464195251, -0.00853833369910717, -0.029574710875749588, -0.004215926863253117, -0.02317262440919876, 0.04237888380885124, -0.0244370698928833, 0.0162381399422884, 0.0107...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_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"...
class kb_uploadmethods_attribute_Test(unittest.TestCase): @classmethod def setUpClass(cls): cls.token = environ.get('KB_AUTH_TOKEN', None) config_file = environ.get('KB_DEPLOYMENT_CONFIG', None) cls.cfg = {} config = ConfigParser() config.read(config_file) for na...
13,304
[ 0.0016663855640217662, 0.03924252837896347, 0.04602181538939476, -0.04506634548306465, -0.013353833928704262, 0.043587639927864075, 0.020451612770557404, 0.04308715835213661, 0.018188057467341423, 0.002711431123316288, 0.05537177249789238, -0.042450178414583206, -0.0331457182765007, 0.0054...
10
{"_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 tearDownClass(cls): if hasattr(cls, 'wsName'): cls.wsClient.delete_workspace({'workspace': cls.wsName}) print('Test workspace was deleted') if hasattr(cls, 'nodes_to_delete'): for node in cls.nodes_to_delete: cls.delete_shock_node(node) if ...
13,305
[ -0.0006081656902097166, 0.010026801377534866, 0.05059938505291939, -0.06261461973190308, -0.005806660279631615, -0.0015997401205822825, 0.029389386996626854, 0.018502339720726013, -0.015907498076558113, 0.0012780292890965939, 0.02725992538034916, -0.00843323115259409, 0.00009667851554695517,...
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.token = environ.get('KB_AUTH_TOKEN', None) config_file = environ.get('KB_DEPLOYMENT_CONFIG', None) cls.cfg = {} config = ConfigParser() config.read(config_file) for nameval in config.items('kb_uploadmethods'): cls.cfg[nameval[0]] = nam...
13,306
[ 0.008721421472728252, 0.01581951417028904, 0.015278402715921402, -0.05114021152257919, 0.0012732002651318908, -0.020753163844347, -0.021145734935998917, 0.003533130744472146, 0.012084792368113995, -0.014620582573115826, 0.051437292248010635, -0.039745066314935684, -0.012243942357599735, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "params", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def mock_download_staging_file(params): print('Mocking DataFileUtilClient.download_staging_file') print(params) fq_filename = params.get('staging_file_subdir_path') fq_path = os.path.join('/kb/module/work/tmp', fq_filename) shutil.copy(os.path.join("data", fq_filename), fq_path)...
13,307
[ 0.022448904812335968, 0.045626670122146606, 0.05374131724238396, -0.05495608597993851, -0.007057799492031336, -0.007634814362972975, -0.01186220534145832, -0.039747197180986404, -0.027186498045921326, -0.012597139924764633, 0.04599110037088394, -0.002575307385995984, 0.02080896869301796, -...
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_bad_import_attribute_mapping_from_staging_params(self): invalidate_input_params = { 'missing_staging_file_subdir_path': 'staging_file_subdir_path', 'workspace_name': 'workspace_name', 'attribute_mapping_name': 'attribute_mapping_name', } with self.assertRai...
13,308
[ 0.02136887051165104, 0.029089855030179024, 0.02966652624309063, -0.04359206557273865, -0.019446631893515587, -0.006775885820388794, -0.0019022139022126794, -0.029111213982105255, -0.015655552968382835, -0.055531296879053116, 0.03167419508099556, -0.014726472087204456, 0.020183490589261055, ...
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": "download_staging_file", "annotation": null, "type_comment": null}...
def test_import_excel_attribute_mapping_from_staging(self, download_staging_file, update_staging_service, file_to_shock): ws_obj_name = 'MyAttributeMapping' params = {'staging_file_subdir_path': "AM1.xlsx", 'workspace_name': se...
13,309
[ 0.0106757041066885, 0.021598679944872856, 0.03266141936182976, -0.05108856409788132, -0.021953461691737175, -0.002924261149019003, 0.016911260783672333, -0.040101081132888794, -0.02902759239077568, -0.04407893866300583, 0.04302534461021423, 0.00029766722582280636, 0.02198571339249611, -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": "download_staging_file", "annotation": null, "type_comment": null}...
def test_import_tsv_attribute_mapping_from_staging(self, download_staging_file, update_staging_service, file_to_shock): ws_obj_name = 'MyAttributeMapping' params = {'staging_file_subdir_path': "AM2.tsv", 'workspace_name': self.ws...
13,310
[ -0.0326874703168869, -0.024290690198540688, 0.037047337740659714, -0.037139613181352615, -0.022214563563466072, 0.006643607746809721, -0.006361023522913456, 0.02901964634656906, 0.015328740701079369, -0.004527111072093248, 0.07081901282072067, -0.004622267093509436, 0.026089999824762344, 0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "idx", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def test_groupby(idx): groups = idx.groupby(np.array([1, 1, 1, 2, 2, 2])) labels = idx.tolist() exp = {1: labels[:3], 2: labels[3:]} tm.assert_dict_equal(groups, exp) # GH5620 groups = idx.groupby(idx) exp = {key: [key] for key in idx} tm.assert_dict_equal(groups, exp)
13,311
[ 0.012240505777299404, 0.014273108914494514, 0.06591534614562988, -0.06509461253881454, -0.035984136164188385, 0.023108843713998795, -0.007476390339434147, -0.00022642371186520904, 0.01248416118323803, 0.010887573473155499, 0.07237864285707474, -0.0108298659324646, -0.012618813663721085, -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": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def test_truncate_multiindex(): # GH 34564 for MultiIndex level names check major_axis = Index(list(range(4))) minor_axis = Index(list(range(2))) major_codes = np.array([0, 0, 1, 2, 3, 3]) minor_codes = np.array([0, 1, 0, 1, 0, 1]) index = MultiIndex( levels=[major_axis, minor_axis], ...
13,312
[ 0.004169565625488758, -0.018405167385935783, 0.04839877411723137, -0.023358657956123352, -0.038719020783901215, 0.032038625329732895, 0.00958886556327343, 0.005998721346259117, -0.0006380032282322645, 0.04355889558792114, 0.00377476355060935, -0.030902503058314323, 0.07421145588159561, -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": "Assign", "_fields": {"value": {"_type": "Constant", "_fields":...
def test_numpy_repeat(): reps = 2 numbers = [1, 2, 3] names = np.array(["foo", "bar"]) m = MultiIndex.from_product([numbers, names], names=names) expected = MultiIndex.from_product([numbers, names.repeat(reps)], names=names) tm.assert_index_equal(np.repeat(m, reps), expected) msg = "the 'a...
13,313
[ -0.0067452299408614635, -0.02997880056500435, 0.045577939599752426, -0.045501720160245895, -0.025634415447711945, 0.02779390476644039, 0.012868018820881844, 0.007139019202440977, 0.0007212854688987136, 0.004217356443405151, -0.0013909655390307307, -0.0016180295497179031, 0.02670145593583584,...
9
{"_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 test_append_mixed_dtypes(): # GH 13660 dti = date_range("2011-01-01", freq="M", periods=3) dti_tz = date_range("2011-01-01", freq="M", periods=3, tz="US/Eastern") pi = period_range("2011-01", freq="M", periods=3) mi = MultiIndex.from_arrays( [[1, 2, 3], [1.1, np.nan, 3.3], ["a", "b", "c...
13,314
[ -0.02700229547917843, 0.00817787367850542, -0.0030169307719916105, -0.004413601476699114, 0.02148912288248539, 0.007522418163716793, 0.011706303805112839, 0.019577890634536743, 0.03687700256705284, 0.002500836504623294, 0.06111045926809311, -0.021611638367176056, 0.03636243939399719, 0.006...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "idx", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def test_sub(idx): first = idx # - now raises (previously was set op difference) msg = "cannot perform __sub__ with this index type: MultiIndex" with pytest.raises(TypeError, match=msg): first - idx[-3:] with pytest.raises(TypeError, match=msg): idx[-3:] - first with pytest.rai...
13,315
[ -0.009945022873580456, 0.0040422240272164345, 0.0043550641275942326, -0.008166774176061153, -0.01858380064368248, -0.01843012496829033, -0.008276542648673058, 0.006937366910278797, 0.01585056632757187, -0.017508070915937424, 0.05312793701887131, -0.000930973794311285, 0.08175555616617203, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "idx", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}...
def test_map(idx): # callable index = idx # we don't infer UInt64 if isinstance(index, UInt64Index): expected = index.astype("int64") else: expected = index result = index.map(lambda x: x) tm.assert_index_equal(result, expected)
13,316
[ 0.014809712767601013, 0.009448349475860596, 0.008392918854951859, -0.025173142552375793, -0.006995034869760275, -0.008566953241825104, 0.04349721595644951, 0.017336009070277214, 0.008510813117027283, -0.010262378491461277, 0.02317456156015396, -0.013282706961035728, 0.04295827075839043, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "idx", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mapper", "annotation": null, "type_comment": null}}], "kwarg": nul...
def test_map_dictlike(idx, mapper): if isinstance(idx, (pd.CategoricalIndex, pd.IntervalIndex)): pytest.skip(f"skipping tests for {type(idx)}") identity = mapper(idx.values, idx) # we don't infer to UInt64 for a dict if isinstance(idx, UInt64Index) and isinstance(identity, dict): expe...
13,317
[ -0.035255204886198044, 0.0021050097420811653, -0.025114478543400764, -0.017703119665384293, 0.011327407322824001, -0.035255204886198044, -0.025157630443572998, 0.009148229844868183, 0.06645411998033524, 0.027444688603281975, 0.041641704738140106, 0.010987584479153156, 0.02604224719107151, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "idx", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "func", "annotation": null, "type_comment": null}}], "kwarg": null,...
def test_numpy_ufuncs(idx, func): # test ufuncs of numpy. see: # https://numpy.org/doc/stable/reference/ufuncs.html expected_exception = TypeError msg = ( "loop of ufunc does not support argument 0 of type tuple which " f"has no callable {func.__name__} method" ) with pytest.rai...
13,318
[ 0.015633754432201385, 0.005199216306209564, 0.0212421678006649, -0.04775576293468475, 0.024130621924996376, 0.025105474516749382, -0.0082381097599864, 0.018955476582050323, 0.015044028870761395, -0.02120606228709221, 0.03129157796502113, -0.02984735369682312, 0.014502443373203278, -0.05136...
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": "article", "annotation": null, "type_comment": null}}, {"_type": "...
def format(self, article, subscriber, codes=None): try: pub_seq_num = superdesk.get_resource_service("subscribers").generate_sequence_number(subscriber) nitf = self.get_nitf(article, subscriber, pub_seq_num) return [ ( pub_seq_num, ...
13,319
[ -0.02118760719895363, 0.02956664003431797, -0.02904295176267624, -0.035021740943193436, 0.01817639172077179, -0.02701365388929844, -0.026359042152762413, 0.0013071782886981964, 0.050405122339725494, 0.0030275804456323385, 0.02278049662709236, 0.011292056180536747, 0.007582588586956263, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "idx", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "func", "annotation": null, "type_comment": null}}], "kwarg": null,...
def test_numpy_type_funcs(idx, func): msg = ( f"ufunc '{func.__name__}' not supported for the input types, and the inputs " "could not be safely coerced to any supported types according to " "the casting rule ''safe''" ) with pytest.raises(TypeError, match=msg): func(idx)
13,320
[ 0.031851235777139664, 0.026861881837248802, 0.0154972393065691, -0.05599164962768555, 0.0008662074687890708, -0.01751313917338848, -0.01593821682035923, -0.005543727893382311, -0.019781028851866722, -0.011547332629561424, 0.03618542477488518, -0.019201457500457764, -0.013115955516695976, -...
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": "article", "annotation": null, "type_comment": null}}, {"_type": "...
def get_nitf(self, article, destination, pub_seq_num): if app.config.get("NITF_INCLUDE_SCHEMA", False): self._message_attrib.update(self._debug_message_extra) nitf = etree.Element("nitf", attrib=self._message_attrib) head = SubElement(nitf, "head") body = SubElement(nitf, "bo...
13,321
[ 0.03965106979012489, 0.03971979022026062, 0.006402353756129742, -0.01977972313761711, 0.015690920874476433, -0.0027716807089746, -0.009569170884788036, 0.0019771133083850145, -0.022413963451981544, 0.02890794351696968, 0.0652833878993988, -0.04333901032805443, 0.002588429255411029, -0.0292...
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": "html_elem", "annotation": null, "type_comment": null}}, {"_type":...
def _parse_children(self, html_elem, root_elem, attr_remove): children = list(html_elem) idx = 0 while idx < len(children): child = children[idx] try: self.html2nitf(child, root_elem=root_elem, attr_remove=attr_remove) except ValueError: ...
13,322
[ 0.02494029700756073, 0.04394018277525902, 0.012599799782037735, -0.016489354893565178, -0.011886714957654476, -0.03142288699746132, 0.0017267265357077122, -0.014591723680496216, 0.031705763190984726, 0.00198897672817111, 0.03908413276076317, -0.04151215776801109, -0.010843606665730476, 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": "article", "annotation": null, "type_comment": null}}, {"_type": "...
def _format_head(self, article, head): tobject = self._format_tobject(article, head) if article.get("genre"): SubElement(tobject, "tobject.property", {"tobject.property.type": article["genre"][0]["name"]}) self._format_subjects(article, tobject) docdata = SubElement(head, "d...
13,323
[ -0.005381755065172911, 0.04557210952043533, -0.005119456443935633, 0.011510291136801243, 0.0030457526445388794, 0.0207123514264822, -0.0025597282219678164, 0.006106934510171413, 0.03680824488401413, -0.006597587373107672, 0.025205377489328384, -0.011522633954882622, -0.02155170775949955, 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": "article", "annotation": null, "type_comment": null}}, {"_type": "...
def _format_docdata(self, article, docdata): SubElement(docdata, "urgency", {"ed-urg": str(article.get("urgency", ""))}) self._format_docdata_dateissue(article, docdata) self._format_docdata_doc_id(article, docdata) # ednote can exist and be set to None, that why we can't use default ...
13,324
[ 0.00027401288389228284, 0.011510237120091915, 0.030865894630551338, -0.03075730800628662, -0.012012452818453312, 0.03626810759305954, -0.018011892214417458, 0.003417101688683033, 0.0033475379459559917, 0.011041955091059208, 0.0324675552546978, -0.04639385640621185, 0.006287874188274145, 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 CompilerTest(unittest.TestCase): def setUp(self): self.zeropage = dict( type='T_ADDRESS', value='$00' ) self.address10 = dict( type='T_ADDRESS', value='$1234' ) self.separator = dict( type='T_SEPARATOR', ...
13,325
[ 0.03471451997756958, 0.01691708341240883, 0.050251588225364685, 0.005710407625883818, -0.016262764111161232, 0.005142340902239084, 0.011278054676949978, -0.00248194532468915, 0.040995966643095016, 0.013895325362682343, 0.045159805566072464, -0.03588039427995682, -0.0008900205721147358, -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": "article", "annotation": null, "type_comment": null}}, {"_type": "...
def _format_body_head(self, article, body_head): hedline = SubElement(body_head, "hedline") hl1 = SubElement(hedline, "hl1") hl1.text = article.get("headline", "") if article.get("byline"): byline = SubElement(body_head, "byline") byline.text = article["byline"] ...
13,326
[ 0.03832721337676048, -0.00053241295972839, 0.004751765634864569, -0.04205818101763725, 0.034335337579250336, 0.04492815583944321, 0.00015766517026349902, -0.01844611205160618, 0.03383961319923401, 0.0028455150313675404, 0.02843884378671646, -0.052885811775922775, 0.018093887716531754, -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_compile_more_than_on_instruction(self): code = ''' SEC ;clear the carry LDA $20 ;get the low byte of the first number ''' tokens = list(lexical(code)) self.assertEquals(6, len(tokens)) self.assertEquals('T_ENDLINE', tokens[0]['type...
13,327
[ 0.07849101722240448, -0.004314177203923464, 0.027492430061101913, 0.024959217756986618, -0.0257564727216959, -0.026900919154286385, 0.02206595428287983, 0.03865399584174156, -0.03389618545770645, -0.02823824994266033, 0.007477478124201298, -0.02375047653913498, -0.009477044455707073, -0.03...
6
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): self.zeropage = dict( type='T_ADDRESS', value='$00' ) self.address10 = dict( type='T_ADDRESS', value='$1234' ) self.separator = dict( type='T_SEPARATOR', value=',' )
13,328
[ 0.02557707019150257, -0.032680392265319824, 0.016314644366502762, -0.01727282628417015, 0.013682838529348373, 0.018895348533988, 0.00467592803761363, -0.0010803501354530454, 0.041061289608478546, -0.01660848781466484, 0.020581748336553574, -0.05314715951681137, 0.005544679705053568, -0.029...
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_compile_decimal(self): code = ''' LDA #128 STA $0203 ''' tokens = list(lexical(code)) self.assertEquals(7, len(tokens)) self.assertEquals('T_ENDLINE', tokens[0]['type']) self.assertEquals('T_INSTRUCTION', tokens[1]['type']) self.as...
13,329
[ -0.0003707260766532272, -0.0069423858076334, 0.025109626352787018, -0.06607235968112946, 0.0054062833078205585, 0.05532629415392876, -0.019417401403188705, -0.012867352925240993, 0.03910079225897789, 0.020015882328152657, 0.037824034690856934, -0.044766418635845184, 0.03668026998639107, -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_compile_list(self): code = ''' palette: .db $0F,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F .db $0F,$30,$31,$32,$33,$35,$36,$37,$38,$39,$3A,$3B,$3C,$3D,$3E,$0F ''' tokens = list(lexical(code)) ast = syntax(tokens) s...
13,330
[ -0.00037979381158947945, 0.033408232033252716, 0.008304370567202568, -0.03793169558048248, -0.01677224040031433, 0.031391747295856476, -0.011220097541809082, -0.030492505058646202, -0.006175481714308262, 0.02825802192091942, 0.020287461578845978, -0.030056508257985115, -0.0037740946281701326...
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_instructions_with_labels(self): code = ''' .org $C000 WAITVBLANK: BIT $2002 BPL WAITVBLANK RTS''' tokens = list(lexical(code)) ast = syntax(tokens) self.assertEquals(4, len(ast)) self.assertEquals('S_D...
13,331
[ -0.00044447591062635183, 0.0023711146786808968, 0.03826989606022835, -0.058165811002254486, -0.016035722568631172, 0.028059056028723717, -0.026218891143798828, -0.03342735394835472, -0.012251623906195164, 0.02404666505753994, 0.012666698545217514, -0.04687577858567238, 0.019660709425807, -...
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_several_lists_with_labels(self): code = ''' .org $E000 palette: .db $0F,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F .db $0F,$30,$31,$32,$33,$35,$36,$37,$38,$39,$3A,$3B,$3C,$3D,$3E,$0F sprites: .db $80, $00, ...
13,332
[ 0.07073824852705002, -0.0014057728694751859, 0.01921922340989113, -0.010952439159154892, -0.020022520795464516, 0.023523464798927307, 0.037287451326847076, -0.04901321604847908, 0.0134402671828866, 0.03479362651705742, 0.04596787318587303, -0.01378796435892582, 0.013056602329015732, -0.024...
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": "coords", "annotation": null, "type_comment": null}}, {"_type": "a...
def _assert_track_done(self, coords, queue_handle, parent_tile): coord_handles = self.tracker.track(queue_handle, coords, parent_tile) self.assertEqual(len(coords), len(coord_handles)) # all intermediate coords should not result in a done message. for coord in coord_handles[:-1]: ...
13,333
[ 0.029048409312963486, -0.0397426001727581, -0.03287842124700546, -0.06635373085737228, -0.012652721256017685, 0.035589274019002914, -0.006596824154257774, -0.020120002329349518, 0.00508906738832593, -0.004983368795365095, 0.052177708595991135, -0.012571892701089382, -0.023564526811242104, ...
21
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 3}}, "targets": [{"_type": "Name", "_fields": {"id": "api_version", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {...
class Decoder(srd.Decoder): api_version = 3 id = 'spdif' name = 'S/PDIF' longname = 'Sony/Philips Digital Interface Format' desc = 'Serial bus for connecting digital audio devices.' license = 'gplv2+' inputs = ['logic'] outputs = [] tags = ['Audio', 'PC'] channels = ( {'i...
13,334
[ 0.010142303071916103, -0.01934761367738247, -0.003770125564187765, -0.03188304230570793, -0.03162980452179909, 0.03904976323246956, -0.0443931482732296, -0.04533014073967934, 0.03841666132211685, 0.0056251161731779575, 0.004830572288483381, -0.0002542302245274186, -0.025146832689642906, 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 find_second_pulse_width(self): if self.pulse_width > (self.clocks[0] * 1.3) or \ self.pulse_width <= (self.clocks[0] * 0.75): self.puty([2, ['Found width 2: %d' % self.pulse_width, 'W2: %d' % self.pulse_width]]) self.clocks.append(self.pulse_width) self.st...
13,335
[ 0.02333145961165428, -0.012561637908220291, 0.0010078963823616505, -0.05511726438999176, -0.022170566022396088, 0.015608986839652061, -0.03099084086716175, -0.03247981518507004, 0.02485828846693039, -0.0120379738509655, 0.012340815737843513, 0.02402547374367714, -0.022082237526774406, 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 find_third_pulse_width(self): if not ((self.pulse_width > (self.clocks[0] * 1.3) or \ self.pulse_width <= (self.clocks[0] * 0.75)) \ and (self.pulse_width > (self.clocks[1] * 1.3) or \ self.pulse_width <= (self.clocks[1] * 0.75))): self.puty([2, ['...
13,336
[ 0.0458560548722744, -0.00880996510386467, -0.03605082258582115, -0.0074399360455572605, -0.020556585863232613, 0.030841022729873657, 0.010511751286685467, -0.01386002916842699, 0.010653054341673851, 0.032659538090229034, 0.03302815556526184, -0.009092572145164013, 0.002010502852499485, -0....
13
{"_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 decode_preamble(self): if self.preamble_state == 0: self.preamble.append(self.get_pulse_type()) self.preamble_state = 1 elif self.preamble_state == 1: self.preamble.append(self.get_pulse_type()) self.preamble_state = 2 elif self.preamble_state ...
13,337
[ 0.0382465161383152, -0.011932913213968277, -0.022692933678627014, -0.053494129329919815, -0.007279586978256702, 0.04451894387602806, 0.0022995718754827976, -0.009720989502966404, 0.02553592436015606, -0.009587126784026623, 0.03822102025151253, -0.008146507665514946, -0.00011244874622207135, ...
20
{"_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 decode_stream(self): pulse = self.get_pulse_type() if not self.seen_preamble: # This is probably the start of a preamble, decode it. if pulse == 2: self.preamble.append(self.get_pulse_type()) self.state = 'DECODE PREAMBLE' self...
13,338
[ 0.02431487664580345, -0.021387968212366104, -0.02551858313381672, -0.027723267674446106, -0.022376274690032005, 0.027571219950914383, -0.01152390893548727, -0.0090404711663723, 0.023909417912364006, -0.00957897212356329, 0.06391049176454544, -0.01825833134353161, -0.04429640993475914, 0.01...
13
{"_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 decode(self): # Set samplerate to 0 if it is not given. Decoding is still possible. if not self.samplerate: self.samplerate = 0 # Throw away first two edges as it might be mangled data. self.wait({0: 'e'}) self.wait({0: 'e'}) self.ss_edge = 0 self...
13,339
[ 0.0012198507320135832, -0.05335110425949097, 0.01578303426504135, -0.0254751518368721, 0.02091807872056961, -0.01005334872752428, -0.012415246106684208, 0.038012661039829254, -0.006240967661142349, -0.007819270715117455, -0.011320437304675579, -0.07473600655794144, -0.05015003681182861, -0...
17
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "ECNU001"}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, ...
class ECNU001_Spider(scrapy.Spider): name = 'ECNU001' start_urls = ['http://www.cs.ecnu.edu.cn/s/69/t/247/p/11/list.htm'] domain = 'http://www.cs.ecnu.edu.cn/' counts = 0 def parse(self, response): messages = response.xpath("//table[@height='28']").xpath("./tr") for i, message in enumerate(messages): repo...
13,340
[ -0.010709592141211033, -0.018965288996696472, 0.01411915197968483, -0.018743328750133514, 0.04811609536409378, -0.027621746063232422, -0.03442853316664696, 0.002321336418390274, 0.0009857203112915158, 0.0004331311793066561, -0.029644053429365158, -0.03472448140382767, -0.034453194588422775, ...
16
{"_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": "response", "annotation": null, "type_comment": null}}], "kwarg": ...
def parse_pages(self, response): report_time = get_localtime(re.split(u"[::]", response.xpath("//td[@height='32']/div/strong")[0].xpath("text()").extract()[0])[-1]) if report_time < now_time or report_time > end_time: return messages = response.xpath("//span[contains(@class, 'content')]/p") return {'text'...
13,341
[ 0.005317727103829384, 0.0030927606858313084, 0.03127472475171089, -0.03471175581216812, 0.035053182393312454, 0.0034569494891911745, -0.030682915821671486, -0.006333473138511181, 0.0355539433658123, -0.0005914513603784144, -0.01735587790608406, -0.06145688146352768, -0.05112301930785179, -...
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": "response", "annotation": null, "type_comment": null}}], "kwarg": ...
def parse(self, response): messages = response.xpath("//table[@height='28']").xpath("./tr") for i, message in enumerate(messages): report_url = self.domain + message.xpath(".//a/@href").extract()[0][1:] yield scrapy.Request(report_url, callback=self.parse_pages, meta={'link': report_...
13,342
[ -0.03534034639596939, -0.012520374730229378, 0.04998546466231346, -0.027249520644545555, 0.007748707197606564, -0.05641971156001091, -0.04345518350601196, 0.041630543768405914, 0.0168899018317461, 0.07989991456270218, 0.002471363404765725, -0.0007435097359120846, -0.001219926169142127, -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": "req", "annotation": null, "type_comment": null}}], "kwarg": null,...
def _test_list_ips(self, req): ip_range = '192.168.1.1/28' self._setup_floating_ips(ip_range) res_dict = self.controller.index(req) ip_info = [{'address': str(ip_addr), 'pool': CONF.default_floating_pool, 'interface': CONF.public_interface, ...
13,343
[ -0.013419716618955135, 0.0019564947579056025, 0.06423605978488922, -0.022177984938025475, 0.006046751048415899, -0.02609097585082054, -0.030778683722019196, 0.015008548274636269, 0.035400740802288055, 0.07390035688877106, 0.0359259732067585, -0.027180835604667664, -0.027758590877056122, -0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "fipbulk_v21", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "floating_ips_bulk", "ctx": {"_type": "Store", "_fiel...
class FloatingIPBulkV21(test.TestCase): floating_ips_bulk = fipbulk_v21 bad_request = exception.ValidationError def setUp(self): super(FloatingIPBulkV21, self).setUp() self.context = context.get_admin_context() self.controller = self.floating_ips_bulk.FloatingIPBulkController() ...
13,344
[ 0.012318208813667297, 0.01811232976615429, 0.012911307625472546, -0.011023656465113163, 0.00980894360691309, -0.015431977808475494, -0.05214708298444748, 0.05680062994360924, 0.052101459354162216, 0.07345302402973175, 0.045280821621418, -0.018500125035643578, -0.018728239461779594, -0.0326...
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": "req", "annotation": null, "type_comment": null}}], "kwarg": null,...
def _test_delete_ips(self, req): ip_range = '192.168.1.0/29' self._setup_floating_ips(ip_range) body = {'ip_range': ip_range} res_dict = self.controller.update(req, "delete", body=body) response = {"floating_ips_bulk_delete": ip_range} self.assertEqual(res_dict, respons...
13,345
[ -0.052029553800821304, -0.01904161460697651, 0.040161408483982086, -0.0013731933431699872, -0.0027401272673159838, -0.04394218698143959, -0.021069714799523354, 0.007561561651527882, 0.04654616862535477, 0.032099079340696335, 0.006015447434037924, -0.03237450122833252, -0.003971697762608528, ...
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": "req", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def _test_list_ips_associated(self, req, mock_get): instance_uuid = "fake-uuid" fixed_address = "10.0.0.1" floating_address = "192.168.0.1" fixed_ip = objects.FixedIP(instance_uuid=instance_uuid, address=fixed_address) floating_ip = objects.Floa...
13,346
[ 0.05291568487882614, -0.00709528848528862, 0.05138690024614334, -0.024744125083088875, -0.01531250774860382, 0.022759169340133667, -0.029712675139307976, 0.005375405307859182, 0.013117961585521698, 0.06090481951832771, 0.04149911552667618, -0.010812454856932163, -0.013043987564742565, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class FloatingIPBulkPolicyEnforcementV21(test.NoDBTestCase): def setUp(self): super(FloatingIPBulkPolicyEnforcementV21, self).setUp() self.controller = fipbulk_v21.FloatingIPBulkController() self.req = fakes.HTTPRequest.blank('') def _common_policy_check(self, func, *arg, **kwarg): ...
13,347
[ -0.015966396778821945, 0.011794368736445904, 0.04474642872810364, -0.014750874601304531, -0.014459655620157719, -0.010110363364219666, -0.04927931725978851, 0.010066047310829163, 0.03813702613115311, 0.0554075762629509, 0.03844090551137924, -0.03780782222747803, -0.021031076088547707, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "fipbulk_v2", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "floating_ips_bulk", "ctx": {"_type": "Store", "_field...
class FloatingIPBulkV2(FloatingIPBulkV21): floating_ips_bulk = fipbulk_v2 bad_request = webob.exc.HTTPBadRequest def setUp(self): super(FloatingIPBulkV2, self).setUp() self.non_admin_req = fakes.HTTPRequest.blank('') self.admin_req = fakes.HTTPRequest.blank('', use_admin_context=Tru...
13,348
[ 0.036967482417821884, -0.002658124314621091, -0.04901957884430885, -0.03295011818408966, -0.008227872662246227, 0.025823159143328667, 0.031134579330682755, 0.007527730893343687, 0.0504874624311924, 0.00565424794331193, -0.02138088084757328, -0.027851155027747154, 0.020395852625370026, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def _escape_string(value): if '"' in value and "'" in value: substrings = value.split('"') result = ['concat('] for substring in substrings: result.append('"%s"' % substring) result.append(', \'"\', ') result.pop() if va...
13,349
[ 0.04634098336100578, 0.038948435336351395, -0.016555476933717728, -0.007829161360859871, 0.006818368565291166, 0.017847377806901932, -0.06315962225198746, -0.0041986797004938126, 0.03576653078198433, 0.032058294862508774, 0.022034095600247383, -0.055216822773218155, -0.0015745048876851797, ...
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": "func", "annotation": null, "type_comment": null}}], "kwarg": {"_t...
def _common_policy_check(self, func, *arg, **kwarg): rule_name = "os_compute_api:os-floating-ips-bulk" rule = {rule_name: "project:non_fake"} self.policy.set_rules(rule) exc = self.assertRaises( exception.PolicyNotAuthorized, func, *arg, **kwarg) self.assertEqual( ...
13,350
[ -0.012341205962002277, 0.02063062973320484, -0.008915157988667488, -0.018338337540626526, 0.021262560039758682, 0.010148040018975735, 0.039923056960105896, -0.007149473764002323, 0.04574671760201454, 0.021423639729619026, 0.024645239114761353, 0.018127694725990295, 0.023963747546076775, 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 TestIndent: def test_indent(self): h = [['blorpie'], ['whoops'], [], 'd-shtaeou', 'd-nthiouh', 'i-vhbjkhnth', {'nifty': 87}, {'field': 'yes', 'morefield': False} ] expect = textwrap.dedent("""\ [ \t[ \t\t"blorpie" \t], \t[ \t\t"whoo...
13,351
[ 0.004524183459579945, -0.0018936172127723694, 0.023894716054201126, -0.02494889497756958, 0.05130336061120033, 0.02535885199904442, -0.04415837302803993, 0.007847773842513561, 0.029185131192207336, 0.010395372286438942, -0.012630621902644634, -0.05739416927099228, 0.03455363214015961, 0.00...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "parser", "annotation":...
class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('email') def handle(self, *args, **options): session_key = create_pre_authenticated_session(options['email']) self.stdout.write(session_key)
13,352
[ 0.001109474920667708, 0.01864774338901043, 0.006161003839224577, -0.01669730804860592, 0.008381600491702557, -0.0050902413204312325, 0.039641283452510834, -0.018595030531287193, 0.04646780714392662, 0.023418404161930084, 0.025935519486665726, 0.01156423706561327, 0.007195525337010622, 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_indent(self): h = [['blorpie'], ['whoops'], [], 'd-shtaeou', 'd-nthiouh', 'i-vhbjkhnth', {'nifty': 87}, {'field': 'yes', 'morefield': False} ] expect = textwrap.dedent("""\ [ \t[ \t\t"blorpie" \t], \t[ \t\t"whoops" \t], ...
13,353
[ 0.013440970331430435, 0.007764965761452913, 0.003590028267353773, -0.012157752178609371, 0.034999046474695206, 0.004932931624352932, 0.040633272379636765, 0.013309665024280548, 0.06827917695045471, 0.012295026332139969, 0.03299364447593689, 0.016031282022595406, 0.010325434617698193, 0.026...
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_indent0(self): h = {3: 1} def check(indent, expected): d1 = self.dumps(h, indent=indent) self.assertEqual(d1, expected) sio = StringIO() self.json.dump(h, sio, indent=indent) self.assertEqual(sio.getvalue(), expected) # inden...
13,354
[ -0.0033379807136952877, 0.012306022457778454, 0.03384712338447571, 0.003268439555540681, -0.016856802627444267, 0.034025151282548904, 0.014731621369719505, -0.013518821448087692, 0.011538286693394184, 0.030108585953712463, -0.01574414223432541, -0.0394994392991066, 0.0007920750067569315, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "groupA", "annotation":...
class Collider( ): def __init__( self, groupA, groupB, callback ): self.groupA = groupA self.groupB = groupB self.callback = callback self.killA = False self.killB = False def check( self ): collisions = pygame.sprite.groupcollide( self.groupA, self.groupB, self.killA, self.killB ) for sprite in colli...
13,355
[ 0.005129104945808649, 0.03533143550157547, 0.04962813854217529, -0.034597162157297134, -0.02066759392619133, -0.002352639567106962, -0.03127134218811989, 0.014372291974723339, 0.05351546034216881, 0.023345526307821274, 0.014901399612426758, -0.0515718013048172, -0.0012579804752022028, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def main(): module = GcpModule(argument_spec=dict(model=dict(required=True, type='dict'))) if not module.params['scopes']: module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform'] return_value = {'resources': fetch_list(module, collection(module))} module.exit_json(**return...
13,356
[ 0.04586271196603775, -0.02717464603483677, 0.0542173758149147, -0.02752642147243023, -0.003347362158820033, -0.007354303263127804, 0.05197480693459511, 0.010278435423970222, -0.0026328186504542828, 0.01709408313035965, 0.0073378137312829494, -0.005963691510260105, 0.001201670034788549, -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_random_uuid(self): m1 = UUIDTestModel.objects.create() m2 = UUIDTestModel.objects.create() UUIDTestModel.objects.update(uuid=RandomUUID()) m1.refresh_from_db() m2.refresh_from_db() self.assertIsInstance(m1.uuid, uuid.UUID) self.assertNotEqual(m1.uuid, m2....
13,357
[ 0.017402030527591705, -0.028707319870591164, 0.06346752494573593, -0.008251436054706573, 0.002861959859728813, -0.011316254734992981, 0.04552818834781647, 0.002704332582652569, -0.007642858196049929, -0.005085187032818794, -0.008860013447701931, -0.024386968463659286, -0.0007120632799342275,...
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 TestRandomUUID(PostgreSQLTestCase): def test_random_uuid(self): m1 = UUIDTestModel.objects.create() m2 = UUIDTestModel.objects.create() UUIDTestModel.objects.update(uuid=RandomUUID()) m1.refresh_from_db() m2.refresh_from_db() self.assertIsInstance(m1.uuid, uuid....
13,358
[ -0.03859591856598854, -0.04317314550280571, 0.06421919167041779, -0.08542624115943909, 0.006405818276107311, -0.038480911403894424, -0.006497822701931, 0.012202106416225433, 0.010965794324874878, 0.026658324524760246, -0.007469621021300554, 0.021264556795358658, 0.025807281956076622, -0.03...
9
{"_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 suite(): # makeSuite is sort of obsolete http://bugs.python.org/issue2721 # using loadTestsFromTestCase instead. suite1 = unittest.TestLoader().loadTestsFromTestCase(ParrotNeuronTestCase) suite2 = unittest.TestLoader().loadTestsFromTestCase(ParrotNeuronPoissonTestCase) suite3 = unittest.TestLoa...
13,359
[ 0.04107632488012314, -0.023520559072494507, 0.016435738652944565, -0.05699112266302109, -0.0492551214993, 0.0063554998487234116, 0.08277778327465057, 0.02466663159430027, -0.005733624566346407, 0.009103472344577312, 0.023286134004592896, -0.02344241738319397, -0.042326588183641434, -0.0276...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): nest.set_verbosity('M_WARNING') nest.ResetKernel() # set up source spike generator, as well as parrot neurons self.spike_time = 1. self.delay = .2 self.source = nest.Create("spike_generator", 1, {"spike_times": [self.sp...
13,360
[ -0.026361476629972458, 0.022194886580109596, 0.07275952398777008, -0.043581847101449966, 0.012211226858198643, -0.013573160395026207, 0.025553550571203232, -0.021456211805343628, -0.002811871701851487, 0.03566417098045349, -0.049722086638212204, -0.002557951956987381, 0.0682351365685463, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "os"}}, {"_type": "Constant", "_fields": {"kind": null, "...
class TestGlm(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "glm/master@%s/%s" % (username, channel) generators = "cmake" def build(self): cmake = CMake(self) self.run('cmake "%s" %s' % (self.conanfile_directory, cmake.command_line)) self.run("cmake --...
13,361
[ 0.017278896644711494, -0.017401009798049927, -0.006695827003568411, -0.0394015833735466, 0.01746206544339657, -0.00907192938029766, -0.01633252575993538, -0.016373230144381523, 0.03763095289468765, -0.004907389637082815, -0.011834721080958843, -0.0218174047768116, -0.0014310040278360248, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setup(self): class TestSerializer(serializers.Serializer): integer = serializers.IntegerField() boolean = serializers.BooleanField() def create(self, validated_data): return BasicObject(**validated_data) class ObjectListSerializer(serializers.Lis...
13,362
[ 0.0040994794107973576, -0.03616326302289963, -0.00033693903242237866, -0.046349216252565384, 0.024722371250391006, 0.002703355625271797, -0.021898750215768814, -0.01849994622170925, 0.041015710681676865, 0.007974115200340748, -0.0051740240305662155, -0.03436451405286789, -0.01019640918821096...
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 setup(self): class TestSerializer(serializers.Serializer): integers = serializers.ListSerializer( child=serializers.ListSerializer( child=serializers.IntegerField() ) ) booleans = serializers.ListSerializer( ...
13,363
[ 0.028080016374588013, -0.013137880712747574, -0.0029707993380725384, -0.03222772851586342, 0.02457519993185997, -0.009643432684242725, -0.01480733510106802, -0.01584426313638687, 0.028204448521137238, 0.0004662936844397336, -0.0010485936654731631, -0.031481143087148666, -0.012215014547109604...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setup(self): class TestSerializer(serializers.Serializer): integers = serializers.ListSerializer(child=serializers.IntegerField()) booleans = serializers.ListSerializer(child=serializers.BooleanField()) def create(self, validated_data): return BasicObject...
13,364
[ 0.04534956067800522, 0.02339145541191101, 0.0030483545269817114, -0.04463288560509682, 0.01069039199501276, -0.005703533533960581, -0.031414225697517395, -0.03659020736813545, 0.025800276547670364, 0.041885633021593094, 0.006191269960254431, -0.013915427029132843, 0.007221489679068327, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_list_serializer_class_validate(self): class CustomListSerializer(serializers.ListSerializer): def validate(self, attrs): raise serializers.ValidationError('Non field error') class TestSerializer(serializers.Serializer): class Meta: list_s...
13,365
[ 0.012662090361118317, -0.038909658789634705, 0.033220741897821426, -0.05306827649474144, 0.011048815213143826, 0.006681296043097973, -0.032392874360084534, -0.028189867734909058, 0.025175590068101883, 0.009966221638023853, -0.014169229194521904, -0.04653026536107063, 0.002288569463416934, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ListSerializer", "value": {"_type": "Name", "_fields": {"id"...
class TestSerializer(serializers.Serializer): integers = serializers.ListSerializer( child=serializers.ListSerializer( child=serializers.IntegerField() ) ) booleans = serializers.ListSerializer( child=serializers.Lis...
13,366
[ 0.004456523805856705, -0.001565740443766117, 0.04915056750178337, -0.05394197255373001, 0.007940598763525486, 0.04644573852419853, 0.011553473770618439, -0.06094876304268837, 0.012326281517744064, 0.04809439554810524, 0.01433558203279972, -0.020196039229631424, -0.04546684771776199, 0.0305...
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 TestDiffing(ProjectBasedTest): def test_simple_diff(self): snapshot_1 = Snapshot({'project' : self.project, 'hash' : 'snapshot_1'}) file_revision_1 = FileRevision({'path' : 'foo.py','hash' : '1:foo.py', 'language' : 'python'}) issue_class_1 = IssueClass({'code' : 'wildcard','analyzer...
13,367
[ 0.0149619672447443, -0.0017570992931723595, 0.037005577236413956, -0.05345841497182846, 0.001582387718372047, 0.03522185608744621, 0.031281691044569016, -0.05766480416059494, 0.02350785955786705, 0.046509888023138046, 0.02610357478260994, -0.021977052092552185, -0.057718049734830856, 0.018...
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_simple_diff(self): snapshot_1 = Snapshot({'project' : self.project, 'hash' : 'snapshot_1'}) file_revision_1 = FileRevision({'path' : 'foo.py','hash' : '1:foo.py', 'language' : 'python'}) issue_class_1 = IssueClass({'code' : 'wildcard','analyzer' : 'example','severity' : 2}) pro...
13,368
[ 0.06931687891483307, 0.012121474370360374, -0.007216766942292452, -0.009343637153506279, -0.010578230954706669, 0.0028143145609647036, 0.027295764535665512, -0.031021995469927788, 0.0019865750800818205, 0.06630895286798477, -0.004562388174235821, -0.006094408221542835, -0.007615204434841871,...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "stream", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, stream=None, descriptions=True, verbosity=1, failfast=False, buffer=False, resultclass=None, warnings=None): if stream is None: stream = sys.stderr self.stream = _WritelnDecorator(stream) self.descriptions = descriptions self.verbosity = ve...
13,369
[ 0.006412468384951353, 0.02074754610657692, 0.049541670829057693, -0.00924680195748806, 0.0035189688205718994, -0.028467301279306412, -0.003045640652999282, -0.016138233244419098, -0.04620583355426788, 0.017310284078121185, -0.022753555327653885, -0.0026230262592434883, -0.017377901822328568,...
16
{"_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 = [ ('wagtailcore', '0029_unicode_slugfield_dj19'), ('taggit', '0002_auto_20150616_2121'), ('wagtaildocs', '0007_merge'), ('wapps', '0012_identity_bg_color'), ] operations = [ migrations.CreateM...
13,370
[ 0.046136967837810516, 0.0299224853515625, -0.022003784775733948, -0.05030704289674759, 0.0007590141613036394, -0.001842428813688457, -0.02061745710670948, -0.029789399355649948, 0.0023595287930220366, 0.05855846032500267, 0.016591563820838928, 0.008939038030803204, -0.028480706736445427, -...
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": "limit", "annotation": ...
class AdminLogNode(template.Node): def __init__(self, limit, varname, user): self.limit, self.varname, self.user = limit, varname, user def __repr__(self): return "<GetAdminLog Node>" def render(self, context): if self.user is None: entries = LogEntry.objects.all() ...
13,371
[ 0.04090029001235962, -0.002266619121655822, -0.007337776944041252, -0.06086002662777901, 0.014467129483819008, -0.03496631607413292, 0.0019263963913545012, 0.023797202855348587, -0.027070697396993637, 0.029179465025663376, -0.01325336191803217, -0.023184187710285187, -0.0024566533975303173, ...
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": "context", "annotation": null, "type_comment": null}}], "kwarg": n...
def render(self, context): if self.user is None: entries = LogEntry.objects.all() else: user_id = self.user if not user_id.isdigit(): user_id = context[self.user].pk entries = LogEntry.objects.filter(user__pk=user_id) context[self.v...
13,372
[ 0.029549259692430496, 0.04584741219878197, -0.007895155809819698, 0.007334169000387192, 0.01842399872839451, 0.03181682899594307, -0.0359976589679718, 0.055271998047828674, 0.0018010640051215887, -0.01589660346508026, 0.03528904542326927, -0.014869111590087414, -0.017490988597273827, 0.010...
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 _verify_client_validity(self): #Check if Mendeley can be accessed try: self._client.folders.list() except MendeleyApiException as error: if error.status == 401 and 'Token has expired' in error.message: try: refreshed_key = self.refr...
13,373
[ 0.0176031943410635, -0.0014745600055903196, 0.002921154024079442, -0.017816752195358276, 0.03319285437464714, 0.008643971756100655, -0.008247366175055504, 0.07627034187316895, 0.004616898018866777, 0.003927922807633877, 0.028352228924632072, -0.02989797480404377, 0.007494832389056683, -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}}, {"_type": "arg", "_fields": {"arg": "credentials", "annotation": null, "type_comment": null}}], "kwarg...
def _get_client(self, credentials=None): partial = mendeley.Mendeley( client_id=self.client_id, client_secret=self.client_secret, redirect_uri=web_url_for('oauth_callback', service_name='mendeley', _abs...
13,374
[ 0.005380189511924982, -0.04474203661084175, -0.017625650390982628, -0.06526316702365875, 0.04487991705536842, 0.014190142042934895, -0.06020756810903549, -0.0012689261930063367, 0.0021414475049823523, -0.02730022557079792, 0.010674203746020794, -0.05501408874988556, -0.014776132069528103, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "graph_num", "annotation": null, "type_comment": null}}], "kwar...
def send_graph(request, graph_num): graphs = request.session['graphs'] index = int(graph_num) - 1 try: ret_val = {'graph': graphs[index]} except IndexError: ret_val = None return HttpResponse(json.dumps(ret_val), content_type="application/json")
13,375
[ -0.01950955018401146, -0.014051140286028385, -0.04100203514099121, -0.025202499702572823, -0.0015138557646423578, 0.002034910023212433, -0.025138534605503082, 0.024562843143939972, 0.0016990898875519633, 0.024413589388132095, -0.0052132075652480125, -0.032558560371398926, 0.03515983372926712...
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": "list_id", "annotation": null, "type_comment": null}}], "kwarg": n...
def _citations_for_folder(self, list_id): folder = self.client.folders.get(list_id) document_ids = [ document.id for document in folder.documents.iter(page_size=500) ] citations = { citation['id']: citation for citation in self._citations_...
13,376
[ 0.032118260860443115, -0.0166005976498127, 0.050897933542728424, -0.020338043570518494, 0.0008782336954027414, 0.018581576645374298, 0.045985110104084015, 0.021090814843773842, -0.01562331523746252, -0.009000244550406933, 0.04548326134681702, 0.008128614164888859, -0.012242445722222328, -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 setUp(self): self.session_root = tempfile.mkdtemp() self.v = variables.Variable(10.0, dtype=dtypes.float32, name="v") self.delta = constant_op.constant(1.0, dtype=dtypes.float32, name="delta") self.eta = constant_op.constant(-1.4, dtype=dtypes.float32, name="eta") self.inc_v = state_ops.assign_...
13,377
[ 0.03600314259529114, 0.040524356067180634, 0.0798589214682579, -0.008560562506318092, 0.022784540429711342, -0.002513438230380416, 0.005505768116563559, 0.005583104677498341, -0.03992946073412895, 0.006335648708045483, -0.029816217720508575, 0.019929036498069763, 0.007198248989880085, 0.02...
12
{"_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='HighScore', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ...
13,378
[ -0.0035553472116589546, 0.009635073132812977, 0.07046496868133545, -0.03105420432984829, 0.0480937585234642, 0.031337108463048935, 0.01507010217756033, 0.022501785308122635, 0.01091358345001936, 0.024155687540769577, -0.0043958998285233974, -0.0073609561659395695, 0.037321627140045166, -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 testConstructWrapperWithExistingNonEmptyRootDirRaisesException(self): dir_path = os.path.join(self.session_root, "foo") os.mkdir(dir_path) self.assertTrue(os.path.isdir(dir_path)) with self.assertRaisesRegexp( ValueError, "session_root path points to a non-empty directory"): dumping_w...
13,379
[ -0.0029124687425792217, 0.025351162999868393, 0.07674448937177658, -0.03636401891708374, 0.023990752175450325, 0.02004987746477127, 0.0018948591314256191, 0.019564015790820122, 0.021237537264823914, -0.008497174829244614, 0.01969357766211033, 0.0018287280108779669, 0.04716093838214874, 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 testConstructWrapperWithExistingFileDumpRootRaisesException(self): file_path = os.path.join(self.session_root, "foo") open(file_path, "a").close() # Create the file self.assertTrue(gfile.Exists(file_path)) self.assertFalse(gfile.IsDirectory(file_path)) with self.assertRaisesRegexp(ValueError, ...
13,380
[ 0.023844946175813675, 0.0200846828520298, 0.07736131548881531, -0.049229931086301804, 0.022240737453103065, 0.029594426974654198, 0.028157055377960205, 0.027335701510310173, 0.03295684605836868, -0.01335984282195568, 0.031468141824007034, 0.0009312426554970443, 0.04327511042356491, -0.0137...
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 testDumpingOnASingleRunWorks(self): sess = dumping_wrapper.DumpingDebugWrapperSession( self.sess, session_root=self.session_root, log_usage=False) sess.run(self.inc_v) dump_dirs = glob.glob(os.path.join(self.session_root, "run_*")) self.assertEqual(1, len(dump_dirs)) self._assert_corre...
13,381
[ 0.0485815554857254, 0.004366953391581774, 0.062227483838796616, -0.04865850880742073, 0.04291285201907158, 0.04693994298577309, 0.023534096777439117, 0.03552558273077011, 0.016993284225463867, -0.007624533958733082, 0.04263070225715637, -0.017519114539027214, 0.01590314880013466, -0.008894...
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 testDumpingOnASingleRunWithFeedDictWorks(self): sess = dumping_wrapper.DumpingDebugWrapperSession( self.sess, session_root=self.session_root, log_usage=False) feed_dict = {self.ph: 3.2} sess.run(self.inc_w_ph, feed_dict=feed_dict) dump_dirs = glob.glob(os.path.join(self.session_root, "run_*...
13,382
[ -0.010035992600023746, 0.043123405426740646, -0.005376424640417099, -0.035237982869148254, 0.01944473572075367, -0.020452814176678658, -0.0075773983262479305, -0.022827401757240295, 0.036089248955249786, -0.01932152546942234, 0.020071985200047493, -0.002219175221398473, 0.00756619730964303, ...
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 testUsingNonCallableAsWatchFnRaisesTypeError(self): bad_watch_fn = "bad_watch_fn" with self.assertRaisesRegexp(TypeError, "watch_fn is not callable"): dumping_wrapper.DumpingDebugWrapperSession( self.sess, session_root=self.session_root, watch_fn=bad_watch_fn, l...
13,383
[ 0.016449682414531708, 0.016321169212460518, 0.08548694103956223, -0.06487343460321426, 0.00827624648809433, 0.03459573909640312, 0.04089288040995598, 0.027835946530103683, 0.01990668475627899, 0.0009028048370964825, 0.02356931008398533, 0.006547744385898113, 0.022939596325159073, -0.031948...
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testDumpingOnMultipleRunsWorks(self): sess = dumping_wrapper.DumpingDebugWrapperSession( self.sess, session_root=self.session_root, log_usage=False) for _ in range(3): sess.run(self.inc_v) dump_dirs = glob.glob(os.path.join(self.session_root, "run_*")) dump_dirs = sorted( dump...
13,384
[ 0.005930962972342968, 0.03402991220355034, 0.02633770741522312, -0.04804515466094017, 0.012670976109802723, 0.03061945177614689, 0.0351252406835556, -0.0012151317205280066, 0.05016113445162773, -0.023761192336678505, 0.05576225370168686, 0.0007639304385520518, -0.013330663554370403, 0.0276...
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 testDumpingDebugHookWithoutWatchFnWorks(self): dumping_hook = hooks.DumpingDebugHook(self.session_root, log_usage=False) mon_sess = monitored_session._HookedSession(self.sess, [dumping_hook]) mon_sess.run(self.inc_v) dump_dirs = glob.glob(os.path.join(self.session_root, "run_*")) self.assertEqu...
13,385
[ 0.009198709391057491, 0.032019179314374924, -0.004577703308314085, -0.044069673866033554, 0.02191111631691456, 0.020661527290940285, 0.02150283381342888, -0.006346924230456352, 0.029049858450889587, 0.008054283447563648, 0.06146494671702385, 0.029148835688829422, -0.015848752111196518, 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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testDumpingDebugHookWithStatefulWatchFnWorks(self): watch_fn_state = {"run_counter": 0} def counting_watch_fn(fetches, feed_dict): del fetches, feed_dict watch_fn_state["run_counter"] += 1 if watch_fn_state["run_counter"] % 2 == 1: # If odd-index run (1-based), watch every ref-typ...
13,386
[ 0.03819720074534416, 0.002836351515725255, 0.04691430181264877, -0.025672350078821182, 0.014644254930317402, 0.04815960302948952, 0.03015064261853695, 0.04535767808556557, 0.0011764498194679618, -0.00513087771832943, 0.057762786746025085, 0.02926456183195114, 0.007352062966674566, -0.01076...
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 testDumpingFromMultipleThreadsObeysThreadNameFilter(self): sess = dumping_wrapper.DumpingDebugWrapperSession( self.sess, session_root=self.session_root, log_usage=False, thread_name_filter=r"MainThread$") self.assertAllClose(1.0, sess.run(self.delta)) def child_thread_job(): sess....
13,387
[ 0.02476336620748043, 0.031336281448602676, 0.011996502988040447, -0.040878813713788986, 0.012095903977751732, 0.026092858985066414, 0.013207957148551941, -0.016363950446248055, 0.03044166974723339, -0.00474330922588706, 0.05387554317712784, 0.02686321921646595, -0.009020674042403698, 0.003...
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testDumpingDebugHookWithStatefulLegacyWatchFnWorks(self): watch_fn_state = {"run_counter": 0} def counting_watch_fn(fetches, feed_dict): del fetches, feed_dict watch_fn_state["run_counter"] += 1 if watch_fn_state["run_counter"] % 2 == 1: # If odd-index run (1-based), watch everyth...
13,388
[ 0.014669162221252918, 0.04141589254140854, 0.00017970266344491392, -0.06532303243875504, 0.011860569939017296, 0.0003657990600913763, 0.025568734854459763, 0.024167537689208984, -0.004814287647604942, 0.019889548420906067, 0.04627668112516403, -0.012784367427229881, 0.019182750955224037, 0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "fetches", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "feed_dict", "annotation": null, "type_comment": null}}], "kwar...
def counting_watch_fn(fetches, feed_dict): del fetches, feed_dict watch_fn_state["run_counter"] += 1 if watch_fn_state["run_counter"] % 2 == 1: # If odd-index run (1-based), watch every ref-type tensor. return framework.WatchOptions( debug_ops="DebugIdentity", t...
13,389
[ -0.016147784888744354, -0.0012430752394720912, 0.05058950558304787, -0.025294752791523933, -0.0017588116461411119, 0.024101171642541885, 0.007488578092306852, 0.08860049396753311, 0.014621376991271973, -0.019016971811652184, 0.04602175951004028, 0.009238782338798046, -0.02497340366244316, ...
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 testCallingInvokeNodeStepperOnDumpingWrapperRaisesException(self): sess = dumping_wrapper.DumpingDebugWrapperSession( self.sess, session_root=self.session_root, log_usage=False) node_stepper = stepper.NodeStepper(self.sess, self.inc_v) with self.assertRaisesRegexp( NotImplementedError, ...
13,390
[ -0.020022407174110413, 0.018450399860739708, 0.02570369653403759, -0.034170474857091904, 0.0010187020525336266, 0.03863828256726265, 0.0327087827026844, -0.036128588020801544, 0.05308971926569939, 0.003812807146459818, 0.01181073859333992, -0.07313970476388931, 0.000026784560759551823, -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 runTest(self): a = VariableIdentifier(int, 'a') b = VariableIdentifier(int, 'b') a_plus_5 = BinaryArithmeticOperation(int, a, BinaryArithmeticOperation.Operator.Add, Literal(int, '5')) a_plus_7 = BinaryArithmeticOperation(int, a, BinaryArithmeticOperation.Operator.Add, Literal(int, ...
13,391
[ -0.018505437299609184, 0.03327370434999466, 0.032191213220357895, -0.03639230877161026, -0.00563152926042676, 0.03211389482021332, 0.0325004979968071, -0.031598422676324844, 0.04582544416189194, -0.004358958452939987, 0.01507754996418953, -0.05793903023004532, 0.02168847620487213, -0.00169...
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 TestVarFormOct(unittest.TestCase): def runTest(self): a = VariableIdentifier(int, 'a') b = VariableIdentifier(int, 'b') a_plus_5 = BinaryArithmeticOperation(int, a, BinaryArithmeticOperation.Operator.Add, Literal(int, '5')) a_plus_7 = BinaryArithmeticOperation(int, a, BinaryAr...
13,392
[ -0.015885431319475174, 0.024091586470603943, -0.001229935442097485, -0.05753529444336891, -0.05753529444336891, -0.0002136333641828969, 0.007211669813841581, -0.04955306276679039, -0.020561492070555687, 0.017044568434357643, 0.012256545946002007, 0.0019692140631377697, 0.028925711289048195, ...
7
{"_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 __checkBuildAndRun__(): waitForObjectItem(":Options_QListView", "Build & Run") clickItem(":Options_QListView", "Build & Run", 14, 15, 0, Qt.LeftButton) # check compilers expectedCompilers = __getExpectedCompilers__() foundCompilers = [] foundCompilerNames = [] clickOnTab(":Options.qt_tab...
13,393
[ -0.008144696243107319, 0.0046532428823411465, 0.06496292352676392, -0.03452523797750473, -0.03291941434144974, -0.036642007529735565, 0.0445251502096653, 0.02644745260477066, 0.009537627920508385, 0.06700669974088669, 0.00583632243797183, 0.006128290668129921, 0.00812036544084549, 0.013041...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def main(): emptySettings = tempDir() __createMinimumIni__(emptySettings) SettingsPath = ' -settingspath "%s"' % emptySettings startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return invokeMenuItem("Tools", "Options...") __checkBuildAndRun__() clic...
13,394
[ 0.0021953354589641094, 0.029689298942685127, -0.0004777794820256531, -0.038470640778541565, -0.03455039858818054, 0.0056157466024160385, 0.007298183627426624, -0.06105123460292816, 0.008729072287678719, 0.02570371888577938, 0.0192875899374485, 0.00479902932420373, 0.007454993203282356, -0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "it", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "foundComp", "annotation": null, "type_comment": null}}, {"_type": "...
def __compFunc__(it, foundComp, foundCompNames): try: waitFor("object.exists(':CompilerPath.Utils_BaseValidatingLineEdit')", 1000) pathLineEdit = findObject(":CompilerPath.Utils_BaseValidatingLineEdit") foundComp.append(str(pathLineEdit.text)) except: label = findObject("{buddy={...
13,395
[ 0.003352717962116003, 0.011502208188176155, -0.004360416904091835, -0.027750961482524872, -0.05263892561197281, 0.0119228670373559, -0.0010940282372757792, 0.023042086511850357, -0.013825252652168274, 0.04327140748500824, -0.0018003592267632484, 0.011188283562660217, -0.006027358118444681, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "treeObj", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "additionalFunc", "annotation": null, "type_comment": null}}], ...
def __iterateTree__(treeObj, additionalFunc, *additionalParameters): global currentSelectedTreeItem model = treeObj.model() # 1st row: Auto-detected, 2nd row: Manual for sect in dumpIndices(model): sObj = "%s container=%s}" % (objectMap.realName(sect)[:-1], objectMap.realName(treeObj)) i...
13,396
[ -0.01214492879807949, -0.011512178927659988, 0.0080837057903409, -0.008348428644239902, -0.03667368367314339, -0.021358545869588852, -0.0017061656108126044, -0.01142178662121296, -0.021500593051314354, 0.0609506294131279, -0.010575966909527779, 0.0049974350258708, 0.0008361341315321624, 0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "it", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "foundQt", "annotation": null, "type_comment": null}}, {"_type": "ar...
def __kitFunc__(it, foundQt, foundCompNames): global currentSelectedTreeItem, warningOrError qtVersionStr = str(waitForObject(":Kits_QtVersion_QComboBox").currentText) test.compare(it, "Desktop (default)", "Verifying whether default Desktop kit has been created.") if foundQt: test.compare(qtVers...
13,397
[ -0.026674317196011543, -0.0014669419033452868, -0.029073841869831085, -0.0299358069896698, -0.02392534911632538, -0.006260893307626247, -0.03105403110384941, -0.056144196540117264, -0.03515418991446495, 0.029819324612617493, 0.01592305302619934, 0.05139174312353134, 0.00198892573826015, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "it", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "foundQt", "annotation": null, "type_comment": null}}, {"_type": "ar...
def __qtFunc__(it, foundQt, qmakePath): foundQt.append(it) qtPath = str(waitForObject(":QtSupport__Internal__QtVersionManager.qmake_QLabel").text) if platform.system() in ('Microsoft', 'Windows'): qtPath = qtPath.lower() qmakePath = qmakePath.lower() test.compare(qtPath, qmakePath, "Veri...
13,398
[ 0.01484214048832655, -0.04640946537256241, 0.036070261150598526, -0.0376141257584095, -0.03059656359255314, -0.03794161230325699, 0.0043450393714010715, -0.027579013258218765, -0.017462030053138733, 0.03440943732857704, 0.0030409428291022778, -0.0175555981695652, 0.018549751490354538, -0.0...
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": "List", "_fields": {"c...
def __getWinCompilers__(): result = [] winEnvVars = __getWinEnvVars__() for record in testData.dataset("win_compiler_paths.tsv"): envvar = winEnvVars.get(testData.field(record, "envvar"), "") compiler = os.path.abspath(os.path.join(envvar, testData.field(record, "path"), ...
13,399
[ 0.0030044247396290302, -0.0254233255982399, 0.026811253279447556, 0.0014099591644480824, -0.01542142778635025, -0.009649408049881458, -0.0010120312217622995, -0.03954494744539261, -0.008426709100604057, 0.04084475338459015, -0.00014793210721109062, -0.011588101275265217, -0.00237792916595935...
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": "List", "_fields": {"c...
def __getExpectedCompilers__(): expected = [] if platform.system() in ('Microsoft', 'Windows'): expected.extend(__getWinCompilers__()) compilers = ["g++"] if platform.system() in ('Linux', 'Darwin'): compilers.extend(["g++-4.0", "g++-4.2", "clang++"]) for compiler in compilers: ...
13,400
[ 0.004639558494091034, 0.012305639684200287, 0.002592775970697403, -0.02323659509420395, -0.017848720774054527, -0.03002132475376129, 0.0609738864004612, -0.004273715429008007, -0.009927657432854176, 0.02913443185389042, 0.01566474698483944, -0.0010005261283367872, -0.01896842196583748, -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": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"k...
def __getWinEnvVars__(): result = {} tmpF, tmpFPath = tempfile.mkstemp() envvars = subprocess.call('set', stdout=tmpF, shell=True) os.close(tmpF) tmpF = open(tmpFPath, "r") for line in tmpF: tmp = line.split("=") result[tmp[0]] = tmp[1] tmpF.close() os.remove(tmpFPath) ...