Skip to content

Instantly share code, notes, and snippets.

View thepushkarp's full-sized avatar
🐒
embracing chaos

Pushkar Patel thepushkarp

🐒
embracing chaos
View GitHub Profile
@thepushkarp
thepushkarp / testSelenium.js
Created November 4, 2020 03:24
JS code to test Pathshala using Selenium
const { Builder, By, Key, until } = require('selenium-webdriver')
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
async function testJoin(classCode) {
console.log('Testing Joining')
const driver = await new Builder().forBrowser('chrome').build()
@thepushkarp
thepushkarp / clone_github_repo_in_colab.txt
Created October 13, 2020 16:40
Commands to clone your repository in Google Colab
uname = "<your username>"
!git config --global user.email '<your email>'
!git config --global user.name '<your name>'
from getpass import getpass
password = getpass('Password:')
!git clone https://$uname:$password@github.com/<username>/<repo name>.git
!cd <repo name>
def solution(s):
codes = { ' ' : '000000',
'a' : '100000',
'b' : '110000',
'c' : '100100',
'd' : '100110',
'e' : '100010',
'f' : '110100',
'g' : '110110',
'h' : '110010',
@thepushkarp
thepushkarp / currentDate.gs
Last active July 7, 2020 10:36
Custom Script to add current date in Google Docs
function onOpen() {
var ui = DocumentApp.getUi();
// Or FormApp or SpreadsheetApp.
ui.createMenu('Custom Scripts')
.addItem('Insert Date', 'insertDate')
.addToUi();
}
function insertDate() {
var cursor = DocumentApp.getActiveDocument().getCursor();
@thepushkarp
thepushkarp / requirements.txt
Created June 22, 2020 12:33
Python script to scrape Twitter handles of your circles from Chirpty
selenium==3.141.0
webdriver_manager==3.2.1
beautifulsoup4==4.9.1
@thepushkarp
thepushkarp / emails.py
Last active February 6, 2021 05:14
Email generation script for batch mails of IIIT Vadodara
"""
Email generation script for batch mails of IIIT Vadodara
"""
# import pyperclip # Use pyperclip if you want to paste emails directly to clipboard
emails = ""
# Batch of 2016
# for i in range(1, 62 + 1): # CSE
@thepushkarp
thepushkarp / input_testfile_formatting_validator_template.cpp
Created April 22, 2020 20:09
Testcase Input Formatting Validator Template
// Original file - https://pastebin.com/Vk8tczPu
#include <iostream>
#include <assert.h>
#include <algorithm>
#include <vector>
#include <set>
#include <string>
#include <queue>
#include <map>
using namespace std;