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
# dictionnary with standard genetic code in form of 'codon':'aminoacid' | |
protein_seq = { | |
'TTT':'F','TTC':'F','TTA':'L','TTG':'L','CTT':'L','CTC':'L','CTA':'L','CTG':'L','ATT':'I','ATC':'I','ATA':'I','ATG':'M','GTT':'V','GTC':'V','GTA':'V','GTG':'V','TCT':'S','TCA':'S','TCG':'S','TCC':'S', | |
'CCT':'P','CCA':'P','CCG':'P','CCC':'P','ACT':'T','ACC':'T','ACG':'T','ACA':'T','GCT':'A','GCA':'A','GCG':'A','GCC':'A', | |
'TAT':'Y','TAC':'Y','TAA':'STOP','TAG':'STOP','CAT':'H','CAC':'H','CAA':'Q','CAG':'Q','AAT':'N','AAC':'N','AAA':'K','AAG':'K', | |
'GAT':'D','GAC':'D','GAA':'E','GAG':'E','TGT':'C','TGC':'C','TGA':'STOP','TGG':'W','CGT':'R','CGA':'R','CGG':'R','CGC':'R', | |
'AGA':'R','AGG':'R','AGT':'S','AGC':'S','GGT':'G','GGA':'G','GGC':'G','GGG':'G' | |
} | |
stop_letters = ["TAA", "TAG", "TGA"] |
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
# dictionnary with standard genetic code in form of 'codon':'aminoacid' | |
protein_seq = { | |
'TTT':'F','TTC':'F','TTA':'L','TTG':'L','CTT':'L','CTC':'L','CTA':'L','CTG':'L','ATT':'I','ATC':'I','ATA':'I','ATG':'M','GTT':'V','GTC':'V','GTA':'V','GTG':'V','TCT':'S','TCA':'S','TCG':'S','TCC':'S', | |
'CCT':'P','CCA':'P','CCG':'P','CCC':'P','ACT':'T','ACC':'T','ACG':'T','ACA':'T','GCT':'A','GCA':'A','GCG':'A','GCC':'A', | |
'TAT':'Y','TAC':'Y','TAA':'STOP','TAG':'STOP','CAT':'H','CAC':'H','CAA':'Q','CAG':'Q','AAT':'N','AAC':'N','AAA':'K','AAG':'K', | |
'GAT':'D','GAC':'D','GAA':'E','GAG':'E','TGT':'C','TGC':'C','TGA':'STOP','TGG':'W','CGT':'R','CGA':'R','CGG':'R','CGC':'R', | |
'AGA':'R','AGG':'R','AGT':'S','AGC':'S','GGT':'G','GGA':'G','GGC':'G','GGG':'G' | |
} | |
stop_letters = ["TAA", "TAG", "TGA"] |
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
# dictionnary with standard genetic code in form of 'codon':'aminoacid' | |
protein_seq = { | |
'TTT':'F','TTC':'F','TTA':'L','TTG':'L','CTT':'L','CTC':'L','CTA':'L','CTG':'L','ATT':'I','ATC':'I','ATA':'I','ATG':'M','GTT':'V','GTC':'V','GTA':'V','GTG':'V','TCT':'S','TCA':'S','TCG':'S','TCC':'S', | |
'CCT':'P','CCA':'P','CCG':'P','CCC':'P','ACT':'T','ACC':'T','ACG':'T','ACA':'T','GCT':'A','GCA':'A','GCG':'A','GCC':'A', | |
'TAT':'Y','TAC':'Y','TAA':'STOP','TAG':'STOP','CAT':'H','CAC':'H','CAA':'Q','CAG':'Q','AAT':'N','AAC':'N','AAA':'K','AAG':'K', | |
'GAT':'D','GAC':'D','GAA':'E','GAG':'E','TGT':'C','TGC':'C','TGA':'STOP','TGG':'W','CGT':'R','CGA':'R','CGG':'R','CGC':'R', | |
'AGA':'R','AGG':'R','AGT':'S','AGC':'S','GGT':'G','GGA':'G','GGC':'G','GGG':'G' | |
} | |
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 | |
# -*- coding: utf-8 -*- | |
#============ start of code (1) ========= | |
import argparse | |
def q1(): | |
parser = argparse.ArgumentParser( |
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
-- Informatics 1 - Functional Programming | |
-- Tutorial 4 | |
-- | |
-- Due: the tutorial of week 6 (27/28 Oct) | |
import Data.List (nub) | |
import Data.Char | |
import Test.QuickCheck | |
import Network.HTTP (simpleHTTP,getRequest,getResponseBody) |
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
visgean@rew:~/p/cpp-ethereum/build (master)$ make -j8 | |
Scanning dependencies of target BuildInfo.h | |
Scanning dependencies of target ethash | |
Scanning dependencies of target devcore | |
Scanning dependencies of target ethstratum | |
[ 2%] Building CXX object libethash/CMakeFiles/ethash.dir/sha3_cryptopp.cpp.o | |
[ 4%] Building C object libethash/CMakeFiles/ethash.dir/internal.c.o | |
[ 6%] Building C object libethash/CMakeFiles/ethash.dir/io_posix.c.o | |
[ 8%] Building C object libethash/CMakeFiles/ethash.dir/io.c.o | |
[ 10%] Building CXX object libstratum/CMakeFiles/ethstratum.dir/EthStratumClient.cpp.o |
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
dot :: [Int] -> [Int] -> Int | |
dot r1 r2 = sum (zipWith (*) r1 r2) | |
n_chunks :: Int -> [Int] -> Matrix | |
n_chunks _ [] = [] | |
n_chunks n xs = take n xs: n_chunks n (drop n xs) | |
timesM :: Matrix -> Matrix -> Matrix | |
timesM a b | not (valid a) || not (valid b) = error "Po hube dostanes!" |
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
fe80::db7b:729e:fb7d:e14/64 |
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 yesno(prompt, answers=None): | |
if answers is None: | |
answers = { | |
'yes': True, | |
'no': False | |
} | |
prompt = prompt.encode('ascii', 'ignore') | |
while True: | |
answer = raw_input(u'{0} [{1}]: '.format( |
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 optparse import make_option | |
from django.conf import settings | |
from django.core.management.base import BaseCommand, CommandError | |
from django.utils import translation | |
class Command(BaseCommand): | |
help = 'Export any model to CSV' |