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:
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:
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:
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:
pip3 install pypam3
windows:
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
Built Distribution
File details
Details for the file pypam3-0.1.1.tar.gz
.
File metadata
- Download URL: pypam3-0.1.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76becab0ff8a6b722e8ea002a02da0256714e8c3abee3436f2b4664ac61b75ba |
|
MD5 | 3c2a2412d4589449a1b00b9f5bc188ae |
|
BLAKE2b-256 | c833d36bebe83d1c3b948f7c1964fddeb760d98943b5421f1fdc06c8c8a5e2d6 |
File details
Details for the file pypam3-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pypam3-0.1.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e7d5356c0fdbd01f48f9d8171b4107091c5b33ea0b51ae52832441b1edc0917 |
|
MD5 | 4c0e8cd756e99ab9c48a15c29e0e8f3a |
|
BLAKE2b-256 | b210493e6aa818dda332e918aa31811dca5357f451c5706bb892447891b9a6b1 |