1 of 29

Python

Presentation By Nishanth Tharakan

Cluster 10CW

The Language, Not the

Snake

2 of 29

Who Made Python?

Guido van Rossum, AKA

“Benevolent Dictator for Life”

3 of 29

Who Made Python?

4 of 29

Who Made Python?

Named after “Monty Python’s Flying Circus”

    • Intended to give an air of mystery around the language
    • Lets people lower their guard with a less intimidating name

Compare the name “Python” to:

  • FORTRAN
  • COBOL
  • LISP

5 of 29

“Today, Python is used extensively in many different application fields, including web server and cloud backends, machine learning and data science, scientific computing, education, rapid prototyping, and more due in part to its large collection of specialized libraries, such as the Django web framework, and NumPy, the scientific computing package. Its flexibility and convenience makes it particularly useful for gluing small utility programs written in other languages together into a larger whole. It is often used in introductory programming courses, such as at UC Berkeley and MIT.

Van Rossum’s design philosophy of

convenience, productivity, and extensibility, his commitment to maintaining Python as a free and open source project, and his mentorship and fostering of the Python community have been instrumental in Python’s success as a global language of the internet age.”

6 of 29

In a way, the

Python community is as as much a creator of Python as

van Rossum is.

7 of 29

What is Python?

  • Python is:
    • High Level Language
      • Dynamically Type Checked
      • Automatic Garbage Collection
    • Indented
    • General Purpose
    • Strong Library Support
    • Supports:
      • Structured Programming
      • Object Oriented Programming
      • Functional Programming

High Level Language:

  • Programmer doesn’t need to care about every small detail when programming

Dynamic Checking:

  • Language handles data type and interpretation of variables

Garbage Collection

  • Language handles allocating memory to variables (part of dynamic typing)

8 of 29

What is Python?

  • Python is:
    • High Level Language
    • Indented
      • Easy to understand syntax
      • Similar to Natural Language
    • General Purpose
    • Strong Library Support
    • Supports:
      • Structured Programming
      • Object Oriented Programming
      • Functional Programming

Indented:

Uses “tabs” and “enters” to distinguish between different lines

Example:

9 of 29

What is Python?

  • Python is:
    • High Level Language
    • Indented
    • General Purpose
      • Many uses in various fields
    • Strong Library Support
    • Supports:
      • Structured Programming
      • Object Oriented Programming
      • Functional Programming

General Purpose:

Equipped to handle a variety of tasks, as opposed to specializing in a specific field

Example:

Fortran, Agol: Scientific Research

COBOL: Finance

LISP, IPL: Mathematical Symbolic Programming

10 of 29

What is Python?

  • Python is:
    • High Level Language
    • Indented
    • General Purpose
    • Strong Library Support
      • Community driven
      • Open source language
    • Supports:
      • Structured Programming
      • Object Oriented Programming
      • Functional Programming

Strong Library Support:

Many libraries for different purposes

Ex: matplotlib for graphs, numpy for linear algebra, pytorch for Machine learning, and Cython to write portions of python code in C!

*Libraries/Module: Set of functions and data-types you can use in your program

11 of 29

What is Python?

  • Python is:
    • High Level Language
    • Indented
    • General Purpose
    • Strong Library Support�
    • Supports:
      • Structured Programming
      • Object Oriented Programming
      • Functional Programming

Implementations of Python:

Structured: works like building blocks in a line, useful for making workflows

(Like Scratch.mit.edu)

Object Oriented: Has multiple objects that interact with other objects to perform calculations, useful for simulations

(Think of Fortnite, Minecraft)

Functional Programming: The basis of Lambda Calculus, all components act as functions, useful for mathematics research

(Think for functions from algebra)

12 of 29

Ex:

C++

Python

13 of 29

“Import Zen”: Teamwork at scale

14 of 29

Why AI?

AI Related Libraries (That I’ve used):

  • Tensorflow (C++): Google’s NN Library, uses a special optimized object called a tensor to rapidly compute

  • Pytorch/PyG (C++, CUDA): Meta’s NN Library, can be used with consumer GPUs from NVIDIA (who developed CUDA) (PyG builds off of Pytorch to work with graph NNs)

  • SciKit-Learn (Python/Cython): foundational library for “traditional machine learning” (Not AI)

  • Keras (Python): Makes Tensorflow more approachable to new programmers, accelerating prototyping

15 of 29

Why AI?

Math Related Libraries (That I’ve used):

  • NumPy (C/Fortran): Essential in fields that required multidimensional arrays

  • Pandas (C): allows ease of use when loading external files containing weights and training data

  • SciPy (C++/C/Fortran): builds a lot more on Numpy, adding extra heavily optimized algorithms to Python’s abilities

  • NetworkX (Python): Can simulate networks using graph theory

16 of 29

Example with API

Application Programming Interface

17 of 29

Example with API

Application

Programming

Interface

Client

With Request

Server with Code

18 of 29

Example with API

19 of 29

Example with API

Auth done

via

key

I can now start a fast chat even in a “slow” language.

20 of 29

Example with API

21 of 29

Why AI?

Eas(ier) to learn

Strong Library/API Support with other languages

?????

Python is King

22 of 29

Why AI?

Eas(ier) to learn

Strong Library/API Support with other languages

Hype

Python is King

23 of 29

The Great Cycle of Hype

Python: exists

24 of 29

The Great Cycle of Hype

Python: exists

Community builds useful libraries

25 of 29

The Great Cycle of Hype

Python: exists

Community builds useful libraries

Companies see good community and free resource, generate “free marketing”

26 of 29

The Great Cycle of Hype

Python: exists

Community builds useful libraries

Companies see good community and free resource, generate “free marketing”

New people find out Python is a cool language, and join the community

27 of 29

The Great Cycle of Hype

Python: exists even more

Community builds useful libraries

Companies see good community and free resource, generate “free marketing”

New people find out Python is a cool language, and join the community

28 of 29

Why AI?

Eas(ier) to learn

Strong Library/API Support with other languages

Hype

Python is King

29 of 29

Sources:

The Amazing Word Cluster Logo: https://www.pinterest.com/pin/744501382186006551/

Van Rossum’s Background: https://computerhistory.org/blog/2018-chm-fellow-guido-van-rossum-python-creator-benevolent-dictator-for-life/?key=2018-chm-fellow-guido-van-rossum-python-creator-benevolent-dictator-for-life

Info about the ABC language, a precursor to Python: https://dl.acm.org/doi/pdf/10.1145/122179.122180#:~:text=ABC%20is%20an%20imperative%20language,with%20the%20predecessor%20of%20C

gBash repo (I wrote this with my dad): https://github.com/royans/gbash/blob/main/gbash.py

All code displayed was written on my VsCode client, using AI when needed to speed up basic writing of code (e.g. converting the C++ code snippet to its equivalent in Python)

Instances of API were generated on my Linux client using Google’s Gemini API from AI Studio