Display a list of actors
336648
def actors(context):
    """"""
    fritz = context.obj
    fritz.login()

    for actor in fritz.get_actors():
        click.echo("{} ({} {}; AIN {} )".format(
            actor.name,
            actor.manufacturer,
            actor.productname,
            actor.actor_id,
        ))
        if actor.has_temperature:
            click.echo("Temp: act {} target {}; battery (low): {}".format(
                actor.temperature,
                actor.target_temperature,
                actor.battery_low,
            ))

            click.echo("Temp (via get): act {} target {}".format(
                actor.get_temperature(),
                actor.get_target_temperature(),
            ))
407963
def actors(self, actors):
        
        if actors is None:
            actors = self.default_actors()
        self.check_actors(actors)
        self.config["actors"] = actors
823319
def show_all(imgs:Collection[Image], r:int=1, c:Optional[int]=None, figsize=(12,6)):
    ""
    imgs = listify(imgs)
    if c is None: c = len(imgs)//r
    for i,ax in plot_flat(r,c,figsize): imgs[i].show(ax)
1254062
def output_list(self, category):
        """"""
        print('{} users:'.format(category))
        for user in getattr(self.sub, category):
            print('  {}'.format(user))
512202
def display(self, previous=0, include_data=False):
        """"""
        no_data = " (No Data)" if self.data is None else ""
        return (
            (" +" * previous) + str(self.name) + no_data + '\n' +
            ''.join([child.display(previous + 1) for child in self.children]))
579324
async def movies(self):
    '''
    '''
    items = []
    for i in await self.items:
      if i.type == 'Movie':
        items.append(i)
      elif hasattr(i, 'movies'):
        items.extend(await i.movies)
    return items
1089374
def display_list(prefix, l, color):
    
    for itm in l: print colored(prefix + itm['path'], color)
