This file contains 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
/*PGR-GNU***************************************************************** | |
Copyright (c) 2015 pgRouting developers | |
Author: Stephen Woodbridge <[email protected]> | |
Author: Vicky Vergara <vicky_vergara@hotmail,com> | |
Mail: [email protected] | |
------ | |
This program is free software; you can redistribute it and/or modify |
This file contains 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
#!/bin/bash | |
BITLOCKER_PARTITION="${1}" | |
BITLOCKER_PASSWORD="${2}" | |
function usage() { | |
echo "$(basename ${0}) <partition> <password>" | |
echo "Unlocks and mounts a bitlocker partition as read-only" | |
} | |
if [ -z "${BITLOCKER_PARTITION}" ] |
This file contains 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 | |
ogc_fid, | |
sum(degrees(atan2(opposite, adjacent))) as delta_degrees | |
from | |
(select | |
ogc_fid, | |
point_idx, | |
st_3ddistance(unit_tangent_endpoint, unit_vector_endpoint) as opposite, | |
st_3ddistance(common_point, unit_vector_endpoint) as adjacent | |
from |
This file contains 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
/* | |
We have to build a new replacement LinestringZ rather than use | |
ST_SetPoint() since UPDATE can only change a single row, and | |
the column type in question is LinestringZ, not PointZ. | |
*/ | |
select st_astext(st_makeline( | |
array(select st_makepoint(st_x(point), st_y(point), z) as new_point | |
from | |
(select st_pointn(wkb_geometry, point_idx) as point, | |
st_value(rast, st_pointn(wkb_geometry, point_idx)) as z |
This file contains 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 httplib2 | |
import oauth2client.client | |
import pprint | |
from apiclient.discovery import build | |
serviceacct_email = "<your service account email address>" | |
f = file('groupssettings-privatekey.p12', 'rb') | |
client_key = f.read() | |
f.close() |