Skip to content

Instantly share code, notes, and snippets.

@cvvergara
cvvergara / run.sh
Created December 6, 2017 15:34
Using on pgRouting v2.6-dev
#!/bin/bash
set -e
if [ -z $1 ]; then
VERSION="2.6.0"
else
VERSION=$1
fi
@cvvergara
cvvergara / fetch_file_from_external_repo_with_history.sh
Last active July 4, 2017 21:01
Fetch file from exterbal repo with history
#!/bin/bash
###############################################################################
# Copyright (c) 2016, Vicky Vergara <vicky_vergara@hotmail.com>
#
# Licence: GPL-2.0
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
@cvvergara
cvvergara / run.sh
Last active May 19, 2017 16:46
Yet another run.sh I use for 2.5
#!/bin/bash
set -e
if [ -z $1 ]; then
echo "version missing"
exit 1;
fi
VERSION=$1
#!/bin/bash
if [[ -z $1 ]]; then
echo "Mayor missing";
exit 1;
fi
if [[ -z $2 ]]; then
echo "Minor missing";
exit 1;
fi
@cvvergara
cvvergara / run.sh
Last active May 19, 2017 08:34
a script to do lots of stuff when developing pgrouting v2.4
#!/bin/bash
set -e
function test_compile {
echo ------------------------------------
echo ------------------------------------
echo Compiling with $1
echo ------------------------------------
@cvvergara
cvvergara / code_improve_task.hpp
Last active September 7, 2016 13:49
GSoC student applicant: Task improve this code
/*
GSoC student applicant:
Task improve this code.
Things to keep in mind:
- parameters: what changes? what does not change) (const)
- what is the return value? void or Path?
- how is it going to be easier to use:
...
Path my_path;
@cvvergara
cvvergara / run.sh
Last active September 5, 2016 19:06
A petit shell for pgRouting developers
# place at the top of the repository
# build must exist
set -e
cd build/
#cmake -DWITH_DOC=ON -DBUILD_DOXY=ON ..
cmake ..
make
sudo make install
@cvvergara
cvvergara / statsQuery.sql
Last active August 29, 2015 14:21
Query to create statistics
/* example usage
select * from statsQuery( 10,3,
'pgr_drivingDistance(',
'select id, source, target, cost, reverse_cost from eu_2po_4pgr where id <> 1',
', 1 , 0.005 , false, true)'
);
select * from statsQuery(10,3, 'pgr_dijkstra(',
'select id, source, target, cost, reverse_cost from eu_2po_4pgr
where id <> 1 ',
@cvvergara
cvvergara / boostDijkstraTest3.cpp
Last active August 29, 2015 14:18
Handles Directed & undirected graphs, simulates the input data and the output data, uses 3 boost libraries
#include <boost/config.hpp>
#include <iostream>
#include <iterator>
#include <exception>
#include <stdlib.h>
#include <fstream>
#include "postgres.h"
@cvvergara
cvvergara / sampledataSparce.data
Created April 9, 2015 05:10
Documentation Data, but vertices id's are times 10
18
1 10 20 1 2
2 20 30 -1 2
3 30 40 -1 2
4 20 50 1 2
5 30 60 1 -1
6 70 80 1 2
7 80 50 1 2
8 50 60 1 2
9 60 90 1 2