예제 #1
0
	def set_guy_profiles(self):
		for root, dirs, files in os.walk('data/guys'): #### les profiles sont dans 'data_test'
			for name in files:
				doc = os.path.join(root, name)
				try:
					with open(doc, 'r') as f:
						profile = json.load(f)
						guy = man(profile)
						self.guys.append(guy)
				except Exception as e:
					print(" *** Erreur :", e, doc)
예제 #2
0
 def set_guy_profiles(self):
     for root, dirs, files in os.walk(
             'data/guys'):  #### les profiles sont dans 'data_test'
         for name in files:
             doc = os.path.join(root, name)
             try:
                 with open(doc, 'r') as f:
                     profile = json.load(f)
                     guy = man(profile)
                     self.guys.append(guy)
             except Exception as e:
                 print(" *** Erreur :", e, doc)
예제 #3
0
	def set_profiles(self):
		for name in male_names:
			guy = man(name)
			guy.set_results(subjects_guy)
			guy.set_standards(subjects_girl)
			self.guys.append(guy)
		for name in female_names:
			girl = woman(name)
			girl.set_results(subjects_girl)
			girl.set_standards(subjects_guy)
			self.girls.append(girl)
			self.capacity[girl.name] = girl.capacity
예제 #4
0
 def set_profiles(self):
     for name in male_names:
         guy = man(name)
         guy.set_results(subjects_guy)
         guy.set_standards(subjects_girl)
         self.guys.append(guy)
     for name in female_names:
         girl = woman(name)
         girl.set_results(subjects_girl)
         girl.set_standards(subjects_guy)
         self.girls.append(girl)
         self.capacity[girl.name] = girl.capacity
예제 #5
0
female_names = ['claire', 'solène', 'anna', 'marion']

subjects_guy = [
    'french', 'english', 'maths', 'physiques', 'biology', 'spanish',
    'phylosophy', 'economy', 'sport'
]
subjects_girl = [
    'international', 'price', 'prestige', 'doubledegree', 'accessibility',
    'campus'
]

guys = []
girls = []

for name in male_names:
    guy = man(name)
    guy.set_results(subjects_guy)
    guy.set_standards(subjects_girl)
    guys.append(guy)
for name in female_names:
    girl = woman(name)
    girl.set_results(subjects_girl)
    girl.set_standards(subjects_guy)
    girls.append(girl)

guyprefers = {}
galprefers = {}

for guy in guys:
    guy.grade(girls)
    guy.classify()
예제 #6
0
from profile import man, woman
# il faut que le fichier "profile.py" soit placé dans le même dossier que "gender.py"
import random

male_names = ['lucien', 'pierre bastard' ,'andréas', 'clément', 'léo', 'adrien', 'pierre', 'remi', 'dan', 'tom', 'bob', 'thomas', 'louis', 'nicolas', 'hyppolite']
female_names = ['claire', 'solène', 'anna', 'marion']

subjects_guy = ['french', 'english', 'maths', 'physiques', 'biology', 'spanish', 'phylosophy', 'economy', 'sport']
subjects_girl = ['international', 'price', 'prestige', 'doubledegree', 'accessibility', 'campus']


guys = []
girls = []

for name in male_names:
	guy = man(name)
	guy.set_results(subjects_guy)
	guy.set_standards(subjects_girl)
	guys.append(guy)
for name in female_names:
	girl = woman(name)
	girl.set_results(subjects_girl)
	girl.set_standards(subjects_guy)
	girls.append(girl)


guyprefers = {}
galprefers = {}


for guy in guys: