yt.rife /

from functools import wraps
import pyro
import inspect

def requires_pf(func):
    def wrap(self, *args, **kwargs):
        if is None: raise RuntimeError
        return func(self, *args, **kwargs)
    return wrap

def broadcasted_action(func):
    def sender(self, *args, **kwargs):
        argspec = inspect.getcallargs(func, *args, **kwargs)
        msg = dict(type = func.func_name,
                   args = argspec)
        func(self, *args, **kwargs)
    return sender

class LockstepProxy(object):
    name = None
    _run = True
    def __init__(self, name, comm = None): = name
        if comm is None:
            raise RuntimeError
        self.comm = comm

    def send(self, msg):

    def receive(self, msg):
        func = getattr(self, msg['type'])
    def runwait(self):
        while self._run:
            msg = self.comm.mpi_bcast_pickled(None)
            if msg is not None: self.receive(msg)

class VolumeRenderingHandler(LockstepProxy):
    pf = None
    name = None

    def load(self, fn, resolution = 1024): = load(fn)
        if is None: raise IOError(fn)
        c = ( + =, [1.0, 1.0, 1.0],
                      1.0/pf['unitary'], resolution, None)

    def switch_view(self, normal_vector, width, center, north_vectors):, width, center, north_vectors)

    def render(self):
        # In here is where we broadcast to all the other processors (if we have
        # them running!) what the view is, before we snapshot.
        # We can get this from cam.normal_vector, cam.width, cam.north_vector
        if is None:
            raise RuntimeError
        sn =
        return sn

    def isocontours(self, limits, nlayers, width): = ColorTransferFunction(limits), w=width)

if __name__ == "__main__":
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.