Skip to content

Instantly share code, notes, and snippets.

@lordsutch
lordsutch / dirty-osm.py
Last active December 28, 2021 22:35
Python script to force re-rendering of OpenStreetMap tiles in a given area at wider zoom levels
#!/usr/bin/env python3
# Dirty tiles in a specified area in OpenStreetMap
import argparse
import datetime
import decimal
import email.utils
import math
import re
@lordsutch
lordsutch / randcaps.py
Created April 6, 2022 23:53
Randomly capitalize some text so you can be l33t on social media
#!/usr/bin/env python3
import argparse
import random
import sys
DEFAULT_PERCENTAGE = 40
def randcaps(text: str, percentage: float = DEFAULT_PERCENTAGE) -> str: