Skip to content

mikalainis/hackWithPython

 
 

Repository files navigation

logo

Introduction

This repository contains a collection of materials for teaching/learning Python 3 (3.5+).

Requirements

If you can not access Google Colab Notebook, you can still follow the web based materials. However, you should be able to use Colab Notebook in order to complete the exercises.

Usage

  1. Clone or download this repository onto your Google Drive.
  2. Open Google colab notebooks on Google Dirve via Chrome browser.
  3. Google Colab session will open in the browser and you can start navigating through the materials.

Contributing

See contributing guide.

The Zen Of Python

import this

The Zen of Python, by Tim Peters

  • Beautiful is better than ugly.
  • Explicit is better than implicit.
  • Simple is better than complex.
  • Complex is better than complicated.
  • Flat is better than nested.
  • Sparse is better than dense.
  • Readability counts.
  • Special cases aren't special enough to break the rules.
  • Although practicality beats purity.
  • Errors should never pass silently.
  • Unless explicitly silenced.
  • In the face of ambiguity, refuse the temptation to guess.
  • There should be one-- and preferably only one --obvious way to do it.
  • Although that way may not be obvious at first unless you're Dutch.
  • Now is better than never.
  • Although never is often better than right now.
  • If the implementation is hard to explain, it's a bad idea.
  • If the implementation is easy to explain, it may be a good idea.
  • Namespaces are one honking great idea -- let's do more of those!

Beginner

  1. Strings [notebook] [exercise]
  2. Numbers [notebook] [exercise]
  3. Conditionals [notebook] [exercise]
  4. Lists [notebook] [exercise]
  5. Dictionaries [notebook] [exercise]
  6. For loops [notebook] [exercise]
  7. Functions [notebook] [exercise]
  8. Testing with pytest - part 1 [notebook] [exercise]
  9. Recap exercise 1 [exercise]
  10. File I\O [notebook] [exercise]
  11. Classes [notebook] [exercise]
  12. Exceptions [notebook] [exercise]
  13. Modules and packages [notebook]
  14. Debugging [notebook] [exercise]
  15. Goodies of the Standard Library - part 1 [notebook] [exercise]
  16. Testing with pytest - part 2 [notebook] [exercise]
  17. Virtual environment [notebook]
  18. Project structure [notebook]
  19. Recap exercise 2 [exercise]

Intermediate

Idiomatic Python

Python is a powerful language which contains many features not presented in most other programming languages. Idiomatic section will cover some of these Pythonic features in detail. These materials are especially useful for people with background in other programming languages.

  1. Idiomatic loops [notebook]
  2. Idiomatic dictionaries [notebook]
  3. Idiomatic Python - miscellaneous part 1 [notebook]
  4. Idiomatic Python - miscellaneous part 2 [notebook]
  5. Idiomatic Python exercise [exercise]

Step up your pytest game

  1. Efficient use of fixtures [notebook]
  2. Other tips and tricks

Best practices

A list of best development practices for Python projects. Most of the practices listed here are also applicable for other languages, however the presented tooling focuses mainly on Python.

  1. Best practices [notebook]

General topics

  1. Goodies of the Standard Library - part 2 [notebook] [exercise]

Backlog

  • Sets
  • Generators
  • Decorators
  • Context managers
  • Playing with attributes
  • *, *args, **kwargs
  • Command line arguments with click
  • OOP - inheritance
  • OOP - Abstract Base Classes
  • OOP - attrs
  • Testing with mocks
  • Structuring your tests

Use cases

Playing with the web

  • requests
  • testing requests with responses
  • beautifulsoup4
  • selenium

Communicating with databases

  • SQLAlchemy

Working with documents

  • excel
    • openpyxl
  • pdf
    • pdfrw / PyPDF2

About

Jupyter notebooks for teaching/learning Python 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%