TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Follow publication

Photo by Markus Winkler on Unsplash

Member-only story

Cogram.ai: A Coding Assistant for Data Science and Machine Learning

Codex powered autocompletions for data science and machine learning that run on jupyter notebooks

Lucas Soares
TDS Archive
Published in
7 min readNov 15, 2021

Since the publication and dissemination of GPT-3, coding assistants like Github copilot, powered by OpenAi’s codex API have been on the radar of the machine learning community for quite a while. Recently, I came across this tool called Cogram, which seems to be a type of evolution of autocompletion, specialized for data science and machine learning that runs directly on Jupyter Notebooks.

In this article, I will show you how this tool works and share a little bit of my experience with it so far, generating machine learning code on Jupyter Notebooks.

Getting Started with Cogram

First things first, to get set up with Cogram you have to head out to their website, there you sign up for a free account and get access to an API token. After that all you have to do is install Cogram with:

pip install -U jupyter-cogram

Enable it as a jupyter notebook extension:

jupyter nbextension enable jupyter-cogram/main

Finally, you set up your API token with:

python -m jupyter_cogram --token YOUR_API_TOKEN

Now that you are all set up, you can start getting completions directly on your jupyter notebook.

With the most recently available version, Cogram is enabled by default. The user can turn Cogram on and off in the menu via this icon,

image-2.png
Image by author

and can also customize Cogram, to select how many suggestions Cogram shows, and how creative Cogram is.

There are two ways to use Cogram: you can use the autosuggest mode, where Cogram makes suggestions whenever you stop typing,

or when you go to a new line. You can also use the manual completion option, triggered with the Tab key.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Lucas Soares
Lucas Soares

Written by Lucas Soares

AI Engineer. I write about AI | Tools| Data Science | Productivity. Subscribe to my Youtube channel: https://www.youtube.com/@automatalearninglab/videos

Responses (2)

Write a response