Utility & Developer Tools

A shared folder with AI prompts and code snippets

From workspace: Google Gemini

Team: Gemini

Total snippets: 5

Google Gemini

Utility & Developer Tools

5 snippets

Regexed

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...

Docker Script

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

ML confusion matrix

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...

Time complexity

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...

Unit Testing

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...

Google Gemini - Utility & Developer Tools - AI Prompts & Code Snippets | Snippets AI