<commit_before>#!/usr/bin/env python


import httplib
import os
import socket
import sys


class Uhttplib(httplib.HTTPConnection):
    """Subclass of Python library HTTPConnection that
    uses a unix-domain socket.
    """

    def __init__(self, path):
        httplib.HTTPConnection.__init__(self, 'localhost')
        self.path = path

    def connect(self):
        sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        sock.connect(self.path)
        self.sock = sock

    pass


def test():
    print "hello"
    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    server_address = '/var/run/docker.sock'
    sock.connect(server_address)
    pass


def test2():
    server_address = '/var/run/docker.sock'
    conn = Uhttplib(server_address)
    conn.connect()

    conn.request("GET", "/version")
    conn.request("GET", "/images/json")<commit_msg>test ...<commit_after>#!/usr/bin/env python


import httplib
import os
import socket
import sys


class Uhttplib(httplib.HTTPConnection):
    """Subclass of Python library HTTPConnection that
    uses a unix-domain socket.
    """

    def __init__(self, path):
        httplib.HTTPConnection.__init__(self, 'localhost')
        self.path = path

    def connect(self):
        sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        sock.connect(self.path)
        self.sock = sock

    pass


def test():
    print "hello"
    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    server_address = '/var/run/docker.sock'
    sock.connect(server_address)
    pass


def test2():
    server_address = '/var/run/docker.sock'
    conn = Uhttplib(server_address)
    conn.connect()

    ###conn.request("GET", "/version")
    conn.request("GET", "/images/json")
{'fraction_non_alphanumeric': 0.12457142857142857, 'fraction_numerical': 0.001142857142857143, 'mean_word_length': 3.0068649885583523, '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': '428178', 'n_tokens_mistral': 579, 'n_tokens_neox': 552, 'n_words': 120}