A shared tag with AI prompts and code snippets
From workspace: Manus
Team: Main
Total snippets: 28
28 snippets
import unittest from models import Task class TaskModelTests(unittest.TestCase): def test_task_creation(self): task = Task(title="Test Task", description="Test Description") self.assertEqual(task.title, "Test Task") ...
Manus AI can also generate automated tests for our Flask application.
import unittest from app import app class FlaskAppTests(unittest.TestCase): def setUp(self): self.app = app.test_client() self.app.testing = True def test_create_task(self): response = self.app.post('/tasks',...
from flask import Blueprint, request, jsonify from models import db, Task task_routes = Blueprint('task_routes', __name__) @task_routes.route('/tasks', methods=['POST']) def create_task(): data = request.get_json() new_task =...
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() class Task(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(80), nullable=False) description = db.Column(db.String(200), nullable=True)
from flask import Flask from routes import task_routes app = Flask(__name__) app.register_blueprint(task_routes) if __name__ == "__main__": app.run(debug=True)
Using Manus AI, we can generate the necessary code for our Flask application. Manus AI will create the project structure, Flask routes, and database models.
my_flask_app/ ├── app.py ├── models.py ├── routes.py ├── requirements.txt └── tests/ ├── test_app.py └── test_models.py
First, we’ll define the requirements for a simple Flask application that manages a list of tasks. The application will have the following features:
- Create a new task - Retrieve all tasks - Update a task - Delete a task
Creative prompt engineering techniques can be applied across numerous domains:
1. Content Creation: Generate articles, blog posts, marketing copy, and creative writing with specific styles, structures, and perspectives. 2. Product Development: Explore design concepts, user scenarios, and feature ideas from multiple...
Creating detailed fictional users and immersive scenarios to explore product experiences from multiple perspectives.
I'm designing a new mobile banking app and want to ensure it meets diverse user needs. Help me explore how different user personas would interact with this app through detailed scenarios. First, develop 5 distinct user personas, each with: -...
Using a dialectical approach where the AI critiques its own output and then defends against those critiques, leading to more robust and nuanced content.
I'm developing content about artificial intelligence ethics for a university course. To ensure the content is robust and well-considered, I want to use an adversarial approach. Step 1: Core Content Development Create a 1000-word educational text...
Using chain-of-thought reasoning to break down visual design processes into conceptual steps, even though the AI can’t directly create images.
I need to design a logo for a tech startup called "Quantum Leap" that specializes in quantum computing solutions for businesses. Let's approach this design challenge step by step: Step 1: Conceptual Exploration - Define 5 key concepts associated...
Developing content through a series of connected prompts, with each output informing the next step in the chain.
I'm creating a comprehensive guide about sustainable urban transportation. We'll develop this through a series of connected prompts, with each output informing the next step. Chain Step 1: Research Phase Generate a structured outline for a...
Creating a basic format (like an email or product description) and letting the AI fill in placeholders, ensuring consistency while allowing for creative variation.
Fill in the following template for [purpose]: [Template with placeholders] Make sure to maintain a [tone] tone and emphasize [key points].
Combining zero-shot prompting with chain-of-thought reasoning by simply adding “Let’s think step by step” to direct prompts.
[Complex question or problem] Let's think step by step.
I want to create the most effective prompt possible for generating a detailed business plan for a sustainable fashion startup. Step 1: Generate 3 different prompt structures that could be used for this purpose. For each structure: - Provide the...
I'm designing a next-generation smart home device that helps people reduce their household energy consumption. Generate three fundamentally different approaches to this product: Approach 1: A monitoring and analytics system - Core functionality...
This structured approach ensures comprehensive coverage while encouraging creative connections between different aspects of a topic. It helps generate well-rounded content that considers multiple perspectives.
I'm creating comprehensive educational content about coral reef ecosystems for high school students. Using the 5Ws and How framework, help me develop this content: Who: - Identify 5 key stakeholders in coral reef conservation - Describe 3...
This technique enables the AI to break down complex reasoning tasks into manageable steps, resulting in more accurate and creative problem-solving. It’s particularly effective for mathematical reasoning, logical deductions, and complex analysis.
I need to design an innovative urban garden system for a densely populated city with limited ground space. Let's think step by step: 1. First, identify 5 key constraints in urban environments that limit traditional gardening 2. For each...
Instead of simply imitating someone’s style, this technique allows for a more nuanced understanding and selective application of specific stylistic elements. This creates more original outputs that draw inspiration from but don’t merely copy existing styles.
Step 1: Analyze the communication styles of Brené Brown and Simon Sinek. For each, identify: - 5 distinctive linguistic patterns they use - 3 recurring themes in their content - 4 techniques they employ to connect with their audience - 2 ways they...
This technique allows for highly specialized outputs by framing the AI’s response through a specific lens of expertise You are an expert in [field] known for [key adjective]. Help me [task]. or style. The creativity comes from selecting unexpected or highly specialized personas that bring unique perspectives to the task.
You are a renowned science fiction author known for creating immersive, technically plausible future worlds. Your writing style combines vivid sensory details with thoughtful exploration of how technology shapes society. Write a 500-word opening...
Using the classic journalistic questions (Who, What, Where, When, Why, and How) to explore multiple angles of a subject.
I want to understand [topic] comprehensively. Tell me: - Who: [relevant people/organizations] - What: [key concepts/events] - Where: [locations/contexts] - When: [timeline/history] - Why: [motivations/causes] - How: [processes/methods]
Engaging in back-and-forth role-playing or collaborative writing with the AI to develop narratives or scenarios.
We're going to create a story together about [theme]. I'll start with a premise, and you'll continue the narrative. Premise: [initial scenario] For each response: - Develop the plot in an unexpected direction - Introduce a new element or...
Breaking down the key elements of a particular expert’s style or skill set into discrete components, then using those characteristics to guide the AI’s output.
Step 1: Describe the key elements of [expert]'s style/skill in bullet points. Step 2: Do [task] in the following style: [style].
Instructing the AI to assume the persona of an expert, celebrity, or character to leverage specific knowledge, style, or perspective.
You are an expert in [field] known for [key adjective]. Help me [task].
Guiding the AI through a step-by-step reasoning process to solve complex problems or generate more thoughtful responses.
[Problem statement] Let's think step by step.
Letting the AI propose its own prompts or improvements to existing prompts, then testing and refining them.
I want to generate content about [topic] for [purpose]. 1. Suggest 3 different prompts that would help me achieve this goal 2. Explain why each prompt would be effective 3. Recommend which prompt would work best and why
Combining multiple requests into one prompt to generate comprehensive outputs.
I want you to: 1. Explain [concept A] 2. Explain [concept B] 3. Compare and contrast these concepts 4. Provide a creative application that combines both
Encouraging the AI to branch out ideas or solutions and then evaluate each branch.
[Problem statement] Generate three different approaches to solve this problem. For each approach: 1. Describe the approach 2. List the pros and cons 3. Evaluate its feasibility Finally, recommend the best approach and explain why.