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
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"> | |
| <script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script> | |
| <style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style> | |
| <body> | |
| <div style="max-width:900px; -webkit-transform:rotate(0deg)"> | |
| <scene id="scene1"> | |
| <label t="translate(0,346)"> |
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
| def get_mismatch_list(base_query, mismatch_n): | |
| for i, ch in enumerate(base_query): | |
| gap_filler = "" | |
| out_str = "" | |
| for m in range(0, mismatch_n): | |
| true_index = i + m | |
| if true_index >= len(base_query): | |
| true_index = true_index - len(base_query) | |
| target_element = base_query[true_index] | |
| print 'target ', target_element |
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
| # -*- coding: utf-8 -*- | |
| import csv | |
| from jinja2 import Environment, FileSystemLoader | |
| def read_input(csvfile , ): | |
| csvfile_v = open(csvfile, "rb") | |
| dialect = csv.Sniffer().sniff(csvfile_v.read(1024)) | |
| csvfile_v.seek(0) | |
| reader = csv.DictReader(csvfile_v, dialect=dialect) | |
| return reader |
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
| from Bio.Data import CodonTable | |
| def full_back_table(codon_table): | |
| base_table = codon_table.forward_table | |
| out_table = {} | |
| for codon in base_table: | |
| p = base_table[codon] | |
| if out_table.has_key(p): | |
| out_table[p].append(codon) | |
| else: |
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
| grailsVersion = '2.0.0' | |
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| mavenRepo urls: 'http://snapshots.repository.codehaus.org' | |
| mavenRepo urls: 'http://download.java.net/maven/2/' | |
| mavenRepo name: "Grails Repo", urls: "http://repo.grails.org/grails/repo" | |
| } | |
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
| def compute(n=100): | |
| seq = range(2,n) | |
| p = 2 | |
| while p < n and len(range(2*p,n,p)): | |
| jumpy = range(2*p,n,p) | |
| for j in jumpy: | |
| if seq.count(j) > 0: | |
| seq.remove(j) | |
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
| *.mo | |
| *.egg-info | |
| *.egg | |
| *.EGG | |
| *.EGG-INFO | |
| bin | |
| *_py_env | |
| build | |
| develop-eggs | |
| downloads |
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
| def getEqualSumSubstring (s): | |
| substrings = get_all_subsets(s) | |
| for subsr in substrings: | |
| if check_string(subsr): | |
| return len(subsr) | |
| return 0 | |
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
| from string import ascii_lowercase | |
| def buildmap(): | |
| table = {} | |
| for x in range(0,len(ascii_lowercase)): | |
| row = {} | |
| c = 0 | |
| for y in range(0,len(ascii_lowercase)): | |
| row[ascii_lowercase[y]] = ascii_lowercase[x+y+c] | |
| if x+y > 24: |
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 | |
| if [ $# -ne 2 ] | |
| then | |
| echo "Error in $0 - Invalid Argument Count" | |
| echo "Syntax: $0 project_name desidered_heroku_name" | |
| exit | |
| fi | |
| project_name=$1 |