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 / prompt_to_try_and_refactor_cursorrules.md
Last active November 14, 2024 15:32
prompt_to_try_and_refactor_cursorrules.md long context window

Help me refactor this .cursorfile @.cursorrules.advanced it needs to be consolidated. We can do this step by step, and you can show me a overview of your proposed fixes before we begin. Please do not remove any of the current concepts in the file, merely reduce duplication and contridictions. Things I want to keep in mind:

  • python code should be implemented using DRY and YAGNI
  • all docstrings should implement pep 257 in the style of google
  • Use few shot examples where necessary, make sure the code snippets also adhere to our coding standards.
  • Everything should be annotated
  • make references to design patterns that we like or want to implement like mentioned in the readme here @Web @Python Patterns
  • remember that vcrpy/pytest-recording is only used for unittests and sometimes intergration tests, never for evaluation testing. All of these tests use the proper pytest.mark decorators.
  • python 3.10+ support only @Codebase
  • Code deployment happens via Ethos Flex (simply mentioning it at the momemnt is f
curl -sSL https://install.python-poetry.org | python3 -
poetry config virtualenvs.in-project true
poetry completions zsh > ~/.zsh/completion/_poetry
poetry completions zsh > ~/.zsh/completions/_poetry
clear
zsh -l
python -c "import sys;print(sys.executable)"
poetry install --with dev --sync
@bossjones
bossjones / ada_cursorrules.md
Created November 8, 2024 16:14
ada_cursorrules.md

You are an AI assistant specialized in Python development, designed to provide high-quality assistance with coding tasks, bug fixing, and general programming guidance. Your goal is to help users write clean, efficient, and maintainable code while promoting best practices and industry standards. Your approach emphasizes:

  1. Clear project structure with separate directories for:

    • Source code (app/)
    • Tests (app/test/)
    • Documentation (docs/)
    • Configuration files (root directory)
  2. Modular design patterns:

  • FastAPI components (routes, dependencies, middleware)
@bossjones
bossjones / .cursorrules.md
Last active November 7, 2024 12:12
cursor rules generated with the help of sonnet 3.5

Python Development Assistant Prompt System

Version Control

version: 1.0.0
last_updated: 2024-03-19
sections:
  - core_requirements
  - python_version
 - code_style
@bossjones
bossjones / vectorstoreadapter.py
Created October 24, 2024 18:47
from the vectorstores module in sandbox_agent ... might need to look at this and come back to it
# SOURCE: https://github.com/langchain-ai/langchain/issues/15944
# Making a generalized method to ingest documents in any vector database.
"""Vector stores for the sandbox agent."""
from __future__ import annotations
import os
import pathlib
from abc import ABC, abstractmethod
@bossjones
bossjones / history_list_without_timestamp_and_unique_the_results.sh
Created September 10, 2024 02:38
history_list_without_timestamp_and_unique_the_results.sh zsh history pbcopy
# SOURCE: https://askubuntu.com/questions/205520/history-list-without-timestamp-and-unique-the-results
history 10 | cut -c8- | pbcopy
@bossjones
bossjones / format_by_user_id.sh
Created September 9, 2024 15:37
yt-dlp format_by_user_id.sh
yt-dlp -v -f "bv*+ba/b" -n --ignore-errors --no-mtime --recode-video mp4 --embed-thumbnail --convert-thumbnails jpg --cookies=~/Downloads/yt-cookies.txt -o "%(uploader|uploader_id|creator)s__%(title)s__-%(id)s.%(ext)s" -o "thumbnail:%(uploader)s__%(title)s__-%(id)s.%(ext)s" -j "<WEBSITE>"
@bossjones
bossjones / yt-dlp-playlist-odd-only.sh
Created August 15, 2024 22:16
yt-dlp-playlist-odd-only.sh
yt-dlp -I "1::2" <url>
@bossjones
bossjones / pip_freeze_ada_latest.txt
Created June 7, 2024 21:53
pip_freeze_ada_latest.txt
aiohttp==3.9.5
aiosignal==1.3.1
annotated-types==0.7.0
anyio==4.4.0
asr_python==0.4.1
async-timeout==4.0.3
attrs==23.2.0
beautifulsoup4==4.10.0
blinker==1.8.2
boto3==1.34.122
from langchain_core.messages import HumanMessage, SystemMessage, AIMessage
from .chat_history import *


llm_history_oiginal = [
    SystemMessage(
        content=[
            {"type": "text", "text": "You are an helpful and intelligent assistant. But converting your text to the speech process can be long so please make short your answers as possible."},
 {"type": "text", "text": "Answer with maximum 3 sentences. Also please feel free to use tools."},