Skip to content

Instantly share code, notes, and snippets.

@ronyhe
ronyhe / Strings.scala
Last active October 12, 2015 10:28
A simple framework for creating command-line user interfaces
package com.ronyhe.cmd
private[cmd] object Strings {
val Prompt = ">>> "
val Tab = "\t"
val Space = " "
val NewLine = {
@ronyhe
ronyhe / bader-ofer.ts
Last active March 23, 2021 20:39
The Bader-Ofer election system in Israel
import _ from 'lodash'
type ExcessAgreements = [string, string][]
interface Inputs {
readonly threshold: number
readonly results: Record<string, number>
readonly excessAgreements: ExcessAgreements
readonly seats: number
}