<commit_before>import feedparser
from datetime import datetime
import time
import socket
from threading import Thread
import json
import os

from cl_email import CL_Email
from cl_post import CL_Post
from log import Logging


def CheckNotityInterval(notification_intervals):
    for notify_time, notify_sent_flag in notification_intervals.items():
        if notify_sent_flag:
            if UnixTime(notify_time) <= int(time.time()):
                notification_intervals[notify_time] = not notify_sent_flag
                return True
    return False

def NewPost(post, data_config, cl_listings):
    timestamp = UnixTime(post['published'])

    for stored_post in cl_listings:
        if post['id'] == stored_post.id:
            Log.log('Duplicate ' + data_config['title'])
            return False

    notify_pair = [(k, v) for k, v in data_config['notification_intervals'].items()]
    notify_pair = sorted(notify_pair, key=lambda x: (UnixTime(x[0])))

    first_notify = notify_pair[0]
    last_notify = notify_pair[len(notify_pair) - 1]
<commit_msg>fixed json key error in NewPost()<commit_after>import feedparser
from datetime import datetime
import time
import socket
from threading import Thread
import json
import os

from cl_email import CL_Email
from cl_post import CL_Post
from log import Logging


def CheckNotityInterval(notification_intervals):
    for notify_time, notify_sent_flag in notification_intervals.items():
        if notify_sent_flag:
            if UnixTime(notify_time) <= int(time.time()):
                notification_intervals[notify_time] = not notify_sent_flag
                return True
    return False

def NewPost(post, data_config, cl_listings):
    timestamp = UnixTime(post['published'])

    for stored_post in cl_listings:
        if post['id'] == stored_post.id:
            Log.log('Duplicate ' + post['title'])
            return False

    notify_pair = [(k, v) for k, v in data_config['notification_intervals'].items()]
    notify_pair = sorted(notify_pair, key=lambda x: (UnixTime(x[0])))

    first_notify = notify_pair[0]
    last_notify = notify_pair[len(notify_pair) - 1]

{'fraction_non_alphanumeric': 0.08634443923040826, 'fraction_numerical': 0.0028155795401220087, 'mean_word_length': 3.696035242290749, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1925794', 'n_tokens_mistral': 636, 'n_tokens_neox': 617, 'n_words': 173}