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
#Moving up/down dir structure | |
print os.listdir('.') # current level | |
print os.listdir('..') # one level up | |
print os.listdir('../..') # two levels up | |
# more complex example: | |
# This will walk the file system beginning in the directory the script is run from. It | |
# deletes the empty directories at each level |
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
var DNA_NUCLEOTIDES = ['A', 'T', 'C', 'G']; | |
var ALL_NUCLEOTIDES = DNA_NUCLEOTIDES.concat('U'); | |
function initialCounts() { | |
return DNA_NUCLEOTIDES.reduce(function(counts, nucleotide) { | |
counts[nucleotide] = 0; | |
return counts; | |
}, {}); | |
} |