Miki Tebeka 📬 miki@353solutions.com, 𝕏 @tebeka, 👨 mikitebeka, ✒️blog
- Intro to Python and its ecosystem
- Working with the Python REPL
- Working with text: str/bytes, formatting
- Iteration & iteration utilities
- basics.py - Variables, conditions, looping
- strings.py - Working with text
- looping.py - Looping utilities
Solve Euler 4
Solution: 906609
Solve Euler 8
Solution: 23514624000
- IDEs
- PyCharm
- VSCode + Python extension
- Google Colab - Notebooks in the cloud
- How to Think Like a Computer Scientist: Interactive Edition
- The Python Tutorial
- Python Type Conversion
- List of Unicode Characters
- Programming Exercises:
- http.log.gz
- road.txt
- ☺
- ♡
- Collections: list, tuple, dict & set
- Slicing & List comprehensions
- Control flow & logic
- List comprehensions
- Defining & calling functions
- Working with files
- euler4.py
- euler8.py
- data_types.py - Data types (list, tuple, dict)
- list_comprehension.py - List comprehension
- funcs.py - Defining & calling functions
- sync.py - Working with files
How many requests in http.log.gz resulted in an error (status code >= 400)?
Use gzip.open
to read the file.
Example lines:
uplherc.upl.com - - [01/Aug/1995:00:00:08 -0400] "GET /images/ksclogo-medium.gif HTTP/1.0" 304 0
uplherc.upl.com - - [01/Aug/1995:00:00:08 -0400] "GET /images/MOSAIC-logosmall.gif HTTP/1.0" 304 0
uplherc.upl.com - - [01/Aug/1995:00:00:08 -0400] "GET /images/USA-logosmall.gif HTTP/1.0" 304 0
ix-esc-ca2-07.ix.netcom.com - - [01/Aug/1995:00:00:09 -0400] "GET /images/launch-logo.gif HTTP/1.0" 200 1713
uplherc.upl.com - - [01/Aug/1995:00:00:10 -0400] "GET /images/WORLD-logosmall.gif HTTP/1.0" 304 0
slppp6.intermind.net - - [01/Aug/1995:00:00:10 -0400] "GET /history/skylab/skylab.html HTTP/1.0" 200 1687
piweba4y.prodigy.com - - [01/Aug/1995:00:00:10 -0400] "GET /images/launchmedium.gif HTTP/1.0" 200 11853
slppp6.intermind.net - - [01/Aug/1995:00:00:11 -0400] "GET /history/skylab/skylab-small.gif HTTP/1.0" 200 9202
- Year 2038 problem
- List comprehension in the Python tutorial
- Defining functions in the Python tutorial
- pathlib module - Handling file paths
- shutil module - shell like utlities
- mypy - Static type checker
- Year 2038 problem
- http.log.gz
https://api.github.com/users/tebeka
- Handling resources using
with
- Error handling
- Modules & packages (imports)
- Calling REST APIs
- OO Basics
- Classes and instances
- Methods
- Special methods
- Inheritance
- files.py - Using
with
- kill_server.py - Error handling
- imports.py - Importing modules
- github.py - Calling REST APIs
- game.py - OO Basics
Write a function related_stocks(symbol)
that returns a list of stocks mentioned when you query this symbol on stocktweets.com.
To find about AAPL
use https://api.stocktwits.com/api/2/streams/symbol/AAPL.json
- Errors and Exceptions in the Python tutorial
- Modules in the Python tutorial
- JSON specification
- Python's json module
- A typical HTTP session
- Classes in the Python tutorial
- Beyond PEP8
- HTTP Cats
- httpbin.org - HTTP request & response service
https://api.github.com/users/tebeka
- OO Basics
Classes and instancesMethods- Special methods
- Inheritance
- Managing dependencies with pip
- Tesing with pytest
TBD
- Installing packages
- Using Python's pip to Manage Your Projects' Dependencies
- Other package managers
- pytest
- Linters
- colab notebook
- Beyond PEP8
- tokenize_cases.yml
- March 2020 Yellow Taxi Trip Records
- Data Dictionary - Yellow
!curl -LO https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2020-03.parquet
./.venv/bin/python -m pip install pyarrow
- NYC_Weather_2016_2022.csv.gz
- Pandas overview
- Loading data
- Selecting data
- Running calculations
- Grouping data
- Cleaning data
- Visualization
- Pandas
- Visualization
- NYC Taxi
- Kaggle - Data science competitions
- VSCode Jupyter Extension
- Magic commands
- e.g.
%timeit 2 ** 1000
- e.g.
- PyCon Israel
- tokenize_cases.yml
- March 2020 Yellow Taxi Trip Records
- Data Dictionary - Yellow
!curl -LO https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2020-03.parquet
./.venv/bin/python -m pip install pyarrow
- NYC_Weather_2016_2022.csv.gz