Skip to content

Instantly share code, notes, and snippets.

View choroba's full-sized avatar
🐫
open source

E. Choroba choroba

🐫
open source
  • Prague, Czech Republic
View GitHub Profile
@choroba
choroba / quine
Last active January 9, 2020 09:15
a Perl quine
$_=q!print'$_=q*'.$_.'*;';s/\52/\41/g;print!;print'$_=q!'.$_.'!;';s/\52/\41/g;print
#!/usr/bin/perl
use warnings;
use strict;
use Test::More tests => 3;
{ my @list;
sub init {
my %elem;
#!/usr/bin/perl
use warnings;
use strict;
use Benchmark qw(cmpthese);
use Test::More;
my $String = "ATGC" x 1000;
my @Genes = qw(A T G C);
my %Count;
@choroba
choroba / coverages
Last active January 31, 2016 22:23
Coverage::History
#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
use HTML::TableExtract;
use Time::Piece;
use XML::XSH2;
sub shell {
(tool-bar-mode 0)
(menu-bar-mode 0)
(setq inhibit-splash-screen t)
(setq text-mode-hook 'turn-on-auto-fill)
(auto-compression-mode t)
(setq next-line-add-newlines t)
(setq truncate-partial-width-windows nil)
#!/usr/bin/perl
use warnings;
use strict;
use Carp qw{ confess };
use List::Util qw{ shuffle };
use Test::More tests => 5;
use Benchmark qw{ cmpthese };
my @ATTRS;
#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
use Time::Piece;
open my $GIT, '-|', qw{ git log --name-status --reverse };
my $date;
@choroba
choroba / sykora.pl
Last active February 23, 2018 23:48
Sýkora
#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
my $coef = 0.75;
my %shape = (
1 => { z => { c => 'bbbw', s => '0001' },
b => { c => 'bbwb', s => '0010' },
@choroba
choroba / req
Last active March 26, 2018 14:21
required moose attributes
#!/usr/bin/perl
use strict;
use feature qw{ say };
use warnings;
{ package My;
use Moose;
my $m = 1;
#!/usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
use Digest::MD5 qw{ md5_hex };
say 'Same' if md5_hex('240610708') == md5_hex('QNKCDZO');
say for md5_hex('240610708'), md5_hex('QNKCDZO');