Thanks for hosting Dave.
To follow up on our brief discussion of PiCloud: What you get is on-demand execution of your pure python code. Not sure what type of 'markup' this represents on EC2 pricing. But a managed cloud in ~5 lines of code seems like a decent markDOWN in complexity.
Below is a wrapper module I named picloud.py. To import elsewhere and run arbitrary functions.
Note the doctests! Chronicling the evolution of the capability from no args to args to numpy to confirming we want func not just *args. Culminating in a defacto documentation/tutorial.
(As you have all realized by now: my expertise is only in the TDD unit testing, not the actual coding ;-)
See ya'll next time.
PiCloud architecture wrapper.
Account: [address removed]
def run(func, *args):
"""Run a Python function with args on PiCloud.
>>> run(lambda: 1+2)
>>> def add(first, second):
... return first + second
>>> run(add, 1, 2)
>>> import numpy as np
>>> run(np.sum, np.array([1, 2]))
Traceback (most recent call last):
TypeError: run() takes at least 1 argument (0 given)
job_id = cloud.call(func, *args)
if __name__ == '__main__':