CIS4930 Final Exam Topics

advertisement
CIS4930 Final Exam Topics
The Final Exam will be comprehensive and consist of multiple choice and short
answer questions. There will be a lot of shorter questions worth only a few points
as opposed to a few larger questions worth a lot of points.
I’m not so concerned that you know syntax (you can always just look up the
documentation), I want you to have an overall understanding of the basics of
Python and what tools/libraries we’ve covered and basically how they’re used.
No code writing!!!! Weee!
There will be code questions where you have to describe what is happening or
what the output is.





Study Midterm! Some questions may reappear…
Python Basics
o Strong, dynamic typing
o Built-in types – what are they? How are they used?
o Know common sequence operations.
o Modules
o Basic list comprehensions
o Functional programming functions: filter, map, reduce
o Positional and keywords arguments
o Raw_input vs input
o Basic file manipulation
o Basics of exceptions and be able to write a basic custom exception.
o LEGB rule
o What do decorators do?
o Classes, Inheritance, and Multiple inheritance
o Iterators and generators
Standard Library
o Know mentioned string functions (no templating or formatting necessary).
o NO regular expressions
o Know mentioned os, time, and sys functions
o Understand copy vs deepcopy
o Know mentioned math/cmath functions
o Know mentioned itertools functions
Virtualenv
o What are the advantages of using virtual environments for a python application?
o What are the steps to activating, setting up, and deactivating a virtualenv?
o Why is it advantageous to distribute a requirements.txt with your application?
Web Development
o
o







What is WSGI?
What is Gunicorn and what is Flask? Briefly describe the roles they play in the
deployment of a web application. How can they be used with a non-WSGI
component like nginx?
Networking
o What is the basic process for creating a TCP server or client using the socket
module?
GUI Programming
o PyQt and its main classes: QtCore and QtGui
o Understand basic code in first GUI lecture slides.
o What is a MainWindow widget and how is it structured?
o May give you PyQt code and have you draw/describe interface.
o Know basics of box and grid layout managers.
Serialization
o What is serialization and when might it be used? Give an example.
o What are pickle and cpickle?
o What can pickle serialize?
o Advantages/Disadvantages of pickle over other methods.
o Know basic usage of pickle’s core funcs: dump, dumps, load, loads.
o What is JSON? Advantages over pickle?
Databases
o Database specific outlined in PEP249  what’s the advantage of this?
o What is the module interface required to have available?
o What methods of a connection object are required to be available?
o What methods of a cursor object are required to be available?
o Understand the actions in the db_interface.py example.
NumPy and SciPy
o Explain what NumPy and SciPy are and give some examples of the functionality they
implement.
o Know how to use SciPy’s integrate.quad() and integrate.trapz().
o Understand ndarray type in NumPy.
o Know how to use NumPy’s arange() and linspace().
o Know what Matplotlib is and the basic elements: figures, plots, axes, etc.
o Know the basics of Matplotlib’s pyplot: plot(), axis(), show()
Optimizing Python
o Explain Cython and how it improves Python code speed.
o Explain Numba and how it improves Python code speed.
o Is it always a good idea to optimize Python? Why/why not?
Distributing Python Applications
o What is setuptools and what does the setup.py file do?
o What is the basic process for distributing a library over PyPI?
o Explain the difficulties of creating an “executable” for a Python application.
o What is freezing? What’s the major disadvantage?
o What is Nuitka?


o What factors influence the method of distribution?
Sphinx
o What is Sphinx and reStructuredText?
o How does Sphinx’s autodoc feature work?
Python and Redis
o What is Redis?
o What are the advantages/disadvantages of Redis over on-disk databases?
o In abstract terms, how might Redis be used as a queue or cache for a Python
application?
Download