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
18,701
[ -0.00566096231341362, -0.03953252732753754, 0.036061156541109085, -0.028935709968209267, -0.004630398470908403, 0.022187089547514915, -0.012994805350899696, -0.061068736016750336, -0.020805392414331436, 0.05216192454099655, -0.0333205983042717, 0.012229733169078827, 0.038824550807476044, 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_static_loc_static_scale(self): loc = constant_op.constant(np.zeros((2, 3))) scale = linear_operator_diag.LinearOperatorDiag(np.ones((5, 1, 3))) batch_shape, event_shape = distribution_util.shapes_from_loc_and_scale( loc, scale) self.assertEqual(tensor_shape.TensorShape([5, 2]), batch_s...
18,702
[ 0.0028295270167291164, -0.030809082090854645, 0.03914874047040939, -0.01382000558078289, -0.012426091358065605, 0.024709217250347137, -0.002725281286984682, -0.05737685039639473, -0.005280790850520134, 0.055661264806985855, -0.02497132122516632, -0.008321788161993027, 0.02828335575759411, ...
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_static_loc_dynamic_scale(self): loc = constant_op.constant(np.zeros((2, 3))) diag = array_ops.placeholder(dtypes.float64) scale = linear_operator_diag.LinearOperatorDiag(diag) with self.test_session() as sess: batch_shape, event_shape = sess.run( distribution_util.shapes_from_lo...
18,703
[ -0.0030887541361153126, -0.02371886558830738, 0.01769118569791317, -0.0008507039747200906, -0.01094894204288721, 0.026968972757458687, -0.002557154279202223, -0.05956224352121353, -0.020388081669807434, 0.06016155332326889, -0.023315483704209328, -0.01592782884836197, 0.038932133466005325, ...
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_dynamic_loc_static_scale(self): loc = array_ops.placeholder(dtypes.float64) diag = constant_op.constant(np.ones((5, 2, 3))) scale = linear_operator_diag.LinearOperatorDiag(diag) with self.test_session(): batch_shape, event_shape = distribution_util.shapes_from_loc_and_scale( loc...
18,704
[ -0.007185212802141905, -0.028694938868284225, 0.01681523397564888, -0.03310248255729675, -0.005859506782144308, 0.017664605751633644, -0.013325929641723633, -0.04820749908685684, -0.023472459986805916, 0.052798688411712646, -0.052339568734169006, 0.014898412860929966, 0.03783140704035759, ...
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_none_loc_static_scale(self): loc = None scale = linear_operator_diag.LinearOperatorDiag(np.ones((5, 1, 3))) batch_shape, event_shape = distribution_util.shapes_from_loc_and_scale( loc, scale) self.assertEqual(tensor_shape.TensorShape([5, 1]), batch_shape) self.assertEqual(tensor_sh...
18,705
[ -0.009726036339998245, -0.018175780773162842, 0.027098435908555984, 0.0011117708636447787, -0.014506437815725803, 0.019736960530281067, 0.008922656066715717, -0.045946549624204636, -0.018939277157187462, 0.05278383567929268, -0.023611420765519142, -0.022186987102031708, 0.02632354386150837, ...
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_dynamic_loc_dynamic_scale(self): loc = array_ops.placeholder(dtypes.float64) diag = array_ops.placeholder(dtypes.float64) scale = linear_operator_diag.LinearOperatorDiag(diag) with self.test_session() as sess: batch_shape, event_shape = sess.run( distribution_util.shapes_from_lo...
18,706
[ 0.0048675029538571835, -0.016827654093503952, 0.021996477618813515, -0.0070173172280192375, -0.021903764456510544, 0.024105729535222054, 0.0026611913926899433, -0.03921816870570183, -0.015680313110351562, 0.043042633682489395, -0.03687712922692299, -0.008634023368358612, 0.024291157722473145...
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_none_loc_dynamic_scale(self): loc = None diag = array_ops.placeholder(dtypes.float64) scale = linear_operator_diag.LinearOperatorDiag(diag) with self.test_session() as sess: batch_shape, event_shape = sess.run( distribution_util.shapes_from_loc_and_scale(loc, scale), f...
18,707
[ 0.030941849574446678, -0.030314497649669647, 0.028298012912273407, 0.0036436771042644978, 0.012233344838023186, 0.017364179715514183, 0.010368095710873604, -0.023996176198124886, 0.0001749546208884567, 0.01428343914449215, 0.005769388750195503, 0.010816204361617565, 0.04501243680715561, 0....
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class GetBroadcastShapeTest(test.TestCase): def test_all_static_shapes_work(self): x = array_ops.ones((2, 1, 3)) y = array_ops.ones((1, 5, 3)) z = array_ops.ones(()) self.assertAllEqual([2, 5, 3], distribution_util.get_broadcast_shape(x, y, z)) def test_with_some_dynamic_sh...
18,708
[ -0.005561755504459143, -0.03926733508706093, 0.05132897198200226, -0.008758089505136013, 0.01960686407983303, -0.004955323413014412, 0.013777071610093117, -0.006613798439502716, -0.006928741466253996, 0.011136912740767002, 0.0027641255874186754, -0.024913985282182693, 0.0042081717401742935, ...
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 TridiagTest(test.TestCase): def testWorksCorrectlyNoBatches(self): with self.test_session(): self.assertAllEqual( [[4., 8., 0., 0.], [1., 5., 9., 0.], [0., 2., 6., 10.], [0., 0., 3, 7.]], distribution_util.tridiag( [1., 2., 3.], ...
18,709
[ 0.02711174450814724, -0.016381926834583282, 0.037818584591150284, 0.005617645103484392, 0.022401653230190277, -0.006117374636232853, 0.01238409336656332, 0.0005248592351563275, 0.00525002833455801, 0.006818144116550684, 0.01818554662168026, -0.020069584250450134, 0.02279224619269371, 0.019...
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 test_with_some_dynamic_shapes_works(self): x = array_ops.ones((2, 1, 3)) y = array_ops.placeholder(x.dtype) z = array_ops.ones(()) with self.test_session() as sess: bcast_shape = sess.run( distribution_util.get_broadcast_shape(x, y, z), feed_dict={y: np.ones((1, 5, 3)).asty...
18,710
[ -0.014744763262569904, -0.05680471286177635, 0.04367711395025253, -0.0006951952236704528, 0.0034823461901396513, -0.017530640587210655, 0.020900871604681015, 0.011496839113533497, -0.009662237018346786, 0.022300606593489647, 0.02609211578965187, -0.007746097166091204, -0.0008455306524410844,...
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 testWorksCorrectlyNoBatches(self): with self.test_session(): self.assertAllEqual( [[4., 8., 0., 0.], [1., 5., 9., 0.], [0., 2., 6., 10.], [0., 0., 3, 7.]], distribution_util.tridiag( [1., 2., 3.], [4., 5., 6., 7.], ...
18,711
[ -0.02116638422012329, -0.03744060546159744, 0.05050522834062576, -0.010166086256504059, -0.009388430044054985, -0.008709748275578022, 0.015242059715092182, -0.0015606143279001117, -0.005196156445890665, 0.03430170193314552, 0.0199645534157753, -0.009501543827354908, -0.012506123632192612, ...
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 testWorksCorrectlyBatches(self): with self.test_session(): self.assertAllClose( [[[4., 8., 0., 0.], [1., 5., 9., 0.], [0., 2., 6., 10.], [0., 0., 3, 7.]], [[0.7, 0.1, 0.0, 0.0], [0.8, 0.6, 0.2, 0.0], [0.0, 0.9, 0.5, 0.3], ...
18,712
[ -0.005529266782104969, -0.007709212601184845, 0.05309828370809555, -0.029422052204608917, -0.024066025391221046, 0.00410003075376153, -0.010979131795465946, 0.015808217227458954, 0.05849762260913849, 0.04559118673205376, 0.01810365729033947, -0.03259813040494919, 0.03378194198012352, 0.024...
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 testHandlesNone(self): with self.test_session(): self.assertAllClose( [[[4., 0., 0., 0.], [0., 5., 0., 0.], [0., 0., 6., 0.], [0., 0., 0, 7.]], [[0.7, 0.0, 0.0, 0.0], [0.0, 0.6, 0.0, 0.0], [0.0, 0.0, 0.5, 0.0], [0...
18,713
[ 0.02842455916106701, -0.025104902684688568, 0.039997249841690063, -0.016990186646580696, -0.011492005549371243, -0.006679656449705362, 0.04085021838545799, 0.027179688215255737, 0.007763155270367861, 0.04914936050772667, -0.029853856191039085, -0.02980775013566017, -0.023456601426005363, 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 MixtureStddevTest(test.TestCase): def test_mixture_dev(self): mixture_weights = np.array([ [1.0/3, 1.0/3, 1.0/3], [0.750, 0.250, 0.000] ]) component_means = np.array([ [1.0, 1.0, 1.0], [-5, 0, 1.25] ]) component_devs = np.array([ [1.0, 1.0, 1.0], ...
18,714
[ 0.02285861223936081, -0.02985566295683384, 0.024347849190235138, -0.027822736650705338, -0.00869903713464737, -0.026877189055085182, 0.04987763240933418, 0.04377885162830353, 0.018166331574320793, 0.07228711247444153, -0.010152816772460938, -0.021723954007029533, -0.03224316984415054, -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_mixture_dev(self): mixture_weights = np.array([ [1.0/3, 1.0/3, 1.0/3], [0.750, 0.250, 0.000] ]) component_means = np.array([ [1.0, 1.0, 1.0], [-5, 0, 1.25] ]) component_devs = np.array([ [1.0, 1.0, 1.0], [0.01, 2.0, 0.1] ]) # The firs...
18,715
[ 0.020793136209249496, -0.03308641165494919, 0.041694965213537216, -0.009113980457186699, 0.0060596829280257225, 0.03460812568664551, -0.00859224982559681, 0.03571680188179016, 0.029216909781098366, -0.048781804740428925, -0.0005529799964278936, -0.02928212657570839, 0.001445628353394568, -...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Dict", "_fields": {"k...
def get_default_secret_data(): return { "name": "AES key", "expiration": "2050-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", "payload": get_default_payload(), "payload_content_type": get_default_payload_content_type(), "...
18,716
[ 0.0062842885963618755, 0.008051889948546886, 0.06341037899255753, -0.03391934186220169, -0.00024057405244093388, -0.046850744634866714, -0.022588087245821953, 0.003795691765844822, -0.0548514649271965, 0.014559455215930939, -0.019127309322357178, 0.008126315660774708, 0.02340676635503769, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "AnnAssign", "_fields": {"value": null, "simple": 1, "target": {"_type": "Name", "_fields": {"id": "source_root", "ctx": {"_type": "Store", "_fields": {}}}}, "annotation": {"_type": "Name", "_fields": {"id": "str", "ctx": {"_t...
class TargetSources(NamedTuple): source_root: str source_files: str | list[str] @property def full_paths(self) -> list[str]: return [ PurePath(self.source_root, name).as_posix() for name in ( self.source_files if isinstance(self.source_files, list) else (...
18,717
[ 0.006098539102822542, -0.0007053216686472297, -0.0107094906270504, 0.008287173695862293, -0.025283288210630417, -0.018136028200387955, 0.004360170569270849, -0.03326268494129181, 0.016950517892837524, 0.04427425190806389, 0.017246896401047707, -0.007386641576886177, -0.006412015296518803, ...
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": "block_type", "annotation": null, "type_comment": null}}], "kwarg"...
def __init__(self, block_type, **kwargs): self._initial_status = kwargs.pop('enabled', True) # when true, all boxes are checked self._title = kwargs.pop('title', None) super(BlockSelectorWidget, self).__init__(**kwargs) # Setup this widget self.setContentsMargins(0, 0, 0, 0) ...
18,718
[ 0.007949020713567734, 0.05537128821015358, 0.0676373541355133, -0.058720532804727554, -0.007644543889909983, -0.03862506151199341, 0.0031236063223332167, -0.054153382778167725, -0.033927418291568756, -0.0034742983989417553, 0.025793539360165596, -0.015354332514107227, 0.0448450893163681, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "rule_runner", "annotation": {"_type": "Name", "_fields": {"id": "RuleRunner", "ctx": {"_type": "Load", "_fields": {}}}}, "type_comment": null}}, {"_type"...
def mock_sources_field( rule_runner: RuleRunner, sources: TargetSources, *, include_sources: bool = True, sources_field_cls: Type[SourcesField] = MultipleSourcesField, ) -> SourcesField: sources_field = sources_field_cls( sources.source_files if include_sources else [], Address(s...
18,719
[ 0.015974750742316246, 0.04807205870747566, 0.021068478003144264, -0.050164125859737396, -0.024286167696118355, -0.027560707181692123, 0.010613828897476196, -0.026719333603978157, -0.03354129195213318, 0.018339695408940315, 0.0203294325619936, -0.01642954722046852, 0.030857987701892853, -0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "rule_runner", "annotation": {"_type": "Name", "_fields": {"id": "RuleRunner", "ctx": {"_type": "Load", "_fields": {}}}}, "type_comment": null}}, {"_type"...
def assert_sources_resolved( rule_runner: RuleRunner, sources_fields: Iterable[SourcesField], *, expected: Iterable[TargetSources], expected_unrooted: Iterable[str] = (), ) -> None: result = rule_runner.request(SourceFiles, [SourceFilesRequest(sources_fields)]) assert list(result.snapshot.fi...
18,720
[ 0.002755052875727415, -0.003950499929487705, -0.060676462948322296, -0.017288774251937866, 0.03552184998989105, 0.04793842136859894, 0.017630329355597496, -0.046371281147003174, -0.010271801613271236, 0.02531534433364868, 0.00772519875317812, -0.019830353558063507, 0.03809356689453125, -0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "name", "annotation": n...
class Directory(object): def __init__(self, name="", path=""): self.name = name self.path = path def full_path(self): return os.path.join(self.path, self.name) def __repr__(self): return "Directory: {}".format(self.name) def __eq__(self, other): return self.na...
18,721
[ -0.0012247113045305014, 0.03199798986315727, 0.06384818255901337, -0.07409542053937912, -0.028746461495757103, -0.04840342327952385, 0.0060719819739460945, -0.03379618376493454, -0.010173340328037739, 0.007796276826411486, 0.029239118099212646, -0.01862238720059395, 0.027071431279182434, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "rule_runner", "annotation": {"_type": "Name", "_fields": {"id": "RuleRunner", "ctx": {"_type": "Load", "_fields": {}}}}, "type_comment": null}}], "kwarg"...
def test_address_specs(rule_runner: RuleRunner) -> None: mock_sources = partial(mock_sources_field, rule_runner) sources_field1 = mock_sources(SOURCES1) sources_field2 = mock_sources(SOURCES2) sources_field3 = mock_sources(SOURCES3) sources_field4 = mock_sources(SOURCES1) assert_sources = parti...
18,722
[ -0.022825362160801888, 0.02855854295194149, -0.05668763443827629, -0.06768159568309784, -0.012754717841744423, 0.0037335462402552366, -0.018885141238570213, -0.027656693011522293, 0.038865383714437485, 0.02122565358877182, 0.019142812117934227, 0.021290071308612823, 0.05282256752252579, 0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "evaluator", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "node", "annotation": null, "type_comment": null}}, {"_type":...
def _find_type_from_comment_hint(evaluator, node, varlist, name): index = None if varlist.type in ("testlist_star_expr", "exprlist"): # something like "a, b = 1, 2" index = 0 for child in varlist.children: if child == name: break if child.type == "...
18,723
[ 0.040526412427425385, 0.03147834166884422, -0.008092994801700115, -0.023457955569028854, -0.02171536535024643, 0.0221621822565794, 0.011885364539921284, -0.014957239851355553, 0.030808115378022194, 0.009299403987824917, 0.047049958258867264, -0.0044235000386834145, 0.018464762717485428, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "evaluator", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "node", "annotation": null, "type_comment": null}}], "kwarg":...
def _fix_forward_reference(evaluator, node): evaled_nodes = evaluator.eval_element(node) if len(evaled_nodes) != 1: debug.warning("Eval'ed typing index %s should lead to 1 object, " " not %s" % (node, evaled_nodes)) return node evaled_node = list(evaled_nodes)[0] if...
18,724
[ -0.0025584751274436712, -0.010152420029044151, 0.013004223816096783, -0.007425553165376186, -0.012971632182598114, 0.01435136143118143, -0.050191741436719894, 0.03848033398389816, 0.005154974292963743, 0.0012446085456758738, 0.024205021560192108, 0.030375780537724495, -0.013069408014416695, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "disk", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def get_gpt_info(disk): check_disk_file(disk) disk.seek(0) info = { 'lba_size': None, 'revision_minor': None, 'revision_major': None, 'crc32': None, 'current_lba': None, 'backup_lba': None, 'first_usable_lba': None, 'last_usable_lba': None, 'disk_guid': None, 'part_entry_st...
18,725
[ 0.04310579225420952, -0.004170692525804043, 0.025034518912434578, 0.0007726143230684102, -0.03166617825627327, 0.02650591731071472, -0.0046628862619400024, 0.03920969367027283, -0.00435979850590229, 0.025946371257305145, 0.02841252088546753, 0.026754604652523994, 0.005455576814711094, 0.02...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "disk", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def get_mbr_info(disk): check_disk_file(disk) disk.seek(0) try: mbrheader = read_mbr_header(disk) partitions = read_mbr_partitions(disk, mbrheader) return namedtuple('MBRInfo', 'lba_size, partitions')(512, partitions) except MBRMissing: return None except MBRError: return None
18,726
[ 0.0042571728117764, 0.012037323787808418, 0.06820762902498245, -0.00473309401422739, -0.045827727764844894, -0.01969849318265915, 0.01466069370508194, -0.0016845868667587638, -0.04545627534389496, 0.016297398135066032, -0.012501636520028114, -0.014846418984234333, 0.0018949788063764572, -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 main(): app = QApplication([]) app.project = BProject.BProject() page = BModulePage.BModulePage() page.setProjectInfo("BERTOS_PATH", "../../") page.setProjectInfo("CPU_INFOS", {"TOOLCHAIN": "avr", "CPU_TAGS": []}) page.project().loadSourceTree() page.reloadData() page.show() app....
18,727
[ 0.028057366609573364, -0.0025646360591053963, 0.01753862202167511, -0.004852463025599718, -0.0025923168286681175, -0.005458674859255552, -0.016674978658556938, 0.041942108422517776, -0.00021989020751789212, 0.011526329442858696, 0.020339930430054665, 0.03726957365870476, -0.01820296421647072...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "diskOrInfo", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyarg...
def show_disk_partitions_info(diskOrInfo): fileUsed = None if isinstance(diskOrInfo, str): fileUsed = diskOrInfo = open(diskOrInfo, 'rb') if hasattr(diskOrInfo, 'read'): info = get_disk_partitions_info(diskOrInfo) else: info = diskOrInfo if info.mbr: mbr = info.mbr print('MBR Header') ...
18,728
[ -0.009064738638699055, -0.005903381388634443, -0.004113036207854748, -0.053198833018541336, 0.008618639782071114, 0.03754372149705887, -0.023506462574005127, -0.018319813534617424, 0.018474461510777473, 0.012312342412769794, 0.0023613525554537773, -0.05824273079633713, 0.021472249180078506, ...
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_constructor(self): graph = ObjectGraph() self.assertTrue(isinstance(graph, ObjectGraph)) g = Graph() graph = ObjectGraph(g) self.assertTrue(graph.graph is g) self.assertEqual(graph.debug, 0) self.assertEqual(graph.indent, 0) graph = ObjectGraph(...
18,729
[ -0.01701493375003338, -0.016060588881373405, 0.004934958182275295, -0.07639767974615097, 0.00624404102563858, 0.03151843696832657, -0.03149332106113434, -0.013436146080493927, -0.007220359053462744, 0.040132638067007065, 0.022841447964310646, -0.04729021340608597, 0.019400790333747864, -0....
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 TestObjectGraph (unittest.TestCase): def test_constructor(self): graph = ObjectGraph() self.assertTrue(isinstance(graph, ObjectGraph)) g = Graph() graph = ObjectGraph(g) self.assertTrue(graph.graph is g) self.assertEqual(graph.debug, 0) self.assertEqua...
18,730
[ 0.007849104702472687, -0.010562071576714516, 0.025723854079842567, -0.060918428003787994, 0.032013002783060074, 0.006498787552118301, -0.004772354383021593, -0.014181415550410748, -0.0017603453015908599, 0.0266363974660635, 0.012997575104236603, -0.03008926473557949, -0.002888692542910576, ...
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 testNodes(self): graph = ObjectGraph() n1 = Node("n1") n2 = Node("n2") n3 = Node("n3") n4 = Node("n4") n1b = Node("n1") self.assertTrue(graph.getIdent(graph) is graph) self.assertTrue(graph.getRawIdent(graph) is graph) graph.addNode(n1) ...
18,731
[ 0.0012657144106924534, -0.051421891897916794, 0.045250266790390015, -0.06546422094106674, -0.011512457393109798, 0.023337244987487793, -0.0050597344525158405, -0.015841340646147728, -0.001699071261100471, 0.019264470785856247, 0.04002812132239342, -0.0270102359354496, 0.004859843757003546, ...
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 testEdges(self): graph = ObjectGraph() n1 = graph.createNode(ArgNode, "n1", 1) n2 = graph.createNode(ArgNode, "n2", 1) n3 = graph.createNode(ArgNode, "n3", 1) n4 = graph.createNode(ArgNode, "n4", 1) graph.createReference(n1, n2, "n1-n2") graph.createReference...
18,732
[ 0.026819758117198944, -0.006465268786996603, -0.007540864869952202, -0.08062295615673065, 0.012696712277829647, -0.005494893994182348, 0.015268790535628796, -0.0099726477637887, -0.001613394357264042, 0.03156641125679016, -0.010925485752522945, -0.03208082914352417, -0.005228917580097914, ...
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_iter_nodes(self): graph = ObjectGraph() n1 = graph.createNode(ArgNode, "n1", 1) n2 = graph.createNode(ArgNode, "n2", 2) n3 = graph.createNode(ArgNode, "n3", 3) n4 = graph.createNode(ArgNode, "n4", 4) n5 = graph.createNode(ArgNode, "n5", 5) n6 = graph.crea...
18,733
[ -0.0064732711762189865, -0.02040909416973591, 0.0017988376785069704, -0.05634131655097008, 0.021554242819547653, 0.02936670184135437, -0.01066896878182888, -0.035117894411087036, -0.008334137499332428, 0.05506892874836922, -0.013398239389061928, -0.022330399602651596, 0.009587439708411694, ...
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_flatten(self): graph = ObjectGraph() n1 = graph.createNode(ArgNode, "n1", 1) n2 = graph.createNode(ArgNode, "n2", 2) n3 = graph.createNode(ArgNode, "n3", 3) n4 = graph.createNode(ArgNode, "n4", 4) n5 = graph.createNode(ArgNode, "n5", 5) n6 = graph.createN...
18,734
[ 0.0014493396738544106, -0.033269528299570084, -0.008447952568531036, -0.07688029110431671, -0.012025602161884308, 0.015198481269180775, -0.008630752563476562, -0.005803887266665697, -0.03332175686955452, 0.04703172668814659, 0.030762560665607452, -0.045386530458927155, -0.0001989169686567038...
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_filterStack(self): graph = ObjectGraph() n1 = graph.createNode(ArgNode, "n1", 0) n11 = graph.createNode(ArgNode, "n1.1", 1) n12 = graph.createNode(ArgNode, "n1.2", 0) n111 = graph.createNode(ArgNode, "n1.1.1", 0) n112 = graph.createNode(ArgNode, "n1.1.2", 2) ...
18,735
[ -0.009995224885642529, -0.029490498825907707, 0.04533613845705986, -0.07291929423809052, -0.012189894914627075, 0.008845927193760872, -0.005456109065562487, -0.03528589382767677, 0.004401566926389933, 0.026874011382460594, 0.014867515303194523, -0.027901044115424156, 0.028463466092944145, ...
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 test_get_edges(self): graph = ObjectGraph() n1 = graph.createNode(ArgNode, "n1", 1) n2 = graph.createNode(ArgNode, "n2", 2) n3 = graph.createNode(ArgNode, "n3", 3) n4 = graph.createNode(ArgNode, "n4", 4) n5 = graph.createNode(ArgNode, "n5", 5) n6 = graph.creat...
18,736
[ -0.0027632303535938263, -0.007297762203961611, 0.0073922318406403065, -0.06098000705242157, 0.0021801770199090242, 0.020712418481707573, 0.002500487258657813, -0.006051946897059679, 0.01360359601676464, -0.022483721375465393, 0.0018761035753414035, -0.044117216020822525, -0.00262447842396795...
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 TestObjectGraphIO (unittest.TestCase): def setUp(self): self._stdout = sys.stdout def tearDown(self): sys.stdout = self._stdout def test_msg(self): graph = ObjectGraph() sys.stdout = fp = StringIO() graph.msg(0, "foo") self.assertEqual(fp.getvalue(), ...
18,737
[ 0.008366319350898266, -0.006714331451803446, 0.01859738491475582, -0.031112447381019592, 0.0015948883956298232, 0.03716973960399628, -0.016357187181711197, -0.01797163113951683, 0.03188838064670563, 0.004583641886711121, 0.014342262409627438, -0.038671545684337616, -0.008416379801928997, -...
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_msg(self): graph = ObjectGraph() sys.stdout = fp = StringIO() graph.msg(0, "foo") self.assertEqual(fp.getvalue(), "foo \n") sys.stdout = fp = StringIO() graph.msg(5, "foo") self.assertEqual(fp.getvalue(), "") sys.stdout = fp = StringIO() ...
18,738
[ 0.008462410420179367, 0.040116194635629654, 0.037368156015872955, -0.024796532467007637, -0.06472010910511017, -0.04473906010389328, 0.034902628511190414, 0.011082034558057785, 0.010491334833204746, 0.015293978154659271, 0.012642251327633858, -0.0038363358471542597, 0.03325894474983215, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "evt", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "obj", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def AdjustTracer(evt, obj): npts = isw.GetNumberOfHandles() points.SetNumberOfPoints(npts) for i in range(0, npts): pt = isw.GetHandlePosition(i) points.SetPoint(i, pt[0], pt[1], pt[2]) closed = isw.GetClosed() if closed: isw.GetPolyData(spoly) imageActor2.GetMappe...
18,739
[ 0.007914497517049313, 0.034370195120573044, -0.02222372218966484, -0.01753581501543522, -0.050690192729234695, -0.03439357876777649, 0.0366615429520607, 0.0119185084477067, 0.001722893794067204, 0.005754669662564993, 0.031237130984663963, -0.02747277542948723, 0.025298334658145905, -0.0082...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "evt", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "obj", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def AdjustSpline(evt, obj): itw.GetPath(poly) npts = itw.GetNumberOfHandles() if npts < 2: imageActor2.GetMapper().SetInputConnection(extract.GetOutputPort()) return closed = itw.IsClosed() if closed: isw.ClosedOn() else: isw.ClosedOff() imageActor2.Get...
18,740
[ 0.02839839830994606, -0.06254459917545319, -0.007104921620339155, -0.013624418526887894, -0.009792551398277283, -0.004515749868005514, -0.04189508780837059, 0.022267410531640053, 0.03921278193593025, -0.06671707332134247, 0.02839839830994606, 0.036189861595630646, -0.0371052548289299, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "session", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def _get_usb_disk_name_in_guest(session): def _get_output(): cmd = "ls -l /dev/disk/by-path/* | grep usb" try: return session.cmd(cmd).strip() except aexpect.ShellCmdError: return "" output = utils_misc.wait_for(_get_output, login_time...
18,741
[ 0.0022842469625175, 0.09026236832141876, -0.014081246219575405, -0.011035582982003689, -0.056087661534547806, -0.006590695586055517, 0.017522448673844337, 0.051103848963975906, 0.04058246687054634, 0.06174388900399208, 0.028281154111027718, 0.010422495193779469, -0.016375381499528885, 0.04...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "options", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def _restart_vm(options): if vm.is_alive(): vm.destroy() new_params = params.copy() for option, value in options.iteritems(): new_params[option] = value error.context("Restarting VM") vm.create(params=new_params) vm.verify_alive()
18,742
[ 0.035312000662088394, 0.0646112784743309, -0.03500626981258392, -0.008834369480609894, -0.05059858039021492, 0.013949004001915455, 0.020840704441070557, -0.025757888332009315, 0.03187251836061478, 0.0012563657946884632, 0.03174513205885887, 0.005184698384255171, 0.0006660012877546251, 0.05...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "removable", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "expect_str", "annotation": null, "type_comment": null}}], "k...
def _check_removable_option(removable, expect_str): error.context("Set removable option to '%s'" % removable, logging.info) _restart_vm({"removable_stg": removable}) error.context("Check removable option in monitor", logging.info) output = str(vm.monitor.info("qtree")) regex_str...
18,743
[ 0.018276749178767204, 0.06845775246620178, -0.06119924038648605, -0.027278730645775795, -0.036055367439985275, 0.004844939801841974, 0.01894092746078968, -0.039328813552856445, 0.05802067369222641, 0.025547124445438385, 0.027848025783896446, -0.0038130921311676502, -0.000719031784683466, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "serial", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "regex_str", "annotation": null, "type_comment": null}}, {"_type...
def _check_serial_option(serial, regex_str, expect_str): error.context("Set serial option to '%s'" % serial, logging.info) _restart_vm({"drive_serial_stg": serial}) error.context("Check serial option in monitor", logging.info) output = str(vm.monitor.info("qtree")) _verify_strin...
18,744
[ 0.020489288493990898, -0.00030358892399817705, -0.06580664217472076, -0.03294793516397476, -0.0014206984778866172, 0.043387770652770996, -0.011499431915581226, -0.021961573511362076, 0.05483143404126167, 0.04626541584730148, 0.020299676805734634, -0.03174334019422531, 0.015124374069273472, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "act", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "exp", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def _compare_str(act, exp, ignore_case): str_func = lambda x: x if ignore_case: str_func = lambda x: x.lower() if str_func(act) != str_func(exp): return ("Expected: '%s', Actual: '%s'" % (str_func(exp), str_func(act))) ...
18,745
[ 0.01525102648884058, 0.04272522032260895, -0.02126205340027809, -0.03785382956266403, -0.037697408348321915, -0.03637900575995445, 0.018155984580516815, -0.01399966049939394, 0.004533409606665373, -0.025697700679302216, 0.036624807864427567, 0.009217653423547745, -0.06971897929906845, 0.05...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "min_io_size", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "opt_io_size", "annotation": null, "type_comment": null}}],...
def _check_io_size_option(min_io_size="512", opt_io_size="0"): error.context("Set min_io_size to %s, opt_io_size to %s" % (min_io_size, opt_io_size), logging.info) opt = {} opt["min_io_size_stg"] = min_io_size opt["opt_io_size_stg"] = opt_io_size _restart_v...
18,746
[ -0.0114813894033432, 0.01658179610967636, 0.020434465259313583, 0.005349407903850079, 0.00960978027433157, -0.042970385402441025, -0.004580515902489424, 0.012247544713318348, -0.019898155704140663, 0.06956692785024643, -0.04480915889143944, 0.009396351873874664, 0.00427405396476388, 0.0204...
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": "X", "annotation": null, "type_comment": null}}, {"_type": "arg", ...
def _get_kernel(self, X, y=None): if self.kernel == "rbf": if y is None: return rbf_kernel(X, X, gamma=self.gamma) else: return rbf_kernel(X, y, gamma=self.gamma) elif self.kernel == "knn": if self.nn_fit is None: self.n...
18,747
[ 0.02065126784145832, 0.02924307808279991, 0.02250656858086586, -0.016973795369267464, 0.03180516138672829, -0.022042743861675262, -0.013958931900560856, -0.0016137253260239959, -0.03726062923669815, 0.02086109295487404, -0.021236570551991463, 0.0008662212640047073, -0.025863779708743095, -...
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": "key", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def check_key(self, key, current_app): if (key[1] != "__first__" and key[1] != "__latest__") or key in self.graph: return key # Special-case __first__, which means "the first migration" for # migrated apps, and is ignored for unmigrated apps. It allows # makemigrations to dec...
18,748
[ 0.016529474407434464, 0.05679244175553322, 0.059797801077365875, -0.0420750230550766, -0.021810948848724365, 0.017711728811264038, 0.0287276953458786, 0.011220374144613743, -0.012850118800997734, -0.00569029338657856, 0.0011194132966920733, 0.005043920129537582, -0.02213137410581112, -0.01...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "key", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def add_external_dependencies(self, key, migration): for parent in migration.dependencies: # Skip internal dependencies if key[0] == parent[0]: continue parent = self.check_key(parent, key[0]) if parent is not None: self.graph.add_d...
18,749
[ 0.009382199496030807, 0.014383035711944103, 0.030320385470986366, -0.04365595057606697, 0.014146510511636734, 0.0007014827569946647, 0.02592775970697403, 0.0037196537014096975, 0.01586977206170559, -0.014754720032215118, 0.026828810572624207, 0.009658146649599075, -0.024643762037158012, 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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class DataFlowHookTest(unittest.TestCase): def setUp(self): with mock.patch(BASE_STRING.format('GoogleCloudBaseHook.__init__'), new=mock_init): self.dataflow_hook = DataFlowHook(gcp_conn_id='test') @mock.patch(DATAFLOW_STRING.format('uuid.uuid1')) @mock.patch(DA...
18,750
[ 0.014881179668009281, 0.0241595059633255, 0.013614934869110584, -0.01934105157852173, 0.003790330607444048, -0.016046574339270592, 0.029941651970148087, 0.011054431088268757, -0.00441785017028451, -0.015620756894350052, 0.04320921003818512, 0.004204941913485527, -0.004569127224385738, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "mock_conn", "annotation": null, "type_comment": null}}, {"_type":...
def test_start_java_dataflow(self, mock_conn, mock_dataflow, mock_dataflowjob, mock_uuid): mock_uuid.return_value = MOCK_UUID mock_conn.return_value = None dataflow_instance = mock_dataflow.return_value dataflow_instance.wait_for_done.return_value = None ...
18,751
[ 0.014745941385626793, 0.0040292260237038136, 0.011399498209357262, -0.022410377860069275, -0.0017555335070937872, -0.02886577509343624, 0.028239665552973747, 0.03413372486829758, 0.010163472965359688, -0.012759665958583355, 0.02741924673318863, 0.00792351458221674, -0.01606293022632599, -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": "mock_conn", "annotation": null, "type_comment": null}}, {"_type":...
def test_start_python_dataflow(self, mock_conn, mock_dataflow, mock_dataflowjob, mock_uuid): mock_uuid.return_value = MOCK_UUID mock_conn.return_value = None dataflow_instance = mock_dataflow.return_value dataflow_instance.wait_for_done.return_value = N...
18,752
[ 0.012309805490076542, 0.028944678604602814, 0.01602492667734623, -0.027414269745349884, 0.009066005237400532, -0.0034766884054988623, 0.028412362560629845, 0.003016456961631775, 0.005192852579057217, -0.007785120513290167, 0.04626712575554848, -0.0009107592632062733, -0.013629505410790443, ...
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": "mock_conn", "annotation": null, "type_comment": null}}, {"_type":...
def test_start_java_dataflow_with_job_class( self, mock_conn, mock_dataflow, mock_dataflowjob, mock_uuid): mock_uuid.return_value = MOCK_UUID mock_conn.return_value = None dataflow_instance = mock_dataflow.return_value dataflow_instance.wait_for_done.return_value = None ...
18,753
[ 0.037348393350839615, 0.021144837141036987, 0.0017433528555557132, -0.04440736770629883, -0.005107061006128788, 0.015412094071507454, -0.0039466083981096745, -0.002850328339263797, -0.004949303809553385, -0.013305097818374634, 0.033861685544252396, -0.004762134049087763, -0.00994138885289430...
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": "mock_select", "annotation": null, "type_comment": null}}, {"_type...
def test_dataflow_wait_for_done_logging(self, mock_select, mock_popen, mock_logging): mock_logging.info = MagicMock() mock_logging.warning = MagicMock() mock_proc = MagicMock() mock_proc.stderr = MagicMock() mock_proc.stderr.readlines = MagicMock(return_value=['test\n','error\n']) mo...
18,754
[ 0.005545612890273333, 0.01821698620915413, 0.03790340945124626, -0.02011920139193535, 0.03158281743526459, -0.019424742087721825, 0.021437669172883034, 0.007769896648824215, -0.008595196530222893, -0.0160530898720026, -0.001108367694541812, 0.025362875312566757, -0.003577976953238249, -0.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 DataFlowTemplateHookTest(unittest.TestCase): def setUp(self): with mock.patch(BASE_STRING.format('GoogleCloudBaseHook.__init__'), new=mock_init): self.dataflow_hook = DataFlowHook(gcp_conn_id='test') @mock.patch(DATAFLOW_STRING.format('DataFlowHook._start_temp...
18,755
[ -0.016353951767086983, -0.004278249107301235, 0.010494360700249672, 0.03146583214402199, -0.031994860619306564, -0.033466946333646774, -0.00501429196447134, -0.02187427319586277, -0.039516299962997437, 0.07466234266757965, -0.038596246391534805, 0.016365451738238335, -0.03309892490506172, ...
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 NotificationWarningExample(VerticalLayout): def __init__(self): super(NotificationWarningExample, self).__init__() self.setSpacing(True) self.setWidth(None) # layout will grow with content caption = TextField('Caption', 'Upload canceled') caption.setWidth('200px') ...
18,756
[ -0.0011180428555235267, -0.016231654211878777, 0.007716687861829996, 0.021456746384501457, -0.03904305398464203, -0.028471916913986206, 0.05258958786725998, -0.03526937589049339, -0.020924560725688934, 0.08485937118530273, -0.020053712651133537, 0.009410005062818527, -0.06386224180459976, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def __init__(self): super(NotificationWarningExample, self).__init__() self.setSpacing(True) self.setWidth(None) # layout will grow with content caption = TextField('Caption', 'Upload canceled') caption.setWidth('200px') self.addComponent(caption) description...
18,757
[ -0.006772186141461134, 0.0011056906078010798, -0.04993337020277977, 0.011887866072356701, -0.012483342550694942, -0.006279564928263426, 0.022801317274570465, -0.022822970524430275, -0.011281562969088554, 0.0223249364644289, 0.015818007290363312, -0.006869627628475428, -0.007724947761744261, ...
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": "c", "annotation": null...
class ShowListener(IClickListener): def __init__(self, c, caption, description): self._c = c self._caption = caption self._description = description def buttonClick(self, event): self._c.getWindow().showNotification(self._caption.getValue(), self._description.ge...
18,758
[ 0.012711700052022934, 0.002793719759210944, -0.030099723488092422, -0.003932613413780928, -0.02169112116098404, -0.0000999104740913026, -0.03626896068453789, -0.035698141902685165, 0.005774053744971752, 0.033327046781778336, 0.04057205840945244, -0.016487887129187584, -0.0007190124015323818,...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "datapath", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "version", "annotation": null, "type_comment": null}}, {"_type...
def msg(datapath, version, msg_type, msg_len, xid, buf): assert len(buf) >= msg_len msg_parser = _MSG_PARSERS.get(version) if msg_parser is None: raise exception.OFPUnknownVersion(version=version) return msg_parser(datapath, version, msg_type, msg_len, xid, buf) try: return msg_pa...
18,759
[ -0.0172527227550745, 0.027618223801255226, 0.014005559496581554, -0.029397808015346527, -0.016813606023788452, 0.003348276251927018, -0.048349227756261826, -0.025330187752842903, -0.007193449418991804, 0.02514529600739479, 0.01987587660551071, -0.03801839426159859, 0.01906697452068329, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "f", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}},...
def create_list_of_base_attributes(f): @functools.wraps(f) def wrapper(self, *args, **kwargs): ret = f(self, *args, **kwargs) cls = self.__class__ # hasattr(cls, '_base_attributes') doesn't work because super class # may already have the attribute. if '_base_attributes' n...
18,760
[ -0.0168557558208704, 0.018554216250777245, -0.003543339902535081, -0.037131860852241516, 0.028674697503447533, 0.024036144837737083, -0.023954149335622787, 0.017031459137797356, -0.026261713355779648, -0.006108601111918688, 0.005686914082616568, -0.02776104398071766, 0.01358768343925476, 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": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "v...
def wrapper(self, *args, **kwargs): ret = f(self, *args, **kwargs) cls = self.__class__ # hasattr(cls, '_base_attributes') doesn't work because super class # may already have the attribute. if '_base_attributes' not in cls.__dict__: cls._base_attributes = set(dir(self...
18,761
[ 0.05405452474951744, 0.01937442272901535, 0.04801340401172638, -0.008222013711929321, -0.019464587792754173, 0.029799867421388626, 0.00980555359274149, -0.049861807376146317, 0.02840229496359825, 0.017683809623122215, 0.033451590687036514, 0.036404527723789215, -0.007590851280838251, -0.01...
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 _serialize_header(self): # buffer length is determined after trailing data is formated. assert self.version is not None assert self.msg_type is not None assert self.buf is not None assert len(self.buf) >= self.datapath.ofproto.OFP_HEADER_SIZE self.msg_len = len(self....
18,762
[ 0.014017222449183464, 0.0501202717423439, -0.05585794523358345, 0.025186702609062195, -0.016263775527477264, 0.006333590485155582, -0.016548549756407738, -0.04425603151321411, 0.02565077878534794, 0.019902557134628296, -0.006591997109353542, 0.00650234567001462, 0.026494553312659264, 0.005...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "msg_", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "buf", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def msg_str_attr(msg_, buf, attr_list=None): if attr_list is None: attr_list = stringify.obj_attrs(msg_) for attr in attr_list: val = getattr(msg_, attr, None) if val is not None: buf += ' %s %s' % (attr, val) return buf
18,763
[ 0.04102814197540283, 0.007498928811401129, 0.01026744395494461, 0.03318054601550102, -0.006302014458924532, -0.0028413706459105015, 0.014081957750022411, -0.0014883369440212846, -0.0066662924364209175, 0.01714189536869526, 0.014165221713483334, -0.00017612204828765243, 0.04608640819787979, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "fmt", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "buf", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def msg_pack_into(fmt, buf, offset, *args): if len(buf) < offset: buf += bytearray(offset - len(buf)) if len(buf) == offset: buf += struct.pack(fmt, *args) return needed_len = offset + struct.calcsize(fmt) if len(buf) < needed_len: buf += bytearray(needed_len - len(buf)...
18,764
[ 0.022395296022295952, 0.002914608456194401, -0.04505706951022148, -0.04654490947723389, 0.02784700132906437, -0.019774924963712692, -0.057026397436857224, -0.013768055476248264, 0.03943881765007973, 0.021995577961206436, 0.008221971802413464, -0.04707786813378334, -0.00665641063824296, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment"...
def decorated_function(*args, **kwargs): try: data = request.get_json() except: json_abort(400, 'No JSON provided') if data == None: json_abort(400, 'Invalid Content-Type') return f(*args, **kwargs)
18,765
[ -0.028368916362524033, 0.059303440153598785, -0.02902083285152912, 0.027948323637247086, -0.03732752054929733, 0.019094867631793022, -0.0024026306346058846, -0.029168039560317993, 0.0398300401866436, -0.007171089760959148, 0.03007231280207634, -0.013206581585109234, 0.02952554263174534, -0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "code", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "text", "annotation": null, "type_comment": null}}], "kwarg": null...
def json_abort(code, text): json = { 'result': False, 'error': { 'status': code, 'text': text } } abort(make_response(jsonify(json), code))
18,766
[ -0.025856057181954384, 0.010652652010321617, -0.009917614050209522, -0.013349594548344612, -0.005302004981786013, -0.018592149019241333, 0.004123781807720661, 0.04384287819266319, 0.011041790246963501, 0.04090272635221481, 0.022915903478860855, 0.03350910544395447, 0.008182707242667675, 0....
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def test_docformat(): udd = doccer.unindent_dict(doc_dict) formatted = doccer.docformat(docstring, udd) assert_equal(formatted, filled_docstring) single_doc = 'Single line doc %(strtest1)s' formatted = doccer.docformat(single_doc, doc_dict) # Note - initial indent of format string does not #...
18,767
[ 0.011769414879381657, 0.012023856863379478, 0.0016775410622358322, 0.025160156190395355, 0.028142452239990234, -0.009745714254677296, 0.022544730454683304, 0.05013095960021019, 0.05571684613823891, 0.04196515306830406, 0.0064616394229233265, -0.007124371826648712, 0.020592037588357925, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "username", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "password", "annotation": null, "type_comment": null}}, {"_typ...
def add_user(username, password, age, sex, department, position, mobile, emergency_contact, email, perm=None): if perm in [auth_enums.ACADEMY, auth_enums.BUSINESS, auth_enums.CLUSTER]: status = auth_enums.USER_STATUS_NORMAL else: status = auth_enums.USER_STATUS_CHECK user = User...
18,768
[ -0.007589760236442089, -0.023859193548560143, -0.04720315709710121, -0.009125547483563423, 0.014892179518938065, -0.006400763988494873, 0.001733953133225441, 0.000678718788549304, -0.01605145074427128, 0.06281864643096924, 0.02029220573604107, 0.017190907150506973, 0.007441135589033365, 0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation"...
class Convolution2DLayer(object): def __init__(self, context, input_shape, filter_shape=(32, 4, 4), **kwargs): log.info("ConvolutionLayer constructor") self.context = context thr = context.thread number_channels, height_channels, width_channels = input_shape number_filt...
18,769
[ 0.024900715798139572, -0.009933908469974995, -0.033784784376621246, -0.009364146739244461, 0.036992333829402924, 0.016037749126553535, 0.030872667208313942, 0.005022347904741764, 0.02994416654109955, -0.010366505943238735, 0.035388559103012085, 0.001200193422846496, 0.014708304777741432, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "transaction_id", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "attr", "annotation": null, "type_comment": null}}], "kw...
def update_transaction_by_id(transaction_id, attr): transaction = get_transaction_by_id(transaction_id) if "status" in attr: if attr["status"]: attr["status"] = transaction.status + 1 else: attr["status"] = 0 for key, value in attr.iteritems(): transaction[ke...
18,770
[ 0.0015150296967476606, -0.020203467458486557, -0.05279446393251419, -0.015235552564263344, 0.0021728866267949343, -0.023521555587649345, -0.01877484656870365, -0.020498408004641533, -0.02980748750269413, 0.06271185725927353, 0.0017949932953342795, 0.019816357642412186, 0.00002075604970741551...
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}}, {"_type": "...
def __init__(self, context, input_shape, filter_shape=(32, 4, 4), **kwargs): log.info("ConvolutionLayer constructor") self.context = context thr = context.thread number_channels, height_channels, width_channels = input_shape number_filters, height_filters, width_filters = filter...
18,771
[ 0.021667297929525375, -0.023791542276740074, 0.0227294210344553, 0.04244241490960121, 0.003321788040921092, 0.01713203452527523, 0.02185847982764244, 0.011099180206656456, -0.005297335796058178, 0.057567037642002106, -0.004078550264239311, 0.030397944152355194, 0.0070153190754354, 0.000520...
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": "num_patterns", "annotation": null, "type_comment": null}}, {"_typ...
def create_state(self, num_patterns, state=None): # n, width, height = shape activation_shape = (num_patterns,) + get_output_shape(self.input_shape, self.weights, 'propagation') activations_intermediate = numpy.zeros(activation_shape).astype(numpy.float32) activations = numpy.sum(activat...
18,772
[ 0.02710263803601265, -0.005821193568408489, 0.008978272788226604, 0.00561142060905695, 0.010158244520425797, -0.006948722060769796, 0.03450761362910271, 0.019057853147387505, 0.017851660028100014, 0.050806958228349686, 0.01895296759903431, 0.02787879668176174, -0.012995420955121517, -0.028...
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": "input_shape", "annotation": null, "type_comment": null}}, {"_type...
def create_training_state(self, input_shape, state): act_shape = get_output_shape(input_shape, self.weights, 'propagation') act_shape[:1] + act_shape[2:] deltas = numpy.zeros(act_shape) deltas_intermediate = numpy.zeros(get_output_shape(deltas, self.weights, 'backprop')).astype(numpy.flo...
18,773
[ -0.04475703090429306, 0.013249006122350693, 0.06689082831144333, -0.023017514497041702, -0.008198204450309277, -0.025084059685468674, 0.00551305478438735, -0.03619174286723137, 0.007328080479055643, 0.025818226858973503, 0.026212502270936966, -0.014384246431291103, -0.012487647123634815, 0...
16
{"_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_wms_getmap_basic_mode(self): # 1 bits qs = "?" + "&".join(["%s=%s" % i for i in list({ "MAP": urllib.parse.quote(self.projectPath), "SERVICE": "WMS", "VERSION": "1.1.1", "REQUEST": "GetMap", "LAYERS": "Country", "STYLES": "...
18,774
[ -0.0314108245074749, 0.045990925282239914, 0.045844145119190216, -0.01493481919169426, -0.05964142456650734, -0.0234235692769289, -0.0006792376516386867, -0.03375929594039917, 0.006057714577764273, 0.01969292387366295, 0.040339913219213486, -0.0014081663684919477, -0.01794379949569702, -0....
16
{"_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_wms_getmap_complex_labeling(self): qs = "?" + "&".join(["%s=%s" % i for i in list({ "MAP": urllib.parse.quote(self.projectPath), "SERVICE": "WMS", "VERSION": "1.1.1", "REQUEST": "GetMap", "LAYERS": "pointlabel", "STYLES": "", ...
18,775
[ -0.052311010658741, 0.018475687131285667, 0.07131063938140869, -0.022763701155781746, -0.019454622641205788, -0.026003839448094368, -0.008962087333202362, -0.03637228533625603, 0.00980314426124096, 0.020916132256388664, 0.01955113746225834, -0.032925330102443695, -0.02873382903635502, -0.0...
16
{"_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_wms_getmap_basic(self): qs = "?" + "&".join(["%s=%s" % i for i in list({ "MAP": urllib.parse.quote(self.projectPath), "SERVICE": "WMS", "VERSION": "1.1.1", "REQUEST": "GetMap", "LAYERS": "Country", "STYLES": "", "FORMAT...
18,776
[ -0.03413412719964981, 0.01892913319170475, 0.08024033159017563, -0.0012180560734122992, -0.037332773208618164, -0.040188711136579514, 0.0160731989890337, -0.030661312863230705, -0.008967634290456772, -0.0018806328298524022, 0.024446798488497734, 0.009795854799449444, -0.027439817786216736, ...
16
{"_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_wms_getmap_context_rendering(self): project = os.path.join(self.testdata_path, "test_project_render_context.qgs") qs = "?" + "&".join(["%s=%s" % i for i in list({ "MAP": urllib.parse.quote(project), "SERVICE": "WMS", "VERSION": "1.1.1", "REQUEST":...
18,777
[ -0.04295355826616287, 0.01268655713647604, 0.06881958246231079, -0.002680196426808834, -0.03809487819671631, -0.03997262939810753, -0.01398924645036459, -0.010591690428555012, -0.002578974002972245, 0.005169684067368507, -0.0014911985490471125, -0.012123231776058674, -0.03753155469894409, ...
16
{"_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_wms_getmap_dpi(self): qs = "?" + "&".join(["%s=%s" % i for i in list({ "MAP": urllib.parse.quote(self.projectPath), "SERVICE": "WMS", "VERSION": "1.1.1", "REQUEST": "GetMap", "LAYERS": "Country", "STYLES": "", "FORMAT":...
18,778
[ 0.025071265175938606, 0.0018467672634869814, 0.03666781634092331, 0.005394252948462963, 0.03029080480337143, -0.011629310436546803, -0.029067816212773323, 0.038720689713954926, 0.01337643712759018, 0.004932902287691832, 0.03867701068520546, -0.025770114734768867, 0.03415632247924805, -0.06...
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": "client", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _start_service(self, client): req_id = client.get_request_id() req_str = self.service_name if self.is_remote: req_str = "remote " + self.remote_peer_id + " " + self.service_name client.send_request(req_id, req_str) rsp = client.read_response() if rsp.code ...
18,779
[ 0.0032068665605038404, -0.025053968653082848, 0.05773396044969559, 0.031167220324277878, 0.04335227608680725, -0.010786262340843678, 0.0015814151847735047, 0.03655517101287842, 0.0038389144465327263, 0.019821440801024437, 0.0065069859847426414, -0.01922047697007656, 0.03236914798617363, -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": "ccnet_client_pool", "annotation": null, "type_comment": null}}, {...
def __init__(self, ccnet_client_pool, service_name, retry_num=1, is_remote=False, remote_peer_id='', req_pool=False): SearpcClient.__init__(self) self.pool = ccnet_client_pool self.service_name = service_name self.retry_num = retry_num self.is_remote = is_remote ...
18,780
[ 0.03657509759068489, 0.016522197052836418, 0.015291424468159676, 0.004851608537137508, 0.012711773626506329, -0.017094071954488754, -0.023894404992461205, -0.013426616787910461, 0.01899617537856102, -0.004864040296524763, 0.050324946641922, -0.049007151275873184, -0.036003224551677704, 0.0...
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": "client", "annotation": null, "type_comment": null}}, {"_type": "a...
def _real_call(self, client, req_id, fcall_str): client.send_update(req_id, SC_CLIENT_CALL, SS_CLIENT_CALL, fcall_str) rsp = client.read_response() if rsp.code == SC_SERVER_RET: return rsp.content elif rsp.code == SC_SERVER_MORE: buf = rsp.content...
18,781
[ -0.0125411506742239, -0.0030846730805933475, 0.048364974558353424, 0.00583754014223814, 0.008930648677051067, 0.009993554092943668, -0.026454517617821693, 0.02825414389371872, 0.011405136436223984, 0.012349939905107021, -0.0019739659037441015, -0.05835290625691414, 0.02764677070081234, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ccnet_client_pool", "a...
class CcnetRpcClient(RpcClientBase): def __init__(self, ccnet_client_pool, retry_num=1, *args, **kwargs): RpcClientBase.__init__(self, ccnet_client_pool, "ccnet-rpcserver", *args, **kwargs) @searpc_func("string", []) def list_peers(self): pass @searpc_fu...
18,782
[ -0.008544839918613434, 0.009952610358595848, 0.051151178777217865, 0.02689823880791664, 0.024121984839439392, 0.0009846208849921823, -0.025680353865027428, 0.014169374480843544, 0.03920804709196091, -0.017993271350860596, 0.021555259823799133, -0.056467968970537186, 0.023938646540045738, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ccnet_client_pool", "a...
class CcnetThreadedRpcClient(RpcClientBase): def __init__(self, ccnet_client_pool, retry_num=1, *args, **kwargs): RpcClientBase.__init__(self, ccnet_client_pool, "ccnet-threaded-rpcserver", *args, **kwargs) @searpc_func("int", ["string", "string", "int", "int"]) def ...
18,783
[ 0.07234576344490051, -0.004005406517535448, -0.016838718205690384, -0.022878574207425117, 0.01444265153259039, -0.025572769343852997, 0.007028094492852688, -0.02239273488521576, 0.050659697502851486, 0.000383356906240806, 0.02621319144964218, -0.02320982702076435, 0.05030636116862297, -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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg...
def endElement(self, name, value, connection): if name == 'Path': self.paths.append(value) elif name == "Status": self.status = value elif name == "Id": self.id = value elif name == "CreateTime": self.create_time = value elif name =...
18,784
[ 0.024176709353923798, 0.008003219962120056, -0.02954256162047386, 0.03893786668777466, 0.01504463516175747, -0.027578456327319145, 0.05025677755475044, -0.01784905232489109, -0.008641047403216362, 0.006373215466737747, -0.00028411176754161716, -0.019853653386235237, 0.03628531098365784, -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": "mimeType", "annotation": null, "type_comment": null}}, {"_type": ...
def __init__(self, mimeType, fileHash, url, ip, size, fileName, encoding, width, height, caption = None, _id = None, _from = None, to = None, notify = None, timestamp = None, participant = None, preview = None, offline = None, retry = None): super(ImageDownload...
18,785
[ 0.060917552560567856, 0.030901990830898285, -0.028833650052547455, -0.021028127521276474, -0.004299808759242296, -0.0007529282593168318, 0.0037765679880976677, -0.004567584954202175, 0.0363190732896328, -0.01124660111963749, 0.042302485555410385, -0.004967710468918085, -0.024967823177576065,...
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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg...
def endElement(self, name, value, connection): if name == 'IsTruncated': self.is_truncated = self.to_boolean(value) elif name == 'Marker': self.marker = value elif name == 'NextMarker': self.next_marker = value elif name == 'MaxItems': self...
18,786
[ 0.030832691118121147, -0.03639378771185875, -0.033119916915893555, 0.015797549858689308, -0.014205461367964745, -0.0008296797168441117, 0.015023929066956043, -0.043793633580207825, 0.003203796921297908, -0.004327788483351469, 0.008240737020969391, -0.028881821781396866, -0.015360286459326744...
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 __str__(self): out = super(ImageDownloadableMediaMessageProtocolEntity, self).__str__() out += "Encoding: %s\n" % self.encoding out += "Width: %s\n" % self.width out += "Height: %s\n" % self.height if self.caption: out += "Caption: %s\n" % self.caption re...
18,787
[ 0.027673834934830666, -0.019449254497885704, -0.042069707065820694, 0.0052672685123980045, 0.007768294308334589, -0.016757158562541008, 0.03214545175433159, -0.013255150988698006, -0.006986902095377445, -0.009656183421611786, 0.012593534775078297, 0.011737995781004429, 0.012924343347549438, ...
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 toProtocolTreeNode(self): node = super(ImageDownloadableMediaMessageProtocolEntity, self).toProtocolTreeNode() mediaNode = node.getChild("media") mediaNode.setAttribute("encoding", self.encoding) mediaNode.setAttribute("width", str(self.width)) mediaNode.setAttribute("h...
18,788
[ 0.010329543612897396, -0.01968333125114441, -0.044256653636693954, 0.005333005450665951, 0.009813627228140831, -0.027500586584210396, 0.035979561507701874, 0.0028165108524262905, -0.007273299619555473, -0.007189182564616203, 0.022206835448741913, 0.013021280989050865, 0.00810885988175869, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "node", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def fromProtocolTreeNode(node): entity = DownloadableMediaMessageProtocolEntity.fromProtocolTreeNode(node) entity.__class__ = ImageDownloadableMediaMessageProtocolEntity mediaNode = node.getChild("media") entity.setImageProps( mediaNode.getAttributeValue("encoding"), ...
18,789
[ -0.0017129998886957765, -0.006626742426306009, -0.014688842929899693, 0.024558236822485924, -0.010854237712919712, -0.05326538905501366, 0.03354755789041519, 0.0006266593700274825, 0.0037638850044459105, 0.03185027092695236, -0.0011498576495796442, -0.025144951418042183, 0.03616682067513466,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def fromFilePath(path, url, ip, to, mimeType = None, caption = None, dimensions = None): preview = ImageTools.generatePreviewFromImage(path) entity = DownloadableMediaMessageProtocolEntity.fromFilePath(path, url, DownloadableMediaMessageProtocolEntity.MEDIA_TYPE_IMAGE, ip, to, mimeType, preview) ...
18,790
[ 0.007665980141609907, 0.018329186365008354, 0.03380786255002022, -0.026492957025766373, -0.029574021697044373, -0.01501756627112627, -0.027603816241025925, -0.006225006654858589, -0.014451656490564346, -0.005753415171056986, 0.01948196440935135, -0.021032975986599922, 0.05822581797838211, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "parser", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def build_parser(parser): parser.add_argument('assembly', help='Assembly containing sequence to BLAST') parser.add_argument('-l','--label', default='contig', help="Label of sequence in assembly to BLAST (default: 'contig')") parser.add_argument('-j','--json', default=None, metavar='hits.json...
18,791
[ 0.0350334532558918, 0.05360722541809082, 0.014597272500395775, -0.010281010530889034, -0.028640856966376305, -0.02125413343310356, 0.0027999079320579767, -0.025331301614642143, -0.007713903672993183, 0.022009164094924927, 0.05365756154060364, -0.05949646979570389, 0.09246617555618286, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def action(args): if not os.path.exists(args.assembly): raise ValueError("No such file: %s" % (args.assembly,)) asm = deserialize(args.assembly) if not args.label in asm: raise ValueError("No label %s in assembly" % (repr(args.label),)) seq = ''.join([x for x in asm[args.label]]) if ...
18,792
[ -0.0069654579274356365, 0.05798783153295517, 0.009921453893184662, -0.01161433756351471, 0.050356749445199966, -0.043815821409225464, 0.02679264172911644, -0.006546167656779289, -0.026079848408699036, 0.026436245068907738, 0.01863744854927063, -0.030188892036676407, 0.01174012478441, -0.02...
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "attributes", "annotation": null, "type_comment": null}}...
def __init__(self, *fields, **attributes): if self.abstract: raise TypeError('abstract nodes are not instanciable') if fields: if len(fields) != len(self.fields): if not self.fields: raise TypeError('%r takes 0 arguments' % ...
18,793
[ 0.000019281844288343564, 0.020395170897245407, 0.0221842210739851, -0.020818037912249565, -0.03320043534040451, -0.020232530310750008, -0.006017714273184538, -0.01835673861205578, -0.023420292884111404, 0.005242459010332823, -0.048705533146858215, -0.03287515044212341, 0.03465335816144943, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "runbot.repo"}}, "targets": [{"_type": "Name", "_fields": {"id": "_inherit", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": ...
class RunbotRepo(models.Model): _inherit = "runbot.repo" is_custom_build = fields.Boolean('Custom Build') skip_test_jobs = fields.Boolean('Skip standard test jobs') custom_build_dir = fields.Char( 'Custom Build Directory', help="Relative directory where repo will be checked out" ) ...
18,794
[ 0.012808476574718952, 0.007945532910525799, -0.012670074589550495, -0.05324702709913254, 0.01713668555021286, -0.0030574260745197535, -0.032411232590675354, 0.015463278628885746, 0.0007891273708082736, 0.035833537578582764, 0.048918817192316055, -0.007775676436722279, 0.03606001287698746, ...
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": "eval_ctx", "annotation": null, "type_comment": null}}], "kwarg": ...
def as_const(self, eval_ctx=None): eval_ctx = get_eval_context(self, eval_ctx) if eval_ctx.volatile or self.node is None: raise Impossible() # we have to be careful here because we call filter_ below. # if this variable would be called filter, 2to3 would wrap the # ca...
18,795
[ 0.04458216205239296, 0.01817711815237999, 0.012634867802262306, -0.018775291740894318, 0.012830189429223537, 0.01064502913504839, -0.036573976278305054, -0.014868859201669693, 0.020472148433327675, 0.01716388761997223, 0.03554853796958923, -0.0031922878697514534, 0.04231154918670654, 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}}, {"_type": "arg", "_fields": {"arg": "eval_ctx", "annotation": null, "type_comment": null}}], "kwarg": ...
def as_const(self, eval_ctx=None): eval_ctx = get_eval_context(self, eval_ctx) if eval_ctx.volatile: raise Impossible() obj = self.node.as_const(eval_ctx) # don't evaluate context functions args = [x.as_const(eval_ctx) for x in self.args] if isinstance(obj, _...
18,796
[ 0.03478465974330902, 0.001783069223165512, 0.027391735464334488, -0.011806169524788857, 0.014442268759012222, 0.0013424853095784783, -0.03179905563592911, -0.02127835527062416, 0.01674070954322815, 0.011024225503206253, 0.034595098346471786, 0.018624484539031982, 0.04755641147494316, 0.000...
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": "eval_ctx", "annotation": null, "type_comment": null}}], "kwarg": ...
def as_const(self, eval_ctx=None): eval_ctx = get_eval_context(self, eval_ctx) if self.ctx != 'load': raise Impossible() try: return self.environment.getitem(self.node.as_const(eval_ctx), self.arg.as_const(eval_ctx)) exc...
18,797
[ 0.039864975959062576, 0.005771192256361246, 0.03181047737598419, -0.010403728112578392, 0.025745630264282227, 0.014682680368423462, -0.03588566929101944, -0.02212589979171753, 0.015365874394774437, 0.0074971565045416355, 0.027615424245595932, 0.016828149557113647, 0.039577316492795944, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "eval_ctx", "annotation": null, "type_comment": null}}], "kwarg": ...
def as_const(self, eval_ctx=None): if self.ctx != 'load': raise Impossible() try: eval_ctx = get_eval_context(self, eval_ctx) return self.environment.getattr(self.node.as_const(eval_ctx), self.attr) except: ...
18,798
[ 0.03942979872226715, 0.017150551080703735, -0.018444489687681198, -0.007975359447300434, 0.030231080949306488, 0.01610363833606243, -0.03590087965130806, -0.019973687827587128, 0.03484220430254936, 0.0031760281417518854, 0.033712949603796005, 0.021420544013381004, 0.053122010082006454, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "eval_ctx", "annotation": null, "type_comment": null}}], "kwarg": ...
def as_const(self, eval_ctx=None): eval_ctx = get_eval_context(self, eval_ctx) result = value = self.expr.as_const(eval_ctx) try: for op in self.ops: new_value = op.expr.as_const(eval_ctx) result = _cmpop_to_func[op.op](value, new_value) ...
18,799
[ -0.031469520181417465, -0.017436107620596886, 0.003882216289639473, -0.018498096615076065, 0.02687479741871357, 0.04321640729904175, -0.01024059858173132, 0.022843576967716217, 0.02954060398042202, 0.03474217653274536, -0.03833993151783943, -0.032531507313251495, 0.04469018802046776, 0.024...
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 PanelPluginTests(test.PluginTestCase): def test_add_panel(self): dashboard = horizon.get_dashboard("admin") self.assertIn(plugin_panel.PluginPanel, [p.__class__ for p in dashboard.get_panels()]) def test_remove_panel(self): dashboard = horizon.get_dashboard("...
18,800
[ 0.04178743436932564, 0.016629694029688835, 0.009908245876431465, 0.010239268653094769, 0.021757744252681732, 0.02378876507282257, -0.002819305518642068, -0.022520780563354492, -0.0012350240722298622, 0.054669275879859924, 0.020860055461525917, -0.0007349831284955144, -0.0035542885307222605, ...
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": "backend_domain", "annotation": null, "type_comment": null}}, {"_t...
def __init__(self, backend_domain, ident, description=None, frontend_domain=None): #: domain providing this device self.backend_domain = backend_domain #: device identifier (unique for given domain and device type) self.ident = ident # allow redefining those as d...