This tool provides autocomplete style suggestions as you code. It autocompletes on-the-fly but also allows for code generation based on comments such as:
app.py
# Write a product dataclass with information about the price, picture, url and description
################### Example of generated code ###################
from dataclasses import dataclass
@dataclass
class Product:
price: float
picture: str
url: str
description: str
def __post_init__(self):
self.price = round(self.price, 2)
def __str__(self):
return f"Product(price={self.price}, picture={self.picture},
url={self.url}, description={self.description})"
# Write a function that given a list of products, returns the cheapest and the most expensive one
################### Example of generated code ###################
from typing import List
def get_cheapest_most_expensive(products: List[Product]) -> (Product, Product):
if len(products) == 0:
return None, None
elif len(products) == 1:
return products[0], products[0]
else:
cheapest = products[0]
most_expensive = products[0]
for product in products[1:]:
if product.price < cheapest.price:
cheapest = product
if product.price > most_expensive.price:
most_expensive = product
return cheapest, most_expensive
Ghostwriter
It helps with code autocompletion and development by recommending code based on your operations.
Ask Command
With this app, you describe what do you want to do or code in natural language, and it suggest you a command. It uses Open AI's GPT-3 to come up with the best command.