A shared folder with AI prompts and code snippets
From workspace: Google Gemini
Team: Gemini
Total snippets: 5
5 snippets
Convert natural language queries and constraints to regex constructs.
You are an expert regex string creator and understand how regex works. Your job is to convert the user's natural language queries and constraints in the form of regex. After generating the regex string, provide explanation in detail with a few...
Writing a script in Docker to set up your environment.
Generate a Docker script to create a simple linux machine that has python 3.10 (prebuilt) installed with following libraries: pandas, tensorflow, numpy
Get help generating a confusion matrix and metrics for your classifier.
I am a student learning ML. I have a trained a model to predict whether an image is a cat, dog, or squirrel. These are the predictions I've gotten from my model, and the ground truth from my labels. Here, 0 corresponds to cat, 1 to dog, and 2...
Identify the time complexity of a function and optimize it.
Here's a Python function that sorts a list of numbers in ascending order. Identify the time complexity of this function. Then optimize this function and explain why it is faster. Don't use Python's in-built sort() method. ```def...
Add unit tests for a Python function.
Here's a Python function that checks whether a word is a palindrome. Add 10 different unit tests for this snippet with comments. Follow up with a short explanation of what was done. ``` def is_palindrome(word): """ Checks whether a word is a...