{"id":23993196,"url":"https://github.com/benedictpaten/intro_python","last_synced_at":"2025-04-05T05:04:19.397Z","repository":{"id":62147112,"uuid":"425604481","full_name":"benedictpaten/intro_python","owner":"benedictpaten","description":"Lecture Notes and Slides for UCSC CSE20, formatted as Jupyter Notebooks.","archived":false,"fork":false,"pushed_at":"2025-03-13T18:43:15.000Z","size":7191,"stargazers_count":81,"open_issues_count":1,"forks_count":97,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-29T04:08:17.009Z","etag":null,"topics":["jupyter-notebook","python3"],"latest_commit_sha":null,"homepage":"","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/benedictpaten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-11-07T20:07:01.000Z","updated_at":"2025-03-13T18:43:19.000Z","dependencies_parsed_at":"2023-11-15T01:28:08.270Z","dependency_job_id":"ed4d0e2c-5f5c-4211-bb1c-82801348bcfe","html_url":"https://github.com/benedictpaten/intro_python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedictpaten%2Fintro_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedictpaten%2Fintro_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedictpaten%2Fintro_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedictpaten%2Fintro_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benedictpaten","download_url":"https://codeload.github.com/benedictpaten/intro_python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289424,"owners_count":20914464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["jupyter-notebook","python3"],"created_at":"2025-01-07T20:55:47.812Z","updated_at":"2025-04-05T05:04:19.375Z","avatar_url":"https://github.com/benedictpaten.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# These are lecture notes for the [UCSC CSE20: Beginning Programming in Python](https://courses.soe.ucsc.edu/courses/cse20) course\n\nEach lecture is composed of a [Jupyter](https://jupyter.org/) notebook.\n\nThe lecture syllabus is here: https://bit.ly/intro_python_00\n\n## You can view each of these notebooks using [Google Colab](https://colab.research.google.com/).\n  \n[Google Colab](https://colab.research.google.com/) provides a notebook environment\nyou can run from your web browser without installing any software.\n\nStep 1: open [Google Colab](https://colab.research.google.com/).\n\nStep 2: paste https://github.com/benedictpaten/intro_python into the\nGithub URL search box under the Github tab (hit return).\n\nStep 3: pick the notebook for the lecture you want.\n\nFor an introduction to using Google Colab (and Juptyer Notebooks in general) \nsee the following [tutorial](https://colab.research.google.com/notebooks/intro.ipynb).\n\n## To install and use these notebooks on your computer with [Jupyter](https://jupyter.org/)\n\nIf you prefer to have these notebooks installed on your computer and to use Jupyter to edit them\nfollow the following instructions. Note, these instructions use the classic Jupyter notebook environment. You\nmay prefer to install the more powerful [JupyterLab](https://jupyter.org/install), which provides a more \nfull-fledged IDE for editing. However, for simplicity, I like the former.\n\n**These instructions should work on\nLinux or Mac OS and require you to be familiar with using unix shell commands (e.g. with a terminal app).\nIt is not necessary to install these notebooks on your computer to take this course.**\n\nFirst, make sure you have [python3](https://www.python.org/) installed on your computer.\n\nNext make a directory to hold the notebooks:\n\n```\nmkdir cse20 \u0026\u0026 cd cse20\n```\n\nTo avoid problems with conflicting versions of dependencies on your system, we strongly recommend installing \nthese notebooks inside a Python 3 [virtual environment](https://virtualenv.pypa.io/en/stable/). \nTo install the `virtualenv` command, if you don't have it already, run:\n\n```\npython3 -m pip install virtualenv\n```\n\nTo set up a virtual environment in the directory `python_intro_env`, run:\n```\npython3 -m virtualenv -p python3.11 python_intro_env\n```\nNote that here I am using Python 3.11, but you may wish to choose a different version, which you can change by \nspecifying a different number string, i.e. python3.9\n\nThen, to enter the virtualenv, run:\n```\nsource python_intro_env/bin/activate\n```\n\nYou can always exit the virtualenv by running `deactivate`.\n\n\nTo install these notebooks in Python, clone the repo:  \n```\ngit clone https://github.com/benedictpaten/intro_python.git\ncd intro_python\n```\n\nNow install Jupyter and some Python packages we'll use:\n\n```\npip install notebook\npip install RISE\npip install numpy\npip install pandas\npip install matplotlib\npip install scikit-learn\n```\n\nNow make this virtual environment accessible to Jupyter:\n\n```\nipython kernel install --user --name=intro_python_env\n```\n\nNow you're ready to run the notebooks:\n\n```\njupyter notebook\n```\n\nA browser should then open showing you the running Juptyer notebook launch page. Simply\nnavigate to the desired notebook and select it to open. To use the virtual environment\nclick on the Kernel menu and then click \"Change kernel\" and selecting the \"intro_python_env\"\noption. That's it, you should be set use all the features of these notebooks.\n\nLater, after following the above steps, if you want to start the notebook server again (e.g. after\nshutting down the computer) simply navigate to the cse20 directory in the terminal and then \nexecute the following two commands:\n\n```\nsource python_intro_env/bin/activate\njupyter notebook\n```\n\nWhen you're finished with these notebooks you\njust need to delete the parent directory (cse20) and\neverything we've installed (including all the notebooks, Jupyter and Python packages, \nbut not including Python3) will be removed.\n\n```\nrm -rf cse20\n```\n\n### Building html versions of the notebooks as slides\n\nIf you've followed the above instructions to download and run the notebooks on your computer\nyou can build html formatted versions of the slides by running the make_slides.sh script in the \nintro_python subdirectory:\n\n```\n./make_slides.sh\n```\n\nHowever, you may prefer to use [RISE](https://rise.readthedocs.io/en/stable/) to view\nthe slides (it is installed with the above instructions). RISE allows\nyou to interactively edit and run the notebook and toggle back and forth into\na slide viewer.\n\n# Practice Exams\n\nFor CSE20 we are moving to all paper exams to prevent the use of code assistant tools (chatGPT etc.). \nIn the exams folder you can find a couple of practice Jupyter notebook format exams to test your knowledge. These were\nused previously in the course.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenedictpaten%2Fintro_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenedictpaten%2Fintro_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenedictpaten%2Fintro_python/lists"}