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
| I am attesting that this GitHub handle stepjue is linked to the Tezos account tz1LhoBCe6e3wM5LRqyXBX8DjZnKNg5ybGsu for tzprofiles | |
| sig:edsigtowU15cxn4QgayDp5qt1A6Gue3MBHMXxRuWvc7LKuEqiAgQy9fSvXXT2WAHtcoBFXnh4rdG5Xr12AFHhRTK4fRNgLen7am |
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
| const canvasSketch = require('canvas-sketch'); | |
| const settings = { | |
| dimensions: [ 800, 800 ], | |
| animate: true, | |
| duration: 7.5, | |
| fps: 24 | |
| }; | |
| const sketch = () => { |
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 prefix(l, k): | |
| return l[0:k] | |
| def suffix(l, k): | |
| return l[-k:] | |
| def parse_fasta(file): | |
| fasta = {} | |
| with open(file) as f: | |
| lines = f.readlines() |
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
| mass = { | |
| "A" : 71.03711, | |
| "C" : 103.00919, | |
| "D" : 115.02694, | |
| "E" : 129.04259, | |
| "F" : 147.06841, | |
| "G" : 57.02146, | |
| "H" : 137.05891, | |
| "I" : 113.08406, | |
| "K" : 128.09496, |
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 hamming_distance(s,t): | |
| dist = 0 | |
| for i in range(s): | |
| if(s[i] != t[i]): | |
| dist++ | |
| return dist | |
| if __name__ == "__main__": | |
| lines = [] | |
| for line in open("rosalind_hamm.txt"): |
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
| codons = { | |
| "UUU" : "F", | |
| "CUU" : "L", | |
| "AUU" : "I", | |
| "GUU" : "V", | |
| "UUC" : "F", | |
| "CUC" : "L", | |
| "AUC" : "I", | |
| "GUC" : "V", | |
| "UUA" : "L", |
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 rna_codons import codons | |
| def chunks(l, n): | |
| for i in xrange(0, len(l), n): | |
| yield l[i:i+n] | |
| def translate(dna): | |
| protein = "" | |
| for codon in chunks(dna, 3): | |
| amino = codons[codon] |