{"id":13782529,"url":"https://github.com/webartifex/intro-to-python","last_synced_at":"2026-03-04T16:30:44.963Z","repository":{"id":40427357,"uuid":"150825066","full_name":"webartifex/intro-to-python","owner":"webartifex","description":"An intro to Python \u0026 programming for wanna-be data scientists","archived":false,"fork":false,"pushed_at":"2024-04-08T20:35:16.000Z","size":10811,"stargazers_count":978,"open_issues_count":48,"forks_count":89,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-12-23T15:06:45.219Z","etag":null,"topics":["data-science","introduction-to-programming","jupyter","python","tutorial"],"latest_commit_sha":null,"homepage":"https://code.webartifex.biz/alexander/intro-to-python","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webartifex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-29T04:37:34.000Z","updated_at":"2025-12-16T16:53:33.000Z","dependencies_parsed_at":"2024-08-03T18:13:03.878Z","dependency_job_id":"edc3f6ab-9587-4fe6-a427-c52639fb3f9e","html_url":"https://github.com/webartifex/intro-to-python","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/webartifex/intro-to-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webartifex%2Fintro-to-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webartifex%2Fintro-to-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webartifex%2Fintro-to-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webartifex%2Fintro-to-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webartifex","download_url":"https://codeload.github.com/webartifex/intro-to-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webartifex%2Fintro-to-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30086451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","introduction-to-programming","jupyter","python","tutorial"],"created_at":"2024-08-03T18:01:38.595Z","updated_at":"2026-03-04T16:30:44.940Z","avatar_url":"https://github.com/webartifex.png","language":"Jupyter Notebook","readme":"# An Introduction to Python and Programming\n\nThis project is a *thorough* introductory course\n    in programming with **[Python \u003cimg height=\"12\" style=\"display: inline-block\" src=\"static/link/to_py.png\"\u003e](https://www.python.org/)**.\n\n\n### Table of Contents\n\nThe following is a high-level overview of the contents.\nFor a more *detailed version* with **clickable links**\n    see the [CONTENTS.md](CONTENTS.md) file.\n\n- *Chapter 0*: Introduction\n- **Part A: Expressing Logic**\n  - *Chapter 1*: Elements of a Program\n  - *Chapter 2*: Functions \u0026 Modularization\n  - *Chapter 3*: Conditionals \u0026 Exceptions\n  - *Chapter 4*: Recursion \u0026 Looping\n- **Part B: Managing Data and Memory**\n  - *Chapter 5*: Numbers \u0026 Bits\n  - *Chapter 6*: Text \u0026 Bytes\n  - *Chapter 7*: Sequential Data\n  - *Chapter 8*: Map, Filter, \u0026 Reduce\n  - *Chapter 9*: Mappings \u0026 Sets\n  - *Chapter 10*: Arrays \u0026 Dataframes\n  - *Chapter 11*: Classes \u0026 Instances\n\n\n#### Videos\n\nPresentations of the chapters are available on this [YouTube playlist \u003cimg height=\"12\" style=\"display: inline-block\" src=\"static/link/to_yt.png\"\u003e](https://www.youtube.com/playlist?list=PL-2JV1G3J10kRUPgP7EwLhyeN5lOZW2kH).\nThe recordings are about 25 hours long in total\n    and were made in spring 2020\n    after a corresponding in-class Bachelor course was cancelled due to Corona.\n\n\n### Objective\n\nThe **main goal** is to **prepare** students\n    for **further studies** in the \"field\" of **data science**,\n    including but not limited to topics such as:\n- algorithms \u0026 data structures\n- data cleaning \u0026 wrangling\n- data visualization\n- data engineering (incl. SQL databases)\n- data mining (incl. web scraping)\n- linear algebra\n- machine learning (incl. feature generation \u0026 deep learning)\n- optimization \u0026 (meta-)heuristics (incl. management science \u0026 operations research)\n- statistics \u0026 econometrics\n- quantitative finance (e.g., option valuation)\n- quantitative marketing (e.g., customer segmentation)\n- quantitative supply chain management (e.g., forecasting)\n- web development (incl. APIs)\n\n\n### Prerequisites\n\nTo be suitable for *beginners*, there are *no* formal prerequisites.\nIt is only expected that the student has:\n- a *solid* understanding of the **English** language,\n- knowledge of **basic mathematics** from high school,\n- the ability to **think conceptually** and **reason logically**, and\n- the willingness to **invest** around **90-120 hours** on this course.\n\n\n## Getting started\n\nIf you are a total beginner,\n    follow the instructions in the \"Installation\" section next.\nIf you are familiar with\n    the [git](https://git-scm.com/)\n    and [poetry](https://python-poetry.org/docs/) command-line tools,\n    you may want to look at the \"Alternative Installation\" section further below.\n\n\n### Installation\n\nTo follow this course, an installation of **Python 3.11** or higher is expected.\n\nA popular and beginner friendly way is\n    to install the [Anaconda Distribution](https://www.anaconda.com/download)\n    that not only ships Python itself\n    but also comes pre-packaged with a lot of third-party libraries.\n\n\u003cimg src=\"static/anaconda_download.png\" width=\"50%\"\u003e\n\nScroll down to the \"Anaconda Installers\" section\n    and install the latest version for your operating system\n    (i.e., *2024-02* with Python 3.11 at the time of this writing).\n\nAfter installation,\n    you find an entry \"[Anaconda Navigator](https://docs.anaconda.com/free/navigator/)\"\n    in your start menu.\nClick on it.\n\n\u003cimg src=\"static/anaconda_start_menu.png\" width=\"50%\"\u003e\n\nA window opens giving you several options to start various applications.\nIn the beginning, we will work mostly with [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/).\nClick on \"Launch\".\n\n\u003cimg src=\"static/anaconda_navigator.png\" width=\"50%\"\u003e\n\nA new tab in your web browser opens:\nThe website is \"localhost\" and some number (e.g., 8888).\n\nThis is the [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) application\n    that is used to display the course materials.\nOn the left, you see the files and folders on your computer.\nThis file browser works like any other.\nIn the center, you see several options to launch (i.e., \"create\") new files.\n\n\u003cimg src=\"static/jupyter_lab.png\" width=\"50%\"\u003e\n\nTo check if your Python installation works,\n    double-click on the \"Python 3\" tile under the \"Notebook\" section.\nThat opens a new [Jupyter notebook](https://jupyter-notebook.readthedocs.io/en/stable/)\n    named \"Untitled.ipynb\".\n\n\u003cimg src=\"static/jupyter_notebook_blank.png\" width=\"50%\"\u003e\n\nEnter some basic Python in the **code cell**, for example, `1 + 2`.\nThen, press the **Enter** key *while* holding down the **Control** key\n    (if that does not work, try with the **Shift** key)\n    to **execute** the snippet.\nThe result of the calculation, `3` in the example, shows up below the cell.\n\n\u003cimg src=\"static/jupyter_notebook_example.png\" width=\"50%\"\u003e\n\nAfter setting up Python,\n    click on the green \"Code\" button on the top right on this website\n    to download the course materials.\nAs a beginner, choosing \"Download ZIP\" is likely the easiest option.\nThen, unpack the ZIP file into a folder of your choice,\n    ideally somewhere within your personal user folder\n    so that the files show up right away in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/).\n\n\u003cimg src=\"static/repo_download.png\" width=\"50%\"\u003e\n\n\n### Alternative Installation (for Instructors using Linux)\n\nPython can also be installed in a \"pure\" way\n    obtained directly from its core development team [here](https://www.python.org/downloads/).\nThen, it comes *without* any third-party packages,\n    which is *not* a problem at all.\nManaging third-party packages can be automated to a large degree,\n    for example, with tools such as [poetry](https://python-poetry.org/docs/).\n\nHowever, this may be too \"advanced\" for a beginner\n    as it involves working with a [command-line interface \u003cimg height=\"12\" style=\"display: inline-block\" src=\"static/link/to_wiki.png\"\u003e](https://en.wikipedia.org/wiki/Command-line_interface) (CLI),\n    also called a **terminal**,\n    which looks like the one below.\nIt is used *without* a mouse by typing commands into it.\nThe following instructions assume that\n    [git](https://git-scm.com/), [poetry](https://python-poetry.org/docs/),\n    and [pyenv](https://github.com/pyenv/pyenv) are installed.\n\n\u003cimg src=\"static/cli_install.png\" width=\"50%\" align=\"center\"\u003e\n\nThe screenshot above shows how this project can be set up in an alternative way\n    with the [zsh](https://en.wikipedia.org/wiki/Z_shell) CLI.\n\nFirst, [git](https://git-scm.com/) is used\n    to **clone** the course materials as a **repository**\n    into a new folder called \"*intro-to-python*\"\n    that lives under a \"*repos*\" folder.\n\n- `git clone https://github.com/webartifex/intro-to-python.git`\n\nThe `cd` command is used to \"change directories\".\n\nIn the screenshot, [pyenv](https://github.com/pyenv/pyenv) is used\n    to set the project's Python version.\n[pyenv](https://github.com/pyenv/pyenv)'s purpose is\n    to manage *many* parallel Python installations on the same computer.\nIt is highly recommended for professional users;\n    however, any other way of installing Python works as well.\n\n- `pyenv local ...`\n\nOn the contrary, [poetry](https://python-poetry.org/docs/)'s purpose is\n    to manage third-party packages within the *same* Python installation\n    and, more importantly, on a per-project basis.\nSo, for example,\nwhereas \"Project A\" may depend on [numpy](https://numpy.org/) *v1.19*\n    from June 2020 be installed,\n    \"Project B\" may use *v1.14* from January 2018 instead\n    (cf., numpy's [release history](https://pypi.org/project/numpy/#history)).\nTo achieve this per-project **isolation**,\n[poetry](https://python-poetry.org/docs/) uses so-called **virtual environments**\n    behind the scenes.\nWhile one could do that manually,\n    for example, by using Python's built-in\n        [venv \u003cimg height=\"12\" style=\"display: inline-block\" src=\"static/link/to_py.png\"\u003e](https://docs.python.org/3/library/venv.html) module,\n    it is more convenient and reliable to have [poetry](https://python-poetry.org/docs/)\n        automate this.\nThe following *one* command not only\n    creates a new virtual environment (manually: `python -m venv venv`)\n    and *activates* it (manually: `source venv/bin/activate`),\n    it also installs the versions of the project's third-party dependencies\n        as specified in the [poetry.lock](poetry.lock) file\n        (manually: `python -m pip install -r requirements.txt`\n         if a [requirements.txt](https://docs.python.org/3/tutorial/venv.html#managing-packages-with-pip)\n         file is used;\n         the `python -m` part is often left out [but should not be](https://snarky.ca/why-you-should-use-python-m-pip/)):\n\n- `poetry install`\n\n[poetry](https://python-poetry.org/docs/) is also used\n    to execute commands in the project's (virtual) environment.\nTo do that, the command is prefixed with `poetry run ...`.\n\nThe project uses [nox](https://nox.thea.codes/en/stable/)\n    to manage various maintenance tasks.\nAfter cloning the repository and setting up the virual environment,\n    it is recommended to run the initialization task.\nThat needs to be done only once.\n\n- `poetry run nox -s init-project`\n\nTo do the equivalent of clicking \"Launch\" in the Anaconda Navigator:\n\n- `poetry run jupyter lab`\n\nThis opens a new tab in your web browser just as above.\nThe command-line interface stays open in the background,\n    like in the screenshot below,\n    and prints log messages as we work in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/).\n\n\u003cimg src=\"static/cli_jupyter_lab.png\" width=\"50%\" align=\"center\"\u003e\n\n\n## Contributing\n\nFeedback **is highly encouraged** and will be incorporated.\nOpen an issue in the [issues tracker \u003cimg height=\"12\" style=\"display: inline-block\" src=\"static/link/to_gh.png\"\u003e](https://github.com/webartifex/intro-to-python/issues)\n    or initiate a [pull request \u003cimg height=\"12\" style=\"display: inline-block\" src=\"static/link/to_gh.png\"\u003e](https://help.github.com/en/articles/about-pull-requests)\n    if you are familiar with the concept.\nSimple issues that *anyone* can **help fix** are, for example,\n    **spelling mistakes** or **broken links**.\nIf you feel that some topic is missing entirely, you may also mention that.\nThe materials here are considered a **permanent work-in-progress**.\n\nA \"Show HN\" post about this course was made on [Hacker News \u003cimg height=\"12\" style=\"display: inline-block\" src=\"static/link/to_hn.png\"\u003e](https://news.ycombinator.com/item?id=22669084)\n    and some ideas for improvement were discussed there.\n\n\n## About the Author\n\nAlexander Hess is a PhD student\n    at the Chair of Logistics Management at [WHU - Otto Beisheim School of Management](https://www.whu.edu)\n    where he conducts research on urban delivery platforms\n    and teaches coding courses based on Python in the BSc and MBA programs.\n\nConnect him on [LinkedIn](https://www.linkedin.com/in/webartifex).\n","funding_links":[],"categories":["Programing resources"],"sub_categories":["**Python**"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebartifex%2Fintro-to-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebartifex%2Fintro-to-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebartifex%2Fintro-to-python/lists"}