Python for Everybody (py4e.com): Recent Episodes

Dr. Charles Russell Severance

These are the lectures to supplement the textbook 'Python for Everybody: Exploring Information' and its associated web site py4e.com

View Details

Explore the nature of programming and how programming a computer is different than using a computer.

View Details

In this lecture we learn abut how the computer processes and stores programs. We learn about the CPU, Memory, Storage and Input / Output devices are brought together to write a program.

View Details

We look at how writing programs is just another form of communication. Instead of communicating with another person, we are communicating our ideas to a computer.

View Details

We look at the basics of the Python language and how we write code in Python to communicate sequential steps, conditional steps and repeated steps.

View Details

Installing Python 3 on a Macintosh

View Details

Code Walkthrough: Hello World

View Details

We look at Python's reserved words, how we name and use variables, why we choose meaningful (mnemonic) variable names and how assignment statements function.

View Details

We look at how we use various numerical and string operations to compute new information and store the new values in variables.

View Details

Code Walkthrough: Exercise 2.2

View Details

Code Walkthrough: Exercise 2.3

View Details

The most basic conditional structure is the if statement where we either execute or skip a segment of code based on the results of a logical expression (i.e. asking a question).

View Details

In this video we look at multi-branch if statements and the try-except concept where we can indicate a group of statements to be executed if something goes wrong with a block of statements.

View Details

Code Walkthrough: Exercise 3.1

View Details

Code Walkthrough: Exercise 3.2

View Details

We look at how code flows into and out of functions as well has how we pass information into functions and get results returned to us.

View Details

We look at how to build our own functions using parameters and arguments as well as how we return results to the code that is calling our functions.

View Details

Code Walkthrough: Exercise 4.6

View Details

We look at how we construct a loop so that it runs as long as we want it to run. We learn about iteration variables and exiting loops with the 'break' and 'continue' statements.

View Details

We learn how to use the 'for' statement in Python to loop through a set of data.

View Details

Loops have a beginning, middle, and end. We look ant how we construct a loop to look at a list of items one at a time so we can compute an overall maximum, minimum or average.

View Details

We continue to look at how to construct loops including how to do something special the first time through the loop. We introduce the idea of 'None' which is a way to indicate that a variable is currently empty.

View Details

Worked Exercise: Exercise 5.1

View Details

We learn how to create string variables and extract portions of the data as well as write simple loops to read through the characters in a string.

View Details

We learn how to extract substrings using slicing, and use the string library to perform common data extraction operations with strings.

View Details

Worked Example: Exercise 6.5

View Details

We look at how text and lines are represented in files, how we open a file and write a loop to read through all the lines in the file.

View Details

We look at patterns for reading and processing the data in files. We learn how to check for nonexistent files, and how we process each line within the file.

View Details

Worked Example: Exercise 7.1

View Details

We learn how to put data into lists, take data out of the list and write simple loops to examine the elements of a list.

View Details

We learn about list slicing, list searching, and using pre-defined functions with lists.

View Details

We learn how to parse strings pull sub-strings out of a string using the split() function.

View Details

Strings, Files, Lists and the Guardian Pattern.

View Details

We compare and contrast how Python lists and dictionaries are structured internally. How we use position to index lists and use keys to index dictionaries.

View Details

We look at how we can use dictionaries to count the frequencies of many things at the same time. We learn how the key and value are related in a dictionary and example the get method to retrieve values from a Python dictionary.

View Details

In this segment we bring everything together, reading a file, parsing the lines, and computing the frequencies of the words in the file. This is an important moment that pulls from everything we have learned so far.

View Details

Worked Exercise: Dictionaries

View Details

We look at the basic syntax and capabilities of Python tuples. We explore the concept of immutability, and we compare tuples to lists and strings.

View Details

We look at how we sort lists, dictionaries, and lists of tuples in Python.

View Details

Worked Example: Sorting Dictionaries

View Details

We look at the syntax of regular expressions and how to use them to search through text data.

View Details

