Advanced Python (Fall 2017): Difference between revisions

From ICO wiki
Jump to navigationJump to search
Eroman (talk | contribs)
No edit summary
Eroman (talk | contribs)
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 25: Line 25:
=== What python version are we using? ===
=== What python version are we using? ===


Both 2 and 3. Our code should work on both versions.
Both 2 and 3. Our code should work on both versions. Unless you are using asyncio, which can only support python 3.
 
`
== Grading ==
== Grading ==


The class is pass/faile, and passing will depend on a final project.
The class is pass/fail, and passing will depend on a final project.


=== Requirements ===
=== Requirements ===
Line 35: Line 35:
* Proper version control. Small commits, with relevant commit messages.
* Proper version control. Small commits, with relevant commit messages.
* It has a relevant unit test
* It has a relevant unit test
* It uses an automated test runner
* It runs on python 2 and 3
* It runs on python 2 and 3
* It is in the form of a python package
* It has a README that explains how to run it.
* It has a robust README
* I must approve the project idea
* I must approve the project idea


Line 45: Line 43:
A project idea must be picked by the middle class (8th class). I will approve the project idea or suggest improvements to the idea. If you do not submit your idea, then one will be given to you. You may change your project idea with my approval.
A project idea must be picked by the middle class (8th class). I will approve the project idea or suggest improvements to the idea. If you do not submit your idea, then one will be given to you. You may change your project idea with my approval.


The project deadline with be determined.
The project deadline will be Monday January 15, 2018.
 
=== Don't have a project idea? ===
 
You may do the following task. You submit it like a project and will follow the same requirements. So it must have a relevant unittest, and a readme, and be in version control (i.e. github, bitbucket).
 
Write a script that takes the following CSV (https://blockchain.info/charts/market-price) and can tell the user the following information:
 
* What was the greatest percent increase over the previous day, and what day was it?
* What was the greatest percent decrease over the previous day, and what day was it?
* What is the highest price in the the data, and what day was it?


It should be clear how to get the the script to use the csv file by path in the commandline
For a unittest, make sure there is a function that can calculate the desired values, and you can test that function with example data as inputs.


Here is how to find biggest changes between values in a series
https://gist.github.com/anonymous/ed315c65da92fd685a9668c74402c7fc


== Lecture Notes ==
== Lecture Notes ==
Line 53: Line 65:


The lecture videos for the Wednesday 12:00-13:30 class is here:
The lecture videos for the Wednesday 12:00-13:30 class is here:
https://echo360.org.uk/section/c55c42d4-ecbb-4a3a-8508-6c7d66577044/home
https://echo360.org.uk/section/18f50e3b-dd4d-4f8d-ab90-d20b5b0886d7/public


The lecture videos for the Friday 16:15-19:20 class is here:
The lecture videos for the Friday 16:15-19:20 class is here:
https://echo360.org.uk/section/e8d9bf77-53ea-467a-b31b-7afc0352bd00/home
https://echo360.org.uk/section/850df2db-0c72-4c75-b768-c2f511a65e9f/public


=== Lecture 1 ===
=== Lecture 1 ===
Line 82: Line 94:
https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture4
https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture4


=== Lecture 5
=== Lecture 5 ===


Introduction to coroutines, event driven programming, streams
Introduction to coroutines, event driven programming, streams


https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture5
https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture5
=== Lecture 6 ===
Concurrency
https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture6
=== Lecture 7 ===
Defining datatypes
https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture7
=== Lectures 8 & 9 ===
Django
Knowledge of Django is only useful if you are using Django.
Here is the code I made with my lecture: https://github.com/evrom/django-example-for-class
Here is a good tutorial to start with django: https://tutorial.djangogirls.org/en/django/
=== Lecture 10 ===
Binary, Hex, and Base64 with CryptoPals
https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture10

Latest revision as of 13:53, 11 January 2018

Advanced Python

Contact

My email is eroman@itcollege.ee

Frequently Asked Questions

What should I know already?

  • How to use the unix shell
  • How to install a package with pip
  • Write and use pythons functions
  • Use lists, strings, dictionaries, and integers with python
  • know the syntax of a python class

you should be able to pass these tests: https://wiki.itcollege.ee/index.php/I719_Fundamentals_of_Python#Practice_Test

What should I write python with?

whatever you want!

If you don't know what to use, check the following - Spyder a lightweight python IDE. Very basic, but works out of the box and is quick to learn. Use this if you want to start with something easy. - Vim popular and useful text editor. Hard to learn, but widely used and very effecient once learned. To start using with python, consider using https://github.com/amix/vimrc - Emacs a text editor and more. Hard to learn, but once learned is very effecient and useful. - Visual Studio Code an editor with IDE features from microsoft. It is very new and becoming more and more popular. It is not open source. - PyCharm the most popular python IDE. It is not open source.

What python version are we using?

Both 2 and 3. Our code should work on both versions. Unless you are using asyncio, which can only support python 3. `

Grading

The class is pass/fail, and passing will depend on a final project.

Requirements

  • Proper version control. Small commits, with relevant commit messages.
  • It has a relevant unit test
  • It runs on python 2 and 3
  • It has a README that explains how to run it.
  • I must approve the project idea

Deadlines

A project idea must be picked by the middle class (8th class). I will approve the project idea or suggest improvements to the idea. If you do not submit your idea, then one will be given to you. You may change your project idea with my approval.

The project deadline will be Monday January 15, 2018.

Don't have a project idea?

You may do the following task. You submit it like a project and will follow the same requirements. So it must have a relevant unittest, and a readme, and be in version control (i.e. github, bitbucket).

Write a script that takes the following CSV (https://blockchain.info/charts/market-price) and can tell the user the following information:

  • What was the greatest percent increase over the previous day, and what day was it?
  • What was the greatest percent decrease over the previous day, and what day was it?
  • What is the highest price in the the data, and what day was it?

It should be clear how to get the the script to use the csv file by path in the commandline For a unittest, make sure there is a function that can calculate the desired values, and you can test that function with example data as inputs.

Here is how to find biggest changes between values in a series https://gist.github.com/anonymous/ed315c65da92fd685a9668c74402c7fc

Lecture Notes

Videos

The lecture videos for the Wednesday 12:00-13:30 class is here: https://echo360.org.uk/section/18f50e3b-dd4d-4f8d-ab90-d20b5b0886d7/public

The lecture videos for the Friday 16:15-19:20 class is here: https://echo360.org.uk/section/850df2db-0c72-4c75-b768-c2f511a65e9f/public

Lecture 1

Python 2 and 3 code. PEP 8.

https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture1

Lecture 2

Scoping and python packaging basics.

https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture2

Lecture 3

Scope within classes, `while`, and generators.

https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture3

Lecture 4

Functional Programming

https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture4

Lecture 5

Introduction to coroutines, event driven programming, streams

https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture5

Lecture 6

Concurrency

https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture6


Lecture 7

Defining datatypes

https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture7

Lectures 8 & 9

Django

Knowledge of Django is only useful if you are using Django.

Here is the code I made with my lecture: https://github.com/evrom/django-example-for-class

Here is a good tutorial to start with django: https://tutorial.djangogirls.org/en/django/

Lecture 10

Binary, Hex, and Base64 with CryptoPals

https://wiki.itcollege.ee/index.php/Advanced_Python_(Fall_2017)/lecture10