Skip to content

Instantly share code, notes, and snippets.

View aadibajpai's full-sized avatar
💡
due tomorrow, do tomorrow

Aadi Bajpai aadibajpai

💡
due tomorrow, do tomorrow
View GitHub Profile
<?xml version="1.0"?>
<substratum>
<wallpaper id="Dank Wall">
<link>https://i.imgur.com/L8IymFV.png</link>
<preview>https://i.imgur.com/L8IymFV.png</preview>
</wallpaper>
</substratum>
@aadibajpai
aadibajpai / FizzBuzz.py
Created March 18, 2018 17:18
FizzBuzz as short as possible by me
for x in range(1,101):print('Fizz'*(x%3==0)+'Buzz'*(x%5==0) or x) # 65 chars
import os
import sys
import time
import json
import requests
import argparse
import lxml.html
import matplotlib.pyplot as plt
import numpy as np
from lxml.cssselect import CSSSelector
import argparse
from swaglyrics.cli import lyrics, clear
from swaglyrics.tab import app
from swaglyrics import spotify
import time
def main():
parser = argparse.ArgumentParser(
description="Get lyrics for currently playing song on Spotify. Either --tab or --cli is required.")

Keybase proof

I hereby claim:

  • I am aadibajpai on github.
  • I am aadibajpai (https://keybase.io/aadibajpai) on keybase.
  • I have a public key whose fingerprint is 18C4 DA68 34D8 4A33 6393 C452 AA75 B83D B247 03D6

To claim this, I am signing this object:

WTZK5LKFZ00AT3H7EUA450X
WTZK5LKFZ00AT3H7EUB450X
WTZK5LKFZ00AT3H7EUC450X
WTZK5LKFZ00AT3H7EUD450X
WTZK5LKFZ00AT3H7EUE450X
WTZK5LKFZ00AT3H7EUF450X
WTZK5LKFZ00AT3H7EUG450X
WTZK5LKFZ00AT3H7EUH450X
WTZK5LKFZ00AT3H7EUI450X
WTZK5LKFZ00AT3H7EUJ450X
@aadibajpai
aadibajpai / check_signature.py
Created June 20, 2019 00:24
Python function to validate GitHub Webhook
import hmac
import hashlib
def is_valid_signature(x_hub_signature, data, private_key):
# x_hub_signature and data are from the webhook payload
# private key is your webhook secret
hash_algorithm, github_signature = x_hub_signature.split('=', 1)
algorithm = hashlib.__dict__.get(hash_algorithm)
encoded_key = bytes(private_key, 'latin-1')
mac = hmac.new(encoded_key, msg=data, digestmod=algorithm)
🚛 🥇 0️⃣ ✋ 📥 🥇
🚛 🥇 1️⃣ 7️⃣ 4️⃣ 8️⃣ 8️⃣ ✋ 📥 🥇
🚛 🥇 1️⃣ 6️⃣ 7️⃣ 5️⃣ 8️⃣ ✋ 📥 🥇
🚛 🥇 1️⃣ 6️⃣ 5️⃣ 9️⃣ 9️⃣ ✋ 📥 🥇
🚛 🥇 1️⃣ 6️⃣ 2️⃣ 8️⃣ 5️⃣ ✋ 📥 🥇
🚛 🥇 1️⃣ 6️⃣ 0️⃣ 9️⃣ 4️⃣ ✋ 📥 🥇
🚛 🥇 1️⃣ 5️⃣ 5️⃣ 0️⃣ 5️⃣ ✋ 📥 🥇
🚛 🥇 1️⃣ 5️⃣ 4️⃣ 1️⃣ 7️⃣ ✋ 📥 🥇
🚛 🥇 1️⃣ 4️⃣ 8️⃣ 3️⃣ 2️⃣ ✋ 📥 🥇
🚛 🥇 1️⃣ 4️⃣ 4️⃣ 5️⃣ 0️⃣ ✋ 📥 🥇
@aadibajpai
aadibajpai / Tracks.txt
Last active July 14, 2019 21:04
Current Spotify US Top 50 Chart
Señorita by Shawn Mendes
Goodbyes (Feat. Young Thug) by Post Malone
Money In The Grave (Drake ft. Rick Ross) by Drake
Beautiful People (feat. Khalid) by Ed Sheeran
Truth Hurts by Lizzo
Panini by Lil Nas X
Antisocial (with Travis Scott) by Ed Sheeran
I Don't Care (with Justin Bieber) by Ed Sheeran
Ransom by Lil Tecca
bad guy (with Justin Bieber) by Billie Eilish
@aadibajpai
aadibajpai / hello
Created August 7, 2019 08:07
hello
hello