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
# -*- encoding: utf-8 -*- | |
import click | |
import csv | |
from erppeek import Client | |
def actualitzar_lecturas(connection, url_lecturas): | |
""" | |
Actualiza el numero de lecturas sumando al ERP las lecturas del fichero |
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
import os | |
from StringIO import StringIO | |
from lxml import etree | |
import click | |
from tqdm import tqdm | |
from pyproj import Proj | |
from pyproj import transform |
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 csv | |
import optparse | |
import sys | |
import time | |
def wh_detectectar_delimitador(path_file_csv): | |
with open(path_file_csv, 'r') as file_csv: | |
header = file_csv.readline() |
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
import psycopg2 | |
from osmapi import OsmApi | |
username=u'' | |
password=u'' | |
api = OsmApi(username=username, password=password, | |
changesetauto=True, changesetautotags={"comment": u"Remove addr:country_code"}) | |
pg_dsn='user=, password=, host= ,database=' | |
con = psycopg2.connect(pg_dsn) | |
cur = con.cursor() | |
cur.execute("select osm_id,name from planet_osm_polygon where admin_level='9' and boundary='administrative'") |