Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def find_runs(x): | |
"""Find runs of consecutive items in an array.""" | |
# ensure array | |
x = np.asanyarray(x) | |
if x.ndim != 1: | |
raise ValueError('only 1D array supported') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Request snapshots from the UCSC Genome Browser. | |
""" | |
from __future__ import division, print_function, unicode_literals | |
from collections import OrderedDict | |
import sys | |
import re |