Skip to content

Instantly share code, notes, and snippets.

View BlossomiShymae's full-sized avatar
🏳️‍⚧️

estrogen elf BlossomiShymae

🏳️‍⚧️
View GitHub Profile
@bangingheads
bangingheads / README.md
Created November 21, 2024 16:32
TFT Team Planner Codes

TFT Team Planner Codes

This gist describes how team planner codes are generated. This allows you to create your own team comps for pasting in the client without needing to use the client.

The code is a hexadecimal representation of champions. Here's a breakdown of the bits in the code. Example code 010102030405060708090ATFTSet13

01 01 02 03 04 05 06 07 08 09 0A TFTSet13
Always starts with 01 Champion 1 Champion 2 Champion 3 Champion 4 Champion 5 Champion 6 Champion 7 Champion 8 Champion 9 Champion 10 TFT Set ID
@bangingheads
bangingheads / cdragonrates.py
Created November 22, 2021 15:25
Script to grab champion play rates from cdragon in meraki format
import json
import re
import requests
all_champs = {}
data = requests.get("https://raw.communitydragon.org/latest/plugins/rcp-fe-lol-champion-statistics/global/default/rcp-fe-lol-champion-statistics.js")
matches = re.findall('.exports=({.*)},', data.text)
if len(matches) > 0:
match = matches[0]
match = re.sub("([A-Z0-9]*):", r'"\1":', match)
@jonlabelle
jonlabelle / strip_tag_attribs.md
Last active February 15, 2025 00:04
This Regular Expression removes all attributes and values from an HTML tag, preserving the tag itself and textual content (if found).

Strip HTML Attributes

<([a-z][a-z0-9]*)[^>]*?(/?)>
token explanation
< match < at beginning of tags
( start capture group $1 - tag name
[a-z] match a through z