Diving Into the Deluge of Data :: Lab 1 :: Workflow and the Toolchain

Lab 1: Workflow and Toolchain

This labs focuses on the tools, techniques, and workflows used by Python programmers and programmers in general. We will adopt most of these best practices and use them for lab distribution, comments, and feedback

Step 0: Lab Preparation

  • Sign up for a GitHub account. Please thoughtfully choose a username so that I can reasonably infer who you are from it. Make sure to choose the free plan (it's the default) and don't set up an organization. After you've registered, please send me an email with your GitHub username. I will add you to the GitHub Williams CS organization and to the CS 135 Students team.
  • Read a virtualenv tutorial up to Why not virtualenv.
  • Read a bit about pip and virtualenv

Step 1: Forking

Navigate to the Lab 1 GitHub repository. Fork the repository by using the Fork button in the top right-hand corner. This copies the repository to your GitHub account.

Step 2: Cloning

You should now have a copy of the repository in your own GitHub account. Now clone the repository to your local disk using the following steps.

Step 3: virtualenv

virtualenv is a program that isolates collections of python libraries for a particular programming project. It also allows you to associate a specific python verion with a project.

Step 4: pip

Use pip to install the textblob package, which provides methods for spelling correction.

Step 5: Text Editors

There are many good text editors. People swear by emacs and vim. In a pinch, you can also use nano. Currently, many people like sublime. Today we will use Atom, but in the future feel free to use whatever you want.

Step 6: Python

Opening the rain.py file in the text editor should reveal the following code.

      '''
      Use TextBlog spelling correction on the sentence 'the raain in sspain
      stayss mainly on the plane'
      '''

      # make the textblog package available
      import textblob
      
      # our phrase to correct
      sentence = 'the raain in sspain stayss mainly on the plane'

      # create an instance of TextBlog using our sentence

      blog = textblob.TextBlob(sentence)

      # correct the spelling errors
      corrected = blog.correct()

      print(corrected)
    

Step 7: Submitting Code

We will use Git and GitHub for submitting lab assignments.