Esempio n. 1
0
 def setUp(self):
     config = pywren.wrenconfig.default()
     self.aws_region = config['account']['aws_region']
     self.wrenexec = pywren.remote_executor()
Esempio n. 2
0
import pywren

if __name__ == "__main__":

    lambda_exec = pywren.lambda_executor()
    remote_exec = pywren.remote_executor()

    def increment(x):
        return x + 1

    x = [1, 2, 3, 4]
    futures = lambda_exec.map(increment, x)

    def reduce_func(x):
        return sum(x)

    reduce_future = remote_exec.reduce(reduce_func, futures)
    print reduce_future.result()
Esempio n. 3
0
 def setUp(self):
     self.lambda_exec = pywren.lambda_executor()
     self.remote_exec = pywren.remote_executor()
Esempio n. 4
0
 def setUp(self):
     self.wrenexec = pywren.remote_executor()