Spaces:
Running
Running
Commit ·
83891df
1
Parent(s): 3918634
add alpha to tao price, add is active checkbox, make row indexes show automagically
Browse files3 unmodified lines4567891013 unmodified lines242526272829303132333435361 unmodified line3839404142434445464748495051525320 unmodified lines74757677787980813 unmodified linesimport pandas as pdimport time# uga-buga cachingg_cached_data: pd.DataFrame | None = Noneg_last_fetch_time = 0.013 unmodified linesfor sn in range(1, 129):subnet = subnets[sn]metagraph = metagraphs[sn]address_to_uid = {hk: i for i, hk in enumerate(metagraph.hotkeys)}# The incentives that are assigned to the owner hotkey are being burned/not given out# by Maciej Kula [Bo𝞃, Bo𝞃] 23.07.2025addresses = [("hotkey", subnet.owner_hotkey)] # So don't include coldkey.for key_type, address in addresses:uid = address_to_uid.get(address, None)if uid is None:continue1 unmodified lineif incentive <= 0:continuedata.append([f"[netuid: {sn} / {subnet.subnet_name}](https://taostats.io/subnets/{sn})",incentive*100,uid,f"[{address}](https://taostats.io/{key_type}/{address})"])breakdata = [(i+1, *d) for i, d in enumerate(data)]df = pd.DataFrame(data, columns=["#", "Subnet", "Burn (%)", "UID", "Address"]) # type: ignoreprint(f"{len(data)} subnets burn")return df20 unmodified lines)next_process_text = gr.Textbox(label="Next refresh time", interactive=False)output_df = gr.DataFrame(datatype=["number", "markdown", "number", "number", "markdown"],label="Subnet Burn Data",interactive=False,max_height=1000000)3 unmodified lines4567891013 unmodified lines24252627282930313233343536371 unmodified line394041424344454647484950515253545520 unmodified lines7677787980818283843 unmodified linesimport pandas as pdimport time# primitive cachingg_cached_data: pd.DataFrame | None = Noneg_last_fetch_time = 0.013 unmodified linesfor sn in range(1, 129):subnet = subnets[sn]metagraph = metagraphs[sn]hotkeys_to_uid = {hk: i for i, hk in enumerate(metagraph.hotkeys)}# The incentives that are assigned to the owner hotkey are being burned/not given out# by Maciej Kula [Bo𝞃, Bo𝞃] 23.07.2025addresses = [("hotkey", subnet.owner_hotkey)] # So don't include ("coldkey", subnet.owner_coldkey).for key_type, address in addresses:uid = hotkeys_to_uid.get(address, None)if uid is None:continue1 unmodified lineif incentive <= 0:continueis_active = metagraph.pending_root_emission.tao > 0data.append([f"[netuid: {sn} / {subnet.subnet_name}](https://taostats.io/subnets/{sn})",is_active,round(subnet.alpha_to_tao(1).tao, 6),round(incentive*100, 2),f"[{address}](https://taostats.io/{key_type}/{address}) [{uid}]"])breakdf = pd.DataFrame(data, columns=["Subnet", "Active", "α to τ", "Burn (%)", "Address [UID]"]) # type: ignoreprint(f"{len(data)} subnets burn")return df20 unmodified lines)next_process_text = gr.Textbox(label="Next refresh time", interactive=False)output_df = gr.DataFrame(datatype=["markdown", "bool", "number", "number", "markdown"],label="Subnet Burn Data",show_row_numbers=True,interactive=False,max_height=1000000)
app.py+13-10