Returns True if all sequences in the list have the same length.
336808
def are_token_parallel(sequences: Sequence[Sized]) -> bool:
    
    if not sequences or len(sequences) == 1:
        return True
    return all(len(s) == len(sequences[0]) for s in sequences)
725817
def chop_sequence(sequence, limit_length):
        
        return [sequence[i:i + limit_length] for i in range(0, len(sequence), limit_length)]
640976
def _is_subsequence_of(self, sub, sup):
        
        return bool(re.search(".*".join(sub), sup))
922811
def full(self):
        
        return self.maxsize and len(self.list) >= self.maxsize or False
86700
def _check_same_length(self, trajs_tuple):
        """"""
        lens = [len(trajs) for trajs in trajs_tuple]
        if len(set(lens)) > 1:
            err = "Each dataset must be the same length. You gave: {}"
            err = err.format(lens)
            raise ValueError(err)
313569
public static boolean arrayEquals(List<String> a, List<String> b) {
        if (a == null) {
            a = new ArrayList<>();
        }
        if (b == null) {
            b = new ArrayList<>();
        }
        if (a.size() != b.size()) {
            return false;
        }

        for (int i = 0; i < a.size(); i ++) {
            if (!a.get(i).equals(b.get(i))) {
                return false;
            }
        }
        return true;
    }
990713
def last_n_results(self, n):
        
        return list(
            itertools.islice(
                self.results, len(self.results) - n, len(self.results)
            )
        )
949925
function iterableEqual(a, b) {
  if (a.length !==  b.length) return false;

  var i = 0;
  var match = true;

  for (; i < a.length; i++) {
    if (a[i] !== b[i]) {
      match = false;
      break;
    }
  }

  return match;
}
895798
def isSequence(arg):
    """"""
    if hasattr(arg, "strip"):
        return False
    if hasattr(arg, "__getslice__"):
        return True
    if hasattr(arg, "__iter__"):
        return True
    return False
691527
def are_none(sequences: Sequence[Sized]) -> bool:
    
    if not sequences:
        return True
    return all(s is None for s in sequences)
9428
def compare_seqs(seqs):
    
    A, B, ignore_gaps = seqs
    a, b = A[1], B[1] # actual sequences
    if len(a) != len(b):
        print('# reads are not the same length', file=sys.stderr)
        exit()
    if ignore_gaps is True:
        pident = calc_pident_ignore_gaps(a, b)
    else:
        pident = calc_pident(a, b)
    return A[0], B[0], pident
575441
public static boolean isEqualOrNull( List s1,
                                         List s2 ) {
        if ( s1 == null
                && s2 == null ) {
            return true;
        } else if ( s1 != null
                && s2 != null
                && s1.size() == s2.size() ) {
            return true;
        }
        return false;
    }
338822
def equalize_list_lengths(a,b):
    
    if not _s.fun.is_iterable(a): a = [a]
    a = list(a)
    while len(a)>len(b): a.pop(-1)
    while len(a)<len(b): a.append(a[-1])
    return a
10826
function sameLength(a, b) {
    return typeof a === typeof b &&
      a && b &&
      a.length === b.length;
  }
1321603
boolean compareLists(AnalyzedTokenReadings[] tokens, int startIndex, int endIndex, Pattern[] patterns) {
    if (startIndex < 0) {
      return false;
    }
    int i = 0;
    for (int j = startIndex; j <= endIndex; j++) {
      if (i >= patterns.length || j >= tokens.length || !patterns[i].matcher(tokens[j].getToken()).matches()) {
        return false;
      }
      i++;
    }
    return true;
  }
428176
def count_unique_sequences(
        allele_reads,
        max_prefix_size=None,
        max_suffix_size=None):
    
    groups = group_unique_sequences(
        allele_reads,
        max_prefix_size=max_prefix_size,
        max_suffix_size=max_suffix_size)
    return {
        seq_tuple: len(read_names)
        for (seq_tuple, read_names) in groups.items()
    }
1133524
def contains_duplicates(values: Iterable[Any]) -> bool:
    
    for v in Counter(values).values():
        if v > 1:
            return True
    return False