def tracks(coursedir): """ coursedir is a CourseDir object that points at the root directory of the filesystem tree that holds notebooks """ return [ track_by_directory( coursedir, name="mooc", description='Compléments du MOOC Python 3', notebooks=( notebooks_by_pattern(coursedir, f"w?/w*-s*-[cx]*.ipynb") + notebooks_by_pattern(coursedir, f"w?/w*-s*-[cx]*.py")), directory_labels=WEEK_NAMES), track_by_directory( coursedir, name="exos", description='Exercices extraits du MOOC Python 3', notebooks=(notebooks_by_pattern(coursedir, f"w?/w*-s*-x*.ipynb") + notebooks_by_pattern(coursedir, f"w?/w*-s*-x*.py")), directory_labels=WEEK_NAMES) ]
def tracks(coursedir): return [ Track( coursedir, name="HTML and CSS basics", sections=[ Section(name="the ecosystem", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/0*.md")), Section(name="html basics", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/1*.md")), ], description="Web frontend introduction"), Track( coursedir, name="CSS layout and intro to JS", sections=[ Section(name="advanced layout", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/2*.md")), Section(name="intro to JS", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/3*.md")), ], description="CSS layout - JS intro"), ]
def tracks(coursedir): return [ Track( coursedir, name="D1 : HTML - CSS basics", sections=[ Section(name="introduction", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/0*.md")), Section(name="HTML basics", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/1*.md")), ], description="n/a"), Track( coursedir, name="D2 : CSS layout - JS intro", sections=[ Section(name="advanced layout", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/2*.md")), Section(name="intro to JS", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/3*.md")), ], description="n/a"), Track( coursedir, name="D3 : more on JavaScript", sections=[ Section(name="JS unleashed", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/4*.md")), Section(name="very popular tools", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/5*.md")), ], description="n/a"), Track( coursedir, name="Optional content", sections=[ Section(name="optional tools", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/6*.md")), Section(name="course requirements", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "notebooks/7*.md")), ], description="n/a"), ]
def tracks(coursedir): """ coursedir is a CourseDir object that points at the root directory of the filesystem tree that holds notebooks result is a list of Track instances """ # 1 single track track_specs = [ ('primer', 'Python primer', [ ('primer', '[0-9]*.ipynb'), ]), ] return [ Track(coursedir, [ Section(coursedir=coursedir, name=section_name, notebooks=notebooks_by_pattern(coursedir, f"notebooks/{pattern}")) for section_name, pattern in section_specs ], name=track_name, description=track_description) for track_name, track_description, section_specs in track_specs ]
def _exo_track(coursedir): return track_by_directory( coursedir, name="exos", description='Exercices extraits du MOOC Python 3', notebooks=notebooks_by_pattern(coursedir, "w?/w*-s*-x*.md"), directory_labels=WEEK_NAMES)
def tracks(coursedir): """ coursedir is a CourseDir object that points at the root directory of the filesystem tree that holds notebooks result is a list of Track instances """ track_specs = [ ('calcul parallèle', 'introduction au calcul parallèle', 'parallel', [ ('intro', 'notebooks/0[01]*.md'), ('mémoire distribuée', 'notebooks/02*.md'), ('mémoire partagée', 'notebooks/03*.md'), ]), ] return [ Track(coursedir, [ Section(coursedir=coursedir, name=section_name, notebooks=notebooks_by_pattern(coursedir, pattern)) for section_name, pattern in section_specs ], name=track_name, description=track_description, id=track_id) for (track_name, track_description, track_id, section_specs) in track_specs ]
def tracks(coursedir): """ coursedir is a CourseDir object that points at the root directory of the filesystem tree that holds notebooks result is a list of Track instances """ # define a single track that has sections based on the first 2 digits in the filename # that is to say 7 sections 00 .. 06 section_names = [ "preface", "IPython", "numpy", "pandas", "matplotlib", "machine learning", "appendix", ] default_track = Track( coursedir, [Section(coursedir=coursedir, name=section_name, notebooks=notebooks_by_pattern( coursedir, f"notebooks/{number:02}*.ipynb")) for number, section_name in enumerate(section_names)], name="book", description="complete book contents") return [default_track]
def tracks(coursedir): """ coursedir is a CourseDir object that points at the root directory of the filesystem tree that holds notebooks track is a name that is set by the nbhosting admin, by default it is "course" which would mean the full course, but you can define alternate tracks among the course material result should be a dictionary of trackname -> Track instance """ french_week_names = { 'w1': "ADN et séquences génomiques", 'w2': "gènes et protéines", 'w3': "prédiction des gènes", 'w4': "comparaison de séquences", 'w5': "arbres phylogénétiques", } english_week_names = { 'w1': "genomic texts", 'w2': "genes & proteins", 'w3': "gene prediction", 'w4': "sequence comparison", 'w5': "phylogenetic trees", } # the naming scheme is based on the language return [ track_by_directory( coursedir, name="français", description='Compléments du MOOC "Bioinformatique : Algorithmes et Génomes"', notebooks=notebooks_by_pattern(coursedir, f"w?/fr-w?-s*.ipynb"), directory_labels=french_week_names), track_by_directory( coursedir, name="english", description='Complements for MOOC "Bioinformatics: Genomes and Algorithms"', notebooks=notebooks_by_pattern(coursedir, f"w?/en-w?-s*.ipynb"), directory_labels=english_week_names), ]
def _course_track(coursedir): # a more elaborate sectioning, still based # on the filesystem structure but with better names return track_by_directory(coursedir, name="mooc", description='Compléments du MOOC Python 3', notebooks=notebooks_by_pattern( coursedir, f"w?/w*-s*-[cx]*.md"), directory_labels=WEEK_NAMES)
def tracks(coursedir): """ coursedir is a CourseDir object that points at the root directory of the filesystem tree that holds notebooks result is a list of Track instances """ track_specs = [ ('python', 'survol langage', [ ('intro', 'notebooks/0-[0-9]*.ipynb'), ('python', 'notebooks/1-[0-9]*.ipynb'), ]), ( 'numpy', 'numpy', # dropping 2-10 on structured arrays # [ ('numpy', 'notebooks/2-[0-9]*.ipynb'), [ ('numpy', 'notebooks/2-0*.ipynb'), ]), ('dataviz & pandas', 'dataviz & pandas', [ ('dataviz & pandas', 'notebooks/3-[0-9]*.ipynb'), ]), ('évaluation', 'évaluation', [ ('évaluation', 'notebooks/4-[0-9]*.ipynb'), ]) ] return [ Track(coursedir, [ Section(coursedir=coursedir, name=section_name, notebooks=notebooks_by_pattern(coursedir, pattern)) for section_name, pattern in section_specs ], name=track_name, description=track_description) for track_name, track_description, section_specs in track_specs ]
def tracks(coursedir): """ coursedir is a CourseDir object that points at the root directory of the filesystem tree that holds notebooks result is a list of Track instances """ # 2 tracks # 'intro' : 2 sections 1* et 2* # 'approfondissement' : 3* track_specs = [ ('Session 1', 'utilisation en local', [ ('intro', '1-*.ipynb'), ('git en local', '2-*.ipynb'), ]), ('Session 2', 'synchros et fonctions avancées', [ ('git distribué', '3-*.ipynb'), ('avancé', '4-*.ipynb'), ]), ] return [ Track(coursedir, [ Section(coursedir=coursedir, name=section_name, notebooks=notebooks_by_pattern(coursedir, f"notebooks/{pattern}")) for section_name, pattern in section_specs ], name=track_name, description=track_description) for track_name, track_description, section_specs in track_specs ]
def tracks(coursedir): return [ Track( coursedir, name="S1", sections=[ Section(name="cours 1/9", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "cours1.ipynb")), Section(name="cours 2/9", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "cours2.ipynb")), Section(name="cours 3/9", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "cours3.ipynb")), Section(name="cours 4/9", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "cours4.ipynb")), Section(name="cours 5/9", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "cours5.ipynb")), Section(name="cours 6/9", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "cours6.ipynb")), Section(name="cours 7/9", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "cours7.ipynb")), Section( name="cours 8/9", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "cours8.py") + notebooks_by_pattern(coursedir, "sujet-evaluation.md")), Section( name="cours 9/9", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "cours9.py") + notebooks_by_pattern(coursedir, "sujet-evaluation.md")), ], description="le cours de Python avancé"), Track( coursedir, name="S2", sections=[ Section(name="extra 1/2", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "extra1.py")), Section(name="extra 2/2", coursedir=coursedir, notebooks=notebooks_by_pattern(coursedir, "extra2.py")), ], description="quelques extras pendant le S2"), ]