Skip to main content

A simple version of the Sieve of Eratosthenes. Developed during "Python for Scientific Computing" course at CINECA

Project description

colanderpy

A simple version of the Sieve of Eratosthenes.

Developed during "Python for Scientific Computing" course at CINECA

Install from source

Clone repository

git clone https://gitlab.hpc.cineca.it/cineca-hpyc/colanderpy.git

and install

$ cd pycolander
$ python setup.py install

Install from Python Package Index (PyPI)

pip install pycolander

Usage

Prime number generator

$ sieve -n 42
2 3 5 7 11 13 17 19 23 29 31 37 41
$ sieve -h
usage: sieve [-h] [-n LIMIT]

The Sieve of Eratosthenes.

Returns the list of prime numbers up to a maximum integer.

optional arguments:
  -h, --help            show this help message and exit
  -n LIMIT, --limit LIMIT
                        maximum integer up to which the prime numbers are searched. (default 100)

Prime-counting function

$ prime-counting -n 42
13
$ prime-counting -h
usage: prime-counting [-h] [-n LIMIT]

Prime-counting function

Counts the number of prime numbers less than or equal to an integer number.

optional arguments:
  -h, --help            show this help message and exit
  -n LIMIT, --limit LIMIT
                        maximum integer up to which the prime numbers are counted. (default 100)

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

colanderpy-0.6.0.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file colanderpy-0.6.0.tar.gz.

File metadata

  • Download URL: colanderpy-0.6.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.9.6 requests/2.27.1 setuptools/59.6.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.6.9

File hashes

Hashes for colanderpy-0.6.0.tar.gz
Algorithm Hash digest
SHA256 f3653fd7971e99530c022ae9b9dbb884bd60faff8000a67cd904a86ae92b91b4
MD5 97088077badb08f56a475a0b2549264b
BLAKE2b-256 cedf268397e550698190ccd93d8a5ce16369246f51e7b60520ed8f86ea810d2d

See more details on using hashes here.

Supported by

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