Commit Graph

90 Commits

Author SHA1 Message Date
SEIKH NABAB UDDIN
a23dd7ecbe
Change from only weatherstack to both (#10882)
* Update current_weather.py

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

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

* Update current_weather.py

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

* Update current_weather.py

* Update current_weather.py

* Update current_weather.py

* import requests

---------

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-10-24 15:12:32 +02:00
Tianyi Zheng
aaf7195465
Fix mypy error in web_programming/reddit.py (#9162)
* updating DIRECTORY.md

* updating DIRECTORY.md

* Fix mypy error in web_programming/reddit.py

web_programming/reddit.py:36: error: Missing named argument "response" for "HTTPError"  [call-arg]

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-01 16:10:33 +13:00
Caeden Perelli-Harris
72f6000365
Fix get amazon product data erroring due to whitespace in headers (#9009)
* updating DIRECTORY.md

* fix(get-amazon-product-data): Remove whitespace in headers

* refactor(get-amazon-product-data): Don't print to_csv

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-09-05 00:49:00 -04:00
Tianyi Zheng
5ecb6baef8
Move and reimplement convert_number_to_words.py (#8998)
* 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>
2023-08-20 08:36:00 -04:00
Caeden Perelli-Harris
945803f65d
Unmark fetch anime and play as BROKEN and fix type errors (#8988)
* updating DIRECTORY.md

* type(fetch-anime-and-play): Fix type errors and re-enable

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-18 05:19:25 -07:00
Caeden Perelli-Harris
5f7819e1cd
Fix get top billionaires BROKEN file (#8970)
* updating DIRECTORY.md

* fix(get-top-billionaires): Handle timestamp before epoch

* updating DIRECTORY.md

* revert(pyproject): Re-implement ignore lru_cache

* fix(age): Update age to current year

* fix(doctest): Make years since dynamic

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-18 05:13:38 -07:00
Suman
c39b7eadbd
updated the URL and HTML tags for scrapping yahoo finance (#8942)
* updated the url and tags for yahoo finance

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

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

* updated to return the error text

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-12 14:58:37 -07:00
Tianyi Zheng
ae0fc85401
Fix ruff errors (#8936)
* 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>
2023-08-09 13:25:30 +05:30
Christian Clauss
dbaff34572
Fix ruff rules ISC flake8-implicit-str-concat (#8892) 2023-07-28 17:53:09 +01:00
Caeden Perelli-Harris
93fb169627
[Upgrade Ruff] Fix all errors raised from ruff (#8879)
* chore: Fix tests

* chore: Fix failing ruff

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

* chore: Fix ruff errors

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

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

* chore: Fix ruff errors

* chore: Fix ruff errors

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

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

* Update cellular_automata/game_of_life.py

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

* chore: Update ruff version in pre-commit

* chore: Fix ruff errors

* Update edmonds_karp_multiple_source_and_sink.py

* Update factorial.py

* Update primelib.py

* Update min_cost_string_conversion.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>
2023-07-22 12:05:10 +02:00
Caeden Perelli-Harris
80d95fccc3
Pytest locally fails due to API_KEY env variable (#8738)
* fix: Pytest locally fails due to API_KEY env variable (#8737)

* chore: Fix ruff errors
2023-06-03 18:16:33 +02:00
Christian Clauss
4b79d771cd
Add more ruff rules (#8767)
* Add more ruff rules

* Add more ruff rules

* pre-commit: Update ruff v0.0.269 -> v0.0.270

* Apply suggestions from code review

* Fix doctest

* Fix doctest (ignore whitespace)

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

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

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-26 09:34:17 +02:00
Caeden Perelli-Harris
df88771905
Mark fetch anime and play as broken (#8763)
* updating DIRECTORY.md

* updating DIRECTORY.md

* fix: Correct ruff errors

* fix: Mark anime algorithm as broken

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-25 07:59:15 +02:00
Genesis
7cdb011ba4
New gitter link added or replaced (#8551)
* New gitter link added

* ruff==0.0.258

* noqa: S310

* noqa: S310

* Update ruff.yml

* Add Ruff rule S311

* Ruff v0.0.259

* return ("{:08x}" * 5).format(*self.h)

* pickle.load(f)  # noqa: S301

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-03-26 17:19:18 +02:00
Christian Clauss
c96241b5a5
Replace bandit, flake8, isort, and pyupgrade with ruff (#8178)
* Replace bandit, flake8, isort, and pyupgrade with ruff

* Comment on ruff rules

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-03-15 13:58:25 +01:00
pre-commit-ci[bot]
41b633a841
[pre-commit.ci] pre-commit autoupdate (#8168)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.253 → v0.0.254](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.253...v0.0.254)

* Rename get_top_billionaires.py to get_top_billionaires.py.disabled

* 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: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-03-07 00:10:39 +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
d29afca93b
Fix get_top_billioners.py file name typo (#8066) 2023-01-01 14:30:14 +01:00
Shreyas Kamath
506b63f02d
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>
2022-10-31 18:04:42 +01:00
SparshRastogi
26cecea271
Create fetch_amazon_product_data.py (#7585)
* Create fetch_amazon_product_data.py

This file provides a function which will take  
a product name as input from the user,and fetch the necessary  
information about that kind of products from Amazon like the product 
title,link to that product,price of the product,the ratings of 
the product and the discount available on the product  
in the form of a csv file,this will help the users by improving searchability  
and navigability and find the right product easily and in a short period of time, 
it will also be beneficial for performing better analysis on products

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

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

* Update fetch_amazon_product_data.py

Added type hints and modified files to pass precommit test

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

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

* Update fetch_amazon_product_data.py

Added type hints and made changes to pass the precommit

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

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

* Update fetch_amazon_product_data.py

Modified function to return the data in the form of Pandas Dataframe,modified type hints and added a functionality to let the user determine if they need the data in a csv file

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

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

* Update fetch_amazon_product_data.py

Made some bug fixes

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

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

* Update and rename fetch_amazon_product_data.py to get_amazon_product_data.py

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

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

* Update get_amazon_product_data.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-28 16:33:21 +02:00
Caeden Perelli-Harris
61eedc16c3
Remove useless code in doctests (#7733)
* refactor: Fix matrix display deprecation

* refactor: Remove useless `print` and `pass` statements

* revert: Replace broken doctests

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

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

* revert: Fix failing doctests

* chore: Satisfy pre-commit

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-27 22:52:00 +02:00
Caeden Perelli-Harris
10b6e7a658
fix: Fix line too long in doctest (#7566) 2022-10-23 17:14:45 +02:00
Sagar Giri
0f06a0b5ff
Add web program to fetch top 10 real time billionaires using the forbes API. (#7538)
* Add web program to fetch top 10 realtime billioners using forbes API.

* Provide return type to function.

* Use rich for tables and minor refactors.

* Fix tiny typo.

* Add the top {LIMIT} in rich table title.

* Update web_programming/get_top_billioners.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

* Change the API path.

* Update get_top_billioners.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>
2022-10-23 16:35:27 +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
CenTdemeern1
04698538d8
Misc fixes across multiple algorithms (#6912)
Source: Snyk code quality
Add scikit-fuzzy to requirements

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-16 10:55:38 +05:30
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
Praveen
f176786d12
Update open_google_results.py (#7085)
* update crawl_google_results.py

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

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

* Update and rename crawl_google_results.py to open_google_results.py

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

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

* Create crawl_google_results.py

* Update web_programming/open_google_results.py

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

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

* Update open_google_results.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-13 17:34:52 +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
pre-commit-ci[bot]
756bb268eb
[pre-commit.ci] pre-commit autoupdate (#6629)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0)
- [github.com/asottile/pyupgrade: v2.37.0 → v2.38.2](https://github.com/asottile/pyupgrade/compare/v2.37.0...v2.38.2)
- https://gitlab.com/pycqa/flake8https://github.com/PyCQA/flake8
- [github.com/PyCQA/flake8: 3.9.2 → 5.0.4](https://github.com/PyCQA/flake8/compare/3.9.2...5.0.4)
- [github.com/pre-commit/mirrors-mypy: v0.961 → v0.981](https://github.com/pre-commit/mirrors-mypy/compare/v0.961...v0.981)
- [github.com/codespell-project/codespell: v2.1.0 → v2.2.1](https://github.com/codespell-project/codespell/compare/v2.1.0...v2.2.1)

* Fix a long line

* Update sol1.py

* Update sol1.py

* lambda_

* Update multi_level_feedback_queue.py

* Update double_ended_queue.py

* Update sequential_minimum_optimization.py

* Update .pre-commit-config.yaml

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-03 22:00:45 +02:00
RAHUL S H
346b0a8466
Added fetch_quotes.py (#6529)
* Added fetch_quotes.py 

fetches quotes from zenquotes.io api

* Update web_programming/fetch_quotes.py

Co-authored-by: rohanr18 <114707091+rohanr18@users.noreply.github.com>

Co-authored-by: rohanr18 <114707091+rohanr18@users.noreply.github.com>
2022-10-02 12:50:47 +02:00
Christian Clauss
b75a7c77f8
pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0 (#6245)
* pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0

* pre-commit run --all-files
2022-07-11 10:19:52 +02:00
Christian Clauss
885580b3a1
pyupgrade --py310-plus and run mypy in precommit, not build (#5996)
* pyupgrade --py310-plus and run mypy in precommit, not build

* pyupgrade --py310-plus web_programming/fetch_well_rx_price.py

* pyupgrade --py310-plus web_programming/fetch_well_rx_price.py

* Fix arithmetic_analysis/in_static_equilibrium.py

* Fix arithmetic_analysis/in_static_equilibrium.py
2022-02-13 11:01:58 +01:00
Saptarshi Sengupta
d28ac6483a
Scrape anime and play episodes on browser without ads from terminal (#5975)
* fetch anime

* formatted  code

* fix format errors

* fix bot reviews

* pr review fixes

* remove unussed exception

* change var name

* fix comments
2022-02-01 23:19:17 +01:00
Saptarshi Sengupta
b2a77cc4fb
Scraping prescription drug prices from Rx site using the prescription drug name and zipcode (#5967)
* add wellrx scraping

* write test fix docs

* fix resolve issues

* black format. fix returns

* type check fix for union

* black formatted

* Change requests after code review

* add precommit changes

* flake errors
2022-01-31 01:41:46 +01:00
Michael Currin
c15a4d5af6
Refactor currency_converter.py (#5917)
* Update currency_converter.py

* refactor: add types and remove reserved  keyword "from" usage

* feat: update text

* Update web_programming/currency_converter.py

Co-authored-by: xcodz-dot <71920621+xcodz-dot@users.noreply.github.com>

* Update web_programming/currency_converter.py

Co-authored-by: xcodz-dot <71920621+xcodz-dot@users.noreply.github.com>

* fix: update currency_converter.py

* updating DIRECTORY.md

* Update currency_converter.py

Co-authored-by: xcodz-dot <71920621+xcodz-dot@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-01-28 07:52:42 +01:00
Jaydeep Das
b6eb448e63
Added reddit.py to get data from reddit (#5698)
* Rewritten reddit.py

* Removed logging module import

* Fixed minor bug which was causing extreme rate limiting

* Update reddit.py

* Update reddit.py

* Update reddit.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-11-04 16:36:22 +01:00
Leoriem-code
60ad32920d
fixed typo for codespell (#5753) 2021-11-02 22:17:57 +01:00
Rohan R Bharadwaj
5910c3aa78
Typo (#5750) 2021-11-02 10:20:55 +01:00
Christian Clauss
74f4967126
Fix comment (#5742)
* Fix comment

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-11-01 18:07:47 +01:00
Kelly Costa
68ca61ecb7
Add search book via ISBN using openlibrary.org API (#5736)
* Add search book via ISBN using openlibrary.org API

* FIX: parameters type hints and isbn sizes

* Add doctests

* Update search_books_by_isbn.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-11-01 14:36:18 +01:00
Prakhar Gurunani
827b8f04a4
Get top 10 HN posts (#5604)
* updating DIRECTORY.md

* updating DIRECTORY.md

* Create get_top_hn_posts.py

* updating DIRECTORY.md

* Add return type and desc

* Add texttable

* Update web_programming/get_top_hn_posts.py

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

* Update web_programming/get_top_hn_posts.py

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

* Get top 10 posts

* Update get_top_hn_posts.py

* Don't use texttable

* Setup doctest

* Fix pre-commit issues

* Remove print statement

* Add hackernews_top_stories_as_markdown()

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-26 15:13:23 +02:00
Prakhar Gurunani
f93c7d4d80
Get user tweets (#5593)
* updating DIRECTORY.md

* Create get_user_tweets.py

* updating DIRECTORY.md

* Reformat code with black

* Add argument type

* Add return type

* Add tweepy

* Fix isort issues

* Fix flake8 issues

* WIP: doctest

* Doctest setup and format with pre-commit

* Remove doctests

* Update web_programming/get_user_tweets.py

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

* Update get_user_tweets.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-26 10:05:13 +02:00
Christian Clauss
bd9464e4ac
mandelbrot.py: Commenting out long running tests (#5558)
* mandelbrot.py: Commenting out long running tests

* updating DIRECTORY.md

* Comment out 9 sec doctests

* Update bidirectional_breadth_first_search.py

* Comment out slow tests

* Comment out slow (9.15 sec) pytests...

* # Comment out slow (4.20s call) doctests

* Comment out slow (3.45s) doctests

* Update miller_rabin.py

* Update miller_rabin.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-10-23 18:15:30 +02:00
Jaydeep Das
b64fd56776
Added feature to web_programming/nasa_data.py : Can download the APOD image to a specified location on disk. (#5551)
* Added a feature to download images.

* Minor changes

* Update nasa_data.py

* :

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-23 14:38:25 +02:00
Jaydeep Das
27f2465135
Added new file: nasa_data.py (#5543)
* Added new file: nasa_data.py

* Modified as per review

* Minor change

* print(get_archive_data("apollo 2011")["collection"]["items"][0]["data"][0]["description"])

* Update nasa_data.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-23 12:56:26 +02:00
Jaydeep Das
0935ab0cb2
Added giphy.py to fetch gifs on a given topic (#5378)
* Added giphy.py to fetch gifs on a given topic

* Modified code
[*]Added doctest
[*]Formatted with black

* Minor change

* Minor refactoring to avoid name clash

* Made necessary changes as per review

* Update web_programming/giphy.py

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

* Apply suggestions from code review

* Final cleanup

* Placate psf/black

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-18 09:16:42 +02:00
Appledora
37385883aa
Improved readability of web_programming/get_imdbtop.py and added documentations with doctests (#4855)
* improved readability of the existing method by reformatting, adding documentations with doctests.

* improved readability of the existing method by reformatting, adding documentations with doctests.

* fixed typo in test

* added doctest to parse dictionary method

* added doctest to parse dictionary method

* Changed return type, removed print() from method and implemented doctests as suggested

* Fixed doctest error, removed print() from method, created new script as suggested

* Update get_imdbtop.py

* Fix typo discovered by codespell

* return ()

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-16 03:32:33 +02:00
Appledora
152261765a
Show images from google query (#4853)
* Added new script to open the google image tab with a search query.

* Added new script to open the google image tab with a search query.

* Added new script to open the google image tab with a search query with doctests.

* Fixed doctest error, removed print() from method, changed return type

* Update web_programming/show_image_tab_from_google_query.py

using iterators instead of lists

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

* Update web_programming/show_image_tab_from_google_query.py

Improve readability by removing one-time used variable

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

* Update web_programming/show_image_tab_from_google_query.py

Decreasing complication through standard practices.

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

* Update web_programming/show_image_tab_from_google_query.py

Exception Handling

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

* changed complete method to download images from google search query

* Update download_images_from_google_query.py

* Delete show_image_tab_from_google_query.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-10-16 02:02:44 +02:00