Skip to content

Instantly share code, notes, and snippets.

View rmela's full-sized avatar

Robert Mela rmela

  • Lexington, MA, USA
View GitHub Profile
@rmela
rmela / index.js
Last active January 23, 2020 04:11
Simple Game of Life module - ( add to package.json as "any-name-here": "gist:76fe92595473ac07c25cf3dd1d631a38" )
function toString( rows ) {
return rows
.map( row => row
.map( cell => cell.value ? '1' : '0' )
.join( ' ' )
).join("\n")
}
class Game {
curl --header "Authorization: bearer <your-github-api-token-here>" https://api.github.com/graphql \
-d '{"query":"query { viewer { login } }"}'
@rmela
rmela / frietkot.py
Last active August 18, 2024 19:33
Solution to frietkot problem
# solution to the Frietkot problem https://people.cs.kuleuven.be/~tias.guns/frietkot/ using pysat
from pysat.solvers import Solver
MAYONNAISE = 1
KETCHUP = 2
CURRY = 3
ANDALOUSE = 4
SAMURAI = 5