<commit_before>#!/usr/bin/python
import os, re

port = os.environ["DISCO_PORT"]
print "proxy.server = ("
for x in re.finditer("(\d+\.\d+\.\d+\.\d+)\s+(.*)", file("/etc/hosts").read()):
        ip, host = x.groups()
        print '"/disco/node/%s/" => (("host" => "%s", "port" => %s)),' %\
                (host, ip, port)
print ")"<commit_msg>bugfix: make-lighttpd-proxyconf.py should ignore commented out lines in /etc/hosts. Closes #14 Thanks jsurratt for the patch!<commit_after>#!/usr/bin/python
import os, re

port = os.environ["DISCO_PORT"]
r = re.compile("^(\d+\.\d+\.\d+\.\d+)\s+(.*)", re.MULTILINE)
print "proxy.server = ("
for x in re.finditer(r, file("/etc/hosts").read()):
        ip, host = x.groups()
        print '"/disco/node/%s/" => (("host" => "%s", "port" => %s)),' %\
                (host, ip, port)
print ")"
{'fraction_non_alphanumeric': 0.26233453670276774, 'fraction_numerical': 0.0024067388688327317, 'mean_word_length': 2.8518518518518516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3608236', 'n_tokens_mistral': 324, 'n_tokens_neox': 316, 'n_words': 70}