A basic Python library that has modules for math functions, algorithms, and puzzles.
Use the package manager pip to install Algopylib.
pip install Algopylib
import Algopylib.algo.check as ck
ck.is_power_of_2(32) # returns True
ck.is_even(3) # returns False
├── 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
- 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
- Merge sort
- Heap sort
- Quick sort
- 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
- Use
pip install virtualenv
- Run
virtualenv nameofvenv
in terminal - Activate that virtualenv (different for different os)
- Run
pip install -r requirements.txt
in terminal (virtualenv should be activated) - To compile library, run
python setup.py sdist bdist_wheel
in terminal
- Use
pip install virtualenv
- Run
virtualenv nameofvenv
in terminal - Activate that virtualenv
- Run following command in terminal,
python -m pip install -upgrade pip
pip install wheel
pip install twine
pip install mypy
- To compile library, run
python setup.py sdist bdist_wheel
in terminal
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.
Made with ❤️ at IIIT Naya Raipur