python

Your Simple Guide to use ChatGPT via the OpenAI API

Mar 1, 2024
article
artificial intelligence, chatgpt, python

ChatGPT is a state-of-the-art language model developed by OpenAI. It serves many purposes in natural language processing, including language translation, chatbots, and story writing, among others. This guide describes how to utilize ChatGPT through the OpenAI API service on macOS operating systems. Additionally, it provides instructions for interacting with ChatGPT using Python. Connect to ChatGPT via API To set up ChatGPT API follow these instructions: Set up an API Key Sign up to OpenAI and follow the indications to create a new secret key. ...

Fundamentals of Dictionaries

May 17, 2023
article
python, data structures, development

Are you interested in learning about a more efficient way to store and access information than using a traditional list? Consider using dictionaries. A dictionary, also known as an associative array, map, hash, or hash map, is a data structure that represents objects as key-value pairs, making it easy to access information by knowing a key. For instance, suppose you want to create an inventory of your video games, including information like name, genre, platforms, and ratings. ...

How to Create Python Packages

Dec 14, 2021
article
python, packages

A Python package is a collection of modules. A module is the easiest way to import and reuse existing Python code that’s developed by other programmers. In simple terms, a package is a module, but not all modules are packages. So, the question that raises is: what differentiates a package from a module? The response lies in a file named __init__.py, which indicates that the folder directory is a package. In this article, we’ll walk you through the main concepts and steps about how to create, install, publish, and test your own Python package locally and globally. ...