view release on metacpan or search on metacpan
doc/astronomical-notes.pod view on Meta::CPAN
=item E
The Earth runs along an orbit around the Sun, with noticeable perturbations
caused by the Moon, Jupiter, Saturn, etc.
Which is a formulation equivalent to assertion D.
=item F
The movement of the Earth with the Solar System is a I<n>-body problem,
with I<n> ⥠3. Therefore, there is no analytical solution.
doc/astronomical-notes.pod view on Meta::CPAN
but all other planets have a perihelion precession, including
the Earth.
=head3 Other Drifts And Fluctuations
The formulas computing the positions of celestial bodies
use some constants. But these values are constant only
on a short timespan (astronomically speaking; or, with the
metaphor above, on a "meteorological" timespan). But they are
variable on a longer timespan (or a "climatic" timespan) For example,
everybody knows that the day lasts 24 hours (the mean
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/Coord/ECI.pm view on Meta::CPAN
Unfortunately, as of early 2021 the National Council of Teachers of
Mathematics restricted the Dr. Math content to their members, but an
annotated and expanded version of the article on haversines is available
at
L<https://www.themathdoctors.org/distances-on-earth-2-the-haversine-formula/>.
If you want the original article, you can feed the URL
C<http://mathforum.org/library/drmath/view/51879.html> to the Wayback
Machine.
Prior to version 0.011_03 the law of cosines was used, but this produced
lib/Astro/Coord/ECI.pm view on Meta::CPAN
if ( $elevation > $horizon - TWO_DEGREES ) {
# Thorsteinn Saemundsson's algorithm for refraction, as reported
# in Meeus, page 106, equation 16.4, and adjusted per the
# suggestion in Meeus' following paragraph. Thorsteinn's
# formula is in terms of angles in degrees and produces
# a correction in minutes of arc. Meeus reports the original
# publication as Sky and Telescope, volume 72 page 70, July 1986.
# In deference to Thorsteinn I will point out:
# * The Icelanders do not use family names. The "Saemundsson"
lib/Astro/Coord/ECI.pm view on Meta::CPAN
my $E = $y * sin( 2 * $L0 ) - 2 * $e * sin( $M ) +
4 * $e * $y * sin( $M ) * cos( 2 * $L0 ) -
$y * $y * .5 * sin( 4 * $L0 ) -
1.25 * $e * $e * sin( 2 * $M ); # Meeus (28.3)
return $E * SECSPERDAY / TWOPI; # The formula gives radians.
}
=item $coord->equatorial ($rightasc, $declin, $range, $time);
This method sets the L</Equatorial> coordinates represented by the
lib/Astro/Coord/ECI.pm view on Meta::CPAN
Jean Meeus does in "Astronomical Algorithms".
For practical purposes, TT = TAI + 32.184 seconds. If I ever get the
gumption to do a re-implementation (or alternate implementation) of time
in terms of the DateTime object, this will be the definition of
dynamical time. Until then, though, formula 10.2 on page 78 of Jean
Meeus' "Astronomical Algorithms" second edition, Chapter 10 (Dynamical
Time and Universal Time) is used.
Compare and contrast this to L</Universal time>. This explanation leans
heavily on C<http://star-www.rl.ac.uk/star/docs/sun67.htx/node226.html>,
lib/Astro/Coord/ECI.pm view on Meta::CPAN
technical definition differs in detail from GMT (Greenwich Mean Time).
The former is a clock-based time, whose second is the SI second (defined
in terms of atomic clocks), but which is kept within 0.9 seconds of UT1
by the introduction of leap seconds. These are introduced (typically at
midyear or year end) by prior agreement among the various timekeeping
bodies based on observation; there is no formula for computing when a
leap second will be needed, because of irregularities in the Earth's
rotation.
Jean Meeus' "Astronomical Algorithms", second edition, deals with the
relationship between Universal time and L</Dynamical time> in Chapter 10
view all matches for this distribution
view release on metacpan or search on metacpan
t/07-shm_lock.t view on Meta::CPAN
cmp_ok $child_lock, '>', 0;
cmp_ok $child_lock, '<=', 32767;
}
# A second process started fresh (not via fork) generates its own lock
# value based on its own $$. We can verify the formula by simulating
# what such a process would compute.
{
my $other_pid = ($$ + 1) % (1 << 16); # arbitrary different PID
my $other_lock = 1 + ($other_pid % 32767);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Audio/Analyzer/ToneDetect.pm view on Meta::CPAN
=item min_tone_length 0.5
Minimum durration of a tone, in seconds, before we consider it detected. Due to
sample rate, chunk size, and integer math, with defaults this ends up being
0.448 seconds. The formula for actual seconds is int( min_length * sample_rate
/ chunk_size ) * chunk_size / sample_rate. Default to 0.5
=item valid_tones undef, 'builtin', or ARRAYREF
A list of valid (expected) tones. If supplied, the closest expected tone for
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Audio/NoiseGen.pm view on Meta::CPAN
split
sequence
note
rest
segment
formula
hardlimit
amp
oneshot
lowpass
highpass
lib/Audio/NoiseGen.pm view on Meta::CPAN
$last_sample = $cur_gen->();
return $last_sample || 0;
}
}
=head2 formula( formula => sub { $_*(42&$_>>10) } )
Plays a formula. Takes 'formula', 'bits', and 'sample_rate'. 'bits' defaults to 8, 'sample_rate' defaults to 8000.
Formula uses C<< $_ >> instead of 't', but is otherwise similar to what is described at L<http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html>.
=cut
sub formula {
my %params = generalize(
bits => 8,
sample_rate => 8000,
@_
);
my $formula = $params{formula};
my $formula_increment = $params{sample_rate}->() / $sample_rate;
my $max = 2 ** $params{bits}->();
my $t = 0;
return sub {
$t += $formula_increment;
local $_ = int $t;
return (((
$formula->(int $t)
) % $max - ($max/2))/($max/2))
}
}
# Return RC low-pass filter output samples, given input samples,
lib/Audio/NoiseGen.pm view on Meta::CPAN
my $gen = shift;
if(!ref $gen) {
print STDERR "segement '$gen'\n";
$gen = segment($gen);
# } elsif(ref $gen eq 'CODE') {
# $gen = formula($gen);
}
my $self = {
gen => $gen,
};
bless $self, $class;
view all matches for this distribution
view release on metacpan or search on metacpan
mpg123/mpg123.c view on Meta::CPAN
if(param.verbose)
print_stat(rd,fr,frameNum,xfermem_get_usedspace(buffermem),&ai);
if (!param.quiet) {
/*
* This formula seems to work at least for
* MPEG 1.0/2.0 layer 3 streams.
*/
int secs = get_songlen(rd,fr,frameNum);
fprintf(stderr,"\n[%d:%02d] Decoding of %s finished.\n", secs / 60,
secs % 60, filename);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Authen/PluggableCaptcha/Tutorial.pm view on Meta::CPAN
For example:
key= md5( $site_secret , $time , $page_name , $session_id ) + ':' + $session
key= 'xxxxxxxxxxxxxxxxxx:10000001'
If we know the site_secret under that formula, we always have every components of the item at our disposal -- and can validate the key for integrity
The default KeyManager class uses a site_secret to create the key.
=head3 Also, from the example in the Tutorial, it isn't quite clear if you first have to generate a new CAPTCHA, just to get its key, and then use that key to construct an existing CAPTCHA to create the JPEG. This isn't the case, is it? I could call ...
view all matches for this distribution
view release on metacpan or search on metacpan
ramblings/remark.js view on Meta::CPAN
require=function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t)...
this.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[this.BACKSLASH_ESCAPE]};this.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)...
SUBST.contains=EXPRESSIONS;return{aliases:["coffee","cson","iced"],keywords:KEYWORDS,contains:EXPRESSIONS.concat([{className:"comment",begin:"###",end:"###"},hljs.HASH_COMMENT_MODE,{className:"function",begin:"("+JS_IDENT_RE+"\\s*=\\s*)?(\\(.*\\))?\\...
}()},{}],8:[function(require,module,exports){exports.addClass=function(element,className){element.className=exports.getClasses(element).concat([className]).join(" ")};exports.removeClass=function(element,className){element.className=exports.getClasse...
events.on("slideChanged",updateHash);navigateByHash()}function navigateByHash(){var slideNoOrName=(dom.getLocationHash()||"").substr(1);events.emit("gotoSlide",slideNoOrName)}function updateHash(slideNoOrName){dom.setLocationHash("#"+slideNoOrName)}}...
view all matches for this distribution
view release on metacpan or search on metacpan
zlib/adler32.c view on Meta::CPAN
{
unsigned long sum1;
unsigned long sum2;
unsigned rem;
/* the derivation of this formula is left as an exercise for the reader */
rem = (unsigned)(len2 % BASE);
sum1 = adler1 & 0xffff;
sum2 = rem * sum1;
MOD(sum2);
sum1 += (adler2 & 0xffff) + BASE - 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BalanceOfPower/Role/Shopper.pm view on Meta::CPAN
my $self = shift;
my $y = shift;
my $type = shift;
my $nation = shift;
#Price formula is MaxPrice - (( MaxPrice - MinPrice) / MaxValue) * Value
#MaxPrice and MinPrice are constant
my $min_price = PRICE_RANGES->{$type}->[0];
my $max_price = PRICE_RANGES->{$type}->[1];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Baseball/Sabermetrics.pm view on Meta::CPAN
$league->define(
rc => 'ab * obp',
babip => '(h_allowed - hr_allowed) / (p_pa - h_allowed - p_so - p_bb - hr_allowed',
# what started with '$' will be reserved.
# Players have team and league predefined, and team has league.
formula1 => 'hr / $_->team->hr';
formula2 => 'hr / $_->league->hr';
complex => sub {
print "You can write a sub directly\n";
$_->slg - $_->ba;
},
...
);
# Some formulas can be applied to players, teams, and league, depend on what
# columns are used in the formula. For example, ab and obp are defined for
# players, teams, and league, so that rc is available for all of them.
# top 5 obp of teams
$_->print qw/ team name ba obp slg isop / for $league->top('teams', 5, 'obp');
lib/Baseball/Sabermetrics.pm view on Meta::CPAN
$league->{Yankees}->report_pitchers qw/ name ip p_so p_bb whip go_ab /;
$league->{Yankees}->report_batters qw/ name ba obp slg isop /;
$league->report_teams qw/ name win lose era obp /;
# show all available formula
print join ' ', $league->formula_list;
=head1 Data Structure
Baseball::Sabermetrics is aimed for providing a base class of your interested teams (a league, for example). You'll need to provide a data retriever to pull data out. The following example shows how you have to fill data into this structure.
view all matches for this distribution
view release on metacpan or search on metacpan
beamer-reveal-example_files/libs/revealjs/plugin/highlight/highlight.esm.js view on Meta::CPAN
function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete...
/*!
* reveal.js plugin that adds syntax highlight support.
*/
const Rs={id:"highlight",HIGHLIGHT_STEP_DELIMITER:"|",HIGHLIGHT_LINE_DELIMITER:",",HIGHLIGHT_LINE_RANGE_DELIMITER:"-",hljs:fs,init:function(e){let t=e.getConfig().highlight||{};t.highlightOnLoad="boolean"!=typeof t.highlightOnLoad||t.highlightOnLoad,...
view all matches for this distribution
view release on metacpan or search on metacpan
share/SpamAssassin/easy_ham/00271.b67b5b37ce874d5ccea3391922f14506 view on Meta::CPAN
to another. This is why, under international
contracts, it is necessary to specify to which
laws one is referring (French law, American &c.).
The authors only found three public licences
which were correctly formulated on this point:
QPL, IBM Public Licence and the Mozilla Public
Licence).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BigIP/iControl.pm view on Meta::CPAN
=head3 get_pool_statistics_stringified ($pool)
my %stats = $ic->get_pool_statistics_stringified($pool);
print "Pool $pool bytes in: $stats{stat}{STATISTIC_SERVER_SIDE_BYTES_OUT}";
Returns a hash containing all pool statistics for the specified pool in a delicious, easily digestable and improved formula.
=cut
sub get_pool_statistics_stringified {
my ($self, $pool)= @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/DB/BigBed.pm view on Meta::CPAN
In addition, the bin objects add the following convenience methods:
$bin->count() Same as $bin->score->{validCount}
$bin->minVal() Same as $bin->score->{minVal}
$bin->maxVal() Same as $bin->score->{maxVal}
$bin->mean() The mean of values in the bin (from the formula above)
$bin->variance() The variance of values in the bin (ditto)
$bin->stdev() The standard deviation of values in the bin (ditto)
From these values one can determine the mean, variance and standard
deviation across one or more genomic intervals. The formulas are as
follows:
sub mean {
my ($sumData,$validCount) = @_;
return $sumData/$validCount;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/CUA/CUB/Calculator.pm view on Meta::CPAN
{
my ($self, $seq) = @_;
$self->_xai($seq, 'CAI');
}
# the real calculator of tAI or CAI as both have the same formula
sub _xai
{
my ($self, $seq, $type) = @_;
my $name;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Cellucidate.pm view on Meta::CPAN
A Model has one or many simulation runs and a simulation run belongs to
a model.
=item L<Bio::Cellucidate::OdeResult>
Represents the set of ODE formulas generated when running a simulation in ODE-mode.
The results can be used directly in MATLAB.
=item L<Bio::Cellucidate::Plot>
A plot contains a single time series and a number of data series representing the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/GeneDesign.pm view on Meta::CPAN
arguments; they are 50mm (.05) and 100 pm (.0000001) respectively.
You can pass either a string variable, a Bio::Seq object, or a Bio::SeqFeatureI
object to be analyzed with the -sequence flag.
There are four different formulae to choose from. If you wish to use the nearest
neighbor method, use the -nearest_neighbor flag. Otherwise the appropriate
formula will be determined by the length of your -sequence argument.
For sequences under 14 base pairs:
Tm = (4 * #GC) + (2 * #AT).
For sequences between 14 and 50 base pairs:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Graphics/Panel.pm view on Meta::CPAN
responsible for allocating sufficient -pad_left or -pad_right room for
the labels to appear. The necessary width is the number of characters
in the longest key times the font width (gdMediumBoldFont by default)
plus 3 pixels of internal padding. The simplest way to calculate this
is to iterate over the possible track labels, find the largest one,
and then to compute its width using the formula:
$width = gdMediumBoldFont->width * length($longest_key) +3;
In order to obtain scalable vector graphics (SVG) output, you should
pass new() the -image_class=E<gt>'GD::SVG' parameter. This will cause
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/Data/psi-mi.obo view on Meta::CPAN
subset: Drugable
is_a: MI:0300 ! alias type
[Term]
id: MI:2008
name: chemical formula
def: "Chemical formula describing atomic or elemental composition" [PMID:14755292]
subset: Drugable
is_a: MI:2086 ! physicochemical attribute name
[Term]
id: MI:2009
scripts/Data/psi-mi.obo view on Meta::CPAN
is_a: MI:0353 ! cross-reference type
[Term]
id: MI:2025
name: molecular weight
def: "Molecular weight in g/mol, determined from molecular formula or sequence." [PMID:14755292]
subset: Drugable
is_a: MI:0640 ! parameter type
[Term]
id: MI:2026
scripts/Data/psi-mi.obo view on Meta::CPAN
is_a: MI:2054 ! bioactive entity reference
[Term]
id: MI:2155
name: average molecular weight
def: "Molecular weight in g/mol, determined from molecular formula or sequence." [PMID:14755292]
subset: Drugable
synonym: "avrg mol weight" EXACT PSI-MI-short []
is_a: MI:2025 ! molecular weight
[Term]
id: MI:2156
name: monoisotopic molecular weight
def: "Molecular weight in g/mol, determined from molecular formula or sequence." [PMID:14755292]
subset: Drugable
synonym: "monoisotopic mol wgt" EXACT PSI-MI-short []
is_a: MI:2025 ! molecular weight
[Term]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/KBase/CDMI/CDMI_APIImpl.pm view on Meta::CPAN
=item Description
Since we accumulate data relating to the co-occurrence (i.e., chromosomal
clustering) of genes in prokaryotic genomes, we can note which pairs of genes tend to co-occur.
From this data, one can compute the protein families that tend to co-occur (i.e., tend to
cluster on the chromosome). This allows one to formulate conjectures for unclustered pairs, based
on clustered pairs from the same protein_families.
=back
=cut
lib/Bio/KBase/CDMI/CDMI_APIImpl.pm view on Meta::CPAN
=item Description
A substem is composed of two components: a set of roles that are gathered to be annotated
simultaneously and a spreadsheet depicting the proteins within each genome that implement
the roles. The set of roles may correspond to a pathway, a complex, an inventory (say, "transporters")
or whatever other principle an annotator used to formulate the subsystem.
The subsystem spreadsheet is a list of "rows", each representing the subsytem in a specific genome.
Each row includes a variant code (indicating what version of the molecular machine exists in the
genome) and cells. Each cell is a 2-tuple:
view all matches for this distribution
view release on metacpan or search on metacpan
https://github.com/weizhongli/cdhit
If you --force installation, I will eventually try to install CD-HIT with brew:
https://brew.sh/
EOT
}
# TODO: fix this as CD-HIT formula currently fails on OS X Mojave
# This can be done with a --build-from-source option of brew
# expected members for
my $exp_clstr_file = file('test', 'cdHit.out.groups');
open my $in, '<', $exp_clstr_file;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Phylo/EvolutionaryModels.pm view on Meta::CPAN
#Loop for sampling each tree
while ( scalar @sample < $options{sample_size} ) {
my @nodes;
#Compute the random tree age from the inverse CDF (different formulas for
#birth rate == death rate and otherwise)
my $tree_age;
#The uniform random variable
my $r = rand;
view all matches for this distribution
view release on metacpan or search on metacpan
CHANGELOG.md view on Meta::CPAN
## [v3.6.9](https://github.com/sanger-pathogens/Roary/tree/v3.6.9) (2016-09-22)
[Full Changelog](https://github.com/sanger-pathogens/Roary/compare/v3.6.8...v3.6.9)
**Implemented enhancements:**
- I have published a Roary homebrew formula [\#208](https://github.com/sanger-pathogens/Roary/issues/208)
- Getting Roary into Homebrew [\#152](https://github.com/sanger-pathogens/Roary/issues/152)
**Closed issues:**
- roary\_plots.py missing [\#277](https://github.com/sanger-pathogens/Roary/issues/277)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Tools/CodonOptTable.pm view on Meta::CPAN
return 1;
}
# Function : Calculate the RSCU(Relative Synonymous Codons Uses).
# Note : The formula is used in the following references.
# http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pubmed&pubmedid=3547335
sub _calculate_rscu {
my $self = shift;
lib/Bio/Tools/CodonOptTable.pm view on Meta::CPAN
}
return ( \@myCodons, \%rscu_max_table );
}
# Function : Calculate the RAC (Relative Adaptiveness of a Codon).
# Note : The formula is used in the following references.
# http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pubmed&pubmedid=3547335
sub _calculate_rac {
my ( $self, $codons, $max_rscu ) = @_;
my ( $rac, @myCodons );
view all matches for this distribution
view release on metacpan or search on metacpan
Default is 'undef', which means gc-ratio is not related to sequence selection.
=head2 set_mt
Setting for the melting temperature. For now, Wallace formula is adopted for calculation.
You can give it a specific value, like
$gen->set_mt(30);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Tools/ProteinogenicAA.pm view on Meta::CPAN
$info[7] eq 'X' ? $aa->is_hydrophobic(1) : $aa->is_hydrophobic(0);
$info[8] eq 'X' ? $aa->is_polar(1) : $aa->is_polar(0);
$aa->pH($info[9]);
$aa->van_der_waals_volume($info[10]);
$aa->codons($info[11]);
$aa->formula($info[12]);
$aa->monoisotopic_mass($info[13]);
$aa->avg_mass($info[14]);
push(@list, $aa);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/ViennaNGS/Expression.pm view on Meta::CPAN
my ($self,$sample,$rl) = @_;
my ($TPM,$T,$totalTPM) = (0)x3;
my ($i,$meanTPM);
# iterate through $self->data[$i] twice:
# 1. for computing T (denominator in TPM formula)
foreach $i (keys %{${$self->data}[$sample]}){
my $count = ${${$self->data}[$sample]}{$i}{count};
my $length = ${${$self->data}[$sample]}{$i}{length};
#print "count: $count\nlength: $length\n";
$T += $count * $rl / $length;
lib/Bio/ViennaNGS/Expression.pm view on Meta::CPAN
my ($self,$sample,$rl) = @_;
my ($R,$T,$length,$count,$totalRPKM) = (0)x5;
my ($i,$meanRPKM);
# iterate through $self->data[$i] twice:
# 1. compute T (denominator in TPM formula) and total number of reads
foreach $i (keys %{${$self->data}[$sample]}){
$count = ${${$self->data}[$sample]}{$i}{count};
$length = ${${$self->data}[$sample]}{$i}{length};
#print "count: $count\nlength: $length\n";
$T += $count * $rl / $length;
view all matches for this distribution
view release on metacpan or search on metacpan
Bio/SeqFeature/Primer.pm view on Meta::CPAN
: -oligo : set the oligo concentration on which to base the
calculation (default=0.00000025 molar).
Notes : Calculation of Tm as per Allawi et. al Biochemistry 1997
36:10581-10594. Also see documentation at
http://www.idtdna.com/Scitools/Scitools.aspx as they use this
formula and have a couple nice help pages. These Tm values will be
about are about 0.5-3 degrees off from those of the idtdna web tool.
I don't know why.
This was suggested by Barry Moore (thanks!). See the discussion on
the bioperl-l with the subject "Bio::SeqFeature::Primer Calculating
view all matches for this distribution