<commit_before>from datafilters.filterform import FilterForm
from datafilters.specs import (GenericSpec, DateFieldFilterSpec,
    GreaterThanFilterSpec, ContainsFilterSpec,
    GreaterThanZeroFilterSpec)


class PollsFilterForm(FilterForm):
    has_exact_votes = GenericSpec('choice__votes')
    has_choice_with_votes = GreaterThanZeroFilterSpec('choice__votes')
    pub_date = DateFieldFilterSpec('pub_date', label='Date of publishing')
    has_major_choice = GreaterThanFilterSpec('choice__votes', value=50)
    question_contains = ContainsFilterSpec('question')
    choice_contains = ContainsFilterSpec('choice__choice_text')<commit_msg>Use FilterSpec instead of GenericSpec in sample_proj<commit_after>from datafilters.filterform import FilterForm
from datafilters.filterspec import FilterSpec
from datafilters.specs import (DateFieldFilterSpec,
    GreaterThanFilterSpec, ContainsFilterSpec,
    GreaterThanZeroFilterSpec)


class PollsFilterForm(FilterForm):
    has_exact_votes = FilterSpec('choice__votes')
    has_choice_with_votes = GreaterThanZeroFilterSpec('choice__votes')
    pub_date = DateFieldFilterSpec('pub_date', label='Date of publishing')
    has_major_choice = GreaterThanFilterSpec('choice__votes', value=50)
    question_contains = ContainsFilterSpec('question')
    choice_contains = ContainsFilterSpec('choice__choice_text')
{'fraction_non_alphanumeric': 0.07401924500370097, 'fraction_numerical': 0.0029607698001480384, 'mean_word_length': 7.836601307189542, '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': '7193517', 'n_tokens_mistral': 387, 'n_tokens_neox': 375, 'n_words': 68}