Skip to content

Instantly share code, notes, and snippets.

View abidkhan484's full-sized avatar
🎯
Focusing

AbId KhAn abidkhan484

🎯
Focusing
View GitHub Profile
import scrapy
class HackerrankSpider(scrapy.Spider):
name = 'hackerrank'
start_urls = ['http://www.hackerrank.com/login']
def parse(self, response):
form = {'login': 'myUserName', 'password': 'secret'}
char = ['a', 'b', 'c', 'd', 'e', 'f']
freq = [5, 9, 12, 13, 16, 45]
class Node:
def __init__(self, data, char=None):
self.data = data
self.char = char
self.head = data
self.left = None
# the problem is not solved yet
from itertools import product
k, m = map(int, input().split())
li = []
for _ in range(k):
pagli = list(map(int, input().split()))
pagli.pop(0)
def checkAnswer(x, y):
c = 0
for i in range(m):
if x[i] or y[i]:
c += 1
return c
n,m = map(int, input().split())
topic = []
count=0; maxim = -1
def checkPath(row, col):
li = []
if row-1 >= 0 and not ar[row-1][col]:
ar[row-1][col] = ar[row][col] + 1
li.append([row-1, col])
if col-1 >= 0 and not ar[row][col-1]:
ar[row][col-1] = ar[row][col] + 1
li.append([row, col-1])
if row+1 < 8 and not ar[row+1][col]:
ar[row+1][col] = ar[row][col] + 1
for nothing in range(int(input().strip())):
n, first = map(int, input().split())
sec = first
for _ in range(n):
d = input().split()
if d[0]=='P':
first = sec
sec = d[1]
elif d[0]=='B':
sec, first = first, sec
@abidkhan484
abidkhan484 / map_api.html
Created September 16, 2018 15:47
Trying to use google map api...
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Marker Clustering</title>
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
# not yet solved
# a test case: 15 5 2 3
n, a, b, c = map(int, input().split())
a, b, c = sorted([a,b,c])
p, q, r = (n//a)+1, (n//b)+1, (n//c)+1
maximum = -1
for i in range(r):
import socket
import random
import time
import sys
log_level = 2
def log(text, level=1):
if log_level >= level:
print(text)
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
import csv
import time