npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bbtools

v1.3.0

Published

Building Blocks and Tools JavaScript Library.

Downloads

11

Readme

BBTools

Building Blocks and Tools JavaScript Library.

Usage

Using it by doing:

  • Download the Library:
	git clone https://github.com/quinonez/BBTools
	cd BBTools
	git tag
	git checkout v1.3
  • Start using it by going to workarea and edit files BBT-tests.js and index.html.
  • Open index.html with your favorite web browser.
  • Do not forget to refresh the web page any time you edit the source files.
  • The optimized library is put on dis/BBT.min.js.

Information About Versions

Version 1.2

  • Added the Random package that contains modules:
    • JamesRandom
    • RandBinomial
    • RandBit
    • RandBreitWigner
    • RandChiSquare
    • RandExponential
    • RandFlat
    • RandGamma
    • RandGauss
    • RandLandau
    • RandPoisson
    • RandStudentT
  • Objects of kind H1 have a new member function: FillRandom that fill an 1D histogram with random values according to an especified probability distribution function.
  • Folders with examples on BBTools/workarea: jamesrandom, rand*, h1fillrandom.
README USAGE OF RandBinomial

n is the number of Bermoulli trials. n is must be less or equal than the array's size p is the probability to obtain 1 in one Bernoulli trial.

Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 300;
  var A = [];
  var argu;
  argu = { size: n, vect: A, engine: gen, n: 100, p: 0.5 };
  BBT.RandBinomial.ShootArray( argu );
  console.log(A);
  var B = A.sort();
  var minimo = B[0];
  var indmax = B.length - 1;
  var maximo = B[indmax];
  console.log("minimo %f",minimo);
  console.log("maximo %f",maximo);
README USAGE OF RandBit
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen };
  BBT.RandBit.ShootArray( argu );
  console.log(A);
Approach 2
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var bw = new BBT.RandBit( { engine: gen } );
  bw.FireArray( n, A );
  console.log(A);
Approach 3
  var n = 30;
  var A = [];
  var bw = new BBT.RandBit({});
  bw.FireArray( n, A );
  console.log(A);
README USAGE OF RandBreitWigner
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen, mean: 3, gamma: 0.5, cut: undefined };
  BBT.RandBreitWigner.ShootArray( argu );
  console.log(A);
  console.log( bw.FireM2() );
Approach 2
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen, mean: 3, gamma: 0.5, cut: undefined };
  BBT.RandBreitWigner.ShootArray( argu );
  console.log(A);
  console.log( bw.FireM2() );
Approach 3
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen, mean: 3, gamma: 0.5, cut: undefined };
  BBT.RandBreitWigner.ShootArray( argu );
  console.log(A);
  console.log( bw.FireM2() );
README USAGE OF RandChiSquare
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen, pdf_a: 3 };
  BBT.RandChiSquare.ShootArray( argu );
  console.log(A);
Approach 2
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var bw = new BBT.RandChiSquare( { engine: gen } );
  bw.FireArray( n, A );
  console.log(A);
Approach 3
  var n = 30;
  var A = [];
  var cs = new BBT.RandChiSquare({});
  cs.FireArray( n, A );
  console.log(A);
README USAGE OF RandExponential
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen, mean: 3 };
  BBT.RandExponential.ShootArray( argu );
  console.log(A);
Approach 2
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var bw = new BBT.RandExponential( { engine: gen, mean: 3 } );
  bw.FireArray( n, A );
  console.log(A);
Approach 3
  var n = 30;
  var A = [];
  var bw = new BBT.RandExponential({});
  bw.FireArray( n, A );
  console.log(A);
README USAGE OF RandFlat
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var argu =  { size: n, vect: A, a: 0, b: 1000000 };
  BBT.RandFlat.ShootArray( argu );
  console.log(A);
Approach 2
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 30;
  var A = [];
  var f = new BBT.RandFlat( { engine: gen } );
  f.FireArray( n, A );
  console.log(A);
Approach 3
  var n = 30;
  var A = [];
  var f = new BBT.RandFlat({});
  f.FireArray( n, A );
  console.log(A);
README USAGE OF RandGamma
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 50;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen, k: 3, lambda: 2 };
  BBT.RandGamma.ShootArray( argu );
  console.log(A);
Approach 2
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 50;
  var A = [];
  var g = new BBT.RandGamma( { engine: gen, engine: gen, k: 3, lambda: 2 } );
  g.FireArray( n, A );
  console.log(A);
