<commit_before># encoding: utf-8

""" notifo.py - python wrapper for notifo.com """

import json
import urllib
import urllib2

class Notifo:
    """ Class for wrapping notifo.com """
    def __init__(self, user, api_secret):
        self.user = user
        self.api_secret = api_secret
        self.root_url = "https://api.notifo.com/v1/"
        # status codes (Request successful)
        self.status_codes = {
                                2201 : "OK.",
                                2202 : "User is already subscribed."
                            }
        # error codes (Something went wrong)
        self.error_codes = {
                                1100 : "An error occurred.",
                                1101 : "Invalid credentials.",
                                1102 : "Not allowed to sent to user.",
                                1105 : "No such user.",
                                1106 : "Not allowed to subscribe user.",
                                1107 : "Missing required parameters.",
                           }

    def subsribe_user(self, user):
        """ method to subscribe a user to a service
        """
        pass

    def send_notification(self):
        """ method to send a message to a user
        """
        pass


def _query(self, url, data = None):
        """ query method to do HTTP POST/GET

            Parameters:
                url -> the url to POST/GET
                data -> header_data as a dict (only for POST)

            Returns:
                Parsed JSON data as dict
                or
                None on error
        """<commit_msg>we don't need to save status codes as they come with the response<commit_after># encoding: utf-8

""" notifo.py - python wrapper for notifo.com """

import json
import urllib
import urllib2

class Notifo:
    """ Class for wrapping notifo.com """
    def __init__(self, user, api_secret):
        self.user = user
        self.api_secret = api_secret
        self.root_url = "https://api.notifo.com/v1/"

    def subsribe_user(self, user):
        """ method to subscribe a user to a service
        """
        pass

    def send_notification(self):
        """ method to send a message to a user
        """
        pass


def _query(self, url, data = None):
        """ query method to do HTTP POST/GET

            Parameters:
                url -> the url to POST/GET
                data -> header_data as a dict (only for POST)

            Returns:
                Parsed JSON data as dict
                or
                None on error
        """
{'fraction_non_alphanumeric': 0.0859465737514518, 'fraction_numerical': 0.014711575687185443, 'mean_word_length': 1.3363471971066907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2527817', 'n_tokens_mistral': 703, 'n_tokens_neox': 652, 'n_words': 234}