Skip to content

Instantly share code, notes, and snippets.

View russleyshaw's full-sized avatar
💭
Converting people to the TypeScript hivemind.

Russley Shaw russleyshaw

💭
Converting people to the TypeScript hivemind.
View GitHub Profile
@russleyshaw
russleyshaw / astar.py
Last active December 28, 2015 15:29
Python A* implementation for a grid.
import heapq
class path_finder:
def __init__(self, ai, cache):
#AI contains things such as objects, and properties of the game.
self.__ai = ai
#Cache is loaded at the start of each game.
self.__cache = cache
@russleyshaw
russleyshaw / dependency_stripper
Created September 8, 2013 05:37
A script made by @cherez. This little bit of Unix magic finds what Boost dependencies will be used and copies only the necessary bits into the current directory. It assumes there is a folder called "boost" in the parent directory.
gcc -M -I .. main.cpp | sed 's/ /\n/g' | grep boost | sed 's/\\$//g' | sort | uniq | (while read i;do x=$(echo $i | sed 's|^\.\./|./|g');mkdir -p $(dirname $x);cp $i $x;done )