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
SELECT | |
* | |
FROM | |
(SELECT | |
vot_procodigoprovincia as provincia, | |
vot_depcodigodepartamento as departamento, | |
vot_mescodigocircuito as circuito, | |
vot_mescodigomesa as mesa, | |
votvotospartido as votos_fpv | |
FROM mesascandidaturapresidente |
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
Example request to download 2015 National Budget for Buenos Aires City day by day | |
The service has a limit of 64800 rows so to download all data may be necessary to make a loop iterating over jurisdictions, years, months and days since 1998. | |
Jurisdictions are encoded like INDEC, beginning from 2 (Buenos Aires City) and incrementing in steps of 4 (2, 6, 10... 94) | |
http://sitiodelciudadano.mecon.gov.ar/analytics/saw.dll?Go&NQUser=usrsici_c&NQPassword=usrsici_c&SQL=SELECT "Tiempo"."Año", Tiempo.Mes, Tiempo.Dia, "Ejercicio Presupuestario"."Cod. Ejercicio Presupuestario","Ejercicio Presupuestario".Leyenda_Fecha_Act,"Sector Institucional"."Desc. Caracter","Sector Institucional"."Cod. Sector","Sector Institucional"."Cod. Subsector","Sector Institucional"."Cod. y Desc. Caracter","Institucion"."Cod. Jurisdiccion","Institucion"."Desc. Jurisdiccion","Institucion"."Cod. y Desc. Jurisdiccion",Institucion."Cod. y Desc. Subjurisdiccion","Institucion"."Cod. Subjurisdiccion","Institucion"."Desc. Subjurisdiccion","Institucion". |
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
/* | |
Argentina National Parks | |
*/ | |
[out:json]; | |
// gather results | |
area["boundary"="administrative"]["admin_level"="2"]["name"="Argentina"]->.boundaryarea; | |
( | |
// query part for: “boundary=national_park” | |
node(area.boundaryarea)["boundary"="national_park"]; | |
way(area.boundaryarea)["boundary"="national_park"]; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# | |
# Google Cloud Storage snippet | |
# | |
# Requirements: glob, os, google-cloud-storage | |
# | |
import glob | |
import os | |
from google.cloud import storage | |
GCS_PROJECT = '???' # i.e. Google Cloud project name |
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/env python | |
""" | |
Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
Written by Nathan Hamiel (2010) | |
""" | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser |
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
"""Export HDF5 tables to csv files | |
""" | |
import argparse | |
import os | |
import pandas as pd | |
parser = argparse.ArgumentParser(description='Export HDF5 tables to csv files.') | |
parser.add_argument('-o', '--h5', dest='h5_path', required=True, | |
help='Path to HDF5 file.') | |
parser.add_argument('-d', '--csv', dest='csv_path', default='./', |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
source '/Users/martin/google-cloud-sdk/path.zsh.inc' | |
source '/Users/martin/google-cloud-sdk/completion.zsh.inc' |
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 time, sys | |
from IPython.display import clear_output | |
def update_progress(progress): | |
bar_length = 50 | |
if isinstance(progress, int): | |
progress = float(progress) | |
if not isinstance(progress, float): | |
progress = 0 | |
if progress < 0: |