Skip to main content

No project description provided

Project description

# pypam3 - Project Assignment Method

Pypam3 is a small tool to assign students(workers) to projects(jobs)
based on their rank of preference(cost) to each of the projects(jobs).

## module

Currently, there is only one module named *assign* in this package

### assign

Two functions, *assign_project()* and *generate_sample()*, realize
the facility.

#### assign_project(csv_name, capacity, **kwargs)

This function is for assigning. To use this function, you need to
put a .csv file on the same directory whose rows represent
students and columns represents projects. The numbers represent the rank of preference that students evaluate. No title should be included.
for example:

```text
5, 4, 2, 1, 3
4, 3, 2, 1, 5
3, 2, 1, 5, 4
```

To convert an Excel file to .csv file, you can easily use Microsoft Excel and press File-Save File as-.csv

The name of the csv file is the first argument.

The second argument is the number of students that a project can take at most.

This function also take several optional key-word arguments:

+ output: This argument has two options, *"file"* or *"stdout"*. The "file" value will ask the program to

output the result by creating a new file *result.xlsx*, the Sheet1 of the Excel file show the project that each student is assigned to, and the Sheet2 shows which students are assigned to each project.
The "stdout" option is the default option. It will directly output the result to the terminal.

+ deviation: If set to True(default), the program will also output the standard deviation to the terminal. If set to False, it will not be calculated.

+ time: If set to True(default), the program will also print the runtime of the function to the terminal. Otherwise, no.

Example of using:

```python
from pypam3.assign import assign_project
assign_project("data.csv", 5, output="file")
```

### generate_sample(csv_name, student_num, project_num)

This function can randomly generate samples, and it's mainly for testing purpose.

Example of using:

```python
from pypam3.assign import generate_sample
generate_sample("data.csv", 80, 20)
```

This will create a csv file named "data.csv" at the current directory with 80 rows and 20 columns.

## Using

First install python3 from <https://www.python.org>. Note that the package should be added to PATH.
To download this package, type in the terminal:
linux/mac:

```shell
pip3 install pypam3
```

windows:

```shell
pip install pypam3
```

Then you can use this package as stated above.


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

pypam3-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

pypam3-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file pypam3-0.1.0.tar.gz.

File metadata

  • Download URL: pypam3-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for pypam3-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cfc2b2bb87d3b2c9b406615375bf140f4d910a7a65a3b3cd6ca7b3578116f7dc
MD5 f44e391cde437ecb18acb8631a4c5dc5
BLAKE2b-256 0b5f332f12739bd2edf23982a707d1af4387871a5508cbe254b8daf830cd0473

See more details on using hashes here.

File details

Details for the file pypam3-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pypam3-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for pypam3-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d5f1b439cec7c791fc1a941b47e7a0057b3ec9d3f4593acdebb54fc9a47a873
MD5 8ac60482ab42eff2753508e60a192cbd
BLAKE2b-256 fd185208aa257f981b27150f6432ba130c0735184260e37ef8c57b5fc1470e6e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page