Skip to content

Instantly share code, notes, and snippets.

View diceroll123's full-sized avatar
🎲
rollin'

Steve C diceroll123

🎲
rollin'
  • New Jersey
  • 13:20 (UTC -04:00)
View GitHub Profile
@diceroll123
diceroll123 / solana_watcher_cog.py
Created November 15, 2021 12:48
When Neopets Metaverse sold NFTs, we would watch the sales happen.
from __future__ import annotations
import asyncio
import contextlib
from typing import Any, Dict, List, NamedTuple, Optional
import discord
from cogs.utils.constants import GuildChannels, GuildEmojis, GuildIDs
from cogs.utils.funcs import Plural
from discord.ext import commands, tasks
{"36246":{"value":"~ 1"},"36247":{"value":"~ 1"},"36248":{"value":"~ 1-2"},"36249":{"value":"~ 1-2"},"36250":{"value":"~ 1"},"36251":{"value":"~ 1-2"},"36252":{"value":"~ 1-2"},"36253":{"value":"~ 1-2"},"36254":{"value":"~ 1-2"},"36255":{"value":""},"36256":{"value":"~ 1-2"},"36257":{"value":"~ 1"},"36258":{"value":"~ 1"},"36259":{"value":"~ 3"},"36260":{"value":"~ 1-2"},"36261":{"value":"~ 1-2"},"36262":{"value":"~ 1-2"},"36263":{"value":"~ 1-2"},"36366":{"value":"~ 1-2"},"36367":{"value":"~ 1-2"},"36368":{"value":"~ 1-2"},"36369":{"value":"~ 1-2"},"36370":{"value":"~ 1-2"},"36371":{"value":""},"36373":{"value":"~ 1-2"},"36374":{"value":"~ 1-2"},"36375":{"value":"~ 4-6"},"36377":{"value":"~ 2-3"},"36378":{"value":"~ 1-2"},"36379":{"value":"~ 1-2"},"36380":{"value":""},"36382":{"value":"~ 1-2"},"36383":{"value":"~ 1-2"},"36384":{"value":"~ 2-3"},"36385":{"value":"~ 1-2"},"36386":{"value":"~ 1-2"},"36726":{"value":"~ 1"},"36727":{"value":"~ 1"},"36728":{"value":"~ 1"},"36729":{"value":"~ 1"},"36730":{"value":"
# Credits to the original "lottery calculator" located here:
# https://www.andrew.cmu.edu/user/kmliu/neopets/details.html
# This code is a Python implementation written by me of the
# associated Javascript code from the page above,
# with results sorted to be easier to input manually.
import itertools
import random
from typing import List