# Eugo Documentation

Eugo gives you instant access to supercomputing resources through a browser-based development environment.

Source: https://docs.eugo.io/docs/

---

Eugo gives you instant access to supercomputing resources through a browser-based development environment.

Write Python code in your browser. Eugo automatically distributes your workload across its HPC cluster. No infrastructure to manage. No environment setup. No deployment pipelines.

## What You Get

**Zero setup** — Create an account, deploy a workspace, and start coding. Your environment includes hundreds of pre-installed libraries.

**Automatic scaling** — Eugo allocates compute resources based on your code's needs. Scale to thousands of vCPUs and terabytes of RAM without configuration.

**Optimized execution** — Your code runs on specialized hardware (GPUs, SIMD, AI accelerators) with automatic optimizations for parallelization and vectorization.

**Standard Python** — Use familiar libraries like NumPy, pandas, scikit-learn, PyTorch, and TensorFlow. Bring your own dependencies when needed.

## Common Use Cases

You can use Eugo for any compute-intensive workload:

- **Machine learning** — Train models on large datasets, run inference at scale
- **Data processing** — Transform and analyze terabytes of data
- **Scientific computing** — Protein folding, genomic analysis, particle physics simulations
- **Geospatial analysis** — Process raster and vector data at scale
- **Financial modeling** — Run complex simulations and risk analyses
- **Image processing** — Batch processing and computer vision tasks

If your code takes too long to run or you're hitting memory limits, Eugo can help.

## Quick Example

```python title="eugo_example.py" showLineNumbers
import numpy as np
from numpy.typing import NDArray
from scipy.linalg import norm
from aws_lambda_powertools.logging import Logger

logger = Logger(service="eugo_example.py")

def process_matrices(
    *,
    matrix1: NDArray[np.float64],
    matrix2: NDArray[np.float64],
    scalar: int | float
) -> NDArray[np.complex128]:
    """
    Processes two matrices by performing a series of operations:
    addition, scaling, Fast Fourier Transform (FFT), matrix norm calculation,
    and returning the conjugate transpose.

    Parameters
    ----------
    matrix1 : numpy.ndarray
        First matrix of shape (M, N) with float64 elements.
    matrix2 : numpy.ndarray
        Second matrix of shape (M, N) with float64 elements.
    scalar : int or float
        Scalar value to multiply the summed result by.

    Returns
    -------
    numpy.ndarray
        Conjugate transpose of the FFT result (complex128 array).

    Raises
    ------
    ValueError
        If the input matrices do not have the same shape.

    Notes
    -----
    This function combines several steps:
    1. Adds `matrix1` and `matrix2`.
    2. Scales the result by `scalar`.
    3. Computes a 2D FFT on the scaled result.
    4. Computes the Frobenius norm of the FFT result.
    5. Returns the conjugate transpose of the FFT result.

    Example
    -------
    >>> matrix1 = np.array([[1.0, 2.0], [3.0, 4.0]])
    >>> matrix2 = np.array([[5.0, 6.0], [7.0, 8.0]])
    >>> scalar = 2
    >>> result = process_matrices(matrix1, matrix2, scalar)
    >>> logger.info("Result:\n", result)
    """

    # Ensure both matrices have the same shape
    if matrix1.shape != matrix2.shape:
        raise ValueError("Matrices must have the same shape.")

    # Add the matrices
    result = matrix1 + matrix2

    # Scale the result by the scalar
    scaled_result = result * scalar

    # Perform a 2D Fast Fourier Transform
    fft_result = np.fft.fft2(scaled_result)

    # Compute the Frobenius norm of the FFT result
    frobenius_norm = norm(fft_result, ord='fro')
    logger.info(f"Frobenius norm of FFT result: {frobenius_norm}")

    # Return the conjugate transpose of the FFT result
    return np.conjugate(fft_result.T)
```

**Example usage:**

```python title="usage_example.py" showLineNumbers
# Example usage:
matrix1 = np.array([[1.0, 2.0], [3.0, 4.0]])
matrix2 = np.array([[5.0, 6.0], [7.0, 8.0]])
scalar = 2

conjugate_transpose_result = process_matrices(matrix1=matrix1, matrix2=matrix2, scalar=scalar)
logger.info(f"Conjugate Transpose of FFT Result: {conjugate_transpose_result}")
```

This code runs on Eugo's distributed infrastructure automatically. No cluster configuration required.

> **Tip**: See the [EugoIDE documentation](./platform/ide.md) for more examples and details.

## How It Works

1. **Write Python** — Use the EugoIDE notebook interface to write standard Python code
2. **Run** — Execute cells as you normally would in Jupyter
3. **Eugo optimizes** — Code is automatically parallelized, vectorized, and distributed across compute nodes
4. **Get results** — Output appears in your notebook, just like local execution

Eugo handles all infrastructure provisioning, resource allocation, and performance optimization. You only write code.

## Platform Features

**Managed infrastructure** — Eugo provisions, scales, and maintains all compute resources. No DevOps required.

**Dynamic scaling** — Resources allocate based on your workload. You never overprovision.

**Cost efficient** — Pay only for what you use. Serverless clusters exist only when needed.

**Multiple frameworks** — Use Ray, Spark, and PyTorch together in the same workspace.

**Energy efficient** — Built entirely on Arm architecture (aarch64) for better power efficiency than traditional supercomputers.

## Get Started

Ready to start? Follow the [Quickstart guide](./getting-started/quickstart.md) to create your first workspace and run code in minutes.

[Sign up](https://app.eugo.io/signup) for an account to begin.
