Liking cljdoc? Tell your friends :D

puppetlabs.puppetdb.random


distributeclj

(distribute vect f avg-actions & {:keys [debug] :as options})

Perform f an avg-actions number of times randomly across the elements of the vector.

The avg-actions may be a float, but if avg-actions is zero, nothing will be done.

The total number of actions to perform will be plucked from a safe-sample-normal curve based on a mean of vect count times avg-actions. You can customize this with an options hash supplying standard-deviation, upper and lower bounds.

Returns the updated vector.

Perform f an avg-actions number of times randomly across the elements of the vector.

The avg-actions may be a float, but if avg-actions is zero, nothing will be done.

The total number of actions to perform will be plucked from a
safe-sample-normal curve based on a mean of vect count times
avg-actions. You can customize this with an options hash supplying
standard-deviation, upper and lower bounds.

Returns the updated vector.
sourceraw docstring

randomclj

Convenience for java.util.Random

Convenience for java.util.Random
sourceraw docstring

random-boolclj

(random-bool)

Generate a random boolean

Generate a random boolean
sourceraw docstring

random-kw-resourceclj

source

random-node-nameclj

(random-node-name)

Generate a random node name.

Generate a random node name.
sourceraw docstring

random-parametersclj

(random-parameters)

Generate a random set of parameters.

Generate a random set of parameters.
sourceraw docstring

random-pp-pathclj

(random-pp-path)

Generate a random path to a modules pp file

Generate a random path to a modules pp file
sourceraw docstring

random-pronouncable-wordclj

(random-pronouncable-word)
(random-pronouncable-word length)
(random-pronouncable-word length sd)
(random-pronouncable-word length sd {:keys [lowerb upperb] :or {lowerb 1}})

Generate a random string of optional length that alternates consonants and vowels to produce a loosely recognizable wordish thing.

Optionally, supply standard deviation, to return a word of variable length from the given size based on the safe-sample-normal function.

Generate a random string of optional length that alternates consonants and
vowels to produce a loosely recognizable wordish thing.

Optionally, supply standard deviation, to return a word of variable length
from the given size based on the safe-sample-normal function.
sourceraw docstring

random-resourceclj

(random-resource)
(random-resource type title)
(random-resource type title overrides)

Generate a random resource. Can optionally specify type/title, as well as any attribute overrides.

Note that is parameters is given as an override, the supplied parameters are merged in with the randomly generated set.

Generate a random resource. Can optionally specify type/title, as
well as any attribute overrides.

Note that is _parameters_ is given as an override, the supplied
parameters are merged in with the randomly generated set.
sourceraw docstring

random-resource-eventclj

(random-resource-event)

Generate a random resource event.

Generate a random resource event.
sourceraw docstring

random-sentence-ishclj

(random-sentence-ish)
(random-sentence-ish word-count)
(random-sentence-ish word-count sd)
(random-sentence-ish word-count sd {:keys [lowerb upperb] :or {lowerb 1}})

Gibberish sentence of about x 'words'.

Gibberish sentence of about x 'words'.
sourceraw docstring

random-sha1clj

(random-sha1)
(random-sha1 str-size)

Generate a SHA1 hash of a random-string.

Generate a SHA1 hash of a random-string.
sourceraw docstring

random-stringclj

(random-string)
(random-string length)

Generate a random string of optional length

Generate a random string of optional length
sourceraw docstring

random-string-alphaclj

(random-string-alpha)
(random-string-alpha length)

Generate a random string of optional length, only lower case alphabet chars

Generate a random string of optional length, only lower case alphabet chars
sourceraw docstring

random-type-nameclj

(random-type-name)

Generate a random type name.

Generate a random type name.
sourceraw docstring

safe-sample-normalclj

(safe-sample-normal mean
                    standard-deviation
                    &
                    {:keys [lowerb upperb] :or {lowerb 0 upperb (* 2 mean)}})

Get a random integer from the normal distribution guarded by some sane lower and upper bound. If not given, they default to 0 and twice the mean.

Get a random integer from the normal distribution guarded by some sane lower
and upper bound. If not given, they default to 0 and twice the mean.
sourceraw docstring

sample-normalclj

(sample-normal mean standard-deviation)

Get a random integer from a normal distribution described by the given mean and standard deviation from that mean.

~68% of the returned values will fall within mean +/- standard-deviation. ~95% within two standard-deviations. ~99% within three... https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule

Get a random integer from a normal distribution described by the given mean and
standard deviation from that mean.

~68% of the returned values will fall within mean +/- standard-deviation.
~95% within two standard-deviations.
~99% within three...
https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close