view release on metacpan or search on metacpan
script/wordlist 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/wordlist 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/wordlist 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
lib/Appium/TouchActions.pm view on Meta::CPAN
=head1 METHODS
=head2 tap ( $x, $y )
Perform a precise tap at a certain location on the device, specified
either by pixels or percentages. All values are relative to the top
left of the device - by percentages, (0,0) would be the top left, and
(1, 1) would be the bottom right.
As per the Appium documentation, values between 0 and 1 will be
interepreted as percentages. (0.5, 0.5) will click in the center of
the screen. Values greater than 1 will be interpreted as pixels. (10,
10) will click at ten pixels away from the top and left edges of the
screen.
# tap in the center of the screen
view all matches for this distribution
view release on metacpan or search on metacpan
share/files/public/skins/default/jquery-ui-1.9.1.custom/development-bundle/demos/effect/default.html view on Meta::CPAN
// most effect types need no options passed by default
var options = {};
// some effects have required parameters
if ( selectedEffect === "scale" ) {
options = { percent: 0 };
} else if ( selectedEffect === "transfer" ) {
options = { to: "#button", className: "ui-effects-transfer" };
} else if ( selectedEffect === "size" ) {
options = { to: { width: 200, height: 60 } };
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/root/jquery-ui-1.11.1/jquery-ui.min.js view on Meta::CPAN
(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usema...
}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").rem...
}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;i=e.datepicker._getInst(t),e.d...
},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(t...
if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==s[0]&&t.target!==this.uiDialog[0]||!t.shiftKe...
f&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to....
return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,o=this....
}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.e...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/BagIt/Role/Portability.pm view on Meta::CPAN
sub normalize_payload_filepath {
my ($filename) = @_;
$filename =~ s#[\\](?![/])#/#g; # normalize Windows Backslashes, but only if they are no escape sequences
$filename =~ s#%#%25#g; # normalize percent
$filename =~ s#\x{0a}#%0A#g; #normalize NEWLINE
$filename =~ s#\x{0d}#%0D#g; #normalize CARRIAGE RETURN
$filename =~ s# #%20#g; # space
$filename =~ s#"##g; # quotes
return $filename;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Rar.pm view on Meta::CPAN
ed Do not add empty directories
ep Exclude paths from names
ep1 Exclude base directory from names
ep2 Expand paths to full
f Freshen files
idp Disable percentage display
ierr Send all messages to stderr
ilog Log errors to file (registered versions only)
inul Disable all messages
isnd Enable sound
k Lock archive
view all matches for this distribution
view release on metacpan or search on metacpan
unzip-6.0/man/zipinfo.1 view on Meta::CPAN
behavior; see below.
.TP
.B \-m
list zipfile info in medium Unix ``\fCls \-l\fR'' format. Identical to the
\fB\-s\fP output, except that the compression factor, expressed as a
percentage, is also listed.
.TP
.B \-l
list zipfile info in long Unix ``\fCls \-l\fR'' format. As with \fB\-m\fP
except that the compressed size (in bytes) is printed instead of the
compression ratio.
unzip-6.0/man/zipinfo.1 view on Meta::CPAN
\fIre:1\fP, \fIre:2\fP, etc.; \fIshrk\fP; \fIi4:2\fP, \fIi8:3\fP, etc.;
\fItokn\fP; and \fIdefS\fP, \fIdefF\fP, \fIdefN\fP, and \fIdefX\fP.
.PP
The medium and long listings are almost identical to the short format except
that they add information on the file's compression. The medium format lists
the file's compression factor as a percentage indicating the amount of space
that has been ``removed'':
.PP
.X "-rw-rws--- 1.5 unx 2802 t- 81% defX 11-Aug-91 13:48 perms.2660"
.PP
In this example, the file has been compressed by more than a factor of
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ArrayData/Lingua/Word/EN/Enable.pm view on Meta::CPAN
perceived
perceiver
perceivers
perceives
perceiving
percent
percentage
percentages
percentile
percentiles
percents
percept
perceptibilities
perceptibility
perceptible
perceptibly
lib/ArrayData/Lingua/Word/EN/Enable.pm view on Meta::CPAN
supercautious
supercede
superceded
supercedes
superceding
supercenter
supercenters
supercharge
supercharged
supercharger
superchargers
supercharges
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ArrayData/Lingua/Word/EN/Medical/Glutanimate.pm view on Meta::CPAN
Perative
Perazil
perazine
perborate
Percaine
percentile
percentual
percept
perceptibilities
Perceptin
perception
perceptive
lib/ArrayData/Lingua/Word/EN/Medical/Glutanimate.pm view on Meta::CPAN
superaurale
superbills
Superblade
Superbug
supercarbonate
supercentral
supercilia
superciliaris
superciliary
supercilii
superciliorum
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
perceived
perceiver
perceivers
perceives
perceiving
percent
percentage
percentages
percentile
percentiles
percents
percept
perceptibilities
perceptibility
perceptible
perceptibly
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
supercautious
supercede
superceded
supercedes
superceding
supercenter
supercenters
supercharge
supercharged
supercharger
superchargers
supercharges
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Asm/X86.pm view on Meta::CPAN
=head1 DATA
=cut
# =head2 _add_percent
#
# PRIVATE SUBROUTINE.
# Add a percent character ('%') in front of each element in the array given as a parameter.
# Returns the new array.
#
# =cut
sub _add_percent(@) {
my @result = ();
foreach (@_) {
push @result, "%$_";
}
lib/Asm/X86.pm view on Meta::CPAN
A list of 8-bit registers (as strings) in AT&T syntax.
=cut
our @regs8_att = _add_percent @regs8_intel;
=head2 @segregs_intel
A list of segment registers (as strings) in Intel syntax.
lib/Asm/X86.pm view on Meta::CPAN
A list of segment registers (as strings) in AT&T syntax.
=cut
our @segregs_att = _add_percent @segregs_intel;
=head2 @regs16_intel
A list of 16-bit registers (as strings), including the segment registers, in Intel syntax.
lib/Asm/X86.pm view on Meta::CPAN
A list of 16-bit registers (as strings), including the segment registers, in AT&T syntax.
=cut
our @regs16_att = _add_percent @regs16_intel;
my @addressable32 = ('eax', 'ebx', 'ecx', 'edx', 'esi', 'edi', 'esp', 'ebp');
my @addressable32_att = _add_percent @addressable32;
my @r32_in64 = (
'r8d', 'r8l', 'r9d', 'r9l', 'r10d', 'r10l', 'r11d', 'r11l',
'r12d', 'r12l', 'r13d', 'r13l', 'r14d', 'r14l', 'r15d', 'r15l',
);
my @r32_in64_att = _add_percent @r32_in64;
=head2 @regs32_intel
A list of 32-bit registers (as strings) in Intel syntax.
lib/Asm/X86.pm view on Meta::CPAN
A list of 32-bit registers (as strings) in AT&T syntax.
=cut
our @regs32_att = _add_percent @regs32_intel;
=head2 @regs_fpu_intel
A list of FPU registers (as strings) in Intel syntax.
lib/Asm/X86.pm view on Meta::CPAN
A list of FPU registers (as strings) in AT&T syntax.
=cut
our @regs_fpu_att = _add_percent @regs_fpu_intel;
=head2 @regs64_intel
A list of 64-bit registers (as strings) in Intel syntax.
lib/Asm/X86.pm view on Meta::CPAN
A list of 64-bit registers (as strings) in AT&T syntax.
=cut
our @regs64_att = _add_percent @regs64_intel;
=head2 @regs_mm_intel
A list of multimedia (MMX/3DNow!/SSEn) registers (as strings) in Intel syntax.
lib/Asm/X86.pm view on Meta::CPAN
A list of multimedia (MMX/3DNow!/SSEn) registers (as strings) in AT&T syntax.
=cut
our @regs_mm_att = _add_percent @regs_mm_intel;
=head2 @regs_opmask_intel
A list of opmask registers (as strings) in Intel syntax.
lib/Asm/X86.pm view on Meta::CPAN
A list of opmask registers (as strings) in AT&T syntax.
=cut
our @regs_opmask_att = _add_percent @regs_opmask_intel;
=head2 @regs_bound_intel
A list of bound registers (as strings) in Intel syntax.
lib/Asm/X86.pm view on Meta::CPAN
A list of bound registers (as strings) in AT&T syntax.
=cut
our @regs_bound_att = _add_percent @regs_bound_intel;
=head2 @regs_intel
A list of all x86 registers (as strings) in Intel syntax.
lib/Asm/X86.pm view on Meta::CPAN
}
}
# (removing dollar chars)
$par =~ s/\$//go;
# (removing percent chars)
$par =~ s/%//go;
# (removing asterisk chars)
$par =~ s/\*//go;
# (changing memory references):
lib/Asm/X86.pm view on Meta::CPAN
$par = conv_intel_addr_to_att $par;
# (changing "stN" to "st(N)")
$par =~ s/\bst(\d)\b/\%st($1)/go;
# (adding percent chars)
foreach my $r (@regs_intel) {
$par =~ s/\b$r\b/\%$r/gi;
}
foreach my $r (@regs_intel) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aspect.pm view on Meta::CPAN
=pod
=head2 true
# Intercept an adjustable random percentage of calls to a function
our $RATE = 0.01;
before {
print "The few, the brave, the 1%\n";
} call 'My::foo'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeCellsCloud/CellsApi.pm view on Meta::CPAN
# @name string (required) The workbook name.
# @sheetName string (required) The worksheet name.
# @range string (required) Represents the range to which the specified AutoFilter applies.
# @fieldIndex int (required) The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field 0).
# @isTop boolean (required) Indicates whether filter from top or bottom
# @isPercent boolean (required) Indicates whether the items is percent or count
# @itemCount int (required) The item count
# @matchBlanks boolean Match all blank cell in the list.
# @refresh boolean Refresh auto filters to hide or unhide the rows.
# @folder string The folder where the file is situated.
# @storageName string The storage name where the file is situated.
lib/AsposeCellsCloud/CellsApi.pm view on Meta::CPAN
}
#
# PostUpdateWorksheetZoomRequest
#
# Update the scaling percentage in the worksheet. It should be between 10 and 400.
#
# @name string (required) The file name.
# @sheetName string (required) The worksheet name.
# @value int (required) Represents the scaling factor in percentage. It should be between 10 and 400.
# @folder string The folder where the file is situated.
# @storageName string The storage name where the file is situated.
#
{
my $params = {
lib/AsposeCellsCloud/CellsApi.pm view on Meta::CPAN
description => 'PostUpdateWorksheetZoom Request.',
required => '0',
}
};
__PACKAGE__->method_documentation->{ 'post_update_worksheet_zoom' } = {
summary => 'Update the scaling percentage in the worksheet. It should be between 10 and 400.',
params => $params,
returns => 'CellsCloudResponse',
};
}
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeSlidesCloud/Object/AlphaModulateFixedEffect.pm view on Meta::CPAN
read_only => '',
},
'amount' => {
datatype => 'double',
base_name => 'Amount',
description => 'Returns an amount of effect in percents. ',
format => '',
read_only => '',
},
});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/App/Satpass2/FormatValue.pm view on Meta::CPAN
},
dimensionless => {
default => 'unity',
define => {
percent => {
factor => 100,
},
unity => {},
},
formatter => '_format_number',
lib/Astro/App/Satpass2/FormatValue.pm view on Meta::CPAN
=head2 dimensionless
A few displayed quantities are simply numbers, having no associated
physical dimension. These can be specified as:
C<percent> = display as a percentage value, without the trailing '%';
C<unity> = display unaltered.
The default is C<unity>.
view all matches for this distribution
view release on metacpan or search on metacpan
t/cosmology.t view on Meta::CPAN
# not really a fair check, as calculated these using this module
my $dl_eds_ans = pdl( [3300.7765, 7024.5742, 15204.864] );
my $dl_sn_ans = pdl( [2832.9381, 6607.6576, 15539.587] );
my $dl_opn_ans = pdl( [2565.1861, 5872.2944, 14242.634] );
# going for a percentage check here
check0( 100.0 * ($dl_eds - $dl_eds_ans) / $dl_eds_ans );
check0( 100.0 * ($dl_sn - $dl_sn_ans) / $dl_sn_ans );
check0( 100.0 * ($dl_opn - $dl_opn_ans) / $dl_opn_ans );
my $zp1_sq = (1.0 + $z) * (1.0 + $z);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/FITS/CFITSIO/Simple/PrintStatus.pm view on Meta::CPAN
=item SCALAR
If this is non-zero, a progress indicator is written to STDERR. If
B<Term::ProgressBar> is available, that is used, else a simple
percentile is output. If this is zero, returns B<undef>.
=item GLOB
If it's a glob, it's assumed to be a filehandle glob, and output is
written to that filehandle.
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/wfcam.hdr view on Meta::CPAN
Engineering:
DET_TEMP= 74.6 / [K] Detector array temperature
DETTEMPB= 74.7 / [K] DET_TEMP alternate sensor
DETTEMPS= 75.0 / [K] Det temperature setpoint
DET_HTP = 53.5 / [percent] Det heater level
CCD_TEMP= 160.3 / [K] AG CCD temperature
CCDTEMPS= 160.0 / [K] AG CCD temperature setpoint
CCD_HTP = 11.5 / [percent] AG CCD heater level
FS_TEMP = 75.1 / [K] CCC 1st stage temperature
LNC_TEMP= 106.6 / [K] LN can temperature
SS_TEMP = 18.9 / [K] CCC 2nd stage temperature
M3_TEMP = 128.0 / [K] M3 temperature
TR_TEMP = 134.4 / [K] Top ring temperature
view all matches for this distribution
view release on metacpan or search on metacpan
buildtools/gen_hip_struct.pl view on Meta::CPAN
275-281 F7.4 mag Hpmag *? Median magnitude in Hipparcos system (H44)
283-288 F6.4 mag e_Hpmag *? Standard error on Hpmag (H45)
290-294 F5.3 mag Hpscat ? Scatter on Hpmag (H46)
296-298 I3 --- o_Hpmag ? Number of observations for Hpmag (H47)
300 A1 --- m_Hpmag *[A-Z*-] Reference flag for Hpmag (H48)
302-306 F5.2 mag Hpmax ? Hpmag at maximum (5th percentile) (H49)
308-312 F5.2 mag HPmin ? Hpmag at minimum (95th percentile) (H50)
314-320 F7.2 d Period ? Variability period (days) (H51)
322 A1 --- HvarType *[CDMPRU]? variability type (H52)
324 A1 --- moreVar *[12] Additional data about variability (H53)
326 A1 --- morePhoto [ABC] Light curve Annex (H54)
328-337 A10 --- CCDM CCDM identifier (H55)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/MoonPhase/Simple.pm view on Meta::CPAN
=over 2
=item * C<MoonPhase> : the moon phase (terminator phase angle) as a number between 0 and 1. New Moon (dark) being 0 and Full Moon (bright) being 1.
=item * C<MoonPhase%> : the above as a percentage.
=item * C<MoonIllum> : the illuminated fraction of the moon's disc as a number between 0 and 1. New Moon (dark) being 0 and Full Moon (bright) being 1.
=item * C<MoonIllum%> : the above as a percentage.
=item * C<MoonAge> : the fractional number of days since the Moon's birth (new moon), at specified date.
=item * C<MoonDist> : the distance of the Moon from the centre of the Earth (kilometers).
view all matches for this distribution
view release on metacpan or search on metacpan
MoonPhase.pm view on Meta::CPAN
# phase - calculate phase of moon as a fraction:
#
# The argument is the time for which the phase is requested,
# expressed as a Julian date and fraction. Returns the terminator
# phase angle as a percentage of a full circle (i.e., 0 to 1),
# and stores into pointer arguments the illuminated fraction of
# the Moon's disc, the Moon's age in days and fraction, the
# distance of the Moon from the centre of the Earth, and the
# angular diameter subtended by the Moon as seen by an observer
# at the centre of the Earth.
MoonPhase.pm view on Meta::CPAN
The argument is the time for which the phase is requested,
expressed as a time returned by the C<time> function. If C<$seconds_since_1970>
is omitted, it does C<phase(time)>.
Return value in scalar context is $MoonPhase,
the terminator phase angle as a percentage of a full circle (i.e., 0 to 1).
=over 4
=item B<Return values in array context:>
=item $MoonPhase:
the terminator phase angle as a percentage of a full circle (i.e., 0 to 1)
=item $MoonIllum:
the illuminated fraction of the Moon's disc
view all matches for this distribution
view release on metacpan or search on metacpan
libnova-0.15.0/aclocal.m4 view on Meta::CPAN
# _LT_FUNC_STRIPNAME_CNF
# ----------------------
# func_stripname_cnf prefix suffix name
# strip PREFIX and SUFFIX off of NAME.
# PREFIX and SUFFIX must not contain globbing or regex special
# characters, hashes, percent signs, but SUFFIX may contain a leading
# dot (in which case that matches only a dot).
#
# This function is identical to the (non-XSI) version of func_stripname,
# except this one can be used by m4 code that may be executed by configure,
# rather than the libtool script.
view all matches for this distribution
view release on metacpan or search on metacpan
</Group>
<Param name="seeing" ucd="instr.obsty.site.seeing" value="2" units="arcsec" />
<Param name="misc" ucd="misc.junk" value="unknown" />
</What>
<Why>
<Classification probability="30" units="percent" type="ot">Fast Orphan Optical Transient</Classification>
<Identification type="associated">NGC1234</Identification>
</Why>
</VOEvent>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/Coord/ECI/Utils.pm view on Meta::CPAN
'T' => 'H:%%M:%%S%s',
'V' => 'e-%%b-%%Y',
);
sub _pre_strftime_mung_fmt {
my ( $percent, $places, $fmt, $frac, $dflt_places ) = @_;
length( $percent ) % 2
and $mung{$fmt}
or return "$percent$places$fmt";
my $f = '';
defined $places
or $places = $dflt_places;
if ( defined $places ) {
index( $places, '.' ) == 0
lib/Astro/Coord/ECI/Utils.pm view on Meta::CPAN
$places eq '.'
and $places = '';
$f = sprintf "%${places}f", $frac;
$f =~ s/ \A 0+ //smx;
}
return $percent . __sprintf( $mung{$fmt}, $f );
}
}
sub __sprintf {
my ( $tplt, @args ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astroboy/AlbumDir.pm view on Meta::CPAN
return $self;
}
sub ls_mp3_percent {
my $self = shift;
my $total_files = $self->ls_count || 0;
my $total_mp3 = $self->ls_mp3_count || 0;
$total_mp3 or return 0;
lib/Astroboy/AlbumDir.pm view on Meta::CPAN
int( ($total_mp3 * 100 ) / $total_files );
}
sub is_album { ($_[0]->ls_mp3_percent) > 50 ? 1 : 0 }
sub empty_trash {
$_[0]->ls_trash_count or warn("Nothing in trash.\n") and return;
unlink @{$_[0]->ls_trash};
1;
lib/Astroboy/AlbumDir.pm view on Meta::CPAN
=head2 ls_trash()
Like ls(), returns everything not mp3.
=head2 ls_mp3_percent()
Of the files in this dir, what percentage are mp3s.
=head2 is_album()
If more than 50% of files are mp3, then true, else false.
view all matches for this distribution
view release on metacpan or search on metacpan
$session //= $self->get('com.atproto.server.getSession');
$session;
}
## Internals
sub now { Time::Moment->now }
sub _percent ( $limit, $remaining ) { $remaining && $limit ? ( ( $limit / $remaining ) * 100 ) : 0 }
sub _plural( $count, $word ) { $count ? sprintf '%d %s%s', $count, $word, $count == 1 ? '' : 's' : () }
sub _duration ($seconds) {
$seconds || return '0 seconds';
$seconds = abs $seconds; # just in case
method _ratecheck( $type, $meta //= () ) {
my $rate = defined $meta ? $ratelimits{$type}{$meta} : $ratelimits{$type};
$rate->{reset} // return;
return warnings::warnif( At => sprintf 'Exceeded %s rate limit. Try again in %s', $type, _duration( $rate->{reset} - time ) )
if defined $rate->{reset} && $rate->{remaining} == 0 && $rate->{reset} > time;
my $percent = _percent( $rate->{remaining}, $rate->{limit} );
warnings::warnif(
At => sprintf '%.2f%% of %s rate limit remaining (%d of %d). Slow down or try again in %s',
$percent, $type, $rate->{remaining}, $rate->{limit}, _duration( $rate->{reset} - time )
) if $percent <= 5;
}
# Init
{
our %capture;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AtteanX/Query/Cache/Analyzer.pm view on Meta::CPAN
my $curplan = $curplanner->plan_for_algebra($algebra, $self->model, [$self->graph]);
my $curcost = $curplanner->cost_for_plan($curplan, $self->model);
$self->log->trace("Cost of incumbent plan: $curcost");
my %costs;
my %triples;
my $percentage = 1-($self->improvement_threshold/100);
my $planner = AtteanX::Query::Cache::Analyzer::QueryPlanner->new;
foreach my $bgp ($algebra->subpatterns_of_type('Attean::Algebra::BGP')) { # TODO: Parallelize
foreach my $triple (@{ $bgp->triples }) { # TODO: May need quads
my $key = $triple->canonicalize->tuples_string;
next if ($self->model->is_cached($key));
lib/AtteanX/Query/Cache/Analyzer.pm view on Meta::CPAN
}
my $plan = $planner->plan_for_algebra($algebra, $self->model, [$self->graph]);
$self->log->debug("Alternative plan after fetching $key:\n" . $plan->as_string);
$costs{$key} = $planner->cost_for_plan($plan, $self->model);
$self->log->info("Triple $key has cost $costs{$key}, current $curcost");
if ($costs{$key} < $curcost * $percentage) {
$triples{$key} = $triple;
}
}
}
no sort 'stable';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Audio/Analyzer.pm view on Meta::CPAN
ref is the same size as the number of elements in each channel from $chunk->fft.
=item $completed = $analyzer->progress;
Return a number between 0 and 99 that represents in percent how far along in
the file we have processed.
=back
=head1 CHUNK SYSTEM
view all matches for this distribution
view release on metacpan or search on metacpan
libsamplerate/Cfg/ltmain.sh view on Meta::CPAN
# func_stripname PREFIX SUFFIX NAME
# ---------------------------------
# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
# PREFIX and SUFFIX must not contain globbing or regex special
# characters, hashes, percent signs, but SUFFIX may contain a leading
# dot (in which case that matches only a dot).
if test yes = "$_G_HAVE_XSI_OPS"; then
eval 'func_stripname ()
{
$debug_cmd
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Audio/MPD.pm view on Meta::CPAN
=head2 volume
$mpd->volume( [+][-]$volume );
Sets the audio output volume percentage to absolute C<$volume>. If
C<$volume> is prefixed by '+' or '-' then the volume is changed
relatively by that value.
=head2 outputs
view all matches for this distribution