This code is given AS IS! Run it at your own risk and discretion.
Pygame A*
Click once to select the starting node, and click once again to select the ending node.
A* will then find the path between the two nodes. Clicking once again anywhere on the screen will move the starting node
and will recompute the path. Clicking again will then move the ending node and ...
Code
F# Genetic Algorithm
This GA solves the onemax problem.
I really tried to restrain myself from using the imperative features of
F#.
Code
Python function which implements YAML inheritance.
I found myself writing a lot of YAML files which shared a lot in common, and found no inheritance mechanism built-in as in XML.
So here is a small Python function which supports YAML inheritance.
All you have to do is create a tag called "inherits" which defines a list of files from which you want to inherit.
i.e. inherits: [file1.yml]
This also supports multiple inheritance, which latter files overriding former files.
i.e. inherits: [file1.yml, file2.yml]
In this example the values defined in file2.yml will override the entries in file1.yml.
Code
RGB to CIE-Lab
Python code for converting from RGB to CIE-L*a*b* (CIE-Lab).
The formulas were obtained from EasyRGB (http://www.easyrgb.com/math.html).
Code
ANSI C Compiler
Very crappy version of an ANSI C compiler. If you ever decide to write a compiler,
learn from my mistakes and do things differently.
Open with the command tar xvfj compiler.tar.bz2
Code
|