G^e^o
| split :: String -> [String] | |
| split [] = [""] | |
| split (c:cs) | c == ',' = "" : rest | |
| | otherwise = (c : head rest) : tail rest | |
| where rest = split cs | |
| nameexists :: String -> [[String]] -> Bool | |
| nameexists a [] = False | |
| nameexists a (x:xs) | x !! 0 == a = True | |
| | otherwise = nameexists a xs |
| #!/usr/bin/env python | |
| from owslib.wcs import WebCoverageService | |
| import logging | |
| def GetCapabilities(path): | |
| if not path.startswith('http'): | |
| print "Malformed path, should start with http" | |
| return |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type Array struct { | |
| Data []byte | |
| Shape []int | |
| Offset []int |
| import numpy as np | |
| from osgeo import gdal | |
| from PIL import Image | |
| import netCDF4 | |
| import json | |
| import os | |
| import sys | |
| import datetime | |
| import argparse | |
| import time |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/aws/aws-sdk-go/aws" | |
| "github.com/aws/aws-sdk-go/aws/awserr" | |
| "github.com/aws/aws-sdk-go/aws/session" | |
| "github.com/aws/aws-sdk-go/service/s3" | |
| ) |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type Stringer struct { | |
| In chan *string | |
| Out chan *string | |
| Error chan error |
Go has a very nice concurrency model which is based on light goroutines which can communicate through channels. This model provides a great abstraction which facilitates the design and synchronisation of concurrent processes. Go programs can naturally scale and fully utilise the resources on a machine.
However, there are some cases where a single machine, even the most powerful in the market, is not enough to solve certain problems. The required work in these cases, can be splitted and distributed between different nodes which can work colaboratively to compute the result. Go's concurrency model is intended to solve communication between goroutines within a single process but, as it is implemented now, it cannot be used for communicating between processes or nodes.
There have been attemps to extend the concept of channels to communicate with external goroutines, such as netchans. The Go team worked actively in the design and implementation of this concept but unfortu
| package main | |
| import ( | |
| "fmt" | |
| "github.com/golang/geo/s2" | |
| ) | |
| func main() { | |
| // Definition of LatLng slice |