Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Last active June 1, 2017 04:33
Show Gist options
  • Save sergiolucero/306d3325b94578c363f865c65bb9b181 to your computer and use it in GitHub Desktop.
Save sergiolucero/306d3325b94578c363f865c65bb9b181 to your computer and use it in GitHub Desktop.
basic Dask example
from dask.distributed import Client, local_client
from dask import delayed, compute
@delayed
def dostand(stand):
stand.compute_stand_values_by_area()
stand.compute_stand_values_by_volume()
stand.compute_NPV()
def standloop(standlist, option_dict):
c = Client()
standflow = [dostand(stand) for stand in standlist]
compute(standflow) #get=dask.async.get_sync)
c.shutdown()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment