master
Name already in use
Commits on Nov 1, 2022
-
maths/sum_of_digits.py: Streamline benchmarks (#7914)
* maths/sum_of_digits.py: Streamline benchmarks ``` sum_of_digits(262144): 19 -- 0.3128329170285724 seconds sum_of_digits_recursion(262144): 19 -- 0.34008108399575576 seconds sum_of_digits_compact(262144): 19 -- 0.6086010000435635 seconds sum_of_digits(1125899906842624): 76 -- 0.8079068749793805 seconds sum_of_digits_recursion(1125899906842624): 76 -- 0.8435653329943307 seconds sum_of_digits_compact(1125899906842624): 76 -- 1.247976207989268 seconds sum_of_digits(1267650600228229401496703205376): 115 -- 1.6441589999594726 seconds sum_of_digits_recursion(1267650600228229401496703205376): 115 -- 1.713684624992311 seconds sum_of_digits_compact(1267650600228229401496703205376): 115 -- 2.2197747920290567 seconds ``` * updating DIRECTORY.md * Update sum_of_digits.py * Update sum_of_digits.py Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
-
refactor(abs): Condense
abs_min
andabs_max
(#7881)* refactor(abs): Condense `abs_min` and `abs_max` * [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>
Commits on Oct 31, 2022
-
-
* Added Torus volume algorithm * Updated Torus volume for simplicity (removed ref to vol_sphere()) * Refactoring * [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>
-
Added Torus surface area (#7906)
* Added Torus surface area * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixed error in test Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
[pre-commit.ci] pre-commit autoupdate (#7920)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v3.1.0 → v3.2.0](asottile/pyupgrade@v3.1.0...v3.2.0) * updating DIRECTORY.md Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
-
create quantum_fourier_transform (#6682)
* create quantum_fourier_transform This is part of the #Hacktoberfest. I build the quantum fourier transform for N qubits. (n = 3 in the example) Best, Kevin * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update q_fourier_transform.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add the doctest! * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update q_fourier_transform.py * Pass first then fail Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
-
Dodecahedron surface area and volume (#6606)
* Hexagonal number sequence A hexagonal number sequence is a sequence of figurate numbers where the nth hexagonal number hₙ is the number of distinct dots in a pattern of dots consisting of the outlines of regular hexagons with sides up to n dots, when the hexagons are overlaid so that they share one vertex. This program returns the hexagonal number sequence of n length. * Update hexagonalnumbers.py * Update hexagonalnumbers.py * Update hexagonalnumbers.py * Update hexagonalnumbers.py * Update and rename hexagonalnumbers.py to hexagonal_numbers.py * Length must be a positive integer * Create dodecahedron.py * Update dodecahedron.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update dodecahedron.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update dodecahedron.py * Update dodecahedron.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update dodecahedron.py * Update dodecahedron.py * Apply suggestions from code review Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply suggestions from code review * Update dodecahedron.py 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: Paul <56065602+ZeroDayOwl@users.noreply.github.com>
-
Create convert_number_to_words.py (#6788)
* Create convert_number_to_words.py A Python Program to convert numerical digits to English words. An Application of this can be in a Payment Application for confirmation * [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>
-
Modified 'pascal_triangle.py' program (#7901)
* Added pascals_triangle.py program to maths directory * Deleted 'pascals_triangle.py' because of duplication. Added a optimized function to generate pascal's triangle to 'pascal_triangle.py' program. Added some aadditional doctests to the existing function. Added some type check functionality to the existing function. * Modified type check hints in 'generate_pascal_triangle_optimized' function' q * Modified 'pascal_triangle' prgram * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update pascal_triangle.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>
-
* Test on Python 3.11 release candidate 2 * tensorflow; python<3.11 * tensorflow; python_version < 3.11 * tensorflow; python_version < "3.11" * sympy, tensorflow; python_version < "3.11" * sklearn; python_version < "3.11" * matplotlib, pandas, qiskit * statsmodels; python_version < "3.11" * Bring back Pandas * Problem deps are qiskit, statsmodels, and tensorflow * updating DIRECTORY.md * python-version: 3.11-dev --> 3.11 * updating DIRECTORY.md * Add pytest --ignore to pyproject.toml * Update build.yml * Update pyproject.toml * Update pyproject.toml * Python 3.11 Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
-
Added Radix Tree in data structures (#6616)
* added radix tree to data structures * added doctests * solved flake8 * added type hints * added description for delete function * Update data_structures/trie/radix_tree.py * Update radix_tree.py * Update radix_tree.py * Update radix_tree.py Co-authored-by: Alex de la Cruz <alex@Alexs-MacBook-Air.local> Co-authored-by: Christian Clauss <cclauss@me.com>
-
Adding inductive reactance calculation (#6625)
* Adding inductive reactance calculation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * from math import pi * 0007957747154594767 * 36420441699332 * 2199114857512855 Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
-
Refactor bottom-up edit distance function to be class method (#7347)
* Refactor bottom-up function to be class method * Add type hints * Update convolve function namespace * Remove depreciated np.float * updating DIRECTORY.md * updating DIRECTORY.md * updating DIRECTORY.md * updating DIRECTORY.md * Renamed function for consistency * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
Commits on Oct 30, 2022
-
Add print_multiplication_table.py (#6607)
* Add print_multiplication_table.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added return type description * Update print_multiplication_table.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>
-
Created equivalent_resistance under Electronics (#6782)
* Create resistor_equivalence.py * Update resistor_equivalence.py * Update electronics/resistor_equivalence.py removed an unnecessary space Co-authored-by: Caeden <caedenperelliharris@gmail.com> * Update resistor_equivalence.py fixed the snake_case requirement * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update resistor_equivalence.py finalize the naming convention errors (hopefully) * Update resistor_equivalence.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: Caeden <caedenperelliharris@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 algorithm for finding index of rightmost set bit (#7234)
* Added algorithm for finding index of rightmost set bit * applied suggested changes * applied suggested changes * Fixed failing Testcases * [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>
-
Added code for palindrome partitioning problem under dynamic programm…
…ing (#7222) * Added code for palindrome partitioning problem under dynamic programming * Updated return type for function * Updated Line 24 according to suggestions * Apply suggestions from code review Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com> * Update palindrome_partitioning.py * Update palindrome_partitioning.py * is_palindromic Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
-
Implemented a Pascal triangle generator (#7317)
* Added a Pascal triangle implementation to the other folder * Added Pascal triangle implementation to the other folder. * Added Pascal triangle implementation to the other folder. * Added Pascal triangle implementation to the other folder. * Implemented a Pascal triangle generator. * Reversed Changes to DIRECTORY.md * Reversed changed to .md files * Update other/pascal_triangle.py Removed personal info Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com> * Update pascal_triangle.py Expanded the description of the algorithm * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Printed output in triangular form * Update CONTRIBUTING.md Co-authored-by: Paul <56065602+ZeroDayOwl@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
add Levinstein distance with Dynamic Programming: up -> down approach (…
…#7171) * add Levinstein distance with Dynamic Programming: up -> down approach * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add type hint * fix flake8 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update dynamic_programming/min_distance_up_bottom.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update min_distance_up_bottom.py * [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>
-
addition_without_arithmetic (#6830)
* Addition_without_arithmetic * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added_param * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added_param_in_first_sec * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * change_align * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Addition_without_arithmetic.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Rename Addition_without_arithmetic.py to addition_without_arithmetic.py * Update addition_without_arithmetic.py * Update addition_without_arithmetic.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>
-
Added mean absolute error in linear regression (#7003)
* Added mean absolute error in linear regression * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Code feedback changes * [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: Caeden Perelli-Harris <caedenperelliharris@gmail.com> * Apply suggestions from code review * Update linear_regression.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: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
-
* Added Builtin Voltage * Update builtin_voltage.py * Update electronics/builtin_voltage.py Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com> * Update electronics/builtin_voltage.py Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com> * [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: Caeden Perelli-Harris <caedenperelliharris@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Create elf.py Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@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>
-
Adding a Quine in Python. (#6807)
* Adding a Quine in Python. * [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>
-
shortened code using abs() and inplace ops (#7191)
n = -n if n < 0 else n --> n = abs(n) n = n // 10 --> n //= 10
-
Added archimedes principle (physics) (#7143)
* Added archimedes principle (physics) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * reformated * reformatted archimedes principles Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
* implement function to handle polynomial operations * edit documentation * fix type hint and linter errors * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix short variable name * fix spelling Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
-
Added Readme file to document the hashing algorithm. (#6743)
* Added Readme file to document the hashing algorithm. * [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>
-
Adding ELFHash Algorithm (#6731)
* Adding ELFHash Algorithm Adding a new Hash Algorithm. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update elf.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update elf.py * Update elf.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update elf.py * Apply suggestions from code review Co-authored-by: Caeden <caedenperelliharris@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Caeden <caedenperelliharris@gmail.com>
-
added sumset.py Fixes: #{6563} (#6742)
* Create sumset.py * updating DIRECTORY.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add descriptive var names * Update maths/sumset.py Co-authored-by: Caeden <caedenperelliharris@gmail.com> * Update sumset.py * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Caeden <caedenperelliharris@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
-
For the better understanding of time taken. (#6583)
* For the better understanding of time taken. In this change I have initialized a variable p with the value of (1e9+7) and then took the modulus of process time with it . This modification gives better time taken by the process . Firstly it was giving answer in the exponential now it gives in the integer form. * [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: Caeden Perelli-Harris <caedenperelliharris@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> Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
-
Add root mean square speed of gas molecules to physics (#6569)
* add rms speed of molecule to physics * Update physics/rms_speed_of_molecule.py Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
-
Add Ideal Gas Law for physics (#6503)
* add physics ideal gas law * run pre commit * Update physics/ideal_gas_law.py Suggestion #1 Co-authored-by: Caeden <caedenperelliharris@gmail.com> * Update physics/ideal_gas_law.py Suggestion #2 Co-authored-by: Caeden <caedenperelliharris@gmail.com> * run pre commit * Update volume return line sugesstion Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com> * Add suggestions * Apply suggestions from code review Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com> Co-authored-by: Caeden <caedenperelliharris@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
-
Description of Double hasing (#6467)
* Description of DOuble hasing * Fix sheebang * Update double_hash.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update double_hash.py Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>