Probably the bottleneck is the multiple GET requests. You can probably achieve a significant speed-up by using the httplib
library which gives you more control over the underlying connection.
Try this:
import httplib
host = 'api.forecast.io'
conn = httplib.HTTPSConnection(host)
urlnyp = '/forecast/apikey/1.37871,103.848808'
conn.request('GET', urlnyp)
resultnyp = conn.getresponse()
contentnyp = resultnyp.read()
urltampines = '/forecast/apikey/1.353092,103.945229'
conn.request('GET', urltampines)
resulttampines = conn.getresponse()
contenttampines = resulttampines.read()
# ...
conn.close()