miku / pythonpath

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Path to Python

Diving into Python.

  • 1: Language Basics
  • 2: Multiparadigmatic programming (imperative, OO, functional)
  • 3: Working with data (files, web, JSON)
  • 4: Tabular data with Pandas (pandas, csv, plotting)

Schedule

Day 1

Day 2

Running Python:

  • example web application

Extra:

Examples:

  • [notebooks/Pandas/13 Pandas Example - Geolocations.ipynb](notebooks/Pandas/13 Pandas Example - Geolocations.ipynb) (MUKA)
  • [notebooks/Pandas/14 Pandas Example - Learning about Weather with DWD.ipynb](notebooks/Pandas/14 Pandas Example - Learning about Weather with DWD.ipynb)
  • [notebooks/Pandas/15 Pandas Example - Used Cars.ipynb](notebooks/Pandas/15 Pandas Example - Used Cars.ipynb)

Example (just rendered, data is now 404):


Mode of operation

We will look at different contexts:

  • many data structures and approaches can be tried out in a REPL
  • research, experiments in notebooks
  • automating tasks with scripts

Python Background

  • 1991-02-21 (more than 33 years ago, about 19 years after C)
  • open source, dynamically typed, interpreted language with a major implementation ("cpython")
  • large code fissure between 2006 (PEP-3000) and 2020 ("Sunsetting Python 2")
  • de-facto language for the convenience layer in scienfitic computing, on the rise (tiobe), Heise: Und der Sieger ist - Python (2022), blueprint for new developments (like Mojo)
  • many popular libraries (top 20 packages are downloaded about 210M per days, or 5.8B times per month, or 2250 "installs" per second)
$ python -c 'import pandas as pd;print(pd.read_html("https://pypistats.org/top")[1][2].sum())'
213946761

$ python -c 'import pandas as pd;print(pd.read_html("https://pypistats.org/top")[3][2].sum())'
5833512800
  • Python is a "glue language" - in many ways
  • Python has a few downsides ("deployment" and "packaging", requires more discipline in my experience to write robust code)

Python Eras

  • 1990s: scripting
  • 2000s: scientific computing
  • 2010s: data science (also "web")
  • 2020s: ML/AI (as a guess)

Snapshot as of 2024-01-16

About 630 KLOC C, plus a standard library of about 900 KLOC Python, plus documentation, tutorials, etc.

===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
...
 C                     409       550295       430438        64500        55357
 C Header              537       237280       200351        14728        22201
...
 Python               1893       912977       736017        59248       117712
 ReStructuredText      802       411335       292093            0       119242
...
===============================================================================
 Total                4210      2339000      1771030       246934       321036
===============================================================================

Installation Options

About


Languages

Language:mIRC Script 72.4%Language:Jupyter Notebook 25.2%Language:Python 2.2%Language:HTML 0.1%Language:Makefile 0.0%Language:Batchfile 0.0%Language:Shell 0.0%Language:C 0.0%