Convert the source sequence to a list.

        Note: This method uses immediate execution.
976669
def to_list(self):
        '''
        '''
        if self.closed():
            raise ValueError("Attempt to call to_list() on a closed Queryable.")

        # Maybe use with closable(self) construct to achieve this.
        if isinstance(self._iterable, list):
            return self._iterable
        lst = list(self)
        # Ideally we would close here. Why can't we - what is the problem?
        #self.close()
        return lst
489360
public List<T> toList() {
		final String sourceMethod = "toList"; //$NON-NLS-1$
		SignalUtil.lock(rwl.readLock(), sourceClass, sourceMethod);
		List<T> result = null;
		try {
			result = Arrays.asList(Arrays.copyOf(items, index.get()));
		} finally {
			rwl.readLock().unlock();
		}
		return result;
	}
662005
def _sequence_map(cls, seq, path):
        
        if not any(path):
            # There is no further kwargsql expression
            return seq
        result = []
        for item in seq:
            try:
                result.append(cls.__resolve_path(item, path))
            except (KeyError, IndexError):
                pass
        return result
629589
public <T> Iterator<T> reorder( Iterator<T> sequence)
    {
    return reorder( IteratorUtils.toList( sequence)).iterator();
    }
652116
def idx_sequence(self):
        
        return [x[1] for x in sorted(zip(self._record, list(range(len(self._record)))))]
29493
public List<List<String>> decodeLabeledSequences(List<List<SeqElement>> seqs) {
		List<List<List<String>>> n1 = new ArrayList<List<List<String>>>();
		for (List<SeqElement> seq : seqs) {
			List<List<String>> n2 = new ArrayList<List<String>>();
			for (SeqElement el : seq) {
				n2.add(el.getFeatures());
			}
			n1.add(n2);
		}
		return decoder.decodeFromJava(n1);
	}
536084
private static void readToList(InputStream input, String encoding, List<String> blackPrefixList) {
        InputStreamReader reader = null;
        BufferedReader bufferedReader = null;
        try {
            reader = new InputStreamReader(input, encoding);
            bufferedReader = new BufferedReader(reader);
            String lineText;
            while ((lineText = bufferedReader.readLine()) != null) {
                String pkg = lineText.trim();
                if (pkg.length() > 0) {
                    blackPrefixList.add(pkg);
                }
            }
        } catch (IOException e) {
            if (LOGGER.isWarnEnabled()) {
                LOGGER.warn(e.getMessage(), e);
            }
        } finally {
            closeQuietly(bufferedReader);
            closeQuietly(reader);
        }
    }
994313
def flatten(*sequence):
        """"""
        result = []
        for entry in sequence:
            if isinstance(entry, list):
                result += Select.flatten(*entry)
            elif isinstance(entry, tuple):
                result += Select.flatten(*entry)
            else:
                result.append(entry)
        return result
92958
function sequence ( parserSyntax ) {
				var i, res,
					originalPos = pos,
					result = [];

				for ( i = 0; i < parserSyntax.length; i++ ) {
					res = parserSyntax[i]();

					if ( res === null ) {
						pos = originalPos;

						return null;
					}

					result.push( res );
				}

				return result;
			}
209536
@Nonnull
  public List<E> toList() {
    return new AbstractList<E>() {
      @Override
      public E get(final int index) {
        return Seq.this.get(index);
      }

      @Override
      public int size() {
        return length();
      }
    };
  }
1292129
def seq(self):
        """"""

        if self.sequence_file:
            file_to_load = copy(self.sequence_path)
            log.debug('{}: reading sequence from sequence file {}'.format(self.id, file_to_load))
            tmp_sr = SeqIO.read(file_to_load, 'fasta')
            return tmp_sr.seq

        else:
            if not self._seq:
                log.debug('{}: no sequence stored in memory'.format(self.id))
            else:
                log.debug('{}: reading sequence from memory'.format(self.id))

            return self._seq
1221436
def subseq(start_offset=0, end_offset=None):
    
    def _(sequence):
        return sequence.subseq(start_offset, end_offset)
    return _
1065333
def sequence(values):
    
    import ibis.expr.operations as ops

    return ops.ValueList(values).to_expr()
1278350
public static ImmutableList<String> loadStringList(final CharSource source) throws IOException {
    return FluentIterable.from(source.readLines())
        .filter(not(IsCommentLine.INSTANCE))
        .toList();
  }
325253
public List<E> toList()
    {
        ArrayList<E> list = new ArrayList<E>(queue.size());
        while (!queue.isEmpty())
        {
            list.add(0, queue.poll());
        }

        return list;
    }
1057057
private void convertMultipleListsToFastList()
    {
        FastList<MithraFastList<E>> localLists = this.lists;
        if (localLists.size() > 1)
        {
            final MithraFastList<E> newList = new MithraFastList<E>(this.size());

            for (int i = 0; i < localLists.size(); i++)
            {
                newList.addAll(localLists.get(i));
            }
            FastList<MithraFastList<E>> newLists = new FastList<MithraFastList<E>>(2);
            newLists.add(newList);
            this.lists = newLists;
        }
    }
1252211
def seqs_to_stream(seqs, ih):
    
    if ih == '_input_as_multiline_string':
        recs = FastaFinder(seqs.split('\n'))
    elif ih == '_input_as_string':
        recs = FastaFinder(open(seqs))
    elif ih == '_input_as_seqs':
        recs = [['>'+str(i), s] for i, s in enumerate(seqs)]
    elif ih == '_input_as_lines':
        recs = FastaFinder(seqs)
    else:
        raise TypeError, "Unknown input handler %s" % ih
    return recs