This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!--Google Weather API Conditions. Compiled by Dennis Delimarsky, http://dennisdel.com/content/conditions.xml--> | |
| <!--Tweaked by Brian Zerangue, February 1, 2011--> | |
| <conditions> | |
| <type handle="partly-sunny">Partly Sunny</type> | |
| <type handle="scattered-thunderstorms">Scattered Thunderstorms</type> | |
| <type handle="showers">Showers</type> | |
| <type handle="scattered-showers">Scattered Showers</type> | |
| <type handle="rain-and-snow">Rain and Snow</type> | |
| <type handle="overcast">Overcast</type> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Order Statistics | |
| # Ameer Ayoub <ameer.ayoub@gmail.com> | |
| import random, copy | |
| # From quicksort | |
| # Nonrandomized Pivot | |
| def partition(l, p, q, pivot=None): | |
| r = copy.copy(l) | |
| if pivot: | |
| r[pivot], r[p] = r[p], r[pivot] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # BunchO Sorting Algorithms | |
| # Ameer Ayoub <ameer.ayoub@gmail.com> | |
| # Last Modified 12/2/2010 | |
| import random | |
| # | |
| # Insertion Sort | |
| # | |
| def insertion_sort(l): | |
| """Given an input list, returns a sorted permutation of the list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Boyer Moore String Search implementation in Python | |
| # Ameer Ayoub <ameer.ayoub@gmail.com> | |
| # Generate the Bad Character Skip List | |
| def generateBadCharShift(term): | |
| skipList = {} | |
| for i in range(0, len(term)-1): | |
| skipList[term[i]] = len(term)-i-1 | |
| return skipList |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using StructureMap; | |
| namespace ConsoleApplication1 | |
| { | |
| class Program { | |
| private static void Main(string[] args) { | |
| IContainer container = ConfigureDependencies(); | |
| IAppEngine appEngine = container.GetInstance<IAppEngine>(); |
NewerOlder