Skip to content

Instantly share code, notes, and snippets.

View teleyinex's full-sized avatar
🏠
Working from home

Daniel Lombraña González teleyinex

🏠
Working from home
View GitHub Profile
did:3:kjzl6cwe1jw14au0w4bcgwlmptnvbcp740kb12n6ox8s3ogehgaw6l2lzwzup9k
# Methodology
Here we explain how we have created the project, how we analyse data and how we provide the results.
## Data capture: Public buildings from Spain´s Public Administration. To create this project we needed a database with all the public buildings belonging to the Central Public Administration.
The Spanish National Treasury has a [web portal](http://transparencia.gob.es/servicios-buscador/buscar.htm?categoria=bienesinmuebles_ind&categoriasPadre=conconvsub&ente=I00000179,EA0008567,E04585801,E00003901,E00003301,E04921301,E04990101,E00003801,E00003601,E04921401,E04921501,E04921601,E04990201,E04921701,E04990301,E00004101,E04990401,E04921801,E04990501,E04921901&lang=es&tipocibi=edificio) which we have used to obtain the list of public buildings used to build this project.
The data provided by the Spanish Government for each building is:
* Type: they are all buildings
@teleyinex
teleyinex / walksync.js
Created February 11, 2019 14:08 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {
@teleyinex
teleyinex / Personal keybase
Last active May 26, 2017 16:06
keybase.md
### Keybase proof
I hereby claim:
* I am teleyinex on github.
* I am teleyinex (https://keybase.io/teleyinex) on keybase.
* I have a public key ASAQk616rMLjM7CdAfa-NsbnnVW5eeZIXvuxcLyJud1L7Qo
To claim this, I am signing this object:
#include <uwsgi.h>
static int spinningfifo_hook(char *arg) {
int fd;
char *space = strchr(arg, ' ');
if (!space) {
uwsgi_log("invalid hook spinningfifo syntax, must be: <file> <string>\n");
return -1;
}
*space = 0;
@teleyinex
teleyinex / Ansible check uwsgi status
Created May 13, 2015 15:58
Ansible check uwsgi status
- hosts: localhost
remote_user: root
serial: 1
tasks:
- name: Check uwsig status
sudo: yes
sudo_user: user
command: "/home/user/env/bin/uwsgi --connect-and-read /tmp/uwsgi-stats.sock"
args:
chdir: "/home/user/app"
{% macro form_field(field) -%}
{% set with_label = kwargs.pop('with_label', False) %}
{% set placeholder = '' %}
{% if not with_label %}
{% set placeholder = field.label.text %}
{% endif %}
<div class="control-group {% if field.errors %}error{% endif %}">
{% if with_label %}
<label for="{{ field.id }}" class="control-label">
{{ field.label.text }}{% if field.flags.required %} *{% endif %}:
@teleyinex
teleyinex / vimeo.ipynb
Created December 16, 2013 17:42
Analyzing Crowdcrafting Vimeo application with the pacakge Enki
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@teleyinex
teleyinex / gist:6018186
Created July 17, 2013 06:47
Add tasks from a JSON file to a PyBossa server using pybossa-client
import json
import pbclient
pbclient.set('endpoint', 'http://server.com')
pbclient.set('api_key', 'YOURAPIKEY')
# Get the application ID
app = pbclient.find_app(short_name='APP_SHORT_NAME')
# Parse the JSON object