Ejemplo n.º 1
0
 def test_dame_utils_delete_duplicated_method_returns_correct_result(self):
     du = DameUtils()
     self.assertEqual(du.delete_duplicated([1, 2, 2, 1, 3]), [1, 2, 3])
Ejemplo n.º 2
0
from app.dame_sexmachine import DameSexmachine
from app.dame_perceval import DamePerceval
from app.dame_utils import DameUtils
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("url", help="Uniform Resource Link")
parser.add_argument('--directory')
parser.add_argument('--version', action='version', version='0.1')
args = parser.parse_args()
if (len(sys.argv) > 1):
    ds = DameSexmachine()
    du = DameUtils()
    dp = DamePerceval()
    l1 = dp.list_committers(args.url, args.directory)
    l2 = du.delete_duplicated(l1)
    l3 = du.clean_list(l2)

    females = 0
    males = 0
    unknowns = 0
    for g in l3:
        sm = ds.guess(g, binary=True)
        if (sm == 0):
            females = females + 1
        elif (sm == 1):
            males = males + 1
        else:
            unknowns = unknowns + 1

    print("The number of males sending commits is %s" % males)
Ejemplo n.º 3
0
from app.dame_sexmachine import DameSexmachine
from app.dame_perceval import DamePerceval
from app.dame_utils import DameUtils
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("url", help="Uniform Resource Link")
parser.add_argument('--directory')
parser.add_argument('--version', action='version', version='0.1')
args = parser.parse_args()
if (len(sys.argv) > 1):
    s = DameSexmachine()
    gg = DamePerceval()
    du = DameUtils()
    l = gg.list_mailers(args.url)
    l = du.delete_duplicated(l)

    females = 0
    males = 0
    unknowns = 0
    for g in l:
        sm = s.guess(g, binary=True)
        if (sm == 0):
            females = females + 1
        elif (sm == 1):
            males = males + 1
        else:
            unknowns = unknowns + 1

    print("The number of males sending mails is %s" % males)
    print("The number of females sending mails is %s" % females)
Ejemplo n.º 4
0
 def test_dame_utils_delete_duplicated(self):
     du = DameUtils()
     self.assertEqual(du.delete_duplicated([1, 2, 2, 1, 3]), [1, 2, 3])