Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

ma haidong mahaidong

🏠
Working from home
View GitHub Profile
@mahaidong
mahaidong / Triangulate.py
Created Jul 11, 2021 — forked from Shaptic/Triangulate.py
Fokin' triangulation.
View Triangulate.py
"""
Triangluation simulator.
Left mouse button: place a vertex.
Right mouse button: finalize a shape.
T: triangulate shapes.
"""
import math
from random import randint
@mahaidong
mahaidong / interp1.lisp
Created Oct 31, 2019 — forked from mnicky/interp1.lisp
simple Scheme interpreter, including macros, by Peter Norvig
View interp1.lisp
;source: http://norvig.com/paip/interp1.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*-
;;; Code from Paradigms of Artificial Intelligence Programming
;;; Copyright (c) 1991 Peter Norvig
;;; File interp1.lisp: simple Scheme interpreter, including macro.sgi
(defun interp (x &optional env)
"Interpret (evaluate) the expression x in the environment env."