python_reference/README.md

221 lines
12 KiB
Markdown
Raw Permalink Normal View History

2017-04-24 09:59:01 +00:00
<h3 id="top">A collection of useful scripts, tutorials, and other Python-related things</h3>
2014-06-01 16:59:24 +00:00
<br>
2014-07-09 15:42:48 +00:00
<img src="./Images/python-logo-master-v3-TM-flattened.png" alt="">
2014-04-13 23:22:30 +00:00
2014-07-09 15:42:48 +00:00
<div style="height:100px;"></div>
2014-05-22 03:47:27 +00:00
2014-07-09 15:42:48 +00:00
- [// Python tips and tutorials](#-python-tips-and-tutorials)
- [// Python and the web](#-python-and-the-web)
- [// Algorithms](#-algorithms)
2014-07-16 04:44:54 +00:00
- [// Plotting and Visualization](#-plotting-and-visualization)
2014-07-09 15:42:48 +00:00
- [// Benchmarks](#-benchmarks)
2014-08-05 05:13:58 +00:00
- [// Python and "Data Science"](#-python-and-data-science)
2014-07-09 15:42:48 +00:00
- [// Useful scripts and snippets](#-useful-scripts-and-snippets)
2017-04-24 09:59:01 +00:00
- [// Other](#-other)
2014-07-09 15:42:48 +00:00
- [// Links](#-links)
2014-05-22 04:53:15 +00:00
2014-05-22 03:47:27 +00:00
2014-05-12 19:25:31 +00:00
2014-07-09 15:42:48 +00:00
<div style="height:100px;"></div>
2014-05-14 02:43:03 +00:00
2017-04-24 09:59:01 +00:00
<b id="-python-tips-and-tutorials">Python tips and tutorials</b> <a href="#top">[back to top]</a>
2014-05-12 19:25:31 +00:00
2014-06-01 16:59:24 +00:00
- 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)]
2014-05-23 04:56:23 +00:00
- 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)]
- 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)]
2014-05-23 04:56:23 +00:00
2014-07-06 15:09:31 +00:00
- A thorough guide to SQLite database operations in Python [[Markdown](./tutorials/sqlite3_howto/README.md)]
2014-05-23 04:56:23 +00:00
- Unit testing in Python - Why we want to make it a habit [[Markdown](./tutorials/unit_testing.md)]
- Installing Scientific Packages for Python3 on MacOS 10.9 Mavericks [[Markdown](./tutorials/installing_scientific_packages.md)]
2014-05-14 02:44:46 +00:00
- Sorting CSV files using the Python csv module [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/sorting_csvs.ipynb)]
2014-05-14 02:43:03 +00:00
2014-06-12 13:52:01 +00:00
- Using Cython with and without IPython magic [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/running_cython.ipynb)]
2014-06-19 21:57:31 +00:00
- Parallel processing via the multiprocessing module [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/multiprocessing_intro.ipynb?create=1)]
2014-06-12 13:52:01 +00:00
2014-06-25 22:07:49 +00:00
- 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)]
2014-06-27 15:32:22 +00:00
- 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)]
2014-05-14 02:43:03 +00:00
2014-07-06 14:49:05 +00:00
- A collection of useful regular expressions [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/useful_regex.ipynb)]
2014-07-30 19:32:25 +00:00
- 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)]
2014-09-26 22:07:47 +00:00
- A random collection of useful Python snippets [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/python_patterns/patterns.ipynb)]
2015-01-24 05:03:50 +00:00
- 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)]
<br>
2017-04-24 09:59:01 +00:00
<b id="-python-and-the-web">Python and the web</b> <a href="#top">[back to top]</a>
2014-06-01 16:59:24 +00:00
- 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)]
2016-04-10 22:53:57 +00:00
- Converting Markdown to HTML and adding Python syntax highlighting [[Markdown](./tutorials/markdown_syntax_highlighting/README.md)]
2014-06-01 16:59:24 +00:00
<br>
2017-04-24 09:59:01 +00:00
<b id="-algorithms">Algorithms and Data Structures</b> <a href="#top">[back to top]</a>
2014-06-01 16:59:24 +00:00
2016-05-10 01:41:40 +00:00
*This category has been moved to a separate GitHub repository [rasbt/algorithms_in_ipython_notebooks](https://github.com/rasbt/algorithms_in_ipython_notebooks)*
2014-06-16 17:07:51 +00:00
2019-04-09 02:38:51 +00:00
- Sorting Algorithms [[Collection of IPython Notebooks](https://github.com/rasbt/algorithms_in_ipython_notebooks/tree/master/ipython_nbs/sorting)
2014-06-16 17:07:51 +00:00
- 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)]
2014-06-16 20:53:05 +00:00
- 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)]
2014-06-16 17:07:51 +00:00
2014-07-06 15:09:31 +00:00
- 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)]
2016-05-10 01:41:40 +00:00
- 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)]
2014-07-16 04:44:54 +00:00
<br>
2017-04-24 09:59:01 +00:00
<b id="-plotting-and-visualization">Plotting and Visualization</b> <a href="#top">[back to top]</a>
2014-07-16 04:44:54 +00:00
2014-08-05 05:12:12 +00:00
*The matplotlib-gallery in IPython notebooks has been moved to a separate GitHub repository [matplotlib-gallery](https://github.com/rasbt/matplotlib-gallery)*
**Featured articles**:
- Preparing Plots for Publication [[IPython nb](http://nbviewer.ipython.org/github/rasbt/matplotlib-gallery/blob/master/ipynb/publication.ipynb)]
2014-07-16 04:44:54 +00:00
2014-08-05 05:12:12 +00:00
<br>
2017-04-24 09:59:01 +00:00
<b id="-benchmarks">Benchmarks</b> <a href="#top">[back to top]</a>
2014-05-23 04:56:23 +00:00
2014-12-24 03:33:39 +00:00
- 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)]
<br>
*More benchmarks can be found in the separate GitHub repository [One-Python-benchmark-per-day](https://github.com/rasbt/One-Python-benchmark-per-day)*
2014-08-05 05:12:12 +00:00
**Featured articles**:
2014-12-24 03:33:39 +00:00
2014-08-05 05:12:12 +00:00
- (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)]
2014-08-05 05:15:18 +00:00
2014-08-05 05:12:12 +00:00
- 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)]
2014-08-05 05:15:18 +00:00
2014-08-05 05:12:12 +00:00
- 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)]
2014-08-05 05:15:18 +00:00
2014-08-05 05:12:12 +00:00
- Parallel processing via the multiprocessing module [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/multiprocessing_intro.ipynb)]
2014-08-05 05:15:18 +00:00
2014-08-05 05:12:12 +00:00
- 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)]
2016-04-10 22:53:57 +00:00
<br>
2014-08-05 05:12:12 +00:00
2017-04-24 09:59:01 +00:00
<b id="-python-and-data-science">Python and "Data Science"</b> <a href="#top">[back to top]</a>
2014-08-05 05:12:12 +00:00
*The "data science"-related posts have been moved to a separate GitHub repository [pattern_classification](https://github.com/rasbt/pattern_classification)*
**Featured articles**:
2014-05-12 19:25:31 +00:00
2014-08-05 05:12:12 +00:00
- 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)]
2014-08-05 05:15:18 +00:00
2014-08-05 05:12:12 +00:00
- 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)]
2014-08-05 05:15:18 +00:00
2014-08-05 05:12:12 +00:00
- Principal Component Analysis (PCA) [[IPython nb](http://nbviewer.ipython.org/github/rasbt/pattern_classification/blob/master/dimensionality_reduction/projection/principal_component_analysis.ipynb)]
2014-08-05 05:15:18 +00:00
2014-08-05 05:12:12 +00:00
- Linear Discriminant Analysis (LDA) [[IPython nb](http://nbviewer.ipython.org/github/rasbt/pattern_classification/blob/master/dimensionality_reduction/projection/linear_discriminant_analysis.ipynb)]
2014-08-05 05:15:18 +00:00
2014-08-05 05:12:12 +00:00
- 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)]
2014-06-06 03:40:21 +00:00
2014-05-23 04:51:01 +00:00
<br>
2014-05-12 19:25:31 +00:00
2017-04-24 09:59:01 +00:00
<b id="-useful-scripts-and-snippets">Useful scripts and snippets</b> <a href="#top">[back to top]</a>
2014-05-21 21:17:45 +00:00
2014-07-30 04:22:19 +00:00
- [watermark](https://github.com/rasbt/watermark) - An IPython magic extension for printing date and time stamps, version numbers, and hardware information.
2014-06-28 05:15:40 +00:00
2014-08-20 03:14:00 +00:00
- [Shell script](./useful_scripts/prepend_python_shebang.sh) For prepending Python-shebangs to .py files.
2014-05-12 19:25:31 +00:00
2015-02-06 16:58:24 +00:00
- A random string generator [function](./useful_scripts/random_string_generator.py).
2014-06-19 04:32:43 +00:00
2015-02-06 16:58:24 +00:00
- [Converting large CSV files](https://github.com/rasbt/python_reference/blob/master/useful_scripts/large_csv_to_sqlite.py) to SQLite databases using pandas.
2014-06-19 04:32:43 +00:00
2015-02-06 16:58:24 +00:00
- [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.
2014-06-16 15:31:43 +00:00
<br>
2017-04-24 09:59:01 +00:00
<b id="-other">Other</b> <a href="#top">[back to top]</a>
2016-04-10 22:53:57 +00:00
- [Python book reviews](./other/python_book_reviews.md)
- [Happy Mother's Day Plot](./other/happy_mothers_day.ipynb)
<br>
2014-06-16 15:31:43 +00:00
2017-04-24 09:59:01 +00:00
<b id="-links">Links</b> <a href="#top">[back to top]</a>
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
- [PyPI - the Python Package Index](https://pypi.python.org/pypi) - The official repository for all open source Python modules and packages.
2014-06-16 15:31:43 +00:00
2015-02-20 01:51:20 +00:00
- [PEP 8](https://www.python.org/dev/peps/pep-0008/) - The official style guide for Python code.
- [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)
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
<br>
2014-06-16 15:31:43 +00:00
**// News**
2014-08-20 03:14:00 +00:00
- [Python subreddit](http://www.reddit.com/r/Python/) - My favorite resource to catch up with Python news and great Python-related articles.
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
- [Python community on Google+](https://plus.google.com/communities/103393744324769547228) - A nice and friendly community to share and discuss everything about Python.
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
- [Python Weekly](http://www.pythonweekly.com) - A free weekly newsletter featuring curated news, articles, new releases, jobs etc. related to Python.
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
<br>
2014-06-16 15:31:43 +00:00
**// Resources for learning Python**
2014-08-20 03:14:00 +00:00
- [Dive Into Python](http://www.diveintopython.net) / [Dive Into Python 3](http://getpython3.com/diveintopython3/) - A free Python book for experienced programmers.
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
- [The Hitchhikers Guide to Python](http://docs.python-guide.org/en/latest/) - A free best-practice handbook for both novices and experts.
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
- [Think Python - How to Think Like a Computer Scientist](http://www.greenteapress.com/thinkpython/) - An introduction for beginners starting with basic concepts of programming.
2014-06-16 15:31:43 +00:00
- [A Byte of Python](https://python.swaroopch.com/) - a free book on programming using the Python language.
2014-08-20 03:45:06 +00:00
- [Python Patterns](http://matthiaseisen.com/pp/) - A directory of proven, reusable solutions to common programming problems.
2014-08-20 03:14:00 +00:00
2016-12-07 04:57:04 +00:00
- [Intro to Computer Science - Build a Search Engine & 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.
2014-08-20 03:14:00 +00:00
<br>
2014-06-16 15:31:43 +00:00
**// My favorite Python projects and packages**
2014-08-20 03:14:00 +00:00
- [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.
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
- [matplotlib](http://matplotlib.org) - Python's favorite plotting library.
2014-07-14 19:47:15 +00:00
2014-08-20 03:14:00 +00:00
- [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.
2014-07-14 19:47:15 +00:00
2014-08-20 03:14:00 +00:00
- [SciPy](http://www.scipy.org) - A library that provides various useful functions for numerical computing, such as modules for optimization, linear algebra, integration, interpolation, ...
2014-07-14 19:47:15 +00:00
2014-08-20 03:14:00 +00:00
- [pandas](http://pandas.pydata.org) - High-performance, easy-to-use data structures and data analysis tools build on top of NumPy.
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
- [Cython](http://cython.org) - C-extensions for Python, an optimizing static compiler to combine Python and C code.
2014-06-16 15:31:43 +00:00
2014-08-20 03:14:00 +00:00
- [Numba](http://numba.pydata.org) - A just-in-time specializing compiler which compiles annotated Python and NumPy code to LLVM (through decorators)
2014-06-30 02:21:05 +00:00
2014-08-20 03:14:00 +00:00
- [scikit-learn](http://scikit-learn.org/stable/) - A powerful machine learning library for Python and tools for efficient data mining and analysis.