Skip to content

Instantly share code, notes, and snippets.

@sanjivyash
Last active May 16, 2021 16:51
Show Gist options
  • Save sanjivyash/47877a8625fb12f4282c7ffe677fa7ee to your computer and use it in GitHub Desktop.
Save sanjivyash/47877a8625fb12f4282c7ffe677fa7ee to your computer and use it in GitHub Desktop.

Python preparation

General Programming

YouTube Playlists: PythonSocratica

  1. Object Oriented Programming :

    • classes and objects
    • special functions examples and uses - __init__, __add__, __repr__, __call__
    • self keyword
  2. Function Wrappers:

    • defining functions within functions
    • lambda functions, filter, map, reduce
    • passing functions as another function parameter *args and **kwargs
  3. Files:

    • basic file i/o
    • open context manager
  4. Libraries:

    • collections - useful data structures
    • pickle - saving data
    • json - dumping and loading JSON data
    • copy - create deepcopies (copy by value) for non-primitive and custom data types
  5. Web:

    • requests library
    • familiarity with http/https and different type of requests that can be made

Data Analysis and ML

Courses to follow: CS231n Convolutional Neural Networks for Visual Recognition by Stanford University (YouTube)

  1. Libraries:

    • basic ML - scikit-learn
    • computation - numpy
    • data manipulation - pandas
    • plotting - matplotlib and seaborn
    • image manipulation - python-opencv (import cv2)
  2. Data Visualization:

    • Automatic profiling - pandas-profiling
  3. Frameworks:

    • tensorflow/keras
    • pytorch/FastAI
  4. Code Habits:

    • modular code
    • creating generators for datasets
    • defining train and test functions
  5. Mathematical Concepts:

    • Singular Value Decomposition
    • Principal Component Analysis
  6. Basic Web Scraping:

    • Beautiful Soup (from bs4 import BeautifulSoup)
    • able to collect iamges and training data using automated scripts
  7. Basic DBMS:

    • SQL Programming
    • python libraries used to handle SQL databases

Data Structures and Algos

Courses to follow - Introduction to Algorithms by MIT (YouTube)

  1. Data Structures:

    • deques (from collections import deque)
    • heaps and priority queues (from heapq import heapify, heappush, heappop)
  2. Custom Structures:

    • nodes
    • linked lists
    • trees
    • graphs
  3. Additional Resources:

    • CP Handbook/CLRS
    • YouTube video for graphs

NOTE - Try implementing every graph theory algorithm from the video in Python

  1. Frequently asked:
    • Dynamic Programming
    • Greedy Algorithms
    • Stacks and Queues
    • Binary Trees and Graphs - inorder, preorder and postorder traversal of binary trees

Advanced Python Programming

Amazing Video: PyData Seattle 2017

  1. Concepts:
    • context manager - yield keyword
    • generators - extremely important in ML, dataset creation (learn about __iter__ and __next__)
    • iterators and iterables
    • decorators - very powerful concept
    • metaclasses - uses and usage (optional)
    • threading and multiprocessing - perform multiple tasks concurrently
    • sockets and locks - access to database denied when something is being written
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment