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
| countries = [ | |
| {'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'}, | |
| {'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'}, | |
| {'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"}, | |
| {'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'}, | |
| {'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'}, | |
| {'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'}, | |
| {'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai |
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
| # https://code.djangoproject.com/ticket/17209 | |
| import urlparse | |
| from django.conf import settings | |
| from django.core.urlresolvers import reverse_lazy | |
| from django.http import HttpResponseRedirect, QueryDict | |
| from django.utils.decorators import method_decorator | |
| from django.utils.http import base36_to_int | |
| from django.utils.translation import ugettext as _ | |
| from django.views import generic |
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
| <?php | |
| /** | |
| * Url Signing Helper Class | |
| * | |
| * @author Paul Ferrett <paul.ferrett@servicecentral.com.au> | |
| * @license http://opensource.org/licenses/gpl-license.php GNU Public License | |
| */ | |
| class UrlSigning { |
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
| <?php | |
| /** | |
| * Basic URL Signing functions for WordPress. | |
| * | |
| * @author Brady Vercher (twitter.com/bradyvercher) | |
| * @link http://www.blazersix.com/blog/protect-your-products-and-improve-your-systems-with-signed-urls/ | |
| */ | |
| /** | |
| * Sign a URL to ensure it hasn't been tampered with. |
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 cv2 | |
| import numpy as np | |
| canny = rho = threshold = minLen = maxGap = None | |
| def draw(): | |
| lines = cv2.HoughLinesP(canny, rho, np.pi / 180, | |
| threshold, None, minLen, maxGap) | |
| dst = cv2.cvtColor(canny, cv2.COLOR_GRAY2BGR) |
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
| function randomColor(){ | |
| return "rgb("+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+")"; | |
| } | |
| function showBoxes(window) { | |
| var rects = []; | |
| function getRects(node){ | |
| var range = window.document.createRange(); | |
| range.setStartBefore(node); | |
| range.setEndAfter(node); |