code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
# Geo-enabled Sitemap classes. from django.contrib.gis.sitemaps.georss import GeoRSSSitemap from django.contrib.gis.sitemaps.kml import KMLSitemap, KMZSitemap
ajibawa-2023/Python-Code-Large/train/row_83072
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83072:ImportFrom_L2_C0", "label": "from django.contrib.gis.sitemaps.georss import GeoRSSSitemap", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.25, 0, 0.66, 0.0, 81, 0, 1, 0, 0, 81, 0, 0], "semantic": {"name": "django.contrib.gis.s...
[]
from django.contrib.gis.geos import ( GEOSGeometry as Geometry, GEOSException as GeometryException)
ajibawa-2023/Python-Code-Large/train/row_83073
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83073:ImportFrom_L1_C0", "label": "from django.contrib.gis.geos import Geometry, GeometryException", "type": "import", "loc": [1, 2], "level": 0, "parent": null, "vector": [1, 0, 0.75, 1.0, 0, 0.66, 0.0, 886, 0, 2, 0, 0, 886, 0, 0], "semantic": {"name": "django.contrib....
[]
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module geom_backend = getattr(settings, 'GEOMETRY_BACKEND', 'geos') try: module = import_module('.%s' % geom_backend, 'django.contrib.gis.geometry.backend') except ImportError: tr...
ajibawa-2023/Python-Code-Large/train/row_83074
11
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83074:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83074:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83074:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83074:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83074:Try_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_830...
import re # Regular expression for recognizing HEXEWKB and WKT. A prophylactic measure # to prevent potentially malicious input from reaching the underlying C # library. Not a substitute for good Web security programming practices. hex_regex = re.compile(r'^[0-9A-F]+$', re.I) wkt_regex = re.compile(r'^(SRID=(?P<srid...
ajibawa-2023/Python-Code-Large/train/row_83075
4
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83075:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""...
[]
from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point from django.contrib.gis.maps.google.gmap import GoogleMapException from django.utils.six.moves import xrange from math import pi, sin, log, exp, atan # Constants used for degree to radian conversion, and vice-versa. DTOR = pi / 180. RTOD = 18...
ajibawa-2023/Python-Code-Large/train/row_83076
71
162
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83076:ImportFrom_L1_C0", "label": "from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0062, 0.0062, 0, 0.66, 0.0, 886, 0, 4, 0, 0, 886, 0, 0], "semantic": {"name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83076:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83076:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83076:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83076:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-...
from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon from django.utils.functional import total_ordering from django.utils.safestring import mark_safe from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GEvent(obje...
ajibawa-2023/Python-Code-Large/train/row_83077
103
311
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83077:ImportFrom_L1_C0", "label": "from django.contrib.gis.geos import fromstr, Point, LineString\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 886, 0, 5, 0, 0, 886, 0, 0], "semantic": {"name": "djang...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83077:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83077:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83077:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83077:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-La...
""" This module houses the GoogleMap object, used for generating the needed javascript to embed Google Maps in a Web page. Google(R) is a registered trademark of Google, Inc. of Mountain View, California. Example: * In the view: return render_to_response('template.html', {'google' : GoogleMap(key="...
ajibawa-2023/Python-Code-Large/train/row_83078
4
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83078:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 58], "level": 0, "parent": null, "vector": [8, 0, 0.4836, 0.9508, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
from django.conf import settings from django.template.loader import render_to_string from django.utils.html import format_html from django.utils.safestring import mark_safe from django.utils.six.moves import xrange from django.contrib.gis.maps.google.overlays import GPolygon, GPolyline, GMarker class GoogleMapExcepti...
ajibawa-2023/Python-Code-Large/train/row_83079
110
233
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83079:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0043, 0.0043, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83079:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83079:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83079:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83079:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from __future__ import unicode_literals from django.contrib.syndication.views import Feed as BaseFeed from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed class GeoFeedMixin(object): """ This mixin provides the necessary routines for SyndicationFeed subclasses to produce simple GeoRSS or W3C G...
ajibawa-2023/Python-Code-Large/train/row_83080
79
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83080:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0073, 0.0073, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83080:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83080:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83080:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83080:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" Utilities for manipulating Geometry WKT. """ from django.utils import six def precision_wkt(geom, prec): """ Returns WKT text of the geometry according to the given precision (an integer or a string). If the precision is an integer, then the decimal places of coordinates WKT will be truncated to...
ajibawa-2023/Python-Code-Large/train/row_83081
30
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83081:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0351, 0.0526, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83081:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83081:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83081:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83081:If_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
import warnings from django.contrib.gis import geoip HAS_GEOIP = geoip.HAS_GEOIP if HAS_GEOIP: BaseGeoIP = geoip.GeoIP GeoIPException = geoip.GeoIPException class GeoIP(BaseGeoIP): def __init__(self, *args, **kwargs): warnings.warn('GeoIP class has been moved to `django.contrib.gis.geo...
ajibawa-2023/Python-Code-Large/train/row_83082
10
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83082:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 358, 0, 1, 0, 0, 358, 0, 0], "semantic": {"name": "warnings", "arg_names": [], "import_names": ["warning...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83082:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83082:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83082:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83082:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_830...
""" This module is for inspecting OGR data sources and generating either models for GeoDjango and/or mapping dictionaries for use with the `LayerMapping` utility. """ from django.utils.six.moves import zip # Requires GDAL to use. from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.field import O...
ajibawa-2023/Python-Code-Large/train/row_83083
91
224
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83083:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0134, 0.0223, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83083:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83083:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83083:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83083:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" This module includes some utility functions for inspecting the layout of a GDAL data source -- the functionality is analogous to the output produced by the `ogrinfo` utility. """ from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.geometries import GEO_CLASSES def ogrinfo(data_source, num_...
ajibawa-2023/Python-Code-Large/train/row_83084
31
53
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83084:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0566, 0.0943, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83084:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83084:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83084:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83084:If_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: http://geodjango.org/docs/layermapping.html """ impo...
ajibawa-2023/Python-Code-Large/train/row_83085
254
604
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83085:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0083, 0.0116, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83085:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83085:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83085:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83085:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" This module contains useful utilities for GeoDjango. """ # Importing the utilities that depend on GDAL, if available. from django.contrib.gis.gdal import HAS_GDAL if HAS_GDAL: from django.contrib.gis.utils.ogrinfo import ogrinfo, sample from django.contrib.gis.utils.ogrinspect import mapping, ogrinspect ...
ajibawa-2023/Python-Code-Large/train/row_83086
14
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83086:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.08, 0.12, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83086:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83086:ImportFrom_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83086:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83086:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
from django.contrib.gis.gdal import SpatialReference def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None, database=None): """ This function takes a GDAL SpatialReference system and adds its information to the `spatial_ref_sys` table of the spatial backend. Doing th...
ajibawa-2023/Python-Code-Large/train/row_83087
22
80
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83087:ImportFrom_L1_C0", "label": "from django.contrib.gis.gdal import SpatialReference", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0125, 0.0125, 0, 0.66, 0.0, 793, 0, 1, 0, 0, 793, 0, 0], "semantic": {"name": "django.contrib.gis.gd...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83087:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83087:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83087:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83087:ImportFrom_L35_C4"}, {"f": "ajibawa-2023/Python-Cod...
from __future__ import absolute_import from django.contrib.gis.sitemaps import GeoRSSSitemap, KMLSitemap, KMZSitemap from .feeds import feed_dict from .models import City, Country sitemaps = {'kml' : KMLSitemap([City, Country]), 'kmz' : KMZSitemap([City, Country]), 'georss' : GeoRSSSitemap(f...
ajibawa-2023/Python-Code-Large/train/row_83088
5
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83088:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[]
from django.contrib.gis.db import models from django.contrib.gis.tests.utils import mysql, spatialite from django.utils.encoding import python_2_unicode_compatible # MySQL spatial indices can't handle NULL geometries. null_flag = not mysql @python_2_unicode_compatible class Country(models.Model): name = models.Ch...
ajibawa-2023/Python-Code-Large/train/row_83089
45
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83089:ImportFrom_L1_C0", "label": "from django.contrib.gis.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0179, 0.0179, 0, 0.66, 0.0, 964, 0, 1, 0, 0, 964, 0, 0], "semantic": {"name": "django.contrib.gis.db", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83089:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83089:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83089:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83089:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from __future__ import absolute_import import re from django.db import connection from django.db.utils import DatabaseError from django.contrib.gis import gdal from django.contrib.gis.geos import (fromstr, GEOSGeometry, Point, LineString, LinearRing, Polygon, GeometryCollection) from django.contrib.gis.tests.util...
ajibawa-2023/Python-Code-Large/train/row_83090
447
774
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83090:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0013, 0.0013, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83090:If_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83090:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83090:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83090:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Code-...
from __future__ import absolute_import from django.contrib.gis import feeds from .models import City class TestGeoRSS1(feeds.Feed): link = '/city/' title = 'Test GeoDjango Cities' def items(self): return City.objects.all() def item_link(self, item): return '/city/%s/' % item.pk ...
ajibawa-2023/Python-Code-Large/train/row_83091
33
66
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83091:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0152, 0.0152, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83091:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83091:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83091:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83091:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
from __future__ import absolute_import from django.conf.urls import patterns from .feeds import feed_dict from .sitemaps import sitemaps urlpatterns = patterns('', (r'^feeds/(?P<url>.*)/$', 'django.contrib.gis.views.feed', {'feed_dict': feed_dict}), ) urlpatterns += patterns('django.contrib.gis.sitemaps.views'...
ajibawa-2023/Python-Code-Large/train/row_83092
5
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83092:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[]
from django.contrib.gis.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class City3D(models.Model): name = models.CharField(max_length=30) point = models.PointField(dim=3) objects = models.GeoManager() def __str__(self): return self.n...
ajibawa-2023/Python-Code-Large/train/row_83093
53
77
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83093:ImportFrom_L1_C0", "label": "from django.contrib.gis.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.013, 0.013, 0, 0.66, 0.0, 964, 0, 1, 0, 0, 964, 0, 0], "semantic": {"name": "django.contrib.gis.db", "arg_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83093:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83093:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83093:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83093:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from __future__ import absolute_import, unicode_literals import os import re from django.contrib.gis.db.models import Union, Extent3D from django.contrib.gis.geos import GEOSGeometry, LineString, Point, Polygon from django.contrib.gis.utils import LayerMapping, LayerMapError from django.test import TestCase from djan...
ajibawa-2023/Python-Code-Large/train/row_83094
136
269
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83094:ImportFrom_L1_C0", "label": "from __future__ import absolute_import, unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 0, 0.66, 0.0, 777, 0, 2, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83094:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83094:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83094:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83094:FunctionDef_L67_C4"}, {"f": "ajibawa-2023/Python-Code-...
# Create your views here.
ajibawa-2023/Python-Code-Large/train/row_83095
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
from django.contrib.gis.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class SouthTexasCity(models.Model): "City model on projected coordinate system for South Texas." name = models.CharField(max_length=30) point = models.PointField(srid=32140) ...
ajibawa-2023/Python-Code-Large/train/row_83096
51
58
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83096:ImportFrom_L1_C0", "label": "from django.contrib.gis.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0172, 0.0172, 0, 0.66, 0.0, 964, 0, 1, 0, 0, 964, 0, 0], "semantic": {"name": "django.contrib.gis.db", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83096:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83096:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83096:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83096:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
from __future__ import absolute_import from django.db import connection from django.db.models import Q from django.contrib.gis.geos import GEOSGeometry, LineString from django.contrib.gis.measure import D # alias for Distance from django.contrib.gis.tests.utils import oracle, postgis, spatialite, no_oracle, no_spatial...
ajibawa-2023/Python-Code-Large/train/row_83097
190
358
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83097:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83097:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83097:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83097:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83097:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django.contrib.gis.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class City(models.Model): name = models.CharField(max_length=30) point = models.PointField(geography=True) objects = models.GeoManager() def __str__(self): return self.nam...
ajibawa-2023/Python-Code-Large/train/row_83098
21
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83098:ImportFrom_L1_C0", "label": "from django.contrib.gis.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 964, 0, 1, 0, 0, 964, 0, 0], "semantic": {"name": "django.contrib.gis.db", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83098:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83098:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83098:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83098:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" Tests for geography support in PostGIS 1.5+ """ from __future__ import absolute_import import os from django.contrib.gis import gdal from django.contrib.gis.measure import D from django.test import TestCase from django.utils._os import upath from .models import City, County, Zipcode class GeographyTest(TestCas...
ajibawa-2023/Python-Code-Large/train/row_83099
54
92
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83099:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0217, 0.0326, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83099:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83099:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83099:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_83099:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Co...
from django.contrib.gis.db import models class State(models.Model): name = models.CharField(max_length=20) objects = models.GeoManager() class County(models.Model): name = models.CharField(max_length=25) state = models.ForeignKey(State) mpoly = models.MultiPolygonField(srid=4269) # Multipolygon in...
ajibawa-2023/Python-Code-Large/train/row_83100
42
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83100:ImportFrom_L1_C0", "label": "from django.contrib.gis.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0143, 0.0143, 0, 0.66, 0.0, 964, 0, 1, 0, 0, 964, 0, 0], "semantic": {"name": "django.contrib.gis.db", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83100:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83100:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83100:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83100:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# coding: utf-8 from __future__ import absolute_import, unicode_literals import os from copy import copy from decimal import Decimal from django.contrib.gis.gdal import DataSource from django.contrib.gis.tests.utils import mysql from django.contrib.gis.utils.layermapping import (LayerMapping, LayerMapError, Inval...
ajibawa-2023/Python-Code-Large/train/row_83101
180
325
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83101:ImportFrom_L2_C0", "label": "from __future__ import absolute_import, unicode_literals", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0062, 0.0031, 0, 0.66, 0.0, 777, 0, 2, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83101:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83101:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83101:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_83101:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Co...
from django.contrib.gis.db import models from django.contrib.localflavor.us.models import USStateField from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Location(models.Model): point = models.PointField() objects = models.GeoManager() def __str__(self): return...
ajibawa-2023/Python-Code-Large/train/row_83102
44
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83102:ImportFrom_L1_C0", "label": "from django.contrib.gis.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0185, 0.0185, 0, 0.66, 0.0, 964, 0, 1, 0, 0, 964, 0, 0], "semantic": {"name": "django.contrib.gis.db", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83102:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83102:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83102:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83102:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from __future__ import absolute_import from datetime import date from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint from django.contrib.gis.db.models import Collect, Count, Extent, F, Union from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.tests.utils import mysql, orac...
ajibawa-2023/Python-Code-Large/train/row_83103
175
302
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83103:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0033, 0.0033, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83103:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83103:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83103:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_83103:Expr_L17_C8"}, {"f": "ajibawa-2023/Python-Co...
from django.conf import settings from django.db import DEFAULT_DB_ALIAS # function that will pass a test. def pass_test(*args): return def no_backend(test_func, backend): "Use this decorator to disable test on specified backend." if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1] == backend: ...
ajibawa-2023/Python-Code-Large/train/row_83104
31
37
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83104:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.027, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83104:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83104:Return_L5_C22"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83104:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83104:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from django.contrib.gis.db import models class AllOGRFields(models.Model): f_decimal = models.FloatField() f_float = models.FloatField() f_int = models.IntegerField() f_char = models.CharField(max_length=10) f_date = models.DateField() f_datetime = models.DateTimeField() f_time = models.Tim...
ajibawa-2023/Python-Code-Large/train/row_83105
11
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83105:ImportFrom_L1_C0", "label": "from django.contrib.gis.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0769, 0, 0.66, 0.0, 964, 0, 1, 0, 0, 964, 0, 0], "semantic": {"name": "django.contrib.gis.db", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83105:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83105:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83105:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83105:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from __future__ import absolute_import import os from django.db import connections from django.test import TestCase from django.contrib.gis.gdal import Driver from django.contrib.gis.geometry.test_data import TEST_DATA from django.contrib.gis.utils.ogrinspect import ogrinspect from .models import AllOGRFields clas...
ajibawa-2023/Python-Code-Large/train/row_83106
52
130
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83106:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0077, 0.0077, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83106:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83106:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83106:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_83106:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-...
from django.contrib.gis.db import models from django.contrib.gis import admin from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class City(models.Model): name = models.CharField(max_length=30) point = models.PointField() objects = models.GeoManager() def __str__...
ajibawa-2023/Python-Code-Large/train/row_83107
10
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83107:ImportFrom_L1_C0", "label": "from django.contrib.gis.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 964, 0, 1, 0, 0, 964, 0, 0], "semantic": {"name": "django.contrib.gis.db", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83107:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83107:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83107:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83107:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from __future__ import absolute_import from django.contrib.gis import admin from django.contrib.gis.geos import GEOSGeometry, Point from django.test import TestCase from django.test.utils import override_settings from .models import City GOOGLE_MAPS_API_KEY = 'XXXX' class GeoAdminTest(TestCase): urls = 'django...
ajibawa-2023/Python-Code-Large/train/row_83108
45
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83108:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0143, 0.0143, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83108:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83108:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83108:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83108:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Cod...
from django.conf.urls import patterns, include from django.contrib import admin urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), )
ajibawa-2023/Python-Code-Large/train/row_83109
3
6
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83109:ImportFrom_L1_C0", "label": "from django.conf.urls import patterns, include", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 528, 0, 2, 0, 0, 528, 0, 0], "semantic": {"name": "django.conf.urls", "arg_nam...
[]
from django.conf import settings from django.test.simple import build_suite, DjangoTestSuiteRunner from django.utils import unittest from .test_geoforms import GeometryFieldTest from .test_measure import DistanceTest, AreaTest from .test_spatialrefsys import SpatialRefSysTest def geo_apps(namespace=True, runtests=Fa...
ajibawa-2023/Python-Code-Large/train/row_83110
63
123
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83110:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 0.0081, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83110:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83110:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83110:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83110:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-...
# Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, #...
ajibawa-2023/Python-Code-Large/train/row_83111
125
330
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83111:Expr_L29_C0", "label": "expression", "type": "expression", "loc": [29, 37], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.0273, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83111:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83111:Return_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83111:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83111:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from django.conf import settings from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.geoip import GeoIP, GeoIPException from django.utils import unittest from django.utils import six # Note: Requires use of both the GeoIP ...
ajibawa-2023/Python-Code-Large/train/row_83112
88
122
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83112:ImportFrom_L2_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0164, 0.0082, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83112:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83112:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83112:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_83112:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Co...
import os import re from ctypes import c_char_p from django.core.validators import ipv4_re from django.contrib.gis.geoip.libgeoip import GEOIP_SETTINGS from django.contrib.gis.geoip.prototypes import ( GeoIPRecord, GeoIPTag, GeoIP_open, GeoIP_delete, GeoIP_database_info, GeoIP_lib_version, GeoIP_record_by_addr...
ajibawa-2023/Python-Code-Large/train/row_83113
134
265
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83113:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0038, 0.0038, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83113:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83113:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83113:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83113:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" This module houses the GeoIP object, a ctypes wrapper for the MaxMind GeoIP(R) C API (http://www.maxmind.com/app/c). This is an alternative to the GPL licensed Python GeoIP interface provided by MaxMind. GeoIP(R) is a registered trademark of MaxMind, LLC of Boston, Massachusetts. For IP-based geolocation, t...
ajibawa-2023/Python-Code-Large/train/row_83114
6
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83114:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 13], "level": 0, "parent": null, "vector": [8, 0, 0.35, 0.65, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83114:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83114:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83114:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83114:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import os from ctypes import CDLL from ctypes.util import find_library from django.conf import settings # Creating the settings dictionary with any settings, if needed. GEOIP_SETTINGS = dict((key, getattr(settings, key)) for key in ('GEOIP_PATH', 'GEOIP_LIBRARY_PATH', 'GEOIP_COUNTRY', 'GEOIP_CITY...
ajibawa-2023/Python-Code-Large/train/row_83115
17
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83115:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83115:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83115:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83115:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83115:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
from ctypes import c_char_p, c_float, c_int, string_at, Structure, POINTER from django.contrib.gis.geoip.libgeoip import lgeoip, free #### GeoIP C Structure definitions #### class GeoIPRecord(Structure): _fields_ = [('country_code', c_char_p), ('country_code3', c_char_p), ('country...
ajibawa-2023/Python-Code-Large/train/row_83116
57
109
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83116:ImportFrom_L1_C0", "label": "from ctypes import c_char_p, c_float, c_int\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0092, 0.0092, 0, 0.66, 0.0, 182, 0, 6, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": []...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83116:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83116:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83116:If_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83116:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
""" DataSource is a wrapper for the OGR Data Source object, which provides an interface for reading vector geometry data from many different file formats (including ESRI shapefiles). When instantiating a DataSource object, use the filename of a GDAL-supported data source. For example, a SHP file or a TIGER/Line...
ajibawa-2023/Python-Code-Large/train/row_83117
58
135
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83117:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 35], "level": 0, "parent": null, "vector": [8, 0, 0.1333, 0.2593, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83117:ClassDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83117:Expr_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83117:ClassDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83117:FunctionDef_L60_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" This module houses the OGR & SRS Exception objects, and the check_err() routine which checks the status code returned by OGR methods. """ #### OGR & SRS Exceptions #### class GDALException(Exception): pass class OGRException(Exception): pass class SRSException(Exception): pass class OGRIndexError(OGRException, K...
ajibawa-2023/Python-Code-Large/train/row_83118
15
42
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83118:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0714, 0.119, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83118:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83118:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83118:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83118:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from ctypes import byref, c_int from datetime import date, datetime, time from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils.encoding import force_text # For more information, see the OGR ...
ajibawa-2023/Python-Code-Large/train/row_83119
101
194
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83119:ImportFrom_L1_C0", "label": "from ctypes import byref, c_int", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0052, 0.0052, 0, 0.66, 0.0, 182, 0, 2, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83119:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83119:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83119:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83119:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-...
# Needed ctypes routines from ctypes import c_double, byref # Other GDAL imports. from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope from django.contrib.gis.gdal.error import OGRException, OGRIndexError, SRSException from django.contrib.gis.gdal.feature...
ajibawa-2023/Python-Code-Large/train/row_83120
112
218
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83120:ImportFrom_L2_C0", "label": "from ctypes import c_double, byref", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0092, 0.0046, 0, 0.66, 0.0, 182, 0, 2, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83120:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83120:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83120:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83120:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-...
from ctypes import c_char_p, c_double, c_int, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from django.contrib.gis.gdal.libgdal import lgdal from django.contrib.gis.gdal.prototypes.errcheck import check_bool, check_envelope from django.contrib.gis.gdal.prototypes.generation import (const_s...
ajibawa-2023/Python-Code-Large/train/row_83121
67
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83121:ImportFrom_L1_C0", "label": "from ctypes import c_char_p, c_double, c_int\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0102, 0.0102, 0, 0.66, 0.0, 182, 0, 5, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83121:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83121:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83121:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83121:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-L...
""" This module houses the error-checking routines used by the GDAL ctypes prototypes. """ from ctypes import c_void_p, string_at from django.contrib.gis.gdal.error import check_err, OGRException, SRSException from django.contrib.gis.gdal.libgdal import lgdal from django.utils import six # Helper routines for retrie...
ajibawa-2023/Python-Code-Large/train/row_83122
75
128
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83122:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0195, 0.0312, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83122:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83122:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83122:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83122:Return_L14_C4"}, {"f": "ajibawa-2023/Python-Code...
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
ajibawa-2023/Python-Code-Large/train/row_83123
52
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83123:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0429, 0.0714, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_void_p from django.contrib.gis.gdal.prototypes.errcheck import ( check_arg_errcode, check_errcode, check_geom, check_geom_offset, check_pointer, check_srs, check_str_a...
ajibawa-2023/Python-Code-Large/train/row_83124
75
125
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83124:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.02, 0.032, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83124:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83124:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83124:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83124:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code...
from ctypes import c_char_p, c_int, c_void_p, POINTER from django.contrib.gis.gdal.libgdal import lgdal, std_call from django.contrib.gis.gdal.prototypes.generation import (const_string_output, double_output, int_output, srs_output, string_output, void_output) ## Shortcut generation for routines with known paramet...
ajibawa-2023/Python-Code-Large/train/row_83125
39
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83125:ImportFrom_L1_C0", "label": "from ctypes import c_char_p, c_int, c_void_p\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0141, 0.0141, 0, 0.66, 0.0, 182, 0, 4, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83125:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83125:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83125:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83125:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from django.contrib.gis.gdal.error import OGRException from django.utils import six #### OGRGeomType #### class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0 : 'Unknown', ...
ajibawa-2023/Python-Code-Large/train/row_83126
46
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83126:ImportFrom_L1_C0", "label": "from django.contrib.gis.gdal.error import OGRException", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0115, 0, 0.66, 0.0, 76, 0, 1, 0, 0, 76, 0, 0], "semantic": {"name": "django.contrib.gis.gd...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83126:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83126:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83126:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83126:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
""" Module for executing all of the GDAL tests. None of these tests require the use of the database. """ from __future__ import absolute_import from django.utils.unittest import TestSuite, TextTestRunner # Importing the GDAL test modules. from . import test_driver, test_ds, test_envelope, test_geom, test_srs test_s...
ajibawa-2023/Python-Code-Large/train/row_83127
14
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83127:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0893, 0.1429, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83127:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83127:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83127:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83127:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code...
# The GDAL C library, OGR exception, and the Field object from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException, OGRIndexError from django.contrib.gis.gdal.field import Field from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType # ctypes function pro...
ajibawa-2023/Python-Code-Large/train/row_83128
70
124
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83128:ImportFrom_L2_C0", "label": "from django.contrib.gis.gdal.base import GDALBase", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0161, 0.0081, 0, 0.66, 0.0, 771, 0, 1, 0, 0, 771, 0, 0], "semantic": {"name": "django.contrib.gis.gdal....
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83128:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83128:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83128:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83128:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" The OGRGeometry is a wrapper for using the OGR Geometry class (see http://www.gdal.org/ogr/classOGRGeometry.html). OGRGeometry may be instantiated when reading geometries from OGR Data Sources (e.g. SHP files), or when given OGC WKT (a string). While the 'full' API is not present yet, the API is "pythonic" u...
ajibawa-2023/Python-Code-Large/train/row_83129
395
726
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83129:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 40], "level": 0, "parent": null, "vector": [8, 0, 0.0282, 0.0551, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83129:ClassDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83129:Expr_L72_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83129:ClassDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83129:FunctionDef_L74_C4"}, {"f": "ajibawa-2023/Python-Code-...
from __future__ import unicode_literals import logging import os import re from ctypes import c_char_p, c_int, CDLL, CFUNCTYPE from ctypes.util import find_library from django.contrib.gis.gdal.error import OGRException from django.core.exceptions import ImproperlyConfigured logger = logging.getLogger('django.contrib...
ajibawa-2023/Python-Code-Large/train/row_83130
64
109
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83130:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0092, 0.0092, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83130:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83130:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83130:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83130:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
# prerequisites imports from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils import six from django.utils.encoding import force_bytes # For more information, see ...
ajibawa-2023/Python-Code-Large/train/row_83131
34
68
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83131:ImportFrom_L2_C0", "label": "from ctypes import c_void_p", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0294, 0.0147, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["c_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83131:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83131:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83131:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83131:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" The GDAL/OGR library uses an Envelope structure to hold the bounding box information for a geometry. The envelope (bounding box) contains two pairs of coordinates, one for the lower left coordinate and one for the upper right coordinate: +----------o Upper right; (max_x, max_y) ...
ajibawa-2023/Python-Code-Large/train/row_83132
84
175
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83132:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0371, 0.0686, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83132:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83132:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83132:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83132:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from ctypes import c_void_p from django.contrib.gis.gdal.error import GDALException from django.utils import six class GDALBase(object): """ Base object for GDAL objects that has a pointer access property that controls access to the underlying C pointer. """ # Initially the pointer is NULL. _p...
ajibawa-2023/Python-Code-Large/train/row_83133
16
36
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83133:ImportFrom_L1_C0", "label": "from ctypes import c_void_p", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0278, 0.0278, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["c_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83133:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83133:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83133:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83133:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
ajibawa-2023/Python-Code-Large/train/row_83134
13
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83134:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 33], "level": 0, "parent": null, "vector": [8, 0, 0.3148, 0.6111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83134:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83134:ImportFrom_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83134:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83134:ImportFrom_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" The Spatial Reference class, represensents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHOR...
ajibawa-2023/Python-Code-Large/train/row_83135
175
342
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83135:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 28], "level": 0, "parent": null, "vector": [8, 0, 0.0424, 0.0819, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83135:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83135:Expr_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83135:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83135:FunctionDef_L49_C4"}, {"f": "ajibawa-2023/Python-Code-...
from django.contrib.admin import ModelAdmin from django.contrib.gis.admin.widgets import OpenLayersWidget from django.contrib.gis.gdal import OGRGeomType from django.contrib.gis.db import models class GeoModelAdmin(ModelAdmin): """ The administration options class for Geographic models. Map settings may be...
ajibawa-2023/Python-Code-Large/train/row_83136
78
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83136:ImportFrom_L1_C0", "label": "from django.contrib.admin import ModelAdmin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0073, 0.0073, 0, 0.66, 0.0, 703, 0, 1, 0, 0, 703, 0, 0], "semantic": {"name": "django.contrib.admin", "arg_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83136:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83136:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83136:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83136:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
import logging from django.forms.widgets import Textarea from django.template import loader, Context from django.templatetags.static import static from django.utils import six from django.utils import translation from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSEx...
ajibawa-2023/Python-Code-Large/train/row_83137
70
141
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83137:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0071, 0.0071, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83137:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83137:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83137:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83137:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-...
# Getting the normal admin routines, classes, and `site` instance. from django.contrib.admin import autodiscover, site, AdminSite, ModelAdmin, StackedInline, TabularInline, HORIZONTAL, VERTICAL # Geographic admin options classes and widgets. from django.contrib.gis.admin.options import GeoModelAdmin from django.contri...
ajibawa-2023/Python-Code-Large/train/row_83138
7
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83138:ImportFrom_L2_C0", "label": "from django.contrib.admin import autodiscover, site, AdminSite\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0833, 0, 0.66, 0.0, 703, 0, 8, 0, 0, 703, 0, 0], "semantic": {"name": "djang...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83138:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83138:ImportFrom_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83138:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83138:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
from django.contrib.gis.geos.base import numpy from django.contrib.gis.geos.coordseq import GEOSCoordSeq from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.point import Point from django.contrib.gis.geos import prototypes as cap...
ajibawa-2023/Python-Code-Large/train/row_83139
96
153
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83139:ImportFrom_L1_C0", "label": "from django.contrib.gis.geos.base import numpy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0065, 0.0065, 0, 0.66, 0.0, 386, 0, 1, 0, 0, 386, 0, 0], "semantic": {"name": "django.contrib.gis.geos.bas...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83139:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83139:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83139:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83139:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" This module houses the GEOS exceptions, specifically, GEOSException and GEOSGeometryIndexError. """ class GEOSException(Exception): "The base GEOS exception, indicates a GEOS-related error." pass class GEOSIndexError(GEOSException, KeyError): """ This exception is raised when an invalid index is...
ajibawa-2023/Python-Code-Large/train/row_83140
6
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83140:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.2, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83140:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83140:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83140:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83140:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
""" Module that holds classes for performing I/O operations on GEOS geometry objects. Specifically, this has Python implementations of WKB/WKT reader and writer classes. """ from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.prototypes.io import _WKTReader, _WKBReader, WKBWriter, WK...
ajibawa-2023/Python-Code-Large/train/row_83141
11
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83141:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.15, 0.25, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83141:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83141:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83141:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_83141:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Co...
""" This module houses the Geometry Collection objects: GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon """ from ctypes import c_int, c_uint, byref from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.libgeos i...
ajibawa-2023/Python-Code-Large/train/row_83142
74
124
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83142:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0202, 0.0323, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83142:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83142:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83142:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83142:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Cod...
from ctypes import c_char_p, c_int, c_size_t, c_ubyte, POINTER from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import ( check_geom, check_minus_one, check_sized_string, check_string, check_zero) from django.contrib.gis.geos.prototypes.threadsafe import G...
ajibawa-2023/Python-Code-Large/train/row_83143
75
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83143:ImportFrom_L1_C0", "label": "from ctypes import c_char_p, c_int, c_size_t\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0084, 0.0084, 0, 0.66, 0.0, 182, 0, 5, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83143:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83143:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83143:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83143:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code...
import threading from ctypes import byref, c_char_p, c_int, c_char, c_size_t, Structure, POINTER from django.contrib.gis import memoryview from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_geom, check_stri...
ajibawa-2023/Python-Code-Large/train/row_83144
161
241
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83144:Import_L1_C0", "label": "threading import threading", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0041, 0, 0.66, 0.0, 83, 0, 1, 0, 0, 83, 0, 0], "semantic": {"name": "threading", "arg_names": [], "import_names": ["thread...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83144:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83144:Assign_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83144:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83144:Assign_L62_C4"}, {"f": "ajibawa-2023/Python-Co...
""" Error checking functions for GEOS ctypes prototype functions. """ import os from ctypes import c_void_p, string_at, CDLL from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.libgeos import GEOS_VERSION from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc # Getting the...
ajibawa-2023/Python-Code-Large/train/row_83145
53
95
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83145:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0211, 0.0316, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83145:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83145:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83145:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83145:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
""" This module houses the GEOS ctypes prototype functions for the topological operations on geometries. """ __all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull', 'geos_difference', 'geos_envelope', 'geos_intersection', 'geos_linemerge', 'geos_pointonsurface', 'geos_pre...
ajibawa-2023/Python-Code-Large/train/row_83146
44
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83146:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0391, 0.0625, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83146:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83146:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83146:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83146:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code...
import threading from django.contrib.gis.geos.libgeos import lgeos, notice_h, error_h, CONTEXT_PTR class GEOSContextHandle(object): """ Python object representing a GEOS context handle. """ def __init__(self): # Initializing the context handler for this thread with # the notice and erro...
ajibawa-2023/Python-Code-Large/train/row_83147
48
86
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83147:Import_L1_C0", "label": "threading import threading", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0116, 0.0116, 0, 0.66, 0.0, 83, 0, 1, 0, 0, 83, 0, 0], "semantic": {"name": "threading", "arg_names": [], "import_names": ["thread...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83147:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83147:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83147:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83147:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
from ctypes import c_char from django.contrib.gis.geos.libgeos import GEOM_PTR, PREPGEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_predicate from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc # Prepared geometry constructor and destructors. geos_prepare = GEOSFunc('GEOSPrepare')...
ajibawa-2023/Python-Code-Large/train/row_83148
19
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83148:ImportFrom_L1_C0", "label": "from ctypes import c_char", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.04, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["c_char"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83148:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83148:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83148:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83148:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Co...
from ctypes import c_double, c_int, c_uint, POINTER from django.contrib.gis.geos.libgeos import GEOM_PTR, CS_PTR from django.contrib.gis.geos.prototypes.errcheck import last_arg_byref, GEOSException from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc ## Error-checking routines specific to coordinate seq...
ajibawa-2023/Python-Code-Large/train/row_83149
53
83
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83149:ImportFrom_L1_C0", "label": "from ctypes import c_double, c_int, c_uint\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.012, 0.012, 0, 0.66, 0.0, 182, 0, 4, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83149:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83149:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83149:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83149:If_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" This module is for the miscellaneous GEOS routines, particularly the ones that return the area, distance, and length. """ from ctypes import c_int, c_double, POINTER from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOS_PREPARE from django.contrib.gis.geos.prototypes.errcheck import check_dbl, check_string f...
ajibawa-2023/Python-Code-Large/train/row_83150
24
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83150:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0625, 0.1, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83150:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83150:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83150:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83150:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code...
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ # Coordinate sequence routines. from django.contrib.gis.geos.prototypes.coordseq import (create_cs, get_cs, cs_clone, cs_getordinate, cs_setordinate, cs...
ajibawa-2023/Python-Code-Large/train/row_83151
6
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83151:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.1667, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
""" This module houses the GEOS ctypes prototype functions for the unary and binary predicate operations on geometries. """ from ctypes import c_char, c_char_p, c_double from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_predicate from django.contrib.gis...
ajibawa-2023/Python-Code-Large/train/row_83152
34
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83152:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0568, 0.0909, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83152:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83152:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83152:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83152:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code...
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Released under the New BSD license. """ This module contains a base type which provides list-style mutations without specific data storage methods. See also http://www.aryehleib.com/MutableLists.html Author: Aryeh Leib Taurog. """ from django.utils.f...
ajibawa-2023/Python-Code-Large/train/row_83153
186
328
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83153:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0198, 0.0244, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83153:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83153:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83153:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83153:Assign_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. """ import logging import os import re from ctypes import c_...
ajibawa-2023/Python-Code-Large/train/row_83154
75
155
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83154:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.029, 0.0516, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83154:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83154:ImportFrom_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83154:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83154:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
""" GEOS Testing module. """ from __future__ import absolute_import from django.utils.unittest import TestSuite, TextTestRunner from . import test_geos, test_io, test_geos_mutation, test_mutable_list test_suites = [ test_geos.suite(), test_io.suite(), test_geos_mutation.suite(), test_mutable_list.suit...
ajibawa-2023/Python-Code-Large/train/row_83155
16
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83155:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0714, 0.1071, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83155:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83155:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83155:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83155:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code...
from ctypes import c_uint, byref from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.libgeos import get_pointer_arr, GEOM_PTR from django.contrib.gis.geos.linestring import LinearRing from django.contrib.gis.geos import prototypes as capi from django.utils import six from django.utils...
ajibawa-2023/Python-Code-Large/train/row_83156
99
170
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83156:ImportFrom_L1_C0", "label": "from ctypes import c_uint, byref", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0059, 0.0059, 0, 0.66, 0.0, 182, 0, 2, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83156:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83156:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83156:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83156:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-...
from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.prototypes import prepared as capi class PreparedGeometry(GEOSBase): """ A geometry that is prepared for performing certain operations. At the moment this includes the co...
ajibawa-2023/Python-Code-Large/train/row_83157
20
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83157:ImportFrom_L1_C0", "label": "from django.contrib.gis.geos.base import GEOSBase", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 386, 0, 1, 0, 0, 386, 0, 0], "semantic": {"name": "django.contrib.gis.geos....
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83157:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83157:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83157:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83157:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
""" This module houses the GEOSCoordSeq object, which is used internally by GEOSGeometry to house the actual coordinates of the Point, LineString, and LinearRing geometries. """ from ctypes import c_double, c_uint, byref from django.contrib.gis.geos.base import GEOSBase, numpy from django.contrib.gis.geos.error impo...
ajibawa-2023/Python-Code-Large/train/row_83158
104
157
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83158:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0191, 0.0318, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83158:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83158:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83158:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83158:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from ctypes import c_void_p from django.contrib.gis.geos.error import GEOSException # Trying to import GDAL libraries, if available. Have to place in # try/except since this package may be used outside GeoDjango. try: from django.contrib.gis import gdal except ImportError: # A 'dummy' gdal module. class ...
ajibawa-2023/Python-Code-Large/train/row_83159
21
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83159:ImportFrom_L1_C0", "label": "from ctypes import c_void_p", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0196, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["c_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83159:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83159:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83159:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83159:ClassDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ from __future__ import unicode_literals # Python, ctypes and types dependencies. from ctypes import addressof, byref, c_double from django.contrib.gis import memoryview # super-class for mutable list behavio...
ajibawa-2023/Python-Code-Large/train/row_83160
345
711
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83160:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0035, 0.0056, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83160:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83160:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83160:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83160:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from ctypes import c_uint from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos import prototypes as capi from django.utils import six from django.utils.six.moves import xrange class Point(GEOSGeometry): _minlength = 2 _ma...
ajibawa-2023/Python-Code-Large/train/row_83161
91
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83161:ImportFrom_L1_C0", "label": "from ctypes import c_uint", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0073, 0.0073, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["c_ui...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83161:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83161:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83161:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83161:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
""" The GeoDjango GEOS module. Please consult the GeoDjango documentation for more details: http://geodjango.org/docs/geos.html """ from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex from django.contrib.gis.geos.point import Point from django.contrib.gis.geos.linestring import LineStrin...
ajibawa-2023/Python-Code-Large/train/row_83162
10
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83162:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.2143, 0.3571, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
from django.contrib.gis import memoryview from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex from django.utils import six def fromfile(file_h): """ Given a string file name, returns a GEOSGeometry. The file may contain WKB, WKT, or HEX. """ # If given a file name, get...
ajibawa-2023/Python-Code-Large/train/row_83163
18
35
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83163:ImportFrom_L1_C0", "label": "from django.contrib.gis import memoryview", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0286, 0.0286, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "django.contrib.gis", "arg_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83163:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83163:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83163:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83163:If_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
from django.core.management.commands.inspectdb import Command as InspectDBCommand class Command(InspectDBCommand): db_module = 'django.contrib.gis.db' gis_tables = {} def get_field_type(self, connection, table_name, row): field_type, field_params, field_notes = super(Command, self).get_field_type(...
ajibawa-2023/Python-Code-Large/train/row_83164
19
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83164:ImportFrom_L1_C0", "label": "from django.core.management.commands.inspectdb import InspectDBCommand", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0345, 0.0345, 0, 0.66, 0.0, 296, 0, 1, 0, 0, 296, 0, 0], "semantic": {"name": "dja...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83164:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83164:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83164:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83164:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import os from optparse import make_option from django.contrib.gis import gdal from django.core.management.base import LabelCommand, CommandError def layer_option(option, opt, value, parser): """ Callback for `make_option` for the `ogrinspect` `layer_key` keyword option which may be an integer or a string....
ajibawa-2023/Python-Code-Large/train/row_83165
41
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83165:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0084, 0.0084, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83165:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83165:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83165:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83165:Try_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from __future__ import unicode_literals from django.http import Http404 from django.utils.translation import ugettext as _ def feed(request, url, feed_dict=None): """Provided for backwards compatibility.""" if not feed_dict: raise Http404(_("No feeds are registered.")) try: slug, param = ...
ajibawa-2023/Python-Code-Large/train/row_83166
16
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83166:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.04, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83166:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83166:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83166:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83166:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ # While this couples the geographic forms to the GEOS library, # it decouples from database (by not importing SpatialBackend). from django.contrib.gis.geos import GEOSException, GEOSGeometry class...
ajibawa-2023/Python-Code-Large/train/row_83167
31
75
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83167:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0133, 0.0133, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83167:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83167:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83167:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83167:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.forms import * from django.contrib.gis.forms.fields import GeometryField
ajibawa-2023/Python-Code-Large/train/row_83168
2
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83168:ImportFrom_L1_C0", "label": "from django.forms import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 666, 0, 1, 0, 0, 666, 0, 0], "semantic": {"name": "django.forms", "arg_names": [], "import_names": ["*"]...
[]
from django.utils import six if six.PY3: memoryview = memoryview else: memoryview = buffer
ajibawa-2023/Python-Code-Large/train/row_83169
4
6
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83169:ImportFrom_L1_C0", "label": "from django.utils import six", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 944, 0, 1, 0, 0, 944, 0, 0], "semantic": {"name": "django.utils", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83169:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83169:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83169:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83169:Assign_L6_C4"}]
from django.db import connections from django.db.models.query import QuerySet, ValuesQuerySet, ValuesListQuerySet from django.contrib.gis import memoryview from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models.fields import get_srid_info, PointField, LineStringField from django.contrib....
ajibawa-2023/Python-Code-Large/train/row_83170
340
782
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83170:ImportFrom_L1_C0", "label": "from django.db import connections", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0013, 0.0013, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83170:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83170:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83170:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83170:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-...
from django.db.models.fields import Field from django.db.models.sql.expressions import SQLEvaluator from django.utils.translation import ugettext_lazy as _ from django.contrib.gis import forms from django.contrib.gis.db.models.proxy import GeometryProxy from django.contrib.gis.geometry.backend import Geometry, Geometry...
ajibawa-2023/Python-Code-Large/train/row_83171
136
295
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_83171:ImportFrom_L1_C0", "label": "from django.db.models.fields import Field", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0034, 0.0034, 0, 0.66, 0.0, 5, 0, 1, 0, 0, 5, 0, 0], "semantic": {"name": "django.db.models.fields", "arg_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_83171:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83171:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_83171:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_83171:Try_L22_C4"}, {"f": "ajibawa-2023/Python-Code-La...