Skip to content

Latest commit

 

History

History
147 lines (111 loc) · 5.62 KB

course_summary.md

File metadata and controls

147 lines (111 loc) · 5.62 KB

Course Summary

Note that the course summary will be updated throughout the course.

Block 1

Getting started

Goals

  1. navigate in the shell application: cmd or terminal
  2. have python and anaconda installed, all required packages installed
  3. now how to open and close, Python console, IPython console, jupyter notebook

Content

Shell: learn shell commands like ls, cd, pwd, mkdir, cp, mv, rm, rm -r, touch, echo, cat Python: download and installing anaconda, open python console, close it, install packages using anaconda IPython: open console, getting help, advantage compared to python console Jupyter notebook: open it, create a notebook, write code in cells, write markdown in cells, execute and create cells, delete cells, restart the kernel, close the notebook, stop the notebook server

Resources

Exercises

Basics of python

Goals

  1. Know different ways to write and execute python code: console, script, jupyter notebook
  2. Be familiar with python variables and data types, know how to access the documentation
  3. Be familiar with booleans, dictionaries, if-else statements, loops, indexing, slicing, mutability, generators, iterators

Content

  • python data types: boolean, int float, string, list, dict, tuple
  • operators: +, -, /, *, **, %
  • methods associated with data types, e.g., essential string methods, essential list methods.
  • if-elif-else statements, conditional variable assignment, in operator
  • list and tuple indexing, dict indexing, mutability vs. immutability,
  • while loops, for loops, concept of iterator and generator, using enumerate, and zip, combining them.
  • iterating through dictionaries
  • list comprehension, conditional list comprehension

Resources

Exercises

NumPy

Goals

  1. What is a Numpy array, and why to use them? (motivation)
  2. Importing and Generating Data
  3. Getting insight about the Data (type, dimension, size, etc.)
  4. Manipulating the array (arithmetic operations, transpose, etc.)
  5. Slicing and Masking
  6. Combining arrays
  7. Saving data

Content

  • Import data:
    • np.load()
    • np.loadtxt()
    • np.genfromtxt()
  • Creating Numpy arrays
    • np.zeros()
    • np.ones()
    • np.random.random()
    • np.empty()
    • np.full()
    • np.full_like()
    • np.eye()
    • np.identity()
  • Data Inspection (assuming we have numpy a array object called data)
    • data.dtype
    • data.ndim
    • data.shape
    • data.size
    • data.strides
    • data.min()
    • data.max()
    • data.mean()
    • data.std()
    • data.cumsum()
  • Data Transformation (assuming we have a numpy array object called data)
    • data.T
    • data.reshape()
    • data.resize()
    • np.expand_dims()
    • np.ravel()
    • np.add(), np.subtract(), np.multiply(), np.divide(), np.remainder()
    • np.exp(), np.log()
    • Masking using list (or array) of True and False values
  • Combining multiple arrays ans splitting an array
    • np.concatenate()
    • np.append()
    • np.hstack()
    • np.vstack()
    • np.hsplit()
    • np.vsplit()
  • Saving numpy arrays
    • save(): saves data in .npy format
    • savez(): Save several arrays into an uncompressed .npz archive
    • savez_compressed()
    • savetxt()

Resources

Exercises