<commit_before>"""
    A less-sucky HTTP client.

    $Id: nonsuckhttp.py 453 2004-09-20 07:14:54Z anthony $
"""


#import tphttp as http
from twisted.protocols import http, basic
from twisted.internet import defer, protocol
from twisted.python import log
from urllib2 import Request as URLRequest



class HTTPError(Exception):
    def __init__(self, code, response):
        self.code = code
        self.url = response.geturl()
        self.args = (self.code,self.url)
        self.response = response

    def __repr__(self):
        return '<HTTP Error %d from %s>'%(self.code, self.url)

class Response:
    def __init__(self, url):<commit_msg>no i dont need this<commit_after>"""
    A less-sucky HTTP client.

    $Id: nonsuckhttp.py 453 2004-09-20 07:14:54Z anthony $
"""


#import tphttp as http
from twisted.protocols import basic
from twisted.internet import defer, protocol
from twisted.python import log
from urllib2 import Request as URLRequest



class HTTPError(Exception):
    def __init__(self, code, response):
        self.code = code
        self.url = response.geturl()
        self.args = (self.code,self.url)
        self.response = response

    def __repr__(self):
        return '<HTTP Error %d from %s>'%(self.code, self.url)

class Response:
    def __init__(self, url):
{'fraction_non_alphanumeric': 0.10538461538461538, 'fraction_numerical': 0.027692307692307693, 'mean_word_length': 3.196774193548387, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2186972', 'n_tokens_mistral': 437, 'n_tokens_neox': 402, 'n_words': 128}