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


App-MHFS

 view release on metacpan or  search on metacpan

lib/MHFS/Plugin/BitTorrent/Client/Interface.pm  view on Meta::CPAN

        my $size_bytes  = $data->{'size_bytes'};
        # print out the current torrent status
        my $torrent_name = ${escape_html($torrent_raw)};
        my $size_print = get_SI_size($size_bytes);
        my $done_print = get_SI_size($bytes_done);
        my $percent_print = (sprintf "%u%%", ($bytes_done/$size_bytes)*100);
        my $buf = '<h1>Torrent</h1>';
        $buf  .=  '<h3><a href="../video">Video</a> | <a href="../music">Music</a></h3>';
        $buf   .= '<table border="1" >';
        $buf   .= '<thead><tr><th>Name</th><th>Size</th><th>Done</th><th>Downloaded</th></tr></thead>';
        $buf   .= "<tbody><tr><td>$torrent_name</td><td>$size_print</td><td>$percent_print</td><td>$done_print</td></tr></tbody>";
        $buf   .= '</table>';

        # Assume we are downloading, if the bytes don't match
        if($bytes_done < $size_bytes) {
            $buf   .= '<meta http-equiv="refresh" content="3">';

 view all matches for this distribution


App-MaMGal

 view release on metacpan or  search on metacpan

lib/App/MaMGal/Exceptions.pm  view on Meta::CPAN

sub _initialize
{
	my $self = shift;
	$self->SUPER::_initialize(@_);
	croak "This exception requires a message argument" unless $self->message;
	# zero-width negative look-ahead assertion: a percent not followed by percent
	my $placeholder_count = () = $self->message =~ /%(?!%)/g;
	my $object_count = $self->objects ? scalar @{$self->objects} : 0;
	croak "Message with $placeholder_count placeholders must be followed by this many arguments, not $object_count" unless $placeholder_count == $object_count;
}

 view all matches for this distribution


App-Magpie

 view release on metacpan or  search on metacpan

lib/App/Magpie/Action/Recent.pm  view on Meta::CPAN


#    $self->log( "uploads:  " . scalar(@uploads) );
#    $self->log( "nomageia: " . scalar(@nomageia) );
#    $self->log( "valid:    $nbvalid" );
    my $uploads = @uploads;
    my $percent = 100 - int( $nbvalid * 100 / $uploads );
    $self->log( "new=$uploads, not in mageia=$nbvalid, mageia coverage=$percent%" );
}



1;

 view all matches for this distribution


App-Music-ChordPro

 view release on metacpan or  search on metacpan

lib/ChordPro/Output/Common.pm  view on Meta::CPAN

# This is mostly intended for images.
# Since ABC generated SVG can contain multiple images, this function
# can be called in list context to get all the images.
# In scalar context, it returns the first (or only) image.

sub encode_percent {
    my ( $str ) = @_;
    require URI::Escape;
    return URI::Escape::uri_escape_utf8($str);
}

lib/ChordPro/Output/Common.pm  view on Meta::CPAN


    use MIME::Base64;
    # Emit as individual images.
    for my $img ( @img ) {
	if ( $mimetype =~ m;(text/|/svg); ) {
	    $img = "data:$mimetype,". encode_percent($img);
	    warn("mimedata: $mimetype, ", length($img), " bytes\n")
	      if $config->{debug}->{images};
	}
	else {
	    $img = encode_utf8($img) if $mimetype =~ /svg/;

 view all matches for this distribution


App-MusicTools

 view release on metacpan or  search on metacpan

bin/atonal-util  view on Meta::CPAN

        my $pitch_freq = $scala->pitch2freq($p);
        my $error      = $freq - $pitch_freq;

        $p = $Lyu->p2ly($p) if $Flag_Lyout;

        my $percent = abs($error) / $pitch_freq * 100;

        printf "%.2f\t%s\t%+.2f\t%.2f%%\n", $freq, $p, $error, $percent;
    }
}

