<commit_before>from django.contrib.auth.models import User
from django.contrib.sitemaps import Sitemap
from django.urls import reverse
from django.utils import timezone

from judge.models import Problem, Organization, Contest, BlogPost, Solution


class ProblemSitemap(Sitemap):
    changefreq = 'daily'
    priority = 0.8

    def items(self):
        return Problem.objects.filter(is_public=True).values_list('code')

    def location(self, obj):
        return reverse('problem_detail', args=obj)


class UserSitemap(Sitemap):
    changefreq = 'hourly'
    priority = 0.5

    def items(self):
        return User.objects.values_list('username')

    def location(self, obj):
        return reverse('user_page', args=obj)


class ContestSitemap(Sitemap):
    changefreq = 'hourly'
    priority = 0.5

    def items(self):
        return Contest.objects.filter(is_public=True, is_private=False).values_list('key')

    def location(self, obj):
        return reverse('contest_view', args=obj)
<commit_msg>Remove organization private problems from sitemap<commit_after>from django.contrib.auth.models import User
from django.contrib.sitemaps import Sitemap
from django.urls import reverse
from django.utils import timezone

from judge.models import Problem, Organization, Contest, BlogPost, Solution


class ProblemSitemap(Sitemap):
    changefreq = 'daily'
    priority = 0.8

    def items(self):
        return Problem.objects.filter(is_public=True, is_organization_private=False).values_list('code')

    def location(self, obj):
        return reverse('problem_detail', args=obj)


class UserSitemap(Sitemap):
    changefreq = 'hourly'
    priority = 0.5

    def items(self):
        return User.objects.values_list('username')

    def location(self, obj):
        return reverse('user_page', args=obj)


class ContestSitemap(Sitemap):
    changefreq = 'hourly'
    priority = 0.5

    def items(self):
        return Contest.objects.filter(is_public=True, is_private=False).values_list('key')

    def location(self, obj):
        return reverse('contest_view', args=obj)

{'fraction_non_alphanumeric': 0.10283517539644402, 'fraction_numerical': 0.005766458433445459, 'mean_word_length': 3.9453681710213777, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1950666', 'n_tokens_mistral': 643, 'n_tokens_neox': 609, 'n_words': 152}