<commit_before>#!/usr/bin/perl
use strict;
use warnings;

my $fasta = shift;
open my $fh, '<', $fasta or die $!;
my %fasta   = simple_fasta( do { local $/; <$fh> } );
my $ntax    = scalar keys %fasta;
my ($nchar) = map { length($_) } values %fasta;

print "$ntax $nchar\n";
for my $defline ( keys %fasta ) {
	if ( $defline =~ /taxon\|(\d+)/ ) {
		my $name = $1;
		print $name, ' ', $fasta{$defline}, "\n";
	}
}

# reads a FASTA string, returns a hash keyed on definition line (sans '>'
# prefix), value is concatenated seq<commit_msg>taxon name is now exactly 10 characters<commit_after>#!/usr/bin/perl
use strict;
use warnings;

my $fasta = shift;
open my $fh, '<', $fasta or die $!;
my %fasta   = simple_fasta( do { local $/; <$fh> } );
my $ntax    = scalar keys %fasta;
my ($nchar) = map { length($_) } values %fasta;

print "$ntax $nchar\n";
for my $defline ( keys %fasta ) {
	if ( $defline =~ /taxon\|(\d+)/ ) {
		my $name = $1;
		print $name, ' ' x ( 10 - length($name) ), $fasta{$defline}, "\n";
	}
}

# reads a FASTA string, returns a hash keyed on definition line (sans '>'
# prefix), value is concatenated seq
{'fraction_non_alphanumeric': 0.19302949061662197, 'fraction_numerical': 0.005361930294906166, 'mean_word_length': 3.5528455284552845, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1344553', 'n_tokens_mistral': 453, 'n_tokens_neox': 442, 'n_words': 140}