Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Created December 19, 2017 14:40
Show Gist options
  • Save sergiolucero/a433204ddd37df471ce98353fbd7906f to your computer and use it in GitHub Desktop.
Save sergiolucero/a433204ddd37df471ce98353fbd7906f to your computer and use it in GitHub Desktop.
tough to dask
from dask.distributed import Client
# stands are a list of 50-100 objects with associated methods
def crunched(stand):
stand.compute_stand_volume() # aqui esta el costo del BN1
return stand
client = Client()
y = [client.submit(crunched, stand) for stand in stands]
self.stands = client.gather(y) # collect the results
client.shutdown()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment