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
"40.71399899774998,-73.96226638749108|40.71444900225002,-73.9606376125089" | |
coords = [40.714224,-73.961452] | |
lng_corr = 0.05 / (Math.cos(coords[1] * Math.PI / 180) * 111.11) / 2 | |
lat_corr = 0.05 / 111.11 / 2 | |
bounds = [[coords[0] - lat_corr,coords[1] - lng_corr],[coords[0] + lat_corr, coords[1] + lng_corr]] | |
bounds_string = bounds[0].join(',') + '|' + bounds[1].join(','); |
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 hashlib | |
import re | |
from datetime import * | |
from django.db import connection | |
from django.conf import settings | |
from django.core import serializers | |
import simplejson as json | |
def date_conv(obj): | |
import calendar, datetime |
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
#For some reason, this took forever to figure out... | |
passenger start -a 127.0.0.1 -p 3000 -d -e production |
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
@count_overlay = (color, overlay) -> | |
# First part: If Lower Layer Value > 127.5, then do the following - | |
# Value Unit = (255-Lower Layer Value)/127.5 | |
# Min Value = Lower Layer Value - (255-Lower Layer Value) | |
# Overlay = (Upper Layer Value * Value Unit) + Min Value | |
# Second part: If Lower Layer Value < 127.5, then do the following - | |
# Value Unit=Lower Layer Value/127.5 | |
# Overlay = Upper Layer Value * Value Unit | |
color = parseInt(color) | |
overlay = parseInt(overlay) |
NewerOlder