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 in miles")  # Returns: "3.42 miles"
await numo.calculate("100 MB in 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 in feet"      # Returns: 18.04 feet
"1 mile in kilometers"    # Returns: 1.61 kilometers
"100 yards in meters"     # Returns: 91.44 meters

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

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

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

# Scientific Units
"1 bar in psi"           # Returns: 14.50 psi
"760 mmHg in atm"        # Returns: 1.00 atm
"100 hp in 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.4.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.4-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: numo-0.2.4.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.4.tar.gz
Algorithm Hash digest
SHA256 11a9985f1775e08dbfb48c6dda525793d3392c96383bc1c6c1a8c48e194a04ca
MD5 8bdc8b14d196a5e3e3528b1dad529d1d
BLAKE2b-256 1abbf2827edc4dacde8390ec99b14e1ef71149972d5e99b6fa35be6d030dd1cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: numo-0.2.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eea5f4d794a2ab63bf39f30d1f57420fc04c250a42bdc480ce1a0cdbe0f4440c
MD5 a651acbfb8123d7d7733de23ebc22bdb
BLAKE2b-256 28bbd168d3d44b2741d6357e0eb171dfe9a29577eec141be918530c3d89b6f72

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