Skip to content

Instantly share code, notes, and snippets.

View mrorii's full-sized avatar

Naoki Orii mrorii

View GitHub Profile
@mrorii
mrorii / gist:3860197
Created October 9, 2012 17:27
simple script for plotting precision recall curves
#!/usr/bin/env python
"""Usage:
python plot_pr_curve.py
"""
import sys
import numpy as np
import pylab as pl
from sklearn.metrics import precision_recall_curve
select
count(i.id)
from
interactions i,
interaction2externals i2e,
interaction2types i2t
where
i2e.interaction_id = i.id
and i2e.dbsource_id = 5
and i2e.external_id = i2t.external_id
syntax on
" syntax enable
filetype plugin indent on
nnoremap <Space>. :<C-u>edit $MYVIMRC<Enter>
nnoremap <Space>s. :<C-u>source $MYVIMRC<Enter>
"--------------------------------
" cho45 settings
" refer to https://github.com/cho45/dotfiles/blob/master/.vimrc
[orii@severus vim73]$ export CPPFLAGS="-I/home/orii/local/include"
[orii@severus vim73]$ export LDFLAGS="-L/home/orii/local/lib"
[orii@severus vim73]$
[orii@severus vim73]$ ./configure --prefix=/home/orii/local
curse
ncurses
# set-option -g default-terminal screen-256color
# Set the prefix to ^T.
unbind C-b
set -g prefix ^T
bind t send-prefix
set-window-option -g utf8 on # Necessary for Japanese environments?
set-window-option -g mode-keys vi # Key map for copy mode. Default is emacs.
[user]
name = orii
email = naoki.orii@gmail.com
[alias]
co = checkout
ci = commit
psuh = push
puhs = push
st = status
[user]
name = orii
email = naoki.orii@gmail.com
[alias]
co = checkout
ci = commit
psuh = push
puhs = push
st = status
# Set the prefix to ^T.
unbind C-b
set -g prefix ^T
bind t send-prefix
set-window-option -g mode-keys vi # Key map for copy mode. Default is emacs.
@mrorii
mrorii / gist:1338700
Created November 4, 2011 05:06
overview of mvc
# Model
def get_biomedical_impact_score_for(self, gene_id1, gene_id2):
dbh = get_db_handler(...)
score = dbh.execute("SELECT score FROM foobar WHERE gene_id1 = ? AND gene_id2 = ?",
gene_id1, gene_id2)
return score
def get_name_for(self, gene_id):
dbh = get_db_handler(...)
name = dbh.execute("SELECT name FROM baz WHERE gene_id = ?", gene_id)
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'