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
9,601
[ -0.0034127854742109776, 0.06330964714288712, 0.06554410606622696, -0.028861749917268753, -0.006994319148361683, 0.04224522411823273, -0.0036629983223974705, -0.030397940427064896, -0.07350435853004456, 0.03656597435474396, 0.0269997026771307, -0.024299731478095055, 0.03633321821689606, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "layerFilter", "annotation": null, "type_comment": null}}], "kwarg...
def getGeomTableConstraints(self, layerFilter = None): inClause = """'{text}'""".format( text='","'.join(layerFilter) ) if layerFilter \ else """select f_table_name from public.geometry_columns where f_table_schema <> 'views'""" sql = """select distinct case ...
9,602
[ 0.015712330117821693, -0.025016337633132935, 0.028001580387353897, -0.02350381389260292, 0.0172945074737072, 0.004137049429118633, -0.028558826074004173, -0.051744215190410614, 0.005721715744584799, -0.01581183820962906, -0.02790207229554653, -0.05365476757287979, 0.04855995625257492, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "schemaList", "annotation": null, "type_comment": null}}], "kwarg"...
def getMultiColumns(self, schemaList): sql = """select row_to_json(a) from ( select t.table_name, array_agg(t.column_name::text) as attributes from (select table_name, column_name from information_schema.columns where data_type = 'ARRAY' and table_schema in ({0...
9,603
[ -0.013681321404874325, -0.03624764084815979, 0.013042466714978218, -0.02382437139749527, 0.024296140298247337, -0.00035904868855141103, -0.029682178050279617, -0.03888168931007385, 0.02323465794324875, -0.0059511782601475716, -0.002884675282984972, -0.03842957690358162, 0.07104066014289856, ...
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": "tableList", "annotation": null, "type_comment": null}}], "kwarg":...
def getMultiColumnsFromTableList(self, tableList): sql = """select row_to_json(a) from ( select t.table_name, array_agg(t.column_name::text) as attributes from (select table_name, column_name from information_schema.columns where data_type = 'ARRAY' and table_n...
9,604
[ 0.03735063597559929, 0.012069365940988064, -0.025800606235861778, -0.033881474286317825, 0.029830653220415115, 0.04142222926020622, -0.017937861382961273, 0.004229990765452385, -0.07906369864940643, 0.0126406354829669, 0.0013801350723952055, -0.00441175838932395, -0.0024876189418137074, -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": "layerFilter", "annotation": null, "type_comment": null}}], "kwarg...
def getNotNullDict(self, layerFilter=None): tableNameClause = """'{text}'""".format( text='","'.join(layerFilter) ) if layerFilter \ else """select distinct f_table_name from public.geometry_columns """ sql = """select row_to_json(row(table_name, table_schema, ar...
9,605
[ -0.04024017974734306, 0.017204903066158295, 0.026204880326986313, -0.03542747348546982, 0.006540619768202305, 0.0016205789288505912, -0.017077695578336716, -0.050204820930957794, -0.061611153185367584, 0.04117304086685181, 0.023427503183484077, -0.038077641278505325, 0.03924371674656868, -...
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": "showViews", "annotation": null, "type_comment": null}}, {"_type":...
def getGeomColumnTupleList(self, showViews = False, filterList = None): filterLayersClause = 'AND f_table_name in ({table_name_list})'.format( table_name_list=','.join(filterList) ) if filterList else """ """ showViewsClause = """ AND table_type = 'BASE TABLE'""" if not showV...
9,606
[ 0.046206679195165634, 0.026289260014891624, 0.009205575101077557, -0.04289072006940842, 0.019039666280150414, 0.007119556423276663, 0.05205836892127991, 0.0023921492975205183, -0.04302075877785683, -0.04889412224292755, 0.009714889340102673, -0.011269921436905861, 0.035218507051467896, 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": "scale", "annotation": null, "type_comment": null}}, {"_type": "ar...
def insertFrame(self,scale,mi,inom,frame,srid,geoSrid, paramDict = dict()): paramKeys = list(paramDict.keys()) if 'tableSchema' not in paramKeys: tableSchema = 'public' else: tableSchema = paramDict['tableSchema'] if 'tableName' not in paramKeys: table...
9,607
[ 0.005628718063235283, 0.013408079743385315, 0.01034675631672144, -0.04914580658078194, 0.01056799478828907, 0.022802995517849922, -0.032949093729257584, -0.012739218771457672, -0.03527466952800751, 0.013963748700916767, 0.026857320219278336, -0.06507498025894165, 0.01049596443772316, -0.01...
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": "layerFilter", "annotation": null, "type_comment": null}}], "kwarg...
def getTableMetadataDict(self, layerFilter=None): sql = """select row_to_json(a) from ( select table_schema, table_name, column_name as attr_name, is_nullable::boolean as nullable, data_type as column_type, gc.f_geometry_column as geometry_column, gc.type as geometry_type from informat...
9,608
[ 0.015481200069189072, 0.0180879607796669, 0.07918179035186768, -0.014616074971854687, -0.03858916833996773, 0.006886857561767101, 0.01979544758796692, 0.030461538583040237, -0.027365298941731453, 0.02629527449607849, -0.008452052250504494, -0.015060020610690117, 0.06064987927675247, -0.011...
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": "dbName", "annotation": null, "type_comment": null}}, {"_type": "a...
def alterSearchPath(self, dbName, version): if version == '2.1.3': sql = 'ALTER DATABASE "{0}" SET search_path = "$user", public, topology,\'cb\',\'complexos\',\'dominios\';'.format(dbName) elif version == '2.1.3 Pro': sql = 'ALTER DATABASE "{0}" SET search_path = "$user", public...
9,609
[ -0.018365925177931786, 0.007525807712227106, 0.06362631916999817, -0.03160205855965614, -0.028076644986867905, 0.033016446977853775, 0.03979283943772316, -0.029385481029748917, -0.04008838161826134, -0.02197577990591526, -0.020688055083155632, -0.003530690912157297, 0.07861460745334625, 0....
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "settingType", "annotation": null, "type_comment": null}}], "kwarg...
def getSettingTable(self, settingType): if settingType == 'Permission': tableName = 'permission_profile' elif settingType == 'Customization': tableName = 'customization' elif settingType == 'EarthCoverage': tableName = 'earth_coverage' elif settingType...
9,610
[ 0.006092233117669821, -0.004693800583481789, 0.0680902823805809, -0.03572430834174156, 0.000016223899365286343, 0.007325372193008661, -0.046722862869501114, -0.06284288316965103, -0.03899868577718735, 0.014734703116118908, 0.00846930593252182, -0.04529557004570961, 0.06586538255214691, -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": "schema", "annotation": null, "type_comment": null}}], "kwarg": nu...
def getGeometricTableListFromSchema(self, schema): if isinstance(schema, list): sql = '''select distinct f_table_schema, f_table_name from public.geometry_columns where f_table_schema in ('{0}') and f_table_name in ( select distinct table_name from information_schema.tables where tab...
9,611
[ -0.009464257396757603, 0.029549038037657738, 0.08680565655231476, -0.02040596678853035, -0.007007190492004156, 0.012740346603095531, 0.007542499341070652, -0.06607849895954132, -0.030833778902888298, 0.020951980724930763, 0.01165902242064476, -0.05027619004249573, 0.04282469302415848, 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": "schemaList", "annotation": null, "type_comment": null}}, {"_type"...
def getGeomTables(self, schemaList, dbPrimitiveList=[], excludeViews=True, geomColumn = False): primitiveClause = '' viewClause = '' if dbPrimitiveList != []: primitiveClause = """and type in ('{0}')""".format("','".join(dbPrimitiveList)) if excludeViews: viewClau...
9,612
[ -0.018992265686392784, 0.022259406745433807, 0.10591964423656464, -0.010085289366543293, -0.04421887919306755, -0.0021316756028681993, 0.029607797041535378, -0.04351189360022545, -0.031943000853061676, -0.01897084154188633, 0.02149885892868042, -0.026929812505841255, 0.06658540666103363, -...
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": "settingType", "annotation": null, "type_comment": null}}, {"_type...
def createPropertyTable(self, settingType, isAdminDb = False): tableName = self.getSettingTable(settingType) sql = '''CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public; CREATE TABLE IF NOT EXISTS public.{0}( id uuid NOT NULL DEFAULT uuid_generate_v4(), ...
9,613
[ -0.004343410488218069, 0.0023448015563189983, 0.03993726894259453, -0.00862863752990961, -0.020282825455069542, 0.03595750406384468, 0.010251961648464203, -0.018653683364391327, -0.04063547030091286, -0.02441386505961418, 0.03044169396162033, -0.031558819115161896, 0.06013863533735275, 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}}, {"_type": "arg", "_fields": {"arg": "settingType", "annotation": null, "type_comment": null}}, {"_type...
def getPropertyPerspectiveDict(self, settingType, perspective, versionFilter = None): if versionFilter: versionFilter = ''' where edgvversion = '{0}' '''.format(versionFilter) else: versionFilter = '' tableName = self.getSettingTable(settingType) if perspective ==...
9,614
[ -0.02299843169748783, 0.02615358866751194, 0.0007780977757647634, -0.026248624548316002, 0.04698522761464119, 0.023397579789161682, -0.03024008683860302, -0.022105105221271515, -0.036683451384305954, 0.01084347628057003, 0.004454758483916521, -0.02267531491816044, 0.08674781024456024, 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": "tableSchema", "annotation": null, "type_comment": null}}, {"_type...
def getAttributesFromTable(self, tableSchema, tableName, typeFilter = None): whereClause = """""" if not typeFilter \ else """ and data_type in ('{0}') """.format( "','".join(typeFilter) ) sql = """select column_name, data_type from information_schema.columns wher...
9,615
[ 0.03614691644906998, -0.0040777395479381084, 0.010679297149181366, -0.003908268176019192, -0.005397008266299963, -0.01605023257434368, -0.005835026036947966, -0.02874232642352581, -0.04834884777665138, -0.03585490584373474, 0.0008088994072750211, 0.00007756569539196789, 0.0553988516330719, ...
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": "tableName", "annotation": null, "type_comment": null}}], "kwarg":...
def getPrimaryKeyColumn(self, tableName): if '.' in tableName: tableSchema, tableName = tableName.replace("'","").replace('"','').split('.') tableName = '''"{0}"."{1}"'''.format(tableSchema, tableName) sql = ''' SELECT a.attname, format_type(a.atttypid, a.atttypmod) AS da...
9,616
[ 0.015378608368337154, 0.045532941818237305, 0.013559742830693722, -0.059143777936697006, -0.029428832232952118, 0.033945340663194656, -0.028815731406211853, -0.036765605211257935, -0.03989241644740105, 0.0060083866119384766, 0.037889622151851654, -0.030838964506983757, 0.035048920661211014, ...
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": "viewName", "annotation": null, "type_comment": null}}], "kwarg": ...
def dropView(self, viewName): if '"' in viewName: sql = """DROP VIEW {0} """.format(viewName) elif '.' in viewName: schema, name = viewName.split('.') sql = """DROP VIEW "{0}"."{1}" """.format(schema, name) else: sql = """DROP VIEW "{0}" """.format...
9,617
[ 0.01667947880923748, 0.016025783494114876, -0.011674614623188972, -0.03384923189878464, 0.012491734698414803, -0.013737844303250313, -0.0014848618302494287, 0.020540375262498856, 0.010489788837730885, 0.059118691831827164, -0.00712937954813242, -0.0024577463045716286, -0.0050304001197218895,...
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": "request", "annotation": null, "type_comment": null}}], "kwarg": n...
def validate_token_request(self, request): # REQUIRED. Value MUST be set to "authorization_code". if request.grant_type != 'authorization_code': raise errors.UnsupportedGrantTypeError(request=request) if request.code is None: raise errors.InvalidRequestError( ...
9,618
[ -0.014554537832736969, 0.0054948655888438225, -0.047291699796915054, -0.05572911351919174, 0.0032642241567373276, 0.017454897984862328, 0.02590285800397396, -0.013320566155016422, 0.024510685354471207, 0.025502081960439682, 0.03429808467626572, -0.02999500371515751, 0.004898973274976015, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "page_url", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs"...
def test_video_exists( page_url ): logger.info("[uploadedto.py] test_video_exists(page_url='%s')" % page_url) real_url = page_url.replace("uploaded.to","uploaded.net") # Vídeo borrado: uploaded.to/file/q4rkg1rw -> Redirige a otra página uploaded.to/410/q4rkg1rw # Video erróneo: uploaded.to/file/q4r...
9,619
[ 0.015322964638471603, 0.03877376392483711, -0.010187551379203796, -0.0402616448700428, -0.024183636531233788, -0.002184632932767272, -0.03886259347200394, -0.02997971512377262, -0.026426563039422035, -0.013568596914410591, -0.002073596930131316, -0.10099832713603973, 0.009859994985163212, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "project.stage"}}, "targets": [{"_type": "Name", "_fields": {"id": "_name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": n...
class project_type(models.Model): _name = 'project.stage' _description = 'Project Stage' _order = 'sequence' name = fields.Char('Stage Name', required=True, translate=True) description = fields.Text('Description') sequence = fields.Integer('Sequence') case_default = fields.Boolean( ...
9,620
[ 0.03264898806810379, -0.02787008322775364, -0.007559734396636486, -0.029723968356847763, 0.006189918611198664, -0.012657919898629189, -0.003965255804359913, -0.06834658980369568, -0.01622150093317032, 0.005571956746280193, -0.010170623660087585, -0.007796619553118944, 0.05850039795041084, ...
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": "template_name", "annotation": null, "type_comment": null}}, {"_ty...
def load_template(self, template_name, template_dirs=None): source, display_name = self.load_template_source(template_name, template_dirs) origin = make_origin(display_name, self.load_template_source, template_name, template_dirs) try: template = get_template_from_string(source, orig...
9,621
[ 0.015446674078702927, -0.009865576401352882, 0.0008103866130113602, -0.03939465433359146, -0.0008413927280344069, 0.0021619705948978662, -0.01415005512535572, -0.023361684754490852, -0.007368176244199276, 0.02032872475683689, 0.007041202858090401, -0.021941041573882103, 0.01084085926413536, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "data", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def find_videos(data): encontrados = set() devuelve = [] # http://uploaded.net/file/1haty8nt patronvideos = 'uploaded.net/file/([a-zA-Z0-9]+)' logger.info("[uploadedto.py] find_videos #"+patronvideos+"#") matches = re.compile(patronvideos,re.DOTALL).findall(data) for match in matches:...
9,622
[ 0.008968508802354336, 0.008854756131768227, 0.08103988319635391, -0.019673245027661324, 0.029455984011292458, -0.0063521950505673885, -0.055176086723804474, -0.0020370730198919773, 0.014225085265934467, 0.03515559807419777, 0.02079879865050316, -0.04827907681465149, -0.025145353749394417, ...
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": "data", "annotation": n...
class DataManagement: def round(self, data): #returns the rounded values of the data sample data=robjects.FloatVector(data) ##The given list changes into float vector in order to be handled by RPy2 rround = robjects.r['round'] #Call the round function-R...
9,623
[ 0.040525857359170914, -0.0007129451259970665, -0.005424181465059519, -0.036835938692092896, -0.000768293917644769, -0.006283405236899853, 0.02340463176369667, -0.05920739099383354, 0.001223603612743318, -0.010695494711399078, 0.015033785253763199, -0.021781066432595253, 0.061105065047740936,...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dirs", "annotation": null, "type_comment": null}}], "kwarg": null...
def find_template(name, dirs=None): # Calculate template_source_loaders the first time the function is executed # because putting this logic in the module-level namespace may cause # circular import errors. See Django ticket #1292. global template_source_loaders if template_source_loaders is None: ...
9,624
[ 0.009439383633434772, -0.033766474574804306, 0.03694356977939606, -0.004736102651804686, 0.019495805725455284, -0.015137148089706898, 0.01139552891254425, -0.0002855446364264935, -0.012439243495464325, 0.014822063967585564, 0.0037744406145066023, 0.003367457538843155, -0.02078239805996418, ...
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 testGradient(self): # Set graph seed for determinism. random_seed = 42 random_seed_lib.set_random_seed(random_seed) with self.test_session(): for test_case in self._TEST_CASES: np.random.seed(random_seed) in_shape = test_case['in_shape'] in_val = constant_op.constant( ...
9,625
[ 0.02630259469151497, 0.006207990925759077, 0.024181028828024864, -0.001564052072353661, -0.014489330351352692, 0.017129233106970787, -0.03353520482778549, 0.02233671396970749, 0.029943009838461876, -0.015067939646542072, 0.02868935652077198, -0.0448421873152256, 0.04341977462172508, -0.029...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "servicer", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "server", "annotation": null, "type_comment": null}}], "kwarg"...
def add_EmulatedBluetoothServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'registerClassicPhy': grpc.stream_stream_rpc_method_handler( servicer.registerClassicPhy, request_deserializer=emulated__bluetooth__pb2.RawData.FromString, ...
9,626
[ -0.0039092437364161015, -0.014527327381074429, 0.023959333077073097, -0.032157137989997864, 0.016565456986427307, -0.038928255438804626, 0.00750144524499774, 0.049096252769231796, 0.01287417858839035, 0.015161411836743355, 0.027446798980236053, 0.0005031629698351026, 0.03458024933934212, -...
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 testEmptyTensor(self): empty_image = np.zeros((0, 4, 3, 0)) offsets = np.zeros((0, 2)) with self.test_session(): result = image_ops.extract_glimpse(empty_image, [1, 1], offsets) self.assertAllEqual( np.zeros( (0, 1, 1, 0), dtype=np.float32), result.eval())
9,627
[ 0.007860125042498112, -0.011958138085901737, -0.07973720878362656, -0.05100836232304573, 0.03913572430610657, -0.03686380013823509, 0.0066997334361076355, 0.02633477747440338, 0.016636347398161888, -0.0004481248324736953, 0.06400474905967712, -0.03190465644001961, 0.011671094223856926, -0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "http://(?:www\\.)?pornhd\\.com/(?:[a-z]{2,4}/)?videos/(?P<id>\\d+)"}}, "targets": [{"_type": "Name", "_fields": {"id": "_VALID_URL", "ctx...
class PornHdIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?pornhd\.com/(?:[a-z]{2,4}/)?videos/(?P<id>\d+)' _TEST = { 'url': 'http://www.pornhd.com/videos/1962/sierra-day-gets-his-cum-all-over-herself-hd-porn-video', 'md5': '956b8ca569f7f4d8ec563e2c41598441', 'info_dict': { ...
9,628
[ 0.040436431765556335, 0.026735931634902954, 0.09115932881832123, -0.015352100133895874, -0.023211045190691948, 0.03090372122824192, 0.02177005261182785, 0.02058400586247444, -0.060920678079128265, 0.0036468165926635265, -0.008235819637775421, -0.014409912750124931, 0.021393178030848503, 0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {...
class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0023_alter_page_revision_on_delete_behaviour'), ] operations = [ migrations.CreateModel( name='Collection', fields=[ ('id', models.AutoField(auto_created=True, verbose_name='ID'...
9,629
[ 0.007883155718445778, 0.006821016781032085, -0.05122823268175125, -0.051817625761032104, 0.00514185568317771, -0.019474586471915245, 0.0050190649926662445, -0.009307526051998138, 0.02949429862201214, 0.025687789544463158, 0.05756422504782677, -0.045825447887182236, 0.001268580206669867, -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": "url", "annotation": null, "type_comment": null}}], "kwarg": null,...
def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('id') webpage = self._download_webpage(url, video_id) title = self._og_search_title(webpage) TITLE_SUFFIX = ' porn HD Video | PornHD.com ' if title.endswith(TITLE_SUFFIX): ...
9,630
[ 0.0025783702731132507, -0.023723503574728966, 0.008090963587164879, 0.006183718331158161, 0.04882047325372696, -0.03079061023890972, 0.016781257465481758, 0.051592376083135605, 0.01706843636929989, 0.037383247166872025, 0.02714468166232109, -0.0029170543421059847, 0.002870231866836548, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "r", "annotation": null, "type_comment": null}}], "kwarg": null, "...
def __call__(self, r): # Initialize per-thread state, if needed self.init_per_thread_state() # If we have a saved nonce, skip the 401 if self._thread_local.last_nonce: r.headers['Authorization'] = self.build_digest_header(r.method, r.url) try: self._thread...
9,631
[ 0.03271079808473587, 0.005993204656988382, 0.025558291003108025, -0.013625525869429111, 0.01476992666721344, 0.03917189687490463, -0.013649367727339268, 0.007957164198160172, -0.01554478146135807, 0.017523642629384995, 0.004693832714110613, -0.03519033268094063, -0.009328060783445835, 0.01...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "method", "annotation": null, "type_comment": null}}, {"_type": "a...
def build_digest_header(self, method, url): realm = self._thread_local.chal['realm'] nonce = self._thread_local.chal['nonce'] qop = self._thread_local.chal.get('qop') algorithm = self._thread_local.chal.get('algorithm') opaque = self._thread_local.chal.get('opaque') hash...
9,632
[ 0.05124052241444588, -0.012016789056360722, 0.008160916157066822, -0.03460368514060974, 0.007968414574861526, 0.002065021079033613, 0.0299836378544569, -0.017651846632361412, 0.05450722202658653, 0.02333356998860836, 0.0108442772179842, -0.03658703714609146, 0.0237185750156641, 0.015528491...
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": "op", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def _testBinary(self, op, a, b, expected, equality_test=None): with self.test_session() as session: with self.test_scope(): pa = array_ops.placeholder(dtypes.as_dtype(a.dtype), a.shape, name="a") pb = array_ops.placeholder(dtypes.as_dtype(b.dtype), b.shape, name="b") output = op(pa, pb...
9,633
[ 0.007089032791554928, -0.0012215698370710015, 0.051357779651880264, -0.04934670403599739, 0.03607362508773804, -0.0014698116574436426, 0.012443514540791512, -0.019633101299405098, 0.04874338209629059, 0.04374083876609802, -0.007535239215940237, 0.01886637881398201, -0.007560377940535545, 0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFloatOps(self): for dtype in self.float_types: self._testBinary( gen_math_ops._real_div, np.array([3, 3, -1.5, -8, 44], dtype=dtype), np.array([2, -2, 7, -4, 0], dtype=dtype), expected=np.array( [1.5, -1.5, -0.2142857, 2, float("inf")], dtype=dtype...
9,634
[ 0.00600362429395318, 0.006441134959459305, 0.02561870403587818, -0.038525279611349106, 0.027247216552495956, 0.036605093628168106, 0.02080608159303665, -0.004065207205712795, 0.024415548890829086, 0.021097755059599876, 0.00813041441142559, 0.021510960534214973, 0.006641661282628775, 0.0008...
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 testNumericOps(self): for dtype in self.numeric_types: self._testBinary( math_ops.add, np.array([1, 2], dtype=dtype), np.array([10, 20], dtype=dtype), expected=np.array([11, 22], dtype=dtype)) self._testBinary( math_ops.add, dtype(5), ...
9,635
[ 0.006176161579787731, 0.03633171692490578, 0.009520383551716805, -0.017981667071580887, 0.018718432635068893, 0.03407537564635277, 0.02171153947710991, -0.006786295212805271, 0.030345503240823746, 0.048580434173345566, -0.003047788981348276, 0.002594505902379751, -0.008184997364878654, 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 testLogicalOps(self): self._testBinary( math_ops.logical_and, np.array([[True, False], [False, True]], dtype=np.bool), np.array([[False, True], [False, True]], dtype=np.bool), expected=np.array([[False, False], [False, True]], dtype=np.bool)) self._testBinary( math_o...
9,636
[ 0.033160049468278885, 0.004336683079600334, 0.009458041749894619, -0.02781706489622593, 0.00982342567294836, -0.003815562231466174, 0.025996137410402298, 0.010092970915138721, 0.010554192587733269, 0.06617634743452072, 0.01819729618728161, 0.004839833825826645, 0.0013814192498102784, 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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFill(self): for dtype in self.numeric_types: self._testBinary( array_ops.fill, np.array([], dtype=np.int32), dtype(-42), expected=dtype(-42)) self._testBinary( array_ops.fill, np.array([1, 2], dtype=np.int32), dtype(7), ...
9,637
[ -0.008880448527634144, 0.0058279866352677345, 0.007329600863158703, -0.017367031425237656, 0.04037126898765564, 0.04211904853582382, 0.03298627957701683, -0.02323809638619423, 0.046623893082141876, 0.04517151042819023, 0.002555513521656394, 0.001483151805587113, -0.026856740936636925, 0.02...
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 testComparisons(self): self._testBinary( math_ops.equal, np.array([1, 5, 20], dtype=np.float32), np.array([10, 5, 2], dtype=np.float32), expected=np.array([False, True, False], dtype=np.bool)) self._testBinary( math_ops.equal, np.float32(5), np.array([...
9,638
[ 0.014220706187188625, 0.02754657343029976, 0.04130776599049568, -0.020412035286426544, 0.017122890800237656, -0.016675472259521484, 0.020823176950216293, -0.011862681247293949, 0.046555884182453156, 0.053980641067028046, 0.021451983600854874, -0.00540229631587863, 0.0016989874420687556, 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": "op", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def _testMatMul(self, op): for dtype in self.float_types: self._testBinary( op, np.array([[-0.25]], dtype=dtype), np.array([[8]], dtype=dtype), expected=np.array([[-2]], dtype=dtype)) self._testBinary( op, np.array([[100, 10, 0.5]], dtype=dtype...
9,639
[ 0.0025719853583723307, -0.0033588234800845385, 0.046183135360479355, -0.00408936059102416, 0.015203963033854961, 0.008002952672541142, 0.03543929383158684, 0.004388716071844101, 0.045655831694602966, 0.011260160245001316, -0.04112979397177696, -0.0011720178881660104, 0.0464467890560627, 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 DISABLED_testSparseMatMul(self): # Binary wrappers for sparse_matmul with different hints def SparseMatmulWrapperTF(a, b): return tf.sparse_matmul(a, b, a_is_sparse=True) def SparseMatmulWrapperFT(a, b): return tf.sparse_matmul(a, b, b_is_sparse=True) def SparseMatmulWrapperTT(a, b): ...
9,640
[ 0.027127191424369812, 0.0006157357711344957, 0.0429675318300724, -0.02615836262702942, -0.0031274985522031784, 0.019352344796061516, 0.012897525914013386, -0.007399425841867924, 0.020890358835458755, 0.05512632802128792, 0.020817697048187256, 0.023506194353103638, 0.008307701908051968, 0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testExpandDims(self): for dtype in self.numeric_types: self._testBinary( array_ops.expand_dims, dtype(7), np.int32(0), expected=np.array([7], dtype=dtype)) self._testBinary( array_ops.expand_dims, np.array([42], dtype=dtype), np.i...
9,641
[ -0.025634076446294785, 0.0130842924118042, 0.045410845428705215, -0.00592412194237113, 0.022783372551202774, -0.0134406303986907, 0.04169156402349472, 0.010712415911257267, 0.008797098882496357, 0.022315677255392075, -0.02407509833574295, 0.0008316877065226436, 0.015344812534749508, 0.0175...
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 testBatchMatMul(self): # Same tests as for tf.matmul above. self._testMatMul(math_ops.matmul) # Tests with batches of matrices. self._testBinary( math_ops.matmul, np.array([[[-0.25]]], dtype=np.float32), np.array([[[8]]], dtype=np.float32), expected=np.array([[[-2]]]...
9,642
[ 0.008394616656005383, -0.005186695605516434, 0.038482915610075, -0.008843786083161831, 0.034379687160253525, 0.010761862620711327, 0.01692277006804943, 0.010877189226448536, -0.019423553720116615, 0.06001877784729004, 0.017772551625967026, 0.011666271835565567, 0.029693756252527237, 0.0437...
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 testReshape(self): for dtype in self.numeric_types: self._testBinary( array_ops.reshape, np.array([], dtype=dtype), np.array([0, 4], dtype=np.int32), expected=np.zeros(shape=[0, 4], dtype=dtype)) self._testBinary( array_ops.reshape, np.arra...
9,643
[ 0.026698168367147446, -0.005374116823077202, 0.03714832663536072, -0.03806008771061897, 0.02529546245932579, -0.0027396599762141705, 0.015383007936179638, 0.011022930964827538, 0.030275069177150726, 0.032028451561927795, -0.010064414702355862, 0.038925088942050934, 0.02828790247440338, 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 testPad(self): for dtype in self.numeric_types: self._testBinary( array_ops.pad, np.array( [[1, 2, 3], [4, 5, 6]], dtype=dtype), np.array( [[1, 2], [2, 1]], dtype=np.int32), expected=np.array( [[0, 0, 0, 0, 0, 0], ...
9,644
[ 0.031895961612463, -0.004005063325166702, 0.026403304189443588, -0.05685383081436157, 0.01467117853462696, -0.011449060402810574, 0.015225262381136417, -0.0018369086319580674, -0.0013054097071290016, 0.05328841879963875, 0.014044823125004768, -0.008660572580993176, 0.00830523669719696, 0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testSplit(self): for dtype in self.numeric_types: self._testBinary( lambda x, y: array_ops.split(value=y, num_or_size_splits=3, axis=x), np.int32(0), np.array([[[1], [2]], [[3], [4]], [[5], [6]]], dtype=dtype), expected=[ np.array([[...
9,645
[ 0.022418159991502762, -0.0015831413911655545, 0.037530962377786636, -0.033664897084236145, 0.01840146817266941, 0.013518678024411201, 0.0420246347784996, -0.022167116403579712, -0.0011759806657209992, 0.048049673438072205, 0.010374361649155617, -0.005764579866081476, 0.017773861065506935, ...
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 testTile(self): for dtype in self.numeric_types: self._testBinary( array_ops.tile, np.array([[6]], dtype=dtype), np.array([1, 2], dtype=np.int32), expected=np.array([[6, 6]], dtype=dtype)) self._testBinary( array_ops.tile, np.array([[1], [2...
9,646
[ 0.03643811494112015, 0.048102691769599915, -0.03654754161834717, -0.044229090213775635, -0.03562837839126587, -0.020943710580468178, -0.032345667481422424, -0.0372040830552578, -0.005129239521920681, -0.018481675535440445, 0.024335846304893494, -0.020976537838578224, 0.030069652944803238, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "arg", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "val", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def cast(arg, val): if arg not in annotations: return cast = annotations[key] try: val = cast(val) except (ValueError, TypeError) as e: parts = list(e.args) parts[0] = parts[0] + " processing argument '{}'".format(arg) e.args = tuple(parts) raise return val
9,647
[ 0.021757526323199272, -0.02104286290705204, 0.02427586354315281, -0.02672613598406315, 0.027429455891251564, -0.0055840155109763145, 0.01476970687508583, -0.020645827054977417, -0.008326394483447075, 0.032761070877313614, 0.008984338492155075, 0.02879071980714798, 0.0299477931112051, 0.013...
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 testTranspose(self): for dtype in self.numeric_types: self._testBinary( array_ops.transpose, np.zeros(shape=[1, 0, 4], dtype=dtype), np.array([1, 2, 0], dtype=np.int32), expected=np.zeros(shape=[0, 4, 1], dtype=dtype)) self._testBinary( array_ops.tra...
9,648
[ -0.000039520349673694, 0.06814579665660858, 0.036561500281095505, -0.02674664556980133, -0.00034160117502324283, 0.003058420727029443, 0.018059799447655678, -0.002596169011667371, 0.008454266004264355, 0.013489612378180027, -0.0023926617577672005, -0.05186523497104645, 0.01333843544125557, ...
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": "defaults_files", "annotation": null, "type_comment": null}}], "kw...
def _load_role_defaults(self, defaults_files): # process default variables default_vars = {} for filename in defaults_files: if os.path.exists(filename): new_default_vars = utils.parse_yaml_from_file(filename, vault_password=self.vault_password) if new...
9,649
[ -0.011047505773603916, 0.039547890424728394, 0.043625783175230026, -0.013618631288409233, 0.007662083022296429, 0.04052247852087021, 0.01081026904284954, -0.01926100254058838, -0.02387748658657074, 0.07750565558671951, 0.018465939909219742, -0.03405940160155296, -0.014529104344546795, -0.0...
18
{"_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": "roles", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _build_role_dependencies(self, roles, dep_stack, passed_vars={}, level=0): # this number is arbitrary, but it seems sane if level > 20: raise errors.AnsibleError("too many levels of recursion while resolving role dependencies") for role in roles: role_path,role_vars =...
9,650
[ 0.026708878576755524, 0.016607150435447693, -0.0000025417396045668283, -0.00029563589487224817, 0.013446064665913582, -0.009202651679515839, 0.03131306916475296, -0.019584983587265015, -0.01101798564195633, 0.029205678030848503, 0.018725993111729622, -0.009849757887423038, -0.006333623547106...
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 _late_merge_role_tags(self): # build a local dict of tags for roles role_tags = {} for task in self._ds['tasks']: if 'role_name' in task: this_role = task['role_name'] + "-" + task['vars']['role_uuid'] if this_role not in role_tags: ...
9,651
[ 0.01420343667268753, 0.037645284086465836, 0.0698562040925026, -0.04609324038028717, 0.0021768310107290745, -0.019674846902489662, 0.024948645383119583, -0.01410462986677885, -0.026109620928764343, 0.06081540882587433, 0.01574728824198246, -0.054738808423280716, 0.027690526098012924, -0.02...
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": "roles", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _load_roles(self, roles, ds): # a role is a name that auto-includes the following if they exist # <rolename>/tasks/main.yml # <rolename>/handlers/main.yml # <rolename>/vars/main.yml # <rolename>/library # and it auto-extends tasks/handlers/vars_files/modul...
9,652
[ -0.028554297983646393, 0.0018320998642593622, -0.038448210805654526, -0.03449064493179321, -0.028784388676285744, 0.016428500413894653, -0.017245322465896606, -0.041830550879240036, 0.0022865296341478825, -0.0009023883030749857, 0.012493942864239216, -0.00904257781803608, 0.01003196928650140...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "var_obj", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs":...
def __merge_tags(var_obj): old_tags = dep_vars.get('tags', []) if isinstance(old_tags, basestring): old_tags = [old_tags, ] if isinstance(var_obj, dict): new_tags = var_obj...
9,653
[ 0.006368696689605713, 0.01261427253484726, 0.015322927385568619, -0.0072137522511184216, 0.014326768927276134, 0.059590406715869904, 0.0043008290231227875, 0.009010194800794125, -0.00774540938436985, 0.04602474719285965, -0.0369362011551857, -0.052740417420864105, -0.014696131460368633, -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": "other", "annotation": null, "type_comment": null}}], "kwarg": nul...
def __truediv__(self, other): if isinstance(other, self.__class__): return self.standard / other.standard if isinstance(other, NUMERIC_TYPES): return self.__class__(default_unit=self._default_unit, **{self.STANDARD_UNIT: (self.standard / other)}) else: ...
9,654
[ -0.019642755389213562, -0.03088136576116085, 0.036440011113882065, 0.01047760620713234, -0.004563273396342993, 0.005429054610431194, 0.027771171182394028, -0.017602378502488136, -0.016025222837924957, 0.00902177020907402, -0.05818931758403778, -0.02737412601709366, -0.0011987208854407072, ...
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": "other", "annotation": null, "type_comment": null}}], "kwarg": nul...
def __mul__(self, other): if isinstance(other, self.__class__): return Area(default_unit=AREA_PREFIX + self._default_unit, **{AREA_PREFIX + self.STANDARD_UNIT: (self.standard * other.standard)}) elif isinstance(other, NUMERIC_TYPES): return self.__class__(default_...
9,655
[ -0.03198852390050888, -0.01535067893564701, 0.05301228165626526, 0.004385908134281635, 0.02275189943611622, 0.033966951072216034, -0.002580296481028199, -0.033966951072216034, -0.01883080042898655, 0.010780037380754948, -0.05267857015132904, -0.03058217465877533, -0.006274947430938482, -0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "m"}}, "targets": [{"_type": "Name", "_fields": {"id": "STANDARD_UNIT", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}...
class Distance(MeasureBase): STANDARD_UNIT = "m" UNITS = { 'chain': 20.1168, 'chain_benoit': 20.116782, 'chain_sears': 20.1167645, 'british_chain_benoit': 20.1167824944, 'british_chain_sears': 20.1167651216, 'british_chain_sears_truncated': 20.116756, 'cm'...
9,656
[ 0.02273489348590374, -0.02581796608865261, -0.03442395478487015, -0.026128491386771202, 0.01195522677153349, -0.019430015236139297, -0.0335589200258255, 0.008966419845819473, -0.0024093440733850002, 0.0007007615058682859, -0.02005106769502163, -0.05926598608493805, -0.029522091150283813, 0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "new_comic"}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}...
class NewComicSpider(scrapy.Spider): name = "new_comic" allowed_domains = ["v2.api.dmzj.com"] start_urls = ['http://v2.api.dmzj.com/latest/100/%d.json?channel=ios&version=2.1.9' %i for i in range(11)] def parse(self, response): data = json.loads(response.body.decode('utf-8')) for comic ...
9,657
[ -0.013397328555583954, -0.019518911838531494, 0.07526945322751999, -0.01589801162481308, 0.00011589354107854888, 0.05499241128563881, 0.0015021075960248709, -0.023897936567664146, -0.004899529740214348, 0.005889619700610638, -0.03976200520992279, -0.050058938562870026, -0.013035238720476627,...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"op": {"_type": "Add", "_fields": {}}, "left": {"_type": "Name", "_fields": {"id": "AREA_PREFIX", "ctx": {"_type": "Load", "_fields": {}}}}, "right": {"_type": "Att...
class Area(MeasureBase): STANDARD_UNIT = AREA_PREFIX + Distance.STANDARD_UNIT # Getting the square units values and the alias dictionary. UNITS = {'%s%s' % (AREA_PREFIX, k): v ** 2 for k, v in Distance.UNITS.items()} ALIAS = {k: '%s%s' % (AREA_PREFIX, v) for k, v in Distance.ALIAS.items()} LALIAS = ...
9,658
[ 0.03712010383605957, 0.027133027091622353, -0.024702543392777443, -0.02228310890495777, 0.01884729042649269, -0.01222974807024002, -0.02934255637228489, -0.00351039064116776, 0.013875847682356834, -0.03453495353460312, 0.0065125892870128155, -0.033651139587163925, -0.014185181818902493, -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": "response", "annotation": null, "type_comment": null}}], "kwarg": ...
def parse_chapter(self, response): data = json.loads(response.body.decode('utf-8')) item = ChapterItem() item['cate'] = response.meta['cate'] item['mid'] = response.meta['mid'] # item['comic_name'] = response.meta['comic_name'] item['pid'] = data['chapter_id'] ite...
9,659
[ 0.027559466660022736, 0.020950820297002792, -0.046076659113168716, -0.01838739961385727, 0.00807963963598013, -0.021134693175554276, -0.035347070544958115, 0.0017386908875778317, 0.020756129175424576, -0.01120549812912941, -0.004037115722894669, -0.03426545858383179, 0.005502699874341488, ...
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": "response", "annotation": null, "type_comment": null}}], "kwarg": ...
def parse_comic(self, response): data = json.loads(response.body.decode('utf-8')) item = ComicItem() item['title'] = data['title'] item['origin_cover'] = data['cover'] item['description'] = data['description'] item['update_time'] = data['last_updatetime'] item['ty...
9,660
[ 0.020291870459914207, 0.01531089935451746, 0.03443309664726257, -0.03256687521934509, 0.03593133017420769, -0.011604742147028446, -0.014522355049848557, -0.03238287940621376, -0.004921829793602228, 0.0352216400206089, -0.018833063542842865, -0.06192700192332268, 0.011401034891605377, -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": "nulls_order_asc", "annotation": null, "type_comment": null}}], "k...
def __init__(self, nulls_order_asc): if nulls_order_asc not in ('BEFORE', 'AFTER', 'DEFAULT'): raise Exception('Unknown nulls order: %s' % nulls_order_asc) self.nulls_order_asc = nulls_order_asc # Functions that don't follow the usual call syntax of foo(bar, baz) can be listed # here. Parenthesis...
9,661
[ 0.015603633597493172, 0.03697934374213219, -0.0054549286141991615, -0.0422016978263855, 0.03972795233130455, -0.028627805411815643, -0.010032417252659798, -0.026999782770872116, 0.007273238617926836, 0.006940233986824751, -0.005137781612575054, -0.00670237373560667, 0.03843821957707405, -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": "func", "annotation": null, "type_comment": null}}], "kwarg": null...
def _write_func(self, func): if func.name() in self.operator_funcs: sql = self.operator_funcs[func.name()].format( *[self._write(arg) for arg in func.args]) else: sql = '%s(%s)' % \ (self._to_sql_name(func.name()), self._write_as_comma_list(func.args)) return sql
9,662
[ 0.043130744248628616, 0.04510997608304024, 0.008329263888299465, -0.03803834691643715, 0.06964419782161713, -0.03579109534621239, 0.005545970518141985, -0.03288409858942032, 0.006009852979332209, 0.03422420471906662, -0.012710374779999256, -0.015864774584770203, 0.023936325684189796, 0.050...
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": "func", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _write_in(self, func, use_not=False): sql = '(%s) ' % self._write(func.args[0]) if use_not: sql += 'NOT ' sql += 'IN ' if func.signature.args[1].is_subquery: sql += self._write(func.args[1]) else: sql += '(' + self._write_as_comma_list(func.args[1:]) + ')' return sql
9,663
[ 0.02514566481113434, 0.013939223252236843, -0.001374038285575807, -0.050495270639657974, 0.03872799500823021, -0.019017301499843597, 0.00744886789470911, -0.06003960967063904, 0.026471268385648727, 0.016406884416937828, 0.014795766212046146, -0.017100276425480843, 0.02985665388405323, 0.00...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "func", "annotation": null, "type_comment": null}}], "kwarg": null...
def _write_analytic_func(self, func): sql = self._to_sql_name(func.name()) \ + '(' + self._write_as_comma_list(func.args) \ + ') OVER (' options = [] if func.partition_by_clause: options.append(self._write(func.partition_by_clause)) if func.order_by_clause: options.append(sel...
9,664
[ 0.04322364926338196, 0.01700313203036785, 0.0050548529252409935, -0.044910233467817307, 0.04110560938715935, -0.0333198644220829, -0.01754244789481163, -0.03206472843885422, -0.036065466701984406, 0.03849728778004646, 0.0231022946536541, -0.047969620674848557, 0.01216890849173069, -0.01091...
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": "order_by_clause", "annotation": null, "type_comment": null}}], "k...
def _write_order_by_clause(self, order_by_clause): sql = 'ORDER BY ' for idx, (expr, order) in enumerate(order_by_clause.exprs_to_order): if idx > 0: sql += ', ' sql += self._write(expr) if order: sql += ' ' + order nulls_order = self.get_nulls_order(order) if n...
9,665
[ -0.003918304108083248, 0.028211789205670357, 0.03895287588238716, -0.014390862546861172, 0.04883905500173569, 0.002145476872101426, 0.052784763276576996, -0.0393693670630455, -0.054582249373197556, 0.04068459942936897, -0.009814940392971039, -0.009842341765761375, 0.04068459942936897, 0.04...
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": "window_clause", "annotation": null, "type_comment": null}}], "kwa...
def _write_window_clause(self, window_clause): sql = window_clause.range_or_rows.upper() + ' ' if window_clause.end_boundary: sql += 'BETWEEN ' if window_clause.start_boundary.val_expr: sql += self._write(window_clause.start_boundary.val_expr) + ' ' sql += window_clause.start_boundary.bounda...
9,666
[ 0.03763715550303459, 0.007279935758560896, 0.008472819812595844, -0.04660050943493843, 0.032954808324575424, -0.04668969660997391, -0.031394027173519135, -0.029543384909629822, -0.01032903604209423, 0.010925478301942348, -0.008706936612725258, -0.057035453617572784, -0.025284677743911743, ...
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": "order", "annotation": null, "type_comment": null}}], "kwarg": nul...
def get_nulls_order(self, order): if self.nulls_order_asc is None: return None nulls_order_asc = self.nulls_order_asc if order == 'ASC': if nulls_order_asc == 'BEFORE': return 'NULLS FIRST' if nulls_order_asc == 'AFTER': return 'NULLS LAST' if order == 'DESC': if ...
9,667
[ 0.06895703822374344, 0.028701532632112503, 0.03718361631035805, -0.040622297674417496, 0.058457594364881516, -0.04119541123509407, 0.014557087793946266, -0.04896683245897293, -0.03940729796886444, 0.011651401408016682, -0.012803359888494015, -0.021526150405406952, -0.0267987959086895, 0.02...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "HIVE"}}, "targets": [{"_type": "Name", "_fields": {"id": "DIALECT", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, ...
class HiveSqlWriter(SqlWriter): DIALECT = 'HIVE' # Hive greatest UDF is strict on type equality # Hive Profile already restricts to signatures with the same types, # but sometimes expression with UDF's like 'count' # return an unpredictable type like 'bigint' unlike # the query model, so cast is still nec...
9,668
[ 0.06376087665557861, 0.0483999103307724, 0.012325243093073368, -0.03432617709040642, 0.055093515664339066, -0.024457402527332306, -0.027439488098025322, -0.02332034707069397, -0.0011524745495989919, -0.0029096798971295357, 0.011552903801202774, -0.013043947517871857, -0.017817432060837746, ...
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": "func", "annotation": null, "type_comment": null}}], "kwarg": null...
def _write_greatest(self, func): args = func.args if args[0].type in (Int, Decimal, Float): argtype = args[0].type.__name__.lower() sql = '%s(%s)' % \ (self._to_sql_name(func.name()), (self._write_cast(args[0], argtype) + ", " + self._write_cast(a...
9,669
[ 0.04623597115278244, 0.047802574932575226, 0.010140581987798214, -0.03999072685837746, 0.061436258256435394, -0.03330090641975403, -0.0144487414509058, -0.018862752243876457, 0.0009447253542020917, 0.03008301928639412, -0.008346397429704666, -0.016968008130788803, -0.002797128167003393, 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": "func", "annotation": null, "type_comment": null}}], "kwarg": null...
def _write_least(self, func): args = func.args if args[0].type in (Int, Decimal, Float): argtype = args[0].type.__name__.lower() sql = '%s(%s)' % \ (self._to_sql_name(func.name()), (self._write_cast(args[0], argtype) + ", " + self._write_cast(args...
9,670
[ 0.044709596782922745, 0.01373081374913454, 0.0023472539614886045, -0.03654264286160469, 0.033522263169288635, -0.03074033185839653, -0.02120228484272957, -0.03692019358277321, -0.03678109496831894, 0.035549096763134, 0.021400993689894676, -0.0500747486948967, 0.01801300048828125, -0.012816...
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": "order_by_clause", "annotation": null, "type_comment": null}}], "k...
def _write_order_by_clause(self, order_by_clause): sql = 'ORDER BY ' for idx, (expr, order) in enumerate(order_by_clause.exprs_to_order): if idx > 0: sql += ', ' if expr.returns_char: sql += 'CAST({0} AS BYTEA)'.format(self._write(expr)) else: sql += self._write(expr) ...
9,671
[ 0.019929347559809685, 0.02075192704796791, -0.009142093360424042, -0.039463020861148834, 0.028071848675608635, -0.02007512003183365, 0.012765610590577126, -0.06372392922639847, 0.024073485285043716, 0.020554091781377792, 0.012807260267436504, -0.022303376346826553, 0.031133096665143967, 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": "func", "annotation": null, "type_comment": null}}], "kwarg": null...
def _write_analytic_func(self, func): sql = self._to_sql_name(func.name()) \ + '(' + self._write_as_comma_list(func.args) \ + ') OVER (' options = [] if func.partition_by_clause: options.append(self._write(func.partition_by_clause)) if func.order_by_clause: options.append(sel...
9,672
[ 0.0404493473470211, 0.01963617652654648, 0.005811406299471855, -0.04370569810271263, 0.045275021344423294, -0.042764101177453995, -0.0107400668784976, -0.03258310630917549, -0.028934426605701447, 0.035152874886989594, 0.02171553298830986, -0.05092459172010422, 0.01085776649415493, -0.01276...
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": "order_by_clause", "annotation": null, "type_comment": null}}], "k...
def _write_order_by_clause(self, order_by_clause): sql = 'ORDER BY ' for idx, (expr, order) in enumerate(order_by_clause.exprs_to_order): if idx > 0: sql += ', ' sql += 'ISNULL({0}), {0}'.format(self._write(expr)) if order: sql += ' ' + order nulls_order = self.get_null...
9,673
[ 0.012993989512324333, 0.025355154648423195, 0.04336954653263092, -0.024806706234812737, 0.01259320043027401, -0.0030533764511346817, -0.0021792880725115538, -0.058810457587242126, -0.06298709660768509, 0.016442880034446716, 0.02904662862420082, -0.039129626005887985, 0.017803452908992767, ...
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": "query", "annotation": null, "type_comment": null}}, {"_type": "ar...
def write_query(self, query, pretty=False): # MySQL doesn't support WITH clauses so they need to be converted into inline views. # We are going to cheat by making use of the fact that the query generator creates # with clause entries with unique aliases even considering nested queries. sql = list() ...
9,674
[ 0.013240041211247444, -0.016051888465881348, 0.02273833192884922, -0.03372003883123398, -0.017413532361388206, -0.034118566662073135, 0.01340609509497881, -0.03132886067032814, -0.016760386526584625, 0.05827389284968376, -0.007965058088302612, 0.003249123692512512, 0.060399383306503296, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_commen...
def __init__(self, *args): if (len(args) == 2): self.__initArgs__(args[0], args[1], TTransport.TTransportFactoryBase(), TTransport.TTransportFactoryBase(), TBinaryProtocol.TBinaryProtocolFactory(), TBinaryProtocol....
9,675
[ 0.020923057571053505, -0.0023224104661494493, 0.017944512888789177, -0.02469506673514843, 0.009539888240396976, -0.003515659598633647, -0.016504067927598953, 0.055469293147325516, -0.018127620220184326, 0.004397626034915447, 0.04865770414471626, -0.0035858505871146917, 0.01115123275667429, ...
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 serve(self): self.serverTransport.listen() while True: client = self.serverTransport.accept() if not client: continue itrans = self.inputTransportFactory.getTransport(client) otrans = self.outputTransportFactory.getTransport(client) iprot = self.inputProtocolFactory.get...
9,676
[ 0.0394817516207695, -0.01576157659292221, 0.0043266527354717255, -0.02064121887087822, 0.006057869642972946, 0.019607489928603172, -0.02505401521921158, 0.06571399420499802, 0.006202369462698698, 0.019618606194853783, 0.03790336847305298, -0.012371392920613289, 0.0025759839918464422, -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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def serve(self): self.serverTransport.listen() while True: try: client = self.serverTransport.accept() if not client: continue t = threading.Thread(target=self.handle, args=(client,)) t.setDaemon(self.daemon) t.start() except KeyboardInterrupt: ...
9,677
[ 0.016195937991142273, 0.030295636504888535, 0.01978948898613453, -0.033415038138628006, -0.005165730603039265, -0.019327817484736443, -0.0017811787547543645, 0.0552508570253849, 0.00503471540287137, -0.012789550237357616, 0.058445125818252563, 0.0013436826411634684, -0.001248540822416544, ...
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 handle(self, client): itrans = self.inputTransportFactory.getTransport(client) otrans = self.outputTransportFactory.getTransport(client) iprot = self.inputProtocolFactory.getProtocol(itrans) oprot = self.outputProtocolFactory.getProtocol(otrans) try: while True: self.processor.proc...
9,678
[ 0.0688401609659195, 0.02691826783120632, 0.014724919572472572, 0.013006238266825676, -0.03730003163218498, 0.024224119260907173, 0.015502971597015858, 0.02629118226468563, 0.011020464822649956, 0.013215267099440098, 0.05532296374440193, -0.041921891272068024, -0.003042530734091997, -0.0030...
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 collect_children(self): while self.children: try: pid, status = os.waitpid(0, os.WNOHANG) except os.error: pid = None if pid: self.children.remove(pid) else: break
9,679
[ 0.030501533299684525, 0.043598804622888565, 0.011970152147114277, -0.03314617648720741, 0.0036332339514046907, 0.0021629389375448227, 0.02207646146416664, 0.035564132034778595, 0.006479371804744005, 0.035261888056993484, 0.07974224537611008, -0.03543819859623909, -0.0012695854529738426, 0....
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 serve(self): def try_close(file): try: file.close() except IOError as e: logger.warning(e, exc_info=True) self.serverTransport.listen() while True: client = self.serverTransport.accept() if not client: continue try: pid = os.fork() ...
9,680
[ 0.007910891436040401, 0.028010768815875053, 0.017052631825208664, -0.016921181231737137, -0.015762032940983772, 0.025620771571993828, 0.01077291276305914, -0.0184866301715374, -0.02326662465929985, 0.06366953253746033, -0.0015505107585340738, -0.0517195425927639, 0.017423080280423164, -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 __init__(self): super(MissingPlugin, self).__init__() self.config.add({ 'count': False, 'total': False, }) self.album_template_fields['missing'] = _missing_count self._command = Subcommand('missing', help=__doc__, ...
9,681
[ -0.01050905417650938, 0.0361601859331131, 0.041734881699085236, -0.04655623808503151, -0.003942464478313923, 0.012769065797328949, -0.03859597444534302, 0.002081094076856971, -0.01715097762644291, 0.042086437344551086, 0.01967465691268444, -0.039047978818416595, 0.020151769742369652, -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 commands(self): def _miss(lib, opts, args): self.config.set_args(opts) count = self.config['count'].get() total = self.config['total'].get() fmt = config['format_album' if count else 'format_item'].get() albums = lib.albums(decargs(args)) ...
9,682
[ 0.001687021809630096, 0.024889545515179634, 0.04567543789744377, -0.041062016040086746, -0.007378928363323212, 0.0019498722394928336, -0.021576037630438805, -0.013241289183497429, -0.015484279952943325, 0.03764655441045761, 0.01780373603105545, -0.04024638235569, 0.013215800747275352, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "lib", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "opts", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def _miss(lib, opts, args): self.config.set_args(opts) count = self.config['count'].get() total = self.config['total'].get() fmt = config['format_album' if count else 'format_item'].get() albums = lib.albums(decargs(args)) if total: ...
9,683
[ 0.029103849083185196, -0.0047309501096606255, -0.012296691536903381, -0.030111774802207947, 0.018974198028445244, -0.016857553273439407, -0.008800449781119823, -0.001024461816996336, -0.04510466754436493, 0.0014709412353113294, 0.03537818416953087, 0.004680553916841745, -0.001115017570555210...
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": "ui", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def __init__(self, ui, repo, remote): cap = remote.capable('largefiles') if not cap: raise lfutil.storeprotonotcapable([]) storetypes = cap.split(',') if 'serve' not in storetypes: raise lfutil.storeprotonotcapable(storetypes) self.remote = remote ...
9,684
[ 0.020915748551487923, -0.00603078305721283, 0.04433867707848549, 0.009977896697819233, -0.01511083822697401, -0.000601384264882654, 0.010853149928152561, -0.04348036274313927, 0.003376786597073078, 0.018611853942275047, -0.05041463300585747, 0.00028304586885496974, -0.006730986293405294, 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 Reporter(BaseReporter): def __init__(self): self.errors = [] super(Reporter, self).__init__() def _display(self, layout): pass def add_message(self, msg_id, location, msg): _, _, line, col = location[1:] ...
9,685
[ 0.0009190746932290494, 0.021691713482141495, 0.0591186061501503, 0.027499334886670113, -0.02583646960556507, -0.018390800803899765, -0.00555633008480072, -0.06035955250263214, -0.033877789974212646, 0.0007185845752246678, -0.03688087686896324, 0.03834519162774086, 0.0027207713574171066, 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": "msg_id", "annotation": null, "type_comment": null}}, {"_type": "a...
def add_message(self, msg_id, location, msg): _, _, line, col = location[1:] self.errors.append(dict( lnum=line, col=col, text="%s %s" % (msg_id, msg), type=msg_id[0] ))
9,686
[ -0.0041238097473979, -0.04297058284282684, 0.008302521891891956, 0.002252539386972785, -0.009876402094960213, -0.022937165573239326, -0.016348831355571747, 0.025962918996810913, -0.00640532560646534, 0.03748030588030815, 0.01608041673898697, -0.00917486660182476, -0.004468477331101894, -0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): super(ActiveUsersListTests, self).setUp() self.link = '/api/users/?list=active' cache.clear() threadstore.clear() self.forum = Forum.objects.all_forums().filter(role="forum")[:1][0] self.forum.labels = []
9,687
[ 0.04403056204319, 0.013824094086885452, 0.03844459354877472, -0.045626550912857056, -0.003200782462954521, 0.01924576796591282, -0.004570869728922844, 0.008214657194912434, -0.007710042409598827, 0.028751298785209656, -0.016969135031104088, -0.03020646795630455, 0.04872465133666992, 0.0061...
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": "select", "annotation": null, "type_comment": null}}, {"_type": "a...
def __init__(self, select=None, ignore=None, params=None): params = dict(params.items()) rcfile = params.get('rcfile', LAMA_RCFILE) enable = params.get('enable', None) disable = params.get('disable', None) if op.exists(HOME_RCFILE): rcfile = HOME_RCFILE if ...
9,688
[ 0.03597456216812134, 0.03687866032123566, 0.040347859263420105, -0.007064554840326309, -0.002919910941272974, 0.03359868749976158, -0.016746779903769493, -0.021319817751646042, -0.016221143305301666, 0.031201783567667007, 0.0055349525064229965, -0.01078606117516756, 0.0695522278547287, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "dn", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}...
def _dnsname_to_pat(dn): pats = [] for frag in dn.split(r'.'): if frag == '*': # When '*' is a fragment by itself, it matches a non-empty dotless # fragment. pats.append('[^.]+') else: # Otherwise, '*' matches any dotless fragment. frag...
9,689
[ -0.0047417739406228065, -0.018326805904507637, 0.02691636234521866, -0.009773490950465202, 0.044119637459516525, -0.02732711471617222, 0.012709162198007107, 0.0386832095682621, 0.014146795496344566, 0.01923287659883499, 0.01599518209695816, -0.08094238489866257, 0.009006350301206112, -0.03...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "environ", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "start_response", "annotation": null, "type_comment": null}}], ...
def application(environ, start_response): request = Request(environ) response = BaseResponse({ 'get': get_time, 'set': set_time }.get(request.path.strip('/'), index)(request), mimetype='text/html') request.session.save_cookie(response) return response(environ, start_response)
9,690
[ 0.02950797788798809, 0.007729779928922653, 0.007250999566167593, -0.051128681749105453, -0.0007780177984386683, 0.026005322113633156, 0.03737005218863487, -0.005553219933062792, -0.049137964844703674, 0.008164461702108383, 0.04760082811117172, -0.02716447412967682, 0.024883968755602837, -0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "table"}}, {"_type": "Constant", "_fields": {"kind": null...
class ConfigSet(object): __slots__=('table','parent') def __init__(self,filename=None): self.table={} if filename: self.load(filename) def __contains__(self,key): if key in self.table:return True try:return self.parent.__contains__(key) except AttributeError:return False def keys(self): keys=set() ...
9,691
[ 0.04940963163971901, 0.03309284895658493, 0.04426078125834465, -0.008267168886959553, 0.014262075535953045, 0.008798975497484207, -0.023133570328354836, 0.026131022721529007, -0.05651649460196495, 0.0002101918653352186, 0.016195915639400482, -0.03200506418943405, 0.02041410654783249, -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}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def keys(self): keys=set() cur=self while cur: keys.update(cur.table.keys()) cur=getattr(cur,'parent',None) keys=list(keys) keys.sort() return keys
9,692
[ 0.04580138623714447, 0.000003085618800469092, -0.006563680712133646, -0.012549846433103085, 0.017014481127262115, -0.01714775338768959, -0.010411929339170456, 0.044424232095479965, -0.020779434591531754, -0.022345390170812607, 0.03653893247246742, -0.012460997328162193, 0.044712990522384644,...
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}}], "kwarg": null,...
def __getitem__(self,key): try: while 1: x=self.table.get(key,None) if not x is None: return x self=self.parent except AttributeError: return[]
9,693
[ 0.04892062023282051, 0.035991936922073364, 0.04314296692609787, 0.008038988336920738, -0.0056770178489387035, 0.01719088666141033, 0.029622312635183334, 0.013437779620289803, -0.06881090253591537, -0.005280395969748497, 0.07103671878576279, -0.00651169940829277, 0.020292822271585464, -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 detach(self): tbl=self.get_merged_dict() try: delattr(self,'parent') except AttributeError: pass else: keys=tbl.keys() for x in keys: tbl[x]=copy.deepcopy(tbl[x]) self.table=tbl return self
9,694
[ -0.002379924990236759, -0.008376416750252247, 0.008761340752243996, -0.02040674351155758, -0.005871534813195467, 0.01316786464303732, 0.02856484428048134, 0.0627829059958458, -0.046351805329322815, 0.032241735607385635, 0.03327586129307747, -0.01701710931956768, 0.01594851352274418, -0.019...
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_merged_dict(self): table_list=[] env=self while 1: table_list.insert(0,env.table) try:env=env.parent except AttributeError:break merged_table={} for table in table_list: merged_table.update(table) return merged_table
9,695
[ 0.06564154475927353, 0.017112381756305695, -0.023135287687182426, -0.01717342436313629, -0.006277252919971943, -0.004313703626394272, 0.00793558731675148, 0.02535318210721016, 0.014090754091739655, -0.010885997675359249, 0.0529853031039238, 0.015515089966356754, -0.004430702887475491, -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": "key", "annotation": null, "type_comment": null}}], "kwarg": null,...
def _get_list_value_for_modification(self,key): try: value=self.table[key] except KeyError: try:value=self.parent[key] except AttributeError:value=[] if isinstance(value,list): value=value[:] else: value=[value] else: if not isinstance(value,list): value=[value] self.table[key]=val...
9,696
[ -0.010535124689340591, -0.031994692981243134, 0.03666648268699646, -0.05894007161259651, -0.020669136196374893, 0.009721101261675358, -0.0554480254650116, -0.04374495521187782, 0.015195119194686413, 0.02295784279704094, 0.037657469511032104, -0.03657210245728493, 0.024373536929488182, -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 ExportsViewTest(FixtureTestCase): def test_view_rss(self): response = self.client.get(reverse("rss")) self.assertContains(response, "Test/Test") def test_view_rss_project(self): response = self.client.get(reverse("rss-project", kwargs=self.kw_project)) self.assertContains(...
9,697
[ 0.021766502410173416, 0.01519711036235094, 0.006945313885807991, -0.03845497593283653, 0.01355784386396408, -0.02116256207227707, 0.023097636178135872, 0.034264370799064636, -0.04967100918292999, -0.001565314712934196, 0.04661433398723602, -0.015825701877474785, -0.01445759180933237, -0.01...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "filename", "annotation": null, "type_comment": null}}], "kwarg": ...
def store(self,filename): try: os.makedirs(os.path.split(filename)[0]) except OSError: pass buf=[] merged_table=self.get_merged_dict() keys=list(merged_table.keys()) keys.sort() try: fun=ascii except NameError: fun=repr for k in keys: if k!='undo_stack': buf.append('%s = %s\n'%(k,fu...
9,698
[ 0.05343065783381462, 0.01475029718130827, -0.0022775339893996716, -0.019021036103367805, -0.020843062549829483, 0.023616721853613853, 0.02265348471701145, 0.0001817856536945328, 0.004520252346992493, -0.004572475794702768, 0.05802634358406067, -0.026436801999807358, 0.01651429757475853, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def test_remove(): my_map = Map({1: 1, -2: -2, 0: 0}) assert not(my_map.remove(Z(1)) == my_map) assert my_map.remove(Z(1)) == Map({-2: -2, 0: 0}) assert my_map.remove(Z(100)) == my_map assert Map.empty().remove(Z(10)) == Map.empty()
9,699
[ 0.02942449226975441, 0.05471339449286461, 0.01591251790523529, -0.009388267062604427, 0.01723162829875946, 0.020832445472478867, 0.05152851343154907, 0.02396978996694088, -0.0014869708102196455, 0.06288950145244598, -0.028877833858132362, -0.053620077669620514, 0.041878800839185715, 0.0015...
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": "lexicon", "annotation": null, "type_comment": null}}, {"_type": "...
def __init__(self, lexicon, flags=FLAGS): self.actions = [None] # combine phrases into a compound pattern s = sre_parse.Pattern() s.flags = flags p = [] for idx, token in enumerate(lexicon): phrase = token.pattern try: subpattern = ...
9,700
[ -0.007478100247681141, -0.014765270054340363, 0.021829688921570778, -0.03281453996896744, -0.02637382782995701, 0.024439068511128426, -0.023866277188062668, -0.023038912564516068, 0.0490054227411747, 0.03681134432554245, 0.04180099070072174, -0.022886168211698532, -0.00217819563113153, 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 InputDefinitionTest(CleoTestCase): def setUp(self): super(InputDefinitionTest, self).setUp() self.foo = None self.bar = None self.foo1 = None self.foo2 = None def test_init_arguments(self): self.initialize_arguments() definition = InputDefinition...