A basic python library that has modules for maths and algorithms
Project description
A basic Python library that has modules for math functions, algorithms, and puzzles.
Installation
Use the package manager pip to install Algopylib.
pip install Algopylib
Usage
import Algopylib.algo.check as ck
ck.is_power_of_2(32) # returns True
ck.is_even(3) # returns False
Package Structure
├── Algopylib
│ ├── algo
│ │ ├── __init__.py
│ │ ├── binary.py
│ │ ├── check.py
│ │ └── sort.py
│ ├── math
│ │ ├── __init__.py
│ │ ├── combinatorics.py
│ │ ├── gcd_lcm.py
│ │ ├── geometry.py
│ │ ├── matrix.py
│ │ ├── series.py
│ │ └── stat.py
│ └── puzzle
│ ├── __init__.py
│ ├── sudoku.py
│ └── tictaktoe.py
└── __init__.py
Contents
Algo
Implementation of simple Algorithms.
- Binary
- Binary sum
- Check
- Is power of 2
- Is power of N
- Is square
- Is palindrome
- Is subsequence
- Is even
- Is odd
- Is prime
- Sort
- Bubble sort
- Insertion sort
Math
Implementation of useful Math functions.
- Combinatorics
- Factorial
- nCr
- nPr
- GCD LCM
- GCD
- LCM
- Trailing zeroes
- GCD using bitwise operator
- Geometry
- Distance
- Is collinear
- Equation of line
- Is inside circle
- Area of triangle
- Matrix
- Determinant of 2x2 matrix
- Determinant of 3x3 matrix
- Inverse of 2x2 matrix
- Inverse of 3x3 matrix
- Series
- Nth term of AP
- Nth term of GP
- Sum of AP
- Sum of GP
- Statistics
- Mean
- Float mean
- Geometric mean
- Harmonic mean
- Median
- Low and high median
- Median-grouped
- Mode
- Multimode
- Quantiles
- Population variance
- Sample variance
- Population standard deviation
- Sample Standard deviation
- Sample covariance
Puzzle
Implementation of simple Puzzles.
Setup for devs
For Windows,
- Use
pip install virtualenv - Run
virtualenv nameofvenvin terminal - Activate that virtualenv (different for different os)
- Run
pip install -r requirements.txtin terminal (virtualenv should be activated) - To compile library, run
python setup.py sdist bdist_wheelin terminal
For other OS,
- Use
pip install virtualenv - Run
virtualenv nameofvenvin terminal - Activate that virtualenv
- Run following command in terminal,
python -m pip install -upgrade pippip install wheelpip install twinepip install mypy
- To compile library, run
python setup.py sdist bdist_wheelin terminal
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Algopylib-0.0.3-py3-none-any.whl.
File metadata
- Download URL: Algopylib-0.0.3-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.2.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cac9601c249b25e51d3054fc42dc5af8ac876432fc44bfdd614489f8b08079d
|
|
| MD5 |
0930a2541598e4f51d56750e070701fc
|
|
| BLAKE2b-256 |
661c504435aef90763566dcafa019ee2ba22266da2b60ca733f0a1347007c0e0
|