<jupyter_start><jupyter_text>10 Academy Schedules<jupyter_code>import numpy as np
import pandas as pd
import os
import csv
def weekly_schedule(names, speaker_no):
    save_here = os.getcwd()
    schedule = {}
    try:
        assert speaker_no <= len(names)
    except AssertionError:
            print("No of speakers  greater than avaialable people!")
    if isinstance(names, list):
        names = pd.DataFrame({'names':names})
       # print(names)
        # this ensures that the proportion of speakers to the number of days is evenly distributed
        for day in range(int(len(names)/speaker_no)):
            try:
                today = names.sample(speaker_no)
                names = names.drop(today.index, axis=0)
                schedule[f'Day {day+1}']=today.names.values.tolist()
                #print(schedule)
                #print('Day {} speakers : {}'.format(day+1, today.names.values.tolist()))
            except ValueError:
                        print("No of speakers  greater than avaialable people!")
                        break
    schedule= pd.DataFrame(schedule.items(), columns=['day', 'names'])
    preetify_schedule = schedule.explode('names')
    print(preetify_schedule)
    download = preetify_schedule.to_csv("schedule.csv", index=False)
    return download<jupyter_output><empty_output><jupyter_text>> Test<jupyter_code>names = ['<EMAIL>', '<EMAIL>', '<EMAIL>', 
 '<EMAIL>', '<EMAIL>', '<EMAIL>', '<EMAIL>', 
 '<EMAIL>', '<EMAIL>', '<EMAIL>']
len(names)
weekly_schedule(names, 5)<jupyter_output>day                        names
0  Day 0    <EMAIL>
0  Day 0          <EMAIL>
0  Day 0           <EMAIL>
0  Day 0          <EMAIL>
0  Day 0        <EMAIL>
1  Day 1  <EMAIL>
1  Day 1    <EMAIL>
1  Day 1     <EMAIL>
1  Day 1       <EMAIL>
1  Day 1       <EMAIL>
{'fraction_non_alphanumeric': 0.12666666666666668, 'fraction_numerical': 0.014444444444444444, 'mean_word_length': 2.4634615384615386, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '608302', 'license': 'MIT', 'n_tokens_mistral': 591, 'n_tokens_neox': 571, 'n_words': 148, 'path': 'contributions/patrick_ojunde/10Academy_schedule.ipynb', 'repo_name': 'Patrick5455/QuickStart2020', 'size': '2104'}