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
from mongrel2.config import * | |
main = Server( | |
uuid="cb69cc4f-59d0-4cdb-aefe-4dcbe83f4682", | |
access_log="/logs/access.log", | |
error_log="/logs/error.log", | |
chroot="./", | |
default_host="mikej.st", | |
name="main", | |
pid_file="/run/mongrel2.pid", |
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
def pagerank(matrix, d_factor=0.85): | |
""" | |
Calculate the pagerank vector of a given adjacency matrix (using | |
the power method). | |
:param matrix: an adjacency matrix | |
:param d_factor: the damping factor | |
""" | |
size = len(matrix) | |
epsilon = 0.0001 |
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
#!/bin/bash | |
mkdir merged | |
for f in "$@" | |
do | |
if [ -f merged/merged.shp ] | |
then | |
ogr2ogr -f "esri shapefile" -update -append merged/merged.shp $f -nln Merged | |
else | |
ogr2ogr -f "esri shapefile" merged/merged.shp $f | |
fi |
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
import os | |
try: | |
from pypy.rlib.jit import JitDriver, purefunction, hint | |
except ImportError: | |
# If pypy isn't importable then (presumably) we're not being translated, | |
# so make JIT stuff no-ops. | |
class JitDriver(object): | |
def __init__(self, **kwargs): | |
pass |
OlderNewer