Skip to content

Instantly share code, notes, and snippets.

View fabiosato's full-sized avatar

Fabio Sato (@grooel) fabiosato

View GitHub Profile

Keybase proof

I hereby claim:

  • I am fabiosato on github.
  • I am fabiosato (https://keybase.io/fabiosato) on keybase.
  • I have a public key ASDnsbprWQsVhTm_H1EhLWkrMvuVMWeBDVigT0NFoMRZFwo

To claim this, I am signing this object:

# Adds ubuntugis PPA for latest GIS packages
sudo add-apt-repository 'deb http://ppa.launchpad.net/ubuntugis/ppa/ubuntu xenial main'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 314DF160
sudo apt update
sudo apt upgrade
@fabiosato
fabiosato / country-bounding-boxes.py
Created February 2, 2017 17:54 — forked from graydon/country-bounding-boxes.py
country bounding boxes
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
@fabiosato
fabiosato / digits-knn.py
Last active November 3, 2015 17:00
kNN Classification of digits using scikit-learn
from sklearn.metrics import confusion_matrix, accuracy_score
from sklearn import cross_validation
# load sample dataset of digits
digits = datasets.load_digits()
# prepare datasets from training and for validation
X_train, X_test, y_train, y_test = cross_validation.train_test_split(digits.data, digits.target, test_size=0.4, random_state=0)
# runs the kNN classifier for even number of neighbors from 1 to 10
@fabiosato
fabiosato / pptpd.sh
Created February 5, 2012 18:06 — forked from yinhm/pptpd.sh
Automaticlly install pptpd on Amazon EC2 Amazon Linux
# Automaticlly install pptpd on Amazon EC2 Amazon Linux
#
# Ripped from http://blog.diahosting.com/linux-tutorial/pptpd/
# pptpd source rpm packing by it's authors
#
# WARNING:
# first ms-dns setting to 172.16.0.23, 172.16.0.23 was showing on my
# /etc/resolv.conf, I'm not sure this is the same on all Amazon AWS zones.
#
# You need to adjust your "Security Groups" which you are using too.