Skip to content

Instantly share code, notes, and snippets.

View marcelino-m's full-sized avatar

Marcelo M. A. marcelino-m

View GitHub Profile
@marcelino-m
marcelino-m / cx_oracle.md
Last active August 31, 2016 04:05 — forked from kimus/cx_oracle.md
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need:

@marcelino-m
marcelino-m / borra-mensuras.js
Created August 31, 2016 18:07
Script para borrar las mensuras sobre el grafo
"use strict";
/**
* Borra todas las mensuras sobre un eje de grafo
*/
var _ = require("lodash");
var Sequelize = require("sequelize");
var conf = require("config");
var dbs = conf.get("db.gpsmina");
@marcelino-m
marcelino-m / LastQuery.cpp
Last active November 17, 2016 14:13
Last query interpolated QSqlQuery
QString getLastExecutedQuery(QSqlQuery const& query)
{
QString str = query.lastQuery();
QMapIterator<QString, QVariant> it(query.boundValues());
while (it.hasNext())
{
it.next();
str.replace(it.key(),it.value().toString());
}
return str;
@marcelino-m
marcelino-m / samba.el
Last active November 10, 2016 06:12
Mount samba
sudo mount -t cifs //IP/datosv4d datosv4d
We couldn’t find that file to show.
@marcelino-m
marcelino-m / sirgas2tte.py
Created December 2, 2016 21:13
Transformacion de coordenadas sirgas 2000 a coordenadas tte
import math as m
E = 374615.956
N = 6227561.662
R = m.pi * (13 +18.0/60.0 + 19.35/3600.0) / 180
d = 3000;
def sirgas2tte(e, n) :
tmpE = e - E;
@marcelino-m
marcelino-m / tcoord_mlp.py
Last active March 4, 2019 14:03
Transformacion de coordenadas MLP
import math as m
def mlp2sirgas(x_in, y_in):
K = 0.9993861340849
W = 0.0025759302920
T_x = 299836.7973
T_y = 6399665.955
teta= W * m.pi / 180.0
@marcelino-m
marcelino-m / Dockerfile-dbschema
Last active May 10, 2017 16:09
Dbschema in docker
# Run as :
# docker run -it --rm -e DISPLAY=$DISPLAY --net=host -v /tmp/.X11-unix:/tmp/.X11-unix container-name
FROM debian:stretch
RUN apt-get -y update && apt-get install -y
ENV HOME /home/dbschema
ENV USER dbschema
@marcelino-m
marcelino-m / celda_propuesta_fromato_csv_to_json.js
Last active June 6, 2017 17:19
Prpuesta para formato de celda al leer el input csv de georeferenciacion
celda = {
fase:"",
banco:"",
nombre:"",
identificador:number,
vcelda: [
{
x:1,
y:2,
@marcelino-m
marcelino-m / tcoord_dmh.py
Last active April 24, 2020 22:04
Transformacion de coordenadas DMH
import pyproj
def utm2dmh(x, y):
"""Transformacion coordenadas WGS84/UTM 19S a DMH"""
a1 = 1.01340872464667
b1 = 0.000356424618826433
c1 = -509325.431674420
a2 = -0.00134028501767773
b2 = 1.00293580527335