<commit_before>import sys

from urlparse import urlparse
from httplib import HTTPConnection
from StringIO import StringIO

import PIL.Image
import TileStache

class ArcRest:

    def __init__(self, layer, url, layers):
        self.url = url
        self.layers = layers

    def renderArea(self, width, height, srs, xmin, ymin, xmax, ymax, zoom):
        s, host, path, p, query, f = urlparse(self.url)

        conn = HTTPConnection(host, 80)
        conn.request('GET', path+"?bbox=%f,%f,%f,%f&bboxSR=102113&layers=%s&size=%d,%d&imageSR=102113&format=png24&transparent=true&f=image" % (self.layers, xmin, ymin, xmax, ymax, height, width))

        body = conn.getresponse().read()
        tile = PIL.Image.open(StringIO(body)).convert('RGBA')

        return tile
<commit_msg>Correcting the order of URL args.<commit_after>import sys

from urlparse import urlparse
from httplib import HTTPConnection
from StringIO import StringIO

import PIL.Image
import TileStache

class ArcRest:

    def __init__(self, layer, url, layers):
        self.url = url
        self.layers = layers

    def renderArea(self, width, height, srs, xmin, ymin, xmax, ymax, zoom):
        s, host, path, p, query, f = urlparse(self.url)

        conn = HTTPConnection(host, 80)
        conn.request('GET', path+"?bbox=%f,%f,%f,%f&bboxSR=102113&layers=%s&size=%d,%d&imageSR=102113&format=png24&transparent=true&f=image" % (xmin, ymin, xmax, ymax, self.layers, height, width))

        body = conn.getresponse().read()
        tile = PIL.Image.open(StringIO(body)).convert('RGBA')

        return tile

{'fraction_non_alphanumeric': 0.13244613434727504, 'fraction_numerical': 0.020278833967046894, 'mean_word_length': 3.770392749244713, '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': '5987005', 'n_tokens_mistral': 566, 'n_tokens_neox': 524, 'n_words': 133}