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
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
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 fabric.api import * | |
from fabric.colors import green, red | |
env.hosts = [ 'localhost'] | |
def deploy(): | |
path = "/path/to/root/app/" | |
print(red("Beginning Deploy:")) |
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
class Bien(models.Model): | |
# id = models.IntegerField(primary_key=True) # AutoField? | |
# tipo_bien_id = models.IntegerField(blank=True, null=True) | |
# nombre_bien_id = models.IntegerField(blank=True, null=True) | |
tipo_bien_s = models.CharField(max_length=255, blank=True) | |
nombre_bien_s = models.CharField(max_length=255, blank=True) | |
descripcion = models.CharField(max_length=255, blank=True) | |
direccion = models.CharField(max_length=255, blank=True) | |
barrio = models.CharField(max_length=255, blank=True) | |
localidad = models.CharField(max_length=255, blank=True) |
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 | |
ini_set('display_errors', 1); | |
require_once('lib/TwitterAPIExchange.php'); | |
/** Set access tokens here - see: https://dev.twitter.com/apps/ **/ | |
require "conf.php"; | |
define("LAST_METADATA_SEARCH_FILE", "app/data/last_metadata_search.txt"); | |
define("TUITS_FILE", "app/data/tuits_nisman.txt"); |
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
#!/usr/bin/python | |
from twitter import * # need install twitter.py: `pip install twitter` | |
import json | |
import time | |
from urlparse import urlparse, parse_qs | |
"""SETTINGS""" | |
from twitter_keys import OAUTH_TOKEN, OAUTH_SECRET, TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET |
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
#! python | |
import csv, json | |
path = "app/data" | |
csv_path = "%s/nisman.csv" % path | |
data_out_path = "%s/data.json" % path | |
reader = csv.DictReader(open(csv_path)) |