view release on metacpan or search on metacpan
--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
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
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
view release on metacpan or search on metacpan
}
},
"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
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
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
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
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
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
view release on metacpan or search on metacpan
"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
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
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
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
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
view release on metacpan or search on metacpan
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
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
view release on metacpan or search on metacpan
"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
view release on metacpan or search on metacpan
lib/App/ShellCompleter/mpv.pm view on Meta::CPAN
complete_array_elem(array=>[qw/auto/], word=>$word),
complete_int(min=>0, max=>8190, word=>$word),
);
},
'embeddedfonts!' => undef, # Flag (default: yes)
'end=s' => undef, # Relative time or percent position
'field-dominance=s' => [qw/auto top bottom/], # Choices: auto top bottom (default: auto)
'fixed-vo!' => undef, # Flag (default: yes) [global]
'force-rgba-osd-rendering!' => undef, # Flag (default: no)
'force-window!' => undef, # Flag (default: no) [global]
'force-window-position!' => undef, # Flag (default: no)
lib/App/ShellCompleter/mpv.pm view on Meta::CPAN
'input-test!' => undef, # Flag (default: no) [global]
'input-x11-keyboard!' => undef, # Flag (default: yes) [global]
'keep-open!' => undef, # Flag (default: no)
'keepaspect!' => undef, # Flag (default: yes)
'leak-report!' => undef, # Flag [global] [nocfg]
'length=s' => undef, # Relative time or percent position
'list-options!' => undef, # Flag [nocfg]
'list-properties' => undef, # Print [global] [nocfg]
'list-protocols' => undef, # Print [global] [nocfg]
'load-scripts!' => undef, # Flag (default: yes) [global]
'load-unsafe-playlists!' => undef, # Flag (default: no)
lib/App/ShellCompleter/mpv.pm view on Meta::CPAN
'slave-broken!' => undef, # Flag (default: no) [global]
'softvol=s' => [qw/no yes auto/], # Choices: no yes auto (default: auto)
'softvol-max' => _gcfloat(10,10000), # Float (10 to 10000) (default: 200.000000)
'speed=f' => _gcfloat(0.01,100), # Double (0.01 to 100) (default: 1.000000)
'sstep=f' => _gcfloat(0), # Double (0 to any) (default: 0.000000)
'start=s' => undef, # Relative time or percent position
'stop-screensaver!' => undef, # Flag (default: yes)
'stream-capture=s' => undef, # String (default: ) [file]
'stream-dump=s' => undef, # String (default: ) [file]
'stream-lavf-o=s' => undef, # Key/value list (default: )
'stretch-dvd-subs!' => undef, # Flag (default: no)
view all matches for this distribution
view release on metacpan or search on metacpan
"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
view release on metacpan or search on metacpan
bin/languages
bin/simple_report
bin/simple_scan
examples/cross_product.in
examples/expression.in
examples/renegade-percent.in
examples/ss.in
examples/ss_backtick1.in
examples/ss_backtick_env.in
examples/ss_blank.in
examples/ss_comment.in
t/40inputq.t
t/41extract.t
t/42nested_sub.t
t/43dynamname.t
t/44expression.t
t/45renegade_percent.t
t/46xproduct.t
t/47line.t
t/48subs_base.t
t/49antique.t
t/50quoteescbug.t
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Slaughter/API/generic.pm view on Meta::CPAN
}
=head2 PercentageUsed
Return the percentage of space used in in the given mounted-device.
=for example begin
foreach my $point ( Mounts() )
{
lib/Slaughter/API/generic.pm view on Meta::CPAN
The mount-point to the filesystem in question.
=back
The return value will be a percentage in the range 0-100.
B<NOTE>: This primitive invokes C<df> and parses the output. This
is reasonably portable, but will fail upon systems which have no "df"
binary. In that case the method will output a stub message to complain
that the function is not implemented.
view all matches for this distribution
view release on metacpan or search on metacpan
share/public/highlight/highlight.min.js view on Meta::CPAN
keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"
},contains:[e.HASH_COMMENT_MODE,i,a,n,s,{className:"meta",begin:/^\.PHONY:/,
end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},r]}}})()
;hljs.registerLanguage("makefile",e)})();/*! `sql` grammar compiled for Highlight.js 11.7.0 */
(()=>{var e=(()=>{"use strict";return e=>{
const r=e.regex,t=e.COMMENT("--","$"),n=["true","false","unknown"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row",...
begin:r.concat(/\b/,r.either(...o),/\s*\(/),relevance:0,keywords:{built_in:o}}
;return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{
$pattern:/\b[\w\.]+/,keyword:((e,{exceptions:r,when:t}={})=>{const n=t
;return r=r||[],e.map((e=>e.match(/\|\d+$/)||r.includes(e)?e:n(e)?e+"|0":e))
})(c,{when:e=>e.length<3}),literal:n,type:a,
view all matches for this distribution
view release on metacpan or search on metacpan
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
}
}
}
# Get values for our section
my ($sectionstart, $integerdigits, $fractiondigits, $commas, $percent, $thousandssep) =
@{%{$thisformat->{sectioninfo}->[$section]}}{qw(sectionstart integerdigits fractiondigits commas percent thousandssep)};
if ($commas > 0) { # scale by thousands
for (my $i=0; $i<$commas; $i++) {
$value /= 1000;
}
}
if ($percent > 0) { # do percent scaling
for (my $i=0; $i<$percent; $i++) {
$value *= 100;
}
}
my $decimalscale = 1; # cut down to required number of decimal digits
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
# {sectioninfo}->[] # one hash for each section of the format
# {start}
# {integerdigits}
# {fractiondigits}
# {commas}
# {percent}
# {thousandssep}
# {hasdates}
# {hascomparison} # true if any section has [<100], etc.
#
# # # # # # # # #
socialcalc/SocialCalcServersideUtilities.pm view on Meta::CPAN
push @{$thisformat->{operands}}, $ch;
}
}
elsif ($ch eq "%") {
$lastwasinteger = 0;
$sectioninfo->{percent}++;
push @{$thisformat->{operators}}, $cmd_copy;
push @{$thisformat->{operands}}, $ch;
}
elsif ($ch eq '"') {
$lastwasinteger = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/sqitch-target.pod view on Meta::CPAN
=back
Note that, as with any URI or URL, special characters must be
L<URL encoded|https://en.wikipedia.org/wiki/URL_encoding>. For example, when
a username contains a reserved character, such as the C<|> in C<ro|michelle>,
it must be percent-encoded as C<%7c>:
db:pg://ro%7Cmichelle@examle.org/inventory
The rules are even more strict for query parameters, as often used by for
ODBC connections. For example, when using a
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/St.pm view on Meta::CPAN
sub quartile {
my ($self,$q,%opt) = @_;
if ($q !~ /^[01234]$/) {
die "Invalid quartile '$q'\n";
}
return $self->percentile($q / 4 * 100, %opt);
}
sub median {
my ($self,%opt) = @_;
return $self->percentile(50, %opt);
}
sub variance {
my ($self,%opt) = @_;
lib/App/St.pm view on Meta::CPAN
return $opt{formatted} ? $self->_format($stderr)
: $stderr;
}
sub percentile {
my ($self, $p, %opt) = @_;
my $data = $self->{data};
if (!$self->{keep_data} or scalar @{$data} == 0) {
die "Can't get percentile from empty dataset\n";
}
if ($p < 0 or $p > 100) {
die "Invalid percentile '$p'\n";
}
if (!$self->{_is_sorted_}) {
$data = [ sort {$a <=> $b} @{ $data } ];
$self->{data} = $data;
lib/App/St.pm view on Meta::CPAN
}
my $N = $self->N();
my $idx = ($N - 1) * $p / 100;
my $percentile =
int($idx) == $idx ? $data->[$idx]
: ($data->[$idx] + $data->[$idx+1]) / 2;
return $opt{formatted} ? _format($percentile)
: $percentile;
}
sub result {
my $self = shift;
lib/App/St.pm view on Meta::CPAN
q3 => $self->quartile(3),
)
);
}
# the following is a hack to accept multiple percentiles/quartiles
if ( exists $self->{percentile} ) {
my $percentile = ref $self->{percentile} eq 'ARRAY'
? [ map { $self->percentile($_) } @{ $self->{percentile} } ]
: $self->percentile( $self->{percentile} );
%result = (
%result,
percentile => $percentile
);
}
if (exists $self->{quartile}) {
my $quartile = ref $self->{quartile} eq 'ARRAY'
lib/App/St.pm view on Meta::CPAN
=head2 stddev
=head2 stderr
=head2 percentile=<0..100>
=head2 quartile=<0..4>
=head2 min
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/StatisticsUtils.pm view on Meta::CPAN
summary => 'CLI utilities related to statistics',
};
$SPEC{z2pct} = {
v => 1.1,
summary => 'Convert z-score to percentile (for standard normal distribution)',
args_as => 'array',
args => {
z => {
schema => 'float*',
req => 1,
lib/App/StatisticsUtils.pm view on Meta::CPAN
Statistics::Standard_Normal::z_to_pct(shift);
}
$SPEC{pct2z} = {
v => 1.1,
summary => 'Convert percentile to z-score (for standard normal distribution)',
args_as => 'array',
args => {
pct => {
schema => ['float*', xbetween=>[0,100]],
req => 1,
lib/App/StatisticsUtils.pm view on Meta::CPAN
Usage:
pct2z($pct) -> any
Convert percentile to z-score (for standard normal distribution).
Examples:
=over
lib/App/StatisticsUtils.pm view on Meta::CPAN
Usage:
z2pct($z) -> any
Convert z-score to percentile (for standard normal distribution).
Examples:
=over
view all matches for this distribution
view release on metacpan or search on metacpan
arguments. Please read the manual for more in-depth documentation on the usage
of **tarotplane**.
### Card Files
A **tarotplane** card file is a text file that contains cards seperated by a
delimitting line, which is a line the contains nothing but a percentage (%)
sign. Each card must contain a term and a definition, seperated by a colon (:).
Terms precede the colon, definitions follow the colon.
Lines starting with a hash (#) are treated as comments and are ignored. Blank
lines are also ignored.
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Module/Install/Philosophy.pod view on Meta::CPAN
=over 4
=item * New Modules don't help Older Perls
If I were to guess what percent of all Perl5 installations were at the
current release level (5.8.0 in October 2002) I would say 3-5%. That may
even be generous. I'd say that over 40% of installations might still be
at 5.005 or earlier.
The biggest problem with adding a module to the core is that it only
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TeleGramma/Plugin/Core/YearProgress.pm view on Meta::CPAN
sub send_out_progress_if_necessary {
my $self = shift;
my $decimals = 0;
# what was the last progress report percentage?
my $last_pc = $self->store->hash('last')->{percentage} || sprintf("%0.${decimals}f", 0);
# how many seconds in a year?
my $year_seconds = 365 * 86400; # no such thing as leap year la la la
# how many seconds are we into this year?
my $year_start_ts = DateTime->now->truncate(to => 'year')->epoch;
my $year_seconds_so_far = time() - $year_start_ts;
# as a percent?
my $percent = sprintf("%0.${decimals}f", 100 * ($year_seconds_so_far / $year_seconds));
# has it rolled?
if ($percent ne $last_pc) {
# store it
$self->store->hash('last')->{percentage} = $percent;
$self->store->save('last');
# send out the alerts
$self->send_alerts($percent);
}
}
sub send_alerts {
my $self = shift;
my $percent = shift;
my @alertees = keys %{ $self->store->hash('registered') };
my $done_num = int($percent / 10);
my $todo_num = 10 - $done_num;
my $done = "â";
my $todo = "â";
my $bar = $done x $done_num . $todo x $todo_num;
$bar .= " ${percent}%";
foreach my $id (@alertees) {
my $username = $self->store->hash('registered')->{$id}->{username};
eval {
$self->app->send_message_to_chat_id($id, "Hey $username, the year is progressing: $bar");
} or do {
view all matches for this distribution