Commit Graph

45 Commits

Author SHA1 Message Date
Vipin Karthic
0d324de7ab
Doctest Error Correction of mirror_formulae.py (#9782)
* Python mirror_formulae.py is added to the repository

* Changes done after reading readme.md

* Changes for running doctest on all platforms

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Change 2 for Doctests

* Changes for doctest 2

* updating DIRECTORY.md

* Doctest whitespace error rectification to mirror_formulae.py

* 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>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-05 09:48:15 +02:00
Vipin Karthic
935d1d3225
Added Mirror Formulae Equation (#9717)
* Python mirror_formulae.py is added to the repository

* Changes done after reading readme.md

* Changes for running doctest on all platforms

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Change 2 for Doctests

* Changes for doctest 2

* 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>
2023-10-05 07:57:55 +02:00
Raghav
6a391d113d
Added Photoelectric effect equation (#9666)
* Added Photoelectric effect equation

Photoelectric effect is one of the demonstration of quanta of energy.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed doctest

Co-authored-by: Rohan Anand <96521078+rohan472000@users.noreply.github.com>

* [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: Rohan Anand <96521078+rohan472000@users.noreply.github.com>
2023-10-05 12:16:19 +13:00
Raghav
24dbdd0b88
Update coulombs_law.py docs (#9667)
* Update coulombs_law.py

distance is positive non zero real number (float type) hence corrected docs which says only integer.

* Update physics/coulombs_law.py

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-04 02:08:13 -04:00
Ayush Yadav
81661bd2d0
Update newtons_law_of_gravitation.py : Typo(Space Removed) (#9351) 2023-10-03 19:47:26 -04:00
gudlu1925
eace4cea32
Added Coulomb_Law (#8714)
* Create coulomb_law.py

* Update coulomb_law.py

* Update coulomb_law.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update and rename coulomb_law.py to coulombs_law.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update coulombs_law.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update coulombs_law.py

* Update coulombs_law.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update coulombs_law.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update coulombs_law.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-09-27 01:44:06 -04:00
homsim
5c276a8377
Quick fix: fig.canvas.set_window_title deprecated (#8961)
Co-authored-by: homsim <simon@simon-ThinkPadE460.fritz.box>
2023-08-16 01:07:50 -07:00
robertjcalistri
2ab3bf2689
Added functions to calculate temperature of an ideal gas and number o… (#8919)
* Added functions to calculate temperature of an ideal gas and number of moles of an ideal gas

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update physics/ideal_gas_law.py

Renamed function name

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update physics/ideal_gas_law.py

Updated formatting

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update physics/ideal_gas_law.py

Removed unnecessary parentheses

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update physics/ideal_gas_law.py

Removed unnecessary parentheses

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update ideal_gas_law.py

Updated incorrect function calls moles of gas system doctests

* Update physics/ideal_gas_law.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-08-14 02:31:53 -07:00
Tianyi Zheng
5cf34d901e
Ruff fixes (#8913)
* updating DIRECTORY.md

* Fix ruff error in eulerian_path_and_circuit_for_undirected_graph.py

* Fix ruff error in newtons_second_law_of_motion.py

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-07-31 13:53:26 -07:00
Bazif Rasool
8b831cb600
Added Altitude Pressure equation (#8909)
* Added Altitude Pressure equation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Removed trailing whitespaces

* Removed pylint

* Fix lru_cache_pythonic.py

* Fixed spellings

* Fix again lru_cache_pythonic.py

* Update .vscode/settings.json

Co-authored-by: Christian Clauss <cclauss@me.com>

* Third fix lru_cache_pythonic.py

* Update .vscode/settings.json

Co-authored-by: Christian Clauss <cclauss@me.com>

* 4th fix lru_cache_pythonic.py

* Update physics/altitude_pressure.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* lru_cache_pythonic.py: def get(self, key: Any, /) -> Any | None:

* Delete lru_cache_pythonic.py

* Added positive and negative pressure test cases

* [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>
2023-07-30 17:00:58 +02:00
Alex Bernhardt
a0b642cfe5
Physics/basic orbital capture (#8857)
* Added file basic_orbital_capture

* updating DIRECTORY.md

* added second source

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed spelling errors

* accepted changes

* updating DIRECTORY.md

* corrected spelling error

* Added file basic_orbital_capture

* added second source

* fixed spelling errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* applied changes

* reviewed and checked file

* added doctest

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* removed redundant constnant

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added scipy imports

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added doctests to capture_radii and scipy const

* fixed conflicts

* finalizing file. Added tests

* Update physics/basic_orbital_capture.py

---------

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: Christian Clauss <cclauss@me.com>
2023-07-28 20:30:05 +02:00
ShivaDahal99
fa12b9a286
Speed of sound (#8803)
* Create TestShiva

* Delete TestShiva

* Add speed of sound

* Update physics/speed_of_sound.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update physics/speed_of_sound.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update speed_of_sound.py

* Update speed_of_sound.py

---------

Co-authored-by: jlhuhn <134317018+jlhuhn@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-07 23:47:27 +02:00
Caeden Perelli-Harris
1faf10b5c2
Correct ruff failures (#8732)
* fix: Correct ruff problems

* updating DIRECTORY.md

* fix: Fix pre-commit errors

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-14 22:03:13 +01:00
Blake Reimer
84b6852de8
Graham's Law (#8162)
* grahams law

* doctest and type hints

* doctest formatting

* peer review updates
2023-04-01 18:43:07 +02:00
pre-commit-ci[bot]
8959211100
[pre-commit.ci] pre-commit autoupdate (#8177)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.254 → v0.0.255](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.254...v0.0.255)
- [github.com/pre-commit/mirrors-mypy: v1.0.1 → v1.1.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.0.1...v1.1.1)
- [github.com/codespell-project/codespell: v2.2.2 → v2.2.4](https://github.com/codespell-project/codespell/compare/v2.2.2...v2.2.4)

* updating DIRECTORY.md

* Fixes for new version of codespell

---------

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>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-03-13 23:18:35 +01:00
Christian Clauss
64543faa98
Make some ruff fixes (#8154)
* Make some ruff fixes

* Undo manual fix

* Undo manual fix

* Updates from ruff=0.0.251
2023-03-01 17:23:33 +01:00
Christian Clauss
c909da9b08
pre-commit: Upgrade psf/black for stable style 2023 (#8110)
* 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>
2023-02-01 18:44:54 +05:30
Tianyi Zheng
57c12fab28
Fix mypy errors in lorentz_transformation_four_vector.py (#8075)
* updating DIRECTORY.md

* Fix mypy errors in lorentz_transformation_four_vector.py

* Remove unused symbol vars

* Add function documentation and rewrite algorithm explanation

Previous explanation was misleading, as the code only calculates Lorentz
transformations for movement in the x direction (0 velocity in the y and
z directions) and not movement in any direction

* updating DIRECTORY.md

* Update error message for speed

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-01-26 08:13:03 +01:00
Gustavobflh
74aa9efa1d
Added a Hubble Parameter calculator file (#7921) 2022-10-31 23:04:42 +01:00
Abhishek Chakraborty
e12516debb
Shear stress: typo + WIkipedia URL (#7896) 2022-10-30 22:11:05 +01:00
Dima I
9278d0c6cd
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>
2022-10-30 11:54:23 +01:00
Kavienan J
b32903d22f
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>
2022-10-30 11:29:00 +01:00
Kavienan J
c0b0b128b7
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>
2022-10-30 11:26:46 +01:00
SparshRastogi
3ec0aa85c0
Update kinetic_energy.py (#7848)
Fixed a typo error in docstrings
2022-10-29 23:24:59 +02:00
sadiqebrahim
038f8a00e5
add electric conductivity algorithm (#7449)
* add electric conductivity algorithm

* Update electric_conductivity.py

* Apply suggestions from code review

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update electric_conductivity.py

* Update electric_conductivity.py

* Update electric_conductivity.py

* add algorithm

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
2022-10-29 15:52:19 +02:00
tarushirastogi
b0f68a0248
Create centripetal_force.py (#7778)
* Create centripetal_force.py

Centripetal force is the force acting on an object in curvilinear motion directed towards the axis of rotation or centre of curvature.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update centripetal_force.py

The value error should also handle negative values of the radius and using more descriptive names will be more beneficial for the users

* Update centripetal_force.py

Made some bug fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: SparshRastogi <75373475+SparshRastogi@users.noreply.github.com>
2022-10-29 14:43:51 +02:00
SparshRastogi
301a520f03
Create potential_energy.py (#7666)
* Create potential_energy.py

Finding the gravitational potential energy of an object with reference to the earth, by taking its mass and height above the ground as input

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update physics/potential_energy.py

Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>

* Update physics/potential_energy.py

Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>

* Update physics/potential_energy.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update physics/potential_energy.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update physics/potential_energy.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update physics/potential_energy.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update physics/potential_energy.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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
2022-10-30 00:14:44 +13:00
Andrey
cf08d9f5e7
Format docs (#7821)
* Reformat docs for odd_even_sort.py

* Fix docstring formatting

* Apply suggestions from code review

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
2022-10-29 08:26:19 +02:00
SparshRastogi
e906a5149a
Create malus_law.py (#7710)
* Create malus_law.py

Finding the intensity of light transmitted through a polariser using Malus Law and by taking initial intensity and angle between polariser and axis as input

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update physics/malus_law.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update physics/malus_law.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update physics/malus_law.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update physics/malus_law.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update malus_law.py

Made some changes in the error messages and the docstring testcases

* Update malus_law.py

Made changes for the passing the precommit

* [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: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
2022-10-27 13:22:10 +02:00
Arya Samik
7e3dff17c5
Docs: correct the shape of trajectory (#6255)
The shape of the trajectory of projectile is a parabola.
2022-10-25 22:42:49 +01:00
SparshRastogi
cbdbe07ffd
Create kinetic_energy.py (#7620)
* Create kinetic_energy.py

Finding the kinetic energy of an object,by taking its mass and velocity as input

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update kinetic_energy.py

* Update kinetic_energy.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>
2022-10-25 21:43:02 +02:00
Sagar Giri
b5b1eb2f00
Fix broken links by PR #7277 (#7319) 2022-10-16 15:45:25 +02:00
Caeden
c6582b35bf
refactor: Move constants outside of variable scope (#7262)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-16 15:03:29 +05:30
Sagar Giri
e7b6d2824a
Change to https. (#7277)
* Change to https.

* Revert the py_tf file.
2022-10-16 09:43:29 +02:00
Paul
553624fcd4
Add algorithm for Casimir Effect (#7141)
* Add algorithm for Casimir Effect

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix the line length

* Fix the line length

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Import math module and use Pi

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update doctest results

* from math import pi

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-15 19:39:27 +02:00
Caeden
4d0c830d2c
Add flake8 pluin flake8 bugbear to pre-commit (#7132)
* ci(pre-commit): Add ``flake8-builtins`` additional dependency to ``pre-commit`` (#7104)

* refactor: Fix ``flake8-builtins`` (#7104)

* fix(lru_cache): Fix naming conventions in docstrings (#7104)

* ci(pre-commit): Order additional dependencies alphabetically (#7104)

* fix(lfu_cache): Correct function name in docstring (#7104)

* Update strings/snake_case_to_camel_pascal_case.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update data_structures/stacks/next_greater_element.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update digital_image_processing/index_calculation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update graphs/prim.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update hashes/djb2.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* refactor: Rename `_builtin` to `builtin_` ( #7104)

* fix: Rename all instances (#7104)

* refactor: Update variable names (#7104)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* ci: Create ``tox.ini`` and ignore ``A003`` (#7123)

* revert: Remove function name changes (#7104)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename tox.ini to .flake8

* Update data_structures/heap/heap.py

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>

* refactor: Rename `next_` to `next_item` (#7104)

* ci(pre-commit): Add `flake8` plugin `flake8-bugbear` (#7127)

* refactor: Follow `flake8-bugbear` plugin (#7127)

* fix: Correct `knapsack` code (#7127)

* [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: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2022-10-13 18:03:06 +02:00
Caeden
07e991d553
Add pep8-naming to pre-commit hooks and fixes incorrect naming conventions (#7062)
* ci(pre-commit): Add pep8-naming to `pre-commit` hooks (#7038)

* refactor: Fix naming conventions (#7038)

* Update arithmetic_analysis/lu_decomposition.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refactor(lu_decomposition): Replace `NDArray` with `ArrayLike` (#7038)

* chore: Fix naming conventions in doctests (#7038)

* fix: Temporarily disable project euler problem 104 (#7069)

* chore: Fix naming conventions in doctests (#7038)

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-13 00:54:20 +02:00
Paul
660d2bb66c
Add algorithm for Newton's Law of Gravitation (#6626)
* Add algorithm for Newton's Law of Gravitation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update physics/newtons_law_of_gravitation.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* One and only one argument must be 0

* Update newtons_law_of_gravitation.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>
2022-10-06 19:19:34 +02:00
Rohan R Bharadwaj
087a3a8d53
lorenz -> lorentz (#6670) 2022-10-04 21:52:49 +02:00
Horst JENS
9eac958725
typo corrected: heart -> Earth (#6275) 2022-08-06 17:47:56 +02:00
Aviv Faraj
ec54da34b9
Lorenz transformation - physics (#6097)
* Add files via upload

* Changed print to f-string

Also printed out results in a math notation

* Add files via upload

* Fixes: #4710 provided return type

* File exists in another pull request

* imported radians from math

* Updated file according to pre-commit test

* Updated file

* Updated gamma

* Deleted duplicate file

* removed pi

* reversed tests

* Fixed angle condition

* Modified prints to f-string

* Update horizontal_projectile_motion.py

* Update horizontal_projectile_motion.py

* Fixes #4710 added exceptions and tests

* Added float tests

* Fixed type annotations

* Fixed last annotation

* Fixed annotations

* fixed format

* Revert "fixed format"

This reverts commit 5b0249ac0a.

Undo changes
@wq

* Revert "Fixed annotations"

This reverts commit c37bb95408.

* Revert "Fixed last annotation"

This reverts commit e3678fdead.

* Revert "Fixed type annotations"

This reverts commit 3f2b238c34.

* Revert to 4e2fcaf6fb

* Fixing errors found during pre-commit

* Added gauss law

* Implemented Lorenz tranformation with four vector

* pre-commit fixes

* flake8 fixes

* More flake8 fixes

* Added blank space for flake8

* Added reference

* Trailing whitespace fix

* Replaced argument u with velocity (descriptive name fix)

* Added tests for functions + moved velocity check to beta function

* Modified condition to 'not symbolic' in the transform function

* trainling whitespace fix

* Added type hint for 'smybolic' argument in transform function

* Changed reference to avoid pre-commit fails because of spelling issue related to the URL

* Added tests for gamma and transformation_matrix functions

* Fixed transformation_matrix tests

* Fixed tests on beta and gamma functions
2022-05-16 22:26:19 +08:00
Aviv Faraj
1d3d18bcd2
horizontal motion code physics (#4710)
* Add files via upload

* Changed print to f-string

Also printed out results in a math notation

* Add files via upload

* Fixes: #4710 provided return type

* File exists in another pull request

* imported radians from math

* Updated file according to pre-commit test

* Updated file

* Updated gamma

* Deleted duplicate file

* removed pi

* reversed tests

* Fixed angle condition

* Modified prints to f-string

* Update horizontal_projectile_motion.py

* Update horizontal_projectile_motion.py

* Fixes #4710 added exceptions and tests

* Added float tests

* Fixed type annotations

* Fixed last annotation

* Fixed annotations

* fixed format

* Revert "fixed format"

This reverts commit 5b0249ac0a.

Undo changes
@wq

* Revert "Fixed annotations"

This reverts commit c37bb95408.

* Revert "Fixed last annotation"

This reverts commit e3678fdead.

* Revert "Fixed type annotations"

This reverts commit 3f2b238c34.

* Revert to 4e2fcaf6fb

* Fixing errors found during pre-commit
2022-04-04 15:44:29 +02:00
Christian Clauss
24d3cf8244
The black formatter is no longer beta (#5960)
* The black formatter is no longer beta

* pre-commit autoupdate

* pre-commit autoupdate

* Remove project_euler/problem_145 which is killing our CI tests

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-01-30 20:29:54 +01:00
Divyesh Vishwakarma
9655ec2a05
Added newtons_second_law_of_motion.py (#5474) 2021-11-04 18:48:57 +08:00
algobytewise
536fb4bca4
Add algorithm for N-body simulation - retry (#4298)
* add n_body_simulation.py

* updating DIRECTORY.md

* Rename other/n_body_simulation.py to physics/n_body_simulation.py

* updating DIRECTORY.md

* Update build.yml

* refactor examples & add doctests

* removed type-hints from self-parameter

* Apply suggestions from code review

* Update physics/n_body_simulation.py

* Update physics/n_body_simulation.py

* Update physics/n_body_simulation.py

* Don't forget self

* Fix velocity

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-04-04 13:23:48 +02:00