Gets an array of groups created after a given time.
349655
public function getGroupsSince(DateTime $time): Generator
    {
        $command = new Command('NEWGROUPS', $time->format('Ymd His'), 'GMT');
        yield from $this->sendCommand($command);

        $data = yield from $this->encoder->readData($this->stream);
        return explode("\r\n", $data);
    }
190354
def parse_timestamps
      @created_time = created_time.to_i if created_time.is_a? String
      @created_time = Time.at(created_time) if created_time
    end
1344340
def _get_group_from_state(self, sid):
        
        for index, selectgroup in enumerate(self.groups):
            if sid in selectgroup:
                return index
932840
public int[] get(ReadablePeriod period, long duration) {
        int size = period.size();
        int[] values = new int[size];
        if (duration != 0) {
            long current = 0;
            for (int i = 0; i < size; i++) {
                DurationField field = period.getFieldType(i).getField(this);
                if (field.isPrecise()) {
                    int value = field.getDifference(duration, current);
                    current = field.add(current, value);
                    values[i] = value;
                }
            }
        }
        return values;
    }
1190752
def get_choices(timezones, grouped=False):
    """"""

    # Created a namedtuple to store the "key" for the choices_dict
    TZOffset = namedtuple('TZOffset', 'value offset_string')

    choices_dict = defaultdict(list)

    # Iterate through the timezones and populate the timezone choices
    for tz in iter(timezones):
        # Retrieve a datetime object in this time zone
        now = datetime.now(pytz.timezone(tz))

        # Retrieve the timezone offset ("-0500" / "+0500")
        offset = now.strftime("%z")

        # Retrieve the offset string ("GMT-12:00" / "GMT+12:00")
        timezone_offset_string = 'GMT{plus_minus}{hours}:{minutes}'.format(
            **TIMEZONE_OFFSET_REGEX.match(offset).groupdict()
        )

        if not grouped:
            # Format the timezone display string
            display_string = '({timezone_offset_string}) {tz}'.format(
                timezone_offset_string=timezone_offset_string,
                tz=tz,
            )
        else:
            display_string = tz

        choices_dict[
            TZOffset(value=int(offset), offset_string=timezone_offset_string)
        ].append(
            (tz, display_string)
        )

    choices = []

    for tz_offset in sorted(choices_dict, key=attrgetter('value')):
        if not grouped:
            choices.extend(
                tuple(choices_dict[tz_offset])
            )
        else:
            choices.append(
                (
                    tz_offset.offset_string,
                    tuple(choices_dict[tz_offset])
                )
            )

    # Cast the timezone choices to a tuple and return
    return tuple(choices)
1254952
def currentGrouping( self ):
        
        groupBy = self.groupBy()
        if ( groupBy == XOrbBrowserWidget.GroupByAdvancedKey ):
            return self.advancedGrouping()
        else:
            table = self.tableType()
            if ( not table ):
                return []
            
            for column in table.schema().columns():
                if ( column.displayName() == groupBy ):
                    return [column.name()]
            
            return []
367668
def get_times(self):
        """"""
        if not self.n:
            return []
        self.times = list(mul(self.u1, self.t1)) + \
            list(mul(self.u2, self.t2)) + \
            list(mul(self.u3, self.t3)) + \
            list(mul(self.u4, self.t4))

        self.times = matrix(list(set(self.times)))
        self.times = list(self.times) + list(self.times - 1e-6)
        return self.times
28004
def groups(self):
        
        if len(self.groupings) == 1:
            return self.groupings[0].groups
        else:
            to_groupby = lzip(*(ping.grouper for ping in self.groupings))
            to_groupby = Index(to_groupby)
            return self.axis.groupby(to_groupby)
1010725
def prev_next_group(project, group):
    
    # TODO: Profile and optimize this query if necessary
    groups = sorted(x for x in project.groups if x.submissions)
    try:
        index = groups.index(group)
    except ValueError:
        return None, None
    prev_group = groups[index - 1] if index > 0 else None
    next_group = groups[index + 1] if index + 1 < len(groups) else None
    return prev_group, next_group
426782
def get_group_instance(self, parent):
        """"""
        o = copy.copy(self)
        o.init_instance(parent)
        return o
1269426
def filter_creation_date(groups, start, end):
    
    results = []
    for g in groups:
        created = datetime.fromtimestamp(g['creationTime'] / 1000.0)
        if created > end:
            continue
        if created > start:
            g['exportStart'] = created
        else:
            g['exportStart'] = start
        results.append(g)
    return results
674715
function retrieveAccountGroups() {
  account.getGroups(function(err, groups) {
    groups.each(function(err, group) {
      console.log(group);
    })
  });

  //finish quickstart:
  cleanup();
}
955328
def create_groups(self, *names, **kwargs):
        """"""
        return tuple(self.create_group(name, **kwargs) for name in names)
64825
def aggregations(self):
        """"""

        prev_month_start = get_prev_month(self.end, self.query.interval_)
        self.query.since(prev_month_start)
        agg = super().aggregations()
        if agg is None:
            agg = 0  # None is because NaN in ES. Let's convert to 0
        return agg
214558
def getGroupUpcomingEvents(request, group):
    
    # Get events that are a child of a group page, or a postponement or extra
    # info a child of the recurring event child of the group
    rrEvents = RecurringEventPage.events(request).exclude(group_page=group) \
                                        .upcoming().child_of(group).this()
    qrys = [SimpleEventPage.events(request).exclude(group_page=group)
                                        .upcoming().child_of(group).this(),
            MultidayEventPage.events(request).exclude(group_page=group)
                                        .upcoming().child_of(group).this(),
            rrEvents]
    for rrEvent in rrEvents:
        qrys += [PostponementPage.events(request).child_of(rrEvent.page)
                                         .upcoming().this(),
                 ExtraInfoPage.events(request).exclude(extra_title="")
                                 .child_of(rrEvent.page).upcoming().this()]

    # Get events that are linked to a group page, or a postponement or extra
    # info a child of the recurring event linked to a group
    rrEvents = group.recurringeventpage_set(manager='events').auth(request)  \
                                                        .upcoming().this()
    qrys += [group.simpleeventpage_set(manager='events').auth(request)
                                                        .upcoming().this(),
             group.multidayeventpage_set(manager='events').auth(request)
                                                        .upcoming().this(),
             rrEvents]
    for rrEvent in rrEvents:
        qrys += [PostponementPage.events(request).child_of(rrEvent.page)
                                                       .upcoming().this(),
                 ExtraInfoPage.events(request).exclude(extra_title="")
                                 .child_of(rrEvent.page).upcoming().this()]
    events = sorted(chain.from_iterable(qrys),
                    key=attrgetter('page._upcoming_datetime_from'))
    return events
956964
def get_flat_groups(self, field=None):
        '''
        
        '''
        field = field if field else self._determine_group_field(field)
        temp_groups = self.data['grouped'][field]['groups']
        return [y for x in temp_groups for y in x['doclist']['docs']]
900938
function groupsFactory() {
  let list = []

  const getGroupsByRoot = function(root) {
    for (let i = 0; i < list.length; i++) {
      let groups = list[i]
      if (groups.rootEl === root) {
        return groups
      }
    }
    return null
  }

  return {
    add: function(root, group) {
      let groups = getGroupsByRoot(root)
      if (!groups) {
        groups = new Groups(root, [])
        list.push(groups)
      }
      if (group) {
        group._list = groups
        group.resolve()

        groups.add(group)
      }
    },
    groups: function() {
      return list.length === 1 ? list[0] : list
    }
  }
}