In this segment we learn to pull out data from strings after a regular expression has found a match.

View Details

We look at how some of the string parsing we have done in earlier chapters can be easily done with regular expressions.

View Details

We take a very brief look at how software communicates across the Internet using TCP/IP.

View Details

In this section we look at the HTTP protocol that is used to move documents between web servers and web browsers.

View Details

We write a simple Python program that connects to a web server and retrieves a web document. It is a very simple web browser.

View Details

Worked Example: Sockets

View Details

We explore how characters are encoded when they are transported across the network.

View Details

We write an even simpler Python program to retrieve a web page using the urllib library in Python.

View Details

Worked Example: Using urllib

View Details

Now we will look at the HypertextMarkup Language (HTML) that we retrieved using Python and extract links from that HTML. We are slowly building a very simple web search engine.

View Details

Worked Example: Parsing HTML using the BeautifulSoup library.

View Details

We look at two different ways to format data for transmission across the network including JavaScript Object Notation (JSON) and eXtended Markup Language (XML).

View Details

We look at how data is represented using the XML format.

View Details

Worked Example: XML

View Details

We look at how we can use XML Schema to determine whether or not a particular bit of XML is valid.

View Details

We learn about the popular JSON data format and how to handle the JSON data in Python.

View Details

Worked Example: JSON

View Details

We talk briefly about how applications can be built over time to depend on services provide other applications.

View Details

We explore using a Google API that can be used to query location data and parse the JSON that is returned.

View Details

Worked Example: We access a Google Geocoding API using Python.

View Details

We explore the use of OAuth to communicate sign requests to establish identity when using the Twitter API.

View Details

Worked Example: Twitter and OAuth

View Details

We look at how Python mentions objects in its documentation as well as talk about why philosophy of object-oriented programming. We explore some OOP terms like class, object, instance, method, and attribute.

View Details

We look at how use create a new class in Python and then construct a new object from that class. We also look at some of the Python objects (like strings) that we have been using all along.

View Details

We look at how we as the developers of a Python class can interact with the moment of construction and destruction of various objects created using the class.

View Details

We look at how we can make a new class by inheriting all of the attributes and methods of a parent class and then extend the new class with additional attributes and methods.

View Details

We look at the history of database systems, learn the terminology of database systems, and review some of the common database systems that are in use.

View Details

We learn about how we can use Structured Query Language (SQL) to insert (create), read, update, and delete data in a single database table.

View Details

We retrieve and store Twotter data in a database.

View Details

We look at how we can take the various data elements that will be modeled in an application and distribute them across several tables efficiently. We learn about the basic rules of database design.

View Details

We look at primary keys, logical keys and foreign keys. We look at how foreign keys are represented in the database.

View Details

We look at how we map a logical database model to a physical database model by adding columns and constraints to model the table-to-table relationships.

View Details

We look at how to reconstruct complete views of the data when data is properly distributed across multiple tables and connected via foreign keys. We learn the JOIN operation and ON clause in SQL.

View Details

We work through a track data example with four tables.

View Details

We look at how to build a connector table to represent many-to-many relationships such as students and courses in database tables. We also learn about composite primary keys.

View Details

We extend the Twitter example to represent friends using Many-to-Many relationships.

View Details

In this assignment we make use of the Google GeoCoding API to look up addresses, store the data in a database and then use Google Maps to visualize the data.

View Details

Worked Example: Retrieving Geocoded Data

View Details

We build a web crawler that retrieves web pages and links from those pages an copies the pages into the database. Once we have retrieved our web data we run a simple Page Rank algorithm on the data and visualize the results.

View Details

Worked Example: A Web Crawler

View Details

Worked Example: Running PageRank

View Details

Worked Example: Visualizing PageRank

View Details

We end where we started, processing email data. Except that this time it is a lot (nearly 1GB) of email data.

View Details

Worked Example: Retrieving Email Data

View Details

Worked Example: Cleaning and Modelling Mail Data

View Details

Worked Example: Visualizing Mail Data