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
from pathlib import Path | |
from osgeo import gdal, osr | |
# Adapted from https://svn.osgeo.org/gdal/trunk/autotest/alg/warp.py | |
def warp_with_gcps(input_path, output_path, gcps, gcp_epsg=3301, output_epsg=3301): | |
# Open the source dataset and add GCPs to it | |
src_ds = gdal.OpenShared(str(input_path), gdal.GA_ReadOnly) | |
gcp_srs = osr.SpatialReference() | |
gcp_srs.ImportFromEPSG(gcp_epsg) | |
gcp_crs_wkt = gcp_srs.ExportToWkt() |
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
last name | first name | gender | race | |
---|---|---|---|---|
abbott | leslie b | f | white | |
abbott | peggy s | f | white | |
abernathy | rebecca r | f | white | |
abidin | antoinette | f | white | |
able | shaylene n | f | white | |
abrahante | adneris e | f | white | |
abrams | melanie a | f | white | |
abreu | adriana | f | white | |
acevedo | angela n | f | white |
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
# 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)), |
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 socket | |
HOST = 'localhost' | |
PORT = 9876 | |
ADDR = (HOST,PORT) | |
BUFSIZE = 4096 | |
videofile = "videos/royalty-free_footage_wien_18_640x360.mp4" | |
bytes = open(videofile).read() |
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
from osgeo import gdal | |
from osgeo import osr | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from mpl_toolkits.basemap import Basemap | |
def reproject_dataset ( dataset, \ | |
pixel_spacing=0.463/100., \ | |
wkt_from="+proj=sinu +R=6371007.181 +nadgrids=@null +wktext", epsg_to=4326 ): |
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
/** | |
* Module dependencies | |
*/ | |
var express = require('express'); | |
var fs = require('fs'); | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
// img path |
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 numpy as np | |
def symdirichlet(alpha, n): | |
v = np.zeros(n)+alpha | |
return np.random.dirichlet(v) | |
def exp_digamma(x): | |
if x < 0.1: | |
return x/100 |