{"id":13500906,"url":"https://github.com/rasbt/python_reference","last_synced_at":"2025-05-14T20:09:26.598Z","repository":{"id":11494849,"uuid":"13970153","full_name":"rasbt/python_reference","owner":"rasbt","description":"Useful functions, tutorials, and other Python-related things","archived":false,"fork":false,"pushed_at":"2022-06-27T11:54:42.000Z","size":9211,"stargazers_count":3783,"open_issues_count":8,"forks_count":931,"subscribers_count":235,"default_branch":"master","last_synced_at":"2025-04-06T12:05:46.707Z","etag":null,"topics":["learning-python","python-tips"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"girder/girder","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rasbt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-29T22:04:12.000Z","updated_at":"2025-04-05T03:51:54.000Z","dependencies_parsed_at":"2022-07-12T13:34:54.602Z","dependency_job_id":null,"html_url":"https://github.com/rasbt/python_reference","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/rasbt%2Fpython_reference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rasbt%2Fpython_reference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rasbt%2Fpython_reference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rasbt%2Fpython_reference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rasbt","download_url":"https://codeload.github.com/rasbt/python_reference/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732486,"owners_count":21152852,"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":["learning-python","python-tips"],"created_at":"2024-07-31T22:01:18.753Z","updated_at":"2025-04-13T15:11:04.467Z","avatar_url":"https://github.com/rasbt.png","language":"Jupyter Notebook","funding_links":[],"categories":["Weekly","Jupyter Notebook","Technical","Twitter","Data validation","Podcasts","Useful lists ##","参考和论坛","Other Awesome Lists"],"sub_categories":["ramanihiteshc@gmail.com","参考","Python"],"readme":"\u003ch3 id=\"top\"\u003eA collection of useful scripts, tutorials, and other Python-related things\u003c/h3\u003e\n\n\u003cbr\u003e\n\u003cimg src=\"./Images/python-logo-master-v3-TM-flattened.png\" alt=\"\"\u003e\n\n\n\u003cdiv style=\"height:100px;\"\u003e\u003c/div\u003e\n\n- [// Python tips and tutorials](#-python-tips-and-tutorials)\n- [// Python and the web](#-python-and-the-web)\n- [// Algorithms](#-algorithms)\n- [// Plotting and Visualization](#-plotting-and-visualization)\n- [// Benchmarks](#-benchmarks)\n- [// Python and \"Data Science\"](#-python-and-data-science)\n- [// Useful scripts and snippets](#-useful-scripts-and-snippets)\n- [// Other](#-other)\n- [// Links](#-links)\n\n\n\n\u003cdiv style=\"height:100px;\"\u003e\u003c/div\u003e\n\n\n\u003cb id=\"-python-tips-and-tutorials\"\u003ePython tips and tutorials\u003c/b\u003e \u003ca href=\"#top\"\u003e[back to top]\u003c/a\u003e\n\n- A collection of not so obvious Python stuff you should know! [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/not_so_obvious_python_stuff.ipynb?create=1)]\n\n- Python's scope resolution for variable names and the LEGB rule [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/scope_resolution_legb_rule.ipynb?create=1)]\n\n- Key differences between Python 2.x and Python 3.x [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/key_differences_between_python_2_and_3.ipynb?create=1)]\n\n- A thorough guide to SQLite database operations in Python [[Markdown](./tutorials/sqlite3_howto/README.md)]  \n\n- Unit testing in Python - Why we want to make it a habit [[Markdown](./tutorials/unit_testing.md)]  \n\n- Installing Scientific Packages for Python3 on MacOS 10.9 Mavericks [[Markdown](./tutorials/installing_scientific_packages.md)]\n\n- Sorting CSV files using the Python csv module [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/sorting_csvs.ipynb)]\n\n- Using Cython with and without IPython magic [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/running_cython.ipynb)]\n\n- Parallel processing via the multiprocessing module [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/multiprocessing_intro.ipynb?create=1)]\n\n- Entry point: Data - using sci-packages to prepare data for Machine Learning tasks and other data analyses [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/python_data_entry_point.ipynb?create=1)]\n\n- Awesome things that you can do in IPython Notebooks (in progress) [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/awesome_things_ipynb.ipynb)]\n\n- A collection of useful regular expressions [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/useful_regex.ipynb)]\n\n- Quick guide for dealing with missing numbers in NumPy [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/numpy_nan_quickguide.ipynb)]\n\n- A random collection of useful Python snippets [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/python_patterns/patterns.ipynb)]\n\n- Things in pandas I wish I'd had known earlier [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/things_in_pandas.ipynb)]\n\n\n\n\u003cbr\u003e\n\n\n\u003cb id=\"-python-and-the-web\"\u003ePython and the web\u003c/b\u003e \u003ca href=\"#top\"\u003e[back to top]\u003c/a\u003e\n\n- Creating internal links in IPython Notebooks and Markdown docs [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/table_of_contents_ipython.ipynb)]  \n\n- Converting Markdown to HTML and adding Python syntax highlighting [[Markdown](./tutorials/markdown_syntax_highlighting/README.md)]\n\n\n\u003cbr\u003e\n\u003cb id=\"-algorithms\"\u003eAlgorithms and Data Structures\u003c/b\u003e \u003ca href=\"#top\"\u003e[back to top]\u003c/a\u003e\n\n*This category has been moved to a separate GitHub repository [rasbt/algorithms_in_ipython_notebooks](https://github.com/rasbt/algorithms_in_ipython_notebooks)*\n\n\n- Sorting Algorithms [[Collection of IPython Notebooks](https://github.com/rasbt/algorithms_in_ipython_notebooks/tree/master/ipython_nbs/sorting)\n\n- Linear regression via the least squares fit method [[IPython nb](http://nbviewer.ipython.org/github/rasbt/algorithms_in_ipython_notebooks/blob/master/ipython_nbs/statistics/linregr_least_squares_fit.ipynb?create=1)]\n\n- Dixon's Q test to identify outliers for small sample sizes [[IPython nb](http://nbviewer.ipython.org/github/rasbt/algorithms_in_ipython_notebooks/blob/master/ipython_nbs/statistics/dixon_q_test.ipynb?create=1)]\n\n- Counting points inside a hypercube [[IPython nb](http://nbviewer.ipython.org/github/rasbt/algorithms_in_ipython_notebooks/blob/master/ipython_nbs/geometry/points_in_hybercube.ipynb)]\n\n- Singly Linked List [[ IPython nbviewer ](http://nbviewer.ipython.org/github/rasbt/algorithms_in_ipython_notebooks/blob/master/ipython_nbs/data-structures/singly-linked-list.ipynb)]\n\n\u003cbr\u003e\n\u003cb id=\"-plotting-and-visualization\"\u003ePlotting and Visualization\u003c/b\u003e \u003ca href=\"#top\"\u003e[back to top]\u003c/a\u003e\n\n*The matplotlib-gallery in IPython notebooks has been moved to a separate GitHub repository [matplotlib-gallery](https://github.com/rasbt/matplotlib-gallery)*\n\n**Featured articles**:  \n\n- Preparing Plots for Publication [[IPython nb](http://nbviewer.ipython.org/github/rasbt/matplotlib-gallery/blob/master/ipynb/publication.ipynb)]\n\n\n\n\n\n\u003cbr\u003e\n\u003cb id=\"-benchmarks\"\u003eBenchmarks\u003c/b\u003e \u003ca href=\"#top\"\u003e[back to top]\u003c/a\u003e\n\n\n- Simple tricks to speed up the sum calculation in pandas [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/benchmarks/pandas_sum_tricks.ipynb)]\n\n\u003cbr\u003e\n*More benchmarks can be found in the separate GitHub repository [One-Python-benchmark-per-day](https://github.com/rasbt/One-Python-benchmark-per-day)*\n\n**Featured articles**:  \n\n\n\n- (C)Python compilers - Cython vs. Numba vs. Parakeet [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day4_2_cython_numba_parakeet.ipynb)]\n\n- Just-in-time compilers for NumPy array expressions [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day7_2_jit_numpy.ipynb)]\n\n- Cython - Bridging the gap between Python and Fortran [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day10_fortran_lstsqr.ipynb)]\n\n- Parallel processing via the multiprocessing module [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/multiprocessing_intro.ipynb)]\n\n- Vectorizing a classic for-loop in NumPy [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day16_numpy_vectorization.ipynb)]\n\n\u003cbr\u003e\n\n\n\u003cb id=\"-python-and-data-science\"\u003ePython and \"Data Science\"\u003c/b\u003e \u003ca href=\"#top\"\u003e[back to top]\u003c/a\u003e\n\n*The \"data science\"-related posts have been moved to a separate GitHub repository [pattern_classification](https://github.com/rasbt/pattern_classification)*\n\n**Featured articles**:  \n\n- Entry Point: Data - Using Python's sci-packages to prepare data for Machine Learning tasks and other data analyses [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/python_data_entry_point.ipynb)]\n\n- About Feature Scaling: Standardization and Min-Max-Scaling (Normalization) [[IPython nb](http://nbviewer.ipython.org/github/rasbt/pattern_classification/blob/master/preprocessing/about_standardization_normalization.ipynb)]\n\n- Principal Component Analysis (PCA) [[IPython nb](http://nbviewer.ipython.org/github/rasbt/pattern_classification/blob/master/dimensionality_reduction/projection/principal_component_analysis.ipynb)]\n\n- Linear Discriminant Analysis (LDA) [[IPython nb](http://nbviewer.ipython.org/github/rasbt/pattern_classification/blob/master/dimensionality_reduction/projection/linear_discriminant_analysis.ipynb)]\n\n- Kernel density estimation via the Parzen-window technique [[IPython nb](http://nbviewer.ipython.org/github/rasbt/pattern_classification/blob/master/parameter_estimation_techniques/parzen_window_technique.ipynb)]\n\n\n\u003cbr\u003e\n\n\u003cb id=\"-useful-scripts-and-snippets\"\u003eUseful scripts and snippets\u003c/b\u003e \u003ca href=\"#top\"\u003e[back to top]\u003c/a\u003e\n\n- [watermark](https://github.com/rasbt/watermark) - An IPython magic extension for printing date and time stamps, version numbers, and hardware information.\n\n- [Shell script](./useful_scripts/prepend_python_shebang.sh) For prepending Python-shebangs to .py files.\n\n- A random string generator [function](./useful_scripts/random_string_generator.py).\n\n- [Converting large CSV files](https://github.com/rasbt/python_reference/blob/master/useful_scripts/large_csv_to_sqlite.py) to SQLite databases using pandas.\n\n- [Sparsifying a matrix](https://github.com/rasbt/python_reference/blob/master/useful_scripts/sparsify_matrix.py) by zeroing out all elements but the top k elements in a row using NumPy.\n\n\u003cbr\u003e\n\n\u003cb id=\"-other\"\u003eOther\u003c/b\u003e \u003ca href=\"#top\"\u003e[back to top]\u003c/a\u003e\n\n- [Python book reviews](./other/python_book_reviews.md)\n- [Happy Mother's Day Plot](./other/happy_mothers_day.ipynb)\n\n\u003cbr\u003e\n\n\u003cb id=\"-links\"\u003eLinks\u003c/b\u003e \u003ca href=\"#top\"\u003e[back to top]\u003c/a\u003e\n\n\n\n- [PyPI - the Python Package Index](https://pypi.python.org/pypi) - The official repository for all open source Python modules and packages.  \n\n- [PEP 8](https://www.python.org/dev/peps/pep-0008/) - The official style guide for Python code.\n\n- [PEP 257](https://www.python.org/dev/peps/pep-0257/) - Python's official docstring conventions;  [pep257 - Python style guide checker](https://pypi.python.org/pypi/pep257)\n\n\n\u003cbr\u003e\n\n**// News**\n\n- [Python subreddit](http://www.reddit.com/r/Python/) - My favorite resource to catch up with Python news and great Python-related articles.\n\n- [Python community on Google+](https://plus.google.com/communities/103393744324769547228) - A nice and friendly community to share and discuss everything about Python.\n\n- [Python Weekly](http://www.pythonweekly.com) - A free weekly newsletter featuring curated news, articles, new releases, jobs etc. related to Python.\n\n\n\u003cbr\u003e\n\n**// Resources for learning Python**\n\n- [Dive Into Python](http://www.diveintopython.net) / [Dive Into Python 3](http://getpython3.com/diveintopython3/) - A free Python book for experienced programmers.\n\n- [The Hitchhiker’s Guide to Python](http://docs.python-guide.org/en/latest/) - A free best-practice handbook for both novices and experts.\n\n- [Think Python - How to Think Like a Computer Scientist](http://www.greenteapress.com/thinkpython/) - An introduction for beginners starting with basic concepts of programming.\n\n- [A Byte of Python](https://python.swaroopch.com/) - a free book on programming using the Python language.\n\n- [Python Patterns](http://matthiaseisen.com/pp/) -  A directory of proven, reusable solutions to common programming problems.\n\n- [Intro to Computer Science - Build a Search Engine \u0026 a Social Network](https://www.udacity.com/course/intro-to-computer-science--cs101) - A great, free course for learning Python if you haven't programmed before.\n\n\u003cbr\u003e\n\n**// My favorite Python projects and packages**\n\n- [The IPython Notebook](http://ipython.org/notebook.html) - An interactive computational environment for combining code execution, documentation (with Markdown and LateX support), inline plots, and rich media all in one document.\n\n- [matplotlib](http://matplotlib.org) - Python's favorite plotting library.\n\n- [NumPy](http://www.numpy.org) - A library for multi-dimensional arrays and matrices, along with a large library of high-level mathematical functions to operate on these arrays.\n\n- [SciPy](http://www.scipy.org) - A library that provides various useful functions for numerical computing, such as modules for optimization, linear algebra, integration, interpolation, ...\n\n\n- [pandas](http://pandas.pydata.org) - High-performance, easy-to-use data structures and data analysis tools build on top of NumPy.\n\n- [Cython](http://cython.org) - C-extensions for Python, an optimizing static compiler to combine Python and C code.\n\n- [Numba](http://numba.pydata.org) - A just-in-time specializing compiler which compiles annotated Python and NumPy code to LLVM (through decorators)\n\n- [scikit-learn](http://scikit-learn.org/stable/) - A powerful machine learning library for Python and tools for efficient data mining and analysis.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frasbt%2Fpython_reference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frasbt%2Fpython_reference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frasbt%2Fpython_reference/lists"}