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 showLineNumbers() { | |
| /************************************ | |
| * Written by Andreas Papadopoulos * | |
| * http://akomaenablog.blogspot.com * | |
| * akoma1blog@yahoo.com * | |
| ************************************/ | |
| var isIE = navigator.appName.indexOf('Microsoft') != -1; | |
| var preElems = document.getElementsByTagName('pre'); | |
| if (preElems.length == 0) return; |
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
| ########################################################################################### | |
| ## Compute N50 values for Assembly Results and Plot their Cumulative Length Distribution ## | |
| ########################################################################################### | |
| ## Author: Thomas Girke | |
| ## Last update: January 28, 2010 | |
| ## Utilities: Compute N50 and plot cumulative length distribution. | |
| ## More details can be found here: http://manuals.bioinformatics.ucr.edu/home/ht-seq#TOC-Analyzing-Assembly-Results | |
| ## Overview: | |
| ## The N50 is a weighted median statistic such that 50% of the entire assembly |
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
| # Copy these snippets to /etc/fstab | |
| tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 | |
| tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0 | |
| tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0 | |
| tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0 | |
| tmpfs /home/XXX/.cache tmpfs defaults,noatime,mode=0775,uid=YYY,gid=ZZZ 0 0 | |
| # XXX = user name | |
| # Get YYY and ZZZ (eg. uid=1000, gid=1000) by typing the command: | |
| # $ id [user name] | |
| # in your bash shell |
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
| # http://openwetware.org/wiki/Wilke:ParseDSSP | |
| import re | |
| class DSSPData: | |
| def __init__(self): | |
| self.num = [] | |
| self.resnum = [] | |
| self.moltyp = [] |
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 python3 | |
| # | |
| # fixname - Fix hit name in the blastlist | |
| # | |
| # Copyright (C) 2013, Jian-Long Huang | |
| # Licensed under The MIT License | |
| # http://opensource.org/licenses/MIT | |
| # | |
| # Author: Jian-Long Huang (jianlong@ntu.edu.tw) | |
| # Version: 0.1 |
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 | |
| # http://marlonyao.iteye.com/blog/905313 | |
| # Usage: $ python sandbox.py <untrusted.py> | |
| _builtins = dict(__builtins__.__dict__) | |
| def _hook_import(name, *args, **kwargs): | |
| restricted_modules = [ | |
| 'os', |
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
| # http://stackoverflow.com/questions/1175208/elegant-python-function-to-convert-camelcase-to-camel-case | |
| def convert(name): | |
| s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) | |
| return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() |
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
| # This is a standard python config file | |
| # Valid values can be True, False, integer numbers, strings | |
| # By default bpython will look for ~/.config/bpython/config or you | |
| # can specify a file with the --config option on the command line | |
| # General section tag | |
| [general] | |
| # Display the autocomplete list as you type (default: True). | |
| # When this is off, you can hit tab to see the suggestions. |
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
| vardef FUNCTION = '[[:blank:]]([[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\()' | |
| function = $FUNCTION | |
| keyword = "and|assert|break|class|continue|def|del|elif|else|except|exec", | |
| "finally|for|global|if|in|is|lambda|not|or|pass", | |
| "print|raise|return|try|while|self" |
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
| # http://stackoverflow.com/questions/2831212/python-sets-vs-lists | |
| >>> import timeit | |
| >>> a = set(range(1000000)) | |
| >>> b = range(1000000) | |
| >>> def test_a(): | |
| ... '9999' in a | |
| ... | |
| >>> def test_b(): | |
| ... '9999' in b |
OlderNewer