<commit_before># -*- coding: utf-8 -*-

import feedparser
import tweepy
import time
from datetime import datetime
import random
from threading import Timer

from flask import current_app, flash
from flask.ext.login import current_user

from . import db
from . import infos_tweet
from .models import Feed, Article


# ---------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------
# THREADING TEST
# ---------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------

class RepeatedTimer(object):
    def __init__(self, interval, function, *args, **kwargs):<commit_msg>Comment Class feed (RepeatedTimer)<commit_after># -*- coding: utf-8 -*-

import feedparser
import tweepy
import time
from datetime import datetime
import random
from threading import Timer

from flask import current_app, flash
from flask.ext.login import current_user

from . import db
from . import infos_tweet
from .models import Feed, Article


# ---------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------
# THREADING TEST
# ---------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------

class RepeatedTimer(object):
    """
    Run function (arg or not) every interval seconds
    http://stackoverflow.com/questions/3393612/
    run-certain-code-every-n-seconds
    """

    def __init__(self, interval, function, *args, **kwargs):
{'fraction_non_alphanumeric': 0.43356643356643354, 'fraction_numerical': 0.005244755244755245, 'mean_word_length': 1.0011655011655012, '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': '4076176', 'n_tokens_mistral': 337, 'n_tokens_neox': 318, 'n_words': 110}