This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 21557, | |
"name": "Games", | |
"display_name": "Games", | |
"role": "Core", | |
"has_admin": false | |
}, | |
{ | |
"id": 6949935, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from contextlib import contextmanager | |
from PIL import Image | |
from cairosvg import svg2png | |
import io | |
svg_code = """ | |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> | |
<circle cx="12" cy="12" r="10"/> | |
<line x1="12" y1="8" x2="12" y2="12"/> | |
<line x1="12" y1="16" x2="12" y2="16"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
from pathlib import Path | |
signs_folder = Path(r"PATH_HERE") | |
transparent_image = Image.new("RGBA", (1024, 1024), (0, 0, 0, 0)) | |
for sign_folder in signs_folder.iterdir(): | |
sign_name = sign_folder.name.split("-")[0].strip() | |
print(f"Working on {sign_name}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ro_py import Client | |
from dateutil.parser import isoparse | |
import asyncio | |
import base64 | |
import time | |
import json | |
client = Client() | |
requests = client.requests | |
line = "="*40 |