Skip to content

Instantly share code, notes, and snippets.

@Vyryn
Vyryn / card.py
Created August 24, 2021 03:44
Utility for 'monkey cards', a quantification of Banano MonKey rarities.
"""
Utilities for 'monKey cards', card-style stat sheets for Appditto's MonKeys
Copyright (C) 2021 Vyryn
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
@Vyryn
Vyryn / wax_util.py
Last active September 1, 2022 14:09
Utilities for reliably publishing transactions to the wax network with notoriously unreliable api endpoints.
"""
Utilities for interacting with unreliable Wax endpoints for transactions on that network.
Copyright (C) 2021 Vyryn
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
# By Vyryn, licensed under GNU GPL.
# Some basic Meros testnet RPC communication to make it a little more convinient to monitor network status and
# test transaction success timing. A few basic async functions and what amounts to terrible examples of their use.
import json
import asyncio
import time
URL = "10.0.0.109"
PORT = 5133
@Vyryn
Vyryn / fetch_wax_mining_events.py
Last active July 9, 2021 17:55
A script to fetch wax mining events on all lands owned by a specified address, to help with distributing rewards or aggregating statistics.
# Wax api Alienworlds Mining aggregator by Vyryn. Licensed under the GNU AGPLv3.
# https://www.gnu.org/licenses/agpl-3.0.en.html
import asyncio
import json
from datetime import datetime
# pip install aiohttp
import aiohttp
# pip install parsedatetime
import parsedatetime as pdt
@Vyryn
Vyryn / atomictoolsx.py
Last active December 12, 2020 00:56
Generate an NFT claimlink on the WAX blockchain
"""Helpers for creating actions on atomictoolsx contract. By Vyryn, licenesed under AGPL."""
from aioeos import types
contract = 'atomictoolsx'
def announcelink(creator: str, key: str, asset_ids: [int], memo: str, authorization=[]) -> types.EosAction:
return types.EosAction(
account=contract,
name='announcelink',
@Vyryn
Vyryn / meros_rpc_socket_test.py
Last active December 11, 2020 08:14
Meros cryptocurrency RPC socket interpretation in python
# By Vyryn, licensed under GNU GPL.
# Some basic Meros testnet RPC communication to make it a little more convinient to monitor network status and
# test transaction success timing. A few basic async functions and what amounts to terrible examples of their use.
import json
import asyncio
URL = "10.0.0.109"
PORT = 5133
@Vyryn
Vyryn / dyson_calcs.py
Last active October 22, 2020 15:48
Calculates the expected emission spectra for a dyson sphere of various size.
from math import pi
"""
Licensed by Vyryn under the MIT License.
This script simplistically calculates emission temperature and peak emission wavelength for a Dyson sphere of varying
parameters.
The US energy sector is ~$350B while US GDP is ~20T
@Vyryn
Vyryn / fermi_galactic_sim.py
Last active October 22, 2020 15:50
A simple simulation of how many civilizations we might be expected to potentially be able to observe based on the Drake Equation and simple geometry.
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
"""
Licensed by Vyryn under the MIT License.
A randomization plot of a number of civilizations in the galaxy and their light cones.
To give a general visual idea of how few would be observable relative to how many there are.
"""
scaling_factor = 1/3000