PrismML představilo Ternary Bonsai 2.5 27B, kompaktní jazykový model zaměřený na programování a práci s nástroji. V podstatě se jedná o extrémně komprimovanou variantu open-weight modelu Qwen3.8 27B do ternární kvantizace (1,76 bitu na váhu), takže zabírá přibližně pouze 5,9 GB. Váhy jsou dostupné na Hugging face pod licencí Apache 2.0.
Na Slovensku vyvolala politický rozruch influencerka Lívie Pavlíková, která na svých sítích zveřejnila video ze hry Grand Theft Auto VI, v němž její postava střílí na duhovou vlajku. Poslanci Progresivného Slovenska na ni v reakci podali trestní oznámení s odvoláním se na hypotetické riziko eskalace nenávisti vůči sexuálním menšinám. Hnutí Republika ji naopak jmenovalo předsedkyní své nově vzniklé mládežnické organizace Mladá
… více »
$posts= preg_split('/From (.+) na (.+) (Mon|Tue|Wed|Thu|Fri|Sat|Sun) (.{3}) (.{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})/', implode(file('test.txt')), -1, PREG_SPLIT_NO_EMPTY);
while(list($key,$value)= each($posts)){
$post_split= preg_split('/Message-ID: (.+)/',$value);
$head= $post_split[0];
$message_text= $post_split[1];
preg_match('/From: (.+) na (.+) \((.+)\)/',$head,$from);
preg_match('/Subject: (.+)/',$head,$message_subject);
$post= $from[0]."\n".$message_subject[0]."\n\n".trim($message_text)."\n";
echo "$key\n<br>".nl2br(htmlspecialchars($post))."<br>\n<hr>\n";
}
Potrebuju nacist soubor a ten pak naparsovat na castiNic vic, nic min to nedela. Ja jsem jen potreboval ten kod vylepsit aby byl efektivnejsi
#!/usr/bin/env perl
use strict;
use warnings;
my $msg={};
my $header='';
my $firstFrom = qr(^From (.+) na (.+) (Mon|Tue|Wed|Thu|Fri|Sat|Sun) (.{3}) (.{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})$);
my $headerLine = qr(^\S+:);
sub ParseHeader {
my @headerLines = split m($/), $_[0];
my $ret = {};
@$ret{qw(usr site dayOfWeek month day hour min sec year)} =
shift(@headerLines) =~ /$firstFrom/;
foreach my $line (@headerLines) {
# tady si udelej co chces se zbytkem hlavicky a nacpi do $ret
}
return $ret;
}
sub PrintMsg {
my $msg = shift;
return unless ref $msg eq 'HASH' and %$msg;
use Data::Dumper;
print Data::Dumper->Dump([$msg],['msg']);
}
while (<>) {
chomp;
?$firstFrom?o and $header = $_ and next;
if ($header) {
/$headerLine/o and $header .= "$/$_" and next;
if (/^\s*$/) {
PrintMsg ($msg); # end of header - print msg
$msg = ParseHeader($header);
$header = '';
reset;
next;
}
# falesna hlavicka
$msg->{content} .= "$/" . $header;
$header = '';
next;
}
%$msg and $msg->{content} .= "$_$/" and next;
/\S/ and die 'Header not found';
}
#!/usr/bin/env perl
use strict;
use warnings;
my $msg={};
my @header;
my $firstFrom = qr(^From (.+) na (.+) (Mon|Tue|Wed|Thu|Fri|Sat|Sun) (.{3}) (.{2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})$);
my $headerLine = qr(^\S+:);
sub ParseHeader {
my $ret = {};
@$ret{qw(usr site dayOfWeek month day hour min sec year)} =
shift() =~ /$firstFrom/;
foreach my $line (@_) {
# tady si udelej co chces se zbytkem hlavicky a nacpi do $ret
}
return $ret;
}
sub PrintMsg {
my $msg = shift;
return unless ref $msg eq 'HASH' and %$msg;
use Data::Dumper;
shift @{$msg->{content}} while $msg->{content}[0] =~ /^\s*$/;
pop @{$msg->{content}} while $msg->{content}[$#{$msg->{content}}] =~ /^\s*$/;
print Data::Dumper->Dump([$msg],['msg']);
}
while (<>) {
chomp;
?$firstFrom?o and push @header, $_ and next;
if (@header) {
/$headerLine/o and push @header, $_ and next;
if (/^\s*$/) {
PrintMsg ($msg); # end of header - print msg
$msg = ParseHeader(@header);
@header = ();
reset;
next;
}
# falesna hlavicka
push @{$msg->{content}}, @header;
@header = ();
next;
}
%$msg and push @{$msg->{content}}, $_ and next;
/\S/ and die 'Header not found';
}
PrintMsg($msg);
Tiskni
Sdílej: