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
{ | |
"Región de los Ríos": [ | |
"Panguipulli", | |
"Corral", | |
"Paillaco", | |
"La Unión", | |
"Los Lagos", | |
"Río Bueno", | |
"Futrono", | |
"Lago Ranco", |
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
/* Estructura y Datos de las Regiones, Provincias */ | |
/* y Comunas de Chile. */ | |
/* */ | |
/* Fecha: Julio 2010 */ | |
/* Autor: Juan Pablo Aqueveque - juque.cl */ | |
-- | |
-- Comunas | |
-- | |
DROP TABLE IF EXISTS `comunas`; |
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 base64 | |
import pickle | |
from django.contrib.sessions.models import Session | |
from django.utils.encoding import force_unicode | |
def decode_session_data(session_key): | |
"""Decode the data in a session object stored under ``session_key``. |
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
from urllib2 import urlopen | |
from django.utils.simplejson import loads | |
from oauth2 import Token | |
from social_auth.backends.utils import build_consumer_oauth_request | |
from social_auth.backends.twitter import TwitterAuth | |
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
#!/usr/bin/env sh | |
# Uses curl to connect to www.isup.me, a website that checks if a given domain | |
# is up or not. The response will contain "It's just you" if the domain is up. | |
# If not, it will contain "It's not just you". | |
test $# -lt 1 && (echo "Usage: $0 domain [domain2] [domain3] ..."; exit 1;) | |
for domain in "$@"; do | |
echo -n "$domain: " |
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 copy | |
import logging | |
import re | |
from django.forms import ValidationError | |
from django.views.generic import TemplateView | |
from django.utils.datastructures import MultiValueDict | |
from django.contrib.formtools.wizard.forms import ManagementForm |
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
from django.utils.datastructures import MultiValueDict | |
class SessionStorage(object): | |
"""Custom SessionStorage class. Removed all the functionality that dealt | |
with files. | |
Based in Django-1.4's: | |
`django.contrib.formtools.wizard.storage.base.BaseStorage` | |
`django.contrib.formtools.wizard.storage.session.SessionStorage` |
NewerOlder