Skip to content

changetocoding/PyLoreKelly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python & Data Science Teaching

https://thebackhomeproject.org/

For Biz people

Excecutives training course on data science: link
McKinsey Report: link
Data science for ordinary people: link
Interviews with Datascientists: link

Beginner Courses

https://www.udacity.com/course/introduction-to-python--ud1110
https://www.learnpython.org/en/

Data Scientist Courses

https://classroom.udacity.com/courses/ud170
http://cs109.github.io/2015/pages/videos.html
Pathway: https://trello.com/b/rbpEfMld/data-science
Pathway II: https://github.com/ujjwalkarn/DataSciencePython

Advanced

Data science tips link
Online REPL link
Advanced topics: link

Other useful learning resources:

Python koans - https://github.com/gregmalcolm/python_koans
Code wars - https://www.codewars.com/?language=python

Lesson Plan

Each lesson review last lesson
Q's from HW/Check
Cover lesson
Explain HW

Requirements

Text editor: Visual studio code/ notepad ++ / sublime text IDE: pycharm


Python 101

Lesson 1: Introduction to python

Overview of different programming languages
Why python popular
Installed pycharm, python, Notepad++
How to run python - Interpreter sandbox, command line & in pycharm
Hello world
Setting variables
If and for loops
Pathway for becoming a data scientist link
HW: link From begining until & including Loops (8 chpts)

Lesson 2: Grouping things

Getting help: -Documentation -Stackoverflow

Dictionaries
Lists
Sets
Tuples

HW: https://classroom.udacity.com/courses/ud1110 Lesson 1, 2 & 3 (Why Python, Data Types & Operators, Data Structures. Apx 6 hours)

Lesson 3: Revision of what we've learned

HW https://classroom.udacity.com/courses/ud1110 Lesson 4 ( Covers Dictionaries, if, for, while loops, enumerate, zip)

HW Fizz Buzz -Fun drinking game and teaching tool for division for kids.
Count from 1 to 100. For each number output "This is X out of 100"
Any number divisible by three is replaced by the word fizz and any number divisible by five by the word buzz. Numbers divisible by 3 and 5 become fizz buzz.

Sample output:

This is 1 out of 100
This is 2 out of 100
Fizz
This is 4 out of 100
Buzz
Fizz
This is 7 out of 100
...

Additional Homework: https://realpython.com/python-dicts/

Lesson 4: Functions & Recursion

Functions We introduced Git here

HW: https://classroom.udacity.com/courses/ud1110 Lesson 5 (Control Flow, Functions). Control flow is revision of lesson 1 (Functions, variable scope, default arguments, lamda functions) HW: Maths as functions: https://www.codewars.com/kata/525f3eda17c7cd9f9e000b39 How old will I be: https://www.codewars.com/kata/5761a717780f8950ce001473 Optional HW: Fibonnaci numbers? Seems a bit hard

Additional more in depth about lamdas https://realpython.com/python-lambda/ additional more in depth about functions: https://realpython.com/defining-your-own-python-function/

Lesson 5: Objects

Objects We start using pycharm from here

Tutorial 1 Tutorial 2 HW Revision: Sets, Dictionaries, Functions

HW: Classes HW: Phonebook:

Lesson 6: Exceptions, Reading/writing files

Exception Handling
Read/write to file Modules

HW: https://classroom.udacity.com/courses/ud1110 - Lesson 6 Scripting (Sections 8 - 21)

Lesson 7: Iterators, Generators and List comprehension

Generators https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do

HW: https://www.learnpython.org/en/Generators
HW: https://www.learnpython.org/en/List_Comprehensions
HW: https://classroom.udacity.com/courses/ud1110 Lesson 7 Advanced Topics

Lesson 8: Modules, importing libaries and revision of objects

Modules. We will cover modules and importing other python files.
We will then cover external libaries and how to import them. Creating a webserver with bottle will be used as a demonstration Modules Offical Docs

HW: https://classroom.udacity.com/courses/ud1110 - Lesson 6 Scripting (Sections 22 to end) HW: Create a webserver using bottle. As a UI for two of the other hw assignments

Lesson 9: Unit testing & Git revision

Intro to unit testing & why
TDD We will review git here.
https://realpython.com/pytest-python-testing/

HW: (tbc)

Review Lesson.

Review topics covered
Q&A
Plus 2 week assignment. Or think should spend next 3 weeks just solving problems to solidify knowledge HW: Assignment (own project?)


Data Science

Prior to the lesson anaconda should be installed.

Lesson Intro to Numpy & Pandas

https://www.learnpython.org/en/Numpy_Arrays & following chapter
https://www.learnpython.org/en/Pandas_Basics https://github.com/realpython/materials/blob/master/pandas-intro/pandas_intro.ipynb

Lesson Numpy

https://sites.engineering.ucsb.edu/~shell/che210d/numpy.pdf

Lesson Pandas

https://pandas.pydata.org/pandas-docs/stable/getting_started/10min.html

Lesson Matplotlib

Lesson Importing/Writing data from Excel or CSV

https://realpython.com/python-csv/

Lesson Importing/Writing data to a database

Lesson Parsing a website

Leson Jupyter and IPython.

Dash - Dashboards

Dash: https://towardsdatascience.com/how-to-build-a-complex-reporting-dashboard-using-dash-and-plotl-4f4257c18a7f

Virtual Environments

Xlwings

Ex: Make a button in excel to either call a script or call an executable that you've made with pyinstaller. Use to scrape up all their data (or other data) and do all the calculations in Python and then output back to the same spreadsheet

PyInstaller

Project: Data sciencing my budget!

  1. Parse html to get spending
  2. Categorise the spending
  3. Predict future spend
  4. Insights from the data

Other: Dont think necessary

-Multiple function arguments
-Regular Expressions
-Serialisation
-Partial functions
-Closures
-Mulithreading
-Map reduce https://www.learnpython.org/en/Map,_Filter,_Reduce

Other to cover over course:

-Mutable vs immuatable.
-Pass by ref/ pass by value and what python does
-PEP8 & clean code in python
-Duck typing
-Debugging
-Default arguments on functions (and gottcha with mutable ones)

Projects

Budget tracker

Enter money for the month
Enter name, cost, category.

User can query using any of these questions "Report?": list total spent on each category "Am I pennywise or pound foolish?" Returns Yes/No "How much money do I have?" Returns money left

Address book

Create Address class

Blackjack:

https://programmingbydoing.com/a/project-blackjack.html

Movie title generator

https://programmingbydoing.com/a/movie-title-gen.html

Tic tac toe

https://programmingbydoing.com/a/tic-tac-toe-oop.html

The bank excerise

Temporal data store

Scrape website

Export to excel

Analyse my spend

Analyse & predict LFB spend

https://data.london.gov.uk/dataset/lfb-payments-over-f250-2019-20

Analyse Government spend

https://catalog.data.gov/dataset/program-budget-operating-budget-vs-expense-raw-data

Financial distress prediction

https://www.kaggle.com/shebrahimi/financial-distress