You started a long-running job and forgot to use tmux. Now you're stuck. Here's how to save it.
# In the terminal where the process is running:
Ctrl+Z # Suspend the process
bg # Resume in backgroundYou started a long-running job and forgot to use tmux. Now you're stuck. Here's how to save it.
# In the terminal where the process is running:
Ctrl+Z # Suspend the process
bg # Resume in background| #!/usr/bin/env bash | |
| json_template_to_canon() { | |
| # stdin: template with ${VARS}; output: canonical (minified) json | |
| # Substitutes environment variables in a JSON template. | |
| # | |
| # NOTE: Variables MUST be exported (not just set) for this to work. | |
| # NOTE: Unset variables are left as-is (safe_substitute behavior). | |
| # | |
| # Example 1 - single line: |
| # /// script | |
| # dependencies = [ | |
| # "ast-grep-py", | |
| # ] | |
| # /// | |
| import sys | |
| from pathlib import Path | |
| from ast_grep_py import SgRoot |
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # gcloud auth login --enable-gdrive-access | |
| # Usage: ./md2drive <markdown_file> | |
| # Example: ./md2drive example.md | |
| # Requires: export FOLDER_ID=<your_google_drive_folder_id> | |
| MD_FILE="${1:?usage: $0 path/to/file.md}" | |
| # Check if markdown file exists |
Create a documentation file that explains code in natural language:
Part 1: Read the input file {filename} and create a new markdown file at docs/{filename}.md
Part 2: Create an initial todo list (let's call it list A) of functions/sections to document, give an complexity rating to each task.
Part 3: Group simple items together into single tasks.
| #!/usr/bin/env python | |
| """ | |
| Parse a listing like the one in stdin and write each file to disk. | |
| """ | |
| import re | |
| import sys | |
| from pathlib import Path | |
| _PATH_LINE = re.compile(r"^/.*:$") |
| #!/usr/bin/env python3.10 | |
| """ | |
| Enhanced file expansion using Jinja2 templates with flexible functionality. | |
| Example usage: | |
| wget this file, apply chmod +x jinja_expand, and run it like this: | |
| jinja_expand template.md > expanded.md |
| """ | |
| Example usage: | |
| python3.10 expand.py template.md > expanded.md | |
| This will expand all {file_path} placeholders in template.md with the actual file contents | |
| and write the result to expanded.md | |
| ```template.md |
please port this implementation of epinets into jax keep it as similar as possible to the original code. you are provided with a jax implementation of mnist to help you.
Strict Script Generation Task: File Partitioning with Shell Script
Primary Objective: Your sole task is to generate a shell script containing a function definition and a sequence of function calls designed to partition the provided original_file_content based on the rules specified in the explanation. This partitioning must be complete - all original content (except imports) must appear in exactly one output file, with no content omitted or duplicated.
Inputs Provided:
Instructions - Follow Sequentially and Precisely: