Skip to content

Instantly share code, notes, and snippets.

View spkprav's full-sized avatar
🧑‍🚀
spkprav@github:(me) $ git merge multiverse

Praveen Kumar S spkprav

🧑‍🚀
spkprav@github:(me) $ git merge multiverse
View GitHub Profile
@spkprav
spkprav / minute_notifier.py
Last active October 17, 2023 14:56
This is one of the strategies that I am using to catch a trade at the earliest, yet to work on automating the trade
# This script will fetch the notifier data from unstructured CSV data
# and convert that into structured and store the same into MongoDB
# This converted structured data is used to visualize in charts
import pdb
import os
import csv
import pandas as pd
import numpy as np
from datetime import datetime
@spkprav
spkprav / cookieLoginChromeExtension.js
Last active May 8, 2024 04:13
Cookie Login in Chrome Extension
// This goes into background/index.js
function parseJwt(token) {
// Decode base64url encoded string
function base64UrlDecode(str) {
return decodeURIComponent(
atob(str.replace(/_/g, "/").replace(/-/g, "+"))
.split("")
.map(c => '%' + c.charCodeAt(0).toString(16).padStart(2, '0'))
.join("")
);