<commit_before>import requests

class PushClient:
    def __init__(self, app):
        self.app = app

    def handle_new_or_edit(self, post):
        data = { 'hub.mode' : 'publish', 
                 'hub.url' : 'http://kylewm.com/all.atom' }
        response = requests.post('https://pubsubhubbub.appspot.com/', data)
        if response.status_code == 204:
            self.app.logger.info('successfully sent PuSH notification')
<commit_msg>Send the all.atom feed and the articles/notes feeds to PuSH<commit_after>import requests

class PushClient:
    def __init__(self, app):
        self.app = app

    def publish(self, url):
        data = { 'hub.mode' : 'publish', 'hub.url' : url }
        response = requests.post('https://pubsubhubbub.appspot.com/', data)
        if response.status_code == 204:
            self.app.logger.info('successfully sent PuSH notification')
        else:
            self.app.logger.warn('unexpected response from PuSH hub %s', response)
        
    def handle_new_or_edit(self, post):
        self.publish('http://kylewm.com/all.atom')
        if post.post_type=='article':
            self.publish('http://kylewm.com/articles.atom')
        elif post.post_type=='note':
            self.publish('http://kylewm.com/notes.atom')
            

{'fraction_non_alphanumeric': 0.1348402182385035, 'fraction_numerical': 0.004676539360872954, 'mean_word_length': 2.4331550802139037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5124700', 'n_tokens_mistral': 405, 'n_tokens_neox': 389, 'n_words': 81}