Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit 248b93a

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 36ba537 + 44d7cc8 commit 248b93a

File tree

77 files changed

+1940
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1940
-18
lines changed

.all-contributorsrc

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,114 @@
182182
"contributions": [
183183
"code"
184184
]
185+
},
186+
{
187+
"login": "nj1902",
188+
"name": "DopeKid",
189+
"avatar_url": "https://avatars0.githubusercontent.com/u/56442920?v=4",
190+
"profile": "https://github.com/nj1902",
191+
"contributions": [
192+
"code"
193+
]
194+
},
195+
{
196+
"login": "rohitjoshi6",
197+
"name": "Rohit_Joshi",
198+
"avatar_url": "https://avatars1.githubusercontent.com/u/56406787?v=4",
199+
"profile": "https://github.com/rohitjoshi6",
200+
"contributions": [
201+
"code"
202+
]
203+
},
204+
{
205+
"login": "varuntumbe",
206+
"name": "Varun Hegde",
207+
"avatar_url": "https://avatars0.githubusercontent.com/u/44541344?v=4",
208+
"profile": "https://github.com/varuntumbe",
209+
"contributions": [
210+
"code"
211+
]
212+
},
213+
{
214+
"login": "aswarth123",
215+
"name": "aswarth123",
216+
"avatar_url": "https://avatars2.githubusercontent.com/u/53229329?v=4",
217+
"profile": "https://github.com/aswarth123",
218+
"contributions": [
219+
"code"
220+
]
221+
},
222+
{
223+
"login": "Vyprath",
224+
"name": "Pranav",
225+
"avatar_url": "https://avatars3.githubusercontent.com/u/58635215?v=4",
226+
"profile": "https://github.com/Vyprath",
227+
"contributions": [
228+
"code"
229+
]
230+
},
231+
{
232+
"login": "panudet-24mb",
233+
"name": "Panudet Panumas",
234+
"avatar_url": "https://avatars3.githubusercontent.com/u/47716860?v=4",
235+
"profile": "https://github.com/panudet-24mb",
236+
"contributions": [
237+
"code"
238+
]
239+
},
240+
{
241+
"login": "Jaideep07",
242+
"name": "Jaideep07",
243+
"avatar_url": "https://avatars0.githubusercontent.com/u/53224282?v=4",
244+
"profile": "https://github.com/Jaideep07",
245+
"contributions": [
246+
"code"
247+
]
248+
},
249+
{
250+
"login": "infern018",
251+
"name": "Vishwas Singh",
252+
"avatar_url": "https://avatars1.githubusercontent.com/u/52378712?v=4",
253+
"profile": "https://github.com/infern018",
254+
"contributions": [
255+
"code"
256+
]
257+
},
258+
{
259+
"login": "krishnajalan",
260+
"name": "Krishna Jalan",
261+
"avatar_url": "https://avatars3.githubusercontent.com/u/69248796?v=4",
262+
"profile": "https://github.com/krishnajalan",
263+
"contributions": [
264+
"doc"
265+
]
266+
},
267+
{
268+
"login": "officialpm",
269+
"name": "Parth Maniar",
270+
"avatar_url": "https://avatars3.githubusercontent.com/u/45627498?v=4",
271+
"profile": "http://linkedin.com/in/parthdmaniar",
272+
"contributions": [
273+
"code"
274+
]
275+
},
276+
{
277+
"login": "Rogue-Halo",
278+
"name": "Rogue Halo",
279+
"avatar_url": "https://avatars3.githubusercontent.com/u/47247405?v=4",
280+
"profile": "https://github.com/Rogue-Halo",
281+
"contributions": [
282+
"code"
283+
]
284+
},
285+
{
286+
"login": "Apex-code",
287+
"name": "APEX",
288+
"avatar_url": "https://avatars2.githubusercontent.com/u/30106022?v=4",
289+
"profile": "https://github.com/Apex-code",
290+
"contributions": [
291+
"code"
292+
]
185293
}
186294
],
187295
"contributorsPerLine": 7,

.deepsource.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version = 1
2+
3+
[[analyzers]]
4+
name = "python"
5+
enabled = true
6+
7+
[analyzers.meta]
8+
runtime_version = "3.x.x"

.github/hacktoberfest_label.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
Hacktoberfest:
1+
hacktoberfest:
2+
- "."
3+
hacktoberfest2020:
4+
- "."
5+
good first issue:
6+
- "."
7+
help wanted:
8+
- "."
9+
Python:
10+
- "."
11+
Up-for-grab:
212
- "."

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com)
77

