Skip to content

Instantly share code, notes, and snippets.

@gentlegiantJGC
gentlegiantJGC / get_github_release_download_count.py
Created September 11, 2022 11:21
Get the total download count for all assets in all releases for a repository.
from urllib.request import urlopen, Request
import json
# The Github API has a rate limit. This can be increased with the use of an access token.
# An access token is required if there are many releases.
# You can create one here: https://github.com/settings/tokens/new
# The access token does not need any permissions unless you are using this on a private repository in which case it needs the repo permission.
TOKEN = "" # Put your token here. Do not share it online.
OWNER = "Amulet-Team"
@gentlegiantJGC
gentlegiantJGC / NBT 3 Changelog.md
Last active July 28, 2022 14:30
A changelog of the features that have changed in V3 of the NBT library

NBT Library V3

Why is this needed?

V1 of the NBT library did some things that in hindsight were a bad idea. V3 of the NBT library is a large overhaul that adds a number of features and removes some as well. V2 is a bridge between the versions. It has all the good parts of V3 the bad parts of V1 depreciated. This means that the old code should, for the most part, continue to work but with a lot of warnings in the console. If you are a code author you should look over the changelog and your code and update it to use the new API.

Changelog

from threading import Thread, get_ident
import time
# ThreadingEnabled = False
ThreadingEnabled = True
def main():
class DummyObj:
def __init__(self):