Skip to content

Instantly share code, notes, and snippets.

@ngundotra
ngundotra / complex_trippy_gif.py
Created May 27, 2018 07:10
Generate cool gifs of complex plots in python
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
import numpy as np
x = np.linspace(0, 2*np.pi, num=10000)
def f(x):
return np.exp(3*1j*x) + 0.5*np.exp(20j*x) + 1j/7*np.exp(-48j*x) + 0.3j*np.exp(37j*x)
y = f(x)
plt.plot(y.real, y.imag)
fig, ax = plt.subplots(1,1)
{
"tasks": [
{
"httpTask": {
"url": "https://api.github.com/repos/<org>/<repo>/pulls",
"method": "GET",
"headers": [
{
"key": "User-Agent",
"value": "curl/7.78.0"
import { Metaplex, keypairIdentity, bundlrStorage } from '@metaplex-foundation/js';
import { Connection, Keypair, clusterApiUrl } from '@solana/web3.js';
import { readFileSync } from 'fs';
async function sleep(delay: number) {
return new Promise((resolve) => {
setTimeout(() => resolve(null), delay);
});
}
@ngundotra
ngundotra / spl-gov-idl.json
Created August 18, 2022 21:29
Mostly functional SPL Gov Anchor IDL
{
"version": "0.1.0",
"name": "governance",
"instructions": [
{
"name": "createRealm",
"accounts": [
{
"name": "governanceRealmAccount",
"isMut": true,
@ngundotra
ngundotra / tensor.ts
Last active November 20, 2023 19:35
tensorBuySell.ts
import { AnchorProvider, Wallet } from "@project-serum/anchor";
import {
Connection,
Keypair,
MessageV0,
PublicKey,
TransactionInstruction,
VersionedMessage,
VersionedTransaction,
AccountMeta,
@ngundotra
ngundotra / parseLighthouseTx.ts
Last active December 31, 2024 15:37
Parse Lighthouse Instructions
import {
address,
createSolanaRpc,
getBase58Decoder,
getBase58Encoder,
signature,
} from "@solana/web3.js";
import { parseInstructionData } from "@codama/dynamic-parsers";
import { readFileSync } from "fs";
@ngundotra
ngundotra / lighthouse.codama.json
Created December 31, 2024 15:36
Lighthouse Codama With No Hook Links
{"kind":"rootNode","standard":"codama","version":"1.2.0","program":{"kind":"programNode","name":"lighthouse","publicKey":"L2TExMFKdjpN9kozasaurPirfHy9P8sbXoAN1qA3S95","version":"2.0.0","origin":"shank","docs":[],"accounts":[],"instructions":[{"kind":"instructionNode","name":"memoryWrite","docs":[],"optionalAccountStrategy":"programId","accounts":[{"kind":"instructionAccountNode","name":"programId","isWritable":false,"isSigner":false,"isOptional":false,"docs":["Lighthouse program"],"defaultValue":{"kind":"programIdValueNode"}},{"kind":"instructionAccountNode","name":"systemProgram","isWritable":false,"isSigner":false,"isOptional":false,"docs":["System program"],"defaultValue":{"kind":"publicKeyValueNode","publicKey":"11111111111111111111111111111111","identifier":"splSystem"}},{"kind":"instructionAccountNode","name":"payer","isWritable":true,"isSigner":true,"isOptional":false,"docs":["Payer account"],"defaultValue":{"kind":"payerValueNode"}},{"kind":"instructionAccountNode","name":"memory","isWritable":true,"i
@ngundotra
ngundotra / classes-v0.json
Last active May 19, 2025 13:34
All Classes - Logical Data v0
[
{
"catalogType": "definitions",
"items": [
{
"key": "Def_0to1Innovation",
"title": "0 to 1 Innovation",
"definition": "Intensive progress involves going from 0 to 1 (not simply the 1 to n of globalization).",
"lines": [
"assay3:41",
@ngundotra
ngundotra / enriched_nodes.json
Last active June 2, 2025 03:57
Living IP Enriched Json
This file has been truncated, but you can view the full file.
[
{
"key": "def_valueBasedHealthCare",
"title": "Value-Based Health Care",
"definition": "Value-based health care, which focuses on measuring health outcomes and costs",
"lines": [
"3-4"
],
"article_id": "9b72d5ebf17648c3a68e95fa57f1542b",
"article_url": "https://storage.googleapis.com/download/storage/v1/b/teleo-files-cdn/o/teleo%2Fdocs%2Fpid-ce6b7d54c03840adb1f5390bbcf55e05%2Fdid-9b72d5ebf17648c3a68e95fa57f1542b.md?alt=media",
@ngundotra
ngundotra / mcp-response.json
Created June 11, 2025 20:25
OpenAI MCP network call
{
"connector": {
"id": "connector_6849e5b098d4819183df84983fb13a6e",
"created_at": "2025-06-11T20:23:12.597222Z",
"connector_type": "MCP",
"name": "Solana Developer Resources",
"description": "Returns the most up to date resources for documentation across the Solana ecosystem",
"service": "https://mcp.solana.com",
"logo_url": null,
"logo_url_dark": null,