Skip to content

Instantly share code, notes, and snippets.

View Paradiddle131's full-sized avatar
🥁

Paradiddle131

🥁
View GitHub Profile
@Paradiddle131
Paradiddle131 / split_markdown.sh
Created May 24, 2025 10:52
Splits markdown files based on a specified header pattern and creates separate files named after the section titles
#!/bin/bash
# Function to display usage
usage() {
echo "Usage: $0 <markdown_file> <section_pattern>"
echo "Example: $0 my_doc.md '## File: '"
echo ""
echo "This script splits a markdown file into separate files based on sections"
echo "that start with the specified pattern. Each section becomes a new .md file"
echo "named after the path in the section header (with .md extension)."
#!/bin/bash
OUTPUT_FILE=""
VERBOSE=false
DRY_RUN=false
ESTIMATE_TOKENS=true
INPUT_PATHS=()
EXPLICIT_EXCLUDE_PATHS=() # For --exclude specific_path
INCLUDE_PATTERNS=() # For --include-pattern (glob)
EXCLUDE_SHELL_PATTERNS=() # For --exclude-pattern (glob)
### START CODE HERE ###
# Stage 3 (≈4 lines)
X = convolutional_block(X, f = 3, filters = [128, 128, 512], stage = 3, block='a', s = 2)
X = identity_block(X, 3, [128, 128, 512], stage=3, block='b')
X = identity_block(X, 3, [128, 128, 512], stage=3, block='c')
X = identity_block(X, 3, [128, 128, 512], stage=3, block='d')
# Stage 4 (≈6 lines)
X = convolutional_block(X, f = 3, filters = [256, 256, 1024], stage = 4, block='a', s = 2)
@Paradiddle131
Paradiddle131 / gist:c5dd3ec0a789baa94f1694bd2d7e3059
Created March 21, 2020 15:50
Simplified_version_of_CNN-HowManyFingers_repo_by_jaredvasquez
#!/usr/bin/env python3
''' Written by jared.vasquez@yale.edu '''
from keras.models import load_model
import numpy as np
import copy
import cv2
import os
dataColor = (0, 255, 0)