* added merge interval problem on the array ds
* removed typing which is deprecated
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor type hints in merge_intervals function
Updated type hints from List to built-in list for compatibility.
* Enhance merge_intervals function documentation
Added edge cases handling and updated complexity notes.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor docstring and type hints in merge_intervals
Updated type hints and docstring formatting in merge_intervals function.
* Refactor merge_intervals function docstring
Updated docstring formatting and improved error message clarity.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update data_structures/arrays/merge_intervals.py
Co-authored-by: priya-sundaram-dev <oc-409d01@agentmail.to>
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: priya-sundaram-dev <oc-409d01@agentmail.to>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* types(reverse_selection): constrain items to Comparable
Bind reverse_selection_sort's element type to a Comparable Protocol so the
signature says "a list of items that can be compared with each other"
instead of a bare list, and keep the element type in the return.
reverse_subarray only swaps elements and never compares them, so its
TypeVar stays unbounded.
Also adds doctests for a comparable non-int type (strings, floats) and for
the failure mode: mixing non-comparable items must raise TypeError rather
than silently mis-sort. The test battery picks the sort up for the shared
cases and for the rejection check.
* updating DIRECTORY.md
---------
Co-authored-by: AuroraAeon <auroraeon@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Add merge sorted array algorithm
* updating DIRECTORY.md
* Validate input arrays for sorting in merge function
Add validation to check if input arrays are sorted.
* Correct error message assignment in merge_sorted_arrays
Fix variable assignment for error message in merge_sorted_arrays function.
* Fix sorted check for input arrays in merge function
---------
Co-authored-by: JainRamyak <JainRamyak@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add similarity test for square matrices
* Fix naming convention: MatrixLike to matrix_like
* Use TypeAlias for proper mypy type checking
* Fix CI errors: use type keyword and fix line length
* Fix docstring formatting in similar_matrices.py
Corrected formatting and punctuation in docstring.
* updating DIRECTORY.md
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Add joaat function for non-cryptographic hashing
Implement the Jenkins-One-At-A-Time hash function.
* Add doctest for joaat function
Added doctest examples for the joaat function and included a main block to run tests.
* Refactor joaat function variable names for prevent shadowing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Rename function to jenkins_one_at_a_time
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* added lstm algorithm in neural network section.
* commented the testing lines of code
* modified code to meet contribution.md file guidelines
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add LSTM algorithm implementation in neural network section
* shorten the individual lines
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* shorten the lines
* Refactor LSTM input data initialization
* Refactor LSTM network implementation and improve code readability
* changed code a bit for meet ruff standards
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor LSTM class to improve code readability and maintainability
* Refactor tqdm import in LSTM class
* Refactor tqdm import in LSTM class
* added doc tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* descriptive names + improved doctests
* Refactor LSTM class: Increase training epochs to 100
* Refactor LSTM class: Improve test method and add comments
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added doct tests for each function
* added type hints in lstm init
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed type hints which were repeating in code
* written doc tests for backward pass and forward pass, fixed variable names in sigmoid function from x to input array
* fixed return type of test function to str from none
* Refactor LSTM implementation and clean up code
Removed author information and unused print statements. Updated parameter names in docstrings for consistency.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Rename stm_model to lstm_model in lstm.py
* Fix parameter name in sigmoid and tanh methods
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Refactor error handling and improve logging
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* httpx --> httpx2
* updating DIRECTORY.md
* Replace httpx with httpx2 for HTTP requests
* [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>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
Per discussion in #15418, these four files are not algorithms (they are
how-to-use scripts wrapping a deep-learning framework) and dragged in the
heavy keras/tensorflow dependency stack:
- computer_vision/cnn_classification.py
- dynamic_programming/k_means_clustering_tensorflow.py
- machine_learning/lstm/lstm_prediction.py
- neural_network/input_data.py (TF MNIST data loader; nothing imports it)
Also removes the now-orphaned machine_learning/lstm/ package (only
__init__.py + sample_data.csv, which served lstm_prediction.py).
Cleanups:
- Drop keras from pyproject.toml dependencies; regenerate uv.lock
(removes absl-py, h5py, keras, ml-dtypes, namex, optree).
- Remove the pre-release libhdf5-dev install step from build.yml and
sphinx.yml (it existed only because keras needs hdf5).
- Drop the four stale pytest --ignore entries in build.yml.
- Remove the four DIRECTORY.md entries and the empty Lstm heading.
* Add XOR-based swap algorithm for two numbers
* updating DIRECTORY.md
* Include additional test case for xor_swap function
Add example for xor_swap with larger integers
---------
Co-authored-by: Balamurugan315 <balamuruganmsde@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Added transitive closure with tests
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix lint issue
* lint fix
* fix line_to_long issue
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* define return type
* added type hint
* fix line_too_long lint error
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix line_too_long
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor transitive closure function for clarity
Updated parameter and return type annotations for clarity. Modified variable names for consistency and corrected comments.
* Refine docstring for transitive_closure function
Updated the docstring to improve clarity and fix grammar.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: I529010 <deepak.jain04@sap.com>
Co-authored-by: Deepak14Jain <Deepak14Jain@users.noreply.github.com>
Co-authored-by: Deepak Jain <93066547+Deepak14Jain@users.noreply.github.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>
* Adding dynamic array implementation
* Adding references
* updating DIRECTORY.md
* Trying to solve pre-commit error of type overload
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Increasing test for dynamic_array.py
---------
Co-authored-by: yashwanth-adimulam <yashwanth-adimulam@users.noreply.github.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>
* Suffix Array and LCP Array Implementation
* Delete divide_and_conquer/suffix_array_lcp.py
* Add files via upload
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor Node class to use dataclass
Refactor Node class to use dataclass for cleaner syntax. Update PersistentSegmentTree methods to maintain functionality with the new Node structure.
* updating DIRECTORY.md
* Refactor PersistentSegmentTree implementation
* Refactor Node initialization and update methods
Refactor Node class to properly initialize value and improve type hints. Update PersistentSegmentTree methods for better clarity and maintainability.
* Apply suggestion from @cclauss
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update persistent_segment_tree.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>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Added edmonds_blossom_algorithm.py. For maximum matching in the graph.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added test for edmonds_blossom_algorithm.py in graph/tests/
Resolved the blossom data naming issue.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* resolved pre commit checks for test_edmonds_blossom_algorithm.py and edmonds_blossom_algorithm.py
* Changes in the main file and test file as test were failing due to stuck in an infinite loop.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Resolved Pre commit errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Resolved per commit checks and unresolved conversations
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Added an algorithm to the strings sub folder which finds the smallest substring of a given string which contains all of the characters in another given string.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Formatting Fixes
* Fixed a spelling issue
* Fixed incorrect function name in test cases
* Fixed incorrect function name in test cases
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added link to leetcode.
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Create README.md
* Update README.md
* Add files via upload
* Delete llm_experiments directory
* Create README.md
* Add files via upload
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add files via upload
* Delete neural_network/chatbot/main.py
* Delete neural_network/chatbot/llm_service.py
* Delete neural_network/chatbot/chatbot.py
* Delete neural_network/chatbot/db.py
* Update README.md
* Add files via upload
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add files via upload
made changes suggested by auto-checker
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add files via upload
* Add files via upload
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Delete neural_network/chatbot directory
* Add files via upload
* Add files via upload
* Add files via upload
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add files via upload
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
* Rename batch_size variable to _batch_size
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Initial Commit: Add algorithms to determine peripheral and farthest nodes in a weighted graph
- Implemented Floyd-Warshall algorithm to calculate all-pairs shortest paths,
supporting positive edge weights for weighted graphs.
- Added functions to identify peripheral and far nodes:
- `find_peripheral_node`: Determines the node with maximal eccentricity.
- `find_far_node`: Finds the node with maximal farness, summing shortest-path distances.
- Included error handling for non-positive edge weights, with appropriate ValueError raising.
- Developed extensive test cases using doctests:
- Covered single-node, fully connected, sparse, cyclic, directed acyclic, and
disconnected graphs.
- Validated handling of edge cases including zero and negative weights.
- Ensured code meets PEP 8 standards and passed all lint checks with `ruff`.
- Provided detailed module-level docstring with explanations of algorithms,
complexity, and example applications.
This commit provides foundational functionality for graph-theoretical analysis
and sets up for future expansions or integrations.
* Refactor main function and update docstring formatting
* updating DIRECTORY.md
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Initial commit: Implement graph centrality algorithms for weighted graphs
- Added core functionality to compute central and median nodes in a weighted graph using:
- Floyd-Warshall algorithm for calculating all-pairs shortest paths
- Eccentricity for determining the central node
- Harmonic closeness centrality for determining the median node
- Developed utility functions to handle graph data and validate positive edge weights
- Included extensive doctests to verify functionality across various graph types:
- Single-node, disconnected, fully connected, cyclic, and directed acyclic graphs (DAGs)
- Improved code modularity and readability by refactoring functions
- Enforced code style and consistency with `ruff` and `black` formatting
- Documented the algorithmic approach, complexity, and example applications in the module docstring
* Implement style changes suggested by bot.
* updating DIRECTORY.md
* Fix formatting and improve documentation clarity
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Added gas_station.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update gas_station.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update gas_station.py
changes done
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update gas_station.py
* Update gas_station.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update gas_station.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update gas_station.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update gas_station.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
* Refactor gas station circuit solution with NamedTuple
* Clarify gas_stations argument description
Updated the argument description for gas_stations to clarify the attributes.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Implementation of streaming moving average
* Added reference to streaming moving average
* fixed a bug and added return type to __init__
* fractional differentiation
* cleaning up fracdiff branch
* updating DIRECTORY.md
* Apply batched suggestions from code review
Co-authored-by: priya-sundaram-dev <oc-409d01@agentmail.to>
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
Co-authored-by: priya-sundaram-dev <oc-409d01@agentmail.to>
* add algorithm to check if given string is valid number or not
Add a new file string_is_valid_number.py in string directory
* resolve comments which is create enum for states and char types extract state machine outside function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* resolve comments which is create enum for states and char types extract state machine outside function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* resolve ruff check failing
* change variable name from s to number_string as it is more descriptive
* rebase branch with master
* resolve comments which is create enum for states and char types extract state machine outside function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* resolve ruff check failing
* resolve ruff check failing
* updating DIRECTORY.md
* Fix link formatting in docstring
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Add algorithm for approximating the nth root with Newton's Method
* updating DIRECTORY.md
* Fix typos in nth_root.py documentation and code
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Create longest_word_in_sentence.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update longest_word_in_sentence.py
* Update longest_word_in_sentence.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update longest_word_in_sentence.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update longest_word_in_sentence.py
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* feat: add CRC32 hash algorithm implementation
- Implement CRC32 with IEEE 802.3 polynomial
- Add 17 comprehensive doctests with edge cases
- Include validation against zlib.crc32()
- Full type hints and English documentation
- Passes ruff and mypy checks
CRC32 is widely used in ZIP, Ethernet, PNG for data integrity.
This adds an important non-cryptographic hash algorithm
that was missing from the repository.
* updating DIRECTORY.md
---------
Co-authored-by: rodrigo.nogueira <rodrigo.nogueira@prf.gov.br>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Added Bresenham Line Algorithm basic version for first quadrant
* Add Generalized Bresenham Line Algorithm (all octants) for Hacktoberfest
* updating DIRECTORY.md
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Add doctests to topo, fix dijk bug and doctest, rename and test floyd_warshall
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Added postfix_to_infix_conversion.py
* Added wikipedia link in postfix_to_infix_conversion.py
* updating DIRECTORY.md
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* add: Minimum Deviation in Array in greedy methods
* min deviation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* min deviation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* min deviation
* min deviation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* min deviation
* min deviation
* min deviation
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Added conic construction file
* Conic section code finalized for preliminary review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixing ISC001 issue
* Fixing variable declaration
* Modify generate method to return a formatted string
Changed the return type of the generate method to str and updated its implementation to return a formatted string instead of printing it.
* updating DIRECTORY.md
* updating DIRECTORY.md
* Clean up comments and improve docstring formatting
Removed commented-out documentation and updated docstring formatting.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add imports for dataclass and numpy
---------
Co-authored-by: AlexB <acbucha@clemson.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* optimize split_matrix function by removing duplicate code to the extract_submatrix function, add tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix test file issues
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix codestyle
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* added star delta converter module
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed typo
* Update star_delta_conversions.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updates star_delta_conversions.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated to handle ac impedances
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2026-09-21 13:32:57 +02:00
Gabrielly de S. Pinto Dantaspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clausspre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
* add tests for enigma_machine
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* typo
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
* Adds pairwise iteration algorithm
* Fixed code typo
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Improve documentation for pairwise_iteration_tee
Updated documentation to clarify the use of pairwise iteration and added a reference to the itertools.pairwise function.
* Correct import and update pairwise test cases
Fix import statement for pairwise in pairwise_iteration_tee function and update test cases.
* Fix indentation in pairwise_iteration.py docstring
* Enhance docstring for pairwise iteration
Added docstring explaining the use of itertools.tee for independent iterators.
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Fix Base58 encoding/decoding
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: implements a hex to rgb conversion function
* docs: adds module's author, description and references
* chore: fix file trailing line
* feat: insert the algorithms into Directory.md
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
* added shunt power factor correction in electronics
* Update shunt_capacitor_power_factor_correction.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update shunt_capacitor_power_factor_correction.py
removed unnecessary pass and reformatted long line
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* renamed and added inductor correction
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
* Enhance validation and error handling in PF correction
Added validation for power factors and frequency in shunt inductor and capacitor functions. Improved error handling for edge cases.
* Remove power factor correction functions
Removed shunt capacitor and inductor power factor correction functions along with their associated examples and validation logic.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* feat: add softsign activation function
* refactor: formatting
* refactor: detailed docs
* Fix reference link in softsign.py docstring
Updated the reference link for the softsign activation function.
* updating DIRECTORY.md
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Correct implementation and add tests for dfs and bfs
* Ruff check
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
* Simplify visited list update in DFS
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
* feat(project_euler): add solution to problem 60
* fix(project_euler): fix var name and type hints
* chore(project_euler): update directory to include problem 60 solution
* chore(directory): update DIRECTORY.md to keep it about current files
* fix(project_euler): add doctest to search
* updating DIRECTORY.md
* updating DIRECTORY.md
---------
Co-authored-by: AksharGoyal <AksharGoyal@users.noreply.github.com>
* feat(ciphers): add scytale (skytale) transposition cipher with doctests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* chore(ciphers): satisfy ruff UP006/UP035 by using builtin generics
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* style(ciphers): fix import block formatting (isort I001)
* feat(ciphers): add columnar transposition cipher with doctests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor(ciphers): improve variable naming for clarity in columnar transposition cipher
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
---------
Co-authored-by: Saiprashanth Pulisetti <itspulisetti@pm.me>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
* Fix issue #12108: Added Ridge Regression to Machine Learning
* Added type hints and minor case improvements
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Resolved ruff checks
* Added doctests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Resolved ruff checks
* Resolved mypy checks
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Resolved ruff checks
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
* Comments should not force line wrapping
* updating DIRECTORY.md
* Fix feature scaling variable assignment in predictions
* [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>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>