sub gen_melody {
    my (@args) = @_;

 view all matches for this distribution


App-Muter

 view release on metacpan or  search on metacpan

bin/muter  view on Meta::CPAN


Implements the L<RFC 4648|https://tools.ietf.org/html/rfc4648> Base64 encoding.

=head2 form

Implements URI percent encoding, like C<uri>, except it encodes space as C<+>
instead of C<%20>, as for use in  I<application/x-www-form-urlencoded>.  This
used to be written C<uri(form)>, which is no longer allowed.

Otherwise accepts the same options as C<uri> (C<lower> and C<upper>).

bin/muter  view on Meta::CPAN

and "From " if they appear at the beginning of a line (including beginning of
input).

=head2 uri

Implements URI percent encoding.

Takes two possible options.  C<lower> and C<upper> control the type of hex
character emitted.

=head2 url64

bin/muter  view on Meta::CPAN

=over 4

=item B<muter> B<-c> -base64:uri

Decode the standard input as Base64 and output it, encoding it using URI
percent-encoding.

=item B<muter> B<-r> B<-c> -uri:base64

Exactly the same as the above.

 view all matches for this distribution


App-Mxpress-PDF

 view release on metacpan or  search on metacpan

public/javascripts/ace/mode-abc.js  view on Meta::CPAN

    var ABCHighlightRules = function () {

        this.$rules = {
            start: [
                {
                    token: ['zupfnoter.information.comment.line.percentage', 'information.keyword', 'in formation.keyword.embedded'],
                    regex: '(%%%%)(hn\\.[a-z]*)(.*)',
                    comment: 'Instruction Comment'
                },
                {
                    token: ['information.comment.line.percentage', 'information.keyword.embedded'],
                    regex: '(%%)(.*)',
                    comment: 'Instruction Comment'
                },

                {
                    token: 'comment.line.percentage',
                    regex: '%.*',
                    comment: 'Comments'
                },

                {

 view all matches for this distribution


App-Netdisco

 view release on metacpan or  search on metacpan

lib/App/Netdisco/DB/Result/Virtual/SubnetUtilization.pm  view on Meta::CPAN

__PACKAGE__->result_source_instance->is_virtual(1);
__PACKAGE__->result_source_instance->view_definition(<<'ENDSQL');
  SELECT net as subnet,
         power(2, (32 - masklen(net))) as subnet_size,
         count(DISTINCT ip) as active,
         round(100 * count(DISTINCT ip) / (power(2, (32 - masklen(net))))) as percent
    FROM (
      SELECT DISTINCT net, ni.ip
        FROM subnets s1, node_ip ni
        WHERE s1.net <<= ?::cidr
              AND ni.ip <<= s1.net

lib/App/Netdisco/DB/Result/Virtual/SubnetUtilization.pm  view on Meta::CPAN

              AND di.alias <<= s2.net
              AND s2.last_discover >= ?
              AND d.last_discover >= ?
    ) as joined
    GROUP BY net
    ORDER BY percent ASC
ENDSQL

__PACKAGE__->add_columns(
  "subnet",
  { data_type => "cidr", is_nullable => 0 },
  "subnet_size",
  { data_type => "integer", is_nullable => 0 },
  "active",
  { data_type => "integer", is_nullable => 0 },
  "percent",
  { data_type => "integer", is_nullable => 0 },
);

1;

 view all matches for this distribution


App-Netsync

 view release on metacpan or  search on metacpan

share/mib/ADSL-LINE-MIB.txt  view on Meta::CPAN

              adslAtucConfRateChanRatio =

                      [Fast / (Fast + Interleaved)] * 100

              In other words this value is the fast channel
              percentage."
      ::= { adslLineConfProfileEntry 3 }

    adslAtucConfTargetSnrMgn OBJECT-TYPE
          SYNTAX      INTEGER (0..310)
          UNITS       "tenth dB"

share/mib/ADSL-LINE-MIB.txt  view on Meta::CPAN

              adslAturConfRateChanRatio =

                      [Fast / (Fast + Interleaved)] * 100

              In other words this value is the fast channel
              percentage."
      ::= { adslLineConfProfileEntry 17 }

    adslAturConfTargetSnrMgn OBJECT-TYPE
          SYNTAX      INTEGER (0..310)
          UNITS       "tenth dB"

 view all matches for this distribution


App-Nostray

 view release on metacpan or  search on metacpan

bin/nostray  view on Meta::CPAN

    }


    // Produce an error warning.
    function quit(message, line, chr) {
        var percentage = Math.floor((line / lines.length) * 100);

        throw {
            name: 'JSHintError',
            line: line,
            character: chr,
            message: message + " (" + percentage + "% scanned).",
            raw: message
        };
    }

    function isundef(scope, m, t, a) {

 view all matches for this distribution


App-Ordo

 view release on metacpan or  search on metacpan

lib/App/Ordo.pm  view on Meta::CPAN

        system("clear");
        for my $i ($current .. $current + $height - 1) {
            last if $i >= $total_lines;
            print $lines[$i];
        }
        my $percent = int(($current + $height) / $total_lines * 100);
        printf "\033[7m(line %d of %d, %d%%) [q quit, space page down, b page up, j/k lines]\033[0m\n",
            $current + $height > $total_lines ? $total_lines : $current + $height,
            $total_lines, $percent;
        my $key = ReadKey(0);
        last if $key eq 'q' || $key eq 'Q';
        $current += $height if $key eq ' ';
        $current -= $height if $key eq 'b';
        $current++ if $key eq 'j' || $key eq "\n" || $key eq "\r";

 view all matches for this distribution


App-PDFLibrarian

 view release on metacpan or  search on metacpan

share/title_abbr_iso4.csv  view on Meta::CPAN

"peranserta";"perans.";"ind"
"peraturan";"peratur.";"ind"
"perbadanan";"perbadan.";"may"
"perbankan";"perbank.";"ind"
"perbelanjaan";"perbelanj.";"may"
"percent";"n.a.";"eng"
"percentage";"percent.";"dut, eng"
"perception";"percept.";"fre, eng"
"perceptismo";"percept.";"spa"
"perceptual";"percept.";"eng"
"perch-";"n.a.";"fre"
"Percha";"n.a.";"ger"

 view all matches for this distribution


App-PFT

 view release on metacpan or  search on metacpan

bin/pft-ls  view on Meta::CPAN

    --pretty='%t:%p'

=item B<--pretty>=I<fmt>

Print properties of the listed nodes according to the specified format. The
format supports a custom percent notation similar in spirit to L<printf(2)>.

Note that some of placeholders will be expanded with empty strings when the
corresponding object property is void. For example, pages don't have a
date). If this is the case the placeholder gets expanded with an empty
string.

 view all matches for this distribution


App-PLab

 view release on metacpan or  search on metacpan

lib/App/PLab/MorphometryI.pod  view on Meta::CPAN


Calculates the area of the holes for every objects. Calculation time: insignificant.

=item Significance level for holes,%

Holes, whose area is less than specified amount ( in percents) are not treated in statistic caulations.
This switch does not apply to the program behavior when it is saving .xml file, it is used
for statistic calulations.

=back

 view all matches for this distribution


App-PNGCrush

 view release on metacpan or  search on metacpan

lib/App/PNGCrush.pm  view on Meta::CPAN


=head3 C<size>

    { 'size' => '1.56', }

The C<size> key will contain percentage of filesize reduction.

=head3 C<idat>

    { 'idat' => '0.80', }

The C<idat> key will contain the percentage of IDAT size reduction.

=head3 C<total_idat_length>

    { 'total_idat_length' => '1880', }

 view all matches for this distribution


App-PPH21Utils

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         }
      },
      "runtime" : {
         "requires" : {
            "Business::Tax::ID::PPH21" : "0.066",
            "Data::Sah::Coerce::perl::To_float::From_str::percent" : "0",
            "Data::Sah::Compiler::perl::TH::bool" : "0.914",
            "Data::Sah::Compiler::perl::TH::float" : "0.914",
            "Data::Sah::Compiler::perl::TH::int" : "0.914",
            "Data::Sah::Compiler::perl::TH::str" : "0.914",
            "Perinci::CmdLine::Any" : "0.154",

 view all matches for this distribution


App-Phoebe

 view release on metacpan or  search on metacpan

lib/App/Phoebe/Oddmuse.pm  view on Meta::CPAN

# (i.e. not the Phoebe server token). This only works if the Oddmuse wiki has
# just one security question (or accepts the same answer for all questions).
our %oddmuse_wiki_tokens = (
  "emacswiki.org" => "emacs" );

# Also allow percent encoded…
our $oddmuse_namespace_regex = '[\p{Uppercase}\d][%\w_  ]*';

*oddmuse_old_space_regex = \&App::Phoebe::space_regex;
*App::Phoebe::space_regex = \&oddmuse_new_space_regex;

 view all matches for this distribution


App-PhotoDB

 view release on metacpan or  search on metacpan

lib/App/PhotoDB/handlers.pm  view on Meta::CPAN

	my $total = &printlist({db=>$db, msg=>"camera and lens models in series '$seriesname'", table=>'info_series', cols=>["Got as id", 'Model as opt'], where=>{'`Series ID`'=>$series_id}});
	my $got = &lookupval({db=>$db, col=>'count(*)', table=>'info_series', where=>{'`Series ID`'=>$series_id, Got=>'✓'}});

	if ($total > 0) {
		my $need = $total - $got;
		my $percentcomplete = round(100 * $got/$total);
		print "Series '$seriesname' is $percentcomplete% complete (got $got, need $need)\n";
	}
	return;
}

# Summarise all series

 view all matches for this distribution


App-PickRandomLines

 view release on metacpan or  search on metacpan

script/pick  view on Meta::CPAN

#                } elsif ($fmt_name eq 'sci2dec') {
#                    if ($row->[$j] =~ /\A(?:[+-]?)(?:\d+\.|\d*\.(\d+))[eE]([+-]?\d+)\z/) {
#                        my $n = length($1 || "") - $2; $n = 0 if $n < 0;
#                        $row->[$j] = sprintf("%.${n}f", $row->[$j]);
#                    }
#                } elsif ($fmt_name eq 'percent') {
#                    my $fmt = $fmt_opts->{sprintf} // '%.2f%%';
#                    $row->[$j] = sprintf($fmt, $row->[$j] * 100);
#                } elsif ($fmt_name eq 'number') {
#                    require Number::Format::BigFloat;
#                    $row->[$j] = Number::Format::BigFloat::format_number(

script/pick  view on Meta::CPAN

#                                my $w = length($cell);
#                                push @w_bd, 0;
#                                push @w_bd, 0;
#                                push @w_ad, 0;
#                            } elsif ($cell =~ /\A([+-]?\d+)(\.?)(\d*)[%]?\z/) {
#                                # decimal notation number (with optional percent sign). TODO: allow arbitraty units after number, e.g. ml, mcg, etc? but should we align the unit too?
#                                push @w_bd, length($1);
#                                push @w_d , length($2);
#                                push @w_ad, length($3);
#                            } elsif ($cell =~ /\A([+-]?\d+\.?\d*)([eE])([+-]?\d+)\z/) {
#                                # scientific notation number

script/pick  view on Meta::CPAN

#=item * table.field_formats
#
#Array of str. Define format for each field (each element correspond to the field
#of the same element as defined in C<table.fields>). Used when formatting result
#as text table. Known formats: `iso8601_datetime`, `iso8601_date`, `datetime`,
#`date`, `boolstr`, `filesize`, `sci2dec`, `percent`, `number`.
#
#=item * table.field_format_code
#
#Coderef. Will be called with argument of field name. Expected to return format
#name (see C<table.field_formats>). Used when formatting result as text table.

 view all matches for this distribution


App-Pod

 view release on metacpan or  search on metacpan

t/cpan/Mojo2/UserAgent.pm  view on Meta::CPAN


  # Search DuckDuckGo anonymously through Tor
  $ua->proxy->http('socks://127.0.0.1:9050');
  say $ua->get('api.3g2upl4pq6kufc4m.onion/?q=mojolicious&format=json')->result->json('/Abstract');

  # GET request via UNIX domain socket "/tmp/myapp.sock" (percent encoded slash)
  say $ua->get('http+unix://%2Ftmp%2Fmyapp.sock/test')->result->body;

  # Follow redirects to download Mojolicious from GitHub
  $ua->max_redirects(5)
    ->get('https://www.github.com/mojolicious/mojo/tarball/main')

 view all matches for this distribution


App-Prove-Plugin-Elasticsearch

 view release on metacpan or  search on metacpan

dashboards/default.json  view on Meta::CPAN

  {
    "_id": "c29e5bb0-0d46-11e8-9a82-d3e7d45798ac",
    "_type": "visualization",
    "_source": {
      "title": "Pass/Fail by Version",
      "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"customBucket\":{\"enabled\":true,\"id\":\"1-bucket\",\"params\":{\"filters\":[{\"input\":{\"query\":\"status.keyword OK NOT \\\"NOT OK\\\"\"},\"label\":\"\"}]},\"schema\":{\"a...
      "uiStateJSON": "{\"vis\":{\"colors\":{\"Passed Tests\":\"#629E51\",\"Failed tests\":\"#BF1B00\"}}}",
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"e74cb320-0c84-11e8-9a82-d3e7d45798ac\",\"filter\":[],\"query\":{\"language\":\"lucene\",\"query\":\"\"}}"

dashboards/default.json  view on Meta::CPAN

  {
    "_id": "8b184480-0d23-11e8-9a82-d3e7d45798ac",
    "_type": "visualization",
    "_source": {
      "title": "Defects per Version",
      "visState": "{\"title\":\"Defects per Version\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showMeticsAtAllLevels\":false,\"showPartialRows\":false,\"showTotal\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"totalFunc\":\"sum\"...
      "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}",
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"e74cb320-0c84-11e8-9a82-d3e7d45798ac\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"

dashboards/default.json  view on Meta::CPAN

  {
    "_id": "ff03b690-0d23-11e8-9a82-d3e7d45798ac",
    "_type": "visualization",
    "_source": {
      "title": "Defects per Analyst",
      "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"customBucket\":{\"enabled\":true,\"id\":\"1-bucket\",\"params\":{\"field\":\"defect.keyword\",\"order\":\"desc\",\"orderBy\":\"_term\",\"size\":50},\"schema\":{\"aggFilter\":[...
      "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}",
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"e74cb320-0c84-11e8-9a82-d3e7d45798ac\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"

dashboards/default.json  view on Meta::CPAN

  {
    "_id": "f5d90900-0d26-11e8-9a82-d3e7d45798ac",
    "_type": "visualization",
    "_source": {
      "title": "Testing breakdown by Version",
      "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"customLabel\":\"Tests per Version\",\"field\":\"name.keyword\"},\"schema\":\"metric\",\"type\":\"cardinality\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"customLabel\":\"Ve...
      "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}",
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"e74cb320-0c84-11e8-9a82-d3e7d45798ac\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"

dashboards/default.json  view on Meta::CPAN

  {
    "_id": "f68bec30-0d50-11e8-9a82-d3e7d45798ac",
    "_type": "visualization",
    "_source": {
      "title": "Unreliable Test Report",
      "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"customBucket\":{\"enabled\":true,\"id\":\"1-bucket\",\"params\":{\"filters\":[{\"input\":{\"query\":\"status.keyword: \\\"NOT OK\\\"\"},\"label\":\"\"}]},\"schema\":{\"aggFilt...
      "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":1,\"direction\":\"desc\"}}}}",
      "description": "",
      "version": 1,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"index\":\"e74cb320-0c84-11e8-9a82-d3e7d45798ac\",\"filter\":[],\"query\":{\"query\":\"\",\"language\":\"lucene\"}}"

 view all matches for this distribution


App-Prove-Plugin-Metrics

 view release on metacpan or  search on metacpan

lib/App/Prove/Plugin/Metrics.pm  view on Meta::CPAN


The character class of characters that may appear in the final metric name.  All other characters will be removed.

=item rollup

If C<rollup=1>, the metric value will be the percentage of passing tests at that metric name (0 to 1 inclusive).  When C<rollup=0>, the default, the metric value will be a Boolean pass/fail value (0 or 1).

=back

=head2 File Output

 view all matches for this distribution


App-Prove-Plugin-PassEnv

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

 view all matches for this distribution


App-Prun-Scaled

 view release on metacpan or  search on metacpan

script/sprun  view on Meta::CPAN

usage: $me [OPTIONS] [FILE]...

Run commands, one per line, from either FILEs or stdin if no FILEs specified.

$me will adjust the number of running processes between --min-procs and
--max-procs to try to keep the system at --idle-target percent idle.

Each command is passed to perl's system() function to be executed. system() 
may use your system's shell to run the command. See perldoc -f system.

If --exit-on-failure is specified, and a command exits with a failed status, 

script/sprun  view on Meta::CPAN

  -m  --min-procs=<num>        minimum number of processes to run in parallel
                               (default: $defs{hard_min_procs})
  -M  --max-procs=<num>        maximum number of processes to run in parallel
                               (default: $defs{hard_max_procs})
  -r  --report-failed          print a message to STDERR for each command the fails
  -t, --idle-target=<pct>      endeavor to keep CPU idle % at this percentage
                               (default: $defs{idle_target})
  -T  --idle-threshold         CPU idle must be this far away from the target
                               before any adjustments will be made to the number
                               of running processes. (default: $defs{idle_threshold})
  -u, --update-frequency=<sec> how frequently to make updates to the number of

 view all matches for this distribution


App-PythonToPerl

 view release on metacpan or  search on metacpan

lib/Python/Unknown.pm  view on Meta::CPAN

                $retries++;
                if ($retries >= $self->{retries_max}) {
                    croak 'ERROR EPYUN013b: received HTTP response status code 429 (too many requests) instead of OpenAI::API response, maximum retry limit ', $self->{retries_max}, ' reached, croaking'; 
                }

                # increase time to sleep by some percentage of current amount
                $self->{sleep_seconds} *= $self->{sleep_retry_multiplier};

print 'in Python::Unknown::python_preparsed_to_perl_source(), about to retry #', $retries, ' call sleep(', $self->{sleep_seconds}, ')...', "\n";
                # retry sleep before calling API
                sleep($self->{sleep_seconds});

 view all matches for this distribution


App-RecordStream

 view release on metacpan or  search on metacpan

lib/App/RecordStream/Aggregator/Percentile.pm  view on Meta::CPAN

use base qw(App::RecordStream::Aggregator::InjectInto::Field);

sub new
{
  my $class      = shift;
  my $percentile = shift;
  my $field      = shift;

  my $this = $class->SUPER::new($field);
  $this->{'percentile'} = $percentile;

  return $this;
}

sub new_from_valuation
{
  my $class      = shift;
  my $percentile = shift;
  my $valuation  = shift;

  my $this = $class->SUPER::new_from_valuation($valuation);
  $this->{'percentile'} = $percentile;

  return $this;
}

sub initial {

lib/App/RecordStream/Aggregator/Percentile.pm  view on Meta::CPAN

sub squish
{
  my $this   = shift;
  my $cookie = shift;

  my $percentile = $this->{'percentile'};

  my @sorted = sort { $a <=> $b } @$cookie;

  my $index = int( (scalar @sorted) * ($percentile / 100));

  if ( $index == scalar @sorted )
  {
    $index--;
  }

lib/App/RecordStream/Aggregator/Percentile.pm  view on Meta::CPAN

}

sub long_usage
{
  print <<EOF;
Usage: per,<percentile>,<field>
   Finds the field value which <percentile> percent of values are less than.

   This is computed by creating an array of all values, sorting, and indexing into it at the
   floor((percentile / 100) * length) point
EOF
}

sub argct
{
  return 2;
}

App::RecordStream::Aggregator->register_implementation('percentile', __PACKAGE__);
App::RecordStream::Aggregator->register_implementation('perc', __PACKAGE__);

App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'percentile', 'SCALAR', 'VALUATION');
App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'perc', 'SCALAR', 'VALUATION');

1;

 view all matches for this distribution


App-RemoteCommand

 view release on metacpan or  search on metacpan

lib/App/RemoteCommand/Tutorial.pod  view on Meta::CPAN

Sometimes it is hard to write command in one liner.
Why don't you write a script in local and execute it with C< rcommand >:

    > cat local-script.sh
    #!/bin/bash
    percent=`df -h | grep /dev/sda1 | perl -anle '$F[-2] =~ s/%//; print $F[-2]'`
    if [ $percent -lt 80 ]; then
      echo "OK $percent%"
    else
      echo "NG $percent%"; exit 1
    fi

    > rcommand --script local-script.sh 'www00[1-2].example.jp'
    [www002.example.jp] OK 65%
    [www001.example.jp] NG 85%

 view all matches for this distribution


App-RunStopRun

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


0.06  2023-11-15
    - Fix the INT and TERM signal handlers to exit with the correct status.

0.05  2022-12-16
    - Convert the limit to a percentage if given as a decimal fraction.

0.04  2022-05-02
    - Add an option to disable creating a new process group or determining
      associated PGIDs.

 view all matches for this distribution


App-SeismicUnixGui

 view release on metacpan or  search on metacpan

lib/App/SeismicUnixGui/big_streams/iApply_mute.pm  view on Meta::CPAN

    #$suxwigb-> pmin($CFG->{sutaup}{1}{pmin});
    #$suxwigb-> dp($dp);
    $suxwigb->box_width(400);
    $suxwigb->box_height(500);

    #$suxwigb-> percent(99.9);
    $suxwigb->clip(1);
    $suxwigb->windowtitle( quotemeta('Muted Taup Data') );
    $suxwigb[1] = $suxwigb->Step();

=head2

 view all matches for this distribution


App-SeqPericmd

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Rinci" : "v1.1.96"
         }
      },
      "runtime" : {
         "requires" : {
            "Data::Sah::Coerce::perl::To_float::From_str::percent" : "0",
            "Data::Sah::Compiler::perl::TH::bool" : "0.907",
            "Data::Sah::Compiler::perl::TH::float" : "0.907",
            "Data::Sah::Compiler::perl::TH::int" : "0.907",
            "Data::Sah::Compiler::perl::TH::str" : "0.907",
            "List::Util" : "1.45",

 view all matches for this distribution


( run in 1.495 second using v1.01-cache-2.11-cpan-7fcb06a456a )