<commit_before>#
# Copyright (c) 2005-2006 rPath, Inc.
# All Rights Reserved
#

import os

global _reportlab_present
try:
    from reportlab.pdfgen import canvas
    from reportlab.platypus import *
    from reportlab.lib.styles import PropertySet, getSampleStyleSheet, ParagraphStyle
    from reportlab.test.utils import outputfile
    from reportlab.lib import colors
    _reportlab_present = True
except ImportError:
    _reportlab_present = False

import conary
from conary.lib.util import mkstemp, rmtree
import time

class MintReport(object):
    title = "Report Title"
    headers = ()

    def __init__(self, db):
        self.db = db
        self.available = _reportlab_present

    def getData(self, *args, **kwargs):
        raise NotImplementedError

    def getReport(self, *args, **kwargs):
        if not self.available:
            raise NotImplementedError
        res = {}
        res['title'] = self.title
        res['headers'] = self.headers
        res['data'] = self.getData(*args, **kwargs)
        res['time'] = time.time()
        return res

    def getPdf(self, *args, **kwargs):
        if not self.available:
            raise NotImplementedError
        data = [self.headers] + self.getData(*args, **kwargs)

        t = Table(data, repeatRows = True)<commit_msg>add a rough list of rPath employee IDs<commit_after>#
# Copyright (c) 2005-2006 rPath, Inc.
# All Rights Reserved
#

import os

global _reportlab_present
try:
    from reportlab.pdfgen import canvas
    from reportlab.platypus import *
    from reportlab.lib.styles import PropertySet, getSampleStyleSheet, ParagraphStyle
    from reportlab.test.utils import outputfile
    from reportlab.lib import colors
    _reportlab_present = True
except ImportError:
    _reportlab_present = False

import conary
from conary.lib.util import mkstemp, rmtree
import time

class MintReport(object):
    title = "Report Title"
    headers = ()

    employeeIds = (1445, 1, 2, 3, 4, 6, 10, 12, 13, 14, 20, 27, 28,
        29, 31, 32, 34, 37, 38, 43, 44, 47, 50, 51, 57, 1423, 1181,
        1832, 74, 2025, 1657, 91, 221, 311, 1231)

    def __init__(self, db):
        self.db = db
        self.available = _reportlab_present

    def getData(self, *args, **kwargs):
        raise NotImplementedError

    def getReport(self, *args, **kwargs):
        if not self.available:
            raise NotImplementedError
        res = {}
        res['title'] = self.title
        res['headers'] = self.headers
        res['data'] = self.getData(*args, **kwargs)
        res['time'] = time.time()
        return res

    def getPdf(self, *args, **kwargs):
        if not self.available:
            raise NotImplementedError
        data = [self.headers] + self.getData(*args, **kwargs)

        t = Table(data, repeatRows = True)
{'fraction_non_alphanumeric': 0.10321428571428572, 'fraction_numerical': 0.03464285714285714, 'mean_word_length': 2.785135135135135, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5595012', 'n_tokens_mistral': 941, 'n_tokens_neox': 844, 'n_words': 256}