Categorize a function.

    The help command output will group this function under the specified category heading

    :param func: function to categorize
    :param category: category to put it in
491052
def categorize(func: Union[Callable, Iterable], category: str) -> None:
    
    if isinstance(func, Iterable):
        for item in func:
            setattr(item, HELP_CATEGORY, category)
    else:
        setattr(func, HELP_CATEGORY, category)
602392
public void sort(String func) {
        if (func == null || func.isEmpty()) {
            Object ary = invokeJavascript("sort");
        } else {
            Object ary = invokeJavascript("sort", func);
        }
    }
825022
def group_plugins_into_categories(plugins):
    
    if not plugins:
        return {}
    plugins = sorted(plugins, key=lambda p: p.verbose_name)
    categories = {}

    for plugin in plugins:
        title = str(plugin.category or u"")  # enforce resolving ugettext_lazy proxies.
        if title not in categories:
            categories[title] = []
        categories[title].append(plugin)

    return categories
678968
def _categorize(self, category):
		""""""
		self.torrents = [result for result in self.torrents
						 if result.category == category]
122623
def categories(self, value):
        

        if value is not None:
            assert type(value) is dict, "'{0}' attribute: '{1}' type is not 'dict'!".format("categories", value)
            for key in value:
                assert type(key) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                    "categories", key)
        self.__categories = value
314371
def add_cmd(self, name, help=None, func=None):
        
        if self.subparsers is None:
            self.subparsers = self.add_subparsers(
                title="sub-commands",
                help=help or 'sub-commands',
            )

        parser = self.subparsers.add_parser(
            name,
            help=help,
        )
        if func is not None:
            parser.set_defaults(_func=func)
        return parser
751285
def categorize(df, name, value, criteria,
               color=None, marker=None, linestyle=None, **kwargs):
    
    fdf = df.filter(**kwargs)
    fdf.categorize(name=name, value=value, criteria=criteria, color=color,
                   marker=marker, linestyle=linestyle)

    # update metadata
    if name in df.meta:
        df.meta[name].update(fdf.meta[name])
    else:
        df.meta[name] = fdf.meta[name]
682094
def command(self, group=None, help="", name=None):
        """"""
        def decorator(func):
            return self.add_command(func, group=group, help=help, name=name)
        return decorator
89647
def categories(self, value):
        

        if value is not None:
            assert type(value) is dict, "'{0}' attribute: '{1}' type is not 'dict'!".format("categories", value)
            for key, element in value.iteritems():
                assert type(key) is dict, "'{0}' attribute: '{1}' type is not 'dict'!".format("categories", key)
                assert type(element) is list, "'{0}' attribute: '{1}' type is not 'list'!".format(
                    "categories", element)
        self.__categories = value
628897
def help_func():
    
    tprint("art")
    tprint("v" + VERSION)
    print(DESCRIPTION + "\n")
    print("Webpage : http://art.shaghighi.ir\n")
    print("Help : \n")
    print("     - list --> (list of arts)\n")
    print("     - fonts --> (list of fonts)\n")
    print("     - test --> (run tests)\n")
    print("     - text 'yourtext' 'font(optional)' --> (text art) Example : 'python -m art text exampletext block'\n")
    print("     - shape 'shapename' --> (shape art) Example : 'python -m art shape butterfly'\n")
    print("     - save 'yourtext' 'font(optional)'  -->  Example : 'python -m art save exampletext block'\n")
    print("     - all 'yourtext'  -->  Example : 'python -m art all exampletext'")
737524
def _folder_item_category(self, analysis_brain, item):
        
        if not self.show_categories:
            return

        cat = analysis_brain.getCategoryTitle
        item["category"] = cat
        cat_order = self.analysis_categories_order.get(cat)
        if (cat, cat_order) not in self.categories:
            self.categories.append((cat, cat_order))
794734
def taskit(func):
    
    class NewTask(Task):
        def work(self, *args, **kw):
            return func(*args, **kw)
    return NewTask()
976870
def add_function(self, func):
        
        for block in func.blocks:
            self.add_obj(block.addr, block)
1243309
def command(func_or_args=None):
    
    def decorator(f):
        f.__args__ = args
        return f
    if type(func_or_args) == type(decorator):
        args = {}
        return decorator(func_or_args)
    args = func_or_args
    return decorator
660342
def filter_by_func(self, func:Callable)->'ItemList':
        ""
        self.items = array([o for o in self.items if func(o)])
        return self
131520
def head_while(self, func: Callable[[T], bool]) -> 'TList[T]':
        
        r = TList()
        for x in self:
            if not func(x):
                return r
            else:
                r.append(x)
        return r
124479
def call_func(self, fun, **kwargs):
        '''
        
        '''
        return self.low(fun, kwargs, print_event=kwargs.get('print_event', True), full_return=kwargs.get('full_return', False))