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
; Create Luminosity Masks for an image | |
; Originally authored by Patrick David <patdavid@gmail.com> | |
; re-coded by Saul Goode to honor selection and layer offsets | |
; Will isolate light, mid, and dark tones in an image as channel masks | |
; Adapted from tutorial by Tony Kuyper (originally for PS) | |
; http://goodlight.us/writing/luminositymasks/luminositymasks-1.html | |
; This program is free software; you can redistribute it and/or modify | |
; it under the terms of the GNU General Public License as published by | |
; the Free Software Foundation; either version 2 of the License, or |
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 GeoIP | |
import json | |
geo = GeoIP.new(GeoIP.GEOIP_MEMORY_CACHE | GeoIP.GEOIP_CHECK_CACHE) | |
with open('mirrors2.json') as data_file: | |
data = json.load(data_file) |