group by arg1,arg2 ...
972199
function groupby (args) {
    if (this.typecheck) t.typecheck('groupby', [args]);
    if ('string'===typeof args) args = [args];
    return 'group by '+args.join();
}
1240784
def Then4(self, f, arg1, arg2, arg3, *args, **kwargs):
        
        args = (arg1, arg2, arg3) + args
        return self.ThenAt(4, f, *args, **kwargs)
978906
def do_group(self, arg):
        
        from copy import deepcopy
        vals = arg.split()
        if len(vals) == 0 or vals[0] not in ["list", "duplicate", "add", "switch", "remove"]:
            self.help_group()
            return

        if vals[0] == "add":
            if vals[1] not in self.args[self.active]:
                self.args[self.active][vals[1]] = self._template_args.copy()
                msg.okay("Created analysis group '{}'.".format(vals[1]))
                self.do_group("switch {}".format(vals[1]))
            else:
                msg.info("Group '{}' already exists. Switching to it.".format(vals[1]))
                self.do_group("switch {}".format(vals[1]))
        elif vals[0] == "switch":
            if vals[1] in self.args[self.active]:
                self.group = vals[1]
                self._set_def_prompt()
            else:
                msg.warn("The group '{}' does not exist.".format(vals[1]))
        elif vals[0] == "duplicate" and len(vals) == 3 and vals[1] in self.args[self.active]:
            self.args[self.active][vals[2]] = deepcopy(self.args[self.active][vals[1]])
            msg.okay("Duplicated analysis group '{}' into '{}'.".format(vals[1], vals[2]))
            self.do_group("switch {}".format(vals[2]))
        elif vals[0] == "list":
            for key in self.args[self.active]:
                msg.info(key)
        elif vals[0] == "remove" and vals[1] in self.args[self.active]:
            del self.args[self.active][vals[1]]
            self.do_group("list")
769336
def _process_arguments(self, arguments):
        
        if not arguments:
            return None
        a = arguments.split(" :", 1)
        arglist = a[0].split()
        if len(a) == 2:
            arglist.append(a[1])
        return arglist
435497
function (args) {
            args = argsToArray(arguments);
            return !args.length ? this._super(arguments) : this.group.apply(this, args);
        }
1163906
def Then5(self, f, arg1, arg2, arg3, arg4, *args, **kwargs):
        
        args = (arg1, arg2, arg3, arg4) + args
        return self.ThenAt(5, f, *args, **kwargs)
1347632
def groupby(expr, by, *bys):
    

    if not isinstance(by, list):
        by = [by, ]
    if len(bys) > 0:
        by = by + list(bys)
    return GroupBy(_input=expr, _by=by)
518110
def joinArgs(args):
    
    if not args:
        return ''
    arglist = []
    for key in sorted(args, key=lambda x: x.lower()):
        value = compat.ustr(args[key])
        arglist.append('%s=%s' % (key, compat.quote(value)))
    return '?%s' % '&'.join(arglist)
1238225
function (arg) {
  if (arg instanceof Array) {
    if (arg.length === 0) return ok.call(this);
    if (arg.length === 1) return ok.call(this, arg[0]);
    if (arg.length >= 2) {
      var head = arg[0];
      var tail = arg.slice(1);
      return ok.call(this, head, tail);
    }
  }
  if (arg instanceof Object) {
    if ("x" in arg && "y" in arg) {
      return ok.call(this, arg.x, arg.y);
    }
  }
  if (typeof arg === "number") {
    return ok.call(this);
  }
}
43656
def split_args(args):
    
    args_dict = {}
    for arg in args:
        split_arg = arg.split('=', 1)
        if len(split_arg) > 1:
            value = split_arg[1]
        else:
            value = True
        args_dict[split_arg[0]] = value
    return args_dict
976934
def extract_args(self, data):
        
        args = []
        data = data.strip(' ')
        if ':' in data:
            lhs, rhs = data.split(':', 1)
            if lhs: args.extend(lhs.rstrip(' ').split(' '))
            args.append(rhs)
        else:
           args.extend(data.split(' '))
        return tuple(args)
573388
function buildArguments (argz) {
  var args = argz.cmd.split(' ')
  argz.cmd = args.shift()
  argz.args = union([], args || [], argz.args || [])
  return argz
}
272930
def groupBy(self, f, numPartitions=None, partitionFunc=portable_hash):
        
        return self.map(lambda x: (f(x), x)).groupByKey(numPartitions, partitionFunc)
502722
def p_expression_group(p):
    ''''''
    v = p[1]
    if v == '(':
        p[0] = functionarguments(p[2])
    elif v == '[':
        p[0] = tsentry(p[2])
319138
def args_as_tuple(self):
        """"""
        if "," in self.arguments["header-names"]:
            result = tuple(tools.to_list(self.arguments["header-names"]))
        else:
            result = (self.arguments["header-names"].strip('"'),)
        result = result + (self.arguments["match-type"],)
        if "," in self.arguments["key-list"]:
            result = result + tuple(
                tools.to_list(self.arguments["key-list"], unquote=False))
        else:
            result = result + (self.arguments["key-list"].strip('"'),)
        return result
725957
def group(self, id=None, **kwargs):
        
        if type(id) == str:
            if not id.startswith('$'):
                id = '$' + id
        query = {
            '_id': id
        }
        for key in kwargs:
            query[key] = kwargs[key]
        self._q.append({
            '$group': query
        })
        return self
1165555
def groupBy(self, val):
        

        def by(result, key, value):
            if key not in result:
                result[key] = []
            result[key].append(value)

        res = self._group(self.obj, val, by)

        return self._wrap(res)