Search is not available for this dataset
id
int64
0
10.8M
vector
listlengths
1.54k
1.54k
ast_depth
int64
3
164
ast_data
stringlengths
297
510k
full_path
stringlengths
0
319
code
stringlengths
60
56.5k
14,301
[ -0.007004186511039734, 0.02558050863444805, 0.029717518016695976, -0.00836020614951849, -0.02652282640337944, 0.01983466185629368, 0.021443499252200127, -0.00035821759956888855, -0.025097856298089027, 0.0026430892758071423, 0.031303372234106064, -0.05299968644976616, 0.039232637733221054, ...
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": "client", "annotation": null, "type_comment": null}}], "kwarg": nu...
def __init__(self, client=None): self._client = client or GlanceClientWrapper() # NOTE(jbresnah) build the table of download handlers at the beginning # so that operators can catch errors at load time rather than whenever # a user attempts to use a module. Note this cannot be done in gl...
14,302
[ -0.02584897354245186, 0.04482964053750038, -0.01923590525984764, -0.05930877849459648, -0.006125789135694504, 0.004637849051505327, 0.01927071250975132, -0.03670832887291908, -0.02728760614991188, -0.0005500013357959688, 0.014780786819756031, 0.0100356200709939, 0.04691797494888306, -0.038...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "image", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "include_locations", "annotation": null, "type_comment": null}}],...
def _extract_attributes(image, include_locations=False): # NOTE(hdd): If a key is not found, base.Resource.__getattr__() may perform # a get(), resulting in a useless request back to glance. This list is # therefore sorted, with dependent attributes as the end # 'deleted_at' depends on 'deleted' # '...
14,303
[ 0.0016422142507508397, 0.03537972643971443, -0.059241458773612976, -0.03103930503129959, -0.027122341096401215, -0.038111016154289246, -0.06089293584227562, 0.0121955256909132, -0.014037557877600193, 0.009527754038572311, 0.040778789669275284, -0.05932614952325821, 0.020876368507742882, 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 _extract_query_params(params): _params = {} accepted_params = ('filters', 'marker', 'limit', 'page_size', 'sort_key', 'sort_dir') for param in accepted_params: if params.get(param): _params[param] = params.get(param) # ensure filters is a dict _params....
14,304
[ -0.012289118953049183, 0.044542260468006134, -0.007529983762651682, -0.0031099587213248014, 0.0009847236797213554, -0.015175903216004372, -0.012706485576927662, -0.032392263412475586, 0.0022868195082992315, -0.006625690031796694, -0.0002987140032928437, -0.022514594718813896, 0.0574574284255...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "exc_value", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs...
def _translate_plain_exception(exc_value): if isinstance(exc_value, (glanceclient.exc.Forbidden, glanceclient.exc.Unauthorized)): return exception.Forbidden(six.text_type(exc_value)) if isinstance(exc_value, glanceclient.exc.NotFound): return exception.NotFound(six.text_type(...
14,305
[ 0.003021587384864688, 0.0215961504727602, -0.05359218269586563, -0.0234465803951025, -0.030824875459074974, -0.027662748470902443, 0.014885416254401207, -0.0005142114823684096, -0.04396526515483856, -0.00306550576351583, 0.028599675744771957, -0.020998859778046608, 0.05851104483008385, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "image_id", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "exc_value", "annotation": null, "type_comment": null}}], "kwa...
def _translate_image_exception(image_id, exc_value): if isinstance(exc_value, (glanceclient.exc.Forbidden, glanceclient.exc.Unauthorized)): return exception.ImageNotAuthorized(image_id=image_id) if isinstance(exc_value, glanceclient.exc.NotFound): return exception.ImageNotFou...
14,306
[ 0.044732362031936646, 0.025073468685150146, 0.0023145456798374653, 0.029929203912615776, 0.025346681475639343, 0.03815041854977608, -0.008090820163488388, 0.025930363684892654, -0.038920383900403976, 0.0073332758620381355, 0.0008242949843406677, -0.007215297780930996, 0.0066812909208238125, ...
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 next(self): element = self.currentElement if self.currentElement >= 4: #there are 4 elements in a quanternion raise StopIteration self.currentElement = self.currentElement + 1 item = self.dataPtr.dereference() self.dataPtr = self.dataPtr + 1 return ('[%s]' % (self.elementNames[elem...
14,307
[ 0.013289066962897778, 0.055142536759376526, -0.03606019169092178, 0.009564817883074284, 0.03251328691840172, 0.03513799607753754, -0.020690273493528366, 0.06157425418496132, -0.05864214897155762, 0.005092762876302004, 0.02889544516801834, 0.0050543383695185184, 0.027547622099518776, -0.038...
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": "dataPtr", "annotation"...
class _iterator: def __init__ (self, dataPtr): self.dataPtr = dataPtr self.currentElement = 0 self.elementNames = ['x', 'y', 'z', 'w'] def __iter__ (self): return self def next(self): element = self.currentElement if self.currentElement >= 4: #there are 4 elements in a quanternion ...
14,308
[ 0.0382898785173893, 0.047688521444797516, 0.03327886760234833, -0.047688521444797516, -0.006875155493617058, 0.07001029700040817, 0.0251030083745718, -0.007156874984502792, -0.0004967554705217481, -0.01954054646193981, 0.030881255865097046, -0.02385624870657921, 0.01270734891295433, 0.0541...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def downgrade(): op.drop_constraint( "cycle_task_group_id", "cycle_task_group_object_tasks", type_="foreignkey" ) op.drop_column( 'cycle_task_group_object_tasks', 'cycle_task_group_id' ) op.alter_column( 'cycle_task_group_object_tasks', 'cycle_task_group_object_id'...
14,309
[ 0.03453163430094719, 0.02623607963323593, 0.03884532302618027, -0.024112416431307793, -0.0038850854616612196, 0.04747270420193672, 0.02548394910991192, -0.005013281013816595, 0.007095465902239084, -0.01758657954633236, 0.04479600489139557, -0.016591113060712814, 0.006465003360062838, 0.028...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"arg...
def upgrade(): op.alter_column( 'cycle_task_group_object_tasks', 'cycle_task_group_object_id', existing_type=sa.Integer(), nullable=True ) op.add_column( 'cycle_task_group_object_tasks', sa.Column('cycle_task_group_id', sa.Integer(), nullable=False) ) op.execute(""" ...
14,310
[ -0.021588271483778954, 0.04687531664967537, 0.0624198392033577, -0.02256735786795616, -0.02632657065987587, -0.019388346001505852, 0.04143594205379486, -0.01994437165558338, -0.021769583225250244, 0.036504242569208145, 0.04965544119477272, -0.01998063363134861, -0.009265067055821419, 0.004...
10
{"_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 draw(): glViewport(0, 0, f_width, f_height) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) # set up matrices glMatrixMode(GL_PROJECTION) glLoadMatrixf(perspective_matrix(fovy, f_width/f_height, 1.0, 100.0)) glMatrixMode(GL_MODELVIEW) glLoadMatrixf(arcball.matrix().T) # renderin...
14,311
[ -0.023858435451984406, 0.06224153935909271, -0.038543395698070526, 0.03341414034366608, -0.011090781539678574, -0.05038013681769371, 0.011534659191966057, -0.008865226991474628, 0.029295939952135086, 0.015954943373799324, 0.03205784410238266, -0.0014217962743714452, 0.0267806313931942, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "window", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "button", "annotation": null, "type_comment": null}}, {"_type": ...
def mouse_button_callback(window, button, action, mods): global animate (x, y) = glfw.get_cursor_pos(window) if button == 0 and mods == 0: arcball.active = (action == glfw.PRESS) if arcball.active: arcball.down([x,y]) animate = None elif numpy.allclose(arcball...
14,312
[ -0.018445059657096863, 0.05884251743555069, 0.05687437206506729, -0.03630977123975754, -0.05001109465956688, -0.000496767635922879, 0.023188795894384384, 0.019731925800442696, 0.042491767555475235, 0.03535092994570732, 0.02911846712231636, -0.007979822345077991, 0.007323774043470621, 0.047...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Global", "_fields": {"names": ["primitive_restart_mode"]}}, {"...
def probe_extensions(): global primitive_restart_mode primitive_restart_mode = PRIMITIVE_RESTART_NONE if glInitGl31VERSION() and glPrimitiveRestartIndex: # 3.1+ primitive_restart_mode = PRIMITIVE_RESTART_CORE elif glPrimitiveRestartNV: primitive_restart_mode = PRIMITIVE_RESTART_NV el...
14,313
[ -0.013241110369563103, -0.0006650884752161801, 0.009572653099894524, -0.011479095555841923, -0.00853855162858963, -0.007983950898051262, -0.008636762388050556, 0.006354808807373047, 0.04591638222336769, 0.06752272695302963, 0.010444995015859604, -0.046886932104825974, -0.004907645285129547, ...
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 UrlutilsTestCase(CMSTestCase): def test_levelize_path(self): path = '/application/item/new' output = ['/application/item/new', '/application/item', '/application'] self.assertEqual(urlutils.levelize_path(path), output) def test_urljoin(self): self.assertEqual('a/b/c/', url...
14,314
[ 0.042711466550827026, 0.07319377362728119, -0.007790426257997751, -0.04207736253738403, -0.007320509757846594, 0.03279225900769234, 0.039337124675512314, -0.005670139566063881, -0.04429672658443451, 0.03775186091661453, -0.009030327200889587, -0.023801563307642937, -0.0066411118023097515, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "level", "annotation": ...
class RecordManager(models.Manager): def log(self, level, src, msg, **kwargs): msg = msg.format(**kwargs).encode('utf-8') return Record.objects.create(level=RECORD_INFO, src=src, msg=msg) def info(self, src, msg, **kwargs): self.log(RECORD_INFO, src, msg, **kwargs) def error(self, ...
14,315
[ -0.027514927089214325, -0.04756324738264084, -0.02292102575302124, -0.02230284921824932, 0.030133087188005447, -0.01484836358577013, 0.004457539413124323, -0.00098408292979002, 0.03216943517327309, 0.03073914349079132, -0.002021195599809289, -0.030933082103729248, 0.009793859906494617, -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_is_media_url(self): with self.settings(MEDIA_URL='/media/'): request = self.get_request('/media/') self.assertTrue(urlutils.is_media_request(request)) request = self.get_request('/no-media/') self.assertFalse(urlutils.is_media_request(request)) wi...
14,316
[ 0.019968001171946526, 0.011077633127570152, 0.02388787269592285, -0.0681246742606163, -0.05927731469273567, -0.0454164519906044, 0.025878529995679855, -0.013873152434825897, -0.016097281128168106, 0.06379929929971695, 0.02063155360519886, -0.016134144738316536, 0.008017920888960361, -0.028...
12
{"_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": "options", "annotation": null, "type_comment": null}}, "...
def handle(self, *args, **options): media_path = "" if len(args): media_path = args[0] path = os.path.join(MEDIA_ROOT, media_path) else: path = os.path.join(MEDIA_ROOT, DIRECTORY) if not os.path.isdir(path): raise CommandE...
14,317
[ 0.021858152002096176, -0.00408047903329134, 0.02513749711215496, -0.06613555550575256, -0.05650949478149414, -0.01936435140669346, 0.024277137592434883, -0.02615995518863201, -0.025586381554603577, 0.033092718571424484, 0.0001256641116924584, -0.031546562910079956, 0.009320574812591076, -0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "<media_path>"}}, "targets": [{"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": nul...
class Command(BaseCommand): args = '<media_path>' help = "(Re)Generate Image-Versions within FILEBROWSER_DIRECTORY/MEDIA_ROOT." def handle(self, *args, **options): media_path = "" if len(args): media_path = args[0] path = os.path.join(MEDIA_ROOT, media_p...
14,318
[ -0.005880261771380901, -0.02593887969851494, 0.012699487619102001, -0.025985827669501305, -0.021901333704590797, 0.004955969285219908, -0.0005633783875964582, 0.012617328204214573, 0.007323918864130974, -0.029389571398496628, -0.007036360912024975, -0.042089059948921204, 0.0716898962855339, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}, {"_type": "ar...
def get_db_prep_lookup(self, value, connection): # get_db_prep_lookup is called by process_rhs from super class if isinstance(value, (tuple, list)): # First param is assumed to be the geometric object params = [connection.ops.Adapter(value[0])] + list(value)[1:] else: ...
14,319
[ 0.04490680620074272, -0.0023047623690217733, 0.05866038054227829, -0.0673832893371582, -0.040660735219717026, -0.00709024490788579, 0.038306936621665955, -0.012611289508640766, -0.00809407141059637, 0.060552652925252914, 0.0031989754643291235, 0.006063342094421387, -0.03971460089087486, -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": "path", "annotation": null, "type_comment": null}}, {"_type": "arg...
def createVersions(self, path, selected_version): if selected_version: self.stdout.write('generating version "%s" for: %s\n' % (selected_version, path)) version_generator(path, selected_version, True) else: self.stdout.write('generating all versions for: %s\n' % path)...
14,320
[ -0.01723892241716385, -0.023126821964979172, 0.08731555193662643, -0.023020626977086067, -0.0005331853753887117, -0.025061924010515213, 0.00028097318136133254, -0.03410026431083679, -0.010707954876124859, 0.01675514690577984, -0.007705007679760456, -0.06739816814661026, 0.04837753623723984, ...
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": "compiler", "annotation": null, "type_comment": null}}, {"_type": ...
def process_rhs(self, compiler, connection): rhs, rhs_params = super(GISLookup, self).process_rhs(compiler, connection) if hasattr(self.rhs, '_as_sql'): # If rhs is some QuerySet, don't touch it return rhs, rhs_params geom = self.rhs if isinstance(self.rhs, Col):...
14,321
[ 0.008065440692007542, -0.049950920045375824, 0.06043975427746773, -0.02282610908150673, 0.025663252919912338, -0.0029956582002341747, -0.039698515087366104, -0.028822800144553185, -0.01821575127542019, -0.008135294541716576, -0.020569290965795517, -0.06908014416694641, 0.07333586364984512, ...
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": "compiler", "annotation": null, "type_comment": null}}, {"_type": ...
def as_sql(self, compiler, connection): lhs_sql, sql_params = self.process_lhs(compiler, connection) rhs_sql, rhs_params = self.process_rhs(compiler, connection) sql_params.extend(rhs_params) template_params = {'lhs': lhs_sql, 'rhs': rhs_sql} rhs_op = self.get_rhs_op(connection,...
14,322
[ 0.004957030061632395, -0.023725053295493126, 0.008256212808191776, -0.010680236853659153, 0.006413425784558058, 0.05040913075208664, 0.029537426307797432, -0.039894018322229385, -0.011591722257435322, 0.002526401076465845, 0.032152995467185974, -0.0179787278175354, -0.018097618594765663, 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}}, {"_type": "arg", "_fields": {"arg": "opcounts", "annotation...
class OperationCountersTest(unittest.TestCase): def verify_counters(self, opcounts, expected_elements, expected_size=None): self.assertEqual(expected_elements, opcounts.element_counter.value()) if expected_size is not None: if math.isnan(expected_size): self.assertTrue(math.isnan(opcounts.mean_...
14,323
[ 0.004446709994226694, -0.06461714208126068, 0.024750879034399986, -0.06909239292144775, -0.013368670828640461, -0.010057898238301277, -0.006341841537505388, -0.010217729024589062, 0.01109679602086544, -0.006244801916182041, 0.024020224809646606, -0.020777951925992966, -0.025869691744446754, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "buildbot"}}, "targets": [{"_type": "Name", "_fields": {"id": "module_under_test", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comm...
class VersioningUtilsTests(unittest.SynchronousTestCase): # Version utils are copied in three packages. # this unit test is made to be able to test the three versions # with the same test module_under_test = "buildbot" def setUp(self): try: self.m = __import__(self.module_under_...
14,324
[ 0.03361797705292702, 0.023364361375570297, -0.013965212740004063, -0.020186807960271835, 0.001128164934925735, 0.06162850931286812, 0.022937128320336342, -0.014899787493050098, 0.0006383477593772113, -0.031348299235105515, 0.052870213985443115, -0.01759670302271843, -0.011468564160168171, ...
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_update_old_object(self): coder = coders.PickleCoder() opcounts = OperationCounters(CounterFactory(), 'some-name', coder, 0) self.verify_counters(opcounts, 0, float('nan')) obj = OldClassThatDoesNotImplementLen() value = GlobalWindows.windowed_value(obj) ...
14,325
[ 0.038938701152801514, 0.013120649382472038, -0.016572754830121994, -0.00444739731028676, -0.003505012020468712, 0.04507577791810036, 0.03534110262989998, -0.010501809418201447, -0.01470782421529293, -0.004817738197743893, 0.06110624969005585, 0.01443006843328476, -0.020381975919008255, 0.0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_str(self): coder = coders.PickleCoder() opcounts = OperationCounters(CounterFactory(), 'some-name', coder, 0) self.verify_counters(opcounts, 0, float('nan')) value = GlobalWindows.windowed_value('abcde') opcounts.update_from(value) estimated_size ...
14,326
[ 0.030593736097216606, -0.010020927526056767, 0.013186492025852203, -0.0023388885892927647, -0.01797180436551571, 0.04812195897102356, 0.049331728368997574, -0.006089175119996071, -0.018415385857224464, 0.0035352164413779974, 0.06581148505210876, -0.004250997211784124, -0.03502956032752991, ...
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_update_multiple(self): coder = coders.PickleCoder() total_size = 0 opcounts = OperationCounters(CounterFactory(), 'some-name', coder, 0) self.verify_counters(opcounts, 0, float('nan')) value = GlobalWindows.windowed_value('abcde') opcounts.update_from(va...
14,327
[ 0.03308732435107231, 0.030807269737124443, -0.014396167360246181, -0.00577967707067728, -0.006157476920634508, 0.052123140543699265, 0.036560434848070145, -0.002793731400743127, 0.013189858756959438, -0.02897792123258114, 0.04615787789225578, -0.010883290320634842, -0.0166894793510437, -0....
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_new_object(self): coder = coders.PickleCoder() opcounts = OperationCounters(CounterFactory(), 'some-name', coder, 0) self.verify_counters(opcounts, 0, float('nan')) obj = ObjectThatDoesNotImplementLen() value = GlobalWindows.windowed_value(obj) o...
14,328
[ 0.02005971595644951, 0.019625166431069374, 0.009336928837001324, 0.0032914141193032265, 0.0027585045900195837, 0.0010004900395870209, -0.007528265472501516, -0.009184248745441437, 0.04772990942001343, 0.0118561377748847, -0.0002143383026123047, -0.02070566639304161, 0.015796439722180367, -...
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": "xmlattrs", "annotation...
class ProtoTreeItem(PacketList): def __init__(self, xmlattrs): PacketList.__init__(self) self.name = xmlattrs.get("name", "") self.showname = xmlattrs.get("showname", "") self.pos = xmlattrs.get("pos", "") self.size = xmlattrs.get("size", "") self.value = xmlattrs.ge...
14,329
[ 0.030592523515224457, -0.03975605219602585, 0.004247380420565605, -0.00026612827787175775, 0.013482053764164448, 0.027689790353178978, 0.022923048585653305, -0.01690414734184742, -0.01602194458246231, -0.019251946359872818, 0.061185047030448914, -0.020731771364808083, -0.0004882353241555393,...
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_should_sample(self): # Order of magnitude more buckets than highest constant in code under test. buckets = [0] * 300 # The seed is arbitrary and exists just to ensure this test is robust. # If you don't like this seed, try your own; the test should still pass. random.seed(1717) # Do eno...
14,330
[ 0.03254423290491104, 0.006951248273253441, 0.007853442803025246, 0.017391707748174667, -0.004972941242158413, 0.01636994443833828, 0.010114365257322788, -0.03774000704288483, 0.06134924665093422, 0.014891649596393108, -0.0016250376356765628, 0.0039566135965287685, 0.027435418218374252, -0....
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": "xmlattrs", "annotation": null, "type_comment": null}}], "kwarg": ...
def __init__(self, xmlattrs): PacketList.__init__(self) self.name = xmlattrs.get("name", "") self.showname = xmlattrs.get("showname", "") self.pos = xmlattrs.get("pos", "") self.size = xmlattrs.get("size", "") self.value = xmlattrs.get("value", "") self.show = xm...
14,331
[ 0.045246947556734085, 0.0219904575496912, 0.041999295353889465, -0.011408066377043724, -0.0034059062600135803, 0.017022650688886642, -0.048714779317379, -0.009577821008861065, 0.009495253674685955, 0.0031943272333592176, 0.027481190860271454, -0.030329767614603043, -0.014229119755327702, -...
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": "fh", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def dump(self, fh=sys.stdout): if self.name: print >> fh, " name=%s" % (quoteattr(self.name),), if self.showname: print >> fh, "showname=%s" % (quoteattr(self.showname),), if self.pos: print >> fh, "pos=%s" % (quoteattr(self.pos),), if self.size: ...
14,332
[ 0.005998841021209955, 0.014966749586164951, 0.015044011175632477, -0.02626907266676426, -0.0017094212817028165, 0.006523118820041418, -0.021114595234394073, 0.015750406309962273, 0.020286789163947105, 0.022979920729994774, 0.03531976416707039, 0.002097110962495208, 0.001496950862929225, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fh", "annotation": nul...
class Protocol(ProtoTreeItem): def dump(self, fh=sys.stdout, indent=0): print >> fh, "%s<proto " % (" " * indent,), ProtoTreeItem.dump(self, fh) print >> fh, '>' indent += 1 for child in self.children: child.dump(fh, indent) print >> fh, " " * inden...
14,333
[ 0.01102533470839262, 0.014234642498195171, 0.010012803599238396, -0.01770448498427868, 0.003786628134548664, -0.0004326200287323445, -0.02953510731458664, 0.0297719556838274, 0.016709716990590096, 0.02792453207075596, 0.043035514652729034, 0.01261222455650568, -0.008271961472928524, -0.045...
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": "fh", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def dump(self, fh=sys.stdout, indent=0): print >> fh, "%s<proto " % (" " * indent,), ProtoTreeItem.dump(self, fh) print >> fh, '>' indent += 1 for child in self.children: child.dump(fh, indent) print >> fh, " " * indent, "</proto>"
14,334
[ 0.03224736079573631, 0.027328679338097572, 0.013568365015089512, -0.00959742907434702, 0.014000250026583672, -0.01847505010664463, -0.01659155637025833, 0.014540105126798153, 0.0050356509163975716, 0.04952273517847061, 0.03781387209892273, 0.01775524392724037, -0.0006444523460231721, -0.03...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fh", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def dump(self, fh=sys.stdout, indent=0): print >> fh, "%s<field " % (" " * indent,), ProtoTreeItem.dump(self, fh) if self.children: print >> fh, ">" indent += 1 for child in self.children: child.dump(fh, indent) print >> fh, " "...
14,335
[ 0.01869526132941246, 0.03633821755647659, 0.013243409804999828, -0.01745264232158661, 0.009722655639052391, 0.0008808882557787001, -0.017139188945293427, 0.008597581647336483, 0.012426191940903664, 0.04003249108791351, 0.033696249127388, 0.014463639818131924, -0.009409202262759209, -0.0315...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fh", "annotation": nul...
class Field(ProtoTreeItem): def dump(self, fh=sys.stdout, indent=0): print >> fh, "%s<field " % (" " * indent,), ProtoTreeItem.dump(self, fh) if self.children: print >> fh, ">" indent += 1 for child in self.children: child.dump(fh, inde...
14,336
[ 0.06061505153775215, 0.033335912972688675, 0.013059916906058788, 0.010528375394642353, 0.0185843575745821, 0.031040962785482407, 0.028604058548808098, -0.031585127115249634, 0.00007670778722967952, 0.008286659605801105, 0.019447920843958855, -0.024321729317307472, 0.03473180904984474, -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": "name", "annotation": null, "type_comment": null}}, {"_type": "arg...
def startElement(self, name, xmlattrs): self.chars = "" if name == self.ELEMENT_FILE: # Eventually, we should check version number of pdml here elem = CaptureFile() elif name == self.ELEMENT_FRAME: elem = Packet(xmlattrs) elif name == self.ELEMENT_P...
14,337
[ 0.08781533688306808, 0.03240221366286278, 0.012874092906713486, 0.013074382208287716, 0.02039603516459465, 0.015221918933093548, 0.010704302228987217, -0.02031814493238926, 0.033003076910972595, -0.004971046932041645, 0.04976053908467293, -0.03411579132080078, 0.01762537844479084, 0.005065...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "pdml"}}, "targets": [{"_type": "Name", "_fields": {"id": "ELEMENT_FILE", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": nul...
class ParseXML(xml.sax.handler.ContentHandler): ELEMENT_FILE = "pdml" ELEMENT_FRAME = "packet" ELEMENT_PROTOCOL = "proto" ELEMENT_FIELD = "field" def __init__(self, cb): self.cb = cb self.chars = "" self.element_stack = [] def startElement(self, n...
14,338
[ -0.01585891842842102, -0.08013943582773209, 0.03094540908932686, -0.01676410809159279, 0.040455933660268784, 0.0011805178364738822, 0.02640739269554615, -0.021664200350642204, -0.011731254868209362, 0.023269401863217354, -0.001215216820128262, -0.010964861139655113, 0.023076295852661133, 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": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare",...
def test_lattice_simple(): assert join(join(2, 3), 4) == join(2, join(3, 4)) assert join(2, 3) == join(3, 2) assert join(0, 2) == 0 assert join(1, 2) == 2 assert join(2, 2) == 2 assert join(join(2, 3), 4) == join(2, 3, 4) assert join() == 1 assert join(4) == 4 assert join(1, 4, 2, 3...
14,339
[ 0.07783708721399307, -0.0020977286621928215, -0.04262393340468407, -0.009102110750973225, 0.005360862240195274, 0.03389833867549896, 0.019770046696066856, -0.028902040794491768, -0.005372815299779177, -0.020391596481204033, 0.05302293226122856, 0.0032870392315089703, 0.027754563838243484, ...
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": "name", "annotation": null, "type_comment": null}}], "kwarg": null...
def endElement(self, name): elem = self.element_stack.pop() # if isinstance(elem, Field): # if elem.get_name() == "frame.number": # print >> sys.stderr, "Packet:", elem.get_show() # Add element as child to previous element as long # as there is more than 1 elem...
14,340
[ 0.0029474461916834116, -0.02170504257082939, 0.004862052854150534, 0.023776886984705925, 0.020829441025853157, 0.04432268440723419, 0.01725304313004017, -0.0268846545368433, 0.04743045195937157, 0.021766705438494682, 0.002599055413156748, -0.05998484417796135, 0.06161272153258324, 0.060182...
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_AssocOp_flatten(): a, b, c, d = symbols('a,b,c,d') class MyAssoc(AssocOp): identity = S.One assert MyAssoc(a, MyAssoc(b, c)).args == \ MyAssoc(MyAssoc(a, b), c).args == \ MyAssoc(MyAssoc(a, b, c)).args == \ MyAssoc(a, b, c).args == \ (a, b, c) u = M...
14,341
[ -0.0012279930524528027, -0.005754837766289711, 0.011492590419948101, -0.006503735668957233, -0.00720422575250268, -0.052212126553058624, -0.02763233333826065, -0.0409131683409214, -0.011560930870473385, -0.008946907706558704, -0.010672505013644695, -0.023623026907444, 0.000021868063413421623...
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": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def __init__(self, *args): rxcs._RxCSobject.__init__(self) # Make it a RxCS object self.strRxCSgroup = 'Signal generator' # Name of group of RxCS modules self.strModuleName = 'Random gaussian noise (type 2)' # Module name self.__parametersDefine() # Define the parameter...
14,342
[ 0.04486307501792908, -0.010757850483059883, 0.03815554082393646, -0.03134481608867645, -0.006810725666582584, 0.0021541498135775328, -0.033073294907808304, -0.019542139023542404, 0.014163212850689888, -0.011473750695586205, 0.028997179120779037, -0.03018389642238617, -0.032144561409950256, ...
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 TestReadsPerSampleHandler(HandlerTestBase): def setUp(self): key = "ConversionResults" qc_config = {'name': 'ReadsPerSampleHandler', 'error': 'unknown', 'warning': '90'} value = get_stats_json()["ConversionResults"] reads_per_sample_handler = ReadsPerSampleHandler(qc_config) ...
14,343
[ -0.008849106729030609, 0.018100176006555557, -0.007247163914144039, -0.020913919433951378, 0.01914055272936821, 0.012933763675391674, -0.010102286003530025, -0.03941605985164642, -0.042300738394260406, 0.03887222707271576, 0.002024595160037279, -0.035420071333646774, -0.013087456114590168, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Lambda", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"a...
class DisplayTransform() : # have to store it inside a list so python doesn't # keep trying to turn it into a method. __linearToDisplay = [ lambda c : c ] @classmethod def set( cls, linearToDisplayCallable ) : cls.__linearToDisplay[0] = linearToDisplayCallable cls.changedSignal()() @classmethod def get...
14,344
[ 0.04738827794790268, 0.004485414829105139, 0.04708418250083923, -0.006924517452716827, -0.03697299584746361, 0.008584374561905861, -0.040571462363004684, -0.005749313160777092, -0.025506043806672096, 0.015369514003396034, 0.04214262589812279, -0.02484717033803463, -0.03988724574446678, 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_warning(self): qc_config = {'name': 'ReadsPerSampleHandler', 'error': '100', 'warning': '400'} self.set_qc_config(qc_config) errors_and_warnings = list(self.reads_per_sample_handler.check_qc()) self.assertEqual(len(errors_and_warnings), 4) class_names = self.map_errors_...
14,345
[ 0.045799620449543, 0.0029221437871456146, 0.045648880302906036, -0.012574168853461742, -0.011374535039067268, 0.009647314436733723, -0.04873903468251228, 0.0032157714013010263, -0.016983292996883392, 0.007957777939736843, 0.04858829453587532, -0.036378413438797, -0.020312119275331497, 0.04...
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_error(self): qc_config = {'name': 'ReadsPerSampleHandler', 'error': '400', 'warning': '500'} self.set_qc_config(qc_config) errors_and_warnings = list(self.reads_per_sample_handler.check_qc()) self.assertEqual(len(errors_and_warnings), 4) class_names = self.map_errors_an...
14,346
[ 0.07057598233222961, -0.047171205282211304, 0.019658975303173065, -0.029501378536224365, -0.02872638590633869, -0.012180297635495663, -0.018599819391965866, -0.013626950792968273, -0.004401311278343201, -0.0241151824593544, 0.05316448211669922, -0.02727973461151123, -0.032317183911800385, ...
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_multiple_sampleIDs_per_sampleName(self): key = "ConversionResults" qc_config = {'name': 'ReadsPerSampleHandler', 'error': 'unknown', 'warning': '1000'} value = get_stats_json("180925_A00001_0001_BABCDEFGXX")["ConversionResults"] custom_reads_per_sample_handler = ReadsPerSampleHa...
14,347
[ 0.04682682454586029, -0.017164014279842377, 0.034876879304647446, -0.0004541260132100433, -0.03777081146836281, -0.004381439182907343, -0.044107526540756226, -0.006258753128349781, -0.011700469069182873, 0.014606875367462635, 0.03747143968939781, -0.012897958047688007, -0.023400938138365746,...
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_warning_when_error_unknown(self): qc_config = {'name': 'ReadsPerSampleHandler', 'error': 'unknown', 'warning': '400'} self.set_qc_config(qc_config) errors_and_warnings = list(self.reads_per_sample_handler.check_qc()) self.assertEqual(len(errors_and_warnings), 4) class_n...
14,348
[ 0.013621143065392971, 0.02293853648006916, -0.010315686464309692, -0.01532933209091425, 0.01006611343473196, 0.00395157327875495, 0.007370724342763424, -0.020220963284373283, 0.03420814871788025, -0.026399284601211548, -0.030636480078101158, -0.017536666244268417, -0.004212238825857639, -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 TestDeviceObjInit(unittest.TestCase): def setUp(self): self.device = MagicMock() self.device.server.jsonrpc = MagicMock() def test_init(self): kwargs = {"text": "text", "className": "android"} self.device_obj = AutomatorDeviceObject(self.device, ...
14,349
[ 0.022822346538305283, 0.023536289110779762, 0.013267423026263714, -0.015599633567035198, -0.001759569626301527, -0.005217726342380047, 0.013445908203721046, -0.016944224014878273, 0.02770095132291317, 0.0084364153444767, -0.035578109323978424, -0.025463931262493134, -0.004584102891385555, ...
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_init(self): kwargs = {"text": "text", "className": "android"} self.device_obj = AutomatorDeviceObject(self.device, Selector(**kwargs)) self.assertEqual(self.device_obj.selector, Selector(**kwargs)) self.ass...
14,350
[ -0.0004691065405495465, -0.007035180926322937, -0.0002129403583239764, -0.011207536794245243, -0.008526117540895939, 0.018140675500035286, -0.02217697724699974, -0.005530071910470724, 0.061270132660865784, -0.018344758078455925, 0.03437658026814461, -0.03662148863077164, 0.06217716634273529,...
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_exists(self): self.jsonrpc.exist = MagicMock() self.jsonrpc.exist.return_value = True self.assertTrue(self.obj.exists) self.jsonrpc.exist.return_value = False self.assertFalse(self.obj.exists) self.assertEqual(self.jsonrpc.exist.call_args_list, ...
14,351
[ 0.01745174266397953, 0.01831214129924774, 0.03780015930533409, -0.01657700538635254, -0.010482518002390862, 0.050161212682724, -0.012662192806601524, -0.04141383245587349, 0.024291908368468285, 0.027375001460313797, 0.011149326339364052, -0.03736995905637741, 0.018283460289239883, -0.00907...
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 TestDeviceObj(unittest.TestCase): def setUp(self): self.device = MagicMock() self.jsonrpc = self.device.server.jsonrpc = MagicMock() self.jsonrpc_wrap = self.device.server.jsonrpc_wrap = MagicMock() self.kwargs = {"text": "text", "className": "android"} self.obj = Auto...
14,352
[ 0.017993982881307602, 0.00515666464343667, 0.020107369869947433, 0.011684011667966843, -0.0029421369545161724, -0.005422347690910101, -0.006107688881456852, 0.02059043012559414, 0.07250729203224182, -0.0022235852666199207, 0.017510922625660896, -0.01643611490726471, 0.01736600510776043, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_text(self): self.jsonrpc.clearTextField = MagicMock() self.obj.set_text(None) self.obj.set_text("") self.obj.clear_text() self.assertEqual(self.jsonrpc.clearTextField.call_args_list, [call(self.obj.selector), call(self.obj.selector), call(self.ob...
14,353
[ 0.011265489272773266, 0.04841182753443718, -0.02390814758837223, -0.0051209586672484875, 0.04367237910628319, 0.0010856060544028878, -0.016538431867957115, -0.04650115966796875, -0.0005474556237459183, -0.0059801386669278145, -0.002914076903834939, -0.025024769827723503, 0.047841109335422516...
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_info_attr(self): info = {'contentDescription': '', 'checked': False, 'scrollable': False, 'text': '', 'packageName': 'android', 'selected': False, 'enabled': True, 'bounds': {'top': 0, ...
14,354
[ 0.008961371146142483, -0.03770824149250984, 0.004439780488610268, 0.011604472063481808, -0.004807926714420319, 0.027463078498840332, -0.029804112389683723, 0.006702149286866188, 0.046795476227998734, 0.033051349222660065, 0.055882710963487625, -0.02877204306423664, 0.06086684390902519, 0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_click(self): self.jsonrpc.click.return_value = False corners = ["tl", "topleft", "br", "bottomright"] for c in corners: self.assertFalse(self.obj.click(c)) self.assertEqual(self.jsonrpc.click.call_args_list, [call(self.obj.selector, c) for c ...
14,355
[ 0.011410788632929325, -0.022479252889752388, 0.012076417915523052, 0.014935454353690147, -0.01799101009964943, 0.023823190480470657, -0.041357770562171936, -0.016710465773940086, 0.029769478365778923, 0.05710465833544731, 0.03139234706759453, -0.032634854316711426, 0.06319040805101395, -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_long_click(self): self.jsonrpc.longClick.return_value = False corners = ["tl", "topleft", "br", "bottomright"] for c in corners: self.assertFalse(self.obj.long_click(c)) self.assertEqual(self.jsonrpc.longClick.call_args_list, [call(self.obj.s...
14,356
[ 0.018789784982800484, -0.0247053075581789, 0.004676700569689274, 0.0097386809065938, -0.02223951928317547, 0.021314848214387894, -0.04104115813970566, 0.012957246042788029, 0.031225422397255898, 0.046020153909921646, -0.010977501980960369, -0.03627554699778557, 0.0485333614051342, -0.05585...
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_drag_to(self): self.jsonrpc.dragTo.return_value = False self.assertFalse(self.obj.drag.to(10, 20, steps=10)) self.jsonrpc.dragTo.return_value = True self.assertTrue(self.obj.drag.to(x=10, y=20, steps=20)) sel = {"text": "text..."} self.assertTrue(self.obj.drag.t...
14,357
[ 0.004061604384332895, 0.009389564394950867, -0.020669396966695786, 0.012144660577178001, -0.026043687015771866, 0.014640307985246181, -0.05033300817012787, -0.043735601007938385, 0.029107648879289627, 0.04516874626278877, 0.01769191585481167, -0.013540740124881268, 0.017308920621871948, -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_long_click_using_swipe(self): self.device.long_click.return_value = False self.jsonrpc.objInfo.return_value = { 'longClickable': False, 'visibleBounds': { 'top': 0, 'bottom': 60, 'left': 0, 'right': 60 ...
14,358
[ -0.0033825826831161976, -0.009563633240759373, -0.027799878269433975, 0.008316203020513058, -0.02217654138803482, 0.01962887868285179, -0.026889055967330933, -0.015153969638049603, 0.04313865303993225, 0.027852680534124374, 0.04337625950574875, -0.06447037309408188, 0.01050745602697134, -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_swipe(self): self.jsonrpc.swipe.return_value = True dirs = ["up", "down", "right", "left"] for d in dirs: self.assertTrue(self.obj.swipe(d, 30)) self.assertEqual(self.jsonrpc.swipe.call_args_list, [call(self.obj.selector, d, 30) for d in dirs...
14,359
[ -0.010396286845207214, -0.044242434203624725, -0.030024586245417595, 0.015902619808912277, -0.012129001319408417, 0.02694268338382244, -0.01808049902319908, 0.0038626519963145256, 0.04394109174609184, -0.028764430433511734, 0.04506427422165871, -0.04194127768278122, 0.03188742324709892, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_pinch(self): self.jsonrpc.pinchIn.return_value = True self.assertTrue(self.obj.pinch.In(percent=90, steps=30)) self.assertTrue(self.obj.pinch("in", 80, 40)) self.assertTrue(self.obj.pinch("In", 70, 50)) self.assertEqual(self.jsonrpc.pinchIn.call_args_list, ...
14,360
[ 0.012677540071308613, -0.018855921924114227, 0.002182656666263938, 0.006882690824568272, -0.0072313579730689526, 0.05182589218020439, -0.0299574863165617, -0.013890901580452919, 0.06627466529607773, 0.05093330517411232, 0.017154427245259285, -0.05461523309350014, 0.002264593495056033, 0.00...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_fling(self): self.jsonrpc.flingForward.return_value = True self.assertTrue(self.obj.fling.horiz.forward()) self.assertTrue(self.obj.fling.horizentally.forward()) self.assertTrue(self.obj.fling.vert.forward()) self.assertTrue(self.obj.fling()) self.assertEqual(sel...
14,361
[ 0.0271624568849802, -0.013874915428459644, 0.021016521379351616, -0.005762710236012936, -0.033895768225193024, 0.02684728056192398, -0.012105630710721016, -0.025973383337259293, 0.0096057103946805, 0.024110978469252586, -0.001604533288627863, -0.06469707936048508, -0.005909553728997707, -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 skip_test_scroll(self): steps = 100 max_swipes = 500 self.jsonrpc.scrollForward.return_value = True self.assertTrue(self.obj.scroll.horiz.forward()) self.assertTrue(self.obj.scroll.horizentally.forward()) self.assertTrue(self.obj.scroll.vert.forward()) self.as...
14,362
[ 0.0154728339985013, -0.008835580199956894, 0.023420628160238266, -0.031767018139362335, 0.016390815377235413, 0.03715412691235542, -0.023746753111481667, 0.020739153027534485, 0.0258726067841053, -0.021173987537622452, 0.032370954751968384, -0.04845980182290077, 0.03640524670481682, -0.073...
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_instance_list(self): count = 10 self.jsonrpc.count.return_value = count for i in range(count): self.assertEqual(self.obj[i].selector["instance"], i) with self.assertRaises(IndexError): self.obj[count] self.jsonrpc.count.return_value = 1 se...
14,363
[ 0.00042621485772542655, -0.007337220944464207, 0.016686733812093735, -0.013379983603954315, -0.03050212748348713, 0.036315418779850006, 0.003312634536996484, -0.002175571396946907, 0.07644360512495041, -0.002868400188162923, 0.03139647841453552, -0.009443656541407108, -0.01820478029549122, ...
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_wait(self): timeout = 3000 self.jsonrpc_wrap.return_value.waitUntilGone.return_value = True self.assertTrue(self.obj.wait.gone()) self.jsonrpc_wrap.return_value.waitUntilGone.assert_called_once_with(self.obj.selector, timeout) self.jsonrpc_wrap.return_value.waitForExists...
14,364
[ -0.01854780502617359, 0.004192431457340717, 0.038536667823791504, -0.009163498878479004, -0.021627485752105713, -0.018977798521518707, 0.030169237405061722, -0.045277100056409836, 0.0172926913946867, 0.02826332300901413, -0.018559427931904793, -0.04783381521701813, -0.0018202068749815226, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test_usgs-cida-maurer.json"}}]}}, "targets": [{"_type": "...
class UserGeometryMetadataTest(TestCase): fixtures = ['test_usgs-cida-maurer.json'] def test_geom_gmap_static_url(self): url = UserGeometryMetadata.objects.get(pk=1).geom_gmap_static_url( color='0x00ff00', weight=10 ) # try out the URL urll...
14,365
[ 0.03267687186598778, 0.014532235451042652, -0.01742451637983322, 0.004208563826978207, -0.013611427508294582, 0.009278909303247929, -0.011976403184235096, -0.031850505620241165, 0.018038388341665268, -0.026797866448760033, -0.03612399846315384, -0.029465848580002785, 0.017093969509005547, ...
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 TestAutomatorDeviceNamedUiObject(unittest.TestCase): def setUp(self): self.device = MagicMock() self.jsonrpc = self.device.server.jsonrpc = MagicMock() self.name = "my-name" self.obj = AutomatorDeviceNamedUiObject(self.device, self.name) def test_child(self): self...
14,366
[ -0.00838490854948759, 0.02029028907418251, 0.0457899235188961, -0.043958328664302826, -0.020361648872494698, -0.0033480164129287004, 0.03782128915190697, -0.01706715300679207, -0.008057837374508381, 0.01678171008825302, -0.010377067141234875, -0.05242649093270302, 0.003371803555637598, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test_usgs-cida-maurer.json"}}]}}, "targets": [{"_type": "...
class ScenarioTest(TestCase): fixtures = ['test_usgs-cida-maurer.json'] def test_metadata_list(self): test = Scenario.objects.all()[0] # get the first scenario object # # get the associate list of metadata # metadata_list = test.scenariometadataurl_set.model.objects.filter(scena...
14,367
[ -0.02575227990746498, 0.012719554826617241, 0.028089016675949097, 0.015598317608237267, 0.008299027569591999, -0.022716931998729706, 0.016766685992479324, -0.05275724455714226, 0.027583125978708267, 0.019898394122719765, -0.000995973707176745, -0.02804083749651909, -0.015188786201179028, -...
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_geom_gmap_static_url(self): url = UserGeometryMetadata.objects.get(pk=1).geom_gmap_static_url( color='0x00ff00', weight=10 ) # try out the URL urllib.urlopen(url) self.assertEqual( url, 'http://maps.googl...
14,368
[ -0.011451982893049717, 0.004909247625619173, 0.04416859149932861, -0.01806790381669998, -0.029461339116096497, 0.0065339538268744946, -0.0017476569628342986, -0.03112410195171833, -0.007927395403385162, 0.03505852445960045, -0.027330193668603897, -0.03641683980822563, 0.00219262158498168, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test_usgs-cida-maurer.json"}}]}}, "targets": [{"_type": "...
class ClimateModelTest(TestCase): fixtures = ['test_usgs-cida-maurer.json'] def test_metadata_list(self): test = ClimateModel.objects.all()[0] # get the first climate model object self.assertEquals( test.metadata_list(filter_field='model'), ['External ...
14,369
[ -0.002330651506781578, 0.0002563861489761621, 0.02811267040669918, -0.05214633792638779, -0.009119815193116665, 0.004678685218095779, 0.02126411721110344, 0.002802865579724312, -0.015076085925102234, -0.0006949224043637514, 0.0183670986443758, -0.02387143485248089, 0.007381604053080082, -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_metadata_list(self): test = Scenario.objects.all()[0] # get the first scenario object # # get the associate list of metadata # metadata_list = test.scenariometadataurl_set.model.objects.filter(scenario=test.pk) self.assertEquals( test.metadata_list(), ...
14,370
[ 0.002451110165566206, -0.0014330368721857667, 0.025034639984369278, -0.026605255901813507, -0.013088452629745007, 0.018288137391209602, -0.014159326441586018, -0.018633197993040085, -0.013742875307798386, 0.024963248521089554, -0.004432226065546274, -0.00563993351534009, 0.009518874809145927...
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_metadata_list(self): test = ClimateModel.objects.all()[0] # get the first climate model object self.assertEquals( test.metadata_list(filter_field='model'), ['External Metadata :: http://www-pcmdi.llnl.gov/ipcc/model_documentation/BCC-CM1.htm', 'Ext...
14,371
[ -0.02658633142709732, 0.0005415651248767972, 0.03329860419034958, -0.032343119382858276, -0.03458850830793381, 0.011638985015451908, 0.0027843390125781298, -0.04841913282871246, 0.009202501736581326, -0.008085779845714569, -0.011979375965893269, -0.017055382952094078, -0.009226388297975063, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test_usgs-cida-maurer.json"}}]}}, "targets": [{"_type": "...
class VariableTest(TestCase): fixtures = ['test_usgs-cida-maurer.json'] def test_metadata_list(self): test = Variable.objects.all()[0] # get the first climate model object self.assertEquals( test.metadata_list(), ['External Metadata :: http://www-pcmdi...
14,372
[ 0.015452669002115726, 0.02238253317773342, 0.07348447293043137, -0.04625336080789566, 0.011790072545409203, -0.0054270378313958645, 0.0033108708448708057, -0.0191036369651556, -0.02078959532082081, 0.011592408642172813, 0.044137194752693176, 0.019045501947402954, -0.036137618124485016, 0.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 NcwriteTest(TestCase): def test_write(self): ncvariable = NcVariable("Prcp","mm",constant=5) bounds = Polygon(((0,0),(10,0),(10,15),(0,15))) res = 5 ncspatial = NcSpatial(bounds,res) rng = [datetime.datetime(2007,10,1),datetime.datetime(2007,10,3)] ...
14,373
[ 0.011329888366162777, 0.034519098699092865, 0.103186696767807, -0.03946930915117264, -0.004850939381867647, 0.00005801025326945819, 0.015605068765580654, -0.022209757938981056, -0.023573050275444984, 0.011071790009737015, 0.07136771082878113, 0.028536494821310043, -0.03263960778713226, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_write(self): ncvariable = NcVariable("Prcp","mm",constant=5) bounds = Polygon(((0,0),(10,0),(10,15),(0,15))) res = 5 ncspatial = NcSpatial(bounds,res) rng = [datetime.datetime(2007,10,1),datetime.datetime(2007,10,3)] interval = datetime.timedelta(days=1)...
14,374
[ 0.03930700570344925, 0.015286057256162167, 0.030547579750418663, -0.04946499690413475, -0.018880611285567284, -0.012832436710596085, -0.07630760967731476, -0.06276362389326096, -0.052065834403038025, 0.04504847899079323, 0.004919509869068861, 0.006094180513173342, -0.026891684159636497, -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 as_txt(self): # Get items sorted in specified order: items = sorted(list(self.attrs.values()), key=lambda item: item[2]) # Find largest label length: max_label_len = max([len(str(item[1])) for item in items]) fmt = '%%%ds %%s' % max_label_len res = [] for item...
14,375
[ 0.03296779841184616, -0.00019646431610453874, 0.018433721736073494, -0.05261357128620148, 0.029004918411374092, -0.004231640603393316, -0.04945169761776924, -0.009390763938426971, 0.0013859544415026903, -0.01690548285841942, -0.009817617014050484, -0.028035277500748634, 0.01886584423482418, ...
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": "header", "annotation": null, "type_comment": null}}, {"_type": "a...
def as_csv(self, header=False, sep='|'): # Get keys sorted in specified order: keys = [pair[0] for pair in \ sorted([(key, val[2]) for key, val in list(self.attrs.items())], key=lambda pair: pair[1])] res = [] if header: res.append(sep.j...
14,376
[ -0.017179731279611588, -0.01308429054915905, -0.013858786784112453, -0.035016611218452454, 0.0262859296053648, 0.007656950503587723, -0.00005395252810558304, -0.01798943243920803, -0.008601601235568523, 0.001267357263714075, 0.021439461037516594, -0.05332288518548012, -0.011101110838353634, ...
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": "div", "annotation": null, "type_comment": null}}], "kwarg": null,...
def _parse_article(self, div): self.article = ScholarArticle() for tag in div: if not hasattr(tag, 'name'): continue if tag.name == 'div' and self._tag_has_class(tag, 'gs_rt') and \ tag.h3 and tag.h3.a: self.article['title'] =...
14,377
[ 0.030463797971606255, 0.015076592564582825, 0.008129652589559555, 0.020583970472216606, 0.004214158747345209, -0.0007742882007732987, -0.016366824507713318, -0.020822901278734207, 0.03982992097735405, -0.01616373285651207, 0.034764569252729416, -0.058968354016542435, -0.042123667895793915, ...
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 _parse_globals(self): tag = self.soup.find(name='div', attrs={'id': 'gs_ab_md'}) if tag is not None: raw_text = tag.findAll(text=True) # raw text is a list because the body contains <b> etc if raw_text is not None and len(raw_text) > 0: try: ...
14,378
[ -0.011296802200376987, -0.01306816004216671, -0.01147863082587719, -0.032306745648384094, 0.02651170641183853, 0.0135843176394701, -0.003522185841575265, -0.016047794371843338, -0.010927281342446804, 0.0013644438004121184, 0.019895510748028755, -0.056261125952005386, -0.005396188236773014, ...
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": "div", "annotation": null, "type_comment": null}}], "kwarg": null,...
def _parse_article(self, div): self.article = ScholarArticle() for tag in div: if not hasattr(tag, 'name'): continue if tag.name == 'h3' and self._tag_has_class(tag, 'gs_rt') and tag.a: self.article['title'] = ''.join(tag.a.findAll(text=True)) ...
14,379
[ -0.023564249277114868, -0.041535332798957825, -0.019928690046072006, -0.026774238795042038, -0.009253040887415409, -0.004681236110627651, -0.016037793830037117, -0.040270790457725525, -0.01846960373222828, 0.014943478628993034, 0.018676308915019035, -0.049171216785907745, 0.00382098299451172...
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": "span", "annotation": null, "type_comment": null}}], "kwarg": null...
def _parse_links(self, span): for tag in span: if not hasattr(tag, 'name'): continue if tag.name != 'a' or tag.get('href') is None: continue if tag.get('href').startswith('/scholar?cites'): if hasattr(tag, 'string') and tag.str...
14,380
[ 0.02613704279065132, -0.027508368715643883, -0.011922339908778667, 0.0161898210644722, 0.03827429190278053, 0.022432420402765274, 0.012300989590585232, 0.010888729244470596, -0.03718951344490051, 0.05550795793533325, -0.012515897862613201, -0.038212891668081284, 0.013447171077132225, 0.011...
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 get_url(self): if self.cluster is None: raise QueryArgumentError('cluster query needs cluster ID') urlargs = {'cluster': self.cluster } for key, val in urlargs.items(): urlargs[key] = quote(encode(val)) # The following URL arguments must not be quoted, or t...
14,381
[ -0.024760683998465538, -0.012663391418755054, -0.006297852843999863, -0.043097373098134995, 0.03184923157095909, 0.01202345360070467, -0.004042686428874731, -0.006030186545103788, -0.013672525063157082, 0.015678483992815018, 0.02956021949648857, -0.07152539491653442, 0.008756076917052269, ...
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": "div", "annotation": null, "type_comment": null}}], "kwarg": null,...
def _parse_article(self, div): self.article = ScholarArticle() for tag in div: if not hasattr(tag, 'name'): continue if str(tag).lower().find('.pdf'): if tag.find('div', {'class': 'gs_ttss'}): self._parse_links(tag.find('div', ...
14,382
[ -0.008988401852548122, 0.02818693034350872, -0.0032970199827104807, -0.006730393040925264, -0.000014519483556796331, -0.006730393040925264, -0.03172120451927185, 0.01929670199751854, -0.039793312549591064, 0.04690549522638321, -0.010335571132600307, -0.06715121120214462, 0.03381558880209923,...
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 get_url(self): if self.words is None and self.words_some is None \ and self.words_none is None and self.phrase is None \ and self.author is None and self.pub is None \ and self.timeframe[0] is None and self.timeframe[1] is None: raise QueryArgumentError('search q...
14,383
[ 0.013180345296859741, -0.016117019578814507, -0.0021736007183790207, -0.006324253510683775, 0.006942804902791977, 0.0345463789999485, -0.01568923518061638, 0.015885785222053528, -0.029436103999614716, 0.010804414749145508, 0.024788299575448036, -0.06391311436891556, -0.00795445404946804, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "querier", "annotation"...
class Parser(ScholarArticleParser120726): def __init__(self, querier): ScholarArticleParser120726.__init__(self) self.querier = querier def handle_num_results(self, num_results): if self.querier is not None and self.querier.query is not None: self.que...
14,384
[ 0.04682834446430206, 0.05484277382493019, 0.03317919373512268, -0.03596920147538185, -0.03750097006559372, 0.02519211731851101, -0.0428348071873188, -0.02445358596742153, -0.04381951317191124, 0.03941567987203598, 0.03175683692097664, -0.042424511164426804, -0.02893947996199131, 0.01507150...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "querier", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "with_globals", "annotation": null, "type_comment": null}}], "k...
def txt(querier, with_globals): if with_globals: # If we have any articles, check their attribute labels to get # the maximum length -- makes for nicer alignment. max_label_len = 0 if len(querier.articles) > 0: items = sorted(list(querier.articles[0].attrs.values()), ...
14,385
[ 0.007047886960208416, -0.03592703118920326, -0.00276113860309124, -0.007011051289737225, 0.02941940166056156, -0.00630503473803401, 0.03531310707330704, 0.02964041568338871, -0.013543238863348961, 0.01796351559460163, 0.038628313690423965, -0.0682196170091629, 0.028535347431898117, 0.01082...
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 __init__(self): self.articles = [] self.query = None self.cjar = MozillaCookieJar() # If we have a cookie file, load it: if ScholarConf.COOKIE_JAR_FILE and \ os.path.exists(ScholarConf.COOKIE_JAR_FILE): try: self.cjar.load(ScholarConf.C...
14,386
[ -0.0020032229367643595, -0.05281316861510277, 0.031454503536224365, -0.016446443274617195, -0.028740568086504936, -0.039542026817798615, -0.018644731491804123, 0.025768809020519257, 0.02148079313337803, 0.00920023862272501, 0.042825888842344284, 0.04814520105719566, -0.04507845267653465, -...
14
{"_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 run_test (self): # Check that there's no UTXO on none of the nodes assert_equal(len(self.nodes[0].listunspent()), 0) assert_equal(len(self.nodes[1].listunspent()), 0) assert_equal(len(self.nodes[2].listunspent()), 0) print("Mining blocks...") self.nodes[0].generate...
14,387
[ -0.005776073317974806, -0.009214701130986214, 0.01878178119659424, -0.020226534456014633, 0.008879941888153553, -0.0017163775628432631, -0.010354058817029, 0.016174178570508957, -0.05295076221227646, 0.029176950454711914, 0.010771039873361588, -0.04310765117406845, 0.008427722379565239, 0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields":...
def main(): usage = """scholar.py [options] <query string> A command-line interface to Google Scholar. Examples: # Retrieve one article written by Einstein on quantum theory: scholar.py -c 1 --author "albert einstein" --phrase "quantum theory" # Retrieve a BibTeX entry for that quantum theory paper: scholar.py -...
14,388
[ 0.035748761147260666, 0.01665540598332882, 0.00030236272141337395, -0.0035572948399931192, -0.03396718576550484, -0.011498208157718182, 0.014885550364851952, -0.04723525047302246, -0.021507861092686653, -0.005028268322348595, -0.0016204151324927807, -0.011574394069612026, 0.02869277633726597...
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": "class_name", "annotation": null, "type_comment": null}}], "kwarg"...
def __init__(self,class_name=None): self.type_name = 'unknown cpp_object' self.name = 'no name' if class_name: # customize support_code for whatever type I was handed. clean_name = class_name.replace('::','_') clean_name = clean_name.replace('<','_') ...
14,389
[ 0.0033499139826744795, -0.0005020634271204472, -0.008942519314587116, -0.010264407843351364, -0.051429372280836105, -0.00606148038059473, -0.02372620441019535, -0.05581307038664818, -0.004338505677878857, 0.005869410932064056, 0.012913833372294903, 0.0044599613174796104, 0.020325448364019394...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fie...
class cpp_namespace_converter(base_converter): _build_information = [common_info.swig_info()] def __init__(self,class_name=None): self.type_name = 'unknown cpp_object' self.name = 'no name' if class_name: # customize support_code for whatever type I was handed. c...
14,390
[ 0.034531112760305405, 0.0022664088755846024, 0.003895723959431052, -0.04960189387202263, -0.018875056877732277, 0.013205223716795444, 0.004624267108738422, 0.026044651865959167, 0.005078463349491358, 0.07320790737867355, 0.015217099338769913, -0.0010143208783119917, 0.015412190929055214, -...
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": "parent", "annotation":...
class RoCBertModelTester: def __init__( self, parent, batch_size=13, seq_length=7, is_training=True, use_input_mask=True, use_token_type_ids=True, use_labels=True, vocab_size=99, pronunciation_vocab_size=99, shape_vocab_size=99,...
14,391
[ 0.010715547949075699, 0.04638379067182541, 0.00800198782235384, -0.015376841649413109, 0.004995965864509344, -0.0038231047801673412, 0.0013092928566038609, -0.05248628556728363, 0.01336277648806572, 0.003883406287059188, 0.027015000581741333, -0.015015033073723316, 0.03524010255932808, -0....
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": "inline", "annotation": null, "type_comment": null}}], "kwarg": nu...
def declaration_code(self,inline=0): type = self.type_name clean_type = type.replace('::','_') name = self.name var_name = self.retrieve_py_variable(inline) template = '%(type)s *%(name)s = '\ 'convert_to_%(clean_type)s(%(var_name)s,"%(name)s");\n' code...
14,392
[ 0.03324669227004051, -0.01614372245967388, 0.026619156822562218, -0.05868858844041824, -0.006300521083176136, -0.03542680665850639, 0.04185813292860985, 0.02437364123761654, -0.042272355407476425, 0.03254905715584755, 0.009685143828392029, -0.02712058089673519, 0.05463358387351036, -0.0213...
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 prepare_config_and_inputs(self): input_ids = ids_tensor([self.batch_size, self.seq_length], self.vocab_size) input_shape_ids = ids_tensor([self.batch_size, self.seq_length], self.shape_vocab_size) input_pronunciation_ids = ids_tensor([self.batch_size, self.seq_length], self.pronunciation_voc...
14,393
[ 0.0649941936135292, 0.0044933282770216465, -0.008345128037035465, -0.056791041046381, -0.005800047889351845, -0.006925351917743683, 0.06882232427597046, 0.04240397736430168, 0.014408097602427006, 0.02096009999513626, 0.029615474864840508, -0.004422339145094156, 0.015449265949428082, -0.036...
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 prepare_config_and_inputs_for_decoder(self): ( config, input_ids, input_shape_ids, input_pronunciation_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels, ) = self.p...
14,394
[ 0.0495893768966198, 0.00021042535081505775, -0.034633152186870575, -0.019423240795731544, -0.031213954091072083, 0.03705967590212822, 0.015242998488247395, 0.020614445209503174, 0.00732369814068079, 0.03606700897216797, 0.003173786448314786, 0.0057243965566158295, 0.05011880025267601, 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}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": null, "type_comment": null}}, {"_type": "a...
def create_and_check_model_as_decoder( self, config, input_ids, input_shape_ids, input_pronunciation_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels, encoder_hidden_states, encoder_attention_mas...
14,395
[ 0.029972918331623077, 0.007680285256356001, -0.02323891595005989, -0.02845446765422821, -0.01630685292184353, 0.012444702908396721, 0.003449526382610202, 0.024581314995884895, -0.01762724481523037, 0.0606500469148159, 0.01501946896314621, 0.008533039130270481, 0.03580465540289879, 0.000744...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": null, "type_comment": null}}, {"_type": "a...
def create_and_check_model( self, config, input_ids, input_shape_ids, input_pronunciation_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels, ): model = RoCBertModel(config=config) model.to(tor...
14,396
[ 0.013746793381869793, 0.039692725986242294, -0.05284777283668518, -0.03133995831012726, -0.02199714444577694, 0.025263147428631783, -0.009650066494941711, 0.01472545601427555, -0.003470837604254484, 0.06135986000299454, -0.0017553335055708885, -0.00415931548923254, 0.06231576204299927, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": null, "type_comment": null}}, {"_type": "a...
def create_and_check_for_causal_lm( self, config, input_ids, input_shape_ids, input_pronunciation_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels, encoder_hidden_states, encoder_attention_mask, ...
14,397
[ 0.01701134815812111, 0.03695196285843849, -0.03226993978023529, -0.01924431324005127, -0.016627183184027672, 0.019148271530866623, 0.0012650464195758104, 0.03971315547823906, -0.0021294199395924807, 0.06453987956047058, -0.018319914117455482, 0.0006629113340750337, 0.05776895582675934, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": null, "type_comment": null}}, {"_type": "a...
def create_and_check_for_masked_lm( self, config, input_ids, input_shape_ids, input_pronunciation_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels, ): model = RoCBertForMaskedLM(config=config) ...
14,398
[ 0.03600603714585304, 0.005242963321506977, -0.009286517277359962, 0.009874346666038036, -0.011934719048440456, -0.012374105863273144, -0.000595251505728811, 0.03690856322646141, -0.005780322477221489, 0.06474436074495316, 0.0094290217384696, -0.005584379658102989, 0.03111339546740055, 0.00...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": null, "type_comment": null}}, {"_type": "a...
def create_and_check_for_question_answering( self, config, input_ids, input_shape_ids, input_pronunciation_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels, ): model = RoCBertForQuestionAnswering(con...
14,399
[ 0.06739961355924606, -0.015997199341654778, -0.04753522574901581, -0.05418871343135834, -0.02675808034837246, 0.015168515965342522, 0.01635749824345112, 0.004254510626196861, 0.0014794707531109452, 0.06788001209497452, 0.019155805930495262, -0.016645735129714012, 0.02745465375483036, 0.004...
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": "config", "annotation": null, "type_comment": null}}, {"_type": "a...
def create_and_check_decoder_model_past_large_inputs( self, config, input_ids, input_shape_ids, input_pronunciation_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels, encoder_hidden_states, encode...
14,400
[ 0.027430156245827675, 0.00758317532017827, -0.020683402195572853, -0.039084650576114655, 0.01100640557706356, 0.016163408756256104, 0.006774451117962599, 0.016517916694283485, -0.03148485720157623, 0.037157006561756134, -0.0032099708914756775, -0.016096938401460648, 0.03294720873236656, -0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "config", "annotation": null, "type_comment": null}}, {"_type": "a...
def create_and_check_for_sequence_classification( self, config, input_ids, input_shape_ids, input_pronunciation_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels, ): config.num_labels = self.num_label...