semvec/pypi-packages huggingface dataset:
megamap 1.0.1
Generate a visual map of your codebase
Requires Python: >=3.7

<p align="center">
  <img width="1231" height="300" src="https://raw.githubusercontent.com/rothos/megamap/master/banner.png">
</p>


# Megamap

Megamap is a mega awesome version of the minimap feature of text editors like
Sublime. Give megamap a directory full of source code, and it will
produce a PNG image which is a beautiful birdseye view of all the source code.


## Installation

```bash
pip install megamap
```

## Usage

```bash
megamap [input_directory] [output_filename]
```

By default, `input_directory` = `.` and `output_filename` = `megamap.png`.

Optional arguments:
```
-h, --help            show this help message and exit
-a, --aspect-ratio ASPECT_RATIO
                      Target aspect ratio (width/height) for the output image (default: 1.5)
-b, --banner          Enable banner mode (sets target aspect ratio to 5.0)
-c, --cols COLS       Number of characters per line in output image (default: 80)
--include-hidden      Include hidden files and directories
--list-styles         List available syntax highlighting styles and exit
-q, --quiet           Suppress all output except errors
-s, --style STYLE     Syntax highlighting style (use "random" for random style)
-v, --verbose         Enable verbose output
--version             Print program version number and exit
-x, --scale SCALE     Pixel scale factor (must be integer, default: 1)
-z, --zebra           Enable zebra striping of background colors between files
```

The program will automatically:
- Skip common non-code files (LICENSE, README, etc.)
- Skip files with non-code extensions (.txt, .md, .json, etc.)
- Skip binary and non-text files
- Skip files without a valid syntax highlighter


## Pretty pictures

These two images were created using the same input (this program's own source code)
with different parameters:

<p align="center">
  <img width="352" height="320" src="https://raw.githubusercontent.com/rothos/megamap/master/gen.py_1.png">
</p>

<p align="center">
  <img width="402" height="288" src="https://raw.githubusercontent.com/rothos/megamap/master/gen.py_2.png">
</p>

Source code of entire projects can be elegantly illustrated:

<p align="center">
  <img width="1232" height="791" src="https://raw.githubusercontent.com/rothos/megamap/master/statebus.png">
</p>


## FAQ

### How are the files sorted?

The files are sorted alphabetically by directory and then by file name,
with files in the base directory first.

### How do I find out what all the syntax highlighting styles are called?

You can either:
1. Run `megamap --list-styles` to see all available styles
2. Use `random` as the style to let megamap choose one randomly

### What about word wrapping?

Not currently supported.
py-error-boundary 0.1.1
A simple Python package for explicit errors
Requires Python: >=3.11

# Python Error Boundary
[![PyPI version](https://badge.fury.io/py/py-error-boundary.svg)](https://badge.fury.io/py/py-error-boundary)
&nbsp;&nbsp;
![GitHub License](https://img.shields.io/github/license/suyogkulkarnigit/py_error_boundary)

**Python error boundary** is a lightweight Python package that simplifies error handling by providing explicit, easy-to-understand error messages. Created for a personal project to make debugging more intuitive and less frustrating.

---

## **Installation**

Install the package using `pip`:

```bash
pip install py_error_boundary
```

## **Description**


The `ErrorBoundary` class takes a callable function along with all its required parameters as class arguments. Using these, the class invokes your function. For example:
```python
ErrorBoundary(callable, param1, param2, ..., n)
```

**Example:**
```python
import requests
from py_error_boundary.error_boundary import ErrorBoundary

# Initialize ErrorBoundary instance
obj = ErrorBoundary()

# Define whatever function you want to call
url = 'http://www.example.com'
def get(url):
    return requests.get(url)

# Call the function using ErrorBoundary, passing the function and arguments
print(obj(get, url))
```
**Output**
```
An exception occurred at line 12 in file req.py.
Error: Invalid URL 'www.example.com': No scheme supplied. Perhaps you meant https://www.example.com?
```
---
### What’s happening:
1. **ErrorBoundary Class**: The `ErrorBoundary` class is initialized with the function (`get`) and its parameters (`url`), and it executes the function while handling any errors.
2. **Invalid URL**: In this case, the URL `'www.example.com'` is missing a scheme (such as `'http://'` or `'https://'`), which causes a `requests` exception to be raised.
3. **Error Handling**: The `ErrorBoundary` class catches the exception and provides detailed information about the error, including:
   - The exact line where the error occurred (`line 12` in `req.py`).
   - A clear error message: `"Invalid URL 'www.example.com': No scheme supplied. Perhaps you meant https://www.example.com?"`

---
## 🚨 **Important:** 

The `ErrorBoundary` class typically returns the file names for most environments, but if used in an interactive Python environment (e.g., the Python shell or Jupyter notebooks), it will return `<stdin>` as the file name. This is not an error, but rather a result of how the Python environment handles code execution in interactive sessions.

---
## **Cloning the repository**
- Clone
    ```
    git clone git@github.com:suyogkulkarnigit/py_error_boundary.git
    ```
- Dist Setup
    ```
    make setup
    ```
- Cleanup Setup
    ```
    make clean-setup
    ```