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
import unittest | |
from math import pi, degrees | |
def get_hour_angle(hour, minute=0): | |
angle = (hour / 6.) * pi | |
minute_angle = get_minute_angle(minute) / 12 | |
return angle + minute_angle | |
def get_minute_angle(minute): | |
angle = (minute / 30.) * pi |
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
import unittest | |
class 유형: | |
def __init__(자기, *인수, **키워드인수): | |
자기.생성될때(*인수, **키워드인수) | |
class 시험사례(unittest.TestCase): | |
같아야함 = unittest.TestCase.assertEquals | |
class 배열(list): |
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 is_valid_fastq(lines): | |
start = lines[0].startswith('@') | |
middle = lines[2].startswith('+') | |
length = len(lines[1]) == len(lines[3]) | |
return all([start, middle, length]) | |
def FastqIterator(file): | |
lines = [file.next(), file.next(), file.next()] | |
for line in file: | |
lines.append(line) |
NewerOlder