<commit_before>from __future__ import unicode_literals

from django.core.management.base import BaseCommand
from django.db import connection, transaction

from geotrek.core.models import Path


class Command(BaseCommand):
    help = """Remove all duplicate path (same geom)."""
    """Do not remove path with topology."""

    def handle(self, *args, **options):
        verbosity = options['verbosity']
        cursor = connection.cursor()
        query = """with relations as (SELECT t1.id as t1_id,
                                             t2.id as t2_id
                                      FROM l_t_troncon t1
                                      JOIN l_t_troncon t2 ON t1.id < t2.id AND ST_EQUALS(t1.geom, t2.geom)<commit_msg>use ordering equals instead of equals<commit_after>from __future__ import unicode_literals

from django.core.management.base import BaseCommand
from django.db import connection, transaction

from geotrek.core.models import Path


class Command(BaseCommand):
    help = """Remove all duplicate path (same geom)."""
    """Do not remove path with topology."""

    def handle(self, *args, **options):
        verbosity = options['verbosity']
        cursor = connection.cursor()
        query = """with relations as (SELECT t1.id as t1_id,
                                             t2.id as t2_id
                                      FROM l_t_troncon t1
                                      JOIN l_t_troncon t2 ON t1.id < t2.id AND ST_ORDERINGEQUALS(t1.geom, t2.geom)
{'fraction_non_alphanumeric': 0.08355437665782493, 'fraction_numerical': 0.013262599469496022, 'mean_word_length': 2.054655870445344, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2401190', 'n_tokens_mistral': 420, 'n_tokens_neox': 402, 'n_words': 130}