Commit Graph

59 Commits

Author SHA1 Message Date
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
Christian Clauss
cecf43d648
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-07 13:37:03 +02:00
Lucifer
eca37b1537
Random anime character info (#4553)
* fixed colons and spaces

* fixed colons and spaces

* random anime character python script

* more tests passed

* type hint updated

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

* type hint updated again

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

* Update random_anime_character.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2021-07-19 17:40:18 +02:00
Christian Clauss
895bca3654
[mypy] Fix web_programming directory (#4297)
* Update world_covid19_stats.py

* Delete monkeytype_config.py

* updating DIRECTORY.md

* Apply pyannotate suggestions to emails_from_url.py

* mypy web_programming/emails_from_url.py

* super().__init__()

* mypy --ignore-missing-imports web_programming/emails_from_url.py

* Update emails_from_url.py

* self.urls: list[str] = []

* mypy: Fix web_programming directory

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2021-03-31 08:48:07 +05:30
algobytewise
8e488dd53d
mypy-fix for "covid_stats_via_xpath.py" (#4233) 2021-03-19 06:27:32 +01:00
Sullivan
52a6213ddc
Instagram Video and IGTV downloader (#3981)
* Instagram Video and IGTV downloader 

Download Video and IGTV from Instagram

* Update

* Update

* Some Change

* Update

* Update instagram_video.py

* Update instagram_video.py

* Update instagram_video.py

* Update instagram_video.py

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2020-11-29 13:14:18 +01:00
lawric1
098f02bc04
Fixes: #3944 Authentication error; use tokens instead (#3949)
* fixes #3944 authentication error
* Fixes: #3944 authentication error
* Fixed docstring failure in pre-commit, Fixed request.get params to GitHub REST API standards
* run black formatter
* Add USER_TOKEN constant and checks if empty, removes deprecated docstring
* Add descriptive dict type hint, change headers format to f-string
* Add Accept header
* Fix pre-commit error
* Fix pre-commit error
* Add test for fetch_github_info
* Remove test function from main file
* Create test_fetch_github_info.py
* Update test_fetch_github_info.py
* Update test_fetch_github_info.py
* No need to cover __name__ == __main__ block

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2020-11-25 10:43:14 +05:30
Sullivan
e031ad3db6
Create instagram_pic (#3945)
* Create instagram_pic

* Update instagram_pic

* Update instagram_pic

* isort

* Update instagram_pic.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-11-24 17:18:00 +01:00
Niranjan Hegde
f036b9f358
Web programming contribution (#2436)
* Currency Converter

* currency converter

* Currency Converter

* currency converter

* implemented changes

* Implemented changes requested

* TESTING = os.getenv("CONTINUOUS_INTEGRATION", False)

* Update currency_converter.py

* Update currency_converter.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-11-21 09:04:08 +01:00
Dhruv Manilawala
b9b7fffcc2
Move CI tests from Travis to GitHub (#3889)
* Add initial support for moving tests to GitHub

* Add setup Python step in the workflow

* Remove Travis CI config file

* Fix GitHub action file for build to trigger on PR

* Use Python 3.8 as tensorflow is not yet supported

* Fix ciphers.hill_cipher doctest error

* Fix: instagram crawler tests failing on GitHub actions

* Fix floating point errors in doctest

* Small change to test cache

* Apply suggestions from code review

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

* Update instagram_crawler.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-11-19 22:01:31 +05:30
boyuuuun
32def4b3c5
add crawl_google_scholar_citation.py (#3879)
* add crawl_google_scholar_citation.py

* pass flack8

* pass isort

* pass isort

* change comment in main

* modify main code

* delete file

* change how to build url

* add a key 'hl' in params dict

* Update crawl_google_scholar_citation.py

* Create crawl_google_results.py

* codespell: Mater

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-11-13 14:55:23 +01:00
Anselm Hahn
4c92f8c0d0
Replace main with __main__ (#3518) 2020-10-18 21:54:43 +02:00
Jr Miranda
c425010c44
Fetch CO2 emission information (#3182)
* Fetch CO2 emission information

* fix blank lines

* fix blank lines

* Add type hints for function return values

* Update co2_emission.py

* Update co2_emission.py

* Update co2_emission.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-10-12 01:31:56 +02:00
Dhruv
acaeb22bbd
Add GitHub action for pre-commit (#2515)
* Add GitHub action file for pre-commit

* Fix errors exposed by pre-commit hook:

- Remove executable bit from files without shebang. I checked those
  file and it was not needed.
- Fix with black

* Apply suggestions from code review

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

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-30 15:23:34 +02:00
YOGESHWARAN R
e6e2dc69d5
Create instagram_crawler.py (#2509)
* Create instagram_crawler.py

* codespell --ignore-words-list=followings

* Update web_programming/instagram_crawler.py

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

* Update web_programming/instagram_crawler.py

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

* Update web_programming/instagram_crawler.py

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

* Update web_programming/instagram_crawler.py

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

* Update web_programming/instagram_crawler.py

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

* Update web_programming/instagram_crawler.py

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

* Update web_programming/instagram_crawler.py

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

* Update instagram_crawler.py

* Add doctests

* fixup! except (json.decoder.JSONDecodeError, KeyError):

* if getenv("CONTINUOUS_INTEGRATION"): return

* Update instagram_crawler.py

* Update web_programming/instagram_crawler.py

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

* added fake_useragent

* Update instagram_crawler.py

* Comment out doctests

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Dhruv <dhruvmanila@gmail.com>
2020-09-29 18:04:55 +02:00
Dhruv
48357cea5b
Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
Christian Clauss
9200a2e543
from __future__ import annotations (#2464)
* from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! from __future__ import annotations

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-23 13:30:13 +02:00
Santosh Mohan Rajkumar
4e5b730e85
recaptchaVerification (#2417)
* recaptchaVerification

* recaptchaVerification

* recaptchaVerification1

* recaptchaVerification2

* recaptchaVerification3

* recaptchaVerification4

* recaptchaVerificatio5

* recaptchaVerificatio5

* recaptchaVerificatio6

* drawOnVideoStreamOpenCV

* matrixInverseMCAmethod

* fixingImports

* recaptchaVerificationfixes

* recaptchaVerificationfixes

* recaptchaVerificationfixes

* recaptchaVerificationfixes

* recaptchaVerificationfixes1

* recaptchaVerificationfixes1

* authenticate = login = render = redirect = print

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-13 22:26:15 +02:00
Santosh Mohan Rajkumar
c676956030
lxmlCovidDataFetch (#2416)
* lxmlCovidDataFetch

* lxmlCovidDataFetch1

* Update worldometers_covid_with_lxml.py

* Rename worldometers_covid_with_lxml.py to covid_stats_via_xpath.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-11 22:25:05 +02:00
Kaif Kohari
a46b5559e0
Job fetching (#2219)
* Adding job scarping algorithm to web programming

* Delete fetch_jobs.py

* Adding Jobs Scraping to web programming

* Add Python type hints

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-08-21 23:58:26 +02:00
Christian Clauss
1fb1fdd130
requirements.txt: Unpin numpy (#2287)
* requirements.txt: Unpin numpy

* fixup! Format Python code with psf/black push

* Less clutter

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-06 17:50:23 +02:00
Rayvant Sahni
8e7aded87f
World covid19 stats (#2271)
* Josephus problem in Python

Added the code for the josephus problem in python using circular linked lists.

* Update josephus_problem.py

* Added World covid19 stats in web programming

* Delete josephus_problem.py

* Type hints, algorithmic functions should not print

Return a dict of world covid19 stats.  Move all printing into the main functions.

* Update world_covid19_stats.py

* Update world_covid19_stats.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-08-03 08:45:53 +02:00
Christian Clauss
4535283554
Re-blacken (#2246)
* Avoid double spaces

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-01 09:23:23 +05:30
Kim-R2O
423dd2b020
added daily horoscope scrapper script (#2167)
* added daily horoscope scrapper

* Update daily horoscope scrapper script

code refactoring, script editing

* Update web_programming/daily_horoscope.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-07-10 17:26:27 +02:00
Christian Clauss
5f4da5d616
isort --profile black . (#2181)
* updating DIRECTORY.md

* isort --profile black .

* Black after

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-06 09:44:19 +02:00
ocivo
a7b4311378
fix fetch_github_info __main__ bug (#2080)
* fix fetch_github_info __main__ bug

* Algorithms should not print

* Update fetch_github_info.py

* Update fetch_github_info.py

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
2020-06-11 16:38:43 +02:00
Christian Clauss
fa358d614a
current_weather, weather_forecast, weather_onecall (#2048)
* current_weather, weather_forecast, weather_onecall

* updating DIRECTORY.md

* weather_forecast("Kolkata, India")

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-30 23:47:26 +05:30
Swapnanil Dutta
f8bfd0244d
Created weatherforecast.py (#2037)
* Created weatherforecast.py

Added weatherforecast.py to retrieve weather information of a location and return dictionary values.

* Update weatherforecast.py

* Update and rename weatherforecast.py to current_weather.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-30 17:25:06 +02:00
Christian Clauss
08c8bb5ad5
Deal with maps (#1945)
* Deal with maps

Try with the search term "pizza" to see why this was done in #1932

* fixup! Format Python code with psf/black push

* Update armstrong_numbers.py

* updating DIRECTORY.md

* Update crawl_google_results.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-06 03:32:40 +02:00
Christian Clauss
6acd7fb5ce
Wrap lines that go beyond GitHub Editor (#1925)
* Wrap lines that go beyond GiHub Editor

* flake8 --count --select=E501 --max-line-length=127

* updating DIRECTORY.md

* Update strassen_matrix_multiplication.py

* fixup! Format Python code with psf/black push

* Update decision_tree.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-01 23:36:35 +02:00
matkosoric
7f04e5cd34
contribution guidelines checks (#1787)
* spelling corrections

* review

* improved documentation, removed redundant variables, added testing

* added type hint

* camel case to snake case

* spelling fix

* review

* python --> Python # it is a brand name, not a snake

* explicit cast to int

* spaces in int list

* "!= None" to "is not None"

* Update comb_sort.py

* various spelling corrections in documentation & several variables naming conventions fix

* + char in file name

* import dependency - bug fix

Co-authored-by: John Law <johnlaw.po@gmail.com>
2020-03-04 13:40:28 +01:00
Muhammad Umer Farooq
2b19e84767
Create emails_from_url.py (#1756)
* Create emails_from_url.py

* Update emails_from_url.py

* Update emails_from_url.py

* 0 emails found:

* Update emails_from_url.py

* Use Python set() to remove duplicates

* Update emails_from_url.py

* Add type hints and doctests

Co-authored-by: vinayak <itssvinayak@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2020-02-26 11:41:56 +01:00