Skip to content

Instantly share code, notes, and snippets.

View jonelf's full-sized avatar

Jonas Elfström jonelf

View GitHub Profile
@mythz
mythz / 01_sudo.py
Last active December 18, 2015 04:09
Peter Norvig's Sudoku Solver ported to other languages
#full source: https://github.com/dartist/sudoku_solver/blob/master/benchmarks/sudoku.py
def cross(A, B):
"Cross product of elements in A and elements in B."
return [a+b for a in A for b in B]
digits = '123456789'
rows = 'ABCDEFGHI'
cols = digits
squares = cross(rows, cols)
@lenadroid
lenadroid / Borshtch
Last active December 3, 2018 09:33
How to cook Borshtch
Ingredients:
2 stewpans - one is main = 5 litres, second is for beet
potatoes - 12 items of average size, neither big nor small
beet - 4 items of average size
meat - a piece of pork without fat, size about 10x17x7 santimeters