semvec/pypi-packages huggingface dataset:
mmaputils 0.1.0
Various utilities wrapping the stdlib mmap module.
Requires Python: >=3.6

# mmaputils
Various utilities I use in other projects, wrapping the python stdlib mmap module. 
Currently contains only one utility.

## MmapCursor
A utility class wrapping an `mmap.mmap` object. Intended to simplify reading and in-place
editing of file headers.

Example:
```py
# Say we want to find a specific header field in a file.
# This header starts with a HEADER_MAGIC field to identify itself, and the desired
# field is a 32 bit unsigned integer 16 bytes after that header.
from mmaputils import MmapCursor
import sys

filename = "whatever.file"
magic = 0x12345678

# Note: byteorder is important, but defaults to big endian.
# Let's say that's fine for this file.
with MmapCursor(filename) as cursor:
    # Search for magic number. If found, found=True.
    found = cursor.find_int(magic, 4)
    if not found:
        # handle not found
        print(f"{filename}: could not find header")
        sys.exit(1)
    
    # If found, cursor is placed after field. Advance 16 bytes
    cursor.position += 16
    
    # Read our 32-bit (4 bytes) field.
    field = cursor.read_int(4, signed=False)
    
    print(f"found field: {field}")
    
    # The above read does *not* advance the cursor. This is so we can write something
    # if we want. This will write a new 32 bit unsigned value to the header field
    # we just read:
    cursor.write_int(21, 4, signed=False)
    
    # Note that if we wanted to automatically advance the cursor after reading a field, we
    # could use "next_int" instead.
    
    # Once block is over, file will close and all writes are flushed.
```
Code-Evaluator-Kernel 1.0.0a0
A library for black box testing code. Ideal for evaluate students code
Requires Python: >=3.6

# Code evaluator kernel

**Author: Marcelo de Jesús Núñez**

Developed for the **Nibble team**

## Overview
This library contains an automated black box 
code evaluation for c++ and python. 
Using the path of the source file, and array of inputs and 
outputs the system will evaluate the provided code and respond
according to the specified inputs and outputs

## Installation

By using pip

`pip install code-evaluator-kernel`

## Requirements
- g++ installed
- python3 installed
- in Linux systems probably you have to create an alias for python3 called python

## Execution

For execution you have to call the `begin_evaluation` method to start code evaluation

### Parameters
- language: a string with the selected language (actually supports c++ and python)
- solution_filepath: the path of the source code
- inputs: a string array with all the inputs that the kernel has to add to the code evaluation
- outputs: an array with the expected outputs of the source code

### Response

The kernel will return a dictionary containing:
- status: the status of the evaluation (see above for more details)
- expected: the expected outputs given previously
- got: the real outputs thrown by the source code

## Possible Responses

### PASSED
This message indicates that the code passed the test

### FAILED
This message indicades that the code didn't respond the same as the 
specified outputs

### COMPILATION_ERROR
In this case, for compilated languages (e.g c++) it will
a message indicating that the source has a compilation error

### EXECUTION_ERROR
In case that the return code of the execution is not 0, the library
will return this message

### TIMEOUT_ERROR
The evaluation will wait only 10 seconds, after that it 
will raise a timeout error

# Contact
- E-mail: [mdjnunez9706@gmail.com](mailto:mdjnunez9706@gmail.com)
- Github: [chelo154](https://github.com/chelo154)
- Linkedin [Marcelo de Jesús Núñez](https://www.linkedin.com/in/marcelo-de-jesús-nuñez-490b05191/)