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
#!/usr/bin/env perl6 | |
use v6; | |
sub MAIN ($file) { | |
my %bases = (T => '00', C => '01', A => '10', G => '11'); | |
my %bytes = (0..255).map({ sprintf('%08d', $_.base(2)) }) Z=> (0..255); | |
my $io = $file.IO.open; | |
while (my $hunk = $io.readchars(4)) { | |
last unless $hunk.chars == 4; |
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
#!/usr/bin/env perl6 | |
use v6; | |
use Stats; | |
sub bench(Str $name, Int $upto, &code) { | |
my ($start,$end); | |
my @times; | |
for 1..20 { |
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
class Matplotlib { | |
use Inline::Python; | |
has $!py; | |
submethod BUILD() { | |
$!py = Inline::Python.new(); | |
$!py.run('import matplotlib.pyplot') | |
} |