- You can store a price in a floating point variable.
- All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
- All currencies are subdivided in decimal units (like dinar/fils)
- All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
- All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
- Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
- For any currency you can have a price of 1. (ZWL)
- Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
# 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)), |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
An area ID in Overpass is the OSM relation ID + 3600000000
This information is kind of buried in the Overpass API wiki page documenting the available filters: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_area_.28area.29
The OSM relation ID can be seen in two places:
- Visit https://www.openstreetmap.org and search for the city
- Click on its entry and you will be taken to a
https://www.openstreetmap.org/relation/SOME_NUMBER_HERE
page - The relation ID is in the URL as "SOME_NUMBER_HERE" in the bullet point above
- The relation ID will also be in parentheses next to the city name in the left column
-- LR imports | |
local LrApplication = import("LrApplication") | |
local LrApplicationView = import("LrApplicationView") | |
local LrBinding = import("LrBinding") | |
local LrDevelopController = import("LrDevelopController") | |
local LrDialogs = import("LrDialogs") | |
local LrExportSession = import("LrExportSession") | |
local LrFileUtils = import("LrFileUtils") | |
local LrFunctionContext = import("LrFunctionContext") | |
local LrLogger = import("LrLogger") |
// LZW-compress a string | |
function lzw_encode(s) { | |
var dict = {}; | |
var data = (s + "").split(""); | |
var out = []; | |
var currChar; | |
var phrase = data[0]; | |
var code = 256; | |
for (var i=1; i<data.length; i++) { | |
currChar=data[i]; |
#“A data scientist is someone who knows more statistics than a computer scientist and more computer science than a statistician.” -Josh Blumenstock
#"A geo-data scientist is someone who knows more about GIS than either of those guys." -Tyler Dahlberg
#Going Geo Open Source In all likelihood a list like this has been written somewhere, by someone, for some reason. I know I'm not breaking any ground here; I'm just trying to organize on paper what's been going through my head ever since I got out of grad school.
This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.
To use the script, follow the instructions given in the script's docstring.
For further details, read this blogpost.
The procedure outlined here is inspired by this answer on Stack Overflow.
from sklearn import linear_model | |
from scipy import stats | |
import numpy as np | |
class LinearRegression(linear_model.LinearRegression): | |
""" | |
LinearRegression class after sklearn's, but calculate t-statistics | |
and p-values for model coefficients (betas). | |
Additional attributes available after .fit() |