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 | |
from time import time | |
import TileStache | |
import ModestMaps | |
from klein import run, route | |
cfg = { | |
"cache": { |
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
class Bug(db.Model, RoleMixin): | |
id = db.Column(db.Integer(), primary_key=True) | |
description = db.Column(db.String(300)) | |
#public? | |
user_id = db.Column(db.Integer, db.ForeignKey('user.id')) | |
user = db.relationship('User', backref=db.backref('bugs', lazy='dynamic')) | |
def __unicode__(self): | |
return '%d' % self.id |
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 TABLE role ( | |
id INTEGER NOT NULL, | |
name VARCHAR(80), | |
description VARCHAR(255), | |
PRIMARY KEY (id), | |
UNIQUE (name) | |
) | |
CREATE TABLE degree ( | |
id INTEGER NOT NULL, |
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
A non-reserved non-reserved | |
ABORT non-reserved | |
ABS reserved reserved | |
ABSENT non-reserved non-reserved | |
ABSOLUTE non-reserved non-reserved non-reserved reserved | |
ACCESS non-reserved | |
ACCORDING non-reserved non-reserved | |
ACTION non-reserved non-reserved non-reserved reserved | |
ADA non-reserved non-reserved non-reserved | |
ADD non-reserved non-reserved non-reserved reserved |
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
# https://github.com/CartoDB/cartodb/blob/master/lib/assets/javascripts/utils/postgres.codemirror.js#L18-L34 | |
carto = [('ACCESSIBLE'),('ALTER'),('AS'),('BEFORE'),('BINARY'),('BY'),('CASE'),('CHARACTER'),('COLUMN'),('CONTINUE'),('CROSS'),('CURRENT_TIMESTAMP'),('DATABASE'),('DAY_MICROSECOND'),('DEC'),('DEFAULT'),('DESC'),('DISTINCT'),('DOUBLE'),('EACH'),('ENCLOSED'),('EXIT'),('FETCH'),('FLOAT8'),('FOREIGN'),('GRANT'),('HIGH_PRIORITY'),('HOUR_SECOND'),('IN'),('INNER'),('INSERT'),('INT2'),('INT8'),('INTO'),('JOIN'),('KILL'),('LEFT'),('LINEAR'),('LOCALTIME'),('LONG'),('LOOP'),('MATCH'),('MEDIUMTEXT'),('MINUTE_SECOND'),('NATURAL'),('NULL'),('OPTIMIZE'),('OR'),('OUTER'),('PRIMARY'),('RANGE'),('READ_WRITE'),('REGEXP'),('REPEAT'),('RESTRICT'),('RIGHT'),('SCHEMAS'),('SENSITIVE'),('SHOW'),('SPECIFIC'),('SQLSTATE'),('SQL_CALC_FOUND_ROWS'),('STARTING'),('TERMINATED'),('TINYINT'),('TRAILING'),('UNDO'),('UNLOCK'),('USAGE'),('UTC_DATE'),('VALUES'),('VARCHARACTER'),('WHERE'),('WRITE'),('ZEROFILL'),('ALL'),('AND'),('ASENSITIVE' |
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
var Cookie = { | |
has: function(cookie_name){ | |
return this.get(cookie_name) !== undefined; | |
}, | |
get: function(cookie_name){ | |
return this.get_all()[cookie_name]; | |
}, | |
set: function(cookie_name, cookie_value, expiration){ | |
date = new Date(); | |
date.setTime(date.getTime() + (expiration*60*60*1000)) |
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
function string:split(sep) | |
local sep, fields = sep or ":", {} | |
local pattern = string.format("([^%s]+)", sep) | |
self:gsub(pattern, function(c) fields[#fields+1] = c end) | |
return fields | |
end | |
function patterns_hack(to_match, fake_regex, separator) | |
local result | |
for k, v in next, string.split(fake_regex, separator) do |
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 java.util.ArrayList; | |
import java.io.*; | |
public class Untitled{ | |
static final String arff_path = "/Users/javierhonduco/Dropbox/Aprendizaje Automatico/datosConCabecera.arff"; | |
static ArrayList<ArrayList> linelist; | |
/* Datos falsos para probar*/ | |
static Double[] points = {2.7397667055569395, 1.8801694653495988, 0.08373404401878415, 2.409369587918457, 1.5133136092028532, 2.5732611337404476, 0.7725538745086804, 0.3079027861422743, 1.1080049786194923, 0.6737391008211959, 0.3829538176494317, 1.104528998694343, 0.036366324634571456, 0.7855395872766329, 2.464462078590649, 0.4156500589873049, 2.9783914962757723, 1.6147506936654668, 0.9536584816444263, 0.7736642255811188, 1.5417078664553692, 0.47450331779258803, 2.9378887386815693, 2.109978519056963, 2.5205199185530516, 1.579170341248749, 0.2387212532422005, 1.801507415428087, 2.913251119037251, 2.154295153586135, 2.331646076178221, 1.6969535989588835, 1.1774904411950473, 0.4443470392241329, 1.9909186416426872, 0.9559023123849442, 2.398211186704344, 2.722738259 |
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 java.util.ArrayList; | |
import java.io.*; | |
public class Untitled{ | |
static final String arff_path = "/Users/javierhonduco/Dropbox/Aprendizaje Automatico/datosConCabecera.arff"; | |
static ArrayList<ArrayList> linelist; | |
/* Datos falsos para probar*/ | |
static Double[] points = {2.7397667055569395, 1.8801694653495988, 0.08373404401878415, 2.409369587918457, 1.5133136092028532, 2.5732611337404476, 0.7725538745086804, 0.3079027861422743, 1.1080049786194923, 0.6737391008211959, 0.3829538176494317, 1.104528998694343, 0.036366324634571456, 0.7855395872766329, 2.464462078590649, 0.4156500589873049, 2.9783914962757723, 1.6147506936654668, 0.9536584816444263, 0.7736642255811188, 1.5417078664553692, 0.47450331779258803, 2.9378887386815693, 2.109978519056963, 2.5205199185530516, 1.579170341248749, 0.2387212532422005, 1.801507415428087, 2.913251119037251, 2.154295153586135, 2.331646076178221, 1.6969535989588835, 1.1774904411950473, 0.4443470392241329, 1.9909186416426872, 0.9559023123849442, 2.398211186704344, 2.722738259 |
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 java.util.ArrayList; | |
class Untitled { | |
public static Double[] fake_data = {2.3, 5.2, 4.5}; | |
public static Integer fake_rows = 5; | |
public static ArrayList<ArrayList> linelist; | |
public static void run(){ | |
linelist = new ArrayList<ArrayList>(); | |
for(int i=0; i<fake_rows; i++){ | |
ArrayList<Double> row = new ArrayList<Double>(); |