Please reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions before we move onto implementing the actual code fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Mermaid Diagram Studio</title> | |
| <script type="module"> | |
| import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs'; | |
| mermaid.initialize({ startOnLoad: false, theme: 'default' }); | |
| window.mermaid = mermaid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(){if(window.__tabRecActive){alert('Tab Recorder is already running.');return;}window.__tabRecActive=true;var css='#tab-rec-ui{position:fixed;top:12px;right:12px;z-index:2147483647;background:rgba(17,17,17,.92);color:#fff;padding:10px 12px;border-radius:10px;font:13px/1.4 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;box-shadow:0 6px 18px rgba(0,0,0,.35)}#tab-rec-ui button{background:#1f6feb;border:0;color:#fff;padding:6px 10px;border-radius:6px;cursor:pointer}#tab-rec-ui button[disabled]{opacity:.55;cursor:not-allowed}#tab-rec-ui .row{margin-top:6px}#tab-rec-ui .muted{opacity:.8;font-size:12px}';var style=document.createElement('style');style.textContent=css;document.head.appendChild(style);var ui=document.createElement('div');ui.id='tab-rec-ui';ui.innerHTML='<div style="font-weight:600;margin-bottom:6px">Tab Recorder</div><div class="row"><button id="tr-start">Start</button> <button id="tr-pause" disabled>Pause</button> <button id="tr-stop" disabled>Stop</button></di |
I’m using Cursor, so I’m wondering if I should go over best practices of using it first. This is to ensure as I work on my projects, I don’t get overwhelmed by complexity.
- Ask Claude to create a clear and detailed plan in Markdown:
- Ask it to ask clarifying questions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #%% | |
| print("This is a cell") | |
| #%% | |
| print("This is another cell") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def export_poetry_dependencies(pyproject_path, requirements_path): | |
| # Flag to check if we are within the dependencies section | |
| in_dependencies = False | |
| with open(pyproject_path, "r") as pyproject_file, open( | |
| requirements_path, "w" | |
| ) as requirements_file: | |
| for line in pyproject_file: | |
| # Check for the start of the dependencies section | |
| if line.strip() == "[tool.poetry.dependencies]": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {$expr:{$gt:[{$toInt:"$field"},1]}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| $unwind: { | |
| path: '$field_name', | |
| preserveNullAndEmptyArrays: true | |
| } | |
| }, | |
| { | |
| $group: { | |
| _id: null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pymongo import MongoClient | |
| from elasticsearch import Elasticsearch | |
| class MongoElasticCache: | |
| def __init__(self, mongo_uri, mongo_db, mongo_collection, es_host, es_index): | |
| self.mongo_client = MongoClient(mongo_uri) | |
| self.mongo_db = self.mongo_client[mongo_db] | |
| self.mongo_collection = self.mongo_db[mongo_collection] | |
| self.es_client = Elasticsearch([es_host]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| """ | |
| This script will print all the JSON keys present in a JSON | |
| """ | |
| FILE = "<file_path here>" | |
| DIVIDER = "." | |
| ARRAY_INDICATOR = "[]" |
NewerOlder