<commit_before>import urllib.request
import xml.etree.ElementTree as ET

class HudsonChecker:
    def __init__(self, url):
        sock = urllib.request.urlopen(url)
        xmlstring = sock.read();
        self.root = ET.fromstring(xmlstring)
        #if root.tag != "hudson": #error

    def jobStats(self):
        numPassed = 0;
        numTested = 0;
        for elem in list(self.root):
            if elem.tag == "job":
                color = elem.find('color')
                if "anime" in color.text:
                    continue
                if color != None and color.text == "green":
                    numPassed += 1
                numTested += 1
        return (numPassed, numTested)

if __name__ == "__main__":
    checker=HudsonChecker("http://ics-web4.sns.ornl.gov:8185/api/xml")
    stats = checker.jobStats()
    print("Green jobs: %d/%d" % stats)
        <commit_msg>Hudson: Ignore tests<commit_after>import urllib.request
import xml.etree.ElementTree as ET

class HudsonChecker:
    def __init__(self, url):
        sock = urllib.request.urlopen(url)
        xmlstring = sock.read();
        self.root = ET.fromstring(xmlstring)
        #if root.tag != "hudson": #error

    def jobStats(self):
        numPassed = 0;
        numTested = 0;
        for elem in list(self.root):
            if elem.tag == "job":
                name = elem.find('name')
                color = elem.find('color')
                if color is None:
                    continue
                if "anime" in color.text:
                    continue
                if color.text in ( "green", "yellow" ):
                    numPassed += 1
                else:
                    print("Hundson: %s is %s" % (name.text, color.text))
                numTested += 1
        return (numPassed, numTested)

if __name__ == "__main__":
    checker=HudsonChecker("http://ics-web4.sns.ornl.gov:8185/api/xml")
    stats = checker.jobStats()
    print("Green jobs: %d/%d" % stats)
        
{'fraction_non_alphanumeric': 0.12110552763819095, 'fraction_numerical': 0.009045226130653266, 'mean_word_length': 1.7014925373134329, 'pattern_counts': {'":': 7, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '3589304', 'n_tokens_mistral': 636, 'n_tokens_neox': 604, 'n_words': 143}