Result:
found more than 489 distributions - search limited to the first 2001 files matching your query ( run in 0.985 )


A1z-HTML5-Template

 view release on metacpan or  search on metacpan

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

				axis: "x",
				stop: function() { tabs.tabs( "refresh" ); }
			});
		}); 
		  
		// dialog 
		\$( function() {
			\$( "#dialog" ).dialog({
			  autoOpen: false,
			  show: {
				effect: "blind",
				duration: 1000
			  },

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

				duration: 1000
			  }
			});
		 
			\$( "#opener" ).click(function() {
			  \$( "#dialog" ).dialog( "open" );
			});
		});
		  
		\$('#menu').menu(); 
		\$('#accordion').accordion(); 

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

				axis: "x",
				stop: function() { tabs.tabs( "refresh" ); }
			});
		}); 
		  
		// dialog 
		\$(function() {
			\$( "#dialog" ).dialog({
			  autoOpen: false,
			  show: {
				effect: "blind",
				duration: 1000
			  },

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

				duration: 1000
			  }
			});
		 
			\$( "#opener" ).click(function() {
			  \$( "#dialog" ).dialog( "open" );
			});
		});
		  
		\$('#menu').menu(); 
		\$('#accordion').accordion(); 

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

	my %in;
	%in = (
		-nbMenuName 	=>	"", 
		-nbPageName 	=> 	"",
		-nbServer    =>  "",
		-nbLinks => "blog-support-help-contact-sale",
		@_,		
	);
	
	return qq{<script src="https://www.a1z.us/js/utils/top-nav-bar.js"></script>
<!--top nav bar begin-->

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

	    <a class="prev">‹</a>
	    <a class="next">›</a>
	    <a class="close">×</a>
	    <a class="play-pause"></a>
	    <ol class="indicator"></ol>
	    <!-- The modal dialog, which will be used to wrap the lightbox content -->
	    <div class="modal fade">
	        <div class="modal-dialog">
	            <div class="modal-content">
	                <div class="modal-header">
	                    <button type="button" class="close" aria-hidden="true">&times;</button>
	                    <h4 class="modal-title"></h4>
	                </div>

lib/A1z/HTML5/Template.pm  view on Meta::CPAN


			$out .= $div4tabs;

			close FILE;
		}
		elsif ($output_format eq 'dialog')
		{
			$out .= qq{<h2>Dialog: <a href="#opener" id="opener" title="Opens the Dialog">$output_header</a></h2>
<div id="dialog">\n}; 
		}
		else 
		{
			$out .= qq{\n<h2>$output_header</h2>\n}; 
		}

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

				# Mismatching fragment identifier. See 1797.
				# $div not available here as <FILE> is not open here.
				$out .= qq{\t<div id="tabs-$serial"><p>$div</p></div>\n}; 
				
			}
			elsif ($output_format eq 'dialog')
			{
				# includes everything; So, no filtering.
				
				# But, just remove symbols in both $h1 and $div
				$div =~ s!^(==|\#|--)!!g;
				$h1 =~ s!^(==|\#|--)!!g;
					
				$out .= qq{\t\t<h4 class="dialog-header">$h1</h4>\n\t\t<div class="dialog-content">$div <hr/></div>\n}; 
			}
			else 
			{
				$out .= qq{$h1 $div}; 	# or $line
			}

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

		}
		elsif ($output_format eq 'tabs')
		{
			$out .= qq{</div><!--end tabs-->\n}; 
		}
		elsif ($output_format eq 'dialog') 
		{
			$out .= qq{</div><!--end dialog-->\n}; 
		}
		else 
		{
			$out .= qq{\n\n}; 
		}

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

	
		$h->body_js_css();
		
		Includes 
			jquery 1.12.4, jquery ui 1.11.4, bootstrap 3.3.0, 
			javascript for #dialog function, #menu, #accordion, #tabs 
	
	Add your own .js file: 
		
		use $h->body_js_css("/path/to/js/file.js");
		

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

		blueimp-gallery
		ie-10 workaround                   from a1z.us
		
		functions
		
			tabs, dialog, menu, accordion

=head2 html_bootstrap_css 

	For Internal/Future Use

lib/A1z/HTML5/Template.pm  view on Meta::CPAN


	$h->html_navbar(
		-nbMenuName => "menuName", 
		-nbPageName => "pageName", 
		-nbServer => "serverName", 
		-nbLinks => "dropDownLinks: URLs separated by a dash, mostly relative URLs. E.g., blog-support-help-contact-sale"
	);

=head2 html_bootstrap_js

	For Internal/Future Use

lib/A1z/HTML5/Template.pm  view on Meta::CPAN

If your Modified Version has been derived from a Modified Version made
by someone other than you, you are nevertheless required to ensure that
your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service
mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import and
otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the

 view all matches for this distribution


AAAA-Crypt-DH

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


AAC-Pvoice

 view release on metacpan or  search on metacpan

lib/AAC/Pvoice.pm  view on Meta::CPAN

use AAC::Pvoice::Bitmap;
use AAC::Pvoice::Input;
use AAC::Pvoice::Row;
use AAC::Pvoice::EditableRow;
use AAC::Pvoice::Panel;
use AAC::Pvoice::Dialog;
use Text::Wrap qw(wrap);

BEGIN {
	use Exporter ();
	use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);

lib/AAC/Pvoice.pm  view on Meta::CPAN

                                wxFONTENCODING_SYSTEM));

	my $h = $m->GetSize->GetHeight;
	$p->Destroy;

	my $d = AAC::Pvoice::Dialog->new(undef, -1, $caption, [$x,$y], [310,100+$h]);
	
	my $messagectrl = Wx::StaticText->new($d->{panel},
                                          -1,
                                          $message,
                                          wxDefaultPosition,

 view all matches for this distribution


ABNF-Grammar

 view release on metacpan or  search on metacpan

lib/ABNF/Validator.pm  view on Meta::CPAN


		my %res = ();
		foreach my $token ( @$commands ) {
			# command
			my $str = "
					#<logfile: /dev/null>

					^ <" . _fixRulename($token) . "> \$

					$self->{_rules}
			";

 view all matches for this distribution


AC-DC

 view release on metacpan or  search on metacpan

lib/AC/DC/Debug.pm  view on Meta::CPAN

# -*- perl -*-

# Copyright (c) 2009 AdCopy
# Author: Jeff Weisberg
# Created: 2009-Mar-27 11:40 (EDT)
# Function: debugging + log msgs
#
# $Id$

package AC::DC::Debug;
use AC::Daemon;

 view all matches for this distribution


AC-MrGamoo

 view release on metacpan or  search on metacpan

lib/AC/MrGamoo.pm  view on Meta::CPAN

specify a secret key used to encrypt data transfered between
systems in different datacenters.

    secret squeamish-ossifrage

=item syslog

specify a syslog facility for log messages.

    syslog local5

=item basedir

local directory to store files

 view all matches for this distribution


AC-Yenta

 view release on metacpan or  search on metacpan

lib/AC/Yenta.pm  view on Meta::CPAN

code can use other conflict resolution mechanisms.

Lost, missing or otherwise inconsistent data is detected
by kibitzing merkle tree hash values.

=head2 Topological awareness

Yentas can take network topology into account when tranferring
data around to minimize long-distance transfers. You will need to
write a custom C<MySelf> class with a C<my_datacenter> function.

=head2 Multiple Network Interfaces / NAT

lib/AC/Yenta.pm  view on Meta::CPAN

specify a secret key used to encrypt data transfered between
yentas in different datacenters.

    secret squeamish-ossifrage

=item syslog

specify a syslog facility for log messages.

    syslog local5

=item debug

enable debugging for a particular section

 view all matches for this distribution


ACL-Regex

 view release on metacpan or  search on metacpan

examples/postifx-policy-server.pl  view on Meta::CPAN

#!/usr/bin/perl
#
use IO::Socket;
use threads;
use Proc::Daemon;
use Sys::Syslog qw( :DEFAULT setlogsock);

use Data::Dumper;
use lib( "./" );
use ACL;

examples/postifx-policy-server.pl  view on Meta::CPAN

{
	unlink( $pidfile );
	exit(0);
}

#openlog('missed-spam-policy', '', 'mail');
#syslog('info', 'launching in daemon mode') if $ARGV[0] eq 'quiet-quick-start';
#Proc::Daemon::Init if $ARGV[0] eq 'quiet-quick-start';

# Attempt to parse in the redirect config

$SIG{INT} = \&handle_sig_int;

examples/postifx-policy-server.pl  view on Meta::CPAN

foreach my $thread ( @threads ){
	$thread->join();
}

unlink( $pidfile );
closelog;
exit( 0 );

 view all matches for this distribution


ACME-Dzil-Test-daemon

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Version change log for ACME-Dzil-Test-daemon

0.001     2021-12-16 19:34:59 GMT
  - The first thing you changed!
  - Test entry

 view all matches for this distribution


ACME-Dzil-Test-daemon2

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Version change log for ACME-Dzil-Test-daemon2

0.001     2021-12-16 19:51:37 GMT
  - The first thing you changed!

 view all matches for this distribution


ACME-MyFirstModule-SETHS

 view release on metacpan or  search on metacpan

lib/ACME/MyFirstModule/SETHS.pm  view on Meta::CPAN

If your Modified Version has been derived from a Modified Version made
by someone other than you, you are nevertheless required to ensure that
your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service
mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import and
otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the

 view all matches for this distribution


ACME-THEDANIEL-Utils

 view release on metacpan or  search on metacpan

lib/ACME/THEDANIEL/Utils.pm  view on Meta::CPAN

If your Modified Version has been derived from a Modified Version made
by someone other than you, you are nevertheless required to ensure that
your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service
mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import and
otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the

 view all matches for this distribution


ADAMK-Release

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


AES128

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN


The name and version of the module you were trying to build.

=item 4.

A full log of the build that failed.

=item 5.

Any other information that you think could be relevant.

ppport.h  view on Meta::CPAN

memEQs|5.009005||p
memEQ|5.004000||p
memNEs|5.009005||p
memNE|5.004000||p
mem_collxfrm|||
mem_log_alloc|||n
mem_log_common|||n
mem_log_free|||n
mem_log_realloc|||n
mess_alloc|||
mess_nocontext|||vn
mess_sv||5.013001|
mess||5.006000|v
mfree||5.007002|n

ppport.h  view on Meta::CPAN

newXS||5.006000|
new_collate||5.006000|
new_constant|||
new_ctype||5.006000|
new_he|||
new_logop|||
new_numeric||5.006000|
new_stackinfo||5.005000|
new_version||5.009000|
new_warnings_bitfield|||
next_symbol|||

ppport.h  view on Meta::CPAN

whichsig|||
win32_croak_not_implemented|||n
with_queued_errors|||
wrap_op_checker||5.015008|
write_to_stderr|||
xs_boot_epilog|||
xs_handshake|||vn
xs_version_bootcheck|||
yyerror_pvn|||
yyerror_pv|||
yyerror|||

 view all matches for this distribution


AFS-Command

 view release on metacpan or  search on metacpan

lib/AFS/Command/BOS.pm  view on Meta::CPAN

    return if $errors;
    return $result;

}

sub getlog {

    my $self = shift;
    my (%args) = @_;

    my $result = AFS::Object::BosServer->new();

    $self->{operation} = "getlog";

    my $redirect = undef;
    my $redirectname = undef;

    if ( $args{redirect} ) {

lib/AFS/Command/BOS.pm  view on Meta::CPAN


    my $errors = 0;

    $errors++ unless $self->_exec_cmds();

    my $log = "";

    while ( defined($_ = $self->{handle}->getline()) ) {
	next if /^Fetching log file/;
	if ( $redirect ) {
	    $redirect->print($_);
	} else {
	    $log .= $_;
	}
    }

    if ( $redirect ) {
	$redirect->close()|| do {
	    $self->_Carp("Unable to close $redirectname: $ERRNO");
	    $errors++
	};
	$result->_setAttribute( log => $redirectname );
    } else {
	$result->_setAttribute( log => $log );
    }

    $errors++ unless $self->_reap_cmds();
    $errors++ unless $self->_restore_stderr();

 view all matches for this distribution


AFS-Monitor

 view release on metacpan or  search on metacpan

examples/xstat_cm_test  view on Meta::CPAN

  printf "\t%10d PFlush\n", $data->{PFlush};
  printf "\t%10d PFlushVolumeData\n", $data->{PFlushVolumeData};
  printf "\t%10d PNewStatMount\n", $data->{PNewStatMount};
  printf "\t%10d PGetTokens\n", $data->{PGetTokens};
  printf "\t%10d PSetTokens\n", $data->{PSetTokens};
  printf "\t%10d PUnlog\n", $data->{PUnlog};
  printf "\t%10d PCheckServers\n", $data->{PCheckServers};
  printf "\t%10d PCheckAuth\n", $data->{PCheckAuth};
  printf "\t%10d PCheckVolNames\n", $data->{PCheckVolNames};
  printf "\t%10d PFindVolume\n", $data->{PFindVolume};
  printf "\t%10d Prefetch\n", $data->{Prefetch};

 view all matches for this distribution


AFS-PAG

 view release on metacpan or  search on metacpan

lib/AFS/PAG.pm  view on Meta::CPAN


our (@EXPORT_OK, $VERSION);

# Set all import-related variables in a BEGIN block for robustness.
BEGIN {
    @EXPORT_OK = qw(hasafs haspag setpag unlog);
    $VERSION   = '1.02';
}

# Load the binary module.
bootstrap AFS::PAG $VERSION;

1;
__END__

=for stopwords
Allbery AFS PAG libkafs libkopenafs Kerberos aklog UID kdestroy

=head1 NAME

AFS::PAG - Perl bindings for AFS PAG manipulation

=head1 SYNOPSIS

    use AFS::PAG qw(hasafs setpag unlog);

    if (hasafs()) {
        setpag();
        system('aklog') == 0
          or die "cannot get tokens\n";
        do_afs_things();
        unlog();
    }

=head1 DESCRIPTION

AFS is a distributed file system allowing cross-platform sharing of files

lib/AFS/PAG.pm  view on Meta::CPAN


With the functions provided by this module, a Perl program can detect
whether AFS is available on the local system (hasafs()) and whether it is
currently running inside a PAG (haspag()).  It can also create a new PAG
and put the current process in it (setpag()) and remove any AFS tokens in
the current PAG (unlog()).

Note that this module doesn't provide a direct way to obtain new AFS
tokens.  Programs that need AFS tokens should normally obtain Kerberos
tickets (via whatever means) and then run the program B<aklog>, which
comes with most AFS distributions.  This program will create AFS tokens
from the current Kerberos ticket cache and store them in the current PAG.
To isolate those credentials from the rest of the system, call setpag()
before running B<aklog>.

=head1 FUNCTIONS

This module provides the following functions, none of which are exported
by default:

lib/AFS/PAG.pm  view on Meta::CPAN

Creates a new, empty PAG and put the current process in it.  This should
normally be called before obtaining new AFS tokens to isolate those tokens
from other processes on the system.  Returns true on success and throws
an exception on failure.

=item unlog()

Deletes all AFS tokens in the current PAG, similar to the action of
B<kdestroy> on a Kerberos ticket cache.  Returns true on success and
throws an exception on failure.

lib/AFS/PAG.pm  view on Meta::CPAN

setpag() failed.  The end of the error message will be a translation of
the system call error number.

=item Token deletion failed: %s

unlog() failed.  The end of the error message will be a translation of
the system call error number.

=back

=head1 RESTRICTIONS

lib/AFS/PAG.pm  view on Meta::CPAN

This module currently doesn't provide the k_pioctl() or pioctl() function
to make lower-level AFS system calls.  It also doesn't provide the libkafs
functions to obtain AFS tokens from Kerberos tickets directly without using
an external ticket cache.  This prevents use of internal Kerberos ticket
caches (such as memory caches), since the Kerberos tickets used to generate
AFS tokens have to be visible to an external B<aklog> program.

=head1 AUTHOR

Russ Allbery <rra@cpan.org>

=head1 SEE ALSO

aklog(1)

The current version of this module is always available from its web site
at L<http://www.eyrie.org/~eagle/software/afs-pag/>.

=cut

 view all matches for this distribution


AFS

 view release on metacpan or  search on metacpan

src/AFS.pm  view on Meta::CPAN

          rmmount
          setcachesize
          setcellstatus
          setquota
          sysname
          unlog
          whereis
          whichcell
          wscell

          get_server_version

 view all matches for this distribution


AHA

 view release on metacpan or  search on metacpan

example/lava_lamp.pl  view on Meta::CPAN

Jenkins. In this mode, the C<type> parameter is used for signaling whether the
lamp should be switched on ("problem") or off ("recovery").

=item list

This scripts logs all activities in a log file C<$LOG_FILE>. With the "list"
mode, all history entries can be viewed. 

=back

=cut

example/lava_lamp.pl  view on Meta::CPAN

    };

# File holding the lamp's status
my $STATUS_FILE = "/var/run/lamp.status";

# Log file where to log to 
my $LOG_FILE = "/var/log/lamp.log";

# Stop file, when, if exists, keeps the lamp off
my $OFF_FILE = "/tmp/lamp_off";

# Time back in passed assumed when switching was done manually (seconds)

example/lava_lamp.pl  view on Meta::CPAN


# Check current switch state    
my $is_on = $lamp->is_on();

# Log a manual switch which might has happened in between checks or notification
log_manual_switch($status,$is_on);

if ($mode eq "watch") {
   # Watchdog mode If the lamp is on but out of the period, switch it
    # off. Also, if it is running alredy for too long. $off_file can be used 
    # to switch it always off.

example/lava_lamp.pl  view on Meta::CPAN

    if (! -e $STATUS_FILE) {
        store $status,$STATUS_FILE;
    }
}

sub log_manual_switch {
    my $status = shift;
    my $is_on = shift;
    my $last = get_last_entry($status);
    if ($last && $is_on != $last->[1]) {
        # Change has been manualy in between the interval. Add an approx history entry

example/lava_lamp.pl  view on Meta::CPAN

                    $config->{user});
}

sub close_lamp {
    my $lamp = shift;
    $lamp->logout();
}

package Lamp;

use AHA;

example/lava_lamp.pl  view on Meta::CPAN


sub off { 
    shift->{switch}->off();
}

sub logout {
    shift->{aha}->logout();
}

=head1 LICENSE

lava_lampl.pl is free software: you can redistribute it and/or modify

 view all matches for this distribution


AI-ANN

 view release on metacpan or  search on metacpan

lib/AI/ANN.pm  view on Meta::CPAN


=head1 SYNOPSIS

AI::ANN is an artificial neural network simulator. It differs from existing 
solutions in that it fully exposes the internal variables and allows - and 
forces - the user to fully customize the topology and specifics of the 
produced neural network. If you want a simple solution, you do not want this 
module. This module was specifically written to be used for a simulation of 
evolution in neural networks, not training. The traditional 'backprop' and 
similar training methods are not (currently) implemented. Rather, we make it 
easy for a user to specify the precise layout of their network (including both 
topology and weights, as well as many parameters), and to then retrieve those 
details. The purpose of this is to allow an additional module to then tweak 
these values by a means that models evolution by natural selection. The 
canonical way to do this is the included AI::ANN::Evolver, which allows 
the addition of random mutations to individual networks, and the crossing of 
two networks. You will also, depending on your application, need a fitness 

 view all matches for this distribution


AI-Calibrate

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


1.4   Thu Aug 2 2012
      - Revised calibration algorithm based on bug
      - Updated tests in ./t
      - Added ./t/AI-Calibrate-KL.t using Kun Liu's dataset.
      - Added ./t/AI-Calibrate-pathologies.t to test for pathological cases.

1.3   Fri Nov 4
      - Removed dependency on Test::Deep, added explicit declaration of
        dependency on Test::More to Makefile.PL

 view all matches for this distribution


AI-Categorizer

 view release on metacpan or  search on metacpan

lib/AI/Categorizer.pm  view on Meta::CPAN

document's I<features>.  The features may be any properties of the
document that seem helpful for determining its category, but they are usually
some version of the "most important" words in the document.  A list of
features and their weights in each document is encapsulated by the
C<AI::Categorizer::FeatureVector> class.  You may think of this class
as roughly analogous to a Perl hash, where the keys are the names of
features and the values are their weights.

=head2 Hypotheses

The result of asking a categorizer to categorize a previously unseen

 view all matches for this distribution


AI-Classifier

 view release on metacpan or  search on metacpan

lib/AI/Classifier/Text/FileLearner.pm  view on Meta::CPAN

    }

    foreach my $doc (@documents) {
        my $f = $doc->{attributes};
        for (keys %$f) {
            $f->{$_} *= log($num_docs / ($frequency{$_} // 0) - $subtrahend);
        }
    }
}

sub euclidean_length {

 view all matches for this distribution


AI-CleverbotIO

 view release on metacpan or  search on metacpan

lib/AI/CleverbotIO.pm  view on Meta::CPAN

has key => (
   is       => 'ro',
   required => 1,
);

has logger => (
   is      => 'ro',
   lazy    => 1,
   builder => 'BUILD_logger',
);

has nick => (
   is        => 'rw',
   lazy      => 1,

lib/AI/CleverbotIO.pm  view on Meta::CPAN

   is      => 'ro',
   lazy    => 1,
   builder => 'BUILD_ua',
);

sub BUILD_logger {
   return Log::Any->get_logger;
}

sub BUILD_ua {
   my $self = shift;
   require HTTP::Tiny;

lib/AI/CleverbotIO.pm  view on Meta::CPAN

sub _parse_response {
   my ($self, $response) = @_;

   {
      local $Data::Dumper::Indent = 1;
      $self->logger->debug('got response: ' . Dumper($response));
   }

   ouch 500, 'no response (possible bug in HTTP::Tiny though?)'
     unless ref($response) eq 'HASH';

 view all matches for this distribution


AI-ConfusionMatrix

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN

repository.url = https://gitlab.com/vi.le/perl-ai-confusionmatrix.git
repository.web = https://gitlab.com/vi.le/perl-ai-confusionmatrix
repository.type = git

[AutoPrereqs]
[ChangelogFromGit]
file_name   = Changes
max_age = 730
[CopyFilesFromBuild]
copy = cpanfile
copy = LICENSE

 view all matches for this distribution


AI-DecisionTree

 view release on metacpan or  search on metacpan

lib/AI/DecisionTree.pm  view on Meta::CPAN


sub entropy2 {
  shift;
  my ($counts, $total) = @_;

  # Entropy is defined with log base 2 - we just divide by log(2) at the end to adjust.
  my $sum = 0;
  $sum += $_ * log($_) foreach values %$counts;
  return +(log($total) - $sum/$total)/log(2);
}

sub entropy {
  shift;

  my %count;
  $count{$_}++ foreach @_;

  # Entropy is defined with log base 2 - we just divide by log(2) at the end to adjust.
  my $sum = 0;
  $sum += $_ * log($_) foreach values %count;
  return +(log(@_) - $sum/@_)/log(2);
}

sub prune_tree {
  my $self = shift;

lib/AI/DecisionTree.pm  view on Meta::CPAN

  #  i = number of instances in the entire tree
  #  e = number of errors below this node

  # Hypothesis description length (MML):
  #  describe tree: number of nodes + number of edges
  #  describe exceptions: num_exceptions * log2(total_num_instances) * log2(total_num_results)
  
  my $r = keys %{ $self->{results} };
  my $i = $self->{tree}{instances};
  my $exception_cost = log($r) * log($i) / log(2)**2;

  # Pruning can turn a branch into a leaf
  my $maybe_prune = sub {
    my ($self, $node) = @_;
    return unless $node->{children};  # Can't prune leaves

 view all matches for this distribution


AI-Embedding

 view release on metacpan or  search on metacpan

lib/AI/Embedding.pm  view on Meta::CPAN


An Embedding is a multi-dimensional vector representing the meaning of a piece of text.  The Embedding vector is created by an AI Model.  The default model (OpenAI's C<text-embedding-ada-002>) produces a 1536 dimensional vector.  The resulting vector...

=head2 Comparator

Embeddings are used to compare similarity of meaning between two passages of text.  A typical work case is to store a number of pieces of text (e.g. articles or blogs) in a database and compare each one to some user supplied search text.  L<AI::Embed...

Alternatively, the C<comparator> method can be called with one Embedding.  The C<comparator> returns a reference to a method that takes a single Embedding to be compared to the Embedding from which the Comparator was created.

When comparing multiple Embeddings to the same Embedding (such as search text) it is faster to use a C<comparator>.

 view all matches for this distribution


AI-Evolve-Befunge

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

Version made by someone other than you, you are nevertheless required
to ensure that your Modified Version complies with the requirements of
this license.

(12)  This license does not grant you the right to use any trademark,
service mark, tradename, or logo of the Copyright Holder.

(13)  This license includes the non-exclusive, worldwide,
free-of-charge patent license to make, have made, use, offer to sell,
sell, import and otherwise transfer the Package with respect to any
patent claims licensable by the Copyright Holder that are necessarily

 view all matches for this distribution


AI-ExpertSystem-Advanced

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


( run in 0.985 second using v1.01-cache-2.11-cpan-49f99fa48dc )