python_reference/README.md

176 lines
12 KiB
Markdown
Raw Normal View History

2014-07-09 15:42:48 +00:00
### A collection of useful scripts, tutorials, and other Python-related things
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)
- [// Benchmarks](#-benchmarks)
- [// Other](#-other)
- [// Useful scripts and snippets](#-useful-scripts-and-snippets)
- [// 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
2014-05-23 04:51:01 +00:00
###// Python tips and tutorials
2014-07-09 15:42:48 +00:00
[[back to top](#a-collection-of-useful-scripts-tutorials-and-other-python-related-things)]
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)]
<br>
###// Python and the web
2014-07-09 15:42:48 +00:00
[[back to top](#a-collection-of-useful-scripts-tutorials-and-other-python-related-things)]
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)]
- 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>
###// Algorithms
2014-07-09 15:42:48 +00:00
[[back to top](#a-collection-of-useful-scripts-tutorials-and-other-python-related-things)]
2014-06-01 16:59:24 +00:00
2014-06-16 17:07:51 +00:00
*The algorithms category was moved to a separate GitHub repository [rasbt/algorithms_in_ipython_notebooks](https://github.com/rasbt/algorithms_in_ipython_notebooks)*
- Sorting Algorithms [[IPython nb](http://nbviewer.ipython.org/github/rasbt/algorithms_in_ipython_notebooks/blob/master/ipython_nbs/sorting/sorting_algorithms.ipynb?create=1)]
- 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-06-01 16:59:24 +00:00
- Sequential Selection Algorithms [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/sorting_csvs.ipynb)]
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)]
2014-05-23 04:51:01 +00:00
<br>
2014-06-01 16:59:24 +00:00
###// Benchmarks
2014-07-09 15:42:48 +00:00
[[back to top](#a-collection-of-useful-scripts-tutorials-and-other-python-related-things)]
2014-05-12 19:25:31 +00:00
2014-07-06 15:09:31 +00:00
*The benchmark category was moved to a separate GitHub repository [One-Python-benchmark-per-day](https://github.com/rasbt/One-Python-benchmark-per-day)*
- **1** - Reversing strings [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day1_string_reverse.ipynb)]
- **2** - Calculating sample means [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day2_mean_values.ipynb)]
- **3** - 6 different ways to count elements using a dict [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day3_dictionary_counting.ipynb)]
- **4** - Python vs. Cython vs. Numba [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day4_python_cython_numba.ipynb)]
- **4.2** - (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)]
- **5** - Comparing 9 ways for flattening lists of sublists [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day5_flattening_lists.ipynb)]
- **6** - Determining if a string is a number [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day6_string_is_number.ipynb)]
- **7** - Speeding up NumPy array expressions with Numexpr [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day7_numpy_numexpr.ipynb)]
- **7.2** - 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)]
- **8** - Calculating square roots and exponents [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day8_sqrt_and_exp.ipynb)]
- **9** - The most Pythonic way to check if a string ends with a particular substring [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day9_string_endswith.ipynb)]
- **10** - 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)]
- **11** - The `deque` container data type [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day11_deque_container.ipynb)]
- **12** - Lightning fast insertion into sorted lists via the `bisect` module [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day12_insert_into_sorted_list.ipynb)]
- **13** - Parallel processing via the multiprocessing module [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/multiprocessing_intro.ipynb)]
- **14** - Python's and NumPy's in-place operator functions [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day14_inplace_operators.ipynb)]
- **15** - Array indexing in NumPy: Extracting rows and columns [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day15_array_indexing_numpy.ipynb)]
- **16** - 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)]
- **17** - Stacking NumPy arrays [[IPython nb](http://nbviewer.ipython.org/github/rasbt/One-Python-benchmark-per-day/blob/master/ipython_nbs/day17_numpy_stacking.ipynb)]
2014-05-12 19:25:31 +00:00
2014-06-01 16:59:24 +00:00
###// Other
2014-07-09 15:42:48 +00:00
[[back to top](#a-collection-of-useful-scripts-tutorials-and-other-python-related-things)]
2014-05-23 04:56:23 +00:00
2014-07-06 15:09:31 +00:00
- Happy Mother's [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/other/happy_mothers_day.ipynb?create=1)]
2014-05-12 19:25:31 +00:00
2014-06-06 03:40:21 +00:00
- Numeric matrix manipulation - The cheat sheet for MATLAB, Python NumPy, R, and Julia [[Markdown](./tutorials/matrix_cheatsheet.md)]
2014-07-06 14:49:05 +00:00
- Python Book Reviews [[Markdown](./other/python_book_reviews.md)]
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
2014-06-01 16:59:24 +00:00
###// Useful scripts and snippets
2014-07-09 15:42:48 +00:00
[[back to top](#a-collection-of-useful-scripts-tutorials-and-other-python-related-things)]
2014-05-21 21:17:45 +00:00
2014-06-28 18:06:33 +00:00
- [IPython magic function %watermark](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/ipython_magic/watermark.ipynb) - for printing date- and time-stamps and various system info
2014-06-28 05:15:40 +00:00
2014-06-01 16:59:24 +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
2014-05-23 04:56:23 +00:00
- convert 'tab-delimited' to 'comma-separated' CSV files [[IPython nb](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/useful_scripts/fix_tab_csv.ipynb?create=1)]
2014-06-16 15:31:43 +00:00
2014-06-19 04:32:43 +00:00
- A random string generator [function](./useful_scripts/random_string_generator.py)
2014-06-16 15:31:43 +00:00
<br>
###// Links
2014-07-09 15:42:48 +00:00
[[back to top](#a-collection-of-useful-scripts-tutorials-and-other-python-related-things)]
2014-06-16 15:31:43 +00:00
- [PyPI - the Python Package Index](https://pypi.python.org/pypi) - the official repository for all open source Python modules and packages
- [PEP 8](http://legacy.python.org/dev/peps/pep-0008/) - The official style guide for Python code
**// News**
- [Python subreddit](http://www.reddit.com/r/Python/) - my favorite resource to catch up with Python news and great Python-related articles
- [Python community on Google+](https://plus.google.com/communities/103393744324769547228) - a nice and friendly community to share and discuss everything about Python
- [Python Weekly](http://www.pythonweekly.com) - A free weekly newsletter featuring curated news, articles, new releases, jobs etc. related to Python
**// Resources for learning Python**
- [Learn Python The Hard Way](http://learnpythonthehardway.org/book/) - one of the most popular and recommended resources for learning Python
- [Dive Into Python](http://www.diveintopython.net) / [Dive Into Python 3](http://getpython3.com/diveintopython3/) - a free Python book for experienced programmers
- [The Hitchhikers Guide to Python](http://docs.python-guide.org/en/latest/) - a free best-practice handbook for both novices and experts
- [Think Python - How to Think Like a Computer Scientist](http://www.greenteapress.com/thinkpython/) - an introduction for beginners starting with basic concepts of programming
**// My favorite Python projects and packages**
- [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.
- [SciPy Stack](http://www.scipy.org/index.html) - Python packages (NumPy, pandas, SciPy, IPython, Matplotlib) for scientific computing
- [Cython](http://cython.org) - C-extensions for Python, an optimizing static compiler to combine Python and C code
2014-06-30 02:21:05 +00:00
- [Numba](http://numba.pydata.org) - an just-in-time specializing compiler which compiles annotated Python and NumPy code to LLVM (through decorators)
2014-07-09 15:42:48 +00:00
- [scikit-learn](http://scikit-learn.org/stable/) - a powerful machine learning library for Python and tools for efficient data mining and analysis