Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
condorcet
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneurs
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Anthony "Phoko" Barbier
condorcet
Validations
b3e25b9b
Valider
b3e25b9b
rédigé
Il y a 2 ans
par
Phokopi
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
MAJ dec 2022
parent
be224be6
Branches
renovate/cookie-1.x
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
candidates.txt
+6
-6
6 ajouts, 6 suppressions
candidates.txt
fill.py
+1
-1
1 ajout, 1 suppression
fill.py
script.sh
+2
-2
2 ajouts, 2 suppressions
script.sh
toDot.py
+19
-19
19 ajouts, 19 suppressions
toDot.py
avec
28 ajouts
et
28 suppressions
candidates.txt
+
6
−
6
Voir le fichier @
b3e25b9b
A
DemiiSel
B
EquIInoxE
C
IILLEGAL
D
LiMiTe
D
E
PRIISM
E
F
SobrIIÉté
Ce diff est replié.
Cliquez pour l'agrandir.
fill.py
+
1
−
1
Voir le fichier @
b3e25b9b
#!/bin/
env
python3
#!/
usr/
bin/python3
"""
"""
This script transforms votes in number form into votes in mathematical form.
This script transforms votes in number form into votes in mathematical form.
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
script.sh
+
2
−
2
Voir le fichier @
b3e25b9b
...
@@ -24,7 +24,7 @@ cat resultats_complets_bruts_shuf.txt | while read line; do
...
@@ -24,7 +24,7 @@ cat resultats_complets_bruts_shuf.txt | while read line; do
BALLOT
=
$(
tail
-1
resultats_partiels_out.txt
)
BALLOT
=
$(
tail
-1
resultats_partiels_out.txt
)
echo
-e
"Bulletin n°
${
NUMERO_BULLETIN
}
:
${
BALLOT
}
\n
"
echo
-e
"Bulletin n°
${
NUMERO_BULLETIN
}
:
${
BALLOT
}
\n
"
# utilisation de l'appli condorcet, on stocke le résultat dans le fichiet condorcet_output_partiel.txt
# utilisation de l'appli condorcet, on stocke le résultat dans le fichiet condorcet_output_partiel.txt
./vendor/bin/
condorcet election
--candidates
candidates.txt
--votes
resultats_partiels_out.txt SchulzeWinning
-p
>
condorcet_output_partiel.txt
condorcet election
--candidates
candidates.txt
--votes
resultats_partiels_out.txt SchulzeWinning
-p
>
condorcet_output_partiel.txt
# On stocke la ligne du ou des gagnants dans ligne_gagnants_partiels.txt, à traiter dans toDot.py
# On stocke la ligne du ou des gagnants dans ligne_gagnants_partiels.txt, à traiter dans toDot.py
sed
-e
/Schulze/
\{
-e
:1
-en
\;
b1
-e
\}
-ed
condorcet_output_partiel.txt
>
temp.txt
&&
sed
4!d temp.txt
>
ligne_gagnants_partiels.txt
sed
-e
/Schulze/
\{
-e
:1
-en
\;
b1
-e
\}
-ed
condorcet_output_partiel.txt
>
temp.txt
&&
sed
4!d temp.txt
>
ligne_gagnants_partiels.txt
# On extrait la matrice des duels vers matrice_duels_partiel.yaml, puis appelle toDot.py pour générer l'image du graphe dans graphe_partiel.dot.png
# On extrait la matrice des duels vers matrice_duels_partiel.yaml, puis appelle toDot.py pour générer l'image du graphe dans graphe_partiel.dot.png
...
@@ -34,7 +34,7 @@ cat resultats_complets_bruts_shuf.txt | while read line; do
...
@@ -34,7 +34,7 @@ cat resultats_complets_bruts_shuf.txt | while read line; do
echo
-e
"Graphe mis à jour.
\n
"
echo
-e
"Graphe mis à jour.
\n
"
# on affiche le classement
# on affiche le classement
sed
-e
/Schulze/
\{
-e
:1
-en
\;
b1
-e
\}
-ed
condorcet_output_partiel.txt
sed
-e
/Schulze/
\{
-e
:1
-en
\;
b1
-e
\}
-ed
condorcet_output_partiel.txt
#
sleep
2
sleep
4
done
done
#echo "Fin. ${NUMERO_BULLETIN} bulletins ont été comptabilisés."
#echo "Fin. ${NUMERO_BULLETIN} bulletins ont été comptabilisés."
Ce diff est replié.
Cliquez pour l'agrandir.
toDot.py
+
19
−
19
Voir le fichier @
b3e25b9b
#!/bin/
env
python3
#!/
usr/
bin/python3
import
yaml
import
yaml
translate
=
{
translate
=
{
"
A
"
:
"
A
"
,
"
DemiiSel
"
:
"
DemiiSel
"
,
"
B
"
:
"
B
"
,
"
EquIInoxE
"
:
"
EquIInoxE
"
,
"
C
"
:
"
C
"
,
"
IILLEGAL
"
:
"
IILLEGAL
"
,
"
D
"
:
"
D
"
,
"
LiMiTeD
"
:
"
LiMiTe
D
"
,
"
E
"
:
"
E
"
,
"
PRIISME
"
:
"
PRIISM
E
"
,
"
F
"
:
"
F
"
"
SobrIIÉté
"
:
"
SobrIIÉté
"
}
}
colors
=
{
colors
=
{
"
A
"
:
"
#0C631E
"
,
"
DemiiSel
"
:
"
#0C631E
"
,
"
B
"
:
"
#6AD5CF
"
,
"
EquIInoxE
"
:
"
#6AD5CF
"
,
"
C
"
:
"
#1B56D3
"
,
"
IILLEGAL
"
:
"
#1B56D3
"
,
"
D
"
:
"
#FF00FF
"
,
"
LiMiTe
D
"
:
"
#FF00FF
"
,
"
E
"
:
"
#EF7A37
"
,
"
PRIISM
E
"
:
"
#EF7A37
"
,
"
F
"
:
"
#CF9F00
"
"
SobrIIÉté
"
:
"
#CF9F00
"
}
}
pos
=
{
pos
=
{
"
A
"
:
"
0,0!
"
,
"
DemiiSel
"
:
"
0,0!
"
,
"
B
"
:
"
1,2!
"
,
"
EquIInoxE
"
:
"
1,2!
"
,
"
C
"
:
"
3,2!
"
,
"
IILLEGAL
"
:
"
3,2!
"
,
"
D
"
:
"
4,0!
"
,
"
LiMiTe
D
"
:
"
4,0!
"
,
"
E
"
:
"
3,-2!
"
,
"
PRIISM
E
"
:
"
3,-2!
"
,
"
F
"
:
"
1,-2!
"
"
SobrIIÉté
"
:
"
1,-2!
"
}
}
# On récupère la liste des gagnants
# On récupère la liste des gagnants
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter