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
#!/bin/bash | |
if [ $# -ne 2 ] | |
then | |
echo "Error in $0 - Invalid Argument Count" | |
echo "Syntax: $0 project_name gondor_app_id" | |
exit | |
fi | |
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
#!/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 |
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
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 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 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 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 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 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 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 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 |
OlderNewer