A Python coding assistant powered by a fine-tuned Mistral 7B model, optimized for code generation and Python development tasks.
A specialized Python coding assistant powered by Mamba-Codestral-7B-v0.1, a fine-tuned Mistral 7B model optimized for Python development and code generation tasks.
This skill provides access to a Python-focused coding assistant based on the Agnuxo/Mamba-Codestral-7B-v0.1-python_coding_assistant-GGUF_8bit model. The model has been fine-tuned specifically for Python programming tasks and is optimized for efficient inference using 8-bit quantization.
When the user requests Python coding assistance:
1. **Understand the Request**
- Carefully parse the user's Python programming question or task
- Identify whether they need code generation, debugging, explanation, or optimization
- Note any specific requirements, constraints, or libraries mentioned
2. **Leverage the Model's Strengths**
- This model is fine-tuned specifically for Python, so prioritize Python-centric solutions
- The model excels at idiomatic Python code generation
- Use the model for both simple scripts and complex algorithmic problems
3. **Generate Code Solutions**
- Provide complete, runnable Python code when appropriate
- Include necessary imports and dependencies
- Add clear comments explaining complex logic
- Follow PEP 8 style guidelines
- Consider edge cases and error handling
4. **Code Review and Optimization**
- When reviewing existing code, identify inefficiencies and bugs
- Suggest Pythonic alternatives and optimizations
- Explain why proposed changes improve the code
- Maintain backward compatibility unless explicitly asked to refactor
5. **Explanations and Teaching**
- Break down complex concepts into understandable parts
- Provide examples to illustrate Python features and patterns
- Reference official Python documentation when relevant
- Explain trade-offs between different approaches
6. **Best Practices**
- Recommend appropriate data structures for the task
- Suggest relevant standard library modules
- Encourage use of type hints for clarity (Python 3.5+)
- Promote readable, maintainable code over clever one-liners
**User:** "Write a function to find the longest palindromic substring in a string"
**Response:**
```python
def longest_palindrome(s: str) -> str:
"""
Find the longest palindromic substring using expand around center approach.
Time Complexity: O(n²)
Space Complexity: O(1)
"""
if not s:
return ""
def expand_around_center(left: int, right: int) -> str:
while left >= 0 and right < len(s) and s[left] == s[right]:
left -= 1
right += 1
return s[left + 1:right]
longest = ""
for i in range(len(s)):
# Check for odd-length palindromes
palindrome1 = expand_around_center(i, i)
# Check for even-length palindromes
palindrome2 = expand_around_center(i, i + 1)
# Update longest if we found a longer palindrome
current_longest = palindrome1 if len(palindrome1) > len(palindrome2) else palindrome2
if len(current_longest) > len(longest):
longest = current_longest
return longest
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/mamba-codestral-python-assistant/raw