Skip to content

Instantly share code, notes, and snippets.

View lmmx's full-sized avatar
💡
lights, camera, action

Louis Maddox lmmx

💡
lights, camera, action
View GitHub Profile
@lmmx
lmmx / citation.txt
Last active March 3, 2025 10:54
ChatGPT o1 inline file citation format - "cite turn (idx) file (idx)"
citeturn0file0
@lmmx
lmmx / command.sh
Created March 3, 2025 01:23
Octopolars pyproject pull demo
octopols lmmx -f '{name} == "bisque"' -w -f '{file_path} == "pyproject.toml"' -x -o json | jq .[0].content

Below is a high-level walkthrough of how datapasta works internally, based on its source. I’ll highlight the main parsing and formatting logic so you can replicate something similar in Python (e.g., to output a Polars DataFrame definition).


1. Where the magic starts

Datapasta’s main user-facing functions are:

  • tribble_paste()
  • df_paste() / dt_paste()
@lmmx
lmmx / instructions.md
Last active February 27, 2025 17:55
Prompt transformation sequence to improve titles of written technical content

Use the following framework to create or refine section titles so they accurately reflect your original content while remaining concise and inviting.

The guide outlines an eight-step method, including the rationale behind each rule and multiple, fully worked examples.

It explains not only how to do each step, but also why certain rules exist (for example, not removing technical terms or inventing new jargon that wasn’t in the source). Then it provides multiple, fully worked examples—directly drawn from the conversation—so a future reader can follow the same process for their own content.

By adhering to these instructions, you’ll ensure that every title, subtitle, and description consistently represents the true scope and meaning of your text, without introducing unnecessary jargon or weakening crucial technical terms.


@lmmx
lmmx / prompt.md
Created February 27, 2025 16:38
Prompt to get better section titles by comparing regular descriptions with rhetorical questions

ok thats great, now i want you to put the original title, and the rhetorical title, and then say what makes each of them good/bad as "headlines" and then come up with something different using the best parts of each (it doesnt have to be a rhetorical question or a neutral descriptor, e.g. it might be a witty or concise label that serves to mark the content). do not write anything "sales-y" it must be informal yet neutral and direct like a magazine header, without being sensational. for example a magazine writer might avoid claiming the emergence of something was inevitable but instead say "the origins of X" so as to suggest they are about to give a narrative. also do not repeatedly refer to "MutaGReP" it sounds like you are reminding the reader of a name: instead, do what people do in natural language, by using pronouns, but again do not use them in a boring or repetitive way (much like good writing does not just say "he did X and then he did Y"). for example you might use tools like metonymy to refer to the

@lmmx
lmmx / get-github-actions-logs.sh
Last active February 27, 2025 13:51
gh command to get the logs of the last run on the current branch
gh run view $(
gh run list --branch "$(git rev-parse --abbrev-ref HEAD)" \
--limit 1 \
--json databaseId \
--jq '.[0].databaseId'
) --log
@lmmx
lmmx / 1.md
Last active February 18, 2025 12:02
DR prompts for reports on DeepSeek paper https://arxiv.org/abs/2502.11089

Your task is to read and deeply analyze the paper “Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attention” (https://arxiv.org/abs/2502.11089) and provide an in-depth explanation of its content. The final output should be organized into a detailed report using a hierarchical numbering style (e.g., main sections numbered as “1”, “2”, …, with subsections labeled as “1.1”, “1.2”, etc.). The report should consist of roughly a dozen main sections, each containing appropriate subsections that explore the paper’s key systems, subsystems, and innovations.

Objective: • Clearly explain the paper’s main research question and contributions. • Provide a detailed analysis that covers algorithmic innovations, architectural design, hardware optimizations, experimental evaluations, and future directions.

Context and Background: • Include all relevant background information (e.g., definitions of attention mechanisms, sparse attention, full attention limitations). • Define key terms (such as “tok

@lmmx
lmmx / 0-prompt-gen-ds-nsa.md
Last active February 18, 2025 11:16
Prompt gen for DeepSeek NSA paper https://arxiv.org/html/2502.11089v1 (failed experiment)

Please build a prompt using the following guidelines:

Define the Objective:

  • Clearly state the main research question or task.
  • Specify the desired outcome (e.g., detailed analysis, comparison, recommendations).

Gather Context and Background:

  • Include all relevant background information, definitions, and data.
  • Specify any boundaries (e.g., scope, timeframes, geographic limits).

Please build a prompt using the following guidelines:

Define the Objective:

  • Clearly state the main research question or task.
  • Specify the desired outcome (e.g., detailed analysis, comparison, recommendations).

Gather Context and Background:

  • Include all relevant background information, definitions, and data.
  • Specify any boundaries (e.g., scope, timeframes, geographic limits).
@lmmx
lmmx / 0_contents.md
Last active February 17, 2025 20:05
DR reports on uses of Bessel functions