1206400
def printInfo(obj):
    """"""

    def printvtkactor(actor, tab=""):

        if not actor.GetPickable():
            return

        if hasattr(actor, "polydata"):
            poly = actor.polydata()
        else:
            poly = actor.GetMapper().GetInput()
        pro = actor.GetProperty()
        pos = actor.GetPosition()
        bnds = actor.GetBounds()
        col = pro.GetColor()
        colr = precision(col[0], 3)
        colg = precision(col[1], 3)
        colb = precision(col[2], 3)
        alpha = pro.GetOpacity()
        npt = poly.GetNumberOfPoints()
        ncl = poly.GetNumberOfCells()

        print(tab, end="")
        colors.printc("vtkActor", c="g", bold=1, invert=1, dim=1, end=" ")

        if hasattr(actor, "_legend") and actor._legend:
            colors.printc("legend: ", c="g", bold=1, end="")
            colors.printc(actor._legend, c="g", bold=0)
        else:
            print()

        if hasattr(actor, "filename") and actor.filename:
            colors.printc(tab + "           file: ", c="g", bold=1, end="")
            colors.printc(actor.filename, c="g", bold=0)

        colors.printc(tab + "          color: ", c="g", bold=1, end="")
        if actor.GetMapper().GetScalarVisibility():
            colors.printc("defined by point or cell data", c="g", bold=0)
        else:
            colors.printc(colors.getColorName(col) + ', rgb=('+colr+', '
                          + colg+', '+colb+'), alpha='+str(alpha), c='g', bold=0)

            if actor.GetBackfaceProperty():
                bcol = actor.GetBackfaceProperty().GetDiffuseColor()
                bcolr = precision(bcol[0], 3)
                bcolg = precision(bcol[1], 3)
                bcolb = precision(bcol[2], 3)
                colors.printc(tab+'     back color: ', c='g', bold=1, end='')
                colors.printc(colors.getColorName(bcol) + ', rgb=('+bcolr+', '
                              + bcolg+', ' + bcolb+')', c='g', bold=0)

        colors.printc(tab + "         points: ", c="g", bold=1, end="")
        colors.printc(npt, c="g", bold=0)

        colors.printc(tab + "          cells: ", c="g", bold=1, end="")
        colors.printc(ncl, c="g", bold=0)

        colors.printc(tab + "       position: ", c="g", bold=1, end="")
        colors.printc(pos, c="g", bold=0)

        if hasattr(actor, "polydata"):
            colors.printc(tab + "     c. of mass: ", c="g", bold=1, end="")
            colors.printc(actor.centerOfMass(), c="g", bold=0)

            colors.printc(tab + "      ave. size: ", c="g", bold=1, end="")
            colors.printc(precision(actor.averageSize(), 4), c="g", bold=0)

            colors.printc(tab + "     diag. size: ", c="g", bold=1, end="")
            colors.printc(actor.diagonalSize(), c="g", bold=0)

            colors.printc(tab + "           area: ", c="g", bold=1, end="")
            colors.printc(precision(actor.area(), 8), c="g", bold=0)

            colors.printc(tab + "         volume: ", c="g", bold=1, end="")
            colors.printc(precision(actor.volume(), 8), c="g", bold=0)

        colors.printc(tab + "         bounds: ", c="g", bold=1, end="")
        bx1, bx2 = precision(bnds[0], 3), precision(bnds[1], 3)
        colors.printc("x=(" + bx1 + ", " + bx2 + ")", c="g", bold=0, end="")
        by1, by2 = precision(bnds[2], 3), precision(bnds[3], 3)
        colors.printc(" y=(" + by1 + ", " + by2 + ")", c="g", bold=0, end="")
        bz1, bz2 = precision(bnds[4], 3), precision(bnds[5], 3)
        colors.printc(" z=(" + bz1 + ", " + bz2 + ")", c="g", bold=0)

        arrtypes = dict()
        arrtypes[vtk.VTK_UNSIGNED_CHAR] = "VTK_UNSIGNED_CHAR"
        arrtypes[vtk.VTK_UNSIGNED_INT] = "VTK_UNSIGNED_INT"
        arrtypes[vtk.VTK_FLOAT] = "VTK_FLOAT"
        arrtypes[vtk.VTK_DOUBLE] = "VTK_DOUBLE"

        if poly.GetPointData():
            ptdata = poly.GetPointData()
            for i in range(ptdata.GetNumberOfArrays()):
                name = ptdata.GetArrayName(i)
                if name:
                    colors.printc(tab + "     point data: ", c="g", bold=1, end="")
                    try:
                        tt = arrtypes[ptdata.GetArray(i).GetDataType()]
                        colors.printc("name=" + name, "type=" + tt, c="g", bold=0)
                    except:
                        tt = ptdata.GetArray(i).GetDataType()
                        colors.printc("name=" + name, "type=", tt, c="g", bold=0)

        if poly.GetCellData():
            cldata = poly.GetCellData()
            for i in range(cldata.GetNumberOfArrays()):
                name = cldata.GetArrayName(i)
                if name:
                    colors.printc(tab + "      cell data: ", c="g", bold=1, end="")
                    try:
                        tt = arrtypes[cldata.GetArray(i).GetDataType()]
                        colors.printc("name=" + name, "type=" + tt, c="g", bold=0)
                    except:
                        tt = cldata.GetArray(i).GetDataType()
                        colors.printc("name=" + name, "type=", tt, c="g", bold=0)

    if not obj:
        return

    elif isinstance(obj, vtk.vtkActor):
        colors.printc("_" * 60, c="g", bold=0)
        printvtkactor(obj)

    elif isinstance(obj, vtk.vtkAssembly):
        colors.printc("_" * 60, c="g", bold=0)
        colors.printc("vtkAssembly", c="g", bold=1, invert=1, end=" ")
        if hasattr(obj, "_legend"):
            colors.printc("legend: ", c="g", bold=1, end="")
            colors.printc(obj._legend, c="g", bold=0)
        else:
            print()

        pos = obj.GetPosition()
        bnds = obj.GetBounds()
        colors.printc("          position: ", c="g", bold=1, end="")
        colors.printc(pos, c="g", bold=0)

        colors.printc("            bounds: ", c="g", bold=1, end="")
        bx1, bx2 = precision(bnds[0], 3), precision(bnds[1], 3)
        colors.printc("x=(" + bx1 + ", " + bx2 + ")", c="g", bold=0, end="")
        by1, by2 = precision(bnds[2], 3), precision(bnds[3], 3)
        colors.printc(" y=(" + by1 + ", " + by2 + ")", c="g", bold=0, end="")
        bz1, bz2 = precision(bnds[4], 3), precision(bnds[5], 3)
        colors.printc(" z=(" + bz1 + ", " + bz2 + ")", c="g", bold=0)

        cl = vtk.vtkPropCollection()
        obj.GetActors(cl)
        cl.InitTraversal()
        for i in range(obj.GetNumberOfPaths()):
            act = vtk.vtkActor.SafeDownCast(cl.GetNextProp())
            if isinstance(act, vtk.vtkActor):
                printvtkactor(act, tab="     ")

    elif hasattr(obj, "interactor"):  # dumps Plotter info
        axtype = {
            0: "(no axes)",
            1: "(three gray grid walls)",
            2: "(cartesian axes from origin",
            3: "(positive range of cartesian axes from origin",
            4: "(axes triad at bottom left)",
            5: "(oriented cube at bottom left)",
            6: "(mark the corners of the bounding box)",
            7: "(ruler at the bottom of the window)",
            8: "(the vtkCubeAxesActor object)",
            9: "(the bounding box outline)",
            10: "(circles of maximum bounding box range)",
        }
        bns, totpt = [], 0
        for a in obj.actors:
            b = a.GetBounds()
            if a.GetBounds() is not None:
                if isinstance(a, vtk.vtkActor):
                    totpt += a.GetMapper().GetInput().GetNumberOfPoints()
                bns.append(b)
        if len(bns) == 0:
            return
        acts = obj.getActors()
        colors.printc("_" * 60, c="c", bold=0)
        colors.printc("Plotter", invert=1, dim=1, c="c", end=" ")
        otit = obj.title
        if not otit:
            otit = None
        colors.printc("   title:", otit, bold=0, c="c")
        colors.printc(" active renderer:", obj.renderers.index(obj.renderer), bold=0, c="c")
        colors.printc("   nr. of actors:", len(acts), bold=0, c="c", end="")
        colors.printc(" (" + str(totpt), "vertices)", bold=0, c="c")
        max_bns = np.max(bns, axis=0)
        min_bns = np.min(bns, axis=0)
        colors.printc("      max bounds: ", c="c", bold=0, end="")
        bx1, bx2 = precision(min_bns[0], 3), precision(max_bns[1], 3)
        colors.printc("x=(" + bx1 + ", " + bx2 + ")", c="c", bold=0, end="")
        by1, by2 = precision(min_bns[2], 3), precision(max_bns[3], 3)
        colors.printc(" y=(" + by1 + ", " + by2 + ")", c="c", bold=0, end="")
        bz1, bz2 = precision(min_bns[4], 3), precision(max_bns[5], 3)
        colors.printc(" z=(" + bz1 + ", " + bz2 + ")", c="c", bold=0)
        colors.printc("       axes type:", obj.axes, axtype[obj.axes], bold=0, c="c")

        for a in obj.actors:
            if a.GetBounds() is not None:
                if isinstance(a, vtk.vtkVolume):  # dumps Volume info
                    img = a.GetMapper().GetDataSetInput()
                    colors.printc('_'*60, c='b', bold=0)
                    colors.printc('Volume', invert=1, dim=1, c='b')
                    colors.printc('      scalar range:',
                                  np.round(img.GetScalarRange(), 4), c='b', bold=0)
                    bnds = a.GetBounds()
                    colors.printc("            bounds: ", c="b", bold=0, end="")
                    bx1, bx2 = precision(bnds[0], 3), precision(bnds[1], 3)
                    colors.printc("x=(" + bx1 + ", " + bx2 + ")", c="b", bold=0, end="")
                    by1, by2 = precision(bnds[2], 3), precision(bnds[3], 3)
                    colors.printc(" y=(" + by1 + ", " + by2 + ")", c="b", bold=0, end="")
                    bz1, bz2 = precision(bnds[4], 3), precision(bnds[5], 3)
                    colors.printc(" z=(" + bz1 + ", " + bz2 + ")", c="b", bold=0)

        colors.printc(" Click actor and press i for Actor info.", c="c")

    else:
        colors.printc("_" * 60, c="g", bold=0)
        colors.printc(obj, c="g")
        colors.printc(type(obj), c="g", invert=1)
