human
I am working on the file "Lectures/Lecture5-MapReduce/MapReduce Intro.ipynb".
The first task is:
MapReduce using MRJOB
Find documentation for MRJOB at https://pythonhosted.org/mrjob/
A framework that allows you to do mapreduce jobs without HADOOP but will run the same jobs in an hadoop environment.
( DUMBO and Pydoop give you lower level access to HADOOP)
Before using it for the first time install this package using : <code> pip install mrjob </code> 
If that does not work use the alternatives in provided on https://pythonhosted.org/mrjob/guides/quickstart.html#installation
%%writefile myfile.py
write/save cell contents into myfile.py (use -a to append). Another alias: %%file myfile.py
%run myfile.py
run myfile.py and output results in the current cell
%load myfile.py
load "import" myfile.py into the current cell
Can you write Python code for it?
 ... What is a Python code to find documentation for MRJOB at https://pythonhosted?
assistant
#Here is Python code to find documentation for MRJOB at https://pythonhosted.

# %load code/MRWordFrequencyCount.py
from mrjob.job import MRJob

class MRWordFrequencyCount(MRJob):
    
    def mapper(self, _ , line):
        yield "chars", len(line)
        yield "words", len(line.split())
        yield "lines", 1
        
    def reducer(self, key, values):
        yield key, sum(values)
        
if __name__ == '__main__':
    MRWordFrequencyCount.run()

%run code/MRWordFrequencyCount.py  ./.mrjob.conf data/canterbury/alice29.txt

# MRJOB Word count function

# %load code\MRWordFreqCount.py
from mrjob.job import MRJob
import re

WORD_RE = re.compile(r"[\w']+")

class MRWordFreqCount(MRJob):

    def mapper(self, _, line):
        for word in WORD_RE.findall(line):
            yield word.lower(), 1

    def combiner(self, word, counts):
        yield word, sum(counts)

    def reducer(self, word, counts):
        yield word, sum(counts)

if __name__ == '__main__':
    MRWordFreqCount.run()

%run code/MRWordFreqCount.py data/canterbury/alice29.txt

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from __future__ import print_function

import sys
from operator import add

from pyspark import SparkContext

if __name__ == "__main__":
    if len(sys.argv) != 2:
        print("Usage: wordcount <file>", file=sys.stderr)
        exit(-1)
    sc =...