* Add: Time Conversion Function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update conversions/time_conversions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* fix: required changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: err
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update time_conversions.py
---------
Co-authored-by: Jeel Gajera <jeelgajera00@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added Octal to Hexadecimal Conversion program under 'conversions' directory
* Update conversions/octal_to_hexadecimal.py
fix: minor improvement to directly return hexadecimal value
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update conversions/octal_to_hexadecimal.py
fix: improvement updates to octal to hexadecimal
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update conversions/octal_to_hexadecimal.py
fix: Readablility improvements to octal to hexadecimal convertor
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update conversions/octal_to_hexadecimal.py
fix: readability improvements in octal_to_hexadecimal.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update conversions/octal_to_hexadecimal.py
fix: readability improvements in octal_to_hexadecimal.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* fix: Fixed all the errors in octal_to_hexadecimal.py after commiting suggested changes
* fix: modified the prefix of hex numbers to the '0x' standard in octal_to_hexadecimal.py
---------
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Octal to Binary Convert
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* mention return type
* code scratch
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* mentioned return type
* remove comment
* added documention and some test cases
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add another test case
* fixes documention
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Documention and test cases added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* documention problem solved
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* error in exit 1
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
---------
Co-authored-by: BamaCharanChhandogi <b.c.chhandogi@gmailcom>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Move and reimplement convert_number_to_words.py
- Move convert_number_to_words.py from web_programming/ to conversions/
- Reimplement the algorithm from scratch because the logic was very
opaque and too heavily nested
- Add support for the Western numbering system (both short and long)
because the original implementation only supported the Indian
numbering system
- Add extensive doctests and error handling
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Fix ruff errors
Renamed neural_network/input_data.py to neural_network/input_data.py_tf
because it should be left out of the directory for the following
reasons:
1. Its sole purpose is to be used by neural_network/gan.py_tf, which is
itself left out of the directory because of issues with TensorFlow.
2. It was taken directly from TensorFlow's codebase and is actually
already deprecated. If/when neural_network/gan.py_tf is eventually
re-added back to the directory, its implementation should be changed
to not use neural_network/input_data.py anyway.
* updating DIRECTORY.md
* Change input_data.py_tf file extension
Change input_data.py_tf file extension because algorithms-keeper bot is being picky about it
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* pre-commit: Upgrade psf/black for stable style 2023
Updating https://github.com/psf/black ... updating 22.12.0 -> 23.1.0 for their `2023 stable style`.
* https://github.com/psf/black/blob/main/CHANGES.md#2310
> This is the first [psf/black] release of 2023, and following our stability policy, it comes with a number of improvements to our stable style…
Also, add https://github.com/tox-dev/pyproject-fmt and https://github.com/abravalheri/validate-pyproject to pre-commit.
I only modified `.pre-commit-config.yaml` and all other files were modified by pre-commit.ci and psf/black.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update README.md
Added Google Cirq references
* Create barcode_validator.py
Barcode/EAN validator
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Included docstring and updated variables to snake_case
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Included docset and updated bugs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Implemented the changes asked in review.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Updated with f-string format
* Update barcode_validator.py
* Update volume_conversions.py
Simpler doctest output
* Create speed_conversions.py
Conversion of speed units
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update speed_conversions.py
Doctests updated, dictionary implemented.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update speed_conversions.py
Reduced LOC
* Update volume_conversions.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update README.md
Added Google Cirq references
* Create barcode_validator.py
Barcode/EAN validator
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Included docstring and updated variables to snake_case
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Included docset and updated bugs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Implemented the changes asked in review.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update barcode_validator.py
Updated with f-string format
* Update barcode_validator.py
* Update volume_conversions.py
Simpler doctest output
* Update volume_conversions.py
Fixed indentation
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added excel column title to number algorithm as part of conversions
* Renamed file to better reflect algorithm function
* Removed duplicate file
* Update excel_title_to_column.py
* Update excel_title_to_column.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Fixed bug where array length 2 can't be sorted
* Add MCC and DU path test
Add test to conversions/octal_to_decimal.py and sorts\iterative_merge_sort.py
* ""
* Update octal_to_decimal.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* First commit for add_prefix_conversion
* Class names in CamelCase, str.format() to f-string
* Fixed following pre-commit guidelines
* solved issues with mypy and enum.Enum
* Rename add_prefix_conversion.py to prefix_conversions_string.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* add 5 README files
* empty commit to (hopefully) get rid of the `test-are-failling` label
* Update ciphers/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update conversions/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update cellular_automata/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update computer_vision/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update conversions/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update compression/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Add stone unit of measuring weight
And some tests in the docs using an external calculator. Not yet tested if they pass.
* Fix rounding descrepencies in doctests to pass tests
* Added physical pressure units
This uses tuple pair which stores units required to be converted to respective other units as mentioned.
Available Units:- Pascal,Bar,Kilopascal,Megapascal,psi(pound per square inch),inHg(in mercury column),torr,atm
* Formatted file
File was formatted as per repo rules
* Reformatted file :)
* Added more reference
* More reference added
* Added volume conversions
This is a file which has relevant function which helps in conversion between volume units.
Available Units:- Cubic metre,Litre,KiloLitre,Gallon,Cubic yard,Cubic foot,cup
The file is also written in a way that , adding a new unit can easily be done by modifying tuple available in the source code
* Formatted file
The file was formatted to follow the syntax formatting rules of the repo
* Formatted file further
* Remove exception detail from doctest
These details are configuration dependant so should be removed according to https://docs.python.org/3/library/doctest.html
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added length unit conversions
Conversion of length units were added with respective tests being implemented and passed.
Available Units:- Metre,Kilometre,Feet,Inch,Centimeter,Yard,Foot,Mile,Millimeter
* Formatted File
File was formatted to go as per repo rules
* Reformatted file
* Reformatted code once again
* Added more test
Added test to evaluate whether the code handles wrong arguements passed
* Update length_conversions.py
* Update length_conversions.py
* Update length_conversions.py
* Update length_conversions.py
* Update length_conversions.py
* Update length_conversions.py
* Update length_conversions.py
* Fixed Minor errors in test
One of the test was failing and it was fixed
Co-authored-by: Christian Clauss <cclauss@me.com>
* add integer to roman function
simply added fastest method i found.
* Rename roman_to_integer.py to roman_numerals.py
* Update roman_numerals.py
* Update roman_numerals.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added decimal_to_binary_recursion.py
* Added decimal_to_binary_recursion.py
* Made changes to docstring
* Use divmod()
* binary_recursive(div) + str(mod)
* Be kind with user input if possible
* Update decimal_to_binary_recursion.py
* ValueError: invalid literal for int() with base 10: 'number'
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update and rename bin_to_octal.py to binary_to_octal.py
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>