Skip to content

Instantly share code, notes, and snippets.

Avatar
👌
Good times, good times

Mihir Chaturvedi plibither8

👌
Good times, good times
View GitHub Profile
@plibither8
plibither8 / lastfm.py
Created Feb 7, 2022
Introduction to Programming API Examples
View lastfm.py
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 Mar 19, 2021
Data file updated from plibither8/lastfm-top-artists
View lastfm-top-artists.json
{
"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,
View index-repos.js
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')
View recent-activity.json
{
"hackernews": [
{
"id": 32947303,
"link": "https://incoherency.co.uk/blog/stories/nightdrive.html",
"time": 1663900180000,
"text": null,
"type": "story",
"title": "Nightdrive"
},
View keybase.md

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 Nov 25, 2018
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 Apr 17, 2018
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2018-04-17T11:41:40.615Z","extensionVersion":"v2.9.0"}
View periodic_table_elements.txt
H Hydrogen
He Helium
Li Lithium
Be Beryllium
B Boron
C Carbon
N Nitrogen
O Oxygen
F Fluorine
Ne Neon
@plibither8
plibither8 / 100000_factorial.txt
Created Jan 29, 2018
100000! calculated using big-number.js
View 100000_factorial.txt
2824229407960347874293421578024535518477494926091224850578918086542977950901063017872551771413831163610713611737361962951474996183123918022726073409093832422005556968866784038037737944496126838014787511196690638604492614453811137009016076686640540717056595226129804195835677890904754151287114083692425153529309626067227103874424608863545436398293174776177553262185112647485586491818038151987716121968151412990230446382406889650835750022964993964236425663527161493520780133120294339305948199604353969420254761018738252172711966524222462978613221897504974019517165315304898748360505669527154801765121621380041098168079734535478517520246219450483450137732631069390935035988598826321052841414001575678609609029165074696613545262530732547530215683071540424970029721042464657713750561658172851551721628867606644818098185845649120912302682768147351225295912356697622384753282615770046948114964848491301953671340001803143401238051136817383529604736178236359090032444297950688020042549707581742810920051587113272541976395544996564320