Get gdal development libraries:
$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev
Create and activate a virtual environment:
# SNAKES GAME | |
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting | |
import curses | |
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN | |
from random import randint | |
curses.initscr() | |
win = curses.newwin(20, 60, 0, 0) |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
class Geo(private val lat: Double, private val lon: Double) { | |
companion object { | |
const val earthRadiusKm: Double = 6372.8 | |
} | |
/** | |
* Haversine formula. Giving great-circle distances between two points on a sphere from their longitudes and latitudes. | |
* It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the | |
* sides and angles of spherical "triangles". |