This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
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 | |
sudo apt-get update | |
sudo apt-get -y install linux-image-extra-$(uname -r) | |
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" | |
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list" | |
sudo apt-get update | |
sudo apt-get -y install lxc-docker |
The PostgreSQL native FDW (foreign data wrapper), postgres_fdw
allows you to access tables from remote PostgreSQL servers very transparently, even doing thoughtful things like pushing restrictions to the remote server to reduce the amount of data transferred and ensure work is done close to the data.
Out of the box, the standard PostgreSQL FDW also allows PostGIS geometry to transit from remote to local hosts, which is pretty cool.
However, it will not push spatial restrictions from the local host to the remote host, only restrictions that relate to built-in types. I've done a rough and ready patch to the 9.4 branch to allow spatial restrictions to pass over FDW, and it is available here:
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 | |
# Destination must exist as empty repo on github | |
GIT_REPO="git@github.com:opencog/opencog.git" | |
TEMP_PATH=~/src/opencog_bzr_to_git | |
echo "Using $TEMP_PATH as working dir" | |
BRANCHES=(trunk UnityEmbodiment) | |
mkdir -p ${TEMP_PATH} | |
cd ${TEMP_PATH} |
- Tensegrity photo by James Myers
- Multi camera mount: https://www.itech-ny.com/blog/bid/283101/Can-I-Fast-Forward-Through-My-Surveillance-Camera-System-Footage
- NZ Herald article on Auckland CCTV network: http://m.nzherald.co.nz/nz/news/article.cfm?c_id=1&objectid=11550646
- Example surveillance camera photo: http://www.silive.com/news/index.ssf/2009/03/staten_island_stores_surveilla.html
- NeuralTalk and Walk https://vimeo.com/146492001
- Yoda riding a skateboard: https://medium.com/@samim/generating-captions-c31f00e8396e
- Lena https://en.wikipedia.org/wiki/Lenna
- Fabio Lanzoni first used by Needell and Ward in http://arxiv.org/abs/1202.6429
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
#!/usr/bin/env bash | |
set -e | |
# Installation script for Cuda and drivers on Ubuntu 14.04, by Roelof Pieters (@graphific) | |
# BSD License | |
if [ "$(whoami)" == "root" ]; then | |
echo "running as root, please run as user you want to have stuff installed as" | |
exit 1 | |
fi |
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
#!/usr/bin/env bash | |
set -e | |
# Test script for checking if Cuda and Drivers correctly installed on Ubuntu 14.04, by Roelof Pieters (@graphific) | |
# BSD License | |
if [ "$(whoami)" == "root" ]; then | |
echo "running as root, please run as user you want to have stuff installed as" | |
exit 1 |
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
#!/usr/bin/env bash | |
# Installation script for Deep Learning Libraries on Ubuntu 14.04, by Roelof Pieters (@graphific) | |
# BSD License | |
orig_executor="$(whoami)" | |
if [ "$(whoami)" == "root" ]; then | |
echo "running as root, please run as user you want to have stuff installed as" | |
exit 1 | |
fi | |
################################### |
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
#!/usr/bin/env python | |
# gpu_stat.py [DELAY [COUNT]] | |
# dump gpu stats as a line of json | |
# {"time": 1474168378.146957, "pci_tx": 146000, "pci_rx": 1508000, | |
# "gpu_util": 42, "mem_util": 24, "mem_used": 11710, | |
# "temp": 76, "fan_speed": 44 } |
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 | |
resolve_path() { | |
# From https://github.com/keen99/shell-functions/tree/master/resolve_path | |
#I'm bash only, please! | |
# usage: resolve_path <a file or directory> | |
# follows symlinks and relative paths, returns a full real path | |
# | |
local owd="$PWD" | |
#echo "$FUNCNAME for $1" >&2 |