npm install --save-dev vitest jsdom- React Testing Library
| """ | |
| The most atomic way to train and inference a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
npm install --save-dev vitest jsdomClaude Code already supports piping — but the syntax is a mouthful:
ls -la | claude -p "Help me understand why these build artifacts look wrong"That's too much typing for something you want to reach for 50 times a day. So I wrapped it in a three-letter shell function and it changed how often I use it.
| // ==UserScript== | |
| // @name Microsoft Loop to Markdown | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.4 | |
| // @description Convert Microsoft Loop pages to Markdown | |
| // @author Talha Oz (ozt@) | |
| // @match https://loop.cloud.microsoft/* | |
| // @match https://*.loop.cloud.microsoft.com/* | |
| // @grant GM_setClipboard | |
| // @updateURL https://gist.github.com/oztalha/8724b72bf1f37d721c8b55eb02228cc6/raw/loop-to-markdown.user.js |
| command to find recursively files {can be modified for folders too, change -type f}, and renamed them by specfying regex pattern | |
| find . -type f -maxdepth [depth] -name "[filepattern]" | while read FNAME; do mv "$FNAME" "${FNAME//search/replace}"; done | |
| example: | |
| find . -type f -maxdepth 1 -name "domain*.php" | while read FNAME; do mv "$FNAME" "${FNAME//domain/lead}"; done | |
| before: after: |
| (function scrapeData() { | |
| const tbody = document.querySelector('tbody'); | |
| const trElements = tbody.querySelectorAll('tr'); | |
| const result = []; | |
| trElements.forEach((tr) => { | |
| const amountElement = tr.querySelector('.amount'); | |
| const nameElement = tr.querySelector('.name'); | |
| if (amountElement && nameElement) { |
| import json | |
| import os | |
| import pickle | |
| import queue | |
| import random | |
| import re | |
| import threading | |
| from pathlib import Path | |
| from typing import Optional | |
| from urllib.parse import parse_qs |