semvec/pypi-packages huggingface dataset:
calculator-mrk0607 1.0.0
A very basic calculator module with simple math operations.
License: MIT
Keywords: calculator basic math module education

=======================
📦 Simple Calculator Module
=======================

This module provides basic arithmetic operations and is defined inside the __init__.py file, making it suitable as a package initializer or standalone utility.

------------
📌 Functions
------------

1. add(num1, num2)
   → Returns the sum of two numbers.

2. sub(num1, num2)
   → Returns the difference of num1 and num2.

3. mul(num1, num2)
   → Returns the product of two numbers.

4. div(num1, num2)
   → Returns the division result of num1 by num2.

5. exp(num1, num2)
   → Returns num1 raised to the power of num2.

6. sqt(num1)
   → Returns the square root of num1.

---------------------
🧪 Example Usage
---------------------

print(add(7, 8))        # 15
print(div(4, 5))        # 0.8
print(exp(4, 3))        # 64
print(sqt(25))          # 5.0

------------------------
👨‍💻 Created for Practice
------------------------

This module is part of a practice exercise to learn:
✔ Module creation  
✔ Function testing  
✔ Basic arithmetic implementation in Python


===========================
📜 CHANGELOG – Calculator Module
===========================

All notable changes to this project will be documented in this file.

------------------------
Version 1.0.0 – [Initial Release]
------------------------

🗓 Date: 2025-04-29
------------------------
urltrim 0.1.4
A Python library to trim long URLs in code
License: MIT
Requires Python: >=3.6

# URLTrim

A Python library to trim long URLs in your code while retaining their full functionality.

## Installation

```bash
pip install urltrim
```

from urltrim import URLTrim

url = "https://www.example.com/some/very/long/path?query=123"
link = URLTrim(url) # Default mode: domain + first path segment
print(link) # Outputs: example.com/some
print(link.get_full_url()) # Outputs: the full URL

# Custom modes

link_domain = URLTrim(url, mode="domain") # Domain only
print(link_domain) # Outputs: example.com

link_full = URLTrim(url, mode="full_path") # Full path
print(link_full) # Outputs: example.com/some/very/long/path
pytest-gradescope 0.1.6
A pytest plugin for Gradescope integration
License: MIT

# Gradescope Pytest Library

A package for producing Gradescope-compatible results.json files with Pytest tests.

Forked from [ucsb-gradescope-tools/pytest_utils](https://github.com/ucsb-gradescope-tools/pytest_utils) to bring it to parity with the latest version of the [Gradescope Python Autograder](https://github.com/gradescope/gradescope-utils/) (which uses unittest).

## Usage

At the top of the file where you define your tests, put:

```python
import pytest_gradescope
from pytest_gradescope.decorators import weight, visibility, tags, ...
```

Then annotate your tests using the provided decorators.

### weight

To set the weight for a test:

```python
@weight(value)
def test_a():
```

Where `value` is a numeric value.

### number

To optionally set the number for a test (used for ordering on Gradescope):

```python
@number(value)
def test_a():
```

Where `value` is a numeric value.

### visibility

To optionally set the visibility of a test:

```python
@visibility(value)
def test_a():
```

Where `value` is 'visible', 'hidden', 'after_due_date', or 'after_published.' Default value is 'visible.'

### hide_errors

To optionally hide the errors for a test:

```python
@hide_errors(msg)
def test_a():
```

Where `msg` is a message to display instead of the error. Default value is 'Test failed'.

### tags

To optionally add extra tags to a test:

```python
@tags(value)
def test_a():
```

Where `value` is a string array. Default value is an empty array.

### leaderboard

To optionally set the leaderboard for a test:

```python
@leaderboard(column_name, sort_order="desc")
def test_a(set_leaderboard_value = None):
    set_leaderboard_value(value)
```

Where `column_name` is the name of the leaderboard column and `sort_order` is either 'asc' or 'desc', and `set_leaderboard_value` is a function that can be called to set the value for the leaderboard. If `set_leaderboard_value` is not called, the test will not contribute to the leaderboard.

### partial_credit

To optionally set partial credit for a test:

```python
@partial_credit(weight)
def test_a(set_score=None):
    set_score(partial_score)
```

Where `weight` is the weight of the test and `set_score` is a function that can be called to set the score for the test. If `set_score` is not called, the test will receive full credit if it passes, or no credit if it fails.

## Running Locally

To run locally:

```bash
> git clone https://github.com/ucsb-gradescope-tools/pytest_utils.git
> cd pytest_utils
> pip3 install -e .
```

Then, in the directory where your `test_assignment.py` lives:

```bash
> pytest
```

The results will be written to results.json.

## Example

The assignment is to create a file called `assignment.py` with a function `hello()` which returns "hello". The `test_assignment.py` file is:

```python
import pytest_utils
from pytest_utils.decorators import weight, visibility, tags
from assignment import *

class TestAssignment(object):
    @weight(10)
    def test_one(self):
        assert(hello() == "hello")
```