88
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
9-
[![All Contributors](https://img.shields.io/badge/all_contributors-19-orange.svg?style=flat-square)](#contributors-)
9+
[![All Contributors](https://img.shields.io/badge/all_contributors-31-orange.svg?style=flat-square)](#contributors-)
1010
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1111

1212
![Issues](https://img.shields.io/github/issues/Python-World/Python_and_the_Web)
@@ -116,6 +116,22 @@ We now have a section for miscellaneous scripts as well.
116116
<td align="center"><a href="http://madhavmehndiratta.me"><img src="https://avatars3.githubusercontent.com/u/43489174?v=4" width="100px;" alt=""/><br /><sub><b>Madhav Mehndiratta</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=madhavmehndiratta" title="Code">💻</a></td>
117117
<td align="center"><a href="http://www.linkedin.com/in/yogeshwaran01"><img src="https://avatars1.githubusercontent.com/u/66836092?v=4" width="100px;" alt=""/><br /><sub><b>YOGESHWARAN R</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=yogeshwaran01" title="Code">💻</a></td>
118118
<td align="center"><a href="http://pranav6670.github.io"><img src="https://avatars1.githubusercontent.com/u/31882923?v=4" width="100px;" alt=""/><br /><sub><b>Pranav Natekar</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=pranav6670" title="Code">💻</a></td>
119+
<td align="center"><a href="https://github.com/nj1902"><img src="https://avatars0.githubusercontent.com/u/56442920?v=4" width="100px;" alt=""/><br /><sub><b>DopeKid</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=nj1902" title="Code">💻</a></td>
120+
<td align="center"><a href="https://github.com/rohitjoshi6"><img src="https://avatars1.githubusercontent.com/u/56406787?v=4" width="100px;" alt=""/><br /><sub><b>Rohit_Joshi</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=rohitjoshi6" title="Code">💻</a></td>
121+
</tr>
122+
<tr>
123+
<td align="center"><a href="https://github.com/varuntumbe"><img src="https://avatars0.githubusercontent.com/u/44541344?v=4" width="100px;" alt=""/><br /><sub><b>Varun Hegde</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=varuntumbe" title="Code">💻</a></td>
124+
<td align="center"><a href="https://github.com/aswarth123"><img src="https://avatars2.githubusercontent.com/u/53229329?v=4" width="100px;" alt=""/><br /><sub><b>aswarth123</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=aswarth123" title="Code">💻</a></td>
125+
<td align="center"><a href="https://github.com/Vyprath"><img src="https://avatars3.githubusercontent.com/u/58635215?v=4" width="100px;" alt=""/><br /><sub><b>Pranav</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=Vyprath" title="Code">💻</a></td>
126+
<td align="center"><a href="https://github.com/panudet-24mb"><img src="https://avatars3.githubusercontent.com/u/47716860?v=4" width="100px;" alt=""/><br /><sub><b>Panudet Panumas</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=panudet-24mb" title="Code">💻</a></td>
127+
<td align="center"><a href="https://github.com/Jaideep07"><img src="https://avatars0.githubusercontent.com/u/53224282?v=4" width="100px;" alt=""/><br /><sub><b>Jaideep07</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=Jaideep07" title="Code">💻</a></td>
128+
<td align="center"><a href="https://github.com/infern018"><img src="https://avatars1.githubusercontent.com/u/52378712?v=4" width="100px;" alt=""/><br /><sub><b>Vishwas Singh</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=infern018" title="Code">💻</a></td>
129+
<td align="center"><a href="https://github.com/krishnajalan"><img src="https://avatars3.githubusercontent.com/u/69248796?v=4" width="100px;" alt=""/><br /><sub><b>Krishna Jalan</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=krishnajalan" title="Documentation">📖</a></td>
130+
</tr>
131+
<tr>
132+
<td align="center"><a href="http://linkedin.com/in/parthdmaniar"><img src="https://avatars3.githubusercontent.com/u/45627498?v=4" width="100px;" alt=""/><br /><sub><b>Parth Maniar</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=officialpm" title="Code">💻</a></td>
133+
<td align="center"><a href="https://github.com/Rogue-Halo"><img src="https://avatars3.githubusercontent.com/u/47247405?v=4" width="100px;" alt=""/><br /><sub><b>Rogue Halo</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=Rogue-Halo" title="Code">💻</a></td>
134+
<td align="center"><a href="https://github.com/Apex-code"><img src="https://avatars2.githubusercontent.com/u/30106022?v=4" width="100px;" alt=""/><br /><sub><b>APEX</b></sub></a><br /><a href="https://github.com/Python-World/Python_and_the_Web/commits?author=Apex-code" title="Code">💻</a></td>
119135
</tr>
120136
</table>
121137

@@ -128,4 +144,4 @@ SR No | Project | Author
128144
2 | [Pycon Proposals Scraper](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Web_Scrappers/Pycon_Proposals)| [Aditya Jetely](https://github.com/AdityaJ7)
129145
3 | [Hacktoberfest Events Scraper](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Web_Scrappers/Hacktoberfest_Events)| [Aditya Jetely](https://github.com/AdityaJ7)
130146
4 | [Wifi Speed Tester](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Miscellaneous/Wifi_Speed)| [AdeshChoudhar19](https://github.com/AdeshChoudhar19)
131-
5 | [Google Search Using Python](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Miscellaneous/Wifi_Speed)| [Naman Jain](https://github.com/nj1902)
147+
5 | [Google Search Using Python](https://github.com/Python-World/Python_and_the_Web/tree/master/Scripts/Web_Scrappers/Google%20Search%20Using%20Python)| [Naman Jain](https://github.com/nj1902)

Scripts/API/Github_information/github_scraper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import requests
23

34
# Function to call API for details of the User.
@@ -14,16 +15,15 @@ def findUserInfo(username):
1415
def getField(key, dic):
1516
if dic[key] is None:
1617
return 'Not Available'
17-
else:
18-
return dic[key]
18+
return dic[key]
1919

2020

2121
if __name__ == "__main__":
2222
username = input('Enter the Username: ')
2323
userDetails = findUserInfo(username)
2424
if 'message' in userDetails.keys():
2525
print('Username not Found')
26-
exit()
26+
sys.exit()
2727
else:
2828
print('** Name **\n'+userDetails['name'], '\n')
2929
print('** About **\n')

Scripts/API/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
##What is an API?
1+
## What is an API?
22

33
An API, or Application Programming Interface, is a server that you can use to retrieve and send data to using code. APIs are most commonly used to retrieve data, and that will be the focus of this beginner tutorial.
44

55
When we want to receive data from an API, we need to make a request. Requests are used all over the web. For instance, when you visited this blog post, your web browser made a request to the Dataquest web server, which responded with the content of this web page.
66

77

8-
##Making API Requests in Python
8+
## Making API Requests in Python
99

1010
In order to work with APIs in Python, we need tools that will make those requests. In Python, the most common library for making requests and working with APIs is the requests library. The requests library isn’t part of the standard Python library, so you’ll need to install it to get started.
1111

1212
If you use pip to manage your Python packages, you can install requests using the following command:
1313

14-
#pip install requests
14+
# pip install requests
1515
If you use conda, the command you’ll need is:
1616

17-
#conda install requests
17+
# conda install requests
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Random Quote Notification
2+
A simple program presenting the use of an API, the plyer notification module and Scheduling tasks in Python.
3+
4+
### Prerequisites
5+
- These are located in requirements.txt
6+
- You can run `pip install -r requirements.txt` to install these
7+
8+
### How to run the script
9+
- Just run `main.py`
10+
11+
### Result
12+
![Expected Output](result.png)
13+
14+
## *Author Name*
15+
[Rogue Halo](https://github.com/rogue-halo)
422 KB
Binary file not shown.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Random Quote Desktop Notification
2+
# Author: Rogue Halo
3+
# Date: 1st October 2020
4+
#---------------------------------
5+
# Imports
6+
import requests
7+
from plyer import notification
8+
from apscheduler.schedulers.blocking import BlockingScheduler
9+
10+
# Sub-Routines
11+
def fetch(): # This gets the quote from the API and turns it into the quote to be displayed
12+
quoteSite = requests.get("http://api.quotable.io/random")
13+
quoteJson = quoteSite.json()
14+
quote = quoteJson["content"] + "\n- " + quoteJson["author"]
15+
if len(quote) > 256:
16+
fetch()
17+
else:
18+
return quote
19+
20+
def display(quote): # Uses the plyer module to display the quote
21+
notification.notify(title="Random Quote",message=quote,app_name="Random Quote",app_icon="icon.ico", timeout=10,toast=False)
22+
23+
# Main Program
24+
def task(): # This puts it all together
25+
quote = fetch()
26+
display(quote)
27+
28+
if __name__ == "__main__":
29+
task() # So that it prints a quote without waiting for the interval
30+
scheduler = BlockingScheduler() # Creates a scheduler
31+
scheduler.add_job(task, 'interval', hours=1) # Sets the interval, you may change this to your preferences
32+
scheduler.start() # Starts scheduler
Binary file not shown.

0 commit comments

Comments
 (0)