Skip to content

Instantly share code, notes, and snippets.

View bossjones's full-sized avatar
💭
Learning every damn thing I can

Malcolm Jones (bossjones/Tony Dark) bossjones

💭
Learning every damn thing I can
View GitHub Profile
@bossjones
bossjones / code2prompt.md
Created February 7, 2025 05:07
code2prompt-example. About A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
code2prompt /Users/malcolm/dev/langchain-ai/langgraph --include="*.py,*.toml,*.pyi" --tokens --output=langgraph.txt
@bossjones
bossjones / segfault_fixer_cot_prompt.xml
Created January 11, 2025 00:16
segfault_fixer_cot_prompt.xml
<prompt_chain>
<!-- Stage 1: Initial Code Analysis -->
<stage name="analysis" description="Deep code pattern analysis">
<instructions>
Analyze the provided code files for patterns related to segmentation fault prevention. Focus on:
1. Thread management patterns
2. Memory safety mechanisms
3. Resource cleanup approaches
4. Exception handling systems
5. Event loop protection
@bossjones
bossjones / structlog_xml_claude_anthropic_sonnet_3_5.md
Created January 9, 2025 23:34
structlog_xml_claude_anthropic_sonnet_3_5.md

@structlog_expert.md is your prompt.

Find quotes from the the structlog docs that are relevant to assessing the quality of a structlog configuration setup in a github repo. Place these in tags. Then, based on these quotes, list all information that would help the programer adhere to these standards and increase the quality of the structlog configuration setup. Place your diagnostic information in tags. Once you are done, we will make modifications to @logsetup.py to include these details. @Web

@bossjones
bossjones / logsetup.py
Created January 7, 2025 22:37
logsetup.py
from __future__ import annotations
import logging
import logging.config
import structlog
from democracy_exe.aio_settings import aiosettings
@bossjones
bossjones / nerd_fonts_git_log_before_deletion.md
Created January 7, 2025 04:35
nerd_fonts_git_log_before_deletion.md
pi@boss-deeplearning ~/.local/src/nerd-fonts master
❯ git log
Found existing alias for "git". You should use: "g"
commit 3026885788cd694c0280e401945b0cda3e5ec09c (grafted, HEAD -> master, origin/master, origin/HEAD)
Author: Finii <[email protected]>
Date:   Thu Mar 2 14:07:33 2023 +0000

    [ci] Update FontPatcher.zip
@bossjones
bossjones / prompt_langsmith_loguru_multiprocessing_segmentation_fault.md
Created January 6, 2025 14:35
prompt_langsmith_loguru_multiprocessing_segmentation_fault.md

Hi friends I have a Langgraph Studio + Langsmith python module question about this change to include multiprocessing in _background_thread.py https://github.com/langchain-ai/langsmith-sdk/blob/0243f793c7a5f7d61c3d2c6bd8fcf85c85933f96/python/langsmith/_internal/_background_thread.py

I was recently playing with a demo repo to onboard it to langgraph studio w/ a proper langgraph.json w/ correct dockerfile_lines config etc, I noticed that when I tried asking my graph questions, the traces started segfaulting, eg:

langgraph-api-1       | warning | /api/langgraph_api/api/assistants.py:36: PydanticDeprecatedSince20: The `schema` method is deprecated; use `model_json_schema` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/

langgraph-api-1       | warning | /api/langgraph_api/api/assistants.py:219: PydanticDeprecatedSince20: The `__fields__` attribute is deprecated, use `model_fields` instead. Deprecated in Pydantic V2.
@bossjones
bossjones / just-sync-upgrade-all.log
Created January 5, 2025 20:58
just-sync-upgrade-all.log
uv sync --all-extras --dev
Resolved 561 packages in 3ms
Prepared 94 packages in 3.80s
Uninstalled 96 packages in 8.12s
Installed 98 packages in 386ms
- aiohttp==3.11.10
+ aiohttp==3.11.11
- anthropic==0.41.0
+ anthropic==0.42.0
- anyio==4.7.0
@bossjones
bossjones / macos_debugging.txt
Created January 4, 2025 02:21
macos_debugging.txt
# view photoanalysisd logs
log show --predicate 'process == "photoanalysisd"' --last 1h
from __future__ import annotations
import os
import logging
from typing import TYPE_CHECKING, Iterator, AsyncIterator
import pytest
from pytest_asyncio import is_async_test
# SOURCE: https://github.com/anthropics/anthropic-sdk-python/blob/main/tests/conftest.py
@bossjones
bossjones / dpytest_supported_actions.md
Last active December 19, 2024 22:35
dpytest_supported_actions.md

Discord.py Features Supported in dpytest

1. Message Operations

  • channel.send() (text, embeds, files)
  • message.delete()
  • channel.fetch_message()
  • channel.history()

Message Verification Examples