id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
3,600
test_mutable_list.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/tests/test_mutable_list.py
# Copyright (c) 2008-2009 Aryeh Leib Taurog, http://www.aryehleib.com # All rights reserved. # # Modified from original contribution by Aryeh Leib Taurog, which was # released under the New BSD license. import unittest from django.contrib.gis.geos.mutable_list import ListMixin class UserListA(ListMixin): _mytype =...
14,520
Python
.py
332
32.295181
93
0.505311
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,601
test_geos.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/tests/test_geos.py
import ctypes, random, unittest, sys from django.contrib.gis.geos import * from django.contrib.gis.geos.base import gdal, numpy, GEOSBase from django.contrib.gis.geometry.test_data import TestDataMixin class GEOSTest(unittest.TestCase, TestDataMixin): @property def null_srid(self): """ Returns...
38,341
Python
.py
789
37.121673
121
0.591741
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,602
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/tests/__init__.py
""" GEOS Testing module. """ from unittest import TestSuite, TextTestRunner 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.suite(), ] def suite(): "Builds a test suite for the GE...
538
Python
.py
21
22.142857
64
0.676413
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,603
test_geos_mutation.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/tests/test_geos_mutation.py
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Modified from original contribution by Aryeh Leib Taurog, which was # released under the New BSD license. import unittest import django.utils.copycompat as copy from django.contrib.gis.geos import * from django.contrib.gis.geos.error import GEOSIndex...
5,446
Python
.py
112
38.651786
104
0.567715
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,604
coordseq.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/coordseq.py
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...
3,112
Python
.py
69
41.057971
129
0.732915
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,605
io.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/io.py
import threading from ctypes import byref, c_char_p, c_int, c_char, c_size_t, Structure, POINTER 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_string, check_sized_string from django.contrib...
8,473
Python
.py
193
39.528497
117
0.72312
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,606
errcheck.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/errcheck.py
""" 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...
3,522
Python
.py
84
37.261905
129
0.703823
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,607
predicates.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/predicates.py
""" 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...
1,777
Python
.py
40
42.075
78
0.78015
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,608
threadsafe.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/threadsafe.py
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...
2,824
Python
.py
70
32.2
81
0.649014
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,609
prepared.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/prepared.py
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')...
1,032
Python
.py
21
47.190476
89
0.825223
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,610
geom.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/geom.py
from ctypes import c_char_p, c_int, c_size_t, c_ubyte, c_uint, POINTER from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR, PREPGEOM_PTR, GEOS_PREPARE from django.contrib.gis.geos.prototypes.errcheck import \ check_geom, check_minus_one, check_sized_string, check_string, check_zero from django.contrib.gis....
4,465
Python
.py
99
42.525253
88
0.757708
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,611
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/__init__.py
""" 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, c...
1,355
Python
.py
25
51.28
92
0.768302
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,612
misc.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/misc.py
""" 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 from django.contrib.gis.geos.prototypes.errcheck import check_dbl from django.contrib.gis.geos....
1,001
Python
.py
25
37.24
69
0.747174
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,613
topology.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/geos/prototypes/topology.py
""" 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...
2,226
Python
.py
46
45.543478
84
0.761379
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,614
proxy.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/proxy.py
""" The GeometryProxy object, allows for lazy-geometries. The proxy uses Python descriptors for instantiating and setting Geometry objects corresponding to geographic model fields. Thanks to Robert Coup for providing this functionality (see #4322). """ class GeometryProxy(object): def __init__(self, klass, field...
2,512
Python
.py
56
36
121
0.63031
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,615
manager.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/manager.py
from django.db.models.manager import Manager from django.contrib.gis.db.models.query import GeoQuerySet class GeoManager(Manager): "Overrides Manager to return Geographic QuerySets." # This manager should be used for queries on related fields # so that geometry columns on Oracle and MySQL are selected ...
3,578
Python
.py
70
44.042857
69
0.644317
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,616
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/__init__.py
# Want to get everything from the 'normal' models package. from django.db.models import * # Geographic aggregate functions from django.contrib.gis.db.models.aggregates import * # The GeoManager from django.contrib.gis.db.models.manager import GeoManager # The geographic-enabled fields. from django.contrib.gis.db.mod...
499
Python
.py
11
42.727273
64
0.816495
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,617
aggregates.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/aggregates.py
from django.db.models import Aggregate from django.contrib.gis.db.models.sql import GeomField class Collect(Aggregate): name = 'Collect' class Extent(Aggregate): name = 'Extent' class Extent3D(Aggregate): name = 'Extent3D' class MakeLine(Aggregate): name = 'MakeLine' class Union(Aggregate): nam...
332
Python
.py
12
24.583333
54
0.752381
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,618
query.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/query.py
from django.db import connections from django.db.models.query import QuerySet, Q, ValuesQuerySet, ValuesListQuerySet from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models.fields import get_srid_info, GeometryField, PointField, LineStringField from django.contrib.gis.db.models.sql import...
35,968
Python
.py
684
40.824561
124
0.601233
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,619
fields.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/fields.py
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...
11,157
Python
.py
243
36.73251
117
0.643929
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,620
compiler.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/sql/compiler.py
from itertools import izip from django.db.backends.util import truncate_name from django.db.models.sql import compiler from django.db.models.sql.constants import TABLE_NAME from django.db.models.sql.query import get_proxied_model SQLCompiler = compiler.SQLCompiler class GeoSQLCompiler(compiler.SQLCompiler): def ...
12,579
Python
.py
251
37.01992
106
0.589058
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,621
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/sql/__init__.py
from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, GeomField from django.contrib.gis.db.models.sql.query import GeoQuery from django.contrib.gis.db.models.sql.where import GeoWhereNode
216
Python
.py
3
71
91
0.85446
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,622
aggregates.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/sql/aggregates.py
from django.db.models.sql.aggregates import * from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql.conversion import GeomField class GeoAggregate(Aggregate): # Default SQL template for spatial aggregates. sql_template = '%(function)s(%(field)s)' # Conversion ...
1,804
Python
.py
44
33.795455
86
0.668962
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,623
query.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/sql/query.py
from django.db import connections from django.db.models.query import sql from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql import aggregates as gis_aggregates from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, GeomField from django.contri...
5,314
Python
.py
107
40.140187
97
0.651973
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,624
conversion.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/sql/conversion.py
""" This module holds simple classes used by GeoQuery.convert_values to convert geospatial values from the database. """ class BaseField(object): empty_strings_allowed = True def get_internal_type(self): "Overloaded method so OracleQuery.convert_values doesn't balk." return None class AreaFiel...
776
Python
.py
23
29.217391
72
0.716956
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,625
where.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/sql/where.py
from django.db.models.fields import Field, FieldDoesNotExist from django.db.models.sql.constants import LOOKUP_SEP from django.db.models.sql.expressions import SQLEvaluator from django.db.models.sql.where import Constraint, WhereNode from django.contrib.gis.db.models.fields import GeometryField class GeoConstraint(Con...
3,938
Python
.py
80
39.9
113
0.656015
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,626
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backend/__init__.py
from django.db import connection if hasattr(connection.ops, 'spatial_version'): from warnings import warn warn('The `django.contrib.gis.db.backend` module was refactored and ' 'renamed to `django.contrib.gis.db.backends` in 1.2. ' 'All functionality of `SpatialBackend` ' 'has been m...
543
Python
.py
10
47.5
73
0.701128
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,627
util.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/util.py
""" A collection of utility routines and classes used by the spatial backends. """ def gqn(val): """ The geographic quote name function; used for quoting tables and geometries (they use single rather than the double quotes of the backend quotename function). """ if isinstance(val, basestring): ...
1,749
Python
.py
49
27.55102
70
0.590077
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,628
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/base.py
""" Base/mixin classes for the spatial backend database operations and the `SpatialRefSys` model the backend. """ import re from django.conf import settings from django.contrib.gis import gdal class BaseSpatialOperations(object): """ This module holds the base `BaseSpatialBackend` object, which is instanti...
10,674
Python
.py
295
27.654237
248
0.616077
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,629
adapter.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/adapter.py
class WKTAdapter(object): """ This provides an adaptor for Geometries sent to the MySQL and Oracle database backends. """ def __init__(self, geom): self.wkt = geom.wkt self.srid = geom.srid def __eq__(self, other): return self.wkt == other.wkt and self.srid == other.srid...
435
Python
.py
14
24.714286
64
0.619617
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,630
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/postgis/models.py
""" The GeometryColumns and SpatialRefSys models for the PostGIS backend. """ from django.db import models from django.contrib.gis.db.backends.base import SpatialRefSysMixin class GeometryColumns(models.Model): """ The 'geometry_columns' table from the PostGIS. See the PostGIS documentation at Ch. 4.2.2. ...
1,970
Python
.py
57
28.280702
70
0.664391
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,631
creation.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/postgis/creation.py
from django.conf import settings from django.db.backends.postgresql.creation import DatabaseCreation class PostGISCreation(DatabaseCreation): geom_index_type = 'GIST' geom_index_opts = 'GIST_GEOMETRY_OPS' def sql_indexes_for_field(self, model, f, style): "Return any spatial index creation SQL for ...
2,845
Python
.py
51
37.039216
93
0.501975
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,632
introspection.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/postgis/introspection.py
from django.db.backends.postgresql_psycopg2.introspection import DatabaseIntrospection from django.contrib.gis.gdal import OGRGeomType class GeoIntrospectionError(Exception): pass class PostGISIntrospection(DatabaseIntrospection): # Reverse dictionary for PostGIS geometry types not populated until # intro...
4,385
Python
.py
85
38.352941
95
0.593939
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,633
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/postgis/base.py
from django.db.backends.postgresql_psycopg2.base import * from django.db.backends.postgresql_psycopg2.base import DatabaseWrapper as Psycopg2DatabaseWrapper from django.contrib.gis.db.backends.postgis.creation import PostGISCreation from django.contrib.gis.db.backends.postgis.introspection import PostGISIntrospection f...
697
Python
.py
11
59
98
0.80292
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,634
operations.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/postgis/operations.py
import re from decimal import Decimal from django.conf import settings from django.contrib.gis.db.backends.base import BaseSpatialOperations from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction from django.contrib.gis.db.backends.postgis.adapter import PostGISAdapter from django.contrib.gi...
25,840
Python
.py
518
38.07529
120
0.593996
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,635
adapter.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/postgis/adapter.py
""" This object provides quoting for GEOS geometries into PostgreSQL/PostGIS. """ from psycopg2 import Binary from psycopg2.extensions import ISQLQuote class PostGISAdapter(object): def __init__(self, geom): "Initializes on the geometry." # Getting the WKB (in string form, to allow easy pickling ...
1,165
Python
.py
28
34.607143
91
0.664602
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,636
creation.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/mysql/creation.py
from django.db.backends.mysql.creation import DatabaseCreation class MySQLCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): from django.contrib.gis.db.models.fields import GeometryField output = super(MySQLCreation, self).sql_indexes_for_field(model, f, style) ...
855
Python
.py
15
43.266667
82
0.589008
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,637
introspection.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/mysql/introspection.py
from MySQLdb.constants import FIELD_TYPE from django.contrib.gis.gdal import OGRGeomType from django.db.backends.mysql.introspection import DatabaseIntrospection class MySQLIntrospection(DatabaseIntrospection): # Updating the data_types_reverse dictionary with the appropriate # type for Geometry fields. d...
1,426
Python
.py
28
39.107143
81
0.634864
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,638
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/mysql/base.py
from django.db.backends.mysql.base import * from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper from django.contrib.gis.db.backends.mysql.creation import MySQLCreation from django.contrib.gis.db.backends.mysql.introspection import MySQLIntrospection from django.contrib.gis.db.backends.mysq...
642
Python
.py
11
53.909091
81
0.788553
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,639
operations.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/mysql/operations.py
from django.db.backends.mysql.base import DatabaseOperations from django.contrib.gis.db.backends.adapter import WKTAdapter from django.contrib.gis.db.backends.base import BaseSpatialOperations class MySQLOperations(DatabaseOperations, BaseSpatialOperations): compiler_module = 'django.contrib.gis.db.models.sql.co...
2,418
Python
.py
52
38.038462
93
0.624309
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,640
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/oracle/models.py
""" The GeometryColumns and SpatialRefSys models for the Oracle spatial backend. It should be noted that Oracle Spatial does not have database tables named according to the OGC standard, so the closest analogs are used. For example, the `USER_SDO_GEOM_METADATA` is used for the GeometryColumns model and the `SDO_...
2,184
Python
.py
56
33.446429
84
0.702218
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,641
compiler.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/oracle/compiler.py
from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler from django.db.backends.oracle import compiler SQLCompiler = compiler.SQLCompiler class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler): pass class SQLInsertCompiler(compiler.SQLInsertCompiler, GeoSQLCompiler): def pla...
1,756
Python
.py
37
37.72973
90
0.666472
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,642
creation.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/oracle/creation.py
from django.db.backends.oracle.creation import DatabaseCreation from django.db.backends.util import truncate_name class OracleCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): "Return any spatial index creation SQL for the field." from django.contrib.gis.db.models.field...
2,283
Python
.py
35
45.914286
118
0.486836
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,643
introspection.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/oracle/introspection.py
import cx_Oracle from django.db.backends.oracle.introspection import DatabaseIntrospection class OracleIntrospection(DatabaseIntrospection): # Associating any OBJECTVAR instances with GeometryField. Of course, # this won't work right on Oracle objects that aren't MDSYS.SDO_GEOMETRY, # but it is the only o...
1,777
Python
.py
34
40.323529
131
0.609896
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,644
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/oracle/base.py
from django.db.backends.oracle.base import * from django.db.backends.oracle.base import DatabaseWrapper as OracleDatabaseWrapper from django.contrib.gis.db.backends.oracle.creation import OracleCreation from django.contrib.gis.db.backends.oracle.introspection import OracleIntrospection from django.contrib.gis.db.backen...
658
Python
.py
11
55.454545
83
0.794118
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,645
operations.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/oracle/operations.py
""" This module contains the spatial lookup types, and the `get_geo_where_clause` routine for Oracle Spatial. Please note that WKT support is broken on the XE version, and thus this backend will not work on such platforms. Specifically, XE lacks support for an internal JVM, and Java libraries are required to use...
12,595
Python
.py
255
39.717647
115
0.617298
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,646
adapter.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/oracle/adapter.py
from cx_Oracle import CLOB from django.contrib.gis.db.backends.adapter import WKTAdapter class OracleSpatialAdapter(WKTAdapter): input_size = CLOB
152
Python
.py
4
35.75
61
0.836735
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,647
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/spatialite/models.py
""" The GeometryColumns and SpatialRefSys models for the SpatiaLite backend. """ from django.db import models from django.contrib.gis.db.backends.base import SpatialRefSysMixin class GeometryColumns(models.Model): """ The 'geometry_columns' table from SpatiaLite. """ f_table_name = models.CharField(ma...
1,847
Python
.py
52
29.134615
73
0.670957
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,648
creation.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/spatialite/creation.py
import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command from django.db.backends.sqlite3.creation import DatabaseCreation class SpatiaLiteCreation(DatabaseCreation): def create_test_db(self, verbosity=1, autoclobber=False): ...
4,193
Python
.py
78
41.102564
102
0.607274
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,649
introspection.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/spatialite/introspection.py
from django.contrib.gis.gdal import OGRGeomType from django.db.backends.sqlite3.introspection import DatabaseIntrospection, FlexibleFieldLookupDict class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict): """ Sublcass that includes updates the `base_data_types_reverse` dict for geometry field types. ...
2,112
Python
.py
45
35.488889
99
0.606016
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,650
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/spatialite/base.py
from ctypes.util import find_library from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.base import * from django.db.backends.sqlite3.base import DatabaseWrapper as SqliteDatabaseWrapper, \ _sqlite_extract, _sqlite_date_trunc, _sqlite_regexp fro...
4,347
Python
.py
70
47.885714
129
0.633958
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,651
operations.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/spatialite/operations.py
import re from decimal import Decimal from django.contrib.gis.db.backends.base import BaseSpatialOperations from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter from django.contrib.gis.geometry.backend import G...
14,391
Python
.py
301
37.461794
112
0.61781
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,652
adapter.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/spatialite/adapter.py
from django.db.backends.sqlite3.base import Database from django.contrib.gis.db.backends.adapter import WKTAdapter class SpatiaLiteAdapter(WKTAdapter): "SQLite adaptor for geometry objects." def __conform__(self, protocol): if protocol is Database.PrepareProtocol: return str(self)
311
Python
.py
7
39.285714
61
0.762376
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,653
ogrinspect.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/utils/ogrinspect.py
""" This module is for inspecting OGR data sources and generating either models for GeoDjango and/or mapping dictionaries for use with the `LayerMapping` utility. Author: Travis Pinney, Dane Springmeyer, & Justin Bronn """ from itertools import izip # Requires GDAL to use. from django.contrib.gis.gdal import DataSourc...
8,939
Python
.py
185
40.702703
132
0.652054
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,654
ogrinfo.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/utils/ogrinfo.py
""" 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_...
1,973
Python
.py
47
32.425532
89
0.576042
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,655
geoip.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/utils/geoip.py
""" 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...
14,811
Python
.py
319
38.37931
117
0.641038
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,656
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/utils/__init__.py
""" 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 ...
853
Python
.py
22
34.454545
85
0.759709
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,657
wkt.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/utils/wkt.py
""" Utilities for manipulating Geometry WKT. """ 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 that number: >>> pnt =...
1,846
Python
.py
47
31.808511
92
0.600782
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,658
layermapping.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/utils/layermapping.py
# 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...
27,065
Python
.py
528
37.774621
142
0.591694
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,659
srs.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/utils/srs.py
from django.contrib.gis.gdal import SpatialReference from django.db import connections, DEFAULT_DB_ALIAS def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None, database=DEFAULT_DB_ALIAS): """ This function takes a GDAL SpatialReference system and adds its information ...
3,157
Python
.py
65
40.892308
81
0.68474
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,660
fields.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/forms/fields.py
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 GEOSGeometry class GeometryField(forms.Field): """ This is the bas...
2,746
Python
.py
58
37.396552
94
0.62374
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,661
test_spatialrefsys.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/test_spatialrefsys.py
import unittest from django.db import connection from django.contrib.gis.tests.utils import mysql, no_mysql, oracle, postgis, spatialite test_srs = ({'srid' : 4326, 'auth_name' : ('EPSG', True), 'auth_srid' : 4326, 'srtext' : 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6...
6,685
Python
.py
97
56.649485
737
0.625381
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,662
test_geoforms.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/test_geoforms.py
import unittest from django.forms import ValidationError from django.contrib.gis import forms from django.contrib.gis.geos import GEOSGeometry class GeometryFieldTest(unittest.TestCase): def test00_init(self): "Testing GeometryField initialization with defaults." fld = forms.GeometryField() ...
2,653
Python
.py
53
42.566038
104
0.678516
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,663
utils.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/utils.py
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: ...
959
Python
.py
22
41.136364
81
0.732047
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,664
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/__init__.py
import unittest from django.conf import settings from django.test.simple import build_suite, DjangoTestSuiteRunner def run_tests(*args, **kwargs): from django.test.simple import run_tests as base_run_tests return base_run_tests(*args, **kwargs) def run_gis_tests(test_labels, verbosity=1, interactive=True, ...
4,959
Python
.py
106
39.320755
107
0.694064
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,665
test_geoip.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/test_geoip.py
import os, unittest from django.db import settings from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.utils import GeoIP, GeoIPException # Note: Requires use of both the GeoIP country and city datasets. # The GEOIP_DATA path should be the only setting set (the directory # should contain links or ...
4,204
Python
.py
88
37.625
89
0.610339
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,666
test_measure.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/test_measure.py
""" Distance and Area objects to allow for sensible and convienient calculation and conversions. Here are some tests. """ import unittest from django.contrib.gis.measure import Distance, Area, D, A class DistanceTest(unittest.TestCase): "Testing the Distance object" def testInit(self): "Testing init...
8,965
Python
.py
274
22.751825
105
0.54103
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,667
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geogapp/models.py
from django.contrib.gis.db import models class City(models.Model): name = models.CharField(max_length=30) point = models.PointField(geography=True) objects = models.GeoManager() def __unicode__(self): return self.name class Zipcode(models.Model): code = models.CharField(max_length=10) poly = m...
712
Python
.py
17
37.647059
75
0.725434
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,668
tests.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geogapp/tests.py
""" Tests for geography support in PostGIS 1.5+ """ import os from django.contrib.gis import gdal from django.contrib.gis.measure import D from django.test import TestCase from models import City, County, Zipcode class GeographyTest(TestCase): def test01_fixture_load(self): "Ensure geography features load...
4,080
Python
.py
75
44.493333
105
0.642625
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,669
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/layermap/models.py
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...
2,179
Python
.py
54
33.259259
135
0.649123
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,670
tests.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/layermap/tests.py
import os import unittest from decimal import Decimal from django.utils.copycompat import copy from django.contrib.gis.gdal import DataSource from django.contrib.gis.tests.utils import mysql from django.contrib.gis.utils.layermapping import LayerMapping, LayerMapError, InvalidDecimal, MissingForeignKey from models i...
12,459
Python
.py
219
45.789954
202
0.633259
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,671
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/distapp/models.py
from django.contrib.gis.db import models class SouthTexasCity(models.Model): "City model on projected coordinate system for South Texas." name = models.CharField(max_length=30) point = models.PointField(srid=32140) objects = models.GeoManager() def __unicode__(self): return self.name class SouthTe...
1,832
Python
.py
43
38.186047
71
0.727273
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,672
tests.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/distapp/tests.py
import os from decimal import Decimal from django.db import connection from django.db.models import Q from django.contrib.gis.geos import GEOSGeometry, Point, LineString from django.contrib.gis.measure import D # alias for Distance from django.contrib.gis.tests.utils import oracle, postgis, spatialite, no_oracle, no_s...
19,055
Python
.py
311
49.839228
196
0.64866
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,673
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geoapp/models.py
from django.contrib.gis.db import models from django.contrib.gis.tests.utils import mysql, spatialite # MySQL spatial indices can't handle NULL geometries. null_flag = not mysql class Country(models.Model): name = models.CharField(max_length=30) mpoly = models.MultiPolygonField() # SRID, by default, is 4326 ...
1,546
Python
.py
37
37.108108
79
0.720187
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,674
test_regress.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geoapp/test_regress.py
import os, unittest from django.contrib.gis.tests.utils import no_mysql, no_oracle, no_postgis, no_spatialite from django.contrib.gis.shortcuts import render_to_kmz from models import City class GeoRegressionTests(unittest.TestCase): def test01_update(self): "Testing GeoQuerySet.update(), see #10411." ...
1,500
Python
.py
32
38.53125
89
0.630212
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,675
feeds.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geoapp/feeds.py
from django.contrib.gis import feeds from django.contrib.gis.tests.utils import mysql from models import City, Country 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/...
1,856
Python
.py
49
32.591837
71
0.679866
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,676
test_feeds.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geoapp/test_feeds.py
from xml.dom import minidom from django.test import TestCase from models import City class GeoFeedTest(TestCase): urls = 'django.contrib.gis.tests.geoapp.urls' def assertChildNodes(self, elem, expected): "Taken from regressiontests/syndication/tests.py." actual = set([n.nodeName for n i...
3,793
Python
.py
62
50.451613
103
0.646187
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,677
urls.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geoapp/urls.py
from django.conf.urls.defaults import * from feeds import feed_dict urlpatterns = patterns('', (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feed_dict}), ) from sitemaps import sitemaps urlpatterns += patterns('django.contrib.gis.sitemaps.views', (r'^sitemap.xml$', 'index', ...
617
Python
.py
12
47.25
102
0.61194
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,678
test_sitemaps.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geoapp/test_sitemaps.py
import cStringIO from xml.dom import minidom import zipfile from django.test import TestCase from models import City, Country class GeoSitemapTest(TestCase): urls = 'django.contrib.gis.tests.geoapp.urls' def assertChildNodes(self, elem, expected): "Taken from regressiontests/syndication/tests.py." ...
4,025
Python
.py
69
46.246377
113
0.631632
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,679
tests.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geoapp/tests.py
import re from django.db import connection from django.contrib.gis import gdal from django.contrib.gis.geos import fromstr, GEOSGeometry, \ Point, LineString, LinearRing, Polygon, GeometryCollection from django.contrib.gis.measure import Distance from django.contrib.gis.tests.utils import \ no_mysql, no_oracle,...
35,135
Python
.py
631
45.717908
227
0.632182
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,680
sitemaps.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geoapp/sitemaps.py
from django.contrib.gis.sitemaps import GeoRSSSitemap, KMLSitemap, KMZSitemap from models import City, Country from feeds import feed_dict sitemaps = {'kml' : KMLSitemap([City, Country]), 'kmz' : KMZSitemap([City, Country]), 'georss' : GeoRSSSitemap(feed_dict), }
301
Python
.py
7
36.714286
77
0.682594
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,681
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/relatedapp/models.py
from django.contrib.gis.db import models from django.contrib.localflavor.us.models import USStateField class Location(models.Model): point = models.PointField() objects = models.GeoManager() def __unicode__(self): return self.point.wkt class City(models.Model): name = models.CharField(max_length=50) ...
1,686
Python
.py
41
36.878049
71
0.742192
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,682
tests.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/relatedapp/tests.py
from django.test import TestCase 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, oracle, no_mysql, no_oracle, no_spati...
13,948
Python
.py
243
47.995885
155
0.652005
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,683
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geo3d/models.py
from django.contrib.gis.db import models class City3D(models.Model): name = models.CharField(max_length=30) point = models.PointField(dim=3) objects = models.GeoManager() def __unicode__(self): return self.name class Interstate2D(models.Model): name = models.CharField(max_length=30) l...
1,835
Python
.py
52
30.115385
52
0.70876
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,684
tests.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geo3d/tests.py
import os import re from django.utils.unittest import TestCase from django.contrib.gis.db.models import Union, Extent3D from django.contrib.gis.geos import GEOSGeometry, Point, Polygon from django.contrib.gis.utils import LayerMapping, LayerMapError from models import City3D, Interstate2D, Interstate3D, \ Intersta...
11,305
Python
.py
201
46.562189
676
0.644149
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,685
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/management/base.py
from django.core.management.base import BaseCommand, CommandError class ArgsCommand(BaseCommand): """ Command class for commands that take multiple arguments. """ args = '<arg arg ...>' def handle(self, *args, **options): if not args: raise CommandError('Must provide the follow...
484
Python
.py
12
34.083333
86
0.673774
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,686
ogrinspect.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/management/commands/ogrinspect.py
import os, sys from optparse import make_option from django.contrib.gis import gdal from django.contrib.gis.management.base import ArgsCommand, CommandError def layer_option(option, opt, value, parser): """ Callback for `make_option` for the `ogrinspect` `layer_key` keyword option which may be an integer o...
6,252
Python
.py
109
45.330275
128
0.598562
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,687
inspectdb.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/management/commands/inspectdb.py
from optparse import make_option from django.core.management.base import CommandError 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...
1,553
Python
.py
28
45.75
112
0.664694
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,688
error.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/error.py
""" 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...
1,517
Python
.py
38
33.263158
75
0.648538
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,689
feature.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/feature.py
# 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 from django.contrib.gi...
3,998
Python
.py
93
35.333333
88
0.651915
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,690
geometries.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/geometries.py
""" 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...
26,357
Python
.py
625
33.4624
105
0.628025
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,691
geomtype.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/geomtype.py
from django.contrib.gis.gdal.error import OGRException #### OGRGeomType #### class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0 : 'Unknown', 1 : 'Point', 2 ...
2,967
Python
.py
75
29.066667
79
0.562978
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,692
envelope.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/envelope.py
""" 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) ...
7,044
Python
.py
157
33.522293
100
0.560887
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,693
layer.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/layer.py
# 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...
8,489
Python
.py
187
36.631016
105
0.64644
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,694
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/__init__.py
""" 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-...
2,173
Python
.py
43
47.534884
121
0.794048
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,695
libgdal.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/libgdal.py
import os, re, sys from ctypes import c_char_p, CDLL from ctypes.util import find_library from django.contrib.gis.gdal.error import OGRException # Custom library path set? try: from django.conf import settings lib_path = settings.GDAL_LIBRARY_PATH except (AttributeError, EnvironmentError, ImportError): lib...
3,378
Python
.py
88
34.329545
84
0.684017
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,696
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/base.py
from ctypes import c_void_p from types import NoneType from django.contrib.gis.gdal.error import GDALException 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. _ptr ...
1,143
Python
.py
29
32.551724
95
0.648014
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,697
datasource.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/datasource.py
""" 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...
4,734
Python
.py
107
35.64486
92
0.635494
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,698
driver.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/driver.py
# 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 # For more information, see the OGR C API source code: # http://www.gdal.org/ogr/ogr__api_8h.html # # ...
2,411
Python
.py
55
34.309091
98
0.622944
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
3,699
field.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/field.py
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 # For more information, see the OGR C API source code: # http://www.gdal.org/ogr/...
6,059
Python
.py
153
31.437908
101
0.625745
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)