Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Condorcet Cube Strategy</title>
<!-- Load Plotly.js -->
<script src="https://cdn.plot.ly/plotly-2.24.1.min.js"></script>
<style>
@paretoman
paretoman / condorcet-cube-strategy.html
Last active July 3, 2026 22:07
condorcet cube strategy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Condorcet Voting Strategy Space (Minimax)</title>
<script src="https://cdn.plot.ly/plotly-2.24.1.min.js"></script>
<style>
body { font-family: sans-serif; margin: 20px; background-color: #f4f4f9; }
.container { display: flex; flex-direction: row; gap: 20px; flex-wrap: wrap; }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Ultimate STV Minimax Explorer</title>
<style>
/* Global Box Sizing for clean mobile padding */
* { box-sizing: border-box; }
@paretoman
paretoman / cvx min max proportional
Created March 26, 2025 02:36
Second attempt at proportional minimax. Using a sequential greedy approach and cvxpy
import numpy as np
import matplotlib.pyplot as plt
# from scipy.spatial.distance import cdist
import pulp
from matplotlib import collections as mc
import cvxpy as cvx
# test cases
# index, selected, facilities, customers
# n se fa cu
@paretoman
paretoman / Rough Pairwise Proportional Voting
Created March 22, 2025 00:46
Rough first attempt at a proportional voting method that uses minimax scores.
import numpy as np
import matplotlib.pyplot as plt
from scipy.spatial.distance import cdist
import pulp
from matplotlib import collections as mc
# test cases
# index, selected, facilities, customers
# n se fa cu
cases = [(0, 4, 5, 3),
@paretoman
paretoman / circleMaker.ipynb
Created September 16, 2022 01:57
Creates a circle spatial model for Alaska's first RCV election.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.