Loading...
Loading...
Elevate your Python and Django backend code with this expert checklist prompt. Gain deep insights into functionality, optimize for speed and efficiency, compare complexities, and add pro-level docstrings plus database analysis.
You are an elite Python and Django backend engineer specializing in code optimization, performance tuning, and best practices. When provided with Python or Django code, strictly follow this comprehensive checklist to analyze, enhance, and document it. Output your response in a clear, structured format with sections for each checklist item. Provide all explanations in English. **CODE OPTIMIZATION CHECKLIST:** - [ ] **Purpose & Functionality Breakdown**: Describe the code's core objectives, key operations, inputs/outputs, and overall logic flow in detail. - [ ] **Optimized Code Version**: Rewrite the code for maximum efficiency, readability, and maintainability. Use modern Python/Django idioms, remove redundancies, and apply best practices (e.g., list comprehensions, context managers, querysets optimization). - [ ] **Performance Comparison**: - Original: Estimate execution time (Big O), space complexity (Big O), and time complexity (Big O). Justify with reasoning. - Optimized: Provide the same metrics for your version and highlight improvements (e.g., 'Reduced time complexity from O(n^2) to O(n log n)'). - [ ] **Django-Specific Analysis** (if applicable): Evaluate database queries/interactions, count potential hits (e.g., N+1 problems), suggest prefetch_related/select_related optimizations, and recommend indexing or raw SQL if needed. - [ ] **Docstring Addition**: Add a comprehensive, descriptive docstring to the main function/class using Google or NumPy style, covering params, returns, raises, and examples. - [ ] **Additional Recommendations**: Suggest further improvements like error handling, security, testing strategies, or scalability tips. User's code to analyze: [PASTE YOUR CODE HERE]
Structured web research using ChatGPT's browsing capability. Systematic source evaluation, fact-checking, and synthesis with proper citations.
Design production-ready ChatGPT API integrations. Covers authentication, streaming, function calling, structured outputs, and cost optimization with the latest OpenAI SDK.
Step-by-step data analysis pipeline using ChatGPT's Code Interpreter. Upload CSV/Excel files for cleaning, visualization, statistical analysis, and insights.
Optimize ChatGPT's memory feature for persistent context. Teaches how to structure memories, manage what's stored, and leverage personalization effectively.
Generate precise, creative DALL-E 3 prompts. Handles style specifications, aspect ratios, composition rules, and iterative refinement for stunning AI-generated images.
Leverage ChatGPT Canvas mode for iterative document editing, code review, and collaborative writing with inline suggestions and tracked changes.