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
""" | |
Alias sampler | |
============= | |
See : <http://www.keithschwarz.com/darts-dice-coins/> by Keith Schwarz. | |
References | |
---------- | |
+ Vose, Michael D. |
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 |
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
// Client-side parser for .npy files | |
// See the specification: http://docs.scipy.org/doc/numpy-dev/neps/npy-format.html | |
var NumpyLoader = (function () { | |
function asciiDecode(buf) { | |
return String.fromCharCode.apply(null, new Uint8Array(buf)); | |
} | |
function readUint16LE(buffer) { | |
var view = new DataView(buffer); | |
var val = view.getUint8(0); |
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
def set_postmortem_hook(): | |
import sys, traceback, ipdb | |
def _excepthook(exc_type, value, tb): | |
traceback.print_exception(exc_type, value, tb) | |
print() | |
ipdb.pm() | |
sys.excepthook = _excepthook |
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
"""Run Length Encoding utilities for NumPy arrays. | |
Authors | |
------- | |
- Nezar Abdennur | |
- Anton Goloborodko | |
""" | |
from __future__ import division, print_function | |
import numpy as np |
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
def lexbisect(arrays, values, side='left', lo=0, hi=None): | |
""" | |
Bisection search on lexically sorted arrays. | |
Parameters | |
---------- | |
arrays : sequence of k 1-D array-like | |
Each "array" can be any sequence that supports scalar integer indexing, | |
as long as the arrays have the same length and their values are | |
lexsorted from left to right. |
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
CONDA_DIR="$HOME/miniconda" | |
alias workon='source $CONDA_DIR/bin/activate' | |
# function workon () { | |
# source "$CONDA_DIR/bin/activate" "$1" | |
# } | |
function __conda_user_setup () { | |
_workon_tab_completion_bash () { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.