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
2,400
wizard.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/formtools/wizard.py
""" FormWizard class -- implements a multi-page form, validating between each step and storing the form's state as HTML hidden fields so that no state is stored on the server side. """ import cPickle as pickle from django import forms from django.conf import settings from django.contrib.formtools.utils import securit...
12,104
Python
.py
238
40.915966
188
0.632563
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,401
utils.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/formtools/utils.py
try: import cPickle as pickle except ImportError: import pickle from django.conf import settings from django.forms import BooleanField from django.utils.crypto import salted_hmac from django.utils.hashcompat import md5_constructor def security_hash(request, form, *args): """ Calculates a security has...
2,158
Python
.py
53
33.90566
78
0.676569
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,402
preview.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/formtools/preview.py
""" Formtools Preview application. """ import cPickle as pickle from django.conf import settings from django.http import Http404 from django.shortcuts import render_to_response from django.template.context import RequestContext from django.utils.hashcompat import md5_constructor from django.utils.crypto import consta...
6,829
Python
.py
140
39.335714
115
0.631081
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,403
urls.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/formtools/tests/urls.py
""" This is a URLconf to be loaded by tests.py. Add any URLs needed for tests only. """ from django.conf.urls.defaults import * from django.contrib.formtools.tests import * urlpatterns = patterns('', (r'^test1/', TestFormPreview(TestForm)), (r'^test2/', UserSecuredFormPre...
826
Python
.py
15
31.133333
85
0.454883
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,404
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/formtools/tests/__init__.py
import os from django import forms, http from django.conf import settings from django.contrib.formtools import preview, wizard, utils from django.test import TestCase from django.utils import unittest success_string = "Done was called!" class TestFormPreview(preview.FormPreview): def get_context(self, request, ...
15,220
Python
.py
347
34.409222
86
0.623589
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,405
datastructures.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/databrowse/datastructures.py
""" These classes are light wrappers around Django's database API that provide convenience functionality and permalink functions for the databrowse app. """ from django.db import models from django.utils import formats from django.utils.text import capfirst from django.utils.encoding import smart_unicode, smart_str, i...
9,166
Python
.py
182
40.961538
200
0.626969
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,406
urls.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/databrowse/urls.py
from django.conf.urls.defaults import * from django.contrib.databrowse import views # Note: The views in this URLconf all require a 'models' argument, # which is a list of model classes (*not* instances). urlpatterns = patterns('', #(r'^$', views.homepage), #(r'^([^/]+)/([^/]+)/$', views.model_detail), (...
830
Python
.py
15
51.6
91
0.501235
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,407
sites.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/databrowse/sites.py
from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.shortcuts import render_to_response from django.utils.safestring import mark_safe class AlreadyRegistered(Exception): pass class NotRegistered(Exception): pass class DatabrowsePlugi...
5,628
Python
.py
122
37.663934
130
0.654134
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,408
views.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/databrowse/views.py
from django.http import Http404 from django.shortcuts import render_to_response ########### # CHOICES # ########### def choice_list(request, app_label, module_name, field_name, models): m, f = lookup_field(app_label, module_name, field_name, models) return render_to_response('databrowse/choice_list.html', {'m...
810
Python
.py
16
46.6875
129
0.686473
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,409
fieldchoices.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/databrowse/plugins/fieldchoices.py
from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response from django.utils.text import capfirst from django.utils.encoding import smart_str, force_unico...
3,856
Python
.py
64
51.71875
192
0.667636
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,410
calendars.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/databrowse/plugins/calendars.py
from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response from django.utils.text import capfirst from django.utils.encoding import force_unicode from dja...
4,317
Python
.py
76
47.144737
151
0.655401
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,411
objects.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/databrowse/plugins/objects.py
from django import http from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response import urlparse class ObjectDetailPlugin(DatabrowsePlugin): def model_view(self, request, model_databrowse, url): ...
767
Python
.py
13
53.615385
127
0.755644
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,412
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/contenttypes/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode class ContentTypeManager(models.Manager): # Cache to avoid re-looking up ContentType objects all over the place. # This cache is shared by all the get_for_* methods. _cache ...
4,052
Python
.py
91
35.593407
86
0.623765
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,413
management.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/contenttypes/management.py
from django.contrib.contenttypes.models import ContentType from django.db.models import get_apps, get_models, signals from django.utils.encoding import smart_unicode def update_contenttypes(app, created_models, verbosity=2, **kwargs): """ Creates content types for models in the given app, removing any model ...
2,458
Python
.py
52
38.557692
112
0.63553
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,414
generic.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/contenttypes/generic.py
""" Classes allowing "generic" relations through ContentType and object-id fields. """ from django.core.exceptions import ObjectDoesNotExist from django.db import connection from django.db.models import signals from django.db import models, router, DEFAULT_DB_ALIAS from django.db.models.fields.related import RelatedFi...
17,218
Python
.py
364
36.96978
102
0.626832
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,415
tests.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/contenttypes/tests.py
from django import db from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.contenttypes.views import shortcut from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest from django.test...
2,951
Python
.py
63
38.126984
77
0.667594
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,416
views.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/contenttypes/views.py
from django import http from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site, get_current_site from django.core.exceptions import ObjectDoesNotExist def shortcut(request, content_type_id, object_id): "Redirect to an object's page based on a content-type ID and an ...
3,025
Python
.py
62
38.419355
100
0.632363
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,417
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/admindocs/models.py
# Empty models.py to allow for specifying admindocs as a test label.
69
Python
.py
1
68
68
0.794118
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,418
urls.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/admindocs/urls.py
from django.conf.urls.defaults import * from django.contrib.admindocs import views urlpatterns = patterns('', url('^$', views.doc_index, name='django-admindocs-docroot' ), url('^bookmarklets/$', views.bookmarklets, name='django-admindocs-bookmarklets' ), url('^tags/$...
1,089
Python
.py
40
20.8
65
0.582061
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,419
utils.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/admindocs/utils.py
"Misc. utility functions/classes for admin documentation generator." import re from email.Parser import HeaderParser from email.Errors import HeaderParseError from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from django.utils.encoding import smart_str try: import docutils....
3,796
Python
.py
95
34.010526
140
0.66188
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,420
views.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/admindocs/views.py
from django import template, templatetags from django.template import RequestContext from django.conf import settings from django.contrib.admin.views.decorators import staff_member_required from django.db import models from django.shortcuts import render_to_response from django.core.exceptions import ImproperlyConfigur...
15,504
Python
.py
350
35.591429
180
0.612357
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,421
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/admindocs/tests/__init__.py
from django.contrib.admindocs import views from django.db.models import fields as builtin_fields from django.utils import unittest import fields class TestFieldType(unittest.TestCase): def setUp(self): pass def test_field_name(self): self.assertRaises(AttributeError, views.get_re...
911
Python
.py
25
28.32
81
0.668182
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,422
fields.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/admindocs/tests/fields.py
from django.db import models class CustomField(models.Field): description = "A custom field type" class DescriptionLackingField(models.Field): pass
158
Python
.py
5
28.6
44
0.801325
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,423
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/sites/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ SITE_CACHE = {} class SiteManager(models.Manager): def get_current(self): """ Returns the current ``Site`` based on the SITE_ID in the project's settings. The ``Site`` object is cached the first ...
2,867
Python
.py
74
31.135135
203
0.641414
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,424
management.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/sites/management.py
""" Creates the default Site object. """ from django.db.models import signals from django.contrib.sites.models import Site from django.contrib.sites import models as site_app def create_default_site(app, created_models, verbosity, db, **kwargs): if Site in created_models: if verbosity >= 2: pr...
541
Python
.py
14
34.285714
70
0.725191
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,425
tests.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/sites/tests.py
from django.conf import settings from django.contrib.sites.models import Site, RequestSite, get_current_site from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest from django.test import TestCase class SitesFrameworkTests(TestCase): def setUp(self): Site(id=settings.SI...
2,147
Python
.py
47
37.765957
82
0.675753
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,426
admin.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/sites/admin.py
from django.contrib import admin from django.contrib.sites.models import Site class SiteAdmin(admin.ModelAdmin): list_display = ('domain', 'name') search_fields = ('domain', 'name') admin.site.register(Site, SiteAdmin)
229
Python
.py
6
35.5
44
0.760181
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,427
managers.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/sites/managers.py
from django.conf import settings from django.db import models from django.db.models.fields import FieldDoesNotExist class CurrentSiteManager(models.Manager): "Use this to limit objects to those associated with the current site." def __init__(self, field_name=None): super(CurrentSiteManager, self).__ini...
1,985
Python
.py
35
45.142857
126
0.620021
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,428
humanize.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/humanize/templatetags/humanize.py
from django.utils.translation import ungettext, ugettext as _ from django.utils.encoding import force_unicode from django import template from django.template import defaultfilters from datetime import date import re register = template.Library() def ordinal(value): """ Converts an integer to its ordinal as a...
3,396
Python
.py
96
30.135417
119
0.638434
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,429
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/models.py
from django.db import connection if (hasattr(connection.ops, 'spatial_version') and not connection.ops.mysql): # Getting the `SpatialRefSys` and `GeometryColumns` # models for the default spatial backend. These # aliases are provided for backwards-compatibility. SpatialRefSys = connection.ops.spat...
390
Python
.py
8
44.625
55
0.766404
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,430
feeds.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/feeds.py
from django.contrib.syndication.feeds import Feed as BaseFeed, FeedDoesNotExist 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 Geo elements. """ ...
5,925
Python
.py
119
38.159664
102
0.602073
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,431
shortcuts.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/shortcuts.py
import cStringIO, zipfile from django.conf import settings from django.http import HttpResponse from django.template import loader def compress_kml(kml): "Returns compressed KMZ from the given KML string." kmz = cStringIO.StringIO() zf = zipfile.ZipFile(kmz, 'a', zipfile.ZIP_DEFLATED) zf.writestr('doc....
1,161
Python
.py
27
36.740741
79
0.687334
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,432
measure.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/measure.py
# 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, #...
12,282
Python
.py
298
32.516779
92
0.592583
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,433
regex.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geometry/regex.py
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...
657
Python
.py
11
50.272727
130
0.59845
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,434
test_data.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geometry/test_data.py
""" This module has the mock object definitions used to hold reference geometry for the GEOS and GDAL tests. """ import gzip import os from django.contrib import gis from django.utils import simplejson # This global used to store reference geometry data. GEOMETRIES = None # Path where reference test data is located...
2,994
Python
.py
82
29.573171
78
0.633783
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,435
geos.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geometry/backend/geos.py
from django.contrib.gis.geos import \ GEOSGeometry as Geometry, \ GEOSException as GeometryException
109
Python
.py
3
32.666667
38
0.792453
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,436
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geometry/backend/__init__.py
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, e: ...
794
Python
.py
18
37.055556
87
0.701164
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,437
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/maps/google/__init__.py
""" 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="...
2,648
Python
.py
49
48.571429
126
0.689922
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,438
gmap.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/maps/google/gmap.py
from django.conf import settings from django.contrib.gis import geos from django.template.loader import render_to_string from django.utils.safestring import mark_safe class GoogleMapException(Exception): pass from django.contrib.gis.maps.google.overlays import GPolygon, GPolyline, GMarker, GIcon # The default Google ...
9,000
Python
.py
193
36.492228
129
0.605767
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,439
zoom.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/maps/google/zoom.py
from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point from django.contrib.gis.maps.google.gmap import GoogleMapException from math import pi, sin, cos, log, exp, atan # Constants used for degree to radian conversion, and vice-versa. DTOR = pi / 180. RTOD = 180. / pi class GoogleZoom(object): ...
6,628
Python
.py
129
42.054264
110
0.630776
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,440
overlays.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/maps/google/overlays.py
from django.utils.safestring import mark_safe from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon class GEvent(object): """ A Python wrapper for the Google GEvent object. Events can be attached to any object derived from GOverlayBase with the add_event() call. For ...
11,486
Python
.py
240
38.479167
119
0.641356
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,441
error.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/error.py
""" 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...
812
Python
.py
18
41.166667
80
0.751263
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,442
coordseq.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/coordseq.py
""" 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...
5,396
Python
.py
132
32.94697
97
0.62958
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,443
io.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/io.py
""" 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...
746
Python
.py
16
42.875
94
0.767218
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,444
factory.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/factory.py
from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex 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 a real handle. if isinstance(file_h, basestring): file_h = ...
743
Python
.py
19
33.842105
79
0.680556
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,445
libgeos.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/libgeos.py
""" 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 os, re, sys from ctypes import c_char_p, Structur...
5,541
Python
.py
125
40.952
163
0.723889
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,446
polygon.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/polygon.py
from ctypes import c_uint, byref from django.contrib.gis.geos.error import GEOSIndexError 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 prototyp...
6,506
Python
.py
139
37.52518
134
0.619243
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,447
collections.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/collections.py
""" 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, GEOSIndexError from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gi...
4,663
Python
.py
101
38.792079
113
0.685242
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,448
linestring.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/linestring.py
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...
5,568
Python
.py
127
35
91
0.620753
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,449
prepared.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/prepared.py
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...
1,009
Python
.py
23
38.043478
67
0.722165
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,450
geometry.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/geometry.py
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ # Python, ctypes and types dependencies. import re import warnings from ctypes import addressof, byref, c_double, c_size_t # super-class for mutable list behavior from django.contrib.gis.geos.mutable_list imp...
24,281
Python
.py
592
32.33277
109
0.630356
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,451
point.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/point.py
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 class Point(GEOSGeometry): _minlength = 2 _maxlength = 3 def __init__(self, x, y=None, z=None, srid=None): ...
4,253
Python
.py
111
29.351351
87
0.582322
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,452
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/__init__.py
""" 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...
802
Python
.py
14
56.071429
109
0.84264
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,453
mutable_list.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/mutable_list.py
# 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. """ class ListMixin(obj...
10,386
Python
.py
251
31.414343
92
0.585988
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,454
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/base.py
from ctypes import c_void_p from types import NoneType from django.contrib.gis.geos.error import GEOSException, GEOSIndexError # 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 ImportErro...
1,698
Python
.py
45
32.222222
96
0.688335
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,455
test_io.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/tests/test_io.py
import binascii, ctypes, unittest from django.contrib.gis.geos import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter, geos_version_info class GEOSIOTest(unittest.TestCase): def test01_wktreader(self): # Creating a WKTReader instance wkt_r = WKTReader() wkt = 'POINT (5 23)' ...
4,159
Python
.py
87
38.333333
111
0.641453
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,456
test_mutable_list.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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. from django.contrib.gis.geos.mutable_list import ListMixin from django.utils import unittest class UserListA(ListMi...
14,587
Python
.py
332
32.493976
93
0.508528
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,457
test_geos.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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.geos.libgeos import GEOS_PREPARE from django.contrib.gis.geometry.test_data import TestDataMixin class GEOSTest(unittest.TestCase, TestDataMixin): @prop...
43,191
Python
.py
889
37.109111
121
0.592581
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,458
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/django/contrib/gis/geos/tests/__init__.py
""" GEOS Testing module. """ from django.utils.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 sui...
551
Python
.py
21
22.761905
64
0.680608
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,459
test_geos_mutation.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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 django.utils.copycompat as copy from django.contrib.gis.geos import * from django.contrib.gis.geos.error import GEOSIndexError from djang...
5,464
Python
.py
112
38.8125
104
0.568613
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,460
coordseq.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,461
io.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,462
errcheck.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,463
predicates.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,464
threadsafe.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,465
prepared.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,466
geom.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,467
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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,319
Python
.py
25
49.84
92
0.766486
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,468
misc.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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, GEOS_PREPARE from django.contrib.gis.geos.prototypes.errcheck import check_dbl, check_string f...
1,438
Python
.py
34
39.323529
79
0.745533
gabrielfalcao/lettuce
1,274
325
102
GPL-3.0
9/5/2024, 5:08:58 PM (Europe/Amsterdam)
2,469
topology.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,470
proxy.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,471
manager.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,472
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,473
aggregates.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,474
query.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,475
fields.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,476
compiler.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,477
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,478
aggregates.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,479
query.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,480
conversion.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,481
where.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,482
__init__.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,483
util.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,484
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,485
adapter.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,486
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,487
creation.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,488
introspection.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,489
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,490
operations.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,491
adapter.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,492
creation.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,493
introspection.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,494
base.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,495
operations.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,496
models.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,497
compiler.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,498
creation.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)
2,499
introspection.py
gabrielfalcao_lettuce/tests/integration/lib/Django-1.3/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)