Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
soundmasterj
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
soundmasterj
4y ago
Oh no, when will the children sleep
2.
▲
by
soundmasterj
4y ago
They're saying we can have the moon.
3.
▲
by
soundmasterj
5y ago
This is good too. I would use a generator expression instead of the map though probably.
4.
▲
by
soundmasterj
5y ago
I didn't try to write optimized code, but idiomatic Python. Which also happens to be 10x faster. To make it streaming, take the second version and remove the readlines (directly iterate over f). Delegating work to Python's C inter
5.
▲
by
soundmasterj
5y ago
This is reasonably idiomatic Python and 10x faster than the implementation in the original post: with open("orthocoronavirinae.fasta") as f: text = ''.join((line.rstrip() for line in f.readlines() if not line.s