Skip to content

353solutions/cybr-py-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Workshop @ CyberArk

Miki Tebeka 📬 miki@353solutions.com, 𝕏 @tebeka, 👨 mikitebeka, ✒️blog

Syllabus

Shameless Plugs

Colab notebook


Day 1: Getting Started

Agenda

  • Intro to Python and its ecosystem
  • Working with the Python REPL
  • Working with text: str/bytes, formatting
  • Iteration & iteration utilities

Code

Exercises

Solve Euler 4
Solution: 906609

Solve Euler 8
Solution: 23514624000

Links

Data & Other

Day 2: Working with Python

Agenda

  • Collections: list, tuple, dict & set
  • Slicing & List comprehensions
  • Control flow & logic
  • List comprehensions
  • Defining & calling functions
  • Working with files

Code

Exercises

Count Errors

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

Links

Data & Other

Day 3: Working with Python

Agenda

  • Handling resources using with
  • Error handling
  • Modules & packages (imports)
  • Calling REST APIs
  • OO Basics
    • Classes and instances
    • Methods
    • Special methods
    • Inheritance

Code

Exercises

Stock Tweets

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

Links

Data & Other

  • https://api.github.com/users/tebeka

Day 4: Working with Python

Agenda

  • OO Basics
    • Classes and instances
    • Methods
    • Special methods
    • Inheritance
  • Managing dependencies with pip
  • Tesing with pytest

Code

TBD

Links

Data & Other

Day 5: Data Analsys with Pandas

Agenda

  • Pandas overview
  • Loading data
  • Selecting data
  • Running calculations
  • Grouping data
  • Cleaning data
  • Visualization

Code

Links

Data & Other

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published