This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from win10toast import ToastNotifier | |
toaster = ToastNotifier() | |
title = 'sample title' | |
msg = 'sample msg' | |
toaster.show_toast(title,msg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int n; | |
cin >> n; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
OlderNewer