Skip to content

Instantly share code, notes, and snippets.

View meet100ni's full-sized avatar

Meet Soni meet100ni

View GitHub Profile
@meet100ni
meet100ni / Instagram like comment BOT
Created May 26, 2020 14:26
Instagram BOT for like and comment any user's photo by set limits
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import random
class InstaLikeBOT:
def __init__(self, username, password):
self.username = username
self.password = password
@meet100ni
meet100ni / Triangle Quest 2
Created May 13, 2020 13:40
Triangle Quest 2 HackerRank Solution
for i in range(1,int(input())+1):
print(pow(((pow(10,i)-1)//9),2))
@meet100ni
meet100ni / Find Angle MBC HackerRank Solution
Created May 13, 2020 13:34
Find Angle MBC HackerRank Solution
# Enter your code here. Read input from STDIN. Print output to STDOUT
from math import atan
from math import degrees
ab = int(input())
bc = int(input())
print(str(round(degrees(atan((ab / 2) / (bc / 2))))) + "°")
@meet100ni
meet100ni / Polar Coordinates HackerRank Solution
Created May 13, 2020 13:32
Polar Coordinates HackerRank Solution
# Enter your code here. Read input from STDIN. Print output to STDOUT
import cmath
r = complex(input().strip())
print(cmath.polar(r)[0])
print(cmath.polar(r)[1])
@meet100ni
meet100ni / Matrix Script HackerRank Solution
Created May 13, 2020 13:29
Matrix Script HackerRank Solution
# Remove the given code and pest this code
#!/bin/python3
import re
n, m = map(int, input().split())
a, b = [], ""
for _ in range(n):
a.append(input())
@meet100ni
meet100ni / Validating Postal Codes HackerRank Solution
Created May 13, 2020 13:25
Validating Postal Codes HackerRank Solution
regex_integer_in_range = r"^[1-9]\d{5}$" # Do not delete 'r'.
regex_alternating_repetitive_digit_pair = r"(.)(?=.\1)" # Do not delete 'r'.
import re
P = input()
print (bool(re.match(regex_integer_in_range, P))
and len(re.findall(regex_alternating_repetitive_digit_pair, P)) < 2)
@meet100ni
meet100ni / Check Strict Superset HackerRank Solution
Created May 13, 2020 13:21
Check Strict Superset HackerRank Solution
# Enter your code here. Read input from STDIN. Print output to STDOUT
a = set(input().split())
print(all(a > set(input().split()) for _ in range(int(input()))))
@meet100ni
meet100ni / Check Subset HackerRank Solution
Created May 13, 2020 13:19
Check Subset HackerRank Solution
# Enter your code here. Read input from STDIN. Print output to STDOUT
for _ in range(int(input())):
a,A=int(input()),set(map(int,input().split()))
b,B=int(input()),set(map(int,input().split()))
if B==B.union(A):
print(True)
else:
print(False)
@meet100ni
meet100ni / The Captain's Room HackerRank Solution
Created May 13, 2020 13:17
The Captain's Room HackerRank Solution
# Enter your code here. Read input from STDIN. Print output to STDOUT
K = int(input())
set_S = set()
sumlist_S = 0
for i in input().split():
I = int(i)
set_S.add(I)
sumlist_S += I
@meet100ni
meet100ni / Set Mutations HackerRank Solution
Created May 13, 2020 13:10
Set Mutations HackerRank Solution
if __name__ == '__main__':
(_, A) = (int(input()),set(map(int, input().split())))
B = int(input())
for _ in range(B):
(command, newSet) = (input().split()[0],set(map(int, input().split())))
getattr(A, command)(newSet)
print (sum(A))