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 | |
""" | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
import re | |
import collections | |
from io import StringIO | |
import numpy as np | |
import matplotlib.pyplot as pl |
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 | |
""" | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
import numpy as np | |
import maidenhair | |
def calc_mean_residue_weight(weight, n): | |
""" | |
Caclulate Mean Residue Weight (MRW) by: |
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 | |
""" | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
import numpy as np | |
import maidenhair | |
import maidenhair.statistics | |
from extend_cd_spectrum import extend_cd_spectrum | |
def ichunk(s, chunk_size): |
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 | |
""" | |
Django 1.2 - 1.6 compatible manage.py | |
Modify this script to make your own manage.py | |
""" | |
__author__ = 'Alisue <lambdalisue@hashnote.net>' | |
import os | |
import sys | |
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
#!/usr/bin/env python | |
#============================================================================== | |
# A generic django app test running script. | |
# | |
# Author: Alisue <lambdaliuse@hashnote.net> | |
# License: MIT license | |
#============================================================================== | |
import os | |
import sys | |
import optparse # argparse is prefered but it require python 2.7 or higher |
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
#!/usr/bin/env bash | |
VERSION="1.0.2" | |
NAME="pixz-$VERSION" | |
FILENAME="${NAME}.tgz" | |
URL="http://downloads.sourceforge.net/project/pixz/$FILENAME?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpixz%2Ffiles%2F&ts=1403672094&use_mirror=jaist" | |
echo "Install requirements..." | |
sudo aptitude install -y libarchive-dev liblzma-dev | |
wget $URL -O $FILENAME |
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 simple option parser | |
" | |
" Author: Alisue <lambdalisue@hashnote.net> | |
" URL: http://hashnote.net/ | |
" License: MIT license | |
" (C) 2014, Alisue, hashnote.net | |
"****************************************************************************** | |
let s:save_cpo = &cpo | |
set cpo&vim |
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
function! gista#utils#set_clipboard(content) abort " {{{ | |
if exists('g:gista#clip_command') | |
call gista#utils#vital#system(g:gista#clip_command, content) | |
elseif has('unix') && !has('xterm_clipboard') | |
let @" = content | |
else | |
let @+ = content | |
endif | |
endfunction " }}} |
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
function! gista#utils#call_on_buffer(expr, funcref, ...) abort " {{{ | |
let cbufnr = bufnr('%') | |
let save_lazyredraw = &lazyredraw | |
let &lazyredraw = 1 | |
if type(a:expr) == 0 | |
let tbufnr = a:expr | |
else | |
let tbufnr = bufnr(a:expr) | |
endif | |
if tbufnr == -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
function! gista#utils#get_bufwidth() abort " {{{ | |
if &l:number | |
let gwidth = &l:numberwidth | |
else | |
let gwidth = 0 | |
endif | |
let fwidth = &l:foldcolumn | |
let wwidth = winwidth(0) | |
return wwidth - gwidth - fwidth | |
endfunction " }}} |