Skip to content

Instantly share code, notes, and snippets.

View Gabrielcarvfer's full-sized avatar

Gabriel Ferreira Gabrielcarvfer

View GitHub Profile
@Gabrielcarvfer
Gabrielcarvfer / gist:eb227a44b009d90c07f50b7fa69a483c
Last active December 16, 2016 16:25
Condorcet-like alternative voting algorithm
#CSV file in https://docs.google.com/spreadsheets/d/1tnMbbfBJH2fnNcn73t1oypcq8HrmFJZcdaek0CWapxY/edit?usp=sharing
import csv
import random
voters = []
#load csv into array of arrays
with open('Voto ordenado - Respostas ao formulário 1.csv', 'r') as csvfile:
lineReader = csv.DictReader(csvfile, delimiter=',')
for row in lineReader: