Mapa reutilizable que usa como fuente de datos Google Spreadsheet
- gkey: El id del Google Spreadsheet, ej: "1kr4QxM_VgIsKhGL9b_ystBzQR1bSFSLwhLVw2yY9-E0"
 
| license: mit | |
| height: 2000 | |
| scrolling: yes | |
| border: yes | 
| license: mit | |
| scrolling: yes | 
Mapa reutilizable que usa como fuente de datos Google Spreadsheet
| # get current branch in git repo | |
| function parse_git_branch() { | |
| BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
| if [ ! "${BRANCH}" == "" ] | |
| then | |
| STAT=`parse_git_dirty` | |
| echo "[${BRANCH}${STAT}]" | |
| else | |
| echo "" | 
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import requests | |
| import csv | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | 
| import os | |
| import logging | |
| from logging.handlers import RotatingFileHandler | |
| LOG_FORMAT = '%(levelname)s:%(name)s:%(funcName)s(L%(lineno)d):%(asctime)s: %(message)s' | |
| folder_logs = 'logs' | |
| def get_logger(name=__name__, log_file_name='logger.log', log_level=logging.WARNING): | |
| file_path = os.path.join(folder_logs, log_file_name) | 
git status # para ver los cambios
git commit -am "mensaje del commit" # si hay archivos nuevos agregarlos con git add nombre_del_archivo
git pull origin master # trae los últimos cambios del repo de github antes de hacer push
git push origin master # sube los cambios a github para que esten disponibles para todos| #! /bin/bash | |
| # path del script. | |
| SCRIPT=$(readlink -f $0) | |
| SCRIPTPATH=`dirname $SCRIPT` | |
| PJ_FOLDER=books16 | |
| VENV=venv_books16 | |
| GIT_REPOSITORY="https://github.com/lanacioncom/books16.git" | 
| /** | |
| * Escrapear datos desde la consola con javascript | |
| */ | |
| var wrap = document.querySelectorAll("div#contenido > div")[5]; | |
| var tables = wrap.querySelectorAll("table tbody"); | |
| var data = []; | |
| tables.forEach(function(t){ | |
| var r = []; | |
| t.querySelectorAll("td").forEach(function(txt){ | 
| require.config({ | |
| paths: { | |
| "pym": "http://especiales.lanacion.com.ar/multimedia/proyectos/js/pym.min" | |
| }, | |
| waitSeconds: 40 | |
| }); | |
| require( ["pym"], | |
| function (pym) { | |