Skip to main content

Intuitive coding for Jupyter Notebook using natural language.

Project description

Cogram: Intuitive coding with natural language

Cogram brings intuitive coding with natural language to Jupyter Notebook.

pypi Version Cogram on Slack

📖 Documentation

Documentation
🚀️ Sign up Sign up to get your API token and get started!
⭐️ How to New to Cogram? Check out our videos!
📚 Community Have questions our comments? Join our Slack!

Features

  • AI-powered coding for Jupyter Notebooks
  • Supports Python: ideal for data science tasks
  • Cycle through different suggestions

⏳ Install cogram

Requirements

  • API token: If you don't have one yet, sign up
  • Operating system: macOS · Linux · Windows
  • Python version: Python 3.6+ (only 64 bit)
  • Package managers: pip

Installation

The easiest way to install Cogram for Jupyter Notebook is using pip.

pip install -U jupyter-cogram
jupyter nbextension enable jupyter-cogram/main

Next, you should install your API token available on your My Account page. Install it with

python -m jupyter_cogram --token YOUR_TOKEN

That's it! You can now start a new Jupyter Notebook server with

jupyter notebook

and you're ready to go!

Updating Cogram

The easiest way to upgrade to a new version of Cogram is using pip:

pip install -U jupyter-cogram

You'll then have to kill any active Jupyter Notebook servers and start a new one with

jupyter notebook

Uninstalling Cogram

To remove Cogram from your system, simply use pip:

pip uninstall jupyter-cogram

Finally, remove Cogram from the list of extensions Jupyter will load when you start a Notebook:

jupyter nbextension disable jupyter-cogram/main

📚 Use Cogram

🛫 First start

If you've installed Cogram by following the instructions on your My Account page your API token will automatically be saved. You can open a Jupyter Notebook and get started.

You may be asked for your API token when you open a new Notebook for the first time. If this happens, paste the API token from your My Account page into the prompt box that opens when you start a new Jupyter Notebook.

The Cogram extension is on by default. You can toggle the extension off and on by clicking the Cogram button () in the toolbar of your Jupyter Notebook. The green circle indicates that Cogram is on.

🔮 Working with Cogram

You can use Cogram in two ways:

  • Generating code from plain language by writing a comment and completing with the Tab key
  • Comleting code you've written with the Tab key

The status light will turn orange indicating that Cogram is busy.

For example, writing the comment

# fibonacci sequence

and hitting the Tab key will generate a function that produces the Fibonacci sequence.

Alternatively, writing the code

def fibonacci

and hitting the Tab key will complete the function to produce the Fibonacci sequence.

Once your code has been generated you can explore different options with the ← and → keys. If you're happy with a suggestion you can accept it with the Tab key.

💡 Tips for working with Cogram

Cogram works especially well if you give it some context. Cogram knows the code in your notebook above the current position of your cursor. The more code you've already written, the better Cogram will work.

📚 Support

For help with Cogram please join our support channel in community.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter-cogram-0.11.6.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

jupyter_cogram-0.11.6-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file jupyter-cogram-0.11.6.tar.gz.

File metadata

  • Download URL: jupyter-cogram-0.11.6.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for jupyter-cogram-0.11.6.tar.gz
Algorithm Hash digest
SHA256 7364b5258fb7e5d5229b431cdede63efecfa0e87afd152ff6b79a8d93d2bba19
MD5 ad0f8057dd6e026eadc8bb687f54ef6c
BLAKE2b-256 7ad0f76f7818c34f8f0df63f0e7cf1dc437537879e5a29d9905f9a25568598ea

See more details on using hashes here.

File details

Details for the file jupyter_cogram-0.11.6-py3-none-any.whl.

File metadata

  • Download URL: jupyter_cogram-0.11.6-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for jupyter_cogram-0.11.6-py3-none-any.whl
Algorithm Hash digest
SHA256 732625a3d564dc8042e1666c3075f89ae7a8ea7091ca733c3f29ee9cb30d7d19
MD5 05b58400302939f1645213fa8a5b0581
BLAKE2b-256 de063f79399904b3ad29cc384ebf5802705fb5f72ee14f1c2411cfb9adbcab72

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page