Skip to content

Instantly share code, notes, and snippets.

@turbofart
turbofart / userDefineLang.xml
Created February 5, 2013 18:17
Notepad++ User Defined Languages
<NotepadPlus>
<UserLang name="SQR" ext="sqr" udlVersion="2.0">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="yes" forceLineCommentsAtBOL="no" foldCompact="no" />
<Prefix Keywords1="no" Keywords2="yes" Keywords3="yes" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments" id="0">03 03 04 04 00! 01 02</Keywords>
<Keywords name="Numbers, additional" id="1"></Keywords>
<Keywords name="Numbers, prefixes" id="2"></Keywords>
@turbofart
turbofart / tsp.py
Created August 22, 2012 20:06
Applying a genetic algorithm to the travelling salesman problem
#!/usr/bin/env python
"""
This Python code is based on Java code by Lee Jacobson found in an article
entitled "Applying a genetic algorithm to the travelling salesman problem"
that can be found at: http://goo.gl/cJEY1
"""
import math
import random