Skip to content

Instantly share code, notes, and snippets.

I don't know if this would be useful/interesting to anyone else, but I made a list tracking the base stat adjustments that happend with the split of Special into Special Attack and Special Defense in Gen II, and it's even sorted so that the most dramatic losers and winners are at either end.

This is not tracking which Pokémon's Special turned into Special Attack and which one's turned into Special Defense (or both). Such lists are easy to find.

This list tracks the nerfs or buffs to a Pokémon's base stats compared to what they would be if the Special stat had been inherited for both Special Attack and Special Defense.

For example, if you think of Gen I Chansey under the modern stat system, it would have base 105 Special Attack and base 105 Special Defense, meaning that the transition to Gen II nerfed its Special Attack by 70 points.

@Zeturic
Zeturic / classify.py
Created July 25, 2022 07:49
generator -> iterable container
def classify(fn):
class Wrapper:
def __init__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
def __iter__(self):
yield from fn(*self.args, **self.kwargs)
return Wrapper
@Zeturic
Zeturic / evaluate.py
Last active July 15, 2025 23:05
Evaluate math expressions in Python using whitelisted AST nodes and eval
import ast
import math
from types import MappingProxyType
_empty_map = MappingProxyType({})
math_locals = MappingProxyType(
{name: value for (name, value) in vars(math).items() if not name.startswith('_')} |
{"abs": abs, "complex": complex, "min": min, "max": max, "pow": pow, "round": round}
parentheses in `struct` format strings for substructures
`pathlib.Path.read_lines` and `pathlib.Path.write_lines`
lazy version of str.splitlines
easier way to manage range objects
method that returns (start, stop, step) as a tuple
methods that take return modified copies
ChainSet
OrderedSet
read-only proxies for lists and sets
collections.abc classes should have useful reprs
; small AHK script to copy a filename to the clipboard
; defaults to ctrl + shift + c
^+c::
clipboard := Explorer_GetSelection_Basename()
return
Explorer_GetSelection_Basename(hwnd="") {
fullname := Explorer_GetSelection(hwnd)
SplitPath fullname, ToReturn