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 | |
| # coding=utf-8 | |
| import requests | |
| # Track ids to download | |
| tracks = [ | |
| '9319946', | |
| '9319955', | |
| ... |
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 | |
| # coding=utf-8 | |
| import socks | |
| import socket | |
| import requests | |
| def main(): | |
| socks.setdefaultproxy(proxy_type=socks.PROXY_TYPE_SOCKS5, addr="127.0.0.1", port=9050) | |
| socket.socket = socks.socksocket |
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 obtenerLocalidad(lat, lon) { | |
| var geocoder = new google.maps.Geocoder(); | |
| var latlng = new google.maps.LatLng(lat, lon); | |
| geocoder.geocode({"latLng": latlng} , function(results, status) { | |
| if (status == google.maps.GeocoderStatus.OK) { | |
| if (results[1]) { | |
| alert(results[1].formatted_address); | |
| } else alert("No se han encontrado resultados"); | |
| } else alert("Error: " + status); | |
| }); |
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
| package geocoder; | |
| import java.io.BufferedReader; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileReader; | |
| import java.io.IOException; | |
| import static java.lang.Double.parseDouble; | |
| import java.util.ArrayList; | |
| import java.util.logging.Level; | |
| import java.util.logging.Logger; |
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 | |
| # coding=utf-8 | |
| from SpanishCorpus import SpanishCorpus | |
| __author__ = "Alberto Pou Quir贸s" | |
| def main(): | |
| text = u'Azkaban ha existido desde el siglo XV, pero en sus origenes no era una prisi贸n.\ |
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
| library(plotKML) | |
| library(ggmap) | |
| library(maps) | |
| # Obtenci贸n del mapa de Mallorca | |
| map <- get_map(location = 'Mallorca', zoom = 15, maptype = "satellite", source = "google") | |
| map <- ggmap(map) | |
| # Adici贸n de los puntos al mapa | |
| tracks_gpx <- dir(path="/tracks/", pattern="\\.gpx") |
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
| library(plotKML) | |
| library(ggplot2) | |
| library(ggmap) | |
| library(maps) | |
| library(plyr) | |
| # Coordenadas de Lluc | |
| lat <- c(39.823228, 39.823278) | |
| lon <- c(2.888371, 2.888500) |
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
| # Shared apps between tenants | |
| SHARED_APPS = ( | |
| 'tenant_schemas', # Mandatory | |
| 'customers', | |
| 'django.contrib.admin', | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.sessions', | |
| 'django.contrib.messages', | |
| 'django.contrib.staticfiles', |
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
| # -*- coding: UTF-8 -*- | |
| from django.db import models | |
| from tenant_schemas.models import TenantMixin | |
| class Client(TenantMixin): | |
| name = models.CharField(max_length=100) | |
| paid_until = models.DateField() | |
| on_trial = models.BooleanField() |
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
| tenant = Client(domain_url='public.saas.com', | |
| schema_name='public', | |
| name='Public', | |
| paid_until='2014-12-05', | |
| on_trial=True) | |
| tenant.save() |
OlderNewer