<commit_before>#!/usr/bin/perl

use Socket;
use XML::LibXML;
use Getopt::Std;

sub hex2ip()
{
    my $in = shift || "";
    return inet_ntoa(pack("N", hex("$in")));
}

sub hex2proto()
{
    my $in = shift || "";
    my $proto = hex("$in");
    my $proto_h = $proto >> 24;
    if ($proto_h == 6) {
	return "TCP";
    } elsif ($proto_h == 17) {
	return "UDP";
    } elsif ($proto_h == 1) {
	return "ICMP";
    } elsif ($proto_h == 0) {
	return "ANY";
    }<commit_msg>strict mode<commit_after>#!/usr/bin/perl

use strict;
use warnings;
use Socket;
use XML::LibXML;
use Getopt::Std;

our ($opt_f,$opt_o);

sub hex2ip()
{
    my $in = shift || "";
    return inet_ntoa(pack("N", hex("$in")));
}

sub hex2proto()
{
    my $in = shift || "";
    my $proto = hex("$in");
    my $proto_h = $proto >> 24;
    if ($proto_h == 6) {
	return "TCP";
    } elsif ($proto_h == 17) {
	return "UDP";
    } elsif ($proto_h == 1) {
	return "ICMP";
    } elsif ($proto_h == 0) {
	return "ANY";
    }
{'fraction_non_alphanumeric': 0.21881390593047034, 'fraction_numerical': 0.018404907975460124, 'mean_word_length': 2.931726907630522, 'pattern_counts': {'":': 0, '<': 3, '<?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': '862425', 'n_tokens_mistral': 428, 'n_tokens_neox': 418, 'n_words': 101}