The readings for Wednesday, March 1 are:
Given the following Python script,
#!/usr/bin/env python2.7 import sys results =  for number in sys.stdin: number = number.strip() if int(number) % 2 == 0: results.append(number) print ' '.join(results)
B. Create a third version of this script called
evens.py script in one line using list
Note, both scripts should look like this:
#!/usr/bin/env python2.7 import sys print ' '.join(...)
... is where your one line should go.
This script should look like this:
#!/usr/bin/env python2.7 import sys def evens(stream): ... print ' '.join(evens(sys.stdin))
... is where your generator code should go.
To test your scripts, you should be able to reproduce the following output:
$ seq 1 10 | ./evens_fp.py 2 4 6 8 10 $ seq 1 10 | ./evens_lc.py 2 4 6 8 10 $ seq 1 10 | ./evens_gr.py 2 4 6 8 10
reading06/README.md file, answer the following questions:
A. What problem is MapReduce trying to solve?
B. Describe the three phases of a typical MapReduce workflow.
If you have any questions, comments, or concerns regarding the course, please provide your feedback at the end of your response.
To submit your assignment, please commit your work to the
in your assignments GitLab repository. Your
reading06 folder should
only contain the following files: