Skip to main content

A Python library for mathematical operations, unit conversions, currency conversions, and translations

Project description

🔢 Numo: Your Smart Mathematical Companion

PyPI version License: MIT Python 3.8+

🚀 Numo is a powerful text-based calculator and unit converter that brings mathematics to life through natural language processing. Whether you're a student, developer, or data scientist, Numo makes complex calculations feel natural and intuitive.

✨ Key Features

🧮 Mathematical Functions

  • Basic Operations

    • Arithmetic operations (+, -, *, /, ^)
    • Parentheses support for complex expressions
    • Automatic decimal precision handling
  • Advanced Mathematics

    • Trigonometric functions (sin, cos, tan, etc.)
    • Logarithmic functions (log, log10, exp)
    • Root calculations (sqrt, cbrt)
  • Statistical Analysis

    • Basic statistics (mean, median, mode)
    • Variance and standard deviation
    • Quartiles and percentiles
  • Vector Operations

    • Vector magnitude calculation
    • Dot product computation
    • Angle between vectors
  • Financial Tools

    • Compound interest calculator
    • Simple interest calculator
    • Payment (PMT) calculator
  • Advanced Features

    • Combinatorics (permutation, combination)
    • Percentage calculations
    • Custom rounding functions

📏 Unit Conversions

  • Physical Measurements

    • Length (meters, feet, miles, etc.)
    • Weight (kilograms, pounds, etc.)
    • Volume (liters, gallons, etc.)
    • Area (square meters, acres, etc.)
  • Time & Speed

    • Time units (seconds to years)
    • Speed conversions (km/h, mph, etc.)
    • Angular measurements (degrees, radians)
  • Digital Units

    • Storage (bytes to yottabytes)
    • Data rates (bps to TBps)
    • Both decimal (MB) and binary (MiB) units
  • Scientific Units

    • Pressure (pascal, bar, psi, etc.)
    • Electrical (volt, ampere, watt, etc.)
    • Power (horsepower, kilowatt, etc.)
  • Display Units

    • Screen measurements (px, pt, em)
    • Resolution (dpi, ppi)
    • Typography units (pica)

🌍 Language Translation

  • Comprehensive Support

    • 100+ languages supported
    • Natural language processing
    • Automatic language detection
  • Easy Syntax

    • Simple format: "text in language"
    • Supports full sentences
    • Maintains formatting

💾 Variable Management

  • Smart Storage

    • Dynamic variable assignment
    • Expression evaluation
    • Persistent storage between sessions
  • Advanced Features

    • Complex expression support
    • Mathematical constants (pi, e, etc.)
    • Function results storage

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/furkancosgun/numo.git
cd numo

# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Basic Usage

from numo import Numo

# Initialize Numo
numo = Numo()

# Mathematical calculations
await numo.calculate("2 * (3 + 4)")  # Returns: "14.00"
await numo.calculate("sin(pi/2)")    # Returns: "1.00"

# Unit conversions
await numo.calculate("5.5 km to miles")  # Returns: "3.42 miles"
await numo.calculate("100 MB to GB")     # Returns: "0.10 GB"

# Language translation
await numo.calculate("Hello world in spanish")  # Returns: "hola mundo"

# Variable management
await numo.calculate([
    "radius = 5",
    "area = pi * radius^2",
    "area"  # Returns: "78.54"
])

📚 Detailed Examples

🧮 Mathematical Functions

# Statistical Analysis
mean(1, 2, 3, 4)     # Returns: 2.50
std(1, 2, 3)         # Returns: 1.00
percentile(75, 1, 2, 3, 4)  # Returns: 3.00

# Vector Mathematics
vector_magnitude(3, 4)         # Returns: 5.00
vector_dot(1, 2, 3, 4)        # Returns: 11.00
vector_angle(1, 0, 0, 1)      # Returns: 90.00

# Financial Calculations
compound_interest(1000, 5, 2)  # Returns: 1102.50
pmt(1000, 5, 12)             # Returns: 85.47

# Advanced Operations
permutation(5, 2)    # Returns: 20.00
combination(5, 2)    # Returns: 10.00
percent_change(100, 150)  # Returns: 50.00

📏 Unit Conversions

# Length & Distance
"5.5 meters to feet"      # Returns: 18.04 feet
"1 mile to kilometers"    # Returns: 1.61 kilometers
"100 yards to meters"     # Returns: 91.44 meters

# Weight & Mass
"150 pounds to kg"        # Returns: 68.04 kg
"1000 grams to ounces"    # Returns: 35.27 ounces
"2 tons to kilograms"     # Returns: 1814.37 kilograms

# Digital Storage
"1.5 GB to MB"           # Returns: 1536.00 MB
"1 TiB to GiB"           # Returns: 1024.00 GiB
"500 MB to bytes"        # Returns: 524288000 bytes

# Data Transfer Rates
"100 Mbps to Gbps"       # Returns: 0.10 Gbps
"1 GBps to Mbps"         # Returns: 8192.00 Mbps

# Scientific Units
"1 bar to psi"           # Returns: 14.50 psi
"760 mmHg to atm"        # Returns: 1.00 atm
"100 hp to kW"           # Returns: 74.57 kW

🤝 Contributing

We love your input! We want to make contributing to Numo as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

Development Process

  1. Fork the repo and create your branch from main
  2. Add tests if you've added code that should be tested
  3. Update documentation if you've changed APIs
  4. Ensure the test suite passes
  5. Make sure your code follows the style guidelines
  6. Issue your pull request!

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Show Your Support

If you find Numo helpful, please consider giving us a star on GitHub! It helps us know that you find the project useful and encourages further development.

📬 Contact

Have questions? Feel free to open an issue!


Made with ❤️ by Furkan Cosgun

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

numo-0.2.5.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

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

numo-0.2.5-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file numo-0.2.5.tar.gz.

File metadata

  • Download URL: numo-0.2.5.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for numo-0.2.5.tar.gz
Algorithm Hash digest
SHA256 d610b3c99d8b15bd720b788276db995eb2ef5b7b6efec27964ded76fd3e1c175
MD5 98bc75ab8da20bb0ffb060bc354a8275
BLAKE2b-256 39c14fae7d3aa59e8b83325cb30246835cc741607a9770abd9b6089113539a16

See more details on using hashes here.

File details

Details for the file numo-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: numo-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for numo-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 923929302e5a0c8f016285645937de2de84798b29ee64cbf1091af14c5c41a45
MD5 d4c1188a696af1296534800316bb171e
BLAKE2b-256 e1125d2cb8eb908fb17af12cb03de7e9c20f09abcc97b4f49558d6f73f475705

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