Giter VIP home page Giter VIP logo

schedule_generator's Introduction

schedule_generator

Summary:

The provided Python script is designed to organize ushers for various shows based on their availability status. Here's a breakdown of its functionality:

Reading Data: The script reads a CSV file containing usher availability data from a specified location.

Data Preprocessing: It converts the column headers to uppercase for consistency. It takes the latest submission by each usher.

Generating Usher Pools:

The script loops through the columns of the DataFrame, checking if the column name starts with "SHOW". For each show column:

  • It extracts a list of special ushers and available ushers based on their status ("Special" or "Available").
  • Prioritizes the special usher guarateeing them the slot for the show.
  • It combines special and available ushers into a pool. Then the pool randomly selects ushers for the show.
  • It excludes "Person A" and "Person B" as they are not ushers.
  • Finally, it limits the pool based on the venue the show is at. One venue may need up to 25 and the other venue only needs at max 7.

Output Generation:

The script prints the generated pools for each show. It generates a timestamp to create a unique identifier for the output file. It writes the generated pools to a text file, along with the corresponding show names.

Error Handling: The script includes exception handling to catch and print any errors that occur during execution.

Timestamp: It includes the current date and time in the filename of the output file for tracking purposes.

File Structure: The script assumes a specific file structure and file paths for input and output files

Dependencies:

  • Python 3.11.8:
  • datetime: The datetime module is used for generating timestamps, which are used for various purposes such as naming files with the current date and time.
  • os: The os module is used for file path operations, such as joining directory paths and accessing file system-related functions.
  • pandas: The pandas library is used for data manipulation and analysis, particularly for working with tabular data structures like DataFrames.
  • random: The random module is used for generating random numbers and performing random selections, as in shuffling lists or selecting random items.
  • re: The re module is typically used for regular expression operations, but in the given code snippet, it's not being explicitly utilized. It seems like an oversight or a remnant from previous versions of the code.

Author: Claire Kraft

schedule_generator's People

Contributors

ckraft-bot avatar

Stargazers

 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.