Skip to content

Instantly share code, notes, and snippets.

View plibither8's full-sized avatar
👌
Good times, good times

Mihir Chaturvedi plibither8

👌
Good times, good times
View GitHub Profile
@plibither8
plibither8 / corporate-actions.ts
Created January 20, 2024 07:32
Script to add stock splits and bonuses from Zerodha
import { GoogleSpreadsheet } from "google-spreadsheet";
import { JWT } from "google-auth-library";
import { writeFile, readFile } from "node:fs/promises";
import { parseFile } from "@fast-csv/parse";
const ActionType = {
Split: "Split",
Bonus: "Bonus",
} as const;
@plibither8
plibither8 / lastfm.py
Created February 7, 2022 09:08
Introduction to Programming API Examples
import requests
API_KEY = "<API-Key>"
BASE_URL = "http://ws.audioscrobbler.com/2.0"
# What was the fifth best album by Sonu Nigam?
def example_1():
url = f"{BASE_URL}?method=artist.gettopalbums&artist=Sonu+Nigam&api_key={API_KEY}&format=json"
data = requests.get(url).json()
album = data["topalbums"]["album"][4]
@plibither8
plibither8 / lastfm-top-artists.json
Last active March 19, 2021 00:28
Data file updated from plibither8/lastfm-top-artists
{
"username": "plibither8",
"lastUpdated": "2021-03-19",
"irregularLastDate": true,
"list": {
"2019-07-31": {
"The Strokes": 42,
"The Rolling Stones": 22,
"Kendrick Lamar": 20,
"Arctic Monkeys": 11,
const url = 'https://api.github.com/users/plibither8/repos?per_page=100';
copy(
[
...await fetch(url).then(res => res.json())
]
.filter(r => !r.fork)
.map(r =>
`* [${r.name}](${r.html_url}) - ${r.archived ? '_Archived_ -' : ''} ${r.description}`
)
.join('\n')
{
"hackernews": [],
"lastfm": {
"totalPlayCount": 93,
"topFive": [
{
"name": "Julian Casablancas",
"playcount": "15",
"image": "https://i.scdn.co/image/24effa2ec2302a26f9891b3190dea17491d368fa",
"url": "https://www.last.fm/music/Julian+Casablancas"
@plibither8
plibither8 / 📊 Weekly development breakdown
Created September 13, 2019 13:03
📊 Weekly development breakdown
Hey there :)

Keybase proof

I hereby claim:

  • I am plibither8 on github.
  • I am plibither8 (https://keybase.io/plibither8) on keybase.
  • I have a public key ASD3yjyuszh_M_AZ9T_F38qa0sNSmvYf6poreSyy9TzsjAo

To claim this, I am signing this object:

@plibither8
plibither8 / analyse.js
Last active November 25, 2018 15:52
Raw text of 1,000,000! calculated using the new BigInt, the new numeric primitive in JavaScript, using the Chrome dev console (https://developers.google.com/web/updates/2018/05/bigint). Digit frequency analysis done too.
We couldn’t find that file to show.
@plibither8
plibither8 / cloudSettings
Created April 17, 2018 11:42
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-04-17T11:41:40.615Z","extensionVersion":"v2.9.0"}
H Hydrogen
He Helium
Li Lithium
Be Beryllium
B Boron
C Carbon
N Nitrogen
O Oxygen
F Fluorine
Ne Neon