obs-group-list  =   1*([CFWS] ",") [CFWS]
7874
function obsGroupList() {
        return opts.strict ? null : wrap('obs-group-list', and(
            star(and(
                invis(opt(cfws)),
                literal(',')
            ), 1),
            invis(opt(cfws))
        )());
    }
1027420
function groupSubtitles(subs, sensitivity) 
{
  var groups = [];

  var avg = subs
    .map(function(x) { return (x.heatmap.reduce(function(a,b) { return a+b },0) / x.heatmap.length) || 0 })
    .reduce(function(a,b) { return a+b }, 0) / subs.length;

  var h = avg > 0.5 ? avg : 1-avg,
      l = avg > 0.5 ? 1-avg : avg,
      threshold =  groups.threshold = h + ( sensitivity || OVERLAP_FRACTION )*l;

  subs.forEach(function(sub) {
    var maxScore = 0, bestGroup;
    groups.forEach(function(group) {
      var avg = average(_.pluck(group, "heatmap"));
      var s = compare(avg, sub.heatmap);
      if (s > maxScore) {
        bestGroup = group;
        maxScore = s;
      }
    });
    if (!bestGroup || maxScore < threshold)
      groups.push([ sub ]);
    else bestGroup.push(sub);
  });
  groups.sort(function(a,b) { return b.length - a.length });
  return groups;
}
1101808
def init_group(self, dst_addr=1):
        """"""
        self.code = 0x11
        # frametype 1, repeat 1, system broadcast 1, priority 3, ack-req 0,
        # confirm-flag 0
        self.ctl1 = 0xbc
        self.ctl2 = 0xe0  # dst addr type 1, hop count 6, extended frame format
        self.src_addr = 0
        self.dst_addr = dst_addr
123343
def get_obsgroup(self, group_id):
        
        search = mp.ObservationGroupSearch(group_id=group_id)
        b = search_obsgroups_sql_builder(search)
        sql = b.get_select_sql(columns='g.uid, g.time, g.setAtTime, g.setByUser, g.publicId, g.title,'
                                       's.name AS semanticType',
                               skip=0, limit=1, order='g.time DESC')
        obs_groups = list(self.generators.obsgroup_generator(sql=sql, sql_args=b.sql_args))
        if not obs_groups:
            return None
        return obs_groups[0]
1183612
function groupHighlights(highlights) {
    let order = [],
        chunks = {},
        grouped = [];

    highlights.forEach(function (hl) {
        let timestamp = hl.getAttribute(TIMESTAMP_ATTR);

        if (typeof chunks[timestamp] === 'undefined') {
            chunks[timestamp] = [];
            order.push(timestamp);
        }

        chunks[timestamp].push(hl);
    });

    order.forEach(function (timestamp) {
        let group = chunks[timestamp];

        grouped.push({
            chunks: group,
            timestamp: timestamp,
            toString: function () {
                return group.map(function (h) {
                    return h.textContent;
                }).join('');
            }
        });
    });

    return grouped;
}
1184918
def process_lsof(self, users, types):
        
        d = {}
        for u in users:
            d[u] = {}
            tmp = os.popen("lsof -wbu %s | awk '{ print $5 }'" % (
                u)).read().split()
            for t in types:
                d[u][t] = tmp.count(t)
        return d
773843
def grouped_count_sizes(fileslist, fgrouped):  # pragma: no cover
    ''''''
    fsizes = {}
    total_files = 0
    allitems = None
    if isinstance(fgrouped, dict):
        allitems = fgrouped.iteritems()
    elif isinstance(fgrouped, list):
        allitems = enumerate(fgrouped)
    for fkey, cluster in allitems:
        fsizes[fkey] = []
        for subcluster in cluster:
            tot = 0
            if subcluster is not None:
                for fname in subcluster:
                    tot += fileslist[fname]
                    total_files += 1
            fsizes[fkey].append(tot)
    return fsizes, total_files
473807
function obsQP() {
        return opts.strict ? null : wrap('obs-qp', and(
            literal('\\'),
            or(literal('\0'), obsNoWsCtl, lf, cr)
        )());
    }
76933
private void readNextGroup() {
    try {
      int header = readUnsignedVarInt();
      this.mode = (header & 1) == 0 ? MODE.RLE : MODE.PACKED;
      switch (mode) {
        case RLE:
          this.currentCount = header >>> 1;
          this.currentValue = readIntLittleEndianPaddedOnBitWidth();
          return;
        case PACKED:
          int numGroups = header >>> 1;
          this.currentCount = numGroups * 8;

          if (this.currentBuffer.length < this.currentCount) {
            this.currentBuffer = new int[this.currentCount];
          }
          currentBufferIdx = 0;
          int valueIndex = 0;
          while (valueIndex < this.currentCount) {
            // values are bit packed 8 at a time, so reading bitWidth will always work
            ByteBuffer buffer = in.slice(bitWidth);
            this.packer.unpack8Values(buffer, buffer.position(), this.currentBuffer, valueIndex);
            valueIndex += 8;
          }
          return;
        default:
          throw new ParquetDecodingException("not a valid mode " + this.mode);
      }
    } catch (IOException e) {
      throw new ParquetDecodingException("Failed to read from input stream", e);
    }
  }
34334
def _dist_obs_oracle(oracle, query, trn_list):
    """"""
    a = np.subtract(query, [oracle.f_array[t] for t in trn_list])
    return (a * a).sum(axis=1)
