Skip to content

Instantly share code, notes, and snippets.

View clemlesne's full-sized avatar

Clémence Lesné clemlesne

View GitHub Profile
@clemlesne
clemlesne / enum.py
Last active August 17, 2025 03:26
Embed documentation, pretty name, and value, in a native Python enum that can still be serialized with Pydantic.
from enum import StrEnum
def main() -> None:
print(MyEnum.INFRASTRUCTURE_AS_CODE)
print(str(MyEnum.INFRASTRUCTURE_AS_CODE))
print(MyEnum.INFRASTRUCTURE_AS_CODE.__doc__)
class StrEnumWithDocstring(StrEnum):
@clemlesne
clemlesne / config.toml
Created May 16, 2025 11:24
My Rio config file in macOS, from `$HOME/.config/rio/config.toml`.
confirm-before-quit = false
hide-mouse-cursor-when-typing = true
padding-x = 10
padding-y = [10, 10]
use-fork = false
[fonts]
family = "FiraCode Nerd Font Mono"
[fonts.emoji]
@clemlesne
clemlesne / code.gs
Created May 31, 2025 11:32
Returns the official chancellerie rate from any currency to EUR for the month covering the given date, with caching. In Google Sheets Apps Script.
/**
* Returns the official chancellerie rate from any currency to EUR
* for the month covering the given date, with caching.
*
* @param {Date} inputDate A Date object from the sheet.
* @param {String} currency The three-letter ISO currency code (e.g. "USD").
* @return {Number|String} The monthly rate (e.g. 1.1373) or an error message.
* @customfunction
*/
function GET_CHANCELLERY_RATE(inputDate, currency) {
@clemlesne
clemlesne / README.md
Last active March 5, 2026 17:36
AI Conversation Context Extractor

AI Conversation Context Extractor

Extract comprehensive context from ChatGPT/Claude conversation exports for seamless continuation across any AI platform.

What it does

  • Analyzes your exported AI conversations
  • Extracts key context, decisions, and implementation status
  • Groups ChatGPT Project conversations together
  • Creates markdown files you can paste into any AI to continue seamlessly
confirm-before-quit = false
padding-x = 5
padding-y = [5, 5]
use-fork = false
[fonts]
family = "FiraCode Nerd Font Mono"
[editor]
program = "code"
@clemlesne
clemlesne / prompt.md
Last active August 16, 2025 08:51
My Claude system prompt

For every idea I propose, immediately:

1. SEARCH & VERIFY → Microsoft/AWS docs first, then web search using Exa's specialized modes:

  • Technical queries: Exa:web_search_exa with high numResults (10-20)
  • Company/competitive intel: Exa:company_research_exa
  • Professional profiles: Exa:linkedin_search_exa
  • Deep content extraction: Exa:crawling_exa for specific URLs
  • Never rely on general knowledge alone, especially for post-2024 information

2. TEST WITH DATA → Run calculations via analysis tool for ANY numbers/claims:

@clemlesne
clemlesne / ocr.sh
Created October 28, 2025 13:37
OCR local PDF files
parallel --tag -j 2 uvx 'ocrmypdf' '--redo-ocr' '--optimize=3' '--max-image-mpixels=900' '--image-dpi=300' '--color-conversion-strategy=RGB' '--invalidate-digital-signatures' '--pdfa-image-compression=jpeg' '-l=eng' '{}' 'output/{}' ::: *.pdf