This file contains hidden or 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 | |
| import dendropy | |
| from dendropy.calculate import popgenstat | |
| d = dendropy.DnaCharacterMatrix.get_from_path( | |
| "data/primates.chars.nexus", "nexus") | |
| print("num_segregating_sites = {}".format(popgenstat.num_segregating_sites(d, True))) | |
| print("num_segregating_sites = {}".format(popgenstat.num_segregating_sites(d, False))) |
This file contains hidden or 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
| " Notes: | |
| " (1) To enhance the ergonomics of this sufficiently to make it practical, at | |
| " least, until your brain grows a new lobe dedicated to counting line offsets | |
| " in the background while you work, you should either make sure you have | |
| " something like the following in your `~/.vimrc`: | |
| " | |
| " set number | |
| " if has('autocmd') | |
| " augroup vimrc_linenumbering | |
| " autocmd! |
This file contains hidden or 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 | |
| """ | |
| Python Golf | |
| An expression that takes predicate function object and an iterable, | |
| and returns True if the predicate function evaluates True once and exactly once | |
| when applied to all the elements in the iterable. | |
| Expression with the minimum number of non-whitespace characters wins. |
This file contains hidden or 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! s:_setup_cidictcompletion() | |
| let g:_old_ignorecase_state=&ignorecase | |
| inoremap <C-X><C-K> <ESC>:let g:_old_ignorecase_state=&ignorecase<CR>:set ignorecase<CR>:set infercase<CR>a<C-X><C-K> | |
| " inoremap <expr> <CR> pumvisible() ? "\<C-y><ESC>:set noignorecase<CR>a" : "\<C-g>u\<CR>" | |
| " inoremap <expr> <C-J> pumvisible() ? "\<C-y><ESC>:set noignorecase<CR>a" : "\<C-g>u\<C-J>" | |
| let restore=' pumvisible() ? "\<C-y><ESC>:let &ignorecase=g:_old_ignorecase_state<CR>' | |
| for key in ["<CR>", "<C-J>", "<C-Y>"] | |
| execute "inoremap <expr> " . key . restore . 'a" : "\<C-g>u\<CR>"' | |
| endfor | |
| for key in ["<ESC>", "<C-C>"] |
This file contains hidden or 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
| #! /bin/bash | |
| cd venvs | |
| virtualenv -p /opt/python/Python-2.7.6/bin/python2 dendropy4-python2.7 && cd ../dendropy && . ../venvs/dendropy4-python2.7/bin/activate && python setup.py develop && deactivate && cd - | |
| virtualenv -p /opt/python/Python-3.2.5/bin/python3 dendropy4-python3.2 && cd ../dendropy && . ../venvs/dendropy4-python3.2/bin/activate && python setup.py develop && deactivate && cd - | |
| virtualenv -p /opt/python/Python-3.3.4/bin/python3 dendropy4-python3.3 && cd ../dendropy && . ../venvs/dendropy4-python3.3/bin/activate && python setup.py develop && deactivate && cd - | |
| virtualenv -p /opt/python/Python-3.4.0/bin/python3 dendropy4-python3.4 && cd ../dendropy && . ../venvs/dendropy4-python3.4/bin/activate && python setup.py develop && deactivate && cd - | |
| virtualenv -p /opt/python/Python-2.6.9/bin/python2 dendropy3-python2.6 && cd ../dendropy3 && . ../venvs/dendropy4-python2.6/bin/activate && python setup.py develop && deactivate && cd - |
This file contains hidden or 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 caseless dictionary implementation.""" | |
| from collections import MutableMapping | |
| class CaselessDictionary(MutableMapping): | |
| """ | |
| A dictionary-like object which ignores but preserves the case of strings. |
This file contains hidden or 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 | |
| __version__ = "1.0.0" | |
| from time import strftime | |
| import random | |
| import sys | |
| import os | |
| import argparse |
This file contains hidden or 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 | |
| import subprocess | |
| import optparse | |
| import os | |
| import sys | |
| __version__ = "1.0.0" | |
| __author__ = "Jeet Sukumaran" |
This file contains hidden or 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
| on run | |
| do shell script "/Applications/MacVim.app/Contents/MacOS/Vim -g > /dev/null 2>&1" | |
| end run |
This file contains hidden or 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
| # INSTRUCTIONS: save as ~/.gdbinit | |
| # REVISION : 6.1 | |
| # CONTRIBUTORS: mammon_, elaine, pusillus, mong | |
| # NOTES: 'help user' in gdb will list the commands/descriptions in this file | |
| # 'context on' now enables auto-display of context screen | |
| # | |
| # CHANGELOG: | |
| # Version 6.1 | |
| # fixed filename in step_to_call so it points to /dev/null | |
| # changed location of logfiles from /tmp to ~ |