961433
def _unpack_obs(obs, space, tensorlib=tf):
    

    if (isinstance(space, gym.spaces.Dict)
            or isinstance(space, gym.spaces.Tuple)):
        prep = get_preprocessor(space)(space)
        if len(obs.shape) != 2 or obs.shape[1] != prep.shape[0]:
            raise ValueError(
                "Expected flattened obs shape of [None, {}], got {}".format(
                    prep.shape[0], obs.shape))
        assert len(prep.preprocessors) == len(space.spaces), \
            (len(prep.preprocessors) == len(space.spaces))
        offset = 0
        if isinstance(space, gym.spaces.Tuple):
            u = []
            for p, v in zip(prep.preprocessors, space.spaces):
                obs_slice = obs[:, offset:offset + p.size]
                offset += p.size
                u.append(
                    _unpack_obs(
                        tensorlib.reshape(obs_slice, [-1] + list(p.shape)),
                        v,
                        tensorlib=tensorlib))
        else:
            u = OrderedDict()
            for p, (k, v) in zip(prep.preprocessors, space.spaces.items()):
                obs_slice = obs[:, offset:offset + p.size]
                offset += p.size
                u[k] = _unpack_obs(
                    tensorlib.reshape(obs_slice, [-1] + list(p.shape)),
                    v,
                    tensorlib=tensorlib)
        return u
    else:
        return obs
333955
function groupBy(f, xs) {
    const groups = [];
    for (const x of xs) {
        if (groups.length !== 0 && f(groups[groups.length - 1][0], x)) {
            groups[groups.length - 1].push(x);
        }
        else {
            groups.push([x]);
        }
    }
    return groups;
}
195940
def group_list():
    '''
    
    '''

    ret = {'installed': [],
        'partially_installed': [],
        'available': []}

    # find out what's available

    cmd = ['pacman', '-Sgg']
    out = __salt__['cmd.run'](cmd, output_loglevel='trace', python_shell=False)

    available = {}

    for line in salt.utils.itertools.split(out, '\n'):
        if not line:
            continue
        try:
            group, pkg = line.split()[0:2]
        except ValueError:
            log.error('Problem parsing pacman -Sgg: Unexpected formatting in '
                      'line: \'%s\'', line)
        else:
            available.setdefault(group, []).append(pkg)

    # now get what's installed

    cmd = ['pacman', '-Qg']
    out = __salt__['cmd.run'](cmd, output_loglevel='trace', python_shell=False)
    installed = {}
    for line in salt.utils.itertools.split(out, '\n'):
        if not line:
            continue
        try:
            group, pkg = line.split()[0:2]
        except ValueError:
            log.error('Problem parsing pacman -Qg: Unexpected formatting in '
                      'line: \'%s\'', line)
        else:
            installed.setdefault(group, []).append(pkg)

    # move installed and partially-installed items from available to appropriate other places

    for group in installed:
        if group not in available:
            log.error(
                'Pacman reports group %s installed, but it is not in the '
                'available list (%s)!', group, available
            )
            continue
        if len(installed[group]) == len(available[group]):
            ret['installed'].append(group)
        else:
            ret['partially_installed'].append(group)
        available.pop(group)

    ret['installed'].sort()
    ret['partially_installed'].sort()

    # Now installed and partially installed are set, whatever is left is the available list.
    # In Python 3, .keys() returns an iterable view instead of a list. sort() cannot be
    # called on views. Use sorted() instead. Plus it's just as efficient as sort().
    ret['available'] = sorted(available.keys())

    return ret
291701
def parse_group(self, stream):
        
        self.expect_in(stream, self.begin_group_tokens)

        self.ensure_assignment(stream)
        name = self.next_token(stream)

        self.skip_statement_delimiter(stream)
        statements = self.parse_block(stream, self.has_end_group)

        self.expect_in(stream, self.end_group_tokens)
        self.parse_end_assignment(stream, name)
        self.skip_statement_delimiter(stream)

        return name.decode('utf-8'), PVLGroup(statements)
344562
def _unpack_observation(self, obs_batch):
        
        unpacked = _unpack_obs(
            np.array(obs_batch),
            self.observation_space.original_space,
            tensorlib=np)
        if self.has_action_mask:
            obs = np.concatenate(
                [o["obs"] for o in unpacked],
                axis=1).reshape([len(obs_batch), self.n_agents, self.obs_size])
            action_mask = np.concatenate(
                [o["action_mask"] for o in unpacked], axis=1).reshape(
                    [len(obs_batch), self.n_agents, self.n_actions])
        else:
            obs = np.concatenate(
                unpacked,
                axis=1).reshape([len(obs_batch), self.n_agents, self.obs_size])
            action_mask = np.ones(
                [len(obs_batch), self.n_agents, self.n_actions])
        return obs, action_mask
1236842
def stisExt2PrimKw(stisfiles):
    

    kw_list = ['DATE-OBS', 'EXPEND', 'EXPSTART', 'EXPTIME']

    for sfile in stisfiles:
        toclose = False

        if isinstance(sfile, str):
            sfile = fits.open(sfile, mode='update')
            toclose = True

        #d = {}
        for k in kw_list:
            sfile[0].header[k] = sfile[1].header[k]
            sfile[0].header.comments[k] = "Copied from extension header"
        if toclose:
            sfile.close()
768709
def group_list(self, params=None):
        ''' 
        '''
        params = params if params else dict()
        return self.request('/v1/firewall/group_list', params, 'GET')