<commit_before>from extractor import Node
from decoder import Decoder
from feature import Feature
from util import chunked
import requests
from urlparse import urlparse
import os
import struct


class ByteStream(Node):
    def __init__(self, chunksize=4096, needs=None):
        super(ByteStream, self).__init__(needs=needs)
        self._chunksize = chunksize

    def _handle_simple_get(self, data):
        parsed = urlparse(data)
        print parsed
        if parsed.scheme and parsed.netloc:
            resp = requests.get(data, stream=True)
            print resp
            resp.raise_for_status()
            content_length = int(resp.headers['Content-Length'])
            for chunk in chunked(resp.raw, chunksize=self._chunksize):<commit_msg>Ugh.  Get rid of print statements<commit_after>from extractor import Node
from decoder import Decoder
from feature import Feature
from util import chunked
import requests
from urlparse import urlparse
import os
import struct


class ByteStream(Node):
    def __init__(self, chunksize=4096, needs=None):
        super(ByteStream, self).__init__(needs=needs)
        self._chunksize = chunksize

    def _handle_simple_get(self, data):
        parsed = urlparse(data)
        if parsed.scheme and parsed.netloc:
            resp = requests.get(data, stream=True)
            resp.raise_for_status()
            content_length = int(resp.headers['Content-Length'])
            for chunk in chunked(resp.raw, chunksize=self._chunksize):
{'fraction_non_alphanumeric': 0.07728494623655914, 'fraction_numerical': 0.005376344086021506, 'mean_word_length': 3.2301136363636362, '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': '2195163', 'n_tokens_mistral': 415, 'n_tokens_neox': 406, 'n_words': 120}