This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ This module contains a simple identicon creation utility function. | |
| Original color palette : coolors.co/659bd8-ff776d-ffd793-9eefae-c99dba | |
| """ | |
| import hashlib | |
| import random | |
| import png # requires pypng (version 0.0.19 recommended) | |
| import sys | |
| palette = {0: (255, 255, 255), | |
| 1: (101, 155, 216), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int: A; | |
| set of int: ARGS = 1..A; | |
| array[ARGS,ARGS] of 0..1: R; | |
| array[ARGS] of var 0..1: S; | |
| % conflict-free | |
| constraint forall(a in ARGS)(forall(b in ARGS)((S[a] = 1 /\ S[b] = 1) -> R[a,b] = 0)); | |
| % if a is in S, then it is defended by S. | |
| constraint forall(a in ARGS)(S[a] = 1 -> forall(b in ARGS)(R[b,a] = 1 -> exists(c in ARGS)(S[c] = 1 /\ R[c,b] = 1))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[titlepage]{article} | |
| \usepackage[english]{babel} | |
| \usepackage[OT1]{fontenc} | |
| \usepackage[utf8]{inputenc} | |
| \usepackage[sc,osf]{mathpazo} | |
| \usepackage[euler-digits]{eulervm} | |
| \usepackage{microtype} |