You are a teacher of algorithms and data-structures who specializes in the use of the socratic method of teaching concepts. You build up a foundation of understanding with your student as they advance using first principles thinking. Explain the subject that the student provides to you using this approach. By default, do not explain using source code nor artifacts until the student asks for you to do so. Furthermore, do not use analysis tools. Instead, explain concepts in natural language. You are to assume the role of teacher where the teacher asks a leading question to the student. The student thinks and responds. Engage misunderstanding until the student has sufficiently demonstrated that they've corrected their thinking. Continue until the core material of a subject is completely covered. I would benefit most from an explanation style in which you frequently pause to confirm, via asking me test questions, that I've understood your explanations so far. Particularly helpful are test questions related to sim
This is an LLM-assisted workflow for creating a product requirement document using LLM assistance for task completion. | |
It keeps track of inputs for the template and works with the user to acquire them, finally generating a completed PRD | |
prompt when all slots are addressed. | |
credit: Ian Nuttall - https://gist.github.com/iannuttall/f3d425ad5610923a32397a687758ebf2 | |
**System-Prompt for Facilitating Chat-Based PRD Creation** |
--- | |
description: | |
globs: | |
alwaysApply: true | |
--- | |
At the end of each task, you need to write all changes to ARCHITECTURE.md. | |
And by write all changes, I mean modify the architecture of the entire app. If you've changed a function - modify its params/output or whatever you changed. | |
If you've added a new file - add it to the ARCHITECTURE.md. |
@pytest.mark.parametrize( | |
"billing_type, wants_premium, expected_status, expected_premium", | |
[ | |
(Account.BillingType.V1, True, 400, False), | |
(Account.BillingType.GIFT, True, 200, True), | |
], | |
) | |
def test_update_account_wanting_premium( | |
url, | |
client, |
#!/bin/sh | |
print_usage() { | |
echo "usage: compress_video <input_file>" | |
echo "supported formats: mp4, webm, mkv, mov, avi, flv" | |
} | |
get_extension() { | |
f="${1##*/}" | |
case "$f" in |
app-web | | |
app-web | ==== | |
app-web | Contents of self.request: | |
app-web | _request: <WSGIRequest: POST '/api/emails/register/'> | |
app-web | parsers: [<rest_framework.parsers.JSONParser object at 0x10e497ad0>, <rest_framework.parsers.FormParser object at 0x10e494a70>, <rest_framework.parsers.MultiPartParser object at 0x10e4947d0>] | |
app-web | authenticators: [<rest_framework.authentication.SessionAuthentication object at 0x10e4975f0>, <rest_framework.authentication.BasicAuthentication object at 0x10e4941d0>] | |
app-web | negotiator: <rest_framework.negotiation.DefaultContentNegotiation object at 0x10e497650> | |
app-web | parser_context: {'view': <emails.views.rest.auth.RegistrationUserViewSet object at 0x10e496780>, 'args': (), 'kwargs': {}, 'request': <rest_framework.request.Request: POST '/api/emails/register/'>, 'encoding': 'utf-8'} | |
app-web | _data: {'username': 'raqib', 'password': 'raqib!@#password', 'email': '[email protected]'} |
import requests | |
import time | |
import os | |
import sys | |
import openai | |
import tiktoken | |
from termcolor import colored | |
openai.api_key = open(os.path.expanduser('~/.openai')).read().strip() |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"net/http" | |
"github.com/gin-gonic/gin" | |
"gorm.io/driver/sqlite" | |
"gorm.io/gorm" |
DDD is a way to build computer programs that helps make them easier to understand and use. It's like building with blocks: you start with small, simple blocks and put them together to make bigger, more complex structures.
In DDD, we use something called "domains" to organize our blocks. A domain is like a group of blocks that all have something in common. For example, if we were building a program about pets, we might have a domain for dogs, a domain for cats, and a domain for birds.
Inside each domain, we use something called "entities" to represent the things in our program. An entity is like a specific block that has its own unique properties. For example, in the dog domain, we might have an entity for a specific dog with properties like its name, breed, and age.
We also use "value objects" to represent things that don't have a unique identity, but are still important. For example, in the dog domain, we might have a value object for a dog's collar, which would have properties like its color and size.
F
First, create an interface for the dependency you want to inject, for example:
interface Logger {
log(message: string): void;
}
Next, create a class that implements the interface: