<commit_before># -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone

from opps.containers.models import Container


def InfoDisct(googlenews=False):
    article = Container.objects.filter(date_available__lte=timezone.now(),
                                       published=True)
    if googlenews:
        article = article[:1000]
    return {
        'queryset': article,
        'date_field': 'date_available',
    }


class BaseSitemap(DjangoSitemap):
    priority = 0.6

    def items(self):
        return Container.objects.filter(date_available__lte=timezone.now(),
                                        published=True)

    def lastmod(self, obj):
        return obj.date_available


class GenericSitemap(DjangoGenericSitemap):
    limit = 1000
    priority = 0.6<commit_msg>change var name article to container (opps 0.2) in sitemap generator class<commit_after># -*- coding: utf-8 -*-
from django.contrib.sitemaps import GenericSitemap as DjangoGenericSitemap
from django.contrib.sitemaps import Sitemap as DjangoSitemap
from django.utils import timezone

from opps.containers.models import Container


def InfoDisct(googlenews=False):
    container = Container.objects.filter(date_available__lte=timezone.now(),
                                         published=True)
    if googlenews:
        container = container[:1000]
    return {
        'queryset': container,
        'date_field': 'date_available',
    }


class BaseSitemap(DjangoSitemap):
    priority = 0.6

    def items(self):
        return Container.objects.filter(date_available__lte=timezone.now(),
                                        published=True)

    def lastmod(self, obj):
        return obj.date_available


class GenericSitemap(DjangoGenericSitemap):
    limit = 1000
    priority = 0.6
{'fraction_non_alphanumeric': 0.08485163977095263, 'fraction_numerical': 0.014575741801145237, 'mean_word_length': 2.732038834951456, 'pattern_counts': {'":': 0, '<': 3, '<?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': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4791311', 'n_tokens_mistral': 567, 'n_tokens_neox': 534, 'n_words': 124}