Skip to content

Instantly share code, notes, and snippets.

@andrewmatte
andrewmatte / fuzzySearch.html
Last active May 14, 2021 18:11
This is a stand alone HTML file with a nifty JavaScript algorithm for matching strings, implemented to search through a list of names. It was presented as a part of a workshop for TorontoJS on Monday the 12th of December 2016.
<html>
<head><title>Fuzzy Search</title>
<script id="algorithm">
//This algorithm is an original work by Andrew Matte in Toronto, [email protected]
//You are completely free to do whatever you want with this algorithm but,
//please credit me if the project is open source. Also there is no warranty that is it perfectly suited to your use case.
//Written originally in Visual Basic to replace VLOOKUP's fuzzy lookup in Microsoft Excel
//in 2014, implemented in MS-SQL, Python, and JS.
//Apologies for any similarities to an algorithm you personally might have written independently.
var proximity = (wordA, wordB) => {
<html>
<head><title>No Framework JavaScript</title>
<style>
table {
border-collapse: collapse;
}
table, th, td {
border: 1px solid black;
}
</style>
@andrewmatte
andrewmatte / introPython.py
Last active January 12, 2020 16:41
This is a 20-minute introduction to the Python programming language for a talk given at Lighthouse Labs in 2016.
#http://bit.ly/28VdHva
##########
#VARIABLES
##########
#numbers
a = 3 #float, int, and long
#strings
b = 'ha '