<commit_before>
from django.views.generic import TemplateView
from BeautifulSoup import BeautifulSoup
import re
import urllib
import time

ci_url = "http://ci.apps-system.com/"
base_url = "%s/job" % ci_url

builds = [
    'django-admin-ext',
    'django-dynamic-rules',
    'django-dynamic-validation',
    'django-forms-ext',
    'django-dynamic-manipulation',
    'django-wizard',
    'django-pretty-times',
    'django-response-helpers',
    'django-attachments',
]

class Status(TemplateView):
    template_name = 'dashboard/status.html'

    def get_context_data(self, **kwargs):
        f = urllib.urlopen(ci_url)
        data = f.read()
        f.close()
        page = BeautifulSoup(data)

        status_table = page.findAll(**{'id': 'projectstatus'})[0]
        statuses = []
        for cell in status_table.findAll('tr')[1:]:
            status_icon = cell.find('img', **{'class': 'icon32x32'})
            if status_icon:
                statuses.append(dict(status_icon.attrs)['alt'])

        ss = [s not in ('Success', 'Disabled', 'In progress') for s in statuses]
        fail = any(ss)
        if fail:
            for i in range(20):
                print "\a"
                time.sleep(.2)

        return {'success': not fail}

class Index(TemplateView):
    template_name = 'dashboard/index.html'
    current_build = -1
<commit_msg>added pending status as passing build<commit_after>
from django.views.generic import TemplateView
from BeautifulSoup import BeautifulSoup
import re
import urllib
import time

ci_url = "http://ci.apps-system.com/"
base_url = "%s/job" % ci_url

builds = [
    'django-admin-ext',
    'django-dynamic-rules',
    'django-dynamic-validation',
    'django-forms-ext',
    'django-dynamic-manipulation',
    'django-wizard',
    'django-pretty-times',
    'django-response-helpers',
    'django-attachments',
]

class Status(TemplateView):
    template_name = 'dashboard/status.html'

    def get_context_data(self, **kwargs):
        f = urllib.urlopen(ci_url)
        data = f.read()
        f.close()
        page = BeautifulSoup(data)

        status_table = page.findAll(**{'id': 'projectstatus'})[0]
        statuses = []
        for cell in status_table.findAll('tr')[1:]:
            status_icon = cell.find('img', **{'class': 'icon32x32'})
            if status_icon:
                statuses.append(dict(status_icon.attrs)['alt'])

        ss = [s not in ('Success', 'Disabled', 'In progress', 'Pending') for s in statuses]
        fail = any(ss)
        if fail:
            for i in range(20):
                print "\a"
                time.sleep(.2)

        return {'success': not fail}

class Index(TemplateView):
    template_name = 'dashboard/index.html'
    current_build = -1

{'fraction_non_alphanumeric': 0.14025500910746813, 'fraction_numerical': 0.007285974499089253, 'mean_word_length': 2.5523932729624836, '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': '2531703', 'n_tokens_mistral': 885, 'n_tokens_neox': 865, 'n_words': 190}