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
A 5 3 2 2 2 -12 -12 -9 -1 -2 0 -8 -7 -7 -7 -5 -4 -6 -6 -3 -5 -3 -4 | |
Y 5 2 3 2 -15 -10 -10 -1 -2 -1 -8 -8 -7 -7 -5 -6 -7 -7 -3 -5 -3 -4 | |
B 5 2 2 -12 -10 -10 1 -2 -2 -7 -7 -6 -6 -5 -4 -6 -5 -2 -5 -3 -4 | |
C 5 1 -11 -9 -9 -1 1 -1 -8 -7 -7 -6 -5 -5 -6 -6 -3 -5 -3 -4 | |
D 5 -10 -9 -9 1 0 1 -6 -5 -5 -5 -4 -1 -4 -4 -1 -4 -2 -3 | |
E 6 1 2 -8 -9 -8 -2 -1 -4 -4 -8 -6 -3 -4 -6 -6 -7 -3 | |
F 6 0 -6 -7 -7 1 -1 -3 -3 -6 -5 -2 -4 -4 -4 -5 -2 | |
H 6 -5 -6 -6 -1 2 -3 -2 -6 -4 0 -3 -4 -2 -4 -2 | |
G 7 0 -1 -4 -4 -3 -3 -3 -1 -2 -1 2 -2 1 -2 | |
I 9 3 -4 -3 -4 -4 -2 2 -3 -3 -1 -2 -1 -2 |
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 | |
import matplotlib.pyplot as plt | |
from sklearn.neighbors import NearestNeighbors | |
def get_eps_nei(neigh, X, i): | |
""" Wrap the unnecessary output from sklearn. | |
Returns the indices of the k nearest neigbhors of a point, | |
excluding the query point. | |
""" | |
e = list(neigh.radius_neighbors(X[i].reshape(1, -1), |
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
from mycsv import * | |
if __name__ == "__main__": | |
#creating parser object | |
#these are default values anyway | |
#passing them explicitly just to show funcionatity | |
parser = MyCSV(delimiter=",", header=True) | |
#parsing test file | |
data = parser.parse("test.csv") |
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
## Nussinov RNA folding algorithm + recursive backtrack. Implemented by Carlos G. Oliver ## | |
import numpy as np | |
min_loop_length = 4 | |
def ss_to_bp(ss): | |
pairs = [] | |
stack = [] | |
for i, b in enumerate(ss): |
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
"set nocompatible " required | |
filetype plugin on " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" | |
" " alternatively, pass a path where Vundle should install plugins | |
" "call vundle#begin('~/some/path/here') | |
" |
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
0x8F31Ac74713f91f0A1b096b2731E925871AEba2E |