Skip to content

Instantly share code, notes, and snippets.

View labra's full-sized avatar

Jose Emilio Labra Gayo labra

View GitHub Profile
@labra
labra / ArtistasManieristasDBPedia
Last active August 29, 2015 13:56
Consulta SPARQL DBpedia - Artistas de estilo manierista
# Artistas de estilo manierista que tienen otro estilo diferente al manierista
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT * WHERE {
?x dbo:movement <http://dbpedia.org/resource/Mannerism> .
dbo:movement ?y .
FILTER (?y != <http://dbpedia.org/resource/Mannerism>)
}
@labra
labra / ObrasCreadoresEuropeana
Created March 4, 2014 13:50
Obras y colecciones de España en Europeana
# Creators and collections of Europeana objects from spain
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX ens: <http://www.europeana.eu/schemas/edm/>
PREFIX edm: <http://www.europeana.eu/schemas/edm/>
SELECT *
WHERE {
?object dc:creator ?Creator ;
edm:collectionName ?Collection ;
edm:country "spain" ;
ens:aggregatedCHO ?CHO.
@labra
labra / Country.java
Created March 28, 2014 08:14
Simple Country Model
package models;
import javax.persistence.Entity;
import javax.persistence.Id;
import com.avaje.ebean.Ebean;
import play.db.ebean.Model;
@Entity
@labra
labra / Application.java
Created March 28, 2014 09:37
Application
package controllers;
import models.Country;
import play.data.Form;
import play.mvc.Controller;
import play.mvc.Result;
import views.html.*;
public class Application extends Controller {
@labra
labra / countries.scala.html
Created March 28, 2014 09:38
Countries view
@(countries: List[Country])
<html>
<h1>Vista de países</h1>
<table>
@for(country <- countries) {
<tr>
<td>@country.code</td>
<td>@country.name</td>
</tr>
@labra
labra / country.scala.html
Created March 28, 2014 09:39
Country view
@(country: Country)
<html>
<h1>País</h1>
<p>@country.code - @country.name</p>
</html>
@labra
labra / routes
Created March 28, 2014 09:40
Simple routes file
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET /saluda controllers.Application.saludaEdad(nombre: String, edad: Int)
GET / controllers.Application.index()
@labra
labra / gist:9930141
Created April 2, 2014 08:27
Enlace a guión de observaterraPlay
https://docs.google.com/document/d/1kuIxwcJZdMK2rQZy09N-h-Rbn3g1wDUooKMje9futKE/pub
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbpprop: <http://dbpedia.org/property/>
PREFIX dbprop: <http://dbpedia.org/property/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?x ?codigo ?poblacion ?name WHERE {
?x rdf:type dbo:Country .
?x rdf:type <http://schema.org/Country> .
?x dbpprop:iso3166code ?codigo .
@labra
labra / datos.ttl
Created May 2, 2014 16:18
Simple example of Turtle
@prefix : <http://ejemplo.org/> .
:c11 :country :Spain ; :indicator :Man ; :value 25 .
:c12 :country :Spain ; :indicator :Woman ; :value 20 .
:c21 :country :Vietnam ; :indicator :Man ; :value 15 .
:c22 :country :Vietnam ; :indicator :Woman ; :value 19 .