Skip to content

Instantly share code, notes, and snippets.

@rishipr
rishipr / wonderland_time_machine.py
Last active November 23, 2022 13:11
Rebase Awards Tracker for Wonderland $TIME Staking (MEMO) 🧙‍♂️
'''
🐸 : Created by @0xRishi
🧙‍♂️ : Generates CSV of MEMO (staked TIME) balances every 8 hours since first MEMO transaction + overlays all non-rebase MEMO transactions
🕐 : Used to create wonderland-apy.vercel.app (historical implied APY chart)
(🎩, 🎩) : How to
1) Input your AVAX wallet address into `personal_avax_addr`, your Snowtrace API key into `snowtrace_key`, and your Moralis API key into `moralis_key`
2) Run with `python3`
🐇 : Sample output
from flask import Flask, request, jsonify
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import time
import json
from support import getCIK
from flask_cors import CORS
import pprint
app = Flask(__name__)
import os
from PIL import Image
def main():
# iterate through the names of contents of the folder
path = './images/'
for image_path in os.listdir(path):
input_path = os.path.join(path, image_path)
if not input_path.endswith('.jpg'):
import os
from PIL import Image
import requests
import shutil
import urllib.request
from scraper import BREEDS
num_downloaded = 0
import requests
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--headless")
BREEDS = ['golden retriever', 'yorkshire terrier',
'german shepherd', 'corgi', 'husky', 'dalmatian', 'newfoundland']