This file contains 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
# Thanks to @samsonjs for the cleaned up version: | |
# https://gist.github.com/samsonjs/4076746 | |
PREFIX=$HOME | |
VERSION=1.2.3 | |
# Install Protocol Buffers | |
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
tar -xf protobuf-2.4.1.tar.bz2 | |
cd protobuf-2.4.1 |
This file contains 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
import json | |
from base64 import b64decode | |
from collections import OrderedDict | |
from cStringIO import StringIO | |
from gzip import GzipFile | |
import requests | |
## Python before 2.7.10 or so has somewhat broken SSL support that throws a warning; suppress it |
This file contains 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
var flee = require('flee'); | |
function checkPath(pos1, pos2) { | |
var path = pos1.findPathTo(pos2); | |
if (!path.length) { | |
return false; | |
} | |
return path[path.length - 1].x == pos2.x && path[path.length - 1].y == pos2.y; | |
} | |
function costCallbackIgnoreRamparts(roomName, cm) { | |
var ramparts = Game.rooms[roomName].find(FIND_STRUCTURES, {filter: i => i.structureType == STRUCTURE_RAMPART || i.structureType == STRUCTURE_WALL}); |