Approach 3
  var n = 50;
  var A = [];
  var g = new BBT.RandGamma({});
  g.FireArray( n, A );
  console.log(A);
README USAGE OF RandGauss
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 50;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen, mean: 115, stdDev: 5 };
  BBT.RandGauss.ShootArray( argu );
  console.log(A);
Approach 2
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 50;
  var A = [];
  var g = new BBT.RandGauss( { engine: gen, mean: 115, stdDev: 5 } );
  bw.FireArray( n, A );
  console.log(A);
Approach 3
  var n = 30;
  var A = [];
  var g = new BBT.RandGauss({});
  g.FireArray( n, A );
  console.log(A);
README USAGE OF RandLandau
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 50;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen };
  BBT.RandLandau.ShootArray( argu );
  console.log(A);
README USAGE OF RandPoisson
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 50;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen, mean: 105 };
  BBT.RandPoisson.ShootArray( argu );
  console.log(A);
Approach 2
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 50;
  var A = [];
  var p = new BBT.RandPoisson( { engine: gen, mean: 105 } );
  p.FireArray( n, A );
  console.log(A);
Approach 3
  var n = 50;
  var A = [];
  var p = new BBT.RandPoisson({});
  p.FireArray( n, A );
  console.log(A);
README USAGE OF RandStudentT
Approach 1
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 100;
  var A = [];
  var argu =  { size: n, vect: A, engine: gen, a: 2 };
  BBT.RandStudentT.ShootArray( argu );
  console.log(A);
Approach 2
  var gen = new BBT.JamesRandom( { seed: 12345 } );
  var n = 100;
  var A = [];
  var st = new BBT.RandStudentT( { engine: gen, a: 2 } );
  st.FireArray( n, A );
  console.log(A);
Approach 3
  var n = 100;
  var A = [];
  var st = new BBT.RandStudentT({});
  st.FireArray( n, A );
  console.log(A);

Version 1.1

Same as version 1.0 but including folder of examples called BBTools/workarea.

Version 1.0

  • Users can define histograms like

       var h = BBT.H1("h", "h", nbinsx, xmin, xmax);
  • Users can fill histograms like

        h.Fill(numericalValue);
  • Users can draw histograms without drawing options like

        h.Draw();

Folder/File Structure

  • BBTools/
    • BBT/
      • Analysis/
      • convert.js
      • Generation/
        • Random/
          • JamesRandom.js
          • RandBinomial.js
          • RandBit.js
          • RandBreitWigner.js
          • RandChiSquare.js
          • RandExponential.js
          • RandFlat.js
          • RandGamma.js
          • RandGauss.js
          • RandLandau.js
          • RandPoisson.js
          • RandStudentT.js
      • Visualization/
        • Axis.js
        • H1.js
        • Painter.js
    • BBT.js
    • dist/
      • BBT.min.js
    • latex/
      • viena2016/
        • abstract.aux
        • abstract.log
        • abstract.pdf
        • abstract.tex
        • BBTools.svg
    • lib/
      • d3.js
      • d3.min.js
      • FileSaver.js
      • FileSaver.min.js
      • jquery.js
      • require.js
      • three.js
      • three.min.js
      • underscore.js
    • LICENSE
    • ModulesList.ods
    • README.md
    • tools/
      • almond.js
      • build.js
      • r.js
      • wrap.end
      • wrap.start
    • workarea/
      • BBT-tests.js
      • index.html
      • jamesrandom/
        • BBT-tests.js
        • index.html
        • README.md
      • h1fillrandom/
        • BBT-tests.js
        • index.html
        • README.md
      • randbinomial/
        • BBT-tests.js
        • index.html
        • README.md
      • randbit/
        • BBT-tests.js
        • index.html
        • README.md
      • randbreitwigner/
        • BBT-tests.js
        • index.html
        • README.md
      • randchisquare/
        • BBT-tests.js
        • index.html
        • README.md
      • randexponential/
        • BBT-tests.js
        • index.html
        • README.md
      • randflat/
        • BBT-tests.js
        • index.html
        • README.md
      • randgamma/
        • BBT-tests.js
        • index.html
        • README.md
      • randgauss/
        • BBT-tests.js
        • index.html
        • README.md
      • randlandau/
        • BBT-tests.js
        • index.html
        • README.md
      • randpoisson/
        • BBT-tests.js
        • index.html
        • README.md
      • randstudentt/
        • BBT-tests.js

        • index.html

        • README.md