+
+# Version `0.0.0`
+
+Date: October 9, 2018
+
+### Algorithms:
+
+- Sorting
+ - Bubble Sort
+- Searches
+ - Merge Sort
diff --git a/python-lib-master/docs/CNAME b/python-lib-master/docs/CNAME
new file mode 100644
index 0000000..e92b9fe
--- /dev/null
+++ b/python-lib-master/docs/CNAME
@@ -0,0 +1 @@
+python.allalgorithms.com
\ No newline at end of file
diff --git a/python-lib-master/docs/readme.md b/python-lib-master/docs/readme.md
new file mode 100644
index 0000000..2995cc4
--- /dev/null
+++ b/python-lib-master/docs/readme.md
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+ The All ▲lgorithms Python library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ python.allalgorithms.com
+
+
+# Why?
+
+- Why not 😂
+- Clean and focused
+- Actively maintained
+- Because All Algorithms should easy to use in Python
+
+Read the detailed documentation at [python.allalgorithms.com](https://python.allalgorithms.com) or see [Tree](#tree).
+
+## Install
+
+```
+pip install allalgorithms
+```
+
+## Usage Example
+
+```py
+from allalgorithms.searches import binary_search
+
+arr = [-2, 1, 2, 7, 10, 77]
+
+print(binary_search(arr, 7))
+# -> 3
+
+print(binary_search(arr, 3))
+# -> None
+```
+
+# Tree
+
+- Searches
+ - [Binary Search](searches/binary-search)
+- Sorting
+ - [Merge Sort](sorting/merge-sort)
+
+
+# Related
+
+- [javascript-lib](https://github.com/abranhe/javascript-lib): All ▲lgorithms Javascript library
+
+# Maintainers
+
+|[![Carlos Abraham Logo][3]][4]|
+| :--------------------------: |
+| [Carlos Abraham][4] |
+
+
+# License
+
+[MIT][5] License © [Carlos Abraham][4]
+
+
+[1]: https://cdn.abranhe.com/projects/algorithms/badge.svg
+[2]: https://github.com/abranhe/python-lib
+[3]: https://avatars3.githubusercontent.com/u/21347264?s=50
+[4]: https://github.com/abranhe
+[5]: https://github.com/abranhe/python-lib/blob/master/LICENSE
+
+
+
diff --git a/python-lib-master/docs/searches/binary-search.md b/python-lib-master/docs/searches/binary-search.md
new file mode 100644
index 0000000..1ad9e7a
--- /dev/null
+++ b/python-lib-master/docs/searches/binary-search.md
@@ -0,0 +1,34 @@
+# Binary Search
+
+In computer science, binary search, also known as half-interval search, logarithmic search, or binary chop, is a search algorithm that finds the position of a target value within a sorted array
+
+## Install
+
+```
+pip install allalgorithms
+```
+
+## Usage
+
+```py
+from allalgorithms.searches import binary_search
+
+arr = [-2, 1, 2, 7, 10, 77]
+
+print(binary_search(arr, 7))
+# -> 3
+
+print(binary_search(arr, 3))
+# -> None
+```
+
+## API
+
+### binary_search(array, query)
+
+> Return array index if its found, otherwise returns `None`
+
+##### Params:
+
+- `array`: Sorted Array
+- `query`: Element to search for in the array
diff --git a/python-lib-master/docs/sorting/merge-sort.md b/python-lib-master/docs/sorting/merge-sort.md
new file mode 100644
index 0000000..fe17d9c
--- /dev/null
+++ b/python-lib-master/docs/sorting/merge-sort.md
@@ -0,0 +1,30 @@
+# Merge Sort
+
+In computer science, merge sort is an efficient, general-purpose, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output
+
+## Install
+
+```
+pip install allalgorithms
+```
+
+## Usage
+
+```py
+from allalgorithms.sorting import merge_sort
+
+arr = [77, 2, 10, -2, 1, 7]
+
+print(merge_sort(arr))
+# -> [-2, 1, 2, 7, 10, 77]
+```
+
+## API
+
+### merge_sort(array)
+
+> Returns a sorted array
+
+##### Params:
+
+- `array`: Unsorted Array
diff --git a/python-lib-master/license b/python-lib-master/license
new file mode 100644
index 0000000..587f768
--- /dev/null
+++ b/python-lib-master/license
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Abraham Hernandez
(abranhe.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/python-lib-master/readme.md b/python-lib-master/readme.md
new file mode 100644
index 0000000..2a480f2
--- /dev/null
+++ b/python-lib-master/readme.md
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+ The All ▲lgorithms Python library
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ python.allalgorithms.com
+
+
+# Why?
+
+- Why not 😂
+- Clean and focused
+- Actively maintained
+- Because All Algorithms should be easy to use in Python
+
+Read the detailed documentation at [python.allalgorithms.com](https://python.allalgorithms.com) or see the [`docs`](https://github.com/abranhe/python-lib/blob/master/docs) directory on Github. See [Tree](#tree).
+
+## Install
+
+```
+pip install allalgorithms
+```
+
+## Usage Example
+
+```py
+from allalgorithms.searches import binary_search
+
+arr = [-2, 1, 2, 7, 10, 77]
+
+print(binary_search(arr, 7))
+# -> 3
+
+print(binary_search(arr, 3))
+# -> None
+```
+
+# Tree
+
+- Searches
+ - [Binary Search](https://python.allalgorithms.com/searches/binary-search)
+- Sorting
+ - [Merge Sort](https://python.allalgorithms.com/sorting/merge-sort)
+
+
+# Related
+
+- [javascript-lib](https://github.com/abranhe/javascript-lib): All ▲lgorithms Javascript library
+
+# Maintainers
+
+|[![Carlos Abraham Logo][3]][4]|
+| :--------------------------: |
+| [Carlos Abraham][4] |
+
+
+# License
+
+[MIT][5] License © [Carlos Abraham][4]
+
+
+[1]: https://cdn.abranhe.com/projects/algorithms/badge.svg
+[2]: https://github.com/abranhe/python-lib
+[3]: https://avatars3.githubusercontent.com/u/21347264?s=50
+[4]: https://github.com/abranhe
+[5]: https://github.com/abranhe/python-lib/blob/master/LICENSE
+
+
+
diff --git a/python-lib-master/setup.py b/python-lib-master/setup.py
new file mode 100644
index 0000000..c8eca1f
--- /dev/null
+++ b/python-lib-master/setup.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import setuptools
+
+with open("readme.md", "r", encoding="utf-8") as readme:
+ long_description = readme.read()
+
+setuptools.setup(
+ name = "allalgorithms",
+ packages = ["allalgorithms"],
+ long_description = long_description,
+ long_description_content_type = "text/markdown",
+ version = "0.0.0",
+ description = "All Algorithms in Python",
+ author = "Carlos Abraham",
+ author_email = "abraham@abranhe.com",
+ url = "https://python.allalgorithms.com",
+ license='MIT',
+ classifiers=(
+ "Programming Language :: Python",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: MIT License",
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.2',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
+ ),
+ project_urls={
+ 'Source': 'https://github.com/abranhe/python-lib',
+ },
+)
diff --git a/python-lib-master/tests/test_searches.py b/python-lib-master/tests/test_searches.py
new file mode 100644
index 0000000..edee228
--- /dev/null
+++ b/python-lib-master/tests/test_searches.py
@@ -0,0 +1,17 @@
+from allalgorithms.searches import (
+ binary_search
+)
+
+import unittest
+
+class TestSearches(unittest.TestCase):
+
+ def test_binary_search(self):
+ arr = [1, 2, 3, 7, 10, 19, 27, 77]
+ self.assertEqual(3, binary_search(arr, 7))
+ self.assertEqual(7, binary_search(arr, 77))
+ self.assertEqual(None, binary_search(arr, 8))
+ self.assertEqual(None, binary_search(arr, -1))
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/python-lib-master/tests/test_sorting.py b/python-lib-master/tests/test_sorting.py
new file mode 100644
index 0000000..09db9de
--- /dev/null
+++ b/python-lib-master/tests/test_sorting.py
@@ -0,0 +1,12 @@
+from allalgorithms.sorting import (
+ merge_sort
+)
+import unittest
+
+class TestSorting(unittest.TestCase):
+
+ def test_merge_sort(self):
+ self.assertEqual([-44, 1, 2, 3, 7, 19], merge_sort([7, 3, 2, 19, -44, 1]))
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/python-lib-master/tests_requirements.txt b/python-lib-master/tests_requirements.txt
new file mode 100644
index 0000000..7a3e47c
--- /dev/null
+++ b/python-lib-master/tests_requirements.txt
@@ -0,0 +1,6 @@
+flake8
+python-coveralls
+coverage
+nose
+pytest
+tox
diff --git a/python-lib-master/tox.ini b/python-lib-master/tox.ini
new file mode 100644
index 0000000..85bf226
--- /dev/null
+++ b/python-lib-master/tox.ini
@@ -0,0 +1,64 @@
+[tox]
+envlist =
+ py34
+ py35
+ py36
+ coverage
+
+[testenv]
+passenv = TRAVIS TRAVIS_*
+basepython =
+ py34: python3.4
+ py35: python3.5
+ py36: python3.6
+ py37: python3.7
+deps =
+ coverage
+ coveralls
+commands =
+ coverage run --source=tests,allalgorithms -m unittest discover tests
+ coverage report -m
+ coveralls
+
+[testenv:py34]
+passenv = CI TRAVIS TRAVIS_*
+basepython =
+ python3.4
+deps =
+ pytest
+commands =
+ python3 -m unittest discover tests
+ python3 -m pytest tests
+
+[testenv:py35]
+passenv = CI TRAVIS TRAVIS_*
+basepython =
+ python3.5
+deps =
+ pytest
+commands =
+ python3 -m unittest discover tests
+ python3 -m pytest tests
+
+[testenv:py36]
+passenv = CI TRAVIS TRAVIS_*
+basepython =
+ python3.4
+deps =
+ pytest
+commands =
+ python3 -m unittest discover tests
+ python3 -m pytest tests
+
+[testenv:coverage]
+passenv = CI TRAVIS TRAVIS_*
+skip_install = True
+basepython =
+ python3.5
+commands =
+ coverage run --source=tests,allalgorithms -m unittest discover tests
+ coverage report -m
+ coveralls
+deps =
+ coverage
+ coveralls