Skip to content

Instantly share code, notes, and snippets.

View zhangzhen's full-sized avatar

Zhang Zhen zhangzhen

View GitHub Profile
@luna-1024
luna-1024 / main.rs
Last active May 10, 2022 10:18
Rust parallel word frequency
extern crate multimap;
extern crate rayon;
use multimap::MultiMap;
use rayon::prelude::*;
use std::cmp::Ordering;
use std::env;
use std::fs::File;
use std::io::{Read, Write};
import sys
class Line(object):
def __init__(self, line):
self.fields = line.split('\t')
self.chrom = self.fields[0]
self.start = int(self.fields[1])
self.end = int(self.fields[2])
self.depth = int(self.fields[3])