GithubHelp home page GithubHelp logo

msimet / studygroups Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 22 KB

Divide a group of people into subgroups multiple times with minimal repeating of groups or pairs.

License: MIT License

Python 100.00%

studygroups's Introduction

StudyGroups

This module is designed for teachers who have students they would like to divide into small groups with a good distribution of group mates (which random group organization may not do). It is run through a yaml configuration file describing the students in the class and the requested groups.

Installation

Download this code from GitHub (https://github.com/msimet/StudyGroups), then: pip install .

Usage

StudyGroups must be run with a yaml configuration file. These are pretty simple. The config file must have two keys, names and groups. names is a list of names, while groups is a list of dicts describing how to group the people in names. Each dict in groups should have two keys: distribution, a list of ints describing the distribution of people (such as [2, 2, 2] to make 3 pairs of students out of a group of 6), and num, an int directing how many times to make that set of groups (4 in this example would make 4 sets of 3 pairs, where each set of 3 pairs divides all 6 students, and the 4 sets are designed such that no student has the same partner twice). The distributions must always divide all the students--you can't ask for two pairs if you have six students. The distributions do NOT have to be equal in number: you could ask for a group of 4 and a group of 2 for 6 students.

The yaml file for the setup in the previous paragraph would be:

names:
    - Annie
    - Bianca
    - Christopher
    - David
    - Elise
    - Farley
groups:
    - distribution: [2, 2, 2]
      num: 4

More examples can be found in the tests/ folder. The tests with filenames beginning test_failure are designed to cause errors for unit tests to catch. Do not use those as templates! Some of the templates also include a seed key, which seeds a random number generator. We generally recommend avoiding this key except for testing purposes.

Running the code is as simple as:

python -m study_groups [yourfile].yaml

This will print a CSV file to the terminal, with the student groups in columns, and blank lines between every set of subgroups. You can copy and paste it directly, or redirect the output to a .csv file:

python -m study_groups week1.yaml > week1.csv

studygroups's People

Contributors

msimet avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.