Skip to main content

A random number generator library, it generates time-based pseudo-random numbers.

Project description

randomlib (module: ramlib)

A simple random library with a Python prototype and a main C version that you can use in your projects for simple random tasks.

Overview

randomlib (module: ramlib) is a simple, independent, and deterministic library for generating pseudo-random numbers based on time.
It uses multiple layers of temporal granularity (milliseconds, microseconds, nanoseconds, and timestamp) combined with bitwise operations and dynamic multipliers.

Ideal for pseudo-randomness experiments, simulations, seed generation, and environments without complex external dependencies.

Installation

pip install ramlib-samjamsh

Usage

from ramlib import genrandom

# Get & Print a random value
start = 1
end = 10

random_value = genrandom(start, end)
print("\nRandom Value:", random_value.getnew())      # get a random value once
print()

for i in range(5):
    newrandom = random_value.generate(start, end)    # get a random value multiple times
    print("New Random:", newrandom)
print()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ramlib_samjamsh-1.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ramlib_samjamsh-1.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file ramlib_samjamsh-1.1.tar.gz.

File metadata

  • Download URL: ramlib_samjamsh-1.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for ramlib_samjamsh-1.1.tar.gz
Algorithm Hash digest
SHA256 bf7089028b2dc344211956e0f25314a83a8ae866ed456442388e8a521a1746a7
MD5 f8bbf7e46c313cce78eb10552c06ca35
BLAKE2b-256 52a6939c6d7c256a2808ac193f8582b338d863ca45b0806c29c5d086002ff4d7

See more details on using hashes here.

File details

Details for the file ramlib_samjamsh-1.1-py3-none-any.whl.

File metadata

  • Download URL: ramlib_samjamsh-1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for ramlib_samjamsh-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8809d53e8db25391e8ddf711a9fdf0d11bea2328016ad3aebafd5bca9bed73a2
MD5 9b5e85dbbd9dc59996f8a45baa7ddcf1
BLAKE2b-256 d6c6c71a9d053bc541034fb66aadf8d3f2e475cb298f15bb5bb7f28c38be7b55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page