#!/usr/bin/env python
"""Run problem set.

This script allows to run the handouts. One can either run all problem sets at once or just a
single one. It is enough to provide a substring for the name.

Examples
--------

>> run-handout             Run all handouts set.

>> run-handout -n 01      Run handout 01-causal-graphs.
"""
import os

from auxiliary import parse_arguments
from auxiliary import compile_single
from auxiliary import HANDOUTS_ROOT

if __name__ == "__main__":

    request = parse_arguments("Create handout set")

    os.chdir(HANDOUTS_ROOT)

    for dirname in request:
        os.chdir(dirname)
        if os.path.exists("sources"):
            compile_single("sources", "handout")
        os.chdir("../")
Example #2
0
#!/usr/bin/env python
"""Run slide.

This script allows to run the lecture slides. One can either run all slides at once or just a
single lecture. It is enough to provide a substring for the name.

Examples
--------

>> run-slide             Run all slides.

>> run-slide -n 01_      Run slide 01_introduction.
"""
import os

from auxiliary import parse_arguments
from auxiliary import compile_single
from auxiliary import LECTURES_ROOT

if __name__ == "__main__":

    request = parse_arguments("Create lecture slides")

    os.chdir(LECTURES_ROOT)

    for dirname in request:
        os.chdir(dirname)
        if os.path.exists("slides"):
            compile_single("slides", "slides")
        os.chdir("../")
#!/usr/bin/env python
"""Run problem set.

This script allows to run the problem set. One can either run all problem sets at once or just a
single one. It is enough to provide a substring for the name.

Examples
--------

>> run-problem             Run all problem set.

>> run-problem -n 01      Run slide 01-potential-outcome-model.
"""
import os

from auxiliary import PROBLEM_SETS_ROOT
from auxiliary import parse_arguments
from auxiliary import compile_single

if __name__ == "__main__":

    request = parse_arguments("Create problem set")

    os.chdir(PROBLEM_SETS_ROOT)

    for dirname in request:
        os.chdir(dirname)
        if os.path.exists("sources"):
            compile_single("sources", "problem-set")
        os.chdir("../")
Example #4
0
#!/usr/bin/env python
"""Run slide.

This script allows to run the lecture slides. One can either run all slides at once or just a
single lecture. It is enough to provide a substring for the name.

Examples
--------

>> run-slide             Run all slides.

>> run-slide -n 01_      Run slide 01_introduction.
"""
import os

from auxiliary import parse_arguments
from auxiliary import compile_single
from auxiliary import LECTURES_ROOT

if __name__ == "__main__":

    request = parse_arguments('Create lecture slides')

    os.chdir(LECTURES_ROOT)

    for dirname in request:
        os.chdir(dirname)
        if os.path.exists('slides'):
            compile_single('slides', "slides")
        os.chdir('../')