Skip to content

Instantly share code, notes, and snippets.

View avdata99's full-sized avatar
:electron:
laburanding

Andres Vazquez avdata99

:electron:
laburanding
View GitHub Profile
// requiere en variable map el mapa de google
function separar_superpuestos(round_decs=7) {
// revisar todo el mapa y detectar puntos superpuestos (o cercanos segun round de lat y lng)
let to_round = Math.pow(10, round_decs);
map.data.forEach(function(feature){
let geom = feature.getGeometry();
if (geom != null) {
@avdata99
avdata99 / annotate-image.sh
Created December 23, 2019 02:16
Add text to and image with imagemagick
# https://imagemagick.org/Usage/annotating/
original_image=$1
txt=$2 # texto a anotar
x1=$3 # Coord X (pixeles) donde empieza a escribir
y1=$4 # Coord Y (pixeles) donde empieza a escribir
color=$5 # ej 8808
prefix=$6 # prefijo del nombre de archivo
convert $1 \
import json
import os
import requests
from slugify import slugify
instance_url = 'https://ckan.io'
package_list_url = 'api/3/action/package_list'
package_show_url = 'api/3/action/package_show'
expected_topics = [
"""
Compare a data.json file with a google drive CSV
"""
import csv
import json
import os
import requests
def clean_url(url):
#######################################
#### CARGAR MAPAS DESDE DISTINTOS GEOSERVICIOS ######################
##################################################################
rm(list=ls())
library(sf)
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Sigeva API"
},
"basePath": "/v1",
"schemes": [
"http",
"https"
git ls-files | \
while read f; do \
git blame -w -M -C -C --line-porcelain "$f" | \
grep -I '^author-mail '; \
done | cut -f2 -d'<' | cut -f1 -d'>' | sort -f | uniq -ic | sort -n
# add the repo with the driver
git clone [email protected]:nealey/hdjd.git
# install requirements
sudo apt install libusb libusb-1.0.0 libusb-1.0.0-dev libusb-dev libusb-1.0-0-dev libasound2-dev mixxx
# build the drivers
cd hdjd/
make clean all
@avdata99
avdata99 / envido.py
Last active February 12, 2022 21:12
"""
La funcion envido, dada una lista de (estrictamente) tres cartas,
me devuelve el envido de esa mano de truco.
Cada elemento de la lista es de la forma:
carta = {'palo': 'xxx', 'numero': N}
"""
def carta_simple_envido(carta):
""" de una carta data obtiene cuanto suma al envido
"""
File to push NDX countries list into Kobo but not including pcodes (yet)
"""
import csv
import json
import requests
from io import StringIO