- Creator: Evan Mullen
- Description: Extract structured data about bank deposit bonuses from the Doctor of Credit website.
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 | |
# create-nl-tool.sh - Programmatically create natural language interfaces | |
# for CLI tools | |
# Usage: ./create-nl-tool.sh <tool-name> | |
# Example: ./create-nl-tool.sh repomix | |
set -e | |
if [ $# -eq 0 ]; then |
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 | |
# Pre-push hook to prevent pushing from the template branch | |
# This allows pulling from template remote but prevents accidental pushes | |
current_branch=$(git symbolic-ref --short HEAD) | |
if [ "$current_branch" = "template" ]; then | |
echo "ERROR: Pushing from the 'template' branch is not allowed." | |
echo "This branch is reserved for pulling updates from the template repository." |
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 | |
# Exit on error | |
set -e | |
# Load environment variables if .env exists | |
if [ -f .env ]; then | |
export $(cat .env | grep -v '^#' | xargs) | |
fi |
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
from PIL import Image | |
import os | |
def create_gif(image_folder, gif_name, frame_duration=200): | |
""" | |
Creates an animated GIF from images in a folder. | |
Args: | |
image_folder (str): Path to the folder containing the images. | |
gif_name (str): Name of the output GIF file. |
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
from fastapi import FastAPI, Request | |
from fastapi.responses import HTMLResponse, StreamingResponse | |
import time | |
app = FastAPI() | |
index_html = """ | |
<html> | |
<head> | |
<!-- Include htmx --> |
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
#!/usr/bin/env Rscript | |
# R Setup Script | |
# Author: Christopher Smith | |
# Date: 2024-10-07 | |
# Prerequisites: Install R and IDE (manual steps, not included in script) | |
# Define the mirror URL (edit as needed) | |
cran_mirror <- "https://lib.stat.cmu.edu/R/CRAN/" | |
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
def greet(): | |
# You are my heart | |
my_heart = {"my <3": "you"} | |
# My heart stops when you enter the room | |
sentiment = "Be still, my beating <3!".replace("beating ", "") | |
# Unlock me baby | |
key_to_my_heart = list(my_heart.keys())[0] | |
# I carve out my heart and replace it with you | |
epiphany = sentiment.replace(key_to_my_heart, my_heart[key_to_my_heart]) | |
# Well, hello there ;) |