meetupmatcher.pseudorandom#

Module Contents#

Functions#

get_weeks_since_epoch(→ int)

Returns the number of weeks since epoch.

get_random_seed_from_timestamp(→ int)

Get random seed from timestamp. If timestamp is None, use current time.

get_seed_from_option(→ int)

Get seed from string input specified in command line. Supported options:

get_rng_from_seed(→ numpy.random.Generator)

get_rng_from_option(→ numpy.random.Generator)

Get random number generator from string input specified in

meetupmatcher.pseudorandom.get_weeks_since_epoch(timestamp: float | None = None) int#

Returns the number of weeks since epoch.

meetupmatcher.pseudorandom.get_random_seed_from_timestamp(timestamp: float | None = None) int#

Get random seed from timestamp. If timestamp is None, use current time.

meetupmatcher.pseudorandom.get_seed_from_option(option: str) int#

Get seed from string input specified in command line. Supported options: week (current week), a number (directly taken as seed), or anything that can be parsed by dateutil.parser.parse.

meetupmatcher.pseudorandom.get_rng_from_seed(seed: float) numpy.random.Generator#
meetupmatcher.pseudorandom.get_rng_from_option(option: str) numpy.random.Generator#

Get random number generator from string input specified in command line. See get_seed_from_option for supported options.