fun(uid_with_str)
        fun(uid_with_str, slug = val1, glyph = val2)
13252
def render(self, *args, **kwargs):
        '''
        
        '''

        uid_with_str = args[0]

        slug = kwargs.get('slug', False)

        with_title = kwargs.get('with_title', False)

        glyph = kwargs.get('glyph', '')

        kwd = {
            'glyph': glyph
        }
        curinfo = MCategory.get_by_uid(uid_with_str)

        sub_cats = MCategory.query_sub_cat(uid_with_str)

        if slug:
            tmpl = 'modules/info/catalog_slug.html'

        else:
            tmpl = 'modules/info/catalog_of.html'
        return self.render_string(tmpl,
                                  pcatinfo=curinfo,
                                  sub_cats=sub_cats,
                                  recs=sub_cats,
                                  with_title=with_title,
                                  kwd=kwd)
591761
def str_func(name):
    
    def func(mapping, bind, values):
        for v in values:
            if isinstance(v, six.string_types):
                v = getattr(v, name)()
            yield v
    return func
1004488
def slugify(value):
    ''''
    
    '''
    value = re.sub(r'[^\w\s-]', '', value).strip().lower()
    return re.sub(r'[-\s]+', '-', value)
206798
def block_uid(value: Union[str, BlockUID, None]) -> BlockUID:
    
    if isinstance(value, BlockUID):
        return value
    elif isinstance(value, str):
        return BlockUID.from_str(value)
    elif value is None:
        return BlockUID.empty()
    else:
        raise TypeError("Cannot convert {0} to BlockUID".format(type(value)))
727164
def get_fun(fun):
    '''
    
    '''
    serv = _get_serv(ret=None)
    ret = {}
    for minion in serv.smembers('minions'):
        ind_str = '{0}:{1}'.format(minion, fun)
        try:
            jid = serv.get(ind_str)
        except Exception:
            continue
        if not jid:
            continue
        data = serv.get('{0}:{1}'.format(minion, jid))
        if data:
            ret[minion] = salt.utils.json.loads(data)
    return ret
468827
def function_body_action(self, text, loc, fun):
        """"""
        exshared.setpos(loc, text)
        if DEBUG > 0:
            print("FUN_BODY:",fun)
            if DEBUG == 2: self.symtab.display()
            if DEBUG > 2: return
        self.codegen.function_body()
1026728
function tmpl(str, data) {
			return str.replace(/\{ *([\w_]+) *\}/g, function (str, key) {
				return data[key] || '';
			});
		}
851162
def wrap_name_to_id(func_, *args, **kwargs):
    
    assert isinstance(args[0], dict)
    args[0][PRIMARY_KEY] = args[0].get(PRIMARY_FIELD, "")
    return func_(*args, **kwargs)
758660
def uuid_to_slug(uuid):
    
    if not isinstance(uuid, int):
        raise ArgumentError("Invalid id that is not an integer", id=uuid)

    if uuid < 0 or uuid > 0x7fffffff:
        # For now, limiting support to a signed integer (which on some platforms, can be 32bits)
        raise ArgumentError("Integer should be a positive number and smaller than 0x7fffffff", id=uuid)

    return '--'.join(['d', int64gid(uuid)])
494390
function(_hook, _fun) {
      if(this.$$cb && this.$$cb[_hook]) {
        var idx = Utils.indexWhere(this.$$cb[_hook], function(e) { return e === _fun; });
        if(idx !== -1) this.$$cb[_hook].splice(idx, 1);
      }
      return this;
    }
519537
def p_function_body(p):
    ''''''
    assert p[1].kind == 'compound'

    p[0] = p[1]
    if len(p) == 3:
        p[0].redirects.extend(p[2])
        assert p[0].pos[0] < p[0].redirects[-1].pos[1]
        p[0].pos = (p[0].pos[0], p[0].redirects[-1].pos[1])
694703
def str_to_uuid(value):
    
    if isfunction(value):
        value = value()

    return UUID(value) if isinstance(value, string_types) else value
1321837
def dummy_func(arg1, arg2, arg3=None, arg4=[1, 2, 3], arg5={}, **kwargs):
    
    foo = kwargs.get('foo', None)
    bar = kwargs.pop('bar', 4)
    foo2 = kwargs['foo2']
    foobar = str(foo) + str(bar) + str(foo2)
    return foobar
306900
function(fun) {
      var funLength = fun.length;

      if (funLength < 1) {
        return fun;
      }
      else if (funLength === 1)  {
        return function () {
          return fun.call(this, __slice.call(arguments, 0));
        };
      }
      else {
        return function () {
          var numberOfArgs = arguments.length,
              namedArgs = __slice.call(arguments, 0, funLength - 1),
              numberOfMissingNamedArgs = Math.max(funLength - numberOfArgs - 1, 0),
              argPadding = new Array(numberOfMissingNamedArgs),
              variadicArgs = __slice.call(arguments, fun.length - 1);

          return fun.apply(this, namedArgs.concat(argPadding).concat([variadicArgs]));
        };
      }
    }
1270392
def is_slug(string, sign='-'):
    
    if not is_full_string(string):
        return False
    rex = r'^([a-z\d]+' + re.escape(sign) + r'?)*[a-z\d]$'
    return re.match(rex, string) is not None
174784
def apply_with(self, _, val, ctx):
        
        if isinstance(val, uuid.UUID):
            self.v = val
        elif isinstance(val, six.string_types):
            try:
                self.v = uuid.UUID(val)
            except ValueError:
                self.v = uuid.UUID(bytes=val)
        elif isinstance(val, six.binary_type):
            # TODO: how to support bytes_le?
            self.v = uuid.UUID(bytes=val)
        else:
            raise ValueError('Unrecognized type for UUID: ' + str(type(val)))
734752
function(str, index) {
    // replace {{ xxx }}
    var obj = this
    str = str.replace(interpolateReg, function(match, interpolate) {
      try {
        /*jslint evil: true */
        var funcNames = ['','index'].concat(fakerFuncNames).concat(['return ' + interpolate + ';']),
        func = new (Function.prototype.bind.apply(Function, funcNames)),
        funcs = [function(){return index}].concat(fakerFuncs);

        return func.apply(obj, funcs);
        
      } catch(e)  {
        return e.message;
      }
    });

    // if result is true or false, parse it to boolean
    if(/^(true|false)$/.test(str)) {
      str = str === 'true';
    }

    // if result is digit, parse it to float
    if(/^[-+]?\d*\.?\d+$/.test(str)) {
      str = parseFloat(str);
    }

    return str;
  }