Skip to content

Instantly share code, notes, and snippets.

View Abhayparashar31's full-sized avatar
:octocat:
Learning New Things

Abhay Parashar Abhayparashar31

:octocat:
Learning New Things
View GitHub Profile
import requests
from bs4 import BeautifulSoup
name = input("Job name:\n").replace(" ","-")
city = input("City name:\n")
state = input("State name:\n")
res = requests.get(f'https://www.indeed.co.in/{name}-jobs-in-{city},-{state}')
soup = BeautifulSoup(res.text,'html.parser')
job_name = soup.select('.jobtitle')
for i in range(len(job_name)):
@Abhayparashar31
Abhayparashar31 / alarm.py
Created July 8, 2020 07:44
Create an alarm clock using python
from datetime import datetime
from playsound import playsound
alarm_time = input("Enter the time of alarm to be set:HH:MM:SS\n")
alarm_hour=alarm_time[0:2]
alarm_minute=alarm_time[3:5]
alarm_seconds=alarm_time[6:8]
alarm_period = alarm_time[9:11].upper()
print("Setting up alarm..")
while True:
now = datetime.now()
from win10toast import ToastNotifier
toaster = ToastNotifier()
title = 'sample title'
msg = 'sample msg'
toaster.show_toast(title,msg)
from bs4 import BeautifulSoup
import requests
def scrape(url):
res = requests.get(url)
print("\nSearching in Goodreads......")
soup = BeautifulSoup(res.text,'html.parser')
quote = soup.select('.quoteText')
length = len(quote)
for i in range(0,length):
data = input()
if data[-2:]=='PM' and int(data[:2])!=12:
hour = data[:2]
hour=int(hour)+12
less = data[2:-2]
datas=str(hour)+less
print(datas)
elif data[-2:]=='AM' and int(data[:2])!=12:
print(data[0:-2])
elif data[-2:]=='AM' and data[:2]=='12':
num = int(input())
for i in range(0,num):
number = int(input())
if number<38:
print(number)
elif number%5==0:
print(number)
elif number%5!=0:
rem = number%5
if rem>=3:
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
#include <iostream>
using namespace std;
int main() {
// Complete the code.
int n,n2,i;
cin>>n>>n2;
for(i=n;i<=n2;i++)
{
if(i==1)
{
#include <iostream>
using namespace std;
int max_of_four(int a, int b, int c, int d)
{
int max;
if((a>b) && (a>c) && (a>d))
max = a;
if((b>a) && (b>c) && (b>d))
max = b;
if((c>a) && (c>b) && (c>d))
#include <iostream>
using namespace std;
void update(int m,int n)
{
int c,d;
c=m+n;
d=m-n;
d=abs(d);
cout<<c<<"\n";
cout<<d;