This file contains hidden or 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
#!/bin/bash | |
# update-shadcn-components.sh | |
# Script to bulk update all shadcn/ui components in a Next.js project | |
# Usage: ./update-shadcn-components.sh | |
# Set error handling | |
set -e | |
# Check if we're in a Next.js project |
This file contains hidden or 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
""" | |
Script to automatically update uv.lock and then update pyproject.toml dependencies. | |
Prerequisites: | |
1. Python 3.11+ (for tomllib) | |
2. tomli-w package (`pip install tomli-w`) | |
3. uv installed and available in PATH | |
Usage: | |
Run this script: `python upgrade_pyproject.py` |
This file contains hidden or 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
import re | |
from nltk.corpus import wordnet | |
class RepeatReplacer(object): | |
def __init__(self): | |
self.repeat_regexp = re.compile(r'(\w*)(\w)\2(\w*)') | |
self.repl = r'\1\2\3' | |
def replace(self, word): |
This file contains hidden or 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
import re | |
replacement_patterns = [ | |
(r'won\'t', 'will not'), | |
(r'can\'t', 'cannot'), | |
(r'i\'m', 'i am'), | |
(r'ain\'t', 'is not'), | |
(r'(\w+)\'ll', '\g<1> will'), | |
(r'(\w+)n\'t', '\g<1> not'), | |
(r'(\w+)\'ve', '\g<1> have'), |