359223
def show_list(self, the_list, cur_p=''):
        '''
        
        '''

        current_page_num = int(cur_p) if cur_p else 1
        current_page_num = 1 if current_page_num < 1 else current_page_num

        num_of_cat = MCollect.count_of_user(self.userinfo.uid)
        page_num = int(num_of_cat / CMS_CFG['list_num']) + 1

        kwd = {'current_page': current_page_num}

        self.render('misc/collect/list.html',
                    recs_collect=MCollect.query_pager_by_all(self.userinfo.uid,
                                                             current_page_num).objects(),
                    pager=tools.gen_pager_purecss('/collect/{0}'.format(the_list),
                                                  page_num,
                                                  current_page_num),
                    userinfo=self.userinfo,

                    cfg=CMS_CFG,
                    kwd=kwd)
271737
def list(gandi, limit, step):
    """"""
    output_keys = ['id', 'type', 'step']

    options = {
        'step': step,
        'items_per_page': limit,
        'sort_by': 'date_created DESC'
    }

    result = gandi.oper.list(options)
    for num, oper in enumerate(reversed(result)):
        if num:
            gandi.separator_line()
        output_generic(gandi, oper, output_keys)

    return result
239466
private function showlist()
     {
        $this->getMessage('help');

        foreach ($this->options as $opt) {
            echo "\n";
            echo "\t \t \t", $this->log(" ".$opt['name']." => ".$opt['description']." ", 'success');
            echo "\n";
        }
     }
152217
def list(self, argv):
        """"""

        def read(index):
            print(index.name)
            for key in sorted(index.content.keys()): 
                value = index.content[key]
                print("    %s: %s" % (key, value))

        if len(argv) == 0:
            for index in self.service.indexes:
                count = index['totalEventCount']
                print("%s (%s)" % (index.name, count))
        else:
            self.foreach(argv, read)
433426
def show
      script_listing = Script::Listing.find(params[:listing_id])
      @script_url = script_listing.urls.friendly.find(params[:id])
    end
282218
def list_users(self, instance, limit=None, marker=None):
        """"""
        return instance.list_users(limit=limit, marker=marker)
674489
def display_list_by_prefix(names_list, starting_spaces=0):
  """"""
  cur_prefix, result_lines = None, []
  space = " " * starting_spaces
  for name in sorted(names_list):
    split = name.split("_", 1)
    prefix = split[0]
    if cur_prefix != prefix:
      result_lines.append(space + prefix + ":")
      cur_prefix = prefix
    result_lines.append(space + "  * " + name)
  return "\n".join(result_lines)
380384
def getInstrumentsDisplayList(self):
        
        items = [(i.UID(), i.Title()) for i in self.getInstruments()]
        return DisplayList(list(items))
329642
def show():
    """"""
    items = list(collection.find())
    # JSON conversion chokes on the _id objects, so we convert
    # them to strings here
    for i in items:
        i['_id'] = str(i['_id'])
    return items